@progress/kendo-react-dateinputs 14.4.1 → 14.5.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.
Files changed (42) hide show
  1. package/calendar/components/Calendar.d.ts +35 -110
  2. package/calendar/components/Calendar.js +5 -5
  3. package/calendar/components/Calendar.mjs +288 -313
  4. package/calendar/components/CalendarCell.d.ts +1 -10
  5. package/calendar/components/CalendarCell.js +1 -1
  6. package/calendar/components/CalendarCell.mjs +68 -78
  7. package/calendar/components/Header.d.ts +10 -23
  8. package/calendar/components/Header.js +1 -1
  9. package/calendar/components/Header.mjs +41 -55
  10. package/calendar/components/HorizontalViewList.d.ts +28 -26
  11. package/calendar/components/HorizontalViewList.js +1 -1
  12. package/calendar/components/HorizontalViewList.mjs +112 -102
  13. package/calendar/components/MultiViewCalendar.d.ts +39 -141
  14. package/calendar/components/MultiViewCalendar.js +1 -1
  15. package/calendar/components/MultiViewCalendar.mjs +331 -373
  16. package/calendar/components/Navigation.d.ts +19 -39
  17. package/calendar/components/Navigation.js +1 -1
  18. package/calendar/components/Navigation.mjs +95 -107
  19. package/calendar/components/TodayCommand.d.ts +8 -25
  20. package/calendar/components/TodayCommand.js +1 -1
  21. package/calendar/components/TodayCommand.mjs +44 -61
  22. package/calendar/components/View.d.ts +11 -42
  23. package/calendar/components/View.js +1 -1
  24. package/calendar/components/View.mjs +111 -137
  25. package/calendar/components/ViewList.d.ts +25 -65
  26. package/calendar/components/ViewList.js +1 -1
  27. package/calendar/components/ViewList.mjs +207 -225
  28. package/calendar/services/ScrollSyncService.d.ts +4 -4
  29. package/dateinput/DateInput.js +1 -1
  30. package/dateinput/DateInput.mjs +55 -55
  31. package/datetimepicker/DateTimeSelector.d.ts +2 -3
  32. package/datetimepicker/DateTimeSelector.js +1 -1
  33. package/datetimepicker/DateTimeSelector.mjs +92 -89
  34. package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
  35. package/package-metadata.js +1 -1
  36. package/package-metadata.mjs +2 -2
  37. package/package.json +14 -9
  38. package/timepicker/TimePicker.js +1 -1
  39. package/timepicker/TimePicker.mjs +2 -2
  40. package/virtualization/Virtualization.d.ts +25 -63
  41. package/virtualization/Virtualization.js +1 -1
  42. package/virtualization/Virtualization.mjs +163 -168
