@progress/kendo-react-dateinputs 15.2.0-develop.1 → 15.2.0-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.
Files changed (39) hide show
  1. package/calendar/components/Calendar.js +1 -1
  2. package/calendar/components/Calendar.mjs +1 -1
  3. package/calendar/components/CalendarHeaderTitle.js +1 -1
  4. package/calendar/components/CalendarHeaderTitle.mjs +17 -5
  5. package/calendar/components/HorizontalViewList.js +1 -1
  6. package/calendar/components/HorizontalViewList.mjs +29 -29
  7. package/calendar/components/MultiViewCalendar.js +1 -1
  8. package/calendar/components/MultiViewCalendar.mjs +131 -128
  9. package/calendar/components/TodayCommand.js +1 -1
  10. package/calendar/components/TodayCommand.mjs +21 -32
  11. package/calendar/components/View.js +1 -1
  12. package/calendar/components/View.mjs +66 -66
  13. package/calendar/components/ViewList.js +1 -1
  14. package/calendar/components/ViewList.mjs +135 -125
  15. package/calendar/models/WeekDaysFormat.d.ts +1 -1
  16. package/common/AdaptiveMode.js +1 -1
  17. package/common/AdaptiveMode.mjs +30 -31
  18. package/dateinput/DateInput.js +1 -1
  19. package/dateinput/DateInput.mjs +35 -36
  20. package/datepicker/DatePicker.js +1 -1
  21. package/datepicker/DatePicker.mjs +21 -20
  22. package/datetimepicker/DateTimePicker.js +1 -1
  23. package/datetimepicker/DateTimePicker.mjs +15 -14
  24. package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
  25. package/messages/index.d.ts +5 -0
  26. package/messages/index.js +1 -1
  27. package/messages/index.mjs +46 -44
  28. package/package-metadata.js +1 -1
  29. package/package-metadata.mjs +2 -2
  30. package/package.json +9 -9
  31. package/timepicker/TimeList.js +2 -2
  32. package/timepicker/TimeList.mjs +51 -47
  33. package/timepicker/TimePart.js +1 -1
  34. package/timepicker/TimePart.mjs +57 -68
  35. package/timepicker/TimePicker.d.ts +7 -0
  36. package/timepicker/TimePicker.js +1 -1
  37. package/timepicker/TimePicker.mjs +20 -17
  38. package/timepicker/TimeSelector.js +1 -1
  39. package/timepicker/TimeSelector.mjs +56 -57
@@ -8,22 +8,22 @@
8
8
  import * as a from "react";
9
9
  import n from "prop-types";
10
10
  import { validatePackage as Ft, getLicenseMessage as Tt, usePropsContext as Nt, useId as Pt, classNames as Bt, WatermarkOverlay as Lt, createPropsContext as Kt, Keys as oe } from "@progress/kendo-react-common";
11
- import { getDate as O, cloneDate as m, firstDayOfMonth as Wt, lastDayOfMonth as Yt, isEqualDate as Pe, addDays as se } from "@progress/kendo-date-math";
11
+ import { getDate as O, cloneDate as m, firstDayOfMonth as Wt, lastDayOfMonth as Yt, isEqualDate as Ke, addDays as se } from "@progress/kendo-date-math";
12
12
  import { useInternationalization as _t, useLocalization as Ht } from "@progress/kendo-react-intl";
13
- import { Button as Be } from "@progress/kendo-react-buttons";
14
- import { chevronRightIcon as Le, chevronLeftIcon as Ke } from "@progress/kendo-svg-icons";
13
+ import { Button as We } from "@progress/kendo-react-buttons";
14
+ import { chevronRightIcon as Ye, chevronLeftIcon as _e } from "@progress/kendo-svg-icons";
15
15
  import { Action as U } from "../models/NavigationAction.mjs";
16
16
  import { CalendarViewEnum as X } from "../models/CalendarViewEnum.mjs";
17
17
  import { EMPTY_SELECTIONRANGE as $t } from "../models/SelectionRange.mjs";
18
18
  import { Header as zt } from "./Header.mjs";
19
19
  import { MIN_DATE as jt, MAX_DATE as Gt, viewInRange as ie, dateInRange as q, getToday as J, isInRange as ue, nullable as I } from "../../utils.mjs";
20
- import { prevView as We, messages as Ye, nextView as _e } from "../../messages/index.mjs";
20
+ import { prevView as He, messages as $e, nextView as ze } from "../../messages/index.mjs";
21
21
  import { BusViewService as Ut } from "../services/BusViewService.mjs";
22
22
  import { NavigationService as Xt } from "../services/NavigationService.mjs";
23
23
  import { HorizontalViewList as qt } from "./HorizontalViewList.mjs";
24
24
  import { TodayCommand as Jt } from "./TodayCommand.mjs";
