@fullcalendar/mui 7.0.0-beta.5
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/LICENSE.md +22 -0
- package/README.md +79 -0
- package/breezy/theme.css +987 -0
- package/cjs/breezy/EventCalendar.cjs +62 -0
- package/cjs/breezy/EventCalendarContainer.cjs +35 -0
- package/cjs/breezy/EventCalendarToolbar.cjs +65 -0
- package/cjs/breezy/EventCalendarViews.cjs +283 -0
- package/cjs/breezy/ResourceTimeGrid.cjs +57 -0
- package/cjs/breezy/ResourceTimeline.cjs +54 -0
- package/cjs/breezy/SchedulerViews.cjs +70 -0
- package/cjs/breezy/icons.cjs +37 -0
- package/cjs/classic/EventCalendar.cjs +62 -0
- package/cjs/classic/EventCalendarContainer.cjs +22 -0
- package/cjs/classic/EventCalendarToolbar.cjs +62 -0
- package/cjs/classic/EventCalendarViews.cjs +230 -0
- package/cjs/classic/ResourceTimeGrid.cjs +57 -0
- package/cjs/classic/ResourceTimeline.cjs +54 -0
- package/cjs/classic/SchedulerViews.cjs +74 -0
- package/cjs/classic/icons.cjs +37 -0
- package/cjs/forma/EventCalendar.cjs +62 -0
- package/cjs/forma/EventCalendarContainer.cjs +35 -0
- package/cjs/forma/EventCalendarToolbar.cjs +64 -0
- package/cjs/forma/EventCalendarViews.cjs +251 -0
- package/cjs/forma/ResourceTimeGrid.cjs +57 -0
- package/cjs/forma/ResourceTimeline.cjs +54 -0
- package/cjs/forma/SchedulerViews.cjs +62 -0
- package/cjs/forma/icons.cjs +37 -0
- package/cjs/monarch/EventCalendar.cjs +62 -0
- package/cjs/monarch/EventCalendarContainer.cjs +35 -0
- package/cjs/monarch/EventCalendarToolbar.cjs +62 -0
- package/cjs/monarch/EventCalendarViews.cjs +252 -0
- package/cjs/monarch/ResourceTimeGrid.cjs +57 -0
- package/cjs/monarch/ResourceTimeline.cjs +54 -0
- package/cjs/monarch/SchedulerViews.cjs +83 -0
- package/cjs/monarch/icons.cjs +37 -0
- package/cjs/pulse/EventCalendar.cjs +62 -0
- package/cjs/pulse/EventCalendarContainer.cjs +22 -0
- package/cjs/pulse/EventCalendarToolbar.cjs +62 -0
- package/cjs/pulse/EventCalendarViews.cjs +268 -0
- package/cjs/pulse/ResourceTimeGrid.cjs +57 -0
- package/cjs/pulse/ResourceTimeline.cjs +54 -0
- package/cjs/pulse/SchedulerViews.cjs +58 -0
- package/cjs/pulse/icons.cjs +37 -0
- package/classic/theme.css +811 -0
- package/esm/breezy/EventCalendar.d.ts +15 -0
- package/esm/breezy/EventCalendar.js +49 -0
- package/esm/breezy/EventCalendarContainer.d.ts +15 -0
- package/esm/breezy/EventCalendarContainer.js +26 -0
- package/esm/breezy/EventCalendarToolbar.d.ts +16 -0
- package/esm/breezy/EventCalendarToolbar.js +51 -0
- package/esm/breezy/EventCalendarViews.d.ts +33 -0
- package/esm/breezy/EventCalendarViews.js +250 -0
- package/esm/breezy/ResourceTimeGrid.d.ts +15 -0
- package/esm/breezy/ResourceTimeGrid.js +45 -0
- package/esm/breezy/ResourceTimeline.d.ts +15 -0
- package/esm/breezy/ResourceTimeline.js +43 -0
- package/esm/breezy/SchedulerViews.d.ts +8 -0
- package/esm/breezy/SchedulerViews.js +62 -0
- package/esm/breezy/icons.d.ts +11 -0
- package/esm/breezy/icons.js +22 -0
- package/esm/classic/EventCalendar.d.ts +15 -0
- package/esm/classic/EventCalendar.js +49 -0
- package/esm/classic/EventCalendarContainer.d.ts +11 -0
- package/esm/classic/EventCalendarContainer.js +13 -0
- package/esm/classic/EventCalendarToolbar.d.ts +17 -0
- package/esm/classic/EventCalendarToolbar.js +48 -0
- package/esm/classic/EventCalendarViews.d.ts +31 -0
- package/esm/classic/EventCalendarViews.js +205 -0
- package/esm/classic/ResourceTimeGrid.d.ts +15 -0
- package/esm/classic/ResourceTimeGrid.js +45 -0
- package/esm/classic/ResourceTimeline.d.ts +15 -0
- package/esm/classic/ResourceTimeline.js +43 -0
- package/esm/classic/SchedulerViews.d.ts +8 -0
- package/esm/classic/SchedulerViews.js +66 -0
- package/esm/classic/icons.d.ts +11 -0
- package/esm/classic/icons.js +22 -0
- package/esm/forma/EventCalendar.d.ts +15 -0
- package/esm/forma/EventCalendar.js +49 -0
- package/esm/forma/EventCalendarContainer.d.ts +15 -0
- package/esm/forma/EventCalendarContainer.js +26 -0
- package/esm/forma/EventCalendarToolbar.d.ts +16 -0
- package/esm/forma/EventCalendarToolbar.js +50 -0
- package/esm/forma/EventCalendarViews.d.ts +30 -0
- package/esm/forma/EventCalendarViews.js +221 -0
- package/esm/forma/ResourceTimeGrid.d.ts +15 -0
- package/esm/forma/ResourceTimeGrid.js +45 -0
- package/esm/forma/ResourceTimeline.d.ts +15 -0
- package/esm/forma/ResourceTimeline.js +43 -0
- package/esm/forma/SchedulerViews.d.ts +8 -0
- package/esm/forma/SchedulerViews.js +54 -0
- package/esm/forma/icons.d.ts +11 -0
- package/esm/forma/icons.js +22 -0
- package/esm/monarch/EventCalendar.d.ts +15 -0
- package/esm/monarch/EventCalendar.js +49 -0
- package/esm/monarch/EventCalendarContainer.d.ts +15 -0
- package/esm/monarch/EventCalendarContainer.js +26 -0
- package/esm/monarch/EventCalendarToolbar.d.ts +16 -0
- package/esm/monarch/EventCalendarToolbar.js +48 -0
- package/esm/monarch/EventCalendarViews.d.ts +27 -0
- package/esm/monarch/EventCalendarViews.js +225 -0
- package/esm/monarch/ResourceTimeGrid.d.ts +15 -0
- package/esm/monarch/ResourceTimeGrid.js +45 -0
- package/esm/monarch/ResourceTimeline.d.ts +15 -0
- package/esm/monarch/ResourceTimeline.js +43 -0
- package/esm/monarch/SchedulerViews.d.ts +8 -0
- package/esm/monarch/SchedulerViews.js +75 -0
- package/esm/monarch/icons.d.ts +11 -0
- package/esm/monarch/icons.js +22 -0
- package/esm/pulse/EventCalendar.d.ts +15 -0
- package/esm/pulse/EventCalendar.js +49 -0
- package/esm/pulse/EventCalendarContainer.d.ts +11 -0
- package/esm/pulse/EventCalendarContainer.js +13 -0
- package/esm/pulse/EventCalendarToolbar.d.ts +17 -0
- package/esm/pulse/EventCalendarToolbar.js +48 -0
- package/esm/pulse/EventCalendarViews.d.ts +29 -0
- package/esm/pulse/EventCalendarViews.js +239 -0
- package/esm/pulse/ResourceTimeGrid.d.ts +15 -0
- package/esm/pulse/ResourceTimeGrid.js +45 -0
- package/esm/pulse/ResourceTimeline.d.ts +15 -0
- package/esm/pulse/ResourceTimeline.js +43 -0
- package/esm/pulse/SchedulerViews.d.ts +8 -0
- package/esm/pulse/SchedulerViews.js +50 -0
- package/esm/pulse/icons.d.ts +11 -0
- package/esm/pulse/icons.js +22 -0
- package/forma/theme.css +936 -0
- package/monarch/theme.css +1014 -0
- package/package.json +371 -0
- package/pulse/theme.css +913 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EventCalendarViewsProps } from './EventCalendarViews.js';
|
|
3
|
+
|
|
4
|
+
interface SchedulerViewsProps extends EventCalendarViewsProps {
|
|
5
|
+
}
|
|
6
|
+
declare function SchedulerViews({ views: userViews, ...restOptions }: SchedulerViewsProps): React.JSX.Element;
|
|
7
|
+
|
|
8
|
+
export { SchedulerViewsProps, SchedulerViews as default };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { joinClassNames } from '@fullcalendar/core';
|
|
3
|
+
import EventCalendarViews, { mutedBgClass, outlineWidthFocusClass, primaryOutlineColorClass, rowTouchResizerClass, rowPointerResizerClass, strongSolidPressableClass } from './EventCalendarViews.js';
|
|
4
|
+
import { EventCalendarExpanderIcon } from './icons.js';
|
|
5
|
+
import '@fullcalendar/react';
|
|
6
|
+
import '@mui/material';
|
|
7
|
+
import '@mui/icons-material/ChevronLeft';
|
|
8
|
+
import '@mui/icons-material/ChevronRight';
|
|
9
|
+
import '@mui/icons-material/Close';
|
|
10
|
+
import '@mui/icons-material/ExpandMore';
|
|
11
|
+
|
|
12
|
+
const xxsTextClass = "fc-classic-HRt";
|
|
13
|
+
const continuationArrowClass = "fc-classic-MOr fc-classic-ARL fc-classic-DGs fc-classic-F6C";
|
|
14
|
+
function SchedulerViews({ views: userViews, ...restOptions }) {
|
|
15
|
+
return (React.createElement(EventCalendarViews
|
|
16
|
+
/* Resource Day Header
|
|
17
|
+
------------------------------------------------------------------------------------------- */
|
|
18
|
+
, {
|
|
19
|
+
/* Resource Day Header
|
|
20
|
+
------------------------------------------------------------------------------------------- */
|
|
21
|
+
resourceDayHeaderAlign: "center", resourceDayHeaderClass: (data) => joinClassNames("fc-classic-UZp", data.isMajor
|
|
22
|
+
? "fc-classic-I55"
|
|
23
|
+
: "fc-classic-G56"), resourceDayHeaderInnerClass: (data) => joinClassNames("fc-classic-qB7 fc-classic-vvo fc-classic-Hhr fc-classic-bXY", data.isNarrow ? xxsTextClass : "fc-classic-gEy"),
|
|
24
|
+
/* Resource Data Grid
|
|
25
|
+
------------------------------------------------------------------------------------------- */
|
|
26
|
+
resourceColumnHeaderClass: "fc-classic-UZp fc-classic-G56 fc-classic-a65", resourceColumnHeaderInnerClass: "fc-classic-aS8 fc-classic-gEy", resourceColumnResizerClass: "fc-classic-YA2 fc-classic-8ZZ fc-classic-Ahl fc-classic-W3O", resourceGroupHeaderClass: `fc-classic-UZp fc-classic-G56 ${mutedBgClass}`, resourceGroupHeaderInnerClass: "fc-classic-aS8 fc-classic-gEy", resourceCellClass: "fc-classic-UZp fc-classic-G56", resourceCellInnerClass: "fc-classic-aS8 fc-classic-gEy", resourceIndentClass: "fc-classic-twY fc-classic-ClJ fc-classic-a65", resourceExpanderClass: `fc-classic-ytQ ${outlineWidthFocusClass} ${primaryOutlineColorClass}`, resourceExpanderContent: (data) => (React.createElement(EventCalendarExpanderIcon, { isExpanded: data.isExpanded })), resourceHeaderRowClass: "fc-classic-UZp fc-classic-G56", resourceRowClass: "fc-classic-UZp fc-classic-G56", resourceColumnDividerClass: `fc-classic-zDQ fc-classic-G56 fc-classic-qNU ${mutedBgClass}`,
|
|
27
|
+
/* Timeline Lane
|
|
28
|
+
------------------------------------------------------------------------------------------- */
|
|
29
|
+
resourceGroupLaneClass: `fc-classic-UZp fc-classic-G56 ${mutedBgClass}`, resourceLaneClass: "fc-classic-UZp fc-classic-G56", resourceLaneBottomClass: (data) => joinClassNames(data.options.eventOverlap && "fc-classic-EGh"), timelineBottomClass: "fc-classic-EGh",
|
|
30
|
+
/* View-Specific Options
|
|
31
|
+
------------------------------------------------------------------------------------------- */
|
|
32
|
+
views: {
|
|
33
|
+
...userViews,
|
|
34
|
+
timeline: {
|
|
35
|
+
/* Timeline > Row Event
|
|
36
|
+
--------------------------------------------------------------------------------------- */
|
|
37
|
+
rowEventClass: (data) => joinClassNames(data.isEnd && "fc-classic-bpq", "fc-classic-gfU"),
|
|
38
|
+
rowEventBeforeClass: (data) => joinClassNames(!data.isStartResizable ? (data.isSelected
|
|
39
|
+
? joinClassNames(rowTouchResizerClass, "fc-classic-BD7")
|
|
40
|
+
: joinClassNames(rowPointerResizerClass, "fc-classic-BD7")) : (!data.isStart && `${continuationArrowClass} fc-classic-FIS fc-classic-tHp`)),
|
|
41
|
+
rowEventAfterClass: (data) => joinClassNames(!data.isEndResizable ? (data.isSelected
|
|
42
|
+
? joinClassNames(rowTouchResizerClass, "fc-classic-8rg")
|
|
43
|
+
: joinClassNames(rowPointerResizerClass, "fc-classic-8rg")) : (!data.isEnd && `${continuationArrowClass} fc-classic-1Ll fc-classic-ap8`)),
|
|
44
|
+
rowEventInnerClass: (data) => data.options.eventOverlap ? "fc-classic-vvo" : "fc-classic-uBa",
|
|
45
|
+
rowEventTimeClass: "fc-classic-55Y",
|
|
46
|
+
rowEventTitleClass: "fc-classic-55Y",
|
|
47
|
+
/* Timeline > More-Link
|
|
48
|
+
--------------------------------------------------------------------------------------- */
|
|
49
|
+
rowMoreLinkClass: `fc-classic-bpq fc-classic-mwm fc-classic-UZp fc-classic-lqW fc-classic-ePV ${strongSolidPressableClass} fc-classic-82y`,
|
|
50
|
+
rowMoreLinkInnerClass: "fc-classic-KbZ fc-classic-17F",
|
|
51
|
+
/* Timeline > Slot Header
|
|
52
|
+
--------------------------------------------------------------------------------------- */
|
|
53
|
+
slotHeaderAlign: (data) => data.isTime ? "start" : "center",
|
|
54
|
+
slotHeaderClass: "fc-classic-a65",
|
|
55
|
+
slotHeaderInnerClass: (data) => joinClassNames("fc-classic-aS8 fc-classic-gEy", data.hasNavLink && "fc-classic-jaW"),
|
|
56
|
+
slotHeaderDividerClass: `fc-classic-QTT fc-classic-G56`,
|
|
57
|
+
/* Timeline > Now-Indicator
|
|
58
|
+
--------------------------------------------------------------------------------------- */
|
|
59
|
+
nowIndicatorHeaderClass: "fc-classic-pPI fc-classic-s6k fc-classic-I5k fc-classic-LDz fc-classic-ubr fc-classic-qd4",
|
|
60
|
+
nowIndicatorLineClass: `fc-classic-riW fc-classic-R3n`,
|
|
61
|
+
...userViews?.timeline,
|
|
62
|
+
},
|
|
63
|
+
}, ...restOptions }));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export { SchedulerViews as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
declare function EventCalendarPrevIcon(): React.JSX.Element;
|
|
4
|
+
declare function EventCalendarNextIcon(): React.JSX.Element;
|
|
5
|
+
declare function EventCalendarCloseIcon(): React.JSX.Element;
|
|
6
|
+
interface EventCalendarExpanderIconProps {
|
|
7
|
+
isExpanded: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare function EventCalendarExpanderIcon({ isExpanded }: EventCalendarExpanderIconProps): React.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { EventCalendarCloseIcon, EventCalendarExpanderIcon, EventCalendarExpanderIconProps, EventCalendarNextIcon, EventCalendarPrevIcon };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { joinClassNames } from '@fullcalendar/core';
|
|
3
|
+
import ChevronLeftIcon from '@mui/icons-material/ChevronLeft';
|
|
4
|
+
import ChevronRightIcon from '@mui/icons-material/ChevronRight';
|
|
5
|
+
import CloseIcon from '@mui/icons-material/Close';
|
|
6
|
+
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
|
7
|
+
|
|
8
|
+
const pressableIconClass = "fc-classic-5Kh fc-classic-HHp fc-classic-La2";
|
|
9
|
+
function EventCalendarPrevIcon() {
|
|
10
|
+
return React.createElement(ChevronLeftIcon, { className: "fc-classic-AAt" });
|
|
11
|
+
}
|
|
12
|
+
function EventCalendarNextIcon() {
|
|
13
|
+
return React.createElement(ChevronRightIcon, { className: "fc-classic-AAt" });
|
|
14
|
+
}
|
|
15
|
+
function EventCalendarCloseIcon() {
|
|
16
|
+
return (React.createElement(CloseIcon, { sx: { fontSize: 18, margin: "1px" }, className: pressableIconClass }));
|
|
17
|
+
}
|
|
18
|
+
function EventCalendarExpanderIcon({ isExpanded }) {
|
|
19
|
+
return (React.createElement(ExpandMoreIcon, { sx: { fontSize: 18, margin: "1px" }, className: joinClassNames(pressableIconClass, !isExpanded && "fc-classic-doO fc-classic-Bzb") }));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { EventCalendarCloseIcon, EventCalendarExpanderIcon, EventCalendarNextIcon, EventCalendarPrevIcon };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CalendarOptions } from '@fullcalendar/core';
|
|
3
|
+
|
|
4
|
+
interface EventCalendarProps extends Omit<CalendarOptions, 'class'> {
|
|
5
|
+
availableViews?: string[];
|
|
6
|
+
addButton?: {
|
|
7
|
+
isPrimary?: boolean;
|
|
8
|
+
text?: string;
|
|
9
|
+
hint?: string;
|
|
10
|
+
click?: (ev: MouseEvent) => void;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
declare function EventCalendar({ availableViews, addButton, className, height, contentHeight, direction, plugins: userPlugins, ...restOptions }: EventCalendarProps): React.JSX.Element;
|
|
14
|
+
|
|
15
|
+
export { EventCalendarProps, EventCalendar as default };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useCalendarController } from '@fullcalendar/react';
|
|
3
|
+
import dayGridPlugin from '@fullcalendar/daygrid';
|
|
4
|
+
import timeGridPlugin from '@fullcalendar/timegrid';
|
|
5
|
+
import listPlugin from '@fullcalendar/list';
|
|
6
|
+
import interactionPlugin from '@fullcalendar/interaction';
|
|
7
|
+
import multiMonthPlugin from '@fullcalendar/multimonth';
|
|
8
|
+
import EventCalendarToolbar from './EventCalendarToolbar.js';
|
|
9
|
+
import EventCalendarViews from './EventCalendarViews.js';
|
|
10
|
+
import EventCalendarContainer from './EventCalendarContainer.js';
|
|
11
|
+
import '@mui/material/Box';
|
|
12
|
+
import '@mui/material/Button';
|
|
13
|
+
import '@mui/material/IconButton';
|
|
14
|
+
import '@mui/material/Typography';
|
|
15
|
+
import '@mui/material/ToggleButtonGroup';
|
|
16
|
+
import '@mui/material/ToggleButton';
|
|
17
|
+
import './icons.js';
|
|
18
|
+
import '@fullcalendar/core';
|
|
19
|
+
import '@mui/icons-material/ChevronLeft';
|
|
20
|
+
import '@mui/icons-material/ChevronRight';
|
|
21
|
+
import '@mui/icons-material/Close';
|
|
22
|
+
import '@mui/icons-material/ExpandMore';
|
|
23
|
+
import '@mui/material';
|
|
24
|
+
|
|
25
|
+
const plugins = [
|
|
26
|
+
dayGridPlugin,
|
|
27
|
+
timeGridPlugin,
|
|
28
|
+
listPlugin,
|
|
29
|
+
interactionPlugin,
|
|
30
|
+
multiMonthPlugin,
|
|
31
|
+
];
|
|
32
|
+
const defaultAvailableViews = [
|
|
33
|
+
'dayGridMonth',
|
|
34
|
+
'timeGridWeek',
|
|
35
|
+
'timeGridDay',
|
|
36
|
+
'listWeek',
|
|
37
|
+
'multiMonthYear',
|
|
38
|
+
];
|
|
39
|
+
const navLinkDayClick = 'timeGridDay';
|
|
40
|
+
const navLinkWeekClick = 'timeGridWeek';
|
|
41
|
+
function EventCalendar({ availableViews = defaultAvailableViews, addButton, className, height, contentHeight, direction, plugins: userPlugins = [], ...restOptions }) {
|
|
42
|
+
const controller = useCalendarController();
|
|
43
|
+
const autoHeight = height === 'auto' || contentHeight === 'auto';
|
|
44
|
+
return (React.createElement(EventCalendarContainer, { direction: direction, className: className, height: height, borderless: restOptions.borderless, borderlessX: restOptions.borderlessX, borderlessTop: restOptions.borderlessTop, borderlessBottom: restOptions.borderlessBottom },
|
|
45
|
+
React.createElement(EventCalendarToolbar, { controller: controller, availableViews: availableViews, addButton: addButton }),
|
|
46
|
+
React.createElement(EventCalendarViews, { liquidHeight: !autoHeight && height !== undefined, height: autoHeight ? 'auto' : contentHeight, initialView: availableViews[0], navLinkDayClick: navLinkDayClick, navLinkWeekClick: navLinkWeekClick, controller: controller, plugins: [...plugins, ...userPlugins], ...restOptions })));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { EventCalendar as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
interface EventCalendarContainerProps {
|
|
4
|
+
direction: 'ltr' | 'rtl' | undefined;
|
|
5
|
+
className: string | undefined;
|
|
6
|
+
height: string | number | undefined;
|
|
7
|
+
borderless: boolean | undefined;
|
|
8
|
+
borderlessX: boolean | undefined;
|
|
9
|
+
borderlessTop: boolean | undefined;
|
|
10
|
+
borderlessBottom: boolean | undefined;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
declare function EventCalendarContainer(props: EventCalendarContainerProps): React.JSX.Element;
|
|
14
|
+
|
|
15
|
+
export { EventCalendarContainerProps, EventCalendarContainer as default };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Box from '@mui/material/Box';
|
|
3
|
+
|
|
4
|
+
function EventCalendarContainer(props) {
|
|
5
|
+
const borderlessX = props.borderlessX ?? props.borderless;
|
|
6
|
+
const borderlessTop = props.borderlessTop ?? props.borderless;
|
|
7
|
+
const borderlessBottom = props.borderlessBottom ?? props.borderless;
|
|
8
|
+
return (React.createElement(Box, { dir: props.direction === 'rtl' ? 'rtl' : undefined, className: props.className, sx: {
|
|
9
|
+
display: 'flex',
|
|
10
|
+
flexDirection: 'column',
|
|
11
|
+
height: props.height,
|
|
12
|
+
bgcolor: 'background.paper',
|
|
13
|
+
borderStyle: 'solid',
|
|
14
|
+
borderColor: 'divider',
|
|
15
|
+
borderLeftWidth: borderlessX ? 0 : 1,
|
|
16
|
+
borderRightWidth: borderlessX ? 0 : 1,
|
|
17
|
+
borderTopWidth: borderlessTop ? 0 : 1,
|
|
18
|
+
borderBottomWidth: borderlessBottom ? 0 : 1,
|
|
19
|
+
...(borderlessX || borderlessTop || borderlessBottom ? {} : {
|
|
20
|
+
borderRadius: 1,
|
|
21
|
+
overflow: 'hidden',
|
|
22
|
+
})
|
|
23
|
+
} }, props.children));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { EventCalendarContainer as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CalendarController } from '@fullcalendar/core';
|
|
3
|
+
|
|
4
|
+
interface EventCalendarToolbarProps {
|
|
5
|
+
controller: CalendarController;
|
|
6
|
+
availableViews: string[];
|
|
7
|
+
addButton?: {
|
|
8
|
+
isPrimary?: boolean;
|
|
9
|
+
text?: string;
|
|
10
|
+
hint?: string;
|
|
11
|
+
click?: (ev: MouseEvent) => void;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
declare function EventCalendarToolbar({ controller, availableViews, addButton, }: EventCalendarToolbarProps): React.JSX.Element;
|
|
15
|
+
|
|
16
|
+
export { EventCalendarToolbarProps, EventCalendarToolbar as default };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Box from '@mui/material/Box';
|
|
3
|
+
import Button from '@mui/material/Button';
|
|
4
|
+
import IconButton from '@mui/material/IconButton';
|
|
5
|
+
import Typography from '@mui/material/Typography';
|
|
6
|
+
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
|
|
7
|
+
import ToggleButton from '@mui/material/ToggleButton';
|
|
8
|
+
import { EventCalendarPrevIcon, EventCalendarNextIcon } from './icons.js';
|
|
9
|
+
import '@fullcalendar/core';
|
|
10
|
+
import '@mui/icons-material/ChevronLeft';
|
|
11
|
+
import '@mui/icons-material/ChevronRight';
|
|
12
|
+
import '@mui/icons-material/Close';
|
|
13
|
+
import '@mui/icons-material/ExpandMore';
|
|
14
|
+
|
|
15
|
+
function EventCalendarToolbar({ controller, availableViews, addButton, }) {
|
|
16
|
+
const buttons = controller.getButtonState();
|
|
17
|
+
return (React.createElement(Box, { sx: {
|
|
18
|
+
display: 'flex',
|
|
19
|
+
flexWrap: 'wrap',
|
|
20
|
+
alignItems: 'center',
|
|
21
|
+
justifyContent: 'space-between',
|
|
22
|
+
gap: 1,
|
|
23
|
+
padding: 1.5,
|
|
24
|
+
borderBottom: '1px solid',
|
|
25
|
+
borderColor: 'divider',
|
|
26
|
+
} },
|
|
27
|
+
React.createElement(Box, { sx: {
|
|
28
|
+
display: 'flex',
|
|
29
|
+
flexShrink: 0,
|
|
30
|
+
alignItems: 'center',
|
|
31
|
+
gap: 1,
|
|
32
|
+
} },
|
|
33
|
+
addButton && (React.createElement(Button, { onClick: addButton.click, "aria-label": addButton.hint, variant: addButton.isPrimary === false ? 'outlined' : 'contained' }, addButton.text)),
|
|
34
|
+
React.createElement(Button, { onClick: () => controller.today(), "aria-label": buttons.today.hint, variant: "outlined" }, buttons.today.text),
|
|
35
|
+
React.createElement(Box, { sx: {
|
|
36
|
+
display: 'flex',
|
|
37
|
+
alignItems: 'center',
|
|
38
|
+
} },
|
|
39
|
+
React.createElement(IconButton, { onClick: () => controller.prev(), disabled: buttons.prev.isDisabled, "aria-label": buttons.prev.hint },
|
|
40
|
+
React.createElement(EventCalendarPrevIcon, null)),
|
|
41
|
+
React.createElement(IconButton, { onClick: () => controller.next(), disabled: buttons.next.isDisabled, "aria-label": buttons.next.hint },
|
|
42
|
+
React.createElement(EventCalendarNextIcon, null))),
|
|
43
|
+
React.createElement(Typography, { variant: "h5" }, controller.view?.title)),
|
|
44
|
+
React.createElement(ToggleButtonGroup, { size: "small", exclusive: true, value: controller.view?.type, onChange: (_ev, val) => {
|
|
45
|
+
controller.changeView(val);
|
|
46
|
+
} }, availableViews.map((availableView) => (React.createElement(ToggleButton, { key: availableView, value: availableView, "aria-label": buttons[availableView]?.hint, color: "primary" },
|
|
47
|
+
React.createElement(Box, { sx: { px: 1 } }, buttons[availableView]?.text)))))));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { EventCalendarToolbar as default };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DayCellData, CalendarOptions } from '@fullcalendar/core';
|
|
3
|
+
|
|
4
|
+
declare const outlineWidthClass = "outline-3";
|
|
5
|
+
declare const outlineWidthFocusClass = "focus-visible:outline-3";
|
|
6
|
+
declare const outlineOffsetClass = "outline-offset-1";
|
|
7
|
+
declare const outlineInsetClass = "-outline-offset-3";
|
|
8
|
+
declare const primaryOutlineColorClass = "outline-(--mui-palette-primary-main)";
|
|
9
|
+
declare const strongSolidPressableClass: string;
|
|
10
|
+
declare const mutedBgClass = "bg-[rgba(var(--mui-palette-text-primaryChannel)_/_0.08)]";
|
|
11
|
+
declare const mutedPressableClass: string;
|
|
12
|
+
declare const mutedHoverPressableClass: string;
|
|
13
|
+
declare const faintBgClass = "bg-[rgba(var(--mui-palette-text-primaryChannel)_/_0.04)]";
|
|
14
|
+
declare const primaryClass = "bg-(--mui-palette-primary-main) text-(--mui-palette-primary-contrastText)";
|
|
15
|
+
declare const primaryPressableClass: string;
|
|
16
|
+
declare const eventMutedBgClass = "bg-[color-mix(in_oklab,var(--fc-event-color)_30%,var(--mui-palette-background-paper))]";
|
|
17
|
+
declare const eventMutedPressableClass: string;
|
|
18
|
+
declare const eventFaintBgClass = "bg-[color-mix(in_oklab,var(--fc-event-color)_20%,var(--mui-palette-background-paper))]";
|
|
19
|
+
declare const eventFaintPressableClass: string;
|
|
20
|
+
declare const rowPointerResizerClass: string;
|
|
21
|
+
declare const rowTouchResizerClass: string;
|
|
22
|
+
declare const tallDayCellBottomClass = "min-h-4";
|
|
23
|
+
declare const getShortDayCellBottomClass: (data: DayCellData) => string;
|
|
24
|
+
declare const dayRowCommonClasses: CalendarOptions;
|
|
25
|
+
interface EventCalendarViewsProps extends CalendarOptions {
|
|
26
|
+
liquidHeight?: boolean;
|
|
27
|
+
}
|
|
28
|
+
declare function EventCalendarViews({ className, liquidHeight, height, views: userViews, ...restOptions }: EventCalendarViewsProps): React.JSX.Element;
|
|
29
|
+
|
|
30
|
+
export { EventCalendarViewsProps, dayRowCommonClasses, EventCalendarViews as default, eventFaintBgClass, eventFaintPressableClass, eventMutedBgClass, eventMutedPressableClass, faintBgClass, getShortDayCellBottomClass, mutedBgClass, mutedHoverPressableClass, mutedPressableClass, outlineInsetClass, outlineOffsetClass, outlineWidthClass, outlineWidthFocusClass, primaryClass, primaryOutlineColorClass, primaryPressableClass, rowPointerResizerClass, rowTouchResizerClass, strongSolidPressableClass, tallDayCellBottomClass };
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import FullCalendar from '@fullcalendar/react';
|
|
3
|
+
import { joinClassNames } from '@fullcalendar/core';
|
|
4
|
+
import { Box } from '@mui/material';
|
|
5
|
+
import { EventCalendarCloseIcon } from './icons.js';
|
|
6
|
+
import '@mui/icons-material/ChevronLeft';
|
|
7
|
+
import '@mui/icons-material/ChevronRight';
|
|
8
|
+
import '@mui/icons-material/Close';
|
|
9
|
+
import '@mui/icons-material/ExpandMore';
|
|
10
|
+
|
|
11
|
+
// outline
|
|
12
|
+
const outlineWidthClass = "fc-forma-bAU";
|
|
13
|
+
const outlineWidthFocusClass = "fc-forma-Tid";
|
|
14
|
+
const outlineOffsetClass = "fc-forma-fKI";
|
|
15
|
+
const outlineInsetClass = "fc-forma-bzG";
|
|
16
|
+
const primaryOutlineColorClass = "fc-forma-p95";
|
|
17
|
+
// strongest (25%)
|
|
18
|
+
const strongestSolidBgActiveClass = "fc-forma-lS3";
|
|
19
|
+
// stronger (20%)
|
|
20
|
+
const strongerBgActiveClass = "fc-forma-iWk";
|
|
21
|
+
const strongerSolidBgHoverClass = "fc-forma-fEn";
|
|
22
|
+
// strong (16%)
|
|
23
|
+
const strongBgHoverClass = "fc-forma-XCy";
|
|
24
|
+
const strongBgFocusClass = "fc-forma-WPX";
|
|
25
|
+
const strongBgActiveClass = "fc-forma-kup";
|
|
26
|
+
const strongSolidBgClass = "fc-forma-5V9";
|
|
27
|
+
const strongSolidPressableClass = `${strongSolidBgClass} ${strongerSolidBgHoverClass} ${strongestSolidBgActiveClass}`;
|
|
28
|
+
// muted (8%)
|
|
29
|
+
const mutedBgClass = "fc-forma-VxY";
|
|
30
|
+
const mutedBgHoverClass = "fc-forma-znR";
|
|
31
|
+
const mutedPressableClass = `${mutedBgClass} ${strongBgHoverClass} ${strongerBgActiveClass}`;
|
|
32
|
+
const mutedHoverPressableClass = `${mutedBgHoverClass} ${strongBgFocusClass} ${strongBgActiveClass}`;
|
|
33
|
+
// faint (4%)
|
|
34
|
+
const faintBgClass = "fc-forma-IKt";
|
|
35
|
+
// primary
|
|
36
|
+
const primaryClass = "fc-forma-OSb fc-forma-Yus";
|
|
37
|
+
const primaryPressableClass = `${primaryClass} fc-forma-VzK fc-forma-Fmz`;
|
|
38
|
+
// event content
|
|
39
|
+
const eventMutedBgClass = "fc-forma-ZCt";
|
|
40
|
+
const eventMutedPressableClass = joinClassNames(eventMutedBgClass, "fc-forma-Jvb", "fc-forma-S89");
|
|
41
|
+
const eventFaintBgClass = "fc-forma-v3L";
|
|
42
|
+
const eventFaintPressableClass = joinClassNames(eventFaintBgClass, "fc-forma-hi1", "fc-forma-W36");
|
|
43
|
+
// usually 11px font / 12px line-height
|
|
44
|
+
const xxsTextClass = "fc-forma-HRt";
|
|
45
|
+
// transparent resizer for mouse
|
|
46
|
+
const blockPointerResizerClass = "fc-forma-YA2 fc-forma-C9h fc-forma-ZkV";
|
|
47
|
+
const rowPointerResizerClass = `${blockPointerResizerClass} fc-forma-8ZZ fc-forma-1lj`;
|
|
48
|
+
const columnPointerResizerClass = `${blockPointerResizerClass} fc-forma-xX5 fc-forma-433`;
|
|
49
|
+
// circle resizer for touch
|
|
50
|
+
const blockTouchResizerClass = `fc-forma-YA2 fc-forma-tEU fc-forma-UZp fc-forma-qvz fc-forma-IdG fc-forma-Y27`;
|
|
51
|
+
const rowTouchResizerClass = `${blockTouchResizerClass} fc-forma-if4 fc-forma-NN9`;
|
|
52
|
+
const columnTouchResizerClass = `${blockTouchResizerClass} fc-forma-Z2g fc-forma-RWU`;
|
|
53
|
+
const tallDayCellBottomClass = "fc-forma-DLQ";
|
|
54
|
+
const getShortDayCellBottomClass = (data) => joinClassNames(!data.isNarrow && "fc-forma-WoG");
|
|
55
|
+
const getSlotClass = (data) => joinClassNames(`fc-forma-UZp fc-forma-G56`, data.isMinor && "fc-forma-M5N");
|
|
56
|
+
const dayRowCommonClasses = {
|
|
57
|
+
/* Day Row > List-Item Event
|
|
58
|
+
----------------------------------------------------------------------------------------------- */
|
|
59
|
+
listItemEventClass: (data) => joinClassNames("fc-forma-mwm fc-forma-df6 fc-forma-dpa", data.isNarrow ? "fc-forma-6gf" : "fc-forma-qK4", data.isSelected
|
|
60
|
+
? mutedBgClass
|
|
61
|
+
: data.isInteractive
|
|
62
|
+
? mutedHoverPressableClass
|
|
63
|
+
: mutedBgHoverClass),
|
|
64
|
+
listItemEventBeforeClass: (data) => joinClassNames("fc-forma-PrA fc-forma-qvz fc-forma-IdG", data.isNarrow ? "fc-forma-GSF" : "fc-forma-fpO"),
|
|
65
|
+
listItemEventInnerClass: (data) => (data.isNarrow
|
|
66
|
+
? `fc-forma-h2r ${xxsTextClass}`
|
|
67
|
+
: "fc-forma-vvo fc-forma-17F"),
|
|
68
|
+
listItemEventTimeClass: (data) => joinClassNames(data.isNarrow ? "fc-forma-qNU" : "fc-forma-I6e", "fc-forma-JTJ fc-forma-O5O fc-forma-qbn"),
|
|
69
|
+
listItemEventTitleClass: (data) => joinClassNames(data.isNarrow ? "fc-forma-55Y" : "fc-forma-qB7", "fc-forma-Kw3 fc-forma-JTJ fc-forma-O5O fc-forma-nGI"),
|
|
70
|
+
/* Day Row > Row Event
|
|
71
|
+
----------------------------------------------------------------------------------------------- */
|
|
72
|
+
rowEventClass: (data) => joinClassNames(data.isEnd && (data.isNarrow ? "fc-forma-bpq" : "fc-forma-Jha")),
|
|
73
|
+
rowEventInnerClass: (data) => data.isNarrow ? "fc-forma-h2r" : "fc-forma-vvo",
|
|
74
|
+
/* Day Row > More-Link
|
|
75
|
+
----------------------------------------------------------------------------------------------- */
|
|
76
|
+
rowMoreLinkClass: (data) => joinClassNames("fc-forma-mwm fc-forma-UZp fc-forma-dpa", data.isNarrow
|
|
77
|
+
? `fc-forma-6gf fc-forma-R95`
|
|
78
|
+
: "fc-forma-qK4 fc-forma-lqW fc-forma-rK9", mutedHoverPressableClass),
|
|
79
|
+
rowMoreLinkInnerClass: (data) => (data.isNarrow
|
|
80
|
+
? `fc-forma-55Y fc-forma-h2r ${xxsTextClass}`
|
|
81
|
+
: "fc-forma-qB7 fc-forma-vvo fc-forma-17F"),
|
|
82
|
+
};
|
|
83
|
+
function EventCalendarViews({ className, liquidHeight, height, views: userViews, ...restOptions }) {
|
|
84
|
+
return (React.createElement(Box, { className: className, sx: liquidHeight ? { flexGrow: 1, minHeight: 0 } : {} },
|
|
85
|
+
React.createElement(FullCalendar, { className: "fc-forma-ND7", height: liquidHeight ? "100%" : height,
|
|
86
|
+
/* Abstract Event
|
|
87
|
+
----------------------------------------------------------------------------------------- */
|
|
88
|
+
eventShortHeight: 50, eventColor: "var(--mui-palette-primary-main)", eventContrastColor: "var(--mui-palette-primary-contrastText)", eventClass: (data) => joinClassNames(data.isSelected
|
|
89
|
+
? joinClassNames(outlineWidthClass, data.isDragging && "fc-forma-ACR")
|
|
90
|
+
: outlineWidthFocusClass, primaryOutlineColorClass),
|
|
91
|
+
/* Background Event
|
|
92
|
+
----------------------------------------------------------------------------------------- */
|
|
93
|
+
backgroundEventColor: "var(--mui-palette-secondary-main)", backgroundEventClass: "fc-forma-Z7B", backgroundEventTitleClass: (data) => joinClassNames("fc-forma-F6C fc-forma-dra", data.isNarrow
|
|
94
|
+
? `fc-forma-xbC ${xxsTextClass}`
|
|
95
|
+
: "fc-forma-aS8 fc-forma-17F"),
|
|
96
|
+
/* List-Item Event
|
|
97
|
+
----------------------------------------------------------------------------------------- */
|
|
98
|
+
listItemEventClass: "fc-forma-gfU", listItemEventInnerClass: "fc-forma-Hhr fc-forma-uEy fc-forma-gfU",
|
|
99
|
+
/* Block Event
|
|
100
|
+
----------------------------------------------------------------------------------------- */
|
|
101
|
+
blockEventClass: (data) => joinClassNames(`fc-forma-ytQ fc-forma-vPs fc-forma-qvz fc-forma-82y ${outlineOffsetClass}`, data.isInteractive
|
|
102
|
+
? eventMutedPressableClass
|
|
103
|
+
: eventMutedBgClass, (data.isDragging && !data.isSelected) && "fc-forma-0HG"), blockEventTimeClass: "fc-forma-JTJ fc-forma-O5O fc-forma-qbn", blockEventTitleClass: "fc-forma-JTJ fc-forma-O5O fc-forma-nGI",
|
|
104
|
+
/* Row Event
|
|
105
|
+
----------------------------------------------------------------------------------------- */
|
|
106
|
+
rowEventClass: (data) => joinClassNames("fc-forma-mwm fc-forma-01w fc-forma-ur4 fc-forma-gfU", data.isStart && "fc-forma-FgQ fc-forma-fdR", data.isEnd && "fc-forma-EHb fc-forma-7EV fc-forma-Ea4"), rowEventBeforeClass: (data) => joinClassNames(data.isStartResizable ? joinClassNames(data.isSelected ? rowTouchResizerClass : rowPointerResizerClass, "fc-forma-x0Q") : (!data.isStart && !data.isNarrow) &&
|
|
107
|
+
"fc-forma-fpO fc-forma-tEU fc-forma-kP8 fc-forma-ZLU fc-forma-crG fc-forma-Edw fc-forma-mGk"), rowEventAfterClass: (data) => joinClassNames(data.isEndResizable ? joinClassNames(data.isSelected ? rowTouchResizerClass : rowPointerResizerClass, "fc-forma-8rg") : (!data.isEnd && !data.isNarrow) &&
|
|
108
|
+
"fc-forma-hCF fc-forma-tEU fc-forma-kP8 fc-forma-fMn fc-forma-crG fc-forma-SBP fc-forma-uuE"), rowEventInnerClass: (data) => joinClassNames("fc-forma-Hhr fc-forma-uEy fc-forma-gfU", data.isNarrow ? xxsTextClass : "fc-forma-17F"), rowEventTimeClass: (data) => joinClassNames("fc-forma-kIZ", data.isNarrow ? "fc-forma-qNU" : "fc-forma-I6e"), rowEventTitleClass: (data) => joinClassNames(data.isNarrow ? "fc-forma-55Y" : "fc-forma-qB7"),
|
|
109
|
+
/* Column Event
|
|
110
|
+
----------------------------------------------------------------------------------------- */
|
|
111
|
+
columnEventClass: (data) => joinClassNames("fc-forma-FgQ fc-forma-EHb fc-forma-7EV fc-forma-z3l fc-forma-bLM", data.isStart && "fc-forma-Bgy fc-forma-cQB fc-forma-ugX", data.isEnd && "fc-forma-mwm fc-forma-mGy fc-forma-gjk fc-forma-7zG"), columnEventBeforeClass: (data) => joinClassNames(data.isStartResizable && joinClassNames(data.isSelected ? columnTouchResizerClass : columnPointerResizerClass, "fc-forma-f4s")), columnEventAfterClass: (data) => joinClassNames(data.isEndResizable && joinClassNames(data.isSelected ? columnTouchResizerClass : columnPointerResizerClass, "fc-forma-I8n")), columnEventInnerClass: (data) => joinClassNames("fc-forma-Hhr", data.isShort
|
|
112
|
+
? "fc-forma-uEy fc-forma-gfU fc-forma-xbC fc-forma-RVT"
|
|
113
|
+
: joinClassNames("fc-forma-bXY", data.isNarrow ? "fc-forma-55Y" : "fc-forma-qB7")), columnEventTimeClass: (data) => joinClassNames(!data.isShort && (data.isNarrow ? "fc-forma-zvv" : "fc-forma-q8O"), xxsTextClass), columnEventTitleClass: (data) => joinClassNames(!data.isShort && (data.isNarrow ? "fc-forma-vvo" : "fc-forma-ztx"), (data.isShort || data.isNarrow) ? xxsTextClass : "fc-forma-17F"),
|
|
114
|
+
/* More-Link
|
|
115
|
+
----------------------------------------------------------------------------------------- */
|
|
116
|
+
moreLinkClass: `${outlineWidthFocusClass} ${primaryOutlineColorClass}`, moreLinkInnerClass: "fc-forma-JTJ fc-forma-O5O", columnMoreLinkClass: `fc-forma-mwm fc-forma-UZp fc-forma-lqW fc-forma-ePV fc-forma-dpa ${strongSolidPressableClass} fc-forma-82y fc-forma-z3l fc-forma-bLM ${outlineOffsetClass}`, columnMoreLinkInnerClass: (data) => (data.isNarrow
|
|
117
|
+
? `fc-forma-KbZ ${xxsTextClass}`
|
|
118
|
+
: "fc-forma-xbC fc-forma-17F"),
|
|
119
|
+
/* Day Header
|
|
120
|
+
----------------------------------------------------------------------------------------- */
|
|
121
|
+
dayHeaderAlign: (data) => data.isNarrow ? "center" : "start", dayHeaderClass: (data) => joinClassNames("fc-forma-a65", data.isToday && !data.level && "fc-forma-vPs", data.isDisabled && faintBgClass, data.inPopover
|
|
122
|
+
? "fc-forma-QTT fc-forma-G56"
|
|
123
|
+
: joinClassNames(data.isMajor ? "fc-forma-UZp fc-forma-I55" :
|
|
124
|
+
!data.isNarrow && "fc-forma-UZp fc-forma-G56")), dayHeaderInnerClass: (data) => joinClassNames(data.isToday && data.level && "fc-forma-vPs", "fc-forma-aS8 fc-forma-Hhr fc-forma-bXY", data.hasNavLink && joinClassNames(mutedHoverPressableClass, outlineInsetClass)), dayHeaderContent: (data) => (React.createElement(React.Fragment, null,
|
|
125
|
+
data.isToday && (React.createElement("div", { className: `fc-forma-YA2 fc-forma-pPI fc-forma-xX5 fc-forma-l1Q fc-forma-R95 fc-forma-CT3` })),
|
|
126
|
+
data.dayNumberText && (React.createElement("div", { className: joinClassNames(data.isToday && "fc-forma-Kw3", data.isNarrow ? "fc-forma-4Bx" : "fc-forma-7Kt") }, data.dayNumberText)),
|
|
127
|
+
data.weekdayText && (React.createElement("div", { className: "fc-forma-17F" }, data.weekdayText)))),
|
|
128
|
+
/* Day Cell
|
|
129
|
+
----------------------------------------------------------------------------------------- */
|
|
130
|
+
dayCellClass: (data) => joinClassNames("fc-forma-UZp", data.isMajor ? "fc-forma-I55" : "fc-forma-G56", ((data.isOther || data.isDisabled) && !data.options.businessHours) && faintBgClass), dayCellTopClass: (data) => joinClassNames(data.isNarrow ? "fc-forma-WoG" : "fc-forma-s9U", "fc-forma-Hhr fc-forma-uEy", ((data.isOther || data.isDisabled) && data.options.businessHours) && "fc-forma-x07"), dayCellTopInnerClass: (data) => joinClassNames("fc-forma-Hhr fc-forma-uEy fc-forma-gfU fc-forma-a65 fc-forma-JTJ", data.isNarrow
|
|
131
|
+
? `fc-forma-8in fc-forma-cL9 ${xxsTextClass}`
|
|
132
|
+
: "fc-forma-19X fc-forma-6U1 fc-forma-gEy", data.isToday
|
|
133
|
+
? joinClassNames("fc-forma-IdG", data.isNarrow ? "fc-forma-9ZR" : "fc-forma-fpO", data.text === data.dayNumberText
|
|
134
|
+
? (data.isNarrow ? "fc-forma-CSa" : "fc-forma-IdL")
|
|
135
|
+
: (data.isNarrow ? "fc-forma-qB7" : "fc-forma-ybQ"), data.hasNavLink
|
|
136
|
+
? joinClassNames(primaryPressableClass, outlineOffsetClass)
|
|
137
|
+
: primaryClass)
|
|
138
|
+
: joinClassNames("fc-forma-Ea4", data.isNarrow ? "fc-forma-qB7" : "fc-forma-ybQ", data.hasNavLink && mutedHoverPressableClass), data.monthText && "fc-forma-Kw3"), dayCellInnerClass: (data) => joinClassNames(data.inPopover && "fc-forma-aS8"),
|
|
139
|
+
/* Popover
|
|
140
|
+
----------------------------------------------------------------------------------------- */
|
|
141
|
+
dayPopoverFormat: { day: "numeric", weekday: "long" }, popoverClass: "fc-forma-HBk fc-forma-Y27 fc-forma-DC1 fc-forma-8Kl fc-forma-O5O fc-forma-uPX fc-forma-c0k fc-forma-nhl fc-forma-ND7", popoverCloseClass: `fc-forma-ytQ fc-forma-YA2 fc-forma-CdJ fc-forma-OPI fc-forma-xbC fc-forma-dpa ${mutedHoverPressableClass} ${outlineWidthFocusClass} ${primaryOutlineColorClass} fc-forma-om0`, popoverCloseContent: () => React.createElement(EventCalendarCloseIcon, null), dayLaneClass: (data) => joinClassNames("fc-forma-UZp", data.isMajor ? "fc-forma-I55" : "fc-forma-G56", data.isDisabled && faintBgClass), dayLaneInnerClass: (data) => (data.isStack
|
|
142
|
+
? "fc-forma-JQD"
|
|
143
|
+
: data.isNarrow ? "fc-forma-6gf" : "fc-forma-GSF fc-forma-Dk5"), slotLaneClass: getSlotClass, listDayClass: "fc-forma-2uq fc-forma-G56 fc-forma-Hhr fc-forma-uEy fc-forma-lUe", listDayHeaderClass: (data) => joinClassNames("fc-forma-yvz fc-forma-m2e fc-forma-cHr fc-forma-kHK fc-forma-Hhr fc-forma-bXY fc-forma-lUe", data.isToday && "fc-forma-4Ki fc-forma-R95"), listDayHeaderInnerClass: (data) => joinClassNames("fc-forma-kOE", !data.level
|
|
144
|
+
? joinClassNames("fc-forma-7Kt", data.isToday && "fc-forma-Kw3")
|
|
145
|
+
: "fc-forma-17F", data.hasNavLink && "fc-forma-jaW"), listDayEventsClass: "fc-forma-oee fc-forma-qbd fc-forma-fIh fc-forma-rc8",
|
|
146
|
+
/* Single Month (in Multi-Month)
|
|
147
|
+
----------------------------------------------------------------------------------------- */
|
|
148
|
+
singleMonthClass: "fc-forma-tZ3", singleMonthHeaderClass: (data) => joinClassNames(data.colCount > 1 ? "fc-forma-LbL" : "fc-forma-KyB", data.isSticky && `fc-forma-QTT fc-forma-G56 fc-forma-Y27`, "fc-forma-gfU"), singleMonthHeaderInnerClass: (data) => joinClassNames("fc-forma-qB7 fc-forma-dpa fc-forma-Kw3", data.hasNavLink && mutedHoverPressableClass, data.isNarrow ? "fc-forma-PuF" : "fc-forma-7Kt"),
|
|
149
|
+
/* Misc Table
|
|
150
|
+
----------------------------------------------------------------------------------------- */
|
|
151
|
+
tableHeaderClass: (data) => joinClassNames(data.isSticky && "fc-forma-Y27"), fillerClass: "fc-forma-UZp fc-forma-G56 fc-forma-F6C", dayNarrowWidth: 100, dayHeaderRowClass: "fc-forma-UZp fc-forma-G56", dayRowClass: "fc-forma-UZp fc-forma-G56", slotHeaderRowClass: "fc-forma-UZp fc-forma-G56", slotHeaderClass: getSlotClass,
|
|
152
|
+
/* Misc Content
|
|
153
|
+
----------------------------------------------------------------------------------------- */
|
|
154
|
+
navLinkClass: `${outlineWidthFocusClass} ${primaryOutlineColorClass}`, inlineWeekNumberClass: (data) => joinClassNames("fc-forma-YA2 fc-forma-MS6 fc-forma-JTJ fc-forma-fdR", data.isNarrow
|
|
155
|
+
? `fc-forma-RWe fc-forma-8in fc-forma-KbZ ${xxsTextClass}`
|
|
156
|
+
: "fc-forma-CdJ fc-forma-xbC fc-forma-17F", data.hasNavLink
|
|
157
|
+
? mutedPressableClass
|
|
158
|
+
: mutedBgClass), nonBusinessClass: faintBgClass, highlightClass: "fc-forma-gKu", nowIndicatorLineClass: "fc-forma-7VH fc-forma-v0S fc-forma-R3n", nowIndicatorDotClass: "fc-forma-xny fc-forma-uDX fc-forma-R3n fc-forma-UmK fc-forma-IdG fc-forma-fo8 fc-forma-bLM",
|
|
159
|
+
/* View-Specific Options
|
|
160
|
+
----------------------------------------------------------------------------------------- */
|
|
161
|
+
views: {
|
|
162
|
+
...userViews,
|
|
163
|
+
dayGrid: {
|
|
164
|
+
...dayRowCommonClasses,
|
|
165
|
+
dayHeaderDividerClass: `fc-forma-QTT fc-forma-G56`,
|
|
166
|
+
dayCellBottomClass: getShortDayCellBottomClass,
|
|
167
|
+
backgroundEventInnerClass: "fc-forma-Hhr fc-forma-uEy fc-forma-RhI",
|
|
168
|
+
...userViews?.dayGrid,
|
|
169
|
+
},
|
|
170
|
+
dayGridMonth: {
|
|
171
|
+
dayHeaderFormat: { weekday: "long" },
|
|
172
|
+
...userViews?.dayGridMonth,
|
|
173
|
+
},
|
|
174
|
+
multiMonth: {
|
|
175
|
+
...dayRowCommonClasses,
|
|
176
|
+
dayHeaderDividerClass: (data) => joinClassNames(data.isSticky && "fc-forma-QTT fc-forma-G56"),
|
|
177
|
+
dayCellBottomClass: getShortDayCellBottomClass,
|
|
178
|
+
dayHeaderInnerClass: (data) => joinClassNames(data.isNarrow && "fc-forma-Znt"),
|
|
179
|
+
tableBodyClass: `fc-forma-UZp fc-forma-G56 fc-forma-dpa fc-forma-O5O`,
|
|
180
|
+
...userViews?.multiMonth,
|
|
181
|
+
},
|
|
182
|
+
timeGrid: {
|
|
183
|
+
...dayRowCommonClasses,
|
|
184
|
+
dayHeaderDividerClass: `fc-forma-QTT fc-forma-G56`,
|
|
185
|
+
dayCellBottomClass: tallDayCellBottomClass,
|
|
186
|
+
dayHeaderAlign: "start",
|
|
187
|
+
/* TimeGrid > Week Number Header
|
|
188
|
+
------------------------------------------------------------------------------------- */
|
|
189
|
+
weekNumberHeaderClass: "fc-forma-lU0 fc-forma-RhI",
|
|
190
|
+
weekNumberHeaderInnerClass: (data) => joinClassNames("fc-forma-JQD fc-forma-xbC fc-forma-dpa fc-forma-17F", data.hasNavLink && mutedHoverPressableClass),
|
|
191
|
+
/* TimeGrid > All-Day Header
|
|
192
|
+
------------------------------------------------------------------------------------- */
|
|
193
|
+
allDayHeaderClass: "fc-forma-gfU fc-forma-RhI",
|
|
194
|
+
allDayHeaderInnerClass: (data) => joinClassNames("fc-forma-aS8 fc-forma-csg fc-forma-XMF", data.isNarrow ? xxsTextClass : "fc-forma-17F"),
|
|
195
|
+
allDayDividerClass: `fc-forma-QTT fc-forma-G56`,
|
|
196
|
+
/* TimeGrid > Slot Header
|
|
197
|
+
------------------------------------------------------------------------------------- */
|
|
198
|
+
slotHeaderClass: "fc-forma-RhI",
|
|
199
|
+
slotHeaderInnerClass: (data) => joinClassNames("fc-forma-aS8", data.isNarrow ? xxsTextClass : "fc-forma-17F"),
|
|
200
|
+
slotHeaderDividerClass: `fc-forma-EWl fc-forma-G56`,
|
|
201
|
+
...userViews?.timeGrid,
|
|
202
|
+
},
|
|
203
|
+
list: {
|
|
204
|
+
/* List-View > List-Item Event
|
|
205
|
+
------------------------------------------------------------------------------------- */
|
|
206
|
+
listItemEventClass: (data) => joinClassNames("fc-forma-ytQ fc-forma-FgQ fc-forma-qvz fc-forma-kHK fc-forma-dpa", data.isInteractive
|
|
207
|
+
? eventFaintPressableClass
|
|
208
|
+
: eventFaintBgClass),
|
|
209
|
+
listItemEventInnerClass: "fc-forma-ODb fc-forma-gEy",
|
|
210
|
+
listItemEventTimeClass: "fc-forma-yvz fc-forma-8Ko fc-forma-cHr fc-forma-JTJ fc-forma-O5O fc-forma-yGY",
|
|
211
|
+
listItemEventTitleClass: (data) => joinClassNames("fc-forma-oee fc-forma-qbd fc-forma-JTJ fc-forma-O5O fc-forma-RKK", data.event.url && "fc-forma-YdZ"),
|
|
212
|
+
/* No-Events Screen
|
|
213
|
+
------------------------------------------------------------------------------------- */
|
|
214
|
+
noEventsClass: "fc-forma-oee fc-forma-Hhr fc-forma-bXY fc-forma-gfU fc-forma-a65",
|
|
215
|
+
noEventsInnerClass: "fc-forma-UyD",
|
|
216
|
+
...userViews?.list,
|
|
217
|
+
},
|
|
218
|
+
}, ...restOptions })));
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export { dayRowCommonClasses, EventCalendarViews as default, eventFaintBgClass, eventFaintPressableClass, eventMutedBgClass, eventMutedPressableClass, faintBgClass, getShortDayCellBottomClass, mutedBgClass, mutedHoverPressableClass, mutedPressableClass, outlineInsetClass, outlineOffsetClass, outlineWidthClass, outlineWidthFocusClass, primaryClass, primaryOutlineColorClass, primaryPressableClass, rowPointerResizerClass, rowTouchResizerClass, strongSolidPressableClass, tallDayCellBottomClass };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CalendarOptions } from '@fullcalendar/core';
|
|
3
|
+
|
|
4
|
+
interface ResourceTimeGridProps extends Omit<CalendarOptions, 'class'> {
|
|
5
|
+
availableViews?: string[];
|
|
6
|
+
addButton?: {
|
|
7
|
+
isPrimary?: boolean;
|
|
8
|
+
text?: string;
|
|
9
|
+
hint?: string;
|
|
10
|
+
click?: (ev: MouseEvent) => void;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
declare function ResourceTimeGrid({ availableViews, addButton, className, height, contentHeight, direction, plugins: userPlugins, ...restOptions }: ResourceTimeGridProps): React.JSX.Element;
|
|
14
|
+
|
|
15
|
+
export { ResourceTimeGridProps, ResourceTimeGrid as default };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useCalendarController } from '@fullcalendar/react';
|
|
3
|
+
import adaptivePlugin from '@fullcalendar/adaptive';
|
|
4
|
+
import interactionPlugin from '@fullcalendar/interaction';
|
|
5
|
+
import scrollGridPlugin from '@fullcalendar/scrollgrid';
|
|
6
|
+
import resourceTimeGridPlugin from '@fullcalendar/resource-timegrid';
|
|
7
|
+
import EventCalendarToolbar from './EventCalendarToolbar.js';
|
|
8
|
+
import SchedulerViews from './SchedulerViews.js';
|
|
9
|
+
import EventCalendarContainer from './EventCalendarContainer.js';
|
|
10
|
+
import '@mui/material/Box';
|
|
11
|
+
import '@mui/material/Button';
|
|
12
|
+
import '@mui/material/IconButton';
|
|
13
|
+
import '@mui/material/Typography';
|
|
14
|
+
import '@mui/material/ToggleButtonGroup';
|
|
15
|
+
import '@mui/material/ToggleButton';
|
|
16
|
+
import './icons.js';
|
|
17
|
+
import '@fullcalendar/core';
|
|
18
|
+
import '@mui/icons-material/ChevronLeft';
|
|
19
|
+
import '@mui/icons-material/ChevronRight';
|
|
20
|
+
import '@mui/icons-material/Close';
|
|
21
|
+
import '@mui/icons-material/ExpandMore';
|
|
22
|
+
import './EventCalendarViews.js';
|
|
23
|
+
import '@mui/material';
|
|
24
|
+
|
|
25
|
+
const plugins = [
|
|
26
|
+
adaptivePlugin,
|
|
27
|
+
interactionPlugin,
|
|
28
|
+
scrollGridPlugin,
|
|
29
|
+
resourceTimeGridPlugin,
|
|
30
|
+
];
|
|
31
|
+
const defaultAvailableViews = [
|
|
32
|
+
'resourceTimeGridDay',
|
|
33
|
+
'resourceTimeGridWeek',
|
|
34
|
+
];
|
|
35
|
+
const navLinkDayClick = 'resourceTimeGridDay';
|
|
36
|
+
const navLinkWeekClick = 'resourceTimeGridWeek';
|
|
37
|
+
function ResourceTimeGrid({ availableViews = defaultAvailableViews, addButton, className, height, contentHeight, direction, plugins: userPlugins = [], ...restOptions }) {
|
|
38
|
+
const controller = useCalendarController();
|
|
39
|
+
const autoHeight = height === 'auto' || contentHeight === 'auto';
|
|
40
|
+
return (React.createElement(EventCalendarContainer, { direction: direction, className: className, height: height, borderless: restOptions.borderless, borderlessX: restOptions.borderlessX, borderlessTop: restOptions.borderlessTop, borderlessBottom: restOptions.borderlessBottom },
|
|
41
|
+
React.createElement(EventCalendarToolbar, { controller: controller, availableViews: availableViews, addButton: addButton }),
|
|
42
|
+
React.createElement(SchedulerViews, { liquidHeight: !autoHeight && height !== undefined, height: autoHeight ? 'auto' : contentHeight, initialView: availableViews[0], navLinkDayClick: navLinkDayClick, navLinkWeekClick: navLinkWeekClick, controller: controller, plugins: [...plugins, ...userPlugins], ...restOptions })));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { ResourceTimeGrid as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CalendarOptions } from '@fullcalendar/core';
|
|
3
|
+
|
|
4
|
+
interface ResourceTimelineProps extends Omit<CalendarOptions, 'class'> {
|
|
5
|
+
availableViews?: string[];
|
|
6
|
+
addButton?: {
|
|
7
|
+
isPrimary?: boolean;
|
|
8
|
+
text?: string;
|
|
9
|
+
hint?: string;
|
|
10
|
+
click?: (ev: MouseEvent) => void;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
declare function ResourceTimeline({ availableViews, addButton, className, height, contentHeight, direction, plugins: userPlugins, ...restOptions }: ResourceTimelineProps): React.JSX.Element;
|
|
14
|
+
|
|
15
|
+
export { ResourceTimelineProps, ResourceTimeline as default };
|