forked from DefinitelyTyped/DefinitelyTyped
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
176 lines (161 loc) · 5.43 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
import * as angular from "angular";
import * as moment from "moment";
declare module "angular" {
export namespace bootstrap.calendar {
interface IEventAction {
/**
* The label of the action
*/
label: string;
/**
* CSS class to be added to the action element
*/
cssClass?: string | undefined;
/**
* The action that occurs when it's clicked
* @param args - the IEvent whose action was clicked
*/
onClick: (args: any) => void;
}
interface IEventColor {
/**
* The primary color of the event, should be darker than secondary
*/
primary: string;
/**
* The secondary color of the event, should be lighter than primary
*/
secondary: string;
}
interface IEvent {
/**
* The title of the event
*/
title: string;
/**
* The type of the event (determines its color). Can be important, warning, info, inverse, success or special
*/
type?: string | undefined;
/**
* A javascript date object for when the event starts
*/
startsAt: Date;
/**
* Optional - a javascript date object for when the event ends
*/
endsAt?: Date | undefined;
/**
* Color of the Event
*/
color?: IEventColor | undefined;
/**
* Actions of the Event
*/
actions?: IEventAction[] | undefined;
/**
* If edit-event-html is set and this field is explicitly set to false then dont make it editable.
*/
editable?: boolean | undefined;
/**
* If delete-event-html is set and this field is explicitly set to false then dont make it deleteable
*/
deletable?: boolean | undefined;
/**
* Allow an event to be dragged and dropped
*/
draggable?: boolean | undefined;
/**
* Allow an event to be resizable
*/
resizable?: boolean | undefined;
/**
* If set to false then will not count towards the badge total amount on the month and year view
*/
incrementsBadgeTotal?: boolean | undefined;
/**
* If set the event will recur on the given period. Valid values are year or month
*/
recursOn?: string | undefined;
/**
* A CSS class (or more, just separate with spaces) that will be added to the event when it is displayed on each view. Useful for marking an event as selected / active etc
*/
cssClass?: string | undefined;
/**
* If set the event will display as all-day event
*/
allDay?: boolean | undefined;
}
interface ICalendarConfig {
allDateFormats: {
angular: IFormats;
moment: IFormats;
};
dateFormats: IDateFormats;
titleFormats: ITitleFormats;
dateFormatter: string;
displayEventEndTimes: boolean;
showTimesOnWeekView: boolean;
displayAllMonthEvents: boolean;
i18nStrings: { weekNumber: string };
templates: {
calendarDayView: string;
calendarHourList: string;
calendarMonthCell: string;
calendarMonthCellEvents: string;
calendarMonthView: string;
calendarSlideBox: string;
calendarWeekView: string;
calendarYearView: string;
};
}
interface IFormats {
date: IDateFormats;
title: ITitleFormats;
}
interface IDateFormats {
hour: string;
day: string;
month: string;
weekDay: string;
time: string;
datetime: string;
}
interface ITitleFormats {
day: string;
week: string;
month: string;
year: string;
}
interface ICalendarCell {
label: number;
date: moment.Moment;
inMonth: boolean;
isPast: boolean;
isToday: boolean;
isFuture: boolean;
isWeekend: boolean;
events: IEvent[];
badgeTotal: number;
}
namespace events {
interface IOnEventClick {
(calendarEvent: IEvent): void;
}
interface IOnEventTimesChanged {
(calendarEvent: IEvent, calendarNewEventStart: Date, calendarNewEventEnd: Date): void;
}
interface IOnEditEventClick {
(calendarEvent: IEvent): void;
}
interface IOnDeleteEventClick {
(calendarEvent: IEvent): void;
}
interface IOnTimespanClick {
(calendarDate: Date, calendarCell: ICalendarCell): void;
}
interface IOnViewChangeClick {
(calendarDate: Date, calendarNextView: string): boolean;
}
}
}
}