@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,50 @@
|
|
|
1
|
+
import type { ScheduleViewLevel } from '../../types';
|
|
2
|
+
import type { ScheduleSlots } from './Schedule.types';
|
|
3
|
+
import type { ScheduleOwnProps } from './Schedule.types';
|
|
4
|
+
declare const defaultProps: {
|
|
5
|
+
defaultView: "week";
|
|
6
|
+
mode: "default";
|
|
7
|
+
recurrenceExpansionLimit: number;
|
|
8
|
+
layout: "default";
|
|
9
|
+
};
|
|
10
|
+
export { defaultProps };
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ScheduleOwnProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
"update:date": (date: string) => any;
|
|
15
|
+
dateChange: (date: string) => any;
|
|
16
|
+
dayClick: (date: string, nativeEvent: MouseEvent) => any;
|
|
17
|
+
eventDragStart: (event: import("../..").ScheduleEventData) => any;
|
|
18
|
+
eventDragEnd: () => any;
|
|
19
|
+
eventClick: (event: import("../..").ScheduleEventData, nativeEvent: MouseEvent) => any;
|
|
20
|
+
viewChange: (view: ScheduleViewLevel) => any;
|
|
21
|
+
eventDrop: (data: import("../..").EventDropData) => any;
|
|
22
|
+
timeSlotClick: (data: import("../..").TimeSlotClickData) => any;
|
|
23
|
+
allDaySlotClick: (date: string, nativeEvent: MouseEvent) => any;
|
|
24
|
+
slotDragEnd: (rangeStart: string, rangeEnd: string) => any;
|
|
25
|
+
externalEventDrop: (dataTransfer: DataTransfer, dateTime: string) => any;
|
|
26
|
+
eventResize: (data: import("../..").EventDropData) => any;
|
|
27
|
+
monthClick: (month: string) => any;
|
|
28
|
+
"update:view": (view: ScheduleViewLevel) => any;
|
|
29
|
+
}, string, import("vue").PublicProps, Readonly<ScheduleOwnProps> & Readonly<{
|
|
30
|
+
"onUpdate:date"?: ((date: string) => any) | undefined;
|
|
31
|
+
onDateChange?: ((date: string) => any) | undefined;
|
|
32
|
+
onDayClick?: ((date: string, nativeEvent: MouseEvent) => any) | undefined;
|
|
33
|
+
onEventDragStart?: ((event: import("../..").ScheduleEventData) => any) | undefined;
|
|
34
|
+
onEventDragEnd?: (() => any) | undefined;
|
|
35
|
+
onEventClick?: ((event: import("../..").ScheduleEventData, nativeEvent: MouseEvent) => any) | undefined;
|
|
36
|
+
onViewChange?: ((view: ScheduleViewLevel) => any) | undefined;
|
|
37
|
+
onEventDrop?: ((data: import("../..").EventDropData) => any) | undefined;
|
|
38
|
+
onTimeSlotClick?: ((data: import("../..").TimeSlotClickData) => any) | undefined;
|
|
39
|
+
onAllDaySlotClick?: ((date: string, nativeEvent: MouseEvent) => any) | undefined;
|
|
40
|
+
onSlotDragEnd?: ((rangeStart: string, rangeEnd: string) => any) | undefined;
|
|
41
|
+
onExternalEventDrop?: ((dataTransfer: DataTransfer, dateTime: string) => any) | undefined;
|
|
42
|
+
onEventResize?: ((data: import("../..").EventDropData) => any) | undefined;
|
|
43
|
+
onMonthClick?: ((month: string) => any) | undefined;
|
|
44
|
+
"onUpdate:view"?: ((view: ScheduleViewLevel) => any) | undefined;
|
|
45
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ScheduleSlots>;
|
|
46
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
47
|
+
new (): {
|
|
48
|
+
$slots: S;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
@@ -1,88 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
event?: (props: ScheduleEventRenderProps & {
|
|
13
|
-
event: ScheduleEventData;
|
|
14
|
-
}) => VNodeChild;
|
|
15
|
-
}
|
|
16
|
-
export declare const ScheduleEvent: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
17
|
-
event: {
|
|
18
|
-
type: PropType<ScheduleEventData>;
|
|
19
|
-
required: true;
|
|
20
|
-
};
|
|
21
|
-
radius: {
|
|
22
|
-
type: PropType<string | number>;
|
|
23
|
-
default: string;
|
|
24
|
-
};
|
|
25
|
-
nowrap: BooleanConstructor;
|
|
26
|
-
autoSize: BooleanConstructor;
|
|
27
|
-
size: {
|
|
28
|
-
type: StringConstructor;
|
|
29
|
-
default: string;
|
|
30
|
-
};
|
|
31
|
-
renderEventBody: PropType<RenderEventBody>;
|
|
32
|
-
renderEvent: PropType<RenderEvent>;
|
|
33
|
-
hanging: PropType<ScheduleEventProps["hanging"]>;
|
|
34
|
-
draggable: BooleanConstructor;
|
|
35
|
-
onEventDragStart: PropType<(event: ScheduleEventData) => void>;
|
|
36
|
-
onEventDragEnd: PropType<() => void>;
|
|
37
|
-
isDragging: BooleanConstructor;
|
|
38
|
-
mode: {
|
|
39
|
-
type: PropType<ScheduleMode>;
|
|
40
|
-
default: string;
|
|
41
|
-
};
|
|
42
|
-
withResize: BooleanConstructor;
|
|
43
|
-
onResizeStart: PropType<(edge: "top" | "bottom", event: PointerEvent) => void>;
|
|
44
|
-
isResizing: BooleanConstructor;
|
|
45
|
-
}>, () => string | number | true | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
46
|
-
[key: string]: any;
|
|
47
|
-
}> | import("vue").VNodeArrayChildren, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
48
|
-
event: {
|
|
49
|
-
type: PropType<ScheduleEventData>;
|
|
50
|
-
required: true;
|
|
51
|
-
};
|
|
52
|
-
radius: {
|
|
53
|
-
type: PropType<string | number>;
|
|
54
|
-
default: string;
|
|
55
|
-
};
|
|
56
|
-
nowrap: BooleanConstructor;
|
|
57
|
-
autoSize: BooleanConstructor;
|
|
58
|
-
size: {
|
|
59
|
-
type: StringConstructor;
|
|
60
|
-
default: string;
|
|
61
|
-
};
|
|
62
|
-
renderEventBody: PropType<RenderEventBody>;
|
|
63
|
-
renderEvent: PropType<RenderEvent>;
|
|
64
|
-
hanging: PropType<ScheduleEventProps["hanging"]>;
|
|
65
|
-
draggable: BooleanConstructor;
|
|
66
|
-
onEventDragStart: PropType<(event: ScheduleEventData) => void>;
|
|
67
|
-
onEventDragEnd: PropType<() => void>;
|
|
68
|
-
isDragging: BooleanConstructor;
|
|
69
|
-
mode: {
|
|
70
|
-
type: PropType<ScheduleMode>;
|
|
71
|
-
default: string;
|
|
72
|
-
};
|
|
73
|
-
withResize: BooleanConstructor;
|
|
74
|
-
onResizeStart: PropType<(edge: "top" | "bottom", event: PointerEvent) => void>;
|
|
75
|
-
isResizing: BooleanConstructor;
|
|
76
|
-
}>> & Readonly<{}>, {
|
|
77
|
-
size: string;
|
|
78
|
-
radius: string | number;
|
|
79
|
-
nowrap: boolean;
|
|
80
|
-
mode: ScheduleMode;
|
|
81
|
-
draggable: boolean;
|
|
82
|
-
autoSize: boolean;
|
|
83
|
-
isDragging: boolean;
|
|
84
|
-
withResize: boolean;
|
|
85
|
-
isResizing: boolean;
|
|
86
|
-
}, SlotsType<ScheduleEventSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
87
|
-
export type { RenderEvent, RenderEventBody, ScheduleEventProps };
|
|
88
|
-
export type ScheduleEventStylesNames = 'event' | 'eventInner' | 'eventResizeHandle';
|
|
1
|
+
export declare const ScheduleEvent: import("@mantine-vue/core").MantineComponent<{
|
|
2
|
+
props: Omit<import("./ScheduleEvent.types").ScheduleEventProps, "rootRef">;
|
|
3
|
+
slots: import("./ScheduleEvent.types").ScheduleEventSlots;
|
|
4
|
+
emits: import("./ScheduleEvent.types").ScheduleEventEmits;
|
|
5
|
+
ref: HTMLButtonElement;
|
|
6
|
+
element: "button";
|
|
7
|
+
stylesNames: import("./ScheduleEvent.types").ScheduleEventStylesNames;
|
|
8
|
+
vars: import("./ScheduleEvent.types").ScheduleEventCssVariables;
|
|
9
|
+
}>;
|
|
10
|
+
export type { RenderEvent, RenderEventBody, ScheduleEventRenderProps } from '../../component-props';
|
|
11
|
+
export type { ScheduleEventCssVariables, ScheduleEventEmits, ScheduleEventFactory, ScheduleEventHanging, ScheduleEventOwnProps, ScheduleEventProps, ScheduleEventResizeEdge, ScheduleEventSlots, ScheduleEventStylesNames, } from './ScheduleEvent.types';
|
|
@@ -0,0 +1,109 @@
|
|
|
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 { RenderEvent, RenderEventBody, ScheduleEventRenderProps } from '../../component-props';
|
|
5
|
+
import type { ScheduleEventData, ScheduleMode } from '../../types';
|
|
6
|
+
export type ScheduleEventStylesNames = 'event' | 'eventInner' | 'eventResizeHandle';
|
|
7
|
+
export type ScheduleEventCssVariables = {
|
|
8
|
+
event: '--event-color' | '--event-bg' | '--event-hover' | '--event-radius';
|
|
9
|
+
};
|
|
10
|
+
/** Edge of the week or month the event continues past. */
|
|
11
|
+
export type ScheduleEventHanging = 'start' | 'end' | 'both' | 'none';
|
|
12
|
+
/** Edge of an event grabbed by a resize handle. */
|
|
13
|
+
export type ScheduleEventResizeEdge = 'top' | 'bottom';
|
|
14
|
+
export interface ScheduleEventSlots {
|
|
15
|
+
/** Fallback body, used when neither `renderEventBody` nor the `eventBody` slot is set. */
|
|
16
|
+
default?: () => VNodeChild;
|
|
17
|
+
/** Replaces the body of the event. Takes precedence over `renderEventBody`. */
|
|
18
|
+
eventBody?: (props: {
|
|
19
|
+
event: ScheduleEventData;
|
|
20
|
+
}) => VNodeChild;
|
|
21
|
+
/** Replaces the event entirely, root element included. Takes precedence over `renderEvent`. */
|
|
22
|
+
event?: (props: ScheduleEventRenderProps & {
|
|
23
|
+
event: ScheduleEventData;
|
|
24
|
+
}) => VNodeChild;
|
|
25
|
+
}
|
|
26
|
+
/** Props declared by `ScheduleEvent` itself. See `ScheduleEventProps` for the full public type. */
|
|
27
|
+
export interface ScheduleEventOwnProps extends StylesApiProps<ScheduleEventFactory> {
|
|
28
|
+
/** Event rendered by the component. */
|
|
29
|
+
event: ScheduleEventData;
|
|
30
|
+
/**
|
|
31
|
+
* Key of `theme.radius` or any valid CSS value to set `border-radius`.
|
|
32
|
+
* @default 'sm'
|
|
33
|
+
*/
|
|
34
|
+
radius?: string | number;
|
|
35
|
+
/**
|
|
36
|
+
* If set, the event title is truncated to a single line instead of wrapping.
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
39
|
+
nowrap?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* If set, the event stretches to fill the box it is positioned in. Used by the
|
|
42
|
+
* time-axis views, where position and size come from inline styles.
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
45
|
+
autoSize?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Controls font size and padding.
|
|
48
|
+
* @default 'sm'
|
|
49
|
+
*/
|
|
50
|
+
size?: 'sm' | 'md' | (string & {});
|
|
51
|
+
/**
|
|
52
|
+
* Replaces the body of the event. Can also be set with the `eventBody` slot,
|
|
53
|
+
* which takes precedence over the prop.
|
|
54
|
+
*/
|
|
55
|
+
renderEventBody?: RenderEventBody;
|
|
56
|
+
/**
|
|
57
|
+
* Replaces the event entirely, root element included. Can also be set with the
|
|
58
|
+
* `event` slot, which takes precedence over the prop.
|
|
59
|
+
*/
|
|
60
|
+
renderEvent?: RenderEvent;
|
|
61
|
+
/** Edge of the week or month the event continues past, used to flatten that corner. */
|
|
62
|
+
hanging?: ScheduleEventHanging;
|
|
63
|
+
/**
|
|
64
|
+
* If set, the event can be picked up with native drag and drop.
|
|
65
|
+
* @default false
|
|
66
|
+
*/
|
|
67
|
+
draggable?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* If set, the event is marked as being dragged. Set by the parent view while a drag
|
|
70
|
+
* driven by something other than this event is in progress.
|
|
71
|
+
* @default false
|
|
72
|
+
*/
|
|
73
|
+
isDragging?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Interaction mode. `static` removes the event from the tab order and disables
|
|
76
|
+
* clicking, dragging and resizing.
|
|
77
|
+
* @default 'default'
|
|
78
|
+
*/
|
|
79
|
+
mode?: ScheduleMode;
|
|
80
|
+
/**
|
|
81
|
+
* If set, resize handles are rendered on the top and bottom edges.
|
|
82
|
+
* @default false
|
|
83
|
+
*/
|
|
84
|
+
withResize?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* If set, the event is marked as being resized.
|
|
87
|
+
* @default false
|
|
88
|
+
*/
|
|
89
|
+
isResizing?: boolean;
|
|
90
|
+
}
|
|
91
|
+
export interface ScheduleEventProps extends Omit<BoxProps, keyof ScheduleEventOwnProps>, ScheduleEventOwnProps {
|
|
92
|
+
}
|
|
93
|
+
export interface ScheduleEventEmits {
|
|
94
|
+
/** Emitted when a native drag of this event starts. */
|
|
95
|
+
eventDragStart: [event: ScheduleEventData];
|
|
96
|
+
/** Emitted when a native drag of this event ends. */
|
|
97
|
+
eventDragEnd: [];
|
|
98
|
+
/** Emitted when a resize handle is pressed. */
|
|
99
|
+
resizeStart: [edge: ScheduleEventResizeEdge, event: PointerEvent];
|
|
100
|
+
}
|
|
101
|
+
export type ScheduleEventFactory = Factory<{
|
|
102
|
+
props: Omit<ScheduleEventProps, 'rootRef'>;
|
|
103
|
+
slots: ScheduleEventSlots;
|
|
104
|
+
emits: ScheduleEventEmits;
|
|
105
|
+
ref: HTMLButtonElement;
|
|
106
|
+
element: 'button';
|
|
107
|
+
stylesNames: ScheduleEventStylesNames;
|
|
108
|
+
vars: ScheduleEventCssVariables;
|
|
109
|
+
}>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ScheduleEventOwnProps, ScheduleEventResizeEdge, ScheduleEventSlots } from './ScheduleEvent.types';
|
|
2
|
+
declare const defaultProps: {
|
|
3
|
+
readonly radius: "sm";
|
|
4
|
+
readonly size: "sm";
|
|
5
|
+
readonly mode: "default";
|
|
6
|
+
};
|
|
7
|
+
declare const varsResolver: (theme: import("@mantine-vue/core").MantineTheme, props: any, ctx: Record<string, any>) => Record<string, Record<string, string | undefined>>;
|
|
8
|
+
export { defaultProps, varsResolver };
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ScheduleEventOwnProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
eventDragStart: (event: import("../..").ScheduleEventData) => any;
|
|
13
|
+
eventDragEnd: () => any;
|
|
14
|
+
resizeStart: (edge: ScheduleEventResizeEdge, event: PointerEvent) => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<ScheduleEventOwnProps> & Readonly<{
|
|
16
|
+
onEventDragStart?: ((event: import("../..").ScheduleEventData) => any) | undefined;
|
|
17
|
+
onEventDragEnd?: (() => any) | undefined;
|
|
18
|
+
onResizeStart?: ((edge: ScheduleEventResizeEdge, event: PointerEvent) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ScheduleEventSlots>;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const HeaderControl: import("@mantine-vue/core").MantineComponent<{
|
|
2
|
+
props: Omit<import("./HeaderControl.types").HeaderControlProps, "rootRef">;
|
|
3
|
+
slots: import("./HeaderControl.types").HeaderControlSlots;
|
|
4
|
+
ref: HTMLButtonElement;
|
|
5
|
+
element: "button";
|
|
6
|
+
stylesNames: import("./HeaderControl.types").HeaderControlStylesNames;
|
|
7
|
+
vars: import("./HeaderControl.types").HeaderControlCssVariables;
|
|
8
|
+
}>;
|
|
9
|
+
/** `HeaderControl` preset that navigates to the next period. */
|
|
10
|
+
export declare const ScheduleHeaderNext: import("@mantine-vue/core").MantineComponent<{
|
|
11
|
+
props: Omit<import("./HeaderControl.types").HeaderControlProps, "rootRef">;
|
|
12
|
+
slots: import("./HeaderControl.types").HeaderControlSlots;
|
|
13
|
+
ref: HTMLButtonElement;
|
|
14
|
+
element: "button";
|
|
15
|
+
stylesNames: import("./HeaderControl.types").HeaderControlStylesNames;
|
|
16
|
+
vars: import("./HeaderControl.types").HeaderControlCssVariables;
|
|
17
|
+
}>;
|
|
18
|
+
/** `HeaderControl` preset that navigates to the previous period. */
|
|
19
|
+
export declare const ScheduleHeaderPrevious: import("@mantine-vue/core").MantineComponent<{
|
|
20
|
+
props: Omit<import("./HeaderControl.types").HeaderControlProps, "rootRef">;
|
|
21
|
+
slots: import("./HeaderControl.types").HeaderControlSlots;
|
|
22
|
+
ref: HTMLButtonElement;
|
|
23
|
+
element: "button";
|
|
24
|
+
stylesNames: import("./HeaderControl.types").HeaderControlStylesNames;
|
|
25
|
+
vars: import("./HeaderControl.types").HeaderControlCssVariables;
|
|
26
|
+
}>;
|
|
27
|
+
/** `HeaderControl` preset that navigates to today. */
|
|
28
|
+
export declare const ScheduleHeaderToday: import("@mantine-vue/core").MantineComponent<{
|
|
29
|
+
props: Omit<import("./HeaderControl.types").HeaderControlProps, "rootRef">;
|
|
30
|
+
slots: import("./HeaderControl.types").HeaderControlSlots;
|
|
31
|
+
ref: HTMLButtonElement;
|
|
32
|
+
element: "button";
|
|
33
|
+
stylesNames: import("./HeaderControl.types").HeaderControlStylesNames;
|
|
34
|
+
vars: import("./HeaderControl.types").HeaderControlCssVariables;
|
|
35
|
+
}>;
|
|
36
|
+
export type { HeaderControlCssVariables, HeaderControlFactory, HeaderControlOwnProps, HeaderControlProps, HeaderControlSlots, HeaderControlStylesNames, } from './HeaderControl.types';
|
|
@@ -0,0 +1,44 @@
|
|
|
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 { ScheduleLabelsOverride } from '../../../labels';
|
|
5
|
+
export type HeaderControlStylesNames = 'headerControl';
|
|
6
|
+
export type HeaderControlCssVariables = {
|
|
7
|
+
headerControl: '--control-radius';
|
|
8
|
+
};
|
|
9
|
+
export interface HeaderControlSlots {
|
|
10
|
+
/** Control content. */
|
|
11
|
+
default?: () => VNodeChild;
|
|
12
|
+
}
|
|
13
|
+
/** Props declared by `HeaderControl` itself. See `HeaderControlProps` for the full public type. */
|
|
14
|
+
export interface HeaderControlOwnProps extends StylesApiProps<HeaderControlFactory> {
|
|
15
|
+
/**
|
|
16
|
+
* If set, the control is rendered in its active state.
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
active?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* If set, horizontal padding is removed so the control renders as a square.
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
square?: boolean;
|
|
25
|
+
/** Key of `theme.radius` or any valid CSS value to set `border-radius`. */
|
|
26
|
+
radius?: string | number;
|
|
27
|
+
/**
|
|
28
|
+
* If set to `false`, the control is not clickable and is removed from the tab order.
|
|
29
|
+
* @default true
|
|
30
|
+
*/
|
|
31
|
+
interactive?: boolean;
|
|
32
|
+
/** Label overrides, merged over the ones provided by the surrounding `ScheduleHeader`. */
|
|
33
|
+
labels?: ScheduleLabelsOverride;
|
|
34
|
+
}
|
|
35
|
+
export interface HeaderControlProps extends Omit<BoxProps, keyof HeaderControlOwnProps>, HeaderControlOwnProps {
|
|
36
|
+
}
|
|
37
|
+
export type HeaderControlFactory = Factory<{
|
|
38
|
+
props: Omit<HeaderControlProps, 'rootRef'>;
|
|
39
|
+
slots: HeaderControlSlots;
|
|
40
|
+
ref: HTMLButtonElement;
|
|
41
|
+
element: 'button';
|
|
42
|
+
stylesNames: HeaderControlStylesNames;
|
|
43
|
+
vars: HeaderControlCssVariables;
|
|
44
|
+
}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { HeaderControlOwnProps, HeaderControlSlots } from './HeaderControl.types';
|
|
2
|
+
declare const defaultProps: {
|
|
3
|
+
readonly interactive: true;
|
|
4
|
+
};
|
|
5
|
+
declare const varsResolver: (theme: import("@mantine-vue/core").MantineTheme, props: any, ctx: Record<string, any>) => Record<string, Record<string, string | undefined>>;
|
|
6
|
+
export { defaultProps, varsResolver };
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<HeaderControlOwnProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<HeaderControlOwnProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, HeaderControlSlots>;
|
|
10
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
11
|
+
new (): {
|
|
12
|
+
$slots: S;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { HeaderControlOwnProps, HeaderControlSlots } from './HeaderControl.types';
|
|
2
|
+
type __VLS_Slots = HeaderControlSlots;
|
|
3
|
+
declare const __VLS_base: import("vue").DefineComponent<HeaderControlOwnProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<HeaderControlOwnProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
4
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
7
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
8
|
+
new (): {
|
|
9
|
+
$slots: S;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { HeaderControlOwnProps, HeaderControlSlots } from './HeaderControl.types';
|
|
2
|
+
type __VLS_Slots = HeaderControlSlots;
|
|
3
|
+
declare const __VLS_base: import("vue").DefineComponent<HeaderControlOwnProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<HeaderControlOwnProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
4
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
7
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
8
|
+
new (): {
|
|
9
|
+
$slots: S;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { HeaderControlOwnProps, HeaderControlSlots } from './HeaderControl.types';
|
|
2
|
+
type __VLS_Slots = HeaderControlSlots;
|
|
3
|
+
declare const __VLS_base: import("vue").DefineComponent<HeaderControlOwnProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<HeaderControlOwnProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
4
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
7
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
8
|
+
new (): {
|
|
9
|
+
$slots: S;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export type { HeaderControlProps, HeaderControlStylesNames } from '../ScheduleHeader';
|
|
1
|
+
export * from './HeaderControl';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const MonthYearSelect: import("@mantine-vue/core").MantineComponent<{
|
|
2
|
+
props: Omit<import("./MonthYearSelect.types").MonthYearSelectProps, "rootRef">;
|
|
3
|
+
emits: import("./MonthYearSelect.types").MonthYearSelectEmits;
|
|
4
|
+
ref: HTMLButtonElement;
|
|
5
|
+
element: "button";
|
|
6
|
+
stylesNames: import("./MonthYearSelect.types").MonthYearSelectStylesNames;
|
|
7
|
+
}>;
|
|
8
|
+
export type { MonthYearSelectEmits, MonthYearSelectFactory, MonthYearSelectOwnProps, MonthYearSelectProps, MonthYearSelectStylesNames, } from './MonthYearSelect.types';
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { BoxProps, Factory } from '@mantine-vue/core';
|
|
2
|
+
import type { StylesApiProps } from '@mantine-vue/core/styles-api';
|
|
3
|
+
import type { NativeButtonProps } from '../../../component-props';
|
|
4
|
+
import type { ScheduleLabelsOverride } from '../../../labels';
|
|
5
|
+
import type { DateLabelFormat } from '../../../types';
|
|
6
|
+
export type MonthYearSelectStylesNames = 'monthYearSelectTarget' | 'monthYearSelectDropdown' | 'monthYearSelectControl' | 'monthYearSelectList' | 'monthYearSelectLabel';
|
|
7
|
+
/** Props declared by `MonthYearSelect` itself. See `MonthYearSelectProps` for the full public type. */
|
|
8
|
+
export interface MonthYearSelectOwnProps extends StylesApiProps<MonthYearSelectFactory> {
|
|
9
|
+
/**
|
|
10
|
+
* Locale passed down to `dayjs` when formatting the label and the month list.
|
|
11
|
+
* @default 'en'
|
|
12
|
+
*/
|
|
13
|
+
locale?: string;
|
|
14
|
+
/**
|
|
15
|
+
* First year offered by the dropdown.
|
|
16
|
+
* @default current year - 5
|
|
17
|
+
*/
|
|
18
|
+
startYear?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Last year offered by the dropdown.
|
|
21
|
+
* @default current year + 5
|
|
22
|
+
*/
|
|
23
|
+
endYear?: number;
|
|
24
|
+
/** Selected year, bound with `v-model:year-value`. */
|
|
25
|
+
yearValue?: number;
|
|
26
|
+
/** Selected month index, `0` – January. Bound with `v-model:month-value`. */
|
|
27
|
+
monthValue?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Format of the month entries in the dropdown.
|
|
30
|
+
* @default 'MMMM'
|
|
31
|
+
*/
|
|
32
|
+
monthsListFormat?: DateLabelFormat;
|
|
33
|
+
/**
|
|
34
|
+
* Format of the target control label.
|
|
35
|
+
* @default 'MMMM YYYY' when `withMonths` is set, 'YYYY' otherwise
|
|
36
|
+
*/
|
|
37
|
+
labelFormat?: DateLabelFormat;
|
|
38
|
+
/** Key of `theme.radius` or any valid CSS value to set `border-radius`. */
|
|
39
|
+
radius?: string | number;
|
|
40
|
+
/** Returns extra props for the control of the given year. */
|
|
41
|
+
getYearControlProps?: (year: number) => NativeButtonProps;
|
|
42
|
+
/** Returns extra props for the control of the given month. */
|
|
43
|
+
getMonthControlProps?: (month: number) => NativeButtonProps;
|
|
44
|
+
/**
|
|
45
|
+
* If set, the dropdown lists months next to the years.
|
|
46
|
+
* @default true
|
|
47
|
+
*/
|
|
48
|
+
withMonths?: boolean;
|
|
49
|
+
/** Label overrides, merged over the ones provided by the surrounding `ScheduleHeader`. */
|
|
50
|
+
labels?: ScheduleLabelsOverride;
|
|
51
|
+
}
|
|
52
|
+
export interface MonthYearSelectProps extends Omit<BoxProps, keyof MonthYearSelectOwnProps>, MonthYearSelectOwnProps {
|
|
53
|
+
}
|
|
54
|
+
export interface MonthYearSelectEmits {
|
|
55
|
+
/** Emitted when a year is picked, bound with `v-model:year-value`. */
|
|
56
|
+
'update:yearValue': [year: number];
|
|
57
|
+
/** Emitted when a month is picked, bound with `v-model:month-value`. */
|
|
58
|
+
'update:monthValue': [month: number];
|
|
59
|
+
/** Emitted when a year is picked. */
|
|
60
|
+
yearChange: [year: number];
|
|
61
|
+
/** Emitted when a month is picked. */
|
|
62
|
+
monthChange: [month: number];
|
|
63
|
+
}
|
|
64
|
+
export type MonthYearSelectFactory = Factory<{
|
|
65
|
+
props: Omit<MonthYearSelectProps, 'rootRef'>;
|
|
66
|
+
emits: MonthYearSelectEmits;
|
|
67
|
+
ref: HTMLButtonElement;
|
|
68
|
+
element: 'button';
|
|
69
|
+
stylesNames: MonthYearSelectStylesNames;
|
|
70
|
+
}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { MonthYearSelectOwnProps } from './MonthYearSelect.types';
|
|
2
|
+
declare const defaultProps: {
|
|
3
|
+
readonly monthsListFormat: "MMMM";
|
|
4
|
+
readonly withMonths: true;
|
|
5
|
+
};
|
|
6
|
+
/** Fallback radius of the dropdown, so it follows the schedule radius when one is set. */
|
|
7
|
+
declare const DEFAULT_DROPDOWN_RADIUS = "var(--schedule-radius, var(--mantine-radius-default))";
|
|
8
|
+
export { defaultProps, DEFAULT_DROPDOWN_RADIUS };
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<MonthYearSelectOwnProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
"update:yearValue": (year: number) => any;
|
|
13
|
+
"update:monthValue": (month: number) => any;
|
|
14
|
+
yearChange: (year: number) => any;
|
|
15
|
+
monthChange: (month: number) => any;
|
|
16
|
+
}, string, import("vue").PublicProps, Readonly<MonthYearSelectOwnProps> & Readonly<{
|
|
17
|
+
"onUpdate:yearValue"?: ((year: number) => any) | undefined;
|
|
18
|
+
"onUpdate:monthValue"?: ((month: number) => any) | undefined;
|
|
19
|
+
onYearChange?: ((year: number) => any) | undefined;
|
|
20
|
+
onMonthChange?: ((month: number) => any) | undefined;
|
|
21
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export type { MonthYearSelectProps, MonthYearSelectStylesNames } from '../ScheduleHeader';
|
|
1
|
+
export * from './MonthYearSelect';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ComputedRef } from 'vue';
|
|
2
|
+
import type { ScheduleLabelsOverride } from '../../labels';
|
|
3
|
+
/**
|
|
4
|
+
* Shares the header's `labels` with the compound components rendered inside it.
|
|
5
|
+
* A getter is provided rather than the value so the labels stay reactive.
|
|
6
|
+
*/
|
|
7
|
+
export declare function provideScheduleHeaderLabels(labels: () => ScheduleLabelsOverride | undefined): void;
|
|
8
|
+
/**
|
|
9
|
+
* Merges a control's own `labels` over the ones provided by the surrounding `ScheduleHeader`,
|
|
10
|
+
* so overriding a single key does not drop the rest. Must be called during `setup`.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useScheduleHeaderLabels(override: () => ScheduleLabelsOverride | undefined): ComputedRef<ScheduleLabelsOverride | undefined>;
|