@progress/kendo-react-dateinputs 7.0.2-develop.1 → 7.0.2-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.
package/index.mjs CHANGED
@@ -4,8 +4,8 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use client";
6
6
  import * as o from "react";
7
- import * as n from "prop-types";
8
- import { classNames as P, canUseDOM as J, createPropsContext as Dt, withIdHOC as yt, withPropsContext as St, Keys as C, validatePackage as Pt, setScrollbarWidth as fs, getActiveElement as ot, AsyncFocusBlur as we, kendoThemeMaps as mt, noop as Rs, IconWrap as ei } from "@progress/kendo-react-common";
7
+ import n from "prop-types";
8
+ import { classNames as P, canUseDOM as J, createPropsContext as Dt, withIdHOC as yt, withPropsContext as St, Keys as C, validatePackage as Pt, setScrollbarWidth as fs, getActiveElement as lt, AsyncFocusBlur as we, kendoThemeMaps as mt, noop as Rs, IconWrap as ei } from "@progress/kendo-react-common";
9
9
  import { getDate as x, cloneDate as v, addDecades as it, addCenturies as qt, firstDecadeOfCentury as oe, lastDecadeOfCentury as He, firstYearOfDecade as st, durationInCenturies as se, addYears as nt, lastYearOfDecade as Ae, durationInDecades as ie, addDays as Wt, addWeeks as gs, addMonths as $, firstDayOfMonth as fe, lastDayOfMonth as Ot, dayOfWeek as si, durationInMonths as ne, firstMonthOfYear as Ns, lastMonthOfYear as _s, createDate as le, durationInYears as ae, weekInYear as ii, isEqualDate as wt, isEqual as ht } from "@progress/kendo-date-math";
10
10
  import { registerForIntl as ft, provideIntlService as ct, registerForLocalization as at, provideLocalizationService as q } from "@progress/kendo-react-intl";
11
11
  import { Button as N, ButtonGroup as ni } from "@progress/kendo-react-buttons";
