@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
@@ -5,24 +5,24 @@
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";
8
+ import * as s from "react";
9
9
  import t from "prop-types";
10
- import { cloneDate as h } from "@progress/kendo-date-math";
11
- import { Keys as u, classNames as m, uTimePicker as x, uTime as g, getActiveElement as A } from "@progress/kendo-react-common";
12
- import { provideIntlService as K, provideLocalizationService as M, registerForIntl as R, registerForLocalization as F } from "@progress/kendo-react-intl";
10
+ import { cloneDate as u } from "@progress/kendo-date-math";
11
+ import { Keys as h, classNames as m, uTimePicker as x, uTime as f, getActiveElement as A } from "@progress/kendo-react-common";
12
+ import { provideIntlService as K, provideLocalizationService as M, registerForIntl as F, registerForLocalization as R } from "@progress/kendo-react-intl";
13
13
  import { timePickerCancel as y, messages as B, timePickerSet as D } from "../messages/index.mjs";
14
14
  import { MIDNIGHT_DATE as L, MAX_TIME as j, MIN_TIME as z } from "../utils.mjs";
15
- import { getNow as w, valueMerger as V, generateGetters as G } from "./utils.mjs";
15
+ import { getNow as g, valueMerger as V, generateGetters as G } from "./utils.mjs";
16
16
  import { TimePart as H } from "./TimePart.mjs";
17
17
  import { Button as O } from "@progress/kendo-react-buttons";
