vlite3 1.4.40 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/AppShell/AppShellLayoutClassic.vue.js +27 -28
- package/components/AppShell/AppShellLayoutDashboard.vue.js +48 -48
- package/components/AppShell/AppShellLayoutDock.vue.js +51 -51
- package/components/AppShell/AppShellLayoutHeaderShell.vue.js +69 -69
- package/components/AppShell/AppShellLayoutSidebarFirst.vue.d.ts +2 -2
- package/components/AppShell/AppShellLayoutSidebarFirst.vue.js +78 -78
- package/components/AppShell/AppShellLayoutStorefront.vue.js +14 -15
- package/components/AppShell/useAppShell.d.ts +4 -0
- package/components/AppShell/useAppShell.js +45 -40
- package/components/AsyncSelect/createAsyncSelect.js +10 -10
- package/components/AttachmentsList/AttachmentsList.vue.d.ts +50 -2
- package/components/AttachmentsList/AttachmentsList.vue.js +289 -272
- package/components/AttachmentsList/types.d.ts +37 -0
- package/components/BackButton.vue.js +2 -2
- package/components/Button.vue.d.ts +1 -0
- package/components/Button.vue.js +5 -241
- package/components/Button.vue2.js +245 -2
- package/components/ButtonGroup.vue.js +2 -2
- package/components/ButtonGroup.vue2.js +4 -1
- package/components/Calendar/Calendar.vue2.js +16 -16
- package/components/Cart/CartCouponInput.vue.js +24 -24
- package/components/Cart/CartEmptyState.vue.js +4 -4
- package/components/Cart/CartLineItem.vue.js +33 -33
- package/components/Cart/CartVariant1.vue.js +3 -3
- package/components/Cart/CartVariant2.vue.js +5 -5
- package/components/Cart/CartVariant3.vue.js +25 -25
- package/components/Cart/CartVariant4.vue.js +9 -9
- package/components/CategoryManager/CategoryManager.vue.d.ts +2 -2
- package/components/CategoryManager/CategoryManager.vue2.js +18 -18
- package/components/CategoryManager/CategoryNode.vue.js +4 -4
- package/components/CategoryMenu/CategoryMenu.vue.js +3 -2
- package/components/CategoryMenu/CategoryMenuVariant1.vue2.js +3 -2
- package/components/Chat/ChatInterface.vue.js +23 -23
- package/components/Clipboard.vue.d.ts +7 -1
- package/components/Clipboard.vue.js +19 -17
- package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +22 -22
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +8 -8
- package/components/Comment/CommentEditor.vue.js +14 -14
- package/components/Comment/CommentItem.vue2.js +6 -6
- package/components/Comment/CommentThread.vue.js +4 -4
- package/components/DataList/DataList.vue.js +7 -7
- package/components/DataTable/DataTable.vue.d.ts +9 -1
- package/components/DataTable/DataTable.vue.js +374 -263
- package/components/DataTable/DataTableRow.vue.d.ts +23 -2
- package/components/DataTable/DataTableRow.vue.js +5 -198
- package/components/DataTable/DataTableRow.vue2.js +360 -2
- package/components/DataTable/dataTableHeaders.d.ts +18 -0
- package/components/DataTable/dataTableHeaders.js +9 -0
- package/components/DataTable/types.d.ts +6 -0
- package/components/DatePicker.vue.js +8 -9
- package/components/DateRangePicker.vue2.js +34 -34
- package/components/Dropdown/Dropdown.vue.d.ts +7 -2
- package/components/Dropdown/Dropdown.vue.js +146 -139
- package/components/Dropdown/DropdownTrigger.vue.js +6 -6
- package/components/ExportData/ExportData.vue.js +15 -15
- package/components/FilePicker/FilePickerDropzone.vue.js +16 -16
- package/components/FilePicker/FilePickerInput.vue.js +3 -2
- package/components/FilePicker/FilePreview.vue.js +3 -3
- package/components/FileTree/FileTree.vue.js +4 -4
- package/components/FileTree/FileTree.vue2.js +9 -9
- package/components/FileTree/FileTreeNode.vue.js +76 -72
- package/components/Footer/Variant1.vue.js +48 -48
- package/components/Footer/Variant2.vue.js +42 -42
- package/components/Form/AccordionView.vue.d.ts +1 -1
- package/components/Form/AccordionView.vue.js +2 -2
- package/components/Form/AccordionView.vue3.js +61 -57
- package/components/Form/Form.vue2.js +41 -41
- package/components/Form/TableRow.vue.d.ts +7 -0
- package/components/Form/TableRow.vue.js +187 -41
- package/components/Form/TableView.vue.d.ts +11 -1
- package/components/Form/TableView.vue.js +71 -49
- package/components/Form/composables/useForm.js +146 -142
- package/components/Form/index.vue.d.ts +5 -1
- package/components/Form/index.vue.js +2 -2
- package/components/Form/index.vue2.js +44 -37
- package/components/Form/rowHelpers.d.ts +20 -0
- package/components/Form/rowHelpers.js +76 -28
- package/components/Form/types.d.ts +11 -0
- package/components/GoogleLogin.vue.js +4 -4
- package/components/IconPicker.vue.js +9 -9
- package/components/ImportData/ImportData.vue.js +11 -11
- package/components/ImportData/ImportStep1.vue.js +10 -10
- package/components/ImportData/ImportStep2.vue.js +15 -14
- package/components/Input.vue.js +133 -129
- package/components/Kanban/KanbanBoard.vue.js +1 -1
- package/components/Kanban/KanbanBoard.vue2.js +9 -9
- package/components/MultiSelect/MultiSelect.vue.js +3 -2
- package/components/Navbar/Navbar.vue.js +17 -17
- package/components/Navbar/NavbarGroup.vue.js +8 -7
- package/components/Navbar/NavbarItem.vue.js +40 -39
- package/components/Navbar/NavbarTabs.vue.js +6 -184
- package/components/Navbar/NavbarTabs.vue2.js +204 -0
- package/components/Navbar/useNavbar.js +3 -3
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +81 -77
- package/components/OTPInput/OTPInput.vue.js +24 -23
- package/components/Pagination/Pagination.vue.d.ts +1 -1
- package/components/Pagination/Pagination.vue.js +5 -274
- package/components/Pagination/Pagination.vue2.js +283 -2
- package/components/PermissionMatrix/PermissionTopBar.vue.js +19 -18
- package/components/PricingPlan/PricingPlanItem.vue.js +7 -7
- package/components/Screen/Screen.vue.d.ts +1 -1
- package/components/Screen/Screen.vue.js +21 -21
- package/components/Screen/ScreenFilter.vue.js +5 -5
- package/components/Screen/components/ScreenAddAction.vue.js +3 -3
- package/components/Screen/components/ScreenEmptyState.vue.js +10 -10
- package/components/Screen/components/ScreenExportModal.vue.js +12 -12
- package/components/Screen/components/ScreenOptionsDropdown.vue.js +5 -5
- package/components/Screen/components/ScreenToolbar.vue.js +15 -15
- package/components/SidePanel.vue.js +2 -2
- package/components/SidePanel.vue2.js +6 -6
- package/components/SidebarMenu/SidebarMenu.vue.js +77 -72
- package/components/SidebarMenu/SidebarMenuItem.vue.js +172 -168
- package/components/Slider.vue.js +123 -108
- package/components/Tabes/Tabes.vue.d.ts +25 -4
- package/components/Tabes/Tabes.vue.js +3 -3
- package/components/Tabes/Tabes.vue2.js +274 -211
- package/components/Tabes/tabes.utils.d.ts +30 -0
- package/components/Tabes/tabes.utils.js +49 -18
- package/components/Tabes/types.d.ts +7 -0
- package/components/Textarea.vue.d.ts +2 -0
- package/components/Textarea.vue.js +19 -16
- package/components/ThemeToggle.vue.js +8 -8
- package/components/ToastNotification.vue2.js +10 -10
- package/components/TreeConnectors/TreeConnectors.vue.d.ts +1 -1
- package/components/TreeConnectors/TreeConnectors.vue.js +13 -8
- package/components/TreeConnectors/geometry.js +77 -69
- package/components/Workbook/WorkbookAddButton.vue.js +2 -2
- package/composables/useRtl.d.ts +14 -0
- package/composables/useRtl.js +33 -0
- package/index.js +470 -471
- package/package.json +5 -4
- package/style.css +86 -1
- package/types/button.d.ts +8 -0
- package/components/Navbar/NavbarTabs.vue3.js +0 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as f, ref as p, computed as
|
|
1
|
+
import { defineComponent as f, ref as p, computed as n, openBlock as x, createBlock as m, normalizeClass as T, withCtx as v, renderSlot as y, createCommentVNode as I } from "vue";
|
|
2
2
|
import C from "./Button.vue.js";
|
|
3
|
-
import { $t as
|
|
4
|
-
const
|
|
3
|
+
import { $t as r } from "../utils/i18n.js";
|
|
4
|
+
const B = /* @__PURE__ */ f({
|
|
5
5
|
__name: "Clipboard",
|
|
6
6
|
props: {
|
|
7
7
|
textToCopy: {},
|
|
@@ -16,54 +16,56 @@ const w = /* @__PURE__ */ f({
|
|
|
16
16
|
copiedText: {},
|
|
17
17
|
defaultTextI18n: { default: "vlite.clipboard.copy" },
|
|
18
18
|
copiedTextI18n: { default: "vlite.clipboard.copied" },
|
|
19
|
-
asIcon: { type: Boolean, default: !1 }
|
|
19
|
+
asIcon: { type: Boolean, default: !1 },
|
|
20
|
+
dir: { default: "auto" }
|
|
20
21
|
},
|
|
21
22
|
emits: ["copy", "error"],
|
|
22
|
-
setup(o, { emit:
|
|
23
|
-
const e = o,
|
|
24
|
-
let
|
|
25
|
-
const u =
|
|
23
|
+
setup(o, { emit: c }) {
|
|
24
|
+
const e = o, i = c, a = p(!1);
|
|
25
|
+
let d = null;
|
|
26
|
+
const u = n(() => a.value ? e.copiedIcon : e.defaultIcon), l = n(() => {
|
|
26
27
|
if (!e.asIcon)
|
|
27
28
|
if (a.value) {
|
|
28
29
|
if (e.copiedText) return e.copiedText;
|
|
29
|
-
const t =
|
|
30
|
+
const t = r(e.copiedTextI18n);
|
|
30
31
|
return t !== e.copiedTextI18n ? t : "Copied";
|
|
31
32
|
} else {
|
|
32
33
|
if (e.defaultText) return e.defaultText;
|
|
33
|
-
const t =
|
|
34
|
+
const t = r(e.defaultTextI18n);
|
|
34
35
|
return t !== e.defaultTextI18n ? t : "Copy";
|
|
35
36
|
}
|
|
36
37
|
}), s = async () => {
|
|
37
38
|
if (!e.disabled)
|
|
38
39
|
try {
|
|
39
|
-
await navigator.clipboard.writeText(e.textToCopy), a.value = !0,
|
|
40
|
+
await navigator.clipboard.writeText(e.textToCopy), a.value = !0, i("copy", e.textToCopy), d && clearTimeout(d), d = setTimeout(() => {
|
|
40
41
|
a.value = !1;
|
|
41
42
|
}, 500);
|
|
42
43
|
} catch (t) {
|
|
43
|
-
|
|
44
|
+
i("error", t instanceof Error ? t : new Error("Copy failed"));
|
|
44
45
|
}
|
|
45
46
|
};
|
|
46
|
-
return (t, b) => (
|
|
47
|
+
return (t, b) => (x(), m(C, {
|
|
47
48
|
variant: o.variant,
|
|
48
49
|
size: o.size,
|
|
49
50
|
rounded: o.rounded,
|
|
50
51
|
class: T(e.class),
|
|
51
52
|
disabled: o.disabled,
|
|
52
53
|
icon: u.value,
|
|
53
|
-
text:
|
|
54
|
+
text: l.value,
|
|
54
55
|
"as-icon": o.asIcon,
|
|
56
|
+
dir: o.dir === "auto" ? void 0 : o.dir,
|
|
55
57
|
onClick: s
|
|
56
58
|
}, {
|
|
57
59
|
default: v(() => [
|
|
58
|
-
!o.asIcon && !
|
|
60
|
+
!o.asIcon && !l.value ? y(t.$slots, "default", {
|
|
59
61
|
key: 0,
|
|
60
62
|
copied: a.value
|
|
61
63
|
}) : I("", !0)
|
|
62
64
|
]),
|
|
63
65
|
_: 3
|
|
64
|
-
}, 8, ["variant", "size", "rounded", "class", "disabled", "icon", "text", "as-icon"]));
|
|
66
|
+
}, 8, ["variant", "size", "rounded", "class", "disabled", "icon", "text", "as-icon", "dir"]));
|
|
65
67
|
}
|
|
66
68
|
});
|
|
67
69
|
export {
|
|
68
|
-
|
|
70
|
+
B as default
|
|
69
71
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as T, ref as x, computed as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as T, ref as x, computed as B, watch as u, onMounted as P, onUnmounted as R, openBlock as a, createElementBlock as b, createVNode as L, unref as S, createBlock as z, createCommentVNode as p, createElementVNode as _, normalizeStyle as V, renderSlot as I, nextTick as M } from "vue";
|
|
2
|
+
import l from "@jaames/iro";
|
|
3
3
|
import { useEyeDropper as N } from "@vueuse/core";
|
|
4
4
|
import d from "../Button.vue.js";
|
|
5
|
-
import { COLOR_PICKER_RESET_VALUE as
|
|
6
|
-
const
|
|
5
|
+
import { COLOR_PICKER_RESET_VALUE as D } from "./constants.js";
|
|
6
|
+
const F = { class: "space-y-3 w-max" }, O = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "flex gap-2 mb-2.5 -text-fs-3 pr-0.5"
|
|
9
9
|
}, j = /* @__PURE__ */ T({
|
|
@@ -14,13 +14,13 @@ const D = { class: "space-y-3 w-max" }, F = {
|
|
|
14
14
|
size: { default: "md" }
|
|
15
15
|
},
|
|
16
16
|
emits: ["update:color", "close"],
|
|
17
|
-
setup(
|
|
18
|
-
const n =
|
|
17
|
+
setup(c, { emit: E }) {
|
|
18
|
+
const n = c, s = E, t = x(), o = x(null);
|
|
19
19
|
let i = !1;
|
|
20
20
|
const { isSupported: f, open: w, sRGBHex: H } = N(), m = (e) => {
|
|
21
21
|
const r = (e || "").toLowerCase();
|
|
22
|
-
return r ===
|
|
23
|
-
}, C = (e) => m(e) || !e ? "#000000" : e, v =
|
|
22
|
+
return r === D || r === "#00000000";
|
|
23
|
+
}, C = (e) => m(e) || !e ? "#000000" : e, v = B(() => {
|
|
24
24
|
switch (n.size) {
|
|
25
25
|
case "sm":
|
|
26
26
|
return 140;
|
|
@@ -37,7 +37,7 @@ const D = { class: "space-y-3 w-max" }, F = {
|
|
|
37
37
|
if (!(!t.value || o.value)) {
|
|
38
38
|
await M();
|
|
39
39
|
try {
|
|
40
|
-
o.value && (o.value.off("color:change"), o.value = null), t.value && (t.value.innerHTML = ""), o.value =
|
|
40
|
+
o.value && (o.value.off("color:change"), o.value = null), t.value && (t.value.innerHTML = ""), o.value = l.ColorPicker(t.value, {
|
|
41
41
|
width: v.value,
|
|
42
42
|
color: C(n.color),
|
|
43
43
|
margin: 9,
|
|
@@ -45,22 +45,22 @@ const D = { class: "space-y-3 w-max" }, F = {
|
|
|
45
45
|
sliderSize: 14,
|
|
46
46
|
layout: [
|
|
47
47
|
{
|
|
48
|
-
component:
|
|
48
|
+
component: l.ui.Box
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
|
-
component:
|
|
51
|
+
component: l.ui.Slider,
|
|
52
52
|
options: {
|
|
53
53
|
sliderType: "hue"
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
|
-
component:
|
|
57
|
+
component: l.ui.Slider,
|
|
58
58
|
options: {
|
|
59
59
|
sliderType: "saturation"
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
|
-
component:
|
|
63
|
+
component: l.ui.Slider,
|
|
64
64
|
options: {
|
|
65
65
|
sliderType: "value"
|
|
66
66
|
}
|
|
@@ -114,15 +114,15 @@ const D = { class: "space-y-3 w-max" }, F = {
|
|
|
114
114
|
console.error("Error opening eyedropper:", e);
|
|
115
115
|
}
|
|
116
116
|
};
|
|
117
|
-
return
|
|
117
|
+
return P(() => {
|
|
118
118
|
h();
|
|
119
|
-
}),
|
|
119
|
+
}), R(() => {
|
|
120
120
|
k();
|
|
121
|
-
}), (e, r) => (a(), b("div",
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
}), (e, r) => (a(), b("div", F, [
|
|
122
|
+
c.showHeader ? (a(), b("div", O, [
|
|
123
|
+
L(d, {
|
|
124
124
|
icon: "typcn:arrow-back",
|
|
125
|
-
onClick: r[0] || (r[0] = (
|
|
125
|
+
onClick: r[0] || (r[0] = (U) => s("close")),
|
|
126
126
|
class: "flex-1 px-2 py-1 bg-background hover:bg-accent rounded text-xs border border-border transition-colors"
|
|
127
127
|
}),
|
|
128
128
|
S(f) ? (a(), z(d, {
|
|
@@ -132,13 +132,13 @@ const D = { class: "space-y-3 w-max" }, F = {
|
|
|
132
132
|
class: "flex-1 px-2 py-1 bg-background hover:bg-accent rounded text-xs border border-border transition-colors"
|
|
133
133
|
})) : p("", !0)
|
|
134
134
|
])) : p("", !0),
|
|
135
|
-
|
|
135
|
+
_("div", {
|
|
136
136
|
ref_key: "pickerRef",
|
|
137
137
|
ref: t,
|
|
138
|
-
style: V({ width: v.value + "px", minHeight: y[
|
|
138
|
+
style: V({ width: v.value + "px", minHeight: y[c.size] + "px" })
|
|
139
139
|
}, null, 4),
|
|
140
140
|
I(e.$slots, "bottom", {}, () => [
|
|
141
|
-
S(f) && !
|
|
141
|
+
S(f) && !c.showHeader ? (a(), z(d, {
|
|
142
142
|
key: 0,
|
|
143
143
|
onClick: g,
|
|
144
144
|
icon: "pepicons-pop:color-picker",
|
|
@@ -7,8 +7,8 @@ import "../../core/config.js";
|
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
9
9
|
import y from "../Button.vue.js";
|
|
10
|
-
import A from "./ColorIro.
|
|
11
|
-
/* empty css
|
|
10
|
+
import A from "./ColorIro.vue2.js";
|
|
11
|
+
/* empty css */
|
|
12
12
|
import { useEyeDropper as T } from "@vueuse/core";
|
|
13
13
|
import { COLOR_PICKER_RESET_VALUE as g } from "./constants.js";
|
|
14
14
|
const F = ["disabled", "aria-label"], G = { class: "min-w-0 flex-1 truncate text-foreground" }, K = { class: "absolute left-2.5 top-1/2 -translate-y-1/2 flex items-center justify-center z-20 pointer-events-none" }, q = {
|
|
@@ -35,17 +35,17 @@ const F = ["disabled", "aria-label"], G = { class: "min-w-0 flex-1 truncate text
|
|
|
35
35
|
allowReset: { type: Boolean, default: !1 }
|
|
36
36
|
},
|
|
37
37
|
emits: ["update:modelValue", "change", "reset"],
|
|
38
|
-
setup(e, { emit:
|
|
39
|
-
const l = e, f =
|
|
38
|
+
setup(e, { emit: E }) {
|
|
39
|
+
const l = e, f = E, p = k(!1), a = k(l.modelValue || "#000000"), x = w(() => {
|
|
40
40
|
const t = (l.modelValue || "").toLowerCase();
|
|
41
41
|
return !t || t === g;
|
|
42
|
-
}), d = w(() => l.allowReset && !l.disabled && !x.value), { isSupported:
|
|
43
|
-
v(
|
|
42
|
+
}), d = w(() => l.allowReset && !l.disabled && !x.value), { isSupported: $, open: B, sRGBHex: O } = T();
|
|
43
|
+
v(O, (t) => {
|
|
44
44
|
t && (a.value = t);
|
|
45
45
|
});
|
|
46
46
|
const P = async () => {
|
|
47
47
|
try {
|
|
48
|
-
await
|
|
48
|
+
await B();
|
|
49
49
|
} catch (t) {
|
|
50
50
|
console.error("Error opening eyedropper:", t);
|
|
51
51
|
}
|
|
@@ -156,7 +156,7 @@ const F = ["disabled", "aria-label"], G = { class: "min-w-0 flex-1 truncate text
|
|
|
156
156
|
}, {
|
|
157
157
|
bottom: h(() => [
|
|
158
158
|
e.showInput || e.allowReset ? (o(), s("div", J, [
|
|
159
|
-
e.showInput && V(
|
|
159
|
+
e.showInput && V($) ? (o(), c(y, {
|
|
160
160
|
key: 0,
|
|
161
161
|
onClick: P,
|
|
162
162
|
icon: "pepicons-pop:color-picker",
|
|
@@ -31,23 +31,23 @@ const X = { class: "flex-1 min-w-0 flex flex-col gap-2" }, Y = {
|
|
|
31
31
|
},
|
|
32
32
|
emits: ["submit", "cancel"],
|
|
33
33
|
setup(t, { emit: S }) {
|
|
34
|
-
const i = t, b = S,
|
|
34
|
+
const i = t, b = S, N = h(() => {
|
|
35
35
|
if (i.placeholder) return i.placeholder;
|
|
36
36
|
const e = k("vlite.comment.placeholder");
|
|
37
37
|
return e !== "vlite.comment.placeholder" ? e : "Leave a comment...";
|
|
38
|
-
}),
|
|
38
|
+
}), V = h(() => {
|
|
39
39
|
if (i.editingText) return i.editingText;
|
|
40
40
|
const e = k("vlite.comment.editing");
|
|
41
41
|
return e !== "vlite.comment.editing" ? e : "Editing Comment";
|
|
42
|
-
}),
|
|
42
|
+
}), $ = h(() => {
|
|
43
43
|
if (i.cancelEditText) return i.cancelEditText;
|
|
44
44
|
const e = k("vlite.comment.cancelEdit");
|
|
45
45
|
return e !== "vlite.comment.cancelEdit" ? e : "Press Esc to cancel";
|
|
46
|
-
}),
|
|
46
|
+
}), B = h(() => {
|
|
47
47
|
if (i.cancelText) return i.cancelText;
|
|
48
48
|
const e = k("vlite.comment.cancel");
|
|
49
49
|
return e !== "vlite.comment.cancel" ? e : "Cancel";
|
|
50
|
-
}), v = T(i.initialText), o = T(null), l = T([]), { handleUploadFiles:
|
|
50
|
+
}), v = T(i.initialText), o = T(null), l = T([]), { handleUploadFiles: R, loading: s } = W(), U = () => {
|
|
51
51
|
if (!o.value) return;
|
|
52
52
|
o.value.style.height = "auto";
|
|
53
53
|
const e = o.value.scrollHeight;
|
|
@@ -58,12 +58,12 @@ const X = { class: "flex-1 min-w-0 flex flex-col gap-2" }, Y = {
|
|
|
58
58
|
U();
|
|
59
59
|
});
|
|
60
60
|
});
|
|
61
|
-
const
|
|
61
|
+
const D = (e) => {
|
|
62
62
|
e.key === "Enter" && !e.shiftKey ? (e.preventDefault(), s.value || z()) : e.key === "Escape" && i.variant !== "root" && (e.preventDefault(), b("cancel"));
|
|
63
63
|
}, E = h(() => {
|
|
64
64
|
const e = !!v.value.trim(), n = Array.isArray(l.value) && l.value.length > 0;
|
|
65
65
|
return (e || n) && !s.value;
|
|
66
|
-
}),
|
|
66
|
+
}), _ = (e) => {
|
|
67
67
|
s.value || Array.isArray(l.value) && l.value.splice(e, 1);
|
|
68
68
|
}, z = async () => {
|
|
69
69
|
if (!E.value) return;
|
|
@@ -72,7 +72,7 @@ const X = { class: "flex-1 min-w-0 flex flex-col gap-2" }, Y = {
|
|
|
72
72
|
if (n) {
|
|
73
73
|
const x = l.value.map((g) => g.file).filter(Boolean);
|
|
74
74
|
if (x.length > 0) {
|
|
75
|
-
const g = await
|
|
75
|
+
const g = await R(x, i.folderId);
|
|
76
76
|
a = l.value.map((u, I) => ({
|
|
77
77
|
fileUrl: g[I] || "",
|
|
78
78
|
fileName: u.fileName,
|
|
@@ -104,10 +104,10 @@ const X = { class: "flex-1 min-w-0 flex flex-col gap-2" }, Y = {
|
|
|
104
104
|
icon: "lucide:pencil",
|
|
105
105
|
class: "w-3.5 h-3.5 text-primary shrink-0"
|
|
106
106
|
}),
|
|
107
|
-
r("span", null, y(
|
|
107
|
+
r("span", null, y(V.value), 1)
|
|
108
108
|
]),
|
|
109
109
|
r("div", ee, [
|
|
110
|
-
r("span", te, y(
|
|
110
|
+
r("span", te, y($.value), 1),
|
|
111
111
|
r("button", {
|
|
112
112
|
onClick: n[0] || (n[0] = (a) => b("cancel")),
|
|
113
113
|
class: "hover:text-foreground p-0.5 rounded-full hover:bg-background transition-colors",
|
|
@@ -135,7 +135,7 @@ const X = { class: "flex-1 min-w-0 flex flex-col gap-2" }, Y = {
|
|
|
135
135
|
title: a.fileName
|
|
136
136
|
}, y(a.fileName), 9, ie),
|
|
137
137
|
r("button", {
|
|
138
|
-
onClick: (g) =>
|
|
138
|
+
onClick: (g) => _(x),
|
|
139
139
|
disabled: f(s),
|
|
140
140
|
class: "absolute right-1 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-destructive rounded-full hover:bg-muted/50 transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
|
|
141
141
|
}, [
|
|
@@ -174,13 +174,13 @@ const X = { class: "flex-1 min-w-0 flex flex-col gap-2" }, Y = {
|
|
|
174
174
|
ref_key: "textareaRef",
|
|
175
175
|
ref: o,
|
|
176
176
|
"onUpdate:modelValue": n[2] || (n[2] = (a) => v.value = a),
|
|
177
|
-
placeholder:
|
|
177
|
+
placeholder: N.value,
|
|
178
178
|
disabled: f(s),
|
|
179
179
|
class: "flex-1 max-h-[120px] min-h-[20px] w-full resize-none bg-transparent px-2 py-2 text-sm text-foreground outline-none placeholder:text-muted-foreground scrollbar-thin disabled:opacity-50",
|
|
180
180
|
rows: "1",
|
|
181
181
|
"aria-label": "Comment input",
|
|
182
182
|
onInput: U,
|
|
183
|
-
onKeydown:
|
|
183
|
+
onKeydown: D
|
|
184
184
|
}, null, 40, se), [
|
|
185
185
|
[G, v.value]
|
|
186
186
|
]),
|
|
@@ -194,7 +194,7 @@ const X = { class: "flex-1 min-w-0 flex flex-col gap-2" }, Y = {
|
|
|
194
194
|
disabled: f(s)
|
|
195
195
|
}, {
|
|
196
196
|
default: A(() => [
|
|
197
|
-
J(y(
|
|
197
|
+
J(y(B.value), 1)
|
|
198
198
|
]),
|
|
199
199
|
_: 1
|
|
200
200
|
}, 8, ["disabled"])) : p("", !0),
|
|
@@ -73,15 +73,15 @@ const X = { class: "vl-comment flex w-full relative" }, Y = { class: "flex flex-
|
|
|
73
73
|
hour: "numeric",
|
|
74
74
|
minute: "numeric"
|
|
75
75
|
}).format(m);
|
|
76
|
-
}),
|
|
76
|
+
}), B = u(() => {
|
|
77
77
|
if (l.editedText) return l.editedText;
|
|
78
78
|
const m = k("vlite.comment.edited");
|
|
79
79
|
return m !== "vlite.comment.edited" ? m : "edited";
|
|
80
|
-
}),
|
|
80
|
+
}), M = u(() => {
|
|
81
81
|
if (l.replyText) return l.replyText;
|
|
82
82
|
const m = k("vlite.comment.replyAction");
|
|
83
83
|
return m !== "vlite.comment.replyAction" ? m : "Reply";
|
|
84
|
-
}),
|
|
84
|
+
}), $ = u(() => {
|
|
85
85
|
if (l.loadMoreRepliesText) return l.loadMoreRepliesText;
|
|
86
86
|
if (l.comment.replyCount && l.comment.replyCount > 0)
|
|
87
87
|
return `View ${l.comment.replyCount} more replies`;
|
|
@@ -127,7 +127,7 @@ const X = { class: "vl-comment flex w-full relative" }, Y = { class: "flex flex-
|
|
|
127
127
|
_: 1
|
|
128
128
|
})) : d("", !0),
|
|
129
129
|
R.value ? (i(), r("span", le, f(R.value), 1)) : d("", !0),
|
|
130
|
-
e.comment.isEdited ? (i(), r("span", ie, " (" + f(
|
|
130
|
+
e.comment.isEdited ? (i(), r("span", ie, " (" + f(B.value) + ") ", 1)) : d("", !0),
|
|
131
131
|
a("div", oe, [
|
|
132
132
|
I.value ? (i(), y(T, {
|
|
133
133
|
key: 0,
|
|
@@ -138,7 +138,7 @@ const X = { class: "vl-comment flex w-full relative" }, Y = { class: "flex flex-
|
|
|
138
138
|
onClick: t[0] || (t[0] = (c) => o("reply", { commentId: e.comment.id, comment: e.comment }))
|
|
139
139
|
}, {
|
|
140
140
|
default: g(() => [
|
|
141
|
-
b(f(
|
|
141
|
+
b(f(M.value), 1)
|
|
142
142
|
]),
|
|
143
143
|
_: 1
|
|
144
144
|
})) : d("", !0),
|
|
@@ -309,7 +309,7 @@ const X = { class: "vl-comment flex w-full relative" }, Y = { class: "flex flex-
|
|
|
309
309
|
})
|
|
310
310
|
], -1),
|
|
311
311
|
b(" Loading... ", -1)
|
|
312
|
-
])])) : (i(), r("span", ue, f(
|
|
312
|
+
])])) : (i(), r("span", ue, f($.value), 1))
|
|
313
313
|
], 8, se)
|
|
314
314
|
])) : d("", !0)
|
|
315
315
|
])) : d("", !0)
|
|
@@ -2,8 +2,8 @@ import { defineComponent as p, ref as v, computed as h, openBlock as a, createEl
|
|
|
2
2
|
import { $t as g } from "../../utils/i18n.js";
|
|
3
3
|
import V from "./CommentItem.vue.js";
|
|
4
4
|
import E from "./CommentEditor.vue.js";
|
|
5
|
-
import
|
|
6
|
-
const
|
|
5
|
+
import L from "../Button.vue.js";
|
|
6
|
+
const $ = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "mb-8"
|
|
9
9
|
}, j = {
|
|
@@ -89,7 +89,7 @@ const L = {
|
|
|
89
89
|
}), (t, l) => (a(), n("div", {
|
|
90
90
|
class: C(["vl-comment-thread flex flex-col w-full", c.class])
|
|
91
91
|
}, [
|
|
92
|
-
e.inputPosition === "top" ? (a(), n("div",
|
|
92
|
+
e.inputPosition === "top" ? (a(), n("div", $, [
|
|
93
93
|
u(E, {
|
|
94
94
|
variant: "root",
|
|
95
95
|
"current-user": e.currentUser,
|
|
@@ -149,7 +149,7 @@ const L = {
|
|
|
149
149
|
_: 1
|
|
150
150
|
}),
|
|
151
151
|
e.hasMore ? (a(), n("div", q, [
|
|
152
|
-
u(
|
|
152
|
+
u(L, {
|
|
153
153
|
variant: "ghost",
|
|
154
154
|
size: "sm",
|
|
155
155
|
loading: e.loadingMore,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as x, ref as z, computed as m, markRaw as P, watch as y, openBlock as n, createElementBlock as l, normalizeClass as p, Fragment as I, renderList as k, renderSlot as g, withMemo as v, createBlock as h, resolveDynamicComponent as w, createVNode as T, unref as C, mergeProps as
|
|
1
|
+
import { defineComponent as x, ref as z, computed as m, markRaw as P, watch as y, openBlock as n, createElementBlock as l, normalizeClass as p, Fragment as I, renderList as k, renderSlot as g, withMemo as v, createBlock as h, resolveDynamicComponent as w, createVNode as T, unref as C, mergeProps as B, createCommentVNode as N } from "vue";
|
|
2
2
|
import E from "../Pagination/Pagination.vue.js";
|
|
3
3
|
import F from "../Empty/Empty.vue.js";
|
|
4
4
|
const M = { class: "flex flex-col w-full" }, O = {
|
|
@@ -34,8 +34,8 @@ const M = { class: "flex flex-col w-full" }, O = {
|
|
|
34
34
|
delete: {}
|
|
35
35
|
},
|
|
36
36
|
emits: ["change"],
|
|
37
|
-
setup(e, { emit:
|
|
38
|
-
const a = e, D =
|
|
37
|
+
setup(e, { emit: $ }) {
|
|
38
|
+
const a = e, D = $, i = z(a.pageInfo?.itemsPerPage || a.paginationProps?.itemsPerPage || 10), d = m(() => a.item ? P(a.item) : void 0), u = m(() => {
|
|
39
39
|
const t = a.skeleton || a.skelton;
|
|
40
40
|
return t ? P(t) : void 0;
|
|
41
41
|
});
|
|
@@ -93,16 +93,16 @@ const M = { class: "flex flex-col w-full" }, O = {
|
|
|
93
93
|
data: e.data,
|
|
94
94
|
index: r
|
|
95
95
|
}, () => [
|
|
96
|
-
d.value ? v([o, r], () => (n(), h(w(d.value),
|
|
96
|
+
d.value ? v([o, r], () => (n(), h(w(d.value), B({
|
|
97
97
|
key: 0,
|
|
98
98
|
item: o,
|
|
99
99
|
data: e.data,
|
|
100
100
|
index: r
|
|
101
|
-
}, { ref_for: !0 }, e.itemProps), null, 16, ["item", "data", "index"])), s, 1) :
|
|
101
|
+
}, { ref_for: !0 }, e.itemProps), null, 16, ["item", "data", "index"])), s, 1) : N("", !0)
|
|
102
102
|
])), 128))
|
|
103
103
|
], 2)),
|
|
104
104
|
e.showPagination && e.pageInfo && S.value > 1 ? (n(), l("div", R, [
|
|
105
|
-
T(C(E),
|
|
105
|
+
T(C(E), B({
|
|
106
106
|
"current-page": e.pageInfo?.currentPage,
|
|
107
107
|
"total-pages": e.pageInfo?.totalPages,
|
|
108
108
|
"total-items": e.pageInfo?.totalItems,
|
|
@@ -111,7 +111,7 @@ const M = { class: "flex flex-col w-full" }, O = {
|
|
|
111
111
|
onChange: b,
|
|
112
112
|
"onUpdate:itemsPerPage": L
|
|
113
113
|
}), null, 16, ["current-page", "total-pages", "total-items"])
|
|
114
|
-
])) :
|
|
114
|
+
])) : N("", !0)
|
|
115
115
|
]));
|
|
116
116
|
}
|
|
117
117
|
});
|
|
@@ -6,8 +6,15 @@ declare function __VLS_template(): {
|
|
|
6
6
|
row: any;
|
|
7
7
|
index: number;
|
|
8
8
|
field: string;
|
|
9
|
+
}) => any>> & Partial<Record<string, (_: {
|
|
10
|
+
value: any;
|
|
11
|
+
row: any;
|
|
12
|
+
index: number;
|
|
13
|
+
field: string;
|
|
9
14
|
}) => any>> & {
|
|
10
15
|
empty?(_: {}): any;
|
|
16
|
+
empty?(_: {}): any;
|
|
17
|
+
'empty-action'?(_: {}): any;
|
|
11
18
|
'empty-action'?(_: {}): any;
|
|
12
19
|
};
|
|
13
20
|
refs: {};
|
|
@@ -39,17 +46,18 @@ declare const __VLS_component: import('vue').DefineComponent<DataTableProps, {},
|
|
|
39
46
|
striped: boolean;
|
|
40
47
|
rows: any[];
|
|
41
48
|
headers: TableHeader[];
|
|
49
|
+
sortable: boolean;
|
|
42
50
|
emptyIcon: string;
|
|
43
51
|
selectedRows: any[];
|
|
44
52
|
hideSelectable: boolean;
|
|
45
53
|
paginationProps: import('./types').DataTablePaginationProps;
|
|
54
|
+
responsive: boolean;
|
|
46
55
|
bordered: boolean;
|
|
47
56
|
showPagination: boolean;
|
|
48
57
|
cellBordered: boolean;
|
|
49
58
|
keyField: string;
|
|
50
59
|
hoverable: boolean;
|
|
51
60
|
treeIndent: number;
|
|
52
|
-
sortable: boolean;
|
|
53
61
|
headerVariant: "default" | "minimal";
|
|
54
62
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
55
63
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|