vlite3 1.5.16 → 1.5.18
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/CategoryManager/CategoryManager2.vue.js +2 -2
- package/components/EditableTitle/EditableTitle.vue.d.ts +194 -1
- package/components/EditableTitle/EditableTitle.vue.js +2 -2
- package/components/EditableTitle/EditableTitle2.vue.js +312 -137
- package/components/RichTextEditor/RichTextEditor.vue.js +4 -4
- package/components/RichTextEditor/RichTextLinkPopover3.vue.js +2 -2
- package/components/RichTextEditor/RichTextToolbar3.vue.js +2 -2
- package/components/Screen/ScreenFilter.vue.js +2 -2
- package/components/Workbook/Sheet.vue.d.ts +29 -2
- package/components/Workbook/Sheet.vue.js +93 -69
- package/components/Workbook/Workbook.vue.d.ts +9 -0
- package/components/Workbook/Workbook.vue.js +1 -1
- package/components/Workbook/Workbook2.vue.js +134 -105
- package/components/Workbook/types.d.ts +24 -0
- package/docs/README.md +1 -0
- package/docs/component-index.md +7 -4
- package/docs/components/editable-title.md +160 -66
- package/docs/components/workbook.md +87 -0
- package/docs/design.md +220 -0
- package/docs-manifest.json +9 -6
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/editable-title.type.d.ts +24 -6
- /package/components/RichTextEditor/{RichTextLinkPopover.vue.js → RichTextLinkPopover2.vue.js} +0 -0
- /package/components/RichTextEditor/{RichTextToolbar.vue.js → RichTextToolbar2.vue.js} +0 -0
|
@@ -1,25 +1,38 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as Ce, useSlots as Te, shallowRef as w, computed as i, watch as P, onMounted as Be, onBeforeUnmount as Ie, openBlock as u, createElementBlock as c, normalizeStyle as Se, normalizeClass as p, withModifiers as J, createBlock as Q, withCtx as Ve, createElementVNode as M, createVNode as C, createCommentVNode as h, toDisplayString as _e, renderSlot as X, nextTick as m } from "vue";
|
|
2
|
+
import j from "../Icon.vue.js";
|
|
3
|
+
import ee from "../Button.vue.js";
|
|
4
|
+
import ze from "../Input.vue.js";
|
|
5
5
|
/* empty css */
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
import Ee from "../IconPicker.vue.js";
|
|
7
|
+
const Ae = ["data-editing", "data-create", "data-variant", "data-size"], De = ["disabled"], Pe = ["disabled"], Me = {
|
|
8
|
+
key: 2,
|
|
9
|
+
class: "inline-flex h-full w-full items-center justify-center",
|
|
9
10
|
"aria-hidden": "true"
|
|
10
|
-
},
|
|
11
|
+
}, je = ["aria-hidden"], Le = {
|
|
11
12
|
key: 0,
|
|
12
|
-
class: "vl-editable-title__input
|
|
13
|
-
},
|
|
13
|
+
class: "vl-editable-title__input absolute inset-0 flex min-w-0 items-center"
|
|
14
|
+
}, Re = {
|
|
15
|
+
key: 1,
|
|
16
|
+
class: "vl-editable-title__actions flex shrink-0 items-center gap-0.5"
|
|
17
|
+
}, We = {
|
|
14
18
|
key: 1,
|
|
15
|
-
class: "vl-editable-title__action flex
|
|
16
|
-
},
|
|
19
|
+
class: "vl-editable-title__action flex items-center justify-center"
|
|
20
|
+
}, He = {
|
|
21
|
+
key: 2,
|
|
22
|
+
class: "vl-editable-title__action flex items-center justify-center"
|
|
23
|
+
}, te = "lucide:file-text", Ke = /* @__PURE__ */ Ce({
|
|
17
24
|
__name: "EditableTitle",
|
|
18
25
|
props: {
|
|
19
26
|
modelValue: { default: "" },
|
|
20
|
-
icon: { default:
|
|
27
|
+
icon: { default: te },
|
|
21
28
|
showIcon: { type: Boolean, default: !0 },
|
|
29
|
+
canChangeIcon: { type: Boolean, default: !0 },
|
|
30
|
+
iconPickerPosition: { default: "bottom-start" },
|
|
22
31
|
editable: { type: Boolean, default: !0 },
|
|
32
|
+
create: { type: Boolean, default: !1 },
|
|
33
|
+
canDelete: { type: Boolean, default: !1 },
|
|
34
|
+
deleteIcon: { default: "lucide:trash-2" },
|
|
35
|
+
deleteLabel: { default: "Delete" },
|
|
23
36
|
disabled: { type: Boolean, default: !1 },
|
|
24
37
|
readonly: { type: Boolean, default: !1 },
|
|
25
38
|
variant: { default: "background" },
|
|
@@ -31,195 +44,357 @@ const Y = ["data-editing", "data-variant", "data-size"], Z = {
|
|
|
31
44
|
editLabel: { default: "Edit title" },
|
|
32
45
|
class: { default: "" }
|
|
33
46
|
},
|
|
34
|
-
emits: ["update:modelValue", "edit-start", "change", "save", "cancel", "focus", "blur"],
|
|
35
|
-
setup(a, { expose:
|
|
36
|
-
const
|
|
37
|
-
let u = !1, f = null;
|
|
38
|
-
const m = i(() => e.editable && !e.disabled && !e.readonly), D = i(() => m.value || l.value), $ = i(() => e.maxWidth === void 0 || e.maxWidth === null || e.maxWidth === "" ? void 0 : { maxWidth: typeof e.maxWidth == "number" ? `${e.maxWidth}px` : e.maxWidth }), v = i(() => ({
|
|
47
|
+
emits: ["update:modelValue", "update:icon", "edit-start", "change", "save", "create", "cancel", "delete", "focus", "blur"],
|
|
48
|
+
setup(a, { expose: le, emit: ne }) {
|
|
49
|
+
const ae = {
|
|
39
50
|
sm: {
|
|
40
|
-
root: "gap-
|
|
41
|
-
icon: "h-
|
|
51
|
+
root: "gap-1 px-2.5 py-1.5 rounded-xl",
|
|
52
|
+
icon: "h-4 w-4",
|
|
53
|
+
iconHit: "h-6 w-6 min-h-6 min-w-6",
|
|
42
54
|
title: "text-sm font-medium leading-5 tracking-normal",
|
|
43
|
-
|
|
55
|
+
inputTitle: "text-sm! font-medium! leading-5! tracking-normal! placeholder:text-sm! placeholder:font-medium! placeholder:leading-5!",
|
|
56
|
+
button: "xs",
|
|
57
|
+
spacer: "h-6.5 w-6.5 min-h-6.5 min-w-6.5"
|
|
44
58
|
},
|
|
45
59
|
md: {
|
|
46
|
-
root: "gap-
|
|
60
|
+
root: "gap-1.5 px-3.5 py-2.5 rounded-2xl",
|
|
47
61
|
icon: "h-4 w-4",
|
|
62
|
+
iconHit: "h-7 w-7 min-h-7 min-w-7",
|
|
48
63
|
title: "text-base font-medium leading-6 tracking-normal",
|
|
49
|
-
|
|
64
|
+
inputTitle: "text-base! font-medium! leading-6! tracking-normal! placeholder:text-base! placeholder:font-medium! placeholder:leading-6!",
|
|
65
|
+
button: "xs",
|
|
66
|
+
spacer: "h-6.5 w-6.5 min-h-6.5 min-w-6.5"
|
|
50
67
|
},
|
|
51
68
|
lg: {
|
|
52
|
-
root: "gap-
|
|
69
|
+
root: "gap-2 px-4 py-3 rounded-2xl",
|
|
53
70
|
icon: "h-5 w-5",
|
|
71
|
+
iconHit: "h-8 w-8 min-h-8 min-w-8",
|
|
54
72
|
title: "text-lg font-medium leading-7 tracking-normal",
|
|
55
|
-
|
|
73
|
+
inputTitle: "text-lg! font-medium! leading-7! tracking-normal! placeholder:text-lg! placeholder:font-medium! placeholder:leading-7!",
|
|
74
|
+
button: "sm",
|
|
75
|
+
spacer: "h-7.5 w-7.5 min-h-7.5 min-w-7.5"
|
|
56
76
|
}
|
|
57
|
-
}
|
|
77
|
+
}, ie = {
|
|
58
78
|
background: "bg-muted text-foreground transition-colors hover:bg-muted/80 focus-within:bg-muted/80",
|
|
59
79
|
transparent: "bg-transparent text-foreground"
|
|
60
|
-
})
|
|
80
|
+
}, e = a, o = ne, L = Te(), l = w(!1), s = w(e.modelValue ?? ""), R = w(null), x = w(!1), W = w(null);
|
|
81
|
+
let T = !1, r = !1, y = null, k = null;
|
|
82
|
+
const B = i(
|
|
83
|
+
() => e.editable && !e.disabled && !e.readonly && !e.create
|
|
84
|
+
), v = i(
|
|
85
|
+
() => e.showIcon && e.canChangeIcon && !e.disabled && !e.readonly
|
|
86
|
+
), H = i(
|
|
87
|
+
() => e.canDelete && !e.disabled && !e.readonly && !e.create
|
|
88
|
+
), $ = i(() => B.value || l.value && !e.create), F = i(() => H.value), N = i(() => !!L["actions-before"]), O = i(() => !!L["actions-after"]), oe = i(
|
|
89
|
+
() => $.value || F.value || N.value || O.value
|
|
90
|
+
), I = i(() => e.icon || te), d = i(() => ae[e.size]), ue = i(() => e.maxWidth === void 0 || e.maxWidth === null || e.maxWidth === "" ? void 0 : { maxWidth: typeof e.maxWidth == "number" ? `${e.maxWidth}px` : e.maxWidth }), re = i(
|
|
61
91
|
() => [
|
|
62
92
|
"vl-editable-title group/editable-title relative flex w-full min-w-0 items-center",
|
|
63
|
-
|
|
64
|
-
|
|
93
|
+
d.value.root,
|
|
94
|
+
ie[e.variant],
|
|
65
95
|
e.disabled ? "opacity-50 cursor-not-allowed" : "",
|
|
66
96
|
l.value ? "vl-editable-title--editing" : "",
|
|
97
|
+
e.create ? "vl-editable-title--create" : "",
|
|
67
98
|
e.class
|
|
68
99
|
].filter(Boolean).join(" ")
|
|
69
|
-
),
|
|
70
|
-
() => `${
|
|
71
|
-
),
|
|
100
|
+
), se = i(
|
|
101
|
+
() => `${d.value.title} text-foreground text-start`
|
|
102
|
+
), ce = i(
|
|
72
103
|
() => [
|
|
73
|
-
|
|
104
|
+
d.value.inputTitle,
|
|
105
|
+
"text-foreground! text-start! placeholder:text-muted-foreground!",
|
|
74
106
|
"h-auto! min-h-0! max-h-none! py-0! px-0! border-none! bg-transparent! shadow-none!",
|
|
75
107
|
"ring-0! focus-visible:ring-0! focus-visible:border-transparent!",
|
|
76
108
|
"rounded-none!"
|
|
77
109
|
].join(" ")
|
|
78
|
-
),
|
|
79
|
-
function
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
function
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
110
|
+
), U = i(() => e.modelValue ?? ""), de = i(() => l.value ? s.value || e.placeholder || " " : U.value || e.placeholder || " "), fe = i(() => l.value ? !s.value && !!e.placeholder : !U.value && !!e.placeholder);
|
|
111
|
+
function b() {
|
|
112
|
+
y != null && (clearTimeout(y), y = null);
|
|
113
|
+
}
|
|
114
|
+
function z() {
|
|
115
|
+
k != null && (clearTimeout(k), k = null);
|
|
116
|
+
}
|
|
117
|
+
function S() {
|
|
118
|
+
T = !0, b(), z();
|
|
119
|
+
}
|
|
120
|
+
function E() {
|
|
121
|
+
z(), k = setTimeout(() => {
|
|
122
|
+
k = null, T = !1;
|
|
123
|
+
}, 0);
|
|
124
|
+
}
|
|
125
|
+
function V() {
|
|
126
|
+
!v.value || x.value || (x.value = !0);
|
|
127
|
+
}
|
|
128
|
+
function A(t = !0) {
|
|
129
|
+
const n = () => {
|
|
130
|
+
const f = R.value;
|
|
131
|
+
return f ? (f.focus(), t && f.select(), !0) : !1;
|
|
86
132
|
};
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
133
|
+
m(() => {
|
|
134
|
+
n() || requestAnimationFrame(() => {
|
|
135
|
+
m(() => {
|
|
136
|
+
n();
|
|
91
137
|
});
|
|
92
138
|
});
|
|
93
139
|
});
|
|
94
140
|
}
|
|
95
|
-
function
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
})
|
|
141
|
+
function q(t) {
|
|
142
|
+
b(), r = !0, s.value = e.modelValue ?? "", l.value = !0, t.emitEditStart && o("edit-start"), A(t.select), m(() => {
|
|
143
|
+
r = !1;
|
|
144
|
+
});
|
|
99
145
|
}
|
|
100
|
-
function
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
146
|
+
function K() {
|
|
147
|
+
!e.create || e.disabled || e.readonly || l.value || r || q({ select: !1, emitEditStart: !1 });
|
|
148
|
+
}
|
|
149
|
+
function D() {
|
|
150
|
+
!B.value || l.value || r || q({ select: !0, emitEditStart: !0 });
|
|
151
|
+
}
|
|
152
|
+
function _(t = !1) {
|
|
153
|
+
if (!l.value || r) return;
|
|
154
|
+
b(), r = !0;
|
|
155
|
+
const n = s.value.trim();
|
|
156
|
+
if (e.create) {
|
|
157
|
+
if (!n) {
|
|
158
|
+
t && (l.value = !1, o("cancel")), m(() => {
|
|
159
|
+
r = !1;
|
|
160
|
+
});
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
s.value = n, n !== (e.modelValue ?? "") && o("update:modelValue", n), o("create", n), l.value = !1, m(() => {
|
|
164
|
+
r = !1;
|
|
165
|
+
});
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
const f = (e.modelValue ?? "").trim(), g = n.length > 0 ? n : f;
|
|
169
|
+
s.value = g, g !== (e.modelValue ?? "") && o("update:modelValue", g), o("change", g), o("save", g), l.value = !1, m(() => {
|
|
170
|
+
r = !1;
|
|
106
171
|
});
|
|
107
172
|
}
|
|
108
|
-
function
|
|
109
|
-
!l.value ||
|
|
110
|
-
|
|
173
|
+
function Y() {
|
|
174
|
+
!l.value || r || (b(), r = !0, s.value = e.modelValue ?? "", l.value = !1, o("cancel"), m(() => {
|
|
175
|
+
r = !1;
|
|
111
176
|
}));
|
|
112
177
|
}
|
|
113
|
-
function
|
|
178
|
+
function me() {
|
|
114
179
|
if (l.value) {
|
|
115
|
-
|
|
180
|
+
A(!1);
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
if (e.create) {
|
|
184
|
+
K();
|
|
116
185
|
return;
|
|
117
186
|
}
|
|
118
|
-
|
|
187
|
+
B.value && D();
|
|
119
188
|
}
|
|
120
|
-
function
|
|
121
|
-
t.preventDefault(), t.stopPropagation(),
|
|
189
|
+
function ve(t) {
|
|
190
|
+
t.preventDefault(), t.stopPropagation(), D();
|
|
122
191
|
}
|
|
123
|
-
function
|
|
124
|
-
|
|
192
|
+
function be(t) {
|
|
193
|
+
t.preventDefault(), t.stopPropagation(), H.value && (S(), o("delete"), E());
|
|
125
194
|
}
|
|
126
|
-
function
|
|
127
|
-
|
|
128
|
-
|
|
195
|
+
function Z(t) {
|
|
196
|
+
t.stopPropagation(), S();
|
|
197
|
+
}
|
|
198
|
+
function G(t) {
|
|
199
|
+
t.stopPropagation(), E();
|
|
200
|
+
}
|
|
201
|
+
function pe(t) {
|
|
202
|
+
o("update:icon", t);
|
|
203
|
+
}
|
|
204
|
+
function he() {
|
|
205
|
+
v.value && (S(), V());
|
|
206
|
+
}
|
|
207
|
+
function ge() {
|
|
208
|
+
v.value && (S(), V(), m(() => {
|
|
209
|
+
W.value?.click();
|
|
210
|
+
}));
|
|
211
|
+
}
|
|
212
|
+
function xe() {
|
|
213
|
+
m(() => {
|
|
214
|
+
l.value && A(!1), E();
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
function ye(t) {
|
|
218
|
+
o("focus", t);
|
|
219
|
+
}
|
|
220
|
+
function ke(t) {
|
|
221
|
+
o("blur", t), !(!e.saveOnBlur || T) && (b(), y = setTimeout(() => {
|
|
222
|
+
y = null, !(T || !l.value) && _(!0);
|
|
129
223
|
}, 0));
|
|
130
224
|
}
|
|
131
|
-
function
|
|
132
|
-
l.value && (t.key === "Enter" ? (t.preventDefault(),
|
|
225
|
+
function we(t) {
|
|
226
|
+
l.value && (t.key === "Enter" ? (t.preventDefault(), _(!1)) : t.key === "Escape" && (t.preventDefault(), Y()));
|
|
133
227
|
}
|
|
134
|
-
return
|
|
228
|
+
return P(
|
|
135
229
|
() => e.modelValue,
|
|
136
230
|
(t) => {
|
|
137
|
-
l.value || (
|
|
231
|
+
l.value || (s.value = t ?? "");
|
|
138
232
|
}
|
|
139
|
-
),
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
233
|
+
), P(
|
|
234
|
+
() => [e.disabled, e.readonly, e.editable],
|
|
235
|
+
([t, n, f]) => {
|
|
236
|
+
!l.value || !(t || n || !e.create && !f) || (b(), s.value = e.modelValue ?? "", l.value = !1, o("cancel"));
|
|
237
|
+
}
|
|
238
|
+
), P(v, (t) => {
|
|
239
|
+
t || (x.value = !1);
|
|
240
|
+
}), Be(() => {
|
|
241
|
+
e.create && (v.value && (x.value = !0), K());
|
|
242
|
+
}), Ie(() => {
|
|
243
|
+
b(), z();
|
|
244
|
+
}), le({
|
|
245
|
+
startEdit: D,
|
|
246
|
+
save: () => _(!1),
|
|
247
|
+
commit: () => _(!1),
|
|
248
|
+
cancel: Y,
|
|
249
|
+
focus: me
|
|
250
|
+
}), (t, n) => (u(), c("div", {
|
|
251
|
+
class: p(re.value),
|
|
252
|
+
style: Se(ue.value),
|
|
152
253
|
"data-editing": l.value ? "true" : void 0,
|
|
254
|
+
"data-create": a.create ? "true" : void 0,
|
|
153
255
|
"data-variant": a.variant,
|
|
154
256
|
"data-size": a.size
|
|
155
257
|
}, [
|
|
156
|
-
a.showIcon
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
onKeydown: U
|
|
258
|
+
a.showIcon ? (u(), c("div", {
|
|
259
|
+
key: 0,
|
|
260
|
+
class: p(["vl-editable-title__icon flex shrink-0 items-center justify-center text-foreground", d.value.iconHit]),
|
|
261
|
+
onPointerenter: V,
|
|
262
|
+
onFocusin: V,
|
|
263
|
+
onMousedown: he,
|
|
264
|
+
onClick: n[0] || (n[0] = J(() => {
|
|
265
|
+
}, ["stop"]))
|
|
165
266
|
}, [
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
267
|
+
v.value && x.value ? (u(), Q(Ee, {
|
|
268
|
+
key: 0,
|
|
269
|
+
value: I.value,
|
|
270
|
+
position: a.iconPickerPosition,
|
|
271
|
+
onOnSelect: pe,
|
|
272
|
+
onOnClose: xe
|
|
273
|
+
}, {
|
|
274
|
+
default: Ve(() => [
|
|
275
|
+
M("button", {
|
|
276
|
+
ref_key: "iconTriggerRef",
|
|
277
|
+
ref: W,
|
|
278
|
+
type: "button",
|
|
279
|
+
class: "vl-editable-title__icon-trigger inline-flex h-full w-full items-center justify-center rounded-md text-foreground transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30",
|
|
280
|
+
"aria-label": "Change icon",
|
|
281
|
+
disabled: a.disabled
|
|
282
|
+
}, [
|
|
283
|
+
C(j, {
|
|
284
|
+
icon: I.value,
|
|
285
|
+
class: p(d.value.icon),
|
|
286
|
+
"aria-hidden": "true"
|
|
287
|
+
}, null, 8, ["icon", "class"])
|
|
288
|
+
], 8, De)
|
|
289
|
+
]),
|
|
290
|
+
_: 1
|
|
291
|
+
}, 8, ["value", "position"])) : v.value ? (u(), c("button", {
|
|
292
|
+
key: 1,
|
|
293
|
+
type: "button",
|
|
294
|
+
class: "vl-editable-title__icon-trigger inline-flex h-full w-full items-center justify-center rounded-md text-foreground transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30",
|
|
295
|
+
"aria-label": "Change icon",
|
|
296
|
+
disabled: a.disabled,
|
|
297
|
+
onClick: ge
|
|
298
|
+
}, [
|
|
299
|
+
C(j, {
|
|
300
|
+
icon: I.value,
|
|
301
|
+
class: p(d.value.icon),
|
|
302
|
+
"aria-hidden": "true"
|
|
303
|
+
}, null, 8, ["icon", "class"])
|
|
304
|
+
], 8, Pe)) : (u(), c("span", Me, [
|
|
305
|
+
C(j, {
|
|
306
|
+
icon: I.value,
|
|
307
|
+
class: p(d.value.icon)
|
|
308
|
+
}, null, 8, ["icon", "class"])
|
|
309
|
+
]))
|
|
310
|
+
], 34)) : h("", !0),
|
|
311
|
+
M("div", {
|
|
312
|
+
class: "vl-editable-title__text relative min-w-0 flex-1 contain-inline-size",
|
|
313
|
+
onKeydown: we
|
|
314
|
+
}, [
|
|
315
|
+
M("span", {
|
|
316
|
+
class: p(["vl-editable-title__label block min-w-0 truncate", [
|
|
317
|
+
se.value,
|
|
318
|
+
fe.value ? "text-muted-foreground" : "",
|
|
170
319
|
l.value ? "invisible" : ""
|
|
171
320
|
]]),
|
|
172
321
|
"aria-hidden": l.value ? "true" : void 0
|
|
173
|
-
},
|
|
174
|
-
l.value ? (
|
|
175
|
-
|
|
322
|
+
}, _e(de.value), 11, je),
|
|
323
|
+
l.value ? (u(), c("div", Le, [
|
|
324
|
+
C(ze, {
|
|
176
325
|
ref_key: "inputHostRef",
|
|
177
|
-
ref:
|
|
178
|
-
modelValue:
|
|
179
|
-
"onUpdate:modelValue":
|
|
326
|
+
ref: R,
|
|
327
|
+
modelValue: s.value,
|
|
328
|
+
"onUpdate:modelValue": n[1] || (n[1] = (f) => s.value = f),
|
|
180
329
|
type: "text",
|
|
181
330
|
variant: "transparent",
|
|
182
331
|
size: a.size,
|
|
183
332
|
placeholder: a.placeholder,
|
|
184
333
|
disabled: a.disabled,
|
|
185
334
|
"show-clear-button": !1,
|
|
186
|
-
class: "!space-y-0 min-w-0 w-full",
|
|
187
|
-
"input-class":
|
|
188
|
-
onFocus:
|
|
189
|
-
onBlur:
|
|
335
|
+
class: "!m-0 !space-y-0 min-w-0 w-full h-full",
|
|
336
|
+
"input-class": ce.value,
|
|
337
|
+
onFocus: ye,
|
|
338
|
+
onBlur: ke,
|
|
339
|
+
onClick: n[2] || (n[2] = J(() => {
|
|
340
|
+
}, ["stop"]))
|
|
190
341
|
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "input-class"])
|
|
191
|
-
])) :
|
|
342
|
+
])) : h("", !0)
|
|
192
343
|
], 32),
|
|
193
|
-
|
|
194
|
-
|
|
344
|
+
oe.value ? (u(), c("div", Re, [
|
|
345
|
+
N.value ? (u(), c("div", {
|
|
195
346
|
key: 0,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
"aria-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
347
|
+
class: "vl-editable-title__custom-actions flex shrink-0 items-center gap-0.5",
|
|
348
|
+
onMousedown: Z,
|
|
349
|
+
onClick: G
|
|
350
|
+
}, [
|
|
351
|
+
X(t.$slots, "actions-before", {}, void 0, !0)
|
|
352
|
+
], 32)) : h("", !0),
|
|
353
|
+
$.value ? (u(), c("div", We, [
|
|
354
|
+
!l.value && B.value ? (u(), Q(ee, {
|
|
355
|
+
key: 0,
|
|
356
|
+
type: "button",
|
|
357
|
+
"as-icon": "",
|
|
358
|
+
variant: "ghost",
|
|
359
|
+
size: d.value.button,
|
|
360
|
+
rounded: "md",
|
|
361
|
+
icon: a.editIcon,
|
|
362
|
+
"aria-label": a.editLabel,
|
|
363
|
+
disabled: a.disabled,
|
|
364
|
+
class: "vl-editable-title__action-btn text-foreground",
|
|
365
|
+
onClick: ve
|
|
366
|
+
}, null, 8, ["size", "icon", "aria-label", "disabled"])) : (u(), c("div", {
|
|
367
|
+
key: 1,
|
|
368
|
+
class: p(["invisible pointer-events-none shrink-0", d.value.spacer]),
|
|
369
|
+
"aria-hidden": "true"
|
|
370
|
+
}, null, 2))
|
|
371
|
+
])) : h("", !0),
|
|
372
|
+
F.value ? (u(), c("div", He, [
|
|
373
|
+
C(ee, {
|
|
374
|
+
type: "button",
|
|
375
|
+
"as-icon": "",
|
|
376
|
+
variant: "ghost",
|
|
377
|
+
size: d.value.button,
|
|
378
|
+
rounded: "md",
|
|
379
|
+
icon: a.deleteIcon,
|
|
380
|
+
"aria-label": a.deleteLabel,
|
|
381
|
+
disabled: a.disabled,
|
|
382
|
+
class: "vl-editable-title__action-btn text-foreground",
|
|
383
|
+
onClick: be
|
|
384
|
+
}, null, 8, ["size", "icon", "aria-label", "disabled"])
|
|
385
|
+
])) : h("", !0),
|
|
386
|
+
O.value ? (u(), c("div", {
|
|
387
|
+
key: 3,
|
|
388
|
+
class: "vl-editable-title__custom-actions flex shrink-0 items-center gap-0.5",
|
|
389
|
+
onMousedown: Z,
|
|
390
|
+
onClick: G
|
|
391
|
+
}, [
|
|
392
|
+
X(t.$slots, "actions-after", {}, void 0, !0)
|
|
393
|
+
], 32)) : h("", !0)
|
|
394
|
+
])) : h("", !0)
|
|
395
|
+
], 14, Ae));
|
|
221
396
|
}
|
|
222
397
|
});
|
|
223
398
|
export {
|
|
224
|
-
|
|
399
|
+
Ke as default
|
|
225
400
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as te, ref as v, shallowRef as ne, watch as oe, computed as h, onMounted as le, onUnmounted as ae, openBlock as C, createElementBlock as L, normalizeClass as re, toDisplayString as I, createCommentVNode as U, createElementVNode as w, createVNode as q, unref as a, normalizeStyle as ie } from "vue";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import se from "./
|
|
4
|
-
/* empty css
|
|
5
|
-
import de from "./
|
|
6
|
-
/* empty css
|
|
3
|
+
import se from "./RichTextToolbar2.vue.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import de from "./RichTextLinkPopover2.vue.js";
|
|
6
|
+
/* empty css */
|
|
7
7
|
import { useRichTextImageUpload as ue } from "./composables/useRichTextImageUpload.js";
|
|
8
8
|
import { useRichTextLinks as ce } from "./composables/useRichTextLinks.js";
|
|
9
9
|
const fe = ["aria-labelledby", "aria-describedby"], me = ["id", "for"], ve = { class: "rte-wrapper" }, ye = { class: "rte-body-wrap" }, ge = ["id", "contenteditable", "aria-label", "aria-readonly", "aria-disabled", "aria-invalid"], be = ["id"], Se = /* @__PURE__ */ te({
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { WorkbookSheet } from './types';
|
|
1
|
+
import { WorkbookCustomOption, WorkbookSheet } from './types';
|
|
2
2
|
interface Props {
|
|
3
3
|
sheet: WorkbookSheet;
|
|
4
4
|
isActive: boolean;
|
|
5
5
|
isEditing?: boolean;
|
|
6
|
+
canRename?: boolean;
|
|
7
|
+
canDuplicate?: boolean;
|
|
6
8
|
canDelete?: boolean;
|
|
9
|
+
customOptions?: WorkbookCustomOption[];
|
|
7
10
|
confirmDelete?: boolean;
|
|
8
11
|
confirmDeleteTexts?: {
|
|
9
12
|
title?: string;
|
|
@@ -12,11 +15,25 @@ interface Props {
|
|
|
12
15
|
cancel?: string;
|
|
13
16
|
};
|
|
14
17
|
allowIconChange?: boolean;
|
|
18
|
+
canChangeIcon?: boolean;
|
|
15
19
|
itemClass?: string;
|
|
16
20
|
activeItemClass?: string;
|
|
17
21
|
inactiveItemClass?: string;
|
|
18
22
|
}
|
|
19
|
-
declare
|
|
23
|
+
declare function __VLS_template(): {
|
|
24
|
+
attrs: Partial<{}>;
|
|
25
|
+
slots: {
|
|
26
|
+
'sheet-actions'?(_: {
|
|
27
|
+
sheet: WorkbookSheet;
|
|
28
|
+
}): any;
|
|
29
|
+
};
|
|
30
|
+
refs: {
|
|
31
|
+
inputRef: HTMLInputElement;
|
|
32
|
+
};
|
|
33
|
+
rootEl: HTMLDivElement;
|
|
34
|
+
};
|
|
35
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
36
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
20
37
|
select: (id: string) => any;
|
|
21
38
|
delete: (id: string) => any;
|
|
22
39
|
"update:title": (id: string, newTitle: string) => any;
|
|
@@ -36,11 +53,21 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
36
53
|
itemClass: string;
|
|
37
54
|
isEditing: boolean;
|
|
38
55
|
confirmDelete: boolean;
|
|
56
|
+
canRename: boolean;
|
|
57
|
+
canDuplicate: boolean;
|
|
39
58
|
canDelete: boolean;
|
|
59
|
+
canChangeIcon: boolean;
|
|
60
|
+
customOptions: WorkbookCustomOption[];
|
|
40
61
|
allowIconChange: boolean;
|
|
41
62
|
activeItemClass: string;
|
|
42
63
|
inactiveItemClass: string;
|
|
43
64
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
44
65
|
inputRef: HTMLInputElement;
|
|
45
66
|
}, HTMLDivElement>;
|
|
67
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
46
68
|
export default _default;
|
|
69
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
70
|
+
new (): {
|
|
71
|
+
$slots: S;
|
|
72
|
+
};
|
|
73
|
+
};
|