vlite3 1.0.8 → 1.1.1
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/README.md +4 -1
- package/components/Accordion/Accordion.vue.d.ts +1 -1
- package/components/AvatarGroup/AvatarGroup.vue.d.ts +24 -0
- package/components/AvatarGroup/AvatarGroup.vue.js +91 -0
- package/components/AvatarGroup/AvatarGroup.vue2.js +4 -0
- package/components/AvatarGroup/index.d.ts +2 -0
- package/components/Barcode/Barcode.vue.js +6 -5
- package/components/Calendar/Calendar.vue.d.ts +229 -0
- package/components/Calendar/Calendar.vue.js +7 -0
- package/components/Calendar/Calendar.vue2.js +186 -0
- package/components/Calendar/CalendarEventItem.vue.d.ts +17 -0
- package/components/Calendar/CalendarEventItem.vue.js +111 -0
- package/components/Calendar/CalendarEventItem.vue2.js +4 -0
- package/components/Calendar/index.d.ts +2 -0
- package/components/CategoryManager/CategoryManager.vue.js +282 -0
- package/components/CategoryManager/CategoryManager.vue2.js +4 -0
- package/components/CategoryManager/CategoryNode.vue.js +224 -0
- package/components/CategoryManager/CategoryNode.vue2.js +4 -0
- package/components/Chat/ChatBubble.vue.js +22 -22
- package/components/Chat/ChatInterface.vue.js +35 -34
- package/components/CommandPalette/CommandPaletteContent.vue.js +1 -1
- package/components/CommandPalette/CommandPaletteContent.vue2.js +7 -7
- package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
- package/components/CustomFieldsDisplay/CustomFieldsDisplay.vue.d.ts +48 -0
- package/components/CustomFieldsDisplay/CustomFieldsDisplay.vue.js +97 -0
- package/components/CustomFieldsDisplay/CustomFieldsDisplay.vue2.js +4 -0
- package/components/CustomFieldsDisplay/index.d.ts +2 -0
- package/components/CustomFieldsDisplay/types.d.ts +18 -0
- package/components/DateTime/DateTime.vue.d.ts +2 -0
- package/components/DateTime/DateTime.vue.js +9 -23
- package/components/Dropdown/Dropdown.vue.d.ts +1 -1
- package/components/Dropdown/DropdownMenu.vue.d.ts +1 -1
- package/components/FilePicker/FilePicker.vue.js +133 -140
- package/components/Form/CustomFields.vue.d.ts +1 -1
- package/components/Form/Form.vue.d.ts +2 -0
- package/components/Form/Form.vue.js +1 -1
- package/components/Form/Form.vue2.js +291 -236
- package/components/Form/FormField.vue.js +281 -226
- package/components/Form/FormFields.vue.d.ts +8 -0
- package/components/Form/FormFields.vue.js +1 -1
- package/components/Form/FormFields.vue2.js +73 -68
- package/components/Form/FormSkeleton.vue.d.ts +9 -0
- package/components/Form/FormSkeleton.vue.js +50 -0
- package/components/Form/FormSkeleton.vue2.js +4 -0
- package/components/Form/composables/useForm.d.ts +2 -0
- package/components/Form/composables/useForm.js +182 -151
- package/components/Form/index.d.ts +1 -0
- package/components/Form/types.d.ts +3 -1
- package/components/Form/utils/form.utils.d.ts +6 -1
- package/components/Form/utils/form.utils.js +91 -79
- package/components/ImportData/ImportData.vue.js +48 -48
- package/components/ImportData/ImportStep2.vue.js +116 -5
- package/components/ImportData/ImportStep2.vue2.js +2 -105
- package/components/Invoice/Invoice.vue.d.ts +6 -0
- package/components/Invoice/Invoice.vue.js +31 -0
- package/components/Invoice/Invoice.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant1.vue.d.ts +10 -0
- package/components/Invoice/InvoiceVariant1.vue.js +314 -0
- package/components/Invoice/InvoiceVariant1.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant2.vue.d.ts +10 -0
- package/components/Invoice/InvoiceVariant2.vue.js +230 -0
- package/components/Invoice/InvoiceVariant2.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant3.vue.d.ts +10 -0
- package/components/Invoice/InvoiceVariant3.vue.js +249 -0
- package/components/Invoice/InvoiceVariant3.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant4.vue.d.ts +10 -0
- package/components/Invoice/InvoiceVariant4.vue.js +290 -0
- package/components/Invoice/InvoiceVariant4.vue2.js +4 -0
- package/components/Invoice/index.d.ts +2 -0
- package/components/Invoice/types.d.ts +93 -0
- package/components/List/ListFieldRow.vue.d.ts +8 -0
- package/components/List/ListFieldRow.vue.js +160 -187
- package/components/List/utils.d.ts +2 -3
- package/components/List/utils.js +8 -60
- package/components/Navbar/NavbarTabs.vue.js +2 -2
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +85 -79
- package/components/Screen/ScreenFilter.vue.js +6 -4
- package/components/Screen/components/ScreenQuickFilters.vue.js +6 -5
- package/components/SidePanel.vue.js +2 -2
- package/components/SidePanel.vue2.js +1 -1
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
- package/components/Slider.vue.js +54 -54
- package/components/Stats/StatItem.vue.d.ts +25 -0
- package/components/Stats/StatItem.vue.js +251 -0
- package/components/Stats/StatItem.vue2.js +4 -0
- package/components/Stats/Stats.vue.d.ts +3 -3
- package/components/Stats/Stats.vue.js +32 -351
- package/components/Stats/components/StatIconBox.vue.d.ts +13 -0
- package/components/Stats/components/StatIconBox.vue.js +82 -0
- package/components/Stats/components/StatIconBox.vue2.js +4 -0
- package/components/Stats/components/StatTrend.vue.d.ts +7 -0
- package/components/Stats/components/StatTrend.vue.js +48 -0
- package/components/Stats/components/StatTrend.vue2.js +4 -0
- package/components/StatusChip/status-map.js +36 -0
- package/components/Tabes/Tabes.vue.d.ts +1 -0
- package/components/Tabes/Tabes.vue.js +2 -2
- package/components/Tabes/Tabes.vue2.js +33 -32
- package/components/ThumbnailSelector/ThumbnailSelector.vue.d.ts +35 -0
- package/components/ThumbnailSelector/ThumbnailSelector.vue.js +7 -0
- package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +184 -0
- package/components/ThumbnailSelector/index.d.ts +2 -0
- package/index.d.ts +6 -0
- package/index.js +297 -265
- package/package.json +2 -1
- package/style.css +11 -9
- package/utils/functions.d.ts +59 -1
- package/utils/functions.js +157 -81
- package/utils/status.d.ts +5 -0
- package/utils/status.js +33 -0
package/README.md
CHANGED
|
@@ -88,7 +88,7 @@ const vlite = createVLite({
|
|
|
88
88
|
*
|
|
89
89
|
* This function will be called automatically by:
|
|
90
90
|
* - useFileUpload() composable
|
|
91
|
-
* - Form components (when using 'file', 'fileUploader', or 'avatarUpload' types)
|
|
91
|
+
* - Form components (when using 'file', 'fileUploader', 'ThumbnailSelector', or 'avatarUpload' types)
|
|
92
92
|
*
|
|
93
93
|
* @param file - The File object to upload
|
|
94
94
|
* @param folderId - (Optional) Folder ID passed from component props
|
|
@@ -419,9 +419,11 @@ Follow these rules strictly to ensure visual consistency and predictable styling
|
|
|
419
419
|
- [x] **NumberInput**
|
|
420
420
|
- [x] **DatePicker**
|
|
421
421
|
- [x] **DateRangePicker**
|
|
422
|
+
- [x] **Calendar**
|
|
422
423
|
- [x] **ColorPicker**
|
|
423
424
|
- [x] **FilePicker**
|
|
424
425
|
- [x] **AvatarUploader**
|
|
426
|
+
- [x] **ThumbnailSelector**
|
|
425
427
|
- [x] **IconPicker**
|
|
426
428
|
- [x] **MultiSelect**
|
|
427
429
|
- [x] **Forms**
|
|
@@ -448,6 +450,7 @@ Follow these rules strictly to ensure visual consistency and predictable styling
|
|
|
448
450
|
- [x] **Stats**
|
|
449
451
|
- [x] **Price**
|
|
450
452
|
- [x] **Date**
|
|
453
|
+
- [x] **Invoice**
|
|
451
454
|
|
|
452
455
|
### Feedback & Overlays
|
|
453
456
|
|
|
@@ -29,8 +29,8 @@ declare const __VLS_component: import('vue').DefineComponent<AccordionProps, {},
|
|
|
29
29
|
variant: import('./types').AccordionVariant;
|
|
30
30
|
size: import('./types').AccordionSize;
|
|
31
31
|
disabled: boolean;
|
|
32
|
-
items: import('./types').AccordionItemSchema[];
|
|
33
32
|
attached: boolean;
|
|
33
|
+
items: import('./types').AccordionItemSchema[];
|
|
34
34
|
showIndex: boolean;
|
|
35
35
|
iconVariant: import('./types').IconVariant;
|
|
36
36
|
allowMultiple: boolean;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AvatarSize, AvatarRounded } from '../../types';
|
|
2
|
+
export interface AvatarGroupItem {
|
|
3
|
+
src?: string;
|
|
4
|
+
alt?: string;
|
|
5
|
+
fallback?: string;
|
|
6
|
+
heading?: string;
|
|
7
|
+
text?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface Props {
|
|
10
|
+
items: AvatarGroupItem[];
|
|
11
|
+
max?: number;
|
|
12
|
+
size?: AvatarSize;
|
|
13
|
+
rounded?: AvatarRounded;
|
|
14
|
+
overlap?: 'sm' | 'md' | 'lg';
|
|
15
|
+
class?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
18
|
+
class: string;
|
|
19
|
+
size: AvatarSize;
|
|
20
|
+
rounded: AvatarRounded;
|
|
21
|
+
max: number;
|
|
22
|
+
overlap: "sm" | "md" | "lg";
|
|
23
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { defineComponent as k, computed as u, openBlock as l, createElementBlock as s, normalizeClass as a, Fragment as z, renderList as b, createVNode as f, withCtx as x, createElementVNode as y, toDisplayString as r, createCommentVNode as o, normalizeStyle as C } from "vue";
|
|
2
|
+
import p from "../Avatar.vue.js";
|
|
3
|
+
import S from "../Tooltip.vue.js";
|
|
4
|
+
const w = { class: "flex flex-col gap-0.5 text-left" }, N = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "font-semibold text-sm text-tooltip-foreground"
|
|
7
|
+
}, V = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "text-xs text-tooltip-foreground/70"
|
|
10
|
+
}, g = "ring-2 ring-background", D = /* @__PURE__ */ k({
|
|
11
|
+
__name: "AvatarGroup",
|
|
12
|
+
props: {
|
|
13
|
+
items: {},
|
|
14
|
+
max: { default: 4 },
|
|
15
|
+
size: { default: "md" },
|
|
16
|
+
rounded: { default: "full" },
|
|
17
|
+
overlap: { default: "md" },
|
|
18
|
+
class: { default: "" }
|
|
19
|
+
},
|
|
20
|
+
setup(e) {
|
|
21
|
+
const n = e, v = u(() => n.items.slice(0, n.max)), d = u(() => Math.max(0, n.items.length - n.max)), m = {
|
|
22
|
+
sm: "-ml-1",
|
|
23
|
+
md: "-ml-2",
|
|
24
|
+
lg: "-ml-3"
|
|
25
|
+
}, i = {
|
|
26
|
+
xs: "1.5rem",
|
|
27
|
+
sm: "1.875rem",
|
|
28
|
+
md: "2.5rem",
|
|
29
|
+
lg: "3.5rem",
|
|
30
|
+
xl: "4.5rem",
|
|
31
|
+
"2xl": "5.5rem"
|
|
32
|
+
}, h = {
|
|
33
|
+
xs: "10px",
|
|
34
|
+
sm: "0.75rem",
|
|
35
|
+
md: "0.875rem",
|
|
36
|
+
lg: "1rem",
|
|
37
|
+
xl: "1.125rem",
|
|
38
|
+
"2xl": "1.25rem"
|
|
39
|
+
};
|
|
40
|
+
return ($, B) => (l(), s("div", {
|
|
41
|
+
class: a(["flex items-center", n.class])
|
|
42
|
+
}, [
|
|
43
|
+
(l(!0), s(z, null, b(v.value, (t, c) => (l(), s("div", {
|
|
44
|
+
key: c,
|
|
45
|
+
class: a([c !== 0 ? m[e.overlap] : "", "relative shrink-0"])
|
|
46
|
+
}, [
|
|
47
|
+
f(S, {
|
|
48
|
+
disabled: !t.heading && !t.text,
|
|
49
|
+
placement: "top"
|
|
50
|
+
}, {
|
|
51
|
+
content: x(() => [
|
|
52
|
+
y("div", w, [
|
|
53
|
+
t.heading ? (l(), s("span", N, r(t.heading), 1)) : o("", !0),
|
|
54
|
+
t.text ? (l(), s("span", V, r(t.text), 1)) : o("", !0)
|
|
55
|
+
])
|
|
56
|
+
]),
|
|
57
|
+
default: x(() => [
|
|
58
|
+
f(p, {
|
|
59
|
+
src: t.src,
|
|
60
|
+
alt: t.alt,
|
|
61
|
+
fallback: t.fallback,
|
|
62
|
+
size: e.size,
|
|
63
|
+
rounded: e.rounded,
|
|
64
|
+
class: a(g)
|
|
65
|
+
}, null, 8, ["src", "alt", "fallback", "size", "rounded"])
|
|
66
|
+
]),
|
|
67
|
+
_: 2
|
|
68
|
+
}, 1032, ["disabled"])
|
|
69
|
+
], 2))), 128)),
|
|
70
|
+
d.value > 0 ? (l(), s("div", {
|
|
71
|
+
key: 0,
|
|
72
|
+
class: a([
|
|
73
|
+
m[e.overlap],
|
|
74
|
+
"relative shrink-0 flex items-center justify-center",
|
|
75
|
+
"bg-muted text-muted-foreground font-medium",
|
|
76
|
+
g,
|
|
77
|
+
e.rounded === "full" ? "rounded-full" : e.rounded === "none" ? "rounded-none" : `rounded-${e.rounded}`
|
|
78
|
+
]),
|
|
79
|
+
style: C({
|
|
80
|
+
// Match the same size as Avatar sizeClasses
|
|
81
|
+
width: i[e.size],
|
|
82
|
+
height: i[e.size],
|
|
83
|
+
fontSize: h[e.size]
|
|
84
|
+
})
|
|
85
|
+
}, " +" + r(d.value), 7)) : o("", !0)
|
|
86
|
+
], 2));
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
export {
|
|
90
|
+
D as default
|
|
91
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as d, ref as
|
|
1
|
+
import { defineComponent as d, ref as s, onMounted as f, watch as m, openBlock as r, createElementBlock as l, toDisplayString as p, createCommentVNode as v, withDirectives as h, vShow as g } from "vue";
|
|
2
2
|
import w from "jsbarcode";
|
|
3
3
|
import { barcodesConstants as b } from "./types.js";
|
|
4
4
|
const y = { class: "inline-flex justify-center items-center max-w-full flex-col gap-2" }, x = {
|
|
@@ -17,20 +17,21 @@ const y = { class: "inline-flex justify-center items-center max-w-full flex-col
|
|
|
17
17
|
margin: { default: 10 }
|
|
18
18
|
},
|
|
19
19
|
setup(u) {
|
|
20
|
-
const e = u, o =
|
|
20
|
+
const e = u, o = s(null), a = s(""), n = () => {
|
|
21
21
|
if (a.value = "", o.value && e.value) {
|
|
22
22
|
o.value.innerHTML = "";
|
|
23
23
|
try {
|
|
24
24
|
const t = b.find(
|
|
25
25
|
(c) => c.value.toLowerCase() === e.format.toLowerCase()
|
|
26
|
-
),
|
|
26
|
+
), i = t ? t.value : e.format;
|
|
27
27
|
w(o.value, e.value, {
|
|
28
|
-
format:
|
|
28
|
+
format: i,
|
|
29
29
|
displayValue: e.displayValue,
|
|
30
30
|
width: e.width,
|
|
31
31
|
height: e.height,
|
|
32
32
|
lineColor: e.lineColor,
|
|
33
33
|
background: e.background,
|
|
34
|
+
fontSize: 12,
|
|
34
35
|
margin: e.margin
|
|
35
36
|
});
|
|
36
37
|
} catch (t) {
|
|
@@ -40,7 +41,7 @@ const y = { class: "inline-flex justify-center items-center max-w-full flex-col
|
|
|
40
41
|
};
|
|
41
42
|
return f(() => {
|
|
42
43
|
n();
|
|
43
|
-
}), m(() => e, n, { deep: !0 }), (t,
|
|
44
|
+
}), m(() => e, n, { deep: !0 }), (t, i) => (r(), l("div", y, [
|
|
44
45
|
a.value ? (r(), l("div", x, p(a.value), 1)) : v("", !0),
|
|
45
46
|
h((r(), l("svg", {
|
|
46
47
|
ref_key: "barcodeRef",
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
events: any[];
|
|
3
|
+
loading?: boolean;
|
|
4
|
+
canAdd?: boolean;
|
|
5
|
+
canEdit?: boolean;
|
|
6
|
+
canDelete?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
|
+
eventClick: (...args: any[]) => void;
|
|
10
|
+
eventCreate: (...args: any[]) => void;
|
|
11
|
+
eventUpdate: (...args: any[]) => void;
|
|
12
|
+
eventEdit: (...args: any[]) => void;
|
|
13
|
+
eventDelete: (...args: any[]) => void;
|
|
14
|
+
dateChange: (...args: any[]) => void;
|
|
15
|
+
dayClick: (...args: any[]) => void;
|
|
16
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
|
+
onEventClick?: (...args: any[]) => any;
|
|
18
|
+
onEventCreate?: (...args: any[]) => any;
|
|
19
|
+
onEventUpdate?: (...args: any[]) => any;
|
|
20
|
+
onEventEdit?: (...args: any[]) => any;
|
|
21
|
+
onEventDelete?: (...args: any[]) => any;
|
|
22
|
+
onDateChange?: (...args: any[]) => any;
|
|
23
|
+
onDayClick?: (...args: any[]) => any;
|
|
24
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
25
|
+
calendarRef: {
|
|
26
|
+
$: import('vue').ComponentInternalInstance;
|
|
27
|
+
$data: {};
|
|
28
|
+
$props: Partial<{
|
|
29
|
+
allowEventCreation: boolean;
|
|
30
|
+
maxEventsPerDay: number;
|
|
31
|
+
showWeekNumbers: boolean;
|
|
32
|
+
events: import('v-event-calendar').CalendarEvent[];
|
|
33
|
+
initialView: import('v-event-calendar').CalendarView;
|
|
34
|
+
allowEventEditing: boolean;
|
|
35
|
+
}> & Omit<{
|
|
36
|
+
readonly events: import('v-event-calendar').CalendarEvent[];
|
|
37
|
+
readonly initialView: import('v-event-calendar').CalendarView;
|
|
38
|
+
readonly allowEventCreation: boolean;
|
|
39
|
+
readonly allowEventEditing: boolean;
|
|
40
|
+
readonly maxEventsPerDay: number;
|
|
41
|
+
readonly showWeekNumbers: boolean;
|
|
42
|
+
readonly config?: Partial<import('v-event-calendar').CalendarViewConfig>;
|
|
43
|
+
readonly onEventUpdate?: (eventId: string, start: string, end?: string, duration?: number) => any;
|
|
44
|
+
readonly onDayClick?: (date: Date) => any;
|
|
45
|
+
readonly onEventClick?: (event: import('v-event-calendar').CalendarEvent) => any;
|
|
46
|
+
readonly onDateChange?: (date: Date) => any;
|
|
47
|
+
readonly onViewChange?: (view: import('v-event-calendar').CalendarView) => any;
|
|
48
|
+
readonly onEventCreate?: (date: Date, start: string, end?: string, duration?: number) => any;
|
|
49
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "events" | "initialView" | "allowEventCreation" | "allowEventEditing" | "maxEventsPerDay" | "showWeekNumbers">;
|
|
50
|
+
$attrs: {
|
|
51
|
+
[x: string]: unknown;
|
|
52
|
+
};
|
|
53
|
+
$refs: {
|
|
54
|
+
[x: string]: unknown;
|
|
55
|
+
};
|
|
56
|
+
$slots: Readonly<{
|
|
57
|
+
[name: string]: import('vue').Slot<any>;
|
|
58
|
+
}>;
|
|
59
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
60
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
61
|
+
$host: Element | null;
|
|
62
|
+
$emit: ((event: "eventClick", event: import('v-event-calendar').CalendarEvent) => void) & ((event: "eventCreate", date: Date, start: string, end?: string, duration?: number) => void) & ((event: "eventUpdate", eventId: string, start: string, end?: string, duration?: number) => void) & ((event: "dateChange", date: Date) => void) & ((event: "dayClick", date: Date) => void) & ((event: "viewChange", view: import('v-event-calendar').CalendarView) => void);
|
|
63
|
+
$el: any;
|
|
64
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
65
|
+
events: {
|
|
66
|
+
type: import('vue').PropType<import('v-event-calendar').CalendarEvent[]>;
|
|
67
|
+
default: () => any[];
|
|
68
|
+
};
|
|
69
|
+
initialView: {
|
|
70
|
+
type: import('vue').PropType<import('v-event-calendar').CalendarView>;
|
|
71
|
+
default: string;
|
|
72
|
+
};
|
|
73
|
+
allowEventCreation: {
|
|
74
|
+
type: import('vue').PropType<boolean>;
|
|
75
|
+
default: boolean;
|
|
76
|
+
};
|
|
77
|
+
allowEventEditing: {
|
|
78
|
+
type: import('vue').PropType<boolean>;
|
|
79
|
+
default: boolean;
|
|
80
|
+
};
|
|
81
|
+
maxEventsPerDay: {
|
|
82
|
+
type: import('vue').PropType<number>;
|
|
83
|
+
default: number;
|
|
84
|
+
};
|
|
85
|
+
showWeekNumbers: {
|
|
86
|
+
type: import('vue').PropType<boolean>;
|
|
87
|
+
default: boolean;
|
|
88
|
+
};
|
|
89
|
+
config: {
|
|
90
|
+
type: import('vue').PropType<Partial<import('v-event-calendar').CalendarViewConfig>>;
|
|
91
|
+
};
|
|
92
|
+
}>> & Readonly<{
|
|
93
|
+
onEventUpdate?: (eventId: string, start: string, end?: string, duration?: number) => any;
|
|
94
|
+
onDayClick?: (date: Date) => any;
|
|
95
|
+
onEventClick?: (event: import('v-event-calendar').CalendarEvent) => any;
|
|
96
|
+
onDateChange?: (date: Date) => any;
|
|
97
|
+
onViewChange?: (view: import('v-event-calendar').CalendarView) => any;
|
|
98
|
+
onEventCreate?: (date: Date, start: string, end?: string, duration?: number) => any;
|
|
99
|
+
}>, {
|
|
100
|
+
forceUpdate: () => void;
|
|
101
|
+
view: import('vue').Ref<import('v-event-calendar').CalendarView, import('v-event-calendar').CalendarView>;
|
|
102
|
+
canGoNext: import('vue').ComputedRef<boolean>;
|
|
103
|
+
goToDate: (date: Date) => void;
|
|
104
|
+
goToNext: () => void;
|
|
105
|
+
setView: (newView: import('v-event-calendar').CalendarView) => void;
|
|
106
|
+
title: string;
|
|
107
|
+
goToToday: () => void;
|
|
108
|
+
canGoPrevious: import('vue').ComputedRef<boolean>;
|
|
109
|
+
selectDate: (date: Date) => void;
|
|
110
|
+
goToPrevious: () => void;
|
|
111
|
+
currentDate: import('vue').Ref<Date, Date>;
|
|
112
|
+
selectedDate: import('vue').Ref<Date, Date>;
|
|
113
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
114
|
+
dayClick: (date: Date) => void;
|
|
115
|
+
dateChange: (date: Date) => void;
|
|
116
|
+
eventClick: (event: import('v-event-calendar').CalendarEvent) => void;
|
|
117
|
+
viewChange: (view: import('v-event-calendar').CalendarView) => void;
|
|
118
|
+
eventCreate: (date: Date, start: string, end?: string, duration?: number) => void;
|
|
119
|
+
eventUpdate: (eventId: string, start: string, end?: string, duration?: number) => void;
|
|
120
|
+
}, string, {
|
|
121
|
+
allowEventCreation: boolean;
|
|
122
|
+
maxEventsPerDay: number;
|
|
123
|
+
showWeekNumbers: boolean;
|
|
124
|
+
events: import('v-event-calendar').CalendarEvent[];
|
|
125
|
+
initialView: import('v-event-calendar').CalendarView;
|
|
126
|
+
allowEventEditing: boolean;
|
|
127
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
128
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
129
|
+
created?: (() => void) | (() => void)[];
|
|
130
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
131
|
+
mounted?: (() => void) | (() => void)[];
|
|
132
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
133
|
+
updated?: (() => void) | (() => void)[];
|
|
134
|
+
activated?: (() => void) | (() => void)[];
|
|
135
|
+
deactivated?: (() => void) | (() => void)[];
|
|
136
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
137
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
138
|
+
destroyed?: (() => void) | (() => void)[];
|
|
139
|
+
unmounted?: (() => void) | (() => void)[];
|
|
140
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
141
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
142
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
143
|
+
};
|
|
144
|
+
$forceUpdate: () => void;
|
|
145
|
+
$nextTick: typeof import('vue').nextTick;
|
|
146
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
147
|
+
} & Readonly<{
|
|
148
|
+
allowEventCreation: boolean;
|
|
149
|
+
maxEventsPerDay: number;
|
|
150
|
+
showWeekNumbers: boolean;
|
|
151
|
+
events: import('v-event-calendar').CalendarEvent[];
|
|
152
|
+
initialView: import('v-event-calendar').CalendarView;
|
|
153
|
+
allowEventEditing: boolean;
|
|
154
|
+
}> & Omit<Readonly<import('vue').ExtractPropTypes<{
|
|
155
|
+
events: {
|
|
156
|
+
type: import('vue').PropType<import('v-event-calendar').CalendarEvent[]>;
|
|
157
|
+
default: () => any[];
|
|
158
|
+
};
|
|
159
|
+
initialView: {
|
|
160
|
+
type: import('vue').PropType<import('v-event-calendar').CalendarView>;
|
|
161
|
+
default: string;
|
|
162
|
+
};
|
|
163
|
+
allowEventCreation: {
|
|
164
|
+
type: import('vue').PropType<boolean>;
|
|
165
|
+
default: boolean;
|
|
166
|
+
};
|
|
167
|
+
allowEventEditing: {
|
|
168
|
+
type: import('vue').PropType<boolean>;
|
|
169
|
+
default: boolean;
|
|
170
|
+
};
|
|
171
|
+
maxEventsPerDay: {
|
|
172
|
+
type: import('vue').PropType<number>;
|
|
173
|
+
default: number;
|
|
174
|
+
};
|
|
175
|
+
showWeekNumbers: {
|
|
176
|
+
type: import('vue').PropType<boolean>;
|
|
177
|
+
default: boolean;
|
|
178
|
+
};
|
|
179
|
+
config: {
|
|
180
|
+
type: import('vue').PropType<Partial<import('v-event-calendar').CalendarViewConfig>>;
|
|
181
|
+
};
|
|
182
|
+
}>> & Readonly<{
|
|
183
|
+
onEventUpdate?: (eventId: string, start: string, end?: string, duration?: number) => any;
|
|
184
|
+
onDayClick?: (date: Date) => any;
|
|
185
|
+
onEventClick?: (event: import('v-event-calendar').CalendarEvent) => any;
|
|
186
|
+
onDateChange?: (date: Date) => any;
|
|
187
|
+
onViewChange?: (view: import('v-event-calendar').CalendarView) => any;
|
|
188
|
+
onEventCreate?: (date: Date, start: string, end?: string, duration?: number) => any;
|
|
189
|
+
}>, "title" | "view" | "canGoPrevious" | "canGoNext" | "events" | "initialView" | "allowEventCreation" | "allowEventEditing" | "maxEventsPerDay" | "showWeekNumbers" | "forceUpdate" | "goToDate" | "goToNext" | "setView" | "goToToday" | "selectDate" | "goToPrevious" | "currentDate" | "selectedDate"> & import('vue').ShallowUnwrapRef<{
|
|
190
|
+
forceUpdate: () => void;
|
|
191
|
+
view: import('vue').Ref<import('v-event-calendar').CalendarView, import('v-event-calendar').CalendarView>;
|
|
192
|
+
canGoNext: import('vue').ComputedRef<boolean>;
|
|
193
|
+
goToDate: (date: Date) => void;
|
|
194
|
+
goToNext: () => void;
|
|
195
|
+
setView: (newView: import('v-event-calendar').CalendarView) => void;
|
|
196
|
+
title: string;
|
|
197
|
+
goToToday: () => void;
|
|
198
|
+
canGoPrevious: import('vue').ComputedRef<boolean>;
|
|
199
|
+
selectDate: (date: Date) => void;
|
|
200
|
+
goToPrevious: () => void;
|
|
201
|
+
currentDate: import('vue').Ref<Date, Date>;
|
|
202
|
+
selectedDate: import('vue').Ref<Date, Date>;
|
|
203
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
204
|
+
$slots: {
|
|
205
|
+
header?(_: {
|
|
206
|
+
currentTitle: string;
|
|
207
|
+
view: import('v-event-calendar').CalendarView;
|
|
208
|
+
canGoNext: boolean;
|
|
209
|
+
goToDate: (date: Date) => void;
|
|
210
|
+
goToNext: () => void;
|
|
211
|
+
setView: (newView: import('v-event-calendar').CalendarView) => void;
|
|
212
|
+
goToToday: () => void;
|
|
213
|
+
canGoPrevious: boolean;
|
|
214
|
+
selectDate: (date: Date) => void;
|
|
215
|
+
goToPrevious: () => void;
|
|
216
|
+
currentDate: Date;
|
|
217
|
+
selectedDate: Date;
|
|
218
|
+
}): any;
|
|
219
|
+
event?(_: {
|
|
220
|
+
event: import('v-event-calendar').CalendarEvent;
|
|
221
|
+
displayTime: string;
|
|
222
|
+
view: "month" | "date" | "week";
|
|
223
|
+
isMultiDay: boolean;
|
|
224
|
+
isContained: boolean;
|
|
225
|
+
}): any;
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
}, HTMLDivElement>;
|
|
229
|
+
export default _default;
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { defineComponent as _, ref as k, onMounted as M, onUnmounted as W, computed as p, openBlock as b, createElementBlock as E, createVNode as n, unref as j, withCtx as i, createElementVNode as w, createTextVNode as f, toDisplayString as r } from "vue";
|
|
2
|
+
import A from "v-event-calendar";
|
|
3
|
+
import l from "../Button.vue.js";
|
|
4
|
+
import h from "../ButtonGroup.vue.js";
|
|
5
|
+
import { $t as B } from "../../utils/i18n.js";
|
|
6
|
+
import "v-event-calendar/style.css";
|
|
7
|
+
import L from "./CalendarEventItem.vue.js";
|
|
8
|
+
const P = { class: "h-[calc(100vh-1px)] v-calendar lg:mt-2 bg-body border border-border rounded-xl shadow-sm overflow-hidden flex flex-col" }, R = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "flex items-center justify-between p-4 border-b border-border bg-body"
|
|
11
|
+
}, G = { class: "flex items-center gap-2" }, I = { class: "text-lg font-bold text-foreground truncate mx-2" }, q = { class: "flex items-center gap-2" }, F = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "flex max-sm:flex-col sm:justify-between gap-2 sm:px-4 py-4 border-b border-border bg-body"
|
|
14
|
+
}, H = { class: "text-base font-bold text-foreground text-center" }, ee = /* @__PURE__ */ _({
|
|
15
|
+
__name: "Calendar",
|
|
16
|
+
props: {
|
|
17
|
+
events: {},
|
|
18
|
+
loading: { type: Boolean },
|
|
19
|
+
canAdd: { type: Boolean },
|
|
20
|
+
canEdit: { type: Boolean },
|
|
21
|
+
canDelete: { type: Boolean }
|
|
22
|
+
},
|
|
23
|
+
emits: [
|
|
24
|
+
"eventClick",
|
|
25
|
+
"eventCreate",
|
|
26
|
+
"eventUpdate",
|
|
27
|
+
"eventEdit",
|
|
28
|
+
"eventDelete",
|
|
29
|
+
"dateChange",
|
|
30
|
+
"dayClick"
|
|
31
|
+
],
|
|
32
|
+
setup(c, { emit: $ }) {
|
|
33
|
+
const d = $, s = k(), v = k("month"), x = k(!1), C = () => {
|
|
34
|
+
const o = window.innerWidth < 1200;
|
|
35
|
+
o !== x.value && (x.value = o, o && (v.value = "date", s.value?.setView("date")));
|
|
36
|
+
};
|
|
37
|
+
M(() => {
|
|
38
|
+
C(), window.addEventListener("resize", C);
|
|
39
|
+
}), W(() => {
|
|
40
|
+
window.removeEventListener("resize", C);
|
|
41
|
+
});
|
|
42
|
+
const g = (o) => {
|
|
43
|
+
x.value || (v.value = o, s.value?.setView(o));
|
|
44
|
+
}, z = () => s.value?.goToToday(), T = () => s.value?.goToPrevious(), D = () => s.value?.goToNext(), y = (o, e, t) => {
|
|
45
|
+
const a = t ? B(o, t) : B(o);
|
|
46
|
+
return a !== o ? a : e;
|
|
47
|
+
}, N = p(() => y("vlite.calendar.month", "Month")), S = p(() => y("vlite.calendar.week", "Week")), U = p(() => y("vlite.calendar.day", "Day")), V = p(() => y("vlite.calendar.today", "Today"));
|
|
48
|
+
return (o, e) => (b(), E("div", P, [
|
|
49
|
+
n(j(A), {
|
|
50
|
+
ref_key: "calendarRef",
|
|
51
|
+
ref: s,
|
|
52
|
+
events: c.events,
|
|
53
|
+
"initial-view": v.value,
|
|
54
|
+
"allow-event-creation": c.canAdd,
|
|
55
|
+
"allow-event-editing": c.canEdit,
|
|
56
|
+
onEventClick: e[6] || (e[6] = (t) => d("eventClick", t)),
|
|
57
|
+
onEventCreate: e[7] || (e[7] = (t, a, u) => d("eventCreate", { date: t, start: a, end: u })),
|
|
58
|
+
onEventUpdate: e[8] || (e[8] = (t, a, u) => d("eventUpdate", { eventId: t, start: a, end: u })),
|
|
59
|
+
onDateChange: e[9] || (e[9] = (t) => d("dateChange", t)),
|
|
60
|
+
onDayClick: e[10] || (e[10] = (t) => d("dayClick", t)),
|
|
61
|
+
class: "flex-1 min-h-0"
|
|
62
|
+
}, {
|
|
63
|
+
header: i(({ currentTitle: t }) => [
|
|
64
|
+
x.value ? (b(), E("div", F, [
|
|
65
|
+
w("h2", H, r(t), 1),
|
|
66
|
+
n(h, { class: "max-sm:w-full" }, {
|
|
67
|
+
default: i(() => [
|
|
68
|
+
n(l, {
|
|
69
|
+
variant: "outline",
|
|
70
|
+
size: "sm",
|
|
71
|
+
icon: "lucide:chevron-left",
|
|
72
|
+
onClick: T
|
|
73
|
+
}),
|
|
74
|
+
n(l, {
|
|
75
|
+
variant: "outline",
|
|
76
|
+
size: "sm",
|
|
77
|
+
class: "flex-1",
|
|
78
|
+
onClick: z
|
|
79
|
+
}, {
|
|
80
|
+
default: i(() => [
|
|
81
|
+
f(r(V.value), 1)
|
|
82
|
+
]),
|
|
83
|
+
_: 1
|
|
84
|
+
}),
|
|
85
|
+
n(l, {
|
|
86
|
+
variant: "outline",
|
|
87
|
+
size: "sm",
|
|
88
|
+
icon: "lucide:chevron-right",
|
|
89
|
+
onClick: D
|
|
90
|
+
})
|
|
91
|
+
]),
|
|
92
|
+
_: 1
|
|
93
|
+
})
|
|
94
|
+
])) : (b(), E("div", R, [
|
|
95
|
+
w("div", G, [
|
|
96
|
+
n(h, null, {
|
|
97
|
+
default: i(() => [
|
|
98
|
+
n(l, {
|
|
99
|
+
variant: v.value === "month" ? "primary" : "outline",
|
|
100
|
+
size: "sm",
|
|
101
|
+
icon: "lucide:calendar-days",
|
|
102
|
+
onClick: e[0] || (e[0] = (a) => g("month"))
|
|
103
|
+
}, {
|
|
104
|
+
default: i(() => [
|
|
105
|
+
f(r(N.value), 1)
|
|
106
|
+
]),
|
|
107
|
+
_: 1
|
|
108
|
+
}, 8, ["variant"]),
|
|
109
|
+
n(l, {
|
|
110
|
+
variant: v.value === "week" ? "primary" : "outline",
|
|
111
|
+
size: "sm",
|
|
112
|
+
icon: "lucide:calendar-range",
|
|
113
|
+
onClick: e[1] || (e[1] = (a) => g("week"))
|
|
114
|
+
}, {
|
|
115
|
+
default: i(() => [
|
|
116
|
+
f(r(S.value), 1)
|
|
117
|
+
]),
|
|
118
|
+
_: 1
|
|
119
|
+
}, 8, ["variant"]),
|
|
120
|
+
n(l, {
|
|
121
|
+
variant: v.value === "date" ? "primary" : "outline",
|
|
122
|
+
size: "sm",
|
|
123
|
+
icon: "lucide:calendar",
|
|
124
|
+
onClick: e[2] || (e[2] = (a) => g("date"))
|
|
125
|
+
}, {
|
|
126
|
+
default: i(() => [
|
|
127
|
+
f(r(U.value), 1)
|
|
128
|
+
]),
|
|
129
|
+
_: 1
|
|
130
|
+
}, 8, ["variant"])
|
|
131
|
+
]),
|
|
132
|
+
_: 1
|
|
133
|
+
})
|
|
134
|
+
]),
|
|
135
|
+
w("h2", I, r(t), 1),
|
|
136
|
+
w("div", q, [
|
|
137
|
+
n(h, null, {
|
|
138
|
+
default: i(() => [
|
|
139
|
+
n(l, {
|
|
140
|
+
variant: "outline",
|
|
141
|
+
size: "sm",
|
|
142
|
+
icon: "lucide:chevron-left",
|
|
143
|
+
onClick: T
|
|
144
|
+
}),
|
|
145
|
+
n(l, {
|
|
146
|
+
variant: "outline",
|
|
147
|
+
size: "sm",
|
|
148
|
+
onClick: z
|
|
149
|
+
}, {
|
|
150
|
+
default: i(() => [
|
|
151
|
+
f(r(V.value), 1)
|
|
152
|
+
]),
|
|
153
|
+
_: 1
|
|
154
|
+
}),
|
|
155
|
+
n(l, {
|
|
156
|
+
variant: "outline",
|
|
157
|
+
size: "sm",
|
|
158
|
+
icon: "lucide:chevron-right",
|
|
159
|
+
onClick: D
|
|
160
|
+
})
|
|
161
|
+
]),
|
|
162
|
+
_: 1
|
|
163
|
+
})
|
|
164
|
+
])
|
|
165
|
+
]))
|
|
166
|
+
]),
|
|
167
|
+
event: i(({ event: t, view: a, displayTime: u }) => [
|
|
168
|
+
n(L, {
|
|
169
|
+
event: t,
|
|
170
|
+
view: a,
|
|
171
|
+
displayTime: u,
|
|
172
|
+
"can-edit": c.canEdit,
|
|
173
|
+
"can-delete": c.canDelete,
|
|
174
|
+
onView: e[3] || (e[3] = (m) => d("eventClick", m)),
|
|
175
|
+
onEdit: e[4] || (e[4] = (m) => d("eventEdit", m)),
|
|
176
|
+
onDelete: e[5] || (e[5] = (m) => d("eventDelete", m))
|
|
177
|
+
}, null, 8, ["event", "view", "displayTime", "can-edit", "can-delete"])
|
|
178
|
+
]),
|
|
179
|
+
_: 1
|
|
180
|
+
}, 8, ["events", "initial-view", "allow-event-creation", "allow-event-editing"])
|
|
181
|
+
]));
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
export {
|
|
185
|
+
ee as default
|
|
186
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
event: any;
|
|
3
|
+
view: string;
|
|
4
|
+
displayTime?: string;
|
|
5
|
+
canEdit?: boolean;
|
|
6
|
+
canDelete?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
|
+
view: (...args: any[]) => void;
|
|
10
|
+
delete: (...args: any[]) => void;
|
|
11
|
+
edit: (...args: any[]) => void;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
onView?: (...args: any[]) => any;
|
|
14
|
+
onDelete?: (...args: any[]) => any;
|
|
15
|
+
onEdit?: (...args: any[]) => any;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
17
|
+
export default _default;
|