@progress/kendo-react-dateinputs 11.0.0-develop.1 → 11.0.0-develop.10
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/common/AdaptiveMode.js +1 -1
- package/common/AdaptiveMode.mjs +14 -13
- package/datepicker/DatePicker.js +1 -1
- package/datepicker/DatePicker.mjs +166 -159
- package/daterangepicker/DateRangePicker.js +1 -1
- package/daterangepicker/DateRangePicker.mjs +17 -15
- package/datetimepicker/DateTimePicker.js +1 -1
- package/datetimepicker/DateTimePicker.mjs +49 -46
- package/datetimepicker/DateTimeSelector.js +1 -1
- package/datetimepicker/DateTimeSelector.mjs +23 -21
- package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
- package/index.d.mts +42 -6
- package/index.d.ts +42 -6
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +8 -8
- package/timepicker/TimePicker.js +1 -1
- package/timepicker/TimePicker.mjs +39 -37
- package/timepicker/TimeSelector.js +1 -1
- package/timepicker/TimeSelector.mjs +49 -48
- package/utils.js +1 -1
- package/utils.mjs +3 -1
- package/virtualization/Virtualization.js +1 -1
- package/virtualization/Virtualization.mjs +1 -1
|
@@ -9,8 +9,8 @@ import * as i from "react";
|
|
|
9
9
|
import { provideLocalizationService as R, registerForLocalization as M } from "@progress/kendo-react-intl";
|
|
10
10
|
import { dateTimePickerCancel as D, messages as f, dateTimePickerSet as _, date as T, time as E } from "../messages/index.mjs";
|
|
11
11
|
import { Button as g, ButtonGroup as x } from "@progress/kendo-react-buttons";
|
|
12
|
-
import { Calendar as
|
|
13
|
-
import { TimePart as
|
|
12
|
+
import { Calendar as z } from "../calendar/components/Calendar.mjs";
|
|
13
|
+
import { TimePart as A } from "../timepicker/TimePart.mjs";
|
|
14
14
|
import { MIDNIGHT_DATE as v, MIN_TIME as F, MAX_TIME as L, getToday as V, setTime as P } from "../utils.mjs";
|
|
15
15
|
import { isEqualDate as k } from "@progress/kendo-date-math";
|
|
16
16
|
import { classNames as l, uDateTimePicker as u, uTime as B, Keys as h, getActiveElement as I } from "@progress/kendo-react-common";
|
|
@@ -29,28 +29,28 @@ const y = class y extends i.Component {
|
|
|
29
29
|
const e = t === "left" ? "date" : "time";
|
|
30
30
|
this.shouldFocusPart = !0, this.setState({ tab: e });
|
|
31
31
|
}, this.dateTimeFooter = () => {
|
|
32
|
-
const { cancelButton: t, unstyled: e } = this.props, s = e && e.uDateTimePicker,
|
|
32
|
+
const { cancelButton: t, unstyled: e } = this.props, s = e && e.uDateTimePicker, o = this.localizationService.toLanguageString(D, f[D]), r = this.localizationService.toLanguageString(_, f[_]);
|
|
33
33
|
return /* @__PURE__ */ i.createElement("div", { className: l(u.timeFooter({ c: s })) }, t && /* @__PURE__ */ i.createElement(
|
|
34
34
|
g,
|
|
35
35
|
{
|
|
36
36
|
type: "button",
|
|
37
|
-
ref: (
|
|
38
|
-
this._cancelButton =
|
|
37
|
+
ref: (n) => {
|
|
38
|
+
this._cancelButton = n;
|
|
39
39
|
},
|
|
40
40
|
className: l(B.cancel({ c: s })),
|
|
41
41
|
onClick: this.handleReject,
|
|
42
42
|
onKeyDown: this.handleCancelKeyDown,
|
|
43
|
-
title:
|
|
44
|
-
"aria-label":
|
|
43
|
+
title: o,
|
|
44
|
+
"aria-label": o
|
|
45
45
|
},
|
|
46
|
-
|
|
46
|
+
o
|
|
47
47
|
), /* @__PURE__ */ i.createElement(
|
|
48
48
|
g,
|
|
49
49
|
{
|
|
50
50
|
type: "button",
|
|
51
51
|
themeColor: "primary",
|
|
52
|
-
ref: (
|
|
53
|
-
this._acceptButton =
|
|
52
|
+
ref: (n) => {
|
|
53
|
+
this._acceptButton = n;
|
|
54
54
|
},
|
|
55
55
|
className: l(B.accept({ c: s })),
|
|
56
56
|
disabled: !this.hasDateValue,
|
|
@@ -120,9 +120,9 @@ const y = class y extends i.Component {
|
|
|
120
120
|
const { keyCode: e } = t;
|
|
121
121
|
e === h.tab && this._dateButtonRef && this._dateButtonRef.element && (t.preventDefault(), this._dateButtonRef.element.focus());
|
|
122
122
|
}, this.handleDateKeyDown = (t) => {
|
|
123
|
-
var
|
|
123
|
+
var o, r, n, d;
|
|
124
124
|
const { keyCode: e, shiftKey: s } = t;
|
|
125
|
-
s && e === h.tab && (t.stopPropagation(), this.hasDateValue ? (d = (
|
|
125
|
+
s && e === h.tab && (t.stopPropagation(), this.hasDateValue ? (d = (n = this._acceptButton) == null ? void 0 : n.element) == null || d.focus() : (r = (o = this._cancelButton) == null ? void 0 : o.element) == null || r.focus()), e === h.enter && (t.stopPropagation(), this.move("left"));
|
|
126
126
|
}, this.handleTimeKeyDown = (t) => {
|
|
127
127
|
const { keyCode: e } = t;
|
|
128
128
|
e === h.enter && (t.stopPropagation(), this.move("right"));
|
|
@@ -148,13 +148,13 @@ const y = class y extends i.Component {
|
|
|
148
148
|
}
|
|
149
149
|
componentDidUpdate(a, t) {
|
|
150
150
|
var e, s;
|
|
151
|
-
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((
|
|
152
|
-
dateValue: a.value && this.props.value && k(a.value, this.props.value) ?
|
|
151
|
+
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((o) => ({
|
|
152
|
+
dateValue: a.value && this.props.value && k(a.value, this.props.value) ? o.dateValue : this.props.value,
|
|
153
153
|
timeValue: this.props.value || v
|
|
154
154
|
})), this.shouldFocusPart = !1;
|
|
155
155
|
}
|
|
156
156
|
render() {
|
|
157
|
-
const { disabled: a, min: t, max: e, weekNumber: s, focusedDate:
|
|
157
|
+
const { disabled: a, min: t, max: e, weekNumber: s, focusedDate: o, format: r, mobileMode: n, footerActions: d, unstyled: p } = this.props, m = p && p.uDateTimePicker, S = l(
|
|
158
158
|
u.wrap({
|
|
159
159
|
c: m,
|
|
160
160
|
date: this.state.tab === "date",
|
|
@@ -165,13 +165,13 @@ const y = class y extends i.Component {
|
|
|
165
165
|
min: t,
|
|
166
166
|
max: e,
|
|
167
167
|
weekNumber: s,
|
|
168
|
-
focusedDate:
|
|
168
|
+
focusedDate: o,
|
|
169
169
|
disabled: a || this.state.tab !== "date",
|
|
170
170
|
value: this.state.dateValue,
|
|
171
171
|
onChange: this.handleCalendarValueChange,
|
|
172
172
|
navigation: !1,
|
|
173
173
|
tabIndex: a || this.state.tab !== "date" ? -1 : void 0,
|
|
174
|
-
mobileMode:
|
|
174
|
+
mobileMode: n
|
|
175
175
|
};
|
|
176
176
|
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(
|
|
177
177
|
g,
|
|
@@ -182,6 +182,7 @@ const y = class y extends i.Component {
|
|
|
182
182
|
type: "button",
|
|
183
183
|
selected: this.state.tab === "date",
|
|
184
184
|
togglable: !0,
|
|
185
|
+
size: n ? "large" : void 0,
|
|
185
186
|
onClick: this.handleDateClick,
|
|
186
187
|
onKeyDown: this.handleDateKeyDown
|
|
187
188
|
},
|
|
@@ -192,6 +193,7 @@ const y = class y extends i.Component {
|
|
|
192
193
|
type: "button",
|
|
193
194
|
selected: this.state.tab === "time",
|
|
194
195
|
togglable: !0,
|
|
196
|
+
size: n ? "large" : void 0,
|
|
195
197
|
onClick: this.handleTimeClick,
|
|
196
198
|
onKeyDown: this.handleTimeKeyDown
|
|
197
199
|
},
|
|
@@ -205,7 +207,7 @@ const y = class y extends i.Component {
|
|
|
205
207
|
}
|
|
206
208
|
},
|
|
207
209
|
this.props.calendar ? /* @__PURE__ */ i.createElement(this.props.calendar, { key: this.state.tab, ...C }) : /* @__PURE__ */ i.createElement(
|
|
208
|
-
|
|
210
|
+
z,
|
|
209
211
|
{
|
|
210
212
|
key: this.state.tab,
|
|
211
213
|
ref: (c) => {
|
|
@@ -214,8 +216,8 @@ const y = class y extends i.Component {
|
|
|
214
216
|
...C
|
|
215
217
|
}
|
|
216
218
|
)
|
|
217
|
-
), /* @__PURE__ */ i.createElement("div", { className: l(u.timeWrap({ c: m })) }, /* @__PURE__ */ i.createElement("div", { className: l(u.timeSelector({ c: m, mobileMode:
|
|
218
|
-
|
|
219
|
+
), /* @__PURE__ */ i.createElement("div", { className: l(u.timeWrap({ c: m })) }, /* @__PURE__ */ i.createElement("div", { className: l(u.timeSelector({ c: m, mobileMode: n })) }, /* @__PURE__ */ i.createElement(
|
|
220
|
+
A,
|
|
219
221
|
{
|
|
220
222
|
key: 1,
|
|
221
223
|
onNowClick: this.handleNowClick,
|
|
@@ -230,7 +232,7 @@ const y = class y extends i.Component {
|
|
|
230
232
|
format: r,
|
|
231
233
|
onChange: this.handleTimeListContainerChange,
|
|
232
234
|
onMount: this.handleTimePartMount,
|
|
233
|
-
mobileMode:
|
|
235
|
+
mobileMode: n,
|
|
234
236
|
unstyled: p
|
|
235
237
|
}
|
|
236
238
|
)))), d && this.dateTimeFooter());
|