@@ -5,233 +5,215 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import * as a from "react";
9
- import o from "prop-types";
10
- import { classNames as p, uCalendar as m } from "@progress/kendo-react-common";
11
- import { cloneDate as T, getDate as g, isEqualDate as E } from "@progress/kendo-date-math";
12
- import { provideIntlService as N, registerForIntl as O } from "@progress/kendo-react-intl";
13
- import { Virtualization as H } from "../../virtualization/Virtualization.mjs";
14
- import { View as z } from "./View.mjs";
15
- import { Header as A } from "./Header.mjs";
16
- import { WeekNamesService as R } from "../services/WeekNamesService.mjs";
17
- import { dateInRange as D, isInRange as _, getToday as q } from "../../utils.mjs";
18
- import { CalendarViewEnum as c } from "../models/CalendarViewEnum.mjs";
19
- import { TodayCommand as F } from "./TodayCommand.mjs";
20
- const M = 5, d = class d extends a.Component {
21
- constructor(n) {
22
- super(n), this.virtualization = null, this.calendarView = null, this.table = null, this.intl = null, this.bottomOffset = 0, this.viewOffset = 0, this.viewHeight = 0, this._element = null, this.isActive = !1, this.animateToIndex = !0, this.shouldScroll = !1, this.weekService = null, this.focusActiveDate = () => {
23
- if (!this._element)
24
- return;
25
- const e = this._element.querySelector("td.k-focus"), i = this._element.querySelector(".k-state-pending-focus");
26
- e && e[0] && e[0].classList.remove("k-focus"), i && i.classList.add("k-focus"), this.isActive = !0;
27
- }, this.blurActiveDate = () => {
28
- if (!this._element)
29
- return;
30
- const e = this._element.querySelector("td.k-focus");
31
- e && e.classList.remove("k-focus"), this.isActive = !1;
32
- }, this.handleVirtualizationMount = (e) => {
33
- if (this.virtualization = e, this.virtualization && this.table) {
34
- this.table.style.transform = `translateY(${this.viewOffset}px)`;
35
- const i = D(this.props.focusedDate, this.props.min, this.props.max), t = this.props.service.skip(i, this.props.min);
36
- this.virtualization.scrollToIndex(t);
37
- }
38
- }, this.buildMonthView = (e, i) => {
39
- const { unstyled: t } = this.props, s = t && t.uCalendar;
40
- return /* @__PURE__ */ a.createElement(
41
- "table",
42
- {
43
- key: "calendar-view-list-weekdays",
44
- className: p(m.table({ c: s, weekdays: !0 })),
45
- role: "grid",
46
- tabIndex: this.props.tabIndex
47
- },
48
- /* @__PURE__ */ a.createElement("colgroup", null, e.map((l, r) => /* @__PURE__ */ a.createElement("col", { key: r }))),
49
- /* @__PURE__ */ a.createElement("thead", { className: p(m.thead({ c: s })) }, /* @__PURE__ */ a.createElement("tr", { className: p(m.tr({ c: s })) }, i.map((l, r) => /* @__PURE__ */ a.createElement("th", { key: r, className: p(m.th({ c: s })) }, l))))
50
- );
51
- }, this.buildDates = (e, i) => {
52
- const t = this.props.cellUID, { unstyled: s } = this.props, l = s && s.uCalendar;
53
- return /* @__PURE__ */ a.createElement(
54
- "table",
55
- {
56
- className: p(m.table({ c: l })),
57
- ref: (r) => {
58
- this.table = r;
59
- },
60
- role: "grid",
61
- tabIndex: this.props.tabIndex,
62
- "aria-activedescendant": t + this.props.focusedDate.getTime()
63
- },
64
- /* @__PURE__ */ a.createElement("colgroup", null, e.map((r, h) => /* @__PURE__ */ a.createElement("col", { key: h }))),
65
- i.map((r) => /* @__PURE__ */ a.createElement(
66
- z,
67
- {
68
- ref: (h) => {
69
- this.calendarView || (this.calendarView = h);
70
- },
71
- key: r.getTime(),
72
- activeView: this.props.activeView,
73
- viewDate: r,
74
- min: this.props.min,
75
- max: this.props.max,
76
- cellUID: t,
77
- focusedDate: this.props.focusedDate,
78
- cell: this.props.cell,
79
- selectedDate: this.props.value,
80
- showWeekNumbers: this.weekNumber,
81
- onChange: this.handleDateChange,
82
- bus: this.props.bus,
83
- service: this.props.service,
84
- weekCell: this.props.weekCell,
85
- showOtherMonthDays: this.props.showOtherMonthDays,
86
- unstyled: s
87
- }
88
- ))
89
- );
90
- }, this.calculateHeights = () => {
91
- if (!this.props.dom)
92
- return;
93
- const e = this.props.activeView === c.month ? this.props.dom.scrollableContentHeight : this.props.dom.scrollableYearContentHeight;
94
- this.bottomOffset = e - this.props.dom.viewHeight(this.props.activeView), this.viewOffset = -1 * this.props.dom.headerHeight, this.viewHeight = this.props.dom.viewHeight(this.props.activeView) || 1;
95
- }, this.getTake = (e, i) => Math.min(i - e, this.take), this.handleScrollAction = ({ index: e, scrollAction: i, pageAction: t }) => {
96
- const s = t ? t.skip : this.state.skip;
97
- if ((this.state.index !== e || this.state.skip !== s) && this.setState({ index: e, skip: s }), this.table && i) {
98
- const l = `translateY(${i.offset}px)`;
99
- this.table.style.transform = l;
100
- }
101
- }, this.handleTodayClick = (e) => {
102
- this.shouldScroll = !0, this.handleDateChange.call(void 0, e, !0);
103
- }, this.handleDateChange = (e, i = !1) => {
104
- const { onChange: t } = this.props;
105
- if (t) {
106
- const s = {
107
- syntheticEvent: e.syntheticEvent,
108
- nativeEvent: e.nativeEvent,
109
- value: T(e.value),
110
- target: this,
111
- isTodayClick: i
112
- };
113
- t.call(void 0, s);
114
- }
115
- }, this.lastView = this.props.activeView, this.lastFocus = this.props.focusedDate, this.state = {
116
- skip: this.props.service.skip(this.props.focusedDate, this.props.min),
117
- index: this.props.service.skip(this.props.focusedDate, this.props.min)
118
- };
119
- }
120
- get element() {
121
- return this._element;
122
- }
123
- get weekNames() {
124
- return this.intl = N(this), this.weekService = new R(this.intl), this.weekService.getWeekNames(this.weekNumber, this.props.weekDaysFormat);
125
- }
126
- get weekNumber() {
127
- return !!(this.props.showWeekNumbers && this.props.activeView === c.month);
128
- }
129
- get take() {
130
- return this.props.take !== void 0 ? this.props.take : d.defaultProps.take;
131
- }
132
- get animate() {
133
- return !!(this.props.smoothScroll && this.animateToIndex);
134
- }
135
- get todayIsInRange() {
136
- return _(q(), g(this.props.min), g(this.props.max));
137
- }
138
- componentDidUpdate(n, e) {
139
- this.shouldScroll = !1, this.indexToScroll !== void 0 && this.virtualization && this.virtualization[this.animate ? "animateToIndex" : "scrollToIndex"](this.indexToScroll), this.isActive && this.focusActiveDate(), this.lastView = this.props.activeView, this.indexToScroll = void 0;
140
- }
141
- render() {
142
- const { activeView: n, min: e, max: i, service: t, unstyled: s } = this.props, l = s && s.uCalendar;
143
- this.calculateHeights();
144
- const r = this.lastView !== n, h = D(this.props.focusedDate, e, i), u = r ? t.skip(h, e) : this.state.skip, w = t.total(e, i), x = this.getTake(u, w), y = t.addToDate(e, u), S = t.addToDate(e, this.state.index), k = new Array(t.rowLength(this.weekNumber)).fill(""), b = n !== this.lastView;
145
- this.animateToIndex = !b, (b || !E(this.lastFocus, h) || this.shouldScroll || !this.props.shouldScroll || this.props.shouldScroll()) && (this.indexToScroll = this.props.service.skip(h, this.props.min)), this.lastFocus = h;
146
- const C = p(
147
- m.view({
148
- c: l,
149
- month: n === c.month,
150
- year: n === c.year,
151
- decade: n === c.decade,
152
- century: n === c.century
153
- })
154
- ), I = this.buildDates(k, t.datesList(y, x)), V = /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(
155
- A,
156
- {
157
- key: "calendar-view-list-header",
158
- currentDate: S,
159
- min: this.props.min,
160
- max: this.props.max,
161
- activeView: this.props.activeView,
162
- bus: this.props.bus,
163
- service: this.props.service,
164
- headerTitle: this.props.headerTitle,
165
- header: this.props.header,
166
- unstyled: s,
167
- commands: /* @__PURE__ */ a.createElement(
168
- F,
169
- {
170
- min: this.props.min,
171
- max: this.props.max,
172
- onClick: this.handleTodayClick,
173
- disabled: !this.todayIsInRange,
174
- tabIndex: this.props.tabIndex,
175
- unstyled: s
176
- }
177
- )
178
- }
179
- ), this.props.activeView === c.month && this.buildMonthView(k, this.weekNames), /* @__PURE__ */ a.createElement(
180
- H,
181
- {
182
- key: "calendar-view-list-content",
183
- skip: u,
184
- take: this.take,
185
- total: w,
186
- itemHeight: this.viewHeight,
187
- topOffset: this.viewOffset,
188
- bottomOffset: this.bottomOffset,
189
- scrollOffsetSize: this.viewOffset,
190
- maxScrollDifference: this.viewHeight,
191
- onScroll: this.props.onScroll,
192
- onScrollAction: this.handleScrollAction,
193
- onMount: (f) => !this.virtualization && this.handleVirtualizationMount(f),
194
- children: I,
195
- tabIndex: this.props.tabIndex,
196
- unstyled: s
197
- }
198
- ));
199
- return /* @__PURE__ */ a.createElement(
200
- "div",
201
- {
202
- ref: (f) => {
203
- this._element = f;
204
- },
205
- className: C
206
- },
207
- this.props.dom.didCalculate ? V : null
208
- );
209
- }
210
- };
211
- d.propTypes = {
212
- activeView: o.number.isRequired,
213
- bottomOffset: o.number,
214
- cellUID: o.string.isRequired,
215
- focusedDate: o.instanceOf(Date).isRequired,
216
- max: o.instanceOf(Date).isRequired,
217
- min: o.instanceOf(Date).isRequired,
218
- onChange: o.func,
219
- showWeekNumbers: o.bool,
220
- smoothScroll: o.bool,
221
- take: o.number,
222
- value: o.instanceOf(Date),
223
- viewHeight: o.number,
224
- viewOffset: o.number,
225
- weekDaysFormat: o.oneOf(["short", "abbreviated", "narrow"]),
226
- tabIndex: o.number
227
- }, d.defaultProps = {
228
- take: M,
8
+ import * as t from "react";
9
+ import { classNames as p, uCalendar as v } from "@progress/kendo-react-common";
10
+ import { getDate as K, isEqualDate as Se, cloneDate as Ce } from "@progress/kendo-date-math";
11
+ import { useInternationalization as be } from "@progress/kendo-react-intl";
12
+ import { Virtualization as Ne } from "../../virtualization/Virtualization.mjs";
13
+ import { View as Ve } from "./View.mjs";
14
+ import { Header as Te } from "./Header.mjs";
15
+ import { WeekNamesService as xe } from "../services/WeekNamesService.mjs";
16
+ import { isInRange as Ie, getToday as He, dateInRange as j } from "../../utils.mjs";
17
+ import { CalendarViewEnum as u } from "../models/CalendarViewEnum.mjs";
18
+ import { TodayCommand as Le } from "./TodayCommand.mjs";
19
+ const Oe = 5, E = {
20
+ take: Oe,
229
21
  showWeekNumbers: !1,
230
22
  weekDaysFormat: "short",
231
23
  smoothScroll: !0
232
- };
233
- let v = d;
234
- O(v);
24
+ }, G = t.forwardRef((J, Q) => {
25
+ const {
26
+ take: H = E.take,
27
+ showWeekNumbers: X = E.showWeekNumbers,
28
+ weekDaysFormat: Z = E.weekDaysFormat,
29
+ smoothScroll: ee = E.smoothScroll,
30
+ activeView: n,
31
+ bus: L,
32
+ cellUID: O,
33
+ dom: a,
34
+ focusedDate: m,
35
+ max: c,
36
+ min: r,
37
+ cell: te,
38
+ onScroll: ne,
39
+ onChange: W,
40
+ service: o,
41
+ value: re,
42
+ weekCell: oe,
43
+ showOtherMonthDays: se,
44
+ headerTitle: ae,
45
+ header: ce,
46
+ shouldScroll: z,
47
+ tabIndex: f,
48
+ unstyled: d
49
+ } = J, S = !!(X && n === u.month), le = Ie(He(), K(r), K(c)), A = () => {
50
+ if (!i.current)
51
+ return;
52
+ const e = i.current.querySelector("td.k-focus"), s = i.current.querySelector(".k-state-pending-focus");
53
+ e && e[0] && e[0].classList.remove("k-focus"), s && s.classList.add("k-focus"), N.current = !0;
54
+ }, ie = () => {
55
+ if (!i.current)
56
+ return;
57
+ const e = i.current.querySelector("td.k-focus");
58
+ e && e.classList.remove("k-focus"), N.current = !1;
59
+ }, F = (e, s = !1) => {
60
+ if (W) {
61
+ const k = {
62
+ syntheticEvent: e.syntheticEvent,
63
+ nativeEvent: e.nativeEvent,
64
+ value: Ce(e.value),
65
+ target: C.current,
66
+ isTodayClick: s
67
+ };
68
+ W(k);
69
+ }
70
+ }, ue = (e) => {
71
+ V.current = !0, F(e, !0);
72
+ }, me = ({ index: e, scrollAction: s, pageAction: k }) => {
73
+ const D = k ? k.skip : void 0;
74
+ if (de((w) => {
75
+ const $ = D !== void 0 ? D : w.skip;
76
+ return w.index !== e || w.skip !== $ ? { index: e, skip: $ } : w;
77
+ }), g.current && s) {
78
+ const w = `translateY(${s.offset}px)`;
79
+ g.current.style.transform = w;
80
+ }
81
+ }, fe = (e) => {
82
+ if (l.current = e, l.current && g.current) {
83
+ const s = -1 * a.headerHeight;
84
+ g.current.style.transform = `translateY(${s}px)`;
85
+ const k = j(m, r, c), D = o.skip(k, r);
86
+ l.current.scrollToIndex(D);
87
+ }
88
+ }, l = t.useRef(null), C = t.useRef(null);
89
+ t.useImperativeHandle(
90
+ C,
91
+ () => ({
92
+ get element() {
93
+ return i.current;
94
+ },
95
+ get virtualization() {
96
+ return l.current;
97
+ },
98
+ focusActiveDate: A,
99
+ blurActiveDate: ie
100
+ })
101
+ ), t.useImperativeHandle(Q, () => C.current);
102
+ const i = t.useRef(null), g = t.useRef(null), b = t.useRef(n), q = t.useRef(m), N = t.useRef(!1), M = t.useRef(!0), V = t.useRef(!1), y = t.useRef(void 0), [B, de] = t.useState(() => {
103
+ const e = o.skip(m, r);
104
+ return { skip: e, index: e };
105
+ });
106
+ t.useEffect(() => {
107
+ if (V.current = !1, y.current !== void 0 && l.current) {
108
+ const e = !!(ee && M.current);
109
+ l.current[e ? "animateToIndex" : "scrollToIndex"](y.current);
110
+ }
111
+ N.current && A(), b.current = n, y.current = void 0;
112
+ });
113
+ const he = be(), ke = new xe(he).getWeekNames(S, Z), h = d && d.uCalendar;
114
+ let Y = 0, T = 0, x = 1;
115
+ a && (Y = (n === u.month ? a.scrollableContentHeight : a.scrollableYearContentHeight) - a.viewHeight(n), T = -1 * a.headerHeight, x = a.viewHeight(n) || 1);
116
+ const we = b.current !== n, R = j(m, r, c), I = we ? o.skip(R, r) : B.skip, P = o.total(r, c), pe = Math.min(P - I, H), ve = o.addToDate(r, I), ge = o.addToDate(r, B.index), U = Array.from({ length: o.rowLength(S) }, (e, s) => s), _ = n !== b.current;
117
+ M.current = !_, (_ || !Se(q.current, R) || V.current || !z || z()) && (y.current = o.skip(R, r)), q.current = R;
118
+ const ye = p(
119
+ v.view({
120
+ c: h,
121
+ month: n === u.month,
122
+ year: n === u.year,
123
+ decade: n === u.decade,
124
+ century: n === u.century
125
+ })
126
+ ), Re = /* @__PURE__ */ t.createElement(
127
+ "table",
128
+ {
129
+ className: p(v.table({ c: h })),
130
+ ref: g,
131
+ role: "grid",
132
+ tabIndex: f != null ? f : 0,
133
+ "aria-activedescendant": O + m.getTime()
134
+ },
135
+ /* @__PURE__ */ t.createElement("colgroup", null, U.map((e) => /* @__PURE__ */ t.createElement("col", { key: e }))),
136
+ o.datesList(ve, pe).map((e) => /* @__PURE__ */ t.createElement(
137
+ Ve,
138
+ {
139
+ key: e.getTime(),
140
+ activeView: n,
141
+ viewDate: e,
142
+ min: r,
143
+ max: c,
144
+ cellUID: O,
145
+ focusedDate: m,
146
+ cell: te,
147
+ selectedDate: re,
148
+ showWeekNumbers: S,
149
+ onChange: F,
150
+ bus: L,
151
+ service: o,
152
+ weekCell: oe,
153
+ showOtherMonthDays: se,
154
+ unstyled: d
155
+ }
156
+ ))
157
+ ), De = n === u.month ? /* @__PURE__ */ t.createElement(
158
+ "table",
159
+ {
160
+ key: "calendar-view-list-weekdays",
161
+ className: p(v.table({ c: h, weekdays: !0 })),
162
+ role: "grid",
163
+ tabIndex: f
164
+ },
165
+ /* @__PURE__ */ t.createElement("colgroup", null, U.map((e) => /* @__PURE__ */ t.createElement("col", { key: e }))),
166
+ /* @__PURE__ */ t.createElement("thead", { className: p(v.thead({ c: h })) }, /* @__PURE__ */ t.createElement("tr", { className: p(v.tr({ c: h })) }, ke.map((e) => /* @__PURE__ */ t.createElement("th", { key: e, className: p(v.th({ c: h })) }, e))))
167
+ ) : null, Ee = /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
168
+ Te,
169
+ {
170
+ key: "calendar-view-list-header",
171
+ currentDate: ge,
172
+ min: r,
173
+ max: c,
174
+ activeView: n,
175
+ bus: L,
176
+ service: o,
177
+ headerTitle: ae,
178
+ header: ce,
179
+ unstyled: d,
180
+ commands: /* @__PURE__ */ t.createElement(
181
+ Le,
182
+ {
183
+ min: r,
184
+ max: c,
185
+ onClick: ue,
186
+ disabled: !le,
187
+ tabIndex: f,
188
+ unstyled: d
189
+ }
190
+ )
191
+ }
192
+ ), De, /* @__PURE__ */ t.createElement(
193
+ Ne,
194
+ {
195
+ key: "calendar-view-list-content",
196
+ skip: I,
197
+ take: H,
198
+ total: P,
199
+ itemHeight: x,
200
+ topOffset: T,
201
+ bottomOffset: Y,
202
+ scrollOffsetSize: T,
203
+ maxScrollDifference: x,
204
+ onScroll: ne,
205
+ onScrollAction: me,
206
+ onMount: (e) => !l.current && fe(e),
207
+ tabIndex: f,
208
+ unstyled: d
209
+ },
210
+ Re
211
+ ));
212
+ return /* @__PURE__ */ t.createElement("div", { ref: i, className: ye }, a.didCalculate ? Ee : null);
213
+ });
214
+ G.displayName = "KendoReactViewList";
215
+ const $e = G;
235
216
  export {
236
- v as ViewList
217
+ $e as ViewList,
218
+ E as viewListDefaultProps
237
219
  };
