vlite3 1.0.6 → 1.0.7
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/AttachmentsList/types.d.ts +1 -1
- package/components/Chat/ChatBubble.vue.d.ts +6 -0
- package/components/Chat/ChatBubble.vue.js +69 -57
- package/components/Chat/ChatInterface.vue.d.ts +16 -2
- package/components/Chat/ChatInterface.vue.js +231 -165
- package/components/DataTable/DataTable.vue.js +81 -78
- package/components/DataTable/DataTableHeader.vue.js +4 -4
- package/components/DataTable/DataTableRow.vue.js +75 -69
- package/components/Form/utils/form.utils.d.ts +4 -4
- package/components/Form/utils/form.utils.js +128 -118
- package/components/Kanban/Kanban.vue.d.ts +6 -5
- package/components/Kanban/Kanban.vue.js +2 -2
- package/components/Kanban/Kanban.vue2.js +71 -54
- package/components/Kanban/KanbanBoard.vue.d.ts +9 -0
- package/components/Kanban/KanbanBoard.vue.js +2 -2
- package/components/Kanban/KanbanBoard.vue2.js +101 -81
- package/components/Kanban/types.d.ts +17 -4
- package/components/Screen/Screen.vue.d.ts +1 -0
- package/components/Screen/Screen.vue.js +18 -18
- package/components/Screen/types.d.ts +2 -2
- package/components/Stats/Stats.vue.js +3 -3
- package/package.json +1 -1
- package/style.css +1 -1
|
@@ -12,6 +12,12 @@ type __VLS_Props = {
|
|
|
12
12
|
* Defaults to true.
|
|
13
13
|
*/
|
|
14
14
|
confirmDelete?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Toggle to show or hide the "edited" status indicator on messages
|
|
17
|
+
*/
|
|
18
|
+
showEditedStatus?: boolean;
|
|
19
|
+
editedText?: string;
|
|
20
|
+
editedTextI18n?: string;
|
|
15
21
|
};
|
|
16
22
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
17
23
|
delete: (id: string | number) => any;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as S, computed as x, ref as T, openBlock as t, createElementBlock as i, normalizeClass as l, createVNode as f, createCommentVNode as a, createElementVNode as d, toDisplayString as u, unref as B, createBlock as E, withModifiers as C } from "vue";
|
|
2
2
|
import D from "../Avatar.vue.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
3
|
+
import g from "../Button.vue.js";
|
|
4
|
+
import I from "../AttachmentsList/AttachmentsList.vue.js";
|
|
5
|
+
import { $t as w } from "../../utils/i18n.js";
|
|
6
|
+
const z = {
|
|
6
7
|
key: 0,
|
|
7
8
|
class: "flex-shrink-0 flex flex-col justify-end pb-1"
|
|
8
|
-
},
|
|
9
|
+
}, A = {
|
|
9
10
|
key: 0,
|
|
10
11
|
class: "mb-0.5 text-[9px] font-medium tracking-wide uppercase opacity-80 truncate text-gray-900/80"
|
|
11
|
-
},
|
|
12
|
+
}, N = {
|
|
12
13
|
key: 1,
|
|
13
14
|
class: "text-sm whitespace-pre-wrap leading-relaxed break-words"
|
|
14
|
-
},
|
|
15
|
+
}, j = {
|
|
15
16
|
key: 1,
|
|
16
17
|
class: "relative flex items-center"
|
|
17
|
-
},
|
|
18
|
+
}, P = /* @__PURE__ */ S({
|
|
18
19
|
__name: "ChatBubble",
|
|
19
20
|
props: {
|
|
20
21
|
message: {},
|
|
@@ -24,51 +25,62 @@ const T = {
|
|
|
24
25
|
showTimestamp: { type: Boolean },
|
|
25
26
|
allowDeleteAll: { type: Boolean },
|
|
26
27
|
allowEditAll: { type: Boolean },
|
|
27
|
-
confirmDelete: { type: Boolean }
|
|
28
|
+
confirmDelete: { type: Boolean },
|
|
29
|
+
showEditedStatus: { type: Boolean },
|
|
30
|
+
editedText: {},
|
|
31
|
+
editedTextI18n: {}
|
|
28
32
|
},
|
|
29
33
|
emits: ["delete", "edit"],
|
|
30
|
-
setup(e, { emit:
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
setup(e, { emit: v }) {
|
|
35
|
+
const s = e, c = v, h = x(() => s.message.timestamp ? new Date(s.message.timestamp).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : ""), y = x(() => {
|
|
36
|
+
if (s.editedTextI18n) {
|
|
37
|
+
const o = w(s.editedTextI18n);
|
|
38
|
+
if (o !== s.editedTextI18n) return o;
|
|
39
|
+
}
|
|
40
|
+
if (s.editedText) return s.editedText;
|
|
41
|
+
const m = w("vlite.chat.edited");
|
|
42
|
+
return m !== "vlite.chat.edited" ? m : "edited";
|
|
43
|
+
}), n = T(!1);
|
|
44
|
+
let r = null;
|
|
45
|
+
const b = () => {
|
|
46
|
+
if (s.confirmDelete === !1) {
|
|
47
|
+
c("delete", s.message.id);
|
|
36
48
|
return;
|
|
37
49
|
}
|
|
38
|
-
|
|
39
|
-
|
|
50
|
+
n.value ? (n.value = !1, r && (clearTimeout(r), r = null), c("delete", s.message.id)) : (n.value = !0, r = setTimeout(() => {
|
|
51
|
+
n.value = !1, r = null;
|
|
40
52
|
}, 3e3));
|
|
41
|
-
},
|
|
42
|
-
|
|
53
|
+
}, k = () => {
|
|
54
|
+
n.value = !1, r && (clearTimeout(r), r = null);
|
|
43
55
|
};
|
|
44
|
-
return (
|
|
56
|
+
return (m, o) => (t(), i("div", {
|
|
45
57
|
class: l(["flex w-full min-w-0 gap-3 group", e.isSender ? "flex-row-reverse" : "flex-row"])
|
|
46
58
|
}, [
|
|
47
|
-
e.showAvatar ? (t(),
|
|
48
|
-
|
|
59
|
+
e.showAvatar ? (t(), i("div", z, [
|
|
60
|
+
f(D, {
|
|
49
61
|
src: e.message.avatar,
|
|
50
62
|
alt: e.message.senderName,
|
|
51
63
|
size: "sm"
|
|
52
64
|
}, null, 8, ["src", "alt"])
|
|
53
|
-
])) :
|
|
54
|
-
|
|
65
|
+
])) : a("", !0),
|
|
66
|
+
d("div", {
|
|
55
67
|
class: l(["flex flex-col min-w-0 overflow-hidden max-w-[85%]", e.isSender ? "items-end" : "items-start"])
|
|
56
68
|
}, [
|
|
57
|
-
|
|
69
|
+
d("div", {
|
|
58
70
|
class: l(["relative flex items-center min-w-0 max-w-full group/bubble", e.isSender ? "flex-row-reverse" : "flex-row"])
|
|
59
71
|
}, [
|
|
60
|
-
|
|
72
|
+
d("div", {
|
|
61
73
|
class: l(["px-3.5 py-2.5 rounded-2xl break-words relative min-w-[60px] max-w-full min-w-0 overflow-hidden", [
|
|
62
74
|
e.isSender ? "bg-primary text-primary-foreground rounded-br-sm" : "bg-muted text-foreground rounded-bl-sm"
|
|
63
75
|
]])
|
|
64
76
|
}, [
|
|
65
|
-
e.showUserInfo && e.message.senderName && !e.isSender ? (t(),
|
|
66
|
-
e.message.text ? (t(),
|
|
67
|
-
e.message.attachments && e.message.attachments.length > 0 ? (t(),
|
|
77
|
+
e.showUserInfo && e.message.senderName && !e.isSender ? (t(), i("div", A, u(e.message.senderName), 1)) : a("", !0),
|
|
78
|
+
e.message.text ? (t(), i("p", N, u(e.message.text), 1)) : a("", !0),
|
|
79
|
+
e.message.attachments && e.message.attachments.length > 0 ? (t(), i("div", {
|
|
68
80
|
key: 2,
|
|
69
81
|
class: l({ "mt-2": e.message.text || e.showUserInfo && !e.isSender })
|
|
70
82
|
}, [
|
|
71
|
-
|
|
83
|
+
f(B(I), {
|
|
72
84
|
attachments: e.message.attachments,
|
|
73
85
|
variant: "inline",
|
|
74
86
|
size: "sm",
|
|
@@ -77,55 +89,55 @@ const T = {
|
|
|
77
89
|
"click-to-preview": !0,
|
|
78
90
|
"show-download-in-list": !1
|
|
79
91
|
}, null, 8, ["attachments"])
|
|
80
|
-
], 2)) :
|
|
81
|
-
e.showTimestamp && (e.message.timestamp || e.message.isEdited) ? (t(),
|
|
92
|
+
], 2)) : a("", !0),
|
|
93
|
+
e.showTimestamp && (e.message.timestamp || e.message.isEdited) ? (t(), i("div", {
|
|
82
94
|
key: 3,
|
|
83
95
|
class: l(["mt-1 flex items-center gap-1", e.isSender ? "justify-end" : "justify-start"])
|
|
84
96
|
}, [
|
|
85
|
-
e.message.isEdited ? (t(),
|
|
97
|
+
e.message.isEdited && e.showEditedStatus !== !1 ? (t(), i("span", {
|
|
86
98
|
key: 0,
|
|
87
99
|
class: l(["text-[10px] opacity-60", e.isSender ? "text-primary-foreground" : "text-muted-foreground"])
|
|
88
|
-
},
|
|
89
|
-
e.message.isEdited && e.message.timestamp ? (t(),
|
|
100
|
+
}, u(y.value), 3)) : a("", !0),
|
|
101
|
+
e.message.isEdited && e.showEditedStatus !== !1 && e.message.timestamp ? (t(), i("span", {
|
|
90
102
|
key: 1,
|
|
91
103
|
class: l(["text-[10px] opacity-40", e.isSender ? "text-primary-foreground" : "text-muted-foreground"])
|
|
92
|
-
}, " · ", 2)) :
|
|
93
|
-
e.message.timestamp ? (t(),
|
|
104
|
+
}, " · ", 2)) : a("", !0),
|
|
105
|
+
e.message.timestamp ? (t(), i("span", {
|
|
94
106
|
key: 2,
|
|
95
107
|
class: l(["text-[10px] opacity-60 tabular-nums", e.isSender ? "text-primary-foreground" : "text-muted-foreground"])
|
|
96
|
-
},
|
|
97
|
-
], 2)) :
|
|
108
|
+
}, u(h.value), 3)) : a("", !0)
|
|
109
|
+
], 2)) : a("", !0)
|
|
98
110
|
], 2),
|
|
99
|
-
|
|
111
|
+
d("div", {
|
|
100
112
|
class: l(["opacity-0 group-hover/bubble:opacity-100 focus-within:opacity-100 transition-opacity flex gap-0 pointer-events-none group-hover/bubble:pointer-events-auto focus-within:pointer-events-auto z-10", e.isSender ? "right-full pr-1" : "left-full pl-1"])
|
|
101
113
|
}, [
|
|
102
|
-
(e.isSender || e.allowEditAll) && e.message.text?.trim() ? (t(),
|
|
114
|
+
(e.isSender || e.allowEditAll) && e.message.text?.trim() ? (t(), E(g, {
|
|
103
115
|
key: 0,
|
|
104
116
|
variant: "ghost",
|
|
105
117
|
size: "xs",
|
|
106
118
|
icon: "lucide:pencil",
|
|
107
119
|
rounded: "full",
|
|
108
120
|
class: "text-muted-foreground hover:text-foreground h-7 w-7",
|
|
109
|
-
onClick:
|
|
121
|
+
onClick: o[0] || (o[0] = ($) => c("edit", e.message)),
|
|
110
122
|
"aria-label": "Edit message"
|
|
111
|
-
})) :
|
|
112
|
-
e.isSender || e.allowDeleteAll ? (t(),
|
|
113
|
-
|
|
123
|
+
})) : a("", !0),
|
|
124
|
+
e.isSender || e.allowDeleteAll ? (t(), i("div", j, [
|
|
125
|
+
f(g, {
|
|
114
126
|
variant: "ghost",
|
|
115
127
|
size: "xs",
|
|
116
|
-
icon:
|
|
128
|
+
icon: n.value ? "lucide:check" : "lucide:trash-2",
|
|
117
129
|
rounded: "full",
|
|
118
130
|
class: "h-7 w-7 transition-colors",
|
|
119
|
-
onClick:
|
|
120
|
-
"aria-label":
|
|
131
|
+
onClick: b,
|
|
132
|
+
"aria-label": n.value ? "Confirm delete" : "Delete message"
|
|
121
133
|
}, null, 8, ["icon", "aria-label"]),
|
|
122
|
-
|
|
134
|
+
n.value ? (t(), i("button", {
|
|
123
135
|
key: 0,
|
|
124
136
|
class: "absolute -top-1.5 -right-1.5 w-3.5 h-3.5 rounded-full bg-muted border border-border flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors",
|
|
125
|
-
onClick: C(
|
|
137
|
+
onClick: C(k, ["stop"]),
|
|
126
138
|
"aria-label": "Cancel delete"
|
|
127
|
-
}, [...
|
|
128
|
-
|
|
139
|
+
}, [...o[1] || (o[1] = [
|
|
140
|
+
d("svg", {
|
|
129
141
|
xmlns: "http://www.w3.org/2000/svg",
|
|
130
142
|
viewBox: "0 0 24 24",
|
|
131
143
|
fill: "none",
|
|
@@ -135,21 +147,21 @@ const T = {
|
|
|
135
147
|
"stroke-linejoin": "round",
|
|
136
148
|
class: "w-2 h-2"
|
|
137
149
|
}, [
|
|
138
|
-
|
|
150
|
+
d("line", {
|
|
139
151
|
x1: "18",
|
|
140
152
|
y1: "6",
|
|
141
153
|
x2: "6",
|
|
142
154
|
y2: "18"
|
|
143
155
|
}),
|
|
144
|
-
|
|
156
|
+
d("line", {
|
|
145
157
|
x1: "6",
|
|
146
158
|
y1: "6",
|
|
147
159
|
x2: "18",
|
|
148
160
|
y2: "18"
|
|
149
161
|
})
|
|
150
162
|
], -1)
|
|
151
|
-
])])) :
|
|
152
|
-
])) :
|
|
163
|
+
])])) : a("", !0)
|
|
164
|
+
])) : a("", !0)
|
|
153
165
|
], 2)
|
|
154
166
|
], 2)
|
|
155
167
|
], 2)
|
|
@@ -157,5 +169,5 @@ const T = {
|
|
|
157
169
|
}
|
|
158
170
|
});
|
|
159
171
|
export {
|
|
160
|
-
|
|
172
|
+
P as default
|
|
161
173
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export interface ChatAttachment {
|
|
2
|
-
fileUrl
|
|
2
|
+
fileUrl?: string;
|
|
3
3
|
fileName?: string;
|
|
4
4
|
fileType?: string;
|
|
5
5
|
fileSize?: number;
|
|
@@ -22,10 +22,23 @@ type __VLS_Props = {
|
|
|
22
22
|
showAvatar?: boolean;
|
|
23
23
|
showUserInfo?: boolean;
|
|
24
24
|
showTimestamp?: boolean;
|
|
25
|
+
showEditedStatus?: boolean;
|
|
26
|
+
editedText?: string;
|
|
27
|
+
editedTextI18n?: string;
|
|
25
28
|
placeholder?: string;
|
|
29
|
+
placeholderI18n?: string;
|
|
30
|
+
loadingMoreText?: string;
|
|
31
|
+
loadingMoreTextI18n?: string;
|
|
32
|
+
emptyText?: string;
|
|
33
|
+
emptyTextI18n?: string;
|
|
34
|
+
editingText?: string;
|
|
35
|
+
editingTextI18n?: string;
|
|
36
|
+
cancelEditText?: string;
|
|
37
|
+
cancelEditTextI18n?: string;
|
|
26
38
|
isLoadingMore?: boolean;
|
|
27
39
|
allowDeleteAll?: boolean;
|
|
28
40
|
allowEditAll?: boolean;
|
|
41
|
+
allowFileUpload?: boolean;
|
|
29
42
|
/**
|
|
30
43
|
* When true (default), the delete button requires a second click to confirm deletion.
|
|
31
44
|
* Set to false to delete immediately on first click.
|
|
@@ -45,7 +58,6 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
45
58
|
onRefetch?: () => any;
|
|
46
59
|
onEdit?: (message: ChatMessage) => any;
|
|
47
60
|
}>, {
|
|
48
|
-
placeholder: string;
|
|
49
61
|
isLoadingMore: boolean;
|
|
50
62
|
confirmDelete: boolean;
|
|
51
63
|
showAvatar: boolean;
|
|
@@ -53,6 +65,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
53
65
|
showTimestamp: boolean;
|
|
54
66
|
allowDeleteAll: boolean;
|
|
55
67
|
allowEditAll: boolean;
|
|
68
|
+
showEditedStatus: boolean;
|
|
69
|
+
allowFileUpload: boolean;
|
|
56
70
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
57
71
|
messageListRef: HTMLDivElement;
|
|
58
72
|
observerTargetRef: HTMLDivElement;
|