@progress/kendo-react-dateinputs 14.5.0-develop.9 → 15.0.0-develop.2
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/CalendarMcpWrapper.d.ts +16 -0
- package/CalendarMcpWrapper.js +8 -0
- package/CalendarMcpWrapper.mjs +18 -0
- package/DateRangePickerMcpWrapper.d.ts +16 -0
- package/DateRangePickerMcpWrapper.js +8 -0
- package/DateRangePickerMcpWrapper.mjs +18 -0
- package/DateTimePickerMcpWrapper.d.ts +16 -0
- package/DateTimePickerMcpWrapper.js +8 -0
- package/DateTimePickerMcpWrapper.mjs +18 -0
- package/README.md +4 -4
- package/TimePickerMcpWrapper.d.ts +16 -0
- package/TimePickerMcpWrapper.js +8 -0
- package/TimePickerMcpWrapper.mjs +18 -0
- package/calendar/components/Calendar.d.ts +6 -1
- package/calendar/components/Calendar.mjs +5 -5
- package/dateinput/DateInput.d.ts +11 -1
- package/dateinput/DateInput.js +1 -1
- package/dateinput/DateInput.mjs +202 -194
- package/datepicker/DatePicker.d.ts +6 -1
- package/datepicker/DatePicker.js +1 -1
- package/datepicker/DatePicker.mjs +233 -231
- package/daterangepicker/DateRangePicker.d.ts +6 -1
- package/daterangepicker/DateRangePicker.js +1 -1
- package/daterangepicker/DateRangePicker.mjs +65 -61
- package/datetimepicker/DateTimePicker.d.ts +7 -1
- package/datetimepicker/DateTimePicker.js +1 -1
- package/datetimepicker/DateTimePicker.mjs +106 -100
- package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
- package/index.d.mts +12 -4
- package/index.d.ts +12 -4
- package/index.js +1 -1
- package/index.mjs +110 -105
- package/messages/index.d.ts +25 -0
- package/messages/index.js +1 -1
- package/messages/index.mjs +46 -36
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +8 -8
- package/timepicker/TimePicker.d.ts +7 -1
- package/timepicker/TimePicker.js +1 -1
- package/timepicker/TimePicker.mjs +90 -87
|
@@ -7,112 +7,112 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as o from "react";
|
|
9
9
|
import t from "prop-types";
|
|
10
|
-
import { Popup as
|
|
11
|
-
import { cloneDate as
|
|
12
|
-
import { useId as
|
|
13
|
-
import { calendarIcon as
|
|
14
|
-
import {
|
|
15
|
-
import { Calendar as
|
|
16
|
-
import { MIN_DATE as
|
|
17
|
-
import { toggleCalendar as
|
|
18
|
-
import { useLocalization as
|
|
19
|
-
import { ToggleButton as
|
|
20
|
-
import { PickerFloatingLabel as
|
|
21
|
-
import { ActionSheetContent as
|
|
22
|
-
import { AdaptiveMode as
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
defaultShow:
|
|
26
|
-
defaultValue:
|
|
27
|
-
dateInput:
|
|
28
|
-
calendar:
|
|
29
|
-
toggleButton:
|
|
30
|
-
popup:
|
|
10
|
+
import { Popup as pt } from "@progress/kendo-react-popup";
|
|
11
|
+
import { cloneDate as ue, getDate as gt } from "@progress/kendo-date-math";
|
|
12
|
+
import { useId as ht, useAdaptiveModeContext as vt, usePropsContext as bt, useWebMcpRegister as wt, useKendoPaste as yt, canUseDOM as se, AsyncFocusBlur as Ct, classNames as ce, kendoThemeMaps as de, createPropsContext as Dt, Keys as O } from "@progress/kendo-react-common";
|
|
13
|
+
import { calendarIcon as Pt } from "@progress/kendo-svg-icons";
|
|
14
|
+
import { DateInputInner as kt } from "../dateinput/DateInput.mjs";
|
|
15
|
+
import { Calendar as Ot } from "../calendar/components/Calendar.mjs";
|
|
16
|
+
import { MIN_DATE as Mt, MAX_DATE as Rt, isInDateRange as fe, setTime as It, nullable as a } from "../utils.mjs";
|
|
17
|
+
import { toggleCalendar as me, messages as pe, selectDate as ge } from "../messages/index.mjs";
|
|
18
|
+
import { useLocalization as St } from "@progress/kendo-react-intl";
|
|
19
|
+
import { ToggleButton as _t } from "./ToggleButton.mjs";
|
|
20
|
+
import { PickerFloatingLabel as Et } from "../hooks/usePickerFloatingLabel.mjs";
|
|
21
|
+
import { ActionSheetContent as Bt } from "@progress/kendo-react-layout";
|
|
22
|
+
import { AdaptiveMode as Tt } from "../common/AdaptiveMode.mjs";
|
|
23
|
+
const he = o.forwardRef((r, ve) => {
|
|
24
|
+
const S = ht(r.id), W = St(), w = vt(), {
|
|
25
|
+
defaultShow: be = i.defaultShow,
|
|
26
|
+
defaultValue: we = i.defaultValue,
|
|
27
|
+
dateInput: ye = i.dateInput,
|
|
28
|
+
calendar: Ce = i.calendar,
|
|
29
|
+
toggleButton: De = i.toggleButton,
|
|
30
|
+
popup: Pe = i.popup,
|
|
31
31
|
disabled: m = i.disabled,
|
|
32
|
-
format:
|
|
33
|
-
max:
|
|
34
|
-
min:
|
|
35
|
-
popupSettings:
|
|
32
|
+
format: ke = i.format,
|
|
33
|
+
max: y = i.max,
|
|
34
|
+
min: C = i.min,
|
|
35
|
+
popupSettings: D = i.popupSettings,
|
|
36
36
|
tabIndex: Oe = i.tabIndex,
|
|
37
|
-
weekNumber:
|
|
37
|
+
weekNumber: Me = i.weekNumber,
|
|
38
38
|
validityStyles: q = i.validityStyles,
|
|
39
|
-
size:
|
|
39
|
+
size: _ = i.size,
|
|
40
40
|
rounded: E = i.rounded,
|
|
41
41
|
fillMode: B = i.fillMode,
|
|
42
|
-
autoFocus:
|
|
43
|
-
show:
|
|
44
|
-
autoSwitchParts:
|
|
45
|
-
autoSwitchKeys:
|
|
46
|
-
twoDigitYearMax:
|
|
47
|
-
ariaLabel:
|
|
48
|
-
adaptive:
|
|
49
|
-
adaptiveTitle:
|
|
50
|
-
adaptiveSubtitle:
|
|
51
|
-
formatPlaceholder:
|
|
52
|
-
inputAttributes:
|
|
53
|
-
validationMessage:
|
|
54
|
-
visited:
|
|
42
|
+
autoFocus: Re = i.autoFocus,
|
|
43
|
+
show: H,
|
|
44
|
+
autoSwitchParts: Ie,
|
|
45
|
+
autoSwitchKeys: Se,
|
|
46
|
+
twoDigitYearMax: _e,
|
|
47
|
+
ariaLabel: Ee,
|
|
48
|
+
adaptive: Nt,
|
|
49
|
+
adaptiveTitle: Be = r.label || void 0,
|
|
50
|
+
adaptiveSubtitle: Te,
|
|
51
|
+
formatPlaceholder: xe,
|
|
52
|
+
inputAttributes: Ne,
|
|
53
|
+
validationMessage: U,
|
|
54
|
+
visited: At,
|
|
55
55
|
value: T,
|
|
56
|
-
touched:
|
|
57
|
-
modified:
|
|
58
|
-
_adaptiveMode:
|
|
59
|
-
valid:
|
|
60
|
-
focusedDate:
|
|
61
|
-
id:
|
|
62
|
-
ariaLabelledBy:
|
|
63
|
-
ariaDescribedBy:
|
|
64
|
-
placeholder:
|
|
65
|
-
onChange:
|
|
66
|
-
onOpen:
|
|
67
|
-
onClose:
|
|
68
|
-
...
|
|
69
|
-
} =
|
|
70
|
-
if (
|
|
56
|
+
touched: Ft,
|
|
57
|
+
modified: Lt,
|
|
58
|
+
_adaptiveMode: Vt = w,
|
|
59
|
+
valid: Y,
|
|
60
|
+
focusedDate: Ae,
|
|
61
|
+
id: Fe,
|
|
62
|
+
ariaLabelledBy: Le,
|
|
63
|
+
ariaDescribedBy: Ve,
|
|
64
|
+
placeholder: ze,
|
|
65
|
+
onChange: $,
|
|
66
|
+
onOpen: j,
|
|
67
|
+
onClose: X,
|
|
68
|
+
...Z
|
|
69
|
+
} = bt(xt, r), x = () => {
|
|
70
|
+
if (se)
|
|
71
71
|
return d.current && d.current.ownerDocument || window.document;
|
|
72
|
-
}, s = () => !!(
|
|
73
|
-
const e = M.current !== void 0 ? M.current : T !== void 0 ? T :
|
|
74
|
-
return e !== null ?
|
|
75
|
-
}, l = () => R.current !== void 0 ? R.current :
|
|
76
|
-
const e =
|
|
72
|
+
}, s = () => !!(p.windowWidth && w && p.windowWidth <= (w == null ? void 0 : w.medium) && r.adaptive), g = () => {
|
|
73
|
+
const e = M.current !== void 0 ? M.current : T !== void 0 ? T : p.value;
|
|
74
|
+
return e !== null ? ue(e) : null;
|
|
75
|
+
}, l = () => R.current !== void 0 ? R.current : H !== void 0 ? H : p.show, Ke = () => ye || i.dateInput, We = () => De || i.toggleButton, qe = () => Ce || i.calendar, He = () => Pe || i.popup, G = () => r.required !== void 0 ? r.required : !1, N = () => {
|
|
76
|
+
const e = g() || T || null, n = C, u = y, I = fe(e, n, u), V = U !== void 0, z = (!G() || e != null) && I, K = Y !== void 0 ? Y : z;
|
|
77
77
|
return {
|
|
78
|
-
customError:
|
|
78
|
+
customError: V,
|
|
79
79
|
rangeOverflow: e && u.getTime() < e.getTime() || !1,
|
|
80
80
|
rangeUnderflow: e && e.getTime() < n.getTime() || !1,
|
|
81
81
|
valid: K,
|
|
82
82
|
valueMissing: e === null
|
|
83
83
|
};
|
|
84
|
-
},
|
|
84
|
+
}, Ue = (e) => {
|
|
85
85
|
for (const n of e)
|
|
86
|
-
|
|
87
|
-
},
|
|
86
|
+
k({ windowWidth: n.target.clientWidth });
|
|
87
|
+
}, Ye = () => {
|
|
88
88
|
c.current && c.current.focus();
|
|
89
|
-
},
|
|
89
|
+
}, J = (e) => {
|
|
90
90
|
f.current = e;
|
|
91
|
-
},
|
|
92
|
-
l() !== e && (
|
|
93
|
-
},
|
|
94
|
-
const n =
|
|
95
|
-
return n && e ?
|
|
96
|
-
},
|
|
97
|
-
|
|
91
|
+
}, h = (e) => {
|
|
92
|
+
l() !== e && (k({ show: e }), e && j && j({ target: v.current }), !e && X && X({ target: v.current }));
|
|
93
|
+
}, $e = (e) => {
|
|
94
|
+
const n = g();
|
|
95
|
+
return n && e ? It(e, n) : e;
|
|
96
|
+
}, je = (e) => {
|
|
97
|
+
D != null && D.onMouseDownOutside && D.onMouseDownOutside(e);
|
|
98
98
|
}, A = (e, n) => {
|
|
99
|
-
|
|
99
|
+
k({ value: ue(e || void 0) }), M.current = e, R.current = !1, s() || (b.current = !0), $ && $({
|
|
100
100
|
syntheticEvent: n.syntheticEvent,
|
|
101
101
|
nativeEvent: n.nativeEvent,
|
|
102
|
-
value:
|
|
102
|
+
value: g(),
|
|
103
103
|
show: l(),
|
|
104
|
-
target:
|
|
105
|
-
}), M.current = void 0, R.current = void 0,
|
|
106
|
-
},
|
|
107
|
-
const n =
|
|
104
|
+
target: v.current
|
|
105
|
+
}), M.current = void 0, R.current = void 0, h(!1);
|
|
106
|
+
}, Xe = (e) => {
|
|
107
|
+
const n = $e(e.value);
|
|
108
108
|
A(n, e);
|
|
109
|
-
},
|
|
110
|
-
const { popupClass: e, ...n } =
|
|
109
|
+
}, Q = () => {
|
|
110
|
+
const { popupClass: e, ...n } = D, u = l(), I = g(), V = I && gt(I), z = ce(e), K = {
|
|
111
111
|
popupClass: "k-datepicker-popup",
|
|
112
112
|
show: u,
|
|
113
113
|
anchor: d.current,
|
|
114
|
-
className:
|
|
115
|
-
id:
|
|
114
|
+
className: z,
|
|
115
|
+
id: ne,
|
|
116
116
|
anchorAlign: {
|
|
117
117
|
horizontal: "left",
|
|
118
118
|
vertical: "bottom"
|
|
@@ -122,52 +122,52 @@ const me = o.forwardRef((a, pe) => {
|
|
|
122
122
|
vertical: "top"
|
|
123
123
|
},
|
|
124
124
|
...n,
|
|
125
|
-
onMouseDownOutside:
|
|
126
|
-
},
|
|
125
|
+
onMouseDownOutside: je
|
|
126
|
+
}, ie = {
|
|
127
127
|
disabled: m,
|
|
128
|
-
value:
|
|
129
|
-
min:
|
|
130
|
-
max:
|
|
131
|
-
weekNumber:
|
|
132
|
-
focusedDate:
|
|
128
|
+
value: V,
|
|
129
|
+
min: C,
|
|
130
|
+
max: y,
|
|
131
|
+
weekNumber: Me,
|
|
132
|
+
focusedDate: Ae,
|
|
133
133
|
className: s() ? "k-calendar-lg" : "",
|
|
134
134
|
navigation: !s(),
|
|
135
|
-
onChange:
|
|
136
|
-
},
|
|
137
|
-
return s() ? /* @__PURE__ */ o.createElement(
|
|
138
|
-
},
|
|
139
|
-
|
|
140
|
-
},
|
|
141
|
-
const { windowWidth: e = 0 } =
|
|
135
|
+
onChange: Xe
|
|
136
|
+
}, le = qe(), mt = He();
|
|
137
|
+
return s() ? /* @__PURE__ */ o.createElement(le, { _ref: J, ...ie }) : /* @__PURE__ */ o.createElement(mt, { ...K }, /* @__PURE__ */ o.createElement(le, { _ref: J, ...ie }));
|
|
138
|
+
}, ee = () => {
|
|
139
|
+
k({ focused: !1 }), h(!1);
|
|
140
|
+
}, Ze = () => {
|
|
141
|
+
const { windowWidth: e = 0 } = p, n = {
|
|
142
142
|
expand: l(),
|
|
143
|
-
onClose:
|
|
144
|
-
title:
|
|
145
|
-
subTitle:
|
|
143
|
+
onClose: ee,
|
|
144
|
+
title: Be,
|
|
145
|
+
subTitle: Te,
|
|
146
146
|
windowWidth: e
|
|
147
147
|
};
|
|
148
|
-
return /* @__PURE__ */ o.createElement(
|
|
149
|
-
},
|
|
148
|
+
return /* @__PURE__ */ o.createElement(Tt, { ...n }, /* @__PURE__ */ o.createElement(Bt, null, Q()));
|
|
149
|
+
}, Ge = (e) => {
|
|
150
150
|
A(e.value, e);
|
|
151
|
-
},
|
|
152
|
-
|
|
153
|
-
},
|
|
154
|
-
|
|
151
|
+
}, Je = () => {
|
|
152
|
+
k({ focused: !0 });
|
|
153
|
+
}, Qe = () => {
|
|
154
|
+
h(!l());
|
|
155
155
|
}, F = () => {
|
|
156
|
-
m || (
|
|
157
|
-
},
|
|
156
|
+
m || (b.current = !0, h(!l()));
|
|
157
|
+
}, et = (e) => {
|
|
158
158
|
e.preventDefault();
|
|
159
|
-
},
|
|
159
|
+
}, tt = (e) => {
|
|
160
160
|
const { altKey: n, keyCode: u } = e;
|
|
161
|
-
if (u ===
|
|
162
|
-
|
|
161
|
+
if (u === O.esc && l()) {
|
|
162
|
+
b.current = !0, h(!1);
|
|
163
163
|
return;
|
|
164
164
|
}
|
|
165
|
-
n && (u ===
|
|
166
|
-
},
|
|
165
|
+
n && (u === O.up || u === O.down) && (e.preventDefault(), e.stopPropagation(), b.current = u === O.up, h(u === O.down));
|
|
166
|
+
}, v = o.useRef(null), d = o.useRef(null), c = o.useRef(null), f = o.useRef(null);
|
|
167
167
|
o.useImperativeHandle(
|
|
168
|
-
|
|
168
|
+
v,
|
|
169
169
|
() => ({
|
|
170
|
-
props:
|
|
170
|
+
props: r,
|
|
171
171
|
get element() {
|
|
172
172
|
return d.current;
|
|
173
173
|
},
|
|
@@ -178,7 +178,7 @@ const me = o.forwardRef((a, pe) => {
|
|
|
178
178
|
return c.current;
|
|
179
179
|
},
|
|
180
180
|
get name() {
|
|
181
|
-
return
|
|
181
|
+
return r.name;
|
|
182
182
|
},
|
|
183
183
|
get show() {
|
|
184
184
|
return l();
|
|
@@ -187,21 +187,21 @@ const me = o.forwardRef((a, pe) => {
|
|
|
187
187
|
return N();
|
|
188
188
|
},
|
|
189
189
|
get value() {
|
|
190
|
-
return
|
|
190
|
+
return g();
|
|
191
191
|
},
|
|
192
192
|
get mobileMode() {
|
|
193
193
|
return s();
|
|
194
194
|
},
|
|
195
|
-
togglePopup:
|
|
195
|
+
togglePopup: Qe,
|
|
196
196
|
// Hidden Methods but still accessible
|
|
197
|
-
focus:
|
|
197
|
+
focus: Ye
|
|
198
198
|
})
|
|
199
|
-
), o.useImperativeHandle(
|
|
200
|
-
const M = o.useRef(void 0), R = o.useRef(void 0),
|
|
201
|
-
value:
|
|
202
|
-
show:
|
|
199
|
+
), o.useImperativeHandle(ve, () => v.current), wt("datepicker", v, r, r.webMcp);
|
|
200
|
+
const M = o.useRef(void 0), R = o.useRef(void 0), nt = o.useRef(null), b = o.useRef(!1), L = o.useRef(!1), P = o.useRef(null), [p, ot] = o.useState({
|
|
201
|
+
value: we,
|
|
202
|
+
show: be,
|
|
203
203
|
focused: !1
|
|
204
|
-
}), [,
|
|
204
|
+
}), [, rt] = o.useReducer((e) => e, !0), te = r.name || S || void 0, at = o.useCallback(
|
|
205
205
|
(e) => {
|
|
206
206
|
if (m)
|
|
207
207
|
return;
|
|
@@ -214,7 +214,7 @@ const me = o.forwardRef((a, pe) => {
|
|
|
214
214
|
isNaN(u.getTime()) || (n = u);
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
|
-
if (n &&
|
|
217
|
+
if (n && fe(n, C, y)) {
|
|
218
218
|
const u = {
|
|
219
219
|
target: d.current,
|
|
220
220
|
currentTarget: d.current
|
|
@@ -222,133 +222,135 @@ const me = o.forwardRef((a, pe) => {
|
|
|
222
222
|
A(n, { syntheticEvent: u });
|
|
223
223
|
}
|
|
224
224
|
},
|
|
225
|
-
[m,
|
|
225
|
+
[m, C, y]
|
|
226
226
|
);
|
|
227
|
-
|
|
228
|
-
fieldName:
|
|
229
|
-
onValueChange:
|
|
230
|
-
enabled: !!
|
|
227
|
+
yt(d, {
|
|
228
|
+
fieldName: te,
|
|
229
|
+
onValueChange: at,
|
|
230
|
+
enabled: !!te
|
|
231
231
|
});
|
|
232
|
-
const
|
|
233
|
-
|
|
232
|
+
const k = (e) => {
|
|
233
|
+
ot((n) => ({ ...n, ...e }));
|
|
234
234
|
};
|
|
235
235
|
o.useEffect(() => {
|
|
236
|
-
f.current && f.current.element && l() && !
|
|
236
|
+
f.current && f.current.element && l() && !L.current && f.current.element.focus({ preventScroll: !0 }), s() && l() && !L.current && setTimeout(() => {
|
|
237
237
|
f.current && f.current.element && f.current.element.focus({ preventScroll: !0 });
|
|
238
|
-
}, 300), c.current && c.current.element && !l() &&
|
|
238
|
+
}, 300), c.current && c.current.element && !l() && b.current && c.current.element.focus({ preventScroll: !0 }), L.current = l(), b.current = !1;
|
|
239
239
|
}), o.useEffect(() => {
|
|
240
240
|
var e;
|
|
241
|
-
return
|
|
241
|
+
return P.current = se && window.ResizeObserver && new window.ResizeObserver((n) => Ue(n)), l() && rt(), (e = x()) != null && e.body && P.current && P.current.observe(x().body), () => {
|
|
242
242
|
var n;
|
|
243
|
-
clearTimeout(
|
|
243
|
+
clearTimeout(nt.current), (n = x()) != null && n.body && P.current && P.current.disconnect();
|
|
244
244
|
};
|
|
245
245
|
}, []);
|
|
246
|
-
const
|
|
246
|
+
const ne = S + "-popup-id", it = Q(), lt = Ke(), ut = g(), st = We(), ct = Ze(), oe = !q || N().valid, re = W.toLanguageString(me, pe[me]), dt = Ee || W.toLanguageString(ge, pe[ge]), ft = {
|
|
247
247
|
disabled: m,
|
|
248
|
-
format:
|
|
249
|
-
formatPlaceholder:
|
|
250
|
-
id:
|
|
251
|
-
ariaLabelledBy:
|
|
252
|
-
ariaDescribedBy:
|
|
253
|
-
ariaLabel:
|
|
254
|
-
max:
|
|
255
|
-
min:
|
|
256
|
-
name:
|
|
257
|
-
onChange:
|
|
258
|
-
required:
|
|
248
|
+
format: ke,
|
|
249
|
+
formatPlaceholder: xe,
|
|
250
|
+
id: Fe,
|
|
251
|
+
ariaLabelledBy: Le,
|
|
252
|
+
ariaDescribedBy: Ve,
|
|
253
|
+
ariaLabel: dt,
|
|
254
|
+
max: y,
|
|
255
|
+
min: C,
|
|
256
|
+
name: r.name,
|
|
257
|
+
onChange: Ge,
|
|
258
|
+
required: r.required,
|
|
259
259
|
_ref: c,
|
|
260
260
|
tabIndex: l() ? -1 : Oe,
|
|
261
|
-
title:
|
|
261
|
+
title: r.title,
|
|
262
262
|
valid: N().valid,
|
|
263
|
-
validationMessage:
|
|
263
|
+
validationMessage: U,
|
|
264
264
|
validityStyles: q,
|
|
265
|
-
value:
|
|
265
|
+
value: ut,
|
|
266
266
|
label: void 0,
|
|
267
|
-
placeholder:
|
|
267
|
+
placeholder: p.focused ? null : ze,
|
|
268
268
|
ariaExpanded: l(),
|
|
269
|
-
autoFill:
|
|
270
|
-
twoDigitYearMax:
|
|
271
|
-
enableMouseWheel:
|
|
272
|
-
autoCorrectParts:
|
|
273
|
-
autoSwitchParts:
|
|
274
|
-
autoSwitchKeys:
|
|
275
|
-
allowCaretMode:
|
|
276
|
-
inputAttributes:
|
|
277
|
-
},
|
|
278
|
-
|
|
269
|
+
autoFill: r.autoFill,
|
|
270
|
+
twoDigitYearMax: _e,
|
|
271
|
+
enableMouseWheel: r.enableMouseWheel,
|
|
272
|
+
autoCorrectParts: r.autoCorrectParts,
|
|
273
|
+
autoSwitchParts: Ie,
|
|
274
|
+
autoSwitchKeys: Se,
|
|
275
|
+
allowCaretMode: r.allowCaretMode,
|
|
276
|
+
inputAttributes: Ne
|
|
277
|
+
}, ae = /* @__PURE__ */ o.createElement(
|
|
278
|
+
Ct,
|
|
279
279
|
{
|
|
280
|
-
onFocus:
|
|
281
|
-
onBlur: s() ? void 0 :
|
|
282
|
-
onSyncBlur:
|
|
283
|
-
onSyncFocus:
|
|
280
|
+
onFocus: Je,
|
|
281
|
+
onBlur: s() ? void 0 : ee,
|
|
282
|
+
onSyncBlur: r.onBlur,
|
|
283
|
+
onSyncFocus: r.onFocus
|
|
284
284
|
},
|
|
285
285
|
(e) => /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(
|
|
286
286
|
"span",
|
|
287
287
|
{
|
|
288
|
-
...
|
|
288
|
+
...r.label ? {} : Z,
|
|
289
289
|
ref: d,
|
|
290
|
-
className:
|
|
290
|
+
className: ce(
|
|
291
291
|
"k-input",
|
|
292
292
|
"k-datepicker",
|
|
293
293
|
{
|
|
294
|
-
[`k-input-${
|
|
295
|
-
[`k-rounded-${
|
|
294
|
+
[`k-input-${de.sizeMap[_] || _}`]: _,
|
|
295
|
+
[`k-rounded-${de.roundedMap[E] || E}`]: E,
|
|
296
296
|
[`k-input-${B}`]: B,
|
|
297
|
-
"k-invalid": !
|
|
298
|
-
"k-required":
|
|
299
|
-
"k-disabled": m
|
|
297
|
+
"k-invalid": !oe,
|
|
298
|
+
"k-required": G(),
|
|
299
|
+
"k-disabled": m,
|
|
300
|
+
"k-focus": p.focused
|
|
300
301
|
},
|
|
301
|
-
|
|
302
|
+
r.className
|
|
302
303
|
),
|
|
303
|
-
onKeyDown:
|
|
304
|
-
style: { width:
|
|
304
|
+
onKeyDown: tt,
|
|
305
|
+
style: { width: r.width },
|
|
305
306
|
onFocus: s() ? F : e.onFocus,
|
|
306
307
|
onBlur: e.onBlur,
|
|
307
308
|
onClick: s() ? F : void 0
|
|
308
309
|
},
|
|
309
310
|
/* @__PURE__ */ o.createElement(
|
|
310
|
-
|
|
311
|
+
lt,
|
|
311
312
|
{
|
|
312
313
|
_ref: c,
|
|
313
314
|
ariaRole: "combobox",
|
|
315
|
+
ariaHasPopup: "grid",
|
|
314
316
|
ariaExpanded: l(),
|
|
315
|
-
ariaControls: l() ?
|
|
316
|
-
autoFocus:
|
|
317
|
-
...
|
|
317
|
+
ariaControls: l() ? ne : void 0,
|
|
318
|
+
autoFocus: Re,
|
|
319
|
+
...ft
|
|
318
320
|
}
|
|
319
321
|
),
|
|
320
322
|
/* @__PURE__ */ o.createElement(
|
|
321
|
-
|
|
323
|
+
st,
|
|
322
324
|
{
|
|
323
325
|
type: "button",
|
|
324
326
|
icon: "calendar",
|
|
325
|
-
svgIcon:
|
|
326
|
-
title:
|
|
327
|
+
svgIcon: Pt,
|
|
328
|
+
title: re,
|
|
327
329
|
className: "k-input-button",
|
|
328
330
|
onClick: s() ? void 0 : F,
|
|
329
|
-
"aria-label":
|
|
331
|
+
"aria-label": re,
|
|
330
332
|
fillMode: B,
|
|
331
|
-
onMouseDown:
|
|
333
|
+
onMouseDown: et
|
|
332
334
|
}
|
|
333
335
|
),
|
|
334
|
-
!s() &&
|
|
335
|
-
), s() &&
|
|
336
|
+
!s() && it
|
|
337
|
+
), s() && ct)
|
|
336
338
|
);
|
|
337
|
-
return
|
|
338
|
-
|
|
339
|
+
return r.label ? /* @__PURE__ */ o.createElement(
|
|
340
|
+
Et,
|
|
339
341
|
{
|
|
340
342
|
dateInput: c,
|
|
341
|
-
label:
|
|
342
|
-
editorId:
|
|
343
|
-
editorValid:
|
|
343
|
+
label: r.label,
|
|
344
|
+
editorId: S,
|
|
345
|
+
editorValid: oe,
|
|
344
346
|
editorDisabled: m,
|
|
345
|
-
children:
|
|
346
|
-
style: { width:
|
|
347
|
-
...
|
|
347
|
+
children: ae,
|
|
348
|
+
style: { width: r.width },
|
|
349
|
+
...Z
|
|
348
350
|
}
|
|
349
|
-
) :
|
|
351
|
+
) : ae;
|
|
350
352
|
});
|
|
351
|
-
|
|
353
|
+
he.propTypes = {
|
|
352
354
|
className: t.string,
|
|
353
355
|
defaultShow: t.bool,
|
|
354
356
|
defaultValue: t.instanceOf(Date),
|
|
@@ -357,34 +359,34 @@ me.propTypes = {
|
|
|
357
359
|
format: t.oneOfType([
|
|
358
360
|
t.string,
|
|
359
361
|
t.shape({
|
|
360
|
-
skeleton:
|
|
361
|
-
pattern:
|
|
362
|
-
date:
|
|
363
|
-
time:
|
|
364
|
-
datetime:
|
|
365
|
-
era:
|
|
366
|
-
year:
|
|
367
|
-
month:
|
|
368
|
-
day:
|
|
369
|
-
weekday:
|
|
370
|
-
hour:
|
|
371
|
-
hour12:
|
|
372
|
-
minute:
|
|
373
|
-
second:
|
|
374
|
-
timeZoneName:
|
|
362
|
+
skeleton: a(t.string),
|
|
363
|
+
pattern: a(t.string),
|
|
364
|
+
date: a(t.oneOf(["short", "medium", "long", "full"])),
|
|
365
|
+
time: a(t.oneOf(["short", "medium", "long", "full"])),
|
|
366
|
+
datetime: a(t.oneOf(["short", "medium", "long", "full"])),
|
|
367
|
+
era: a(t.oneOf(["narrow", "short", "long"])),
|
|
368
|
+
year: a(t.oneOf(["numeric", "2-digit"])),
|
|
369
|
+
month: a(t.oneOf(["numeric", "2-digit", "narrow", "short", "long"])),
|
|
370
|
+
day: a(t.oneOf(["numeric", "2-digit"])),
|
|
371
|
+
weekday: a(t.oneOf(["narrow", "short", "long"])),
|
|
372
|
+
hour: a(t.oneOf(["numeric", "2-digit"])),
|
|
373
|
+
hour12: a(t.bool),
|
|
374
|
+
minute: a(t.oneOf(["numeric", "2-digit"])),
|
|
375
|
+
second: a(t.oneOf(["numeric", "2-digit"])),
|
|
376
|
+
timeZoneName: a(t.oneOf(["short", "long"]))
|
|
375
377
|
})
|
|
376
378
|
]),
|
|
377
379
|
formatPlaceholder: t.oneOfType([
|
|
378
|
-
|
|
380
|
+
a(
|
|
379
381
|
t.oneOf(["wide", "narrow", "short", "formatPattern"])
|
|
380
382
|
),
|
|
381
383
|
t.shape({
|
|
382
|
-
year:
|
|
383
|
-
month:
|
|
384
|
-
day:
|
|
385
|
-
hour:
|
|
386
|
-
minute:
|
|
387
|
-
second:
|
|
384
|
+
year: a(t.string),
|
|
385
|
+
month: a(t.string),
|
|
386
|
+
day: a(t.string),
|
|
387
|
+
hour: a(t.string),
|
|
388
|
+
minute: a(t.string),
|
|
389
|
+
second: a(t.string)
|
|
388
390
|
})
|
|
389
391
|
]),
|
|
390
392
|
id: t.string,
|
|
@@ -395,9 +397,9 @@ me.propTypes = {
|
|
|
395
397
|
max: t.instanceOf(Date),
|
|
396
398
|
name: t.string,
|
|
397
399
|
popupSettings: t.shape({
|
|
398
|
-
animate:
|
|
399
|
-
appendTo:
|
|
400
|
-
popupClass:
|
|
400
|
+
animate: a(t.bool),
|
|
401
|
+
appendTo: a(t.any),
|
|
402
|
+
popupClass: a(t.string)
|
|
401
403
|
}),
|
|
402
404
|
show: t.bool,
|
|
403
405
|
tabIndex: t.number,
|
|
@@ -420,14 +422,14 @@ me.propTypes = {
|
|
|
420
422
|
const i = {
|
|
421
423
|
defaultShow: !1,
|
|
422
424
|
defaultValue: null,
|
|
423
|
-
dateInput:
|
|
424
|
-
calendar:
|
|
425
|
-
toggleButton:
|
|
426
|
-
popup:
|
|
425
|
+
dateInput: kt,
|
|
426
|
+
calendar: Ot,
|
|
427
|
+
toggleButton: _t,
|
|
428
|
+
popup: pt,
|
|
427
429
|
disabled: !1,
|
|
428
430
|
format: "d",
|
|
429
|
-
max:
|
|
430
|
-
min:
|
|
431
|
+
max: Rt,
|
|
432
|
+
min: Mt,
|
|
431
433
|
popupSettings: {},
|
|
432
434
|
tabIndex: 0,
|
|
433
435
|
weekNumber: !1,
|
|
@@ -436,10 +438,10 @@ const i = {
|
|
|
436
438
|
rounded: void 0,
|
|
437
439
|
fillMode: void 0,
|
|
438
440
|
autoFocus: !1
|
|
439
|
-
},
|
|
440
|
-
|
|
441
|
+
}, xt = Dt();
|
|
442
|
+
he.displayName = "KendoReactDatePicker";
|
|
441
443
|
export {
|
|
442
|
-
|
|
443
|
-
|
|
444
|
+
he as DatePicker,
|
|
445
|
+
xt as DatePickerPropsContext,
|
|
444
446
|
i as datePickerDefaultProps
|
|
445
447
|
};
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import { default as PropTypes } from 'prop-types';
|
|
9
|
-
import { AdaptiveModeContextType } from '@progress/kendo-react-common';
|
|
9
|
+
import { AdaptiveModeContextType, WebMcpProps } from '@progress/kendo-react-common';
|
|
10
10
|
import { DateInputHandle, DateInputProps } from '../dateinput/DateInput.js';
|
|
11
11
|
import { MultiViewCalendar, MultiViewCalendarHandle } from '../calendar/components/MultiViewCalendar.js';
|
|
12
12
|
import { SelectionRange } from '../calendar/models/index.js';
|
|
@@ -135,6 +135,11 @@ export interface DateRangePickerProps extends DateRangePickerSettings {
|
|
|
135
135
|
* This prop is provided by the withAdaptiveModeContext HOC to subscribe to AdaptiveModeContext.
|
|
136
136
|
*/
|
|
137
137
|
_adaptiveMode?: AdaptiveModeContextType;
|
|
138
|
+
/**
|
|
139
|
+
* Enables Web MCP tool registration for this component.
|
|
140
|
+
* Requires a parent `WebMcpProvider` from `@progress/kendo-react-webmcp`.
|
|
141
|
+
*/
|
|
142
|
+
webMcp?: boolean | WebMcpProps;
|
|
138
143
|
}
|
|
139
144
|
/**
|
|
140
145
|
* @hidden
|