@@ -5,7 +5,7 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { Virtualization } from '../../virtualization/Virtualization.js';
8
+ import { VirtualizationHandle } from '../../virtualization/Virtualization.js';
9
9
  import { DOMService } from './DOMService.js';
10
10
  import { CalendarViewEnum } from '../models/CalendarViewEnum.js';
11
11
  /**
@@ -21,8 +21,8 @@ export declare class ScrollSyncService {
21
21
  private navScrolled;
22
22
  constructor(dom: DOMService);
23
23
  configure(activeView: CalendarViewEnum): void;
24
- sync(navigator: Virtualization, view: Virtualization, e: any): void;
24
+ sync(navigator: VirtualizationHandle, view: VirtualizationHandle, e: any): void;
25
25
  scrollSiblingOf(scrolledElement: any): void;
26
- siblingComponent(scrollableElement: HTMLElement): Virtualization;
27
- calculateScroll(component: Virtualization, scrollTop: number): number;
26
+ siblingComponent(scrollableElement: HTMLElement): VirtualizationHandle;
27
+ calculateScroll(component: VirtualizationHandle, scrollTop: number): number;
28
28
  }
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ae=require("react"),t=require("prop-types"),x=require("@progress/kendo-date-math"),ne=require("@progress/kendo-react-buttons"),ae=require("@progress/kendo-svg-icons"),re=require("@progress/kendo-react-intl"),o=require("@progress/kendo-react-common"),pe=require("@progress/kendo-react-labels"),_e=require("@progress/kendo-dateinputs-common"),j=require("./utils.js"),i=require("../utils.js"),c=require("../messages/index.js"),je=require("../timepicker/utils.js"),Be=require("../common/ClearButton.js"),Fe=require("./dateInputIntl.js");function He(e){const b=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const m in e)if(m!=="default"){const C=Object.getOwnPropertyDescriptor(e,m);Object.defineProperty(b,m,C.get?C:{enumerable:!0,get:()=>e[m]})}}return b.default=e,Object.freeze(b)}const r=He(Ae),ze="Please enter a valid value!",F=r.forwardRef((e,b)=>{var te;const m=o.useId(e.id),C=re.useInternationalization(),E=re.useLocalization(),le=o.useUnstyled(),H=o.usePropsContext(B,e).unstyled||le,{format:V=u.format,defaultValue:ue=u.defaultValue,size:ie=u.size,rounded:oe=u.rounded,fillMode:se=u.fillMode,formatPlaceholder:ce=u.formatPlaceholder,spinners:de=u.spinners,disabled:w=u.disabled,min:fe=u.min,max:me=u.max,minTime:ge=u.minTime,maxTime:ve=u.maxTime,validityStyles:be=u.validityStyles,validationMessage:z=u.validationMessage,placeholder:y=u.placeholder,enableMouseWheel:ye=u.enableMouseWheel,autoCorrectParts:he=u.autoCorrectParts,autoSwitchParts:Ie=u.autoSwitchParts,allowCaretMode:Oe=u.allowCaretMode,twoDigitYearMax:De=u.twoDigitYearMax,ariaHasPopup:xe=u.ariaHasPopup,autoFocus:h=u.autoFocus}=o.usePropsContext(B,e),S=n=>{Le(a=>({...a,...n}))},g=()=>N.value?N.value:R.current!==void 0?R.current:l.current&&l.current.value,U=()=>{const n=l.current&&l.current.currentText||"",a=g();return y!=null&&!N.focused&&!a?y:n},W=()=>e.required!==void 0?e.required:!1,q=()=>{const n=g()||e.value,a=fe,D=me,A=j.isInRange(n,a,D)&&je.isInTimeRange(n,ge,ve),p=z!==void 0,_=(!W()||n!=null)&&A,ke=e.valid!==void 0?e.valid:_;return{customError:p,rangeOverflow:n&&D.getTime()<n.getTime()||!1,rangeUnderflow:n&&n.getTime()<a.getTime()||!1,valid:ke,valueMissing:n===null}},Ce=()=>{s.current&&s.current.focus()},K=()=>new Fe.DateInputIntl(C),T=()=>{const n=g();return{format:V,steps:e.steps,formatPlaceholder:ce,placeholder:y,selectPreviousSegmentOnBackspace:!0,value:e.value!==void 0?e.value:n,intlService:K(),autoFill:e.autoFill!==void 0?e.autoFill:!1,enableMouseWheel:ye,autoCorrectParts:he,autoSwitchParts:Ie,autoSwitchKeys:e.autoSwitchKeys||[],twoDigitYearMax:De,allowCaretMode:Oe}},Ee=n=>{d.current&&d.current.classList.add("k-focus"),S({focused:!0}),h&&$(!0)},we=n=>{d.current&&d.current.classList.remove("k-focus"),S({focused:!1})},Se=(n,a)=>typeof n!=typeof a?!0:typeof n=="string"&&typeof a=="string"?n!==a:typeof n=="object"&&typeof a=="object"?JSON.stringify(n)!==JSON.stringify(a):!1,Te=n=>typeof n=="string"?n:{inputFormat:n,displayFormat:n},J=n=>{R.current=g(),e.value===void 0&&S({value:n.value!==void 0?n.value:null}),Ne(),v.current=n,R.current=void 0},Y=n=>{e.onChange&&e.onChange(n)},X=n=>{o.getActiveElement(document)===s.current&&n.preventDefault()},Me=()=>new _e.DateInput(s.current,{...T(),format:Te(T().format),events:{focus:Ee,blur:we,valueChange:J,click:Y}}),Z=()=>{s.current&&s.current.setCustomValidity&&s.current.setCustomValidity(q().valid?"":z||u.validationMessage)},$=r.useCallback(n=>{var a;if(s.current&&h&&n){const D=(l==null?void 0:l.current).currentText,A=(l==null?void 0:l.current).currentText.search(/[^a-zA-Z]/),p=D[A],_=D.split(p)[0].length;d.current&&d.current.classList.add("k-focus"),(a=l==null?void 0:l.current)==null||a.selectNearestSegment(_)}},[h]),Pe=n=>{!s.current||!l.current||J(n)},Re=n=>{n.preventDefault();const a=o.getActiveElement(document);s.current&&a!==s.current&&s.current.focus({preventScroll:!0})},f=n=>{const a=g();v.current&&e.onChange&&!x.isEqual(v.current.oldValue,a)&&e.onChange.call(void 0,{syntheticEvent:n,nativeEvent:v.current.event,value:v.current.value,target:M.current}),v.current=null},Ve=n=>{var a;(a=l.current)==null||a.modifyDateSegmentValue(1),f(n)},qe=n=>{var a;(a=l.current)==null||a.modifyDateSegmentValue(-1),f(n)},M=r.useRef(null),s=r.useRef(null),d=r.useRef(null);r.useImperativeHandle(M,()=>({props:e,get options(){return T()},get text(){return U()},get element(){return s.current},get name(){return e.name},get value(){return g()},get validity(){return q()},focus:Ce,updateOnPaste:Pe})),r.useImperativeHandle(b,()=>M.current);const l=r.useRef(null),P=r.useRef(null),L=r.useRef(!1),R=r.useRef(null),v=r.useRef(null),I=r.useRef(e),[N,Le]=r.useState({value:e.value===void 0?ue:null,focused:!1}),[,Ne]=r.useReducer(n=>n+1,0);r.useLayoutEffect(()=>{L.current||(l.current=Me(),P.current=l.current.dateObject,L.current=!0)},[]),r.useEffect(()=>(Z(),L.current||d.current&&d.current.addEventListener("wheel",X,{passive:!1}),h&&(S({focused:!0}),$(!0)),()=>{d.current&&d.current.removeEventListener("wheel",X)}),[]),r.useEffect(()=>{Z(),l.current&&(P.current=l.current.dateObject,(Se(I.current.format,V)||I.current.readonly!==e.readonly||JSON.stringify(I.current.steps)!==JSON.stringify(e.steps)||K().locale!==l.current.options.intlService.locale)&&l.current.setOptions(T(),!0),I.current.value!==e.value&&(P.current.getValue()!==null||e.value!==null)&&P.current.setValue(e.value),e.ariaExpanded!==void 0&&e.ariaExpanded&&(l.current.options.placeholder=null),e.ariaExpanded!==void 0&&!e.ariaExpanded&&(l.current.options.placeholder=y),l.current.refreshElementValue(),I.current={format:V,readonly:e.readonly,ariaExpanded:e.ariaExpanded,steps:e.steps,value:e.value})});const G=e.id||m+"-accessibility-id",O=H&&H.uDateInput,Q=U(),k=!be||q().valid;r.useImperativeHandle(e._ref,()=>M.current);const ee=r.createElement("span",{ref:n=>{d.current=n},style:e.label?void 0:{width:e.width},dir:e.dir,className:o.classNames(o.uDateInput.wrapper({c:O,size:ie,fillMode:se,rounded:oe,disabled:w,required:W(),invalid:!k}),e.className)},r.createElement("input",{ref:n=>{s.current=n},role:e.ariaRole||"textbox",readOnly:e.readonly,tabIndex:e.tabIndex||0,disabled:w,title:e.title!==void 0?e.title:Q,type:"text",spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoFocus:h,className:o.classNames(o.uDateInput.inputInner({c:O})),id:G,value:Q,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledBy,"aria-describedby":e.ariaDescribedBy,"aria-haspopup":xe,"aria-disabled":w,"aria-expanded":e.ariaExpanded,"aria-controls":e.ariaControls,"aria-required":e.required,"aria-invalid":!k,onKeyDown:f,onChange:f,onWheel:f,onInput:f,onClick:f,name:e.name,...e.inputAttributes}),e.children,e.clearButton&&e.value&&r.createElement(Be,{onClick:Y,key:"clearbutton"}),de&&r.createElement("span",{className:o.classNames(o.uDateInput.inputSpinner({c:O})),onMouseDown:Re},r.createElement(ne.Button,{tabIndex:-1,type:"button",className:o.classNames(o.uDateInput.spinnerIncrease({c:O})),icon:"caret-alt-up",svgIcon:ae.caretAltUpIcon,"aria-label":E.toLanguageString(c.increaseValue,c.messages[c.increaseValue]),title:E.toLanguageString(c.increaseValue,c.messages[c.increaseValue]),onClick:Ve}),r.createElement(ne.Button,{tabIndex:-1,type:"button",className:o.classNames(o.uDateInput.spinnerDecrease({c:O})),icon:"caret-alt-down",svgIcon:ae.caretAltDownIcon,"aria-label":E.toLanguageString(c.decreaseValue,c.messages[c.decreaseValue]),title:E.toLanguageString(c.decreaseValue,c.messages[c.decreaseValue]),onClick:qe})));return e.label?r.createElement(pe.FloatingLabel,{label:e.label,editorId:G,editorValue:(te=s.current)==null?void 0:te.value,editorValid:k,editorDisabled:w,children:ee,style:{width:e.width}}):ee});F.propTypes={value:t.instanceOf(Date),format:t.oneOfType([i.nullable(t.string),t.shape({skeleton:t.string,pattern:t.string,date:t.oneOf(["short","medium","long","full"]),time:t.oneOf(["short","medium","long","full"]),datetime:t.oneOf(["short","medium","long","full"]),era:t.oneOf(["narrow","short","long"]),year:t.oneOf(["numeric","2-digit"]),month:t.oneOf(["numeric","2-digit","narrow","short","long"]),day:t.oneOf(["numeric","2-digit"]),weekday:t.oneOf(["narrow","short","long"]),hour:t.oneOf(["numeric","2-digit"]),hour12:t.bool,minute:t.oneOf(["numeric","2-digit"]),second:t.oneOf(["numeric","2-digit"]),timeZoneName:t.oneOf(["short","long"])})]),formatPlaceholder:t.oneOfType([i.nullable(t.oneOf(["wide","narrow","short","formatPattern"])),t.shape({year:i.nullable(t.string),month:i.nullable(t.string),day:i.nullable(t.string),hour:i.nullable(t.string),minute:i.nullable(t.string),second:i.nullable(t.string)})]),width:t.oneOfType([t.string,t.number]),tabIndex:t.number,title:t.string,steps:t.shape({year:i.nullable(t.number),month:i.nullable(t.number),day:i.nullable(t.number),hour:i.nullable(t.number),minute:i.nullable(t.number),second:i.nullable(t.number)}),min:t.instanceOf(Date),max:t.instanceOf(Date),disabled:t.bool,spinners:t.bool,name:t.string,dir:t.string,label:t.node,id:t.string,ariaLabelledBy:t.string,ariaDescribedBy:t.string,ariaLabel:t.string,ariaRole:t.string,ariaHasPopup:t.oneOfType([t.bool,t.oneOf(["grid","dialog"])]),ariaExpanded:t.oneOfType([t.bool]),onChange:t.func,validationMessage:t.string,required:t.bool,valid:t.bool,size:t.oneOf(["small","medium","large"]),rounded:t.oneOf(["small","medium","large","full","none"]),fillMode:t.oneOf(["solid","flat","outline"]),autoFocus:t.bool,inputAttributes:t.object};const u={format:j.DEFAULT_FORMAT,defaultValue:null,size:void 0,rounded:void 0,fillMode:void 0,formatPlaceholder:j.DEFAULT_FORMAT_PLACEHOLDER,spinners:!1,disabled:!1,max:x.cloneDate(i.MAX_DATE),min:x.cloneDate(i.MIN_DATE),minTime:x.cloneDate(i.MIN_TIME),maxTime:x.cloneDate(i.MAX_TIME),validityStyles:!0,validationMessage:ze,placeholder:null,enableMouseWheel:!0,autoCorrectParts:!0,autoSwitchParts:!0,allowCaretMode:!1,twoDigitYearMax:68,ariaHasPopup:"grid",autoFocus:!1},B=o.createPropsContext();F.displayName="KendoReactDateInput";exports.DateInput=F;exports.DateInputPropsContext=B;exports.dateInputDefaultProps=u;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const pe=require("react"),t=require("prop-types"),x=require("@progress/kendo-date-math"),ne=require("@progress/kendo-react-buttons"),ae=require("@progress/kendo-svg-icons"),re=require("@progress/kendo-react-intl"),o=require("@progress/kendo-react-common"),Ae=require("@progress/kendo-react-labels"),_e=require("@progress/kendo-dateinputs-common"),j=require("./utils.js"),i=require("../utils.js"),c=require("../messages/index.js"),je=require("../timepicker/utils.js"),Be=require("../common/ClearButton.js"),Fe=require("./dateInputIntl.js");function He(e){const b=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const m in e)if(m!=="default"){const C=Object.getOwnPropertyDescriptor(e,m);Object.defineProperty(b,m,C.get?C:{enumerable:!0,get:()=>e[m]})}}return b.default=e,Object.freeze(b)}const r=He(pe),ze="Please enter a valid value!",F=r.forwardRef((e,b)=>{var te;const m=o.useId(e.id),C=re.useInternationalization(),E=re.useLocalization(),le=o.useUnstyled(),H=o.usePropsContext(B,e).unstyled||le,{format:V=u.format,defaultValue:ue=u.defaultValue,size:ie=u.size,rounded:oe=u.rounded,fillMode:se=u.fillMode,formatPlaceholder:ce=u.formatPlaceholder,spinners:de=u.spinners,disabled:w=u.disabled,min:fe=u.min,max:me=u.max,minTime:ge=u.minTime,maxTime:ve=u.maxTime,validityStyles:be=u.validityStyles,validationMessage:z=u.validationMessage,placeholder:y=u.placeholder,enableMouseWheel:ye=u.enableMouseWheel,autoCorrectParts:he=u.autoCorrectParts,autoSwitchParts:Ie=u.autoSwitchParts,allowCaretMode:Oe=u.allowCaretMode,twoDigitYearMax:De=u.twoDigitYearMax,ariaHasPopup:xe=u.ariaHasPopup,autoFocus:h=u.autoFocus}=o.usePropsContext(B,e),S=n=>{Le(a=>({...a,...n}))},g=()=>N.value?N.value:R.current!==void 0?R.current:l.current&&l.current.value,U=()=>{const n=l.current&&l.current.currentText||"",a=g();return y!=null&&!N.focused&&!a?y:n},W=()=>e.required!==void 0?e.required:!1,q=()=>{const n=g()||e.value,a=fe,D=me,p=j.isInRange(n,a,D)&&je.isInTimeRange(n,ge,ve),A=z!==void 0,_=(!W()||n!=null)&&p,ke=e.valid!==void 0?e.valid:_;return{customError:A,rangeOverflow:n&&D.getTime()<n.getTime()||!1,rangeUnderflow:n&&n.getTime()<a.getTime()||!1,valid:ke,valueMissing:n===null}},Ce=()=>{s.current&&s.current.focus()},K=()=>new Fe.DateInputIntl(C),T=()=>{const n=g();return{format:V,steps:e.steps,formatPlaceholder:ce,placeholder:y,selectPreviousSegmentOnBackspace:!0,value:e.value!==void 0?e.value:n,intlService:K(),autoFill:e.autoFill!==void 0?e.autoFill:!1,enableMouseWheel:ye,autoCorrectParts:he,autoSwitchParts:Ie,autoSwitchKeys:e.autoSwitchKeys||[],twoDigitYearMax:De,allowCaretMode:Oe}},Ee=n=>{d.current&&d.current.classList.add("k-focus"),S({focused:!0}),h&&$(!0)},we=n=>{d.current&&d.current.classList.remove("k-focus"),S({focused:!1})},Se=(n,a)=>typeof n!=typeof a?!0:typeof n=="string"&&typeof a=="string"?n!==a:typeof n=="object"&&typeof a=="object"?JSON.stringify(n)!==JSON.stringify(a):!1,Te=n=>typeof n=="string"?n:{inputFormat:n,displayFormat:n},J=n=>{R.current=g(),e.value===void 0&&S({value:n.value!==void 0?n.value:null}),Ne(),v.current=n,R.current=void 0},Y=n=>{e.onChange&&e.onChange(n)},X=n=>{o.getActiveElement(document)===s.current&&n.preventDefault()},Me=()=>new _e.DateInput(s.current,{...T(),format:Te(T().format),events:{focus:Ee,blur:we,valueChange:J,click:Y}}),Z=()=>{s.current&&s.current.setCustomValidity&&s.current.setCustomValidity(q().valid?"":z||u.validationMessage)},$=r.useCallback(n=>{var a;if(s.current&&h&&n){const D=(l==null?void 0:l.current).currentText,p=(l==null?void 0:l.current).currentText.search(/[^a-zA-Z]/),A=D[p],_=D.split(A)[0].length;d.current&&d.current.classList.add("k-focus"),(a=l==null?void 0:l.current)==null||a.selectNearestSegment(_)}},[h]),Pe=n=>{!s.current||!l.current||J(n)},Re=n=>{n.preventDefault();const a=o.getActiveElement(document);s.current&&a!==s.current&&s.current.focus({preventScroll:!0})},f=n=>{const a=g();v.current&&e.onChange&&!x.isEqual(v.current.oldValue,a)&&e.onChange.call(void 0,{syntheticEvent:n,nativeEvent:v.current.event,value:v.current.value,target:M.current}),v.current=null},Ve=n=>{var a;(a=l.current)==null||a.modifyDateSegmentValue(1),f(n)},qe=n=>{var a;(a=l.current)==null||a.modifyDateSegmentValue(-1),f(n)},M=r.useRef(null),s=r.useRef(null),d=r.useRef(null);r.useImperativeHandle(M,()=>({props:e,get options(){return T()},get text(){return U()},get element(){return s.current},get name(){return e.name},get value(){return g()},get validity(){return q()},focus:Ce,updateOnPaste:Pe})),r.useImperativeHandle(b,()=>M.current);const l=r.useRef(null),P=r.useRef(null),L=r.useRef(!1),R=r.useRef(null),v=r.useRef(null),I=r.useRef(e),[N,Le]=r.useState({value:e.value===void 0?ue:null,focused:!1}),[,Ne]=r.useReducer(n=>n+1,0);r.useLayoutEffect(()=>{L.current||(l.current=Me(),P.current=l.current.dateObject,L.current=!0)},[]),r.useEffect(()=>(Z(),L.current||d.current&&d.current.addEventListener("wheel",X,{passive:!1}),h&&(S({focused:!0}),$(!0)),()=>{d.current&&d.current.removeEventListener("wheel",X)}),[]),r.useEffect(()=>{Z(),l.current&&(P.current=l.current.dateObject,(Se(I.current.format,V)||I.current.readonly!==e.readonly||JSON.stringify(I.current.steps)!==JSON.stringify(e.steps)||K().locale!==l.current.options.intlService.locale)&&l.current.setOptions(T(),!0),I.current.value!==e.value&&(P.current.getValue()!==null||e.value!==null)&&P.current.setValue(e.value),e.ariaExpanded!==void 0&&e.ariaExpanded&&(l.current.options.placeholder=null),e.ariaExpanded!==void 0&&!e.ariaExpanded&&(l.current.options.placeholder=y),l.current.refreshElementValue(),I.current={format:V,readonly:e.readonly,ariaExpanded:e.ariaExpanded,steps:e.steps,value:e.value})});const G=e.id||m+"-accessibility-id",O=H&&H.uDateInput,Q=U(),k=!be||q().valid;r.useImperativeHandle(e._ref,()=>M.current);const ee=r.createElement("span",{ref:n=>{d.current=n},style:e.label?void 0:{width:e.width},dir:e.dir,className:o.classNames(o.uDateInput.wrapper({c:O,size:ie,fillMode:se,rounded:oe,disabled:w,required:W(),invalid:!k}),e.className)},r.createElement("input",{ref:n=>{s.current=n},role:e.ariaRole||"textbox",readOnly:e.readonly,tabIndex:e.tabIndex||0,disabled:w,title:e.title!==void 0?e.title:Q,type:"text",spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoFocus:h,className:o.classNames(o.uDateInput.inputInner({c:O})),id:G,value:Q,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledBy,"aria-describedby":e.ariaDescribedBy,"aria-haspopup":xe,"aria-disabled":w,"aria-expanded":e.ariaExpanded,"aria-controls":e.ariaControls,"aria-required":e.required,"aria-invalid":!k,onKeyDown:f,onChange:f,onWheel:f,onInput:f,onClick:f,name:e.name,...e.inputAttributes}),e.children,e.clearButton&&e.value&&r.createElement(Be,{onClick:Y,key:"clearbutton"}),de&&r.createElement("span",{className:o.classNames(o.uDateInput.inputSpinner({c:O})),onMouseDown:Re},r.createElement(ne.Button,{tabIndex:-1,type:"button",className:o.classNames(o.uDateInput.spinnerIncrease({c:O})),icon:"chevron-up",svgIcon:ae.chevronUpIcon,"aria-label":E.toLanguageString(c.increaseValue,c.messages[c.increaseValue]),title:E.toLanguageString(c.increaseValue,c.messages[c.increaseValue]),onClick:Ve}),r.createElement(ne.Button,{tabIndex:-1,type:"button",className:o.classNames(o.uDateInput.spinnerDecrease({c:O})),icon:"chevron-down",svgIcon:ae.chevronDownIcon,"aria-label":E.toLanguageString(c.decreaseValue,c.messages[c.decreaseValue]),title:E.toLanguageString(c.decreaseValue,c.messages[c.decreaseValue]),onClick:qe})));return e.label?r.createElement(Ae.FloatingLabel,{label:e.label,editorId:G,editorValue:(te=s.current)==null?void 0:te.value,editorValid:k,editorDisabled:w,children:ee,style:{width:e.width}}):ee});F.propTypes={value:t.instanceOf(Date),format:t.oneOfType([i.nullable(t.string),t.shape({skeleton:t.string,pattern:t.string,date:t.oneOf(["short","medium","long","full"]),time:t.oneOf(["short","medium","long","full"]),datetime:t.oneOf(["short","medium","long","full"]),era:t.oneOf(["narrow","short","long"]),year:t.oneOf(["numeric","2-digit"]),month:t.oneOf(["numeric","2-digit","narrow","short","long"]),day:t.oneOf(["numeric","2-digit"]),weekday:t.oneOf(["narrow","short","long"]),hour:t.oneOf(["numeric","2-digit"]),hour12:t.bool,minute:t.oneOf(["numeric","2-digit"]),second:t.oneOf(["numeric","2-digit"]),timeZoneName:t.oneOf(["short","long"])})]),formatPlaceholder:t.oneOfType([i.nullable(t.oneOf(["wide","narrow","short","formatPattern"])),t.shape({year:i.nullable(t.string),month:i.nullable(t.string),day:i.nullable(t.string),hour:i.nullable(t.string),minute:i.nullable(t.string),second:i.nullable(t.string)})]),width:t.oneOfType([t.string,t.number]),tabIndex:t.number,title:t.string,steps:t.shape({year:i.nullable(t.number),month:i.nullable(t.number),day:i.nullable(t.number),hour:i.nullable(t.number),minute:i.nullable(t.number),second:i.nullable(t.number)}),min:t.instanceOf(Date),max:t.instanceOf(Date),disabled:t.bool,spinners:t.bool,name:t.string,dir:t.string,label:t.node,id:t.string,ariaLabelledBy:t.string,ariaDescribedBy:t.string,ariaLabel:t.string,ariaRole:t.string,ariaHasPopup:t.oneOfType([t.bool,t.oneOf(["grid","dialog"])]),ariaExpanded:t.oneOfType([t.bool]),onChange:t.func,validationMessage:t.string,required:t.bool,valid:t.bool,size:t.oneOf(["small","medium","large"]),rounded:t.oneOf(["small","medium","large","full","none"]),fillMode:t.oneOf(["solid","flat","outline"]),autoFocus:t.bool,inputAttributes:t.object};const u={format:j.DEFAULT_FORMAT,defaultValue:null,size:void 0,rounded:void 0,fillMode:void 0,formatPlaceholder:j.DEFAULT_FORMAT_PLACEHOLDER,spinners:!1,disabled:!1,max:x.cloneDate(i.MAX_DATE),min:x.cloneDate(i.MIN_DATE),minTime:x.cloneDate(i.MIN_TIME),maxTime:x.cloneDate(i.MAX_TIME),validityStyles:!0,validationMessage:ze,placeholder:null,enableMouseWheel:!0,autoCorrectParts:!0,autoSwitchParts:!0,allowCaretMode:!1,twoDigitYearMax:68,ariaHasPopup:"grid",autoFocus:!1},B=o.createPropsContext();F.displayName="KendoReactDateInput";exports.DateInput=F;exports.DateInputPropsContext=B;exports.dateInputDefaultProps=u;