vlite3 1.0.10 → 1.1.2

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.
Files changed (113) hide show
  1. package/README.md +4 -1
  2. package/components/AttachmentsList/AttachmentsList.vue.d.ts +1 -16
  3. package/components/AttachmentsList/AttachmentsList.vue.js +191 -167
  4. package/components/AvatarGroup/AvatarGroup.vue.d.ts +24 -0
  5. package/components/AvatarGroup/AvatarGroup.vue.js +91 -0
  6. package/components/AvatarGroup/AvatarGroup.vue2.js +4 -0
  7. package/components/AvatarGroup/index.d.ts +2 -0
  8. package/components/AvatarUploader/AvatarUploader.vue.d.ts +1 -1
  9. package/components/Barcode/Barcode.vue.js +6 -5
  10. package/components/Button.vue.d.ts +1 -1
  11. package/components/Calendar/Calendar.vue.d.ts +229 -0
  12. package/components/Calendar/Calendar.vue.js +7 -0
  13. package/components/Calendar/Calendar.vue2.js +186 -0
  14. package/components/Calendar/CalendarEventItem.vue.d.ts +17 -0
  15. package/components/Calendar/CalendarEventItem.vue.js +111 -0
  16. package/components/Calendar/CalendarEventItem.vue2.js +4 -0
  17. package/components/Calendar/index.d.ts +2 -0
  18. package/components/Carousel/Carousel.vue.d.ts +2 -2
  19. package/components/CategoryManager/CategoryManager.vue.d.ts +2 -1
  20. package/components/CategoryManager/CategoryManager.vue.js +322 -0
  21. package/components/CategoryManager/CategoryManager.vue2.js +4 -0
  22. package/components/CategoryManager/CategoryNode.vue.js +224 -0
  23. package/components/CategoryManager/CategoryNode.vue2.js +4 -0
  24. package/components/CategoryManager/types.d.ts +14 -0
  25. package/components/Chip/Chip.vue.d.ts +2 -2
  26. package/components/ColorPicker/ColorIro.vue3.js +2 -2
  27. package/components/ColorPicker/ColorPicker.vue.js +2 -2
  28. package/components/CommandPalette/CommandPaletteContent.vue.js +1 -1
  29. package/components/CommandPalette/CommandPaletteContent.vue2.js +7 -7
  30. package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
  31. package/components/ConfirmationModal.vue.d.ts +2 -2
  32. package/components/CustomFieldsDisplay/CustomFieldsDisplay.vue.d.ts +48 -0
  33. package/components/CustomFieldsDisplay/CustomFieldsDisplay.vue.js +97 -0
  34. package/components/CustomFieldsDisplay/CustomFieldsDisplay.vue2.js +4 -0
  35. package/components/CustomFieldsDisplay/index.d.ts +2 -0
  36. package/components/CustomFieldsDisplay/types.d.ts +18 -0
  37. package/components/DataTable/DataTable.vue.d.ts +3 -3
  38. package/components/DateTime/DateTime.vue.d.ts +2 -0
  39. package/components/DateTime/DateTime.vue.js +9 -23
  40. package/components/Dropdown/Dropdown.vue.d.ts +3 -3
  41. package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +1 -1
  42. package/components/Dropdown/DropdownMenu.vue.d.ts +2 -2
  43. package/components/Dropdown/DropdownTrigger.vue.d.ts +1 -1
  44. package/components/FilePicker/FilePicker.vue.d.ts +1 -1
  45. package/components/Form/CustomFields.vue.d.ts +1 -1
  46. package/components/Form/Form.vue.js +2 -2
  47. package/components/Form/Form.vue2.js +230 -241
  48. package/components/Form/FormField.vue.d.ts +1 -1
  49. package/components/Form/composables/useForm.d.ts +2 -0
  50. package/components/Form/composables/useForm.js +76 -69
  51. package/components/Form/utils/form.utils.js +66 -66
  52. package/components/ImportData/ImportData.vue.js +48 -48
  53. package/components/ImportData/ImportStep2.vue.js +116 -5
  54. package/components/ImportData/ImportStep2.vue2.js +2 -105
  55. package/components/Input.vue.d.ts +3 -3
  56. package/components/Invoice/Invoice.vue.d.ts +3 -0
  57. package/components/Invoice/Invoice.vue.js +38 -0
  58. package/components/Invoice/Invoice.vue2.js +4 -0
  59. package/components/Invoice/InvoiceVariant1.vue.d.ts +13 -0
  60. package/components/Invoice/InvoiceVariant1.vue.js +360 -0
  61. package/components/Invoice/InvoiceVariant1.vue2.js +4 -0
  62. package/components/Invoice/InvoiceVariant2.vue.d.ts +13 -0
  63. package/components/Invoice/InvoiceVariant2.vue.js +226 -0
  64. package/components/Invoice/InvoiceVariant2.vue2.js +4 -0
  65. package/components/Invoice/InvoiceVariant3.vue.d.ts +13 -0
  66. package/components/Invoice/InvoiceVariant3.vue.js +292 -0
  67. package/components/Invoice/InvoiceVariant3.vue2.js +4 -0
  68. package/components/Invoice/InvoiceVariant4.vue.d.ts +13 -0
  69. package/components/Invoice/InvoiceVariant4.vue.js +343 -0
  70. package/components/Invoice/InvoiceVariant4.vue2.js +4 -0
  71. package/components/Invoice/index.d.ts +2 -0
  72. package/components/Invoice/types.d.ts +97 -0
  73. package/components/List/List.vue.d.ts +1 -9
  74. package/components/List/List.vue.js +166 -165
  75. package/components/List/ListFieldRow.vue.d.ts +10 -2
  76. package/components/List/ListFieldRow.vue.js +80 -78
  77. package/components/List/utils.d.ts +2 -1
  78. package/components/List/utils.js +8 -39
  79. package/components/MultiSelect/MultiSelect.vue.d.ts +1 -1
  80. package/components/Navbar/NavbarItem.vue.d.ts +1 -1
  81. package/components/Navbar/NavbarTabs.vue.js +2 -2
  82. package/components/NavbarCommandPalette.vue.js +1 -1
  83. package/components/NumberInput.vue.d.ts +2 -2
  84. package/components/NumberInput.vue.js +2 -2
  85. package/components/NumberInput.vue2.js +38 -38
  86. package/components/OTPInput/OTPInput.vue.d.ts +1 -1
  87. package/components/PricingPlan/PricingPlan.vue.d.ts +1 -1
  88. package/components/Screen/ScreenFilter.vue.js +22 -21
  89. package/components/Screen/components/ScreenQuickFilters.vue.js +6 -5
  90. package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
  91. package/components/Stats/Stats.vue.d.ts +1 -1
  92. package/components/StatusChip/status-map.js +27 -7
  93. package/components/Tabes/Tabes.vue.d.ts +1 -0
  94. package/components/Tabes/Tabes.vue.js +2 -2
  95. package/components/Tabes/Tabes.vue2.js +33 -32
  96. package/components/ThumbnailSelector/ThumbnailSelector.vue.d.ts +2 -2
  97. package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
  98. package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +141 -115
  99. package/components/Workbook/Workbook.vue.d.ts +3 -3
  100. package/core/config.d.ts +76 -0
  101. package/core/index.js +17 -5
  102. package/index.d.ts +6 -1
  103. package/index.js +271 -256
  104. package/package.json +2 -1
  105. package/style.css +5 -3
  106. package/types/config.type.d.ts +6 -0
  107. package/types/list.type.d.ts +6 -0
  108. package/utils/configUtils.d.ts +9 -0
  109. package/utils/configUtils.js +7 -0
  110. package/utils/index.d.ts +1 -0
  111. package/utils/status.d.ts +5 -0
  112. package/utils/status.js +33 -0
  113. /package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +0 -0
