@progress/kendo-react-dateinputs 15.1.1-develop.3 → 15.2.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.
Files changed (44) 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 +184 -183
  22. package/daterangepicker/DateRangePicker.js +1 -1
  23. package/daterangepicker/DateRangePicker.mjs +61 -63
  24. package/datetimepicker/DateTimePicker.d.ts +1 -0
  25. package/datetimepicker/DateTimePicker.js +1 -1
  26. package/datetimepicker/DateTimePicker.mjs +117 -118
  27. package/datetimepicker/models/DateTimePickerSettings.d.ts +7 -0
  28. package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
  29. package/messages/index.d.ts +5 -0
  30. package/messages/index.js +1 -1
  31. package/messages/index.mjs +46 -44
  32. package/package-metadata.js +1 -1
  33. package/package-metadata.mjs +2 -2
  34. package/package.json +9 -9
  35. package/timepicker/TimeList.js +2 -2
  36. package/timepicker/TimeList.mjs +51 -47
  37. package/timepicker/TimePart.js +1 -1
  38. package/timepicker/TimePart.mjs +57 -68
  39. package/timepicker/TimePicker.d.ts +8 -0
  40. package/timepicker/TimePicker.js +1 -1
  41. package/timepicker/TimePicker.mjs +122 -118
  42. package/timepicker/TimeSelector.js +1 -1
  43. package/timepicker/TimeSelector.mjs +56 -57
  44. package/timepicker/models/TimePickerSettings.d.ts +7 -0
@@ -7,20 +7,20 @@
7
7
  */
8
8
  import * as n from "react";
9
9
  import e from "prop-types";
10
- import { Popup as ie } from "@progress/kendo-react-popup";
10
+ import { Popup as ee } from "@progress/kendo-react-popup";
11
11
  import { cloneDate as P } from "@progress/kendo-date-math";
