@progress/kendo-react-dateinputs 14.5.0-develop.9 → 15.0.0-develop.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/CalendarMcpWrapper.d.ts +16 -0
  2. package/CalendarMcpWrapper.js +8 -0
  3. package/CalendarMcpWrapper.mjs +18 -0
  4. package/DateRangePickerMcpWrapper.d.ts +16 -0
  5. package/DateRangePickerMcpWrapper.js +8 -0
  6. package/DateRangePickerMcpWrapper.mjs +18 -0
  7. package/DateTimePickerMcpWrapper.d.ts +16 -0
  8. package/DateTimePickerMcpWrapper.js +8 -0
  9. package/DateTimePickerMcpWrapper.mjs +18 -0
  10. package/README.md +4 -4
  11. package/TimePickerMcpWrapper.d.ts +16 -0
  12. package/TimePickerMcpWrapper.js +8 -0
  13. package/TimePickerMcpWrapper.mjs +18 -0
  14. package/calendar/components/Calendar.d.ts +6 -1
  15. package/calendar/components/Calendar.mjs +5 -5
  16. package/dateinput/DateInput.d.ts +11 -1
  17. package/dateinput/DateInput.js +1 -1
  18. package/dateinput/DateInput.mjs +202 -194
  19. package/datepicker/DatePicker.d.ts +6 -1
  20. package/datepicker/DatePicker.js +1 -1
  21. package/datepicker/DatePicker.mjs +233 -231
  22. package/daterangepicker/DateRangePicker.d.ts +6 -1
  23. package/daterangepicker/DateRangePicker.js +1 -1
  24. package/daterangepicker/DateRangePicker.mjs +65 -61
  25. package/datetimepicker/DateTimePicker.d.ts +7 -1
  26. package/datetimepicker/DateTimePicker.js +1 -1
  27. package/datetimepicker/DateTimePicker.mjs +106 -100
  28. package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
  29. package/index.d.mts +12 -4
  30. package/index.d.ts +12 -4
  31. package/index.js +1 -1
  32. package/index.mjs +110 -105
  33. package/messages/index.d.ts +25 -0
  34. package/messages/index.js +1 -1
  35. package/messages/index.mjs +46 -36
  36. package/package-metadata.js +1 -1
  37. package/package-metadata.mjs +2 -2
  38. package/package.json +8 -8
  39. package/timepicker/TimePicker.d.ts +7 -1
  40. package/timepicker/TimePicker.js +1 -1
  41. package/timepicker/TimePicker.mjs +90 -87
@@ -7,20 +7,20 @@
7
7
  */
8
8
  import * as n from "react";
9
9
  import e from "prop-types";
10
- import { Popup as ee } from "@progress/kendo-react-popup";
10
+ import { Popup as ie } from "@progress/kendo-react-popup";
11
11
  import { cloneDate as P } from "@progress/kendo-date-math";