18
- const r = class r extends a.Component {
18
+ const r = class r extends s.Component {
19
19
  constructor(i) {
20
20
  super(i), this._element = null, this._cancelButton = null, this._acceptButton = null, this.timePart = null, this.focusActiveList = () => {
21
21
  this.timePart && this.timePart.focus({ preventScroll: !0 });
22
22
  }, this.handleKeyDown = (e) => {
23
23
  const { keyCode: n } = e;
24
24
  switch (n) {
25
- case u.enter:
25
+ case h.enter:
26
26
  this.hasActiveButton() || this.handleAccept(e);
27
27
  return;
28
28
  default:
@@ -30,14 +30,14 @@ const r = class r extends a.Component {
30
30
  }
31
31
  }, this.revertToNowButton = (e) => {
32
32
  const { keyCode: n, shiftKey: o } = e;
33
- !o && n === u.tab && (e.preventDefault(), this.props.nowButton !== !1 ? this.timePart && this.timePart.focus({ preventScroll: !0 }, !0) : this.timePart && this.timePart.focus({ preventScroll: !0 }));
33
+ !o && n === h.tab && (e.preventDefault(), this.props.nowButton !== !1 ? this.timePart && this.timePart.focus({ preventScroll: !0 }, !0) : this.timePart && this.timePart.focus({ preventScroll: !0 }));
34
34
  }, this.handleNowKeyDown = (e) => {
35
35
  var c;
36
36
  const { keyCode: n, shiftKey: o } = e;
37
- o && n === u.tab ? (e.preventDefault(), this._acceptButton && ((c = this._acceptButton.element) == null || c.focus({ preventScroll: !0 }))) : n === u.enter && (e.stopPropagation(), this.handleNowClick(e));
37
+ o && n === h.tab ? (e.preventDefault(), this._acceptButton && ((c = this._acceptButton.element) == null || c.focus({ preventScroll: !0 }))) : n === h.enter && (e.stopPropagation(), this.handleNowClick(e));
38
38
  }, this.handleAccept = (e) => {
39
39
  const n = this.mergeValue(
40
- h(this.value || w()),
40
+ u(this.value || g()),
41
41
  this.timePart ? this.timePart.value : this.current
42
42
  );
43
43
  this.setState({ value: n }), this.valueDuringOnChange = n;
@@ -53,7 +53,7 @@ const r = class r extends a.Component {
53
53
  const { onReject: n } = this.props;
54
54
  n && n.call(void 0, e);
55
55
  }, this.handleNowClick = (e) => {
56
- const n = this.mergeValue(h(this.value || w()), w());
56
+ const n = this.mergeValue(u(this.value || g()), g());
57
57
  this.setState({
58
58
  current: n,
59
59
  value: n
@@ -84,13 +84,13 @@ const r = class r extends a.Component {
84
84
  }
85
85
  get value() {
86
86
  const i = this.valueDuringOnChange !== void 0 ? this.valueDuringOnChange : this.props.value !== void 0 ? this.props.value : this.state.value;
87
- return i !== null ? h(i) : null;
87
+ return i !== null ? u(i) : null;
88
88
  }
89
89
  get intl() {
90
90
  return K(this);
91
91
  }
92
92
  get current() {
93
- return this.state.current !== null ? h(this.state.current) : null;
93
+ return this.state.current !== null ? u(this.state.current) : null;
94
94
  }
95
95
  /**
96
96
  * @hidden
@@ -110,36 +110,38 @@ const r = class r extends a.Component {
110
110
  className: c,
111
111
  smoothScroll: P,
112
112
  min: N,
113
- max: k,
114
- boundRange: T,
113
+ max: T,
114
+ boundRange: k,
115
115
  nowButton: E,
116
116
  steps: S,
117
117
  show: _,
118
- mobileMode: b,
118
+ mobileMode: v,
119
119
  unstyled: l
120
- } = this.props, I = l && l.uTimePicker, d = l && l.uTime, C = M(this), f = C.toLanguageString(y, B[y]), v = C.toLanguageString(D, B[D]);
121
- return /* @__PURE__ */ a.createElement(
120
+ } = this.props, I = l && l.uTimePicker, d = l && l.uTime, w = M(this), C = w.toLanguageString(y, B[y]), b = w.toLanguageString(D, B[D]);
121
+ return /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement(
122
122
  "div",
123
123
  {
124
- ref: (s) => {
125
- this._element = s;
124
+ ref: (a) => {
125
+ this._element = a;
126
126
  },
127
127
  tabIndex: n ? void 0 : o || 0,
128
128
  className: m(
129
129
  x.timeSelector({
130
130
  c: I,
131
- mobileMode: b,
131
+ mobileMode: v,
132
132
  disabled: n
133
133
  }),
134
134
  c
135
135
  ),
136
+ role: "group",
137
+ "aria-label": "Time selector",
136
138
  onKeyDown: this.handleKeyDown
137
139
  },
138
- /* @__PURE__ */ a.createElement(
140
+ /* @__PURE__ */ s.createElement(
139
141
  H,
140
142
  {
141
- ref: (s) => {
142
- this.timePart = s;
143
+ ref: (a) => {
144
+ this.timePart = a;
143
145
  },
144
146
  value: this.current,
145
147
  onChange: this.handleChange,
@@ -147,47 +149,44 @@ const r = class r extends a.Component {
147
149
  format: i,
148
150
  smoothScroll: P,
149
151
  min: N,
150
- max: k,
151
- boundRange: T,
152
+ max: T,
153
+ boundRange: k,
152
154
  disabled: n,
153
155
  nowButton: E,
154
156
  steps: S,
155
157
  show: _,
156
- mobileMode: b,
158
+ mobileMode: v,
157
159
  onNowKeyDown: this.handleNowKeyDown,
158
160
  unstyled: l
159
161
  }
160
- ),
161
- this.props.footer && /* @__PURE__ */ a.createElement("div", { className: m(g.footer({ c: d })) }, e && /* @__PURE__ */ a.createElement(
162
- O,
163
- {
164
- type: "button",
165
- ref: (s) => {
166
- this._cancelButton = s;
167
- },
168
- className: m(g.cancel({ c: d })),
169
- onClick: this.handleReject,
170
- title: f,
171
- "aria-label": f
162
+ )
163
+ ), this.props.footer && /* @__PURE__ */ s.createElement("div", { className: m(f.footer({ c: d })) }, e && /* @__PURE__ */ s.createElement(
164
+ O,
165
+ {
166
+ type: "button",
167
+ ref: (a) => {
168
+ this._cancelButton = a;
172
169
  },
173
- f
174
- ), /* @__PURE__ */ a.createElement(
175
- O,
176
- {
177
- type: "button",
178
- ref: (s) => {
179
- this._acceptButton = s;
180
- },
181
- className: m(g.accept({ c: d })),
182
- themeColor: "primary",
183
- onClick: this.handleAccept,
184
- onKeyDown: this.revertToNowButton,
185
- title: v,
186
- "aria-label": v
170
+ className: m(f.cancel({ c: d })),
171
+ onClick: this.handleReject,
172
+ title: C
173
+ },
174
+ C
175
+ ), /* @__PURE__ */ s.createElement(
176
+ O,
177
+ {
178
+ type: "button",
179
+ ref: (a) => {
180
+ this._acceptButton = a;
187
181
  },
188
- v
189
- ))
190
- );
182
+ className: m(f.accept({ c: d })),
183
+ themeColor: "primary",
184
+ onClick: this.handleAccept,
185
+ onKeyDown: this.revertToNowButton,
186
+ title: b
187
+ },
188
+ b
189
+ )));
191
190
  }
192
191
  nextTick(i) {
193
192
  clearTimeout(this.nextTickId), this.nextTickId = window.setTimeout(() => i());
@@ -246,8 +245,8 @@ r.propTypes = {
246
245
  footer: !0
247
246
  };
248
247
  let p = r;
249
- R(p);
250
248
  F(p);
249
+ R(p);
251
250
  export {
252
251
  p as TimeSelector
253
252
  };