react-weekly-planning 1.0.39 → 1.0.40
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/dist/components/AddTask/index.js +16 -0
- package/dist/components/CalendarForWeek.js +30 -0
- package/dist/components/CalendarForday.js +22 -0
- package/dist/components/DayContainer/index.js +15 -0
- package/dist/components/GroupContainer/index.js +15 -0
- package/dist/components/GroupsHeadContainer/index.js +8 -0
- package/dist/components/SumHoursContainer/index.js +15 -0
- package/dist/components/SumHoursHead/index.js +8 -0
- package/dist/components/TaskContainer/TaskVirtual.js +18 -0
- package/dist/components/TaskContainer/index.js +36 -0
- package/dist/components/TaskList/index.js +4 -0
- package/dist/components/VirtualGroupRow.js +64 -0
- package/dist/components/VirtualGroupRowDay.js +49 -0
- package/dist/components/index.js +70 -0
- package/dist/contexts/CalendarContext.js +8 -0
- package/dist/contexts/CalendarTaskContext.js +32 -0
- package/dist/definitions/index.js +1 -0
- package/dist/hooks/useCalendarDateState.js +19 -0
- package/dist/hooks/useCalendarTask.js +191 -0
- package/dist/hooks/useContainerScroll.js +14 -0
- package/dist/hooks/useData.js +7 -0
- package/dist/hooks/useGridContainer.js +24 -0
- package/dist/hooks/useIntersectionObserver.js +19 -0
- package/dist/hooks/useMainContainerItemContent.js +16 -0
- package/dist/hooks/useWindowsSize.js +19 -0
- package/dist/index.js +19 -0
- package/dist/lib/slyles.js +21 -0
- package/dist/lib/utils.js +657 -0
- package/dist/types/components/AddTask/index.d.ts +3 -0
- package/dist/types/components/CalendarForWeek.d.ts +3 -0
- package/dist/types/components/CalendarForday.d.ts +5 -0
- package/dist/types/components/DayContainer/index.d.ts +3 -0
- package/dist/types/components/GroupContainer/index.d.ts +3 -0
- package/dist/types/components/GroupsHeadContainer/index.d.ts +3 -0
- package/dist/types/components/SumHoursContainer/index.d.ts +3 -0
- package/dist/types/components/SumHoursHead/index.d.ts +3 -0
- package/dist/types/components/TaskContainer/TaskVirtual.d.ts +4 -0
- package/dist/types/components/TaskContainer/index.d.ts +3 -0
- package/dist/types/components/TaskList/index.d.ts +5 -0
- package/dist/types/components/VirtualGroupRow.d.ts +18 -0
- package/dist/types/components/VirtualGroupRowDay.d.ts +19 -0
- package/dist/types/components/index.d.ts +65 -0
- package/dist/types/contexts/CalendarContext.d.ts +7 -0
- package/dist/types/contexts/CalendarTaskContext.d.ts +23 -0
- package/dist/types/definitions/index.d.ts +417 -0
- package/dist/types/hooks/useCalendarDateState.d.ts +6 -0
- package/dist/types/hooks/useCalendarTask.d.ts +16 -0
- package/dist/types/hooks/useContainerScroll.d.ts +3 -0
- package/dist/types/hooks/useData.d.ts +4 -0
- package/dist/types/hooks/useGridContainer.d.ts +5 -0
- package/dist/types/hooks/useIntersectionObserver.d.ts +5 -0
- package/dist/types/hooks/useMainContainerItemContent.d.ts +4 -0
- package/dist/types/hooks/useWindowsSize.d.ts +4 -0
- package/dist/types/index.d.ts +16 -0
- package/dist/types/lib/slyles.d.ts +4 -0
- package/dist/types/lib/utils.d.ts +90 -0
- package/package.json +1 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { SumHoursContainerPropsType } from "../../definitions";
|
|
2
|
+
declare const _default: import("react").MemoExoticComponent<({ groupId, weekOffset, calendarDate, sumHoursByGroups, sumHoursRender, className, style, }: SumHoursContainerPropsType) => import("react/jsx-runtime").JSX.Element>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { TaskContainerPropsType } from "../../definitions";
|
|
2
|
+
declare const _default: import("react").MemoExoticComponent<({ handleDragTask, taskRender, handleDragTaskEnd, style, className, currentTask, handleClickTask, }: TaskContainerPropsType) => import("react/jsx-runtime").JSX.Element>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CalendarTablePropsType, GroupFeildsType, TaskType, TasksStore, TasksType, dayInfoType } from "../definitions";
|
|
3
|
+
interface VirtualGroupRowProps {
|
|
4
|
+
group: GroupFeildsType;
|
|
5
|
+
i: number;
|
|
6
|
+
props: CalendarTablePropsType;
|
|
7
|
+
getTasks: (hash: string) => TasksType;
|
|
8
|
+
isValidTask: (task: TaskType) => boolean;
|
|
9
|
+
addTask: (task: TaskType) => void;
|
|
10
|
+
deleteTask: (hash: string, taskId: string) => void;
|
|
11
|
+
getTask: (hash: string, taskId: string) => TaskType | undefined;
|
|
12
|
+
dailyHours: dayInfoType[];
|
|
13
|
+
hashScope: "week" | "group" | "day";
|
|
14
|
+
tasks: TasksStore;
|
|
15
|
+
sumHoursByGroupsCount: number;
|
|
16
|
+
}
|
|
17
|
+
declare const _default: React.NamedExoticComponent<VirtualGroupRowProps>;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CalendarTablePropsType, GroupFeildsType, TaskType, TasksStore, TasksType, dayInfoType } from "../definitions";
|
|
3
|
+
interface VirtualGroupRowDayProps {
|
|
4
|
+
group: GroupFeildsType;
|
|
5
|
+
i: number;
|
|
6
|
+
props: CalendarTablePropsType;
|
|
7
|
+
getTasks: (hash: string) => TasksType;
|
|
8
|
+
isValidTask: (task: TaskType) => boolean;
|
|
9
|
+
addTask: (task: TaskType) => void;
|
|
10
|
+
deleteTask: (hash: string, taskId: string) => void;
|
|
11
|
+
updateTask: (hash: string, taskId: string, updatedTask: Partial<TaskType>) => void;
|
|
12
|
+
getTask: (hash: string, taskId: string) => TaskType | undefined;
|
|
13
|
+
dailyHours: dayInfoType[];
|
|
14
|
+
dayOffset: number;
|
|
15
|
+
hashScope: "week" | "group" | "day";
|
|
16
|
+
tasks: TasksStore;
|
|
17
|
+
}
|
|
18
|
+
declare const _default: React.NamedExoticComponent<VirtualGroupRowDayProps>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import "./style.css";
|
|
2
|
+
import { CalendarPropsType } from "../definitions";
|
|
3
|
+
/**
|
|
4
|
+
* Calendar component to display tasks and groups in a weekly view.
|
|
5
|
+
*
|
|
6
|
+
* @param {CalendarPropsType} props - The props for the Calendar component.
|
|
7
|
+
* @param {number} [props.weekOffset] - Offset for the week (e.g., -7 for last week, 0 for current week, 7 for next week).
|
|
8
|
+
* @param {GroupFeildsType[]} props.groups - Array of group data to be displayed in the calendar.
|
|
9
|
+
* @param {string} [props.className] - Additional class names for the calendar component.
|
|
10
|
+
* @param {React.CSSProperties} [props.style] - Additional styles for the calendar component.
|
|
11
|
+
* @param {Date} props.date - The current date to display in the calendar.
|
|
12
|
+
* @param {(currentGroup: { currentGroup: GroupFeildsType }) => React.ReactNode} [props.groupRender] - Custom render function for a group.
|
|
13
|
+
* @param {({ dayIndex, day, dayOfTheMonth, dayMonth, dayYear }: { dayIndex: number; day: string; dayOfTheMonth: number; dayMonth: string; dayYear: number }) => React.ReactNode} [props.dayRender] - Custom render function for a day.
|
|
14
|
+
* @param {(currentTask: { currentTask: TaskFeildsType }) => React.ReactNode} [props.taskRender] - Custom render function for a task.
|
|
15
|
+
* @param {React.CSSProperties} [props.rowsStyle] - Additional styles for the rows.
|
|
16
|
+
* @param {string} [props.rowsClassName] - Additional class names for the rows.
|
|
17
|
+
* @param {React.CSSProperties} [props.groupsColsStyle] - Additional styles for the group columns.
|
|
18
|
+
* @param {string} [props.groupsColsClassName] - Additional class names for the group columns.
|
|
19
|
+
* @param {React.CSSProperties} [props.daysColsStyle] - Additional styles for the day columns.
|
|
20
|
+
* @param {string} [props.daysColsClassName] - Additional class names for the day columns.
|
|
21
|
+
* @param {string} [props.addTaskClassName] - Additional class names for the add-task button.
|
|
22
|
+
* @param {React.CSSProperties} [props.addTaskStyle] - Additional styles for the add-task button.
|
|
23
|
+
* @param {string} [props.groupContainerClassName] - Additional class names for the group containers.
|
|
24
|
+
* @param {React.CSSProperties} [props.groupContainerStyle] - Additional styles for the group containers.
|
|
25
|
+
* @param {string} [props.dayClassName] - Additional class names for the day elements.
|
|
26
|
+
* @param {React.CSSProperties} [props.dayStyle] - Additional styles for the day elements.
|
|
27
|
+
* @param {React.CSSProperties} [props.taskContainerStyle] - Additional styles for the task container.
|
|
28
|
+
* @param {string} [props.taskContainerClassName] - Additional class names for the task container.
|
|
29
|
+
* @param {React.CSSProperties} [props.groupHeadContainerStyle] - Additional styles for the group header container.
|
|
30
|
+
* @param {string} [props.groupHeadContainerClassName] - Additional class names for the group header container.
|
|
31
|
+
* @param {React.CSSProperties} [props.sumHoursContainerStyle] - Additional styles for the sum-of-hours container.
|
|
32
|
+
* @param {string} [props.sumHoursContainerClassName] - Additional class names for the sum-of-hours container.
|
|
33
|
+
* @param {React.CSSProperties} [props.sumHoursHeadStyle] - Additional styles for the sum-of-hours header.
|
|
34
|
+
* @param {string} [props.sumHoursHeadClassName] - Additional class names for the sum-of-hours header.
|
|
35
|
+
* @param {(currentGroup: GroupFeildsType, dayInfo: dayInfoType) => void} [props.handleAddTask] - Handler function for adding a new task.
|
|
36
|
+
* @param {({ currentGroup, dayInfo }: { currentGroup: GroupFeildsType; dayInfo: dayInfoType }) => React.ReactNode} [props.addTaskRender] - Custom render function for adding a task.
|
|
37
|
+
* @param {TasksType} props.tasks - Array of tasks to be displayed in the calendar.
|
|
38
|
+
* @param {(event: React.DragEvent<HTMLDivElement>, currentTask: TaskFeildsType) => void} [props.handleDragTask] - Handler function for dragging a task.
|
|
39
|
+
* @param {(event: React.DragEvent<HTMLDivElement>, taskStart: number, taskEnd: number, taskDate: Date, groupId: string, dayIndex: number, newTask: TaskFeildsType, newTasks: TasksType) => void} [props.handleDropTask] - Handler function for dropping a task.
|
|
40
|
+
* @param {(event: React.DragEvent<HTMLDivElement>) => void} [props.handleDragTaskEnd] - Handler function for ending the drag of a task.
|
|
41
|
+
* @param {() => React.ReactNode} [props.groupsHeadRender] - Custom render function for the groups header.
|
|
42
|
+
* @param {({
|
|
43
|
+
* groupId,
|
|
44
|
+
* tasks,
|
|
45
|
+
* weekOffset,
|
|
46
|
+
* calendarDate,
|
|
47
|
+
* sumHoursByGroups
|
|
48
|
+
* }: {
|
|
49
|
+
* groupId: string;
|
|
50
|
+
* tasks: TasksType;
|
|
51
|
+
* weekOffset: number;
|
|
52
|
+
* calendarDate: Date;
|
|
53
|
+
* sumHoursByGroups: number;
|
|
54
|
+
* }) => React.ReactNode} [props.sumHoursRender] - Custom render function for the sum of hours.
|
|
55
|
+
* @param {() => React.ReactNode} [props.sumHoursHeadRender] - Custom render function for the sum-of-hours header.
|
|
56
|
+
* @param {(currentTask: TaskFeildsType) => void} [props.handleClickTask] - Handler function for clicking a task.
|
|
57
|
+
* @param {(currentGroup: GroupFeildsType) => void} [props.handleClickGroup] - Handler function for clicking a group.
|
|
58
|
+
* @param {0|1|2|3|4|5|6} [props.dayOffset] - Offset index for the day column (0 = first day of week, …, 6 = last day).
|
|
59
|
+
* @param {React.CSSProperties} [props.dayColsStyle] - Additional styles for the day columns.
|
|
60
|
+
* @param {string} [props.dayColsClassName] - Additional class names for the day columns.
|
|
61
|
+
* @param {React.CSSProperties} [props.hoursColsStyle] - Additional styles for the hours columns.
|
|
62
|
+
* @param {string} [props.hoursColsClassName] - Additional class names for the hours columns.
|
|
63
|
+
*/
|
|
64
|
+
declare const Calendar: (props: CalendarPropsType) => import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
export default Calendar;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type CalendarContextProviderPropsType = {
|
|
2
|
+
children: React.ReactNode;
|
|
3
|
+
};
|
|
4
|
+
type CalendarContextType = {};
|
|
5
|
+
declare const CalendarContextProvider: ({ children, }: CalendarContextProviderPropsType) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const useCalendarContext: () => CalendarContextType;
|
|
7
|
+
export default CalendarContextProvider;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TaskFeildsType } from "../definitions";
|
|
2
|
+
import { TasksStore } from "../definitions";
|
|
3
|
+
type Task = TaskFeildsType;
|
|
4
|
+
type CalendarTaskContextProviderPropsType = {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
timeZone?: string;
|
|
7
|
+
hashScope?: "week" | "group" | "day";
|
|
8
|
+
};
|
|
9
|
+
type CalendarTaskContextType = {
|
|
10
|
+
tasks: TasksStore;
|
|
11
|
+
addTask: (task: Task) => void;
|
|
12
|
+
getTasks: (hash: string) => Task[];
|
|
13
|
+
updateTask: (hash: string, taskId: string, updatedTask: Partial<Task>) => void;
|
|
14
|
+
deleteTask: (hash: string, taskId: string) => void;
|
|
15
|
+
cleanExpiredTasks: () => void;
|
|
16
|
+
cleanExpiredTasksByHash: (hash: string) => void;
|
|
17
|
+
isValidTask: (task: Task) => boolean;
|
|
18
|
+
getTask: (hash: string, taskId: string) => TaskFeildsType | undefined;
|
|
19
|
+
hashScope?: "week" | "group" | "day";
|
|
20
|
+
};
|
|
21
|
+
declare const CalendarTaskContextProvider: ({ children, hashScope }: CalendarTaskContextProviderPropsType) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const useCalendarTaskContext: () => CalendarTaskContextType;
|
|
23
|
+
export default CalendarTaskContextProvider;
|
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for the Group component.
|
|
3
|
+
*/
|
|
4
|
+
export type GroupPropsType = {
|
|
5
|
+
/** Custom render function for the group. */
|
|
6
|
+
groupRender?: ({ currentGroup, }: {
|
|
7
|
+
currentGroup: GroupFeildsType;
|
|
8
|
+
}) => React.ReactNode;
|
|
9
|
+
/** Additional class names for the group component. */
|
|
10
|
+
className?: string;
|
|
11
|
+
/** Additional styles for the group component. */
|
|
12
|
+
style?: React.CSSProperties | undefined;
|
|
13
|
+
/** The current group data. */
|
|
14
|
+
currentGroup: GroupFeildsType;
|
|
15
|
+
/** Handler function for clicking the group. */
|
|
16
|
+
handleClickGroup?: (currentGroup: GroupFeildsType) => void;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Required fields for a group.
|
|
20
|
+
*/
|
|
21
|
+
type GroupRiquiredFieldsType = {
|
|
22
|
+
/** Label for the group. */
|
|
23
|
+
label?: string;
|
|
24
|
+
/** URL of the image representing the group. */
|
|
25
|
+
imageUrl?: string;
|
|
26
|
+
/** Unique identifier for the group. */
|
|
27
|
+
id: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Additional fields for a group.
|
|
31
|
+
*/
|
|
32
|
+
type GroupAdditionalFieldsType = Record<any, any>;
|
|
33
|
+
/**
|
|
34
|
+
* Fields for a group, including both required and additional fields.
|
|
35
|
+
*/
|
|
36
|
+
export type GroupFeildsType = GroupRiquiredFieldsType & GroupAdditionalFieldsType;
|
|
37
|
+
/**
|
|
38
|
+
* Props for the GroupComponent.
|
|
39
|
+
*/
|
|
40
|
+
export type GroupComponentPropsType = {
|
|
41
|
+
/** Custom render function for the group. */
|
|
42
|
+
groupRender?: ({ currentGroup, }: {
|
|
43
|
+
currentGroup: GroupFeildsType;
|
|
44
|
+
}) => React.ReactNode;
|
|
45
|
+
/** Additional class names for the group component. */
|
|
46
|
+
className?: string;
|
|
47
|
+
/** Additional styles for the group component. */
|
|
48
|
+
style?: React.CSSProperties | undefined;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Props for the Days component.
|
|
52
|
+
*/
|
|
53
|
+
export type DaysPropsType = {
|
|
54
|
+
/** Custom render function for a day. */
|
|
55
|
+
dayRender?: ({ dayIndex, day, dayOfTheMonth, dayMonth, dayYear, }: {
|
|
56
|
+
dayIndex?: number;
|
|
57
|
+
day?: string;
|
|
58
|
+
dayOfTheMonth?: number;
|
|
59
|
+
dayMonth?: string;
|
|
60
|
+
dayYear?: number;
|
|
61
|
+
}) => React.ReactNode;
|
|
62
|
+
/** Additional class names for the days component. */
|
|
63
|
+
className?: string;
|
|
64
|
+
/** Additional styles for the days component. */
|
|
65
|
+
style?: React.CSSProperties | undefined;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Props for a single day.
|
|
69
|
+
*/
|
|
70
|
+
export type DayPropsType = {
|
|
71
|
+
/** Index of the day. */
|
|
72
|
+
dayIndex: number;
|
|
73
|
+
/** Name of the day. */
|
|
74
|
+
day: string;
|
|
75
|
+
/** Day of the month. */
|
|
76
|
+
dayOfTheMonth: number;
|
|
77
|
+
/** Custom render function for a day. */
|
|
78
|
+
dayRender?: ({ dayIndex, day, dayOfTheMonth, dayMonth, dayYear, }: {
|
|
79
|
+
dayIndex: number;
|
|
80
|
+
day: string;
|
|
81
|
+
dayOfTheMonth: number;
|
|
82
|
+
dayMonth: string;
|
|
83
|
+
dayYear: number;
|
|
84
|
+
}) => React.ReactNode;
|
|
85
|
+
/** Month of the day. */
|
|
86
|
+
dayMonth: string;
|
|
87
|
+
/** Year of the day. */
|
|
88
|
+
dayYear: number;
|
|
89
|
+
/** Additional class names for the day component. */
|
|
90
|
+
className?: string;
|
|
91
|
+
/** Additional styles for the day component. */
|
|
92
|
+
style?: React.CSSProperties | undefined;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Props for the Calendar component.
|
|
96
|
+
*/
|
|
97
|
+
export type CalendarPropsType = {
|
|
98
|
+
drop?: "copy" | "move";
|
|
99
|
+
scope?: "day" | "week";
|
|
100
|
+
/** Offset for the week (e.g., -7 for last week, 0 for current week, 7 for next week). */
|
|
101
|
+
weekOffset?: number;
|
|
102
|
+
/** Array of group data to be displayed in the calendar. */
|
|
103
|
+
groups: GroupFeildsType[];
|
|
104
|
+
/** Additional class names for the calendar component. */
|
|
105
|
+
className?: string;
|
|
106
|
+
/** Additional styles for the calendar component. */
|
|
107
|
+
style?: React.CSSProperties | undefined;
|
|
108
|
+
/** The current date to display in the calendar. */
|
|
109
|
+
date: Date;
|
|
110
|
+
/** Custom render function for a group. */
|
|
111
|
+
groupRender?: ({ currentGroup, }: {
|
|
112
|
+
currentGroup: GroupFeildsType;
|
|
113
|
+
}) => React.ReactNode;
|
|
114
|
+
/** Custom render function for a day. */
|
|
115
|
+
dayRender?: ({ dayIndex, day, dayOfTheMonth, dayMonth, dayYear, }: {
|
|
116
|
+
dayIndex: number;
|
|
117
|
+
day: string;
|
|
118
|
+
dayOfTheMonth: number;
|
|
119
|
+
dayMonth: string;
|
|
120
|
+
dayYear: number;
|
|
121
|
+
}) => React.ReactNode;
|
|
122
|
+
/** Custom render function for a task. */
|
|
123
|
+
taskRender?: ({ currentTask, }: {
|
|
124
|
+
currentTask: TaskFeildsType;
|
|
125
|
+
}) => React.ReactNode;
|
|
126
|
+
/** Additional styles for the rows. */
|
|
127
|
+
rowsStyle?: React.CSSProperties | undefined;
|
|
128
|
+
/** Additional class names for the rows. */
|
|
129
|
+
rowsClassName?: string;
|
|
130
|
+
/** Additional styles for the group columns. */
|
|
131
|
+
groupsColsStyle?: React.CSSProperties | undefined;
|
|
132
|
+
/** Additional class names for the group columns. */
|
|
133
|
+
groupsColsClassName?: string;
|
|
134
|
+
/** Additional styles for the day columns. */
|
|
135
|
+
daysColsStyle?: React.CSSProperties | undefined;
|
|
136
|
+
/** Additional class names for the day columns. */
|
|
137
|
+
daysColsClassName?: string;
|
|
138
|
+
/** Additional class names for the add task button. */
|
|
139
|
+
addTaskClassName?: string;
|
|
140
|
+
/** Additional styles for the add task button. */
|
|
141
|
+
addTaskStyle?: React.CSSProperties | undefined;
|
|
142
|
+
/** Additional class names for the groups. */
|
|
143
|
+
groupContainerClassName?: string;
|
|
144
|
+
/** Additional styles for the groups. */
|
|
145
|
+
groupContainerStyle?: React.CSSProperties | undefined;
|
|
146
|
+
/** Additional class names for the days. */
|
|
147
|
+
dayClassName?: string;
|
|
148
|
+
/** Additional styles for the days. */
|
|
149
|
+
dayStyle?: React.CSSProperties | undefined;
|
|
150
|
+
/** Additional styles for the task container. */
|
|
151
|
+
taskContainerStyle?: React.CSSProperties | undefined;
|
|
152
|
+
/** Additional class names for the task container. */
|
|
153
|
+
taskContainerClassName?: string;
|
|
154
|
+
/** Additional styles for the group head container. */
|
|
155
|
+
groupHeadContainerStyle?: React.CSSProperties | undefined;
|
|
156
|
+
/** Additional class names for the group head container. */
|
|
157
|
+
groupHeadContainerClassName?: string;
|
|
158
|
+
/** Additional styles for the sum hours container. */
|
|
159
|
+
sumHoursContainerStyle?: React.CSSProperties | undefined;
|
|
160
|
+
/** Additional class names for the sum hours container. */
|
|
161
|
+
sumHoursContainerClassName?: string;
|
|
162
|
+
/** Additional styles for the sum hours header. */
|
|
163
|
+
sumHoursHeadStyle?: React.CSSProperties | undefined;
|
|
164
|
+
/** Additional class names for the sum hours header. */
|
|
165
|
+
sumHoursHeadClassName?: string;
|
|
166
|
+
/** Handler function for adding a new task. */
|
|
167
|
+
handleAddTask?: (currentGroup: GroupFeildsType, dayInfo: dayInfoType) => void;
|
|
168
|
+
/** Custom render function for adding a task. */
|
|
169
|
+
addTaskRender?: ({ currentGroup, dayInfo, }: {
|
|
170
|
+
currentGroup: GroupFeildsType;
|
|
171
|
+
dayInfo: dayInfoType;
|
|
172
|
+
}) => React.ReactNode;
|
|
173
|
+
/** Array of tasks to be displayed in the calendar. */
|
|
174
|
+
/** Handler function for dragging a task. */
|
|
175
|
+
handleDragTask?: (event: React.DragEvent<HTMLDivElement>, currentTask: TaskFeildsType) => void;
|
|
176
|
+
/** Handler function for dropping a task. */
|
|
177
|
+
handleDropTask?: (event: React.DragEvent<HTMLDivElement>, taskStart: number, taskEnd: number, taskDate: Date, groupId: string, dayIndex: number, newTask: TaskFeildsType, newTasks: TasksType) => void;
|
|
178
|
+
/** Handler function for ending the drag of a task. */
|
|
179
|
+
handleDragTaskEnd?: (event: React.DragEvent<HTMLDivElement>) => void;
|
|
180
|
+
/** Custom render function for the groups header. */
|
|
181
|
+
groupsHeadRender?: () => React.ReactNode;
|
|
182
|
+
/** Custom render function for the sum of hours. */
|
|
183
|
+
sumHoursRender?: ({ groupId, weekOffset, calendarDate, sumHoursByGroups, }: {
|
|
184
|
+
groupId: string;
|
|
185
|
+
weekOffset: number;
|
|
186
|
+
calendarDate: Date;
|
|
187
|
+
sumHoursByGroups: number;
|
|
188
|
+
}) => React.ReactNode;
|
|
189
|
+
/** Custom render function for the sum of hours header. */
|
|
190
|
+
sumHoursHeadRender?: () => React.ReactNode;
|
|
191
|
+
/** Handler function for clicking a task. */
|
|
192
|
+
handleClickTask?: (currentTask: TaskFeildsType) => void;
|
|
193
|
+
/** Handler function for clicking a group. */
|
|
194
|
+
handleClickGroup?: (currentGroup: GroupFeildsType) => void;
|
|
195
|
+
/** your timezones */
|
|
196
|
+
timeZone?: TimeZone;
|
|
197
|
+
/** day id */
|
|
198
|
+
dayOffset?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
199
|
+
/**day columns styles */
|
|
200
|
+
dayColsStyle?: React.CSSProperties | undefined;
|
|
201
|
+
/**day columns className*/
|
|
202
|
+
dayColsClassName?: string;
|
|
203
|
+
/**hours columns className*/
|
|
204
|
+
hoursColsStyle?: React.CSSProperties | undefined;
|
|
205
|
+
/**hours columns className*/
|
|
206
|
+
hoursColsClassName?: string;
|
|
207
|
+
};
|
|
208
|
+
/**
|
|
209
|
+
* Type for style props.
|
|
210
|
+
*/
|
|
211
|
+
export type StyleType = React.CSSProperties | undefined;
|
|
212
|
+
/**
|
|
213
|
+
* Props for the AddTask component.
|
|
214
|
+
*/
|
|
215
|
+
export type AddTaskPropsType = {
|
|
216
|
+
/** The current group data. */
|
|
217
|
+
currentGroup: GroupFeildsType;
|
|
218
|
+
/** Additional styles for the add task button. */
|
|
219
|
+
addTaskStyle?: StyleType;
|
|
220
|
+
/** Additional class names for the add task button. */
|
|
221
|
+
addTaskClassName?: string;
|
|
222
|
+
/** Custom render function for adding a task. */
|
|
223
|
+
addTaskRender?: ({ currentGroup, dayInfo, }: {
|
|
224
|
+
currentGroup: GroupFeildsType;
|
|
225
|
+
dayInfo: dayInfoType;
|
|
226
|
+
}) => React.ReactNode;
|
|
227
|
+
/** Information about the day. */
|
|
228
|
+
dayInfo: dayInfoType;
|
|
229
|
+
/** Handler function for adding a new task. */
|
|
230
|
+
handleAddTask?: (currentGroup: GroupFeildsType, dayInfo: dayInfoType) => void;
|
|
231
|
+
};
|
|
232
|
+
/**
|
|
233
|
+
* Information about a day.
|
|
234
|
+
*/
|
|
235
|
+
export type dayInfoType = {
|
|
236
|
+
/** Position of the day. */
|
|
237
|
+
positionDay: number;
|
|
238
|
+
/** Date of the day. */
|
|
239
|
+
day: Date;
|
|
240
|
+
/** Start time of the day. */
|
|
241
|
+
start: number;
|
|
242
|
+
/** End time of the day. */
|
|
243
|
+
end: number;
|
|
244
|
+
};
|
|
245
|
+
/**
|
|
246
|
+
* Type for a task.
|
|
247
|
+
*/
|
|
248
|
+
export type TaskType = {
|
|
249
|
+
/** Start time of the task. */
|
|
250
|
+
taskStart: number;
|
|
251
|
+
/** End time of the task. */
|
|
252
|
+
taskEnd: number;
|
|
253
|
+
/** Description of the task. */
|
|
254
|
+
taskDescription?: string;
|
|
255
|
+
/** Description of the task. */
|
|
256
|
+
taskSummary?: string;
|
|
257
|
+
/** Date of the task. */
|
|
258
|
+
taskDate: Date;
|
|
259
|
+
/** ID of the group the task belongs to. */
|
|
260
|
+
groupId: string;
|
|
261
|
+
/** Index of the day the task belongs to. */
|
|
262
|
+
dayIndex: number;
|
|
263
|
+
/** Unique identifier for the task. */
|
|
264
|
+
id: string;
|
|
265
|
+
/** This is a prop to save the date in local storage until a date of your choice */
|
|
266
|
+
taskExpiryDate?: Date;
|
|
267
|
+
/**task created date */
|
|
268
|
+
taskCreatedAt?: Date;
|
|
269
|
+
/**task location */
|
|
270
|
+
taskLocation?: string;
|
|
271
|
+
/**task timezone */
|
|
272
|
+
taskTimzone?: string;
|
|
273
|
+
hash?: string;
|
|
274
|
+
dragHash?: string;
|
|
275
|
+
};
|
|
276
|
+
export type filterTaskType = {
|
|
277
|
+
/** Start time of the task. */
|
|
278
|
+
taskStart?: number;
|
|
279
|
+
/** End time of the task. */
|
|
280
|
+
taskEnd?: number;
|
|
281
|
+
/** Description of the task. */
|
|
282
|
+
taskDescription: string;
|
|
283
|
+
/** Description of the task. */
|
|
284
|
+
taskSummary: string;
|
|
285
|
+
/** Date of the task. */
|
|
286
|
+
taskDate?: Date;
|
|
287
|
+
/** ID of the group the task belongs to. */
|
|
288
|
+
groupId?: string;
|
|
289
|
+
/** Index of the day the task belongs to. */
|
|
290
|
+
dayIndex?: number;
|
|
291
|
+
/** Unique identifier for the task. */
|
|
292
|
+
taskId?: string;
|
|
293
|
+
/** This is a prop to save the date in local storage until a date of your choice */
|
|
294
|
+
taskExpiryDate?: Date;
|
|
295
|
+
} & TaskAdditionalFieldsType;
|
|
296
|
+
/**
|
|
297
|
+
* Props for the TaskContainer component.
|
|
298
|
+
*/
|
|
299
|
+
export type TaskContainerPropsType = {
|
|
300
|
+
/** Additional class names for the task container. */
|
|
301
|
+
className?: string;
|
|
302
|
+
/** Additional styles for the task container. */
|
|
303
|
+
style?: React.CSSProperties | undefined;
|
|
304
|
+
/** Handler function for dragging a task. */
|
|
305
|
+
handleDragTask?: (event: React.DragEvent<HTMLDivElement>, currentTask: TaskFeildsType) => void;
|
|
306
|
+
/** Custom render function for a task. */
|
|
307
|
+
taskRender?: ({ currentTask, }: {
|
|
308
|
+
currentTask: TaskFeildsType;
|
|
309
|
+
}) => React.ReactNode;
|
|
310
|
+
/** Handler function for ending the drag of a task. */
|
|
311
|
+
handleDragTaskEnd?: (event: React.DragEvent<HTMLDivElement>) => void;
|
|
312
|
+
/** The current task data. */
|
|
313
|
+
currentTask: TaskFeildsType;
|
|
314
|
+
/** Handler function for clicking a task. */
|
|
315
|
+
handleClickTask?: (currentTask: TaskFeildsType) => void;
|
|
316
|
+
};
|
|
317
|
+
/**
|
|
318
|
+
* Props for the GroupsHeadContainer component.
|
|
319
|
+
*/
|
|
320
|
+
export type GroupsHeadContainerPropsType = {
|
|
321
|
+
/** Custom render function for the groups header. */
|
|
322
|
+
groupsHeadRender?: () => React.ReactNode;
|
|
323
|
+
/** Additional styles for the groups header container. */
|
|
324
|
+
style?: React.CSSProperties | undefined;
|
|
325
|
+
/** Additional class names for the groups header container. */
|
|
326
|
+
className?: string;
|
|
327
|
+
};
|
|
328
|
+
/**
|
|
329
|
+
* Props for the SumHoursHeadContainer component.
|
|
330
|
+
*/
|
|
331
|
+
export type SumHoursHeadContainerPropsType = {
|
|
332
|
+
/** Custom render function for the sum hours header. */
|
|
333
|
+
sumHoursHeadRender?: () => React.ReactNode;
|
|
334
|
+
/** Additional styles for the sum hours header container. */
|
|
335
|
+
style?: React.CSSProperties | undefined;
|
|
336
|
+
/** Additional class names for the sum hours header container. */
|
|
337
|
+
className?: string;
|
|
338
|
+
};
|
|
339
|
+
/**
|
|
340
|
+
* Additional fields for a task.
|
|
341
|
+
*/
|
|
342
|
+
type TaskAdditionalFieldsType = Record<any, any>;
|
|
343
|
+
/**
|
|
344
|
+
* Fields for a task, including both required and additional fields.
|
|
345
|
+
*/
|
|
346
|
+
export type TaskFeildsType = TaskType & TaskAdditionalFieldsType;
|
|
347
|
+
/**
|
|
348
|
+
* Type for an array of tasks.
|
|
349
|
+
*/
|
|
350
|
+
export type TasksType = TaskFeildsType[];
|
|
351
|
+
/**
|
|
352
|
+
* Handler function type for ending the drag of a task.
|
|
353
|
+
*/
|
|
354
|
+
export type handleDragTaskEndType = (event: React.DragEvent<HTMLDivElement>) => void;
|
|
355
|
+
/**
|
|
356
|
+
* Props for the SumHoursContainer component.
|
|
357
|
+
*/
|
|
358
|
+
export type SumHoursContainerPropsType = {
|
|
359
|
+
/** ID of the group. */
|
|
360
|
+
groupId: string;
|
|
361
|
+
/** Offset for the week (e.g., -7 for last week, 0 for current week, 7 for next week). */
|
|
362
|
+
weekOffset: number;
|
|
363
|
+
/** The current date to display in the calendar. */
|
|
364
|
+
calendarDate: Date;
|
|
365
|
+
/** Sum of hours for the group. */
|
|
366
|
+
sumHoursByGroups: number;
|
|
367
|
+
/** Custom render function for the sum of hours. */
|
|
368
|
+
sumHoursRender?: ({ groupId, weekOffset, calendarDate, sumHoursByGroups, }: {
|
|
369
|
+
groupId: string;
|
|
370
|
+
weekOffset: number;
|
|
371
|
+
calendarDate: Date;
|
|
372
|
+
sumHoursByGroups: number;
|
|
373
|
+
}) => React.ReactNode;
|
|
374
|
+
/** Additional styles for the sum hours container. */
|
|
375
|
+
style?: React.CSSProperties | undefined;
|
|
376
|
+
/** Additional class names for the sum hours container. */
|
|
377
|
+
className?: string;
|
|
378
|
+
};
|
|
379
|
+
export type weekDaysType = {
|
|
380
|
+
day: string;
|
|
381
|
+
dayMonth: string;
|
|
382
|
+
dayYear: number;
|
|
383
|
+
dayOfTheMonth: number;
|
|
384
|
+
}[];
|
|
385
|
+
export type dailyHoursType = {
|
|
386
|
+
positionDay: number;
|
|
387
|
+
day: Date;
|
|
388
|
+
start: number;
|
|
389
|
+
end: number;
|
|
390
|
+
}[];
|
|
391
|
+
export type CalendarTablePropsType = CalendarPropsType;
|
|
392
|
+
export type TimeZone = "Africa/Abidjan" | "Africa/Accra" | "Africa/Addis_Ababa" | "Africa/Algiers" | "Africa/Asmara" | "Africa/Asmera" | "Africa/Bamako" | "Africa/Bangui" | "Africa/Banjul" | "Africa/Bissau" | "Africa/Blantyre" | "Africa/Brazzaville" | "Africa/Bujumbura" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Ceuta" | "Africa/Conakry" | "Africa/Dakar" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Douala" | "Africa/El_Aaiun" | "Africa/Freetown" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Juba" | "Africa/Kampala" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Lome" | "Africa/Luanda" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Malabo" | "Africa/Maputo" | "Africa/Maseru" | "Africa/Mbabane" | "Africa/Mogadishu" | "Africa/Monrovia" | "Africa/Nairobi" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Africa/Porto-Novo" | "Africa/Sao_Tome" | "Africa/Timbuktu" | "Africa/Tripoli" | "Africa/Tunis" | "Africa/Windhoek" | "America/Adak" | "America/Anchorage" | "America/Anguilla" | "America/Antigua" | "America/Araguaina" | "America/Argentina/Buenos_Aires" | "America/Argentina/Catamarca" | "America/Argentina/ComodRivadavia" | "America/Argentina/Cordoba" | "America/Argentina/Jujuy" | "America/Argentina/La_Rioja" | "America/Argentina/Mendoza" | "America/Argentina/Rio_Gallegos" | "America/Argentina/Salta" | "America/Argentina/San_Juan" | "America/Argentina/San_Luis" | "America/Argentina/Tucuman" | "America/Argentina/Ushuaia" | "America/Aruba" | "America/Asuncion" | "America/Atikokan" | "America/Atka" | "America/Bahia" | "America/Bahia_Banderas" | "America/Barbados" | "America/Belem" | "America/Belize" | "America/Blanc-Sablon" | "America/Boa_Vista" | "America/Bogota" | "America/Boise" | "America/Buenos_Aires" | "America/Cambridge_Bay" | "America/Campo_Grande" | "America/Cancun" | "America/Caracas" | "America/Catamarca" | "America/Cayenne" | "America/Cayman" | "America/Chicago" | "America/Chihuahua" | "America/Ciudad_Juarez" | "America/Coral_Harbour" | "America/Cordoba" | "America/Costa_Rica" | "America/Creston" | "America/Cuiaba" | "America/Curacao" | "America/Danmarkshavn" | "America/Dawson" | "America/Dawson_Creek" | "America/Denver" | "America/Detroit" | "America/Dominica" | "America/Edmonton" | "America/Eirunepe" | "America/El_Salvador" | "America/Ensenada" | "America/Fort_Nelson" | "America/Fort_Wayne" | "America/Fortaleza" | "America/Glace_Bay" | "America/Godthab" | "America/Goose_Bay" | "America/Grand_Turk" | "America/Grenada" | "America/Guadeloupe" | "America/Guatemala" | "America/Guayaquil" | "America/Guyana" | "America/Halifax" | "America/Havana" | "America/Hermosillo" | "America/Indiana/Indianapolis" | "America/Indiana/Knox" | "America/Indiana/Marengo" | "America/Indiana/Petersburg" | "America/Indiana/Tell_City" | "America/Indiana/Vevay" | "America/Indiana/Vincennes" | "America/Indiana/Winamac" | "America/Indianapolis" | "America/Inuvik" | "America/Iqaluit" | "America/Jamaica" | "America/Jujuy" | "America/Juneau" | "America/Kentucky/Louisville" | "America/Kentucky/Monticello" | "America/Knox_IN" | "America/Kralendijk" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Louisville" | "America/Lower_Princes" | "America/Maceio" | "America/Managua" | "America/Manaus" | "America/Marigot" | "America/Martinique" | "America/Matamoros" | "America/Mazatlan" | "America/Mendoza" | "America/Menominee" | "America/Merida" | "America/Metlakatla" | "America/Mexico_City" | "America/Miquelon" | "America/Moncton" | "America/Monterrey" | "America/Montevideo" | "America/Montreal" | "America/Montserrat" | "America/Nassau" | "America/New_York" | "America/Nipigon" | "America/Nome" | "America/Noronha" | "America/North_Dakota/Beulah" | "America/North_Dakota/Center" | "America/North_Dakota/New_Salem" | "America/Nuuk" | "America/Ojinaga" | "America/Panama" | "America/Pangnirtung" | "America/Paramaribo" | "America/Phoenix" | "America/Port-au-Prince" | "America/Port_of_Spain" | "America/Porto_Acre" | "America/Porto_Velho" | "America/Puerto_Rico" | "America/Punta_Arenas" | "America/Rainy_River" | "America/Rankin_Inlet" | "America/Recife" | "America/Regina" | "America/Resolute" | "America/Rio_Branco" | "America/Rosario" | "America/Santa_Isabel" | "America/Santarem" | "America/Santiago" | "America/Santo_Domingo" | "America/Sao_Paulo" | "America/Scoresbysund" | "America/Shiprock" | "America/Sitka" | "America/St_Barthelemy" | "America/St_Johns" | "America/St_Kitts" | "America/St_Lucia" | "America/St_Thomas" | "America/St_Vincent" | "America/Swift_Current" | "America/Tegucigalpa" | "America/Thule" | "America/Thunder_Bay" | "America/Tijuana" | "America/Toronto" | "America/Tortola" | "America/Vancouver" | "America/Virgin" | "America/Whitehorse" | "America/Winnipeg" | "America/Yakutat" | "America/Yellowknife" | "Antarctica/Casey" | "Antarctica/Davis" | "Antarctica/DumontDUrville" | "Antarctica/Macquarie" | "Antarctica/Mawson" | "Antarctica/McMurdo" | "Antarctica/Palmer" | "Antarctica/Rothera" | "Antarctica/South_Pole" | "Antarctica/Syowa" | "Antarctica/Troll" | "Antarctica/Vostok" | "Arctic/Longyearbyen" | "Asia/Aden" | "Asia/Almaty" | "Asia/Amman" | "Asia/Anadyr" | "Asia/Aqtau" | "Asia/Aqtobe" | "Asia/Ashgabat" | "Asia/Ashkhabad" | "Asia/Atyrau" | "Asia/Baghdad" | "Asia/Bahrain" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Barnaul" | "Asia/Beirut" | "Asia/Bishkek" | "Asia/Brunei" | "Asia/Calcutta" | "Asia/Chita" | "Asia/Choibalsan" | "Asia/Chongqing" | "Asia/Chungking" | "Asia/Colombo" | "Asia/Dacca" | "Asia/Damascus" | "Asia/Dhaka" | "Asia/Dili" | "Asia/Dubai" | "Asia/Dushanbe" | "Asia/Famagusta" | "Asia/Gaza" | "Asia/Harbin" | "Asia/Hebron" | "Asia/Ho_Chi_Minh" | "Asia/Hong_Kong" | "Asia/Hovd" | "Asia/Irkutsk" | "Asia/Istanbul" | "Asia/Jakarta" | "Asia/Jayapura" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kashgar" | "Asia/Kathmandu" | "Asia/Katmandu" | "Asia/Khandyga" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuching" | "Asia/Kuwait" | "Asia/Macao" | "Asia/Macau" | "Asia/Magadan" | "Asia/Makassar" | "Asia/Manila" | "Asia/Muscat" | "Asia/Nicosia" | "Asia/Novokuznetsk" | "Asia/Novosibirsk" | "Asia/Omsk" | "Asia/Oral" | "Asia/Phnom_Penh" | "Asia/Pontianak" | "Asia/Pyongyang" | "Asia/Qatar" | "Asia/Qostanay" | "Asia/Qyzylorda" | "Asia/Rangoon" | "Asia/Riyadh" | "Asia/Saigon" | "Asia/Sakhalin" | "Asia/Samarkand" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Tel_Aviv" | "Asia/Thimbu" | "Asia/Thimphu" | "Asia/Tokyo" | "Asia/Tomsk" | "Asia/Ujung_Pandang" | "Asia/Ulaanbaatar" | "Asia/Ulan_Bator" | "Asia/Urumqi" | "Asia/Ust-Nera" | "Asia/Vientiane" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yangon" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Bermuda" | "Atlantic/Canary" | "Atlantic/Cape_Verde" | "Atlantic/Faeroe" | "Atlantic/Faroe" | "Atlantic/Jan_Mayen" | "Atlantic/Madeira" | "Atlantic/Reykjavik" | "Atlantic/South_Georgia" | "Atlantic/St_Helena" | "Atlantic/Stanley" | "Australia/ACT" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Broken_Hill" | "Australia/Canberra" | "Australia/Currie" | "Australia/Darwin" | "Australia/Eucla" | "Australia/Hobart" | "Australia/LHI" | "Australia/Lindeman" | "Australia/Lord_Howe" | "Australia/Melbourne" | "Australia/North" | "Australia/NSW" | "Australia/Perth" | "Australia/Queensland" | "Australia/South" | "Australia/Sydney" | "Australia/Tasmania" | "Australia/Victoria" | "Australia/West" | "Australia/Yancowinna" | "Brazil/Acre" | "Brazil/DeNoronha" | "Brazil/East" | "Brazil/West" | "Canada/Atlantic" | "Canada/Central" | "Canada/Eastern" | "Canada/Mountain" | "Canada/Newfoundland" | "Canada/Pacific" | "Canada/Saskatchewan" | "Canada/Yukon" | "CET" | "Chile/Continental" | "Chile/EasterIsland" | "CST6CDT" | "Cuba" | "EET" | "Egypt" | "Eire" | "EST" | "EST5EDT" | "Etc/GMT" | "Etc/GMT+0" | "Etc/GMT+1" | "Etc/GMT+10" | "Etc/GMT+11" | "Etc/GMT+12" | "Etc/GMT+2" | "Etc/GMT+3" | "Etc/GMT+4" | "Etc/GMT+5" | "Etc/GMT+6" | "Etc/GMT+7" | "Etc/GMT+8" | "Etc/GMT+9" | "Etc/GMT-0" | "Etc/GMT-1" | "Etc/GMT-10" | "Etc/GMT-11" | "Etc/GMT-12" | "Etc/GMT-13" | "Etc/GMT-14" | "Etc/GMT-2" | "Etc/GMT-3" | "Etc/GMT-4" | "Etc/GMT-5" | "Etc/GMT-6" | "Etc/GMT-7" | "Etc/GMT-8" | "Etc/GMT-9" | "Etc/GMT0" | "Etc/Greenwich" | "Etc/UCT" | "Etc/Universal" | "Etc/UTC" | "Etc/Zulu" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Astrakhan" | "Europe/Athens" | "Europe/Belfast" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Busingen" | "Europe/Chisinau" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Gibraltar" | "Europe/Guernsey" | "Europe/Helsinki" | "Europe/Isle_of_Man" | "Europe/Istanbul" | "Europe/Jersey" | "Europe/Kaliningrad" | "Europe/Kiev" | "Europe/Kirov" | "Europe/Kyiv" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Mariehamn" | "Europe/Minsk" | "Europe/Monaco" | "Europe/Moscow" | "Europe/Nicosia" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/San_Marino" | "Europe/Sarajevo" | "Europe/Saratov" | "Europe/Simferopol" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Tirane" | "Europe/Tiraspol" | "Europe/Ulyanovsk" | "Europe/Uzhgorod" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zaporozhye" | "Europe/Zurich" | "Factory" | "GB" | "GB-Eire" | "GMT" | "GMT+0" | "GMT-0" | "GMT0" | "Greenwich" | "Hongkong" | "HST" | "Iceland" | "Indian/Antananarivo" | "Indian/Chagos" | "Indian/Christmas" | "Indian/Cocos" | "Indian/Comoro" | "Indian/Kerguelen" | "Indian/Mahe" | "Indian/Maldives" | "Indian/Mauritius" | "Indian/Mayotte" | "Indian/Reunion" | "Iran" | "Israel" | "Jamaica" | "Japan" | "Kwajalein" | "Libya" | "MET" | "Mexico/BajaNorte" | "Mexico/BajaSur" | "Mexico/General" | "MST" | "MST7MDT" | "Navajo" | "NZ" | "NZ-CHAT" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Bougainville" | "Pacific/Chatham" | "Pacific/Chuuk" | "Pacific/Easter" | "Pacific/Efate" | "Pacific/Enderbury" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Funafuti" | "Pacific/Galapagos" | "Pacific/Gambier" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Johnston" | "Pacific/Kanton" | "Pacific/Kiritimati" | "Pacific/Kosrae" | "Pacific/Kwajalein" | "Pacific/Majuro" | "Pacific/Marquesas" | "Pacific/Midway" | "Pacific/Nauru" | "Pacific/Niue" | "Pacific/Norfolk" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Palau" | "Pacific/Pitcairn" | "Pacific/Pohnpei" | "Pacific/Ponape" | "Pacific/Port_Moresby" | "Pacific/Rarotonga" | "Pacific/Saipan" | "Pacific/Samoa" | "Pacific/Tahiti" | "Pacific/Tarawa" | "Pacific/Tongatapu" | "Pacific/Truk" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Yap" | "Poland" | "Portugal" | "PRC" | "PST8PDT" | "ROC" | "ROK" | "Singapore" | "Turkey" | "UCT" | "Universal" | "US/Alaska" | "US/Aleutian" | "US/Arizona" | "US/Central" | "US/East-Indiana" | "US/Eastern" | "US/Hawaii" | "US/Indiana-Starke" | "US/Michigan" | "US/Mountain" | "US/Pacific" | "US/Samoa" | "UTC" | "W-SU" | "WET" | "Zulu";
|
|
393
|
+
export type virtualDataPropsType = {
|
|
394
|
+
groups: GroupFeildsType[];
|
|
395
|
+
props: CalendarPropsType;
|
|
396
|
+
dailyHours: dailyHoursType;
|
|
397
|
+
handleDragOver: (event: React.DragEvent<HTMLDivElement>) => void;
|
|
398
|
+
tasks: TasksType;
|
|
399
|
+
getTasks: (offset: string) => TasksType;
|
|
400
|
+
getTask: (offset: string, taskId: string) => TaskFeildsType | undefined;
|
|
401
|
+
addTask: (offset: string, task: TaskFeildsType) => void;
|
|
402
|
+
updateTask: (offset: string, taskId: string, task: TaskFeildsType) => void;
|
|
403
|
+
deleteTask: (offset: string, taskId: string) => void;
|
|
404
|
+
isValidTask: (task: TaskFeildsType) => boolean;
|
|
405
|
+
};
|
|
406
|
+
export type Task = TaskFeildsType;
|
|
407
|
+
export type TaskBucket = {
|
|
408
|
+
list: Task[];
|
|
409
|
+
indexMap: Record<string, number>;
|
|
410
|
+
sumOfTaskDuration: number;
|
|
411
|
+
};
|
|
412
|
+
export type TasksStore = {
|
|
413
|
+
buckets: Record<string, TaskBucket>;
|
|
414
|
+
dataLength: number;
|
|
415
|
+
taskCache: Record<string, Task[]>;
|
|
416
|
+
};
|
|
417
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { dailyHoursType, TimeZone, weekDaysType } from "../definitions";
|
|
2
|
+
declare function useCalendarDateState(date: Date, weekOffset: number | undefined, timeZone: TimeZone | undefined): {
|
|
3
|
+
weekDays: weekDaysType;
|
|
4
|
+
dailyHours: dailyHoursType;
|
|
5
|
+
};
|
|
6
|
+
export default useCalendarDateState;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Task, TaskFeildsType } from "../definitions";
|
|
2
|
+
export declare function useCalendarTask(hashScope: "week" | "group" | "day", timeZone?: string): {
|
|
3
|
+
tasks: {
|
|
4
|
+
buckets: Record<string, import("../definitions").TaskBucket>;
|
|
5
|
+
dataLength: number;
|
|
6
|
+
taskCache: Record<string, Task[]>;
|
|
7
|
+
};
|
|
8
|
+
addTask: (task: Task) => void;
|
|
9
|
+
getTasks: (hash: string) => Task[];
|
|
10
|
+
updateTask: (hash: string, taskId: string, updatedTask: Partial<Task>) => void;
|
|
11
|
+
deleteTask: (hash: string, taskId: string) => void;
|
|
12
|
+
cleanExpiredTasks: () => void;
|
|
13
|
+
cleanExpiredTasksByHash: (hash: string) => void;
|
|
14
|
+
isValidTask: (task: Task) => boolean;
|
|
15
|
+
getTask: (hash: string, taskId: string) => TaskFeildsType | undefined;
|
|
16
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TasksType } from "../definitions";
|
|
2
|
+
export declare const useData: (sliceIndex: number, itemsByLine: number, windowLines: number, tasks: TasksType, bottomBufferSize: number, topBufferSize: number) => {
|
|
3
|
+
visibleTasks: import("../definitions").TaskFeildsType[];
|
|
4
|
+
};
|