@mui-toolpad-extended-tuni/calendar 3.0.0
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/README.md +237 -0
- package/dist/Calendar.d.ts +3 -0
- package/dist/CalendarBody.d.ts +16 -0
- package/dist/CalendarEventAggregator.d.ts +9 -0
- package/dist/CalendarEventItem.d.ts +9 -0
- package/dist/CalendarHeader.d.ts +12 -0
- package/dist/CalendarManager.d.ts +3 -0
- package/dist/CalendarMicroservice.d.ts +32 -0
- package/dist/DatePickerPopover.d.ts +8 -0
- package/dist/components/EventDetails.d.ts +3 -0
- package/dist/components/EventMenu.d.ts +3 -0
- package/dist/components/EventViews.d.ts +3 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/index.cjs +249 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.es.js +15361 -0
- package/dist/store/useCalendarStore.d.ts +44 -0
- package/dist/types.d.ts +49 -0
- package/package.json +56 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
export interface CalendarEvent {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
start: Date | string;
|
|
6
|
+
end?: Date | string;
|
|
7
|
+
backgroundColor?: string;
|
|
8
|
+
borderColor?: string;
|
|
9
|
+
textColor?: string;
|
|
10
|
+
extendedProps?: {
|
|
11
|
+
courseCode?: string;
|
|
12
|
+
courseTitle?: string;
|
|
13
|
+
type?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
location?: string;
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
interface CalendarState {
|
|
20
|
+
events: CalendarEvent[];
|
|
21
|
+
isLoading: boolean;
|
|
22
|
+
error: string | null;
|
|
23
|
+
setEvents: (events: CalendarEvent[]) => void;
|
|
24
|
+
addEvent: (event: CalendarEvent) => void;
|
|
25
|
+
updateEvent: (eventId: string, updates: Partial<CalendarEvent>) => void;
|
|
26
|
+
removeEvent: (eventId: string) => void;
|
|
27
|
+
clearEvents: () => void;
|
|
28
|
+
setLoading: (loading: boolean) => void;
|
|
29
|
+
setError: (error: string | null) => void;
|
|
30
|
+
getEventsForDateRange: (start: Date, end: Date) => CalendarEvent[];
|
|
31
|
+
}
|
|
32
|
+
export declare const useCalendarStore: import('zustand/traditional').UseBoundStoreWithEqualityFn<Omit<import('zustand').StoreApi<CalendarState>, "setState"> & {
|
|
33
|
+
setState<A extends string | {
|
|
34
|
+
type: string;
|
|
35
|
+
}>(partial: CalendarState | Partial<CalendarState> | ((state: CalendarState) => CalendarState | Partial<CalendarState>), replace?: boolean | undefined, action?: A | undefined): void;
|
|
36
|
+
}>;
|
|
37
|
+
export declare const getContrastColor: (hexColor: string) => string;
|
|
38
|
+
export declare const createCalendarEvent: (id: string, title: string, start: Date | string, end?: Date | string, options?: {
|
|
39
|
+
backgroundColor?: string;
|
|
40
|
+
borderColor?: string;
|
|
41
|
+
textColor?: string;
|
|
42
|
+
extendedProps?: Record<string, any>;
|
|
43
|
+
}) => CalendarEvent;
|
|
44
|
+
export {};
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Theme } from '@mui/material';
|
|
2
|
+
import { EventContentArg } from '@fullcalendar/core';
|
|
3
|
+
export type CalendarEventType = "lecture" | "exercise" | "exam" | "deadline" | "other" | "meeting" | "maintenance";
|
|
4
|
+
export interface EventViewProps {
|
|
5
|
+
eventInfo: EventContentArg;
|
|
6
|
+
courseCode: string;
|
|
7
|
+
type: CalendarEventType;
|
|
8
|
+
courseColor: string;
|
|
9
|
+
location?: string;
|
|
10
|
+
requiresRegistration?: boolean;
|
|
11
|
+
recurring?: boolean;
|
|
12
|
+
eventTypeIcons: Record<CalendarEventType, string>;
|
|
13
|
+
theme: Theme;
|
|
14
|
+
courseTitle?: string;
|
|
15
|
+
maxParticipants?: number;
|
|
16
|
+
description?: string;
|
|
17
|
+
teachers?: any[];
|
|
18
|
+
}
|
|
19
|
+
export interface EventDetailsProps {
|
|
20
|
+
description?: string;
|
|
21
|
+
location?: string;
|
|
22
|
+
courseColor: string;
|
|
23
|
+
maxParticipants?: number;
|
|
24
|
+
requiresRegistration?: boolean;
|
|
25
|
+
teachers?: any[];
|
|
26
|
+
type: CalendarEventType;
|
|
27
|
+
recurring?: boolean;
|
|
28
|
+
onAddToCalendar: (e: React.MouseEvent) => void;
|
|
29
|
+
onRegister: (e: React.MouseEvent) => void;
|
|
30
|
+
theme: Theme;
|
|
31
|
+
}
|
|
32
|
+
export interface EventMenuProps {
|
|
33
|
+
open: boolean;
|
|
34
|
+
anchorEl: HTMLElement | null;
|
|
35
|
+
onClose: () => void;
|
|
36
|
+
eventInfo: EventContentArg;
|
|
37
|
+
courseColor: string;
|
|
38
|
+
type: CalendarEventType;
|
|
39
|
+
eventTypeIcons: Record<CalendarEventType, string>;
|
|
40
|
+
courseTitle: string;
|
|
41
|
+
courseCode: string;
|
|
42
|
+
description?: string;
|
|
43
|
+
location?: string;
|
|
44
|
+
maxParticipants?: number;
|
|
45
|
+
requiresRegistration?: boolean;
|
|
46
|
+
teachers?: any[];
|
|
47
|
+
recurring?: boolean;
|
|
48
|
+
theme: Theme;
|
|
49
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mui-toolpad-extended-tuni/calendar",
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "Calendar microservice for MUI Toolpad Extended TUNI",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.es.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"README.md"
|
|
12
|
+
],
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/index.es.js",
|
|
17
|
+
"require": "./dist/index.cjs",
|
|
18
|
+
"default": "./dist/index.es.js"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"react",
|
|
26
|
+
"mui",
|
|
27
|
+
"toolpad",
|
|
28
|
+
"education",
|
|
29
|
+
"tuni",
|
|
30
|
+
"calendar"
|
|
31
|
+
],
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"sideEffects": false,
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "tsc --skipLibCheck && vite build",
|
|
36
|
+
"dev": "vite build --watch"
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"mui-toolpad-extended-tuni": "^3.0.0",
|
|
40
|
+
"@emotion/react": "^11.0.0",
|
|
41
|
+
"@emotion/styled": "^11.0.0",
|
|
42
|
+
"@mui/icons-material": "^7.0.0",
|
|
43
|
+
"@mui/material": "^7.0.0",
|
|
44
|
+
"@mui/x-date-pickers": "^7.0.0",
|
|
45
|
+
"@fullcalendar/core": "^6.0.0",
|
|
46
|
+
"@fullcalendar/daygrid": "^6.0.0",
|
|
47
|
+
"@fullcalendar/interaction": "^6.0.0",
|
|
48
|
+
"@fullcalendar/react": "^6.0.0",
|
|
49
|
+
"@fullcalendar/timegrid": "^6.0.0",
|
|
50
|
+
"react": "^19.0.0",
|
|
51
|
+
"react-dom": "^19.0.0",
|
|
52
|
+
"react-router-dom": "^7.0.0",
|
|
53
|
+
"luxon": "^3.0.0"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|