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.
- package/README.md +4 -1
- package/components/AttachmentsList/AttachmentsList.vue.d.ts +1 -16
- package/components/AttachmentsList/AttachmentsList.vue.js +191 -167
- 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/AvatarUploader/AvatarUploader.vue.d.ts +1 -1
- package/components/Barcode/Barcode.vue.js +6 -5
- package/components/Button.vue.d.ts +1 -1
- 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/Carousel/Carousel.vue.d.ts +2 -2
- package/components/CategoryManager/CategoryManager.vue.d.ts +2 -1
- package/components/CategoryManager/CategoryManager.vue.js +322 -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/CategoryManager/types.d.ts +14 -0
- package/components/Chip/Chip.vue.d.ts +2 -2
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/CommandPalette/CommandPaletteContent.vue.js +1 -1
- package/components/CommandPalette/CommandPaletteContent.vue2.js +7 -7
- package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
- package/components/ConfirmationModal.vue.d.ts +2 -2
- 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/DataTable/DataTable.vue.d.ts +3 -3
- package/components/DateTime/DateTime.vue.d.ts +2 -0
- package/components/DateTime/DateTime.vue.js +9 -23
- package/components/Dropdown/Dropdown.vue.d.ts +3 -3
- package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +1 -1
- package/components/Dropdown/DropdownMenu.vue.d.ts +2 -2
- package/components/Dropdown/DropdownTrigger.vue.d.ts +1 -1
- package/components/FilePicker/FilePicker.vue.d.ts +1 -1
- package/components/Form/CustomFields.vue.d.ts +1 -1
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +230 -241
- package/components/Form/FormField.vue.d.ts +1 -1
- package/components/Form/composables/useForm.d.ts +2 -0
- package/components/Form/composables/useForm.js +76 -69
- package/components/Form/utils/form.utils.js +66 -66
- 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/Input.vue.d.ts +3 -3
- package/components/Invoice/Invoice.vue.d.ts +3 -0
- package/components/Invoice/Invoice.vue.js +38 -0
- package/components/Invoice/Invoice.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant1.vue.d.ts +13 -0
- package/components/Invoice/InvoiceVariant1.vue.js +360 -0
- package/components/Invoice/InvoiceVariant1.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant2.vue.d.ts +13 -0
- package/components/Invoice/InvoiceVariant2.vue.js +226 -0
- package/components/Invoice/InvoiceVariant2.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant3.vue.d.ts +13 -0
- package/components/Invoice/InvoiceVariant3.vue.js +292 -0
- package/components/Invoice/InvoiceVariant3.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant4.vue.d.ts +13 -0
- package/components/Invoice/InvoiceVariant4.vue.js +343 -0
- package/components/Invoice/InvoiceVariant4.vue2.js +4 -0
- package/components/Invoice/index.d.ts +2 -0
- package/components/Invoice/types.d.ts +97 -0
- package/components/List/List.vue.d.ts +1 -9
- package/components/List/List.vue.js +166 -165
- package/components/List/ListFieldRow.vue.d.ts +10 -2
- package/components/List/ListFieldRow.vue.js +80 -78
- package/components/List/utils.d.ts +2 -1
- package/components/List/utils.js +8 -39
- package/components/MultiSelect/MultiSelect.vue.d.ts +1 -1
- package/components/Navbar/NavbarItem.vue.d.ts +1 -1
- package/components/Navbar/NavbarTabs.vue.js +2 -2
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/NumberInput.vue.d.ts +2 -2
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +38 -38
- package/components/OTPInput/OTPInput.vue.d.ts +1 -1
- package/components/PricingPlan/PricingPlan.vue.d.ts +1 -1
- package/components/Screen/ScreenFilter.vue.js +22 -21
- package/components/Screen/components/ScreenQuickFilters.vue.js +6 -5
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
- package/components/Stats/Stats.vue.d.ts +1 -1
- package/components/StatusChip/status-map.js +27 -7
- 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 +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +141 -115
- package/components/Workbook/Workbook.vue.d.ts +3 -3
- package/core/config.d.ts +76 -0
- package/core/index.js +17 -5
- package/index.d.ts +6 -1
- package/index.js +271 -256
- package/package.json +2 -1
- package/style.css +5 -3
- package/types/config.type.d.ts +6 -0
- package/types/list.type.d.ts +6 -0
- package/utils/configUtils.d.ts +9 -0
- package/utils/configUtils.js +7 -0
- package/utils/index.d.ts +1 -0
- package/utils/status.d.ts +5 -0
- package/utils/status.js +33 -0
- /package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as E, ref as
|
|
1
|
+
import { defineComponent as E, ref as m, watch as l, onMounted as D, computed as g, openBlock as i, createElementBlock as p, normalizeClass as u, normalizeStyle as N, createCommentVNode as y, Fragment as O, renderList as P, createBlock as x, resolveDynamicComponent as T, mergeProps as F, withCtx as _, createElementVNode as q, toDisplayString as G, nextTick as H } from "vue";
|
|
2
2
|
import { useResizeObserver as J } from "@vueuse/core";
|
|
3
3
|
import K from "../Icon.vue.js";
|
|
4
4
|
import { $t as Q } from "../../utils/i18n.js";
|
|
@@ -11,37 +11,38 @@ const Z = /* @__PURE__ */ E({
|
|
|
11
11
|
variant: { default: "surface" },
|
|
12
12
|
block: { type: Boolean, default: !1 },
|
|
13
13
|
textClass: {},
|
|
14
|
-
wrap: { type: Boolean, default: !1 }
|
|
14
|
+
wrap: { type: Boolean, default: !1 },
|
|
15
|
+
tabClass: {}
|
|
15
16
|
},
|
|
16
17
|
emits: ["update:modelValue", "change"],
|
|
17
18
|
setup(s, { emit: h }) {
|
|
18
|
-
const
|
|
19
|
+
const r = s, v = h, d = m(null), f = m(/* @__PURE__ */ new Map()), k = (e, n) => {
|
|
19
20
|
e ? f.value.set(n, e) : f.value.delete(n);
|
|
20
|
-
},
|
|
21
|
+
}, b = m({
|
|
21
22
|
width: "0px",
|
|
22
23
|
height: "0px",
|
|
23
24
|
transform: "translate(0px, 0px)",
|
|
24
25
|
opacity: 0
|
|
25
26
|
}), o = async () => {
|
|
26
27
|
await H();
|
|
27
|
-
const e = d.value, n = f.value.get(
|
|
28
|
+
const e = d.value, n = f.value.get(r.modelValue);
|
|
28
29
|
if (!e || !n) {
|
|
29
|
-
|
|
30
|
+
b.value.opacity = 0;
|
|
30
31
|
return;
|
|
31
32
|
}
|
|
32
|
-
const t = e.getBoundingClientRect(),
|
|
33
|
-
|
|
33
|
+
const t = e.getBoundingClientRect(), a = n.getBoundingClientRect(), c = a.left - t.left, M = a.top - t.top, j = a.width, A = a.height;
|
|
34
|
+
b.value = {
|
|
34
35
|
width: `${j}px`,
|
|
35
36
|
height: `${A}px`,
|
|
36
37
|
transform: `translate(${c}px, ${M}px)`,
|
|
37
38
|
opacity: 1
|
|
38
39
|
};
|
|
39
40
|
};
|
|
40
|
-
J(d, o), l(() =>
|
|
41
|
+
J(d, o), l(() => r.modelValue, o), l(() => r.options, o, { deep: !0 }), l(() => r.size, o), l(() => r.block, o), l(() => r.wrap, o), D(o);
|
|
41
42
|
const C = (e) => {
|
|
42
43
|
e.disabled || (v("update:modelValue", e.value), v("change", e.value));
|
|
43
44
|
}, w = g(() => {
|
|
44
|
-
const e =
|
|
45
|
+
const e = r.variant === "line", n = {
|
|
45
46
|
surface: "bg-secondary/80 p-1",
|
|
46
47
|
primary: "bg-secondary p-1",
|
|
47
48
|
secondary: "bg-secondary p-1",
|
|
@@ -49,51 +50,51 @@ const Z = /* @__PURE__ */ E({
|
|
|
49
50
|
success: "bg-success/10 p-1",
|
|
50
51
|
outline: "bg-transparent border border-border p-1",
|
|
51
52
|
line: "bg-transparent gap-6 rounded-none p-0 border-b border-border"
|
|
52
|
-
}, t =
|
|
53
|
-
return [`${
|
|
53
|
+
}, t = r.wrap && !e ? "flex-wrap" : "";
|
|
54
|
+
return [`${r.block || e ? "flex w-full" : "inline-flex"} rounded-lg relative isolate ${t}`, n[r.variant]];
|
|
54
55
|
}), z = {
|
|
55
56
|
sm: "text-xs px-2.5 py-1",
|
|
56
57
|
md: "-text-fs-2 px-3 py-1",
|
|
57
58
|
lg: "-text-fs-1 px-4 py-1"
|
|
58
59
|
}, $ = g(() => {
|
|
59
|
-
const e =
|
|
60
|
+
const e = r.variant === "line", n = e ? "relative z-10 flex items-center justify-center gap-2 font-medium transition-colors duration-50 ease-out cursor-pointer select-none outline-none focus-visible:ring-2 focus-visible:ring-primary/50 pb-2 border-b-2 border-transparent hover:text-foreground" : "relative z-10 flex items-center justify-center gap-2 font-medium transition-colors duration-50 ease-out cursor-pointer select-none rounded-md outline-none focus-visible:ring-2 focus-visible:ring-primary/50", t = (r.block || r.wrap) && !e ? "flex-1" : "";
|
|
60
61
|
return [n, t];
|
|
61
62
|
}), V = (e) => {
|
|
62
|
-
const n = e.value ===
|
|
63
|
-
let
|
|
63
|
+
const n = e.value === r.modelValue, t = r.variant === "line";
|
|
64
|
+
let a = "";
|
|
64
65
|
if (n)
|
|
65
66
|
if (t)
|
|
66
|
-
|
|
67
|
+
a = "text-primary";
|
|
67
68
|
else
|
|
68
|
-
switch (
|
|
69
|
+
switch (r.variant) {
|
|
69
70
|
case "surface":
|
|
70
|
-
|
|
71
|
+
a = "text-foreground";
|
|
71
72
|
break;
|
|
72
73
|
case "primary":
|
|
73
|
-
|
|
74
|
+
a = "text-primary-foreground";
|
|
74
75
|
break;
|
|
75
76
|
case "secondary":
|
|
76
|
-
|
|
77
|
+
a = "text-secondary";
|
|
77
78
|
break;
|
|
78
79
|
case "danger":
|
|
79
|
-
|
|
80
|
+
a = "text-danger-fg";
|
|
80
81
|
break;
|
|
81
82
|
case "success":
|
|
82
|
-
|
|
83
|
+
a = "text-success-fg";
|
|
83
84
|
break;
|
|
84
85
|
case "outline":
|
|
85
|
-
|
|
86
|
+
a = "text-accent-foreground";
|
|
86
87
|
break;
|
|
87
88
|
default:
|
|
88
|
-
|
|
89
|
+
a = "text-foreground";
|
|
89
90
|
}
|
|
90
91
|
else
|
|
91
|
-
|
|
92
|
+
a = t ? "text-muted-foreground" : "text-muted-foreground hover:text-foreground/80";
|
|
92
93
|
const c = e.disabled ? "opacity-50 cursor-not-allowed" : "";
|
|
93
|
-
return [$.value, r, c].join(" ");
|
|
94
|
+
return [$.value, a, r?.tabClass, c].join(" ");
|
|
94
95
|
}, R = g(() => {
|
|
95
96
|
const e = "absolute left-0 top-0 transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)] z-0 pointer-events-none";
|
|
96
|
-
return
|
|
97
|
+
return r.variant === "line" ? `${e} !h-[2px] !top-auto bottom-0` : `${e} rounded-md shadow-sm`;
|
|
97
98
|
}), B = () => ({
|
|
98
99
|
surface: "bg-background",
|
|
99
100
|
primary: "bg-primary",
|
|
@@ -102,7 +103,7 @@ const Z = /* @__PURE__ */ E({
|
|
|
102
103
|
success: "bg-success",
|
|
103
104
|
outline: "bg-accent/50 ring-1 ring-border",
|
|
104
105
|
line: "bg-primary"
|
|
105
|
-
})[
|
|
106
|
+
})[r.variant], S = (e) => e.labelI18n ? Q(e.labelI18n) : e.label, I = (e) => e.to ? "router-link" : e.href ? "a" : "button", L = (e) => e.to ? { to: e.to } : e.href ? { href: e.href, target: "_blank", rel: "noopener noreferrer" } : { type: "button" };
|
|
106
107
|
return (e, n) => (i(), p("div", {
|
|
107
108
|
ref_key: "containerRef",
|
|
108
109
|
ref: d,
|
|
@@ -113,18 +114,18 @@ const Z = /* @__PURE__ */ E({
|
|
|
113
114
|
s.modelValue !== void 0 && !s.wrap ? (i(), p("div", {
|
|
114
115
|
key: 0,
|
|
115
116
|
class: u([R.value, B()]),
|
|
116
|
-
style: N(
|
|
117
|
+
style: N(b.value)
|
|
117
118
|
}, null, 6)) : y("", !0),
|
|
118
119
|
(i(!0), p(O, null, P(s.options, (t) => (i(), x(T(I(t)), F({
|
|
119
120
|
key: t.value,
|
|
120
121
|
ref_for: !0,
|
|
121
|
-
ref: (
|
|
122
|
+
ref: (a) => k(a?.$el || a, t.value),
|
|
122
123
|
role: "tab",
|
|
123
124
|
"aria-selected": s.modelValue === t.value,
|
|
124
125
|
disabled: t.disabled,
|
|
125
|
-
class: [V(t), z[
|
|
126
|
+
class: [V(t), z[r.size]]
|
|
126
127
|
}, { ref_for: !0 }, L(t), {
|
|
127
|
-
onClick: (
|
|
128
|
+
onClick: (a) => C(t)
|
|
128
129
|
}), {
|
|
129
130
|
default: _(() => [
|
|
130
131
|
t.icon ? (i(), x(K, {
|
|
@@ -27,9 +27,9 @@ declare const _default: import('vue').DefineComponent<ThumbnailSelectorProps, {}
|
|
|
27
27
|
"onUpdate:images"?: (value: string[]) => any;
|
|
28
28
|
"onUpdate:thumbnail"?: (value: string) => any;
|
|
29
29
|
}>, {
|
|
30
|
-
disabled: boolean;
|
|
31
30
|
loading: boolean;
|
|
32
|
-
images: string[];
|
|
33
31
|
thumbnail: string | null;
|
|
32
|
+
disabled: boolean;
|
|
33
|
+
images: string[];
|
|
34
34
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
35
35
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ThumbnailSelector.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-74a988ab"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { defineComponent as L, ref as w, watch as _, computed as m, openBlock as i, createElementBlock as d, toDisplayString as p, createCommentVNode as g, createElementVNode as v, createVNode as f, unref as P, withCtx as k, Fragment as V, renderList as F, normalizeClass as S, withModifiers as C, createBlock as y } from "vue";
|
|
2
|
+
import h from "../Icon.vue.js";
|
|
3
|
+
import M from "../FilePicker/FilePicker.vue.js";
|
|
4
|
+
import { VueDraggable as O } from "vue-draggable-plus";
|
|
5
|
+
import { $t as z } from "../../utils/i18n.js";
|
|
6
|
+
const q = { class: "vl-thumbnail-selector flex flex-col gap-3" }, G = {
|
|
6
7
|
key: 0,
|
|
7
8
|
class: "text-sm font-medium text-foreground"
|
|
8
|
-
},
|
|
9
|
+
}, H = {
|
|
9
10
|
class: "vl-thumbnail-selector__preview w-full rounded-lg border border-border bg-muted/30 overflow-hidden flex items-center justify-center",
|
|
10
11
|
style: { "aspect-ratio": "1/1" }
|
|
11
|
-
},
|
|
12
|
+
}, J = ["src", "alt"], K = {
|
|
12
13
|
key: 1,
|
|
13
14
|
class: "flex flex-col items-center gap-2 text-muted-foreground/40 select-none"
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
style: { "will-change": "transform", contain: "layout style" }
|
|
17
|
-
}, K = ["onClick"], Q = ["src", "alt"], V = ["title", "onClick"], W = {
|
|
18
|
-
key: 1,
|
|
15
|
+
}, Q = { class: "text-xs" }, W = ["onClick"], X = ["src", "alt"], Y = ["title"], Z = ["title", "onClick"], ee = {
|
|
16
|
+
key: 2,
|
|
19
17
|
class: "absolute bottom-0.5 left-0.5 z-10 w-4 h-4 flex items-center justify-center rounded-full bg-primary pointer-events-none"
|
|
20
|
-
},
|
|
18
|
+
}, te = ["onClick"], le = { class: "text-[10px] mt-0.5 leading-tight" }, de = /* @__PURE__ */ L({
|
|
21
19
|
name: "ThumbnailSelector",
|
|
22
20
|
__name: "ThumbnailSelector",
|
|
23
21
|
props: {
|
|
@@ -29,130 +27,158 @@ const F = { class: "vl-thumbnail-selector flex flex-col gap-3" }, M = {
|
|
|
29
27
|
label: {}
|
|
30
28
|
},
|
|
31
29
|
emits: ["update:images", "update:thumbnail", "change"],
|
|
32
|
-
setup(
|
|
33
|
-
const
|
|
30
|
+
setup(l, { emit: j }) {
|
|
31
|
+
const c = l, n = j, r = w([...c.images || []]), o = w(c.thumbnail ?? null);
|
|
34
32
|
_(
|
|
35
|
-
() =>
|
|
36
|
-
(
|
|
37
|
-
|
|
33
|
+
() => c.images,
|
|
34
|
+
(e) => {
|
|
35
|
+
r.value = [...e || []];
|
|
38
36
|
}
|
|
39
37
|
), _(
|
|
40
|
-
() =>
|
|
41
|
-
(
|
|
42
|
-
|
|
38
|
+
() => c.thumbnail,
|
|
39
|
+
(e) => {
|
|
40
|
+
o.value = e ?? null;
|
|
43
41
|
}
|
|
44
42
|
);
|
|
45
|
-
const x = m(() =>
|
|
46
|
-
const
|
|
47
|
-
return
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
if (
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
let
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
-
if (!
|
|
58
|
-
const
|
|
59
|
-
for (const
|
|
60
|
-
if (
|
|
61
|
-
|
|
62
|
-
else if (
|
|
43
|
+
const x = m(() => o.value || r.value[0] || null), b = (e, u, t) => {
|
|
44
|
+
const a = t ? z(e, t) : z(e);
|
|
45
|
+
return a !== e ? a : u;
|
|
46
|
+
}, T = m(() => b("vlite.thumbnailSelector.preview", "Thumbnail preview")), U = m(() => b("vlite.thumbnailSelector.noImageSelected", "No image selected")), I = m(() => b("vlite.thumbnailSelector.image", "Image")), R = m(() => b("vlite.thumbnailSelector.removeImage", "Remove image")), $ = m(() => b("vlite.thumbnailSelector.upload", "Upload")), B = m(() => b("vlite.thumbnailSelector.dragToReorder", "Drag to reorder")), D = (e) => {
|
|
47
|
+
c.disabled || c.loading || (o.value = e, n("update:thumbnail", e), n("change", { images: r.value, thumbnail: e }));
|
|
48
|
+
}, N = (e, u) => {
|
|
49
|
+
if (u.stopPropagation(), c.disabled || c.loading) return;
|
|
50
|
+
const t = r.value.filter((s) => s !== e);
|
|
51
|
+
r.value = t;
|
|
52
|
+
let a = o.value;
|
|
53
|
+
o.value === e && (a = t[0] ?? null, o.value = a, n("update:thumbnail", a)), n("update:images", t), n("change", { images: t, thumbnail: a });
|
|
54
|
+
}, A = (e) => {
|
|
55
|
+
if (!e) return;
|
|
56
|
+
const u = Array.isArray(e) ? e : [e], t = [];
|
|
57
|
+
for (const s of u)
|
|
58
|
+
if (s.base64)
|
|
59
|
+
t.push(s.base64);
|
|
60
|
+
else if (s.file)
|
|
63
61
|
try {
|
|
64
|
-
|
|
62
|
+
t.push(URL.createObjectURL(s.file));
|
|
65
63
|
} catch {
|
|
66
64
|
}
|
|
67
|
-
if (
|
|
68
|
-
const
|
|
69
|
-
|
|
65
|
+
if (t.length === 0) return;
|
|
66
|
+
const a = [...r.value, ...t];
|
|
67
|
+
r.value = a, o.value || (o.value = t[0], n("update:thumbnail", t[0])), n("update:images", a), n("change", { images: a, thumbnail: o.value });
|
|
68
|
+
}, E = (e) => {
|
|
69
|
+
r.value = e, n("update:images", e), n("change", { images: e, thumbnail: o.value });
|
|
70
70
|
};
|
|
71
|
-
return (
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
x.value ? (
|
|
71
|
+
return (e, u) => (i(), d("div", q, [
|
|
72
|
+
l.label ? (i(), d("p", G, p(l.label), 1)) : g("", !0),
|
|
73
|
+
v("div", H, [
|
|
74
|
+
x.value ? (i(), d("img", {
|
|
75
75
|
key: 0,
|
|
76
76
|
src: x.value,
|
|
77
77
|
class: "w-full h-full object-cover",
|
|
78
|
-
alt:
|
|
79
|
-
}, null, 8,
|
|
80
|
-
|
|
78
|
+
alt: T.value
|
|
79
|
+
}, null, 8, J)) : (i(), d("div", K, [
|
|
80
|
+
f(h, {
|
|
81
81
|
icon: "lucide:image",
|
|
82
82
|
class: "w-10 h-10"
|
|
83
83
|
}),
|
|
84
|
-
|
|
84
|
+
v("span", Q, p(U.value), 1)
|
|
85
85
|
]))
|
|
86
86
|
]),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
onClick:
|
|
87
|
+
f(P(O), {
|
|
88
|
+
"model-value": r.value,
|
|
89
|
+
"onUpdate:modelValue": E,
|
|
90
|
+
animation: 150,
|
|
91
|
+
disabled: l.disabled || l.loading,
|
|
92
|
+
draggable: ".vl-thumbnail-selector__card",
|
|
93
|
+
handle: ".drag-handle",
|
|
94
|
+
filter: ".vl-thumbnail-selector__filepicker-inline, .vl-thumbnail-selector__upload",
|
|
95
|
+
"ghost-class": "opacity-50",
|
|
96
|
+
class: "vl-thumbnail-selector__grid grid grid-cols-3 sm:grid-cols-4 gap-2",
|
|
97
|
+
style: { "will-change": "transform", contain: "layout style" }
|
|
98
|
+
}, {
|
|
99
|
+
default: k(() => [
|
|
100
|
+
(i(!0), d(V, null, F(r.value, (t, a) => (i(), d("div", {
|
|
101
|
+
key: t,
|
|
102
|
+
class: S(["vl-thumbnail-selector__card relative rounded-md overflow-hidden cursor-pointer border-2 transition-all duration-150 w-full", [
|
|
103
|
+
o.value === t ? "border-primary shadow-sm shadow-primary/20" : "border-border",
|
|
104
|
+
l.disabled || l.loading ? "pointer-events-none opacity-60" : ""
|
|
105
|
+
]]),
|
|
106
|
+
style: { "aspect-ratio": "1/1" },
|
|
107
|
+
onClick: (s) => D(t)
|
|
108
108
|
}, [
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
class: "w-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
class: "vl-thumbnail-selector__filepicker-inline",
|
|
129
|
-
onChange: N
|
|
130
|
-
}, {
|
|
131
|
-
trigger: P(({ trigger: e, isLoading: l }) => [
|
|
132
|
-
h("button", {
|
|
109
|
+
v("img", {
|
|
110
|
+
src: t,
|
|
111
|
+
class: "w-full h-full object-cover",
|
|
112
|
+
alt: `${I.value} ${a + 1}`
|
|
113
|
+
}, null, 8, X),
|
|
114
|
+
l.disabled ? g("", !0) : (i(), d("div", {
|
|
115
|
+
key: 0,
|
|
116
|
+
class: "drag-handle vl-thumbnail-selector__drag-handle absolute top-1 left-1 z-10 w-6 h-6 flex items-center justify-center rounded bg-background/60 backdrop-blur-sm border border-border text-muted-foreground shadow-sm cursor-grab active:cursor-grabbing hover:bg-background/90 hover:text-foreground opacity-0 transition-opacity duration-150",
|
|
117
|
+
title: B.value,
|
|
118
|
+
onClick: u[0] || (u[0] = C(() => {
|
|
119
|
+
}, ["stop"]))
|
|
120
|
+
}, [
|
|
121
|
+
f(h, {
|
|
122
|
+
icon: "lucide:grip-horizontal",
|
|
123
|
+
class: "w-3.5 h-3.5"
|
|
124
|
+
})
|
|
125
|
+
], 8, Y)),
|
|
126
|
+
l.disabled ? g("", !0) : (i(), d("button", {
|
|
127
|
+
key: 1,
|
|
133
128
|
type: "button",
|
|
134
|
-
class:
|
|
135
|
-
|
|
136
|
-
onClick:
|
|
129
|
+
class: "vl-thumbnail-selector__delete absolute top-0.5 right-0.5 z-10 w-5 h-5 flex items-center justify-center rounded-full bg-background/90 border border-border text-muted-foreground shadow-sm opacity-0 transition-opacity duration-150 hover:text-destructive hover:border-destructive",
|
|
130
|
+
title: R.value,
|
|
131
|
+
onClick: C((s) => N(t, s), ["stop"])
|
|
137
132
|
}, [
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
]
|
|
149
|
-
]),
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
133
|
+
f(h, {
|
|
134
|
+
icon: "lucide:x",
|
|
135
|
+
class: "w-3 h-3"
|
|
136
|
+
})
|
|
137
|
+
], 8, Z)),
|
|
138
|
+
o.value === t ? (i(), d("div", ee, [
|
|
139
|
+
f(h, {
|
|
140
|
+
icon: "lucide:check",
|
|
141
|
+
class: "w-2.5 h-2.5 text-primary-foreground"
|
|
142
|
+
})
|
|
143
|
+
])) : g("", !0)
|
|
144
|
+
], 10, W))), 128)),
|
|
145
|
+
l.disabled ? g("", !0) : (i(), y(M, {
|
|
146
|
+
key: 0,
|
|
147
|
+
disabled: l.disabled || l.loading,
|
|
148
|
+
"return-format": "base64",
|
|
149
|
+
"file-types": ["image/jpeg", "image/png", "image/webp", "image/gif", "image/svg+xml"],
|
|
150
|
+
"max-size": l.maxSize ? l.maxSize * 1024 * 1024 : void 0,
|
|
151
|
+
"multi-select": !0,
|
|
152
|
+
class: "vl-thumbnail-selector__filepicker-inline",
|
|
153
|
+
onChange: A
|
|
154
|
+
}, {
|
|
155
|
+
trigger: k(({ trigger: t, isLoading: a }) => [
|
|
156
|
+
v("button", {
|
|
157
|
+
type: "button",
|
|
158
|
+
class: S(["vl-thumbnail-selector__upload flex flex-col items-center justify-center rounded-md border-2 border-dashed border-border text-muted-foreground/60 hover:border-primary/50 hover:text-primary/60 transition-all cursor-pointer w-full", a || l.loading ? "opacity-60 pointer-events-none" : ""]),
|
|
159
|
+
style: { "aspect-ratio": "1/1" },
|
|
160
|
+
onClick: t
|
|
161
|
+
}, [
|
|
162
|
+
a || l.loading ? (i(), y(h, {
|
|
163
|
+
key: 0,
|
|
164
|
+
icon: "lucide:loader-2",
|
|
165
|
+
class: "w-5 h-5 animate-spin"
|
|
166
|
+
})) : (i(), y(h, {
|
|
167
|
+
key: 1,
|
|
168
|
+
icon: "lucide:plus",
|
|
169
|
+
class: "w-5 h-5"
|
|
170
|
+
})),
|
|
171
|
+
v("span", le, p($.value), 1)
|
|
172
|
+
], 10, te)
|
|
173
|
+
]),
|
|
174
|
+
_: 1
|
|
175
|
+
}, 8, ["disabled", "max-size"]))
|
|
176
|
+
]),
|
|
177
|
+
_: 1
|
|
178
|
+
}, 8, ["model-value", "disabled"])
|
|
153
179
|
]));
|
|
154
180
|
}
|
|
155
181
|
});
|
|
156
182
|
export {
|
|
157
|
-
|
|
183
|
+
de as default
|
|
158
184
|
};
|
|
@@ -13,18 +13,18 @@ declare function __VLS_template(): {
|
|
|
13
13
|
};
|
|
14
14
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
15
|
declare const __VLS_component: import('vue').DefineComponent<WorkbookProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
16
|
-
change: (id: string) => any;
|
|
17
16
|
delete: (id: string) => any;
|
|
18
17
|
add: () => any;
|
|
18
|
+
change: (id: string) => any;
|
|
19
19
|
"update:modelValue": (id: string) => any;
|
|
20
20
|
"edit-start": (id: string) => any;
|
|
21
21
|
"edit-end": (id: string) => any;
|
|
22
22
|
duplicate: (id: string) => any;
|
|
23
23
|
"update:sheets": (sheets: WorkbookSheet[]) => any;
|
|
24
24
|
}, string, import('vue').PublicProps, Readonly<WorkbookProps> & Readonly<{
|
|
25
|
-
onChange?: (id: string) => any;
|
|
26
25
|
onDelete?: (id: string) => any;
|
|
27
26
|
onAdd?: () => any;
|
|
27
|
+
onChange?: (id: string) => any;
|
|
28
28
|
"onUpdate:modelValue"?: (id: string) => any;
|
|
29
29
|
"onEdit-start"?: (id: string) => any;
|
|
30
30
|
"onEdit-end"?: (id: string) => any;
|
|
@@ -32,10 +32,10 @@ declare const __VLS_component: import('vue').DefineComponent<WorkbookProps, {},
|
|
|
32
32
|
"onUpdate:sheets"?: (sheets: WorkbookSheet[]) => any;
|
|
33
33
|
}>, {
|
|
34
34
|
variant: "chrome" | "folder" | "simple" | "card";
|
|
35
|
+
itemClass: string;
|
|
35
36
|
modelValue: string;
|
|
36
37
|
editable: boolean;
|
|
37
38
|
draggable: boolean;
|
|
38
|
-
itemClass: string;
|
|
39
39
|
confirmDelete: boolean;
|
|
40
40
|
allowIconChange: boolean;
|
|
41
41
|
activeItemClass: string;
|
package/core/config.d.ts
CHANGED
|
@@ -43,6 +43,44 @@ export declare const configState: {
|
|
|
43
43
|
hideIcon?: boolean;
|
|
44
44
|
customStatuses?: Record<string, import('..').CustomStatusConfig>;
|
|
45
45
|
};
|
|
46
|
+
attachmentsList?: {
|
|
47
|
+
variant?: "default" | "list" | "inline" | "card";
|
|
48
|
+
size?: "sm" | "md" | "lg";
|
|
49
|
+
canView?: boolean;
|
|
50
|
+
canDownload?: boolean;
|
|
51
|
+
clickToPreview?: boolean;
|
|
52
|
+
showDownloadInList?: boolean;
|
|
53
|
+
rootClass?: string;
|
|
54
|
+
gridClass?: string;
|
|
55
|
+
cardClass?: string;
|
|
56
|
+
cardThumbnailClass?: string;
|
|
57
|
+
cardInfoClass?: string;
|
|
58
|
+
cardActionsClass?: string;
|
|
59
|
+
listClass?: string;
|
|
60
|
+
itemClass?: string;
|
|
61
|
+
itemIconBoxClass?: string;
|
|
62
|
+
itemNameClass?: string;
|
|
63
|
+
itemSizeClass?: string;
|
|
64
|
+
itemActionsClass?: string;
|
|
65
|
+
emptyClass?: string;
|
|
66
|
+
};
|
|
67
|
+
list?: {
|
|
68
|
+
title?: string;
|
|
69
|
+
class?: string;
|
|
70
|
+
titleI18n?: string;
|
|
71
|
+
variant?: import('..').ListVariant;
|
|
72
|
+
titleIcon?: string;
|
|
73
|
+
columns?: import('..').ListColumns;
|
|
74
|
+
showColon?: boolean;
|
|
75
|
+
loading?: boolean;
|
|
76
|
+
skeletonRows?: number;
|
|
77
|
+
stackedBorderStyle?: import('..').StackedBorderStyle;
|
|
78
|
+
};
|
|
79
|
+
invoice?: {
|
|
80
|
+
variant?: import('..').InvoiceVariant;
|
|
81
|
+
compact?: boolean;
|
|
82
|
+
displayBarcodeValue?: boolean;
|
|
83
|
+
};
|
|
46
84
|
};
|
|
47
85
|
};
|
|
48
86
|
/**
|
|
@@ -88,5 +126,43 @@ export declare function useVLiteConfig(): {
|
|
|
88
126
|
hideIcon?: boolean;
|
|
89
127
|
customStatuses?: Record<string, import('..').CustomStatusConfig>;
|
|
90
128
|
};
|
|
129
|
+
attachmentsList?: {
|
|
130
|
+
variant?: "default" | "list" | "inline" | "card";
|
|
131
|
+
size?: "sm" | "md" | "lg";
|
|
132
|
+
canView?: boolean;
|
|
133
|
+
canDownload?: boolean;
|
|
134
|
+
clickToPreview?: boolean;
|
|
135
|
+
showDownloadInList?: boolean;
|
|
136
|
+
rootClass?: string;
|
|
137
|
+
gridClass?: string;
|
|
138
|
+
cardClass?: string;
|
|
139
|
+
cardThumbnailClass?: string;
|
|
140
|
+
cardInfoClass?: string;
|
|
141
|
+
cardActionsClass?: string;
|
|
142
|
+
listClass?: string;
|
|
143
|
+
itemClass?: string;
|
|
144
|
+
itemIconBoxClass?: string;
|
|
145
|
+
itemNameClass?: string;
|
|
146
|
+
itemSizeClass?: string;
|
|
147
|
+
itemActionsClass?: string;
|
|
148
|
+
emptyClass?: string;
|
|
149
|
+
};
|
|
150
|
+
list?: {
|
|
151
|
+
title?: string;
|
|
152
|
+
class?: string;
|
|
153
|
+
titleI18n?: string;
|
|
154
|
+
variant?: import('..').ListVariant;
|
|
155
|
+
titleIcon?: string;
|
|
156
|
+
columns?: import('..').ListColumns;
|
|
157
|
+
showColon?: boolean;
|
|
158
|
+
loading?: boolean;
|
|
159
|
+
skeletonRows?: number;
|
|
160
|
+
stackedBorderStyle?: import('..').StackedBorderStyle;
|
|
161
|
+
};
|
|
162
|
+
invoice?: {
|
|
163
|
+
variant?: import('..').InvoiceVariant;
|
|
164
|
+
compact?: boolean;
|
|
165
|
+
displayBarcodeValue?: boolean;
|
|
166
|
+
};
|
|
91
167
|
};
|
|
92
168
|
};
|
package/core/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { configState as t, VLITE_CONFIG_KEY as s } from "./config.js";
|
|
2
|
-
import { updateConfig as
|
|
3
|
-
function
|
|
2
|
+
import { updateConfig as i, useVLiteConfig as r } from "./config.js";
|
|
3
|
+
function n(e = {}) {
|
|
4
4
|
return {
|
|
5
5
|
install(m) {
|
|
6
6
|
e && (e.services && (t.services = { ...t.services, ...e.services }), e.importData && (t.importData = { ...t.importData, ...e.importData }), e.exportData && (t.exportData = { ...t.exportData, ...e.exportData }), e.components && (t.components = {
|
|
@@ -29,6 +29,18 @@ function o(e = {}) {
|
|
|
29
29
|
...t.components?.statusChip?.customStatuses || {},
|
|
30
30
|
...e.components.statusChip?.customStatuses || {}
|
|
31
31
|
}
|
|
32
|
+
},
|
|
33
|
+
attachmentsList: {
|
|
34
|
+
...t.components?.attachmentsList || {},
|
|
35
|
+
...e.components.attachmentsList || {}
|
|
36
|
+
},
|
|
37
|
+
list: {
|
|
38
|
+
...t.components?.list || {},
|
|
39
|
+
...e.components.list || {}
|
|
40
|
+
},
|
|
41
|
+
invoice: {
|
|
42
|
+
...t.components?.invoice || {},
|
|
43
|
+
...e.components.invoice || {}
|
|
32
44
|
}
|
|
33
45
|
})), m.provide(s, t), m.config.globalProperties.$vlite = t;
|
|
34
46
|
}
|
|
@@ -37,7 +49,7 @@ function o(e = {}) {
|
|
|
37
49
|
export {
|
|
38
50
|
s as VLITE_CONFIG_KEY,
|
|
39
51
|
t as configState,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
52
|
+
n as createVLite,
|
|
53
|
+
i as updateConfig,
|
|
54
|
+
r as useVLiteConfig
|
|
43
55
|
};
|