@progress/kendo-react-dateinputs 8.3.0-develop.6 → 8.3.0-develop.8

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 (49) hide show
  1. package/calendar/components/Calendar.js +2 -2
  2. package/calendar/components/Calendar.mjs +123 -115
  3. package/calendar/components/CalendarCell.js +1 -1
  4. package/calendar/components/CalendarCell.mjs +37 -39
  5. package/calendar/components/CalendarHeaderTitle.js +1 -1
  6. package/calendar/components/CalendarHeaderTitle.mjs +6 -12
  7. package/calendar/components/CalendarNavigationItem.js +1 -1
  8. package/calendar/components/CalendarNavigationItem.mjs +15 -19
  9. package/calendar/components/CalendarWeekCell.js +1 -1
  10. package/calendar/components/CalendarWeekCell.mjs +10 -15
  11. package/calendar/components/Header.js +1 -1
  12. package/calendar/components/Header.mjs +30 -40
  13. package/calendar/components/Navigation.js +1 -1
  14. package/calendar/components/Navigation.mjs +52 -49
  15. package/calendar/components/TodayCommand.js +1 -1
  16. package/calendar/components/TodayCommand.mjs +21 -25
  17. package/calendar/components/View.js +1 -1
  18. package/calendar/components/View.mjs +48 -42
  19. package/calendar/components/ViewList.js +1 -1
  20. package/calendar/components/ViewList.mjs +99 -94
  21. package/common/ClearButton.js +1 -1
  22. package/common/ClearButton.mjs +25 -31
  23. package/dateinput/DateInput.js +1 -1
  24. package/dateinput/DateInput.mjs +113 -110
  25. package/dateinput/utils.js +1 -1
  26. package/dateinput/utils.mjs +22 -23
  27. package/datepicker/DatePicker.js +1 -1
  28. package/datepicker/DatePicker.mjs +9 -9
  29. package/daterangepicker/DateRangePicker.js +1 -1
  30. package/daterangepicker/DateRangePicker.mjs +5 -5
  31. package/datetimepicker/DateTimePicker.js +1 -1
  32. package/datetimepicker/DateTimePicker.mjs +95 -90
  33. package/datetimepicker/DateTimeSelector.js +1 -1
  34. package/datetimepicker/DateTimeSelector.mjs +83 -81
  35. package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
  36. package/index.d.mts +38 -28
  37. package/index.d.ts +38 -28
  38. package/package-metadata.mjs +1 -1
  39. package/package.json +7 -7
  40. package/timepicker/TimeList.js +3 -3
  41. package/timepicker/TimeList.mjs +83 -81
  42. package/timepicker/TimePart.js +1 -1
  43. package/timepicker/TimePart.mjs +74 -68
  44. package/timepicker/TimePicker.js +1 -1
  45. package/timepicker/TimePicker.mjs +112 -107
  46. package/timepicker/TimeSelector.js +1 -1
  47. package/timepicker/TimeSelector.mjs +66 -59
  48. package/virtualization/Virtualization.js +1 -1
  49. package/virtualization/Virtualization.mjs +49 -48
@@ -8,29 +8,33 @@
8
8
  "use client";
9
9
  import * as i from "react";
10
10
  import s from "prop-types";
