@emoo-ai/ui-vue 0.1.13 → 0.1.14
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/dist/components/EmooSchedule.vue.d.ts +81 -0
- package/dist/components/schedule-contract.d.ts +56 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2826 -2088
- package/dist/locales/cn.d.ts +28 -0
- package/dist/locales/en.d.ts +28 -0
- package/dist/locales.js +56 -0
- package/dist/styles.css +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { ScheduleCalendar, ScheduleEvent, ScheduleEventMove, ScheduleView } from './schedule-contract';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
events: ScheduleEvent[];
|
|
4
|
+
calendars?: ScheduleCalendar[];
|
|
5
|
+
view?: ScheduleView;
|
|
6
|
+
date?: string;
|
|
7
|
+
weekStartsOn?: number;
|
|
8
|
+
maxDayItems?: number;
|
|
9
|
+
showCalendars?: boolean;
|
|
10
|
+
draggable?: boolean;
|
|
11
|
+
showDetail?: boolean;
|
|
12
|
+
today?: string;
|
|
13
|
+
ariaLabel?: string;
|
|
14
|
+
};
|
|
15
|
+
declare var __VLS_79: {
|
|
16
|
+
event: {
|
|
17
|
+
id: string;
|
|
18
|
+
title: string;
|
|
19
|
+
start: string;
|
|
20
|
+
end?: string | undefined;
|
|
21
|
+
allDay?: boolean | undefined;
|
|
22
|
+
calendarId?: string | undefined;
|
|
23
|
+
kind?: import("./schedule-contract").ScheduleEventKind | undefined;
|
|
24
|
+
tone?: import("./schedule-contract").ScheduleTone | undefined;
|
|
25
|
+
status?: string | undefined;
|
|
26
|
+
statusTone?: import("./schedule-contract").ScheduleTone | undefined;
|
|
27
|
+
meta?: string | undefined;
|
|
28
|
+
description?: string | undefined;
|
|
29
|
+
done?: boolean | undefined;
|
|
30
|
+
};
|
|
31
|
+
calendar: {
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
owner?: string | undefined;
|
|
35
|
+
tone?: import("./schedule-contract").ScheduleTone | undefined;
|
|
36
|
+
visible?: boolean | undefined;
|
|
37
|
+
readonly?: boolean | undefined;
|
|
38
|
+
shareable?: boolean | undefined;
|
|
39
|
+
} | undefined;
|
|
40
|
+
};
|
|
41
|
+
type __VLS_Slots = {} & {
|
|
42
|
+
'detail-actions'?: (props: typeof __VLS_79) => any;
|
|
43
|
+
};
|
|
44
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
45
|
+
"update:view": (view: ScheduleView) => any;
|
|
46
|
+
"update:date": (date: string) => any;
|
|
47
|
+
"update:calendars": (calendars: ScheduleCalendar[]) => any;
|
|
48
|
+
"event-click": (event: ScheduleEvent) => any;
|
|
49
|
+
"event-move": (move: ScheduleEventMove) => any;
|
|
50
|
+
"day-click": (dayKey: string) => any;
|
|
51
|
+
"day-more": (dayKey: string) => any;
|
|
52
|
+
"share-calendar": (calendar: ScheduleCalendar) => any;
|
|
53
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
54
|
+
"onUpdate:view"?: ((view: ScheduleView) => any) | undefined;
|
|
55
|
+
"onUpdate:date"?: ((date: string) => any) | undefined;
|
|
56
|
+
"onUpdate:calendars"?: ((calendars: ScheduleCalendar[]) => any) | undefined;
|
|
57
|
+
"onEvent-click"?: ((event: ScheduleEvent) => any) | undefined;
|
|
58
|
+
"onEvent-move"?: ((move: ScheduleEventMove) => any) | undefined;
|
|
59
|
+
"onDay-click"?: ((dayKey: string) => any) | undefined;
|
|
60
|
+
"onDay-more"?: ((dayKey: string) => any) | undefined;
|
|
61
|
+
"onShare-calendar"?: ((calendar: ScheduleCalendar) => any) | undefined;
|
|
62
|
+
}>, {
|
|
63
|
+
view: ScheduleView;
|
|
64
|
+
draggable: boolean;
|
|
65
|
+
ariaLabel: string;
|
|
66
|
+
calendars: ScheduleCalendar[];
|
|
67
|
+
date: string;
|
|
68
|
+
weekStartsOn: number;
|
|
69
|
+
maxDayItems: number;
|
|
70
|
+
showCalendars: boolean;
|
|
71
|
+
showDetail: boolean;
|
|
72
|
+
today: string;
|
|
73
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
74
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
75
|
+
declare const _default: typeof __VLS_export;
|
|
76
|
+
export default _default;
|
|
77
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
78
|
+
new (): {
|
|
79
|
+
$slots: S;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export type ScheduleView = 'month' | 'week' | 'list';
|
|
2
|
+
export type ScheduleTone = 'brand' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';
|
|
3
|
+
export type ScheduleEventKind = 'meeting' | 'todo' | 'event' | (string & {});
|
|
4
|
+
export interface ScheduleCalendar {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
owner?: string;
|
|
8
|
+
tone?: ScheduleTone;
|
|
9
|
+
visible?: boolean;
|
|
10
|
+
readonly?: boolean;
|
|
11
|
+
shareable?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface ScheduleEvent {
|
|
14
|
+
id: string;
|
|
15
|
+
title: string;
|
|
16
|
+
start: string;
|
|
17
|
+
end?: string;
|
|
18
|
+
allDay?: boolean;
|
|
19
|
+
calendarId?: string;
|
|
20
|
+
kind?: ScheduleEventKind;
|
|
21
|
+
tone?: ScheduleTone;
|
|
22
|
+
status?: string;
|
|
23
|
+
statusTone?: ScheduleTone;
|
|
24
|
+
meta?: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
done?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface ScheduleEventMove {
|
|
29
|
+
event: ScheduleEvent;
|
|
30
|
+
fromDayKey: string;
|
|
31
|
+
dayKey: string;
|
|
32
|
+
deltaDays: number;
|
|
33
|
+
}
|
|
34
|
+
export declare function parseScheduleDate(input?: string | Date | null): Date | null;
|
|
35
|
+
export declare function scheduleDayKey(d: Date): string;
|
|
36
|
+
export declare function addScheduleDays(d: Date, n: number): Date;
|
|
37
|
+
export declare function addScheduleMonths(d: Date, n: number): Date;
|
|
38
|
+
export declare function startOfScheduleWeek(d: Date, weekStartsOn: number): Date;
|
|
39
|
+
export declare function buildMonthDays(anchor: Date, weekStartsOn?: number): Date[];
|
|
40
|
+
export declare function buildWeekDays(anchor: Date, weekStartsOn?: number): Date[];
|
|
41
|
+
export declare function scheduleDayDiff(fromKey: string, toKey: string): number;
|
|
42
|
+
export declare function shiftScheduleEventDates(ev: ScheduleEvent, deltaDays: number): {
|
|
43
|
+
start: string;
|
|
44
|
+
end?: string;
|
|
45
|
+
};
|
|
46
|
+
export interface ScheduleSegment {
|
|
47
|
+
event: ScheduleEvent;
|
|
48
|
+
dayKey: string;
|
|
49
|
+
isStart: boolean;
|
|
50
|
+
isEnd: boolean;
|
|
51
|
+
}
|
|
52
|
+
export declare function scheduleEventDaySpan(ev: ScheduleEvent): {
|
|
53
|
+
startKey: string;
|
|
54
|
+
endKey: string;
|
|
55
|
+
} | null;
|
|
56
|
+
export declare function segmentScheduleEvents(events: ScheduleEvent[], days: Date[], visibleCalendarIds?: Set<string> | null): Map<string, ScheduleSegment[]>;
|
package/dist/index.d.ts
CHANGED
|
@@ -27,6 +27,9 @@ export { default as EmooPagination } from './components/EmooPagination.vue';
|
|
|
27
27
|
export { default as EmooPopover } from './components/EmooPopover.vue';
|
|
28
28
|
export { default as EmooProgress } from './components/EmooProgress.vue';
|
|
29
29
|
export { default as EmooRoleSelect } from './components/EmooRoleSelect.vue';
|
|
30
|
+
export { default as EmooSchedule } from './components/EmooSchedule.vue';
|
|
31
|
+
export { parseScheduleDate, scheduleDayKey, addScheduleDays, addScheduleMonths, startOfScheduleWeek, buildMonthDays, buildWeekDays, segmentScheduleEvents, scheduleEventDaySpan, scheduleDayDiff, shiftScheduleEventDates, } from './components/schedule-contract';
|
|
32
|
+
export type { ScheduleView, ScheduleTone, ScheduleEventKind, ScheduleCalendar, ScheduleEvent, ScheduleEventMove, ScheduleSegment, } from './components/schedule-contract';
|
|
30
33
|
export { default as EmooSearchBox } from './components/EmooSearchBox.vue';
|
|
31
34
|
export { default as EmooSegmented } from './components/EmooSegmented.vue';
|
|
32
35
|
export { default as EmooSidebarShell } from './components/EmooSidebarShell.vue';
|