@progress/kendo-react-dateinputs 8.3.0-develop.5 → 8.3.0-develop.7

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
@@ -5,8 +5,8 @@
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 C=require("react"),a=require("prop-types"),u=require("@progress/kendo-react-common"),r=require("@progress/kendo-date-math"),V=require("@progress/kendo-react-intl"),k=require("../../package-metadata.js"),E=require("./ViewList.js"),I=require("./Navigation.js"),d=require("../models/CalendarViewEnum.js"),l=require("../../utils.js"),x=require("../services/BusViewService.js"),N=require("../services/DOMService.js"),O=require("../services/NavigationService.js"),M=require("../services/ScrollSyncService.js");function P(c){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const t in c)if(t!=="default"){const e=Object.getOwnPropertyDescriptor(c,t);Object.defineProperty(s,t,e.get?e:{enumerable:!0,get:()=>c[t]})}}return s.default=c,Object.freeze(s)}const m=P(C),g=c=>c?c.virtualization:null,D=(c=p.defaultProps.min,s=p.defaultProps.max,t,e)=>e!==void 0?e!==null&&l.isInRange(r.getDate(e),c,s)?e:null:t!==null&&l.isInRange(r.getDate(t),c,s)?t:null,h=class h extends m.Component{constructor(s){super(s),this.scrollSyncService=null,this.focusedDate=null,this.Navigation=null,this.calendarViewList=null,this._element=null,this.intl=null,this.service=null,this.isActive=!1,this.didNavigationChange=!1,this.focus=()=>{this._element&&this._element.focus()},this.shouldScroll=()=>this.didNavigationChange,this.handleScroll=e=>{this.scrollSyncService&&this.scrollSyncService.sync(g(this.Navigation),g(this.calendarViewList),e)},this.handleNavigationChange=e=>{if(this.props.disabled)return;this.didNavigationChange=!0;const i=r.cloneDate(e.value);this.setState({focusedDate:i})},this.handleViewChange=({view:e})=>{this.scrollSyncService&&this.scrollSyncService.configure(e),this.setState({activeView:e})},this.handleDateChange=e=>{const i=r.cloneDate(e.value),n=r.cloneDate(e.value),f=this.bus.canMoveDown(this.state.activeView);if(this.props.disabled)return;if(f)if(e.isTodayClick)this.bus.moveToBottom(this.state.activeView);else{this.bus.moveDown(this.state.activeView,e.syntheticEvent),this.setState({focusedDate:n});return}this.setState({value:i,focusedDate:n}),this.valueDuringOnChange=i;const{onChange:v}=this.props;if(v){const o={syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,value:i,target:this};v.call(void 0,o)}this.valueDuringOnChange=void 0},this.handleFocus=e=>{if(this.isActive=!0,!this.calendarViewList)return;this.calendarViewList.focusActiveDate();const{onFocus:i}=this.props;i&&i.call(void 0,e)},this.handleBlur=e=>{if(this.isActive=!1,!this.calendarViewList)return;this.calendarViewList.blurActiveDate();const{onBlur:i}=this.props;i&&i.call(void 0,e)},this.handleKeyDown=e=>{const{keyCode:n,ctrlKey:f,metaKey:v}=e;if(!(!this.focusedDate||!this.service)){if(n===84&&this.setState({focusedDate:l.getToday()}),(f||v)&&(n===u.Keys.left||n===u.Keys.right)){if(this.props.disabled)return;this.didNavigationChange=!0,this.focusedDate.getDate()===31&&this.focusedDate.setDate(30);const o=n===u.Keys.left?this.focusedDate.getMonth()-1:this.focusedDate.getMonth()+1,w=new Date(this.focusedDate.setMonth(o)),S=r.cloneDate(w);this.setState({focusedDate:S})}if(n===u.Keys.enter){if(this.value!==null&&r.isEqualDate(this.focusedDate,this.value)){const w=l.dateInRange(this.focusedDate,this.min,this.max);g(this.calendarViewList).scrollToIndex(this.service.skip(w,this.min))}const o={syntheticEvent:e,nativeEvent:e.nativeEvent,value:this.focusedDate,target:this};this.handleDateChange(o)}else{const o=l.dateInRange(this.navigation.move(this.focusedDate,this.navigation.action(e),this.state.activeView,this.service,e),this.min,this.max);if(r.isEqualDate(this.focusedDate,o))return;this.setState({focusedDate:o})}e.preventDefault()}},this.handleMouseDown=e=>{e.preventDefault()},this.handleClick=e=>{this._element&&this._element.focus({preventScroll:!0})},u.validatePackage(k.packageMetadata);const t=D(this.min,this.max,this.props.defaultValue||h.defaultProps.defaultValue,this.props.value);this.state={value:t,activeView:l.viewInRange(d.CalendarViewEnum[s.defaultActiveView],this.bottomView,this.topView),focusedDate:l.dateInRange(s.focusedDate||t||l.getToday(),this.min,this.max)},this.dom=new N.DOMService,this.bus=new x.BusViewService(this.handleViewChange),this.navigation=new O.NavigationService(this.bus),this.oldValue=t}get cellUID(){return this.props.id+"-cell-uid"}get id(){return this.props.id+"-id"}get element(){return this._element}get value(){return this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value}get min(){return r.getDate(this.props.min!==void 0?this.props.min:h.defaultProps.min)}get max(){return r.getDate(this.props.max!==void 0?this.props.max:h.defaultProps.max)}get bottomView(){return d.CalendarViewEnum[this.props.bottomView!==void 0?this.props.bottomView:h.defaultProps.bottomView]}get topView(){return d.CalendarViewEnum[this.props.topView!==void 0?this.props.topView:h.defaultProps.topView]}componentDidMount(){Promise.resolve().then(()=>{u.setScrollbarWidth(),this._element&&(this.dom.calculateHeights(this._element),this.scrollSyncService=new M.ScrollSyncService(this.dom),this.scrollSyncService.configure(this.state.activeView),this.forceUpdate())})}componentDidUpdate(s,t){u.setScrollbarWidth(),t.activeView!==this.state.activeView&&this.scrollSyncService&&this.scrollSyncService.configure(this.state.activeView),this.calendarViewList&&(this.isActive?this.calendarViewList.focusActiveDate:this.calendarViewList.blurActiveDate)(),this.didNavigationChange=!1,this.isActive&&(this.oldValue=this.value)}render(){this.props._ref&&this.props._ref(this);const s=this.value!==null&&this.oldValue!==null?!r.isEqualDate(this.value,this.oldValue):this.value!==this.oldValue,t=l.viewInRange(this.state.activeView,d.CalendarViewEnum[this.props.bottomView!==void 0?this.props.bottomView:h.defaultProps.bottomView],d.CalendarViewEnum[this.props.topView!==void 0?this.props.topView:h.defaultProps.topView]),e=D(this.min,this.max,this.value,this.value),i=e?r.getDate(e):null;this.focusedDate=r.getDate(l.dateInRange(s&&e!==null?e:this.state.focusedDate,this.min,this.max)),this.intl=V.provideIntlService(this),this.bus.configure(this.bottomView,this.topView),this.service=this.bus.service(t,this.intl);const{smoothScroll:n=Number.parseFloat(m.version)<18}=this.props,f=u.classNames("k-calendar k-calendar-infinite",{"k-disabled":this.props.disabled,"k-week-number":this.props.weekNumber},this.props.mobileMode?"k-calendar-lg":"k-calendar-md",this.props.className),v=[this.props.navigation&&m.createElement(I.Navigation,{key:0,ref:o=>{this.Navigation=o},activeView:this.state.activeView,focusedDate:this.focusedDate,min:this.min,max:this.max,onScroll:this.handleScroll,onChange:this.handleNavigationChange,service:this.service,dom:this.dom,navigationItem:this.props.navigationItem,tabIndex:this.props.tabIndex}),m.createElement(E.ViewList,{key:1,ref:o=>{this.calendarViewList=o},activeView:this.state.activeView,focusedDate:this.focusedDate,min:this.min,max:this.max,bus:this.bus,shouldScroll:this.shouldScroll,onScroll:this.handleScroll,service:this.service,cell:this.props.cell,weekCell:this.props.weekCell,dom:this.dom,smoothScroll:n,showWeekNumbers:this.props.weekNumber,onChange:this.handleDateChange,value:i,cellUID:this.cellUID,headerTitle:this.props.headerTitle,header:this.props.header,tabIndex:this.props.tabIndex,weekDaysFormat:this.props.weekDaysFormat,showOtherMonthDays:this.props.showOtherMonthDays})];return m.createElement("div",{ref:o=>{this._element=o},className:f,id:this.props.id||this.id,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,"aria-disabled":this.props.disabled,tabIndex:this.props.disabled?void 0:this.props.tabIndex||0,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onMouseDown:this.handleMouseDown,onClick:this.handleClick},v)}};h.displayName="Calendar",h.propTypes={className:a.string,defaultActiveView:a.oneOf(["month","year","decade","century"]),defaultValue:a.instanceOf(Date),disabled:a.bool,focusedDate:a.instanceOf(Date),id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,weekDaysFormat:a.oneOf(["short","abbreviated","narrow"]),max:a.instanceOf(Date),min:a.instanceOf(Date),navigation:a.bool,smoothScroll:a.bool,onBlur:a.func,onChange:a.func,onFocus:a.func,tabIndex:a.number,value:a.instanceOf(Date),weekNumber:a.bool,topView:(s,t,e)=>{const i=s[t],n=s.bottomView;return i&&n&&d.CalendarViewEnum[i]<d.CalendarViewEnum[n]?new Error(`Invalid prop + ${t} suplied to ${e}.
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("react"),a=require("prop-types"),r=require("@progress/kendo-react-common"),o=require("@progress/kendo-date-math"),S=require("@progress/kendo-react-intl"),P=require("../../package-metadata.js"),q=require("./ViewList.js"),A=require("./Navigation.js"),d=require("../models/CalendarViewEnum.js"),l=require("../../utils.js"),L=require("../services/BusViewService.js"),T=require("../services/DOMService.js"),B=require("../services/NavigationService.js"),R=require("../services/ScrollSyncService.js");function K(c){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const t in c)if(t!=="default"){const e=Object.getOwnPropertyDescriptor(c,t);Object.defineProperty(s,t,e.get?e:{enumerable:!0,get:()=>c[t]})}}return s.default=c,Object.freeze(s)}const g=K(M),b=c=>c?c.virtualization:null,y=(c=v.defaultProps.min,s=v.defaultProps.max,t,e)=>e!==void 0?e!==null&&l.isInRange(o.getDate(e),c,s)?e:null:t!==null&&l.isInRange(o.getDate(t),c,s)?t:null,h=class h extends g.Component{constructor(s){super(s),this.scrollSyncService=null,this.focusedDate=null,this.Navigation=null,this.calendarViewList=null,this._element=null,this.intl=null,this.service=null,this.isActive=!1,this.didNavigationChange=!1,this.focus=()=>{this._element&&this._element.focus()},this.shouldScroll=()=>this.didNavigationChange,this.handleScroll=e=>{this.scrollSyncService&&this.scrollSyncService.sync(b(this.Navigation),b(this.calendarViewList),e)},this.handleNavigationChange=e=>{if(this.props.disabled)return;this.didNavigationChange=!0;const i=o.cloneDate(e.value);this.setState({focusedDate:i})},this.handleViewChange=({view:e})=>{this.scrollSyncService&&this.scrollSyncService.configure(e),this.setState({activeView:e})},this.handleDateChange=e=>{const i=o.cloneDate(e.value),n=o.cloneDate(e.value),f=this.bus.canMoveDown(this.state.activeView);if(this.props.disabled)return;if(f)if(e.isTodayClick)this.bus.moveToBottom(this.state.activeView);else{this.bus.moveDown(this.state.activeView,e.syntheticEvent),this.setState({focusedDate:n});return}this.setState({value:i,focusedDate:n}),this.valueDuringOnChange=i;const{onChange:p}=this.props;if(p){const u={syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,value:i,target:this};p.call(void 0,u)}this.valueDuringOnChange=void 0},this.handleFocus=e=>{if(this.isActive=!0,!this.calendarViewList)return;this.calendarViewList.focusActiveDate();const{onFocus:i}=this.props;i&&i.call(void 0,e)},this.handleBlur=e=>{if(this.isActive=!1,!this.calendarViewList)return;this.calendarViewList.blurActiveDate();const{onBlur:i}=this.props;i&&i.call(void 0,e)},this.handleKeyDown=e=>{const{keyCode:n,ctrlKey:f,metaKey:p}=e;if(!(!this.focusedDate||!this.service)){if(n===84&&this.setState({focusedDate:l.getToday()}),(f||p)&&(n===r.Keys.left||n===r.Keys.right)){if(this.props.disabled)return;this.didNavigationChange=!0,this.focusedDate.getDate()===31&&this.focusedDate.setDate(30);const u=n===r.Keys.left?this.focusedDate.getMonth()-1:this.focusedDate.getMonth()+1,m=new Date(this.focusedDate.setMonth(u)),V=o.cloneDate(m);this.setState({focusedDate:V})}if(n===r.Keys.enter){if(this.value!==null&&o.isEqualDate(this.focusedDate,this.value)){const m=l.dateInRange(this.focusedDate,this.min,this.max);b(this.calendarViewList).scrollToIndex(this.service.skip(m,this.min))}const u={syntheticEvent:e,nativeEvent:e.nativeEvent,value:this.focusedDate,target:this};this.handleDateChange(u)}else{const u=l.dateInRange(this.navigation.move(this.focusedDate,this.navigation.action(e),this.state.activeView,this.service,e),this.min,this.max);if(o.isEqualDate(this.focusedDate,u))return;this.setState({focusedDate:u})}e.preventDefault()}},this.handleMouseDown=e=>{e.preventDefault()},this.handleClick=e=>{this._element&&this._element.focus({preventScroll:!0})},r.validatePackage(P.packageMetadata);const t=y(this.min,this.max,this.props.defaultValue||h.defaultProps.defaultValue,this.props.value);this.state={value:t,activeView:l.viewInRange(d.CalendarViewEnum[s.defaultActiveView],this.bottomView,this.topView),focusedDate:l.dateInRange(s.focusedDate||t||l.getToday(),this.min,this.max)},this.dom=new T.DOMService,this.bus=new L.BusViewService(this.handleViewChange),this.navigation=new B.NavigationService(this.bus),this.oldValue=t}get cellUID(){return this.props.id+"-cell-uid"}get id(){return this.props.id+"-id"}get element(){return this._element}get value(){return this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value}get min(){return o.getDate(this.props.min!==void 0?this.props.min:h.defaultProps.min)}get max(){return o.getDate(this.props.max!==void 0?this.props.max:h.defaultProps.max)}get bottomView(){return d.CalendarViewEnum[this.props.bottomView!==void 0?this.props.bottomView:h.defaultProps.bottomView]}get topView(){return d.CalendarViewEnum[this.props.topView!==void 0?this.props.topView:h.defaultProps.topView]}componentDidMount(){Promise.resolve().then(()=>{r.setScrollbarWidth(),this._element&&(this.dom.calculateHeights(this._element),this.scrollSyncService=new R.ScrollSyncService(this.dom),this.scrollSyncService.configure(this.state.activeView),this.forceUpdate())})}componentDidUpdate(s,t){r.setScrollbarWidth(),t.activeView!==this.state.activeView&&this.scrollSyncService&&this.scrollSyncService.configure(this.state.activeView),this.calendarViewList&&(this.isActive?this.calendarViewList.focusActiveDate:this.calendarViewList.blurActiveDate)(),this.didNavigationChange=!1,this.isActive&&(this.oldValue=this.value)}render(){const{_ref:s,unstyled:t,bottomView:e,topView:i,disabled:n,weekNumber:f,mobileMode:p,className:u}=this.props;s&&s(this);const m=t&&t.uCalendar,V=this.value!==null&&this.oldValue!==null?!o.isEqualDate(this.value,this.oldValue):this.value!==this.oldValue,I=l.viewInRange(this.state.activeView,d.CalendarViewEnum[e!==void 0?e:h.defaultProps.bottomView],d.CalendarViewEnum[i!==void 0?i:h.defaultProps.topView]),D=y(this.min,this.max,this.value,this.value),O=D?o.getDate(D):null;this.focusedDate=o.getDate(l.dateInRange(V&&D!==null?D:this.state.focusedDate,this.min,this.max)),this.intl=S.provideIntlService(this),this.bus.configure(this.bottomView,this.topView),this.service=this.bus.service(I,this.intl);const{smoothScroll:k=Number.parseFloat(g.version)<18}=this.props,x=r.classNames(r.uCalendar.wrapper({c:m,disabled:n,weekNumber:f,mobileMode:p}),u),N=[this.props.navigation&&g.createElement(A.Navigation,{key:0,ref:w=>{this.Navigation=w},activeView:this.state.activeView,focusedDate:this.focusedDate,min:this.min,max:this.max,onScroll:this.handleScroll,onChange:this.handleNavigationChange,service:this.service,dom:this.dom,navigationItem:this.props.navigationItem,tabIndex:this.props.tabIndex,unstyled:t}),g.createElement(q.ViewList,{key:1,ref:w=>{this.calendarViewList=w},activeView:this.state.activeView,focusedDate:this.focusedDate,min:this.min,max:this.max,bus:this.bus,shouldScroll:this.shouldScroll,onScroll:this.handleScroll,service:this.service,cell:this.props.cell,weekCell:this.props.weekCell,dom:this.dom,smoothScroll:k,showWeekNumbers:this.props.weekNumber,onChange:this.handleDateChange,value:O,cellUID:this.cellUID,headerTitle:this.props.headerTitle,header:this.props.header,tabIndex:this.props.tabIndex,weekDaysFormat:this.props.weekDaysFormat,showOtherMonthDays:this.props.showOtherMonthDays,unstyled:t})];return g.createElement("div",{ref:w=>{this._element=w},className:x,id:this.props.id||this.id,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,"aria-disabled":this.props.disabled,tabIndex:this.props.disabled?void 0:this.props.tabIndex||0,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onMouseDown:this.handleMouseDown,onClick:this.handleClick},N)}};h.displayName="Calendar",h.propTypes={className:a.string,defaultActiveView:a.oneOf(["month","year","decade","century"]),defaultValue:a.instanceOf(Date),disabled:a.bool,focusedDate:a.instanceOf(Date),id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,weekDaysFormat:a.oneOf(["short","abbreviated","narrow"]),max:a.instanceOf(Date),min:a.instanceOf(Date),navigation:a.bool,smoothScroll:a.bool,onBlur:a.func,onChange:a.func,onFocus:a.func,tabIndex:a.number,value:a.instanceOf(Date),weekNumber:a.bool,topView:(s,t,e)=>{const i=s[t],n=s.bottomView;return i&&n&&d.CalendarViewEnum[i]<d.CalendarViewEnum[n]?new Error(`Invalid prop + ${t} suplied to ${e}.
9
9
  ${t} can not be smaller than bottomView.
10
10
  `):null},bottomView:(s,t,e)=>{const i=s[t],n=s.topView;return i&&n&&d.CalendarViewEnum[i]>d.CalendarViewEnum[n]?new Error(`Invalid prop + ${t} suplied to ${e}.
11
11
  ${t} can not be bigger than topView.
12
- `):null}},h.defaultProps={disabled:!1,min:l.MIN_DATE,max:l.MAX_DATE,weekDaysFormat:"short",navigation:!0,defaultActiveView:"month",defaultValue:null,topView:"century",bottomView:"month",showOtherMonthDays:!1};let p=h;const b=u.createPropsContext(),y=u.withIdHOC(u.withPropsContext(b,p));y.displayName="KendoReactCalendar";V.registerForIntl(p);exports.Calendar=y;exports.CalendarPropsContext=b;exports.CalendarWithoutContext=p;
12
+ `):null}},h.defaultProps={disabled:!1,min:l.MIN_DATE,max:l.MAX_DATE,weekDaysFormat:"short",navigation:!0,defaultActiveView:"month",defaultValue:null,topView:"century",bottomView:"month",showOtherMonthDays:!1};let v=h;const C=r.createPropsContext(),E=r.withIdHOC(r.withPropsContext(C,r.withUnstyledHOC(v)));E.displayName="KendoReactCalendar";S.registerForIntl(v);exports.Calendar=E;exports.CalendarPropsContext=C;exports.CalendarWithoutContext=v;
@@ -6,97 +6,97 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as v from "react";
9
+ import * as f from "react";
10
10
  import s from "prop-types";
