@progress/kendo-react-dateinputs 14.4.1 → 14.5.0-develop.1
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.d.ts +35 -110
- package/calendar/components/Calendar.js +5 -5
- package/calendar/components/Calendar.mjs +288 -313
- package/calendar/components/CalendarCell.d.ts +1 -10
- package/calendar/components/CalendarCell.js +1 -1
- package/calendar/components/CalendarCell.mjs +68 -78
- package/calendar/components/Header.d.ts +10 -23
- package/calendar/components/Header.js +1 -1
- package/calendar/components/Header.mjs +41 -55
- package/calendar/components/HorizontalViewList.d.ts +28 -26
- package/calendar/components/HorizontalViewList.js +1 -1
- package/calendar/components/HorizontalViewList.mjs +112 -102
- package/calendar/components/MultiViewCalendar.d.ts +39 -141
- package/calendar/components/MultiViewCalendar.js +1 -1
- package/calendar/components/MultiViewCalendar.mjs +331 -373
- package/calendar/components/Navigation.d.ts +19 -39
- package/calendar/components/Navigation.js +1 -1
- package/calendar/components/Navigation.mjs +95 -107
- package/calendar/components/TodayCommand.d.ts +8 -25
- package/calendar/components/TodayCommand.js +1 -1
- package/calendar/components/TodayCommand.mjs +44 -61
- package/calendar/components/View.d.ts +11 -42
- package/calendar/components/View.js +1 -1
- package/calendar/components/View.mjs +111 -137
- package/calendar/components/ViewList.d.ts +25 -65
- package/calendar/components/ViewList.js +1 -1
- package/calendar/components/ViewList.mjs +207 -225
- package/calendar/services/ScrollSyncService.d.ts +4 -4
- package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +8 -8
- package/virtualization/Virtualization.d.ts +25 -63
- package/virtualization/Virtualization.js +1 -1
- package/virtualization/Virtualization.mjs +163 -168
|
@@ -5,334 +5,309 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { ViewList as
|
|
14
|
-
import { Navigation as
|
|
15
|
-
import { CalendarViewEnum as
|
|
16
|
-
import {
|
|
17
|
-
import { BusViewService as
|
|
18
|
-
import { DOMService as
|
|
19
|
-
import { NavigationService as
|
|
20
|
-
import { ScrollSyncService as
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
8
|
+
import * as t from "react";
|
|
9
|
+
import n from "prop-types";
|
|
10
|
+
import { usePropsContext as Xe, useUnstyled as je, useId as Ge, setScrollbarWidth as re, classNames as Je, uCalendar as Qe, createPropsContext as Ze, Keys as N } from "@progress/kendo-react-common";
|
|
11
|
+
import { getDate as C, isEqualDate as H, cloneDate as I } from "@progress/kendo-date-math";
|
|
12
|
+
import { useInternationalization as et } from "@progress/kendo-react-intl";
|
|
13
|
+
import { ViewList as tt } from "./ViewList.mjs";
|
|
14
|
+
import { Navigation as nt } from "./Navigation.mjs";
|
|
15
|
+
import { CalendarViewEnum as y } from "../models/CalendarViewEnum.mjs";
|
|
16
|
+
import { MIN_DATE as rt, MAX_DATE as ot, dateInRange as B, getToday as oe, viewInRange as ae, isInRange as ce } from "../../utils.mjs";
|
|
17
|
+
import { BusViewService as at } from "../services/BusViewService.mjs";
|
|
18
|
+
import { DOMService as ct } from "../services/DOMService.mjs";
|
|
19
|
+
import { NavigationService as it } from "../services/NavigationService.mjs";
|
|
20
|
+
import { ScrollSyncService as st } from "../services/ScrollSyncService.mjs";
|
|
21
|
+
const W = (r) => r ? r.virtualization : null, ie = (r, o, a = i.min, u = i.max) => o !== void 0 ? o !== null && ce(C(o), a, u) ? o : null : r !== null && ce(C(r), a, u) ? r : null, i = {
|
|
22
|
+
disabled: !1,
|
|
23
|
+
min: rt,
|
|
24
|
+
max: ot,
|
|
25
|
+
weekDaysFormat: "short",
|
|
26
|
+
navigation: !0,
|
|
27
|
+
defaultActiveView: "month",
|
|
28
|
+
defaultValue: null,
|
|
29
|
+
topView: "century",
|
|
30
|
+
bottomView: "month",
|
|
31
|
+
showOtherMonthDays: !1
|
|
32
|
+
}, ut = Ze(), T = t.forwardRef((r, o) => {
|
|
33
|
+
const a = Xe(ut, r), u = je(), v = Ge(a.id), se = et(), {
|
|
34
|
+
disabled: R = i.disabled,
|
|
35
|
+
min: ue = i.min,
|
|
36
|
+
max: le = i.max,
|
|
37
|
+
weekDaysFormat: fe = i.weekDaysFormat,
|
|
38
|
+
navigation: de = i.navigation,
|
|
39
|
+
defaultActiveView: me = i.defaultActiveView,
|
|
40
|
+
defaultValue: ve = i.defaultValue,
|
|
41
|
+
topView: we = i.topView,
|
|
42
|
+
bottomView: De = i.bottomView,
|
|
43
|
+
showOtherMonthDays: he = i.showOtherMonthDays,
|
|
44
|
+
_ref: q,
|
|
45
|
+
unstyled: ge,
|
|
46
|
+
className: pe,
|
|
47
|
+
weekNumber: X,
|
|
48
|
+
mobileMode: be,
|
|
49
|
+
focusedDate: Ve,
|
|
50
|
+
value: F,
|
|
51
|
+
onChange: j,
|
|
52
|
+
onFocus: G,
|
|
53
|
+
onBlur: J,
|
|
54
|
+
cell: ye,
|
|
55
|
+
weekCell: Re,
|
|
56
|
+
headerTitle: Ce,
|
|
57
|
+
header: Ee,
|
|
58
|
+
tabIndex: K,
|
|
59
|
+
navigationItem: Se,
|
|
60
|
+
ariaLabelledBy: Ie,
|
|
61
|
+
ariaDescribedBy: ke
|
|
62
|
+
} = a, E = ge || u, d = C(ue), w = C(le), _ = y[De], $ = y[we], xe = v + "-cell-uid", Pe = a.id || v + "-id", Ae = ({ view: e }) => {
|
|
63
|
+
h.current && h.current.configure(e), V({ activeView: e });
|
|
64
|
+
}, Me = () => M.current, Q = (e) => {
|
|
65
|
+
h.current && h.current.sync(
|
|
66
|
+
W(ee.current),
|
|
67
|
+
W(s.current),
|
|
68
|
+
e
|
|
69
|
+
);
|
|
70
|
+
}, Oe = (e) => {
|
|
71
|
+
if (R)
|
|
72
|
+
return;
|
|
73
|
+
M.current = !0;
|
|
74
|
+
const g = I(e.value);
|
|
75
|
+
V({ focusedDate: g });
|
|
76
|
+
}, Z = (e) => {
|
|
77
|
+
const g = I(e.value), p = I(e.value), L = b.current.canMoveDown(l.activeView);
|
|
78
|
+
if (!R) {
|
|
79
|
+
if (L)
|
|
80
|
+
if (e.isTodayClick)
|
|
81
|
+
b.current.moveToBottom(l.activeView);
|
|
46
82
|
else {
|
|
47
|
-
|
|
83
|
+
b.current.moveDown(l.activeView, e.syntheticEvent), V({ focusedDate: p });
|
|
48
84
|
return;
|
|
49
85
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
value: i,
|
|
57
|
-
target: this
|
|
86
|
+
if (V({ value: g, focusedDate: p }), x.current = g, j) {
|
|
87
|
+
const U = {
|
|
88
|
+
syntheticEvent: e.syntheticEvent,
|
|
89
|
+
nativeEvent: e.nativeEvent,
|
|
90
|
+
value: g,
|
|
91
|
+
target: z.current
|
|
58
92
|
};
|
|
59
|
-
|
|
93
|
+
j(U);
|
|
60
94
|
}
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
if (o === D.enter) {
|
|
85
|
-
if (this.value !== null && y(this.focusedDate, this.value)) {
|
|
86
|
-
const p = V(this.focusedDate, this.min, this.max);
|
|
87
|
-
S(this.calendarViewList).scrollToIndex(this.service.skip(p, this.min));
|
|
88
|
-
}
|
|
89
|
-
const l = {
|
|
90
|
-
syntheticEvent: t,
|
|
91
|
-
nativeEvent: t.nativeEvent,
|
|
92
|
-
value: this.focusedDate,
|
|
93
|
-
target: this
|
|
94
|
-
};
|
|
95
|
-
this.handleDateChange(l);
|
|
96
|
-
} else {
|
|
97
|
-
const l = V(
|
|
98
|
-
this.navigation.move(
|
|
99
|
-
this.focusedDate,
|
|
100
|
-
this.navigation.action(t),
|
|
101
|
-
this.state.activeView,
|
|
102
|
-
this.service,
|
|
103
|
-
t
|
|
104
|
-
),
|
|
105
|
-
this.min,
|
|
106
|
-
this.max
|
|
107
|
-
);
|
|
108
|
-
if (y(this.focusedDate, l))
|
|
109
|
-
return;
|
|
110
|
-
this.setState({ focusedDate: l });
|
|
95
|
+
x.current = void 0;
|
|
96
|
+
}
|
|
97
|
+
}, Ne = (e) => {
|
|
98
|
+
P.current = !0, s.current && (s.current.focusActiveDate(), G && G(e));
|
|
99
|
+
}, Be = (e) => {
|
|
100
|
+
P.current = !1, s.current && (s.current.blurActiveDate(), J && J(e));
|
|
101
|
+
}, Te = (e) => {
|
|
102
|
+
const { keyCode: p, ctrlKey: L, metaKey: U } = e;
|
|
103
|
+
if (!(!m || !S)) {
|
|
104
|
+
if (p === 84 && V({ focusedDate: oe() }), (L || U) && (p === N.left || p === N.right)) {
|
|
105
|
+
if (R)
|
|
106
|
+
return;
|
|
107
|
+
M.current = !0;
|
|
108
|
+
const f = I(m);
|
|
109
|
+
f.getDate() === 31 && f.setDate(30);
|
|
110
|
+
const Y = p === N.left ? f.getMonth() - 1 : f.getMonth() + 1, qe = new Date(f.setMonth(Y));
|
|
111
|
+
V({ focusedDate: I(qe) });
|
|
112
|
+
}
|
|
113
|
+
if (p === N.enter) {
|
|
114
|
+
if (c !== null && H(m, c)) {
|
|
115
|
+
const Y = B(m, d, w);
|
|
116
|
+
W(s.current).scrollToIndex(S.skip(Y, d));
|
|
111
117
|
}
|
|
112
|
-
|
|
118
|
+
const f = {
|
|
119
|
+
syntheticEvent: e,
|
|
120
|
+
nativeEvent: e.nativeEvent,
|
|
121
|
+
value: m,
|
|
122
|
+
target: s.current
|
|
123
|
+
};
|
|
124
|
+
Z(f);
|
|
125
|
+
} else {
|
|
126
|
+
const f = B(
|
|
127
|
+
te.current.move(
|
|
128
|
+
m,
|
|
129
|
+
te.current.action(e),
|
|
130
|
+
l.activeView,
|
|
131
|
+
S,
|
|
132
|
+
e
|
|
133
|
+
),
|
|
134
|
+
d,
|
|
135
|
+
w
|
|
136
|
+
);
|
|
137
|
+
if (H(m, f))
|
|
138
|
+
return;
|
|
139
|
+
V({ focusedDate: f });
|
|
113
140
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
141
|
+
e.preventDefault();
|
|
142
|
+
}
|
|
143
|
+
}, Fe = (e) => {
|
|
144
|
+
e.preventDefault();
|
|
145
|
+
}, Ke = (e) => {
|
|
146
|
+
D.current && D.current.focus({ preventScroll: !0 });
|
|
147
|
+
}, z = t.useRef(null);
|
|
148
|
+
t.useImperativeHandle(
|
|
149
|
+
z,
|
|
150
|
+
() => ({
|
|
151
|
+
get element() {
|
|
152
|
+
return D.current;
|
|
153
|
+
},
|
|
154
|
+
get value() {
|
|
155
|
+
return c;
|
|
156
|
+
},
|
|
157
|
+
get props() {
|
|
158
|
+
return a;
|
|
159
|
+
},
|
|
160
|
+
focus: () => {
|
|
161
|
+
var e;
|
|
162
|
+
return (e = D.current) == null ? void 0 : e.focus();
|
|
163
|
+
}
|
|
164
|
+
})
|
|
165
|
+
), t.useImperativeHandle(o, () => z.current);
|
|
166
|
+
const D = t.useRef(null), ee = t.useRef(null), s = t.useRef(null), k = t.useRef(new ct()), b = t.useRef(new at(Ae)), te = t.useRef(new it(b.current)), h = t.useRef(null), x = t.useRef(void 0), P = t.useRef(!1), A = t.useRef(null), M = t.useRef(!1), [l, _e] = t.useState(() => {
|
|
167
|
+
const e = ie(ve, F, d, w);
|
|
168
|
+
return {
|
|
126
169
|
value: e,
|
|
127
|
-
activeView:
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
get cellUID() {
|
|
136
|
-
return this.props.id + "-cell-uid";
|
|
137
|
-
}
|
|
138
|
-
get id() {
|
|
139
|
-
return this.props.id + "-id";
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Gets the wrapping element of the Calendar.
|
|
143
|
-
*/
|
|
144
|
-
get element() {
|
|
145
|
-
return this._element;
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Gets the value of the Calendar.
|
|
149
|
-
*/
|
|
150
|
-
get value() {
|
|
151
|
-
return this.valueDuringOnChange !== void 0 ? this.valueDuringOnChange : this.props.value !== void 0 ? this.props.value : this.state.value;
|
|
152
|
-
}
|
|
153
|
-
get min() {
|
|
154
|
-
return c(this.props.min !== void 0 ? this.props.min : n.defaultProps.min);
|
|
155
|
-
}
|
|
156
|
-
get max() {
|
|
157
|
-
return c(this.props.max !== void 0 ? this.props.max : n.defaultProps.max);
|
|
158
|
-
}
|
|
159
|
-
get bottomView() {
|
|
160
|
-
return r[this.props.bottomView !== void 0 ? this.props.bottomView : n.defaultProps.bottomView];
|
|
161
|
-
}
|
|
162
|
-
get topView() {
|
|
163
|
-
return r[this.props.topView !== void 0 ? this.props.topView : n.defaultProps.topView];
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* @hidden
|
|
167
|
-
*/
|
|
168
|
-
componentDidMount() {
|
|
169
|
-
const { unstyled: a } = this.props;
|
|
170
|
+
activeView: ae(y[me], _, $),
|
|
171
|
+
focusedDate: B(Ve || e || oe(), d, w)
|
|
172
|
+
};
|
|
173
|
+
}), V = (e) => {
|
|
174
|
+
_e((g) => ({ ...g, ...e }));
|
|
175
|
+
}, [, $e] = t.useReducer((e) => e + 1, 0);
|
|
176
|
+
t.useEffect(() => {
|
|
170
177
|
Promise.resolve().then(() => {
|
|
171
|
-
|
|
178
|
+
re(), D.current && (k.current.calculateHeights(D.current, E), h.current = new st(k.current), h.current.configure(l.activeView), $e());
|
|
172
179
|
});
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
disabled: o,
|
|
198
|
-
weekNumber: v,
|
|
199
|
-
mobileMode: h
|
|
200
|
-
}),
|
|
201
|
-
l
|
|
202
|
-
), M = [
|
|
203
|
-
this.props.navigation && /* @__PURE__ */ f.createElement(
|
|
204
|
-
Y,
|
|
205
|
-
{
|
|
206
|
-
key: 0,
|
|
207
|
-
ref: (m) => {
|
|
208
|
-
this.Navigation = m;
|
|
209
|
-
},
|
|
210
|
-
activeView: this.state.activeView,
|
|
211
|
-
focusedDate: this.focusedDate,
|
|
212
|
-
min: this.min,
|
|
213
|
-
max: this.max,
|
|
214
|
-
onScroll: this.handleScroll,
|
|
215
|
-
onChange: this.handleNavigationChange,
|
|
216
|
-
service: this.service,
|
|
217
|
-
dom: this.dom,
|
|
218
|
-
navigationItem: this.props.navigationItem,
|
|
219
|
-
tabIndex: this.props.tabIndex,
|
|
220
|
-
unstyled: e
|
|
221
|
-
}
|
|
222
|
-
),
|
|
223
|
-
/* @__PURE__ */ f.createElement(
|
|
224
|
-
_,
|
|
225
|
-
{
|
|
226
|
-
key: 1,
|
|
227
|
-
ref: (m) => {
|
|
228
|
-
this.calendarViewList = m;
|
|
229
|
-
},
|
|
230
|
-
activeView: this.state.activeView,
|
|
231
|
-
focusedDate: this.focusedDate,
|
|
232
|
-
min: this.min,
|
|
233
|
-
max: this.max,
|
|
234
|
-
bus: this.bus,
|
|
235
|
-
shouldScroll: this.shouldScroll,
|
|
236
|
-
onScroll: this.handleScroll,
|
|
237
|
-
service: this.service,
|
|
238
|
-
cell: this.props.cell,
|
|
239
|
-
weekCell: this.props.weekCell,
|
|
240
|
-
dom: this.dom,
|
|
241
|
-
smoothScroll: A,
|
|
242
|
-
showWeekNumbers: this.props.weekNumber,
|
|
243
|
-
onChange: this.handleDateChange,
|
|
244
|
-
value: k,
|
|
245
|
-
cellUID: this.cellUID,
|
|
246
|
-
headerTitle: this.props.headerTitle,
|
|
247
|
-
header: this.props.header,
|
|
248
|
-
tabIndex: this.props.tabIndex,
|
|
249
|
-
weekDaysFormat: this.props.weekDaysFormat,
|
|
250
|
-
showOtherMonthDays: this.props.showOtherMonthDays,
|
|
251
|
-
unstyled: e
|
|
252
|
-
}
|
|
253
|
-
)
|
|
254
|
-
];
|
|
255
|
-
return /* @__PURE__ */ f.createElement(
|
|
256
|
-
"div",
|
|
180
|
+
}, []), t.useEffect(() => {
|
|
181
|
+
re(), h.current && h.current.configure(ne), s.current && (P.current ? s.current.focusActiveDate : s.current.blurActiveDate)(), M.current = !1, P.current && (A.current = c);
|
|
182
|
+
});
|
|
183
|
+
let c;
|
|
184
|
+
x.current !== void 0 ? c = x.current : F !== void 0 ? c = F : c = l.value;
|
|
185
|
+
const ze = E && E.uCalendar, Le = c !== null && A.current !== null ? !H(c, A.current) : c !== A.current, ne = ae(l.activeView, _, $), O = ie(c, c, d, w), Ue = O ? C(O) : null, m = C(
|
|
186
|
+
B(Le && O !== null ? O : l.focusedDate, d, w)
|
|
187
|
+
);
|
|
188
|
+
b.current.configure(_, $);
|
|
189
|
+
const S = b.current.service(ne, se), { smoothScroll: Ye = Number.parseFloat(t.version) < 18 } = a, He = Je(
|
|
190
|
+
Qe.wrapper({
|
|
191
|
+
c: ze,
|
|
192
|
+
disabled: R,
|
|
193
|
+
weekNumber: X,
|
|
194
|
+
mobileMode: be
|
|
195
|
+
}),
|
|
196
|
+
pe
|
|
197
|
+
);
|
|
198
|
+
t.useEffect(() => {
|
|
199
|
+
q && q({ element: D.current });
|
|
200
|
+
});
|
|
201
|
+
const We = [
|
|
202
|
+
de && /* @__PURE__ */ t.createElement(
|
|
203
|
+
nt,
|
|
257
204
|
{
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
205
|
+
key: 0,
|
|
206
|
+
ref: ee,
|
|
207
|
+
activeView: l.activeView,
|
|
208
|
+
focusedDate: m,
|
|
209
|
+
min: d,
|
|
210
|
+
max: w,
|
|
211
|
+
onScroll: Q,
|
|
212
|
+
onChange: Oe,
|
|
213
|
+
service: S,
|
|
214
|
+
dom: k.current,
|
|
215
|
+
navigationItem: Se,
|
|
216
|
+
tabIndex: K,
|
|
217
|
+
unstyled: E
|
|
218
|
+
}
|
|
219
|
+
),
|
|
220
|
+
/* @__PURE__ */ t.createElement(
|
|
221
|
+
tt,
|
|
222
|
+
{
|
|
223
|
+
key: 1,
|
|
224
|
+
ref: s,
|
|
225
|
+
activeView: l.activeView,
|
|
226
|
+
focusedDate: m,
|
|
227
|
+
min: d,
|
|
228
|
+
max: w,
|
|
229
|
+
bus: b.current,
|
|
230
|
+
shouldScroll: Me,
|
|
231
|
+
onScroll: Q,
|
|
232
|
+
service: S,
|
|
233
|
+
cell: ye,
|
|
234
|
+
weekCell: Re,
|
|
235
|
+
dom: k.current,
|
|
236
|
+
smoothScroll: Ye,
|
|
237
|
+
showWeekNumbers: X,
|
|
238
|
+
onChange: Z,
|
|
239
|
+
value: Ue,
|
|
240
|
+
cellUID: xe,
|
|
241
|
+
headerTitle: Ce,
|
|
242
|
+
header: Ee,
|
|
243
|
+
tabIndex: K,
|
|
244
|
+
weekDaysFormat: fe,
|
|
245
|
+
showOtherMonthDays: he,
|
|
246
|
+
unstyled: E
|
|
247
|
+
}
|
|
248
|
+
)
|
|
249
|
+
];
|
|
250
|
+
return /* @__PURE__ */ t.createElement(
|
|
251
|
+
"div",
|
|
252
|
+
{
|
|
253
|
+
ref: D,
|
|
254
|
+
className: He,
|
|
255
|
+
id: Pe,
|
|
256
|
+
"aria-labelledby": Ie,
|
|
257
|
+
"aria-describedby": ke,
|
|
258
|
+
"aria-disabled": R,
|
|
259
|
+
tabIndex: R ? void 0 : K || 0,
|
|
260
|
+
onFocus: Ne,
|
|
261
|
+
onBlur: Be,
|
|
262
|
+
onKeyDown: Te,
|
|
263
|
+
onMouseDown: Fe,
|
|
264
|
+
onClick: Ke
|
|
265
|
+
},
|
|
266
|
+
We
|
|
267
|
+
);
|
|
268
|
+
});
|
|
269
|
+
T.propTypes = {
|
|
270
|
+
className: n.string,
|
|
271
|
+
defaultActiveView: n.oneOf(["month", "year", "decade", "century"]),
|
|
272
|
+
defaultValue: n.instanceOf(Date),
|
|
273
|
+
disabled: n.bool,
|
|
274
|
+
focusedDate: n.instanceOf(Date),
|
|
275
|
+
id: n.string,
|
|
276
|
+
ariaLabelledBy: n.string,
|
|
277
|
+
ariaDescribedBy: n.string,
|
|
278
|
+
weekDaysFormat: n.oneOf(["short", "abbreviated", "narrow"]),
|
|
279
|
+
max: n.instanceOf(Date),
|
|
280
|
+
min: n.instanceOf(Date),
|
|
281
|
+
navigation: n.bool,
|
|
282
|
+
smoothScroll: n.bool,
|
|
283
|
+
onBlur: n.func,
|
|
284
|
+
onChange: n.func,
|
|
285
|
+
onFocus: n.func,
|
|
286
|
+
tabIndex: n.number,
|
|
287
|
+
value: n.instanceOf(Date),
|
|
288
|
+
weekNumber: n.bool,
|
|
289
|
+
topView: (r, o, a) => {
|
|
290
|
+
const u = r[o], v = r.bottomView;
|
|
291
|
+
return u && v && y[u] < y[v] ? new Error(
|
|
292
|
+
`Invalid prop + ${o} suplied to ${a}.
|
|
293
|
+
${o} can not be smaller than bottomView.
|
|
294
|
+
`
|
|
303
295
|
) : null;
|
|
304
296
|
},
|
|
305
|
-
bottomView: (
|
|
306
|
-
const
|
|
307
|
-
return
|
|
308
|
-
`Invalid prop + ${
|
|
309
|
-
|
|
310
|
-
|
|
297
|
+
bottomView: (r, o, a) => {
|
|
298
|
+
const u = r[o], v = r.topView;
|
|
299
|
+
return u && v && y[u] > y[v] ? new Error(
|
|
300
|
+
`Invalid prop + ${o} suplied to ${a}.
|
|
301
|
+
${o} can not be bigger than topView.
|
|
302
|
+
`
|
|
311
303
|
) : null;
|
|
312
304
|
}
|
|
313
|
-
}, n.defaultProps = {
|
|
314
|
-
disabled: !1,
|
|
315
|
-
min: H,
|
|
316
|
-
max: z,
|
|
317
|
-
weekDaysFormat: "short",
|
|
318
|
-
navigation: !0,
|
|
319
|
-
defaultActiveView: "month",
|
|
320
|
-
defaultValue: null,
|
|
321
|
-
topView: "century",
|
|
322
|
-
bottomView: "month",
|
|
323
|
-
showOtherMonthDays: !1
|
|
324
305
|
};
|
|
325
|
-
|
|
326
|
-
const
|
|
327
|
-
B(
|
|
328
|
-
J,
|
|
329
|
-
T(d)
|
|
330
|
-
)
|
|
331
|
-
);
|
|
332
|
-
Q.displayName = "KendoReactCalendar";
|
|
333
|
-
R(d);
|
|
306
|
+
T.displayName = "KendoReactCalendar";
|
|
307
|
+
const yt = T, Rt = T;
|
|
334
308
|
export {
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
309
|
+
Rt as Calendar,
|
|
310
|
+
ut as CalendarPropsContext,
|
|
311
|
+
yt as CalendarWithoutContext,
|
|
312
|
+
i as calendarDefaultProps
|
|
338
313
|
};
|
|
@@ -59,13 +59,4 @@ export interface CalendarCellProps extends CellContext {
|
|
|
59
59
|
* * [Customizing the cells inside the Calendar view](https://www.telerik.com/kendo-react-ui/components/dateinputs/calendar/custom-rendering#toc-cells-inside-the-view)
|
|
60
60
|
* * [Customizing the cells inside the MultiViewCalendar view](https://www.telerik.com/kendo-react-ui/components/dateinputs/multiviewcalendar/custom-rendering#toc-cells-inside-the-view)
|
|
61
61
|
*/
|
|
62
|
-
export declare
|
|
63
|
-
/**
|
|
64
|
-
* @hidden
|
|
65
|
-
*/
|
|
66
|
-
shouldComponentUpdate(nextProps: CalendarCellProps): boolean;
|
|
67
|
-
render(): React.JSX.Element;
|
|
68
|
-
private handleClick;
|
|
69
|
-
private handleMouseEnter;
|
|
70
|
-
private handleMouseLeave;
|
|
71
|
-
}
|
|
62
|
+
export declare const CalendarCell: React.NamedExoticComponent<CalendarCellProps>;
|
|
@@ -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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("react"),l=require("@progress/kendo-react-common");function _(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,s.get?s:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const c=_(V),x=(e,n)=>{const t=Object.getOwnPropertyNames(e),s=Object.getOwnPropertyNames(n);if(t.length!==s.length)return!1;for(let r=0;r<t.length;r++){const o=t[r];if(e[o]!==n[o])return!1}return!0},A=c.memo(e=>{const{className:n,formattedValue:t,isWeekend:s,isFocused:r,isInRange:o,isSelected:g,isRangeStart:i,isRangeMid:b,isRangeEnd:u,isRangeSplitStart:y,isRangeSplitEnd:M,isToday:O,isDisabled:N,view:z,value:d,isOtherMonth:a,showOtherMonthDays:m,allowReverse:p,unstyled:f,activeRangeEnd:v,children:k,onClick:E,onMouseEnter:S,onMouseLeave:h,...P}=e,j=L=>{E&&E(d,L)},w=()=>{S&&S(d)},T=()=>{h&&h(d)},q=v==="end"&&u,D=v==="start"&&i,C=f&&f.uCalendar,R=l.classNames(l.uCalendar.td({c:C,rangeStart:!a&&!p&&i,rangeEnd:!a&&!p&&u,rangeMid:!a&&b,rangeSplitEnd:!a&&M,rangeSplitStart:!a&&y,active:D||q,focused:r,selected:!a&&(g||i||u),today:!a&&O,weekend:s,disabled:N,isOtherMonth:a,isEmpty:!m&&a}),n);return!m&&a?c.createElement("td",{role:"gridcell",className:R}):c.createElement("td",{...P,className:R,onClick:j,onMouseEnter:w,onMouseLeave:T},c.createElement("span",{className:l.classNames(l.uCalendar.link({c:C}))},k))},(e,n)=>{const{value:t,...s}=e,{value:r,...o}=n;return(!(t&&r)||t.getTime()===r.getTime())&&x(s,o)});exports.CalendarCell=A;
|