@@ -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
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./AvatarGroup.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,2 @@
1
+ export { default as AvatarGroup } from './AvatarGroup.vue';
2
+ export type { AvatarGroupItem } from './AvatarGroup.vue';
@@ -24,8 +24,8 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
24
24
  alt: string;
25
25
  size: AvatarSize;
26
26
  rounded: AvatarRounded;
27
- disabled: boolean;
28
27
  loading: boolean;
28
+ disabled: boolean;
29
29
  modelValue: any;
30
30
  editable: boolean;
31
31
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
@@ -1,4 +1,4 @@
1
- import { defineComponent as d, ref as i, 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";
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 = i(null), a = i(""), n = () => {
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
- ), s = t ? t.value : e.format;
26
+ ), i = t ? t.value : e.format;
27
27
  w(o.value, e.value, {
28
- format: s,
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, s) => (r(), l("div", y, [
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",
@@ -15,8 +15,8 @@ declare const __VLS_component: import('vue').DefineComponent<ButtonProps, {}, {}
15
15
  variant: ButtonVariant;
16
16
  size: ButtonSize;
17
17
  rounded: ButtonRounded;
18
- disabled: boolean;
19
18
  loading: boolean;
19
+ disabled: boolean;
20
20
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLButtonElement>;
21
21
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
22
22
  export default _default;
@@ -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
+ config: {
66
+ type: import('vue').PropType<Partial<import('v-event-calendar').CalendarViewConfig>>;
67
+ };
68
+ events: {
69
+ type: import('vue').PropType<import('v-event-calendar').CalendarEvent[]>;
70
+ default: () => any[];
71
+ };
72
+ initialView: {
73
+ type: import('vue').PropType<import('v-event-calendar').CalendarView>;
74
+ default: string;
75
+ };
76
+ allowEventCreation: {
77
+ type: import('vue').PropType<boolean>;
78
+ default: boolean;
79
+ };
80
+ allowEventEditing: {
81
+ type: import('vue').PropType<boolean>;
82
+ default: boolean;
83
+ };
84
+ maxEventsPerDay: {
85
+ type: import('vue').PropType<number>;
86
+ default: number;
87
+ };
88
+ showWeekNumbers: {
89
+ type: import('vue').PropType<boolean>;
90
+ default: boolean;
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
+ config: {
156
+ type: import('vue').PropType<Partial<import('v-event-calendar').CalendarViewConfig>>;
157
+ };
158
+ events: {
159
+ type: import('vue').PropType<import('v-event-calendar').CalendarEvent[]>;
160
+ default: () => any[];
161
+ };
162
+ initialView: {
163
+ type: import('vue').PropType<import('v-event-calendar').CalendarView>;
164
+ default: string;
165
+ };
166
+ allowEventCreation: {
167
+ type: import('vue').PropType<boolean>;
168
+ default: boolean;
169
+ };
170
+ allowEventEditing: {
171
+ type: import('vue').PropType<boolean>;
172
+ default: boolean;
173
+ };
174
+ maxEventsPerDay: {
175
+ type: import('vue').PropType<number>;
176
+ default: number;
177
+ };
178
+ showWeekNumbers: {
179
+ type: import('vue').PropType<boolean>;
180
+ default: boolean;
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,7 @@
1
+ import o from "./Calendar.vue2.js";
2
+ /* empty css */
3
+ import r from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-63e46f6b"]]);
5
+ export {
6
+ f as default
7
+ };
@@ -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;