25
- import { packageMetadata as He } from "../../package-metadata.mjs";
26
- const S = (c, d = u.min, p = u.max) => c instanceof Date && !Array.isArray(c) && ue(O(c), d, p) ? O(c) : null, le = (c, d = u.min, p = u.max) => Array.isArray(c) ? c.filter((k) => ue(k, d, p)).map((k) => O(k)) : null, Q = (c) => typeof c == "object" && !(c instanceof Date) && c !== null && !Array.isArray(c) ? c : $t, $e = (c, d, p) => c || d && d[0] || p && p.start, Qt = (c, d) => c.start === null && d === null ? "start" : c.end === null ? "end" : "start", u = {
25
+ import { packageMetadata as je } from "../../package-metadata.mjs";
26
+ const S = (c, d = u.min, p = u.max) => c instanceof Date && !Array.isArray(c) && ue(O(c), d, p) ? O(c) : null, le = (c, d = u.min, p = u.max) => Array.isArray(c) ? c.filter((k) => ue(k, d, p)).map((k) => O(k)) : null, Q = (c) => typeof c == "object" && !(c instanceof Date) && c !== null && !Array.isArray(c) ? c : $t, Ge = (c, d, p) => c || d && d[0] || p && p.start, Qt = (c, d) => c.start === null && d === null ? "start" : c.end === null ? "end" : "start", u = {
27
27
  disabled: !1,
28
28
  min: jt,
29
29
  max: Gt,
@@ -38,86 +38,86 @@ const S = (c, d = u.min, p = u.max) => c instanceof Date && !Array.isArray(c) &&
38
38
  showOtherMonthDays: !1
39
39
  }, Zt = Kt(), Z = a.forwardRef(
40
40
  (c, d) => {
41
- var Ne;
41
+ var Le;
42
42
  const p = a.useMemo(
43
- () => !Ft(He, { component: "MultiViewCalendar" }),
43
+ () => !Ft(je, { component: "MultiViewCalendar" }),
44
44
  []
45
- ), k = a.useMemo(() => Tt(He), []), P = Nt(Zt, c), de = Pt(P.id), {
45
+ ), k = a.useMemo(() => Tt(je), []), P = Nt(Zt, c), de = Pt(P.id), {
46
46
  disabled: B = u.disabled,
47
- min: ze = u.min,
48
- max: je = u.max,
47
+ min: Ue = u.min,
48
+ max: Xe = u.max,
49
49
  defaultActiveView: fe = u.defaultActiveView,
50
- defaultValue: Ge = u.defaultValue,
51
- topView: Ue = u.topView,
52
- bottomView: Xe = u.bottomView,
53
- weekDaysFormat: qe = u.weekDaysFormat,
54
- tabIndex: Je = u.tabIndex,
50
+ defaultValue: qe = u.defaultValue,
51
+ topView: Je = u.topView,
52
+ bottomView: Qe = u.bottomView,
53
+ weekDaysFormat: Ze = u.weekDaysFormat,
54
+ tabIndex: et = u.tabIndex,
55
55
  views: M = u.views,
56
56
  allowReverse: me = u.allowReverse,
57
- showOtherMonthDays: Qe = u.showOtherMonthDays,
57
+ showOtherMonthDays: tt = u.showOtherMonthDays,
58
58
  _ref: ve,
59
- className: Ze,
60
- weekNumber: et,
59
+ className: nt,
60
+ weekNumber: we,
61
61
  mobileMode: ge,
62
- focusedDate: tt,
62
+ focusedDate: at,
63
63
  value: L,
64
64
  onChange: K,
65
- onFocus: we,
66
- onBlur: De,
67
- cell: nt,
68
- weekCell: at,
69
- headerTitle: pe,
65
+ onFocus: De,
66
+ onBlur: pe,
67
+ cell: rt,
68
+ weekCell: ct,
69
+ headerTitle: he,
70
70
  mode: F,
71
71
  activeRangeEnd: W,
72
- ariaLabelledBy: rt,
73
- ariaDescribedBy: ct,
74
- dir: he
75
- } = P, i = O(ze), l = O(je), Y = X[Xe], _ = X[Ue], H = he === "rtl", ot = de + "-cell-uid", st = de + "-wrapper-id", it = (e) => ({ start: e, end: null }), lt = (e, t) => ({
72
+ ariaLabelledBy: ot,
73
+ ariaDescribedBy: st,
74
+ dir: Ve
75
+ } = P, i = O(Ue), l = O(Xe), Y = X[Qe], _ = X[Je], H = Ve === "rtl", it = de + "-cell-uid", lt = de + "-wrapper-id", ut = (e) => ({ start: e, end: null }), dt = (e, t) => ({
76
76
  start: e.start,
77
77
  end: e.end === null && e.start !== null && $.current ? t : e.end
78
- }), ut = (e, t) => {
79
- const { end: r, start: o } = t, g = W !== void 0 ? W : z.current, s = t.start !== null && e.getTime() <= t.start.getTime(), y = Q(f), D = S(f, i, l);
80
- return !me && s ? { start: e, end: y.start } : g !== "end" ? { start: e, end: r } : { start: o || D, end: e };
81
- }, Ve = (e) => {
82
- if (!b.current)
78
+ }), ft = (e, t) => {
79
+ const { end: r, start: o } = t, w = W !== void 0 ? W : z.current, s = t.start !== null && e.getTime() <= t.start.getTime(), y = Q(f), D = S(f, i, l);
80
+ return !me && s ? { start: e, end: y.start } : w !== "end" ? { start: e, end: r } : { start: o || D, end: e };
81
+ }, ye = (e) => {
82
+ if (!R.current)
83
83
  return !1;
84
- const t = m(C), r = b.current.move(t, e);
85
- return i <= r && r <= l || b.current.isInSameView(r, i) || b.current.isInSameView(r, l);
86
- }, ye = (e, t) => !!t && Wt(t) <= e && e <= Yt(t), ee = (e, t) => {
87
- R.current = !1;
84
+ const t = m(C), r = R.current.move(t, e);
85
+ return i <= r && r <= l || R.current.isInSameView(r, i) || R.current.isInSameView(r, l);
86
+ }, be = (e, t) => !!t && Wt(t) <= e && e <= Yt(t), ee = (e, t) => {
87
+ b.current = !1;
88
88
  const r = te(e, t);
89
89
  V({ navigateDate: r, focusedDate: r });
90
- }, te = (e, t) => dt(b.current.move(t, e)), dt = (e) => q(e, i, l), ft = (e) => {
91
- F === "range" && (R.current = !1, V({
90
+ }, te = (e, t) => mt(R.current.move(t, e)), mt = (e) => q(e, i, l), vt = (e) => {
91
+ F === "range" && (b.current = !1, V({
92
92
  focusedDate: e
93
93
  }));
94
- }, mt = (e) => {
94
+ }, wt = (e) => {
95
95
  e.preventDefault();
96
- }, vt = (e) => {
97
- A.current && A.current.focus({ preventScroll: !0 });
98
96
  }, gt = (e) => {
99
- $.current = !0, E.current && (E.current.focusActiveDate(), we && we(e));
100
- }, wt = (e) => {
101
- $.current = !1, E.current && (E.current.blurActiveDate(), De && De(e));
97
+ A.current && A.current.focus({ preventScroll: !0 });
102
98
  }, Dt = (e) => {
103
- Ie && ne(e);
99
+ $.current = !0, E.current && (E.current.focusActiveDate(), De && De(e));
100
+ }, pt = (e) => {
101
+ $.current = !1, E.current && (E.current.blurActiveDate(), pe && pe(e));
102
+ }, ht = (e) => {
103
+ Se && ne(e);
104
104
  }, Re = () => {
105
105
  const e = U.PrevView, t = m(C);
106
- if (w.activeView > 0 && t.getFullYear() > h.current[0].getFullYear())
106
+ if (g.activeView > 0 && t.getFullYear() > h.current[0].getFullYear())
107
107
  ee(e, te(e, t));
108
108
  else {
109
- const r = ye(t, h.current[1]) ? te(e, t) : t;
109
+ const r = be(t, h.current[1]) ? te(e, t) : t;
110
110
  ee(e, r);
111
111
  }
112
- }, be = () => {
112
+ }, Ce = () => {
113
113
  ee(U.NextView, m(C));
114
- }, pt = (e) => {
115
- const { keyCode: r, ctrlKey: o, metaKey: g } = e;
114
+ }, Vt = (e) => {
115
+ const { keyCode: r, ctrlKey: o, metaKey: w } = e;
116
116
  if (r === 84) {
117
117
  const s = J();
118
- R.current = !1, V({ focusedDate: s, navigateDate: s });
118
+ b.current = !1, V({ focusedDate: s, navigateDate: s });
119
119
  }
120
- if ((o || g) && (r === oe.left && Re(), r === oe.right && be()), r === oe.enter) {
120
+ if ((o || w) && (r === oe.left && Re(), r === oe.right && Ce()), r === oe.enter) {
121
121
  const s = {
122
122
  syntheticEvent: e,
123
123
  nativeEvent: e.nativeEvent,
@@ -127,31 +127,31 @@ const S = (c, d = u.min, p = u.max) => c instanceof Date && !Array.isArray(c) &&
127
127
  ne(s);
128
128
  } else {
129
129
  const s = q(
130
- Ce.current.move(
130
+ ke.current.move(
131
131
  C,
132
- Ce.current.action(e),
133
- w.activeView,
134
- b.current,
132
+ ke.current.action(e),
133
+ g.activeView,
134
+ R.current,
135
135
  e
136
136
  ),
137
137
  i,
138
138
  l
139
139
  );
140
- if (Pe(C, s))
140
+ if (Ke(C, s))
141
141
  return;
142
- h.current && b.current && !b.current.isInArray(s, h.current) && V({ navigateDate: s }), R.current = !1, V({ focusedDate: s });
142
+ h.current && R.current && !R.current.isInArray(s, h.current) && V({ navigateDate: s }), b.current = !1, V({ focusedDate: s });
143
143
  }
144
144
  e.preventDefault();
145
- }, ht = ({ view: e }) => {
146
- R.current = !1, ke((t) => ({ ...t, activeView: e, navigateDate: t.focusedDate }));
147
- }, Vt = (e, t, r) => {
145
+ }, yt = ({ view: e }) => {
146
+ b.current = !1, Ee((t) => ({ ...t, activeView: e, navigateDate: t.focusedDate }));
147
+ }, bt = (e, t, r) => {
148
148
  if (F === "single")
149
149
  return;
150
- const o = 0, g = 6, s = t === o ? e : se(e, -t), y = t === g ? e : se(e, g - t);
150
+ const o = 0, w = 6, s = t === o ? e : se(e, -t), y = t === w ? e : se(e, w - t);
151
151
  let D = null;
152
152
  if (F === "multiple") {
153
153
  D = [];
154
- for (let v = o; v <= g; v++)
154
+ for (let v = o; v <= w; v++)
155
155
  D.push(se(s, v));
156
156
  V({ value: D, focusedDate: e });
157
157
  }
@@ -165,34 +165,34 @@ const S = (c, d = u.min, p = u.max) => c instanceof Date && !Array.isArray(c) &&
165
165
  K(v);
166
166
  }
167
167
  }, ne = (e) => {
168
- const t = m(e.value), r = x.current.canMoveDown(w.activeView);
168
+ const t = m(e.value), r = x.current.canMoveDown(g.activeView);
169
169
  if (B)
170
170
  return;
171
171
  if (r)
172
172
  if (e.isTodayClick)
173
- x.current.moveToBottom(w.activeView);
173
+ x.current.moveToBottom(g.activeView);
174
174
  else {
175
- x.current.moveDown(w.activeView, e.syntheticEvent), V({ focusedDate: t, navigateDate: t });
175
+ x.current.moveDown(g.activeView, e.syntheticEvent), V({ focusedDate: t, navigateDate: t });
176
176
  return;
177
177
  }
178
- R.current = !0;
178
+ b.current = !0;
179
179
  let o;
180
- const g = le(f, i, l), s = S(f, i, l), y = Q(f), D = W !== void 0 ? W : z.current;
180
+ const w = le(f, i, l), s = S(f, i, l), y = Q(f), D = W !== void 0 ? W : z.current;
181
181
  switch (F) {
182
182
  case "single":
183
183
  o = m(e.value);
184
184
  break;
185
185
  case "multiple":
186
- if (Array.isArray(g)) {
187
- const v = g.slice();
186
+ if (Array.isArray(w)) {
187
+ const v = w.slice();
188
188
  let ce = -1;
189
189
  v.forEach((It, St) => {
190
- Pe(It, e.value) && (ce = St);
190
+ Ke(It, e.value) && (ce = St);
191
191
  }), ce !== -1 ? v.splice(ce, 1) : v.push(m(e.value)), o = v.slice();
192
192
  } else s ? o = [m(s), m(e.value)] : o = [m(e.value)];
193
193
  break;
194
194
  case "range": {
195
- o = y.start !== null && y.end !== null && D === "start" ? it(e.value) : ut(e.value, y), z.current = D !== "end" ? "end" : "start";
195
+ o = y.start !== null && y.end !== null && D === "start" ? ut(e.value) : ft(e.value, y), z.current = D !== "end" ? "end" : "start";
196
196
  break;
197
197
  }
198
198
  default:
@@ -234,10 +234,10 @@ const S = (c, d = u.min, p = u.max) => c instanceof Date && !Array.isArray(c) &&
234
234
  d,
235
235
  () => T.current
236
236
  );
237
- const A = a.useRef(null), E = a.useRef(null), x = a.useRef(new Ut(ht)), Ce = a.useRef(new Xt(x.current)), N = a.useRef(void 0), $ = a.useRef(!1), R = a.useRef(!1), z = a.useRef("start"), ae = a.useRef(
237
+ const A = a.useRef(null), E = a.useRef(null), x = a.useRef(new Ut(yt)), ke = a.useRef(new Xt(x.current)), N = a.useRef(void 0), $ = a.useRef(!1), b = a.useRef(!1), z = a.useRef("start"), ae = a.useRef(
238
238
  ie(X[fe], Y, _)
239
- ), re = a.useRef(M), h = a.useRef([]), b = a.useRef(null), [w, ke] = a.useState(() => {
240
- const e = L !== void 0 ? L : Ge, t = S(e, i, l), r = le(e, i, l), o = Q(e), g = $e(t, r, o), s = ie(X[fe], Y, _), y = q(tt || g || J(), i, l);
239
+ ), re = a.useRef(M), h = a.useRef([]), R = a.useRef(null), [g, Ee] = a.useState(() => {
240
+ const e = L !== void 0 ? L : qe, t = S(e, i, l), r = le(e, i, l), o = Q(e), w = Ge(t, r, o), s = ie(X[fe], Y, _), y = q(at || w || J(), i, l);
241
241
  return z.current = Qt(o, t), ae.current = s, re.current = M, {
242
242
  value: e,
243
243
  activeView: s,
@@ -245,90 +245,93 @@ const S = (c, d = u.min, p = u.max) => c instanceof Date && !Array.isArray(c) &&
245
245
  navigateDate: y
246
246
  };
247
247
  }), V = (e) => {
248
- ke((t) => ({ ...t, ...e }));
248
+ Ee((t) => ({ ...t, ...e }));
249
249
  };
250
250
  a.useEffect(() => {
251
- R.current = !0;
251
+ b.current = !0;
252
252
  }, []), a.useEffect(() => {
253
253
  E.current && ($.current ? E.current.focusActiveDate : E.current.blurActiveDate)();
254
254
  const e = S(f, i, l), t = S(f, i, l);
255
- R.current = !!(t && e && t.getTime() && e.getTime()), ae.current = w.activeView, re.current = M;
255
+ b.current = !!(t && e && t.getTime() && e.getTime()), ae.current = g.activeView, re.current = M;
256
256
  }), a.useEffect(() => {
257
257
  ve && ve({ element: A.current });
258
258
  });
259
- const yt = _t(), Ee = Ht();
259
+ const Rt = _t(), xe = Ht();
260
260
  x.current.configure(Y, _);
261
- const j = ie(w.activeView, Y, _), G = x.current.service(j, yt);
262
- b.current = G;
261
+ const j = ie(g.activeView, Y, _), G = x.current.service(j, Rt);
262
+ R.current = G;
263
263
  let f;
264
- N.current !== void 0 ? f = N.current : L !== void 0 ? f = L : f = w.value;
265
- const xe = S(f, i, l), Me = le(f, i, l), Oe = Q(f), Ae = $e(xe, Me, Oe), C = q(
266
- R.current && Ae !== null ? Ae : w.focusedDate,
264
+ N.current !== void 0 ? f = N.current : L !== void 0 ? f = L : f = g.value;
265
+ const Me = S(f, i, l), Oe = le(f, i, l), Ae = Q(f), Ie = Ge(Me, Oe, Ae), C = q(
266
+ b.current && Ie !== null ? Ie : g.focusedDate,
267
267
  i,
268
268
  l
269
- ), Ie = ue(J(), O(i), O(l)), Rt = Bt(
269
+ ), Se = ue(J(), O(i), O(l)), Ct = Bt(
270
270
  "k-calendar k-calendar-range",
271
271
  {
272
- "k-disabled": B
272
+ "k-disabled": B,
273
+ "k-week-number": we
273
274
  },
274
- Ze
275
- ), bt = lt(Oe, C), Ct = Ee.toLanguageString(We, Ye[We]), kt = Ee.toLanguageString(_e, Ye[_e]), Se = !Ve(U.PrevView), Fe = !Ve(U.NextView), Et = { "aria-disabled": Se }, xt = { "aria-disabled": Fe }, Mt = ae.current !== j, Ot = h.current.length > 0 && ye(w.navigateDate, h.current[0]), At = re.current !== M;
276
- (!Ot || Mt || At) && (h.current = G.datesList(w.navigateDate, M));
277
- const Te = m((Ne = h.current) != null && Ne[0] ? h.current[0] : J());
275
+ nt
276
+ ), kt = dt(Ae, C), Fe = xe.toLanguageString(He, $e[He]), Te = xe.toLanguageString(ze, $e[ze]), Ne = !ye(U.PrevView), Pe = !ye(U.NextView), Et = { "aria-disabled": Ne || void 0 }, xt = { "aria-disabled": Pe || void 0 }, Mt = ae.current !== j, Ot = h.current.length > 0 && be(g.navigateDate, h.current[0]), At = re.current !== M;
277
+ (!Ot || Mt || At) && (h.current = G.datesList(g.navigateDate, M));
278
+ const Be = m((Le = h.current) != null && Le[0] ? h.current[0] : J());
278
279
  return /* @__PURE__ */ a.createElement(
279
280
  "div",
280
281
  {
281
282
  ref: A,
282
- className: Rt,
283
- id: P.id || st,
284
- "aria-labelledby": rt,
285
- "aria-describedby": ct,
286
- tabIndex: B ? void 0 : Je,
287
- onFocus: gt,
288
- onBlur: wt,
289
- onMouseDown: mt,
290
- onClick: vt,
291
- onKeyDown: pt,
292
- "aria-disabled": B,
293
- dir: he
283
+ className: Ct,
284
+ id: P.id || lt,
285
+ "aria-labelledby": ot,
286
+ "aria-describedby": st,
287
+ tabIndex: B ? void 0 : et,
288
+ onFocus: Dt,
289
+ onBlur: pt,
290
+ onMouseDown: wt,
291
+ onClick: gt,
292
+ onKeyDown: Vt,
293
+ "aria-disabled": B || void 0,
294
+ dir: Ve
294
295
  },
295
296
  /* @__PURE__ */ a.createElement(
296
297
  zt,
297
298
  {
298
- key: `.kendo.calendar.header.${Te.getTime()}`,
299
+ key: `.kendo.calendar.header.${Be.getTime()}`,
299
300
  activeView: j,
300
- currentDate: Te,
301
+ currentDate: Be,
301
302
  min: i,
302
303
  max: l,
303
304
  rangeLength: M,
304
305
  bus: x.current,
305
306
  service: G,
306
- headerTitle: pe,
307
+ headerTitle: he,
307
308
  verticalView: ge,
308
309
  commands: /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(
309
- Be,
310
+ We,
310
311
  {
311
312
  type: "button",
312
313
  className: "k-calendar-nav-prev",
313
314
  icon: H ? "chevron-right" : "chevron-left",
314
- svgIcon: H ? Le : Ke,
315
+ svgIcon: H ? Ye : _e,
315
316
  fillMode: "flat",
316
- title: Ct,
317
- disabled: Se,
317
+ title: Fe,
318
+ "aria-label": Fe,
319
+ disabled: Ne,
318
320
  onClick: Re,
319
321
  ...Et
320
322
  }
321
- ), /* @__PURE__ */ a.createElement(Jt, { min: i, max: l, onClick: Dt, disabled: !Ie }), /* @__PURE__ */ a.createElement(
322
- Be,
323
+ ), /* @__PURE__ */ a.createElement(Jt, { min: i, max: l, onClick: ht, disabled: !Se }), /* @__PURE__ */ a.createElement(
324
+ We,
323
325
  {
324
326
  type: "button",
325
327
  className: "k-calendar-nav-next",
326
328
  icon: H ? "chevron-left" : "chevron-right",
327
- svgIcon: H ? Ke : Le,
329
+ svgIcon: H ? _e : Ye,
328
330
  fillMode: "flat",
329
- title: kt,
330
- disabled: Fe,
331
- onClick: be,
331
+ title: Te,
332
+ "aria-label": Te,
333
+ disabled: Pe,
334
+ onClick: Ce,
332
335
  ...xt
333
336
  }
334
337
  ))
@@ -341,24 +344,24 @@ const S = (c, d = u.min, p = u.max) => c instanceof Date && !Array.isArray(c) &&
341
344
  dates: h.current,
342
345
  activeView: j,
343
346
  focusedDate: m(C),
344
- weekDaysFormat: qe,
347
+ weekDaysFormat: Ze,
345
348
  min: i,
346
349
  max: l,
347
350
  bus: x.current,
348
351
  service: G,
349
- selectionRange: bt,
350
- value: Me || xe,
351
- cellUID: ot,
352
+ selectionRange: kt,
353
+ value: Oe || Me,
354
+ cellUID: it,
352
355
  views: M,
353
356
  onChange: ne,
354
- onWeekSelect: Vt,
355
- showWeekNumbers: et,
356
- onCellEnter: ft,
357
- cell: nt,
358
- weekCell: at,
359
- headerTitle: pe,
357
+ onWeekSelect: bt,
358
+ showWeekNumbers: we,
359
+ onCellEnter: vt,
360
+ cell: rt,
361
+ weekCell: ct,
362
+ headerTitle: he,
360
363
  verticalView: ge,
361
- showOtherMonthDays: Qe,
364
+ showOtherMonthDays: tt,
362
365
  allowReverse: me
363
366
  }
364
367
  ),
@@ -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 p=require("react"),D=require("@progress/kendo-react-intl"),i=require("@progress/kendo-react-common"),I=require("@progress/kendo-react-buttons"),d=require("@progress/kendo-date-math"),s=require("../../messages/index.js"),n=require("../../utils.js");function R(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const T=R(p),c={min:n.MIN_DATE,max:n.MAX_DATE},q=e=>{const{min:a=c.min,max:t=c.max,onClick:o,disabled:u,tabIndex:m,unstyled:r}=e,g=l=>{if(n.isInRange(n.getToday(),d.getDate(a),d.getDate(t))&&o){const k={syntheticEvent:l,nativeEvent:l.nativeEvent,value:n.dateInRange(n.getToday(),a,t),target:null,isTodayClick:!0};o(k)}},y=D.useLocalization(),f=r&&r.uCalendar,C=y.toLanguageString(s.today,s.messages[s.today]),b=i.classNames(i.uCalendar.today({c:f,disabled:u}));return T.createElement(I.Button,{className:b,onClick:g,tabIndex:m,fillMode:"flat",themeColor:"base",role:"link"},C)};exports.TodayCommand=q;exports.todayCommandDefaultProps=c;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react"),D=require("@progress/kendo-react-intl"),i=require("@progress/kendo-react-common"),I=require("@progress/kendo-react-buttons"),l=require("@progress/kendo-date-math"),s=require("../../messages/index.js"),n=require("../../utils.js");function R(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const T=R(p),c={min:n.MIN_DATE,max:n.MAX_DATE},q=e=>{const{min:a=c.min,max:t=c.max,onClick:o,disabled:u,tabIndex:m,unstyled:r}=e,g=d=>{if(n.isInRange(n.getToday(),l.getDate(a),l.getDate(t))&&o){const k={syntheticEvent:d,nativeEvent:d.nativeEvent,value:n.dateInRange(n.getToday(),a,t),target:null,isTodayClick:!0};o(k)}},y=D.useLocalization(),f=r&&r.uCalendar,C=y.toLanguageString(s.today,s.messages[s.today]),b=i.classNames(i.uCalendar.today({c:f,disabled:u}));return T.createElement(I.Button,{className:b,onClick:g,tabIndex:m,fillMode:"flat"},C)};exports.TodayCommand=q;exports.todayCommandDefaultProps=c;
@@ -6,49 +6,38 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import * as I from "react";
9
- import { useLocalization as k } from "@progress/kendo-react-intl";
10
- import { classNames as v, uCalendar as x } from "@progress/kendo-react-common";
11
- import { Button as R } from "@progress/kendo-react-buttons";
9
+ import { useLocalization as v } from "@progress/kendo-react-intl";
10
+ import { classNames as x, uCalendar as R } from "@progress/kendo-react-common";
11
+ import { Button as T } from "@progress/kendo-react-buttons";
12
12
  import { getDate as s } from "@progress/kendo-date-math";
13
- import { today as m, messages as T } from "../../messages/index.mjs";
14
- import { MIN_DATE as D, MAX_DATE as E, isInRange as M, getToday as r, dateInRange as N } from "../../utils.mjs";
15
- const i = {
13
+ import { today as m, messages as k } from "../../messages/index.mjs";
14
+ import { MIN_DATE as D, MAX_DATE as E, isInRange as M, getToday as i, dateInRange as N } from "../../utils.mjs";
15
+ const r = {
16
16
  min: D,
17
17
  max: E
18
- }, P = (l) => {
18
+ }, S = (l) => {
19
19
  const {
20
- min: a = i.min,
21
- max: o = i.max,
22
- onClick: t,
20
+ min: a = r.min,
21
+ max: t = r.max,
22
+ onClick: o,
23
23
  disabled: c,
24
24
  tabIndex: d,
25
- unstyled: e
26
- } = l, f = (n) => {
27
- if (M(r(), s(a), s(o)) && t) {
25
+ unstyled: n
26
+ } = l, f = (e) => {
27
+ if (M(i(), s(a), s(t)) && o) {
28
28
  const p = {
29
- syntheticEvent: n,
30
- nativeEvent: n.nativeEvent,
31
- value: N(r(), a, o),
29
+ syntheticEvent: e,
30
+ nativeEvent: e.nativeEvent,
31
+ value: N(i(), a, t),
32
32
  target: null,
33
33
  isTodayClick: !0
34
34
  };
35
- t(p);
35
+ o(p);
36
36
  }
37
- }, g = k(), u = e && e.uCalendar, C = g.toLanguageString(m, T[m]), y = v(x.today({ c: u, disabled: c }));
38
- return /* @__PURE__ */ I.createElement(
39
- R,
40
- {
41
- className: y,
42
- onClick: f,
43
- tabIndex: d,
44
- fillMode: "flat",
45
- themeColor: "base",
46
- role: "link"
47
- },
48
- C
49
- );
37
+ }, g = v(), u = n && n.uCalendar, y = g.toLanguageString(m, k[m]), C = x(R.today({ c: u, disabled: c }));
38
+ return /* @__PURE__ */ I.createElement(T, { className: C, onClick: f, tabIndex: d, fillMode: "flat" }, y);
50
39
  };
51
40
  export {
52
- P as TodayCommand,
53
- i as todayCommandDefaultProps
41
+ S as TodayCommand,
42
+ r as todayCommandDefaultProps
54
43
  };
@@ -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 se=require("react"),f=require("@progress/kendo-date-math"),ce=require("@progress/kendo-react-intl"),re=require("./CalendarCell.js"),oe=require("./CalendarWeekCell.js"),S=require("../models/CalendarViewEnum.js"),y=require("../../utils.js"),ie=require("../services/WeekNamesService.js"),a=require("@progress/kendo-react-common");function ue(r){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const c in r)if(c!=="default"){const k=Object.getOwnPropertyDescriptor(r,c);Object.defineProperty(i,c,k.get?k:{enumerable:!0,get:()=>r[c]})}}return i.default=r,Object.freeze(i)}const l=ue(se),O=(r,i)=>{const c=i;return l.createElement("td",{key:r,role:"gridcell",className:a.classNames(a.uCalendar.td({c,isEmpty:!0}))}," ")},w={direction:"vertical",selectedDate:y.getToday(),showWeekNumbers:!1},me=r=>{const{activeRangeEnd:i,activeView:c,bus:k,cellUID:R,direction:I=w.direction,focusedDate:T,weekCell:N,max:P,weekDaysFormat:j,min:z,cell:h,onCellEnter:E,onCellLeave:v,onChange:g,onWeekSelect:p,selectedDate:L=w.selectedDate,selectionRange:_,service:D,showWeekNumbers:$=w.showWeekNumbers,showOtherMonthDays:x,viewDate:b,allowReverse:A,unstyled:C}=r,W=I==="horizontal",B=c===S.CalendarViewEnum.month,d=!!($&&c===S.CalendarViewEnum.month),F=(e,t)=>{if(g&&t){const s={value:f.cloneDate(e),target:null,nativeEvent:t==null?void 0:t.nativeEvent,syntheticEvent:t};g(s)}},H=(e,t,s)=>{const o=t.findIndex(n=>(n==null?void 0:n.value)===e);p&&s&&p(e,o,s)},K=e=>{E&&E(f.cloneDate(e))},U=e=>{v&&v(f.cloneDate(e))},V=ce.useInternationalization(),Y=new ie.WeekNamesService(V),u=C&&C.uCalendar,G=e=>d?f.weekInYear(e,V.firstDay()):null,J=e=>{if(!d)return null;let t=0,s=e[t];for(;!s&&t<e.length;)s=e[++t];return s},q=e=>{const t=J(e);return t?t.value:null},Q=(e,t)=>{if(!q(e))return O(`week-cell-${t}`);const o=q(e),n=G(o),m=`kendo-react-calendar-week-cell-${n}`,M={value:n,firstDate:o,weekDays:e,unstyled:C,onClick:H};return N?l.createElement(N,{...M,key:m},n):l.createElement(oe.CalendarWeekCell,{...M,key:m},n)},X=e=>e.map((t,s)=>{if(!t)return O(s);const o={"aria-selected":t.isSelected},n=`kendo-react-calendar-cell-${t.value.getTime()}`,m={...o,...t,isDisabled:!t.isInRange,view:c,showOtherMonthDays:x,allowReverse:A,activeRangeEnd:i,unstyled:C,onClick:F,onMouseEnter:K,onMouseLeave:U};return h?l.createElement(h,{...m,key:n},t.formattedValue):l.createElement(re.CalendarCell,{...m,key:n},t.formattedValue)}),Z=Y.getWeekNames(d,j),ee=D.rowLength(d),te=D.title(b),ae=y.getToday(),ne=y.setTime(b,ae),le=D.data({cellUID:R,min:z,max:P,focusedDate:T,isActiveView:!k.canMoveDown(c),selectedDate:L,selectionRange:_,viewDate:ne});return l.createElement(l.Fragment,null,B&&W&&l.createElement("thead",{className:a.classNames(a.uCalendar.thead({c:u}))},l.createElement("tr",{role:"row",className:a.classNames(a.uCalendar.tr({c:u}))},Z.map(e=>l.createElement("th",{key:e,className:a.classNames(a.uCalendar.th({c:u}))},e)))),l.createElement("tbody",{className:a.classNames(a.uCalendar.tbody({c:u}))},!W&&l.createElement("tr",{className:a.classNames(a.uCalendar.tr({c:u}))},l.createElement("th",{scope:"col",colSpan:ee,className:a.classNames(a.uCalendar.caption({c:u}))},te)),le.map((e,t)=>{var o,n;const s=(n=(o=e.find(m=>m!=null))==null?void 0:o.value.getTime())!=null?n:t;return l.createElement("tr",{role:"row",className:a.classNames(a.uCalendar.tr({c:u})),key:s},d&&Q(e,t),X(e))})))};exports.View=me;exports.viewDefaultProps=w;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const se=require("react"),f=require("@progress/kendo-date-math"),ce=require("@progress/kendo-react-intl"),oe=require("./CalendarCell.js"),ie=require("./CalendarWeekCell.js"),R=require("../models/CalendarViewEnum.js"),y=require("../../utils.js"),ue=require("../services/WeekNamesService.js"),a=require("@progress/kendo-react-common");function me(c){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const s in c)if(s!=="default"){const k=Object.getOwnPropertyDescriptor(c,s);Object.defineProperty(i,s,k.get?k:{enumerable:!0,get:()=>c[s]})}}return i.default=c,Object.freeze(i)}const l=me(se),I=(c,i)=>{const s=i;return l.createElement("td",{key:c,role:"gridcell",className:a.classNames(a.uCalendar.td({c:s,isEmpty:!0}))}," ")},w={direction:"vertical",selectedDate:y.getToday(),showWeekNumbers:!1},de=c=>{const{activeRangeEnd:i,activeView:s,bus:k,cellUID:T,direction:P=w.direction,focusedDate:j,weekCell:g,max:z,weekDaysFormat:L,min:_,cell:h,onCellEnter:v,onCellLeave:E,onChange:p,onWeekSelect:b,selectedDate:$=w.selectedDate,selectionRange:x,service:D,showWeekNumbers:A=w.showWeekNumbers,showOtherMonthDays:B,viewDate:W,allowReverse:F,unstyled:C}=c,N=P==="horizontal",V=s===R.CalendarViewEnum.month,d=!!(A&&s===R.CalendarViewEnum.month),H=(e,t)=>{if(p&&t){const r={value:f.cloneDate(e),target:null,nativeEvent:t==null?void 0:t.nativeEvent,syntheticEvent:t};p(r)}},K=(e,t,r)=>{const o=t.findIndex(n=>(n==null?void 0:n.value)===e);b&&r&&b(e,o,r)},U=e=>{v&&v(f.cloneDate(e))},Y=e=>{E&&E(f.cloneDate(e))},q=ce.useInternationalization(),M=new ue.WeekNamesService(q),u=C&&C.uCalendar,G=e=>d?f.weekInYear(e,q.firstDay()):null,J=e=>{if(!d)return null;let t=0,r=e[t];for(;!r&&t<e.length;)r=e[++t];return r},S=e=>{const t=J(e);return t?t.value:null},Q=(e,t)=>{if(!S(e))return I(`week-cell-${t}`);const o=S(e),n=G(o),m=`kendo-react-calendar-week-cell-${n}`,O={value:n,firstDate:o,weekDays:e,unstyled:C,onClick:K};return g?l.createElement(g,{...O,key:m},n):l.createElement(ie.CalendarWeekCell,{...O,key:m},n)},X=e=>e.map((t,r)=>{if(!t)return I(r);const o={"aria-selected":t.isSelected?!0:void 0,role:"gridcell"},n=`kendo-react-calendar-cell-${t.value.getTime()}`,m={...o,...t,isDisabled:!t.isInRange,view:s,showOtherMonthDays:B,allowReverse:F,activeRangeEnd:i,unstyled:C,onClick:H,onMouseEnter:U,onMouseLeave:Y};return h?l.createElement(h,{...m,key:n},t.formattedValue):l.createElement(oe.CalendarCell,{...m,key:n},t.formattedValue)}),Z=M.getWeekNames(d,L),ee=V&&N?M.getWeekNames(d,"wide"):[],te=D.rowLength(d),ae=D.title(W),ne=y.getToday(),le=y.setTime(W,ne),re=D.data({cellUID:T,min:_,max:z,focusedDate:j,isActiveView:!k.canMoveDown(s),selectedDate:$,selectionRange:x,viewDate:le});return l.createElement(l.Fragment,null,V&&N&&l.createElement("thead",{className:a.classNames(a.uCalendar.thead({c:u})),role:"rowgroup"},l.createElement("tr",{role:"row",className:a.classNames(a.uCalendar.tr({c:u}))},Z.map((e,t)=>l.createElement("th",{key:e,className:a.classNames(a.uCalendar.th({c:u})),role:"columnheader","aria-label":ee[t]},e)))),l.createElement("tbody",{className:a.classNames(a.uCalendar.tbody({c:u})),role:"rowgroup"},!N&&l.createElement("tr",{className:a.classNames(a.uCalendar.tr({c:u})),"aria-hidden":!0,role:"row"},l.createElement("th",{scope:"col",colSpan:te,className:a.classNames(a.uCalendar.caption({c:u}))},ae)),re.map((e,t)=>{var o,n;const r=(n=(o=e.find(m=>m!=null))==null?void 0:o.value.getTime())!=null?n:t;return l.createElement("tr",{role:"row",className:a.classNames(a.uCalendar.tr({c:u})),key:r},d&&Q(e,t),X(e))})))};exports.View=de;exports.viewDefaultProps=w;