@transferwise/components 0.0.0-experimental-fa3aa98 → 0.0.0-experimental-f4a328f
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/build/Calendar/Calendar.js +16 -94
- package/build/Calendar/Calendar.js.map +1 -1
- package/build/Calendar/Calendar.messages.js +0 -12
- package/build/Calendar/Calendar.messages.js.map +1 -1
- package/build/Calendar/Calendar.messages.mjs +0 -12
- package/build/Calendar/Calendar.messages.mjs.map +1 -1
- package/build/Calendar/Calendar.mjs +17 -95
- package/build/Calendar/Calendar.mjs.map +1 -1
- package/build/Calendar/DateHeader/DateHeader.js +1 -5
- package/build/Calendar/DateHeader/DateHeader.js.map +1 -1
- package/build/Calendar/DateHeader/DateHeader.mjs +1 -5
- package/build/Calendar/DateHeader/DateHeader.mjs.map +1 -1
- package/build/Calendar/DayCalendar/DayCalendar.js +0 -14
- package/build/Calendar/DayCalendar/DayCalendar.js.map +1 -1
- package/build/Calendar/DayCalendar/DayCalendar.mjs +0 -14
- package/build/Calendar/DayCalendar/DayCalendar.mjs.map +1 -1
- package/build/Calendar/DayCalendar/Table/DayCalendarTable.js +19 -53
- package/build/Calendar/DayCalendar/Table/DayCalendarTable.js.map +1 -1
- package/build/Calendar/DayCalendar/Table/DayCalendarTable.mjs +19 -53
- package/build/Calendar/DayCalendar/Table/DayCalendarTable.mjs.map +1 -1
- package/build/Calendar/MonthCalendar/MonthCalendar.js +0 -6
- package/build/Calendar/MonthCalendar/MonthCalendar.js.map +1 -1
- package/build/Calendar/MonthCalendar/MonthCalendar.mjs +0 -6
- package/build/Calendar/MonthCalendar/MonthCalendar.mjs.map +1 -1
- package/build/Calendar/MonthCalendar/Table/MonthCalendarTable.js +3 -8
- package/build/Calendar/MonthCalendar/Table/MonthCalendarTable.js.map +1 -1
- package/build/Calendar/MonthCalendar/Table/MonthCalendarTable.mjs +3 -8
- package/build/Calendar/MonthCalendar/Table/MonthCalendarTable.mjs.map +1 -1
- package/build/Calendar/YearCalendar/Table/YearCalendarTable.js +3 -8
- package/build/Calendar/YearCalendar/Table/YearCalendarTable.js.map +1 -1
- package/build/Calendar/YearCalendar/Table/YearCalendarTable.mjs +3 -8
- package/build/Calendar/YearCalendar/Table/YearCalendarTable.mjs.map +1 -1
- package/build/Calendar/YearCalendar/YearCalendar.js +0 -7
- package/build/Calendar/YearCalendar/YearCalendar.js.map +1 -1
- package/build/Calendar/YearCalendar/YearCalendar.mjs +0 -7
- package/build/Calendar/YearCalendar/YearCalendar.mjs.map +1 -1
- package/build/Calendar/{TableLink → tableLink}/TableLink.js +11 -26
- package/build/Calendar/tableLink/TableLink.js.map +1 -0
- package/build/Calendar/{TableLink → tableLink}/TableLink.mjs +11 -26
- package/build/Calendar/tableLink/TableLink.mjs.map +1 -0
- package/build/DateLookup/DateLookup.js +9 -20
- package/build/DateLookup/DateLookup.js.map +1 -1
- package/build/DateLookup/DateLookup.mjs +9 -20
- package/build/DateLookup/DateLookup.mjs.map +1 -1
- package/build/Markup/Markup.js +137 -0
- package/build/Markup/Markup.js.map +1 -0
- package/build/Markup/Markup.mjs +132 -0
- package/build/Markup/Markup.mjs.map +1 -0
- package/build/Markup/constants.js +36 -0
- package/build/Markup/constants.js.map +1 -0
- package/build/Markup/constants.mjs +29 -0
- package/build/Markup/constants.mjs.map +1 -0
- package/build/Markup/utils/parseMarkup.js +236 -0
- package/build/Markup/utils/parseMarkup.js.map +1 -0
- package/build/Markup/utils/parseMarkup.mjs +231 -0
- package/build/Markup/utils/parseMarkup.mjs.map +1 -0
- package/build/Markup/utils/sanitise.js +114 -0
- package/build/Markup/utils/sanitise.js.map +1 -0
- package/build/Markup/utils/sanitise.mjs +111 -0
- package/build/Markup/utils/sanitise.mjs.map +1 -0
- package/build/i18n/en.json +0 -4
- package/build/i18n/en.json.js +0 -4
- package/build/i18n/en.json.js.map +1 -1
- package/build/i18n/en.json.mjs +0 -4
- package/build/i18n/en.json.mjs.map +1 -1
- package/build/index.js +4 -2
- package/build/index.js.map +1 -1
- package/build/index.mjs +2 -1
- package/build/index.mjs.map +1 -1
- package/build/main.css +78 -123
- package/build/styles/Calendar/Calendar.css +37 -112
- package/build/styles/Markup/Markup.css +28 -0
- package/build/styles/Markup/_stories/Vulnerability/Vulnerability.css +69 -0
- package/build/styles/main.css +78 -123
- package/build/types/Body/Body.d.ts +2 -2
- package/build/types/Calendar/Calendar.d.ts +3 -16
- package/build/types/Calendar/Calendar.d.ts.map +1 -1
- package/build/types/Calendar/Calendar.messages.d.ts +0 -20
- package/build/types/Calendar/Calendar.messages.d.ts.map +1 -1
- package/build/types/Calendar/DateHeader/DateHeader.d.ts +0 -2
- package/build/types/Calendar/DateHeader/DateHeader.d.ts.map +1 -1
- package/build/types/Calendar/DayCalendar/DayCalendar.d.ts +1 -5
- package/build/types/Calendar/DayCalendar/DayCalendar.d.ts.map +1 -1
- package/build/types/Calendar/DayCalendar/Table/DayCalendarTable.d.ts +0 -4
- package/build/types/Calendar/DayCalendar/Table/DayCalendarTable.d.ts.map +1 -1
- package/build/types/Calendar/MonthCalendar/MonthCalendar.d.ts +0 -1
- package/build/types/Calendar/MonthCalendar/MonthCalendar.d.ts.map +1 -1
- package/build/types/Calendar/MonthCalendar/Table/MonthCalendarTable.d.ts +1 -2
- package/build/types/Calendar/MonthCalendar/Table/MonthCalendarTable.d.ts.map +1 -1
- package/build/types/Calendar/YearCalendar/Table/YearCalendarTable.d.ts +1 -2
- package/build/types/Calendar/YearCalendar/Table/YearCalendarTable.d.ts.map +1 -1
- package/build/types/Calendar/YearCalendar/YearCalendar.d.ts +0 -1
- package/build/types/Calendar/YearCalendar/YearCalendar.d.ts.map +1 -1
- package/build/types/Calendar/index.d.ts +0 -1
- package/build/types/Calendar/index.d.ts.map +1 -1
- package/build/types/Calendar/{TableLink → tableLink}/TableLink.d.ts +1 -3
- package/build/types/Calendar/tableLink/TableLink.d.ts.map +1 -0
- package/build/types/Calendar/tableLink/index.d.ts.map +1 -0
- package/build/types/DateLookup/DateLookup.d.ts +5 -24
- package/build/types/DateLookup/DateLookup.d.ts.map +1 -1
- package/build/types/DateLookup/index.d.ts +0 -1
- package/build/types/DateLookup/index.d.ts.map +1 -1
- package/build/types/IconButton/IconButton.d.ts +1 -1
- package/build/types/Markup/Markup.d.ts +18 -0
- package/build/types/Markup/Markup.d.ts.map +1 -0
- package/build/types/Markup/Markup.types.d.ts +77 -0
- package/build/types/Markup/Markup.types.d.ts.map +1 -0
- package/build/types/Markup/_stories/Vulnerability/Vulnerability.d.ts +12 -0
- package/build/types/Markup/_stories/Vulnerability/Vulnerability.d.ts.map +1 -0
- package/build/types/Markup/constants.d.ts +20 -0
- package/build/types/Markup/constants.d.ts.map +1 -0
- package/build/types/Markup/index.d.ts +3 -0
- package/build/types/Markup/index.d.ts.map +1 -0
- package/build/types/Markup/utils/parseMarkup.d.ts +8 -0
- package/build/types/Markup/utils/parseMarkup.d.ts.map +1 -0
- package/build/types/Markup/utils/sanitise.d.ts +4 -0
- package/build/types/Markup/utils/sanitise.d.ts.map +1 -0
- package/build/types/Title/Title.d.ts +2 -2
- package/build/types/Upload/Steps/UploadImageStep/UploadImageStep.d.ts +1 -1
- package/build/types/UploadInput/UploadItem/UploadItemLink.d.ts +1 -1
- package/build/types/common/DateUtils/index.d.ts +0 -2
- package/build/types/common/DateUtils/index.d.ts.map +1 -1
- package/build/types/index.d.ts +4 -3
- package/build/types/index.d.ts.map +1 -1
- package/build/types/test-utils/index.d.ts +0 -8
- package/build/types/test-utils/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Calendar/Calendar.css +37 -112
- package/src/Calendar/Calendar.less +35 -5
- package/src/Calendar/Calendar.messages.ts +0 -21
- package/src/Calendar/Calendar.test.tsx +27 -288
- package/src/Calendar/Calendar.tsx +19 -136
- package/src/Calendar/DateHeader/DateHeader.tsx +0 -6
- package/src/Calendar/DayCalendar/DayCalendar.tsx +1 -33
- package/src/Calendar/DayCalendar/Table/DayCalendarTable.tsx +28 -62
- package/src/Calendar/MonthCalendar/MonthCalendar.tsx +0 -8
- package/src/Calendar/MonthCalendar/Table/MonthCalendarTable.tsx +3 -15
- package/src/Calendar/YearCalendar/Table/YearCalendarTable.tsx +3 -15
- package/src/Calendar/YearCalendar/YearCalendar.tsx +0 -9
- package/src/Calendar/_stories/Calendar.story.tsx +4 -138
- package/src/Calendar/index.ts +0 -7
- package/src/Calendar/{TableLink → tableLink}/TableLink.tsx +14 -29
- package/src/DateLookup/DateLookup.test.tsx +37 -34
- package/src/DateLookup/DateLookup.tsx +13 -37
- package/src/DateLookup/_stories/DateLookup.story.tsx +2 -124
- package/src/DateLookup/index.ts +0 -6
- package/src/Markup/Markup.css +28 -0
- package/src/Markup/Markup.injection.test.tsx +163 -0
- package/src/Markup/Markup.less +29 -0
- package/src/Markup/Markup.test.tsx +463 -0
- package/src/Markup/Markup.tsx +169 -0
- package/src/Markup/Markup.types.ts +62 -0
- package/src/Markup/_stories/Markup.docs.mdx +75 -0
- package/src/Markup/_stories/Markup.security.docs.mdx +343 -0
- package/src/Markup/_stories/Markup.story.tsx +266 -0
- package/src/Markup/_stories/Vulnerability/Vulnerability.css +69 -0
- package/src/Markup/_stories/Vulnerability/Vulnerability.tsx +30 -0
- package/src/Markup/constants.ts +41 -0
- package/src/Markup/index.ts +2 -0
- package/src/Markup/utils/parseMarkup.test.ts +706 -0
- package/src/Markup/utils/parseMarkup.ts +234 -0
- package/src/Markup/utils/sanitise.test.ts +497 -0
- package/src/Markup/utils/sanitise.ts +133 -0
- package/src/common/DateUtils/index.ts +0 -2
- package/src/i18n/en.json +0 -4
- package/src/index.ts +4 -3
- package/src/main.css +78 -123
- package/src/main.less +1 -0
- package/build/Calendar/TableLink/TableLink.js.map +0 -1
- package/build/Calendar/TableLink/TableLink.mjs.map +0 -1
- package/build/common/DateUtils/hasDisabledDatesInMonth/hasDisabledDatesInMonth.js +0 -33
- package/build/common/DateUtils/hasDisabledDatesInMonth/hasDisabledDatesInMonth.js.map +0 -1
- package/build/common/DateUtils/hasDisabledDatesInMonth/hasDisabledDatesInMonth.mjs +0 -31
- package/build/common/DateUtils/hasDisabledDatesInMonth/hasDisabledDatesInMonth.mjs.map +0 -1
- package/build/common/DateUtils/isDateDisabled/isDateDisabled.js +0 -40
- package/build/common/DateUtils/isDateDisabled/isDateDisabled.js.map +0 -1
- package/build/common/DateUtils/isDateDisabled/isDateDisabled.mjs +0 -38
- package/build/common/DateUtils/isDateDisabled/isDateDisabled.mjs.map +0 -1
- package/build/styles/Calendar/TableLink/TableLink.css +0 -115
- package/build/types/Calendar/Calendar.types.d.ts +0 -32
- package/build/types/Calendar/Calendar.types.d.ts.map +0 -1
- package/build/types/Calendar/TableLink/TableLink.d.ts.map +0 -1
- package/build/types/Calendar/TableLink/index.d.ts.map +0 -1
- package/build/types/common/DateUtils/hasDisabledDatesInMonth/hasDisabledDatesInMonth.d.ts +0 -3
- package/build/types/common/DateUtils/hasDisabledDatesInMonth/hasDisabledDatesInMonth.d.ts.map +0 -1
- package/build/types/common/DateUtils/isDateDisabled/isDateDisabled.d.ts +0 -3
- package/build/types/common/DateUtils/isDateDisabled/isDateDisabled.d.ts.map +0 -1
- package/src/Calendar/Calendar.disabledDates.test.tsx +0 -518
- package/src/Calendar/Calendar.types.ts +0 -35
- package/src/Calendar/TableLink/TableLink.css +0 -115
- package/src/Calendar/TableLink/TableLink.less +0 -68
- package/src/Calendar/_stories/Calendar.accessibility.docs.mdx +0 -118
- package/src/Calendar/_stories/Calendar.test.story.tsx +0 -74
- package/src/DateLookup/DateLookup.disabledDates.test.tsx +0 -293
- package/src/DateLookup/_stories/DateLookup.accessibility.docs.mdx +0 -108
- package/src/common/DateUtils/hasDisabledDatesInMonth/hasDisabledDatesInMonth.test.ts +0 -98
- package/src/common/DateUtils/hasDisabledDatesInMonth/hasDisabledDatesInMonth.ts +0 -45
- package/src/common/DateUtils/isDateDisabled/isDateDisabled.test.ts +0 -169
- package/src/common/DateUtils/isDateDisabled/isDateDisabled.ts +0 -59
- /package/build/types/Calendar/{TableLink → tableLink}/index.d.ts +0 -0
- /package/src/Calendar/{TableLink → tableLink}/index.ts +0 -0
|
@@ -15,8 +15,6 @@ interface DateHeaderProps {
|
|
|
15
15
|
onPreviousClick: () => void;
|
|
16
16
|
onNextClick: () => void;
|
|
17
17
|
dateMode: string;
|
|
18
|
-
isPreviousDisabled?: boolean;
|
|
19
|
-
isNextDisabled?: boolean;
|
|
20
18
|
}
|
|
21
19
|
|
|
22
20
|
const DateHeader: React.FC<DateHeaderProps> = ({
|
|
@@ -25,8 +23,6 @@ const DateHeader: React.FC<DateHeaderProps> = ({
|
|
|
25
23
|
onPreviousClick,
|
|
26
24
|
onNextClick,
|
|
27
25
|
dateMode,
|
|
28
|
-
isPreviousDisabled,
|
|
29
|
-
isNextDisabled,
|
|
30
26
|
}) => {
|
|
31
27
|
const intl = useIntl();
|
|
32
28
|
const { isMobile } = useLayout();
|
|
@@ -38,7 +34,6 @@ const DateHeader: React.FC<DateHeaderProps> = ({
|
|
|
38
34
|
priority="minimal"
|
|
39
35
|
className="d-inline-flex"
|
|
40
36
|
aria-label={`${intl.formatMessage(messages.previous)} ${dateMode}`}
|
|
41
|
-
disabled={isPreviousDisabled}
|
|
42
37
|
onClick={onPreviousClick}
|
|
43
38
|
>
|
|
44
39
|
<ChevronLeft className="left-single-direction" />
|
|
@@ -66,7 +61,6 @@ const DateHeader: React.FC<DateHeaderProps> = ({
|
|
|
66
61
|
className="d-inline-flex"
|
|
67
62
|
aria-label={`${intl.formatMessage(messages.next)} ${dateMode}`}
|
|
68
63
|
priority="minimal"
|
|
69
|
-
disabled={isNextDisabled}
|
|
70
64
|
onClick={onNextClick}
|
|
71
65
|
>
|
|
72
66
|
<ChevronRight className="right-single-direction" />
|
|
@@ -2,7 +2,6 @@ import { formatDate } from '@transferwise/formatting';
|
|
|
2
2
|
import { PureComponent } from 'react';
|
|
3
3
|
|
|
4
4
|
import { MonthFormat } from '../../common';
|
|
5
|
-
import type { DisabledRules } from '../Calendar.types';
|
|
6
5
|
import messages from '../Calendar.messages';
|
|
7
6
|
import DateHeader from '../DateHeader';
|
|
8
7
|
|
|
@@ -11,14 +10,11 @@ import { injectIntl, type WrappedComponentProps } from '../../common/injectIntl'
|
|
|
11
10
|
|
|
12
11
|
interface DayCalendarProps extends WrappedComponentProps {
|
|
13
12
|
selectedDate: Date | null;
|
|
14
|
-
focusedDate?: Date | null;
|
|
15
13
|
min: Date | null;
|
|
16
14
|
max: Date | null;
|
|
17
15
|
viewMonth: number;
|
|
18
16
|
viewYear: number;
|
|
19
17
|
monthFormat: `${MonthFormat}`;
|
|
20
|
-
disabledRules?: DisabledRules;
|
|
21
|
-
disabledReasonId?: string;
|
|
22
18
|
onSelect: (date: Date) => void;
|
|
23
19
|
onLabelClick: () => void;
|
|
24
20
|
onViewDateUpdate: (date: { month: number; year: number }) => void;
|
|
@@ -44,29 +40,15 @@ class DayCalendar extends PureComponent<DayCalendarProps> {
|
|
|
44
40
|
render() {
|
|
45
41
|
const {
|
|
46
42
|
selectedDate,
|
|
47
|
-
focusedDate,
|
|
48
43
|
min,
|
|
49
44
|
max,
|
|
50
45
|
viewMonth,
|
|
51
46
|
viewYear,
|
|
52
47
|
intl: { locale, formatMessage },
|
|
53
48
|
monthFormat,
|
|
54
|
-
disabledRules,
|
|
55
|
-
disabledReasonId,
|
|
56
49
|
onLabelClick,
|
|
57
50
|
onSelect,
|
|
58
51
|
} = this.props;
|
|
59
|
-
const prevMonth = viewMonth <= 0 ? 11 : viewMonth - 1;
|
|
60
|
-
const prevYear = viewMonth <= 0 ? viewYear - 1 : viewYear;
|
|
61
|
-
const nextMonth = viewMonth >= 11 ? 0 : viewMonth + 1;
|
|
62
|
-
const nextYear = viewMonth >= 11 ? viewYear + 1 : viewYear;
|
|
63
|
-
const isPreviousDisabled = !!(
|
|
64
|
-
min && new Date(prevYear, prevMonth) < new Date(min.getFullYear(), min.getMonth())
|
|
65
|
-
);
|
|
66
|
-
const isNextDisabled = !!(
|
|
67
|
-
max && new Date(nextYear, nextMonth) > new Date(max.getFullYear(), max.getMonth())
|
|
68
|
-
);
|
|
69
|
-
|
|
70
52
|
return (
|
|
71
53
|
<>
|
|
72
54
|
<DateHeader
|
|
@@ -75,25 +57,11 @@ class DayCalendar extends PureComponent<DayCalendarProps> {
|
|
|
75
57
|
year: 'numeric',
|
|
76
58
|
})}
|
|
77
59
|
dateMode={formatMessage(messages.month)}
|
|
78
|
-
isPreviousDisabled={isPreviousDisabled}
|
|
79
|
-
isNextDisabled={isNextDisabled}
|
|
80
60
|
onLabelClick={onLabelClick}
|
|
81
61
|
onPreviousClick={this.selectPreviousMonth}
|
|
82
62
|
onNextClick={this.selectNextMonth}
|
|
83
63
|
/>
|
|
84
|
-
<DayCalendarTable
|
|
85
|
-
{...{
|
|
86
|
-
selectedDate,
|
|
87
|
-
focusedDate,
|
|
88
|
-
min,
|
|
89
|
-
max,
|
|
90
|
-
viewMonth,
|
|
91
|
-
viewYear,
|
|
92
|
-
disabledRules,
|
|
93
|
-
disabledReasonId,
|
|
94
|
-
onSelect,
|
|
95
|
-
}}
|
|
96
|
-
/>
|
|
64
|
+
<DayCalendarTable {...{ selectedDate, min, max, viewMonth, viewYear, onSelect }} />
|
|
97
65
|
</>
|
|
98
66
|
);
|
|
99
67
|
}
|
|
@@ -2,28 +2,19 @@ import { formatDate } from '@transferwise/formatting';
|
|
|
2
2
|
import { PureComponent } from 'react';
|
|
3
3
|
import { injectIntl, type WrappedComponentProps } from '../../../common/injectIntl';
|
|
4
4
|
|
|
5
|
-
import { getDayNames, isWithinRange
|
|
6
|
-
import type { DisabledRules } from '../../Calendar.types';
|
|
5
|
+
import { getDayNames, isWithinRange } from '../../../common/DateUtils';
|
|
7
6
|
import { getFocusableTime } from '../../GetFocusableTime/GetFocusableTime';
|
|
8
7
|
import { getStartOfDay } from '../../GetStartOfDay';
|
|
9
|
-
import TableLink from '../../
|
|
8
|
+
import TableLink from '../../tableLink';
|
|
10
9
|
|
|
11
10
|
const SHORT_DAY_FORMAT: Intl.DateTimeFormatOptions = { day: 'numeric' };
|
|
12
|
-
const LONG_DAY_FORMAT: Intl.DateTimeFormatOptions = {
|
|
13
|
-
day: 'numeric',
|
|
14
|
-
month: 'long',
|
|
15
|
-
year: 'numeric',
|
|
16
|
-
};
|
|
17
11
|
|
|
18
12
|
interface DayCalendarTableProps extends WrappedComponentProps {
|
|
19
13
|
selectedDate: Date | null;
|
|
20
|
-
focusedDate?: Date | null;
|
|
21
14
|
min: Date | null;
|
|
22
15
|
max: Date | null;
|
|
23
16
|
viewMonth: number;
|
|
24
17
|
viewYear: number;
|
|
25
|
-
disabledRules?: DisabledRules;
|
|
26
|
-
disabledReasonId?: string;
|
|
27
18
|
onSelect: (date: Date) => void;
|
|
28
19
|
}
|
|
29
20
|
|
|
@@ -72,36 +63,21 @@ class DayCalendarTable extends PureComponent<DayCalendarTableProps> {
|
|
|
72
63
|
onSelect(new Date(viewYear, viewMonth, day));
|
|
73
64
|
};
|
|
74
65
|
|
|
75
|
-
|
|
66
|
+
isDisabled = (day: number) => {
|
|
76
67
|
if (day < 0) {
|
|
77
68
|
return true;
|
|
78
69
|
}
|
|
79
70
|
const { min, max, viewMonth, viewYear } = this.props;
|
|
80
71
|
const date = new Date(viewYear, viewMonth, day);
|
|
81
|
-
return !isWithinRange(date, min, max);
|
|
82
|
-
};
|
|
83
72
|
|
|
84
|
-
|
|
85
|
-
if (day < 0) {
|
|
86
|
-
return false;
|
|
87
|
-
}
|
|
88
|
-
const { viewMonth, viewYear, disabledRules } = this.props;
|
|
89
|
-
const date = new Date(viewYear, viewMonth, day);
|
|
90
|
-
return isDateDisabled(date, disabledRules);
|
|
73
|
+
return !isWithinRange(date, min, max);
|
|
91
74
|
};
|
|
92
75
|
|
|
93
|
-
isUnavailable = (day: number) => this.isOutOfRange(day) || this.isDisabled(day);
|
|
94
|
-
|
|
95
76
|
isActive = (day: number) => {
|
|
96
77
|
const { selectedDate, viewMonth, viewYear } = this.props;
|
|
97
78
|
return !!(selectedDate && Number(new Date(viewYear, viewMonth, day)) === Number(selectedDate));
|
|
98
79
|
};
|
|
99
80
|
|
|
100
|
-
isFocused = (day: number) => {
|
|
101
|
-
const { focusedDate, viewMonth, viewYear } = this.props;
|
|
102
|
-
return !!(focusedDate && Number(new Date(viewYear, viewMonth, day)) === Number(focusedDate));
|
|
103
|
-
};
|
|
104
|
-
|
|
105
81
|
isToday = (day: number) => {
|
|
106
82
|
const { viewMonth, viewYear } = this.props;
|
|
107
83
|
return Number(getStartOfDay(new Date())) === Number(new Date(viewYear, viewMonth, day));
|
|
@@ -110,15 +86,15 @@ class DayCalendarTable extends PureComponent<DayCalendarTableProps> {
|
|
|
110
86
|
getAutofocusDay = (weeks: number[][]) => {
|
|
111
87
|
const days = weeks.flatMap((week) => week);
|
|
112
88
|
return getFocusableTime({
|
|
113
|
-
isActive: this.
|
|
89
|
+
isActive: this.isActive,
|
|
114
90
|
isNow: this.isToday,
|
|
115
|
-
isDisabled: this.
|
|
91
|
+
isDisabled: this.isDisabled,
|
|
116
92
|
timeSpan: days,
|
|
117
93
|
});
|
|
118
94
|
};
|
|
119
95
|
|
|
120
96
|
render() {
|
|
121
|
-
const { viewMonth, viewYear, intl
|
|
97
|
+
const { viewMonth, viewYear, intl } = this.props;
|
|
122
98
|
const weeks = this.getTableStructure();
|
|
123
99
|
const autoFocusDay = this.getAutofocusDay(weeks);
|
|
124
100
|
return (
|
|
@@ -148,37 +124,27 @@ class DayCalendarTable extends PureComponent<DayCalendarTableProps> {
|
|
|
148
124
|
{/* eslint-disable react/no-array-index-key */}
|
|
149
125
|
{weeks.map((week, weekIndex) => (
|
|
150
126
|
<tr key={weekIndex}>
|
|
151
|
-
{week.map((day, dayIndex) =>
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
outOfRange={dayOutOfRange}
|
|
173
|
-
disabled={dayDisabled}
|
|
174
|
-
today={this.isToday(day)}
|
|
175
|
-
disabledReasonId={disabledReasonId}
|
|
176
|
-
onClick={this.selectDay}
|
|
177
|
-
/>
|
|
178
|
-
)}
|
|
179
|
-
</td>
|
|
180
|
-
);
|
|
181
|
-
})}
|
|
127
|
+
{week.map((day, dayIndex) => (
|
|
128
|
+
<td key={dayIndex} className={dayIndex > 4 ? 'weekend' : ''}>
|
|
129
|
+
{day !== -1 && (
|
|
130
|
+
<TableLink
|
|
131
|
+
item={day}
|
|
132
|
+
type="day"
|
|
133
|
+
title={formatDate(
|
|
134
|
+
new Date(viewYear, viewMonth, day),
|
|
135
|
+
intl.locale,
|
|
136
|
+
SHORT_DAY_FORMAT,
|
|
137
|
+
)}
|
|
138
|
+
autofocus={day === autoFocusDay}
|
|
139
|
+
longTitle={formatDate(new Date(viewYear, viewMonth, day), intl.locale)}
|
|
140
|
+
active={this.isActive(day)}
|
|
141
|
+
disabled={this.isDisabled(day)}
|
|
142
|
+
today={this.isToday(day)}
|
|
143
|
+
onClick={this.selectDay}
|
|
144
|
+
/>
|
|
145
|
+
)}
|
|
146
|
+
</td>
|
|
147
|
+
))}
|
|
182
148
|
</tr>
|
|
183
149
|
))}
|
|
184
150
|
{/* eslint-enable react/no-array-index-key */}
|
|
@@ -9,7 +9,6 @@ import MonthCalendarTable from './Table';
|
|
|
9
9
|
|
|
10
10
|
interface MonthCalendarProps extends WrappedComponentProps {
|
|
11
11
|
selectedDate: Date | null;
|
|
12
|
-
focusedDate?: Date | null;
|
|
13
12
|
min: Date | null;
|
|
14
13
|
max: Date | null;
|
|
15
14
|
viewYear: number;
|
|
@@ -36,7 +35,6 @@ class MonthCalendar extends PureComponent<MonthCalendarProps> {
|
|
|
36
35
|
render() {
|
|
37
36
|
const {
|
|
38
37
|
selectedDate,
|
|
39
|
-
focusedDate,
|
|
40
38
|
min,
|
|
41
39
|
max,
|
|
42
40
|
viewYear,
|
|
@@ -44,23 +42,17 @@ class MonthCalendar extends PureComponent<MonthCalendarProps> {
|
|
|
44
42
|
placeholder,
|
|
45
43
|
onLabelClick,
|
|
46
44
|
} = this.props;
|
|
47
|
-
const isPreviousDisabled = !!(min && viewYear - 1 < min.getFullYear());
|
|
48
|
-
const isNextDisabled = !!(max && viewYear + 1 > max.getFullYear());
|
|
49
|
-
|
|
50
45
|
return (
|
|
51
46
|
<>
|
|
52
47
|
<DateHeader
|
|
53
48
|
dateMode={formatMessage(messages.year)}
|
|
54
49
|
label={formatDate(new Date(viewYear, 0), locale, { year: 'numeric' })}
|
|
55
|
-
isPreviousDisabled={isPreviousDisabled}
|
|
56
|
-
isNextDisabled={isNextDisabled}
|
|
57
50
|
onLabelClick={onLabelClick}
|
|
58
51
|
onPreviousClick={this.selectPreviousYear}
|
|
59
52
|
onNextClick={this.selectNextYear}
|
|
60
53
|
/>
|
|
61
54
|
<MonthCalendarTable
|
|
62
55
|
selectedDate={selectedDate}
|
|
63
|
-
focusedDate={focusedDate}
|
|
64
56
|
min={min}
|
|
65
57
|
max={max}
|
|
66
58
|
viewYear={viewYear}
|
|
@@ -2,11 +2,10 @@ import { formatDate } from '@transferwise/formatting';
|
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
3
|
|
|
4
4
|
import { getFocusableTime } from '../../GetFocusableTime/GetFocusableTime';
|
|
5
|
-
import TableLink from '../../
|
|
5
|
+
import TableLink from '../../tableLink';
|
|
6
6
|
|
|
7
7
|
interface MonthCalendarTableProps {
|
|
8
8
|
selectedDate: Date | null;
|
|
9
|
-
focusedDate?: Date | null;
|
|
10
9
|
min: Date | null;
|
|
11
10
|
max: Date | null;
|
|
12
11
|
viewYear: number;
|
|
@@ -20,7 +19,6 @@ const MONTH_ONLY_FORMAT: Intl.DateTimeFormatOptions = { month: 'short' };
|
|
|
20
19
|
|
|
21
20
|
const MonthCalendarTable = ({
|
|
22
21
|
selectedDate,
|
|
23
|
-
focusedDate,
|
|
24
22
|
min,
|
|
25
23
|
max,
|
|
26
24
|
viewYear,
|
|
@@ -36,8 +34,7 @@ const MonthCalendarTable = ({
|
|
|
36
34
|
type="month"
|
|
37
35
|
title={formatDate(new Date(viewYear, month), locale, MONTH_ONLY_FORMAT)}
|
|
38
36
|
active={isActive(month)}
|
|
39
|
-
|
|
40
|
-
disabled={false}
|
|
37
|
+
disabled={isDisabled(month)}
|
|
41
38
|
today={viewYear === new Date().getFullYear() && month === new Date().getMonth()}
|
|
42
39
|
autofocus={autofocusMonth === month}
|
|
43
40
|
onClick={onSelect}
|
|
@@ -49,10 +46,6 @@ const MonthCalendarTable = ({
|
|
|
49
46
|
return !!(month === selectedDate?.getMonth() && viewYear === selectedDate?.getFullYear());
|
|
50
47
|
};
|
|
51
48
|
|
|
52
|
-
const isFocused = (month: number) => {
|
|
53
|
-
return !!(month === focusedDate?.getMonth() && viewYear === focusedDate?.getFullYear());
|
|
54
|
-
};
|
|
55
|
-
|
|
56
49
|
const isThisMonth = (month: number) => {
|
|
57
50
|
return viewYear === new Date().getFullYear() && month === new Date().getMonth();
|
|
58
51
|
};
|
|
@@ -67,12 +60,7 @@ const MonthCalendarTable = ({
|
|
|
67
60
|
|
|
68
61
|
const autofocusMonth = (() => {
|
|
69
62
|
const months = Array.from({ length: ROWS * COLS }, (_, index) => index);
|
|
70
|
-
return getFocusableTime({
|
|
71
|
-
isActive: isFocused,
|
|
72
|
-
isNow: isThisMonth,
|
|
73
|
-
isDisabled,
|
|
74
|
-
timeSpan: months,
|
|
75
|
-
});
|
|
63
|
+
return getFocusableTime({ isActive, isNow: isThisMonth, isDisabled, timeSpan: months });
|
|
76
64
|
})();
|
|
77
65
|
|
|
78
66
|
return (
|
|
@@ -2,11 +2,10 @@ import { formatDate } from '@transferwise/formatting';
|
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
3
|
|
|
4
4
|
import { getFocusableTime } from '../../GetFocusableTime/GetFocusableTime';
|
|
5
|
-
import TableLink from '../../
|
|
5
|
+
import TableLink from '../../tableLink';
|
|
6
6
|
|
|
7
7
|
interface YearCalendarTableProps {
|
|
8
8
|
selectedDate: Date | null;
|
|
9
|
-
focusedDate?: Date | null;
|
|
10
9
|
min: Date | null;
|
|
11
10
|
max: Date | null;
|
|
12
11
|
viewYear: number;
|
|
@@ -20,7 +19,6 @@ const YEAR_ONLY_FORMAT: Intl.DateTimeFormatOptions = { year: 'numeric' };
|
|
|
20
19
|
|
|
21
20
|
const YearCalendarTable = ({
|
|
22
21
|
selectedDate,
|
|
23
|
-
focusedDate,
|
|
24
22
|
min,
|
|
25
23
|
max,
|
|
26
24
|
viewYear,
|
|
@@ -36,8 +34,7 @@ const YearCalendarTable = ({
|
|
|
36
34
|
type="year"
|
|
37
35
|
title={formatDate(new Date(year, 0), locale, YEAR_ONLY_FORMAT)}
|
|
38
36
|
active={isActive(year)}
|
|
39
|
-
|
|
40
|
-
disabled={false}
|
|
37
|
+
disabled={isDisabled(year)}
|
|
41
38
|
today={isThisYear(year)}
|
|
42
39
|
autofocus={autofocusYear === year}
|
|
43
40
|
onClick={onSelect}
|
|
@@ -49,10 +46,6 @@ const YearCalendarTable = ({
|
|
|
49
46
|
return !!(year === selectedDate?.getFullYear());
|
|
50
47
|
};
|
|
51
48
|
|
|
52
|
-
const isFocused = (year: number) => {
|
|
53
|
-
return !!(year === focusedDate?.getFullYear());
|
|
54
|
-
};
|
|
55
|
-
|
|
56
49
|
const isThisYear = (year: number) => {
|
|
57
50
|
return year === new Date().getFullYear();
|
|
58
51
|
};
|
|
@@ -63,12 +56,7 @@ const YearCalendarTable = ({
|
|
|
63
56
|
|
|
64
57
|
const autofocusYear = (() => {
|
|
65
58
|
const years = Array.from({ length: ROWS * COLS }, (_, index) => startYear + index);
|
|
66
|
-
return getFocusableTime({
|
|
67
|
-
isActive: isFocused,
|
|
68
|
-
isNow: isThisYear,
|
|
69
|
-
isDisabled,
|
|
70
|
-
timeSpan: years,
|
|
71
|
-
});
|
|
59
|
+
return getFocusableTime({ isActive, isNow: isThisYear, isDisabled, timeSpan: years });
|
|
72
60
|
})();
|
|
73
61
|
|
|
74
62
|
return (
|
|
@@ -8,7 +8,6 @@ import YearCalendarTable from './Table';
|
|
|
8
8
|
|
|
9
9
|
interface YearCalendarProps extends WrappedComponentProps {
|
|
10
10
|
selectedDate: Date | null;
|
|
11
|
-
focusedDate?: Date | null;
|
|
12
11
|
min: Date | null;
|
|
13
12
|
max: Date | null;
|
|
14
13
|
viewYear: number;
|
|
@@ -34,29 +33,21 @@ class YearCalendar extends PureComponent<YearCalendarProps> {
|
|
|
34
33
|
render() {
|
|
35
34
|
const {
|
|
36
35
|
selectedDate,
|
|
37
|
-
focusedDate,
|
|
38
36
|
min,
|
|
39
37
|
max,
|
|
40
38
|
viewYear,
|
|
41
39
|
placeholder,
|
|
42
40
|
intl: { formatMessage },
|
|
43
41
|
} = this.props;
|
|
44
|
-
const startYear = viewYear - (viewYear % 20);
|
|
45
|
-
const isPreviousDisabled = !!(min && startYear - 1 < min.getFullYear());
|
|
46
|
-
const isNextDisabled = !!(max && startYear + 20 > max.getFullYear());
|
|
47
|
-
|
|
48
42
|
return (
|
|
49
43
|
<>
|
|
50
44
|
<DateHeader
|
|
51
45
|
dateMode={formatMessage(messages.twentyYears)}
|
|
52
|
-
isPreviousDisabled={isPreviousDisabled}
|
|
53
|
-
isNextDisabled={isNextDisabled}
|
|
54
46
|
onPreviousClick={this.selectPreviousYears}
|
|
55
47
|
onNextClick={this.selectNextYears}
|
|
56
48
|
/>
|
|
57
49
|
<YearCalendarTable
|
|
58
50
|
selectedDate={selectedDate}
|
|
59
|
-
focusedDate={focusedDate}
|
|
60
51
|
min={min}
|
|
61
52
|
max={max}
|
|
62
53
|
viewYear={viewYear}
|
|
@@ -1,47 +1,22 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
import { StoryObj } from '@storybook/react-webpack5';
|
|
3
|
-
import {
|
|
3
|
+
import { userEvent, within } from 'storybook/test';
|
|
4
4
|
import {
|
|
5
5
|
createSandboxStory,
|
|
6
6
|
globalScope,
|
|
7
7
|
} from '../../../.storybook/components/sandbox/SandboxEditor';
|
|
8
|
-
import { storySourceWithoutNoise } from '../../../.storybook/helpers';
|
|
9
8
|
import Calendar, { type CalendarProps } from '../Calendar';
|
|
10
9
|
import Modal from '../../Modal';
|
|
11
10
|
import Button from '../../Button';
|
|
12
|
-
import { action } from 'storybook/actions';
|
|
13
11
|
|
|
12
|
+
/** Inline calendar for selecting a single date, with optional min/max bounds. */
|
|
14
13
|
export default {
|
|
15
14
|
component: Calendar,
|
|
16
15
|
title: 'Forms/Calendar',
|
|
17
|
-
args: {
|
|
18
|
-
value: undefined,
|
|
19
|
-
min: undefined,
|
|
20
|
-
max: undefined,
|
|
21
|
-
monthFormat: undefined,
|
|
22
|
-
placeholder: undefined,
|
|
23
|
-
disabledRules: undefined,
|
|
24
|
-
onChange: fn(),
|
|
25
|
-
onDateFocus: fn(),
|
|
26
|
-
},
|
|
27
16
|
argTypes: {
|
|
28
17
|
monthFormat: { control: 'select', options: ['long', 'short'] },
|
|
29
18
|
min: { control: 'date' },
|
|
30
19
|
max: { control: 'date' },
|
|
31
|
-
disabledRules: {
|
|
32
|
-
control: false,
|
|
33
|
-
table: {
|
|
34
|
-
type: {
|
|
35
|
-
summary: 'DisabledRules',
|
|
36
|
-
detail: `{
|
|
37
|
-
weekdays?: ('mon'|'tue'|'wed'|'thu'|'fri'|'sat'|'sun')[]
|
|
38
|
-
dates?: Date[]
|
|
39
|
-
ranges?: { start: Date; end: Date }[]
|
|
40
|
-
reason: string // required — shown in prompt, linked via aria-describedby
|
|
41
|
-
}`,
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
20
|
},
|
|
46
21
|
};
|
|
47
22
|
|
|
@@ -55,17 +30,12 @@ thePast.setUTCDate(epoch.getUTCDate() - 10);
|
|
|
55
30
|
|
|
56
31
|
export const Sandbox = createSandboxStory({
|
|
57
32
|
code: `const App = () => {
|
|
58
|
-
const [value, setValue] = React.useState(new Date(2024
|
|
33
|
+
const [value, setValue] = React.useState(new Date('2024-06-15'));
|
|
59
34
|
|
|
60
35
|
return (
|
|
61
36
|
<Calendar
|
|
62
37
|
monthFormat="long"
|
|
63
38
|
value={value}
|
|
64
|
-
disabledRules={{
|
|
65
|
-
weekdays: ['sat', 'sun'],
|
|
66
|
-
dates: [new Date(2024, 5, 19)],
|
|
67
|
-
reason: 'Weekends and holidays are unavailable.',
|
|
68
|
-
}}
|
|
69
39
|
onChange={(date) => setValue(date)}
|
|
70
40
|
/>
|
|
71
41
|
);
|
|
@@ -82,13 +52,7 @@ export const Basic: Story = {
|
|
|
82
52
|
min={args.min ? new Date(args.min) : thePast}
|
|
83
53
|
max={args.max ? new Date(args.max) : theFuture}
|
|
84
54
|
value={value}
|
|
85
|
-
|
|
86
|
-
action('onDateFocus')(date, options);
|
|
87
|
-
}}
|
|
88
|
-
onChange={(date) => {
|
|
89
|
-
action('onChange')(date);
|
|
90
|
-
setValue(date);
|
|
91
|
-
}}
|
|
55
|
+
onChange={(v) => setValue(v)}
|
|
92
56
|
/>
|
|
93
57
|
);
|
|
94
58
|
},
|
|
@@ -138,101 +102,3 @@ export const InsideModal: Story = {
|
|
|
138
102
|
await userEvent.click(canvas.getByRole('button', { name: 'Open modal' }));
|
|
139
103
|
},
|
|
140
104
|
};
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Use `disabledRules` to disable specific weekdays, individual dates, or date ranges.
|
|
144
|
-
* Disabled dates remain focusable and keyboard-navigable — clicking or focusing one
|
|
145
|
-
* fires `onDateFocus` with `isEnabled: false` and shows a negative inline prompt with
|
|
146
|
-
* the `reason` text. `min`/`max` out-of-range dates show a built-in boundary prompt
|
|
147
|
-
* (e.g. "Please select a date between 4 December 2024 and 18 January 2025.").
|
|
148
|
-
*
|
|
149
|
-
* The `reason` field is **required for accessibility**: it renders as an InlinePrompt
|
|
150
|
-
* below the grid and is linked to every disabled cell via `aria-describedby`, so screen
|
|
151
|
-
* reader users understand why a date is unavailable. For per-date reason customisation
|
|
152
|
-
* see [DisabledDatesWithDynamicReason](#disabled-dates-with-dynamic-reason).
|
|
153
|
-
*/
|
|
154
|
-
export const DisabledDates: Story = storySourceWithoutNoise({
|
|
155
|
-
render: function Render() {
|
|
156
|
-
const [value, setValue] = useState<Date | null>(new Date(2024, 11, 13));
|
|
157
|
-
|
|
158
|
-
return (
|
|
159
|
-
<Calendar
|
|
160
|
-
value={value}
|
|
161
|
-
min={new Date(2024, 11, 4)}
|
|
162
|
-
max={new Date(2025, 0, 18)}
|
|
163
|
-
disabledRules={{
|
|
164
|
-
weekdays: ['sat', 'sun'],
|
|
165
|
-
dates: [new Date(2024, 11, 10), new Date(2025, 0, 15)],
|
|
166
|
-
ranges: [{ start: new Date(2024, 11, 23), end: new Date(2024, 11, 27) }],
|
|
167
|
-
reason: 'Some dates are unavailable for this service.',
|
|
168
|
-
}}
|
|
169
|
-
onDateFocus={(date, { isEnabled }) => {
|
|
170
|
-
action('onDateFocus')(date, { isEnabled });
|
|
171
|
-
}}
|
|
172
|
-
onChange={(date) => {
|
|
173
|
-
action('onChange')(date);
|
|
174
|
-
setValue(date);
|
|
175
|
-
}}
|
|
176
|
-
/>
|
|
177
|
-
);
|
|
178
|
-
},
|
|
179
|
-
});
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* When different disabled dates warrant different explanations, drive the `reason`
|
|
183
|
-
* dynamically from `onDateFocus`. The `isEnabled` flag tells you whether the focused
|
|
184
|
-
* date is selectable; from there you can look up the specific reason and update state.
|
|
185
|
-
*
|
|
186
|
-
* `min`/`max` out-of-range dates are handled automatically — the component shows a
|
|
187
|
-
* built-in prompt with the boundary dates, so `determineReason` only needs to cover
|
|
188
|
-
* rule-disabled dates.
|
|
189
|
-
*/
|
|
190
|
-
export const DisabledDatesWithDynamicReason: Story = storySourceWithoutNoise({
|
|
191
|
-
render: function Render() {
|
|
192
|
-
const DEFAULT_REASON = 'Some dates are unavailable for this service.';
|
|
193
|
-
const min = new Date(2024, 11, 4);
|
|
194
|
-
const max = new Date(2025, 0, 18);
|
|
195
|
-
const maintenanceDays = [new Date(2024, 11, 10), new Date(2025, 0, 15)];
|
|
196
|
-
const [value, setValue] = useState<Date | null>(new Date(2024, 11, 13));
|
|
197
|
-
const [reason, setReason] = useState(DEFAULT_REASON);
|
|
198
|
-
|
|
199
|
-
function determineReason(date: Date, isEnabled: boolean): string {
|
|
200
|
-
if (isEnabled) return DEFAULT_REASON;
|
|
201
|
-
if (
|
|
202
|
-
maintenanceDays.some(
|
|
203
|
-
(maintenanceDay) => maintenanceDay.toDateString() === date.toDateString(),
|
|
204
|
-
)
|
|
205
|
-
) {
|
|
206
|
-
return 'This date is a maintenance day.';
|
|
207
|
-
}
|
|
208
|
-
if (date.getDay() === 0 || date.getDay() === 6) {
|
|
209
|
-
return 'We do not operate on weekends.';
|
|
210
|
-
}
|
|
211
|
-
return 'This date is unavailable.';
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
return (
|
|
215
|
-
<Calendar
|
|
216
|
-
value={value}
|
|
217
|
-
min={min}
|
|
218
|
-
max={max}
|
|
219
|
-
disabledRules={{
|
|
220
|
-
weekdays: ['sat', 'sun'],
|
|
221
|
-
dates: maintenanceDays,
|
|
222
|
-
ranges: [{ start: new Date(2024, 11, 23), end: new Date(2024, 11, 27) }],
|
|
223
|
-
reason,
|
|
224
|
-
}}
|
|
225
|
-
onDateFocus={(date, { isEnabled }) => {
|
|
226
|
-
action('onDateFocus')(date, { isEnabled });
|
|
227
|
-
if (date) {
|
|
228
|
-
setReason(determineReason(date, isEnabled));
|
|
229
|
-
}
|
|
230
|
-
}}
|
|
231
|
-
onChange={(date) => {
|
|
232
|
-
action('onChange')(date);
|
|
233
|
-
setValue(date);
|
|
234
|
-
}}
|
|
235
|
-
/>
|
|
236
|
-
);
|
|
237
|
-
},
|
|
238
|
-
});
|
package/src/Calendar/index.ts
CHANGED