@progress/kendo-react-dateinputs 7.5.0-develop.2 → 7.5.0-develop.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/calendar/components/Calendar.js +2 -2
- package/calendar/components/Calendar.mjs +46 -40
- package/calendar/components/CalendarCell.js +1 -1
- package/calendar/components/CalendarCell.mjs +51 -48
- package/calendar/components/Header.js +1 -1
- package/calendar/components/Header.mjs +20 -19
- package/calendar/components/HorizontalViewList.js +1 -1
- package/calendar/components/HorizontalViewList.mjs +8 -5
- package/calendar/components/MultiViewCalendar.js +1 -1
- package/calendar/components/MultiViewCalendar.mjs +99 -93
- package/calendar/components/TodayCommand.js +1 -1
- package/calendar/components/TodayCommand.mjs +1 -1
- package/calendar/components/View.js +1 -1
- package/calendar/components/View.mjs +31 -29
- package/calendar/components/ViewList.js +1 -1
- package/calendar/components/ViewList.mjs +47 -45
- package/calendar/services/MonthViewService.js +1 -1
- package/calendar/services/MonthViewService.mjs +14 -16
- package/calendar/services/WeekNamesService.js +1 -1
- package/calendar/services/WeekNamesService.mjs +5 -5
- package/datepicker/DatePicker.js +1 -1
- package/datepicker/DatePicker.mjs +3 -0
- package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
- package/index.d.mts +63 -7
- package/index.d.ts +63 -7
- package/package-metadata.mjs +1 -1
- package/package.json +8 -8
- package/virtualization/Virtualization.js +1 -1
- package/virtualization/Virtualization.mjs +5 -6
- package/virtualization/services/RowHeightService.js +0 -8
- package/virtualization/services/RowHeightService.mjs +0 -50
|
@@ -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"),
|
|
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}.
|
|
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:
|
|
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;
|
|
@@ -8,19 +8,19 @@
|
|
|
8
8
|
"use client";
|
|
9
9
|
import * as v 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
|
|
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
12
|
import { cloneDate as f, isEqualDate as D, getDate as c } from "@progress/kendo-date-math";
|
|
13
|
-
import { provideIntlService as
|
|
14
|
-
import { packageMetadata as
|
|
13
|
+
import { provideIntlService as A, registerForIntl as M } from "@progress/kendo-react-intl";
|
|
14
|
+
import { packageMetadata as L } from "../../package-metadata.mjs";
|
|
15
15
|
import { ViewList as B } from "./ViewList.mjs";
|
|
16
16
|
import { Navigation as T } from "./Navigation.mjs";
|
|
17
|
-
import { CalendarViewEnum as
|
|
18
|
-
import { getToday as
|
|
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
19
|
import { BusViewService as _ } from "../services/BusViewService.mjs";
|
|
20
20
|
import { DOMService as $ } from "../services/DOMService.mjs";
|
|
21
21
|
import { NavigationService as R } from "../services/NavigationService.mjs";
|
|
22
22
|
import { ScrollSyncService as U } from "../services/ScrollSyncService.mjs";
|
|
23
|
-
const V = (u) => u ? u.virtualization : null,
|
|
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
24
|
constructor(o) {
|
|
25
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 = () => {
|
|
26
26
|
this._element && this._element.focus();
|
|
@@ -50,15 +50,15 @@ const V = (u) => u ? u.virtualization : null, x = (u = d.defaultProps.min, o = d
|
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
52
|
this.setState({ value: e, focusedDate: a }), this.valueDuringOnChange = e;
|
|
53
|
-
const { onChange:
|
|
54
|
-
if (
|
|
53
|
+
const { onChange: l } = this.props;
|
|
54
|
+
if (l) {
|
|
55
55
|
const n = {
|
|
56
56
|
syntheticEvent: t.syntheticEvent,
|
|
57
57
|
nativeEvent: t.nativeEvent,
|
|
58
58
|
value: e,
|
|
59
59
|
target: this
|
|
60
60
|
};
|
|
61
|
-
|
|
61
|
+
l.call(void 0, n);
|
|
62
62
|
}
|
|
63
63
|
this.valueDuringOnChange = void 0;
|
|
64
64
|
}, this.handleFocus = (t) => {
|
|
@@ -74,14 +74,14 @@ const V = (u) => u ? u.virtualization : null, x = (u = d.defaultProps.min, o = d
|
|
|
74
74
|
const { onBlur: e } = this.props;
|
|
75
75
|
e && e.call(void 0, t);
|
|
76
76
|
}, this.handleKeyDown = (t) => {
|
|
77
|
-
const { keyCode: a, ctrlKey: p, metaKey:
|
|
77
|
+
const { keyCode: a, ctrlKey: p, metaKey: l } = t;
|
|
78
78
|
if (!(!this.focusedDate || !this.service)) {
|
|
79
|
-
if (a === 84 && this.setState({ focusedDate:
|
|
79
|
+
if (a === 84 && this.setState({ focusedDate: y() }), (p || l) && (a === m.left || a === m.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)),
|
|
84
|
-
this.setState({ focusedDate:
|
|
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 });
|
|
85
85
|
}
|
|
86
86
|
if (a === m.enter) {
|
|
87
87
|
if (this.value !== null && D(this.focusedDate, this.value)) {
|
|
@@ -117,22 +117,22 @@ const V = (u) => u ? u.virtualization : null, x = (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(
|
|
121
|
-
const i =
|
|
120
|
+
}, I(L);
|
|
121
|
+
const i = k(
|
|
122
122
|
this.min,
|
|
123
123
|
this.max,
|
|
124
|
-
this.props.defaultValue ||
|
|
124
|
+
this.props.defaultValue || r.defaultProps.defaultValue,
|
|
125
125
|
this.props.value
|
|
126
126
|
);
|
|
127
127
|
this.state = {
|
|
128
128
|
value: i,
|
|
129
|
-
activeView:
|
|
130
|
-
|
|
129
|
+
activeView: S(
|
|
130
|
+
h[o.defaultActiveView],
|
|
131
131
|
this.bottomView,
|
|
132
132
|
this.topView
|
|
133
133
|
),
|
|
134
134
|
focusedDate: w(
|
|
135
|
-
o.focusedDate || i ||
|
|
135
|
+
o.focusedDate || i || y(),
|
|
136
136
|
this.min,
|
|
137
137
|
this.max
|
|
138
138
|
)
|
|
@@ -157,16 +157,16 @@ const V = (u) => u ? u.virtualization : null, x = (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 :
|
|
160
|
+
return c(this.props.min !== void 0 ? this.props.min : r.defaultProps.min);
|
|
161
161
|
}
|
|
162
162
|
get max() {
|
|
163
|
-
return c(this.props.max !== void 0 ? this.props.max :
|
|
163
|
+
return c(this.props.max !== void 0 ? this.props.max : r.defaultProps.max);
|
|
164
164
|
}
|
|
165
165
|
get bottomView() {
|
|
166
|
-
return
|
|
166
|
+
return h[this.props.bottomView !== void 0 ? this.props.bottomView : r.defaultProps.bottomView];
|
|
167
167
|
}
|
|
168
168
|
get topView() {
|
|
169
|
-
return
|
|
169
|
+
return h[this.props.topView !== void 0 ? this.props.topView : r.defaultProps.topView];
|
|
170
170
|
}
|
|
171
171
|
/**
|
|
172
172
|
* @hidden
|
|
@@ -187,16 +187,16 @@ const V = (u) => u ? u.virtualization : null, x = (u = d.defaultProps.min, o = d
|
|
|
187
187
|
*/
|
|
188
188
|
render() {
|
|
189
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 =
|
|
190
|
+
const o = this.value !== null && this.oldValue !== null ? !D(this.value, this.oldValue) : this.value !== this.oldValue, i = S(
|
|
191
191
|
this.state.activeView,
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
), t =
|
|
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
195
|
this.focusedDate = c(w(
|
|
196
196
|
o && t !== null ? t : this.state.focusedDate,
|
|
197
197
|
this.min,
|
|
198
198
|
this.max
|
|
199
|
-
)), this.intl =
|
|
199
|
+
)), this.intl = A(this), this.bus.configure(this.bottomView, this.topView), this.service = this.bus.service(i, this.intl);
|
|
200
200
|
const { smoothScroll: a = Number.parseFloat(v.version) < 18 } = this.props, p = N(
|
|
201
201
|
"k-calendar k-calendar-infinite",
|
|
202
202
|
{
|
|
@@ -205,7 +205,7 @@ const V = (u) => u ? u.virtualization : null, x = (u = d.defaultProps.min, o = d
|
|
|
205
205
|
},
|
|
206
206
|
this.props.mobileMode ? "k-calendar-lg" : "k-calendar-md",
|
|
207
207
|
this.props.className
|
|
208
|
-
),
|
|
208
|
+
), l = [this.props.navigation && /* @__PURE__ */ v.createElement(
|
|
209
209
|
T,
|
|
210
210
|
{
|
|
211
211
|
key: 0,
|
|
@@ -247,7 +247,10 @@ const V = (u) => u ? u.virtualization : null, x = (u = d.defaultProps.min, o = d
|
|
|
247
247
|
value: e,
|
|
248
248
|
cellUID: this.cellUID,
|
|
249
249
|
headerTitle: this.props.headerTitle,
|
|
250
|
-
|
|
250
|
+
header: this.props.header,
|
|
251
|
+
tabIndex: this.props.tabIndex,
|
|
252
|
+
weekDaysFormat: this.props.weekDaysFormat,
|
|
253
|
+
showOtherMonthDays: this.props.showOtherMonthDays
|
|
251
254
|
}
|
|
252
255
|
)];
|
|
253
256
|
return /* @__PURE__ */ v.createElement(
|
|
@@ -268,11 +271,11 @@ const V = (u) => u ? u.virtualization : null, x = (u = d.defaultProps.min, o = d
|
|
|
268
271
|
onMouseDown: this.handleMouseDown,
|
|
269
272
|
onClick: this.handleClick
|
|
270
273
|
},
|
|
271
|
-
|
|
274
|
+
l
|
|
272
275
|
);
|
|
273
276
|
}
|
|
274
277
|
};
|
|
275
|
-
|
|
278
|
+
r.displayName = "Calendar", r.propTypes = {
|
|
276
279
|
className: s.string,
|
|
277
280
|
defaultActiveView: s.oneOf(["month", "year", "decade", "century"]),
|
|
278
281
|
defaultValue: s.instanceOf(Date),
|
|
@@ -281,6 +284,7 @@ l.displayName = "Calendar", l.propTypes = {
|
|
|
281
284
|
id: s.string,
|
|
282
285
|
ariaLabelledBy: s.string,
|
|
283
286
|
ariaDescribedBy: s.string,
|
|
287
|
+
weekDaysFormat: s.oneOf(["short", "abbreviated", "narrow"]),
|
|
284
288
|
max: s.instanceOf(Date),
|
|
285
289
|
min: s.instanceOf(Date),
|
|
286
290
|
navigation: s.bool,
|
|
@@ -293,7 +297,7 @@ l.displayName = "Calendar", l.propTypes = {
|
|
|
293
297
|
weekNumber: s.bool,
|
|
294
298
|
topView: (o, i, t) => {
|
|
295
299
|
const e = o[i], a = o.bottomView;
|
|
296
|
-
return e && a &&
|
|
300
|
+
return e && a && h[e] < h[a] ? new Error(
|
|
297
301
|
`Invalid prop + ${i} suplied to ${t}.
|
|
298
302
|
${i} can not be smaller than bottomView.
|
|
299
303
|
`
|
|
@@ -301,24 +305,26 @@ l.displayName = "Calendar", l.propTypes = {
|
|
|
301
305
|
},
|
|
302
306
|
bottomView: (o, i, t) => {
|
|
303
307
|
const e = o[i], a = o.topView;
|
|
304
|
-
return e && a &&
|
|
308
|
+
return e && a && h[e] > h[a] ? new Error(
|
|
305
309
|
`Invalid prop + ${i} suplied to ${t}.
|
|
306
310
|
${i} can not be bigger than topView.
|
|
307
311
|
`
|
|
308
312
|
) : null;
|
|
309
313
|
}
|
|
310
|
-
},
|
|
314
|
+
}, r.defaultProps = {
|
|
311
315
|
disabled: !1,
|
|
312
|
-
min:
|
|
313
|
-
max:
|
|
316
|
+
min: F,
|
|
317
|
+
max: K,
|
|
318
|
+
weekDaysFormat: "short",
|
|
314
319
|
navigation: !0,
|
|
315
320
|
defaultActiveView: "month",
|
|
316
321
|
defaultValue: null,
|
|
317
322
|
topView: "century",
|
|
318
|
-
bottomView: "month"
|
|
323
|
+
bottomView: "month",
|
|
324
|
+
showOtherMonthDays: !1
|
|
319
325
|
};
|
|
320
|
-
let d =
|
|
321
|
-
const Y = E(), z = P(
|
|
326
|
+
let d = r;
|
|
327
|
+
const Y = E(), z = O(P(Y, d));
|
|
322
328
|
z.displayName = "KendoReactCalendar";
|
|
323
329
|
M(d);
|
|
324
330
|
export {
|
|
@@ -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
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),C=require("@progress/kendo-react-common");function O(s){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const e in s)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(s,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>s[e]})}}return t.default=s,Object.freeze(t)}const l=O(b),y=(s,t)=>{const e=Object.getOwnPropertyNames(s),n=Object.getOwnPropertyNames(t);if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++){const o=e[r];if(s[o]!==t[o])return!1}return!0};class R extends l.Component{constructor(){super(...arguments),this.handleClick=t=>{const{onClick:e,value:n}=this.props;e&&e.call(void 0,n,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,...n}=this.props,{value:r,...o}=t;return!((!(e&&r)||e.getTime()===r.getTime())&&y(n,o))}render(){const{className:t,formattedValue:e,isWeekend:n,isFocused:r,isInRange:o,isSelected:d,isRangeStart:i,isRangeMid:u,isRangeEnd:c,isRangeSplitStart:p,isRangeSplitEnd:h,isToday:g,isDisabled:m,view:N,value:S,isOtherMonth:a,showOtherMonthDays:k,...v}=this.props,f=this.props.activeRangeEnd==="end"&&c,E=this.props.activeRangeEnd==="start"&&i,M=C.classNames("k-calendar-td",{"k-range-end":!a&&c,"k-range-mid":!a&&u,"k-range-split-end":!a&&h,"k-range-split-start":!a&&p,"k-range-start":!a&&i,"k-active":E||f,"k-state-pending-focus":r,"k-selected":!a&&(d||i||c),"k-today":!a&&g,"k-weekend":n,"k-disabled":m,"k-other-month":a},t);return!k&&a?l.createElement("td",{role:"gridcell",className:"k-empty k-calendar-td"}):l.createElement("td",{...v,className:M,onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},l.createElement("span",{className:"k-link"},this.props.children))}}exports.CalendarCell=R;
|
|
@@ -6,30 +6,30 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
10
|
-
import { classNames as
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
9
|
+
import * as r from "react";
|
|
10
|
+
import { classNames as C } from "@progress/kendo-react-common";
|
|
11
|
+
const N = (i, e) => {
|
|
12
|
+
const t = Object.getOwnPropertyNames(i), a = Object.getOwnPropertyNames(e);
|
|
13
|
+
if (t.length !== a.length)
|
|
14
14
|
return !1;
|
|
15
|
-
for (let
|
|
16
|
-
const
|
|
17
|
-
if (o
|
|
15
|
+
for (let n = 0; n < t.length; n++) {
|
|
16
|
+
const o = t[n];
|
|
17
|
+
if (i[o] !== e[o])
|
|
18
18
|
return !1;
|
|
19
19
|
}
|
|
20
20
|
return !0;
|
|
21
21
|
};
|
|
22
|
-
class
|
|
22
|
+
class O extends r.Component {
|
|
23
23
|
constructor() {
|
|
24
24
|
super(...arguments), this.handleClick = (e) => {
|
|
25
|
-
const { onClick:
|
|
26
|
-
|
|
25
|
+
const { onClick: t, value: a } = this.props;
|
|
26
|
+
t && t.call(void 0, a, e);
|
|
27
27
|
}, this.handleMouseEnter = () => {
|
|
28
|
-
const { onMouseEnter: e, value:
|
|
29
|
-
e && e.call(void 0,
|
|
28
|
+
const { onMouseEnter: e, value: t } = this.props;
|
|
29
|
+
e && e.call(void 0, t);
|
|
30
30
|
}, this.handleMouseLeave = () => {
|
|
31
|
-
const { onMouseLeave: e, value:
|
|
32
|
-
e && e.call(void 0,
|
|
31
|
+
const { onMouseLeave: e, value: t } = this.props;
|
|
32
|
+
e && e.call(void 0, t);
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
// Manually checking if the component needs an update
|
|
@@ -40,8 +40,8 @@ class w extends l.Component {
|
|
|
40
40
|
* @hidden
|
|
41
41
|
*/
|
|
42
42
|
shouldComponentUpdate(e) {
|
|
43
|
-
const { value:
|
|
44
|
-
return !((!(
|
|
43
|
+
const { value: t, ...a } = this.props, { value: n, ...o } = e;
|
|
44
|
+
return !((!(t && n) || t.getTime() === n.getTime()) && N(a, o));
|
|
45
45
|
}
|
|
46
46
|
/* eslint-disable max-len */
|
|
47
47
|
/**
|
|
@@ -51,51 +51,54 @@ class w extends l.Component {
|
|
|
51
51
|
render() {
|
|
52
52
|
const {
|
|
53
53
|
className: e,
|
|
54
|
-
formattedValue:
|
|
55
|
-
isWeekend:
|
|
56
|
-
isFocused:
|
|
57
|
-
isInRange:
|
|
58
|
-
isSelected:
|
|
59
|
-
isRangeStart:
|
|
60
|
-
isRangeMid:
|
|
61
|
-
isRangeEnd:
|
|
62
|
-
isRangeSplitStart:
|
|
63
|
-
isRangeSplitEnd:
|
|
64
|
-
isToday:
|
|
54
|
+
formattedValue: t,
|
|
55
|
+
isWeekend: a,
|
|
56
|
+
isFocused: n,
|
|
57
|
+
isInRange: o,
|
|
58
|
+
isSelected: d,
|
|
59
|
+
isRangeStart: l,
|
|
60
|
+
isRangeMid: p,
|
|
61
|
+
isRangeEnd: c,
|
|
62
|
+
isRangeSplitStart: u,
|
|
63
|
+
isRangeSplitEnd: h,
|
|
64
|
+
isToday: m,
|
|
65
65
|
isDisabled: g,
|
|
66
|
-
view:
|
|
67
|
-
value:
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
view: R,
|
|
67
|
+
value: w,
|
|
68
|
+
isOtherMonth: s,
|
|
69
|
+
showOtherMonthDays: k,
|
|
70
|
+
...v
|
|
71
|
+
} = this.props, E = this.props.activeRangeEnd === "end" && c, f = this.props.activeRangeEnd === "start" && l, M = C(
|
|
70
72
|
"k-calendar-td",
|
|
71
73
|
{
|
|
72
|
-
"k-range-end":
|
|
73
|
-
"k-range-mid":
|
|
74
|
-
"k-range-split-end":
|
|
75
|
-
"k-range-split-start":
|
|
76
|
-
"k-range-start":
|
|
77
|
-
"k-active":
|
|
78
|
-
"k-state-pending-focus":
|
|
79
|
-
"k-selected":
|
|
80
|
-
"k-today":
|
|
81
|
-
"k-weekend":
|
|
82
|
-
"k-disabled": g
|
|
74
|
+
"k-range-end": !s && c,
|
|
75
|
+
"k-range-mid": !s && p,
|
|
76
|
+
"k-range-split-end": !s && h,
|
|
77
|
+
"k-range-split-start": !s && u,
|
|
78
|
+
"k-range-start": !s && l,
|
|
79
|
+
"k-active": f || E,
|
|
80
|
+
"k-state-pending-focus": n,
|
|
81
|
+
"k-selected": !s && (d || l || c),
|
|
82
|
+
"k-today": !s && m,
|
|
83
|
+
"k-weekend": a,
|
|
84
|
+
"k-disabled": g,
|
|
85
|
+
"k-other-month": s
|
|
83
86
|
},
|
|
84
87
|
e
|
|
85
88
|
);
|
|
86
|
-
return /* @__PURE__ */
|
|
89
|
+
return !k && s ? /* @__PURE__ */ r.createElement("td", { role: "gridcell", className: "k-empty k-calendar-td" }) : /* @__PURE__ */ r.createElement(
|
|
87
90
|
"td",
|
|
88
91
|
{
|
|
89
|
-
...
|
|
90
|
-
className:
|
|
92
|
+
...v,
|
|
93
|
+
className: M,
|
|
91
94
|
onClick: this.handleClick,
|
|
92
95
|
onMouseEnter: this.handleMouseEnter,
|
|
93
96
|
onMouseLeave: this.handleMouseLeave
|
|
94
97
|
},
|
|
95
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ r.createElement("span", { className: "k-link" }, this.props.children)
|
|
96
99
|
);
|
|
97
100
|
}
|
|
98
101
|
}
|
|
99
102
|
export {
|
|
100
|
-
|
|
103
|
+
O as CalendarCell
|
|
101
104
|
};
|
|
@@ -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
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),a=require("prop-types"),m=require("@progress/kendo-react-intl"),c=require("@progress/kendo-react-common"),g=require("./CalendarHeaderTitle.js"),p=require("../../utils.js");function v(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const s=v(d),i=class i extends s.Component{constructor(){super(...arguments),this.getTitle=()=>{if(!this.props.currentDate)return"";const e=this.rangeLength-1,t=this.props.service.title(this.props.currentDate),r=this.props.service.addToDate(this.props.currentDate,e);return e<1||!this.props.service.isInRange(r,this.min,this.max)?t:`${t} - ${this.props.service.title(r)}`},this.handleTitleClick=e=>{this.canMoveUp&&this.props.bus.moveUp(this.props.activeView,e)}}get min(){return this.props.min!==void 0?this.props.min:i.defaultProps.min}get max(){return this.props.max!==void 0?this.props.max:i.defaultProps.max}get rangeLength(){return this.props.rangeLength!==void 0?this.props.rangeLength:i.defaultProps.rangeLength}get canMoveUp(){return this.props.bus.canMoveUp(this.props.activeView)}render(){const e=this.getTitle(),t=c.classNames("k-calendar-title"),r={children:e,value:e,view:this.props.activeView,className:t,onClick:this.handleTitleClick,disabled:!this.canMoveUp},l={headerTitleProps:r,commands:this.props.commands},h=this.props.headerTitle?s.createElement(this.props.headerTitle,{...r},e):s.createElement(g.CalendarHeaderTitle,{...r},e),u=this.props.header?s.createElement(this.props.header,{...l}):s.createElement(s.Fragment,null,h,s.createElement("span",{className:"k-spacer"}),s.createElement("span",{className:"k-calendar-nav"},this.props.commands));return s.createElement("div",{className:c.classNames("k-calendar-header",{"k-vstack":this.props.verticalView})},u)}};i.propTypes={activeView:a.number.isRequired,currentDate:a.instanceOf(Date).isRequired,max:a.instanceOf(Date).isRequired,min:a.instanceOf(Date).isRequired,rangeLength:a.number},i.defaultProps={rangeLength:1,min:p.MIN_DATE,max:p.MAX_DATE};let o=i;m.registerForLocalization(o);exports.Header=o;
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
9
|
+
import * as t from "react";
|
|
10
10
|
import i from "prop-types";
|
|
11
|
-
import { registerForLocalization as
|
|
11
|
+
import { registerForLocalization as m } from "@progress/kendo-react-intl";
|
|
12
12
|
import { classNames as p } from "@progress/kendo-react-common";
|
|
13
|
-
import { CalendarHeaderTitle as
|
|
14
|
-
import { MIN_DATE as
|
|
15
|
-
const
|
|
13
|
+
import { CalendarHeaderTitle as l } from "./CalendarHeaderTitle.mjs";
|
|
14
|
+
import { MIN_DATE as d, MAX_DATE as u } from "../../utils.mjs";
|
|
15
|
+
const s = class s extends t.Component {
|
|
16
16
|
constructor() {
|
|
17
17
|
super(...arguments), this.getTitle = () => {
|
|
18
18
|
if (!this.props.currentDate)
|
|
@@ -24,13 +24,13 @@ const t = class t extends s.Component {
|
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
get min() {
|
|
27
|
-
return this.props.min !== void 0 ? this.props.min :
|
|
27
|
+
return this.props.min !== void 0 ? this.props.min : s.defaultProps.min;
|
|
28
28
|
}
|
|
29
29
|
get max() {
|
|
30
|
-
return this.props.max !== void 0 ? this.props.max :
|
|
30
|
+
return this.props.max !== void 0 ? this.props.max : s.defaultProps.max;
|
|
31
31
|
}
|
|
32
32
|
get rangeLength() {
|
|
33
|
-
return this.props.rangeLength !== void 0 ? this.props.rangeLength :
|
|
33
|
+
return this.props.rangeLength !== void 0 ? this.props.rangeLength : s.defaultProps.rangeLength;
|
|
34
34
|
}
|
|
35
35
|
get canMoveUp() {
|
|
36
36
|
return this.props.bus.canMoveUp(this.props.activeView);
|
|
@@ -45,33 +45,34 @@ const t = class t extends s.Component {
|
|
|
45
45
|
className: a,
|
|
46
46
|
onClick: this.handleTitleClick,
|
|
47
47
|
disabled: !this.canMoveUp
|
|
48
|
-
}, o =
|
|
49
|
-
|
|
48
|
+
}, o = {
|
|
49
|
+
headerTitleProps: r,
|
|
50
|
+
commands: this.props.commands
|
|
51
|
+
}, c = this.props.headerTitle ? /* @__PURE__ */ t.createElement(this.props.headerTitle, { ...r }, e) : /* @__PURE__ */ t.createElement(l, { ...r }, e), h = this.props.header ? /* @__PURE__ */ t.createElement(this.props.header, { ...o }) : /* @__PURE__ */ t.createElement(t.Fragment, null, c, /* @__PURE__ */ t.createElement("span", { className: "k-spacer" }), /* @__PURE__ */ t.createElement("span", { className: "k-calendar-nav" }, this.props.commands));
|
|
52
|
+
return /* @__PURE__ */ t.createElement(
|
|
50
53
|
"div",
|
|
51
54
|
{
|
|
52
55
|
className: p("k-calendar-header", {
|
|
53
56
|
"k-vstack": this.props.verticalView
|
|
54
57
|
})
|
|
55
58
|
},
|
|
56
|
-
|
|
57
|
-
/* @__PURE__ */ s.createElement("span", { className: "k-spacer" }),
|
|
58
|
-
/* @__PURE__ */ s.createElement("span", { className: "k-calendar-nav" }, this.props.commands)
|
|
59
|
+
h
|
|
59
60
|
);
|
|
60
61
|
}
|
|
61
62
|
};
|
|
62
|
-
|
|
63
|
+
s.propTypes = {
|
|
63
64
|
activeView: i.number.isRequired,
|
|
64
65
|
currentDate: i.instanceOf(Date).isRequired,
|
|
65
66
|
max: i.instanceOf(Date).isRequired,
|
|
66
67
|
min: i.instanceOf(Date).isRequired,
|
|
67
68
|
rangeLength: i.number
|
|
68
|
-
},
|
|
69
|
+
}, s.defaultProps = {
|
|
69
70
|
rangeLength: 1,
|
|
70
|
-
min:
|
|
71
|
-
max:
|
|
71
|
+
min: d,
|
|
72
|
+
max: u
|
|
72
73
|
};
|
|
73
|
-
let n =
|
|
74
|
-
|
|
74
|
+
let n = s;
|
|
75
|
+
m(n);
|
|
75
76
|
export {
|
|
76
77
|
n as Header
|
|
77
78
|
};
|
|
@@ -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
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react"),m=require("./View.js"),r=require("../models/CalendarViewEnum.js"),d=require("@progress/kendo-react-common"),v=require("@progress/kendo-date-math"),l=require("../../utils.js");function f(i){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const e in i)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(s,e,t.get?t:{enumerable:!0,get:()=>i[e]})}}return s.default=i,Object.freeze(s)}const n=f(p),h=2,a=class a extends n.Component{constructor(s){super(s),this._element=null,this.isActive=!1,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.rotateSelectionRange=e=>{if(e.start===null||e.end===null)return e;const t=e.end<e.start;return{start:t?e.end:e.start,end:t?e.start:e.end}},this.handleDateChange=(e,t=!1)=>{const{onChange:c}=this.props;if(c){const u={syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,value:v.cloneDate(e.value),target:this,isTodayClick:t};c.call(void 0,u)}}}get element(){return this._element}get weekNumber(){return!!(this.props.showWeekNumbers&&this.props.activeView===r.CalendarViewEnum.month)}get min(){return this.props.min!==void 0?this.props.min:a.defaultProps.min}get max(){return this.props.max!==void 0?this.props.max:a.defaultProps.max}componentDidUpdate(){this.isActive&&this.focusActiveDate()}render(){const s=this.props.allowReverse?this.rotateSelectionRange(this.props.selectionRange):this.props.selectionRange,e=d.classNames("k-calendar-view k-align-items-start k-justify-content-center",{"k-vstack":this.props.verticalView,"k-hstack":!this.props.verticalView,"k-calendar-monthview":this.props.activeView===r.CalendarViewEnum.month,"k-calendar-yearview":this.props.activeView===r.CalendarViewEnum.year,"k-calendar-decadeview":this.props.activeView===r.CalendarViewEnum.decade,"k-calendar-centuryview":this.props.activeView===r.CalendarViewEnum.century});return n.createElement("div",{ref:t=>{this._element=t},className:e},this.props.dates.map(t=>n.createElement("table",{className:"k-calendar-table",key:t.getTime(),role:"grid"},n.createElement(m.View,{bus:this.props.bus,weekDaysFormat:this.props.weekDaysFormat,service:this.props.service,key:t.getTime(),direction:"horizontal",activeView:this.props.activeView,cellUID:this.props.cellUID,viewDate:t,min:this.min,max:this.max,focusedDate:this.props.focusedDate,selectionRange:s,selectedDate:this.props.value,showWeekNumbers:this.weekNumber,onChange:this.handleDateChange,onCellEnter:this.props.onCellEnter,cell:this.props.cell,weekCell:this.props.weekCell,showOtherMonthDays:this.props.showOtherMonthDays}))))}};a.defaultProps={showWeekNumbers:!1,views:h,take:h,allowReverse:!0,weekDaysFormat:"short",min:l.MIN_DATE,max:l.MAX_DATE};let o=a;exports.HorizontalViewList=o;
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as r from "react";
|
|
10
|
-
import { View as
|
|
10
|
+
import { View as h } from "./View.mjs";
|
|
11
11
|
import { CalendarViewEnum as s } from "../models/CalendarViewEnum.mjs";
|
|
12
|
-
import { classNames as
|
|
12
|
+
import { classNames as p } from "@progress/kendo-react-common";
|
|
13
13
|
import { cloneDate as m } from "@progress/kendo-date-math";
|
|
14
14
|
import { MIN_DATE as u, MAX_DATE as v } from "../../utils.mjs";
|
|
15
15
|
const n = 2, i = class i extends r.Component {
|
|
@@ -62,7 +62,7 @@ const n = 2, i = class i extends r.Component {
|
|
|
62
62
|
this.isActive && this.focusActiveDate();
|
|
63
63
|
}
|
|
64
64
|
render() {
|
|
65
|
-
const a = this.props.allowReverse ? this.rotateSelectionRange(this.props.selectionRange) : this.props.selectionRange, e =
|
|
65
|
+
const a = this.props.allowReverse ? this.rotateSelectionRange(this.props.selectionRange) : this.props.selectionRange, e = p(
|
|
66
66
|
"k-calendar-view k-align-items-start k-justify-content-center",
|
|
67
67
|
{
|
|
68
68
|
"k-vstack": this.props.verticalView,
|
|
@@ -82,9 +82,10 @@ const n = 2, i = class i extends r.Component {
|
|
|
82
82
|
className: e
|
|
83
83
|
},
|
|
84
84
|
this.props.dates.map((t) => /* @__PURE__ */ r.createElement("table", { className: "k-calendar-table", key: t.getTime(), role: "grid" }, /* @__PURE__ */ r.createElement(
|
|
85
|
-
|
|
85
|
+
h,
|
|
86
86
|
{
|
|
87
87
|
bus: this.props.bus,
|
|
88
|
+
weekDaysFormat: this.props.weekDaysFormat,
|
|
88
89
|
service: this.props.service,
|
|
89
90
|
key: t.getTime(),
|
|
90
91
|
direction: "horizontal",
|
|
@@ -100,7 +101,8 @@ const n = 2, i = class i extends r.Component {
|
|
|
100
101
|
onChange: this.handleDateChange,
|
|
101
102
|
onCellEnter: this.props.onCellEnter,
|
|
102
103
|
cell: this.props.cell,
|
|
103
|
-
weekCell: this.props.weekCell
|
|
104
|
+
weekCell: this.props.weekCell,
|
|
105
|
+
showOtherMonthDays: this.props.showOtherMonthDays
|
|
104
106
|
}
|
|
105
107
|
)))
|
|
106
108
|
);
|
|
@@ -111,6 +113,7 @@ i.defaultProps = {
|
|
|
111
113
|
views: n,
|
|
112
114
|
take: n,
|
|
113
115
|
allowReverse: !0,
|
|
116
|
+
weekDaysFormat: "short",
|
|
114
117
|
min: u,
|
|
115
118
|
max: v
|
|
116
119
|
};
|