@jetbrains/ring-ui-built 7.0.106 → 7.0.108
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/components/_helpers/date-picker.js +1 -1
- package/components/_helpers/theme.js +15 -14
- package/components/alert-service/alert-service.d.ts +2 -2
- package/components/alert-service/alert-service.js +2 -2
- package/components/auth/auth-core.js +1 -0
- package/components/auth/auth.js +1 -0
- package/components/auth/iframe-flow.js +1 -0
- package/components/auth/token-validator.js +1 -0
- package/components/auth-dialog/auth-dialog.js +1 -0
- package/components/auth-dialog-service/auth-dialog-service.js +1 -0
- package/components/avatar/avatar.js +1 -0
- package/components/avatar-stack/avatar-stack.js +1 -0
- package/components/banner/banner.js +1 -0
- package/components/button-group/button-group.js +18 -1
- package/components/components/util-stories.js +3 -0
- package/components/confirm/confirm.js +1 -0
- package/components/confirm-service/confirm-service.js +1 -0
- package/components/data-list/data-list.js +1 -0
- package/components/data-list/selection.js +1 -0
- package/components/date-picker/animate-date.d.ts +1 -0
- package/components/date-picker/animate-date.js +39 -0
- package/components/date-picker/consts.d.ts +21 -4
- package/components/date-picker/consts.js +18 -1
- package/components/date-picker/date-picker.d.ts +48 -1
- package/components/date-picker/date-picker.js +44 -17
- package/components/date-picker/date-popup.d.ts +3 -9
- package/components/date-picker/date-popup.js +59 -72
- package/components/date-picker/day.js +24 -15
- package/components/date-picker/month-names.js +76 -72
- package/components/date-picker/month-slider.d.ts +5 -20
- package/components/date-picker/month-slider.js +129 -47
- package/components/date-picker/month.d.ts +4 -0
- package/components/date-picker/month.js +81 -76
- package/components/date-picker/months.js +75 -191
- package/components/date-picker/scroll-arith.d.ts +35 -0
- package/components/date-picker/scroll-arith.js +74 -0
- package/components/date-picker/use-intersection-observer.d.ts +6 -0
- package/components/date-picker/use-intersection-observer.js +93 -0
- package/components/date-picker/use-scroll-behavior.d.ts +8 -0
- package/components/date-picker/use-scroll-behavior.js +223 -0
- package/components/date-picker/weekdays.js +3 -0
- package/components/date-picker/years.d.ts +1 -18
- package/components/date-picker/years.js +259 -78
- package/components/dialog/dialog.js +1 -0
- package/components/dropdown-menu/dropdown-menu.js +1 -0
- package/components/editable-heading/editable-heading.js +1 -0
- package/components/error-bubble/error-bubble.js +1 -0
- package/components/footer/footer.d.ts +1 -1
- package/components/global/dom.d.ts +1 -1
- package/components/global/dom.js +1 -1
- package/components/header/header.js +1 -0
- package/components/header/profile.js +1 -0
- package/components/header/services.js +1 -0
- package/components/header/smart-profile.js +1 -0
- package/components/header/smart-services.js +1 -0
- package/components/heading/heading.d.ts +4 -4
- package/components/list/list-item.js +1 -0
- package/components/list/list-users-groups-source.js +1 -0
- package/components/list/list.js +1 -0
- package/components/login-dialog/login-dialog.js +1 -0
- package/components/login-dialog/service.js +1 -0
- package/components/message/message.js +1 -0
- package/components/old-browsers-message/old-browsers-message-stop.js +1 -0
- package/components/old-browsers-message/old-browsers-message.js +1 -0
- package/components/old-browsers-message/white-list.js +3 -2
- package/components/pager/pager.js +1 -0
- package/components/popup/popup.js +1 -0
- package/components/popup/position-css.js +1 -0
- package/components/popup/position.js +1 -0
- package/components/popup-menu/popup-menu.js +1 -0
- package/components/query-assist/query-assist-suggestions.js +1 -0
- package/components/query-assist/query-assist.js +1 -0
- package/components/select/select-filter.js +1 -0
- package/components/select/select-popup.js +1 -0
- package/components/select/select.js +1 -0
- package/components/shortcuts/core.js +1 -0
- package/components/shortcuts/shortcuts-hoc.js +1 -0
- package/components/shortcuts/shortcuts.js +1 -0
- package/components/slider/slider.js +1 -0
- package/components/style.css +1 -1
- package/components/table/disable-hover-hoc.js +1 -0
- package/components/table/multitable.js +1 -0
- package/components/table/row-with-focus-sensor.js +1 -0
- package/components/table/row.js +1 -0
- package/components/table/simple-table.js +1 -0
- package/components/table/smart-table.js +1 -0
- package/components/table/table.js +1 -0
- package/components/tabs/collapsible-more.js +1 -0
- package/components/tabs/collapsible-tabs.js +1 -0
- package/components/tabs/dumb-tabs.d.ts +1 -0
- package/components/tabs/dumb-tabs.js +3 -1
- package/components/tabs/smart-tabs.js +1 -0
- package/components/tabs/tabs.js +1 -0
- package/components/tags-input/tags-input.js +1 -0
- package/components/tooltip/tooltip.js +1 -0
- package/components/user-agreement/service.js +1 -0
- package/components/user-agreement/user-agreement.js +1 -0
- package/components/user-card/card.js +1 -0
- package/components/user-card/smart-user-card-tooltip.js +1 -0
- package/components/user-card/tooltip.js +1 -0
- package/components/user-card/user-card.js +1 -0
- package/components/util-stories.d.ts +1 -0
- package/package.json +3 -3
- package/typings.d.ts +5 -0
|
@@ -1,62 +1,144 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c } from 'react-compiler-runtime';
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import { addYears } from 'date-fns/addYears';
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import units, { yearScrollSpeed } from './consts.js';
|
|
5
|
+
import { startOfYear } from 'date-fns';
|
|
6
|
+
import units from './consts.js';
|
|
7
|
+
import scheduleRAF from '../global/schedule-raf.js';
|
|
8
8
|
import { s as styles } from '../_helpers/date-picker.js';
|
|
9
|
-
import { jsx } from 'react/jsx-runtime';
|
|
9
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
10
10
|
import 'date-fns/add';
|
|
11
|
+
import '../global/sniffer.js';
|
|
12
|
+
import 'sniffr';
|
|
11
13
|
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (this.state.dragging && !prevState.dragging) {
|
|
19
|
-
window.addEventListener('mousemove', this.onMouseMove);
|
|
20
|
-
window.addEventListener('mouseup', this.onMouseUp);
|
|
21
|
-
} else if (!this.state.dragging && prevState.dragging) {
|
|
22
|
-
window.removeEventListener('mousemove', this.onMouseMove);
|
|
23
|
-
window.removeEventListener('mouseup', this.onMouseUp);
|
|
14
|
+
const scheduleScroll = scheduleRAF();
|
|
15
|
+
function MonthSlider(t0) {
|
|
16
|
+
const $ = c(21);
|
|
17
|
+
if ($[0] !== "ebbd4a21f88e38a284a06e4f0c7cea8f6e0df6c98e2e21ebc395ef8031346aae") {
|
|
18
|
+
for (let $i = 0; $i < 21; $i += 1) {
|
|
19
|
+
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
24
20
|
}
|
|
21
|
+
$[0] = "ebbd4a21f88e38a284a06e4f0c7cea8f6e0df6c98e2e21ebc395ef8031346aae";
|
|
25
22
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
23
|
+
const {
|
|
24
|
+
scrollDate,
|
|
25
|
+
setScrollDate
|
|
26
|
+
} = t0;
|
|
27
|
+
const [dragStart, setDragStart] = useState(null);
|
|
28
|
+
let t1;
|
|
29
|
+
if ($[1] !== scrollDate.date) {
|
|
30
|
+
t1 = e => {
|
|
31
|
+
const pointerId = e.pointerId;
|
|
32
|
+
setDragStart({
|
|
33
|
+
y: e.pageY,
|
|
34
|
+
scrollDate: Number(scrollDate.date),
|
|
35
|
+
pointerId
|
|
36
|
+
});
|
|
37
|
+
e.currentTarget.setPointerCapture(pointerId);
|
|
38
|
+
};
|
|
39
|
+
$[1] = scrollDate.date;
|
|
40
|
+
$[2] = t1;
|
|
41
|
+
} else {
|
|
42
|
+
t1 = $[2];
|
|
43
|
+
}
|
|
44
|
+
const onPointerDown = t1;
|
|
45
|
+
let t2;
|
|
46
|
+
if ($[3] !== dragStart || $[4] !== setScrollDate) {
|
|
47
|
+
t2 = e_0 => {
|
|
48
|
+
scheduleScroll(() => {
|
|
49
|
+
if (!dragStart) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const {
|
|
53
|
+
y: startY,
|
|
54
|
+
scrollDate: startDate
|
|
55
|
+
} = dragStart;
|
|
56
|
+
const yearFraction = (e_0.pageY - startY) / units.calHeight;
|
|
57
|
+
const startDatePlusOneYear = Number(addYears(new Date(startDate), 1));
|
|
58
|
+
const newScrollDate = startDate + yearFraction * (startDatePlusOneYear - startDate);
|
|
59
|
+
setScrollDate({
|
|
60
|
+
date: newScrollDate,
|
|
61
|
+
source: "other"
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
$[3] = dragStart;
|
|
66
|
+
$[4] = setScrollDate;
|
|
67
|
+
$[5] = t2;
|
|
68
|
+
} else {
|
|
69
|
+
t2 = $[5];
|
|
70
|
+
}
|
|
71
|
+
const onPointerMove = t2;
|
|
72
|
+
let t3;
|
|
73
|
+
if ($[6] !== dragStart) {
|
|
74
|
+
t3 = e_1 => {
|
|
75
|
+
if (!dragStart) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const {
|
|
79
|
+
pointerId: pointerId_0
|
|
80
|
+
} = dragStart;
|
|
81
|
+
setDragStart(null);
|
|
82
|
+
e_1.currentTarget.releasePointerCapture?.(pointerId_0);
|
|
83
|
+
};
|
|
84
|
+
$[6] = dragStart;
|
|
85
|
+
$[7] = t3;
|
|
86
|
+
} else {
|
|
87
|
+
t3 = $[7];
|
|
88
|
+
}
|
|
89
|
+
const onPointerUp = t3;
|
|
90
|
+
let t4;
|
|
91
|
+
let yearStart;
|
|
92
|
+
if ($[8] !== scrollDate.date) {
|
|
93
|
+
yearStart = startOfYear(scrollDate.date);
|
|
94
|
+
t4 = addYears(yearStart, 1);
|
|
95
|
+
$[8] = scrollDate.date;
|
|
96
|
+
$[9] = t4;
|
|
97
|
+
$[10] = yearStart;
|
|
98
|
+
} else {
|
|
99
|
+
t4 = $[9];
|
|
100
|
+
yearStart = $[10];
|
|
101
|
+
}
|
|
102
|
+
const yearEnd = t4;
|
|
103
|
+
const yearFraction_0 = (Number(scrollDate.date) - Number(yearStart)) / (Number(yearEnd) - Number(yearStart));
|
|
104
|
+
const t5 = yearFraction_0 - 1;
|
|
105
|
+
const t6 = yearFraction_0 + 1;
|
|
106
|
+
let t7;
|
|
107
|
+
if ($[11] !== t5 || $[12] !== t6 || $[13] !== yearFraction_0) {
|
|
108
|
+
t7 = [t5, yearFraction_0, t6];
|
|
109
|
+
$[11] = t5;
|
|
110
|
+
$[12] = t6;
|
|
111
|
+
$[13] = yearFraction_0;
|
|
112
|
+
$[14] = t7;
|
|
113
|
+
} else {
|
|
114
|
+
t7 = $[14];
|
|
115
|
+
}
|
|
116
|
+
const offsets = t7;
|
|
117
|
+
let t8;
|
|
118
|
+
if ($[15] !== dragStart || $[16] !== offsets || $[17] !== onPointerDown || $[18] !== onPointerMove || $[19] !== onPointerUp) {
|
|
119
|
+
t8 = /*#__PURE__*/jsx(Fragment, {
|
|
120
|
+
children: offsets.map(offset => /*#__PURE__*/jsx("button", {
|
|
51
121
|
type: "button",
|
|
52
|
-
className:
|
|
122
|
+
className: classNames(styles.monthSlider, dragStart && styles.dragging),
|
|
53
123
|
style: {
|
|
54
|
-
top:
|
|
124
|
+
top: offset * units.calHeight - units.cellSize
|
|
55
125
|
},
|
|
56
|
-
|
|
57
|
-
|
|
126
|
+
onPointerDown: onPointerDown,
|
|
127
|
+
onPointerMove: onPointerMove,
|
|
128
|
+
onPointerUp: onPointerUp,
|
|
129
|
+
onPointerCancel: onPointerUp
|
|
130
|
+
}, Math.floor(offset)))
|
|
58
131
|
});
|
|
132
|
+
$[15] = dragStart;
|
|
133
|
+
$[16] = offsets;
|
|
134
|
+
$[17] = onPointerDown;
|
|
135
|
+
$[18] = onPointerMove;
|
|
136
|
+
$[19] = onPointerUp;
|
|
137
|
+
$[20] = t8;
|
|
138
|
+
} else {
|
|
139
|
+
t8 = $[20];
|
|
59
140
|
}
|
|
141
|
+
return t8;
|
|
60
142
|
}
|
|
61
143
|
|
|
62
144
|
export { MonthSlider as default };
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { type Locale } from 'date-fns';
|
|
1
2
|
import { type MonthsProps } from './consts';
|
|
3
|
+
import { type IntersectionObserverHandle } from './use-intersection-observer';
|
|
2
4
|
export interface MonthProps extends MonthsProps {
|
|
3
5
|
month: Date;
|
|
6
|
+
intersectionObserverHandle: IntersectionObserverHandle | null;
|
|
4
7
|
}
|
|
5
8
|
export default function Month(props: MonthProps): import("react").JSX.Element;
|
|
9
|
+
export declare function getMonthHeight(monthStart: Date | number, locale: Locale | undefined): number;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { c } from 'react-compiler-runtime';
|
|
2
|
-
import { addDays } from 'date-fns/addDays';
|
|
3
|
-
import { endOfMonth } from 'date-fns/endOfMonth';
|
|
4
2
|
import { format } from 'date-fns/format';
|
|
5
3
|
import { getDay } from 'date-fns/getDay';
|
|
6
|
-
import {
|
|
4
|
+
import { getDaysInMonth, setDate } from 'date-fns';
|
|
5
|
+
import { useRef, createElement } from 'react';
|
|
7
6
|
import Day from './day.js';
|
|
8
|
-
import {
|
|
7
|
+
import units, { getWeekStartsOn, WEEK } from './consts.js';
|
|
8
|
+
import { useVisibility } from './use-intersection-observer.js';
|
|
9
9
|
import { s as styles } from '../_helpers/date-picker.js';
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
10
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
11
|
+
import 'core-js/modules/es.array.includes.js';
|
|
12
12
|
import 'classnames';
|
|
13
|
+
import 'date-fns/addDays';
|
|
13
14
|
import 'date-fns/getDate';
|
|
14
15
|
import 'date-fns/isAfter';
|
|
15
16
|
import 'date-fns/isBefore';
|
|
@@ -17,97 +18,101 @@ import 'date-fns/isSameDay';
|
|
|
17
18
|
import 'date-fns/isToday';
|
|
18
19
|
import 'date-fns/startOfDay';
|
|
19
20
|
import 'date-fns/add';
|
|
21
|
+
import '../global/sniffer.js';
|
|
22
|
+
import 'sniffr';
|
|
20
23
|
|
|
21
24
|
function Month(props) {
|
|
22
|
-
const $ = c(
|
|
23
|
-
if ($[0] !== "
|
|
24
|
-
for (let $i = 0; $i <
|
|
25
|
+
const $ = c(13);
|
|
26
|
+
if ($[0] !== "2f6fe4553edaada7486df2c003273bf4ae27149a404d6c91c9c721f7d6c02b8b") {
|
|
27
|
+
for (let $i = 0; $i < 13; $i += 1) {
|
|
25
28
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
26
29
|
}
|
|
27
|
-
$[0] = "
|
|
30
|
+
$[0] = "2f6fe4553edaada7486df2c003273bf4ae27149a404d6c91c9c721f7d6c02b8b";
|
|
28
31
|
}
|
|
29
|
-
const start = props.month;
|
|
30
|
-
const end = endOfMonth(start);
|
|
31
32
|
const {
|
|
32
|
-
|
|
33
|
+
month,
|
|
34
|
+
locale,
|
|
35
|
+
intersectionObserverHandle
|
|
33
36
|
} = props;
|
|
34
|
-
const
|
|
37
|
+
const containerRef = useRef(null);
|
|
38
|
+
const visible = useVisibility(intersectionObserverHandle, containerRef);
|
|
35
39
|
let t0;
|
|
36
|
-
if ($[1] !==
|
|
37
|
-
t0 =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
if ($[1] !== locale || $[2] !== month || $[3] !== visible) {
|
|
41
|
+
t0 = visible ? {} : {
|
|
42
|
+
height: getMonthHeight(month, locale)
|
|
43
|
+
};
|
|
44
|
+
$[1] = locale;
|
|
45
|
+
$[2] = month;
|
|
46
|
+
$[3] = visible;
|
|
47
|
+
$[4] = t0;
|
|
40
48
|
} else {
|
|
41
|
-
t0 = $[
|
|
42
|
-
}
|
|
43
|
-
const weekDays = t0;
|
|
44
|
-
const fifthDayOfWeek = weekDays[FIFTH_DAY];
|
|
45
|
-
let days;
|
|
46
|
-
if ($[3] !== end || $[4] !== fifthDayOfWeek || $[5] !== start || $[6] !== weekday) {
|
|
47
|
-
let day = setDay(start, weekday >= fifthDayOfWeek ? fifthDayOfWeek : fifthDayOfWeek - WEEK);
|
|
48
|
-
days = [];
|
|
49
|
-
while (day < end) {
|
|
50
|
-
days.push(day);
|
|
51
|
-
day = addDays(day, 1);
|
|
52
|
-
}
|
|
53
|
-
$[3] = end;
|
|
54
|
-
$[4] = fifthDayOfWeek;
|
|
55
|
-
$[5] = start;
|
|
56
|
-
$[6] = weekday;
|
|
57
|
-
$[7] = days;
|
|
58
|
-
} else {
|
|
59
|
-
days = $[7];
|
|
49
|
+
t0 = $[4];
|
|
60
50
|
}
|
|
61
51
|
let t1;
|
|
62
|
-
if ($[
|
|
63
|
-
t1 =
|
|
64
|
-
|
|
52
|
+
if ($[5] !== locale || $[6] !== month || $[7] !== props || $[8] !== visible) {
|
|
53
|
+
t1 = visible && /*#__PURE__*/jsxs(Fragment, {
|
|
54
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
55
|
+
className: styles.monthTitle,
|
|
56
|
+
children: format(month, "LLLL", {
|
|
57
|
+
locale
|
|
58
|
+
})
|
|
59
|
+
}), Array.from({
|
|
60
|
+
length: getPaddingCellsNum(month, locale)
|
|
61
|
+
}, (_, i) => /*#__PURE__*/createElement(Day, {
|
|
62
|
+
...props,
|
|
63
|
+
day: new Date(0),
|
|
64
|
+
empty: true,
|
|
65
|
+
key: `e_${i}`
|
|
66
|
+
})), Array.from({
|
|
67
|
+
length: getDaysInMonth(month)
|
|
68
|
+
}, (__0, i_0) => /*#__PURE__*/createElement(Day, {
|
|
69
|
+
...props,
|
|
70
|
+
day: setDate(month, i_0 + 1),
|
|
71
|
+
empty: false,
|
|
72
|
+
key: i_0
|
|
73
|
+
}))]
|
|
65
74
|
});
|
|
66
|
-
$[
|
|
67
|
-
$[
|
|
68
|
-
$[
|
|
75
|
+
$[5] = locale;
|
|
76
|
+
$[6] = month;
|
|
77
|
+
$[7] = props;
|
|
78
|
+
$[8] = visible;
|
|
79
|
+
$[9] = t1;
|
|
69
80
|
} else {
|
|
70
|
-
t1 = $[
|
|
81
|
+
t1 = $[9];
|
|
71
82
|
}
|
|
72
83
|
let t2;
|
|
73
|
-
if ($[11] !== t1) {
|
|
74
|
-
t2 = /*#__PURE__*/jsx("
|
|
75
|
-
className: styles.
|
|
84
|
+
if ($[10] !== t0 || $[11] !== t1) {
|
|
85
|
+
t2 = /*#__PURE__*/jsx("div", {
|
|
86
|
+
className: styles.month,
|
|
87
|
+
ref: containerRef,
|
|
88
|
+
style: t0,
|
|
76
89
|
children: t1
|
|
77
90
|
});
|
|
91
|
+
$[10] = t0;
|
|
78
92
|
$[11] = t1;
|
|
79
93
|
$[12] = t2;
|
|
80
94
|
} else {
|
|
81
95
|
t2 = $[12];
|
|
82
96
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
children: [t2, t3]
|
|
103
|
-
});
|
|
104
|
-
$[17] = t2;
|
|
105
|
-
$[18] = t3;
|
|
106
|
-
$[19] = t4;
|
|
107
|
-
} else {
|
|
108
|
-
t4 = $[19];
|
|
109
|
-
}
|
|
110
|
-
return t4;
|
|
97
|
+
return t2;
|
|
98
|
+
}
|
|
99
|
+
const cellsPerMonthName = 4;
|
|
100
|
+
/**
|
|
101
|
+
* Between the month name and the first month day
|
|
102
|
+
*/
|
|
103
|
+
function getPaddingCellsNum(monthStart, locale) {
|
|
104
|
+
const monthStartWeekdaySundayBased = getDay(monthStart);
|
|
105
|
+
const weekStartDay = getWeekStartsOn(locale);
|
|
106
|
+
const monthStartWeekday = (monthStartWeekdaySundayBased - weekStartDay + WEEK) % WEEK;
|
|
107
|
+
if (monthStartWeekday >= cellsPerMonthName) return monthStartWeekday - cellsPerMonthName;
|
|
108
|
+
const upperPadding = WEEK - cellsPerMonthName;
|
|
109
|
+
const lowerPadding = monthStartWeekday;
|
|
110
|
+
return upperPadding + lowerPadding;
|
|
111
|
+
}
|
|
112
|
+
function getMonthHeight(monthStart, locale) {
|
|
113
|
+
const totalCells = cellsPerMonthName + getPaddingCellsNum(monthStart, locale) + getDaysInMonth(new Date(monthStart));
|
|
114
|
+
const monthLines = Math.ceil(totalCells / WEEK);
|
|
115
|
+
return monthLines * units.cellSize;
|
|
111
116
|
}
|
|
112
117
|
|
|
113
|
-
export { Month as default };
|
|
118
|
+
export { Month as default, getMonthHeight };
|