@mantine-vue/schedule 3.0.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,39 @@
|
|
|
1
|
+
import type { BoxProps, Factory } from '@mantine-vue/core';
|
|
2
|
+
import type { StylesApiProps } from '@mantine-vue/core/styles-api';
|
|
3
|
+
import type { ScheduleLabelsOverride } from '../../../labels';
|
|
4
|
+
import type { ScheduleViewLevel } from '../../../types';
|
|
5
|
+
export type ViewSelectStylesNames = 'viewSelect';
|
|
6
|
+
/** Props declared by `ViewSelect` itself. See `ViewSelectProps` for the full public type. */
|
|
7
|
+
export interface ViewSelectOwnProps extends StylesApiProps<ViewSelectFactory> {
|
|
8
|
+
/**
|
|
9
|
+
* View levels offered by the select, in display order.
|
|
10
|
+
* @default ['day', 'week', 'month', 'year']
|
|
11
|
+
*/
|
|
12
|
+
views?: readonly ScheduleViewLevel[];
|
|
13
|
+
/** Currently selected view level, bound with `v-model`. */
|
|
14
|
+
modelValue?: ScheduleViewLevel;
|
|
15
|
+
/**
|
|
16
|
+
* Currently selected view level.
|
|
17
|
+
* @deprecated Use `v-model` or `modelValue` instead.
|
|
18
|
+
*/
|
|
19
|
+
value?: ScheduleViewLevel;
|
|
20
|
+
/** Key of `theme.radius` or any valid CSS value to set `border-radius`. */
|
|
21
|
+
radius?: string | number;
|
|
22
|
+
/** Label overrides, merged over the ones provided by the surrounding `ScheduleHeader`. */
|
|
23
|
+
labels?: ScheduleLabelsOverride;
|
|
24
|
+
}
|
|
25
|
+
export interface ViewSelectProps extends Omit<BoxProps, keyof ViewSelectOwnProps>, ViewSelectOwnProps {
|
|
26
|
+
}
|
|
27
|
+
export interface ViewSelectEmits {
|
|
28
|
+
/** Emitted when another view level is selected, bound with `v-model`. */
|
|
29
|
+
'update:modelValue': [value: ScheduleViewLevel];
|
|
30
|
+
/** Emitted when another view level is selected. */
|
|
31
|
+
change: [value: ScheduleViewLevel];
|
|
32
|
+
}
|
|
33
|
+
export type ViewSelectFactory = Factory<{
|
|
34
|
+
props: Omit<ViewSelectProps, 'rootRef'>;
|
|
35
|
+
emits: ViewSelectEmits;
|
|
36
|
+
ref: HTMLDivElement;
|
|
37
|
+
element: 'div';
|
|
38
|
+
stylesNames: ViewSelectStylesNames;
|
|
39
|
+
}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ViewSelectOwnProps } from './ViewSelect.types';
|
|
2
|
+
import type { ScheduleViewLevel } from '../../../types';
|
|
3
|
+
declare const defaultProps: {
|
|
4
|
+
readonly views: readonly ["day", "week", "month", "year"];
|
|
5
|
+
};
|
|
6
|
+
declare const SWITCH_LABELS: Record<ScheduleViewLevel, 'switchToDayView' | 'switchToWeekView' | 'switchToMonthView' | 'switchToYearView'>;
|
|
7
|
+
export { defaultProps, SWITCH_LABELS };
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<ViewSelectOwnProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
change: (value: ScheduleViewLevel) => any;
|
|
12
|
+
"update:modelValue": (value: ScheduleViewLevel) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<ViewSelectOwnProps> & Readonly<{
|
|
14
|
+
onChange?: ((value: ScheduleViewLevel) => any) | undefined;
|
|
15
|
+
"onUpdate:modelValue"?: ((value: ScheduleViewLevel) => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export type { ViewSelectProps, ViewSelectStylesNames } from '../ScheduleHeader';
|
|
1
|
+
export * from './ViewSelect';
|
|
@@ -1,294 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
export declare const WeekView: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
13
|
-
withCurrentTimeIndicator: {
|
|
14
|
-
type: BooleanConstructor;
|
|
15
|
-
default: boolean;
|
|
16
|
-
};
|
|
17
|
-
forceCurrentTimeIndicator: BooleanConstructor;
|
|
18
|
-
firstDayOfWeek: {
|
|
19
|
-
type: PropType<DayOfWeek>;
|
|
20
|
-
default: number;
|
|
21
|
-
};
|
|
22
|
-
weekdayFormat: {
|
|
23
|
-
type: PropType<DateLabelFormat>;
|
|
24
|
-
default: string;
|
|
25
|
-
};
|
|
26
|
-
dayFormat: {
|
|
27
|
-
type: PropType<DateLabelFormat>;
|
|
28
|
-
default: string;
|
|
29
|
-
};
|
|
30
|
-
withWeekNumber: {
|
|
31
|
-
type: BooleanConstructor;
|
|
32
|
-
default: boolean;
|
|
33
|
-
};
|
|
34
|
-
withAllDaySlots: {
|
|
35
|
-
type: BooleanConstructor;
|
|
36
|
-
default: boolean;
|
|
37
|
-
};
|
|
38
|
-
withWeekNumbers: {
|
|
39
|
-
type: BooleanConstructor;
|
|
40
|
-
default: undefined;
|
|
41
|
-
};
|
|
42
|
-
withAllDaySlot: {
|
|
43
|
-
type: BooleanConstructor;
|
|
44
|
-
default: undefined;
|
|
45
|
-
};
|
|
46
|
-
allDaySlotsHeight: {
|
|
47
|
-
type: PropType<CSSProperties["height"]>;
|
|
48
|
-
default: number;
|
|
49
|
-
};
|
|
50
|
-
maxAllDayEvents: {
|
|
51
|
-
type: NumberConstructor;
|
|
52
|
-
default: number;
|
|
53
|
-
};
|
|
54
|
-
weekendDays: {
|
|
55
|
-
type: PropType<DayOfWeek[]>;
|
|
56
|
-
default: () => number[];
|
|
57
|
-
};
|
|
58
|
-
withWeekendDays: {
|
|
59
|
-
type: BooleanConstructor;
|
|
60
|
-
default: boolean;
|
|
61
|
-
};
|
|
62
|
-
weekLabelFormat: {
|
|
63
|
-
type: PropType<DateLabelFormat>;
|
|
64
|
-
default: string;
|
|
65
|
-
};
|
|
66
|
-
renderWeekLabel: PropType<WeekViewProps["renderWeekLabel"]>;
|
|
67
|
-
startTime: {
|
|
68
|
-
type: StringConstructor;
|
|
69
|
-
default: string;
|
|
70
|
-
};
|
|
71
|
-
endTime: {
|
|
72
|
-
type: StringConstructor;
|
|
73
|
-
default: string;
|
|
74
|
-
};
|
|
75
|
-
intervalMinutes: {
|
|
76
|
-
type: NumberConstructor;
|
|
77
|
-
default: number;
|
|
78
|
-
};
|
|
79
|
-
slotLabelFormat: {
|
|
80
|
-
type: PropType<DateLabelFormat>;
|
|
81
|
-
default: string;
|
|
82
|
-
};
|
|
83
|
-
withCurrentTimeBubble: {
|
|
84
|
-
type: BooleanConstructor;
|
|
85
|
-
default: boolean;
|
|
86
|
-
};
|
|
87
|
-
getCurrentTime: PropType<() => import("../..").AnyDateValue>;
|
|
88
|
-
slotHeight: {
|
|
89
|
-
type: PropType<CSSProperties["height"]>;
|
|
90
|
-
default: number;
|
|
91
|
-
};
|
|
92
|
-
highlightBusinessHours: BooleanConstructor;
|
|
93
|
-
businessHours: PropType<import("../..").BusinessHoursValue>;
|
|
94
|
-
withEventsDragAndDrop: BooleanConstructor;
|
|
95
|
-
onEventDrop: PropType<(data: import("../../component-props").EventDropData) => void>;
|
|
96
|
-
canDragEvent: PropType<(event: import("../..").ScheduleEventData) => boolean>;
|
|
97
|
-
onEventDragStart: PropType<(event: import("../..").ScheduleEventData) => void>;
|
|
98
|
-
onEventDragEnd: PropType<() => void>;
|
|
99
|
-
onTimeSlotClick: PropType<(data: import("../../component-props").TimeSlotClickData) => void>;
|
|
100
|
-
onAllDaySlotClick: PropType<(date: DateStringValue, nativeEvent: MouseEvent) => void>;
|
|
101
|
-
withDragSlotSelect: BooleanConstructor;
|
|
102
|
-
onSlotDragEnd: FunctionConstructor;
|
|
103
|
-
startScrollTime: StringConstructor;
|
|
104
|
-
onExternalEventDrop: FunctionConstructor;
|
|
105
|
-
withEventResize: BooleanConstructor;
|
|
106
|
-
onEventResize: PropType<(data: import("../../component-props").EventDropData) => void>;
|
|
107
|
-
canResizeEvent: PropType<(event: import("../..").ScheduleEventData) => boolean>;
|
|
108
|
-
date: {
|
|
109
|
-
type: PropType<Date | DateStringValue>;
|
|
110
|
-
required: boolean;
|
|
111
|
-
};
|
|
112
|
-
onDateChange: PropType<(date: DateStringValue) => void>;
|
|
113
|
-
events: PropType<import("../..").ScheduleEventData[]>;
|
|
114
|
-
locale: StringConstructor;
|
|
115
|
-
radius: PropType<string | number>;
|
|
116
|
-
labels: ObjectConstructor;
|
|
117
|
-
mode: {
|
|
118
|
-
type: PropType<import("../..").ScheduleMode>;
|
|
119
|
-
default: string;
|
|
120
|
-
};
|
|
121
|
-
withHeader: {
|
|
122
|
-
type: BooleanConstructor;
|
|
123
|
-
default: boolean;
|
|
124
|
-
};
|
|
125
|
-
onViewChange: PropType<(view: import("../..").ScheduleViewLevel) => void>;
|
|
126
|
-
previousControlProps: PropType<import("../../component-props").NativeButtonProps>;
|
|
127
|
-
nextControlProps: PropType<import("../../component-props").NativeButtonProps>;
|
|
128
|
-
todayControlProps: PropType<import("../../component-props").NativeButtonProps>;
|
|
129
|
-
viewSelectProps: ObjectConstructor;
|
|
130
|
-
renderEventBody: PropType<import("../ScheduleEvent").RenderEventBody>;
|
|
131
|
-
renderEvent: PropType<import("../ScheduleEvent").RenderEvent>;
|
|
132
|
-
onEventClick: PropType<(event: import("../..").ScheduleEventData, nativeEvent: MouseEvent) => void>;
|
|
133
|
-
recurrenceExpansionLimit: {
|
|
134
|
-
type: NumberConstructor;
|
|
135
|
-
default: number;
|
|
136
|
-
};
|
|
137
|
-
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
138
|
-
[key: string]: any;
|
|
139
|
-
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
140
|
-
withCurrentTimeIndicator: {
|
|
141
|
-
type: BooleanConstructor;
|
|
142
|
-
default: boolean;
|
|
143
|
-
};
|
|
144
|
-
forceCurrentTimeIndicator: BooleanConstructor;
|
|
145
|
-
firstDayOfWeek: {
|
|
146
|
-
type: PropType<DayOfWeek>;
|
|
147
|
-
default: number;
|
|
148
|
-
};
|
|
149
|
-
weekdayFormat: {
|
|
150
|
-
type: PropType<DateLabelFormat>;
|
|
151
|
-
default: string;
|
|
152
|
-
};
|
|
153
|
-
dayFormat: {
|
|
154
|
-
type: PropType<DateLabelFormat>;
|
|
155
|
-
default: string;
|
|
156
|
-
};
|
|
157
|
-
withWeekNumber: {
|
|
158
|
-
type: BooleanConstructor;
|
|
159
|
-
default: boolean;
|
|
160
|
-
};
|
|
161
|
-
withAllDaySlots: {
|
|
162
|
-
type: BooleanConstructor;
|
|
163
|
-
default: boolean;
|
|
164
|
-
};
|
|
165
|
-
withWeekNumbers: {
|
|
166
|
-
type: BooleanConstructor;
|
|
167
|
-
default: undefined;
|
|
168
|
-
};
|
|
169
|
-
withAllDaySlot: {
|
|
170
|
-
type: BooleanConstructor;
|
|
171
|
-
default: undefined;
|
|
172
|
-
};
|
|
173
|
-
allDaySlotsHeight: {
|
|
174
|
-
type: PropType<CSSProperties["height"]>;
|
|
175
|
-
default: number;
|
|
176
|
-
};
|
|
177
|
-
maxAllDayEvents: {
|
|
178
|
-
type: NumberConstructor;
|
|
179
|
-
default: number;
|
|
180
|
-
};
|
|
181
|
-
weekendDays: {
|
|
182
|
-
type: PropType<DayOfWeek[]>;
|
|
183
|
-
default: () => number[];
|
|
184
|
-
};
|
|
185
|
-
withWeekendDays: {
|
|
186
|
-
type: BooleanConstructor;
|
|
187
|
-
default: boolean;
|
|
188
|
-
};
|
|
189
|
-
weekLabelFormat: {
|
|
190
|
-
type: PropType<DateLabelFormat>;
|
|
191
|
-
default: string;
|
|
192
|
-
};
|
|
193
|
-
renderWeekLabel: PropType<WeekViewProps["renderWeekLabel"]>;
|
|
194
|
-
startTime: {
|
|
195
|
-
type: StringConstructor;
|
|
196
|
-
default: string;
|
|
197
|
-
};
|
|
198
|
-
endTime: {
|
|
199
|
-
type: StringConstructor;
|
|
200
|
-
default: string;
|
|
201
|
-
};
|
|
202
|
-
intervalMinutes: {
|
|
203
|
-
type: NumberConstructor;
|
|
204
|
-
default: number;
|
|
205
|
-
};
|
|
206
|
-
slotLabelFormat: {
|
|
207
|
-
type: PropType<DateLabelFormat>;
|
|
208
|
-
default: string;
|
|
209
|
-
};
|
|
210
|
-
withCurrentTimeBubble: {
|
|
211
|
-
type: BooleanConstructor;
|
|
212
|
-
default: boolean;
|
|
213
|
-
};
|
|
214
|
-
getCurrentTime: PropType<() => import("../..").AnyDateValue>;
|
|
215
|
-
slotHeight: {
|
|
216
|
-
type: PropType<CSSProperties["height"]>;
|
|
217
|
-
default: number;
|
|
218
|
-
};
|
|
219
|
-
highlightBusinessHours: BooleanConstructor;
|
|
220
|
-
businessHours: PropType<import("../..").BusinessHoursValue>;
|
|
221
|
-
withEventsDragAndDrop: BooleanConstructor;
|
|
222
|
-
onEventDrop: PropType<(data: import("../../component-props").EventDropData) => void>;
|
|
223
|
-
canDragEvent: PropType<(event: import("../..").ScheduleEventData) => boolean>;
|
|
224
|
-
onEventDragStart: PropType<(event: import("../..").ScheduleEventData) => void>;
|
|
225
|
-
onEventDragEnd: PropType<() => void>;
|
|
226
|
-
onTimeSlotClick: PropType<(data: import("../../component-props").TimeSlotClickData) => void>;
|
|
227
|
-
onAllDaySlotClick: PropType<(date: DateStringValue, nativeEvent: MouseEvent) => void>;
|
|
228
|
-
withDragSlotSelect: BooleanConstructor;
|
|
229
|
-
onSlotDragEnd: FunctionConstructor;
|
|
230
|
-
startScrollTime: StringConstructor;
|
|
231
|
-
onExternalEventDrop: FunctionConstructor;
|
|
232
|
-
withEventResize: BooleanConstructor;
|
|
233
|
-
onEventResize: PropType<(data: import("../../component-props").EventDropData) => void>;
|
|
234
|
-
canResizeEvent: PropType<(event: import("../..").ScheduleEventData) => boolean>;
|
|
235
|
-
date: {
|
|
236
|
-
type: PropType<Date | DateStringValue>;
|
|
237
|
-
required: boolean;
|
|
238
|
-
};
|
|
239
|
-
onDateChange: PropType<(date: DateStringValue) => void>;
|
|
240
|
-
events: PropType<import("../..").ScheduleEventData[]>;
|
|
241
|
-
locale: StringConstructor;
|
|
242
|
-
radius: PropType<string | number>;
|
|
243
|
-
labels: ObjectConstructor;
|
|
244
|
-
mode: {
|
|
245
|
-
type: PropType<import("../..").ScheduleMode>;
|
|
246
|
-
default: string;
|
|
247
|
-
};
|
|
248
|
-
withHeader: {
|
|
249
|
-
type: BooleanConstructor;
|
|
250
|
-
default: boolean;
|
|
251
|
-
};
|
|
252
|
-
onViewChange: PropType<(view: import("../..").ScheduleViewLevel) => void>;
|
|
253
|
-
previousControlProps: PropType<import("../../component-props").NativeButtonProps>;
|
|
254
|
-
nextControlProps: PropType<import("../../component-props").NativeButtonProps>;
|
|
255
|
-
todayControlProps: PropType<import("../../component-props").NativeButtonProps>;
|
|
256
|
-
viewSelectProps: ObjectConstructor;
|
|
257
|
-
renderEventBody: PropType<import("../ScheduleEvent").RenderEventBody>;
|
|
258
|
-
renderEvent: PropType<import("../ScheduleEvent").RenderEvent>;
|
|
259
|
-
onEventClick: PropType<(event: import("../..").ScheduleEventData, nativeEvent: MouseEvent) => void>;
|
|
260
|
-
recurrenceExpansionLimit: {
|
|
261
|
-
type: NumberConstructor;
|
|
262
|
-
default: number;
|
|
263
|
-
};
|
|
264
|
-
}>> & Readonly<{}>, {
|
|
265
|
-
mode: import("../..").ScheduleMode;
|
|
266
|
-
firstDayOfWeek: DayOfWeek;
|
|
267
|
-
weekendDays: DayOfWeek[];
|
|
268
|
-
withWeekNumbers: boolean;
|
|
269
|
-
weekdayFormat: DateLabelFormat;
|
|
270
|
-
startTime: string;
|
|
271
|
-
endTime: string;
|
|
272
|
-
intervalMinutes: number;
|
|
273
|
-
withWeekendDays: boolean;
|
|
274
|
-
slotHeight: import("csstype").Property.Height<string | number> | undefined;
|
|
275
|
-
highlightBusinessHours: boolean;
|
|
276
|
-
withHeader: boolean;
|
|
277
|
-
recurrenceExpansionLimit: number;
|
|
278
|
-
withEventsDragAndDrop: boolean;
|
|
279
|
-
withDragSlotSelect: boolean;
|
|
280
|
-
withEventResize: boolean;
|
|
281
|
-
withAllDaySlot: boolean;
|
|
282
|
-
maxAllDayEvents: number;
|
|
283
|
-
slotLabelFormat: DateLabelFormat;
|
|
284
|
-
withCurrentTimeIndicator: boolean;
|
|
285
|
-
withCurrentTimeBubble: boolean;
|
|
286
|
-
weekLabelFormat: DateLabelFormat;
|
|
287
|
-
forceCurrentTimeIndicator: boolean;
|
|
288
|
-
dayFormat: DateLabelFormat;
|
|
289
|
-
withWeekNumber: boolean;
|
|
290
|
-
withAllDaySlots: boolean;
|
|
291
|
-
allDaySlotsHeight: import("csstype").Property.Height<string | number> | undefined;
|
|
292
|
-
}, SlotsType<WeekViewSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
293
|
-
export type { WeekViewProps };
|
|
294
|
-
export type WeekViewStylesNames = 'weekView' | 'weekViewRoot' | 'weekViewHeader' | 'weekViewInner' | 'weekViewAllDaySlotsEvents' | 'weekViewAllDaySlots' | 'weekViewAllDaySlotsList' | 'weekViewAllDaySlot' | 'weekViewAllDaySlotsLabel' | 'weekViewScrollArea' | 'weekViewCorner' | 'weekViewSlotLabels' | 'weekViewSlotLabel' | 'weekViewDayLabel' | 'weekViewDayWeekday' | 'weekViewDay' | 'weekViewDayNumber' | 'weekViewDaySlot' | 'weekViewDaySlots' | 'weekViewWeekLabel' | 'weekViewWeekNumber' | 'weekViewBackgroundEvent';
|
|
1
|
+
export declare const WeekView: import("@mantine-vue/core").MantineComponent<{
|
|
2
|
+
props: Omit<import("./WeekView.types").WeekViewProps, "rootRef">;
|
|
3
|
+
slots: import("./WeekView.types").WeekViewSlots;
|
|
4
|
+
emits: import("./WeekView.types").WeekViewEmits;
|
|
5
|
+
ref: HTMLDivElement;
|
|
6
|
+
element: "div";
|
|
7
|
+
stylesNames: import("./WeekView.types").WeekViewStylesNames;
|
|
8
|
+
vars: import("./WeekView.types").WeekViewCssVariables;
|
|
9
|
+
}>;
|
|
10
|
+
export type { WeekLabelPayload, WeekViewCssVariables, WeekViewEmits, WeekViewFactory, WeekViewOwnProps, WeekViewOwnStylesNames, WeekViewProps, WeekViewSlots, WeekViewStylesNames, } from './WeekView.types';
|
|
@@ -0,0 +1,129 @@
|
|
|
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 { EventSlots, ForwardedProps, TimeViewEmits, TimeViewOwnProps } from '../../component-props';
|
|
5
|
+
import type { DateLabelFormat, DateStringValue, DayOfWeek } from '../../types';
|
|
6
|
+
import type { CurrentTimeIndicatorStylesNames } from '../CurrentTimeIndicator/CurrentTimeIndicator.types';
|
|
7
|
+
import type { ScheduleEventStylesNames } from '../ScheduleEvent/ScheduleEvent.types';
|
|
8
|
+
import type { CombinedScheduleHeaderStylesNames } from '../ScheduleHeader/ScheduleHeader.types';
|
|
9
|
+
export type WeekViewOwnStylesNames = 'weekView' | 'weekViewRoot' | 'weekViewHeader' | 'weekViewInner' | 'weekViewAllDaySlotsEvents' | 'weekViewAllDaySlots' | 'weekViewAllDaySlotsList' | 'weekViewAllDaySlotsLabel' | 'weekViewScrollArea' | 'weekViewCorner' | 'weekViewSlotLabels' | 'weekViewSlotLabel' | 'weekViewDayLabel' | 'weekViewDayWeekday' | 'weekViewDay' | 'weekViewDayNumber' | 'weekViewDaySlot' | 'weekViewDaySlots' | 'weekViewWeekLabel' | 'weekViewWeekNumber' | 'weekViewBackgroundEvent';
|
|
10
|
+
/**
|
|
11
|
+
* `WeekView` forwards `classNames` and `styles` to the components it renders, so their
|
|
12
|
+
* selectors are part of its Styles API.
|
|
13
|
+
*/
|
|
14
|
+
export type WeekViewStylesNames = WeekViewOwnStylesNames | ScheduleEventStylesNames | CurrentTimeIndicatorStylesNames | CombinedScheduleHeaderStylesNames;
|
|
15
|
+
export type WeekViewCssVariables = {
|
|
16
|
+
weekView: '--week-view-radius' | '--week-view-slot-height' | '--week-view-all-day-slots-height';
|
|
17
|
+
};
|
|
18
|
+
/** Range covered by the label shown in the week header. */
|
|
19
|
+
export interface WeekLabelPayload {
|
|
20
|
+
/** First day of the week, `YYYY-MM-DD`. */
|
|
21
|
+
weekStart: DateStringValue;
|
|
22
|
+
/** Last day of the week, `YYYY-MM-DD`. */
|
|
23
|
+
weekEnd: DateStringValue;
|
|
24
|
+
}
|
|
25
|
+
export interface WeekViewSlots extends EventSlots {
|
|
26
|
+
/**
|
|
27
|
+
* Replaces the label shown between the navigation controls.
|
|
28
|
+
* Takes precedence over `renderWeekLabel`.
|
|
29
|
+
*/
|
|
30
|
+
weekLabel?: (props: WeekLabelPayload) => VNodeChild;
|
|
31
|
+
}
|
|
32
|
+
/** Props declared by `WeekView` itself. See `WeekViewProps` for the full public type. */
|
|
33
|
+
export interface WeekViewOwnProps extends TimeViewOwnProps, StylesApiProps<WeekViewFactory> {
|
|
34
|
+
/**
|
|
35
|
+
* Length of one time slot in minutes.
|
|
36
|
+
* @default 60
|
|
37
|
+
*/
|
|
38
|
+
intervalMinutes?: number;
|
|
39
|
+
/**
|
|
40
|
+
* If set, a line marking the current time is displayed.
|
|
41
|
+
* @default true
|
|
42
|
+
*/
|
|
43
|
+
withCurrentTimeIndicator?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* If set, the current time indicator is shown on the matching weekday even when another
|
|
46
|
+
* week is displayed.
|
|
47
|
+
* @default false
|
|
48
|
+
*/
|
|
49
|
+
forceCurrentTimeIndicator?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Day the week starts on, `0` – Sunday.
|
|
52
|
+
* @default 1
|
|
53
|
+
*/
|
|
54
|
+
firstDayOfWeek?: DayOfWeek;
|
|
55
|
+
/**
|
|
56
|
+
* Format of the weekday names in the header.
|
|
57
|
+
* @default 'ddd'
|
|
58
|
+
*/
|
|
59
|
+
weekdayFormat?: DateLabelFormat;
|
|
60
|
+
/**
|
|
61
|
+
* Format of the day numbers in the header.
|
|
62
|
+
* @default 'D'
|
|
63
|
+
*/
|
|
64
|
+
dayFormat?: DateLabelFormat;
|
|
65
|
+
/**
|
|
66
|
+
* If set, the week number is displayed in the top-left corner.
|
|
67
|
+
* @default true
|
|
68
|
+
*/
|
|
69
|
+
withWeekNumber?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* If set, the week number is displayed in the top-left corner.
|
|
72
|
+
* @deprecated Use `withWeekNumber` instead.
|
|
73
|
+
*/
|
|
74
|
+
withWeekNumbers?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* If set, an all-day row is rendered above the time slots.
|
|
77
|
+
* @default true
|
|
78
|
+
*/
|
|
79
|
+
withAllDaySlots?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* If set, an all-day row is rendered above the time slots.
|
|
82
|
+
* @deprecated Use `withAllDaySlots` instead.
|
|
83
|
+
*/
|
|
84
|
+
withAllDaySlot?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Height of the all-day row.
|
|
87
|
+
* @default 44
|
|
88
|
+
*/
|
|
89
|
+
allDaySlotHeight?: CSSProperties['height'];
|
|
90
|
+
/**
|
|
91
|
+
* Height of the all-day row.
|
|
92
|
+
* @deprecated Use `allDaySlotHeight` instead.
|
|
93
|
+
*/
|
|
94
|
+
allDaySlotsHeight?: CSSProperties['height'];
|
|
95
|
+
/**
|
|
96
|
+
* Days marked as weekend, `0` – Sunday.
|
|
97
|
+
* @default [0, 6]
|
|
98
|
+
*/
|
|
99
|
+
weekendDays?: DayOfWeek[];
|
|
100
|
+
/**
|
|
101
|
+
* If set, weekend days are part of the week.
|
|
102
|
+
* @default true
|
|
103
|
+
*/
|
|
104
|
+
withWeekendDays?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Format of the week label shown in the header.
|
|
107
|
+
* @default 'MMM D'
|
|
108
|
+
*/
|
|
109
|
+
weekLabelFormat?: DateLabelFormat;
|
|
110
|
+
/**
|
|
111
|
+
* Replaces the label shown between the navigation controls. Can also be set with the
|
|
112
|
+
* `weekLabel` slot, which takes precedence over the prop.
|
|
113
|
+
*/
|
|
114
|
+
renderWeekLabel?: (payload: WeekLabelPayload) => VNodeChild;
|
|
115
|
+
/** Props passed to the `ScrollArea` that wraps the week grid. */
|
|
116
|
+
scrollAreaProps?: ForwardedProps<ScrollAreaProps>;
|
|
117
|
+
}
|
|
118
|
+
export interface WeekViewProps extends Omit<BoxProps, keyof WeekViewOwnProps>, WeekViewOwnProps {
|
|
119
|
+
}
|
|
120
|
+
export type WeekViewEmits = TimeViewEmits;
|
|
121
|
+
export type WeekViewFactory = Factory<{
|
|
122
|
+
props: Omit<WeekViewProps, 'rootRef'>;
|
|
123
|
+
slots: WeekViewSlots;
|
|
124
|
+
emits: WeekViewEmits;
|
|
125
|
+
ref: HTMLDivElement;
|
|
126
|
+
element: 'div';
|
|
127
|
+
stylesNames: WeekViewStylesNames;
|
|
128
|
+
vars: WeekViewCssVariables;
|
|
129
|
+
}>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { ScheduleEventData } from '../../types';
|
|
2
|
+
import type { WeekViewSlots } from './WeekView.types';
|
|
3
|
+
import type { WeekViewOwnProps } from './WeekView.types';
|
|
4
|
+
declare const defaultProps: {
|
|
5
|
+
mode: "default";
|
|
6
|
+
withHeader: true;
|
|
7
|
+
recurrenceExpansionLimit: number;
|
|
8
|
+
startTime: string;
|
|
9
|
+
endTime: string;
|
|
10
|
+
intervalMinutes: number;
|
|
11
|
+
slotLabelFormat: string;
|
|
12
|
+
withCurrentTimeIndicator: true;
|
|
13
|
+
withCurrentTimeBubble: true;
|
|
14
|
+
slotHeight: number;
|
|
15
|
+
firstDayOfWeek: 1;
|
|
16
|
+
weekdayFormat: string;
|
|
17
|
+
dayFormat: string;
|
|
18
|
+
withWeekNumber: true;
|
|
19
|
+
withAllDaySlots: true;
|
|
20
|
+
allDaySlotHeight: number;
|
|
21
|
+
weekendDays: (0 | 6)[];
|
|
22
|
+
withWeekendDays: true;
|
|
23
|
+
weekLabelFormat: string;
|
|
24
|
+
};
|
|
25
|
+
/** Vertical step between stacked all-day event rows, in px. */
|
|
26
|
+
declare const ALL_DAY_ROW_HEIGHT = 22;
|
|
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, ALL_DAY_ROW_HEIGHT };
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
31
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<WeekViewOwnProps, {}, {}, {}, {}, 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: import("../..").ScheduleViewLevel) => any;
|
|
37
|
+
eventDrop: (data: import("../..").EventDropData) => any;
|
|
38
|
+
timeSlotClick: (data: import("../..").TimeSlotClickData) => any;
|
|
39
|
+
allDaySlotClick: (date: string, nativeEvent: MouseEvent) => any;
|
|
40
|
+
slotDragEnd: (rangeStart: string, rangeEnd: string) => any;
|
|
41
|
+
externalEventDrop: (dataTransfer: DataTransfer, dropDateTime: string) => any;
|
|
42
|
+
eventResize: (data: import("../..").EventDropData) => any;
|
|
43
|
+
}, string, import("vue").PublicProps, Readonly<WeekViewOwnProps> & Readonly<{
|
|
44
|
+
onDateChange?: ((date: string) => any) | undefined;
|
|
45
|
+
onEventDragStart?: ((event: ScheduleEventData) => any) | undefined;
|
|
46
|
+
onEventDragEnd?: (() => any) | undefined;
|
|
47
|
+
onEventClick?: ((event: ScheduleEventData, nativeEvent: MouseEvent) => any) | undefined;
|
|
48
|
+
onViewChange?: ((view: import("../..").ScheduleViewLevel) => any) | undefined;
|
|
49
|
+
onEventDrop?: ((data: import("../..").EventDropData) => any) | undefined;
|
|
50
|
+
onTimeSlotClick?: ((data: import("../..").TimeSlotClickData) => any) | undefined;
|
|
51
|
+
onAllDaySlotClick?: ((date: string, nativeEvent: MouseEvent) => any) | undefined;
|
|
52
|
+
onSlotDragEnd?: ((rangeStart: string, rangeEnd: string) => any) | undefined;
|
|
53
|
+
onExternalEventDrop?: ((dataTransfer: DataTransfer, dropDateTime: string) => any) | undefined;
|
|
54
|
+
onEventResize?: ((data: import("../..").EventDropData) => any) | undefined;
|
|
55
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, WeekViewSlots>;
|
|
56
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
57
|
+
new (): {
|
|
58
|
+
$slots: S;
|
|
59
|
+
};
|
|
60
|
+
};
|