12
- import { createPropsContext as se, Keys as d, canUseDOM as C, subscribeToKendoPaste as oe, AsyncFocusBlur as ae, classNames as S, uDateTimePicker as T, withIdHOC as ne, withPropsContext as re, withUnstyledHOC as le, withAdaptiveModeContext as he } from "@progress/kendo-react-common";
13
- import { calendarIcon as de } from "@progress/kendo-svg-icons";
14
- import { DateInputInner as ue } from "../dateinput/DateInput.mjs";
15
- import { Button as pe } from "@progress/kendo-react-buttons";
16
- import { isInDateRange as M, MIN_DATE as ce, MAX_DATE as me, MAX_TIME as fe, MIN_TIME as ge } from "../utils.mjs";
17
- import { dateTimePickerCancel as O, messages as u, dateTimePickerSet as x, selectDateAndTime as k, toggleDateTimeSelector as m } from "../messages/index.mjs";
18
- import { provideLocalizationService as p, registerForLocalization as ve } from "@progress/kendo-react-intl";
19
- import { DateTimeSelector as be } from "./DateTimeSelector.mjs";
20
- import { isInTimeRange as we } from "../timepicker/utils.mjs";
21
- import { PickerFloatingLabel as ye } from "../hooks/usePickerFloatingLabel.mjs";
22
- import { AdaptiveMode as Se } from "../common/AdaptiveMode.mjs";
23
- import { ActionSheetContent as Te } from "@progress/kendo-react-layout";
12
+ import { createPropsContext as te, Keys as d, canUseDOM as C, subscribeToKendoPaste as ie, AsyncFocusBlur as se, classNames as S, uDateTimePicker as I, withIdHOC as oe, withPropsContext as ae, withUnstyledHOC as ne, withAdaptiveModeContext as re } from "@progress/kendo-react-common";
13
+ import { calendarIcon as le } from "@progress/kendo-svg-icons";
14
+ import { DateInputInner as he } from "../dateinput/DateInput.mjs";
15
+ import { Button as de } from "@progress/kendo-react-buttons";
16
+ import { isInDateRange as M, MIN_DATE as ue, MAX_DATE as pe, MAX_TIME as ce, MIN_TIME as me } from "../utils.mjs";
17
+ import { dateTimePickerCancel as O, messages as p, dateTimePickerSet as x, toggleDateTimeSelector as c } from "../messages/index.mjs";
18
+ import { provideLocalizationService as m, registerForLocalization as fe } from "@progress/kendo-react-intl";
19
+ import { DateTimeSelector as ge } from "./DateTimeSelector.mjs";
20
+ import { isInTimeRange as ve } from "../timepicker/utils.mjs";
21
+ import { PickerFloatingLabel as be } from "../hooks/usePickerFloatingLabel.mjs";
22
+ import { AdaptiveMode as we } from "../common/AdaptiveMode.mjs";
23
+ import { ActionSheetContent as ye } from "@progress/kendo-react-layout";
24
24
  const a = class a extends n.Component {
25
25
  constructor(i) {
26
26
  super(i), this._element = null, this._dateInput = n.createRef(), this._dateTimeSelector = null, this.shouldFocusDateInput = !1, this.prevShow = !1, this.handleSmartPasteValue = (t) => {
@@ -50,14 +50,14 @@ const a = class a extends n.Component {
50
50
  const t = this.dateInputElement();
51
51
  t && t.focus();
52
52
  }, this.renderPicker = () => {
53
- const { disabled: t, minTime: s, maxTime: o, format: h, calendar: l, cancelButton: r, weekNumber: g, focusedDate: c, unstyled: v } = this.props;
53
+ const { disabled: t, minTime: s, maxTime: o, format: h, calendar: r, cancelButton: l, weekNumber: g, focusedDate: u, unstyled: v } = this.props;
54
54
  return /* @__PURE__ */ n.createElement(
55
- be,
55
+ ge,
56
56
  {
57
57
  ref: (b) => {
58
58
  this._dateTimeSelector = b;
59
59
  },
60
- cancelButton: r,
60
+ cancelButton: l,
61
61
  steps: this.props.steps,
62
62
  value: this.value,
63
63
  onChange: this.handleValueChange,
@@ -68,21 +68,21 @@ const a = class a extends n.Component {
68
68
  max: this.max,
69
69
  minTime: s,
70
70
  maxTime: o,
71
- focusedDate: c,
71
+ focusedDate: u,
72
72
  format: h,
73
- calendar: l,
73
+ calendar: r,
74
74
  mobileMode: this.mobileMode,
75
75
  footerActions: !this.mobileMode,
76
76
  unstyled: v
77
77
  }
78
78
  );
79
79
  }, this.renderAdaptivePopup = () => {
80
- const { windowWidth: t = 0 } = this.state, s = p(this).toLanguageString(
80
+ const { windowWidth: t = 0 } = this.state, s = m(this).toLanguageString(
81
81
  O,
82
- u[O]
83
- ), o = p(this).toLanguageString(
82
+ p[O]
83
+ ), o = m(this).toLanguageString(
84
84
  x,
85
- u[x]
85
+ p[x]
86
86
  ), h = {
87
87
  expand: this.show,
88
88
  onClose: this.handleBlur,
@@ -91,18 +91,18 @@ const a = class a extends n.Component {
91
91
  windowWidth: t,
92
92
  footer: {
93
93
  cancelText: s,
94
- onCancel: (l) => {
95
- var r;
96
- return (r = this._dateTimeSelector) == null ? void 0 : r.handleReject(l);
94
+ onCancel: (r) => {
95
+ var l;
96
+ return (l = this._dateTimeSelector) == null ? void 0 : l.handleReject(r);
97
97
  },
98
98
  applyText: o,
99
- onApply: (l) => {
100
- var r;
101
- return (r = this._dateTimeSelector) == null ? void 0 : r.handleAccept(l);
99
+ onApply: (r) => {
100
+ var l;
101
+ return (l = this._dateTimeSelector) == null ? void 0 : l.handleAccept(r);
102
102
  }
103
103
  }
104
104
  };
105
- return /* @__PURE__ */ n.createElement(Se, { ...h }, /* @__PURE__ */ n.createElement(Te, null, this.renderPicker()));
105
+ return /* @__PURE__ */ n.createElement(we, { ...h }, /* @__PURE__ */ n.createElement(ye, null, this.renderPicker()));
106
106
  }, this.handleReject = () => {
107
107
  this.shouldFocusDateInput = !0, this.setShow(!1);
108
108
  }, this.handleValueChange = (t) => {
@@ -193,7 +193,7 @@ const a = class a extends n.Component {
193
193
  * Represents the validity state into which the DateTimePicker is set.
194
194
  */
195
195
  get validity() {
196
- const i = M(this.value, this.min, this.max) && we(this.value, this.props.minTime || ge, this.props.maxTime || fe), t = this.props.validationMessage !== void 0, s = (!this.required || this.value !== null) && i, o = this.props.valid !== void 0 ? this.props.valid : s;
196
+ const i = M(this.value, this.min, this.max) && ve(this.value, this.props.minTime || me, this.props.maxTime || ce), t = this.props.validationMessage !== void 0, s = (!this.required || this.value !== null) && i, o = this.props.valid !== void 0 ? this.props.valid : s;
197
197
  return {
198
198
  customError: t,
199
199
  rangeOverflow: this.value && this.max.getTime() < this.value.getTime() || !1,
@@ -227,7 +227,7 @@ const a = class a extends n.Component {
227
227
  var t;
228
228
  this.observerResize = C && window.ResizeObserver && new window.ResizeObserver(this.calculateMedia.bind(this)), this.show && this.forceUpdate(), (t = this.document) != null && t.body && this.observerResize && this.observerResize.observe(this.document.body);
229
229
  const i = this.props.name || this.props.id;
230
- this.KendoPasteSubscription = oe(this._element, {
230
+ this.KendoPasteSubscription = ie(this._element, {
231
231
  fieldName: i,
232
232
  onValueChange: (s) => {
233
233
  this.handleSmartPasteValue(s);
@@ -260,54 +260,51 @@ const a = class a extends n.Component {
260
260
  fillMode: s = a.defaultProps.fillMode,
261
261
  autoFocus: o = a.defaultProps.autoFocus,
262
262
  inputAttributes: h,
263
- disabled: l,
264
- tabIndex: r,
263
+ disabled: r,
264
+ tabIndex: l,
265
265
  title: g,
266
- id: c,
266
+ id: u,
267
267
  format: v,
268
268
  formatPlaceholder: b,
269
- min: E,
270
- max: F,
271
- className: A,
272
- width: N,
273
- name: R,
274
- validationMessage: B,
275
- required: z,
276
- validityStyles: _,
277
- minTime: K,
278
- maxTime: L,
279
- ariaLabelledBy: V,
280
- ariaDescribedBy: q,
281
- popup: U = ie,
269
+ min: k,
270
+ max: E,
271
+ className: F,
272
+ width: A,
273
+ name: N,
274
+ validationMessage: R,
275
+ required: B,
276
+ validityStyles: z,
277
+ minTime: _,
278
+ maxTime: K,
279
+ ariaLabelledBy: L,
280
+ ariaDescribedBy: V,
281
+ popup: q = ee,
282
282
  unstyled: w,
283
- autoFill: j,
284
- twoDigitYearMax: H,
285
- enableMouseWheel: W,
286
- autoCorrectParts: X,
287
- autoSwitchParts: Y,
288
- autoSwitchKeys: Z,
289
- allowCaretMode: G
290
- } = this.props, y = w && w.uDateTimePicker, D = !this.validityStyles || this.validity.valid, J = p(this).toLanguageString(
291
- k,
292
- u[k]
293
- ), Q = {
294
- id: c,
295
- ariaLabelledBy: V,
296
- ariaDescribedBy: q,
297
- ariaLabel: J,
283
+ autoFill: U,
284
+ twoDigitYearMax: j,
285
+ enableMouseWheel: H,
286
+ autoCorrectParts: W,
287
+ autoSwitchParts: X,
288
+ autoSwitchKeys: Y,
289
+ allowCaretMode: Z
290
+ } = this.props, y = w && w.uDateTimePicker, T = !this.validityStyles || this.validity.valid, G = {
291
+ id: u,
292
+ ariaLabelledBy: L,
293
+ ariaDescribedBy: V,
294
+ ariaLabel: this.props.ariaLabel,
298
295
  format: v,
299
296
  formatPlaceholder: b,
300
- disabled: l,
297
+ disabled: r,
301
298
  title: g,
302
- validityStyles: _,
303
- validationMessage: B,
304
- required: z,
305
- min: E,
306
- max: F,
307
- minTime: K,
308
- maxTime: L,
309
- name: R,
310
- tabIndex: this.show ? -1 : r,
299
+ validityStyles: z,
300
+ validationMessage: R,
301
+ required: B,
302
+ min: k,
303
+ max: E,
304
+ minTime: _,
305
+ maxTime: K,
306
+ name: N,
307
+ tabIndex: this.show ? -1 : l,
311
308
  valid: this.validity.valid,
312
309
  value: this.value,
313
310
  onChange: this.handleValueChange,
@@ -316,44 +313,44 @@ const a = class a extends n.Component {
316
313
  placeholder: this.state.focused ? null : this.props.placeholder,
317
314
  ariaExpanded: this.show,
318
315
  unstyled: w,
319
- autoFill: j,
320
- twoDigitYearMax: H,
321
- enableMouseWheel: W,
322
- autoCorrectParts: X,
323
- autoSwitchParts: Y,
324
- autoSwitchKeys: Z,
325
- allowCaretMode: G
326
- }, I = /* @__PURE__ */ n.createElement(
327
- ae,
316
+ autoFill: U,
317
+ twoDigitYearMax: j,
318
+ enableMouseWheel: H,
319
+ autoCorrectParts: W,
320
+ autoSwitchParts: X,
321
+ autoSwitchKeys: Y,
322
+ allowCaretMode: Z
323
+ }, D = /* @__PURE__ */ n.createElement(
324
+ se,
328
325
  {
329
326
  onFocus: this.handleFocus,
330
327
  onBlur: this.handleBlur,
331
328
  onSyncFocus: this.props.onFocus,
332
329
  onSyncBlur: this.props.onBlur
333
330
  },
334
- ({ onFocus: $, onBlur: ee }) => /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(
331
+ ({ onFocus: J, onBlur: Q }) => /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(
335
332
  "div",
336
333
  {
337
- ref: (te) => {
338
- this._element = te;
334
+ ref: ($) => {
335
+ this._element = $;
339
336
  },
340
337
  className: S(
341
- T.wrapper({
338
+ I.wrapper({
342
339
  c: y,
343
340
  size: i,
344
341
  fillMode: s,
345
342
  rounded: t,
346
- disabled: l,
343
+ disabled: r,
347
344
  required: this.required,
348
- invalid: !D
345
+ invalid: !T
349
346
  }),
350
347
  { "k-focus": this.state.focused },
351
- A
348
+ F
352
349
  ),
353
350
  onKeyDown: this.handleKeyDown,
354
- style: { width: N },
355
- onFocus: this.mobileMode ? this.handleClick : $,
356
- onBlur: ee,
351
+ style: { width: A },
352
+ onFocus: this.mobileMode ? this.handleClick : J,
353
+ onBlur: Q,
357
354
  onClick: this.mobileMode ? this.handleClick : void 0
358
355
  },
359
356
  /* @__PURE__ */ n.createElement(
@@ -365,37 +362,38 @@ const a = class a extends n.Component {
365
362
  ariaHasPopup: "dialog",
366
363
  autoFocus: o,
367
364
  inputAttributes: h,
368
- ...Q
365
+ ...G
369
366
  }
370
367
  ),
371
368
  /* @__PURE__ */ n.createElement(
372
- pe,
369
+ de,
373
370
  {
374
371
  tabIndex: -1,
375
372
  type: "button",
373
+ disabled: r,
376
374
  icon: "calendar",
377
- svgIcon: de,
375
+ svgIcon: le,
378
376
  onMouseDown: this.handleIconMouseDown,
379
377
  onClick: this.mobileMode ? void 0 : this.handleClick,
380
- title: p(this).toLanguageString(
381
- m,
382
- u[m]
378
+ title: m(this).toLanguageString(
379
+ c,
380
+ p[c]
383
381
  ),
384
- className: S(T.inputButton({ c: y })),
382
+ className: S(I.inputButton({ c: y })),
385
383
  fillMode: s,
386
- "aria-label": p(this).toLanguageString(
387
- m,
388
- u[m]
384
+ "aria-label": m(this).toLanguageString(
385
+ c,
386
+ p[c]
389
387
  )
390
388
  }
391
389
  ),
392
390
  /* @__PURE__ */ n.createElement(
393
- U,
391
+ q,
394
392
  {
395
393
  show: this.show,
396
394
  animate: this.element !== null,
397
395
  anchor: this.element,
398
- popupClass: S(T.popup({ c: y })),
396
+ popupClass: S(I.popup({ c: y })),
399
397
  id: this._popupId,
400
398
  anchorAlign: {
401
399
  horizontal: "left",
@@ -411,17 +409,17 @@ const a = class a extends n.Component {
411
409
  ), this.mobileMode && this.renderAdaptivePopup())
412
410
  );
413
411
  return this.props.label ? /* @__PURE__ */ n.createElement(
414
- ye,
412
+ be,
415
413
  {
416
414
  dateInput: this._dateInput,
417
415
  label: this.props.label,
418
- editorId: c,
419
- editorValid: D,
416
+ editorId: u,
417
+ editorValid: T,
420
418
  editorDisabled: this.props.disabled,
421
- children: I,
419
+ children: D,
422
420
  style: { width: this.props.width }
423
421
  }
424
- ) : I;
422
+ ) : D;
425
423
  }
426
424
  setShow(i) {
427
425
  const { onOpen: t, onClose: s } = this.props;
@@ -483,6 +481,7 @@ a.displayName = "DateTimePicker", a.propTypes = {
483
481
  ]),
484
482
  id: e.string,
485
483
  ariaLabelledBy: e.string,
484
+ ariaLabel: e.string,
486
485
  ariaDescribedBy: e.string,
487
486
  min: e.instanceOf(Date),
488
487
  max: e.instanceOf(Date),
@@ -515,32 +514,32 @@ a.displayName = "DateTimePicker", a.propTypes = {
515
514
  disabled: !1,
516
515
  format: "g",
517
516
  // general date and time pattern (short time): "M/d/y h:mm a" for en.
518
- max: me,
519
- min: ce,
517
+ max: pe,
518
+ min: ue,
520
519
  popupSettings: {},
521
520
  tabIndex: 0,
522
521
  weekNumber: !1,
523
522
  validityStyles: !0,
524
523
  cancelButton: !0,
525
- dateInput: ue,
524
+ dateInput: he,
526
525
  size: void 0,
527
526
  rounded: void 0,
528
527
  fillMode: void 0,
529
528
  autoFocus: !1
530
529
  };
531
530
  let f = a;
532
- const De = se(), Ie = ne(
533
- re(
534
- De,
535
- le(
536
- he(f)
531
+ const Se = te(), Ie = oe(
532
+ ae(
533
+ Se,
534
+ ne(
535
+ re(f)
537
536
  )
538
537
  )
539
538
  );
540
539
  Ie.displayName = "KendoReactDateTimePicker";
541
- ve(f);
540
+ fe(f);
542
541
  export {
543
542
  Ie as DateTimePicker,
544
- De as DateTimePickerPropsContext,
543
+ Se as DateTimePickerPropsContext,
545
544
  f as DateTimePickerWithoutContext
546
545
  };
@@ -91,6 +91,13 @@ export interface DateTimePickerSettings {
91
91
  * This property is related to accessibility.
92
92
  */
93
93
  ariaLabelledBy?: string;
94
+ /**
95
+ * The accessible label of the component.
96
+ *
97
+ * @remarks
98
+ * This property is related to accessibility.
99
+ */
100
+ ariaLabel?: string;
94
101
  /**
95
102
  * Specifies the greatest valid date
96
103
  * ([see example](https://www.telerik.com/kendo-react-ui/components/dateinputs/datetimepicker/date-ranges)).