vlite3 1.2.9 → 1.2.12
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/Button.vue.d.ts +5 -1
- package/components/Button.vue.js +164 -72
- package/components/CategoryManager/CategoryManager.vue.js +1 -1
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/Dropdown/Dropdown.vue.d.ts +3 -1
- package/components/Dropdown/Dropdown.vue.js +17 -15
- package/components/Dropdown/DropdownMenu.vue.d.ts +1 -1
- package/components/Form/Form.vue.d.ts +1 -0
- package/components/Form/Form.vue.js +1 -1
- package/components/Form/Form.vue2.js +29 -28
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +29 -25
- package/components/ImportData/ImportStep2.vue.js +6 -6
- package/components/Input.vue.js +6 -5
- package/components/Kanban/Kanban.vue.js +1 -1
- package/components/Kanban/Kanban.vue2.js +1 -1
- package/components/Kanban/KanbanBoard.vue.js +1 -1
- package/components/Kanban/KanbanBoard.vue2.js +17 -17
- package/components/Label.vue.d.ts +5 -2
- package/components/Label.vue.js +18 -11
- package/components/Modal.vue.js +1 -1
- package/components/Modal.vue2.js +1 -1
- package/components/MultiSelect/MultiSelect.vue.d.ts +1 -1
- package/components/PermissionMatrix/PermissionEditorMatrix.vue.js +1 -1
- package/components/PermissionMatrix/PermissionMatrix.vue.js +1 -1
- package/components/PermissionMatrix/PermissionMatrix.vue2.js +1 -1
- package/components/Screen/ScreenFilter.vue.js +34 -31
- package/components/SidePanel.vue.js +1 -1
- package/components/Splitter/Splitter.vue.d.ts +1 -1
- package/components/Tabes/Tabes.vue.js +2 -2
- package/components/Tabes/Tabes.vue2.js +53 -51
- package/components/Workbook/Sheet.vue.js +76 -70
- package/components/Workbook/Workbook.vue.js +2 -2
- package/components/Workbook/Workbook.vue2.js +88 -84
- package/components/Workbook/WorkbookAddButton.vue.js +9 -8
- package/directives/vRipple.d.ts +3 -1
- package/directives/vRipple.js +11 -11
- package/package.json +13 -1
- package/style.css +83 -72
- package/test/VliteScreen.d.ts +120 -0
- package/test/VliteScreen.js +328 -0
- package/test/createDataFactory.d.ts +24 -0
- package/test/createDataFactory.js +59 -0
- package/test/extractSchemaFields.d.ts +14 -0
- package/test/extractSchemaFields.js +11 -0
- package/test/index.d.ts +39 -0
- package/test/index.js +10 -0
- package/test/renderVlite.d.ts +30 -0
- package/test/renderVlite.js +12 -0
- package/test/types.d.ts +39 -0
- package/types/button.d.ts +2 -0
- /package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./PermissionEditorMatrix.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-e227acf6"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./PermissionMatrix.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-f4695eed"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -13,7 +13,7 @@ const W = {
|
|
|
13
13
|
class: "text-center py-12 text-muted-foreground"
|
|
14
14
|
}, Y = {
|
|
15
15
|
key: 2,
|
|
16
|
-
class: "permission-matrix-wrapper border rounded-lg overflow-auto"
|
|
16
|
+
class: "permission-matrix-wrapper border rounded-lg scrollbar-thin always-scroll overflow-auto"
|
|
17
17
|
}, Z = { class: "w-full border-collapse" }, _ = { class: "bg-muted" }, K = { class: "flex flex-col items-center gap-0.5" }, ee = ["onClick"], te = { class: "flex items-center gap-2" }, le = ["onClick"], se = { class: "flex items-center justify-center pointer-events-none" }, ne = { class: "flex items-center gap-2 pl-6" }, oe = ["onClick"], ae = { class: "flex items-center justify-center pointer-events-none" }, ye = /* @__PURE__ */ R({
|
|
18
18
|
__name: "PermissionMatrix",
|
|
19
19
|
props: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as B, ref as M, computed as d, openBlock as
|
|
1
|
+
import { defineComponent as B, ref as M, computed as d, openBlock as r, createBlock as n, withCtx as o, createElementVNode as l, createVNode as a, unref as w, toDisplayString as v, withModifiers as F, setBlockTracking as C, createElementBlock as S } from "vue";
|
|
2
2
|
import f from "../Button.vue.js";
|
|
3
3
|
import j from "../Modal.vue.js";
|
|
4
4
|
import z from "../Dropdown/Dropdown.vue.js";
|
|
@@ -14,16 +14,16 @@ import "v-datepicker-lite";
|
|
|
14
14
|
import "v-datepicker-lite/style.css";
|
|
15
15
|
import "@jaames/iro";
|
|
16
16
|
import "@vueuse/core";
|
|
17
|
-
/* empty css
|
|
17
|
+
/* empty css */
|
|
18
18
|
import "iconify-icon-picker";
|
|
19
19
|
import "iconify-icon-picker/style.css";
|
|
20
20
|
/* empty css */
|
|
21
21
|
/* empty css */
|
|
22
22
|
import "../../core/config.js";
|
|
23
|
-
const
|
|
24
|
-
class: "pt-
|
|
23
|
+
const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }, A = { style: { "will-change": "transform", contain: "layout style" } }, E = {
|
|
24
|
+
class: "pt-2 px-2 min-w-[295px]",
|
|
25
25
|
style: { "will-change": "transform", contain: "layout style" }
|
|
26
|
-
},
|
|
26
|
+
}, re = /* @__PURE__ */ B({
|
|
27
27
|
__name: "ScreenFilter",
|
|
28
28
|
props: {
|
|
29
29
|
schema: {},
|
|
@@ -32,11 +32,11 @@ const A = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
32
32
|
},
|
|
33
33
|
emits: ["update:modelValue", "change"],
|
|
34
34
|
setup(i, { emit: $ }) {
|
|
35
|
-
const u = i, m = $,
|
|
35
|
+
const u = i, m = $, s = M(!1), p = d(() => u.modelValue ? Object.keys(u.modelValue).filter(
|
|
36
36
|
(e) => u.modelValue[e] !== "" && u.modelValue[e] !== null && u.modelValue[e] !== void 0
|
|
37
|
-
).length : 0),
|
|
38
|
-
m("update:modelValue", e.values), m("change", e.values),
|
|
39
|
-
},
|
|
37
|
+
).length : 0), x = (e) => {
|
|
38
|
+
m("update:modelValue", e.values), m("change", e.values), s.value = !1;
|
|
39
|
+
}, k = () => {
|
|
40
40
|
m("update:modelValue", {}), m("change", {});
|
|
41
41
|
}, g = d(() => {
|
|
42
42
|
const e = y("vlite.screen.filters");
|
|
@@ -48,19 +48,19 @@ const A = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
48
48
|
const e = y("vlite.screen.filter");
|
|
49
49
|
return e !== "vlite.screen.filter" ? e : "Filter";
|
|
50
50
|
});
|
|
51
|
-
return (e, t) => i.type === "modal" ? (
|
|
51
|
+
return (e, t) => i.type === "modal" ? (r(), n(j, {
|
|
52
52
|
key: 0,
|
|
53
53
|
title: g.value,
|
|
54
|
-
show:
|
|
55
|
-
"onUpdate:show": t[3] || (t[3] = (c) =>
|
|
54
|
+
show: s.value,
|
|
55
|
+
"onUpdate:show": t[3] || (t[3] = (c) => s.value = c),
|
|
56
56
|
"max-width": "sm:max-w-md"
|
|
57
57
|
}, {
|
|
58
58
|
trigger: o(() => [
|
|
59
|
-
p.value > 0 ? (
|
|
59
|
+
p.value > 0 ? (r(), n(f, {
|
|
60
60
|
key: 0,
|
|
61
61
|
variant: "secondary",
|
|
62
62
|
class: "flex items-center gap-1.5 pl-3 pr-1.5 shrink-0",
|
|
63
|
-
onClick: t[0] || (t[0] = (c) =>
|
|
63
|
+
onClick: t[0] || (t[0] = (c) => s.value = !0)
|
|
64
64
|
}, {
|
|
65
65
|
default: o(() => [
|
|
66
66
|
a(h, {
|
|
@@ -69,7 +69,7 @@ const A = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
69
69
|
}),
|
|
70
70
|
l("span", null, v(g.value) + " (" + v(p.value) + ")", 1),
|
|
71
71
|
l("div", {
|
|
72
|
-
onClick: F(
|
|
72
|
+
onClick: F(k, ["stop"]),
|
|
73
73
|
class: "ml-1 p-1 hover:bg-black/10 dark:hover:bg-white/10 rounded-full transition-colors cursor-pointer"
|
|
74
74
|
}, [
|
|
75
75
|
a(h, {
|
|
@@ -79,18 +79,18 @@ const A = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
79
79
|
])
|
|
80
80
|
]),
|
|
81
81
|
_: 1
|
|
82
|
-
})) : (
|
|
82
|
+
})) : (r(), n(f, {
|
|
83
83
|
key: 1,
|
|
84
84
|
variant: "outline",
|
|
85
|
-
onClick: t[2] || (t[2] = (c) =>
|
|
85
|
+
onClick: t[2] || (t[2] = (c) => s.value = !0),
|
|
86
86
|
title: V.value,
|
|
87
87
|
size: "lg",
|
|
88
88
|
asIcon: "",
|
|
89
89
|
class: "shrink-0 h-9! w-9!"
|
|
90
90
|
}, {
|
|
91
91
|
default: o(() => [
|
|
92
|
-
l("div",
|
|
93
|
-
t[1] || (C(-1, !0), (t[1] = (
|
|
92
|
+
l("div", N, [
|
|
93
|
+
t[1] || (C(-1, !0), (t[1] = (r(), S("svg", {
|
|
94
94
|
xmlns: "http://www.w3.org/2000/svg",
|
|
95
95
|
width: "1.132em",
|
|
96
96
|
height: "1.132em",
|
|
@@ -111,26 +111,28 @@ const A = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
111
111
|
}, 8, ["title"]))
|
|
112
112
|
]),
|
|
113
113
|
default: o(() => [
|
|
114
|
-
l("div",
|
|
114
|
+
l("div", A, [
|
|
115
115
|
a(w(O), {
|
|
116
116
|
schema: i.schema,
|
|
117
117
|
values: i.modelValue,
|
|
118
118
|
"submit-text": b.value,
|
|
119
|
-
onOnSubmit:
|
|
119
|
+
onOnSubmit: x
|
|
120
120
|
}, null, 8, ["schema", "values", "submit-text"])
|
|
121
121
|
])
|
|
122
122
|
]),
|
|
123
123
|
_: 1
|
|
124
|
-
}, 8, ["title", "show"])) : (
|
|
124
|
+
}, 8, ["title", "show"])) : (r(), n(w(z), {
|
|
125
125
|
key: 1,
|
|
126
|
-
isOpen:
|
|
127
|
-
"onUpdate:isOpen": t[4] || (t[4] = (c) =>
|
|
126
|
+
isOpen: s.value,
|
|
127
|
+
"onUpdate:isOpen": t[4] || (t[4] = (c) => s.value = c),
|
|
128
128
|
"close-on-select": !1,
|
|
129
129
|
position: "bottom-end",
|
|
130
|
+
maxHeight: "410px",
|
|
131
|
+
"class-name": "pb-0! always-scroll",
|
|
130
132
|
class: "w-auto"
|
|
131
133
|
}, {
|
|
132
134
|
trigger: o(() => [
|
|
133
|
-
p.value > 0 ? (
|
|
135
|
+
p.value > 0 ? (r(), n(f, {
|
|
134
136
|
key: 0,
|
|
135
137
|
variant: "secondary",
|
|
136
138
|
class: "flex items-center gap-1.5 pl-3 pr-1.5 shrink-0 bg-gray-150! hover:bg-gray-100!",
|
|
@@ -143,7 +145,7 @@ const A = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
143
145
|
}),
|
|
144
146
|
l("span", null, v(g.value) + " (" + v(p.value) + ")", 1),
|
|
145
147
|
l("div", {
|
|
146
|
-
onClick: F(
|
|
148
|
+
onClick: F(k, ["stop"]),
|
|
147
149
|
class: "ml-1 p-1 hover:bg-black/10 dark:hover:bg-white/10 rounded-full transition-colors cursor-pointer"
|
|
148
150
|
}, [
|
|
149
151
|
a(h, {
|
|
@@ -153,7 +155,7 @@ const A = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
153
155
|
])
|
|
154
156
|
]),
|
|
155
157
|
_: 1
|
|
156
|
-
})) : (
|
|
158
|
+
})) : (r(), n(f, {
|
|
157
159
|
key: 1,
|
|
158
160
|
variant: "outline",
|
|
159
161
|
icon: "hugeicons:filter-add",
|
|
@@ -163,18 +165,19 @@ const A = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
163
165
|
}, null, 8, ["title"]))
|
|
164
166
|
]),
|
|
165
167
|
default: o(() => [
|
|
166
|
-
l("div",
|
|
168
|
+
l("div", E, [
|
|
167
169
|
a(w(O), {
|
|
168
170
|
schema: i.schema,
|
|
169
171
|
values: i.modelValue,
|
|
170
172
|
"submit-text": b.value,
|
|
171
|
-
|
|
173
|
+
className: "gap-3!",
|
|
174
|
+
"footer-class": "mt-0.5! translate-y-0.5 pb-4.5! border-0! border-transparent! rounded-none!",
|
|
172
175
|
"submit-props": {
|
|
173
176
|
size: "sm",
|
|
174
177
|
class: "w-full",
|
|
175
178
|
textClass: "-text-fs-1!"
|
|
176
179
|
},
|
|
177
|
-
onOnSubmit:
|
|
180
|
+
onOnSubmit: x
|
|
178
181
|
}, null, 8, ["schema", "values", "submit-text"])
|
|
179
182
|
])
|
|
180
183
|
]),
|
|
@@ -183,5 +186,5 @@ const A = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
183
186
|
}
|
|
184
187
|
});
|
|
185
188
|
export {
|
|
186
|
-
|
|
189
|
+
re as default
|
|
187
190
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SidePanel.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-37a55d1c"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -23,10 +23,10 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
23
23
|
"onUpdate:modelValue"?: (val: number) => any;
|
|
24
24
|
}>, {
|
|
25
25
|
class: string;
|
|
26
|
+
layout: "horizontal" | "vertical";
|
|
26
27
|
modelValue: number;
|
|
27
28
|
min: number;
|
|
28
29
|
max: number;
|
|
29
|
-
layout: "horizontal" | "vertical";
|
|
30
30
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
31
31
|
containerRef: HTMLDivElement;
|
|
32
32
|
}, HTMLDivElement>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Tabes.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1e044fd1"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useResizeObserver as
|
|
3
|
-
import
|
|
4
|
-
import { $t as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as T, ref as u, watch as l, onMounted as D, computed as p, openBlock as i, createElementBlock as v, normalizeClass as d, normalizeStyle as N, createCommentVNode as x, Fragment as O, renderList as P, createBlock as h, resolveDynamicComponent as F, mergeProps as _, withCtx as q, createElementVNode as G, toDisplayString as H, nextTick as J } from "vue";
|
|
2
|
+
import { useResizeObserver as K } from "@vueuse/core";
|
|
3
|
+
import Q from "../Icon.vue.js";
|
|
4
|
+
import { $t as U } from "../../utils/i18n.js";
|
|
5
|
+
const ee = /* @__PURE__ */ T({
|
|
6
6
|
__name: "Tabes",
|
|
7
7
|
props: {
|
|
8
8
|
options: {},
|
|
@@ -15,33 +15,35 @@ const Z = /* @__PURE__ */ E({
|
|
|
15
15
|
tabClass: {}
|
|
16
16
|
},
|
|
17
17
|
emits: ["update:modelValue", "change"],
|
|
18
|
-
setup(s, { emit:
|
|
19
|
-
const r = s,
|
|
20
|
-
e ?
|
|
21
|
-
},
|
|
18
|
+
setup(s, { emit: C }) {
|
|
19
|
+
const r = s, y = C, f = u(null), b = u(/* @__PURE__ */ new Map()), k = (e, n) => {
|
|
20
|
+
e ? b.value.set(n, e) : b.value.delete(n);
|
|
21
|
+
}, m = u({
|
|
22
22
|
width: "0px",
|
|
23
23
|
height: "0px",
|
|
24
24
|
transform: "translate(0px, 0px)",
|
|
25
25
|
opacity: 0
|
|
26
|
-
}), o = async () => {
|
|
27
|
-
await
|
|
28
|
-
const e =
|
|
26
|
+
}), g = u(!1), o = async () => {
|
|
27
|
+
await J();
|
|
28
|
+
const e = f.value, n = b.value.get(r.modelValue);
|
|
29
29
|
if (!e || !n) {
|
|
30
|
-
|
|
30
|
+
m.value.opacity = 0;
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
|
-
const t = e.getBoundingClientRect(), a = n.getBoundingClientRect(), c = a.left - t.left,
|
|
34
|
-
|
|
35
|
-
width: `${
|
|
36
|
-
height: `${
|
|
37
|
-
transform: `translate(${c}px, ${
|
|
33
|
+
const t = e.getBoundingClientRect(), a = n.getBoundingClientRect(), c = a.left - t.left, j = a.top - t.top, A = a.width, E = a.height;
|
|
34
|
+
m.value = {
|
|
35
|
+
width: `${A}px`,
|
|
36
|
+
height: `${E}px`,
|
|
37
|
+
transform: `translate(${c}px, ${j}px)`,
|
|
38
38
|
opacity: 1
|
|
39
|
-
}
|
|
39
|
+
}, g.value || setTimeout(() => {
|
|
40
|
+
g.value = !0;
|
|
41
|
+
}, 50);
|
|
40
42
|
};
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
e.disabled || (
|
|
44
|
-
},
|
|
43
|
+
K(f, 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);
|
|
44
|
+
const w = (e) => {
|
|
45
|
+
e.disabled || (y("update:modelValue", e.value), y("change", e.value));
|
|
46
|
+
}, z = p(() => {
|
|
45
47
|
const e = r.variant === "line", n = {
|
|
46
48
|
surface: "bg-secondary/80 p-1",
|
|
47
49
|
primary: "bg-secondary p-1",
|
|
@@ -52,14 +54,14 @@ const Z = /* @__PURE__ */ E({
|
|
|
52
54
|
line: "bg-transparent gap-6 rounded-none p-0 border-b border-border"
|
|
53
55
|
}, t = r.wrap && !e ? "flex-wrap" : "";
|
|
54
56
|
return [`${r.block || e ? "flex w-full" : "inline-flex"} rounded-lg relative isolate ${t}`, n[r.variant]];
|
|
55
|
-
}),
|
|
57
|
+
}), $ = {
|
|
56
58
|
sm: "text-xs px-2.5 py-1",
|
|
57
59
|
md: "-text-fs-2 px-3 py-1",
|
|
58
60
|
lg: "-text-fs-1 px-4 py-1"
|
|
59
|
-
},
|
|
61
|
+
}, V = p(() => {
|
|
60
62
|
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" : "";
|
|
61
63
|
return [n, t];
|
|
62
|
-
}),
|
|
64
|
+
}), R = (e) => {
|
|
63
65
|
const n = e.value === r.modelValue, t = r.variant === "line";
|
|
64
66
|
let a = "";
|
|
65
67
|
if (n)
|
|
@@ -91,11 +93,11 @@ const Z = /* @__PURE__ */ E({
|
|
|
91
93
|
else
|
|
92
94
|
a = t ? "text-muted-foreground" : "text-muted-foreground hover:text-foreground/80";
|
|
93
95
|
const c = e.disabled ? "opacity-50 cursor-not-allowed" : "";
|
|
94
|
-
return [
|
|
95
|
-
},
|
|
96
|
-
const
|
|
97
|
-
return r.variant === "line" ? `${
|
|
98
|
-
}),
|
|
96
|
+
return [V.value, a, r?.tabClass, c].join(" ");
|
|
97
|
+
}, B = p(() => {
|
|
98
|
+
const n = `absolute left-0 top-0 z-0 pointer-events-none ${g.value ? "transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]" : ""}`;
|
|
99
|
+
return r.variant === "line" ? `${n} !h-[2px] !top-auto bottom-0` : `${n} rounded-md shadow-sm`;
|
|
100
|
+
}), S = () => ({
|
|
99
101
|
surface: "bg-background",
|
|
100
102
|
primary: "bg-primary",
|
|
101
103
|
secondary: "bg-secondary-foreground",
|
|
@@ -103,39 +105,39 @@ const Z = /* @__PURE__ */ E({
|
|
|
103
105
|
success: "bg-success",
|
|
104
106
|
outline: "bg-accent/50 ring-1 ring-border",
|
|
105
107
|
line: "bg-primary"
|
|
106
|
-
})[r.variant],
|
|
107
|
-
return (e, n) => (i(),
|
|
108
|
+
})[r.variant], I = (e) => e.labelI18n ? U(e.labelI18n) : e.label, L = (e) => e.to ? "router-link" : e.href ? "a" : "button", M = (e) => e.to ? { to: e.to } : e.href ? { href: e.href, target: "_blank", rel: "noopener noreferrer" } : { type: "button" };
|
|
109
|
+
return (e, n) => (i(), v("div", {
|
|
108
110
|
ref_key: "containerRef",
|
|
109
|
-
ref:
|
|
110
|
-
class:
|
|
111
|
+
ref: f,
|
|
112
|
+
class: d(z.value),
|
|
111
113
|
role: "tablist",
|
|
112
114
|
"data-tabes": ""
|
|
113
115
|
}, [
|
|
114
|
-
s.modelValue !== void 0 && !s.wrap ? (i(),
|
|
116
|
+
s.modelValue !== void 0 && !s.wrap ? (i(), v("div", {
|
|
115
117
|
key: 0,
|
|
116
|
-
class:
|
|
117
|
-
style: N(
|
|
118
|
-
}, null, 6)) :
|
|
119
|
-
(i(!0),
|
|
118
|
+
class: d([B.value, S()]),
|
|
119
|
+
style: N(m.value)
|
|
120
|
+
}, null, 6)) : x("", !0),
|
|
121
|
+
(i(!0), v(O, null, P(s.options, (t) => (i(), h(F(L(t)), _({
|
|
120
122
|
key: t.value,
|
|
121
123
|
ref_for: !0,
|
|
122
124
|
ref: (a) => k(a?.$el || a, t.value),
|
|
123
125
|
role: "tab",
|
|
124
126
|
"aria-selected": s.modelValue === t.value,
|
|
125
127
|
disabled: t.disabled,
|
|
126
|
-
class: [
|
|
127
|
-
}, { ref_for: !0 },
|
|
128
|
-
onClick: (a) =>
|
|
128
|
+
class: [R(t), $[r.size]]
|
|
129
|
+
}, { ref_for: !0 }, M(t), {
|
|
130
|
+
onClick: (a) => w(t)
|
|
129
131
|
}), {
|
|
130
|
-
default:
|
|
131
|
-
t.icon ? (i(),
|
|
132
|
+
default: q(() => [
|
|
133
|
+
t.icon ? (i(), h(Q, {
|
|
132
134
|
key: 0,
|
|
133
135
|
icon: t.icon,
|
|
134
|
-
class:
|
|
135
|
-
}, null, 8, ["icon", "class"])) :
|
|
136
|
-
|
|
137
|
-
class:
|
|
138
|
-
},
|
|
136
|
+
class: d(s.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4")
|
|
137
|
+
}, null, 8, ["icon", "class"])) : x("", !0),
|
|
138
|
+
G("span", {
|
|
139
|
+
class: d(["whitespace-nowrap z-20 relative", s.textClass])
|
|
140
|
+
}, H(I(t)), 3)
|
|
139
141
|
]),
|
|
140
142
|
_: 2
|
|
141
143
|
}, 1040, ["aria-selected", "disabled", "class", "onClick"]))), 128))
|
|
@@ -143,5 +145,5 @@ const Z = /* @__PURE__ */ E({
|
|
|
143
145
|
}
|
|
144
146
|
});
|
|
145
147
|
export {
|
|
146
|
-
|
|
148
|
+
ee as default
|
|
147
149
|
};
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { defineComponent as N, ref as g, computed as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as N, ref as g, computed as p, openBlock as r, createElementBlock as u, normalizeClass as T, createElementVNode as c, withModifiers as d, createBlock as y, withCtx as h, createVNode as m, createCommentVNode as w, withDirectives as j, withKeys as C, vModelText as z, toDisplayString as D, unref as K, createTextVNode as M, nextTick as O } from "vue";
|
|
2
|
+
import k from "../Icon.vue.js";
|
|
3
|
+
import R from "../Dropdown/Dropdown.vue.js";
|
|
4
4
|
import { $t as s } from "../../utils/i18n.js";
|
|
5
5
|
/* empty css */
|
|
6
6
|
/* empty css */
|
|
7
|
-
import
|
|
8
|
-
|
|
7
|
+
import A from "../Button.vue.js";
|
|
8
|
+
import U from "../IconPicker.vue.js";
|
|
9
|
+
const q = {
|
|
9
10
|
type: "button",
|
|
10
11
|
class: "flex items-center justify-center rounded hover:bg-accent transition-colors p-0.5 outline-none focus-visible:ring-2 focus-visible:ring-primary/20 mt-1"
|
|
11
|
-
},
|
|
12
|
+
}, F = {
|
|
12
13
|
key: 1,
|
|
13
14
|
class: "flex items-center justify-center p-0.5"
|
|
14
|
-
},
|
|
15
|
+
}, G = { class: "flex-1 min-w-0 pr-1" }, H = ["onKeydown"], J = {
|
|
15
16
|
key: 1,
|
|
16
17
|
class: "block truncate text-sm font-medium leading-normal"
|
|
17
|
-
},
|
|
18
|
-
class: /* @__PURE__ */
|
|
19
|
-
},
|
|
18
|
+
}, L = {
|
|
19
|
+
class: /* @__PURE__ */ T(["flex items-center"])
|
|
20
|
+
}, te = /* @__PURE__ */ N({
|
|
20
21
|
__name: "Sheet",
|
|
21
22
|
props: {
|
|
22
23
|
sheet: {},
|
|
@@ -31,20 +32,25 @@ const U = {
|
|
|
31
32
|
inactiveItemClass: { default: "" }
|
|
32
33
|
},
|
|
33
34
|
emits: ["select", "update:title", "update:icon", "edit-start", "edit-end", "duplicate", "delete"],
|
|
34
|
-
setup(
|
|
35
|
-
const e =
|
|
36
|
-
|
|
35
|
+
setup(i, { emit: B }) {
|
|
36
|
+
const e = i, o = B, f = g(null), a = g(e.sheet.title), E = p(
|
|
37
|
+
() => e.sheet.titleI18n ? s(e.sheet.titleI18n) : e.sheet.title
|
|
38
|
+
), x = () => {
|
|
39
|
+
a.value = e.sheet.title, o("edit-start", e.sheet.id), O(() => {
|
|
37
40
|
f.value?.focus(), f.value?.select();
|
|
38
41
|
});
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
};
|
|
43
|
+
let v = !1;
|
|
44
|
+
const b = () => {
|
|
45
|
+
if (!e.isEditing || v) return;
|
|
46
|
+
v = !0;
|
|
47
|
+
const l = a.value.trim();
|
|
48
|
+
l ? o("update:title", e.sheet.id, l) : a.value = e.sheet.title, o("edit-end", e.sheet.id), setTimeout(() => {
|
|
49
|
+
v = !1;
|
|
50
|
+
}, 100);
|
|
51
|
+
}, I = () => {
|
|
52
|
+
a.value = e.sheet.title, o("edit-end", e.sheet.id);
|
|
53
|
+
}, $ = p(() => [
|
|
48
54
|
{
|
|
49
55
|
label: s("vlite.workbook.rename") !== "vlite.workbook.rename" ? s("vlite.workbook.rename") : "Rename",
|
|
50
56
|
value: "rename",
|
|
@@ -68,101 +74,101 @@ const U = {
|
|
|
68
74
|
cancelText: e.confirmDeleteTexts?.cancel,
|
|
69
75
|
variant: "danger",
|
|
70
76
|
onConfirm: () => {
|
|
71
|
-
e.canDelete &&
|
|
77
|
+
e.canDelete && o("delete", e.sheet.id);
|
|
72
78
|
}
|
|
73
79
|
} : void 0
|
|
74
80
|
}
|
|
75
|
-
]), S = (
|
|
76
|
-
if (
|
|
77
|
-
if (!e.canDelete
|
|
78
|
-
|
|
81
|
+
]), S = (l) => {
|
|
82
|
+
if (l.value === "rename" && x(), l.value === "duplicate" && o("duplicate", e.sheet.id), l.value === "delete") {
|
|
83
|
+
if (!e.canDelete) return;
|
|
84
|
+
o("delete", e.sheet.id);
|
|
79
85
|
}
|
|
80
|
-
},
|
|
81
|
-
t && t.value && t.value !== "delete" || e.canDelete && n("delete", e.sheet.id);
|
|
82
|
-
}, V = v(() => [
|
|
86
|
+
}, V = p(() => [
|
|
83
87
|
"group relative flex items-center min-w-[120px] max-w-[240px] h-9 px-3 border-r border-border select-none cursor-pointer transition-all duration-200 ease-out",
|
|
84
88
|
e.itemClass,
|
|
85
89
|
e.isActive ? `bg-muted text-foreground ring-1 ring-border ring-b-0 z-10 ${e.activeItemClass}` : `text-muted-foreground hover:bg-accent/50 ${e.inactiveItemClass}`,
|
|
86
90
|
e.isEditing ? "cursor-text" : ""
|
|
87
91
|
].filter(Boolean).join(" "));
|
|
88
|
-
return (
|
|
89
|
-
class:
|
|
90
|
-
onClick:
|
|
91
|
-
onDblclick:
|
|
92
|
+
return (l, t) => (r(), u("div", {
|
|
93
|
+
class: T(V.value),
|
|
94
|
+
onClick: t[5] || (t[5] = (n) => o("select", i.sheet.id)),
|
|
95
|
+
onDblclick: x
|
|
92
96
|
}, [
|
|
93
97
|
c("div", {
|
|
94
|
-
onClick:
|
|
98
|
+
onClick: t[1] || (t[1] = d(() => {
|
|
95
99
|
}, ["stop"])),
|
|
96
100
|
class: "mr-2 flex items-center shrink-0"
|
|
97
101
|
}, [
|
|
98
|
-
(
|
|
102
|
+
(i.sheet.icon || i.isEditing) && i.allowIconChange ? (r(), y(U, {
|
|
99
103
|
key: 0,
|
|
100
|
-
value:
|
|
104
|
+
value: i.sheet.icon || "lucide:file",
|
|
101
105
|
position: "bottom-start",
|
|
102
|
-
onOnSelect:
|
|
106
|
+
onOnSelect: t[0] || (t[0] = (n) => o("update:icon", i.sheet.id, n))
|
|
103
107
|
}, {
|
|
104
108
|
default: h(() => [
|
|
105
|
-
c("button",
|
|
106
|
-
|
|
107
|
-
icon:
|
|
109
|
+
c("button", q, [
|
|
110
|
+
m(k, {
|
|
111
|
+
icon: i.sheet.icon || "lucide:file",
|
|
108
112
|
class: "w-4 h-4 opacity-70 hover:opacity-100 transition-opacity"
|
|
109
113
|
}, null, 8, ["icon"])
|
|
110
114
|
])
|
|
111
115
|
]),
|
|
112
116
|
_: 1
|
|
113
|
-
}, 8, ["value"])) :
|
|
114
|
-
|
|
115
|
-
icon:
|
|
117
|
+
}, 8, ["value"])) : i.sheet.icon ? (r(), u("div", F, [
|
|
118
|
+
m(k, {
|
|
119
|
+
icon: i.sheet.icon,
|
|
116
120
|
class: "w-4 h-4 opacity-70"
|
|
117
121
|
}, null, 8, ["icon"])
|
|
118
122
|
])) : w("", !0)
|
|
119
123
|
]),
|
|
120
|
-
c("div",
|
|
121
|
-
|
|
124
|
+
c("div", G, [
|
|
125
|
+
i.isEditing ? j((r(), u("input", {
|
|
122
126
|
key: 0,
|
|
123
127
|
ref_key: "inputRef",
|
|
124
128
|
ref: f,
|
|
125
|
-
"onUpdate:modelValue":
|
|
129
|
+
"onUpdate:modelValue": t[2] || (t[2] = (n) => a.value = n),
|
|
126
130
|
type: "text",
|
|
127
131
|
class: "w-full bg-transparent border-none outline-none p-0 text-sm font-medium text-foreground placeholder-muted-foreground focus:ring-0",
|
|
128
132
|
onBlur: b,
|
|
129
|
-
onKeydown:
|
|
130
|
-
|
|
133
|
+
onKeydown: [
|
|
134
|
+
C(d(b, ["prevent"]), ["enter"]),
|
|
135
|
+
C(d(I, ["prevent"]), ["esc"])
|
|
136
|
+
],
|
|
137
|
+
onClick: t[3] || (t[3] = d(() => {
|
|
131
138
|
}, ["stop"]))
|
|
132
|
-
}, null,
|
|
133
|
-
[
|
|
134
|
-
]) : (
|
|
139
|
+
}, null, 40, H)), [
|
|
140
|
+
[z, a.value]
|
|
141
|
+
]) : (r(), u("span", J, D(E.value), 1))
|
|
135
142
|
]),
|
|
136
143
|
c("div", {
|
|
137
|
-
class: "opacity-0 group-hover:opacity-100 transition-opacity ml-auto pl-1 flex items-center
|
|
138
|
-
onClick:
|
|
144
|
+
class: "opacity-0 group-hover:opacity-100 transition-opacity ml-auto pl-1 -mr-2 flex items-center",
|
|
145
|
+
onClick: t[4] || (t[4] = d(() => {
|
|
139
146
|
}, ["stop"]))
|
|
140
147
|
}, [
|
|
141
|
-
|
|
148
|
+
m(K(R), {
|
|
142
149
|
options: $.value,
|
|
143
150
|
position: "bottom-end",
|
|
144
151
|
width: "140px",
|
|
145
152
|
teleport: !0,
|
|
146
|
-
onOnSelect: S
|
|
147
|
-
onOnConfirm: x,
|
|
148
|
-
onConfirm: x
|
|
153
|
+
onOnSelect: S
|
|
149
154
|
}, {
|
|
150
155
|
trigger: h(() => [
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
156
|
+
m(A, {
|
|
157
|
+
icon: "lucide:more-vertical",
|
|
158
|
+
asIcon: "",
|
|
159
|
+
size: "xs",
|
|
160
|
+
rounded: "full",
|
|
161
|
+
variant: "ghost"
|
|
162
|
+
})
|
|
157
163
|
]),
|
|
158
|
-
item: h(({ option:
|
|
159
|
-
c("div",
|
|
160
|
-
|
|
164
|
+
item: h(({ option: n }) => [
|
|
165
|
+
c("div", L, [
|
|
166
|
+
n?.icon ? (r(), y(k, {
|
|
161
167
|
key: 0,
|
|
162
|
-
icon:
|
|
168
|
+
icon: n?.icon,
|
|
163
169
|
class: "w-3.5 h-3.5 mr-2 opacity-70"
|
|
164
170
|
}, null, 8, ["icon"])) : w("", !0),
|
|
165
|
-
|
|
171
|
+
M(" " + D(n?.label), 1)
|
|
166
172
|
])
|
|
167
173
|
]),
|
|
168
174
|
_: 1
|
|
@@ -172,5 +178,5 @@ const U = {
|
|
|
172
178
|
}
|
|
173
179
|
});
|
|
174
180
|
export {
|
|
175
|
-
|
|
181
|
+
te as default
|
|
176
182
|
};
|