12
- import { withIdHOC as te, withPropsContext as ie, withUnstyledHOC as se, withAdaptiveModeContext as oe, createPropsContext as ae, Keys as d, canUseDOM as C, subscribeToKendoPaste as ne, AsyncFocusBlur as re, classNames as S, uDateTimePicker as D } from "@progress/kendo-react-common";
13
- import { calendarIcon as le } from "@progress/kendo-svg-icons";
14
- import { DateInput 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 we } from "../hooks/usePickerFloatingLabel.mjs";
22
- import { AdaptiveMode as be } from "../common/AdaptiveMode.mjs";
23
- import { ActionSheetContent as ye } from "@progress/kendo-react-layout";
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";
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,12 +50,12 @@ 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: u, unstyled: v } = this.props;
53
+ const { disabled: t, minTime: s, maxTime: o, format: h, calendar: l, cancelButton: r, weekNumber: g, focusedDate: c, unstyled: v } = this.props;
54
54
  return /* @__PURE__ */ n.createElement(
55
- ge,
55
+ be,
56
56
  {
57
- ref: (w) => {
58
- this._dateTimeSelector = w;
57
+ ref: (b) => {
58
+ this._dateTimeSelector = b;
59
59
  },
60
60
  cancelButton: r,
61
61
  steps: this.props.steps,
@@ -68,7 +68,7 @@ const a = class a extends n.Component {
68
68
  max: this.max,
69
69
  minTime: s,
70
70
  maxTime: o,
71
- focusedDate: u,
71
+ focusedDate: c,
72
72
  format: h,
73
73
  calendar: l,
74
74
  mobileMode: this.mobileMode,
@@ -77,12 +77,12 @@ const a = class a extends n.Component {
77
77
  }
78
78
  );
79
79
  }, this.renderAdaptivePopup = () => {
80
- const { windowWidth: t = 0 } = this.state, s = m(this).toLanguageString(
80
+ const { windowWidth: t = 0 } = this.state, s = p(this).toLanguageString(
81
81
  O,
82
- p[O]
83
- ), o = m(this).toLanguageString(
82
+ u[O]
83
+ ), o = p(this).toLanguageString(
84
84
  x,
85
- p[x]
85
+ u[x]
86
86
  ), h = {
87
87
  expand: this.show,
88
88
  onClose: this.handleBlur,
@@ -102,7 +102,7 @@ const a = class a extends n.Component {
102
102
  }
103
103
  }
104
104
  };
105
- return /* @__PURE__ */ n.createElement(be, { ...h }, /* @__PURE__ */ n.createElement(ye, null, this.renderPicker()));
105
+ return /* @__PURE__ */ n.createElement(Se, { ...h }, /* @__PURE__ */ n.createElement(Te, 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) && 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;
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;
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 = ne(this._element, {
230
+ this.KendoPasteSubscription = oe(this._element, {
231
231
  fieldName: i,
232
232
  onValueChange: (s) => {
233
233
  this.handleSmartPasteValue(s);
@@ -263,46 +263,50 @@ const a = class a extends n.Component {
263
263
  disabled: l,
264
264
  tabIndex: r,
265
265
  title: g,
266
- id: u,
266
+ id: c,
267
267
  format: v,
268
- formatPlaceholder: w,
268
+ formatPlaceholder: b,
269
269
  min: E,
270
- max: k,
271
- className: F,
272
- width: A,
273
- name: N,
274
- validationMessage: R,
275
- required: B,
276
- validityStyles: z,
277
- minTime: _,
278
- maxTime: K,
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
279
  ariaLabelledBy: V,
280
280
  ariaDescribedBy: q,
281
- popup: L = ee,
282
- unstyled: b,
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 = b && b.uDateTimePicker, T = !this.validityStyles || this.validity.valid, G = {
291
- id: u,
281
+ popup: U = ie,
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,
292
295
  ariaLabelledBy: V,
293
296
  ariaDescribedBy: q,
297
+ ariaLabel: J,
294
298
  format: v,
295
- formatPlaceholder: w,
299
+ formatPlaceholder: b,
296
300
  disabled: l,
297
301
  title: g,
298
- validityStyles: z,
299
- validationMessage: R,
300
- required: B,
302
+ validityStyles: _,
303
+ validationMessage: B,
304
+ required: z,
301
305
  min: E,
302
- max: k,
303
- minTime: _,
304
- maxTime: K,
305
- name: N,
306
+ max: F,
307
+ minTime: K,
308
+ maxTime: L,
309
+ name: R,
306
310
  tabIndex: this.show ? -1 : r,
307
311
  valid: this.validity.valid,
308
312
  value: this.value,
@@ -311,44 +315,45 @@ const a = class a extends n.Component {
311
315
  label: void 0,
312
316
  placeholder: this.state.focused ? null : this.props.placeholder,
313
317
  ariaExpanded: this.show,
314
- unstyled: b,
315
- autoFill: U,
316
- twoDigitYearMax: j,
317
- enableMouseWheel: H,
318
- autoCorrectParts: W,
319
- autoSwitchParts: X,
320
- autoSwitchKeys: Y,
321
- allowCaretMode: Z
318
+ unstyled: w,
319
+ autoFill: j,
320
+ twoDigitYearMax: H,
321
+ enableMouseWheel: W,
322
+ autoCorrectParts: X,
323
+ autoSwitchParts: Y,
324
+ autoSwitchKeys: Z,
325
+ allowCaretMode: G
322
326
  }, I = /* @__PURE__ */ n.createElement(
323
- re,
327
+ ae,
324
328
  {
325
329
  onFocus: this.handleFocus,
326
330
  onBlur: this.handleBlur,
327
331
  onSyncFocus: this.props.onFocus,
328
332
  onSyncBlur: this.props.onBlur
329
333
  },
330
- ({ onFocus: J, onBlur: Q }) => /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(
334
+ ({ onFocus: $, onBlur: ee }) => /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(
331
335
  "div",
332
336
  {
333
- ref: ($) => {
334
- this._element = $;
337
+ ref: (te) => {
338
+ this._element = te;
335
339
  },
336
340
  className: S(
337
- D.wrapper({
341
+ T.wrapper({
338
342
  c: y,
339
343
  size: i,
340
344
  fillMode: s,
341
345
  rounded: t,
342
346
  disabled: l,
343
347
  required: this.required,
344
- invalid: !T
348
+ invalid: !D
345
349
  }),
346
- F
350
+ { "k-focus": this.state.focused },
351
+ A
347
352
  ),
348
353
  onKeyDown: this.handleKeyDown,
349
- style: { width: A },
350
- onFocus: this.mobileMode ? this.handleClick : J,
351
- onBlur: Q,
354
+ style: { width: N },
355
+ onFocus: this.mobileMode ? this.handleClick : $,
356
+ onBlur: ee,
352
357
  onClick: this.mobileMode ? this.handleClick : void 0
353
358
  },
354
359
  /* @__PURE__ */ n.createElement(
@@ -360,37 +365,37 @@ const a = class a extends n.Component {
360
365
  ariaHasPopup: "dialog",
361
366
  autoFocus: o,
362
367
  inputAttributes: h,
363
- ...G
368
+ ...Q
364
369
  }
365
370
  ),
366
371
  /* @__PURE__ */ n.createElement(
367
- de,
372
+ pe,
368
373
  {
369
374
  tabIndex: -1,
370
375
  type: "button",
371
376
  icon: "calendar",
372
- svgIcon: le,
377
+ svgIcon: de,
373
378
  onMouseDown: this.handleIconMouseDown,
374
379
  onClick: this.mobileMode ? void 0 : this.handleClick,
375
- title: m(this).toLanguageString(
376
- c,
377
- p[c]
380
+ title: p(this).toLanguageString(
381
+ m,
382
+ u[m]
378
383
  ),
379
- className: S(D.inputButton({ c: y })),
384
+ className: S(T.inputButton({ c: y })),
380
385
  fillMode: s,
381
- "aria-label": m(this).toLanguageString(
382
- c,
383
- p[c]
386
+ "aria-label": p(this).toLanguageString(
387
+ m,
388
+ u[m]
384
389
  )
385
390
  }
386
391
  ),
387
392
  /* @__PURE__ */ n.createElement(
388
- L,
393
+ U,
389
394
  {
390
395
  show: this.show,
391
396
  animate: this.element !== null,
392
397
  anchor: this.element,
393
- popupClass: S(D.popup({ c: y })),
398
+ popupClass: S(T.popup({ c: y })),
394
399
  id: this._popupId,
395
400
  anchorAlign: {
396
401
  horizontal: "left",
@@ -406,12 +411,12 @@ const a = class a extends n.Component {
406
411
  ), this.mobileMode && this.renderAdaptivePopup())
407
412
  );
408
413
  return this.props.label ? /* @__PURE__ */ n.createElement(
409
- we,
414
+ ye,
410
415
  {
411
416
  dateInput: this._dateInput,
412
417
  label: this.props.label,
413
- editorId: u,
414
- editorValid: T,
418
+ editorId: c,
419
+ editorValid: D,
415
420
  editorDisabled: this.props.disabled,
416
421
  children: I,
417
422
  style: { width: this.props.width }
@@ -487,6 +492,7 @@ a.displayName = "DateTimePicker", a.propTypes = {
487
492
  appendTo: e.any,
488
493
  popupClass: e.string
489
494
  }),
495
+ dateInput: e.elementType,
490
496
  show: e.bool,
491
497
  tabIndex: e.number,
492
498
  title: e.string,
@@ -509,32 +515,32 @@ a.displayName = "DateTimePicker", a.propTypes = {
509
515
  disabled: !1,
510
516
  format: "g",
511
517
  // general date and time pattern (short time): "M/d/y h:mm a" for en.
512
- max: pe,
513
- min: ue,
518
+ max: me,
519
+ min: ce,
514
520
  popupSettings: {},
515
521
  tabIndex: 0,
516
522
  weekNumber: !1,
517
523
  validityStyles: !0,
518
524
  cancelButton: !0,
519
- dateInput: he,
525
+ dateInput: ue,
520
526
  size: void 0,
521
527
  rounded: void 0,
522
528
  fillMode: void 0,
523
529
  autoFocus: !1
524
530
  };
525
531
  let f = a;
526
- const Se = ae(), De = te(
527
- ie(
528
- Se,
529
- se(
530
- oe(f)
532
+ const De = se(), Ie = ne(
533
+ re(
534
+ De,
535
+ le(
536
+ he(f)
531
537
  )
532
538
  )
533
539
  );
534
- De.displayName = "KendoReactDateTimePicker";
535
- fe(f);
540
+ Ie.displayName = "KendoReactDateTimePicker";
541
+ ve(f);
536
542
  export {
537
- De as DateTimePicker,
538
- Se as DateTimePickerPropsContext,
543
+ Ie as DateTimePicker,
544
+ De as DateTimePickerPropsContext,
539
545
  f as DateTimePickerWithoutContext
540
546
  };