@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,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,51 @@
|
|
|
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: 2,
|
|
24
|
+
bgcolor: 'action.hover',
|
|
25
|
+
borderBottom: '1px solid',
|
|
26
|
+
borderColor: 'divider',
|
|
27
|
+
} },
|
|
28
|
+
React.createElement(Box, { sx: {
|
|
29
|
+
display: 'flex',
|
|
30
|
+
flexShrink: 0,
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
gap: 1,
|
|
33
|
+
} },
|
|
34
|
+
addButton && (React.createElement(Button, { onClick: addButton.click, "aria-label": addButton.hint, variant: addButton.isPrimary === false ? 'outlined' : 'contained' }, addButton.text)),
|
|
35
|
+
React.createElement(Button, { onClick: () => controller.today(), "aria-label": buttons.today.hint, variant: "outlined" }, buttons.today.text),
|
|
36
|
+
React.createElement(Box, { sx: {
|
|
37
|
+
display: 'flex',
|
|
38
|
+
alignItems: 'center',
|
|
39
|
+
} },
|
|
40
|
+
React.createElement(IconButton, { onClick: () => controller.prev(), disabled: buttons.prev.isDisabled, "aria-label": buttons.prev.hint },
|
|
41
|
+
React.createElement(EventCalendarPrevIcon, null)),
|
|
42
|
+
React.createElement(IconButton, { onClick: () => controller.next(), disabled: buttons.next.isDisabled, "aria-label": buttons.next.hint },
|
|
43
|
+
React.createElement(EventCalendarNextIcon, null))),
|
|
44
|
+
React.createElement(Typography, { variant: "h5" }, controller.view?.title)),
|
|
45
|
+
React.createElement(ToggleButtonGroup, { size: "small", exclusive: true, value: controller.view?.type, onChange: (_ev, val) => {
|
|
46
|
+
controller.changeView(val);
|
|
47
|
+
} }, availableViews.map((availableView) => (React.createElement(ToggleButton, { key: availableView, value: availableView, "aria-label": buttons[availableView]?.hint, color: "primary" },
|
|
48
|
+
React.createElement(Box, { sx: { px: 1 } }, buttons[availableView]?.text)))))));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { EventCalendarToolbar as default };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DayHeaderData, DayCellData, CalendarOptions } from '@fullcalendar/core';
|
|
3
|
+
|
|
4
|
+
declare const outlineWidthClass = "outline-3";
|
|
5
|
+
declare const outlineWidthFocusClass = "focus-visible:outline-3";
|
|
6
|
+
declare const outlineWidthGroupFocusClass = "group-focus-visible:outline-3";
|
|
7
|
+
declare const outlineOffsetClass = "outline-offset-1";
|
|
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 mutedHoverPressableClass: string;
|
|
12
|
+
declare const faintBgClass = "bg-[rgba(var(--mui-palette-text-primaryChannel)_/_0.04)]";
|
|
13
|
+
declare const primaryClass = "bg-(--mui-palette-primary-main) text-(--mui-palette-primary-contrastText)";
|
|
14
|
+
declare const primaryPressableClass: string;
|
|
15
|
+
declare const primaryPressableGroupClass: string;
|
|
16
|
+
declare const eventMutedFgClass = "text-[color-mix(in_oklab,var(--fc-event-color)_50%,var(--mui-palette-text-primary))]";
|
|
17
|
+
declare const eventFaintBgClass = "bg-[color-mix(in_oklab,var(--fc-event-color)_20%,var(--mui-palette-background-paper))]";
|
|
18
|
+
declare const eventFaintPressableClass: string;
|
|
19
|
+
declare const rowPointerResizerClass: string;
|
|
20
|
+
declare const rowTouchResizerClass: string;
|
|
21
|
+
declare const getNormalDayHeaderBorderClass: (data: DayHeaderData) => string;
|
|
22
|
+
declare const getMutedDayHeaderBorderClass: (data: DayHeaderData) => string;
|
|
23
|
+
declare const getNormalDayCellBorderColorClass: (data: DayCellData) => "border-[rgba(var(--mui-palette-text-primaryChannel)_/_0.2)]" | "border-(--mui-palette-divider)";
|
|
24
|
+
declare const getMutedDayCellBorderColorClass: (data: DayCellData) => "border-[rgba(var(--mui-palette-text-primaryChannel)_/_0.2)]" | "border-(--mui-palette-divider)";
|
|
25
|
+
declare const tallDayCellBottomClass = "min-h-3";
|
|
26
|
+
declare const getShortDayCellBottomClass: (data: DayCellData) => string;
|
|
27
|
+
declare const dayRowCommonClasses: CalendarOptions;
|
|
28
|
+
interface EventCalendarViewsProps extends CalendarOptions {
|
|
29
|
+
liquidHeight?: boolean;
|
|
30
|
+
}
|
|
31
|
+
declare function EventCalendarViews({ className, liquidHeight, height, views: userViews, ...restOptions }: EventCalendarViewsProps): React.JSX.Element;
|
|
32
|
+
|
|
33
|
+
export { EventCalendarViewsProps, dayRowCommonClasses, EventCalendarViews as default, eventFaintBgClass, eventFaintPressableClass, eventMutedFgClass, faintBgClass, getMutedDayCellBorderColorClass, getMutedDayHeaderBorderClass, getNormalDayCellBorderColorClass, getNormalDayHeaderBorderClass, getShortDayCellBottomClass, mutedBgClass, mutedHoverPressableClass, outlineOffsetClass, outlineWidthClass, outlineWidthFocusClass, outlineWidthGroupFocusClass, primaryClass, primaryOutlineColorClass, primaryPressableClass, primaryPressableGroupClass, rowPointerResizerClass, rowTouchResizerClass, strongSolidPressableClass, tallDayCellBottomClass };
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { joinClassNames } from '@fullcalendar/core';
|
|
3
|
+
import FullCalendar from '@fullcalendar/react';
|
|
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-breezy-bAU";
|
|
13
|
+
const outlineWidthFocusClass = "fc-breezy-Tid";
|
|
14
|
+
const outlineWidthGroupFocusClass = "fc-breezy-14w";
|
|
15
|
+
const outlineOffsetClass = "fc-breezy-fKI";
|
|
16
|
+
const primaryOutlineColorClass = "fc-breezy-p95";
|
|
17
|
+
// strongest (25%)
|
|
18
|
+
const strongestSolidBgActiveClass = "fc-breezy-lS3";
|
|
19
|
+
// stronger (20%)
|
|
20
|
+
const strongerSolidBgHoverClass = "fc-breezy-fEn";
|
|
21
|
+
// strong (16%)
|
|
22
|
+
const strongBgFocusClass = "fc-breezy-WPX";
|
|
23
|
+
const strongBgActiveClass = "fc-breezy-kup";
|
|
24
|
+
const strongSolidBgClass = "fc-breezy-5V9";
|
|
25
|
+
const strongSolidPressableClass = `${strongSolidBgClass} ${strongerSolidBgHoverClass} ${strongestSolidBgActiveClass}`;
|
|
26
|
+
// muted (8%)
|
|
27
|
+
const mutedBgClass = "fc-breezy-VxY";
|
|
28
|
+
const mutedBgHoverClass = "fc-breezy-znR";
|
|
29
|
+
const mutedBgActiveClass = "fc-breezy-cmB";
|
|
30
|
+
const mutedHoverPressableClass = `${mutedBgHoverClass} ${strongBgFocusClass} ${strongBgActiveClass}`;
|
|
31
|
+
// faint (4%)
|
|
32
|
+
const faintBgClass = "fc-breezy-IKt";
|
|
33
|
+
const faintBgHoverClass = "fc-breezy-iAr";
|
|
34
|
+
const faintBgFocusClass = "fc-breezy-r6h";
|
|
35
|
+
const faintHoverPressableClass = `${faintBgHoverClass} ${faintBgFocusClass} ${mutedBgActiveClass}`;
|
|
36
|
+
// primary
|
|
37
|
+
const primaryClass = "fc-breezy-OSb fc-breezy-Yus";
|
|
38
|
+
const primaryPressableClass = `${primaryClass} fc-breezy-VzK fc-breezy-Fmz`;
|
|
39
|
+
const primaryPressableGroupClass = `${primaryClass} fc-breezy-54v fc-breezy-spg`;
|
|
40
|
+
// event content
|
|
41
|
+
const eventMutedFgClass = "fc-breezy-xYN";
|
|
42
|
+
const eventFaintBgClass = "fc-breezy-v3L";
|
|
43
|
+
const eventFaintPressableClass = joinClassNames(eventFaintBgClass, "fc-breezy-hi1", "fc-breezy-W36");
|
|
44
|
+
// usually 11px font / 12px line-height
|
|
45
|
+
const xxsTextClass = "fc-breezy-HRt";
|
|
46
|
+
// transparent resizer for mouse
|
|
47
|
+
const blockPointerResizerClass = "fc-breezy-YA2 fc-breezy-C9h fc-breezy-ZkV";
|
|
48
|
+
const rowPointerResizerClass = `${blockPointerResizerClass} fc-breezy-8ZZ fc-breezy-1lj`;
|
|
49
|
+
const columnPointerResizerClass = `${blockPointerResizerClass} fc-breezy-xX5 fc-breezy-433`;
|
|
50
|
+
// circle resizer for touch
|
|
51
|
+
const blockTouchResizerClass = `fc-breezy-YA2 fc-breezy-tEU fc-breezy-UZp fc-breezy-qvz fc-breezy-Y27 fc-breezy-IdG`;
|
|
52
|
+
const rowTouchResizerClass = `${blockTouchResizerClass} fc-breezy-if4 fc-breezy-NN9`;
|
|
53
|
+
const columnTouchResizerClass = `${blockTouchResizerClass} fc-breezy-Z2g fc-breezy-RWU`;
|
|
54
|
+
const getNormalDayHeaderBorderClass = (data) => joinClassNames(!data.inPopover && (data.isMajor ? `fc-breezy-UZp fc-breezy-I55` :
|
|
55
|
+
!data.isNarrow && `fc-breezy-UZp fc-breezy-G56`));
|
|
56
|
+
const getMutedDayHeaderBorderClass = (data) => joinClassNames(!data.inPopover && (data.isMajor ? `fc-breezy-UZp fc-breezy-I55` :
|
|
57
|
+
!data.isNarrow && `fc-breezy-UZp fc-breezy-G56`));
|
|
58
|
+
const getNormalDayCellBorderColorClass = (data) => (data.isMajor ? "fc-breezy-I55" : "fc-breezy-G56");
|
|
59
|
+
const getMutedDayCellBorderColorClass = (data) => (data.isMajor ? "fc-breezy-I55" : "fc-breezy-G56");
|
|
60
|
+
const tallDayCellBottomClass = "fc-breezy-iJ1";
|
|
61
|
+
const getShortDayCellBottomClass = (data) => joinClassNames(!data.isNarrow && "fc-breezy-WoG");
|
|
62
|
+
const mutedHoverButtonClass = joinClassNames(mutedHoverPressableClass, outlineWidthFocusClass, primaryOutlineColorClass);
|
|
63
|
+
const dayRowCommonClasses = {
|
|
64
|
+
/* Day Row > List-Item Event
|
|
65
|
+
----------------------------------------------------------------------------------------------- */
|
|
66
|
+
listItemEventClass: (data) => joinClassNames("fc-breezy-mwm fc-breezy-df6", data.isNarrow
|
|
67
|
+
? "fc-breezy-6gf fc-breezy-dpa"
|
|
68
|
+
: "fc-breezy-MOr fc-breezy-UPi", data.isSelected
|
|
69
|
+
? mutedBgClass
|
|
70
|
+
: data.isInteractive
|
|
71
|
+
? mutedHoverPressableClass
|
|
72
|
+
: mutedBgHoverClass),
|
|
73
|
+
listItemEventInnerClass: (data) => joinClassNames("fc-breezy-Hhr fc-breezy-uEy fc-breezy-gfU fc-breezy-Klj", data.isNarrow
|
|
74
|
+
? `fc-breezy-h2r ${xxsTextClass}`
|
|
75
|
+
: "fc-breezy-vvo fc-breezy-17F"),
|
|
76
|
+
listItemEventTimeClass: (data) => joinClassNames(data.isNarrow ? "fc-breezy-OKV" : "fc-breezy-55Y", "fc-breezy-Znt fc-breezy-V3u fc-breezy-JTJ fc-breezy-O5O fc-breezy-qbn"),
|
|
77
|
+
listItemEventTitleClass: (data) => joinClassNames(data.isNarrow ? "fc-breezy-OKV" : "fc-breezy-55Y", "fc-breezy-HBk fc-breezy-kIZ fc-breezy-JTJ fc-breezy-O5O fc-breezy-nGI", data.timeText && "fc-breezy-yGY"),
|
|
78
|
+
/* Day Row > Row Event
|
|
79
|
+
----------------------------------------------------------------------------------------------- */
|
|
80
|
+
rowEventClass: (data) => joinClassNames(data.isStart && (data.isNarrow ? "fc-breezy-GSF" : "fc-breezy-fpO"), data.isEnd && (data.isNarrow ? "fc-breezy-Jha" : "fc-breezy-hCF")),
|
|
81
|
+
rowEventInnerClass: (data) => data.isNarrow ? "fc-breezy-h2r" : "fc-breezy-vvo",
|
|
82
|
+
/* Day Row > More-Link
|
|
83
|
+
----------------------------------------------------------------------------------------------- */
|
|
84
|
+
rowMoreLinkClass: (data) => joinClassNames("fc-breezy-mwm fc-breezy-UZp", data.isNarrow
|
|
85
|
+
? `fc-breezy-6gf fc-breezy-R95 fc-breezy-dpa`
|
|
86
|
+
: "fc-breezy-rK9 fc-breezy-MOr fc-breezy-lqW fc-breezy-UPi", mutedHoverPressableClass),
|
|
87
|
+
rowMoreLinkInnerClass: (data) => joinClassNames(data.isNarrow
|
|
88
|
+
? `fc-breezy-df6 ${xxsTextClass}`
|
|
89
|
+
: "fc-breezy-KbZ fc-breezy-17F", "fc-breezy-HBk")
|
|
90
|
+
};
|
|
91
|
+
function EventCalendarViews({ className, liquidHeight, height, views: userViews, ...restOptions }) {
|
|
92
|
+
return (React.createElement(Box, { className: className, sx: liquidHeight ? { flexGrow: 1, minHeight: 0 } : {} },
|
|
93
|
+
React.createElement(FullCalendar, { className: "fc-breezy-ND7", height: liquidHeight ? "100%" : height,
|
|
94
|
+
/* Abstract Event
|
|
95
|
+
----------------------------------------------------------------------------------------- */
|
|
96
|
+
eventShortHeight: 50, eventColor: "var(--mui-palette-primary-main)", eventClass: (data) => joinClassNames(data.isSelected
|
|
97
|
+
? joinClassNames(outlineWidthClass, data.isDragging && "fc-breezy-iqH")
|
|
98
|
+
: outlineWidthFocusClass, primaryOutlineColorClass),
|
|
99
|
+
/* Background Event
|
|
100
|
+
----------------------------------------------------------------------------------------- */
|
|
101
|
+
backgroundEventColor: "var(--mui-palette-secondary-main)", backgroundEventClass: "fc-breezy-Z7B", backgroundEventTitleClass: (data) => joinClassNames("fc-breezy-F6C fc-breezy-dra fc-breezy-HBk", data.isNarrow
|
|
102
|
+
? `fc-breezy-xbC ${xxsTextClass}`
|
|
103
|
+
: "fc-breezy-aS8 fc-breezy-17F"),
|
|
104
|
+
/* Block Event
|
|
105
|
+
----------------------------------------------------------------------------------------- */
|
|
106
|
+
blockEventClass: (data) => joinClassNames("fc-breezy-ytQ fc-breezy-vPs fc-breezy-82y fc-breezy-lqW fc-breezy-iVS", data.isInteractive
|
|
107
|
+
? eventFaintPressableClass
|
|
108
|
+
: eventFaintBgClass, (data.isDragging && !data.isSelected) && "fc-breezy-0HG"), blockEventInnerClass: eventMutedFgClass, blockEventTimeClass: "fc-breezy-JTJ fc-breezy-O5O fc-breezy-qbn", blockEventTitleClass: "fc-breezy-JTJ fc-breezy-O5O fc-breezy-nGI",
|
|
109
|
+
/* Row Event
|
|
110
|
+
----------------------------------------------------------------------------------------- */
|
|
111
|
+
rowEventClass: (data) => joinClassNames("fc-breezy-mwm fc-breezy-3WQ", data.isStart && joinClassNames("fc-breezy-riW", data.isNarrow ? "fc-breezy-fdR" : "fc-breezy-vln"), data.isEnd && joinClassNames("fc-breezy-EWl", data.isNarrow ? "fc-breezy-Ea4" : "fc-breezy-ze3")), rowEventBeforeClass: (data) => joinClassNames(data.isStartResizable && joinClassNames(data.isSelected ? rowTouchResizerClass : rowPointerResizerClass, "fc-breezy-BD7")), rowEventAfterClass: (data) => joinClassNames(data.isEndResizable && joinClassNames(data.isSelected ? rowTouchResizerClass : rowPointerResizerClass, "fc-breezy-8rg")), rowEventInnerClass: (data) => joinClassNames("fc-breezy-Hhr fc-breezy-uEy fc-breezy-gfU", data.isNarrow ? xxsTextClass : "fc-breezy-17F"), rowEventTimeClass: (data) => joinClassNames(data.isNarrow ? "fc-breezy-qNU" : "fc-breezy-I6e", "fc-breezy-kIZ"), rowEventTitleClass: (data) => joinClassNames(data.isNarrow ? "fc-breezy-55Y" : "fc-breezy-qB7"),
|
|
112
|
+
/* Column Event
|
|
113
|
+
----------------------------------------------------------------------------------------- */
|
|
114
|
+
columnEventClass: (data) => joinClassNames(`fc-breezy-zDQ fc-breezy-z3l fc-breezy-bLM`, data.isStart && joinClassNames("fc-breezy-srs fc-breezy-dUI", data.isNarrow ? "fc-breezy-CSA" : "fc-breezy-sb4"), data.isEnd && joinClassNames("fc-breezy-QTT fc-breezy-etO", data.isNarrow ? "fc-breezy-mwm" : "fc-breezy-Sb2")), columnEventBeforeClass: (data) => joinClassNames(data.isStartResizable && joinClassNames(data.isSelected ? columnTouchResizerClass : columnPointerResizerClass, "fc-breezy-f4s")), columnEventAfterClass: (data) => joinClassNames(data.isEndResizable && joinClassNames(data.isSelected ? columnTouchResizerClass : columnPointerResizerClass, "fc-breezy-I8n")), columnEventInnerClass: (data) => joinClassNames("fc-breezy-Hhr", data.isShort
|
|
115
|
+
? "fc-breezy-uEy fc-breezy-gfU fc-breezy-RVT fc-breezy-xbC"
|
|
116
|
+
: joinClassNames("fc-breezy-bXY", data.isNarrow ? "fc-breezy-qB7 fc-breezy-vvo" : "fc-breezy-ybQ fc-breezy-ztx"), (data.isShort || data.isNarrow) ? xxsTextClass : "fc-breezy-17F"), columnEventTimeClass: (data) => joinClassNames(!data.isShort && (data.isNarrow ? "fc-breezy-zvv" : "fc-breezy-q8O")), columnEventTitleClass: (data) => joinClassNames(!data.isShort && (data.isNarrow ? "fc-breezy-vvo" : "fc-breezy-ztx"), "fc-breezy-RKK"),
|
|
117
|
+
/* More-Link
|
|
118
|
+
----------------------------------------------------------------------------------------- */
|
|
119
|
+
moreLinkClass: `${outlineWidthFocusClass} ${primaryOutlineColorClass}`, moreLinkInnerClass: "fc-breezy-JTJ fc-breezy-O5O", columnMoreLinkClass: (data) => joinClassNames(data.isNarrow ? "fc-breezy-8in" : "fc-breezy-19X", `fc-breezy-UZp fc-breezy-lqW fc-breezy-ePV fc-breezy-UPi ${strongSolidPressableClass} fc-breezy-82y fc-breezy-z3l fc-breezy-bLM`), columnMoreLinkInnerClass: (data) => joinClassNames(data.isNarrow
|
|
120
|
+
? `fc-breezy-KbZ ${xxsTextClass}`
|
|
121
|
+
: "fc-breezy-xbC fc-breezy-17F", "fc-breezy-HBk"),
|
|
122
|
+
/* Day Header
|
|
123
|
+
----------------------------------------------------------------------------------------- */
|
|
124
|
+
dayHeaderAlign: (data) => data.inPopover ? "start" : "center", dayHeaderClass: (data) => joinClassNames("fc-breezy-a65", data.inPopover && "fc-breezy-QTT fc-breezy-G56"), dayHeaderInnerClass: (data) => joinClassNames("fc-breezy-Hhr fc-breezy-uEy fc-breezy-gfU", (!data.dayNumberText && !data.inPopover)
|
|
125
|
+
? joinClassNames("fc-breezy-ztx fc-breezy-dpa fc-breezy-17F", data.isNarrow
|
|
126
|
+
? `fc-breezy-qB7 fc-breezy-JQD fc-breezy-Znt`
|
|
127
|
+
: `fc-breezy-qMw fc-breezy-c0k fc-breezy-RKK fc-breezy-HBk`, data.hasNavLink && mutedHoverButtonClass)
|
|
128
|
+
: (data.isToday && data.dayNumberText && !data.inPopover)
|
|
129
|
+
? joinClassNames("fc-breezy-ytQ fc-breezy-c0k fc-breezy-3jE", data.isNarrow ? "fc-breezy-6U1" : "fc-breezy-aFC")
|
|
130
|
+
: joinClassNames("fc-breezy-dpa", data.inPopover
|
|
131
|
+
? "fc-breezy-c0k fc-breezy-qB7 fc-breezy-vvo"
|
|
132
|
+
: joinClassNames("fc-breezy-NoV fc-breezy-6U1 fc-breezy-qMw", data.isNarrow ? "fc-breezy-j5m" : "fc-breezy-7ZI"), data.hasNavLink && mutedHoverButtonClass)), dayHeaderContent: (data) => ((!data.dayNumberText && !data.inPopover) ? (React.createElement(React.Fragment, null, data.text)) : (React.createElement(React.Fragment, null, data.textParts.map((textPart, i) => (React.createElement("span", { key: i, className: joinClassNames("fc-breezy-csg", data.isNarrow ? "fc-breezy-17F" : "fc-breezy-gEy", textPart.type === "day"
|
|
133
|
+
? joinClassNames("fc-breezy-Hhr fc-breezy-uEy fc-breezy-gfU", !data.isNarrow && "fc-breezy-RKK", (data.isToday && !data.inPopover)
|
|
134
|
+
? joinClassNames("fc-breezy-qK4 fc-breezy-IdG fc-breezy-a65", data.isNarrow ? "fc-breezy-Fzs" : "fc-breezy-UvV", data.hasNavLink
|
|
135
|
+
? joinClassNames(primaryPressableGroupClass, outlineWidthGroupFocusClass, outlineOffsetClass, primaryOutlineColorClass)
|
|
136
|
+
: primaryClass)
|
|
137
|
+
: "fc-breezy-HBk")
|
|
138
|
+
: "fc-breezy-Znt") }, textPart.value)))))),
|
|
139
|
+
/* Day Cell
|
|
140
|
+
----------------------------------------------------------------------------------------- */
|
|
141
|
+
dayCellClass: (data) => joinClassNames("fc-breezy-UZp", ((data.isOther || data.isDisabled) && !data.options.businessHours) && faintBgClass), dayCellTopClass: (data) => joinClassNames(data.isNarrow ? "fc-breezy-s9U" : "fc-breezy-naH", "fc-breezy-Hhr fc-breezy-uEy"), dayCellTopInnerClass: (data) => joinClassNames("fc-breezy-Hhr fc-breezy-uEy fc-breezy-gfU fc-breezy-a65 fc-breezy-JTJ", data.isNarrow
|
|
142
|
+
? `fc-breezy-8in fc-breezy-cL9 ${xxsTextClass}`
|
|
143
|
+
: "fc-breezy-19X fc-breezy-6U1 fc-breezy-17F", data.isToday
|
|
144
|
+
? joinClassNames("fc-breezy-IdG fc-breezy-RKK", data.isNarrow
|
|
145
|
+
? "fc-breezy-9ZR"
|
|
146
|
+
: "fc-breezy-fpO", data.text === data.dayNumberText
|
|
147
|
+
? (data.isNarrow ? "fc-breezy-CSa" : "fc-breezy-IdL")
|
|
148
|
+
: (data.isNarrow ? "fc-breezy-qB7" : "fc-breezy-ybQ"), data.hasNavLink
|
|
149
|
+
? joinClassNames(primaryPressableClass, outlineOffsetClass)
|
|
150
|
+
: primaryClass)
|
|
151
|
+
: joinClassNames("fc-breezy-Ea4", data.isNarrow ? "fc-breezy-qB7" : "fc-breezy-ybQ", data.hasNavLink && mutedHoverPressableClass, data.isOther
|
|
152
|
+
? "fc-breezy-x07"
|
|
153
|
+
: (data.monthText ? "fc-breezy-HBk" : "fc-breezy-Znt"), data.monthText && "fc-breezy-Kw3")), dayCellInnerClass: (data) => joinClassNames(data.inPopover && "fc-breezy-aS8"),
|
|
154
|
+
/* Popover
|
|
155
|
+
----------------------------------------------------------------------------------------- */
|
|
156
|
+
popoverClass: "fc-breezy-HBk fc-breezy-Y27 fc-breezy-DC1 fc-breezy-8Kl fc-breezy-O5O fc-breezy-uPX fc-breezy-c0k fc-breezy-nhl fc-breezy-ND7", popoverCloseClass: `fc-breezy-ytQ fc-breezy-YA2 fc-breezy-bEj fc-breezy-q2P fc-breezy-KbZ fc-breezy-dpa ${mutedHoverButtonClass} fc-breezy-om0`, popoverCloseContent: () => React.createElement(EventCalendarCloseIcon, null),
|
|
157
|
+
/* Lane
|
|
158
|
+
----------------------------------------------------------------------------------------- */
|
|
159
|
+
dayLaneClass: (data) => joinClassNames("fc-breezy-UZp", data.isMajor ? "fc-breezy-I55" : "fc-breezy-G56", data.isDisabled && faintBgClass), dayLaneInnerClass: (data) => joinClassNames(data.isStack
|
|
160
|
+
? "fc-breezy-JQD"
|
|
161
|
+
: data.isNarrow ? "fc-breezy-6gf" : "fc-breezy-MOr"), slotLaneClass: (data) => joinClassNames("fc-breezy-UZp fc-breezy-G56", data.isMinor && "fc-breezy-M5N"),
|
|
162
|
+
/* List Day
|
|
163
|
+
----------------------------------------------------------------------------------------- */
|
|
164
|
+
listDaysClass: "fc-breezy-Ii5 fc-breezy-lOy fc-breezy-Asp fc-breezy-BIO fc-breezy-jQ9", listDayClass: "fc-breezy-2uq fc-breezy-G56 fc-breezy-Hhr fc-breezy-uEy fc-breezy-lUe fc-breezy-ODb", listDayHeaderClass: "fc-breezy-8in fc-breezy-yvz fc-breezy-m2e fc-breezy-mTj fc-breezy-m67 fc-breezy-Hhr fc-breezy-bXY fc-breezy-lUe", listDayHeaderInnerClass: (data) => joinClassNames("fc-breezy-kOE fc-breezy-vvo fc-breezy-ybQ fc-breezy-sgM fc-breezy-IdG fc-breezy-gEy", !data.level
|
|
165
|
+
? joinClassNames(data.isToday
|
|
166
|
+
? joinClassNames("fc-breezy-RKK", data.hasNavLink ? primaryPressableClass : primaryClass)
|
|
167
|
+
: joinClassNames(`fc-breezy-kIZ fc-breezy-HBk`, data.hasNavLink && mutedHoverPressableClass))
|
|
168
|
+
: joinClassNames("fc-breezy-x07", data.hasNavLink && joinClassNames(mutedHoverPressableClass, "fc-breezy-ogw"))), listDayEventsClass: "fc-breezy-mtA fc-breezy-oee fc-breezy-qbd fc-breezy-UZp fc-breezy-G56 fc-breezy-UPi",
|
|
169
|
+
/* Single Month (in Multi-Month)
|
|
170
|
+
----------------------------------------------------------------------------------------- */
|
|
171
|
+
singleMonthClass: "fc-breezy-tZ3", singleMonthHeaderClass: (data) => joinClassNames(data.isSticky && `fc-breezy-Y27 fc-breezy-QTT fc-breezy-G56`, data.colCount > 1 ? "fc-breezy-5SQ" : "fc-breezy-ztx", "fc-breezy-gfU"), singleMonthHeaderInnerClass: (data) => joinClassNames(`fc-breezy-ztx fc-breezy-ybQ fc-breezy-UPi fc-breezy-gEy fc-breezy-HBk fc-breezy-RKK`, data.hasNavLink && mutedHoverPressableClass),
|
|
172
|
+
/* Misc Table
|
|
173
|
+
----------------------------------------------------------------------------------------- */
|
|
174
|
+
fillerClass: "fc-breezy-UZp fc-breezy-G56", dayNarrowWidth: 100, dayHeaderRowClass: "fc-breezy-UZp fc-breezy-G56", dayRowClass: "fc-breezy-UZp fc-breezy-G56", slotHeaderRowClass: "fc-breezy-UZp fc-breezy-G56", slotHeaderInnerClass: "fc-breezy-x07 fc-breezy-KNZ",
|
|
175
|
+
/* Misc Content
|
|
176
|
+
----------------------------------------------------------------------------------------- */
|
|
177
|
+
navLinkClass: `${outlineWidthFocusClass} ${primaryOutlineColorClass}`, inlineWeekNumberClass: (data) => joinClassNames("fc-breezy-YA2 fc-breezy-pPI fc-breezy-MS6 fc-breezy-Y27 fc-breezy-Znt fc-breezy-JTJ fc-breezy-ftu fc-breezy-QTT fc-breezy-JvS fc-breezy-riW fc-breezy-vcR", data.isNarrow
|
|
178
|
+
? `fc-breezy-KbZ ${xxsTextClass}`
|
|
179
|
+
: "fc-breezy-xGk fc-breezy-17F", data.hasNavLink
|
|
180
|
+
? `${mutedHoverPressableClass} fc-breezy-bXD`
|
|
181
|
+
: mutedBgHoverClass), highlightClass: "fc-breezy-gKu", nonBusinessClass: faintBgClass, nowIndicatorLineClass: "fc-breezy-7VH fc-breezy-v0S fc-breezy-R3n", nowIndicatorDotClass: "fc-breezy-xny fc-breezy-uDX fc-breezy-R3n fc-breezy-UmK fc-breezy-IdG fc-breezy-fo8 fc-breezy-bLM",
|
|
182
|
+
/* View-Specific Options
|
|
183
|
+
----------------------------------------------------------------------------------------- */
|
|
184
|
+
views: {
|
|
185
|
+
...userViews,
|
|
186
|
+
dayGrid: {
|
|
187
|
+
...dayRowCommonClasses,
|
|
188
|
+
dayHeaderClass: getNormalDayHeaderBorderClass,
|
|
189
|
+
dayHeaderDividerClass: `fc-breezy-QTT fc-breezy-I55`,
|
|
190
|
+
dayCellClass: getNormalDayCellBorderColorClass,
|
|
191
|
+
dayCellBottomClass: getShortDayCellBottomClass,
|
|
192
|
+
backgroundEventInnerClass: "fc-breezy-Hhr fc-breezy-uEy fc-breezy-RhI",
|
|
193
|
+
...userViews?.dayGrid,
|
|
194
|
+
},
|
|
195
|
+
multiMonth: {
|
|
196
|
+
...dayRowCommonClasses,
|
|
197
|
+
dayHeaderClass: getNormalDayHeaderBorderClass,
|
|
198
|
+
dayHeaderDividerClass: (data) => joinClassNames(data.isSticky && `fc-breezy-QTT fc-breezy-I55 fc-breezy-5jb`),
|
|
199
|
+
dayCellClass: getNormalDayCellBorderColorClass,
|
|
200
|
+
dayCellBottomClass: getShortDayCellBottomClass,
|
|
201
|
+
tableHeaderClass: (data) => joinClassNames(data.isSticky && "fc-breezy-Y27"),
|
|
202
|
+
tableBodyClass: `fc-breezy-UZp fc-breezy-G56 fc-breezy-UPi fc-breezy-LtG fc-breezy-O5O`,
|
|
203
|
+
...userViews?.multiMonth,
|
|
204
|
+
},
|
|
205
|
+
timeGrid: {
|
|
206
|
+
...dayRowCommonClasses,
|
|
207
|
+
dayHeaderClass: getMutedDayHeaderBorderClass,
|
|
208
|
+
dayHeaderDividerClass: (data) => joinClassNames("fc-breezy-QTT", data.options.allDaySlot
|
|
209
|
+
? "fc-breezy-G56"
|
|
210
|
+
: `fc-breezy-I55 fc-breezy-5jb`),
|
|
211
|
+
dayCellClass: getMutedDayCellBorderColorClass,
|
|
212
|
+
dayCellBottomClass: tallDayCellBottomClass,
|
|
213
|
+
/* TimeGrid > Week Number Header
|
|
214
|
+
------------------------------------------------------------------------------------- */
|
|
215
|
+
weekNumberHeaderClass: "fc-breezy-gfU fc-breezy-RhI",
|
|
216
|
+
weekNumberHeaderInnerClass: (data) => joinClassNames(`fc-breezy-RQK fc-breezy-6U1 fc-breezy-qMw fc-breezy-Znt fc-breezy-dpa fc-breezy-Hhr fc-breezy-uEy fc-breezy-gfU`, data.hasNavLink && mutedHoverPressableClass, data.isNarrow ? "fc-breezy-17F" : "fc-breezy-gEy"),
|
|
217
|
+
/* TimeGrid > All-Day Header
|
|
218
|
+
------------------------------------------------------------------------------------- */
|
|
219
|
+
allDayHeaderClass: "fc-breezy-gfU",
|
|
220
|
+
allDayHeaderInnerClass: (data) => joinClassNames(`fc-breezy-kHK fc-breezy-x07`, data.isNarrow ? xxsTextClass : "fc-breezy-17F"),
|
|
221
|
+
allDayDividerClass: `fc-breezy-QTT fc-breezy-I55 fc-breezy-5jb`,
|
|
222
|
+
/* TimeGrid > Slot Header
|
|
223
|
+
------------------------------------------------------------------------------------- */
|
|
224
|
+
slotHeaderClass: "fc-breezy-RhI",
|
|
225
|
+
slotHeaderInnerClass: (data) => joinClassNames("fc-breezy-vPs fc-breezy-U10 fc-breezy-KyB", data.isNarrow
|
|
226
|
+
? `fc-breezy-byi ${xxsTextClass}`
|
|
227
|
+
: "fc-breezy-IWs fc-breezy-17F", data.isFirst && "fc-breezy-C9h"),
|
|
228
|
+
slotHeaderDividerClass: `fc-breezy-EWl fc-breezy-G56`,
|
|
229
|
+
...userViews?.timeGrid,
|
|
230
|
+
},
|
|
231
|
+
list: {
|
|
232
|
+
/* List-View > List-Item Event
|
|
233
|
+
------------------------------------------------------------------------------------- */
|
|
234
|
+
listItemEventClass: (data) => joinClassNames(`fc-breezy-ytQ fc-breezy-2uq fc-breezy-G56 fc-breezy-fIh fc-breezy-gfU fc-breezy-9Vv`, data.isInteractive
|
|
235
|
+
? faintHoverPressableClass
|
|
236
|
+
: faintBgHoverClass),
|
|
237
|
+
listItemEventBeforeClass: "fc-breezy-PrA fc-breezy-qvz fc-breezy-IdG",
|
|
238
|
+
listItemEventInnerClass: "fc-breezy-Hhr fc-breezy-uEy fc-breezy-gfU fc-breezy-9Vv fc-breezy-gEy",
|
|
239
|
+
listItemEventTimeClass: "fc-breezy-yvz fc-breezy-8Ko fc-breezy-mTj fc-breezy-JTJ fc-breezy-O5O fc-breezy-yGY fc-breezy-Znt",
|
|
240
|
+
listItemEventTitleClass: (data) => joinClassNames("fc-breezy-oee fc-breezy-qbd fc-breezy-kIZ fc-breezy-JTJ fc-breezy-O5O fc-breezy-HBk", data.event.url && "fc-breezy-YdZ"),
|
|
241
|
+
/* No-Events Screen
|
|
242
|
+
------------------------------------------------------------------------------------- */
|
|
243
|
+
noEventsClass: "fc-breezy-oee fc-breezy-Hhr fc-breezy-bXY fc-breezy-gfU fc-breezy-a65",
|
|
244
|
+
noEventsInnerClass: "fc-breezy-UyD",
|
|
245
|
+
...userViews?.list,
|
|
246
|
+
},
|
|
247
|
+
}, ...restOptions })));
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export { dayRowCommonClasses, EventCalendarViews as default, eventFaintBgClass, eventFaintPressableClass, eventMutedFgClass, faintBgClass, getMutedDayCellBorderColorClass, getMutedDayHeaderBorderClass, getNormalDayCellBorderColorClass, getNormalDayHeaderBorderClass, getShortDayCellBottomClass, mutedBgClass, mutedHoverPressableClass, outlineOffsetClass, outlineWidthClass, outlineWidthFocusClass, outlineWidthGroupFocusClass, primaryClass, primaryOutlineColorClass, primaryPressableClass, primaryPressableGroupClass, 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 };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useCalendarController } from '@fullcalendar/react';
|
|
3
|
+
import adaptivePlugin from '@fullcalendar/adaptive';
|
|
4
|
+
import resourceTimelinePlugin from '@fullcalendar/resource-timeline';
|
|
5
|
+
import interactionPlugin from '@fullcalendar/interaction';
|
|
6
|
+
import EventCalendarToolbar from './EventCalendarToolbar.js';
|
|
7
|
+
import SchedulerViews from './SchedulerViews.js';
|
|
8
|
+
import EventCalendarContainer from './EventCalendarContainer.js';
|
|
9
|
+
import '@mui/material/Box';
|
|
10
|
+
import '@mui/material/Button';
|
|
11
|
+
import '@mui/material/IconButton';
|
|
12
|
+
import '@mui/material/Typography';
|
|
13
|
+
import '@mui/material/ToggleButtonGroup';
|
|
14
|
+
import '@mui/material/ToggleButton';
|
|
15
|
+
import './icons.js';
|
|
16
|
+
import '@fullcalendar/core';
|
|
17
|
+
import '@mui/icons-material/ChevronLeft';
|
|
18
|
+
import '@mui/icons-material/ChevronRight';
|
|
19
|
+
import '@mui/icons-material/Close';
|
|
20
|
+
import '@mui/icons-material/ExpandMore';
|
|
21
|
+
import './EventCalendarViews.js';
|
|
22
|
+
import '@mui/material';
|
|
23
|
+
|
|
24
|
+
const plugins = [
|
|
25
|
+
adaptivePlugin,
|
|
26
|
+
interactionPlugin,
|
|
27
|
+
resourceTimelinePlugin,
|
|
28
|
+
];
|
|
29
|
+
const defaultAvailableViews = [
|
|
30
|
+
'resourceTimelineDay',
|
|
31
|
+
'resourceTimelineWeek',
|
|
32
|
+
];
|
|
33
|
+
const navLinkDayClick = 'resourceTimelineDay';
|
|
34
|
+
const navLinkWeekClick = 'resourceTimelineWeek';
|
|
35
|
+
function ResourceTimeline({ availableViews = defaultAvailableViews, addButton, className, height, contentHeight, direction, plugins: userPlugins = [], ...restOptions }) {
|
|
36
|
+
const controller = useCalendarController();
|
|
37
|
+
const autoHeight = height === 'auto' || contentHeight === 'auto';
|
|
38
|
+
return (React.createElement(EventCalendarContainer, { direction: direction, className: className, height: height, borderless: restOptions.borderless, borderlessX: restOptions.borderlessX, borderlessTop: restOptions.borderlessTop, borderlessBottom: restOptions.borderlessBottom },
|
|
39
|
+
React.createElement(EventCalendarToolbar, { controller: controller, availableViews: availableViews, addButton: addButton }),
|
|
40
|
+
React.createElement(SchedulerViews, { liquidHeight: !autoHeight && height !== undefined, height: autoHeight ? 'auto' : contentHeight, initialView: availableViews[0], navLinkDayClick: navLinkDayClick, navLinkWeekClick: navLinkWeekClick, controller: controller, plugins: [...plugins, ...userPlugins], ...restOptions })));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { ResourceTimeline as default };
|
|
@@ -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 };
|