@tlmgo/tui-calendar 2.2.0 → 2.2.2
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 +183 -183
- package/dist/toastui-calendar.css +1117 -1117
- package/dist/toastui-calendar.ie11.js +1074 -1074
- package/dist/toastui-calendar.ie11.min.js +1 -1
- package/dist/toastui-calendar.js +1074 -1074
- package/dist/toastui-calendar.min.css +1 -1
- package/dist/toastui-calendar.min.js +1 -1
- package/dist/toastui-calendar.mjs +1 -1
- package/package.json +108 -108
- package/types/factory/calendar.d.ts +14 -14
- package/types/factory/calendarCore.d.ts +504 -504
- package/types/factory/day.d.ts +7 -7
- package/types/factory/month.d.ts +11 -11
- package/types/factory/week.d.ts +7 -7
- package/types/index.d.ts +11 -11
- package/types/time/date.d.ts +206 -206
- package/types/types/eventBus.d.ts +40 -40
- package/types/types/events.d.ts +141 -141
- package/types/types/options.d.ts +82 -82
- package/types/types/template.d.ts +97 -97
- package/types/types/theme.d.ts +140 -140
package/types/types/events.d.ts
CHANGED
|
@@ -1,141 +1,141 @@
|
|
|
1
|
-
import type { MarkOptional } from 'ts-essentials';
|
|
2
|
-
import type EventModel from "../model/eventModel";
|
|
3
|
-
import type EventUIModel from "../model/eventUIModel";
|
|
4
|
-
import type TZDate from "../time/date";
|
|
5
|
-
import type Collection from "../utils/collection";
|
|
6
|
-
import type { StyleProp } from "./components/common";
|
|
7
|
-
import type { CalendarInfo } from "./options";
|
|
8
|
-
export declare type Matrix<T> = T[][];
|
|
9
|
-
export declare type Matrix3d<T> = Matrix<T>[];
|
|
10
|
-
export declare type CollisionGroup = Matrix<number>;
|
|
11
|
-
export declare type DayGridEventMatrix = Matrix3d<EventUIModel>;
|
|
12
|
-
export declare type TimeGridEventMatrix = Record<string, Matrix3d<EventUIModel>>;
|
|
13
|
-
export declare type EventModelMap = {
|
|
14
|
-
milestone: EventUIModel[];
|
|
15
|
-
allday: EventUIModel[];
|
|
16
|
-
task: EventUIModel[];
|
|
17
|
-
time: EventUIModel[];
|
|
18
|
-
};
|
|
19
|
-
export declare type EventGroupMap = Record<keyof EventModelMap, DayGridEventMatrix | TimeGridEventMatrix>;
|
|
20
|
-
export declare type DateType = Date | string | number | TZDate;
|
|
21
|
-
export declare type IDS_OF_DAY = Record<string, number[]>;
|
|
22
|
-
export interface CalendarData {
|
|
23
|
-
calendars: CalendarInfo[];
|
|
24
|
-
events: Collection<EventModel>;
|
|
25
|
-
idsOfDay: IDS_OF_DAY;
|
|
26
|
-
}
|
|
27
|
-
export declare type EventCategory = 'milestone' | 'task' | 'allday' | 'time';
|
|
28
|
-
export declare type EventState = 'Busy' | 'Free';
|
|
29
|
-
export declare type EventObjectWithDefaultValues = MarkOptional<Required<EventObject>, 'color' | 'borderColor' | 'backgroundColor' | 'dragBackgroundColor'> & {
|
|
30
|
-
start: TZDate;
|
|
31
|
-
end: TZDate;
|
|
32
|
-
__cid: number;
|
|
33
|
-
};
|
|
34
|
-
export interface EventObject {
|
|
35
|
-
/**
|
|
36
|
-
* `Optional` unique id for various use
|
|
37
|
-
*/
|
|
38
|
-
id?: string;
|
|
39
|
-
/**
|
|
40
|
-
* Calendar ID
|
|
41
|
-
*/
|
|
42
|
-
calendarId?: string;
|
|
43
|
-
/**
|
|
44
|
-
* Title for the event
|
|
45
|
-
*/
|
|
46
|
-
title?: string;
|
|
47
|
-
/**
|
|
48
|
-
* Body for the event
|
|
49
|
-
*/
|
|
50
|
-
body?: string;
|
|
51
|
-
/**
|
|
52
|
-
* Determine if the event is an all-day event
|
|
53
|
-
*/
|
|
54
|
-
isAllday?: boolean;
|
|
55
|
-
/**
|
|
56
|
-
* When the event starts
|
|
57
|
-
*/
|
|
58
|
-
start?: DateType;
|
|
59
|
-
/**
|
|
60
|
-
* When the event ends
|
|
61
|
-
*/
|
|
62
|
-
end?: DateType;
|
|
63
|
-
/**
|
|
64
|
-
* Travel time which is taken to go
|
|
65
|
-
*/
|
|
66
|
-
goingDuration?: number;
|
|
67
|
-
/**
|
|
68
|
-
* Travel time which is taken to come back
|
|
69
|
-
*/
|
|
70
|
-
comingDuration?: number;
|
|
71
|
-
/**
|
|
72
|
-
* Location of the event
|
|
73
|
-
*/
|
|
74
|
-
location?: string;
|
|
75
|
-
/**
|
|
76
|
-
* Attendees of the event
|
|
77
|
-
*/
|
|
78
|
-
attendees?: string[];
|
|
79
|
-
/**
|
|
80
|
-
* Category of the event (milestone, task, allday, time)
|
|
81
|
-
*/
|
|
82
|
-
category?: EventCategory;
|
|
83
|
-
/**
|
|
84
|
-
* Classification of work events (before work, before lunch, before work)
|
|
85
|
-
*/
|
|
86
|
-
dueDateClass?: string;
|
|
87
|
-
/**
|
|
88
|
-
* Recurrence rule of the event
|
|
89
|
-
*/
|
|
90
|
-
recurrenceRule?: string;
|
|
91
|
-
/**
|
|
92
|
-
* State of the event. The default is 'Busy'
|
|
93
|
-
*/
|
|
94
|
-
state?: EventState;
|
|
95
|
-
/**
|
|
96
|
-
* Determine whether the event is shown or hidden
|
|
97
|
-
*/
|
|
98
|
-
isVisible?: boolean;
|
|
99
|
-
/**
|
|
100
|
-
* Determine whether something is in progress
|
|
101
|
-
*/
|
|
102
|
-
isPending?: boolean;
|
|
103
|
-
/**
|
|
104
|
-
* Determine whether the event is focused
|
|
105
|
-
*/
|
|
106
|
-
isFocused?: boolean;
|
|
107
|
-
/**
|
|
108
|
-
* Determine whether the event is read-only
|
|
109
|
-
*/
|
|
110
|
-
isReadOnly?: boolean;
|
|
111
|
-
/**
|
|
112
|
-
* Determine whether the event is private
|
|
113
|
-
*/
|
|
114
|
-
isPrivate?: boolean;
|
|
115
|
-
/**
|
|
116
|
-
* Text color of the event element
|
|
117
|
-
*/
|
|
118
|
-
color?: string;
|
|
119
|
-
/**
|
|
120
|
-
* Background color of the event element
|
|
121
|
-
*/
|
|
122
|
-
backgroundColor?: string;
|
|
123
|
-
/**
|
|
124
|
-
* Background color of the dragging event element
|
|
125
|
-
*/
|
|
126
|
-
dragBackgroundColor?: string;
|
|
127
|
-
/**
|
|
128
|
-
* Left border color of the event element
|
|
129
|
-
*/
|
|
130
|
-
borderColor?: string;
|
|
131
|
-
/**
|
|
132
|
-
* Custom style for the event element
|
|
133
|
-
*/
|
|
134
|
-
customStyle?: StyleProp;
|
|
135
|
-
/**
|
|
136
|
-
* Raw data for the event
|
|
137
|
-
*/
|
|
138
|
-
raw?: any;
|
|
139
|
-
}
|
|
140
|
-
export declare type BooleanKeyOfEventObject = 'isPrivate' | 'isAllday' | 'isPending' | 'isFocused' | 'isVisible' | 'isReadOnly';
|
|
141
|
-
export declare type TimeUnit = 'second' | 'minute' | 'hour' | 'date' | 'month' | 'year';
|
|
1
|
+
import type { MarkOptional } from 'ts-essentials';
|
|
2
|
+
import type EventModel from "../model/eventModel";
|
|
3
|
+
import type EventUIModel from "../model/eventUIModel";
|
|
4
|
+
import type TZDate from "../time/date";
|
|
5
|
+
import type Collection from "../utils/collection";
|
|
6
|
+
import type { StyleProp } from "./components/common";
|
|
7
|
+
import type { CalendarInfo } from "./options";
|
|
8
|
+
export declare type Matrix<T> = T[][];
|
|
9
|
+
export declare type Matrix3d<T> = Matrix<T>[];
|
|
10
|
+
export declare type CollisionGroup = Matrix<number>;
|
|
11
|
+
export declare type DayGridEventMatrix = Matrix3d<EventUIModel>;
|
|
12
|
+
export declare type TimeGridEventMatrix = Record<string, Matrix3d<EventUIModel>>;
|
|
13
|
+
export declare type EventModelMap = {
|
|
14
|
+
milestone: EventUIModel[];
|
|
15
|
+
allday: EventUIModel[];
|
|
16
|
+
task: EventUIModel[];
|
|
17
|
+
time: EventUIModel[];
|
|
18
|
+
};
|
|
19
|
+
export declare type EventGroupMap = Record<keyof EventModelMap, DayGridEventMatrix | TimeGridEventMatrix>;
|
|
20
|
+
export declare type DateType = Date | string | number | TZDate;
|
|
21
|
+
export declare type IDS_OF_DAY = Record<string, number[]>;
|
|
22
|
+
export interface CalendarData {
|
|
23
|
+
calendars: CalendarInfo[];
|
|
24
|
+
events: Collection<EventModel>;
|
|
25
|
+
idsOfDay: IDS_OF_DAY;
|
|
26
|
+
}
|
|
27
|
+
export declare type EventCategory = 'milestone' | 'task' | 'allday' | 'time';
|
|
28
|
+
export declare type EventState = 'Busy' | 'Free';
|
|
29
|
+
export declare type EventObjectWithDefaultValues = MarkOptional<Required<EventObject>, 'color' | 'borderColor' | 'backgroundColor' | 'dragBackgroundColor'> & {
|
|
30
|
+
start: TZDate;
|
|
31
|
+
end: TZDate;
|
|
32
|
+
__cid: number;
|
|
33
|
+
};
|
|
34
|
+
export interface EventObject {
|
|
35
|
+
/**
|
|
36
|
+
* `Optional` unique id for various use
|
|
37
|
+
*/
|
|
38
|
+
id?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Calendar ID
|
|
41
|
+
*/
|
|
42
|
+
calendarId?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Title for the event
|
|
45
|
+
*/
|
|
46
|
+
title?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Body for the event
|
|
49
|
+
*/
|
|
50
|
+
body?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Determine if the event is an all-day event
|
|
53
|
+
*/
|
|
54
|
+
isAllday?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* When the event starts
|
|
57
|
+
*/
|
|
58
|
+
start?: DateType;
|
|
59
|
+
/**
|
|
60
|
+
* When the event ends
|
|
61
|
+
*/
|
|
62
|
+
end?: DateType;
|
|
63
|
+
/**
|
|
64
|
+
* Travel time which is taken to go
|
|
65
|
+
*/
|
|
66
|
+
goingDuration?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Travel time which is taken to come back
|
|
69
|
+
*/
|
|
70
|
+
comingDuration?: number;
|
|
71
|
+
/**
|
|
72
|
+
* Location of the event
|
|
73
|
+
*/
|
|
74
|
+
location?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Attendees of the event
|
|
77
|
+
*/
|
|
78
|
+
attendees?: string[];
|
|
79
|
+
/**
|
|
80
|
+
* Category of the event (milestone, task, allday, time)
|
|
81
|
+
*/
|
|
82
|
+
category?: EventCategory;
|
|
83
|
+
/**
|
|
84
|
+
* Classification of work events (before work, before lunch, before work)
|
|
85
|
+
*/
|
|
86
|
+
dueDateClass?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Recurrence rule of the event
|
|
89
|
+
*/
|
|
90
|
+
recurrenceRule?: string;
|
|
91
|
+
/**
|
|
92
|
+
* State of the event. The default is 'Busy'
|
|
93
|
+
*/
|
|
94
|
+
state?: EventState;
|
|
95
|
+
/**
|
|
96
|
+
* Determine whether the event is shown or hidden
|
|
97
|
+
*/
|
|
98
|
+
isVisible?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Determine whether something is in progress
|
|
101
|
+
*/
|
|
102
|
+
isPending?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Determine whether the event is focused
|
|
105
|
+
*/
|
|
106
|
+
isFocused?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Determine whether the event is read-only
|
|
109
|
+
*/
|
|
110
|
+
isReadOnly?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Determine whether the event is private
|
|
113
|
+
*/
|
|
114
|
+
isPrivate?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Text color of the event element
|
|
117
|
+
*/
|
|
118
|
+
color?: string;
|
|
119
|
+
/**
|
|
120
|
+
* Background color of the event element
|
|
121
|
+
*/
|
|
122
|
+
backgroundColor?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Background color of the dragging event element
|
|
125
|
+
*/
|
|
126
|
+
dragBackgroundColor?: string;
|
|
127
|
+
/**
|
|
128
|
+
* Left border color of the event element
|
|
129
|
+
*/
|
|
130
|
+
borderColor?: string;
|
|
131
|
+
/**
|
|
132
|
+
* Custom style for the event element
|
|
133
|
+
*/
|
|
134
|
+
customStyle?: StyleProp;
|
|
135
|
+
/**
|
|
136
|
+
* Raw data for the event
|
|
137
|
+
*/
|
|
138
|
+
raw?: any;
|
|
139
|
+
}
|
|
140
|
+
export declare type BooleanKeyOfEventObject = 'isPrivate' | 'isAllday' | 'isPending' | 'isFocused' | 'isVisible' | 'isReadOnly';
|
|
141
|
+
export declare type TimeUnit = 'second' | 'minute' | 'hour' | 'date' | 'month' | 'year';
|
package/types/types/options.d.ts
CHANGED
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
import type { ComponentType } from 'preact';
|
|
2
|
-
import type { DeepPartial } from 'ts-essentials';
|
|
3
|
-
import type { EventObject, EventObjectWithDefaultValues } from "./events";
|
|
4
|
-
import type { TemplateConfig } from "./template";
|
|
5
|
-
import type { ThemeState } from "./theme";
|
|
6
|
-
export declare type EventView = 'allday' | 'time';
|
|
7
|
-
export declare type TaskView = 'milestone' | 'task';
|
|
8
|
-
export interface CollapseDuplicateEventsOptions {
|
|
9
|
-
getDuplicateEvents: (targetEvent: EventObjectWithDefaultValues, events: EventObjectWithDefaultValues[]) => EventObjectWithDefaultValues[];
|
|
10
|
-
getMainEvent: (events: EventObjectWithDefaultValues[]) => EventObjectWithDefaultValues;
|
|
11
|
-
}
|
|
12
|
-
export interface WeekOptions {
|
|
13
|
-
startDayOfWeek?: number;
|
|
14
|
-
dayNames?: [string, string, string, string, string, string, string] | [];
|
|
15
|
-
narrowWeekend?: boolean;
|
|
16
|
-
workweek?: boolean;
|
|
17
|
-
showNowIndicator?: boolean;
|
|
18
|
-
showTimezoneCollapseButton?: boolean;
|
|
19
|
-
timezonesCollapsed?: boolean;
|
|
20
|
-
hourStart?: number;
|
|
21
|
-
hourEnd?: number;
|
|
22
|
-
eventView?: boolean | EventView[];
|
|
23
|
-
taskView?: boolean | TaskView[];
|
|
24
|
-
collapseDuplicateEvents?: boolean | Partial<CollapseDuplicateEventsOptions>;
|
|
25
|
-
}
|
|
26
|
-
export interface MonthOptions {
|
|
27
|
-
dayNames?: [string, string, string, string, string, string, string] | [];
|
|
28
|
-
startDayOfWeek?: number;
|
|
29
|
-
narrowWeekend?: boolean;
|
|
30
|
-
visibleWeeksCount?: number;
|
|
31
|
-
isAlways6Weeks?: boolean;
|
|
32
|
-
workweek?: boolean;
|
|
33
|
-
visibleEventCount?: number;
|
|
34
|
-
}
|
|
35
|
-
export interface GridSelectionOptions {
|
|
36
|
-
enableDblClick?: boolean;
|
|
37
|
-
enableClick?: boolean;
|
|
38
|
-
}
|
|
39
|
-
export interface TimezoneConfig {
|
|
40
|
-
timezoneName: string;
|
|
41
|
-
displayLabel?: string;
|
|
42
|
-
tooltip?: string;
|
|
43
|
-
}
|
|
44
|
-
export interface TimezoneOptions {
|
|
45
|
-
zones?: TimezoneConfig[];
|
|
46
|
-
customOffsetCalculator?: (timezoneName: string, timestamp: number) => number;
|
|
47
|
-
}
|
|
48
|
-
export interface CalendarColor {
|
|
49
|
-
color?: string;
|
|
50
|
-
backgroundColor?: string;
|
|
51
|
-
dragBackgroundColor?: string;
|
|
52
|
-
borderColor?: string;
|
|
53
|
-
}
|
|
54
|
-
export interface CalendarInfo extends CalendarColor {
|
|
55
|
-
id: string;
|
|
56
|
-
name: string;
|
|
57
|
-
}
|
|
58
|
-
export declare type ViewType = 'month' | 'week' | 'day';
|
|
59
|
-
export interface Options {
|
|
60
|
-
defaultView?: ViewType;
|
|
61
|
-
theme?: DeepPartial<ThemeState>;
|
|
62
|
-
template?: TemplateConfig;
|
|
63
|
-
week?: WeekOptions;
|
|
64
|
-
month?: MonthOptions;
|
|
65
|
-
calendars?: CalendarInfo[];
|
|
66
|
-
useFormPopup?: boolean;
|
|
67
|
-
useDetailPopup?: boolean;
|
|
68
|
-
gridSelection?: boolean | GridSelectionOptions;
|
|
69
|
-
isReadOnly?: boolean;
|
|
70
|
-
usageStatistics?: boolean;
|
|
71
|
-
eventFilter?: (event: EventObject) => boolean;
|
|
72
|
-
timezone?: TimezoneOptions;
|
|
73
|
-
}
|
|
74
|
-
export interface ViewInfoUserInput {
|
|
75
|
-
component: ComponentType<any>;
|
|
76
|
-
router?: {
|
|
77
|
-
linkTitle: string;
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
export declare type ViewListMap = {
|
|
81
|
-
[key: string]: ViewInfoUserInput;
|
|
82
|
-
};
|
|
1
|
+
import type { ComponentType } from 'preact';
|
|
2
|
+
import type { DeepPartial } from 'ts-essentials';
|
|
3
|
+
import type { EventObject, EventObjectWithDefaultValues } from "./events";
|
|
4
|
+
import type { TemplateConfig } from "./template";
|
|
5
|
+
import type { ThemeState } from "./theme";
|
|
6
|
+
export declare type EventView = 'allday' | 'time';
|
|
7
|
+
export declare type TaskView = 'milestone' | 'task';
|
|
8
|
+
export interface CollapseDuplicateEventsOptions {
|
|
9
|
+
getDuplicateEvents: (targetEvent: EventObjectWithDefaultValues, events: EventObjectWithDefaultValues[]) => EventObjectWithDefaultValues[];
|
|
10
|
+
getMainEvent: (events: EventObjectWithDefaultValues[]) => EventObjectWithDefaultValues;
|
|
11
|
+
}
|
|
12
|
+
export interface WeekOptions {
|
|
13
|
+
startDayOfWeek?: number;
|
|
14
|
+
dayNames?: [string, string, string, string, string, string, string] | [];
|
|
15
|
+
narrowWeekend?: boolean;
|
|
16
|
+
workweek?: boolean;
|
|
17
|
+
showNowIndicator?: boolean;
|
|
18
|
+
showTimezoneCollapseButton?: boolean;
|
|
19
|
+
timezonesCollapsed?: boolean;
|
|
20
|
+
hourStart?: number;
|
|
21
|
+
hourEnd?: number;
|
|
22
|
+
eventView?: boolean | EventView[];
|
|
23
|
+
taskView?: boolean | TaskView[];
|
|
24
|
+
collapseDuplicateEvents?: boolean | Partial<CollapseDuplicateEventsOptions>;
|
|
25
|
+
}
|
|
26
|
+
export interface MonthOptions {
|
|
27
|
+
dayNames?: [string, string, string, string, string, string, string] | [];
|
|
28
|
+
startDayOfWeek?: number;
|
|
29
|
+
narrowWeekend?: boolean;
|
|
30
|
+
visibleWeeksCount?: number;
|
|
31
|
+
isAlways6Weeks?: boolean;
|
|
32
|
+
workweek?: boolean;
|
|
33
|
+
visibleEventCount?: number;
|
|
34
|
+
}
|
|
35
|
+
export interface GridSelectionOptions {
|
|
36
|
+
enableDblClick?: boolean;
|
|
37
|
+
enableClick?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface TimezoneConfig {
|
|
40
|
+
timezoneName: string;
|
|
41
|
+
displayLabel?: string;
|
|
42
|
+
tooltip?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface TimezoneOptions {
|
|
45
|
+
zones?: TimezoneConfig[];
|
|
46
|
+
customOffsetCalculator?: (timezoneName: string, timestamp: number) => number;
|
|
47
|
+
}
|
|
48
|
+
export interface CalendarColor {
|
|
49
|
+
color?: string;
|
|
50
|
+
backgroundColor?: string;
|
|
51
|
+
dragBackgroundColor?: string;
|
|
52
|
+
borderColor?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface CalendarInfo extends CalendarColor {
|
|
55
|
+
id: string;
|
|
56
|
+
name: string;
|
|
57
|
+
}
|
|
58
|
+
export declare type ViewType = 'month' | 'week' | 'day';
|
|
59
|
+
export interface Options {
|
|
60
|
+
defaultView?: ViewType;
|
|
61
|
+
theme?: DeepPartial<ThemeState>;
|
|
62
|
+
template?: TemplateConfig;
|
|
63
|
+
week?: WeekOptions;
|
|
64
|
+
month?: MonthOptions;
|
|
65
|
+
calendars?: CalendarInfo[];
|
|
66
|
+
useFormPopup?: boolean;
|
|
67
|
+
useDetailPopup?: boolean;
|
|
68
|
+
gridSelection?: boolean | GridSelectionOptions;
|
|
69
|
+
isReadOnly?: boolean;
|
|
70
|
+
usageStatistics?: boolean;
|
|
71
|
+
eventFilter?: (event: EventObject) => boolean;
|
|
72
|
+
timezone?: TimezoneOptions;
|
|
73
|
+
}
|
|
74
|
+
export interface ViewInfoUserInput {
|
|
75
|
+
component: ComponentType<any>;
|
|
76
|
+
router?: {
|
|
77
|
+
linkTitle: string;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
export declare type ViewListMap = {
|
|
81
|
+
[key: string]: ViewInfoUserInput;
|
|
82
|
+
};
|
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
import type { VNode } from 'preact';
|
|
2
|
-
import type TZDate from "../time/date";
|
|
3
|
-
import type { EventObjectWithDefaultValues, TimeUnit } from "./events";
|
|
4
|
-
export interface TemplateTimeGridHourLabel {
|
|
5
|
-
hidden: boolean;
|
|
6
|
-
hour: number;
|
|
7
|
-
minutes: number;
|
|
8
|
-
}
|
|
9
|
-
export interface TemplateNow {
|
|
10
|
-
unit: TimeUnit;
|
|
11
|
-
time: TZDate;
|
|
12
|
-
format: string;
|
|
13
|
-
}
|
|
14
|
-
export interface TemplateMonthGrid {
|
|
15
|
-
date: string;
|
|
16
|
-
day: number;
|
|
17
|
-
hiddenEventCount: number;
|
|
18
|
-
isOtherMonth: boolean;
|
|
19
|
-
isToday: boolean;
|
|
20
|
-
month: number;
|
|
21
|
-
ymd: string;
|
|
22
|
-
}
|
|
23
|
-
export interface TemplateMoreTitleDate {
|
|
24
|
-
ymd: string;
|
|
25
|
-
date: number;
|
|
26
|
-
day: number;
|
|
27
|
-
}
|
|
28
|
-
export interface TemplateWeekDayName {
|
|
29
|
-
date: number;
|
|
30
|
-
day: number;
|
|
31
|
-
dayName: string;
|
|
32
|
-
isToday: boolean;
|
|
33
|
-
renderDate: string;
|
|
34
|
-
dateInstance: TZDate;
|
|
35
|
-
}
|
|
36
|
-
export interface TemplateMonthDayName {
|
|
37
|
-
day: number;
|
|
38
|
-
label: string;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* If display label does not exist in the timezone options,
|
|
42
|
-
* timezone offset based on timezone name will be passed
|
|
43
|
-
*/
|
|
44
|
-
export declare type TemplateTimezone = {
|
|
45
|
-
displayLabel: string;
|
|
46
|
-
timezoneOffset: null;
|
|
47
|
-
} | {
|
|
48
|
-
displayLabel: null;
|
|
49
|
-
timezoneOffset: number;
|
|
50
|
-
};
|
|
51
|
-
export declare type TemplateReturnType = string | VNode<{
|
|
52
|
-
className: string;
|
|
53
|
-
}>;
|
|
54
|
-
export interface Template {
|
|
55
|
-
milestoneTitle: () => TemplateReturnType;
|
|
56
|
-
milestone: (event: EventObjectWithDefaultValues) => TemplateReturnType;
|
|
57
|
-
taskTitle: () => TemplateReturnType;
|
|
58
|
-
task: (event: EventObjectWithDefaultValues) => TemplateReturnType;
|
|
59
|
-
alldayTitle: () => TemplateReturnType;
|
|
60
|
-
allday: (event: EventObjectWithDefaultValues) => TemplateReturnType;
|
|
61
|
-
time: (event: EventObjectWithDefaultValues) => TemplateReturnType;
|
|
62
|
-
goingDuration: (event: EventObjectWithDefaultValues) => TemplateReturnType;
|
|
63
|
-
comingDuration: (event: EventObjectWithDefaultValues) => TemplateReturnType;
|
|
64
|
-
monthMoreTitleDate: (moreTitle: TemplateMoreTitleDate) => TemplateReturnType;
|
|
65
|
-
monthMoreClose: () => TemplateReturnType;
|
|
66
|
-
monthGridHeader: (cellData: TemplateMonthGrid) => TemplateReturnType;
|
|
67
|
-
monthGridHeaderExceed: (hiddenEventsCount: number) => TemplateReturnType;
|
|
68
|
-
monthGridFooter: (cellData: TemplateMonthGrid) => TemplateReturnType;
|
|
69
|
-
monthGridFooterExceed: (hiddenEventsCount: number) => TemplateReturnType;
|
|
70
|
-
monthDayName: (monthDayNameData: TemplateMonthDayName) => TemplateReturnType;
|
|
71
|
-
weekDayName: (weekDayNameData: TemplateWeekDayName) => TemplateReturnType;
|
|
72
|
-
weekGridFooterExceed: (hiddenEventsCount: number) => TemplateReturnType;
|
|
73
|
-
collapseBtnTitle: () => TemplateReturnType;
|
|
74
|
-
timezoneDisplayLabel: (props: TemplateTimezone) => TemplateReturnType;
|
|
75
|
-
timegridDisplayPrimaryTime: (props: TemplateNow) => TemplateReturnType;
|
|
76
|
-
timegridDisplayTime: (props: TemplateNow) => TemplateReturnType;
|
|
77
|
-
timegridNowIndicatorLabel: (props: TemplateNow) => TemplateReturnType;
|
|
78
|
-
popupIsAllday: () => TemplateReturnType;
|
|
79
|
-
popupStateFree: () => TemplateReturnType;
|
|
80
|
-
popupStateBusy: () => TemplateReturnType;
|
|
81
|
-
titlePlaceholder: () => TemplateReturnType;
|
|
82
|
-
locationPlaceholder: () => TemplateReturnType;
|
|
83
|
-
startDatePlaceholder: () => TemplateReturnType;
|
|
84
|
-
endDatePlaceholder: () => TemplateReturnType;
|
|
85
|
-
popupSave: () => TemplateReturnType;
|
|
86
|
-
popupUpdate: () => TemplateReturnType;
|
|
87
|
-
popupDetailTitle: (event: EventObjectWithDefaultValues) => TemplateReturnType;
|
|
88
|
-
popupDetailDate: (event: EventObjectWithDefaultValues) => TemplateReturnType;
|
|
89
|
-
popupDetailLocation: (event: EventObjectWithDefaultValues) => TemplateReturnType;
|
|
90
|
-
popupDetailAttendees: (event: EventObjectWithDefaultValues) => TemplateReturnType;
|
|
91
|
-
popupDetailState: (event: EventObjectWithDefaultValues) => TemplateReturnType;
|
|
92
|
-
popupDetailRecurrenceRule: (event: EventObjectWithDefaultValues) => TemplateReturnType;
|
|
93
|
-
popupDetailBody: (event: EventObjectWithDefaultValues) => TemplateReturnType;
|
|
94
|
-
popupEdit: () => TemplateReturnType;
|
|
95
|
-
popupDelete: () => TemplateReturnType;
|
|
96
|
-
}
|
|
97
|
-
export declare type TemplateConfig = Partial<Template>;
|
|
1
|
+
import type { VNode } from 'preact';
|
|
2
|
+
import type TZDate from "../time/date";
|
|
3
|
+
import type { EventObjectWithDefaultValues, TimeUnit } from "./events";
|
|
4
|
+
export interface TemplateTimeGridHourLabel {
|
|
5
|
+
hidden: boolean;
|
|
6
|
+
hour: number;
|
|
7
|
+
minutes: number;
|
|
8
|
+
}
|
|
9
|
+
export interface TemplateNow {
|
|
10
|
+
unit: TimeUnit;
|
|
11
|
+
time: TZDate;
|
|
12
|
+
format: string;
|
|
13
|
+
}
|
|
14
|
+
export interface TemplateMonthGrid {
|
|
15
|
+
date: string;
|
|
16
|
+
day: number;
|
|
17
|
+
hiddenEventCount: number;
|
|
18
|
+
isOtherMonth: boolean;
|
|
19
|
+
isToday: boolean;
|
|
20
|
+
month: number;
|
|
21
|
+
ymd: string;
|
|
22
|
+
}
|
|
23
|
+
export interface TemplateMoreTitleDate {
|
|
24
|
+
ymd: string;
|
|
25
|
+
date: number;
|
|
26
|
+
day: number;
|
|
27
|
+
}
|
|
28
|
+
export interface TemplateWeekDayName {
|
|
29
|
+
date: number;
|
|
30
|
+
day: number;
|
|
31
|
+
dayName: string;
|
|
32
|
+
isToday: boolean;
|
|
33
|
+
renderDate: string;
|
|
34
|
+
dateInstance: TZDate;
|
|
35
|
+
}
|
|
36
|
+
export interface TemplateMonthDayName {
|
|
37
|
+
day: number;
|
|
38
|
+
label: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* If display label does not exist in the timezone options,
|
|
42
|
+
* timezone offset based on timezone name will be passed
|
|
43
|
+
*/
|
|
44
|
+
export declare type TemplateTimezone = {
|
|
45
|
+
displayLabel: string;
|
|
46
|
+
timezoneOffset: null;
|
|
47
|
+
} | {
|
|
48
|
+
displayLabel: null;
|
|
49
|
+
timezoneOffset: number;
|
|
50
|
+
};
|
|
51
|
+
export declare type TemplateReturnType = string | VNode<{
|
|
52
|
+
className: string;
|
|
53
|
+
}>;
|
|
54
|
+
export interface Template {
|
|
55
|
+
milestoneTitle: () => TemplateReturnType;
|
|
56
|
+
milestone: (event: EventObjectWithDefaultValues) => TemplateReturnType;
|
|
57
|
+
taskTitle: () => TemplateReturnType;
|
|
58
|
+
task: (event: EventObjectWithDefaultValues) => TemplateReturnType;
|
|
59
|
+
alldayTitle: () => TemplateReturnType;
|
|
60
|
+
allday: (event: EventObjectWithDefaultValues) => TemplateReturnType;
|
|
61
|
+
time: (event: EventObjectWithDefaultValues) => TemplateReturnType;
|
|
62
|
+
goingDuration: (event: EventObjectWithDefaultValues) => TemplateReturnType;
|
|
63
|
+
comingDuration: (event: EventObjectWithDefaultValues) => TemplateReturnType;
|
|
64
|
+
monthMoreTitleDate: (moreTitle: TemplateMoreTitleDate) => TemplateReturnType;
|
|
65
|
+
monthMoreClose: () => TemplateReturnType;
|
|
66
|
+
monthGridHeader: (cellData: TemplateMonthGrid) => TemplateReturnType;
|
|
67
|
+
monthGridHeaderExceed: (hiddenEventsCount: number) => TemplateReturnType;
|
|
68
|
+
monthGridFooter: (cellData: TemplateMonthGrid) => TemplateReturnType;
|
|
69
|
+
monthGridFooterExceed: (hiddenEventsCount: number) => TemplateReturnType;
|
|
70
|
+
monthDayName: (monthDayNameData: TemplateMonthDayName) => TemplateReturnType;
|
|
71
|
+
weekDayName: (weekDayNameData: TemplateWeekDayName) => TemplateReturnType;
|
|
72
|
+
weekGridFooterExceed: (hiddenEventsCount: number) => TemplateReturnType;
|
|
73
|
+
collapseBtnTitle: () => TemplateReturnType;
|
|
74
|
+
timezoneDisplayLabel: (props: TemplateTimezone) => TemplateReturnType;
|
|
75
|
+
timegridDisplayPrimaryTime: (props: TemplateNow) => TemplateReturnType;
|
|
76
|
+
timegridDisplayTime: (props: TemplateNow) => TemplateReturnType;
|
|
77
|
+
timegridNowIndicatorLabel: (props: TemplateNow) => TemplateReturnType;
|
|
78
|
+
popupIsAllday: () => TemplateReturnType;
|
|
79
|
+
popupStateFree: () => TemplateReturnType;
|
|
80
|
+
popupStateBusy: () => TemplateReturnType;
|
|
81
|
+
titlePlaceholder: () => TemplateReturnType;
|
|
82
|
+
locationPlaceholder: () => TemplateReturnType;
|
|
83
|
+
startDatePlaceholder: () => TemplateReturnType;
|
|
84
|
+
endDatePlaceholder: () => TemplateReturnType;
|
|
85
|
+
popupSave: () => TemplateReturnType;
|
|
86
|
+
popupUpdate: () => TemplateReturnType;
|
|
87
|
+
popupDetailTitle: (event: EventObjectWithDefaultValues) => TemplateReturnType;
|
|
88
|
+
popupDetailDate: (event: EventObjectWithDefaultValues) => TemplateReturnType;
|
|
89
|
+
popupDetailLocation: (event: EventObjectWithDefaultValues) => TemplateReturnType;
|
|
90
|
+
popupDetailAttendees: (event: EventObjectWithDefaultValues) => TemplateReturnType;
|
|
91
|
+
popupDetailState: (event: EventObjectWithDefaultValues) => TemplateReturnType;
|
|
92
|
+
popupDetailRecurrenceRule: (event: EventObjectWithDefaultValues) => TemplateReturnType;
|
|
93
|
+
popupDetailBody: (event: EventObjectWithDefaultValues) => TemplateReturnType;
|
|
94
|
+
popupEdit: () => TemplateReturnType;
|
|
95
|
+
popupDelete: () => TemplateReturnType;
|
|
96
|
+
}
|
|
97
|
+
export declare type TemplateConfig = Partial<Template>;
|