11
- import { cloneDate as p, weekInYear as w } from "@progress/kendo-date-math";
12
- import { provideIntlService as D, registerForIntl as v } from "@progress/kendo-react-intl";
13
- import { CalendarCell as g } from "./CalendarCell.mjs";
14
- import { CalendarWeekCell as y } from "./CalendarWeekCell.mjs";
15
- import { CalendarViewEnum as u } from "../models/CalendarViewEnum.mjs";
16
- import { getToday as d, setTime as N } from "../../utils.mjs";
17
- import { WeekNamesService as b } from "../services/WeekNamesService.mjs";
18
- const k = (f) => /* @__PURE__ */ i.createElement("td", { key: f, className: "k-calendar-td k-empty" }, " "), c = class c extends i.Component {
11
+ import { cloneDate as k, weekInYear as R } from "@progress/kendo-date-math";
12
+ import { provideIntlService as M, registerForIntl as q } from "@progress/kendo-react-intl";
13
+ import { CalendarCell as x } from "./CalendarCell.mjs";
14
+ import { CalendarWeekCell as I } from "./CalendarWeekCell.mjs";
15
+ import { CalendarViewEnum as D } from "../models/CalendarViewEnum.mjs";
16
+ import { getToday as v, setTime as V } from "../../utils.mjs";
17
+ import { WeekNamesService as S } from "../services/WeekNamesService.mjs";
18
+ import { classNames as l, uCalendar as c } from "@progress/kendo-react-common";
19
+ const y = (g, t) => {
20
+ const e = t;
21
+ return /* @__PURE__ */ i.createElement("td", { key: g, role: "gridcell", className: l(c.td({ c: e, isEmpty: !0 })) }, " ");
22
+ }, u = class u extends i.Component {
19
23
  constructor() {
20
24
  super(...arguments), this.intl = null, this.weekService = null, this.buildWeekNumber = (t, e) => {
21
25
  if (!this.firstDate(t))
22
- return k(`week-cell-${e}`);
23
- const a = this.firstDate(t), n = this.getWeekNumber(a), o = `kendo-react-calendar-week-cell-${n}`, l = {
24
- className: "k-alt",
26
+ return y(`week-cell-${e}`);
27
+ const a = this.firstDate(t), n = this.getWeekNumber(a), o = `kendo-react-calendar-week-cell-${n}`, m = {
25
28
  value: n,
26
29
  firstDate: a,
27
30
  weekDays: t,
31
+ unstyled: this.props.unstyled,
28
32
  onClick: this.handleWeekCellClick
29
33
  };
30
- return this.props.weekCell ? /* @__PURE__ */ i.createElement(this.props.weekCell, { ...l, key: o }, n) : /* @__PURE__ */ i.createElement(y, { ...l, key: o }, n);
34
+ return this.props.weekCell ? /* @__PURE__ */ i.createElement(this.props.weekCell, { ...m, key: o }, n) : /* @__PURE__ */ i.createElement(I, { ...m, key: o }, n);
31
35
  }, this.buildRow = (t) => t.map((e, r) => {
32
36
  if (!e)
33
- return k(r);
37
+ return y(r);
34
38
  const a = { "aria-selected": e.isSelected }, n = `kendo-react-calendar-cell-${e.value.getTime()}`, o = {
35
39
  ...a,
36
40
  ...e,
@@ -38,11 +42,12 @@ const k = (f) => /* @__PURE__ */ i.createElement("td", { key: f, className: "k-c
38
42
  view: this.props.activeView,
39
43
  showOtherMonthDays: this.props.showOtherMonthDays,
40
44
  allowReverse: this.props.allowReverse,
45
+ unstyled: this.props.unstyled,
41
46
  onClick: this.handleClick,
42
47
  onMouseEnter: this.handleMouseEnter,
43
48
  onMouseLeave: this.handleMouseLeave
44
49
  };
45
- return this.props.cell ? /* @__PURE__ */ i.createElement(this.props.cell, { ...o, key: n }, e.formattedValue) : /* @__PURE__ */ i.createElement(g, { ...o, key: n }, e.formattedValue);
50
+ return this.props.cell ? /* @__PURE__ */ i.createElement(this.props.cell, { ...o, key: n }, e.formattedValue) : /* @__PURE__ */ i.createElement(x, { ...o, key: n }, e.formattedValue);
46
51
  }), this.firstDate = (t) => {
47
52
  const e = this.firstWeekDateContext(t);
48
53
  return e ? e.value : null;
@@ -57,7 +62,7 @@ const k = (f) => /* @__PURE__ */ i.createElement("td", { key: f, className: "k-c
57
62
  const { onChange: r } = this.props;
58
63
  if (r && e) {
59
64
  const a = {
60
- value: p(t),
65
+ value: k(t),
61
66
  target: this,
62
67
  nativeEvent: e && e.nativeEvent,
63
68
  syntheticEvent: e
@@ -69,10 +74,10 @@ const k = (f) => /* @__PURE__ */ i.createElement("td", { key: f, className: "k-c
69
74
  a && r && a.call(void 0, t, n, r);
70
75
  }, this.handleMouseEnter = (t) => {
71
76
  const { onCellEnter: e } = this.props;
72
- e && e.call(void 0, p(t));
77
+ e && e.call(void 0, k(t));
73
78
  }, this.handleMouseLeave = (t) => {
74
79
  const { onCellLeave: e } = this.props;
75
- e && e.call(void 0, p(t));
80
+ e && e.call(void 0, k(t));
76
81
  };
77
82
  }
78
83
  get min() {
@@ -85,56 +90,57 @@ const k = (f) => /* @__PURE__ */ i.createElement("td", { key: f, className: "k-c
85
90
  return this.props.direction === "horizontal";
86
91
  }
87
92
  get isMonthView() {
88
- return this.props.activeView === u.month;
93
+ return this.props.activeView === D.month;
89
94
  }
90
95
  get weekNumber() {
91
- return !!(this.props.showWeekNumbers && this.props.activeView === u.month);
96
+ return !!(this.props.showWeekNumbers && this.props.activeView === D.month);
92
97
  }
93
98
  get selectedDate() {
94
- return this.props.selectedDate !== void 0 ? this.props.selectedDate : c.defaultProps.selectedDate;
99
+ return this.props.selectedDate !== void 0 ? this.props.selectedDate : u.defaultProps.selectedDate;
95
100
  }
96
101
  render() {
97
- this.intl = D(this), this.weekService = new b(this.intl);
98
- const t = this.weekService.getWeekNames(this.weekNumber, this.props.weekDaysFormat), e = this.props.service.rowLength(this.weekNumber), r = this.props.service.title(this.props.viewDate), a = d(), n = N(this.props.viewDate, a), o = this.props.service.data({
99
- cellUID: this.props.cellUID,
102
+ const { service: t, weekDaysFormat: e, cellUID: r, focusedDate: a, bus: n, activeView: o, selectionRange: m, unstyled: w } = this.props, h = w && w.uCalendar;
103
+ this.intl = M(this), this.weekService = new S(this.intl);
104
+ const C = this.weekService.getWeekNames(this.weekNumber, e), N = t.rowLength(this.weekNumber), b = t.title(this.props.viewDate), E = v(), W = V(this.props.viewDate, E), O = t.data({
105
+ cellUID: r,
100
106
  min: this.min,
101
107
  max: this.max,
102
- focusedDate: this.props.focusedDate,
103
- isActiveView: !this.props.bus.canMoveDown(this.props.activeView),
108
+ focusedDate: a,
109
+ isActiveView: !n.canMoveDown(o),
104
110
  selectedDate: this.selectedDate,
105
- selectionRange: this.props.selectionRange,
106
- viewDate: n
111
+ selectionRange: m,
112
+ viewDate: W
107
113
  });
108
114
  return /* @__PURE__ */ i.createElement(i.Fragment, null, this.isMonthView && this.isHorizontal && /* @__PURE__ */ i.createElement(
109
115
  "thead",
110
116
  {
111
117
  role: "rowgroup",
112
- className: "k-calendar-thead"
118
+ className: l(c.thead({ c: h }))
113
119
  },
114
- /* @__PURE__ */ i.createElement("tr", { role: "row", className: "k-calendar-tr" }, t.map((l, h) => /* @__PURE__ */ i.createElement("th", { key: h, className: "k-calendar-th" }, l)))
120
+ /* @__PURE__ */ i.createElement("tr", { role: "row", className: l(c.tr({ c: h })) }, C.map((p, d) => /* @__PURE__ */ i.createElement("th", { key: d, className: l(c.th({ c: h })) }, p)))
115
121
  ), /* @__PURE__ */ i.createElement(
116
122
  "tbody",
117
123
  {
118
124
  role: "rowgroup",
119
- className: "k-calendar-tbody"
125
+ className: l(c.tbody({ c: h }))
120
126
  },
121
- !this.isHorizontal && /* @__PURE__ */ i.createElement("tr", { role: "presentation", className: "k-calendar-tr" }, /* @__PURE__ */ i.createElement(
127
+ !this.isHorizontal && /* @__PURE__ */ i.createElement("tr", { role: "presentation", className: l(c.tr({ c: h })) }, /* @__PURE__ */ i.createElement(
122
128
  "th",
123
129
  {
124
130
  scope: "col",
125
- colSpan: e,
126
- className: "k-calendar-caption"
131
+ colSpan: N,
132
+ className: l(c.caption({ c: h }))
127
133
  },
128
- r
134
+ b
129
135
  )),
130
- o.map((l, h) => /* @__PURE__ */ i.createElement("tr", { role: "row", className: "k-calendar-tr", key: h }, this.weekNumber && this.buildWeekNumber(l, h), this.buildRow(l)))
136
+ O.map((p, d) => /* @__PURE__ */ i.createElement("tr", { role: "row", className: l(c.tr({ c: h })), key: d }, this.weekNumber && this.buildWeekNumber(p, d), this.buildRow(p)))
131
137
  ));
132
138
  }
133
139
  getWeekNumber(t) {
134
- return !this.weekNumber || !this.intl ? null : w(t, this.intl.firstDay());
140
+ return !this.weekNumber || !this.intl ? null : R(t, this.intl.firstDay());
135
141
  }
136
142
  };
137
- c.propTypes = {
143
+ u.propTypes = {
138
144
  activeRangeEnd: s.oneOf(["start", "end", null]),
139
145
  activeView: s.number.isRequired,
140
146
  cellUID: s.string.isRequired,
@@ -149,13 +155,13 @@ c.propTypes = {
149
155
  showWeekNumbers: s.bool,
150
156
  showOtherMonthDays: s.bool,
151
157
  viewDate: s.instanceOf(Date).isRequired
152
- }, c.defaultProps = {
158
+ }, u.defaultProps = {
153
159
  direction: "vertical",
154
- selectedDate: d(),
160
+ selectedDate: v(),
155
161
  showWeekNumbers: !1
156
162
  };
157
- let m = c;
158
- v(m);
163
+ let f = u;
164
+ q(f);
159
165
  export {
160
- m as View
166
+ f as View
161
167
  };
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("react"),r=require("prop-types"),y=require("@progress/kendo-react-common"),p=require("@progress/kendo-date-math"),f=require("@progress/kendo-react-intl"),x=require("../../virtualization/Virtualization.js"),S=require("./View.js"),C=require("./Header.js"),E=require("../services/WeekNamesService.js"),d=require("../../utils.js"),l=require("../models/CalendarViewEnum.js"),I=require("./TodayCommand.js");function T(h){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(h){for(const e in h)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(h,e);Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:()=>h[e]})}}return o.default=h,Object.freeze(o)}const s=T(V),O=5,c=class c extends s.Component{constructor(o){super(o),this.virtualization=null,this.calendarView=null,this.table=null,this.intl=null,this.bottomOffset=0,this.viewOffset=0,this.viewHeight=0,this._element=null,this.isActive=!1,this.animateToIndex=!0,this.shouldScroll=!1,this.weekService=null,this.focusActiveDate=()=>{if(!this._element)return;const e=this._element.querySelector("td.k-focus"),t=this._element.querySelector(".k-state-pending-focus");e&&e[0]&&e[0].classList.remove("k-focus"),t&&t.classList.add("k-focus"),this.isActive=!0},this.blurActiveDate=()=>{if(!this._element)return;const e=this._element.querySelector("td.k-focus");e&&e.classList.remove("k-focus"),this.isActive=!1},this.handleVirtualizationMount=e=>{if(this.virtualization=e,this.virtualization&&this.table){this.table.style.transform=`translateY(${this.viewOffset}px)`;const t=d.dateInRange(this.props.focusedDate,this.props.min,this.props.max),i=this.props.service.skip(t,this.props.min);this.virtualization.scrollToIndex(i)}},this.buildMonthView=(e,t)=>s.createElement("table",{key:"calendar-view-list-weekdays",className:"k-calendar-table k-calendar-weekdays",role:"grid",tabIndex:this.props.tabIndex},s.createElement("colgroup",null,e.map((i,a)=>s.createElement("col",{key:a}))),s.createElement("thead",{className:"k-calendar-thead"},s.createElement("tr",{className:"k-calendar-tr"},t.map((i,a)=>s.createElement("th",{key:a,className:"k-calendar-th"},i))))),this.buildDates=(e,t)=>{const i=this.props.cellUID;return s.createElement("table",{className:"k-calendar-table",ref:a=>this.table=a,role:"grid",tabIndex:this.props.tabIndex,"aria-activedescendant":i+this.props.focusedDate.getTime()},s.createElement("colgroup",null,e.map((a,n)=>s.createElement("col",{key:n}))),t.map(a=>s.createElement(S.View,{ref:n=>{this.calendarView||(this.calendarView=n)},key:a.getTime(),activeView:this.props.activeView,viewDate:a,min:this.props.min,max:this.props.max,cellUID:i,focusedDate:this.props.focusedDate,cell:this.props.cell,selectedDate:this.props.value,showWeekNumbers:this.weekNumber,onChange:this.handleDateChange,bus:this.props.bus,service:this.props.service,weekCell:this.props.weekCell,showOtherMonthDays:this.props.showOtherMonthDays})))},this.calculateHeights=()=>{if(!this.props.dom)return;const e=this.props.activeView===l.CalendarViewEnum.month?this.props.dom.scrollableContentHeight:this.props.dom.scrollableYearContentHeight;this.bottomOffset=e-this.props.dom.viewHeight(this.props.activeView),this.viewOffset=-1*this.props.dom.headerHeight,this.viewHeight=this.props.dom.viewHeight(this.props.activeView)||1},this.getTake=(e,t)=>Math.min(t-e,this.take),this.handleScrollAction=({index:e,scrollAction:t,pageAction:i})=>{const a=i?i.skip:this.state.skip;if((this.state.index!==e||this.state.skip!==a)&&this.setState({index:e,skip:a}),this.table&&t){const n=`translateY(${t.offset}px)`;this.table.style.transform=n}},this.handleTodayClick=e=>{this.shouldScroll=!0,this.handleDateChange.call(void 0,e,!0)},this.handleDateChange=(e,t=!1)=>{const{onChange:i}=this.props;if(i){const a={syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,value:p.cloneDate(e.value),target:this,isTodayClick:t};i.call(void 0,a)}},this.lastView=this.props.activeView,this.lastFocus=this.props.focusedDate,this.state={skip:this.props.service.skip(this.props.focusedDate,this.props.min),index:this.props.service.skip(this.props.focusedDate,this.props.min)}}get element(){return this._element}get weekNames(){return this.intl=f.provideIntlService(this),this.weekService=new E.WeekNamesService(this.intl),this.weekService.getWeekNames(this.weekNumber,this.props.weekDaysFormat)}get weekNumber(){return!!(this.props.showWeekNumbers&&this.props.activeView===l.CalendarViewEnum.month)}get take(){return this.props.take!==void 0?this.props.take:c.defaultProps.take}get animate(){return!!(this.props.smoothScroll&&this.animateToIndex)}get todayIsInRange(){return d.isInRange(d.getToday(),p.getDate(this.props.min),p.getDate(this.props.max))}componentDidUpdate(o,e){this.shouldScroll=!1,this.indexToScroll!==void 0&&this.virtualization&&this.virtualization[this.animate?"animateToIndex":"scrollToIndex"](this.indexToScroll),this.isActive&&this.focusActiveDate(),this.lastView=this.props.activeView,this.indexToScroll=void 0}render(){this.calculateHeights();const o=this.lastView!==this.props.activeView,e=d.dateInRange(this.props.focusedDate,this.props.min,this.props.max),t=o?this.props.service.skip(e,this.props.min):this.state.skip,i=this.props.service.total(this.props.min,this.props.max),a=this.getTake(t,i),n=this.props.service.addToDate(this.props.min,t),w=this.props.service.addToDate(this.props.min,this.state.index),m=new Array(this.props.service.rowLength(this.weekNumber)).fill(""),v=this.props.activeView!==this.lastView;this.animateToIndex=!v,(v||!p.isEqualDate(this.lastFocus,e)||this.shouldScroll||!this.props.shouldScroll||this.props.shouldScroll())&&(this.indexToScroll=this.props.service.skip(e,this.props.min)),this.lastFocus=e;const k=y.classNames("k-calendar-view k-vstack",{"k-calendar-monthview":this.props.activeView===l.CalendarViewEnum.month,"k-calendar-yearview":this.props.activeView===l.CalendarViewEnum.year,"k-calendar-decadeview":this.props.activeView===l.CalendarViewEnum.decade,"k-calendar-centuryview":this.props.activeView===l.CalendarViewEnum.century}),b=this.buildDates(m,this.props.service.datesList(n,a)),g=s.createElement(s.Fragment,null,s.createElement(C.Header,{key:"calendar-view-list-header",currentDate:w,min:this.props.min,max:this.props.max,activeView:this.props.activeView,bus:this.props.bus,service:this.props.service,headerTitle:this.props.headerTitle,header:this.props.header,commands:s.createElement(s.Fragment,null,s.createElement(I.TodayCommand,{min:this.props.min,max:this.props.max,onClick:this.handleTodayClick,disabled:!this.todayIsInRange,tabIndex:this.props.tabIndex}))}),this.props.activeView===l.CalendarViewEnum.month&&this.buildMonthView(m,this.weekNames),s.createElement(x.Virtualization,{key:"calendar-view-list-content",skip:t,take:this.take,total:i,itemHeight:this.viewHeight,topOffset:this.viewOffset,bottomOffset:this.bottomOffset,scrollOffsetSize:this.viewOffset,maxScrollDifference:this.viewHeight,onScroll:this.props.onScroll,onScrollAction:this.handleScrollAction,onMount:this.handleVirtualizationMount,children:b,tabIndex:this.props.tabIndex}));return s.createElement("div",{ref:D=>{this._element=D},className:k},this.props.dom.didCalculate?g:null)}};c.propTypes={activeView:r.number.isRequired,bottomOffset:r.number,cellUID:r.string.isRequired,focusedDate:r.instanceOf(Date).isRequired,max:r.instanceOf(Date).isRequired,min:r.instanceOf(Date).isRequired,onChange:r.func,showWeekNumbers:r.bool,smoothScroll:r.bool,take:r.number,value:r.instanceOf(Date),viewHeight:r.number,viewOffset:r.number,weekDaysFormat:r.oneOf(["short","abbreviated","narrow"]),tabIndex:r.number},c.defaultProps={take:O,showWeekNumbers:!1,weekDaysFormat:"short",smoothScroll:!0};let u=c;f.registerForIntl(u);exports.ViewList=u;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("react"),o=require("prop-types"),n=require("@progress/kendo-react-common"),m=require("@progress/kendo-date-math"),D=require("@progress/kendo-react-intl"),N=require("../../virtualization/Virtualization.js"),O=require("./View.js"),q=require("./Header.js"),H=require("../services/WeekNamesService.js"),f=require("../../utils.js"),p=require("../models/CalendarViewEnum.js"),R=require("./TodayCommand.js");function _(d){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(d){for(const e in d)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(d,e);Object.defineProperty(r,e,t.get?t:{enumerable:!0,get:()=>d[e]})}}return r.default=d,Object.freeze(r)}const a=_(T),z=5,u=class u extends a.Component{constructor(r){super(r),this.virtualization=null,this.calendarView=null,this.table=null,this.intl=null,this.bottomOffset=0,this.viewOffset=0,this.viewHeight=0,this._element=null,this.isActive=!1,this.animateToIndex=!0,this.shouldScroll=!1,this.weekService=null,this.focusActiveDate=()=>{if(!this._element)return;const e=this._element.querySelector("td.k-focus"),t=this._element.querySelector(".k-state-pending-focus");e&&e[0]&&e[0].classList.remove("k-focus"),t&&t.classList.add("k-focus"),this.isActive=!0},this.blurActiveDate=()=>{if(!this._element)return;const e=this._element.querySelector("td.k-focus");e&&e.classList.remove("k-focus"),this.isActive=!1},this.handleVirtualizationMount=e=>{if(this.virtualization=e,this.virtualization&&this.table){this.table.style.transform=`translateY(${this.viewOffset}px)`;const t=f.dateInRange(this.props.focusedDate,this.props.min,this.props.max),s=this.props.service.skip(t,this.props.min);this.virtualization.scrollToIndex(s)}},this.buildMonthView=(e,t)=>{const{unstyled:s}=this.props,i=s&&s.uCalendar;return a.createElement("table",{key:"calendar-view-list-weekdays",className:n.classNames(n.uCalendar.table({c:i,weekdays:!0})),role:"grid",tabIndex:this.props.tabIndex},a.createElement("colgroup",null,e.map((h,l)=>a.createElement("col",{key:l}))),a.createElement("thead",{className:n.classNames(n.uCalendar.thead({c:i}))},a.createElement("tr",{className:n.classNames(n.uCalendar.tr({c:i}))},t.map((h,l)=>a.createElement("th",{key:l,className:n.classNames(n.uCalendar.th({c:i}))},h)))))},this.buildDates=(e,t)=>{const s=this.props.cellUID,{unstyled:i}=this.props,h=i&&i.uCalendar;return a.createElement("table",{className:n.classNames(n.uCalendar.table({c:h})),ref:l=>this.table=l,role:"grid",tabIndex:this.props.tabIndex,"aria-activedescendant":s+this.props.focusedDate.getTime()},a.createElement("colgroup",null,e.map((l,c)=>a.createElement("col",{key:c}))),t.map(l=>a.createElement(O.View,{ref:c=>{this.calendarView||(this.calendarView=c)},key:l.getTime(),activeView:this.props.activeView,viewDate:l,min:this.props.min,max:this.props.max,cellUID:s,focusedDate:this.props.focusedDate,cell:this.props.cell,selectedDate:this.props.value,showWeekNumbers:this.weekNumber,onChange:this.handleDateChange,bus:this.props.bus,service:this.props.service,weekCell:this.props.weekCell,showOtherMonthDays:this.props.showOtherMonthDays,unstyled:i})))},this.calculateHeights=()=>{if(!this.props.dom)return;const e=this.props.activeView===p.CalendarViewEnum.month?this.props.dom.scrollableContentHeight:this.props.dom.scrollableYearContentHeight;this.bottomOffset=e-this.props.dom.viewHeight(this.props.activeView),this.viewOffset=-1*this.props.dom.headerHeight,this.viewHeight=this.props.dom.viewHeight(this.props.activeView)||1},this.getTake=(e,t)=>Math.min(t-e,this.take),this.handleScrollAction=({index:e,scrollAction:t,pageAction:s})=>{const i=s?s.skip:this.state.skip;if((this.state.index!==e||this.state.skip!==i)&&this.setState({index:e,skip:i}),this.table&&t){const h=`translateY(${t.offset}px)`;this.table.style.transform=h}},this.handleTodayClick=e=>{this.shouldScroll=!0,this.handleDateChange.call(void 0,e,!0)},this.handleDateChange=(e,t=!1)=>{const{onChange:s}=this.props;if(s){const i={syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,value:m.cloneDate(e.value),target:this,isTodayClick:t};s.call(void 0,i)}},this.lastView=this.props.activeView,this.lastFocus=this.props.focusedDate,this.state={skip:this.props.service.skip(this.props.focusedDate,this.props.min),index:this.props.service.skip(this.props.focusedDate,this.props.min)}}get element(){return this._element}get weekNames(){return this.intl=D.provideIntlService(this),this.weekService=new H.WeekNamesService(this.intl),this.weekService.getWeekNames(this.weekNumber,this.props.weekDaysFormat)}get weekNumber(){return!!(this.props.showWeekNumbers&&this.props.activeView===p.CalendarViewEnum.month)}get take(){return this.props.take!==void 0?this.props.take:u.defaultProps.take}get animate(){return!!(this.props.smoothScroll&&this.animateToIndex)}get todayIsInRange(){return f.isInRange(f.getToday(),m.getDate(this.props.min),m.getDate(this.props.max))}componentDidUpdate(r,e){this.shouldScroll=!1,this.indexToScroll!==void 0&&this.virtualization&&this.virtualization[this.animate?"animateToIndex":"scrollToIndex"](this.indexToScroll),this.isActive&&this.focusActiveDate(),this.lastView=this.props.activeView,this.indexToScroll=void 0}render(){const{activeView:r,min:e,max:t,service:s,unstyled:i}=this.props,h=i&&i.uCalendar;this.calculateHeights();const l=this.lastView!==r,c=f.dateInRange(this.props.focusedDate,e,t),w=l?s.skip(c,e):this.state.skip,k=s.total(e,t),C=this.getTake(w,k),y=s.addToDate(e,w),x=s.addToDate(e,this.state.index),b=new Array(s.rowLength(this.weekNumber)).fill(""),g=r!==this.lastView;this.animateToIndex=!g,(g||!m.isEqualDate(this.lastFocus,c)||this.shouldScroll||!this.props.shouldScroll||this.props.shouldScroll())&&(this.indexToScroll=this.props.service.skip(c,this.props.min)),this.lastFocus=c;const S=n.classNames(n.uCalendar.view({c:h,month:r===p.CalendarViewEnum.month,year:r===p.CalendarViewEnum.year,decade:r===p.CalendarViewEnum.decade,century:r===p.CalendarViewEnum.century})),V=this.buildDates(b,s.datesList(y,C)),E=a.createElement(a.Fragment,null,a.createElement(q.Header,{key:"calendar-view-list-header",currentDate:x,min:this.props.min,max:this.props.max,activeView:this.props.activeView,bus:this.props.bus,service:this.props.service,headerTitle:this.props.headerTitle,header:this.props.header,unstyled:i,commands:a.createElement(R.TodayCommand,{min:this.props.min,max:this.props.max,onClick:this.handleTodayClick,disabled:!this.todayIsInRange,tabIndex:this.props.tabIndex,unstyled:i})}),this.props.activeView===p.CalendarViewEnum.month&&this.buildMonthView(b,this.weekNames),a.createElement(N.Virtualization,{key:"calendar-view-list-content",skip:w,take:this.take,total:k,itemHeight:this.viewHeight,topOffset:this.viewOffset,bottomOffset:this.bottomOffset,scrollOffsetSize:this.viewOffset,maxScrollDifference:this.viewHeight,onScroll:this.props.onScroll,onScrollAction:this.handleScrollAction,onMount:this.handleVirtualizationMount,children:V,tabIndex:this.props.tabIndex}));return a.createElement("div",{ref:I=>{this._element=I},className:S},this.props.dom.didCalculate?E:null)}};u.propTypes={activeView:o.number.isRequired,bottomOffset:o.number,cellUID:o.string.isRequired,focusedDate:o.instanceOf(Date).isRequired,max:o.instanceOf(Date).isRequired,min:o.instanceOf(Date).isRequired,onChange:o.func,showWeekNumbers:o.bool,smoothScroll:o.bool,take:o.number,value:o.instanceOf(Date),viewHeight:o.number,viewOffset:o.number,weekDaysFormat:o.oneOf(["short","abbreviated","narrow"]),tabIndex:o.number},u.defaultProps={take:z,showWeekNumbers:!1,weekDaysFormat:"short",smoothScroll:!0};let v=u;D.registerForIntl(v);exports.ViewList=v;
@@ -6,25 +6,25 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as s from "react";
9
+ import * as a from "react";
10
10
  import o from "prop-types";
11
- import { classNames as g } from "@progress/kendo-react-common";
12
- import { cloneDate as D, getDate as d, isEqualDate as x } from "@progress/kendo-date-math";
13
- import { provideIntlService as y, registerForIntl as S } from "@progress/kendo-react-intl";
14
- import { Virtualization as V } from "../../virtualization/Virtualization.mjs";
15
- import { View as I } from "./View.mjs";
16
- import { Header as T } from "./Header.mjs";
17
- import { WeekNamesService as C } from "../services/WeekNamesService.mjs";
18
- import { dateInRange as u, isInRange as E, getToday as N } from "../../utils.mjs";
19
- import { CalendarViewEnum as n } from "../models/CalendarViewEnum.mjs";
20
- import { TodayCommand as O } from "./TodayCommand.mjs";
21
- const H = 5, h = class h extends s.Component {
22
- constructor(l) {
23
- super(l), this.virtualization = null, this.calendarView = null, this.table = null, this.intl = null, this.bottomOffset = 0, this.viewOffset = 0, this.viewHeight = 0, this._element = null, this.isActive = !1, this.animateToIndex = !0, this.shouldScroll = !1, this.weekService = null, this.focusActiveDate = () => {
11
+ import { classNames as p, uCalendar as m } from "@progress/kendo-react-common";
12
+ import { cloneDate as T, getDate as b, isEqualDate as E } from "@progress/kendo-date-math";
13
+ import { provideIntlService as N, registerForIntl as O } from "@progress/kendo-react-intl";
14
+ import { Virtualization as H } from "../../virtualization/Virtualization.mjs";
15
+ import { View as z } from "./View.mjs";
16
+ import { Header as A } from "./Header.mjs";
17
+ import { WeekNamesService as R } from "../services/WeekNamesService.mjs";
18
+ import { dateInRange as g, isInRange as _, getToday as q } from "../../utils.mjs";
19
+ import { CalendarViewEnum as c } from "../models/CalendarViewEnum.mjs";
20
+ import { TodayCommand as F } from "./TodayCommand.mjs";
21
+ const M = 5, d = class d extends a.Component {
22
+ constructor(n) {
23
+ super(n), this.virtualization = null, this.calendarView = null, this.table = null, this.intl = null, this.bottomOffset = 0, this.viewOffset = 0, this.viewHeight = 0, this._element = null, this.isActive = !1, this.animateToIndex = !0, this.shouldScroll = !1, this.weekService = null, this.focusActiveDate = () => {
24
24
  if (!this._element)
25
25
  return;
26
- const e = this._element.querySelector("td.k-focus"), t = this._element.querySelector(".k-state-pending-focus");
27
- e && e[0] && e[0].classList.remove("k-focus"), t && t.classList.add("k-focus"), this.isActive = !0;
26
+ const e = this._element.querySelector("td.k-focus"), s = this._element.querySelector(".k-state-pending-focus");
27
+ e && e[0] && e[0].classList.remove("k-focus"), s && s.classList.add("k-focus"), this.isActive = !0;
28
28
  }, this.blurActiveDate = () => {
29
29
  if (!this._element)
30
30
  return;
@@ -33,43 +33,46 @@ const H = 5, h = class h extends s.Component {
33
33
  }, this.handleVirtualizationMount = (e) => {
34
34
  if (this.virtualization = e, this.virtualization && this.table) {
35
35
  this.table.style.transform = `translateY(${this.viewOffset}px)`;
36
- const t = u(this.props.focusedDate, this.props.min, this.props.max), i = this.props.service.skip(t, this.props.min);
37
- this.virtualization.scrollToIndex(i);
36
+ const s = g(this.props.focusedDate, this.props.min, this.props.max), t = this.props.service.skip(s, this.props.min);
37
+ this.virtualization.scrollToIndex(t);
38
38
  }
39
- }, this.buildMonthView = (e, t) => /* @__PURE__ */ s.createElement(
40
- "table",
41
- {
42
- key: "calendar-view-list-weekdays",
43
- className: "k-calendar-table k-calendar-weekdays",
44
- role: "grid",
45
- tabIndex: this.props.tabIndex
46
- },
47
- /* @__PURE__ */ s.createElement("colgroup", null, e.map((i, a) => /* @__PURE__ */ s.createElement("col", { key: a }))),
48
- /* @__PURE__ */ s.createElement("thead", { className: "k-calendar-thead" }, /* @__PURE__ */ s.createElement("tr", { className: "k-calendar-tr" }, t.map((i, a) => /* @__PURE__ */ s.createElement("th", { key: a, className: "k-calendar-th" }, i))))
49
- ), this.buildDates = (e, t) => {
50
- const i = this.props.cellUID;
51
- return /* @__PURE__ */ s.createElement(
39
+ }, this.buildMonthView = (e, s) => {
40
+ const { unstyled: t } = this.props, i = t && t.uCalendar;
41
+ return /* @__PURE__ */ a.createElement(
52
42
  "table",
53
43
  {
54
- className: "k-calendar-table",
55
- ref: (a) => this.table = a,
44
+ key: "calendar-view-list-weekdays",
45
+ className: p(m.table({ c: i, weekdays: !0 })),
46
+ role: "grid",
47
+ tabIndex: this.props.tabIndex
48
+ },
49
+ /* @__PURE__ */ a.createElement("colgroup", null, e.map((l, r) => /* @__PURE__ */ a.createElement("col", { key: r }))),
50
+ /* @__PURE__ */ a.createElement("thead", { className: p(m.thead({ c: i })) }, /* @__PURE__ */ a.createElement("tr", { className: p(m.tr({ c: i })) }, s.map((l, r) => /* @__PURE__ */ a.createElement("th", { key: r, className: p(m.th({ c: i })) }, l))))
51
+ );
52
+ }, this.buildDates = (e, s) => {
53
+ const t = this.props.cellUID, { unstyled: i } = this.props, l = i && i.uCalendar;
54
+ return /* @__PURE__ */ a.createElement(
55
+ "table",
56
+ {
57
+ className: p(m.table({ c: l })),
58
+ ref: (r) => this.table = r,
56
59
  role: "grid",
57
60
  tabIndex: this.props.tabIndex,
58
- "aria-activedescendant": i + this.props.focusedDate.getTime()
61
+ "aria-activedescendant": t + this.props.focusedDate.getTime()
59
62
  },
60
- /* @__PURE__ */ s.createElement("colgroup", null, e.map((a, r) => /* @__PURE__ */ s.createElement("col", { key: r }))),
61
- t.map((a) => /* @__PURE__ */ s.createElement(
62
- I,
63
+ /* @__PURE__ */ a.createElement("colgroup", null, e.map((r, h) => /* @__PURE__ */ a.createElement("col", { key: h }))),
64
+ s.map((r) => /* @__PURE__ */ a.createElement(
65
+ z,
63
66
  {
64
- ref: (r) => {
65
- this.calendarView || (this.calendarView = r);
67
+ ref: (h) => {
68
+ this.calendarView || (this.calendarView = h);
66
69
  },
67
- key: a.getTime(),
70
+ key: r.getTime(),
68
71
  activeView: this.props.activeView,
69
- viewDate: a,
72
+ viewDate: r,
70
73
  min: this.props.min,
71
74
  max: this.props.max,
72
- cellUID: i,
75
+ cellUID: t,
73
76
  focusedDate: this.props.focusedDate,
74
77
  cell: this.props.cell,
75
78
  selectedDate: this.props.value,
@@ -78,34 +81,35 @@ const H = 5, h = class h extends s.Component {
78
81
  bus: this.props.bus,
79
82
  service: this.props.service,
80
83
  weekCell: this.props.weekCell,
81
- showOtherMonthDays: this.props.showOtherMonthDays
84
+ showOtherMonthDays: this.props.showOtherMonthDays,
85
+ unstyled: i
82
86
  }
83
87
  ))
84
88
  );
85
89
  }, this.calculateHeights = () => {
86
90
  if (!this.props.dom)
87
91
  return;
88
- const e = this.props.activeView === n.month ? this.props.dom.scrollableContentHeight : this.props.dom.scrollableYearContentHeight;
92
+ const e = this.props.activeView === c.month ? this.props.dom.scrollableContentHeight : this.props.dom.scrollableYearContentHeight;
89
93
  this.bottomOffset = e - this.props.dom.viewHeight(this.props.activeView), this.viewOffset = -1 * this.props.dom.headerHeight, this.viewHeight = this.props.dom.viewHeight(this.props.activeView) || 1;
90
- }, this.getTake = (e, t) => Math.min(t - e, this.take), this.handleScrollAction = ({ index: e, scrollAction: t, pageAction: i }) => {
91
- const a = i ? i.skip : this.state.skip;
92
- if ((this.state.index !== e || this.state.skip !== a) && this.setState({ index: e, skip: a }), this.table && t) {
93
- const r = `translateY(${t.offset}px)`;
94
- this.table.style.transform = r;
94
+ }, this.getTake = (e, s) => Math.min(s - e, this.take), this.handleScrollAction = ({ index: e, scrollAction: s, pageAction: t }) => {
95
+ const i = t ? t.skip : this.state.skip;
96
+ if ((this.state.index !== e || this.state.skip !== i) && this.setState({ index: e, skip: i }), this.table && s) {
97
+ const l = `translateY(${s.offset}px)`;
98
+ this.table.style.transform = l;
95
99
  }
96
100
  }, this.handleTodayClick = (e) => {
97
101
  this.shouldScroll = !0, this.handleDateChange.call(void 0, e, !0);
98
- }, this.handleDateChange = (e, t = !1) => {
99
- const { onChange: i } = this.props;
100
- if (i) {
101
- const a = {
102
+ }, this.handleDateChange = (e, s = !1) => {
103
+ const { onChange: t } = this.props;
104
+ if (t) {
105
+ const i = {
102
106
  syntheticEvent: e.syntheticEvent,
103
107
  nativeEvent: e.nativeEvent,
104
- value: D(e.value),
108
+ value: T(e.value),
105
109
  target: this,
106
- isTodayClick: t
110
+ isTodayClick: s
107
111
  };
108
- i.call(void 0, a);
112
+ t.call(void 0, i);
109
113
  }
110
114
  }, this.lastView = this.props.activeView, this.lastFocus = this.props.focusedDate, this.state = {
111
115
  skip: this.props.service.skip(this.props.focusedDate, this.props.min),
@@ -116,40 +120,39 @@ const H = 5, h = class h extends s.Component {
116
120
  return this._element;
117
121
  }
118
122
  get weekNames() {
119
- return this.intl = y(this), this.weekService = new C(this.intl), this.weekService.getWeekNames(this.weekNumber, this.props.weekDaysFormat);
123
+ return this.intl = N(this), this.weekService = new R(this.intl), this.weekService.getWeekNames(this.weekNumber, this.props.weekDaysFormat);
120
124
  }
121
125
  get weekNumber() {
122
- return !!(this.props.showWeekNumbers && this.props.activeView === n.month);
126
+ return !!(this.props.showWeekNumbers && this.props.activeView === c.month);
123
127
  }
124
128
  get take() {
125
- return this.props.take !== void 0 ? this.props.take : h.defaultProps.take;
129
+ return this.props.take !== void 0 ? this.props.take : d.defaultProps.take;
126
130
  }
127
131
  get animate() {
128
132
  return !!(this.props.smoothScroll && this.animateToIndex);
129
133
  }
130
134
  get todayIsInRange() {
131
- return E(N(), d(this.props.min), d(this.props.max));
135
+ return _(q(), b(this.props.min), b(this.props.max));
132
136
  }
133
- componentDidUpdate(l, e) {
137
+ componentDidUpdate(n, e) {
134
138
  this.shouldScroll = !1, this.indexToScroll !== void 0 && this.virtualization && this.virtualization[this.animate ? "animateToIndex" : "scrollToIndex"](this.indexToScroll), this.isActive && this.focusActiveDate(), this.lastView = this.props.activeView, this.indexToScroll = void 0;
135
139
  }
136
140
  render() {
141
+ const { activeView: n, min: e, max: s, service: t, unstyled: i } = this.props, l = i && i.uCalendar;
137
142
  this.calculateHeights();
138
- const l = this.lastView !== this.props.activeView, e = u(this.props.focusedDate, this.props.min, this.props.max), t = l ? this.props.service.skip(e, this.props.min) : this.state.skip, i = this.props.service.total(this.props.min, this.props.max), a = this.getTake(t, i), r = this.props.service.addToDate(this.props.min, t), v = this.props.service.addToDate(this.props.min, this.state.index), c = new Array(this.props.service.rowLength(this.weekNumber)).fill(""), m = this.props.activeView !== this.lastView;
139
- this.animateToIndex = !m, (m || !x(this.lastFocus, e) || this.shouldScroll || !this.props.shouldScroll || this.props.shouldScroll()) && (this.indexToScroll = this.props.service.skip(e, this.props.min)), this.lastFocus = e;
140
- const f = g(
141
- "k-calendar-view k-vstack",
142
- {
143
- "k-calendar-monthview": this.props.activeView === n.month,
144
- "k-calendar-yearview": this.props.activeView === n.year,
145
- "k-calendar-decadeview": this.props.activeView === n.decade,
146
- "k-calendar-centuryview": this.props.activeView === n.century
147
- }
148
- ), w = this.buildDates(c, this.props.service.datesList(r, a)), k = /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement(
149
- T,
143
+ const r = this.lastView !== n, h = g(this.props.focusedDate, e, s), u = r ? t.skip(h, e) : this.state.skip, v = t.total(e, s), D = this.getTake(u, v), x = t.addToDate(e, u), y = t.addToDate(e, this.state.index), w = new Array(t.rowLength(this.weekNumber)).fill(""), k = n !== this.lastView;
144
+ this.animateToIndex = !k, (k || !E(this.lastFocus, h) || this.shouldScroll || !this.props.shouldScroll || this.props.shouldScroll()) && (this.indexToScroll = this.props.service.skip(h, this.props.min)), this.lastFocus = h;
145
+ const S = p(m.view({
146
+ c: l,
147
+ month: n === c.month,
148
+ year: n === c.year,
149
+ decade: n === c.decade,
150
+ century: n === c.century
151
+ })), C = this.buildDates(w, t.datesList(x, D)), I = /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(
152
+ A,
150
153
  {
151
154
  key: "calendar-view-list-header",
152
- currentDate: v,
155
+ currentDate: y,
153
156
  min: this.props.min,
154
157
  max: this.props.max,
155
158
  activeView: this.props.activeView,
@@ -157,24 +160,26 @@ const H = 5, h = class h extends s.Component {
157
160
  service: this.props.service,
158
161
  headerTitle: this.props.headerTitle,
159
162
  header: this.props.header,
160
- commands: /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement(
161
- O,
163
+ unstyled: i,
164
+ commands: /* @__PURE__ */ a.createElement(
165
+ F,
162
166
  {
163
167
  min: this.props.min,
164
168
  max: this.props.max,
165
169
  onClick: this.handleTodayClick,
166
170
  disabled: !this.todayIsInRange,
167
- tabIndex: this.props.tabIndex
171
+ tabIndex: this.props.tabIndex,
172
+ unstyled: i
168
173
  }
169
- ))
174
+ )
170
175
  }
171
- ), this.props.activeView === n.month && this.buildMonthView(c, this.weekNames), /* @__PURE__ */ s.createElement(
172
- V,
176
+ ), this.props.activeView === c.month && this.buildMonthView(w, this.weekNames), /* @__PURE__ */ a.createElement(
177
+ H,
173
178
  {
174
179
  key: "calendar-view-list-content",
175
- skip: t,
180
+ skip: u,
176
181
  take: this.take,
177
- total: i,
182
+ total: v,
178
183
  itemHeight: this.viewHeight,
179
184
  topOffset: this.viewOffset,
180
185
  bottomOffset: this.bottomOffset,
@@ -183,23 +188,23 @@ const H = 5, h = class h extends s.Component {
183
188
  onScroll: this.props.onScroll,
184
189
  onScrollAction: this.handleScrollAction,
185
190
  onMount: this.handleVirtualizationMount,
186
- children: w,
191
+ children: C,
187
192
  tabIndex: this.props.tabIndex
188
193
  }
189
194
  ));
190
- return /* @__PURE__ */ s.createElement(
195
+ return /* @__PURE__ */ a.createElement(
191
196
  "div",
192
197
  {
193
- ref: (b) => {
194
- this._element = b;
198
+ ref: (V) => {
199
+ this._element = V;
195
200
  },
196
- className: f
201
+ className: S
197
202
  },
198
- this.props.dom.didCalculate ? k : null
203
+ this.props.dom.didCalculate ? I : null
199
204
  );
200
205
  }
201
206
  };
202
- h.propTypes = {
207
+ d.propTypes = {
203
208
  activeView: o.number.isRequired,
204
209
  bottomOffset: o.number,
205
210
  cellUID: o.string.isRequired,
@@ -215,14 +220,14 @@ h.propTypes = {
215
220
  viewOffset: o.number,
216
221
  weekDaysFormat: o.oneOf(["short", "abbreviated", "narrow"]),
217
222
  tabIndex: o.number
218
- }, h.defaultProps = {
219
- take: H,
223
+ }, d.defaultProps = {
224
+ take: M,
220
225
  showWeekNumbers: !1,
221
226
  weekDaysFormat: "short",
222
227
  smoothScroll: !0
223
228
  };
224
- let p = h;
225
- S(p);
229
+ let f = d;
230
+ O(f);
226
231
  export {
227
- p as ViewList
232
+ f as ViewList
228
233
  };
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";const i=require("react"),a=require("@progress/kendo-react-intl"),o=require("../messages/index.js"),l=require("@progress/kendo-react-common"),u=require("@progress/kendo-svg-icons");function p(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const c=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,c.get?c:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const r=p(i);class s extends r.Component{constructor(){super(...arguments),this.handelClick=e=>{e.stopPropagation();const{onClick:t}=this.props;t&&t.call(void 0,e)}}render(){const e=a.provideLocalizationService(this).toLanguageString(o.clear,o.messages[o.clear]);return r.createElement("span",{className:"k-clear-value",role:"button",onClick:this.handelClick,tabIndex:this.props.tabindex||-1,title:e,key:"clearbutton"},r.createElement(l.IconWrap,{name:"x",icon:u.xIcon}))}}a.registerForLocalization(s);module.exports=s;
8
+ "use client";"use strict";const d=require("react"),m=require("@progress/kendo-react-intl"),a=require("../messages/index.js"),o=require("@progress/kendo-react-common"),g=require("@progress/kendo-svg-icons");function p(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const c=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,c.get?c:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const l=p(d),b=e=>{const n=m.useLocalization(),t=o.useUnstyled(),c=t&&t.uDateInput,i=n.toLanguageString(a.clear,a.messages[a.clear]),u=s=>{s.stopPropagation();const{onClick:r}=e;r&&r.call(void 0,s)};return l.createElement("span",{className:o.classNames(o.uDateInput.clearButton({c})),role:"button",onClick:u,tabIndex:e.tabindex||-1,title:i,key:"clearbutton"},l.createElement(o.IconWrap,{name:"x",icon:g.xIcon}))};module.exports=b;
@@ -6,36 +6,30 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as e from "react";
10
- import { provideLocalizationService as a, registerForLocalization as n } from "@progress/kendo-react-intl";
11
- import { clear as r, messages as i } from "../messages/index.mjs";
12
- import { IconWrap as s } from "@progress/kendo-react-common";
13
- import { xIcon as c } from "@progress/kendo-svg-icons";
14
- class l extends e.Component {
15
- constructor() {
16
- super(...arguments), this.handelClick = (t) => {
17
- t.stopPropagation();
18
- const { onClick: o } = this.props;
19
- o && o.call(void 0, t);
20
- };
21
- }
22
- render() {
23
- const t = a(this).toLanguageString(r, i[r]);
24
- return /* @__PURE__ */ e.createElement(
25
- "span",
26
- {
27
- className: "k-clear-value",
28
- role: "button",
29
- onClick: this.handelClick,
30
- tabIndex: this.props.tabindex || -1,
31
- title: t,
32
- key: "clearbutton"
33
- },
34
- /* @__PURE__ */ e.createElement(s, { name: "x", icon: c })
35
- );
36
- }
37
- }
38
- n(l);
9
+ import * as a from "react";
10
+ import { useLocalization as m } from "@progress/kendo-react-intl";
11
+ import { clear as c, messages as u } from "../messages/index.mjs";
12
+ import { useUnstyled as p, classNames as d, uDateInput as f, IconWrap as g } from "@progress/kendo-react-common";
13
+ import { xIcon as x } from "@progress/kendo-svg-icons";
14
+ const y = (t) => {
15
+ const s = m(), e = p(), l = e && e.uDateInput, r = s.toLanguageString(c, u[c]), i = (o) => {
16
+ o.stopPropagation();
17
+ const { onClick: n } = t;
18
+ n && n.call(void 0, o);
19
+ };
20
+ return /* @__PURE__ */ a.createElement(
21
+ "span",
22
+ {
23
+ className: d(f.clearButton({ c: l })),
24
+ role: "button",
25
+ onClick: i,
26
+ tabIndex: t.tabindex || -1,
27
+ title: r,
28
+ key: "clearbutton"
29
+ },
30
+ /* @__PURE__ */ a.createElement(g, { name: "x", icon: x })
31
+ );
32
+ };
39
33
  export {
40
- l as default
34
+ y as default
41
35
  };