@mantine-vue/schedule 3.1.0 → 3.2.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/cjs/index.cjs +6101 -3638
- package/cjs/index.cjs.map +1 -1
- package/esm/index.mjs +6045 -3632
- package/esm/index.mjs.map +1 -1
- package/lib/component-props.d.ts +181 -214
- package/lib/components/CurrentTimeIndicator/CurrentTimeIndicator.d.ts +8 -114
- package/lib/components/CurrentTimeIndicator/CurrentTimeIndicator.types.d.ts +89 -0
- package/lib/components/CurrentTimeIndicator/CurrentTimeIndicator.vue.d.ts +20 -0
- package/lib/components/DayView/DayView.d.ts +10 -212
- package/lib/components/DayView/DayView.types.d.ts +65 -0
- package/lib/components/DayView/DayView.vue.d.ts +51 -0
- package/lib/components/DragContext/DragContext.d.ts +43 -5
- package/lib/components/MobileMonthView/MobileMonthView.d.ts +10 -171
- package/lib/components/MobileMonthView/MobileMonthView.types.d.ts +110 -0
- package/lib/components/MobileMonthView/MobileMonthView.vue.d.ts +44 -0
- package/lib/components/MonthView/MonthView.d.ts +10 -174
- package/lib/components/MonthView/MonthView.types.d.ts +125 -0
- package/lib/components/MonthView/MonthView.vue.d.ts +56 -0
- package/lib/components/MoreEvents/MoreEvents.d.ts +9 -65
- package/lib/components/MoreEvents/MoreEvents.types.d.ts +62 -0
- package/lib/components/MoreEvents/MoreEvents.vue.d.ts +23 -0
- package/lib/components/ResourcesDayView/ResourcesDayView.d.ts +10 -346
- package/lib/components/ResourcesDayView/ResourcesDayView.types.d.ts +308 -0
- package/lib/components/ResourcesDayView/ResourcesDayView.vue.d.ts +53 -0
- package/lib/components/ResourcesMonthView/ResourcesMonthView.d.ts +10 -279
- package/lib/components/ResourcesMonthView/ResourcesMonthView.types.d.ts +233 -0
- package/lib/components/ResourcesMonthView/ResourcesMonthView.vue.d.ts +52 -0
- package/lib/components/ResourcesMonthView/get-resources-month-view-layout/get-resources-month-view-layout.d.ts +54 -0
- package/lib/components/ResourcesMonthView/index.d.ts +1 -0
- package/lib/components/ResourcesSchedule/ResourcesSchedule.d.ts +9 -201
- package/lib/components/ResourcesSchedule/ResourcesSchedule.types.d.ts +159 -0
- package/lib/components/ResourcesSchedule/ResourcesSchedule.vue.d.ts +44 -0
- package/lib/components/ResourcesWeekView/ResourcesWeekView.d.ts +10 -412
- package/lib/components/ResourcesWeekView/ResourcesWeekView.types.d.ts +314 -0
- package/lib/components/ResourcesWeekView/ResourcesWeekView.vue.d.ts +58 -0
- package/lib/components/Schedule/Schedule.d.ts +9 -134
- package/lib/components/Schedule/Schedule.types.d.ts +153 -0
- package/lib/components/Schedule/Schedule.vue.d.ts +50 -0
- package/lib/components/ScheduleEvent/ScheduleEvent.d.ts +11 -88
- package/lib/components/ScheduleEvent/ScheduleEvent.types.d.ts +109 -0
- package/lib/components/ScheduleEvent/ScheduleEvent.vue.d.ts +24 -0
- package/lib/components/ScheduleHeader/HeaderControl/HeaderControl.d.ts +36 -0
- package/lib/components/ScheduleHeader/HeaderControl/HeaderControl.types.d.ts +44 -0
- package/lib/components/ScheduleHeader/HeaderControl/HeaderControl.vue.d.ts +14 -0
- package/lib/components/ScheduleHeader/HeaderControl/ScheduleHeaderNext.vue.d.ts +11 -0
- package/lib/components/ScheduleHeader/HeaderControl/ScheduleHeaderPrevious.vue.d.ts +11 -0
- package/lib/components/ScheduleHeader/HeaderControl/ScheduleHeaderToday.vue.d.ts +11 -0
- package/lib/components/ScheduleHeader/HeaderControl/index.d.ts +1 -2
- package/lib/components/ScheduleHeader/MonthYearSelect/MonthYearSelect.d.ts +8 -0
- package/lib/components/ScheduleHeader/MonthYearSelect/MonthYearSelect.types.d.ts +70 -0
- package/lib/components/ScheduleHeader/MonthYearSelect/MonthYearSelect.vue.d.ts +21 -0
- package/lib/components/ScheduleHeader/MonthYearSelect/index.d.ts +1 -2
- package/lib/components/ScheduleHeader/ScheduleHeader.context.d.ts +12 -0
- package/lib/components/ScheduleHeader/ScheduleHeader.d.ts +20 -364
- package/lib/components/ScheduleHeader/ScheduleHeader.types.d.ts +28 -0
- package/lib/components/ScheduleHeader/ScheduleHeader.vue.d.ts +11 -0
- package/lib/components/ScheduleHeader/ScheduleHeaderBase.d.ts +37 -75
- package/lib/components/ScheduleHeader/ScheduleHeaderBase.types.d.ts +54 -0
- package/lib/components/ScheduleHeader/ScheduleHeaderBase.vue.d.ts +21 -0
- package/lib/components/ScheduleHeader/ViewSelect/ViewSelect.d.ts +8 -0
- package/lib/components/ScheduleHeader/ViewSelect/ViewSelect.types.d.ts +39 -0
- package/lib/components/ScheduleHeader/ViewSelect/ViewSelect.vue.d.ts +16 -0
- package/lib/components/ScheduleHeader/ViewSelect/index.d.ts +1 -2
- package/lib/components/ScheduleHeader/index.d.ts +4 -0
- package/lib/components/WeekView/WeekView.d.ts +10 -294
- package/lib/components/WeekView/WeekView.types.d.ts +129 -0
- package/lib/components/WeekView/WeekView.vue.d.ts +60 -0
- package/lib/components/YearView/YearView.d.ts +9 -151
- package/lib/components/YearView/YearView.types.d.ts +87 -0
- package/lib/components/YearView/YearView.vue.d.ts +35 -0
- package/lib/components/shared.d.ts +71 -141
- package/lib/components/use-slot-drag-select.d.ts +7 -9
- package/lib/components/use-slot-drop-target.d.ts +38 -0
- package/lib/hooks/use-event-resize.d.ts +1 -1
- package/lib/hooks/use-horizontal-event-resize.d.ts +2 -156
- package/lib/index.d.mts +1 -0
- package/lib/index.d.ts +1 -0
- package/package.json +4 -4
- package/styles.css +44 -54
- package/styles.layer.css +44 -54
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import type { CSSProperties, VNodeChild } from 'vue';
|
|
2
|
+
import type { BoxProps, Factory, ScrollAreaProps } from '@mantine-vue/core';
|
|
3
|
+
import type { StylesApiProps } from '@mantine-vue/core/styles-api';
|
|
4
|
+
import type { EventDropData, EventSlots, ForwardedProps, NativeButtonProps, RenderEvent, RenderEventBody } from '../../component-props';
|
|
5
|
+
import type { ScheduleLabelsOverride } from '../../labels';
|
|
6
|
+
import type { AnyDateValue, DateLabelFormat, DateStringValue, DayOfWeek, ScheduleEventData, ScheduleMode, ScheduleResourceData, ScheduleResourceGroup, ScheduleViewLevel } from '../../types';
|
|
7
|
+
import type { BusinessHoursValue } from '../../utils';
|
|
8
|
+
import type { MoreEventsEmits, MoreEventsProps, MoreEventsStylesNames } from '../MoreEvents/MoreEvents.types';
|
|
9
|
+
import type { ScheduleEventStylesNames } from '../ScheduleEvent/ScheduleEvent.types';
|
|
10
|
+
import type { CombinedScheduleHeaderStylesNames } from '../ScheduleHeader/ScheduleHeader.types';
|
|
11
|
+
import type { ViewSelectEmits, ViewSelectProps } from '../ScheduleHeader/ViewSelect/ViewSelect.types';
|
|
12
|
+
import type { ResourceExternalDropData, ResourceSlotDragEndData, ResourceTimeSlotClickData, ResourceViewDropData } from '../ResourcesDayView/ResourcesDayView.types';
|
|
13
|
+
import type { WeekLabelPayload } from '../WeekView/WeekView.types';
|
|
14
|
+
export type ResourcesWeekViewOwnStylesNames = 'resourcesWeekView' | 'resourcesWeekViewRoot' | 'resourcesWeekViewInner' | 'resourcesWeekViewScrollArea' | 'resourcesWeekViewHeaderRows' | 'resourcesWeekViewHeaderContent' | 'resourcesWeekViewDayLabelsRow' | 'resourcesWeekViewDayLabel' | 'resourcesWeekViewTimeLabelsRow' | 'resourcesWeekViewTimeLabel' | 'resourcesWeekViewCorner' | 'resourcesWeekViewResourceLabel' | 'resourcesWeekViewRow' | 'resourcesWeekViewRowSlot' | 'resourcesWeekViewRowSlots' | 'resourcesWeekViewBackgroundEvent' | 'resourcesWeekViewAllDayEvent' | 'resourcesWeekViewEventWrapper' | 'resourcesWeekViewResizeHandle' | 'resourcesWeekViewGroupColumn' | 'resourcesWeekViewGroupColumnEmpty' | 'resourcesWeekViewCurrentTimeIndicator' | 'resourcesWeekViewCurrentTimeIndicatorLine' | 'resourcesWeekViewCurrentTimeIndicatorThumb' | 'resourcesWeekViewCurrentTimeIndicatorTimeBubble';
|
|
15
|
+
/**
|
|
16
|
+
* `ResourcesWeekView` forwards `classNames` and `styles` to the components it renders, so
|
|
17
|
+
* their selectors are part of its Styles API.
|
|
18
|
+
*/
|
|
19
|
+
export type ResourcesWeekViewStylesNames = ResourcesWeekViewOwnStylesNames | MoreEventsStylesNames | ScheduleEventStylesNames | CombinedScheduleHeaderStylesNames;
|
|
20
|
+
export type ResourcesWeekViewCssVariables = {
|
|
21
|
+
resourcesWeekView: '--resources-week-view-radius' | '--resources-week-view-slot-width' | '--resources-week-view-row-height' | '--resources-week-view-group-label-width';
|
|
22
|
+
};
|
|
23
|
+
export interface ResourcesWeekViewSlots extends EventSlots {
|
|
24
|
+
/** Replaces the navigation header. */
|
|
25
|
+
header?: (props: WeekLabelPayload & {
|
|
26
|
+
label: VNodeChild;
|
|
27
|
+
}) => VNodeChild;
|
|
28
|
+
/** Content of the top-left corner of the grid. */
|
|
29
|
+
corner?: (props: {
|
|
30
|
+
resources: ScheduleResourceData[];
|
|
31
|
+
}) => VNodeChild;
|
|
32
|
+
/** Replaces the label of a day column group. */
|
|
33
|
+
dayLabel?: (props: {
|
|
34
|
+
date: DateStringValue;
|
|
35
|
+
label: VNodeChild;
|
|
36
|
+
}) => VNodeChild;
|
|
37
|
+
/** Replaces the label of a time column. */
|
|
38
|
+
timeLabel?: (props: {
|
|
39
|
+
date: DateStringValue;
|
|
40
|
+
label: VNodeChild;
|
|
41
|
+
startTime: string;
|
|
42
|
+
endTime: string;
|
|
43
|
+
}) => VNodeChild;
|
|
44
|
+
/** Replaces the label of a resource row. Takes precedence over `renderResourceLabel`. */
|
|
45
|
+
resourceLabel?: (props: {
|
|
46
|
+
resource: ScheduleResourceData;
|
|
47
|
+
}) => VNodeChild;
|
|
48
|
+
/** Replaces the label of a resource group. Takes precedence over `renderGroupLabel`. */
|
|
49
|
+
groupLabel?: (props: {
|
|
50
|
+
group: ScheduleResourceGroup;
|
|
51
|
+
}) => VNodeChild;
|
|
52
|
+
/** Content rendered inside every time slot. */
|
|
53
|
+
timeSlot?: (props: {
|
|
54
|
+
resource: ScheduleResourceData;
|
|
55
|
+
date: DateStringValue;
|
|
56
|
+
startTime: string;
|
|
57
|
+
endTime: string;
|
|
58
|
+
}) => VNodeChild;
|
|
59
|
+
/** Replaces a background event. */
|
|
60
|
+
backgroundEvent?: (props: {
|
|
61
|
+
event: ScheduleEventData;
|
|
62
|
+
date: DateStringValue;
|
|
63
|
+
}) => VNodeChild;
|
|
64
|
+
/** Replaces an all-day event bar. */
|
|
65
|
+
allDayEvent?: (props: {
|
|
66
|
+
event: ScheduleEventData;
|
|
67
|
+
startDayIndex: number;
|
|
68
|
+
endDayIndex: number;
|
|
69
|
+
}) => VNodeChild;
|
|
70
|
+
/** Replaces the "more events" control of an overlap cluster. */
|
|
71
|
+
moreEvents?: (props: {
|
|
72
|
+
events: ScheduleEventData[];
|
|
73
|
+
hiddenCount: number;
|
|
74
|
+
date: DateStringValue;
|
|
75
|
+
}) => VNodeChild;
|
|
76
|
+
/** Replaces the current time indicator. */
|
|
77
|
+
currentTimeIndicator?: (props: {
|
|
78
|
+
time: VNodeChild;
|
|
79
|
+
offset: number;
|
|
80
|
+
date: DateStringValue;
|
|
81
|
+
}) => VNodeChild;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Props declared by `ResourcesWeekView` itself. See `ResourcesWeekViewProps` for the full
|
|
85
|
+
* public type.
|
|
86
|
+
*/
|
|
87
|
+
export interface ResourcesWeekViewOwnProps extends StylesApiProps<ResourcesWeekViewFactory> {
|
|
88
|
+
/** Week displayed by the view. Any day inside the week works. */
|
|
89
|
+
date: Date | DateStringValue;
|
|
90
|
+
/** Resources rendered as rows, in the given order. */
|
|
91
|
+
resources: ScheduleResourceData[];
|
|
92
|
+
/** Groups the resources are bucketed into, rendered as a leading column. */
|
|
93
|
+
groups?: ScheduleResourceGroup[];
|
|
94
|
+
/**
|
|
95
|
+
* First visible time of the day, `HH:mm:ss`.
|
|
96
|
+
* @default '00:00:00'
|
|
97
|
+
*/
|
|
98
|
+
startTime?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Last visible time of the day, `HH:mm:ss`.
|
|
101
|
+
* @default '23:59:59'
|
|
102
|
+
*/
|
|
103
|
+
endTime?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Length of one time slot in minutes.
|
|
106
|
+
* @default 60
|
|
107
|
+
*/
|
|
108
|
+
intervalMinutes?: number;
|
|
109
|
+
/**
|
|
110
|
+
* Format of the time column labels.
|
|
111
|
+
* @default 'HH:mm'
|
|
112
|
+
*/
|
|
113
|
+
slotLabelFormat?: DateLabelFormat;
|
|
114
|
+
/** Key of `theme.radius` or any valid CSS value to set `border-radius`. */
|
|
115
|
+
radius?: string | number;
|
|
116
|
+
/** Datetime the view scrolls to on the initial render, `YYYY-MM-DD HH:mm:ss`. */
|
|
117
|
+
startScrollDateTime?: string;
|
|
118
|
+
/** Props passed to the `ScrollArea` that wraps the grid. */
|
|
119
|
+
scrollAreaProps?: ForwardedProps<ScrollAreaProps>;
|
|
120
|
+
/**
|
|
121
|
+
* Locale passed down to `dayjs` when formatting labels.
|
|
122
|
+
* @default 'en'
|
|
123
|
+
*/
|
|
124
|
+
locale?: string;
|
|
125
|
+
/** If set, a line marking the current time is displayed. */
|
|
126
|
+
withCurrentTimeIndicator?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* If set, the current time indicator carries a bubble with the current time.
|
|
129
|
+
* @default true
|
|
130
|
+
*/
|
|
131
|
+
withCurrentTimeBubble?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Returns the current time, called on every render. Use it to render the indicator in
|
|
134
|
+
* another timezone.
|
|
135
|
+
* @default () => dayjs()
|
|
136
|
+
*/
|
|
137
|
+
getCurrentTime?: () => AnyDateValue;
|
|
138
|
+
/**
|
|
139
|
+
* If set, the navigation header is rendered above the grid.
|
|
140
|
+
* @default true
|
|
141
|
+
*/
|
|
142
|
+
withHeader?: boolean;
|
|
143
|
+
/** Props passed to the previous control of the header. */
|
|
144
|
+
previousControlProps?: NativeButtonProps;
|
|
145
|
+
/** Props passed to the next control of the header. */
|
|
146
|
+
nextControlProps?: NativeButtonProps;
|
|
147
|
+
/** Props passed to the today control of the header. */
|
|
148
|
+
todayControlProps?: NativeButtonProps;
|
|
149
|
+
/** Props passed to the view select of the header. */
|
|
150
|
+
viewSelectProps?: ForwardedProps<ViewSelectProps, ViewSelectEmits>;
|
|
151
|
+
/**
|
|
152
|
+
* Format of the week label shown in the header.
|
|
153
|
+
* @default 'MMM DD'
|
|
154
|
+
*/
|
|
155
|
+
weekLabelFormat?: DateLabelFormat;
|
|
156
|
+
/** Replaces the label shown between the navigation controls. */
|
|
157
|
+
renderWeekLabel?: (payload: WeekLabelPayload) => VNodeChild;
|
|
158
|
+
/** Events rendered by the view. */
|
|
159
|
+
events?: ScheduleEventData[];
|
|
160
|
+
/**
|
|
161
|
+
* Width of one time column.
|
|
162
|
+
* @default 60
|
|
163
|
+
*/
|
|
164
|
+
slotWidth?: CSSProperties['width'];
|
|
165
|
+
/**
|
|
166
|
+
* Height of one resource row.
|
|
167
|
+
* @default 64
|
|
168
|
+
*/
|
|
169
|
+
rowHeight?: CSSProperties['height'];
|
|
170
|
+
/**
|
|
171
|
+
* Width of the group column.
|
|
172
|
+
* @default 80
|
|
173
|
+
*/
|
|
174
|
+
groupLabelWidth?: CSSProperties['width'];
|
|
175
|
+
/** Overrides for the built-in labels, used for i18n and accessible names. */
|
|
176
|
+
labels?: ScheduleLabelsOverride;
|
|
177
|
+
/**
|
|
178
|
+
* If set, business hours are highlighted.
|
|
179
|
+
* @default false
|
|
180
|
+
*/
|
|
181
|
+
highlightBusinessHours?: boolean;
|
|
182
|
+
/**
|
|
183
|
+
* Business hours as an `HH:mm:ss` range shared by every day, or a record keyed by day of
|
|
184
|
+
* the week (`0` – Sunday) for per-day ranges.
|
|
185
|
+
* @default ['09:00:00', '17:00:00']
|
|
186
|
+
*/
|
|
187
|
+
businessHours?: BusinessHoursValue;
|
|
188
|
+
/**
|
|
189
|
+
* Replaces the body of every event. Can also be set with the `eventBody` slot,
|
|
190
|
+
* which takes precedence over the prop.
|
|
191
|
+
*/
|
|
192
|
+
renderEventBody?: RenderEventBody;
|
|
193
|
+
/**
|
|
194
|
+
* Replaces every event entirely. Can also be set with the `event` slot, which takes
|
|
195
|
+
* precedence over the prop.
|
|
196
|
+
*/
|
|
197
|
+
renderEvent?: RenderEvent;
|
|
198
|
+
/**
|
|
199
|
+
* Replaces the label of every resource row. Can also be set with the `resourceLabel` slot,
|
|
200
|
+
* which takes precedence over the prop.
|
|
201
|
+
*/
|
|
202
|
+
renderResourceLabel?: (resource: ScheduleResourceData) => VNodeChild;
|
|
203
|
+
/**
|
|
204
|
+
* Replaces the label of every resource group. Can also be set with the `groupLabel` slot,
|
|
205
|
+
* which takes precedence over the prop.
|
|
206
|
+
*/
|
|
207
|
+
renderGroupLabel?: (group: ScheduleResourceGroup) => VNodeChild;
|
|
208
|
+
/**
|
|
209
|
+
* If set, events can be dragged onto another slot or resource.
|
|
210
|
+
* @default false
|
|
211
|
+
*/
|
|
212
|
+
withEventsDragAndDrop?: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* Returns whether the given event may be dragged.
|
|
215
|
+
* @default () => true
|
|
216
|
+
*/
|
|
217
|
+
canDragEvent?: (event: ScheduleEventData) => boolean;
|
|
218
|
+
/**
|
|
219
|
+
* If set, items dragged in from outside the schedule can be dropped on a slot, which emits
|
|
220
|
+
* `externalEventDrop`. Enabling event drag and drop turns this on as well.
|
|
221
|
+
* @default false
|
|
222
|
+
*/
|
|
223
|
+
withExternalEventDrop?: boolean;
|
|
224
|
+
/**
|
|
225
|
+
* If set, dragging across time slots selects a range.
|
|
226
|
+
* @default false
|
|
227
|
+
*/
|
|
228
|
+
withDragSlotSelect?: boolean;
|
|
229
|
+
/**
|
|
230
|
+
* Interaction mode. `static` disables every event and slot interaction.
|
|
231
|
+
* @default 'default'
|
|
232
|
+
*/
|
|
233
|
+
mode?: ScheduleMode;
|
|
234
|
+
/**
|
|
235
|
+
* If set, events can be resized by dragging their edges.
|
|
236
|
+
* @default false
|
|
237
|
+
*/
|
|
238
|
+
withEventResize?: boolean;
|
|
239
|
+
/**
|
|
240
|
+
* Returns whether the given event may be resized.
|
|
241
|
+
* @default () => true
|
|
242
|
+
*/
|
|
243
|
+
canResizeEvent?: (event: ScheduleEventData) => boolean;
|
|
244
|
+
/**
|
|
245
|
+
* Maximum number of instances generated per recurring series.
|
|
246
|
+
* @default 2000
|
|
247
|
+
*/
|
|
248
|
+
recurrenceExpansionLimit?: number;
|
|
249
|
+
/**
|
|
250
|
+
* Number of overlapping events shown per slot before the rest collapse into a "more" control.
|
|
251
|
+
* @default 2
|
|
252
|
+
*/
|
|
253
|
+
maxEventsPerTimeSlot?: number;
|
|
254
|
+
/** Props passed to the `MoreEvents` control of an overlap cluster. */
|
|
255
|
+
moreEventsProps?: ForwardedProps<MoreEventsProps, MoreEventsEmits>;
|
|
256
|
+
/**
|
|
257
|
+
* Day the week starts on, `0` – Sunday.
|
|
258
|
+
* @default 1
|
|
259
|
+
*/
|
|
260
|
+
firstDayOfWeek?: DayOfWeek;
|
|
261
|
+
/**
|
|
262
|
+
* Days marked as weekend, `0` – Sunday.
|
|
263
|
+
* @default [0, 6]
|
|
264
|
+
*/
|
|
265
|
+
weekendDays?: DayOfWeek[];
|
|
266
|
+
/**
|
|
267
|
+
* If set, weekend days are part of the week.
|
|
268
|
+
* @default true
|
|
269
|
+
*/
|
|
270
|
+
withWeekendDays?: boolean;
|
|
271
|
+
/**
|
|
272
|
+
* Format of the day column labels.
|
|
273
|
+
* @default 'ddd D'
|
|
274
|
+
*/
|
|
275
|
+
weekdayFormat?: DateLabelFormat;
|
|
276
|
+
/**
|
|
277
|
+
* If set, today is highlighted.
|
|
278
|
+
* @default true
|
|
279
|
+
*/
|
|
280
|
+
highlightToday?: boolean;
|
|
281
|
+
}
|
|
282
|
+
export interface ResourcesWeekViewProps extends Omit<BoxProps, keyof ResourcesWeekViewOwnProps>, ResourcesWeekViewOwnProps {
|
|
283
|
+
}
|
|
284
|
+
export interface ResourcesWeekViewEmits {
|
|
285
|
+
/** Emitted when the view navigates to another week. */
|
|
286
|
+
dateChange: [date: DateStringValue];
|
|
287
|
+
/** Emitted when the header view select picks another view level. */
|
|
288
|
+
viewChange: [view: ScheduleViewLevel];
|
|
289
|
+
/** Emitted when an event is clicked. */
|
|
290
|
+
eventClick: [event: ScheduleEventData, nativeEvent: MouseEvent];
|
|
291
|
+
/** Emitted when an event is dropped. */
|
|
292
|
+
eventDrop: [data: ResourceViewDropData];
|
|
293
|
+
/** Emitted when a drag of an event starts. */
|
|
294
|
+
eventDragStart: [event: ScheduleEventData];
|
|
295
|
+
/** Emitted when a drag of an event ends. */
|
|
296
|
+
eventDragEnd: [];
|
|
297
|
+
/** Emitted when a time slot is clicked. */
|
|
298
|
+
timeSlotClick: [data: ResourceTimeSlotClickData];
|
|
299
|
+
/** Emitted when a slot range is selected by dragging. */
|
|
300
|
+
slotDragEnd: [data: ResourceSlotDragEndData];
|
|
301
|
+
/** Emitted when an item from outside the schedule is dropped. */
|
|
302
|
+
externalEventDrop: [data: ResourceExternalDropData];
|
|
303
|
+
/** Emitted when an event is resized. */
|
|
304
|
+
eventResize: [data: EventDropData];
|
|
305
|
+
}
|
|
306
|
+
export type ResourcesWeekViewFactory = Factory<{
|
|
307
|
+
props: Omit<ResourcesWeekViewProps, 'rootRef'>;
|
|
308
|
+
slots: ResourcesWeekViewSlots;
|
|
309
|
+
emits: ResourcesWeekViewEmits;
|
|
310
|
+
ref: HTMLDivElement;
|
|
311
|
+
element: 'div';
|
|
312
|
+
stylesNames: ResourcesWeekViewStylesNames;
|
|
313
|
+
vars: ResourcesWeekViewCssVariables;
|
|
314
|
+
}>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { ScheduleEventData, ScheduleViewLevel } from '../../types';
|
|
2
|
+
import type { ResourcesWeekViewSlots } from './ResourcesWeekView.types';
|
|
3
|
+
import type { ResourcesWeekViewOwnProps } from './ResourcesWeekView.types';
|
|
4
|
+
declare const defaultProps: {
|
|
5
|
+
startTime: string;
|
|
6
|
+
endTime: string;
|
|
7
|
+
intervalMinutes: number;
|
|
8
|
+
slotLabelFormat: string;
|
|
9
|
+
withCurrentTimeBubble: true;
|
|
10
|
+
withHeader: true;
|
|
11
|
+
weekLabelFormat: string;
|
|
12
|
+
slotWidth: number;
|
|
13
|
+
rowHeight: number;
|
|
14
|
+
groupLabelWidth: number;
|
|
15
|
+
businessHours: [string, string];
|
|
16
|
+
mode: "default";
|
|
17
|
+
recurrenceExpansionLimit: number;
|
|
18
|
+
maxEventsPerTimeSlot: number;
|
|
19
|
+
firstDayOfWeek: 1;
|
|
20
|
+
weekendDays: (0 | 6)[];
|
|
21
|
+
withWeekendDays: true;
|
|
22
|
+
weekdayFormat: string;
|
|
23
|
+
highlightToday: true;
|
|
24
|
+
};
|
|
25
|
+
/** View levels the header offers – a resource schedule has no year view. */
|
|
26
|
+
declare const RESOURCE_VIEWS: readonly ["day", "week", "month"];
|
|
27
|
+
declare const varsResolver: (theme: import("@mantine-vue/core").MantineTheme, props: any, ctx: Record<string, any>) => Record<string, Record<string, string | undefined>>;
|
|
28
|
+
export { defaultProps, varsResolver, RESOURCE_VIEWS };
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
31
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ResourcesWeekViewOwnProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
32
|
+
dateChange: (date: string) => any;
|
|
33
|
+
eventDragStart: (event: ScheduleEventData) => any;
|
|
34
|
+
eventDragEnd: () => any;
|
|
35
|
+
eventClick: (event: ScheduleEventData, nativeEvent: MouseEvent) => any;
|
|
36
|
+
viewChange: (view: ScheduleViewLevel) => any;
|
|
37
|
+
eventDrop: (data: import("../ResourcesDayView").ResourceViewDropData) => any;
|
|
38
|
+
timeSlotClick: (data: import("../ResourcesDayView").ResourceTimeSlotClickData) => any;
|
|
39
|
+
slotDragEnd: (data: import("../ResourcesDayView").ResourceSlotDragEndData) => any;
|
|
40
|
+
externalEventDrop: (data: import("../ResourcesDayView").ResourceExternalDropData) => any;
|
|
41
|
+
eventResize: (data: import("../..").EventDropData) => any;
|
|
42
|
+
}, string, import("vue").PublicProps, Readonly<ResourcesWeekViewOwnProps> & Readonly<{
|
|
43
|
+
onDateChange?: ((date: string) => any) | undefined;
|
|
44
|
+
onEventDragStart?: ((event: ScheduleEventData) => any) | undefined;
|
|
45
|
+
onEventDragEnd?: (() => any) | undefined;
|
|
46
|
+
onEventClick?: ((event: ScheduleEventData, nativeEvent: MouseEvent) => any) | undefined;
|
|
47
|
+
onViewChange?: ((view: ScheduleViewLevel) => any) | undefined;
|
|
48
|
+
onEventDrop?: ((data: import("../ResourcesDayView").ResourceViewDropData) => any) | undefined;
|
|
49
|
+
onTimeSlotClick?: ((data: import("../ResourcesDayView").ResourceTimeSlotClickData) => any) | undefined;
|
|
50
|
+
onSlotDragEnd?: ((data: import("../ResourcesDayView").ResourceSlotDragEndData) => any) | undefined;
|
|
51
|
+
onExternalEventDrop?: ((data: import("../ResourcesDayView").ResourceExternalDropData) => any) | undefined;
|
|
52
|
+
onEventResize?: ((data: import("../..").EventDropData) => any) | undefined;
|
|
53
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ResourcesWeekViewSlots>;
|
|
54
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
55
|
+
new (): {
|
|
56
|
+
$slots: S;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
@@ -1,134 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
event?: (props: Record<string, unknown> & {
|
|
11
|
-
event: ScheduleEventData;
|
|
12
|
-
}) => VNodeChild;
|
|
13
|
-
/** Scoped alternative to WeekView's `renderWeekLabel` prop */
|
|
14
|
-
weekLabel?: (props: {
|
|
15
|
-
weekStart: DateStringValue;
|
|
16
|
-
weekEnd: DateStringValue;
|
|
17
|
-
}) => VNodeChild;
|
|
18
|
-
/** Scoped alternative to MobileMonthView's `renderHeader` prop */
|
|
19
|
-
header?: (props: {
|
|
20
|
-
mode: ScheduleMode;
|
|
21
|
-
date: Date | DateStringValue;
|
|
22
|
-
defaultHeader: VNodeChild;
|
|
23
|
-
}) => VNodeChild;
|
|
24
|
-
}
|
|
25
|
-
export declare const Schedule: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
26
|
-
date: PropType<Date | DateStringValue>;
|
|
27
|
-
defaultDate: PropType<Date | DateStringValue>;
|
|
28
|
-
onDateChange: PropType<(date: DateStringValue) => void>;
|
|
29
|
-
view: PropType<ScheduleViewLevel>;
|
|
30
|
-
defaultView: {
|
|
31
|
-
type: PropType<ScheduleViewLevel>;
|
|
32
|
-
default: string;
|
|
33
|
-
};
|
|
34
|
-
onViewChange: PropType<(view: ScheduleViewLevel) => void>;
|
|
35
|
-
events: PropType<ScheduleEventData[]>;
|
|
36
|
-
locale: StringConstructor;
|
|
37
|
-
radius: PropType<string | number>;
|
|
38
|
-
labels: ObjectConstructor;
|
|
39
|
-
renderEventBody: PropType<RenderEventBody>;
|
|
40
|
-
withEventsDragAndDrop: BooleanConstructor;
|
|
41
|
-
onEventDrop: PropType<ScheduleProps["onEventDrop"]>;
|
|
42
|
-
canDragEvent: PropType<ScheduleProps["canDragEvent"]>;
|
|
43
|
-
onEventDragStart: PropType<ScheduleProps["onEventDragStart"]>;
|
|
44
|
-
onEventDragEnd: PropType<ScheduleProps["onEventDragEnd"]>;
|
|
45
|
-
onTimeSlotClick: PropType<ScheduleProps["onTimeSlotClick"]>;
|
|
46
|
-
onAllDaySlotClick: PropType<ScheduleProps["onAllDaySlotClick"]>;
|
|
47
|
-
onEventClick: PropType<ScheduleProps["onEventClick"]>;
|
|
48
|
-
onDayClick: PropType<ScheduleProps["onDayClick"]>;
|
|
49
|
-
onMonthClick: PropType<ScheduleProps["onMonthClick"]>;
|
|
50
|
-
withDragSlotSelect: BooleanConstructor;
|
|
51
|
-
onSlotDragEnd: PropType<ScheduleProps["onSlotDragEnd"]>;
|
|
52
|
-
mode: {
|
|
53
|
-
type: PropType<ScheduleMode>;
|
|
54
|
-
default: string;
|
|
55
|
-
};
|
|
56
|
-
onExternalEventDrop: PropType<ScheduleProps["onExternalEventDrop"]>;
|
|
57
|
-
withEventResize: BooleanConstructor;
|
|
58
|
-
onEventResize: PropType<ScheduleProps["onEventResize"]>;
|
|
59
|
-
canResizeEvent: PropType<ScheduleProps["canResizeEvent"]>;
|
|
60
|
-
recurrenceExpansionLimit: {
|
|
61
|
-
type: NumberConstructor;
|
|
62
|
-
default: number;
|
|
63
|
-
};
|
|
64
|
-
layout: {
|
|
65
|
-
type: PropType<"default" | "responsive">;
|
|
66
|
-
default: string;
|
|
67
|
-
};
|
|
68
|
-
dayViewProps: PropType<Partial<DayViewProps>>;
|
|
69
|
-
weekViewProps: PropType<Partial<WeekViewProps>>;
|
|
70
|
-
monthViewProps: PropType<Partial<MonthViewProps>>;
|
|
71
|
-
yearViewProps: PropType<Partial<YearViewProps>>;
|
|
72
|
-
mobileMonthViewProps: PropType<Partial<MobileMonthViewProps>>;
|
|
73
|
-
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
74
|
-
[key: string]: any;
|
|
75
|
-
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
76
|
-
date: PropType<Date | DateStringValue>;
|
|
77
|
-
defaultDate: PropType<Date | DateStringValue>;
|
|
78
|
-
onDateChange: PropType<(date: DateStringValue) => void>;
|
|
79
|
-
view: PropType<ScheduleViewLevel>;
|
|
80
|
-
defaultView: {
|
|
81
|
-
type: PropType<ScheduleViewLevel>;
|
|
82
|
-
default: string;
|
|
83
|
-
};
|
|
84
|
-
onViewChange: PropType<(view: ScheduleViewLevel) => void>;
|
|
85
|
-
events: PropType<ScheduleEventData[]>;
|
|
86
|
-
locale: StringConstructor;
|
|
87
|
-
radius: PropType<string | number>;
|
|
88
|
-
labels: ObjectConstructor;
|
|
89
|
-
renderEventBody: PropType<RenderEventBody>;
|
|
90
|
-
withEventsDragAndDrop: BooleanConstructor;
|
|
91
|
-
onEventDrop: PropType<ScheduleProps["onEventDrop"]>;
|
|
92
|
-
canDragEvent: PropType<ScheduleProps["canDragEvent"]>;
|
|
93
|
-
onEventDragStart: PropType<ScheduleProps["onEventDragStart"]>;
|
|
94
|
-
onEventDragEnd: PropType<ScheduleProps["onEventDragEnd"]>;
|
|
95
|
-
onTimeSlotClick: PropType<ScheduleProps["onTimeSlotClick"]>;
|
|
96
|
-
onAllDaySlotClick: PropType<ScheduleProps["onAllDaySlotClick"]>;
|
|
97
|
-
onEventClick: PropType<ScheduleProps["onEventClick"]>;
|
|
98
|
-
onDayClick: PropType<ScheduleProps["onDayClick"]>;
|
|
99
|
-
onMonthClick: PropType<ScheduleProps["onMonthClick"]>;
|
|
100
|
-
withDragSlotSelect: BooleanConstructor;
|
|
101
|
-
onSlotDragEnd: PropType<ScheduleProps["onSlotDragEnd"]>;
|
|
102
|
-
mode: {
|
|
103
|
-
type: PropType<ScheduleMode>;
|
|
104
|
-
default: string;
|
|
105
|
-
};
|
|
106
|
-
onExternalEventDrop: PropType<ScheduleProps["onExternalEventDrop"]>;
|
|
107
|
-
withEventResize: BooleanConstructor;
|
|
108
|
-
onEventResize: PropType<ScheduleProps["onEventResize"]>;
|
|
109
|
-
canResizeEvent: PropType<ScheduleProps["canResizeEvent"]>;
|
|
110
|
-
recurrenceExpansionLimit: {
|
|
111
|
-
type: NumberConstructor;
|
|
112
|
-
default: number;
|
|
113
|
-
};
|
|
114
|
-
layout: {
|
|
115
|
-
type: PropType<"default" | "responsive">;
|
|
116
|
-
default: string;
|
|
117
|
-
};
|
|
118
|
-
dayViewProps: PropType<Partial<DayViewProps>>;
|
|
119
|
-
weekViewProps: PropType<Partial<WeekViewProps>>;
|
|
120
|
-
monthViewProps: PropType<Partial<MonthViewProps>>;
|
|
121
|
-
yearViewProps: PropType<Partial<YearViewProps>>;
|
|
122
|
-
mobileMonthViewProps: PropType<Partial<MobileMonthViewProps>>;
|
|
123
|
-
}>> & Readonly<{}>, {
|
|
124
|
-
mode: ScheduleMode;
|
|
125
|
-
layout: "default" | "responsive";
|
|
126
|
-
recurrenceExpansionLimit: number;
|
|
127
|
-
defaultView: ScheduleViewLevel;
|
|
128
|
-
withEventsDragAndDrop: boolean;
|
|
129
|
-
withDragSlotSelect: boolean;
|
|
130
|
-
withEventResize: boolean;
|
|
131
|
-
}, SlotsType<ScheduleSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
132
|
-
export type { ScheduleProps };
|
|
133
|
-
export type ScheduleLayout = 'default' | 'responsive';
|
|
134
|
-
export type ScheduleStylesNames = 'root' | 'desktopView' | 'mobileView' | import('../DayView/DayView').DayViewStylesNames | import('../WeekView/WeekView').WeekViewStylesNames | import('../MonthView/MonthView').MonthViewStylesNames | import('../YearView/YearView').YearViewStylesNames | import('../MobileMonthView/MobileMonthView').MobileMonthViewStylesNames;
|
|
1
|
+
export declare const Schedule: import("@mantine-vue/core").MantineComponent<{
|
|
2
|
+
props: Omit<import("./Schedule.types").ScheduleProps, "rootRef">;
|
|
3
|
+
slots: import("./Schedule.types").ScheduleSlots;
|
|
4
|
+
emits: import("./Schedule.types").ScheduleEmits;
|
|
5
|
+
ref: HTMLDivElement;
|
|
6
|
+
element: "div";
|
|
7
|
+
stylesNames: import("./Schedule.types").ScheduleStylesNames;
|
|
8
|
+
}>;
|
|
9
|
+
export type { ScheduleEmits, ScheduleFactory, ScheduleLayout, ScheduleOwnProps, ScheduleOwnStylesNames, ScheduleProps, ScheduleSlots, ScheduleStylesNames, } from './Schedule.types';
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import type { VNodeChild } from 'vue';
|
|
2
|
+
import type { BoxProps, Factory } from '@mantine-vue/core';
|
|
3
|
+
import type { StylesApiProps } from '@mantine-vue/core/styles-api';
|
|
4
|
+
import type { EventDropData, EventSlots, ForwardedProps, RenderEventBody, TimeSlotClickData } from '../../component-props';
|
|
5
|
+
import type { ScheduleLabelsOverride } from '../../labels';
|
|
6
|
+
import type { DateStringValue, DateTimeStringValue, ScheduleEventData, ScheduleMode, ScheduleViewLevel } from '../../types';
|
|
7
|
+
import type { DayViewEmits, DayViewProps, DayViewStylesNames } from '../DayView/DayView.types';
|
|
8
|
+
import type { MobileMonthViewHeaderPayload, MobileMonthViewEmits, MobileMonthViewProps, MobileMonthViewStylesNames } from '../MobileMonthView/MobileMonthView.types';
|
|
9
|
+
import type { MonthViewEmits, MonthViewProps, MonthViewStylesNames } from '../MonthView/MonthView.types';
|
|
10
|
+
import type { WeekLabelPayload, WeekViewEmits, WeekViewProps, WeekViewStylesNames } from '../WeekView/WeekView.types';
|
|
11
|
+
import type { YearViewEmits, YearViewProps, YearViewStylesNames } from '../YearView/YearView.types';
|
|
12
|
+
/**
|
|
13
|
+
* How `Schedule` lays its views out: `default` renders the selected view alone, `responsive`
|
|
14
|
+
* also renders a mobile-friendly view that CSS swaps in on narrow screens.
|
|
15
|
+
*/
|
|
16
|
+
export type ScheduleLayout = 'default' | 'responsive';
|
|
17
|
+
export type ScheduleOwnStylesNames = 'root' | 'desktopView' | 'mobileView';
|
|
18
|
+
/** `Schedule` forwards `classNames` and `styles` to the view it renders. */
|
|
19
|
+
export type ScheduleStylesNames = ScheduleOwnStylesNames | DayViewStylesNames | WeekViewStylesNames | MonthViewStylesNames | YearViewStylesNames | MobileMonthViewStylesNames;
|
|
20
|
+
export interface ScheduleSlots extends EventSlots {
|
|
21
|
+
/** Replaces the week label in `WeekView`. Takes precedence over its `renderWeekLabel` prop. */
|
|
22
|
+
weekLabel?: (props: WeekLabelPayload) => VNodeChild;
|
|
23
|
+
/** Replaces the header of `MobileMonthView`. Takes precedence over its `renderHeader` prop. */
|
|
24
|
+
header?: (props: MobileMonthViewHeaderPayload) => VNodeChild;
|
|
25
|
+
}
|
|
26
|
+
/** Props declared by `Schedule` itself. See `ScheduleProps` for the full public type. */
|
|
27
|
+
export interface ScheduleOwnProps extends StylesApiProps<ScheduleFactory> {
|
|
28
|
+
/** Date displayed by the active view, bound with `v-model:date`. */
|
|
29
|
+
date?: Date | DateStringValue;
|
|
30
|
+
/** Date displayed on the first render when `date` is not set. @default today */
|
|
31
|
+
defaultDate?: Date | DateStringValue;
|
|
32
|
+
/** Active view level, bound with `v-model:view`. */
|
|
33
|
+
view?: ScheduleViewLevel;
|
|
34
|
+
/**
|
|
35
|
+
* View level shown on the first render when `view` is not set.
|
|
36
|
+
* @default 'week'
|
|
37
|
+
*/
|
|
38
|
+
defaultView?: ScheduleViewLevel;
|
|
39
|
+
/** Events rendered by the active view. */
|
|
40
|
+
events?: ScheduleEventData[];
|
|
41
|
+
/**
|
|
42
|
+
* Locale passed down to `dayjs` when formatting labels.
|
|
43
|
+
* @default 'en'
|
|
44
|
+
*/
|
|
45
|
+
locale?: string;
|
|
46
|
+
/** Key of `theme.radius` or any valid CSS value to set `border-radius`. */
|
|
47
|
+
radius?: string | number;
|
|
48
|
+
/** Overrides for the built-in labels, used for i18n and accessible names. */
|
|
49
|
+
labels?: ScheduleLabelsOverride;
|
|
50
|
+
/**
|
|
51
|
+
* Replaces the body of every event. Can also be set with the `eventBody` slot,
|
|
52
|
+
* which takes precedence over the prop.
|
|
53
|
+
*/
|
|
54
|
+
renderEventBody?: RenderEventBody;
|
|
55
|
+
/**
|
|
56
|
+
* If set, events can be dragged onto another slot or day.
|
|
57
|
+
* @default false
|
|
58
|
+
*/
|
|
59
|
+
withEventsDragAndDrop?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Returns whether the given event may be dragged.
|
|
62
|
+
* @default () => true
|
|
63
|
+
*/
|
|
64
|
+
canDragEvent?: (event: ScheduleEventData) => boolean;
|
|
65
|
+
/**
|
|
66
|
+
* If set, items dragged in from outside the schedule can be dropped on a slot or day, which emits
|
|
67
|
+
* `externalEventDrop`. Enabling event drag and drop turns this on as well.
|
|
68
|
+
* @default false
|
|
69
|
+
*/
|
|
70
|
+
withExternalEventDrop?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* If set, dragging across slots or days selects a range.
|
|
73
|
+
* @default false
|
|
74
|
+
*/
|
|
75
|
+
withDragSlotSelect?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Interaction mode. `static` disables every event, slot and navigation interaction.
|
|
78
|
+
* @default 'default'
|
|
79
|
+
*/
|
|
80
|
+
mode?: ScheduleMode;
|
|
81
|
+
/**
|
|
82
|
+
* If set, events can be resized by dragging their edges in the time-axis views.
|
|
83
|
+
* @default false
|
|
84
|
+
*/
|
|
85
|
+
withEventResize?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Returns whether the given event may be resized.
|
|
88
|
+
* @default () => true
|
|
89
|
+
*/
|
|
90
|
+
canResizeEvent?: (event: ScheduleEventData) => boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Maximum number of instances generated per recurring series.
|
|
93
|
+
* @default 2000
|
|
94
|
+
*/
|
|
95
|
+
recurrenceExpansionLimit?: number;
|
|
96
|
+
/**
|
|
97
|
+
* `responsive` additionally renders a mobile-friendly view that CSS swaps in on narrow screens.
|
|
98
|
+
* @default 'default'
|
|
99
|
+
*/
|
|
100
|
+
layout?: ScheduleLayout;
|
|
101
|
+
/** Props passed to `DayView`. */
|
|
102
|
+
dayViewProps?: ForwardedProps<DayViewProps, DayViewEmits>;
|
|
103
|
+
/** Props passed to `WeekView`. */
|
|
104
|
+
weekViewProps?: ForwardedProps<WeekViewProps, WeekViewEmits>;
|
|
105
|
+
/** Props passed to `MonthView`. */
|
|
106
|
+
monthViewProps?: ForwardedProps<MonthViewProps, MonthViewEmits>;
|
|
107
|
+
/** Props passed to `YearView`. */
|
|
108
|
+
yearViewProps?: ForwardedProps<YearViewProps, YearViewEmits>;
|
|
109
|
+
/** Props passed to `MobileMonthView`, used only when `layout` is `responsive`. */
|
|
110
|
+
mobileMonthViewProps?: ForwardedProps<MobileMonthViewProps, MobileMonthViewEmits>;
|
|
111
|
+
}
|
|
112
|
+
export interface ScheduleProps extends Omit<BoxProps, keyof ScheduleOwnProps>, ScheduleOwnProps {
|
|
113
|
+
}
|
|
114
|
+
export interface ScheduleEmits {
|
|
115
|
+
/** Emitted when the active view navigates to another date, bound with `v-model:date`. */
|
|
116
|
+
'update:date': [date: DateStringValue];
|
|
117
|
+
/** Emitted when another view level is selected, bound with `v-model:view`. */
|
|
118
|
+
'update:view': [view: ScheduleViewLevel];
|
|
119
|
+
/** Emitted when the active view navigates to another date. */
|
|
120
|
+
dateChange: [date: DateStringValue];
|
|
121
|
+
/** Emitted when another view level is selected. */
|
|
122
|
+
viewChange: [view: ScheduleViewLevel];
|
|
123
|
+
/** Emitted when an event is clicked. */
|
|
124
|
+
eventClick: [event: ScheduleEventData, nativeEvent: MouseEvent];
|
|
125
|
+
/** Emitted when an event is dropped in a new position. */
|
|
126
|
+
eventDrop: [data: EventDropData];
|
|
127
|
+
/** Emitted when a drag of an event starts. */
|
|
128
|
+
eventDragStart: [event: ScheduleEventData];
|
|
129
|
+
/** Emitted when a drag of an event ends. */
|
|
130
|
+
eventDragEnd: [];
|
|
131
|
+
/** Emitted when a time slot is clicked. */
|
|
132
|
+
timeSlotClick: [data: TimeSlotClickData];
|
|
133
|
+
/** Emitted when an all-day slot is clicked. */
|
|
134
|
+
allDaySlotClick: [date: DateStringValue, nativeEvent: MouseEvent];
|
|
135
|
+
/** Emitted when a day is clicked in the month or year view. */
|
|
136
|
+
dayClick: [date: DateStringValue, nativeEvent: MouseEvent];
|
|
137
|
+
/** Emitted when a month caption is clicked in the year view. */
|
|
138
|
+
monthClick: [month: DateStringValue];
|
|
139
|
+
/** Emitted when a range is selected by dragging. */
|
|
140
|
+
slotDragEnd: [rangeStart: DateTimeStringValue, rangeEnd: DateTimeStringValue];
|
|
141
|
+
/** Emitted when an item from outside the schedule is dropped. */
|
|
142
|
+
externalEventDrop: [dataTransfer: DataTransfer, dateTime: DateTimeStringValue];
|
|
143
|
+
/** Emitted when an event is resized. */
|
|
144
|
+
eventResize: [data: EventDropData];
|
|
145
|
+
}
|
|
146
|
+
export type ScheduleFactory = Factory<{
|
|
147
|
+
props: Omit<ScheduleProps, 'rootRef'>;
|
|
148
|
+
slots: ScheduleSlots;
|
|
149
|
+
emits: ScheduleEmits;
|
|
150
|
+
ref: HTMLDivElement;
|
|
151
|
+
element: 'div';
|
|
152
|
+
stylesNames: ScheduleStylesNames;
|
|
153
|
+
}>;
|