@progress/kendo-react-dateinputs 7.0.3-develop.9 → 7.1.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.
package/index.mjs CHANGED
@@ -5,9 +5,9 @@
5
5
  "use client";
6
6
  import * as r from "react";
7
7
  import n from "prop-types";
8
- import { classNames as P, canUseDOM as J, createPropsContext as kt, withIdHOC as yt, withPropsContext as St, Keys as k, 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
- import { getDate as C, cloneDate as v, addDecades as it, addCenturies as qt, firstDecadeOfCentury as re, lastDecadeOfCentury as He, firstYearOfDecade as st, durationInCenturies as se, addYears as nt, lastYearOfDecade as Be, 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
- import { registerForIntl as ft, provideIntlService as ct, registerForLocalization as at, provideLocalizationService as W } from "@progress/kendo-react-intl";
8
+ import { classNames as P, canUseDOM as J, createPropsContext as kt, withIdHOC as yt, withPropsContext as St, Keys as k, validatePackage as Pt, setScrollbarWidth as fs, getActiveElement as lt, AsyncFocusBlur as we, kendoThemeMaps as ft, noop as Rs, IconWrap as ei } from "@progress/kendo-react-common";
9
+ import { getDate as C, cloneDate as v, addDecades as it, addCenturies as qt, firstDecadeOfCentury as re, lastDecadeOfCentury as He, firstYearOfDecade as st, durationInCenturies as se, addYears as nt, lastYearOfDecade as Be, 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 mt, isEqual as ht } from "@progress/kendo-date-math";
10
+ import { registerForIntl as gt, provideIntlService as ct, registerForLocalization as at, provideLocalizationService as W } from "@progress/kendo-react-intl";
11
11
  import { Button as N, ButtonGroup as ni } from "@progress/kendo-react-buttons";
12
12
  import { caretAltUpIcon as ai, caretAltDownIcon as oi, xIcon as ri, calendarIcon as Fs, clockIcon as li, chevronRightIcon as vs, chevronLeftIcon as ws, arrowsSwapIcon as hi } from "@progress/kendo-svg-icons";
13
13
  import { FloatingLabel as Ls } from "@progress/kendo-react-labels";
@@ -17,7 +17,7 @@ const Rt = {
17
17
  name: "@progress/kendo-react-dateinputs",
18
18
  productName: "KendoReact",
19
19
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
20
- publishDate: 1704453868,
20
+ publishDate: 1705398495,
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) => [
@@ -1056,7 +1056,7 @@ let ji = class {
1056
1056
  }, g = (D) => D.querySelector(".k-scrollable"), B = (D) => {
1057
1057
  const _ = g(D);
1058
1058
  return _.className = `${_.className} k-scrollable-horizontal`, D;
1059
- }, V = E({ cells: 7, rows: 6 }, "k-calendar-view k-calendar-monthview k-vstack", !0), R = E({ cells: 5, rows: 3 }, "k-calendar-view k-calendar-yearview", !1), A = E({ cells: 5, rows: 2 }, "k-calendar-view k-calendar-decadeview", !1), x = () => B(V()), O = () => B(R()), tt = () => B(A()), j = (D) => parseFloat(window.getComputedStyle(D).height) || D.offsetHeight, gt = (D) => {
1059
+ }, V = E({ cells: 7, rows: 6 }, "k-calendar-view k-calendar-monthview k-vstack", !0), R = E({ cells: 5, rows: 3 }, "k-calendar-view k-calendar-yearview", !1), A = E({ cells: 5, rows: 2 }, "k-calendar-view k-calendar-decadeview", !1), x = () => B(V()), O = () => B(R()), tt = () => B(A()), j = (D) => parseFloat(window.getComputedStyle(D).height) || D.offsetHeight, vt = (D) => {
1060
1060
  const _ = window.getComputedStyle(D);
1061
1061
  return parseFloat(_.width) + parseFloat(_.paddingLeft) + parseFloat(_.paddingRight) || D.offsetWidth;
1062
1062
  }, It = (D) => D.querySelector("tbody");
@@ -1065,15 +1065,15 @@ let ji = class {
1065
1065
  this.calendarHeight = j(D), this.monthViewHeight = j(_), this.headerHeight = j(_.children[0]), this.scrollableContentHeight = j(g(D));
1066
1066
  }), this.batch(x(), (D) => {
1067
1067
  const _ = It(D);
1068
- this.calendarWidth = gt(D), this.monthViewWidth = gt(_), this.scrollableContentWidth = gt(g(D));
1068
+ this.calendarWidth = vt(D), this.monthViewWidth = vt(_), this.scrollableContentWidth = vt(g(D));
1069
1069
  }), this.batch(R(), (D) => {
1070
1070
  this.yearViewHeight = j(It(D)), this.scrollableYearContentHeight = j(g(D));
1071
1071
  }), this.batch(O(), (D) => {
1072
- this.yearViewWidth = gt(It(D));
1072
+ this.yearViewWidth = vt(It(D));
1073
1073
  }), this.batch(A(), (D) => {
1074
1074
  this.decadeViewHeight = j(It(D)), this.centuryViewHeight = this.decadeViewHeight;
1075
1075
  }), this.batch(tt(), (D) => {
1076
- this.decadeViewWidth = gt(It(D)), this.centuryViewWidth = this.decadeViewWidth;
1076
+ this.decadeViewWidth = vt(It(D)), this.centuryViewWidth = this.decadeViewWidth;
1077
1077
  }), this.batch(w(), (D) => {
1078
1078
  this.navigationItemHeight = j(D.querySelector("li"));
1079
1079
  });
@@ -1312,7 +1312,7 @@ jt.defaultProps = {
1312
1312
  selectedDate: H(),
1313
1313
  showWeekNumbers: !1
1314
1314
  };
1315
- ft(jt);
1315
+ gt(jt);
1316
1316
  class tn extends r.PureComponent {
1317
1317
  /**
1318
1318
  * @return
@@ -1587,7 +1587,7 @@ const en = 5, Us = class extends r.Component {
1587
1587
  render() {
1588
1588
  this.calculateHeights();
1589
1589
  const s = this.lastView !== this.props.activeView, t = K(this.props.focusedDate, this.props.min, this.props.max), e = s ? this.props.service.skip(t, this.props.min) : this.state.skip, i = this.props.service.total(this.props.min, this.props.max), a = this.getTake(e, i), o = this.props.service.addToDate(this.props.min, e), l = this.props.service.addToDate(this.props.min, this.state.index), c = new Array(this.props.service.rowLength(this.weekNumber)).fill(""), h = this.props.activeView !== this.lastView;
1590
- this.animateToIndex = !h, (h || !wt(this.lastFocus, t) || this.shouldScroll || !this.props.shouldScroll || this.props.shouldScroll()) && (this.indexToScroll = this.props.service.skip(t, this.props.min)), this.lastFocus = t;
1590
+ this.animateToIndex = !h, (h || !mt(this.lastFocus, t) || this.shouldScroll || !this.props.shouldScroll || this.props.shouldScroll()) && (this.indexToScroll = this.props.service.skip(t, this.props.min)), this.lastFocus = t;
1591
1591
  const u = P(
1592
1592
  "k-calendar-view k-vstack",
1593
1593
  {
@@ -1671,7 +1671,7 @@ ye.defaultProps = {
1671
1671
  showWeekNumbers: !1,
1672
1672
  smoothScroll: !0
1673
1673
  };
1674
- ft(ye);
1674
+ gt(ye);
1675
1675
  class sn extends r.Component {
1676
1676
  constructor() {
1677
1677
  super(...arguments), this.handleClick = (t) => {
@@ -1853,7 +1853,7 @@ const Re = (s) => s ? s.virtualization : null, Ds = (s = bt.defaultProps.min, t
1853
1853
  this.setState({ focusedDate: u });
1854
1854
  }
1855
1855
  if (a === k.enter) {
1856
- if (this.value !== null && wt(this.focusedDate, this.value)) {
1856
+ if (this.value !== null && mt(this.focusedDate, this.value)) {
1857
1857
  const h = K(this.focusedDate, this.min, this.max);
1858
1858
  Re(this.calendarViewList).scrollToIndex(this.service.skip(h, this.min));
1859
1859
  }
@@ -1876,7 +1876,7 @@ const Re = (s) => s ? s.virtualization : null, Ds = (s = bt.defaultProps.min, t
1876
1876
  this.min,
1877
1877
  this.max
1878
1878
  );
1879
- if (wt(this.focusedDate, c))
1879
+ if (mt(this.focusedDate, c))
1880
1880
  return;
1881
1881
  this.setState({ focusedDate: c });
1882
1882
  }
@@ -1956,7 +1956,7 @@ const Re = (s) => s ? s.virtualization : null, Ds = (s = bt.defaultProps.min, t
1956
1956
  */
1957
1957
  render() {
1958
1958
  this.props._ref && this.props._ref(this);
1959
- const s = this.value !== null && this.oldValue !== null ? !wt(this.value, this.oldValue) : this.value !== this.oldValue, t = ge(
1959
+ const s = this.value !== null && this.oldValue !== null ? !mt(this.value, this.oldValue) : this.value !== this.oldValue, t = ge(
1960
1960
  this.state.activeView,
1961
1961
  y[this.props.bottomView !== void 0 ? this.props.bottomView : pt.defaultProps.bottomView],
1962
1962
  y[this.props.topView !== void 0 ? this.props.topView : pt.defaultProps.topView]
@@ -2091,7 +2091,7 @@ bt.defaultProps = {
2091
2091
  };
2092
2092
  const an = kt(), as = yt(St(an, bt));
2093
2093
  as.displayName = "KendoReactCalendar";
2094
- ft(bt);
2094
+ gt(bt);
2095
2095
  class on {
2096
2096
  constructor() {
2097
2097
  this.symbols = "", this.partMap = [];
@@ -2529,9 +2529,9 @@ const X = {
2529
2529
  "k-dateinput",
2530
2530
  "k-input",
2531
2531
  {
2532
- [`k-input-${mt.sizeMap[s] || s}`]: s,
2532
+ [`k-input-${ft.sizeMap[s] || s}`]: s,
2533
2533
  [`k-input-${t}`]: t,
2534
- [`k-rounded-${mt.roundedMap[e] || e}`]: e,
2534
+ [`k-rounded-${ft.roundedMap[e] || e}`]: e,
2535
2535
  "k-invalid": !f,
2536
2536
  "k-required": this.required,
2537
2537
  "k-disabled": this.props.disabled
@@ -2883,7 +2883,7 @@ Ct.defaultProps = {
2883
2883
  };
2884
2884
  const Tn = kt(), Dt = yt(St(Tn, Ct));
2885
2885
  Dt.displayName = "KendoReactDateInput";
2886
- ft(Ct);
2886
+ gt(Ct);
2887
2887
  at(Ct);
2888
2888
  const En = N, Vn = r.forwardRef((s, t) => {
2889
2889
  const { _ref: e } = s, i = r.useRef(null);
@@ -3236,15 +3236,15 @@ const En = N, Vn = r.forwardRef((s, t) => {
3236
3236
  ({ onFocus: tt, onBlur: j }) => /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(
3237
3237
  "span",
3238
3238
  {
3239
- ref: (gt) => {
3240
- this._element = gt;
3239
+ ref: (vt) => {
3240
+ this._element = vt;
3241
3241
  },
3242
3242
  className: P(
3243
3243
  "k-input",
3244
3244
  "k-datepicker",
3245
3245
  {
3246
- [`k-input-${mt.sizeMap[s] || s}`]: s,
3247
- [`k-rounded-${mt.roundedMap[t] || t}`]: t,
3246
+ [`k-input-${ft.sizeMap[s] || s}`]: s,
3247
+ [`k-rounded-${ft.roundedMap[t] || t}`]: t,
3248
3248
  [`k-input-${e}`]: e,
3249
3249
  ["k-invalid"]: !R,
3250
3250
  ["k-required"]: this.required,
@@ -3945,8 +3945,8 @@ Ce.defaultProps = {
3945
3945
  step: 1,
3946
3946
  smoothScroll: !0
3947
3947
  };
3948
- ft(Ce);
3949
- const Fe = new RegExp(`${X.hour}|${X.minute}|${X.second}|${X.dayperiod}|literal`), vt = class extends r.Component {
3948
+ gt(Ce);
3949
+ const Fe = new RegExp(`${X.hour}|${X.minute}|${X.second}|${X.dayperiod}|literal`), wt = class extends r.Component {
3950
3950
  constructor(s) {
3951
3951
  super(s), this._element = null, this._nowButton = null, this.dateFormatParts = [], this.timeLists = [], this.focus = (t, e) => {
3952
3952
  Promise.resolve().then(() => {
@@ -3992,7 +3992,7 @@ const Fe = new RegExp(`${X.hour}|${X.minute}|${X.second}|${X.dayperiod}|literal`
3992
3992
  const { onChange: e } = this.props;
3993
3993
  e && e.call(void 0, t);
3994
3994
  }, this.snapTime = ys(
3995
- ks(this.props.steps, this.props.min || vt.defaultProps.min)
3995
+ ks(this.props.steps, this.props.min || wt.defaultProps.min)
3996
3996
  ), this.state = {
3997
3997
  activeListIndex: -1
3998
3998
  }, this.hasActiveButton = this.hasActiveButton.bind(this);
@@ -4014,16 +4014,16 @@ const Fe = new RegExp(`${X.hour}|${X.minute}|${X.second}|${X.dayperiod}|literal`
4014
4014
  return ct(this);
4015
4015
  }
4016
4016
  get min() {
4017
- return this.snapTime(this.props.min || vt.defaultProps.min);
4017
+ return this.snapTime(this.props.min || wt.defaultProps.min);
4018
4018
  }
4019
4019
  get max() {
4020
- return this.snapTime(this.props.max || vt.defaultProps.max);
4020
+ return this.snapTime(this.props.max || wt.defaultProps.max);
4021
4021
  }
4022
4022
  get steps() {
4023
- return this.props.steps || vt.defaultProps.steps;
4023
+ return this.props.steps || wt.defaultProps.steps;
4024
4024
  }
4025
4025
  get boundRange() {
4026
- return this.props.boundRange !== void 0 ? this.props.boundRange : vt.defaultProps.boundRange;
4026
+ return this.props.boundRange !== void 0 ? this.props.boundRange : wt.defaultProps.boundRange;
4027
4027
  }
4028
4028
  /**
4029
4029
  * @hidden
@@ -4049,7 +4049,7 @@ const Fe = new RegExp(`${X.hour}|${X.minute}|${X.second}|${X.dayperiod}|literal`
4049
4049
  show: l,
4050
4050
  onNowKeyDown: c
4051
4051
  } = this.props;
4052
- this.snapTime = ys(ks(this.steps, this.min)), this.dateFormatParts = this.intl.splitDateFormat(s || vt.defaultProps.format).filter(this.timeFormatFilter);
4052
+ this.snapTime = ys(ks(this.steps, this.min)), this.dateFormatParts = this.intl.splitDateFormat(s || wt.defaultProps.format).filter(this.timeFormatFilter);
4053
4053
  const h = P(
4054
4054
  {
4055
4055
  "k-disabled": a,
@@ -4142,7 +4142,7 @@ const Fe = new RegExp(`${X.hour}|${X.minute}|${X.second}|${X.dayperiod}|literal`
4142
4142
  return s.length !== s.reduce((t, e) => t + this.steps[e], 0);
4143
4143
  }
4144
4144
  };
4145
- let _t = vt;
4145
+ let _t = wt;
4146
4146
  _t.propTypes = {
4147
4147
  cancelButton: n.bool,
4148
4148
  disabled: n.bool,
@@ -4190,7 +4190,7 @@ _t.defaultProps = {
4190
4190
  steps: {},
4191
4191
  boundRange: !1
4192
4192
  };
4193
- ft(_t);
4193
+ gt(_t);
4194
4194
  at(_t);
4195
4195
  const ss = class extends r.Component {
4196
4196
  constructor(s) {
@@ -4420,7 +4420,7 @@ Jt.defaultProps = {
4420
4420
  boundRange: !1,
4421
4421
  footer: !0
4422
4422
  };
4423
- ft(Jt);
4423
+ gt(Jt);
4424
4424
  at(Jt);
4425
4425
  const G = class extends r.Component {
4426
4426
  constructor(s) {
@@ -4708,8 +4708,8 @@ const G = class extends r.Component {
4708
4708
  "k-input",
4709
4709
  "k-timepicker",
4710
4710
  {
4711
- [`k-input-${mt.sizeMap[s] || s}`]: s,
4712
- [`k-rounded-${mt.roundedMap[t] || t}`]: t,
4711
+ [`k-input-${ft.sizeMap[s] || s}`]: s,
4712
+ [`k-rounded-${ft.roundedMap[t] || t}`]: t,
4713
4713
  [`k-input-${e}`]: e,
4714
4714
  ["k-invalid"]: !E,
4715
4715
  ["k-required"]: this.required,
@@ -5055,7 +5055,7 @@ const Le = (s = rt.defaultProps.min, t = rt.defaultProps.max, e) => e instanceof
5055
5055
  this.min,
5056
5056
  this.max
5057
5057
  );
5058
- if (wt(this.focusedDate, m))
5058
+ if (mt(this.focusedDate, m))
5059
5059
  return;
5060
5060
  this.dates && this.service && !this.service.isInArray(m, this.dates) && this.setState({ navigateDate: m }), this.calculateFocusFromValue = !1, this.setState({ focusedDate: m });
5061
5061
  }
@@ -5084,7 +5084,7 @@ const Le = (s = rt.defaultProps.min, t = rt.defaultProps.max, e) => e instanceof
5084
5084
  const m = this.selectedMultiple.slice();
5085
5085
  let S = -1;
5086
5086
  m.forEach((I, M) => {
5087
- wt(I, h.value) && (S = M);
5087
+ mt(I, h.value) && (S = M);
5088
5088
  }), S !== -1 ? m.splice(S, 1) : m.push(v(h.value)), p = m.slice();
5089
5089
  } else
5090
5090
  this.selectedDate ? p = [v(this.selectedDate), v(h.value)] : p = [v(h.value)];
@@ -5373,7 +5373,7 @@ rt.defaultProps = {
5373
5373
  };
5374
5374
  const ra = kt(), Qs = yt(St(ra, rt));
5375
5375
  Qs.displayName = "KendoReactMultiViewCalendar";
5376
- ft(rt);
5376
+ gt(rt);
5377
5377
  at(rt);
5378
5378
  const zt = class extends r.Component {
5379
5379
  constructor(s) {
@@ -5907,7 +5907,7 @@ class ms extends r.Component {
5907
5907
  componentDidUpdate(t, e) {
5908
5908
  var i, a;
5909
5909
  this.shouldFocusPart && this.focus({ preventScroll: !0 }), (((i = t.value) == null ? void 0 : i.getTime()) !== ((a = this.props.value) == null ? void 0 : a.getTime()) || this.state.tab !== e.tab && this.props.value) && this.setState({
5910
- dateValue: this.props.value,
5910
+ dateValue: t.value && this.props.value && mt(t.value, this.props.value) ? this.state.dateValue : this.props.value,
5911
5911
  timeValue: this.props.value || L
5912
5912
  }), this.shouldFocusPart = !1;
5913
5913
  }
@@ -6007,7 +6007,7 @@ class ms extends r.Component {
6007
6007
  return this.props.maxTime !== void 0 ? this.props.maxTime : this.normalizeRange(this.props.max, this.state.dateValue);
6008
6008
  }
6009
6009
  normalizeRange(t, e) {
6010
- return wt(t, e || H()) ? t : null;
6010
+ return mt(t, e || H()) ? t : null;
6011
6011
  }
6012
6012
  hasActiveButton() {
6013
6013
  if (!this._acceptButton)
@@ -6295,8 +6295,8 @@ const et = class extends r.Component {
6295
6295
  "k-input",
6296
6296
  "k-datetimepicker",
6297
6297
  {
6298
- [`k-input-${mt.sizeMap[s] || s}`]: s,
6299
- [`k-rounded-${mt.roundedMap[t] || t}`]: t,
6298
+ [`k-input-${ft.sizeMap[s] || s}`]: s,
6299
+ [`k-rounded-${ft.roundedMap[t] || t}`]: t,
6300
6300
  [`k-input-${e}`]: e,
6301
6301
  "k-invalid": !R,
6302
6302
  "k-required": this.required,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-dateinputs",
3
- "version": "7.0.3-develop.9",
3
+ "version": "7.1.0-develop.2",
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",
@@ -24,12 +24,12 @@
24
24
  "peerDependencies": {
25
25
  "@progress/kendo-date-math": "^1.4.0",
26
26
  "@progress/kendo-licensing": "^1.3.4",
27
- "@progress/kendo-react-buttons": "7.0.3-develop.9",
28
- "@progress/kendo-react-common": "7.0.3-develop.9",
29
- "@progress/kendo-react-intl": "7.0.3-develop.9",
30
- "@progress/kendo-react-labels": "7.0.3-develop.9",
31
- "@progress/kendo-react-layout": "7.0.3-develop.9",
32
- "@progress/kendo-react-popup": "7.0.3-develop.9",
27
+ "@progress/kendo-react-buttons": "7.1.0-develop.2",
28
+ "@progress/kendo-react-common": "7.1.0-develop.2",
29
+ "@progress/kendo-react-intl": "7.1.0-develop.2",
30
+ "@progress/kendo-react-labels": "7.1.0-develop.2",
31
+ "@progress/kendo-react-layout": "7.1.0-develop.2",
32
+ "@progress/kendo-react-popup": "7.1.0-develop.2",
33
33
  "@progress/kendo-svg-icons": "^2.1.0",
34
34
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0",
35
35
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"