11
- import { Keys as m, validatePackage as I, setScrollbarWidth as b, classNames as N, createPropsContext as E, withIdHOC as O, withPropsContext as P } from "@progress/kendo-react-common";
12
- import { cloneDate as f, isEqualDate as D, getDate as c } from "@progress/kendo-date-math";
13
- import { provideIntlService as A, registerForIntl as M } from "@progress/kendo-react-intl";
14
- import { packageMetadata as L } from "../../package-metadata.mjs";
15
- import { ViewList as B } from "./ViewList.mjs";
16
- import { Navigation as T } from "./Navigation.mjs";
17
- import { CalendarViewEnum as h } from "../models/CalendarViewEnum.mjs";
18
- import { getToday as y, dateInRange as w, viewInRange as S, MIN_DATE as F, MAX_DATE as K, isInRange as C } from "../../utils.mjs";
19
- import { BusViewService as _ } from "../services/BusViewService.mjs";
20
- import { DOMService as $ } from "../services/DOMService.mjs";
21
- import { NavigationService as R } from "../services/NavigationService.mjs";
22
- import { ScrollSyncService as U } from "../services/ScrollSyncService.mjs";
23
- const V = (u) => u ? u.virtualization : null, k = (u = d.defaultProps.min, o = d.defaultProps.max, i, t) => t !== void 0 ? t !== null && C(c(t), u, o) ? t : null : i !== null && C(c(i), u, o) ? i : null, r = class r extends v.Component {
24
- constructor(o) {
25
- super(o), this.scrollSyncService = null, this.focusedDate = null, this.Navigation = null, this.calendarViewList = null, this._element = null, this.intl = null, this.service = null, this.isActive = !1, this.didNavigationChange = !1, this.focus = () => {
11
+ import { Keys as g, validatePackage as L, setScrollbarWidth as C, classNames as B, uCalendar as T, createPropsContext as F, withIdHOC as K, withPropsContext as U, withUnstyledHOC as $ } from "@progress/kendo-react-common";
12
+ import { cloneDate as D, isEqualDate as y, getDate as c } from "@progress/kendo-date-math";
13
+ import { provideIntlService as R, registerForIntl as _ } from "@progress/kendo-react-intl";
14
+ import { packageMetadata as Y } from "../../package-metadata.mjs";
15
+ import { ViewList as z } from "./ViewList.mjs";
16
+ import { Navigation as H } from "./Navigation.mjs";
17
+ import { CalendarViewEnum as r } from "../models/CalendarViewEnum.mjs";
18
+ import { getToday as x, dateInRange as V, viewInRange as I, MIN_DATE as q, MAX_DATE as X, isInRange as N } from "../../utils.mjs";
19
+ import { BusViewService as j } from "../services/BusViewService.mjs";
20
+ import { DOMService as G } from "../services/DOMService.mjs";
21
+ import { NavigationService as J } from "../services/NavigationService.mjs";
22
+ import { ScrollSyncService as Q } from "../services/ScrollSyncService.mjs";
23
+ const S = (u) => u ? u.virtualization : null, k = (u = d.defaultProps.min, a = d.defaultProps.max, e, t) => t !== void 0 ? t !== null && N(c(t), u, a) ? t : null : e !== null && N(c(e), u, a) ? e : null, n = class n extends f.Component {
24
+ constructor(a) {
25
+ super(a), this.scrollSyncService = null, this.focusedDate = null, this.Navigation = null, this.calendarViewList = null, this._element = null, this.intl = null, this.service = null, this.isActive = !1, this.didNavigationChange = !1, this.focus = () => {
26
26
  this._element && this._element.focus();
27
27
  }, this.shouldScroll = () => this.didNavigationChange, this.handleScroll = (t) => {
28
28
  this.scrollSyncService && this.scrollSyncService.sync(
29
- V(this.Navigation),
30
- V(this.calendarViewList),
29
+ S(this.Navigation),
30
+ S(this.calendarViewList),
31
31
  t
32
32
  );
33
33
  }, this.handleNavigationChange = (t) => {
34
34
  if (this.props.disabled)
35
35
  return;
36
36
  this.didNavigationChange = !0;
37
- const e = f(t.value);
38
- this.setState({ focusedDate: e });
37
+ const i = D(t.value);
38
+ this.setState({ focusedDate: i });
39
39
  }, this.handleViewChange = ({ view: t }) => {
40
40
  this.scrollSyncService && this.scrollSyncService.configure(t), this.setState({ activeView: t });
41
41
  }, this.handleDateChange = (t) => {
42
- const e = f(t.value), a = f(t.value), p = this.bus.canMoveDown(this.state.activeView);
42
+ const i = D(t.value), o = D(t.value), v = this.bus.canMoveDown(this.state.activeView);
43
43
  if (this.props.disabled)
44
44
  return;
45
- if (p)
45
+ if (v)
46
46
  if (t.isTodayClick)
47
47
  this.bus.moveToBottom(this.state.activeView);
48
48
  else {
49
- this.bus.moveDown(this.state.activeView, t.syntheticEvent), this.setState({ focusedDate: a });
49
+ this.bus.moveDown(this.state.activeView, t.syntheticEvent), this.setState({ focusedDate: o });
50
50
  return;
51
51
  }
52
- this.setState({ value: e, focusedDate: a }), this.valueDuringOnChange = e;
53
- const { onChange: l } = this.props;
54
- if (l) {
55
- const n = {
52
+ this.setState({ value: i, focusedDate: o }), this.valueDuringOnChange = i;
53
+ const { onChange: h } = this.props;
54
+ if (h) {
55
+ const l = {
56
56
  syntheticEvent: t.syntheticEvent,
57
57
  nativeEvent: t.nativeEvent,
58
- value: e,
58
+ value: i,
59
59
  target: this
60
60
  };
61
- l.call(void 0, n);
61
+ h.call(void 0, l);
62
62
  }
63
63
  this.valueDuringOnChange = void 0;
64
64
  }, this.handleFocus = (t) => {
65
65
  if (this.isActive = !0, !this.calendarViewList)
66
66
  return;
67
67
  this.calendarViewList.focusActiveDate();
68
- const { onFocus: e } = this.props;
69
- e && e.call(void 0, t);
68
+ const { onFocus: i } = this.props;
69
+ i && i.call(void 0, t);
70
70
  }, this.handleBlur = (t) => {
71
71
  if (this.isActive = !1, !this.calendarViewList)
72
72
  return;
73
73
  this.calendarViewList.blurActiveDate();
74
- const { onBlur: e } = this.props;
75
- e && e.call(void 0, t);
74
+ const { onBlur: i } = this.props;
75
+ i && i.call(void 0, t);
76
76
  }, this.handleKeyDown = (t) => {
77
- const { keyCode: a, ctrlKey: p, metaKey: l } = t;
77
+ const { keyCode: o, ctrlKey: v, metaKey: h } = t;
78
78
  if (!(!this.focusedDate || !this.service)) {
79
- if (a === 84 && this.setState({ focusedDate: y() }), (p || l) && (a === m.left || a === m.right)) {
79
+ if (o === 84 && this.setState({ focusedDate: x() }), (v || h) && (o === g.left || o === g.right)) {
80
80
  if (this.props.disabled)
81
81
  return;
82
82
  this.didNavigationChange = !0, this.focusedDate.getDate() === 31 && this.focusedDate.setDate(30);
83
- const n = a === m.left ? this.focusedDate.getMonth() - 1 : this.focusedDate.getMonth() + 1, g = new Date(this.focusedDate.setMonth(n)), x = f(g);
84
- this.setState({ focusedDate: x });
83
+ const l = o === g.left ? this.focusedDate.getMonth() - 1 : this.focusedDate.getMonth() + 1, p = new Date(this.focusedDate.setMonth(l)), b = D(p);
84
+ this.setState({ focusedDate: b });
85
85
  }
86
- if (a === m.enter) {
87
- if (this.value !== null && D(this.focusedDate, this.value)) {
88
- const g = w(this.focusedDate, this.min, this.max);
89
- V(this.calendarViewList).scrollToIndex(this.service.skip(g, this.min));
86
+ if (o === g.enter) {
87
+ if (this.value !== null && y(this.focusedDate, this.value)) {
88
+ const p = V(this.focusedDate, this.min, this.max);
89
+ S(this.calendarViewList).scrollToIndex(this.service.skip(p, this.min));
90
90
  }
91
- const n = {
91
+ const l = {
92
92
  syntheticEvent: t,
93
93
  nativeEvent: t.nativeEvent,
94
94
  value: this.focusedDate,
95
95
  target: this
96
96
  };
97
- this.handleDateChange(n);
97
+ this.handleDateChange(l);
98
98
  } else {
99
- const n = w(
99
+ const l = V(
100
100
  this.navigation.move(
101
101
  this.focusedDate,
102
102
  this.navigation.action(t),
@@ -107,9 +107,9 @@ const V = (u) => u ? u.virtualization : null, k = (u = d.defaultProps.min, o = d
107
107
  this.min,
108
108
  this.max
109
109
  );
110
- if (D(this.focusedDate, n))
110
+ if (y(this.focusedDate, l))
111
111
  return;
112
- this.setState({ focusedDate: n });
112
+ this.setState({ focusedDate: l });
113
113
  }
114
114
  t.preventDefault();
115
115
  }
@@ -117,26 +117,26 @@ const V = (u) => u ? u.virtualization : null, k = (u = d.defaultProps.min, o = d
117
117
  t.preventDefault();
118
118
  }, this.handleClick = (t) => {
119
119
  this._element && this._element.focus({ preventScroll: !0 });
120
- }, I(L);
121
- const i = k(
120
+ }, L(Y);
121
+ const e = k(
122
122
  this.min,
123
123
  this.max,
124
- this.props.defaultValue || r.defaultProps.defaultValue,
124
+ this.props.defaultValue || n.defaultProps.defaultValue,
125
125
  this.props.value
126
126
  );
127
127
  this.state = {
128
- value: i,
129
- activeView: S(
130
- h[o.defaultActiveView],
128
+ value: e,
129
+ activeView: I(
130
+ r[a.defaultActiveView],
131
131
  this.bottomView,
132
132
  this.topView
133
133
  ),
134
- focusedDate: w(
135
- o.focusedDate || i || y(),
134
+ focusedDate: V(
135
+ a.focusedDate || e || x(),
136
136
  this.min,
137
137
  this.max
138
138
  )
139
- }, this.dom = new $(), this.bus = new _(this.handleViewChange), this.navigation = new R(this.bus), this.oldValue = i;
139
+ }, this.dom = new G(), this.bus = new j(this.handleViewChange), this.navigation = new J(this.bus), this.oldValue = e;
140
140
  }
141
141
  get cellUID() {
142
142
  return this.props.id + "-cell-uid";
@@ -157,60 +157,61 @@ const V = (u) => u ? u.virtualization : null, k = (u = d.defaultProps.min, o = d
157
157
  return this.valueDuringOnChange !== void 0 ? this.valueDuringOnChange : this.props.value !== void 0 ? this.props.value : this.state.value;
158
158
  }
159
159
  get min() {
160
- return c(this.props.min !== void 0 ? this.props.min : r.defaultProps.min);
160
+ return c(this.props.min !== void 0 ? this.props.min : n.defaultProps.min);
161
161
  }
162
162
  get max() {
163
- return c(this.props.max !== void 0 ? this.props.max : r.defaultProps.max);
163
+ return c(this.props.max !== void 0 ? this.props.max : n.defaultProps.max);
164
164
  }
165
165
  get bottomView() {
166
- return h[this.props.bottomView !== void 0 ? this.props.bottomView : r.defaultProps.bottomView];
166
+ return r[this.props.bottomView !== void 0 ? this.props.bottomView : n.defaultProps.bottomView];
167
167
  }
168
168
  get topView() {
169
- return h[this.props.topView !== void 0 ? this.props.topView : r.defaultProps.topView];
169
+ return r[this.props.topView !== void 0 ? this.props.topView : n.defaultProps.topView];
170
170
  }
171
171
  /**
172
172
  * @hidden
173
173
  */
174
174
  componentDidMount() {
175
175
  Promise.resolve().then(() => {
176
- b(), this._element && (this.dom.calculateHeights(this._element), this.scrollSyncService = new U(this.dom), this.scrollSyncService.configure(this.state.activeView), this.forceUpdate());
176
+ C(), this._element && (this.dom.calculateHeights(this._element), this.scrollSyncService = new Q(this.dom), this.scrollSyncService.configure(this.state.activeView), this.forceUpdate());
177
177
  });
178
178
  }
179
179
  /**
180
180
  * @hidden
181
181
  */
182
- componentDidUpdate(o, i) {
183
- b(), i.activeView !== this.state.activeView && this.scrollSyncService && this.scrollSyncService.configure(this.state.activeView), this.calendarViewList && (this.isActive ? this.calendarViewList.focusActiveDate : this.calendarViewList.blurActiveDate)(), this.didNavigationChange = !1, this.isActive && (this.oldValue = this.value);
182
+ componentDidUpdate(a, e) {
183
+ C(), e.activeView !== this.state.activeView && this.scrollSyncService && this.scrollSyncService.configure(this.state.activeView), this.calendarViewList && (this.isActive ? this.calendarViewList.focusActiveDate : this.calendarViewList.blurActiveDate)(), this.didNavigationChange = !1, this.isActive && (this.oldValue = this.value);
184
184
  }
185
185
  /**
186
186
  * @hidden
187
187
  */
188
188
  render() {
189
- this.props._ref && this.props._ref(this);
190
- const o = this.value !== null && this.oldValue !== null ? !D(this.value, this.oldValue) : this.value !== this.oldValue, i = S(
189
+ const { _ref: a, unstyled: e, bottomView: t, topView: i, disabled: o, weekNumber: v, mobileMode: h, className: l } = this.props;
190
+ a && a(this);
191
+ const p = e && e.uCalendar, b = this.value !== null && this.oldValue !== null ? !y(this.value, this.oldValue) : this.value !== this.oldValue, E = I(
191
192
  this.state.activeView,
192
- h[this.props.bottomView !== void 0 ? this.props.bottomView : r.defaultProps.bottomView],
193
- h[this.props.topView !== void 0 ? this.props.topView : r.defaultProps.topView]
194
- ), t = k(this.min, this.max, this.value, this.value), e = t ? c(t) : null;
195
- this.focusedDate = c(w(
196
- o && t !== null ? t : this.state.focusedDate,
193
+ r[t !== void 0 ? t : n.defaultProps.bottomView],
194
+ r[i !== void 0 ? i : n.defaultProps.topView]
195
+ ), w = k(this.min, this.max, this.value, this.value), O = w ? c(w) : null;
196
+ this.focusedDate = c(V(
197
+ b && w !== null ? w : this.state.focusedDate,
197
198
  this.min,
198
199
  this.max
199
- )), this.intl = A(this), this.bus.configure(this.bottomView, this.topView), this.service = this.bus.service(i, this.intl);
200
- const { smoothScroll: a = Number.parseFloat(v.version) < 18 } = this.props, p = N(
201
- "k-calendar k-calendar-infinite",
202
- {
203
- "k-disabled": this.props.disabled,
204
- "k-week-number": this.props.weekNumber
205
- },
206
- this.props.mobileMode ? "k-calendar-lg" : "k-calendar-md",
207
- this.props.className
208
- ), l = [this.props.navigation && /* @__PURE__ */ v.createElement(
209
- T,
200
+ )), this.intl = R(this), this.bus.configure(this.bottomView, this.topView), this.service = this.bus.service(E, this.intl);
201
+ const { smoothScroll: P = Number.parseFloat(f.version) < 18 } = this.props, A = B(
202
+ T.wrapper({
203
+ c: p,
204
+ disabled: o,
205
+ weekNumber: v,
206
+ mobileMode: h
207
+ }),
208
+ l
209
+ ), M = [this.props.navigation && /* @__PURE__ */ f.createElement(
210
+ H,
210
211
  {
211
212
  key: 0,
212
- ref: (n) => {
213
- this.Navigation = n;
213
+ ref: (m) => {
214
+ this.Navigation = m;
214
215
  },
215
216
  activeView: this.state.activeView,
216
217
  focusedDate: this.focusedDate,
@@ -221,14 +222,15 @@ const V = (u) => u ? u.virtualization : null, k = (u = d.defaultProps.min, o = d
221
222
  service: this.service,
222
223
  dom: this.dom,
223
224
  navigationItem: this.props.navigationItem,
224
- tabIndex: this.props.tabIndex
225
+ tabIndex: this.props.tabIndex,
226
+ unstyled: e
225
227
  }
226
- ), /* @__PURE__ */ v.createElement(
227
- B,
228
+ ), /* @__PURE__ */ f.createElement(
229
+ z,
228
230
  {
229
231
  key: 1,
230
- ref: (n) => {
231
- this.calendarViewList = n;
232
+ ref: (m) => {
233
+ this.calendarViewList = m;
232
234
  },
233
235
  activeView: this.state.activeView,
234
236
  focusedDate: this.focusedDate,
@@ -241,25 +243,26 @@ const V = (u) => u ? u.virtualization : null, k = (u = d.defaultProps.min, o = d
241
243
  cell: this.props.cell,
242
244
  weekCell: this.props.weekCell,
243
245
  dom: this.dom,
244
- smoothScroll: a,
246
+ smoothScroll: P,
245
247
  showWeekNumbers: this.props.weekNumber,
246
248
  onChange: this.handleDateChange,
247
- value: e,
249
+ value: O,
248
250
  cellUID: this.cellUID,
249
251
  headerTitle: this.props.headerTitle,
250
252
  header: this.props.header,
251
253
  tabIndex: this.props.tabIndex,
252
254
  weekDaysFormat: this.props.weekDaysFormat,
253
- showOtherMonthDays: this.props.showOtherMonthDays
255
+ showOtherMonthDays: this.props.showOtherMonthDays,
256
+ unstyled: e
254
257
  }
255
258
  )];
256
- return /* @__PURE__ */ v.createElement(
259
+ return /* @__PURE__ */ f.createElement(
257
260
  "div",
258
261
  {
259
- ref: (n) => {
260
- this._element = n;
262
+ ref: (m) => {
263
+ this._element = m;
261
264
  },
262
- className: p,
265
+ className: A,
263
266
  id: this.props.id || this.id,
264
267
  "aria-labelledby": this.props.ariaLabelledBy,
265
268
  "aria-describedby": this.props.ariaDescribedBy,
@@ -271,11 +274,11 @@ const V = (u) => u ? u.virtualization : null, k = (u = d.defaultProps.min, o = d
271
274
  onMouseDown: this.handleMouseDown,
272
275
  onClick: this.handleClick
273
276
  },
274
- l
277
+ M
275
278
  );
276
279
  }
277
280
  };
278
- r.displayName = "Calendar", r.propTypes = {
281
+ n.displayName = "Calendar", n.propTypes = {
279
282
  className: s.string,
280
283
  defaultActiveView: s.oneOf(["month", "year", "decade", "century"]),
281
284
  defaultValue: s.instanceOf(Date),
@@ -295,26 +298,26 @@ r.displayName = "Calendar", r.propTypes = {
295
298
  tabIndex: s.number,
296
299
  value: s.instanceOf(Date),
297
300
  weekNumber: s.bool,
298
- topView: (o, i, t) => {
299
- const e = o[i], a = o.bottomView;
300
- return e && a && h[e] < h[a] ? new Error(
301
- `Invalid prop + ${i} suplied to ${t}.
302
- ${i} can not be smaller than bottomView.
301
+ topView: (a, e, t) => {
302
+ const i = a[e], o = a.bottomView;
303
+ return i && o && r[i] < r[o] ? new Error(
304
+ `Invalid prop + ${e} suplied to ${t}.
305
+ ${e} can not be smaller than bottomView.
303
306
  `
304
307
  ) : null;
305
308
  },
306
- bottomView: (o, i, t) => {
307
- const e = o[i], a = o.topView;
308
- return e && a && h[e] > h[a] ? new Error(
309
- `Invalid prop + ${i} suplied to ${t}.
310
- ${i} can not be bigger than topView.
309
+ bottomView: (a, e, t) => {
310
+ const i = a[e], o = a.topView;
311
+ return i && o && r[i] > r[o] ? new Error(
312
+ `Invalid prop + ${e} suplied to ${t}.
313
+ ${e} can not be bigger than topView.
311
314
  `
312
315
  ) : null;
313
316
  }
314
- }, r.defaultProps = {
317
+ }, n.defaultProps = {
315
318
  disabled: !1,
316
- min: F,
317
- max: K,
319
+ min: q,
320
+ max: X,
318
321
  weekDaysFormat: "short",
319
322
  navigation: !0,
320
323
  defaultActiveView: "month",
@@ -323,12 +326,17 @@ r.displayName = "Calendar", r.propTypes = {
323
326
  bottomView: "month",
324
327
  showOtherMonthDays: !1
325
328
  };
326
- let d = r;
327
- const Y = E(), z = O(P(Y, d));
328
- z.displayName = "KendoReactCalendar";
329
- M(d);
329
+ let d = n;
330
+ const Z = F(), W = K(
331
+ U(
332
+ Z,
333
+ $(d)
334
+ )
335
+ );
336
+ W.displayName = "KendoReactCalendar";
337
+ _(d);
330
338
  export {
331
- z as Calendar,
332
- Y as CalendarPropsContext,
339
+ W as Calendar,
340
+ Z as CalendarPropsContext,
333
341
  d as CalendarWithoutContext
334
342
  };
@@ -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 C=require("react"),O=require("@progress/kendo-react-common");function R(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>n[e]})}}return t.default=n,Object.freeze(t)}const l=R(C),y=(n,t)=>{const e=Object.getOwnPropertyNames(n),s=Object.getOwnPropertyNames(t);if(e.length!==s.length)return!1;for(let r=0;r<e.length;r++){const o=e[r];if(n[o]!==t[o])return!1}return!0};class N extends l.Component{constructor(){super(...arguments),this.handleClick=t=>{const{onClick:e,value:s}=this.props;e&&e.call(void 0,s,t)},this.handleMouseEnter=()=>{const{onMouseEnter:t,value:e}=this.props;t&&t.call(void 0,e)},this.handleMouseLeave=()=>{const{onMouseLeave:t,value:e}=this.props;t&&t.call(void 0,e)}}shouldComponentUpdate(t){const{value:e,...s}=this.props,{value:r,...o}=t;return!((!(e&&r)||e.getTime()===r.getTime())&&y(s,o))}render(){const{className:t,formattedValue:e,isWeekend:s,isFocused:r,isInRange:o,isSelected:d,isRangeStart:i,isRangeMid:p,isRangeEnd:c,isRangeSplitStart:h,isRangeSplitEnd:g,isToday:m,isDisabled:k,view:S,value:w,isOtherMonth:a,showOtherMonthDays:v,allowReverse:u,...f}=this.props,E=this.props.activeRangeEnd==="end"&&c,M=this.props.activeRangeEnd==="start"&&i,b=O.classNames("k-calendar-td",{"k-range-start":!a&&!u&&i,"k-range-end":!a&&!u&&c,"k-range-mid":!a&&p,"k-range-split-end":!a&&g,"k-range-split-start":!a&&h,"k-active":M||E,"k-state-pending-focus":r,"k-selected":!a&&(d||i||c),"k-today":!a&&m,"k-weekend":s,"k-disabled":k,"k-other-month":a},t);return!v&&a?l.createElement("td",{role:"gridcell",className:"k-empty k-calendar-td"}):l.createElement("td",{...f,className:b,onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},l.createElement("span",{className:"k-link"},this.props.children))}}exports.CalendarCell=N;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("react"),l=require("@progress/kendo-react-common");function N(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const e in a)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>a[e]})}}return t.default=a,Object.freeze(t)}const i=N(R),k=(a,t)=>{const e=Object.getOwnPropertyNames(a),s=Object.getOwnPropertyNames(t);if(e.length!==s.length)return!1;for(let r=0;r<e.length;r++){const o=e[r];if(a[o]!==t[o])return!1}return!0};class w extends i.Component{constructor(){super(...arguments),this.handleClick=t=>{const{onClick:e,value:s}=this.props;e&&e.call(void 0,s,t)},this.handleMouseEnter=()=>{const{onMouseEnter:t,value:e}=this.props;t&&t.call(void 0,e)},this.handleMouseLeave=()=>{const{onMouseLeave:t,value:e}=this.props;t&&t.call(void 0,e)}}shouldComponentUpdate(t){const{value:e,...s}=this.props,{value:r,...o}=t;return!((!(e&&r)||e.getTime()===r.getTime())&&k(s,o))}render(){const{className:t,formattedValue:e,isWeekend:s,isFocused:r,isInRange:o,isSelected:u,isRangeStart:c,isRangeMid:f,isRangeEnd:d,isRangeSplitStart:E,isRangeSplitEnd:C,isToday:M,isDisabled:S,view:P,value:j,isOtherMonth:n,showOtherMonthDays:p,allowReverse:h,unstyled:g,...b}=this.props,y=this.props.activeRangeEnd==="end"&&d,O=this.props.activeRangeEnd==="start"&&c,m=g&&g.uCalendar,v=l.classNames(l.uCalendar.td({c:m,rangeStart:!n&&!h&&c,rangeEnd:!n&&!h&&d,rangeMid:!n&&f,rangeSplitEnd:!n&&C,rangeSplitStart:!n&&E,active:O||y,focused:r,selected:!n&&(u||c||d),today:!n&&M,weekend:s,disabled:S,isOtherMonth:n,isEmpty:!p&&n}),t);return!p&&n?i.createElement("td",{role:"gridcell",className:v}):i.createElement("td",{...b,className:v,onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},i.createElement("span",{className:l.classNames(l.uCalendar.link({c:m}))},this.props.children))}}exports.CalendarCell=w;
@@ -7,8 +7,8 @@
7
7
  */
8
8
  "use client";
9
9
  import * as r from "react";
10
- import { classNames as C } from "@progress/kendo-react-common";
11
- const N = (l, e) => {
10
+ import { classNames as v, uCalendar as E } from "@progress/kendo-react-common";
11
+ const y = (l, e) => {
12
12
  const t = Object.getOwnPropertyNames(l), a = Object.getOwnPropertyNames(e);
13
13
  if (t.length !== a.length)
14
14
  return !1;
@@ -19,7 +19,7 @@ const N = (l, e) => {
19
19
  }
20
20
  return !0;
21
21
  };
22
- class P extends r.Component {
22
+ class L extends r.Component {
23
23
  constructor() {
24
24
  super(...arguments), this.handleClick = (e) => {
25
25
  const { onClick: t, value: a } = this.props;
@@ -41,13 +41,9 @@ class P extends r.Component {
41
41
  */
42
42
  shouldComponentUpdate(e) {
43
43
  const { value: t, ...a } = this.props, { value: n, ...o } = e;
44
- return !((!(t && n) || t.getTime() === n.getTime()) && N(a, o));
44
+ return !((!(t && n) || t.getTime() === n.getTime()) && y(a, o));
45
45
  }
46
46
  /* eslint-disable max-len */
47
- /**
48
- * @return
49
- * Returns a `<td />` element with a `<span className="k-link" />` inside to apply the styles. The text inside is the [`formattedValue`]({% slug api_dateinputs_calendarcellprops %}#toc-formattedvalue) of the `cell`.
50
- */
51
47
  render() {
52
48
  const {
53
49
  className: e,
@@ -57,49 +53,51 @@ class P extends r.Component {
57
53
  isInRange: o,
58
54
  isSelected: d,
59
55
  isRangeStart: i,
60
- isRangeMid: u,
56
+ isRangeMid: f,
61
57
  isRangeEnd: c,
62
- isRangeSplitStart: h,
63
- isRangeSplitEnd: m,
64
- isToday: g,
65
- isDisabled: k,
66
- view: w,
67
- value: y,
58
+ isRangeSplitStart: C,
59
+ isRangeSplitEnd: M,
60
+ isToday: R,
61
+ isDisabled: S,
62
+ view: O,
63
+ value: P,
68
64
  isOtherMonth: s,
69
- showOtherMonthDays: v,
70
- allowReverse: p,
71
- ...E
72
- } = this.props, f = this.props.activeRangeEnd === "end" && c, M = this.props.activeRangeEnd === "start" && i, R = C(
73
- "k-calendar-td",
74
- {
75
- "k-range-start": !s && !p && i,
76
- "k-range-end": !s && !p && c,
77
- "k-range-mid": !s && u,
78
- "k-range-split-end": !s && m,
79
- "k-range-split-start": !s && h,
80
- "k-active": M || f,
81
- "k-state-pending-focus": n,
82
- "k-selected": !s && (d || i || c),
83
- "k-today": !s && g,
84
- "k-weekend": a,
85
- "k-disabled": k,
86
- "k-other-month": s
87
- },
65
+ showOtherMonthDays: p,
66
+ allowReverse: u,
67
+ unstyled: h,
68
+ ...N
69
+ } = this.props, w = this.props.activeRangeEnd === "end" && c, k = this.props.activeRangeEnd === "start" && i, m = h && h.uCalendar, g = v(
70
+ E.td({
71
+ c: m,
72
+ rangeStart: !s && !u && i,
73
+ rangeEnd: !s && !u && c,
74
+ rangeMid: !s && f,
75
+ rangeSplitEnd: !s && M,
76
+ rangeSplitStart: !s && C,
77
+ active: k || w,
78
+ focused: n,
79
+ selected: !s && (d || i || c),
80
+ today: !s && R,
81
+ weekend: a,
82
+ disabled: S,
83
+ isOtherMonth: s,
84
+ isEmpty: !p && s
85
+ }),
88
86
  e
89
87
  );
90
- return !v && s ? /* @__PURE__ */ r.createElement("td", { role: "gridcell", className: "k-empty k-calendar-td" }) : /* @__PURE__ */ r.createElement(
88
+ return !p && s ? /* @__PURE__ */ r.createElement("td", { role: "gridcell", className: g }) : /* @__PURE__ */ r.createElement(
91
89
  "td",
92
90
  {
93
- ...E,
94
- className: R,
91
+ ...N,
92
+ className: g,
95
93
  onClick: this.handleClick,
96
94
  onMouseEnter: this.handleMouseEnter,
97
95
  onMouseLeave: this.handleMouseLeave
98
96
  },
99
- /* @__PURE__ */ r.createElement("span", { className: "k-link" }, this.props.children)
97
+ /* @__PURE__ */ r.createElement("span", { className: v(E.link({ c: m })) }, this.props.children)
100
98
  );
101
99
  }
102
100
  }
103
101
  export {
104
- P as CalendarCell
102
+ L as CalendarCell
105
103
  };
@@ -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 a=require("@progress/kendo-react-buttons"),c=require("react");function l(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const o=l(c);class i extends o.PureComponent{render(){const{view:r,...t}=this.props;return o.createElement(a.Button,{type:"button",fillMode:"flat",themeColor:"primary",...t},this.props.children)}}exports.CalendarHeaderTitle=i;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@progress/kendo-react-buttons"),a=require("react");function c(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const l=c(a),i=e=>{const{view:r,...t}=e;return l.createElement(o.Button,{type:"button",fillMode:"flat",themeColor:"primary",...t},e.children)};exports.CalendarHeaderTitle=i;