@@ -17,7 +17,7 @@ const Rt = {
17
17
  name: "@progress/kendo-react-dateinputs",
18
18
  productName: "KendoReact",
19
19
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
20
- publishDate: 1702480052,
20
+ publishDate: 1702640739,
21
21
  version: "",
22
22
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"
23
23
  }, pi = (s, t, e) => [
@@ -2415,7 +2415,7 @@ const X = {
2415
2415
  this.kendoDate.setValue(e), this.triggerChange(t, i);
2416
2416
  }, this.spinnersMouseDown = (t) => {
2417
2417
  t.preventDefault();
2418
- const e = ot(document);
2418
+ const e = lt(document);
2419
2419
  this.element && e !== this.element && this.element.focus({ preventScroll: !0 });
2420
2420
  }, this.handlePaste = () => {
2421
2421
  this.paste = !0;
@@ -2441,9 +2441,9 @@ const X = {
2441
2441
  }, this.elementClick = (t) => {
2442
2442
  this.setSelection(this.selectionByIndex(this.selection.start));
2443
2443
  }, this.nativeWheel = (t) => {
2444
- ot(document) === this.element && t.preventDefault();
2444
+ lt(document) === this.element && t.preventDefault();
2445
2445
  }, this.wheel = (t) => {
2446
- ot(document) === this.element && (t.nativeEvent.deltaY < 0 && this.increasePart(t), t.nativeEvent.deltaY > 0 && this.decreasePart(t));
2446
+ lt(document) === this.element && (t.nativeEvent.deltaY < 0 && this.increasePart(t), t.nativeEvent.deltaY > 0 && this.decreasePart(t));
2447
2447
  }, this.increasePart = (t) => {
2448
2448
  this.modifyDateSegmentValue(1, t);
2449
2449
  }, this.decreasePart = (t) => {
@@ -2720,7 +2720,7 @@ const X = {
2720
2720
  }
2721
2721
  setSelection(s) {
2722
2722
  this._lastSelectedSymbol = this.currentFormat[s.start], window.requestAnimationFrame(() => {
2723
- const t = ot(document);
2723
+ const t = lt(document);
2724
2724
  this.element && t === this.element && !this.props.disableSelection && this.element.setSelectionRange(s.start, s.end);
2725
2725
  });
2726
2726
  }
@@ -3788,7 +3788,7 @@ const ta = 2, Ms = 0.05, ea = 100, sa = 0, Ts = 9, ia = {
3788
3788
  }, this.handleMouseOver = () => {
3789
3789
  if (!this._element)
3790
3790
  return;
3791
- const t = ot(document);
3791
+ const t = lt(document);
3792
3792
  document && t !== this._element && this.props.show && this._element.focus({ preventScroll: !0 });
3793
3793
  }, this.handleKeyDown = (t) => {
3794
3794
  if (!this.service)
@@ -4124,7 +4124,7 @@ const Fe = new RegExp(`${X.hour}|${X.minute}|${X.second}|${X.dayperiod}|literal`
4124
4124
  clearTimeout(this.nextTickId), this.nextTickId = window.setTimeout(() => s());
4125
4125
  }
4126
4126
  hasActiveButton() {
4127
- const s = ot(document);
4127
+ const s = lt(document);
4128
4128
  return this._nowButton && s === this._nowButton.element;
4129
4129
  }
4130
4130
  hasSteps() {
@@ -4349,7 +4349,7 @@ const ss = class extends o.Component {
4349
4349
  hasActiveButton() {
4350
4350
  if (!this._acceptButton || !this._acceptButton.element)
4351
4351
  return !1;
4352
- const s = ot(document);
4352
+ const s = lt(document);
4353
4353
  return this._acceptButton && s === this._acceptButton.element || this._cancelButton && s === this._cancelButton.element;
4354
4354
  }
4355
4355
  };
@@ -4956,7 +4956,7 @@ Bt.defaultProps = {
4956
4956
  min: ut,
4957
4957
  max: dt
4958
4958
  };
4959
- const Le = (s = lt.defaultProps.min, t = lt.defaultProps.max, e) => e instanceof Date && !Array.isArray(e) && F(x(e), s, t) ? x(e) : null, Vs = (s = lt.defaultProps.min, t = lt.defaultProps.max, e) => Array.isArray(e) ? e.filter((i) => F(i, s, t)).map((i) => x(i)) : null, Os = (s) => typeof s == "object" && !(s instanceof Date) && s !== null && !Array.isArray(s) ? s : z, Ps = (s, t, e) => s || t && t[0] || e && e.start, ra = (s, t) => s.start === null && t === null ? "start" : s.end === null ? "end" : "start", Et = class extends o.Component {
4959
+ const Le = (s = ot.defaultProps.min, t = ot.defaultProps.max, e) => e instanceof Date && !Array.isArray(e) && F(x(e), s, t) ? x(e) : null, Vs = (s = ot.defaultProps.min, t = ot.defaultProps.max, e) => Array.isArray(e) ? e.filter((i) => F(i, s, t)).map((i) => x(i)) : null, Os = (s) => typeof s == "object" && !(s instanceof Date) && s !== null && !Array.isArray(s) ? s : z, Ps = (s, t, e) => s || t && t[0] || e && e.start, ra = (s, t) => s.start === null && t === null ? "start" : s.end === null ? "end" : "start", Et = class extends o.Component {
4960
4960
  constructor(s) {
4961
4961
  super(s), this.dates = [], this.selectedDate = null, this.selectedMultiple = null, this.selectedRange = z, this._focusedDate = /* @__PURE__ */ new Date(), this.cellUID = this.props.id + "-cell-uid", this.activeRangeEnd = "start", this._element = null, this.intl = null, this.localization = null, this.service = null, this.calendarViewList = null, this.isActive = !1, this.calculateFocusFromValue = !0, this.focus = () => {
4962
4962
  this._element && this._element.focus();
@@ -5289,9 +5289,9 @@ const Le = (s = lt.defaultProps.min, t = lt.defaultProps.max, e) => e instanceof
5289
5289
  return !!t && fe(t) <= s && s <= Ot(t);
5290
5290
  }
5291
5291
  };
5292
- let lt = Et;
5293
- lt.displayName = "MultiViewCalendar";
5294
- lt.propTypes = {
5292
+ let ot = Et;
5293
+ ot.displayName = "MultiViewCalendar";
5294
+ ot.propTypes = {
5295
5295
  activeRangeEnd: n.oneOf(["start", "end"]),
5296
5296
  allowReverse: n.bool,
5297
5297
  bottomView: n.oneOf(["month", "year", "decade", "century"]),
@@ -5335,7 +5335,7 @@ lt.propTypes = {
5335
5335
  weekNumber: n.bool,
5336
5336
  dir: n.string
5337
5337
  };
5338
- lt.defaultProps = {
5338
+ ot.defaultProps = {
5339
5339
  disabled: !1,
5340
5340
  min: ut,
5341
5341
  max: dt,
@@ -5348,10 +5348,10 @@ lt.defaultProps = {
5348
5348
  views: 2,
5349
5349
  allowReverse: !1
5350
5350
  };
5351
- const oa = Dt(), Qs = yt(St(oa, lt));
5351
+ const oa = Dt(), Qs = yt(St(oa, ot));
5352
5352
  Qs.displayName = "KendoReactMultiViewCalendar";
5353
- ft(lt);
5354
- at(lt);
5353
+ ft(ot);
5354
+ at(ot);
5355
5355
  const zt = class extends o.Component {
5356
5356
  constructor(s) {
5357
5357
  super(s), this._element = null, this._calendar = null, this._startDateInput = o.createRef(), this._endDateInput = o.createRef(), this.shouldFocusDateInput = !1, this.shouldFocusCalendar = !1, this.focus = () => {
@@ -5420,9 +5420,11 @@ const zt = class extends o.Component {
5420
5420
  }, this.handleReverseMouseDown = (t) => {
5421
5421
  t.preventDefault();
5422
5422
  }, this.handleFocus = (t) => {
5423
- clearTimeout(this.nextTickId), this.shouldFocusDateInput || (this.setShow(!0), this.mobileMode && this.setState({ currentValue: this.value }));
5423
+ clearTimeout(this.nextTickId), this.shouldFocusDateInput || this.mobileMode && this.setState({ currentValue: this.value });
5424
5424
  const { onFocus: e } = this.props;
5425
5425
  e && e.call(void 0, t);
5426
+ }, this.handleClick = () => {
5427
+ this.shouldFocusDateInput || this.setShow(!0);
5426
5428
  }, this.handleBlur = (t) => {
5427
5429
  this.nextTick(() => {
5428
5430
  this.setShow(!1);
@@ -5459,8 +5461,8 @@ const zt = class extends o.Component {
5459
5461
  const e = this.extractRangeFromValue(t);
5460
5462
  this.handleChange(e, t);
5461
5463
  }, this.handleKeyDown = (t) => {
5462
- const { keyCode: e, altKey: i } = t, a = ot(document);
5463
- e === C.esc ? (t.preventDefault(), this.shouldFocusDateInput = !0, this.setShow(!1)) : i && e === C.down ? (t.preventDefault(), this.shouldFocusCalendar = !0, this.setShow(!0)) : e === C.tab && this.show && this._calendar && this._calendar.element && this.endDateInput && this.endDateInput.element && document && a === this.endDateInput.element && (t.preventDefault(), this.focusCalendarElement());
5464
+ const { keyCode: e, altKey: i } = t;
5465
+ e === C.esc ? (t.preventDefault(), this.shouldFocusDateInput = !0, this.setShow(!1)) : i && e === C.down ? (t.preventDefault(), this.shouldFocusCalendar = !0, this.setShow(!0), this.focusCalendarElement()) : i && e === C.up && (t.preventDefault(), this.shouldFocusDateInput = !0, this.setShow(!1));
5464
5466
  }, this.handleChange = (t, e) => {
5465
5467
  this.setState({ value: t }), this.valueDuringOnChange = t;
5466
5468
  const { onChange: i } = this.props;
@@ -5630,8 +5632,9 @@ const zt = class extends o.Component {
5630
5632
  "aria-describedby": this.props.ariaDescribedBy,
5631
5633
  tabIndex: this.props.tabIndex,
5632
5634
  onFocus: this.handleFocus,
5633
- onBlur: this.mobileMode ? void 0 : this.handleBlur,
5635
+ onClick: this.handleClick,
5634
5636
  onKeyDown: this.handleKeyDown,
5637
+ onBlur: this.mobileMode ? void 0 : this.handleBlur,
5635
5638
  dir: this.props.dir
5636
5639
  },
5637
5640
  this.props.startDateInput ? /* @__PURE__ */ o.createElement(this.props.startDateInput, { ...h }) : /* @__PURE__ */ o.createElement(
@@ -5661,7 +5664,7 @@ const zt = class extends o.Component {
5661
5664
  focusDateInputElement() {
5662
5665
  if (!document || !this.startDateInput || !this.startDateInput.element || !this.endDateInput || !this.endDateInput.element)
5663
5666
  return;
5664
- const s = ot(document);
5667
+ const s = lt(document);
5665
5668
  (this.value.start === null || this.value.end !== null) && s !== this.endDateInput.element ? this.startDateInput.element.focus({ preventScroll: !0 }) : s !== this.startDateInput.element && this.endDateInput.element.focus({ preventScroll: !0 });
5666
5669
  }
5667
5670
  nextTick(s) {
@@ -5961,7 +5964,7 @@ class ms extends o.Component {
5961
5964
  hasActiveButton() {
5962
5965
  if (!this._acceptButton)
5963
5966
  return !1;
5964
- const t = ot(document);
5967
+ const t = lt(document);
5965
5968
  return this._acceptButton && t === this._acceptButton.element || this._cancelButton && t === this._cancelButton.element;
5966
5969
  }
5967
5970
  mergeTime(t, e) {
@@ -6460,7 +6463,7 @@ export {
6460
6463
  Ai as MonthViewService,
6461
6464
  Qs as MultiViewCalendar,
6462
6465
  oa as MultiViewCalendarPropsContext,
6463
- lt as MultiViewCalendarWithoutContext,
6466
+ ot as MultiViewCalendarWithoutContext,
6464
6467
  qs as NavigationService,
6465
6468
  Vn as PickerWrap,
6466
6469
  Ji as ScrollSyncService,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-dateinputs",
3
- "version": "7.0.2-develop.1",
3
+ "version": "7.0.2-develop.3",
4
4
  "description": "React DateInput is a perfect input component for handling quick and efficient date values. KendoReact Date Inputs package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -10,20 +10,26 @@
10
10
  "types": "./index.d.ts",
11
11
  "exports": {
12
12
  ".": {
13
- "import": "./index.mjs",
14
- "require": "./index.js"
13
+ "import": {
14
+ "types": "./index.d.mts",
15
+ "default": "./index.mjs"
16
+ },
17
+ "require": {
18
+ "types": "./index.d.ts",
19
+ "default": "./index.js"
20
+ }
15
21
  }
16
22
  },
17
23
  "sideEffects": false,
18
24
  "peerDependencies": {
19
25
  "@progress/kendo-date-math": "^1.4.0",
20
- "@progress/kendo-licensing": "^1.3.0",
21
- "@progress/kendo-react-buttons": "7.0.2-develop.1",
22
- "@progress/kendo-react-common": "7.0.2-develop.1",
23
- "@progress/kendo-react-intl": "7.0.2-develop.1",
24
- "@progress/kendo-react-labels": "7.0.2-develop.1",
25
- "@progress/kendo-react-layout": "7.0.2-develop.1",
26
- "@progress/kendo-react-popup": "7.0.2-develop.1",
26
+ "@progress/kendo-licensing": "^1.3.4",
27
+ "@progress/kendo-react-buttons": "7.0.2-develop.3",
28
+ "@progress/kendo-react-common": "7.0.2-develop.3",
29
+ "@progress/kendo-react-intl": "7.0.2-develop.3",
30
+ "@progress/kendo-react-labels": "7.0.2-develop.3",
31
+ "@progress/kendo-react-layout": "7.0.2-develop.3",
32
+ "@progress/kendo-react-popup": "7.0.2-develop.3",
27
33
  "@progress/kendo-svg-icons": "^2.0.0",
28
34
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0",
29
35
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
@@ -3,7 +3,7 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as React from 'react';
6
- import * as PropTypes from 'prop-types';
6
+ import PropTypes from 'prop-types';
7
7
  import { DateFormatPart } from '@progress/kendo-react-intl';
8
8
  import { ListServiceSettings } from './models';
9
9
  import { DOMService } from './services';
@@ -3,7 +3,7 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as React from 'react';
6
- import * as PropTypes from 'prop-types';
6
+ import PropTypes from 'prop-types';
7
7
  import { DateFormatPart, IntlService, DateFormatOptions } from '@progress/kendo-react-intl';
8
8
  import { TimePickerIncrementalSteps } from './models/IncrementalSteps';
9
9
  /**
@@ -3,7 +3,7 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as React from 'react';
6
- import * as PropTypes from 'prop-types';
6
+ import PropTypes from 'prop-types';
7
7
  import { FormComponent, FormComponentProps, FormComponentValidity } from '@progress/kendo-react-common';
8
8
  import { LocalizationService } from '@progress/kendo-react-intl';
9
9
  import { DateInput, DateInputProps } from '../dateinput/DateInput';
@@ -3,7 +3,7 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as React from 'react';
6
- import * as PropTypes from 'prop-types';
6
+ import PropTypes from 'prop-types';
7
7
  import { IntlService, DateFormatOptions } from '@progress/kendo-react-intl';
8
8
  import { TimePickerIncrementalSteps } from './models/IncrementalSteps';
9
9
  /**
@@ -3,7 +3,7 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as React from 'react';
6
- import * as PropTypes from 'prop-types';
6
+ import PropTypes from 'prop-types';
7
7
  import { ScrollAction, PageAction } from './services';
8
8
  /**
9
9
  * @hidden