@emoo-ai/ui-vue 0.1.4 → 0.1.5
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/dist/components/EmooField.vue.d.ts +9 -10
- package/dist/feedback/confirm.d.ts +8 -0
- package/dist/feedback/toast.d.ts +11 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1068 -1028
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ElDrawer as
|
|
1
|
+
import { defineComponent as F, openBlock as t, createElementBlock as s, createBlock as x, resolveDynamicComponent as Ie, createCommentVNode as S, createElementVNode as m, toDisplayString as k, withModifiers as le, normalizeClass as W, computed as V, unref as a, mergeProps as Xe, withCtx as w, createVNode as P, renderSlot as A, Fragment as D, renderList as J, createSlots as Se, reactive as St, normalizeStyle as pe, createTextVNode as Y, ref as U, getCurrentInstance as eo, onBeforeUnmount as lt, nextTick as ke, shallowRef as to, watch as we, useAttrs as Pe, onMounted as Je, withDirectives as Ne, vShow as tt, normalizeProps as Fe, guardReactiveProps as qe, onUnmounted as Ct, useSlots as Et, withKeys as je, h as ve, onScopeDispose as _t } from "vue";
|
|
2
|
+
import { ElDrawer as Tt, ElTooltip as oo, ElSelect as Ae, ElOption as ze, ElCheckboxGroup as xt, ElCheckbox as st, ElRadioGroup as It, ElRadio as zt, ElDropdown as nt, ElButton as et, ElInput as ot, ElDropdownMenu as ao, vLoading as lo, ElDropdownItem as so, ElPopover as no, ElTag as io, ElTable as ro, ElTableColumn as Ve, ElMessage as uo, ElMessageBox as co } from "element-plus";
|
|
3
3
|
import { useI18n as me } from "vue-i18n";
|
|
4
|
-
import { PhX as
|
|
5
|
-
import { primaryColorVars as
|
|
6
|
-
import { AVATAR_TINT_PALETTE as
|
|
7
|
-
import
|
|
8
|
-
|
|
4
|
+
import { PhX as it, PhSpinner as mo, PhCaretUp as Rt, PhCaretDown as rt, PhPushPinSlash as vo, PhArrowLineLeft as fo, PhArrowLineRight as ho, PhEyeSlash as Vt, PhEye as po, PhArrowCounterClockwise as Bt, PhMagnifyingGlass as yo, PhSlidersHorizontal as bo, PhDotsThree as Mt, PhCaretRight as Ge, PhArrowsVertical as go, PhCheck as Dt, PhCaretLeft as Pt, PhDotsSixVertical as wt, PhCaretUpDown as ko, PhPushPin as $o, PhUploadSimple as _o, PhFileText as wo, PhArrowRight as So } from "./icons.js";
|
|
5
|
+
import { primaryColorVars as Co } from "@emoo-ai/brand/colors";
|
|
6
|
+
import { AVATAR_TINT_PALETTE as ui, PRESET_COLORS as ci, avatarTintOf as mi, hexToRgbString as vi, mixColor as fi, primaryColorVars as hi } from "@emoo-ai/brand/colors";
|
|
7
|
+
import "element-plus/es/components/message-box/style/css";
|
|
8
|
+
import { emoouiMessages as yi } from "./locales.js";
|
|
9
|
+
import "element-plus/es/components/message/style/css";
|
|
10
|
+
const Eo = { class: "emoo-action-pill__label" }, To = {
|
|
9
11
|
key: 1,
|
|
10
12
|
class: "emoo-action-pill__kbd"
|
|
11
|
-
},
|
|
13
|
+
}, xo = /* @__PURE__ */ F({
|
|
12
14
|
__name: "EmooActionPill",
|
|
13
15
|
props: {
|
|
14
16
|
icon: {},
|
|
@@ -16,27 +18,27 @@ const wo = { class: "emoo-action-pill__label" }, So = {
|
|
|
16
18
|
kbd: {}
|
|
17
19
|
},
|
|
18
20
|
emits: ["click"],
|
|
19
|
-
setup(e, { emit:
|
|
20
|
-
const o =
|
|
21
|
+
setup(e, { emit: n }) {
|
|
22
|
+
const o = n;
|
|
21
23
|
return (l, r) => (t(), s("button", {
|
|
22
24
|
type: "button",
|
|
23
25
|
class: "emoo-action-pill",
|
|
24
|
-
onClick: r[0] || (r[0] = (
|
|
26
|
+
onClick: r[0] || (r[0] = (i) => o("click", i))
|
|
25
27
|
}, [
|
|
26
|
-
e.icon ? (t(), x(
|
|
28
|
+
e.icon ? (t(), x(Ie(e.icon), {
|
|
27
29
|
key: 0,
|
|
28
30
|
class: "emoo-action-pill__icon"
|
|
29
31
|
})) : S("", !0),
|
|
30
|
-
m("span",
|
|
31
|
-
e.kbd ? (t(), s("kbd",
|
|
32
|
+
m("span", Eo, k(e.label), 1),
|
|
33
|
+
e.kbd ? (t(), s("kbd", To, k(e.kbd), 1)) : S("", !0)
|
|
32
34
|
]));
|
|
33
35
|
}
|
|
34
|
-
}),
|
|
36
|
+
}), Z = (e, n) => {
|
|
35
37
|
const o = e.__vccOpts || e;
|
|
36
|
-
for (const [l, r] of
|
|
38
|
+
for (const [l, r] of n)
|
|
37
39
|
o[l] = r;
|
|
38
40
|
return o;
|
|
39
|
-
},
|
|
41
|
+
}, zn = /* @__PURE__ */ Z(xo, [["__scopeId", "data-v-f9e9873a"]]), Io = /* @__PURE__ */ F({
|
|
40
42
|
__name: "SheetDragHandle",
|
|
41
43
|
props: {
|
|
42
44
|
dragging: { type: Boolean },
|
|
@@ -44,18 +46,18 @@ const wo = { class: "emoo-action-pill__label" }, So = {
|
|
|
44
46
|
},
|
|
45
47
|
emits: ["dragstart"],
|
|
46
48
|
setup(e) {
|
|
47
|
-
return (
|
|
49
|
+
return (n, o) => (t(), s("div", {
|
|
48
50
|
class: W(["sheet-drag-handle", { "is-dragging": e.dragging, "is-dense": e.dense }]),
|
|
49
51
|
"data-testid": "sheet-drag-handle",
|
|
50
|
-
onPointerdown: o[0] || (o[0] = le((l) =>
|
|
52
|
+
onPointerdown: o[0] || (o[0] = le((l) => n.$emit("dragstart", l), ["prevent"]))
|
|
51
53
|
}, [...o[1] || (o[1] = [
|
|
52
54
|
m("span", { class: "sheet-drag-handle__bar" }, null, -1)
|
|
53
55
|
])], 34));
|
|
54
56
|
}
|
|
55
|
-
}),
|
|
57
|
+
}), At = /* @__PURE__ */ Z(Io, [["__scopeId", "data-v-ef0108a1"]]), zo = { class: "emoo-asheet" }, Ro = {
|
|
56
58
|
key: 0,
|
|
57
59
|
class: "emoo-asheet__title"
|
|
58
|
-
},
|
|
60
|
+
}, Vo = { class: "emoo-asheet__list" }, Bo = ["disabled", "data-testid", "onClick"], Rn = /* @__PURE__ */ F({
|
|
59
61
|
inheritAttrs: !1,
|
|
60
62
|
__name: "EmooActionSheet",
|
|
61
63
|
props: {
|
|
@@ -65,45 +67,45 @@ const wo = { class: "emoo-action-pill__label" }, So = {
|
|
|
65
67
|
cancelText: {}
|
|
66
68
|
},
|
|
67
69
|
emits: ["update:modelValue", "select", "cancel"],
|
|
68
|
-
setup(e, { emit:
|
|
69
|
-
const o = e, l =
|
|
70
|
+
setup(e, { emit: n }) {
|
|
71
|
+
const o = e, l = n, r = V({
|
|
70
72
|
get: () => o.modelValue,
|
|
71
73
|
set: (v) => l("update:modelValue", v)
|
|
72
74
|
});
|
|
73
|
-
function
|
|
74
|
-
r.value = !1, l("select", v,
|
|
75
|
+
function i(v, g) {
|
|
76
|
+
r.value = !1, l("select", v, g);
|
|
75
77
|
}
|
|
76
78
|
function p() {
|
|
77
79
|
r.value = !1, l("cancel");
|
|
78
80
|
}
|
|
79
|
-
return (v,
|
|
81
|
+
return (v, g) => (t(), x(a(Tt), Xe(v.$attrs, {
|
|
80
82
|
modelValue: r.value,
|
|
81
|
-
"onUpdate:modelValue":
|
|
83
|
+
"onUpdate:modelValue": g[0] || (g[0] = (u) => r.value = u),
|
|
82
84
|
direction: "btt",
|
|
83
85
|
size: "auto",
|
|
84
86
|
"with-header": !1,
|
|
85
87
|
class: "emoo-action-sheet"
|
|
86
88
|
}), {
|
|
87
89
|
default: w(() => [
|
|
88
|
-
m("div",
|
|
89
|
-
P(
|
|
90
|
-
e.title ? (t(), s("p",
|
|
91
|
-
m("div",
|
|
92
|
-
|
|
90
|
+
m("div", zo, [
|
|
91
|
+
P(At),
|
|
92
|
+
e.title ? (t(), s("p", Ro, k(e.title), 1)) : S("", !0),
|
|
93
|
+
m("div", Vo, [
|
|
94
|
+
A(v.$slots, "default"),
|
|
93
95
|
v.$slots.default ? S("", !0) : (t(!0), s(D, { key: 0 }, J(e.items, (u, b) => (t(), s("button", {
|
|
94
96
|
key: u.key,
|
|
95
97
|
type: "button",
|
|
96
98
|
class: W(["emoo-asheet__item", { "is-danger": u.danger }]),
|
|
97
99
|
disabled: u.disabled,
|
|
98
100
|
"data-testid": u.testid,
|
|
99
|
-
onClick: (_) =>
|
|
101
|
+
onClick: (_) => i(u, b)
|
|
100
102
|
}, [
|
|
101
|
-
u.icon ? (t(), x(
|
|
103
|
+
u.icon ? (t(), x(Ie(u.icon), {
|
|
102
104
|
key: 0,
|
|
103
105
|
class: "emoo-asheet__ic"
|
|
104
106
|
})) : S("", !0),
|
|
105
|
-
m("span", null,
|
|
106
|
-
], 10,
|
|
107
|
+
m("span", null, k(u.label), 1)
|
|
108
|
+
], 10, Bo))), 128))
|
|
107
109
|
]),
|
|
108
110
|
e.cancelText ? (t(), s("button", {
|
|
109
111
|
key: 1,
|
|
@@ -111,13 +113,13 @@ const wo = { class: "emoo-action-pill__label" }, So = {
|
|
|
111
113
|
class: "emoo-asheet__cancel",
|
|
112
114
|
"data-testid": "emoo-asheet-cancel",
|
|
113
115
|
onClick: p
|
|
114
|
-
},
|
|
116
|
+
}, k(e.cancelText), 1)) : S("", !0)
|
|
115
117
|
])
|
|
116
118
|
]),
|
|
117
119
|
_: 3
|
|
118
120
|
}, 16, ["modelValue"]));
|
|
119
121
|
}
|
|
120
|
-
}), he = /* @__PURE__ */
|
|
122
|
+
}), he = /* @__PURE__ */ F({
|
|
121
123
|
__name: "EmooTooltip",
|
|
122
124
|
props: {
|
|
123
125
|
showAfter: { default: 300 },
|
|
@@ -125,30 +127,30 @@ const wo = { class: "emoo-action-pill__label" }, So = {
|
|
|
125
127
|
popperClass: { default: "" }
|
|
126
128
|
},
|
|
127
129
|
setup(e) {
|
|
128
|
-
const
|
|
129
|
-
return (l, r) => (t(), x(a(
|
|
130
|
+
const n = e, o = V(() => ["emo-tip", n.popperClass].filter(Boolean).join(" "));
|
|
131
|
+
return (l, r) => (t(), x(a(oo), Xe(l.$attrs, {
|
|
130
132
|
placement: e.placement,
|
|
131
133
|
"show-after": e.showAfter,
|
|
132
134
|
"popper-class": o.value
|
|
133
135
|
}), Se({
|
|
134
136
|
default: w(() => [
|
|
135
|
-
|
|
137
|
+
A(l.$slots, "default")
|
|
136
138
|
]),
|
|
137
139
|
_: 2
|
|
138
140
|
}, [
|
|
139
141
|
l.$slots.content ? {
|
|
140
142
|
name: "content",
|
|
141
143
|
fn: w(() => [
|
|
142
|
-
|
|
144
|
+
A(l.$slots, "content")
|
|
143
145
|
]),
|
|
144
146
|
key: "0"
|
|
145
147
|
} : void 0
|
|
146
148
|
]), 1040, ["placement", "show-after", "popper-class"]));
|
|
147
149
|
}
|
|
148
|
-
}),
|
|
150
|
+
}), Mo = { class: "emoo-mtags" }, Do = ["src", "onError"], Po = { class: "emoo-mtag__name" }, Ao = ["aria-label", "onClick"], Lo = {
|
|
149
151
|
class: "emoo-mtag emoo-mtag--more",
|
|
150
152
|
"data-testid": "emoo-mtag-more"
|
|
151
|
-
},
|
|
153
|
+
}, Oo = /* @__PURE__ */ F({
|
|
152
154
|
__name: "EmooMemberTag",
|
|
153
155
|
props: {
|
|
154
156
|
items: {},
|
|
@@ -158,8 +160,8 @@ const wo = { class: "emoo-action-pill__label" }, So = {
|
|
|
158
160
|
},
|
|
159
161
|
emits: ["remove"],
|
|
160
162
|
setup(e) {
|
|
161
|
-
const { t:
|
|
162
|
-
return (v,
|
|
163
|
+
const { t: n } = me(), o = e, l = V(() => o.items.slice(0, o.max)), r = St(/* @__PURE__ */ new Set()), i = V(() => Math.max(0, o.items.length - o.max)), p = V(() => o.items.slice(o.max).map((v) => v.name).join("、"));
|
|
164
|
+
return (v, g) => (t(), s("span", Mo, [
|
|
163
165
|
(t(!0), s(D, null, J(l.value, (u, b) => (t(), s("span", {
|
|
164
166
|
key: `${u.name}-${b}`,
|
|
165
167
|
class: "emoo-mtag",
|
|
@@ -175,77 +177,77 @@ const wo = { class: "emoo-action-pill__label" }, So = {
|
|
|
175
177
|
alt: "",
|
|
176
178
|
class: "emoo-mtag__img",
|
|
177
179
|
onError: (_) => r.add(b)
|
|
178
|
-
}, null, 40,
|
|
179
|
-
|
|
180
|
+
}, null, 40, Do)) : (t(), s(D, { key: 1 }, [
|
|
181
|
+
Y(k(u.name[0]), 1)
|
|
180
182
|
], 64))
|
|
181
183
|
], 2),
|
|
182
|
-
m("span",
|
|
184
|
+
m("span", Po, k(u.name), 1),
|
|
183
185
|
e.removable ? (t(), s("button", {
|
|
184
186
|
key: 0,
|
|
185
187
|
type: "button",
|
|
186
188
|
class: "emoo-mtag__x",
|
|
187
|
-
"aria-label": a(
|
|
189
|
+
"aria-label": a(n)("common.emooMemberTag.remove", { name: u.name }),
|
|
188
190
|
onClick: (_) => v.$emit("remove", b)
|
|
189
191
|
}, [
|
|
190
|
-
P(a(
|
|
191
|
-
], 8,
|
|
192
|
+
P(a(it), { size: 10 })
|
|
193
|
+
], 8, Ao)) : S("", !0)
|
|
192
194
|
], 4))), 128)),
|
|
193
|
-
|
|
195
|
+
i.value > 0 ? (t(), x(he, {
|
|
194
196
|
key: 0,
|
|
195
197
|
content: p.value
|
|
196
198
|
}, {
|
|
197
199
|
default: w(() => [
|
|
198
|
-
m("span",
|
|
200
|
+
m("span", Lo, "+" + k(i.value), 1)
|
|
199
201
|
]),
|
|
200
202
|
_: 1
|
|
201
203
|
}, 8, ["content"])) : S("", !0)
|
|
202
204
|
]));
|
|
203
205
|
}
|
|
204
|
-
}), xe = /* @__PURE__ */
|
|
205
|
-
function
|
|
206
|
-
const o =
|
|
207
|
-
let
|
|
206
|
+
}), xe = /* @__PURE__ */ Z(Oo, [["__scopeId", "data-v-33f4fffc"]]);
|
|
207
|
+
function Be(e, n) {
|
|
208
|
+
const o = U([]), l = U(!1), r = U(!0), i = U(null), p = `${n}-${eo()?.uid ?? Math.random().toString(36).slice(2)}`, v = `${n} ${p}`;
|
|
209
|
+
let g = 1, u = "", b, _ = null, y = 0, R = null;
|
|
208
210
|
const E = (q) => new Promise((de) => setTimeout(de, q)), $ = () => {
|
|
209
211
|
y++, l.value = !1, _ && (clearTimeout(_), _ = null);
|
|
210
|
-
},
|
|
212
|
+
}, I = async (q, de, ce) => {
|
|
211
213
|
const H = e();
|
|
212
214
|
if (!H) return;
|
|
213
215
|
const te = ++y;
|
|
214
|
-
l.value = !0,
|
|
216
|
+
l.value = !0, i.value = null;
|
|
215
217
|
try {
|
|
216
|
-
const
|
|
218
|
+
const N = await H(de, q);
|
|
217
219
|
if (te !== y || e() !== H) return;
|
|
218
|
-
|
|
219
|
-
} catch (
|
|
220
|
-
te === y && e() === H && (
|
|
220
|
+
g = q, u = de, b = H, o.value = z(ce ? o.value : [], N.items), r.value = N.hasMore, R = null;
|
|
221
|
+
} catch (N) {
|
|
222
|
+
te === y && e() === H && (i.value = N, R = { target: q, keyword: de, append: ce }, console.error("选择器远程选项加载失败:", N));
|
|
221
223
|
} finally {
|
|
222
224
|
te === y && (l.value = !1);
|
|
223
225
|
}
|
|
224
|
-
},
|
|
226
|
+
}, z = (q, de) => {
|
|
225
227
|
const ce = new Set(q.map((te) => te.id)), H = [...q];
|
|
226
228
|
for (const te of de)
|
|
227
229
|
ce.has(te.id) || (ce.add(te.id), H.push(te));
|
|
228
230
|
return H;
|
|
229
231
|
}, j = (q) => {
|
|
230
|
-
$(),
|
|
231
|
-
_ = null,
|
|
232
|
+
$(), i.value = null, _ = setTimeout(() => {
|
|
233
|
+
_ = null, I(1, q.trim(), !1);
|
|
232
234
|
}, 300);
|
|
233
235
|
}, X = () => {
|
|
234
236
|
const q = e();
|
|
235
|
-
l.value || !q || (b !== q || o.value.length === 0 || u !== "") &&
|
|
237
|
+
l.value || !q || (b !== q || o.value.length === 0 || u !== "") && I(1, "", !1);
|
|
236
238
|
}, ie = () => {
|
|
237
239
|
if (!R || l.value) return;
|
|
238
240
|
const { target: q, keyword: de, append: ce } = R;
|
|
239
|
-
|
|
241
|
+
I(q, de, ce);
|
|
240
242
|
}, ee = () => {
|
|
241
243
|
const q = e();
|
|
242
244
|
if (!(l.value || !q)) {
|
|
243
245
|
if (b !== q) return void X();
|
|
244
|
-
r.value &&
|
|
246
|
+
r.value && I(g + 1, u, !0);
|
|
245
247
|
}
|
|
246
248
|
};
|
|
247
249
|
let d = null, T = null;
|
|
248
|
-
const
|
|
250
|
+
const M = () => {
|
|
249
251
|
const q = document.querySelector(`.${p}`);
|
|
250
252
|
return q?.querySelector(".el-select-dropdown__wrap") || q?.querySelector(".el-scrollbar__wrap");
|
|
251
253
|
}, se = () => {
|
|
@@ -253,7 +255,7 @@ function Me(e, i) {
|
|
|
253
255
|
}, ne = async () => {
|
|
254
256
|
await ke();
|
|
255
257
|
let q = null;
|
|
256
|
-
for (let de = 0; de < 6 && (q =
|
|
258
|
+
for (let de = 0; de < 6 && (q = M(), !q); de++)
|
|
257
259
|
await E(50);
|
|
258
260
|
!q || q === d || (se(), d = q, T = () => {
|
|
259
261
|
d && d.scrollTop + d.clientHeight >= d.scrollHeight - 16 && ee();
|
|
@@ -265,30 +267,30 @@ function Me(e, i) {
|
|
|
265
267
|
}
|
|
266
268
|
X(), ne();
|
|
267
269
|
};
|
|
268
|
-
return
|
|
270
|
+
return lt(() => {
|
|
269
271
|
$(), se();
|
|
270
|
-
}), { items: o, loading: l, hasMore: r, error:
|
|
272
|
+
}), { items: o, loading: l, hasMore: r, error: i, search: j, retry: ie, ensureFirstPage: X, loadMore: ee, onVisibleChange: ye, popperClass: v };
|
|
271
273
|
}
|
|
272
|
-
function
|
|
273
|
-
const l =
|
|
274
|
-
const u = new Map([...l.value, ...o(), ...
|
|
275
|
-
return l.value = r(
|
|
274
|
+
function Me(e, n, o) {
|
|
275
|
+
const l = to([]), r = (g) => Array.isArray(g) ? g : g == null ? [] : [g], i = (g) => {
|
|
276
|
+
const u = new Map([...l.value, ...o(), ...n()].map((b) => [b.id, b]));
|
|
277
|
+
return l.value = r(g).map((b) => u.get(b)).filter((b) => b !== void 0), l.value;
|
|
276
278
|
};
|
|
277
|
-
we(() => [e(),
|
|
279
|
+
we(() => [e(), n(), o()], () => i(e()), { immediate: !0, deep: !0, flush: "sync" });
|
|
278
280
|
const p = V(() => {
|
|
279
|
-
const
|
|
280
|
-
return [...l.value.filter((u) => !
|
|
281
|
-
}), v = V(() => r(e()).map((
|
|
282
|
-
return { mergedOptions: p, selectedOptions: v, remember:
|
|
281
|
+
const g = n();
|
|
282
|
+
return [...l.value.filter((u) => !g.some((b) => b.id === u.id)), ...g];
|
|
283
|
+
}), v = V(() => r(e()).map((g) => l.value.find((u) => u.id === g)).filter((g) => g !== void 0));
|
|
284
|
+
return { mergedOptions: p, selectedOptions: v, remember: i };
|
|
283
285
|
}
|
|
284
|
-
const
|
|
286
|
+
const Uo = { class: "emoo-asel__opt" }, Ho = { class: "emoo-asel__avatar" }, Ko = ["src"], Wo = { class: "emoo-asel__name" }, No = {
|
|
285
287
|
key: 0,
|
|
286
288
|
class: "emoo-asel__sub"
|
|
287
|
-
},
|
|
289
|
+
}, Fo = {
|
|
288
290
|
class: "emoo-sel-remote-error",
|
|
289
291
|
role: "alert",
|
|
290
292
|
"data-testid": "remote-error"
|
|
291
|
-
},
|
|
293
|
+
}, qo = /* @__PURE__ */ F({
|
|
292
294
|
__name: "EmooAgentSelect",
|
|
293
295
|
props: {
|
|
294
296
|
modelValue: {},
|
|
@@ -301,22 +303,22 @@ const Ao = { class: "emoo-asel__opt" }, Lo = { class: "emoo-asel__avatar" }, Oo
|
|
|
301
303
|
collapse: { default: 2 }
|
|
302
304
|
},
|
|
303
305
|
emits: ["update:modelValue"],
|
|
304
|
-
setup(e, { emit:
|
|
305
|
-
const o = e, l =
|
|
306
|
+
setup(e, { emit: n }) {
|
|
307
|
+
const o = e, l = n, { t: r } = me(), i = V(() => o.source !== void 0), { items: p, loading: v, error: g, retry: u, search: b, ensureFirstPage: _, onVisibleChange: y, popperClass: R } = Be(() => o.source, "emoo-asel-popper"), { mergedOptions: E, selectedOptions: $, remember: I } = Me(
|
|
306
308
|
() => o.modelValue,
|
|
307
|
-
() =>
|
|
309
|
+
() => i.value ? p.value : o.options ?? [],
|
|
308
310
|
() => o.selected ?? []
|
|
309
|
-
),
|
|
310
|
-
|
|
311
|
-
const d = o.modelValue, T = Array.isArray(d) ? d.length > 0 : d != null,
|
|
312
|
-
|
|
311
|
+
), z = (d) => E.value.find((T) => T.id === d), j = Pe(), X = V(() => j.disabled !== void 0 && j.disabled !== !1);
|
|
312
|
+
Je(() => {
|
|
313
|
+
const d = o.modelValue, T = Array.isArray(d) ? d.length > 0 : d != null, M = Array.isArray(d) ? d : [d];
|
|
314
|
+
i.value && T && M.some((se) => se !== null && !z(se)) && _();
|
|
313
315
|
});
|
|
314
316
|
const ie = (d) => {
|
|
315
|
-
|
|
317
|
+
I(d), l("update:modelValue", d);
|
|
316
318
|
}, ee = (d) => {
|
|
317
319
|
if (X.value) return;
|
|
318
320
|
const T = $.value[d]?.id;
|
|
319
|
-
T !== void 0 && ie(o.modelValue.filter((
|
|
321
|
+
T !== void 0 && ie(o.modelValue.filter((M) => M !== T));
|
|
320
322
|
};
|
|
321
323
|
return (d, T) => (t(), x(a(Ae), {
|
|
322
324
|
class: "emoo-asel",
|
|
@@ -326,7 +328,7 @@ const Ao = { class: "emoo-asel__opt" }, Lo = { class: "emoo-asel__avatar" }, Oo
|
|
|
326
328
|
clearable: !e.multiple && e.clearable,
|
|
327
329
|
filterable: "",
|
|
328
330
|
"fit-input-width": "",
|
|
329
|
-
remote:
|
|
331
|
+
remote: i.value,
|
|
330
332
|
"remote-method": a(b),
|
|
331
333
|
loading: a(v),
|
|
332
334
|
"popper-class": a(R),
|
|
@@ -334,25 +336,25 @@ const Ao = { class: "emoo-asel__opt" }, Lo = { class: "emoo-asel__avatar" }, Oo
|
|
|
334
336
|
onVisibleChange: a(y)
|
|
335
337
|
}, Se({
|
|
336
338
|
default: w(() => [
|
|
337
|
-
(t(!0), s(D, null, J(a(E), (
|
|
338
|
-
key:
|
|
339
|
-
label:
|
|
340
|
-
value:
|
|
339
|
+
(t(!0), s(D, null, J(a(E), (M) => (t(), x(a(ze), {
|
|
340
|
+
key: M.id,
|
|
341
|
+
label: M.name,
|
|
342
|
+
value: M.id
|
|
341
343
|
}, {
|
|
342
344
|
default: w(() => [
|
|
343
|
-
m("span",
|
|
344
|
-
m("span",
|
|
345
|
-
|
|
345
|
+
m("span", Uo, [
|
|
346
|
+
m("span", Ho, [
|
|
347
|
+
M.avatar ? (t(), s("img", {
|
|
346
348
|
key: 0,
|
|
347
|
-
src:
|
|
349
|
+
src: M.avatar,
|
|
348
350
|
alt: "",
|
|
349
351
|
class: "emoo-asel__img"
|
|
350
|
-
}, null, 8,
|
|
351
|
-
|
|
352
|
+
}, null, 8, Ko)) : (t(), s(D, { key: 1 }, [
|
|
353
|
+
Y(k(M.name[0]), 1)
|
|
352
354
|
], 64))
|
|
353
355
|
]),
|
|
354
|
-
m("span",
|
|
355
|
-
|
|
356
|
+
m("span", Wo, k(M.name), 1),
|
|
357
|
+
M.sub ? (t(), s("span", No, k(M.sub), 1)) : S("", !0)
|
|
356
358
|
])
|
|
357
359
|
]),
|
|
358
360
|
_: 2
|
|
@@ -374,37 +376,37 @@ const Ao = { class: "emoo-asel__opt" }, Lo = { class: "emoo-asel__avatar" }, Oo
|
|
|
374
376
|
key: "1"
|
|
375
377
|
} : {
|
|
376
378
|
name: "label",
|
|
377
|
-
fn: w(({ value:
|
|
378
|
-
|
|
379
|
+
fn: w(({ value: M }) => [
|
|
380
|
+
z(M) ? (t(), x(xe, {
|
|
379
381
|
key: 0,
|
|
380
382
|
square: "",
|
|
381
|
-
items: [
|
|
383
|
+
items: [z(M)]
|
|
382
384
|
}, null, 8, ["items"])) : S("", !0)
|
|
383
385
|
]),
|
|
384
386
|
key: "0"
|
|
385
387
|
},
|
|
386
|
-
a(
|
|
388
|
+
a(g) ? {
|
|
387
389
|
name: "footer",
|
|
388
390
|
fn: w(() => [
|
|
389
|
-
m("div",
|
|
390
|
-
m("span", null,
|
|
391
|
+
m("div", Fo, [
|
|
392
|
+
m("span", null, k(a(r)("common.emooSelect.loadFailed")), 1),
|
|
391
393
|
m("button", {
|
|
392
394
|
type: "button",
|
|
393
395
|
"data-testid": "remote-retry",
|
|
394
396
|
onClick: T[0] || (T[0] = //@ts-ignore
|
|
395
|
-
(...
|
|
396
|
-
},
|
|
397
|
+
(...M) => a(u) && a(u)(...M))
|
|
398
|
+
}, k(a(r)("common.emooSelect.retry")), 1)
|
|
397
399
|
])
|
|
398
400
|
]),
|
|
399
401
|
key: "2"
|
|
400
402
|
} : void 0
|
|
401
403
|
]), 1032, ["model-value", "multiple", "placeholder", "clearable", "remote", "remote-method", "loading", "popper-class", "onVisibleChange"]));
|
|
402
404
|
}
|
|
403
|
-
}),
|
|
405
|
+
}), Vn = /* @__PURE__ */ Z(qo, [["__scopeId", "data-v-465d3a49"]]), jo = ["type", "disabled", "aria-busy"], Go = {
|
|
404
406
|
key: 0,
|
|
405
407
|
class: "emoo-button__icon",
|
|
406
408
|
"aria-hidden": "true"
|
|
407
|
-
},
|
|
409
|
+
}, Xo = /* @__PURE__ */ F({
|
|
408
410
|
__name: "EmooButton",
|
|
409
411
|
props: {
|
|
410
412
|
variant: { default: "secondary" },
|
|
@@ -416,7 +418,7 @@ const Ao = { class: "emoo-asel__opt" }, Lo = { class: "emoo-asel__avatar" }, Oo
|
|
|
416
418
|
circle: { type: Boolean, default: !1 }
|
|
417
419
|
},
|
|
418
420
|
setup(e) {
|
|
419
|
-
return (
|
|
421
|
+
return (n, o) => (t(), s("button", {
|
|
420
422
|
class: W(["emoo-button", [
|
|
421
423
|
`emoo-button--${e.variant}`,
|
|
422
424
|
`emoo-button--${e.size}`,
|
|
@@ -426,80 +428,80 @@ const Ao = { class: "emoo-asel__opt" }, Lo = { class: "emoo-asel__avatar" }, Oo
|
|
|
426
428
|
disabled: e.disabled || e.loading,
|
|
427
429
|
"aria-busy": e.loading || void 0
|
|
428
430
|
}, [
|
|
429
|
-
e.loading ||
|
|
430
|
-
e.loading ? (t(), x(a(
|
|
431
|
+
e.loading || n.$slots.icon ? (t(), s("span", Go, [
|
|
432
|
+
e.loading ? (t(), x(a(mo), {
|
|
431
433
|
key: 0,
|
|
432
434
|
class: "emoo-button__spinner"
|
|
433
|
-
})) :
|
|
435
|
+
})) : A(n.$slots, "icon", {}, void 0, !0, 1)
|
|
434
436
|
])) : S("", !0),
|
|
435
|
-
|
|
436
|
-
], 10,
|
|
437
|
+
A(n.$slots, "default", {}, void 0, !0)
|
|
438
|
+
], 10, jo));
|
|
437
439
|
}
|
|
438
|
-
}), De = /* @__PURE__ */
|
|
440
|
+
}), De = /* @__PURE__ */ Z(Xo, [["__scopeId", "data-v-6415e495"]]), Jo = { class: "emoo-card" }, Yo = {
|
|
439
441
|
key: 0,
|
|
440
442
|
class: "emoo-card__header"
|
|
441
|
-
},
|
|
443
|
+
}, Zo = {
|
|
442
444
|
key: 1,
|
|
443
445
|
class: "emoo-card__footer"
|
|
444
|
-
},
|
|
446
|
+
}, Qo = /* @__PURE__ */ F({
|
|
445
447
|
__name: "EmooCard",
|
|
446
448
|
props: {
|
|
447
449
|
flush: { type: Boolean, default: !1 }
|
|
448
450
|
},
|
|
449
451
|
setup(e) {
|
|
450
|
-
return (
|
|
451
|
-
|
|
452
|
-
|
|
452
|
+
return (n, o) => (t(), s("div", Jo, [
|
|
453
|
+
n.$slots.header ? (t(), s("div", Yo, [
|
|
454
|
+
A(n.$slots, "header", {}, void 0, !0)
|
|
453
455
|
])) : S("", !0),
|
|
454
456
|
m("div", {
|
|
455
457
|
class: W(["emoo-card__body", { "emoo-card__body--flush": e.flush }])
|
|
456
458
|
}, [
|
|
457
|
-
|
|
459
|
+
A(n.$slots, "default", {}, void 0, !0)
|
|
458
460
|
], 2),
|
|
459
|
-
|
|
460
|
-
|
|
461
|
+
n.$slots.footer ? (t(), s("div", Zo, [
|
|
462
|
+
A(n.$slots, "footer", {}, void 0, !0)
|
|
461
463
|
])) : S("", !0)
|
|
462
464
|
]));
|
|
463
465
|
}
|
|
464
|
-
}),
|
|
466
|
+
}), Bn = /* @__PURE__ */ Z(Qo, [["__scopeId", "data-v-4fffe6bc"]]), ea = ["data-testid"], ta = {
|
|
465
467
|
key: 0,
|
|
466
468
|
class: "emoo-chips__more",
|
|
467
469
|
"data-testid": "emoo-chips-more"
|
|
468
|
-
},
|
|
469
|
-
...
|
|
470
|
+
}, oa = { name: "EmooChips" }, aa = /* @__PURE__ */ F({
|
|
471
|
+
...oa,
|
|
470
472
|
props: {
|
|
471
473
|
items: {},
|
|
472
474
|
labelOf: {},
|
|
473
475
|
gap: { default: 10 }
|
|
474
476
|
},
|
|
475
477
|
setup(e) {
|
|
476
|
-
const
|
|
478
|
+
const n = e, o = U(), l = U([]), r = U(n.items.length), i = U(0), p = V(() => n.items.map(n.labelOf).join("、")), v = 40, g = () => {
|
|
477
479
|
const _ = l.value, y = o.value?.clientWidth ?? 0;
|
|
478
480
|
if (!_.length || y <= 0) {
|
|
479
|
-
r.value =
|
|
481
|
+
r.value = n.items.length, i.value = 0;
|
|
480
482
|
return;
|
|
481
483
|
}
|
|
482
|
-
const R = _.map((
|
|
483
|
-
if (R.reduce((
|
|
484
|
-
r.value = _.length,
|
|
484
|
+
const R = _.map((z) => z.offsetWidth);
|
|
485
|
+
if (R.reduce((z, j) => z + j, 0) + n.gap * (_.length - 1) <= y) {
|
|
486
|
+
r.value = _.length, i.value = 0;
|
|
485
487
|
return;
|
|
486
488
|
}
|
|
487
|
-
let $ = 0,
|
|
488
|
-
for (const
|
|
489
|
-
const j =
|
|
489
|
+
let $ = 0, I = 0;
|
|
490
|
+
for (const z of R) {
|
|
491
|
+
const j = I === 0 ? z : $ + n.gap + z;
|
|
490
492
|
if (j > y - v) break;
|
|
491
|
-
$ = j,
|
|
493
|
+
$ = j, I++;
|
|
492
494
|
}
|
|
493
|
-
r.value = Math.max(1,
|
|
495
|
+
r.value = Math.max(1, I), i.value = _.length - r.value;
|
|
494
496
|
}, u = () => {
|
|
495
|
-
r.value =
|
|
497
|
+
r.value = n.items.length, ke(g);
|
|
496
498
|
};
|
|
497
499
|
let b = null;
|
|
498
|
-
return
|
|
499
|
-
ke(
|
|
500
|
-
}),
|
|
500
|
+
return Je(() => {
|
|
501
|
+
ke(g), setTimeout(u, 400), o.value && (b = new ResizeObserver(u), b.observe(o.value));
|
|
502
|
+
}), lt(() => b?.disconnect()), we(() => n.items, u), (_, y) => (t(), x(he, {
|
|
501
503
|
content: p.value,
|
|
502
|
-
disabled:
|
|
504
|
+
disabled: i.value === 0
|
|
503
505
|
}, {
|
|
504
506
|
default: w(() => [
|
|
505
507
|
m("div", {
|
|
@@ -508,7 +510,7 @@ const Ao = { class: "emoo-asel__opt" }, Lo = { class: "emoo-asel__avatar" }, Oo
|
|
|
508
510
|
class: "emoo-chips",
|
|
509
511
|
style: pe({ gap: `${e.gap}px` })
|
|
510
512
|
}, [
|
|
511
|
-
(t(!0), s(D, null, J(e.items, (R, E) =>
|
|
513
|
+
(t(!0), s(D, null, J(e.items, (R, E) => Ne((t(), s("span", {
|
|
512
514
|
key: E,
|
|
513
515
|
ref_for: !0,
|
|
514
516
|
ref_key: "chipRefs",
|
|
@@ -516,20 +518,20 @@ const Ao = { class: "emoo-asel__opt" }, Lo = { class: "emoo-asel__avatar" }, Oo
|
|
|
516
518
|
class: "emoo-chips__chip",
|
|
517
519
|
"data-testid": `emoo-chips-chip-${E}`
|
|
518
520
|
}, [
|
|
519
|
-
|
|
521
|
+
A(_.$slots, "default", {
|
|
520
522
|
item: R,
|
|
521
523
|
index: E
|
|
522
524
|
}, void 0, !0)
|
|
523
|
-
], 8,
|
|
524
|
-
[
|
|
525
|
+
], 8, ea)), [
|
|
526
|
+
[tt, E < r.value]
|
|
525
527
|
])), 128)),
|
|
526
|
-
|
|
528
|
+
i.value > 0 ? (t(), s("span", ta, "+" + k(i.value), 1)) : S("", !0)
|
|
527
529
|
], 4)
|
|
528
530
|
]),
|
|
529
531
|
_: 3
|
|
530
532
|
}, 8, ["content", "disabled"]));
|
|
531
533
|
}
|
|
532
|
-
}),
|
|
534
|
+
}), Mn = /* @__PURE__ */ Z(aa, [["__scopeId", "data-v-1c5db445"]]), la = /* @__PURE__ */ F({
|
|
533
535
|
__name: "EmooChoice",
|
|
534
536
|
props: {
|
|
535
537
|
options: {},
|
|
@@ -542,13 +544,13 @@ const Ao = { class: "emoo-asel__opt" }, Lo = { class: "emoo-asel__avatar" }, Oo
|
|
|
542
544
|
testid: {}
|
|
543
545
|
},
|
|
544
546
|
emits: ["update:modelValue"],
|
|
545
|
-
setup(e, { emit:
|
|
546
|
-
const o = e, l =
|
|
547
|
+
setup(e, { emit: n }) {
|
|
548
|
+
const o = e, l = n, r = Pe(), i = V(() => Array.isArray(o.modelValue) ? o.modelValue.length > 0 : o.modelValue !== void 0 && o.modelValue !== null), p = (b) => {
|
|
547
549
|
!b.currentTarget.contains(b.relatedTarget) && typeof r.onBlur == "function" && r.onBlur(b);
|
|
548
550
|
}, v = () => {
|
|
549
551
|
const b = o.multiple ? [] : void 0;
|
|
550
552
|
l("update:modelValue", b), typeof r.onChange == "function" && r.onChange(b), typeof r.onClear == "function" && r.onClear();
|
|
551
|
-
},
|
|
553
|
+
}, g = (b, _) => {
|
|
552
554
|
!o.clearable || o.disabled || b.disabled || o.modelValue !== b.value || (_.preventDefault(), _.stopPropagation(), v());
|
|
553
555
|
}, u = (b) => {
|
|
554
556
|
o.multiple && Array.isArray(b) ? l("update:modelValue", b.filter(
|
|
@@ -572,7 +574,7 @@ const Ao = { class: "emoo-asel__opt" }, Lo = { class: "emoo-asel__avatar" }, Oo
|
|
|
572
574
|
"onUpdate:modelValue": u
|
|
573
575
|
}, Se({
|
|
574
576
|
default: w(() => [
|
|
575
|
-
(t(!0), s(D, null, J(e.options, (y) => (t(), x(a(
|
|
577
|
+
(t(!0), s(D, null, J(e.options, (y) => (t(), x(a(ze), {
|
|
576
578
|
key: `${typeof y.value}:${y.value}`,
|
|
577
579
|
value: y.value,
|
|
578
580
|
label: y.label,
|
|
@@ -580,8 +582,8 @@ const Ao = { class: "emoo-asel__opt" }, Lo = { class: "emoo-asel__avatar" }, Oo
|
|
|
580
582
|
"data-testid": e.testid ? `${e.testid}-${String(y.value)}` : void 0
|
|
581
583
|
}, {
|
|
582
584
|
default: w(() => [
|
|
583
|
-
|
|
584
|
-
|
|
585
|
+
A(b.$slots, "option", { option: y }, () => [
|
|
586
|
+
Y(k(y.label), 1)
|
|
585
587
|
], !0)
|
|
586
588
|
]),
|
|
587
589
|
_: 2
|
|
@@ -592,25 +594,25 @@ const Ao = { class: "emoo-asel__opt" }, Lo = { class: "emoo-asel__avatar" }, Oo
|
|
|
592
594
|
b.$slots.label ? {
|
|
593
595
|
name: "label",
|
|
594
596
|
fn: w((y) => [
|
|
595
|
-
|
|
597
|
+
A(b.$slots, "label", Fe(qe(y)), void 0, !0)
|
|
596
598
|
]),
|
|
597
599
|
key: "0"
|
|
598
600
|
} : void 0,
|
|
599
601
|
b.$slots.prefix ? {
|
|
600
602
|
name: "prefix",
|
|
601
603
|
fn: w(() => [
|
|
602
|
-
|
|
604
|
+
A(b.$slots, "prefix", {}, void 0, !0)
|
|
603
605
|
]),
|
|
604
606
|
key: "1"
|
|
605
607
|
} : void 0,
|
|
606
608
|
b.$slots.tag ? {
|
|
607
609
|
name: "tag",
|
|
608
610
|
fn: w((y) => [
|
|
609
|
-
|
|
611
|
+
A(b.$slots, "tag", Fe(qe(y)), void 0, !0)
|
|
610
612
|
]),
|
|
611
613
|
key: "2"
|
|
612
614
|
} : void 0
|
|
613
|
-
]), 1032, ["model-value", "multiple", "disabled", "clearable", "placeholder", "aria-label"])) : e.multiple ? (t(), x(a(
|
|
615
|
+
]), 1032, ["model-value", "multiple", "disabled", "clearable", "placeholder", "aria-label"])) : e.multiple ? (t(), x(a(xt), {
|
|
614
616
|
key: 1,
|
|
615
617
|
class: "emoo-choice emoo-choice--inline",
|
|
616
618
|
"model-value": Array.isArray(e.modelValue) ? e.modelValue : [],
|
|
@@ -620,20 +622,20 @@ const Ao = { class: "emoo-asel__opt" }, Lo = { class: "emoo-asel__avatar" }, Oo
|
|
|
620
622
|
onFocusout: p
|
|
621
623
|
}, {
|
|
622
624
|
default: w(() => [
|
|
623
|
-
(t(!0), s(D, null, J(e.options, (y) => (t(), x(a(
|
|
625
|
+
(t(!0), s(D, null, J(e.options, (y) => (t(), x(a(st), {
|
|
624
626
|
key: `${typeof y.value}:${y.value}`,
|
|
625
627
|
value: y.value,
|
|
626
628
|
disabled: y.disabled,
|
|
627
629
|
"data-testid": e.testid ? `${e.testid}-${String(y.value)}` : void 0
|
|
628
630
|
}, {
|
|
629
631
|
default: w(() => [
|
|
630
|
-
|
|
631
|
-
|
|
632
|
+
A(b.$slots, "option", { option: y }, () => [
|
|
633
|
+
Y(k(y.label), 1)
|
|
632
634
|
], !0)
|
|
633
635
|
]),
|
|
634
636
|
_: 2
|
|
635
637
|
}, 1032, ["value", "disabled", "data-testid"]))), 128)),
|
|
636
|
-
e.clearable &&
|
|
638
|
+
e.clearable && i.value ? (t(), x(De, {
|
|
637
639
|
key: 0,
|
|
638
640
|
variant: "text",
|
|
639
641
|
size: "small",
|
|
@@ -643,13 +645,13 @@ const Ao = { class: "emoo-asel__opt" }, Lo = { class: "emoo-asel__avatar" }, Oo
|
|
|
643
645
|
onClick: le(v, ["stop"])
|
|
644
646
|
}, {
|
|
645
647
|
default: w(() => [
|
|
646
|
-
P(a(
|
|
648
|
+
P(a(it), { size: 12 })
|
|
647
649
|
]),
|
|
648
650
|
_: 1
|
|
649
651
|
}, 8, ["disabled", "aria-label"])) : S("", !0)
|
|
650
652
|
]),
|
|
651
653
|
_: 3
|
|
652
|
-
}, 8, ["model-value", "disabled", "aria-label"])) : (t(), x(a(
|
|
654
|
+
}, 8, ["model-value", "disabled", "aria-label"])) : (t(), x(a(It), {
|
|
653
655
|
key: 2,
|
|
654
656
|
class: "emoo-choice emoo-choice--inline",
|
|
655
657
|
"model-value": Array.isArray(e.modelValue) ? void 0 : e.modelValue ?? void 0,
|
|
@@ -664,11 +666,11 @@ const Ao = { class: "emoo-asel__opt" }, Lo = { class: "emoo-asel__avatar" }, Oo
|
|
|
664
666
|
value: y.value,
|
|
665
667
|
disabled: y.disabled,
|
|
666
668
|
"data-testid": e.testid ? `${e.testid}-${String(y.value)}` : void 0,
|
|
667
|
-
onClickCapture: (R) =>
|
|
669
|
+
onClickCapture: (R) => g(y, R)
|
|
668
670
|
}, {
|
|
669
671
|
default: w(() => [
|
|
670
|
-
|
|
671
|
-
|
|
672
|
+
A(b.$slots, "option", { option: y }, () => [
|
|
673
|
+
Y(k(y.label), 1)
|
|
672
674
|
], !0)
|
|
673
675
|
]),
|
|
674
676
|
_: 2
|
|
@@ -677,7 +679,7 @@ const Ao = { class: "emoo-asel__opt" }, Lo = { class: "emoo-asel__avatar" }, Oo
|
|
|
677
679
|
_: 3
|
|
678
680
|
}, 8, ["model-value", "disabled", "aria-label"]));
|
|
679
681
|
}
|
|
680
|
-
}),
|
|
682
|
+
}), sa = /* @__PURE__ */ Z(la, [["__scopeId", "data-v-d18fb571"]]), na = { class: "emt-colmenu__list" }, ia = ["data-testid"], ra = ["data-testid"], da = ["data-testid"], ua = ["data-testid"], ca = ["data-testid"], ma = ["disabled", "data-testid"], va = { class: "emt-colmenu__section" }, fa = ["data-testid", "onClick"], ha = /* @__PURE__ */ F({
|
|
681
683
|
__name: "EmooColumnMenu",
|
|
682
684
|
props: {
|
|
683
685
|
colKey: {},
|
|
@@ -690,43 +692,43 @@ const Ao = { class: "emoo-asel__opt" }, Lo = { class: "emoo-asel__avatar" }, Oo
|
|
|
690
692
|
resettable: { type: Boolean, default: !1 }
|
|
691
693
|
},
|
|
692
694
|
emits: ["sort", "unpin", "pin", "hide", "restore", "reset"],
|
|
693
|
-
setup(e, { emit:
|
|
694
|
-
const o =
|
|
695
|
-
return (r,
|
|
695
|
+
setup(e, { emit: n }) {
|
|
696
|
+
const o = n, { t: l } = me();
|
|
697
|
+
return (r, i) => (t(), x(a(nt), {
|
|
696
698
|
trigger: "click",
|
|
697
699
|
placement: "bottom-end",
|
|
698
700
|
"popper-class": "emt-colmenu"
|
|
699
701
|
}, {
|
|
700
702
|
dropdown: w(() => [
|
|
701
|
-
m("div",
|
|
703
|
+
m("div", na, [
|
|
702
704
|
e.sortable ? (t(), s(D, { key: 0 }, [
|
|
703
705
|
m("button", {
|
|
704
706
|
class: W(["emt-colmenu__item", { "is-on": e.sorted === "ascending" }]),
|
|
705
707
|
type: "button",
|
|
706
708
|
"data-testid": `emcm-sort-asc-${e.colKey}`,
|
|
707
|
-
onClick:
|
|
709
|
+
onClick: i[0] || (i[0] = (p) => o("sort", "ascending"))
|
|
708
710
|
}, [
|
|
709
|
-
P(a(
|
|
711
|
+
P(a(Rt), {
|
|
710
712
|
size: 13,
|
|
711
713
|
weight: "bold",
|
|
712
714
|
"aria-hidden": "true"
|
|
713
715
|
}),
|
|
714
|
-
|
|
715
|
-
], 10,
|
|
716
|
+
Y(k(a(l)("common.emooTable.sortAsc")), 1)
|
|
717
|
+
], 10, ia),
|
|
716
718
|
m("button", {
|
|
717
719
|
class: W(["emt-colmenu__item", { "is-on": e.sorted === "descending" }]),
|
|
718
720
|
type: "button",
|
|
719
721
|
"data-testid": `emcm-sort-desc-${e.colKey}`,
|
|
720
|
-
onClick:
|
|
722
|
+
onClick: i[1] || (i[1] = (p) => o("sort", "descending"))
|
|
721
723
|
}, [
|
|
722
|
-
P(a(
|
|
724
|
+
P(a(rt), {
|
|
723
725
|
size: 13,
|
|
724
726
|
weight: "bold",
|
|
725
727
|
"aria-hidden": "true"
|
|
726
728
|
}),
|
|
727
|
-
|
|
728
|
-
], 10,
|
|
729
|
-
|
|
729
|
+
Y(k(a(l)("common.emooTable.sortDesc")), 1)
|
|
730
|
+
], 10, ra),
|
|
731
|
+
i[7] || (i[7] = m("div", { class: "emt-colmenu__divider" }, null, -1))
|
|
730
732
|
], 64)) : S("", !0),
|
|
731
733
|
e.pinsEnabled ? (t(), s(D, { key: 1 }, [
|
|
732
734
|
e.fixed ? (t(), s("button", {
|
|
@@ -734,58 +736,58 @@ const Ao = { class: "emoo-asel__opt" }, Lo = { class: "emoo-asel__avatar" }, Oo
|
|
|
734
736
|
class: "emt-colmenu__item",
|
|
735
737
|
type: "button",
|
|
736
738
|
"data-testid": `emcm-unpin-${e.colKey}`,
|
|
737
|
-
onClick:
|
|
739
|
+
onClick: i[2] || (i[2] = (p) => o("unpin"))
|
|
738
740
|
}, [
|
|
739
|
-
P(a(
|
|
741
|
+
P(a(vo), {
|
|
740
742
|
size: 14,
|
|
741
743
|
"aria-hidden": "true"
|
|
742
744
|
}),
|
|
743
|
-
|
|
744
|
-
], 8,
|
|
745
|
+
Y(k(a(l)("common.emooTable.unpin")), 1)
|
|
746
|
+
], 8, da)) : (t(), s(D, { key: 1 }, [
|
|
745
747
|
m("button", {
|
|
746
748
|
class: "emt-colmenu__item",
|
|
747
749
|
type: "button",
|
|
748
750
|
"data-testid": `emcm-pin-left-${e.colKey}`,
|
|
749
|
-
onClick:
|
|
751
|
+
onClick: i[3] || (i[3] = (p) => o("pin", "left"))
|
|
750
752
|
}, [
|
|
751
|
-
P(a(
|
|
753
|
+
P(a(fo), {
|
|
752
754
|
size: 14,
|
|
753
755
|
"aria-hidden": "true"
|
|
754
756
|
}),
|
|
755
|
-
|
|
756
|
-
], 8,
|
|
757
|
+
Y(k(a(l)("common.emooTable.pinLeftThrough")), 1)
|
|
758
|
+
], 8, ua),
|
|
757
759
|
m("button", {
|
|
758
760
|
class: "emt-colmenu__item",
|
|
759
761
|
type: "button",
|
|
760
762
|
"data-testid": `emcm-pin-right-${e.colKey}`,
|
|
761
|
-
onClick:
|
|
763
|
+
onClick: i[4] || (i[4] = (p) => o("pin", "right"))
|
|
762
764
|
}, [
|
|
763
|
-
P(a(
|
|
765
|
+
P(a(ho), {
|
|
764
766
|
size: 14,
|
|
765
767
|
"aria-hidden": "true"
|
|
766
768
|
}),
|
|
767
|
-
|
|
768
|
-
], 8,
|
|
769
|
+
Y(k(a(l)("common.emooTable.pinRightFrom")), 1)
|
|
770
|
+
], 8, ca)
|
|
769
771
|
], 64)),
|
|
770
|
-
|
|
772
|
+
i[8] || (i[8] = m("div", { class: "emt-colmenu__divider" }, null, -1))
|
|
771
773
|
], 64)) : S("", !0),
|
|
772
|
-
|
|
774
|
+
A(r.$slots, "extra"),
|
|
773
775
|
m("button", {
|
|
774
776
|
class: "emt-colmenu__item",
|
|
775
777
|
type: "button",
|
|
776
778
|
disabled: !e.canHide,
|
|
777
779
|
"data-testid": `emcm-hide-${e.colKey}`,
|
|
778
|
-
onClick:
|
|
780
|
+
onClick: i[5] || (i[5] = (p) => o("hide"))
|
|
779
781
|
}, [
|
|
780
|
-
P(a(
|
|
782
|
+
P(a(Vt), {
|
|
781
783
|
size: 14,
|
|
782
784
|
"aria-hidden": "true"
|
|
783
785
|
}),
|
|
784
|
-
|
|
785
|
-
], 8,
|
|
786
|
+
Y(k(a(l)("common.emooTable.hideColumn")), 1)
|
|
787
|
+
], 8, ma),
|
|
786
788
|
e.hidden.length ? (t(), s(D, { key: 2 }, [
|
|
787
|
-
|
|
788
|
-
m("div",
|
|
789
|
+
i[9] || (i[9] = m("div", { class: "emt-colmenu__divider" }, null, -1)),
|
|
790
|
+
m("div", va, k(a(l)("common.emooTable.hiddenColumns")), 1),
|
|
789
791
|
(t(!0), s(D, null, J(e.hidden, (p) => (t(), s("button", {
|
|
790
792
|
key: p.key,
|
|
791
793
|
class: "emt-colmenu__item",
|
|
@@ -793,119 +795,119 @@ const Ao = { class: "emoo-asel__opt" }, Lo = { class: "emoo-asel__avatar" }, Oo
|
|
|
793
795
|
"data-testid": `emcm-restore-${p.key}`,
|
|
794
796
|
onClick: le((v) => o("restore", p.key), ["stop"])
|
|
795
797
|
}, [
|
|
796
|
-
P(a(
|
|
798
|
+
P(a(po), {
|
|
797
799
|
size: 14,
|
|
798
800
|
"aria-hidden": "true"
|
|
799
801
|
}),
|
|
800
|
-
|
|
801
|
-
], 8,
|
|
802
|
+
Y(k(p.label), 1)
|
|
803
|
+
], 8, fa))), 128))
|
|
802
804
|
], 64)) : S("", !0),
|
|
803
805
|
e.resettable ? (t(), s(D, { key: 3 }, [
|
|
804
|
-
|
|
806
|
+
i[10] || (i[10] = m("div", { class: "emt-colmenu__divider" }, null, -1)),
|
|
805
807
|
m("button", {
|
|
806
808
|
class: "emt-colmenu__item",
|
|
807
809
|
type: "button",
|
|
808
810
|
"data-testid": "emt-reset-prefs",
|
|
809
|
-
onClick:
|
|
811
|
+
onClick: i[6] || (i[6] = le((p) => o("reset"), ["stop"]))
|
|
810
812
|
}, [
|
|
811
|
-
P(a(
|
|
813
|
+
P(a(Bt), {
|
|
812
814
|
size: 14,
|
|
813
815
|
"aria-hidden": "true"
|
|
814
816
|
}),
|
|
815
|
-
|
|
817
|
+
Y(k(a(l)("common.emooTable.resetPrefs")), 1)
|
|
816
818
|
])
|
|
817
819
|
], 64)) : S("", !0)
|
|
818
820
|
])
|
|
819
821
|
]),
|
|
820
822
|
default: w(() => [
|
|
821
|
-
|
|
823
|
+
A(r.$slots, "default")
|
|
822
824
|
]),
|
|
823
825
|
_: 3
|
|
824
826
|
}));
|
|
825
827
|
}
|
|
826
|
-
}),
|
|
828
|
+
}), Ye = {
|
|
827
829
|
DRAWER_WIDTHS: "emoo-drawer-widths",
|
|
828
830
|
DRAWER_HEIGHTS: "emoo-drawer-heights"
|
|
829
|
-
},
|
|
830
|
-
function
|
|
831
|
+
}, pa = 360, Lt = 0.98;
|
|
832
|
+
function Ot() {
|
|
831
833
|
try {
|
|
832
|
-
const e = localStorage.getItem(
|
|
833
|
-
return typeof
|
|
834
|
+
const e = localStorage.getItem(Ye.DRAWER_WIDTHS), n = e ? JSON.parse(e) : {};
|
|
835
|
+
return typeof n == "object" && n !== null ? n : {};
|
|
834
836
|
} catch {
|
|
835
837
|
return {};
|
|
836
838
|
}
|
|
837
839
|
}
|
|
838
|
-
function
|
|
839
|
-
const o =
|
|
840
|
-
return typeof o != "number" || Number.isNaN(o) ?
|
|
840
|
+
function ya(e, n) {
|
|
841
|
+
const o = Ot()[e];
|
|
842
|
+
return typeof o != "number" || Number.isNaN(o) ? n : `${Math.round(Math.min(Math.max(o, pa), window.innerWidth * Lt))}px`;
|
|
841
843
|
}
|
|
842
|
-
function
|
|
844
|
+
function ba(e, n) {
|
|
843
845
|
try {
|
|
844
|
-
const o = Math.min(Math.round(
|
|
846
|
+
const o = Math.min(Math.round(n), Math.round(window.innerWidth * Lt));
|
|
845
847
|
localStorage.setItem(
|
|
846
|
-
|
|
847
|
-
JSON.stringify({ ...
|
|
848
|
+
Ye.DRAWER_WIDTHS,
|
|
849
|
+
JSON.stringify({ ...Ot(), [e]: o })
|
|
848
850
|
);
|
|
849
851
|
} catch {
|
|
850
852
|
}
|
|
851
853
|
}
|
|
852
|
-
const
|
|
853
|
-
function
|
|
854
|
+
const Ut = [0.6, 0.85, 1], ga = 0.08, ka = 250;
|
|
855
|
+
function Ht() {
|
|
854
856
|
try {
|
|
855
|
-
const e = localStorage.getItem(
|
|
856
|
-
return typeof
|
|
857
|
+
const e = localStorage.getItem(Ye.DRAWER_HEIGHTS), n = e ? JSON.parse(e) : {};
|
|
858
|
+
return typeof n == "object" && n !== null ? n : {};
|
|
857
859
|
} catch {
|
|
858
860
|
return {};
|
|
859
861
|
}
|
|
860
862
|
}
|
|
861
|
-
function
|
|
863
|
+
function $a(e, n) {
|
|
862
864
|
try {
|
|
863
865
|
localStorage.setItem(
|
|
864
|
-
|
|
865
|
-
JSON.stringify({ ...
|
|
866
|
+
Ye.DRAWER_HEIGHTS,
|
|
867
|
+
JSON.stringify({ ...Ht(), [e]: n })
|
|
866
868
|
);
|
|
867
869
|
} catch {
|
|
868
870
|
}
|
|
869
871
|
}
|
|
870
|
-
function
|
|
871
|
-
return
|
|
872
|
+
function _a(e) {
|
|
873
|
+
return Ut.reduce((n, o) => Math.abs(o - e) < Math.abs(n - e) ? o : n);
|
|
872
874
|
}
|
|
873
|
-
function
|
|
874
|
-
const o =
|
|
875
|
+
function wa(e, n) {
|
|
876
|
+
const o = Ht()[e], l = typeof o == "number" && o > 0 && o <= 1 ? o : n, r = U(l), i = U(null), p = V(() => i.value === null ? `${Math.round(r.value * 100)}%` : `${i.value}px`), v = U(!1), g = U(!1);
|
|
875
877
|
let u = 0, b = 0, _ = !1, y;
|
|
876
878
|
function R() {
|
|
877
|
-
y !== void 0 && clearTimeout(y), y = void 0,
|
|
879
|
+
y !== void 0 && clearTimeout(y), y = void 0, g.value = !1, i.value = null;
|
|
878
880
|
}
|
|
879
|
-
function E(
|
|
881
|
+
function E(z) {
|
|
880
882
|
_ = !0;
|
|
881
|
-
const j = b + (u -
|
|
882
|
-
|
|
883
|
+
const j = b + (u - z.clientY);
|
|
884
|
+
i.value = Math.round(Math.min(Math.max(j, Ut[0] * window.innerHeight), window.innerHeight));
|
|
883
885
|
}
|
|
884
886
|
function $() {
|
|
885
887
|
if (window.removeEventListener("pointermove", E), window.removeEventListener("pointerup", $), window.removeEventListener("pointercancel", $), v.value = !1, !_) {
|
|
886
|
-
|
|
888
|
+
i.value = null;
|
|
887
889
|
return;
|
|
888
890
|
}
|
|
889
|
-
const
|
|
890
|
-
if (r.value = X ? j : Math.round(
|
|
891
|
-
|
|
891
|
+
const z = i.value / window.innerHeight, j = _a(z), X = Math.abs(j - z) <= ga;
|
|
892
|
+
if (r.value = X ? j : Math.round(z * 100) / 100, $a(e, r.value), !X) {
|
|
893
|
+
i.value = null;
|
|
892
894
|
return;
|
|
893
895
|
}
|
|
894
|
-
|
|
895
|
-
|
|
896
|
+
g.value = !0, requestAnimationFrame(() => {
|
|
897
|
+
i.value = Math.round(j * window.innerHeight), y = setTimeout(R, ka);
|
|
896
898
|
});
|
|
897
899
|
}
|
|
898
|
-
function z
|
|
899
|
-
|
|
900
|
+
function I(z) {
|
|
901
|
+
z.button !== void 0 && z.button !== 0 || (R(), v.value = !0, _ = !1, u = z.clientY, b = r.value * window.innerHeight, i.value = Math.round(b), window.addEventListener("pointermove", E), window.addEventListener("pointerup", $), window.addEventListener("pointercancel", $));
|
|
900
902
|
}
|
|
901
|
-
return
|
|
903
|
+
return Ct(() => {
|
|
902
904
|
window.removeEventListener("pointermove", E), window.removeEventListener("pointerup", $), window.removeEventListener("pointercancel", $), y !== void 0 && clearTimeout(y);
|
|
903
|
-
}), { size: p, dragging: v, animating:
|
|
905
|
+
}), { size: p, dragging: v, animating: g, onDragStart: I };
|
|
904
906
|
}
|
|
905
|
-
const
|
|
907
|
+
const Sa = {
|
|
906
908
|
key: 0,
|
|
907
909
|
class: "emoo-drawer__sheet"
|
|
908
|
-
},
|
|
910
|
+
}, Ca = { class: "emoo-drawer__sheet-content" }, Dn = /* @__PURE__ */ F({
|
|
909
911
|
inheritAttrs: !1,
|
|
910
912
|
__name: "EmooDrawer",
|
|
911
913
|
props: {
|
|
@@ -919,24 +921,24 @@ const $a = {
|
|
|
919
921
|
flush: { type: Boolean, default: !1 }
|
|
920
922
|
},
|
|
921
923
|
emits: ["update:modelValue", "resize-end"],
|
|
922
|
-
setup(e, { emit:
|
|
923
|
-
const o = e, l =
|
|
924
|
+
setup(e, { emit: n }) {
|
|
925
|
+
const o = e, l = n, r = V({
|
|
924
926
|
get: () => o.modelValue,
|
|
925
927
|
set: (y) => l("update:modelValue", y)
|
|
926
|
-
}),
|
|
928
|
+
}), i = V(() => o.isMobile && !!o.scene && !o.mobileFull), { size: p, dragging: v, animating: g, onDragStart: u } = wa(
|
|
927
929
|
o.scene ?? "__emoo-no-scene__",
|
|
928
930
|
o.mobileRatio
|
|
929
|
-
), b = V(() => o.isMobile ?
|
|
931
|
+
), b = V(() => o.isMobile ? i.value ? p.value : o.direction === "rtl" || o.direction === "ltr" ? o.size : "100%" : o.scene ? ya(o.scene, o.size) : o.size);
|
|
930
932
|
function _(y, R) {
|
|
931
|
-
o.scene &&
|
|
933
|
+
o.scene && ba(o.scene, R), l("resize-end", y, R);
|
|
932
934
|
}
|
|
933
|
-
return (y, R) => (t(), x(a(
|
|
935
|
+
return (y, R) => (t(), x(a(Tt), Xe(y.$attrs, {
|
|
934
936
|
modelValue: r.value,
|
|
935
937
|
"onUpdate:modelValue": R[0] || (R[0] = (E) => r.value = E),
|
|
936
938
|
class: ["emoo-drawer", {
|
|
937
939
|
"emoo-drawer--flush": e.flush,
|
|
938
|
-
"is-sheet":
|
|
939
|
-
"sheet-height-animating":
|
|
940
|
+
"is-sheet": i.value,
|
|
941
|
+
"sheet-height-animating": i.value && a(g)
|
|
940
942
|
}],
|
|
941
943
|
size: b.value,
|
|
942
944
|
direction: e.direction ?? (e.isMobile ? "btt" : "rtl"),
|
|
@@ -944,48 +946,48 @@ const $a = {
|
|
|
944
946
|
onResizeEnd: _
|
|
945
947
|
}), Se({
|
|
946
948
|
default: w(() => [
|
|
947
|
-
|
|
948
|
-
P(
|
|
949
|
+
i.value ? (t(), s("div", Sa, [
|
|
950
|
+
P(At, {
|
|
949
951
|
dragging: a(v),
|
|
950
952
|
onDragstart: a(u)
|
|
951
953
|
}, null, 8, ["dragging", "onDragstart"]),
|
|
952
|
-
m("div",
|
|
953
|
-
|
|
954
|
+
m("div", Ca, [
|
|
955
|
+
A(y.$slots, "default")
|
|
954
956
|
])
|
|
955
|
-
])) :
|
|
957
|
+
])) : A(y.$slots, "default", {}, void 0, void 0, 1)
|
|
956
958
|
]),
|
|
957
959
|
_: 2
|
|
958
960
|
}, [
|
|
959
961
|
y.$slots.header ? {
|
|
960
962
|
name: "header",
|
|
961
963
|
fn: w(() => [
|
|
962
|
-
|
|
964
|
+
A(y.$slots, "header")
|
|
963
965
|
]),
|
|
964
966
|
key: "0"
|
|
965
967
|
} : void 0,
|
|
966
968
|
y.$slots.footer ? {
|
|
967
969
|
name: "footer",
|
|
968
970
|
fn: w(() => [
|
|
969
|
-
|
|
971
|
+
A(y.$slots, "footer")
|
|
970
972
|
]),
|
|
971
973
|
key: "1"
|
|
972
974
|
} : void 0
|
|
973
975
|
]), 1040, ["modelValue", "class", "size", "direction", "resizable"]));
|
|
974
976
|
}
|
|
975
|
-
}),
|
|
977
|
+
}), Ea = {
|
|
976
978
|
key: 0,
|
|
977
979
|
class: "emoo-empty__stage",
|
|
978
980
|
"aria-hidden": "true"
|
|
979
|
-
},
|
|
981
|
+
}, Ta = {
|
|
980
982
|
key: 1,
|
|
981
983
|
class: "emoo-empty__title"
|
|
982
|
-
},
|
|
984
|
+
}, xa = {
|
|
983
985
|
key: 2,
|
|
984
986
|
class: "emoo-empty__desc"
|
|
985
|
-
},
|
|
987
|
+
}, Ia = {
|
|
986
988
|
key: 3,
|
|
987
989
|
class: "emoo-empty__actions"
|
|
988
|
-
},
|
|
990
|
+
}, za = /* @__PURE__ */ F({
|
|
989
991
|
__name: "EmooEmpty",
|
|
990
992
|
props: {
|
|
991
993
|
variant: { default: "stage" },
|
|
@@ -996,25 +998,25 @@ const $a = {
|
|
|
996
998
|
size: { default: "md" }
|
|
997
999
|
},
|
|
998
1000
|
setup(e) {
|
|
999
|
-
return (
|
|
1001
|
+
return (n, o) => (t(), s("div", {
|
|
1000
1002
|
class: W(["emoo-empty", e.variant === "mini" ? "is-mini" : [`is-${e.size}`, { "is-neutral": e.tone === "neutral" }]]),
|
|
1001
1003
|
"data-testid": "emoo-empty"
|
|
1002
1004
|
}, [
|
|
1003
1005
|
e.variant === "stage" ? (t(), s(D, { key: 0 }, [
|
|
1004
|
-
e.icon ? (t(), s("span",
|
|
1005
|
-
(t(), x(
|
|
1006
|
+
e.icon ? (t(), s("span", Ea, [
|
|
1007
|
+
(t(), x(Ie(e.icon), { weight: "duotone" }))
|
|
1006
1008
|
])) : S("", !0),
|
|
1007
|
-
e.title ? (t(), s("p",
|
|
1008
|
-
e.description ? (t(), s("p",
|
|
1009
|
-
|
|
1010
|
-
|
|
1009
|
+
e.title ? (t(), s("p", Ta, k(e.title), 1)) : S("", !0),
|
|
1010
|
+
e.description ? (t(), s("p", xa, k(e.description), 1)) : S("", !0),
|
|
1011
|
+
n.$slots.actions ? (t(), s("div", Ia, [
|
|
1012
|
+
A(n.$slots, "actions", {}, void 0, !0)
|
|
1011
1013
|
])) : S("", !0)
|
|
1012
1014
|
], 64)) : (t(), s(D, { key: 1 }, [
|
|
1013
|
-
|
|
1015
|
+
Y(k(e.title), 1)
|
|
1014
1016
|
], 64))
|
|
1015
1017
|
], 2));
|
|
1016
1018
|
}
|
|
1017
|
-
}),
|
|
1019
|
+
}), Ra = /* @__PURE__ */ Z(za, [["__scopeId", "data-v-e50a5864"]]), Va = ["id", "for"], Ba = { class: "emoo-field__body" }, Ma = ["data-testid"], Da = ["id"], Pa = ["id", "data-testid"], Aa = /* @__PURE__ */ F({
|
|
1018
1020
|
__name: "EmooField",
|
|
1019
1021
|
props: {
|
|
1020
1022
|
id: {},
|
|
@@ -1029,32 +1031,36 @@ const $a = {
|
|
|
1029
1031
|
testid: {}
|
|
1030
1032
|
},
|
|
1031
1033
|
setup(e) {
|
|
1032
|
-
const
|
|
1033
|
-
() => [
|
|
1034
|
+
const n = e, o = V(() => n.id ? `${n.id}-control` : void 0), l = V(() => n.id ? `${n.id}-label` : void 0), r = V(() => n.id ? `${n.id}-help` : void 0), i = V(() => n.id ? `${n.id}-error` : void 0), p = V(
|
|
1035
|
+
() => [n.error && i.value, n.help && r.value].filter(Boolean).join(" ") || void 0
|
|
1034
1036
|
), v = V(() => {
|
|
1035
|
-
if (!(
|
|
1036
|
-
return
|
|
1037
|
+
if (!(n.span === 1 || n.span === void 0))
|
|
1038
|
+
return n.span === "full" ? "is-span-full" : `is-span-${Math.min(4, Math.max(1, n.span))}`;
|
|
1037
1039
|
});
|
|
1038
|
-
return (
|
|
1040
|
+
return (g, u) => e.mode !== "hidden" ? (t(), s("div", {
|
|
1039
1041
|
key: 0,
|
|
1040
1042
|
class: W(["emoo-field", [`is-${e.mode}`, v.value, { "is-required": e.required && e.mode === "edit" }]])
|
|
1041
1043
|
}, [
|
|
1042
|
-
e.label ? (t(), s("label", {
|
|
1044
|
+
e.label || g.$slots.label ? (t(), s("label", {
|
|
1043
1045
|
key: 0,
|
|
1044
1046
|
id: l.value,
|
|
1045
1047
|
for: o.value || void 0,
|
|
1046
1048
|
class: W(["emoo-field__label", { "is-danger": e.labelTone === "danger" }])
|
|
1047
|
-
},
|
|
1048
|
-
|
|
1049
|
+
}, [
|
|
1050
|
+
A(g.$slots, "label", {}, () => [
|
|
1051
|
+
Y(k(e.label), 1)
|
|
1052
|
+
], !0)
|
|
1053
|
+
], 10, Va)) : S("", !0),
|
|
1054
|
+
m("div", Ba, [
|
|
1049
1055
|
e.mode === "view" ? (t(), s("div", {
|
|
1050
1056
|
key: 0,
|
|
1051
1057
|
class: "emoo-field__value",
|
|
1052
1058
|
"data-testid": e.testid ? `${e.testid}-value` : void 0
|
|
1053
1059
|
}, [
|
|
1054
|
-
|
|
1055
|
-
|
|
1060
|
+
A(g.$slots, "view", {}, () => [
|
|
1061
|
+
Y(k(e.text), 1)
|
|
1056
1062
|
], !0)
|
|
1057
|
-
], 8,
|
|
1063
|
+
], 8, Ma)) : A(g.$slots, "default", {
|
|
1058
1064
|
id: o.value || void 0,
|
|
1059
1065
|
describedBy: p.value,
|
|
1060
1066
|
invalid: !!e.error,
|
|
@@ -1064,64 +1070,64 @@ const $a = {
|
|
|
1064
1070
|
key: 2,
|
|
1065
1071
|
id: r.value,
|
|
1066
1072
|
class: "emoo-field__help"
|
|
1067
|
-
},
|
|
1073
|
+
}, k(e.help), 9, Da)) : S("", !0),
|
|
1068
1074
|
e.error && e.mode === "edit" ? (t(), s("p", {
|
|
1069
1075
|
key: 3,
|
|
1070
|
-
id:
|
|
1076
|
+
id: i.value,
|
|
1071
1077
|
class: "emoo-field__error",
|
|
1072
1078
|
role: "alert",
|
|
1073
1079
|
"data-testid": e.testid ? `${e.testid}-error` : void 0
|
|
1074
|
-
},
|
|
1080
|
+
}, k(e.error), 9, Pa)) : S("", !0)
|
|
1075
1081
|
])
|
|
1076
1082
|
], 2)) : S("", !0);
|
|
1077
1083
|
}
|
|
1078
|
-
}),
|
|
1084
|
+
}), Pn = /* @__PURE__ */ Z(Aa, [["__scopeId", "data-v-1b6ea0e7"]]), La = ["aria-label"], Oa = /* @__PURE__ */ F({
|
|
1079
1085
|
__name: "EmooFieldGrid",
|
|
1080
1086
|
props: {
|
|
1081
1087
|
ariaLabel: {},
|
|
1082
1088
|
inset: { type: Boolean, default: !1 }
|
|
1083
1089
|
},
|
|
1084
1090
|
setup(e) {
|
|
1085
|
-
return (
|
|
1091
|
+
return (n, o) => (t(), s("div", {
|
|
1086
1092
|
class: W(["emoo-field-grid", { "is-inset": e.inset }]),
|
|
1087
1093
|
role: "group",
|
|
1088
1094
|
"aria-label": e.ariaLabel
|
|
1089
1095
|
}, [
|
|
1090
|
-
|
|
1091
|
-
], 10,
|
|
1096
|
+
A(n.$slots, "default", {}, void 0, !0)
|
|
1097
|
+
], 10, La));
|
|
1092
1098
|
}
|
|
1093
|
-
}),
|
|
1099
|
+
}), An = /* @__PURE__ */ Z(Oa, [["__scopeId", "data-v-12f1e7e0"]]), Ua = /* @__PURE__ */ F({
|
|
1094
1100
|
__name: "EmooGhostButton",
|
|
1095
1101
|
props: {
|
|
1096
1102
|
pill: { type: Boolean },
|
|
1097
1103
|
touch: { type: Boolean }
|
|
1098
1104
|
},
|
|
1099
1105
|
setup(e) {
|
|
1100
|
-
return (
|
|
1106
|
+
return (n, o) => (t(), s("button", {
|
|
1101
1107
|
type: "button",
|
|
1102
1108
|
class: W(["emoo-ghost-btn", { "is-pill": e.pill, "is-touch": e.touch }])
|
|
1103
1109
|
}, [
|
|
1104
|
-
|
|
1110
|
+
A(n.$slots, "default", {}, void 0, !0)
|
|
1105
1111
|
], 2));
|
|
1106
1112
|
}
|
|
1107
|
-
}),
|
|
1113
|
+
}), Ln = /* @__PURE__ */ Z(Ua, [["__scopeId", "data-v-d0346949"]]), Ha = /* @__PURE__ */ F({
|
|
1108
1114
|
__name: "EmooGroupLabel",
|
|
1109
1115
|
props: {
|
|
1110
1116
|
title: {},
|
|
1111
1117
|
first: { type: Boolean, default: !1 }
|
|
1112
1118
|
},
|
|
1113
1119
|
setup(e) {
|
|
1114
|
-
const { t:
|
|
1120
|
+
const { t: n } = me();
|
|
1115
1121
|
return (o, l) => (t(), s("p", {
|
|
1116
1122
|
class: W(["emoo-group-label", { "is-first": e.first }])
|
|
1117
1123
|
}, [
|
|
1118
|
-
m("span", null,
|
|
1124
|
+
m("span", null, k(a(n)(e.title)), 1)
|
|
1119
1125
|
], 2));
|
|
1120
1126
|
}
|
|
1121
|
-
}),
|
|
1127
|
+
}), On = /* @__PURE__ */ Z(Ha, [["__scopeId", "data-v-0135d501"]]), Ka = { class: "emoo-skel__lines" }, Wa = { class: "emoo-skel__head" }, Na = {
|
|
1122
1128
|
key: 4,
|
|
1123
1129
|
class: "emoo-skel__pill-row"
|
|
1124
|
-
},
|
|
1130
|
+
}, Fa = { class: "emoo-skel__detail" }, qa = { class: "emoo-skel__lines" }, ja = /* @__PURE__ */ F({
|
|
1125
1131
|
__name: "EmooSkeleton",
|
|
1126
1132
|
props: {
|
|
1127
1133
|
variant: { default: "lines" },
|
|
@@ -1134,7 +1140,7 @@ const $a = {
|
|
|
1134
1140
|
cells: { default: 8 }
|
|
1135
1141
|
},
|
|
1136
1142
|
setup(e) {
|
|
1137
|
-
return (
|
|
1143
|
+
return (n, o) => (t(), s("div", {
|
|
1138
1144
|
class: W(["emoo-skel", `is-${e.variant}`]),
|
|
1139
1145
|
"aria-hidden": "true"
|
|
1140
1146
|
}, [
|
|
@@ -1146,7 +1152,7 @@ const $a = {
|
|
|
1146
1152
|
class: "emoo-skel__item"
|
|
1147
1153
|
}, [
|
|
1148
1154
|
o[0] || (o[0] = m("span", { class: "emoo-skel__bone emoo-skel__avatar" }, null, -1)),
|
|
1149
|
-
m("span",
|
|
1155
|
+
m("span", Ka, [
|
|
1150
1156
|
m("span", {
|
|
1151
1157
|
class: "emoo-skel__bone emoo-skel__line",
|
|
1152
1158
|
style: pe({ width: `${52 - l * 8}%` })
|
|
@@ -1157,7 +1163,7 @@ const $a = {
|
|
|
1157
1163
|
}, null, 4)
|
|
1158
1164
|
])
|
|
1159
1165
|
]))), 128)) : e.variant === "table" ? (t(), s(D, { key: 2 }, [
|
|
1160
|
-
m("span",
|
|
1166
|
+
m("span", Wa, [
|
|
1161
1167
|
(t(), s(D, null, J(["18%", "26%", "14%", "22%"], (l, r) => m("span", {
|
|
1162
1168
|
key: r,
|
|
1163
1169
|
class: "emoo-skel__bone emoo-skel__cell",
|
|
@@ -1168,8 +1174,8 @@ const $a = {
|
|
|
1168
1174
|
key: l,
|
|
1169
1175
|
class: "emoo-skel__row"
|
|
1170
1176
|
}, [
|
|
1171
|
-
(t(), s(D, null, J(["18%", "26%", "14%", "22%"], (r,
|
|
1172
|
-
key:
|
|
1177
|
+
(t(), s(D, null, J(["18%", "26%", "14%", "22%"], (r, i) => m("span", {
|
|
1178
|
+
key: i,
|
|
1173
1179
|
class: "emoo-skel__bone emoo-skel__cell",
|
|
1174
1180
|
style: pe({ width: r })
|
|
1175
1181
|
}, null, 4)), 64))
|
|
@@ -1183,7 +1189,7 @@ const $a = {
|
|
|
1183
1189
|
style: { width: "56%" }
|
|
1184
1190
|
}, null, -1),
|
|
1185
1191
|
m("span", { class: "emoo-skel__bone emoo-skel__tile-value" }, null, -1)
|
|
1186
|
-
])]))), 128)) : e.variant === "pills" ? (t(), s("div",
|
|
1192
|
+
])]))), 128)) : e.variant === "pills" ? (t(), s("div", Na, [
|
|
1187
1193
|
(t(!0), s(D, null, J(e.pills, (l) => (t(), s("span", {
|
|
1188
1194
|
key: l,
|
|
1189
1195
|
class: "emoo-skel__bone emoo-skel__pill"
|
|
@@ -1208,8 +1214,8 @@ const $a = {
|
|
|
1208
1214
|
}, null, 4)
|
|
1209
1215
|
], 64)) : (t(), s(D, { key: 7 }, [
|
|
1210
1216
|
o[5] || (o[5] = m("span", { class: "emoo-skel__bone emoo-skel__title" }, null, -1)),
|
|
1211
|
-
m("span",
|
|
1212
|
-
m("span",
|
|
1217
|
+
m("span", Fa, [
|
|
1218
|
+
m("span", qa, [
|
|
1213
1219
|
(t(!0), s(D, null, J(e.lines, (l) => (t(), s("span", {
|
|
1214
1220
|
key: l,
|
|
1215
1221
|
class: W(["emoo-skel__bone emoo-skel__line", { "is-tail": l === e.lines }])
|
|
@@ -1220,14 +1226,14 @@ const $a = {
|
|
|
1220
1226
|
], 64))
|
|
1221
1227
|
], 2));
|
|
1222
1228
|
}
|
|
1223
|
-
}),
|
|
1229
|
+
}), Ga = /* @__PURE__ */ Z(ja, [["__scopeId", "data-v-9e0a33de"]]), Xa = ["aria-label"], Ja = /* @__PURE__ */ F({
|
|
1224
1230
|
__name: "EmooSpinner",
|
|
1225
1231
|
props: {
|
|
1226
1232
|
size: { default: 20 },
|
|
1227
1233
|
label: { default: "加载中" }
|
|
1228
1234
|
},
|
|
1229
1235
|
setup(e) {
|
|
1230
|
-
return (
|
|
1236
|
+
return (n, o) => (t(), s("span", {
|
|
1231
1237
|
class: "emoo-spinner",
|
|
1232
1238
|
style: pe({ width: `${e.size}px`, height: `${e.size}px` }),
|
|
1233
1239
|
role: "status",
|
|
@@ -1246,22 +1252,22 @@ const $a = {
|
|
|
1246
1252
|
"stroke-dasharray": "37.7 12.57"
|
|
1247
1253
|
})
|
|
1248
1254
|
], -1)
|
|
1249
|
-
])], 12,
|
|
1255
|
+
])], 12, Xa));
|
|
1250
1256
|
}
|
|
1251
|
-
}),
|
|
1257
|
+
}), Kt = /* @__PURE__ */ Z(Ja, [["__scopeId", "data-v-d168f9f3"]]), Ya = {
|
|
1252
1258
|
class: "emoo-history-list",
|
|
1253
1259
|
"data-testid": "emoo-history-list"
|
|
1254
|
-
},
|
|
1260
|
+
}, Za = {
|
|
1255
1261
|
key: 0,
|
|
1256
1262
|
class: "history-float"
|
|
1257
|
-
},
|
|
1263
|
+
}, Qa = ["data-item-id", "tabindex", "onClick", "onFocus", "onKeydown"], el = { class: "history-name" }, tl = { key: 0 }, ol = {
|
|
1258
1264
|
key: 1,
|
|
1259
1265
|
class: "status-indicator",
|
|
1260
1266
|
"data-testid": "chat-status-indicator"
|
|
1261
|
-
},
|
|
1267
|
+
}, al = {
|
|
1262
1268
|
key: 1,
|
|
1263
1269
|
class: "status-dot"
|
|
1264
|
-
},
|
|
1270
|
+
}, ll = /* @__PURE__ */ F({
|
|
1265
1271
|
__name: "EmooHistoryList",
|
|
1266
1272
|
props: {
|
|
1267
1273
|
groups: {},
|
|
@@ -1278,73 +1284,73 @@ const $a = {
|
|
|
1278
1284
|
noMatchTitle: { default: void 0 }
|
|
1279
1285
|
},
|
|
1280
1286
|
emits: ["update:keyword", "update:selectedIds", "select", "load-more", "delete", "rename"],
|
|
1281
|
-
setup(e, { expose:
|
|
1282
|
-
const l = e, r = o, { t:
|
|
1287
|
+
setup(e, { expose: n, emit: o }) {
|
|
1288
|
+
const l = e, r = o, { t: i } = me(), p = V(() => l.searchPlaceholder ?? i("common.emooHistory.searchPlaceholder")), v = V(() => l.selectLabel ?? i("common.emooHistory.select")), g = V(() => l.emptyTitle ?? i("common.emooHistory.empty")), u = V(() => l.noMatchTitle ?? i("common.emooHistory.noMatch")), b = V(() => l.groups.some((B) => B.items.length > 0)), _ = U(!1), y = U(!1), R = U(null), E = async () => {
|
|
1283
1289
|
_.value = !0, await ke(), R.value?.focus();
|
|
1284
1290
|
}, $ = () => {
|
|
1285
1291
|
!l.keyword && !y.value && (_.value = !1);
|
|
1286
|
-
},
|
|
1292
|
+
}, I = () => {
|
|
1287
1293
|
y.value = !1, $();
|
|
1288
|
-
},
|
|
1289
|
-
|
|
1290
|
-
}, d = () => ee(X.value[0]?.id), T = (
|
|
1291
|
-
if (
|
|
1292
|
-
const G = X.value, oe = G.findIndex((re) => re.id ===
|
|
1293
|
-
if (
|
|
1294
|
-
|
|
1295
|
-
else if (
|
|
1296
|
-
|
|
1297
|
-
else if (
|
|
1298
|
-
|
|
1299
|
-
else if (
|
|
1294
|
+
}, z = U(null), j = U(null), X = V(() => l.groups.flatMap((B) => B.items)), ie = (B) => B.id === (j.value ?? X.value[0]?.id) ? 0 : -1, ee = (B) => {
|
|
1295
|
+
B !== void 0 && z.value?.querySelector(`.history-item[data-item-id="${B}"]`)?.focus();
|
|
1296
|
+
}, d = () => ee(X.value[0]?.id), T = (B, O) => {
|
|
1297
|
+
if (B.target !== B.currentTarget) return;
|
|
1298
|
+
const G = X.value, oe = G.findIndex((re) => re.id === O.id);
|
|
1299
|
+
if (B.key === "ArrowDown")
|
|
1300
|
+
B.preventDefault(), oe < G.length - 1 && ee(G[oe + 1].id);
|
|
1301
|
+
else if (B.key === "ArrowUp")
|
|
1302
|
+
B.preventDefault(), oe > 0 && ee(G[oe - 1].id);
|
|
1303
|
+
else if (B.key === "Enter")
|
|
1304
|
+
B.preventDefault(), L(O);
|
|
1305
|
+
else if (B.key === "Backspace" || B.key === "Delete") {
|
|
1300
1306
|
if (se.value || H.value || !ae) return;
|
|
1301
|
-
|
|
1307
|
+
B.preventDefault(), r("delete", O);
|
|
1302
1308
|
}
|
|
1303
|
-
},
|
|
1304
|
-
if ((
|
|
1309
|
+
}, M = (B) => {
|
|
1310
|
+
if ((B.metaKey || B.ctrlKey) && B.key.toLowerCase() === "k") {
|
|
1305
1311
|
if (!l.anyRecord) return;
|
|
1306
|
-
|
|
1312
|
+
B.preventDefault(), E();
|
|
1307
1313
|
}
|
|
1308
|
-
}, se =
|
|
1309
|
-
se.value =
|
|
1314
|
+
}, se = U(null), ne = U(""), ye = U(!1), q = (B) => {
|
|
1315
|
+
se.value = B.id, ne.value = B.title;
|
|
1310
1316
|
}, de = () => {
|
|
1311
1317
|
se.value = null, ne.value = "";
|
|
1312
1318
|
}, ce = () => {
|
|
1313
1319
|
se.value !== null && r("rename", { id: se.value, title: ne.value });
|
|
1314
|
-
}, H =
|
|
1320
|
+
}, H = U(!1), te = (B, O) => {
|
|
1315
1321
|
r(
|
|
1316
1322
|
"update:selectedIds",
|
|
1317
|
-
|
|
1323
|
+
O ? [...l.selectedIds, B] : l.selectedIds.filter((G) => G !== B)
|
|
1318
1324
|
);
|
|
1319
|
-
},
|
|
1325
|
+
}, N = () => {
|
|
1320
1326
|
H.value = !H.value, H.value ? de() : r("update:selectedIds", []);
|
|
1321
1327
|
}, C = () => {
|
|
1322
1328
|
H.value && (H.value = !1, r("update:selectedIds", []));
|
|
1323
|
-
},
|
|
1329
|
+
}, L = (B) => {
|
|
1324
1330
|
if (H.value) {
|
|
1325
|
-
te(
|
|
1331
|
+
te(B.id, !l.selectedIds.includes(B.id));
|
|
1326
1332
|
return;
|
|
1327
1333
|
}
|
|
1328
|
-
r("select",
|
|
1329
|
-
}, Q = (
|
|
1330
|
-
const
|
|
1331
|
-
|
|
1332
|
-
}, ae = !!
|
|
1333
|
-
return
|
|
1334
|
-
window.addEventListener("keydown",
|
|
1335
|
-
}),
|
|
1336
|
-
window.removeEventListener("keydown",
|
|
1337
|
-
}),
|
|
1338
|
-
e.anyRecord ? (t(), s("div",
|
|
1334
|
+
r("select", B);
|
|
1335
|
+
}, Q = (B) => {
|
|
1336
|
+
const O = B.target;
|
|
1337
|
+
O.scrollTop + O.clientHeight >= O.scrollHeight - 60 && r("load-more");
|
|
1338
|
+
}, ae = !!Et()["row-action"];
|
|
1339
|
+
return Je(() => {
|
|
1340
|
+
window.addEventListener("keydown", M);
|
|
1341
|
+
}), Ct(() => {
|
|
1342
|
+
window.removeEventListener("keydown", M);
|
|
1343
|
+
}), n({ startRename: q, cancelRename: de, exitSelectMode: C, focusSearch: E }), (B, O) => (t(), s("div", Ya, [
|
|
1344
|
+
e.anyRecord ? (t(), s("div", Za, [
|
|
1339
1345
|
m("div", {
|
|
1340
1346
|
class: W(["search-area", { expanded: _.value }]),
|
|
1341
|
-
onMouseenter:
|
|
1347
|
+
onMouseenter: O[2] || (O[2] = (G) => _.value = !0),
|
|
1342
1348
|
onMouseleave: $,
|
|
1343
1349
|
onClick: E
|
|
1344
1350
|
}, [
|
|
1345
1351
|
P(he, { content: p.value }, {
|
|
1346
1352
|
default: w(() => [
|
|
1347
|
-
P(a(
|
|
1353
|
+
P(a(et), {
|
|
1348
1354
|
link: "",
|
|
1349
1355
|
size: "small",
|
|
1350
1356
|
class: "search-toggle",
|
|
@@ -1352,14 +1358,14 @@ const $a = {
|
|
|
1352
1358
|
"data-testid": "chat-history-search-toggle"
|
|
1353
1359
|
}, {
|
|
1354
1360
|
default: w(() => [
|
|
1355
|
-
P(a(
|
|
1361
|
+
P(a(yo), { size: 14 })
|
|
1356
1362
|
]),
|
|
1357
1363
|
_: 1
|
|
1358
1364
|
}, 8, ["aria-label"])
|
|
1359
1365
|
]),
|
|
1360
1366
|
_: 1
|
|
1361
1367
|
}, 8, ["content"]),
|
|
1362
|
-
P(a(
|
|
1368
|
+
P(a(ot), {
|
|
1363
1369
|
ref_key: "searchInputRef",
|
|
1364
1370
|
ref: R,
|
|
1365
1371
|
"model-value": e.keyword,
|
|
@@ -1368,10 +1374,10 @@ const $a = {
|
|
|
1368
1374
|
placeholder: p.value,
|
|
1369
1375
|
class: "search-input",
|
|
1370
1376
|
"data-testid": "chat-history-search",
|
|
1371
|
-
"onUpdate:modelValue":
|
|
1372
|
-
onFocus:
|
|
1373
|
-
onBlur:
|
|
1374
|
-
onKeydown:
|
|
1377
|
+
"onUpdate:modelValue": O[0] || (O[0] = (G) => r("update:keyword", G)),
|
|
1378
|
+
onFocus: O[1] || (O[1] = (G) => y.value = !0),
|
|
1379
|
+
onBlur: I,
|
|
1380
|
+
onKeydown: je(le(d, ["prevent"]), ["down"])
|
|
1375
1381
|
}, null, 8, ["model-value", "placeholder", "onKeydown"])
|
|
1376
1382
|
], 34),
|
|
1377
1383
|
e.selectable ? (t(), s(D, { key: 0 }, [
|
|
@@ -1382,30 +1388,30 @@ const $a = {
|
|
|
1382
1388
|
class: "float-toggle",
|
|
1383
1389
|
"data-testid": "chat-history-select-cancel",
|
|
1384
1390
|
disabled: e.batchBusy,
|
|
1385
|
-
onClick:
|
|
1391
|
+
onClick: N
|
|
1386
1392
|
}, {
|
|
1387
1393
|
default: w(() => [
|
|
1388
|
-
|
|
1394
|
+
Y(k(a(i)("common.emooHistory.cancel")), 1)
|
|
1389
1395
|
]),
|
|
1390
1396
|
_: 1
|
|
1391
1397
|
}, 8, ["disabled"]),
|
|
1392
|
-
|
|
1398
|
+
A(B.$slots, "batch-actions", { selectedIds: e.selectedIds }, void 0, !0)
|
|
1393
1399
|
], 64)) : (t(), x(he, {
|
|
1394
1400
|
key: 0,
|
|
1395
1401
|
content: v.value
|
|
1396
1402
|
}, {
|
|
1397
1403
|
default: w(() => [
|
|
1398
|
-
P(a(
|
|
1404
|
+
P(a(et), {
|
|
1399
1405
|
link: "",
|
|
1400
1406
|
size: "small",
|
|
1401
1407
|
class: "float-toggle",
|
|
1402
1408
|
"data-testid": "chat-history-select-toggle",
|
|
1403
1409
|
"aria-label": v.value,
|
|
1404
1410
|
disabled: e.batchBusy,
|
|
1405
|
-
onClick:
|
|
1411
|
+
onClick: N
|
|
1406
1412
|
}, {
|
|
1407
1413
|
default: w(() => [
|
|
1408
|
-
P(a(
|
|
1414
|
+
P(a(bo), { size: 14 })
|
|
1409
1415
|
]),
|
|
1410
1416
|
_: 1
|
|
1411
1417
|
}, 8, ["aria-label", "disabled"])
|
|
@@ -1414,13 +1420,13 @@ const $a = {
|
|
|
1414
1420
|
}, 8, ["content"]))
|
|
1415
1421
|
], 64)) : S("", !0)
|
|
1416
1422
|
])) : S("", !0),
|
|
1417
|
-
|
|
1423
|
+
Ne((t(), s("div", {
|
|
1418
1424
|
ref_key: "historyScrollRef",
|
|
1419
|
-
ref:
|
|
1425
|
+
ref: z,
|
|
1420
1426
|
class: "history-scroll",
|
|
1421
1427
|
onScroll: Q
|
|
1422
1428
|
}, [
|
|
1423
|
-
e.loading && !b.value ? (t(), x(
|
|
1429
|
+
e.loading && !b.value ? (t(), x(Ga, {
|
|
1424
1430
|
key: 0,
|
|
1425
1431
|
variant: "lines",
|
|
1426
1432
|
lines: 4,
|
|
@@ -1431,8 +1437,8 @@ const $a = {
|
|
|
1431
1437
|
m("div", {
|
|
1432
1438
|
class: W(["group-title", { "group-title--dim": G.dim }])
|
|
1433
1439
|
}, [
|
|
1434
|
-
|
|
1435
|
-
|
|
1440
|
+
O[11] || (O[11] = m("span", { class: "group-dot" }, null, -1)),
|
|
1441
|
+
Y(" " + k(a(i)(G.label)), 1)
|
|
1436
1442
|
], 2),
|
|
1437
1443
|
(t(!0), s(D, null, J(G.items, (oe) => (t(), x(he, {
|
|
1438
1444
|
key: oe.id,
|
|
@@ -1445,42 +1451,42 @@ const $a = {
|
|
|
1445
1451
|
class: W(["history-item", { active: oe.id === e.activeId }]),
|
|
1446
1452
|
"data-item-id": oe.id,
|
|
1447
1453
|
tabindex: ie(oe),
|
|
1448
|
-
onClick: (re) =>
|
|
1454
|
+
onClick: (re) => L(oe),
|
|
1449
1455
|
onFocus: (re) => j.value = oe.id,
|
|
1450
1456
|
onKeydown: (re) => T(re, oe)
|
|
1451
1457
|
}, [
|
|
1452
|
-
H.value ? (t(), x(a(
|
|
1458
|
+
H.value ? (t(), x(a(st), {
|
|
1453
1459
|
key: 0,
|
|
1454
1460
|
class: "row-checkbox",
|
|
1455
1461
|
"data-testid": "chat-history-item-checkbox",
|
|
1456
1462
|
"model-value": e.selectedIds.includes(oe.id),
|
|
1457
|
-
onClick:
|
|
1463
|
+
onClick: O[3] || (O[3] = le(() => {
|
|
1458
1464
|
}, ["stop"])),
|
|
1459
1465
|
"onUpdate:modelValue": (re) => te(oe.id, !!re)
|
|
1460
1466
|
}, null, 8, ["model-value", "onUpdate:modelValue"])) : S("", !0),
|
|
1461
|
-
m("span",
|
|
1462
|
-
se.value !== oe.id ? (t(), s("span",
|
|
1467
|
+
m("span", el, [
|
|
1468
|
+
se.value !== oe.id ? (t(), s("span", tl, k(oe.title), 1)) : (t(), x(a(ot), {
|
|
1463
1469
|
key: 1,
|
|
1464
1470
|
modelValue: ne.value,
|
|
1465
|
-
"onUpdate:modelValue":
|
|
1471
|
+
"onUpdate:modelValue": O[4] || (O[4] = (re) => ne.value = re),
|
|
1466
1472
|
class: "rename-input",
|
|
1467
1473
|
"data-testid": "chat-history-rename-input",
|
|
1468
|
-
onClick:
|
|
1474
|
+
onClick: O[5] || (O[5] = le(() => {
|
|
1469
1475
|
}, ["stop"])),
|
|
1470
|
-
onCompositionstart:
|
|
1471
|
-
onCompositionend:
|
|
1472
|
-
onKeydown:
|
|
1476
|
+
onCompositionstart: O[6] || (O[6] = (re) => ye.value = !0),
|
|
1477
|
+
onCompositionend: O[7] || (O[7] = (re) => ye.value = !1),
|
|
1478
|
+
onKeydown: O[8] || (O[8] = je((re) => !ye.value && ce(), ["enter"])),
|
|
1473
1479
|
onBlur: le(ce, ["stop"])
|
|
1474
1480
|
}, null, 8, ["modelValue"]))
|
|
1475
1481
|
]),
|
|
1476
|
-
se.value !== oe.id && oe.id !== e.activeId && oe.status ? (t(), s("span",
|
|
1477
|
-
oe.status === "generating" ? (t(), x(
|
|
1482
|
+
se.value !== oe.id && oe.id !== e.activeId && oe.status ? (t(), s("span", ol, [
|
|
1483
|
+
oe.status === "generating" ? (t(), x(Kt, {
|
|
1478
1484
|
key: 0,
|
|
1479
1485
|
size: 14,
|
|
1480
|
-
label: a(
|
|
1481
|
-
}, null, 8, ["label"])) : (t(), s("span",
|
|
1486
|
+
label: a(i)("common.loading")
|
|
1487
|
+
}, null, 8, ["label"])) : (t(), s("span", al))
|
|
1482
1488
|
])) : S("", !0),
|
|
1483
|
-
se.value !== oe.id && !H.value && ae ? (t(), x(a(
|
|
1489
|
+
se.value !== oe.id && !H.value && ae ? (t(), x(a(nt), {
|
|
1484
1490
|
key: 2,
|
|
1485
1491
|
class: "history-actions",
|
|
1486
1492
|
trigger: "click",
|
|
@@ -1488,23 +1494,23 @@ const $a = {
|
|
|
1488
1494
|
teleported: !0,
|
|
1489
1495
|
"popper-options": { strategy: "fixed" },
|
|
1490
1496
|
"popper-class": "emoo-history-dropdown",
|
|
1491
|
-
onClick:
|
|
1497
|
+
onClick: O[10] || (O[10] = le(() => {
|
|
1492
1498
|
}, ["stop"]))
|
|
1493
1499
|
}, {
|
|
1494
1500
|
dropdown: w(() => [
|
|
1495
|
-
P(a(
|
|
1501
|
+
P(a(ao), null, {
|
|
1496
1502
|
default: w(() => [
|
|
1497
|
-
|
|
1503
|
+
A(B.$slots, "row-action", { item: oe }, void 0, !0)
|
|
1498
1504
|
]),
|
|
1499
1505
|
_: 2
|
|
1500
1506
|
}, 1024)
|
|
1501
1507
|
]),
|
|
1502
1508
|
default: w(() => [
|
|
1503
|
-
P(a(
|
|
1509
|
+
P(a(et), {
|
|
1504
1510
|
link: "",
|
|
1505
1511
|
size: "small",
|
|
1506
1512
|
class: "more-btn",
|
|
1507
|
-
onClick:
|
|
1513
|
+
onClick: O[9] || (O[9] = le(() => {
|
|
1508
1514
|
}, ["stop"]))
|
|
1509
1515
|
}, {
|
|
1510
1516
|
default: w(() => [
|
|
@@ -1515,34 +1521,34 @@ const $a = {
|
|
|
1515
1521
|
]),
|
|
1516
1522
|
_: 2
|
|
1517
1523
|
}, 1024)) : S("", !0)
|
|
1518
|
-
], 42,
|
|
1524
|
+
], 42, Qa)
|
|
1519
1525
|
]),
|
|
1520
1526
|
_: 2
|
|
1521
1527
|
}, 1032, ["content", "disabled"]))), 128))
|
|
1522
|
-
]))), 128)) : (t(), x(
|
|
1528
|
+
]))), 128)) : (t(), x(Ra, {
|
|
1523
1529
|
key: 2,
|
|
1524
1530
|
variant: "mini",
|
|
1525
|
-
title: e.keyword.trim() ? u.value :
|
|
1531
|
+
title: e.keyword.trim() ? u.value : g.value
|
|
1526
1532
|
}, null, 8, ["title"]))
|
|
1527
1533
|
], 32)), [
|
|
1528
|
-
[a(
|
|
1534
|
+
[a(lo), e.loading && b.value]
|
|
1529
1535
|
])
|
|
1530
1536
|
]));
|
|
1531
1537
|
}
|
|
1532
|
-
}),
|
|
1538
|
+
}), Un = /* @__PURE__ */ Z(ll, [["__scopeId", "data-v-862f7ee9"]]), sl = {
|
|
1533
1539
|
class: "emoo-mrsel__tabs",
|
|
1534
1540
|
role: "tablist"
|
|
1535
|
-
},
|
|
1541
|
+
}, nl = ["aria-selected", "onClick"], il = { class: "emoo-mrsel__count" }, rl = {
|
|
1536
1542
|
class: "emoo-sel-remote-error",
|
|
1537
1543
|
role: "alert",
|
|
1538
1544
|
"data-testid": "remote-error"
|
|
1539
|
-
},
|
|
1545
|
+
}, dl = { class: "emoo-mrsel__opt" }, ul = ["src"], cl = { class: "emoo-mrsel__name" }, ml = {
|
|
1540
1546
|
key: 0,
|
|
1541
1547
|
class: "emoo-mrsel__dept"
|
|
1542
|
-
},
|
|
1548
|
+
}, vl = { class: "emoo-mrsel__opt" }, fl = ["src"], hl = { class: "emoo-mrsel__col" }, pl = { class: "emoo-mrsel__name" }, yl = {
|
|
1543
1549
|
key: 0,
|
|
1544
1550
|
class: "emoo-mrsel__desc"
|
|
1545
|
-
},
|
|
1551
|
+
}, bl = /* @__PURE__ */ F({
|
|
1546
1552
|
__name: "EmooMemberRoleSelect",
|
|
1547
1553
|
props: {
|
|
1548
1554
|
modelValue: {},
|
|
@@ -1556,46 +1562,46 @@ const $a = {
|
|
|
1556
1562
|
collapse: { default: 2 }
|
|
1557
1563
|
},
|
|
1558
1564
|
emits: ["update:modelValue"],
|
|
1559
|
-
setup(e, { emit:
|
|
1560
|
-
const o = e, l =
|
|
1565
|
+
setup(e, { emit: n }) {
|
|
1566
|
+
const o = e, l = n, { t: r } = me(), i = U("member"), p = V(() => o.modelValue?.memberIds ?? []), v = V(() => o.modelValue?.roleIds ?? []), g = V(() => [
|
|
1561
1567
|
{ key: "member", label: r("common.emooSelect.memberTab"), count: p.value.length },
|
|
1562
1568
|
{ key: "role", label: r("common.emooSelect.roleTab"), count: v.value.length }
|
|
1563
|
-
]), u = V(() => o.memberSource !== void 0 || o.roleSource !== void 0), b =
|
|
1569
|
+
]), u = V(() => o.memberSource !== void 0 || o.roleSource !== void 0), b = Be(() => o.memberSource, "emoo-mrsel-popper"), _ = Be(() => o.roleSource, "emoo-mrsel-popper"), y = (H) => H === "member" ? b : _, R = V(() => `${b.popperClass} ${_.popperClass}`), E = V(() => i.value === "member" ? p.value : v.value), $ = Me(
|
|
1564
1570
|
() => p.value,
|
|
1565
1571
|
() => u.value ? b.items.value : o.members ?? [],
|
|
1566
1572
|
() => o.selectedMembers ?? []
|
|
1567
|
-
),
|
|
1573
|
+
), I = Me(
|
|
1568
1574
|
() => v.value,
|
|
1569
1575
|
() => u.value ? _.items.value : o.roles ?? [],
|
|
1570
1576
|
() => o.selectedRoles ?? []
|
|
1571
|
-
),
|
|
1577
|
+
), z = $.mergedOptions, j = I.mergedOptions, X = V(() => [
|
|
1572
1578
|
...$.selectedOptions.value,
|
|
1573
|
-
...
|
|
1574
|
-
]), ie = Pe(), ee = V(() => ie.disabled !== void 0 && ie.disabled !== !1), d =
|
|
1579
|
+
...I.selectedOptions.value.map((H) => ({ ...H, square: !0 }))
|
|
1580
|
+
]), ie = Pe(), ee = V(() => ie.disabled !== void 0 && ie.disabled !== !1), d = U(!1), T = (H) => {
|
|
1575
1581
|
if (d.value = H, !H) {
|
|
1576
1582
|
b.onVisibleChange(!1), _.onVisibleChange(!1);
|
|
1577
1583
|
return;
|
|
1578
1584
|
}
|
|
1579
|
-
u.value && y(
|
|
1580
|
-
},
|
|
1581
|
-
u.value && y(
|
|
1582
|
-
}, se = V(() => u.value ? y(
|
|
1583
|
-
|
|
1585
|
+
u.value && y(i.value).onVisibleChange(!0);
|
|
1586
|
+
}, M = (H) => {
|
|
1587
|
+
u.value && y(i.value).search(H);
|
|
1588
|
+
}, se = V(() => u.value ? y(i.value).loading.value : !1), ne = V(() => u.value ? y(i.value).error.value : null), ye = () => y(i.value).retry(), q = (H) => {
|
|
1589
|
+
i.value !== H && (i.value = H, u.value && d.value && y(H).onVisibleChange(!0));
|
|
1584
1590
|
}, de = (H) => {
|
|
1585
1591
|
const te = Array.isArray(H) ? [...H] : H == null || H === "" ? [] : [H];
|
|
1586
|
-
|
|
1592
|
+
i.value === "member" ? $.remember(te) : I.remember(te), l(
|
|
1587
1593
|
"update:modelValue",
|
|
1588
|
-
|
|
1594
|
+
i.value === "member" ? { memberIds: te, roleIds: [...v.value] } : { memberIds: [...p.value], roleIds: te }
|
|
1589
1595
|
);
|
|
1590
1596
|
}, ce = (H) => {
|
|
1591
1597
|
if (ee.value) return;
|
|
1592
1598
|
const te = X.value[H];
|
|
1593
1599
|
if (!te) return;
|
|
1594
|
-
const
|
|
1595
|
-
memberIds:
|
|
1596
|
-
roleIds:
|
|
1600
|
+
const N = H < $.selectedOptions.value.length, C = {
|
|
1601
|
+
memberIds: N ? p.value.filter((L) => L !== te.id) : [...p.value],
|
|
1602
|
+
roleIds: N ? [...v.value] : v.value.filter((L) => L !== te.id)
|
|
1597
1603
|
};
|
|
1598
|
-
$.remember(C.memberIds),
|
|
1604
|
+
$.remember(C.memberIds), I.remember(C.roleIds), l("update:modelValue", C);
|
|
1599
1605
|
};
|
|
1600
1606
|
return (H, te) => (t(), x(a(Ae), {
|
|
1601
1607
|
class: "emoo-mrsel",
|
|
@@ -1605,7 +1611,7 @@ const $a = {
|
|
|
1605
1611
|
filterable: "",
|
|
1606
1612
|
"fit-input-width": "",
|
|
1607
1613
|
remote: u.value,
|
|
1608
|
-
"remote-method":
|
|
1614
|
+
"remote-method": M,
|
|
1609
1615
|
loading: se.value,
|
|
1610
1616
|
"popper-class": R.value,
|
|
1611
1617
|
"onUpdate:modelValue": de,
|
|
@@ -1620,68 +1626,68 @@ const $a = {
|
|
|
1620
1626
|
}, null, 8, ["items", "max", "removable"])
|
|
1621
1627
|
]),
|
|
1622
1628
|
header: w(() => [
|
|
1623
|
-
m("div",
|
|
1624
|
-
(t(!0), s(D, null, J(
|
|
1625
|
-
key:
|
|
1629
|
+
m("div", sl, [
|
|
1630
|
+
(t(!0), s(D, null, J(g.value, (N) => (t(), s("button", {
|
|
1631
|
+
key: N.key,
|
|
1626
1632
|
type: "button",
|
|
1627
|
-
class: W(["emoo-mrsel__tab", { "is-active":
|
|
1628
|
-
"aria-selected":
|
|
1629
|
-
onClick: (C) => q(
|
|
1633
|
+
class: W(["emoo-mrsel__tab", { "is-active": i.value === N.key }]),
|
|
1634
|
+
"aria-selected": i.value === N.key,
|
|
1635
|
+
onClick: (C) => q(N.key)
|
|
1630
1636
|
}, [
|
|
1631
|
-
|
|
1632
|
-
m("span",
|
|
1633
|
-
], 10,
|
|
1637
|
+
Y(k(N.label) + " ", 1),
|
|
1638
|
+
m("span", il, k(N.count), 1)
|
|
1639
|
+
], 10, nl))), 128))
|
|
1634
1640
|
])
|
|
1635
1641
|
]),
|
|
1636
1642
|
default: w(() => [
|
|
1637
|
-
|
|
1638
|
-
key:
|
|
1639
|
-
label:
|
|
1640
|
-
value:
|
|
1643
|
+
i.value === "member" ? (t(!0), s(D, { key: 0 }, J(a(z), (N) => (t(), x(a(ze), {
|
|
1644
|
+
key: N.id,
|
|
1645
|
+
label: N.name,
|
|
1646
|
+
value: N.id
|
|
1641
1647
|
}, {
|
|
1642
1648
|
default: w(() => [
|
|
1643
|
-
m("span",
|
|
1649
|
+
m("span", dl, [
|
|
1644
1650
|
m("span", {
|
|
1645
1651
|
class: "emoo-mrsel__avatar",
|
|
1646
|
-
style: pe({ "--tint":
|
|
1652
|
+
style: pe({ "--tint": N.color || "var(--el-color-primary)" })
|
|
1647
1653
|
}, [
|
|
1648
|
-
|
|
1654
|
+
N.avatar ? (t(), s("img", {
|
|
1649
1655
|
key: 0,
|
|
1650
|
-
src:
|
|
1656
|
+
src: N.avatar,
|
|
1651
1657
|
alt: "",
|
|
1652
1658
|
class: "emoo-mrsel__img"
|
|
1653
|
-
}, null, 8,
|
|
1654
|
-
|
|
1659
|
+
}, null, 8, ul)) : (t(), s(D, { key: 1 }, [
|
|
1660
|
+
Y(k(N.name[0]), 1)
|
|
1655
1661
|
], 64))
|
|
1656
1662
|
], 4),
|
|
1657
|
-
m("span",
|
|
1658
|
-
|
|
1663
|
+
m("span", cl, k(N.name), 1),
|
|
1664
|
+
N.dept ? (t(), s("span", ml, k(N.dept), 1)) : S("", !0)
|
|
1659
1665
|
])
|
|
1660
1666
|
]),
|
|
1661
1667
|
_: 2
|
|
1662
|
-
}, 1032, ["label", "value"]))), 128)) : (t(!0), s(D, { key: 1 }, J(a(j), (
|
|
1663
|
-
key:
|
|
1664
|
-
label:
|
|
1665
|
-
value:
|
|
1668
|
+
}, 1032, ["label", "value"]))), 128)) : (t(!0), s(D, { key: 1 }, J(a(j), (N) => (t(), x(a(ze), {
|
|
1669
|
+
key: N.id,
|
|
1670
|
+
label: N.name,
|
|
1671
|
+
value: N.id
|
|
1666
1672
|
}, {
|
|
1667
1673
|
default: w(() => [
|
|
1668
|
-
m("span",
|
|
1674
|
+
m("span", vl, [
|
|
1669
1675
|
m("span", {
|
|
1670
1676
|
class: "emoo-mrsel__avatar is-square",
|
|
1671
|
-
style: pe({ "--tint":
|
|
1677
|
+
style: pe({ "--tint": N.color || "var(--el-color-primary)" })
|
|
1672
1678
|
}, [
|
|
1673
|
-
|
|
1679
|
+
N.avatar ? (t(), s("img", {
|
|
1674
1680
|
key: 0,
|
|
1675
|
-
src:
|
|
1681
|
+
src: N.avatar,
|
|
1676
1682
|
alt: "",
|
|
1677
1683
|
class: "emoo-mrsel__img"
|
|
1678
|
-
}, null, 8,
|
|
1679
|
-
|
|
1684
|
+
}, null, 8, fl)) : (t(), s(D, { key: 1 }, [
|
|
1685
|
+
Y(k(N.name[0]), 1)
|
|
1680
1686
|
], 64))
|
|
1681
1687
|
], 4),
|
|
1682
|
-
m("span",
|
|
1683
|
-
m("span",
|
|
1684
|
-
|
|
1688
|
+
m("span", hl, [
|
|
1689
|
+
m("span", pl, k(N.name), 1),
|
|
1690
|
+
N.desc ? (t(), s("span", yl, k(N.desc), 1)) : S("", !0)
|
|
1685
1691
|
])
|
|
1686
1692
|
])
|
|
1687
1693
|
]),
|
|
@@ -1693,27 +1699,27 @@ const $a = {
|
|
|
1693
1699
|
ne.value ? {
|
|
1694
1700
|
name: "footer",
|
|
1695
1701
|
fn: w(() => [
|
|
1696
|
-
m("div",
|
|
1697
|
-
m("span", null,
|
|
1702
|
+
m("div", rl, [
|
|
1703
|
+
m("span", null, k(a(r)("common.emooSelect.loadFailed")), 1),
|
|
1698
1704
|
m("button", {
|
|
1699
1705
|
type: "button",
|
|
1700
1706
|
"data-testid": "remote-retry",
|
|
1701
|
-
onClick: te[0] || (te[0] = (
|
|
1702
|
-
},
|
|
1707
|
+
onClick: te[0] || (te[0] = (N) => ye())
|
|
1708
|
+
}, k(a(r)("common.emooSelect.retry")), 1)
|
|
1703
1709
|
])
|
|
1704
1710
|
]),
|
|
1705
1711
|
key: "0"
|
|
1706
1712
|
} : void 0
|
|
1707
1713
|
]), 1032, ["model-value", "placeholder", "remote", "loading", "popper-class"]));
|
|
1708
1714
|
}
|
|
1709
|
-
}),
|
|
1715
|
+
}), Hn = /* @__PURE__ */ Z(bl, [["__scopeId", "data-v-ff057c7b"]]), gl = { class: "emoo-msel__opt" }, kl = ["src"], $l = { class: "emoo-msel__name" }, _l = {
|
|
1710
1716
|
key: 0,
|
|
1711
1717
|
class: "emoo-msel__dept"
|
|
1712
|
-
},
|
|
1718
|
+
}, wl = {
|
|
1713
1719
|
class: "emoo-sel-remote-error",
|
|
1714
1720
|
role: "alert",
|
|
1715
1721
|
"data-testid": "remote-error"
|
|
1716
|
-
},
|
|
1722
|
+
}, Sl = /* @__PURE__ */ F({
|
|
1717
1723
|
__name: "EmooMemberSelect",
|
|
1718
1724
|
props: {
|
|
1719
1725
|
modelValue: {},
|
|
@@ -1726,12 +1732,12 @@ const $a = {
|
|
|
1726
1732
|
collapse: { default: 2 }
|
|
1727
1733
|
},
|
|
1728
1734
|
emits: ["update:modelValue"],
|
|
1729
|
-
setup(e, { emit:
|
|
1730
|
-
const o = e, l =
|
|
1735
|
+
setup(e, { emit: n }) {
|
|
1736
|
+
const o = e, l = n, { t: r } = me(), i = V(() => o.source !== void 0), { items: p, loading: v, error: g, retry: u, search: b, onVisibleChange: _, popperClass: y } = Be(() => o.source, "emoo-msel-popper"), { mergedOptions: R, selectedOptions: E, remember: $ } = Me(
|
|
1731
1737
|
() => o.modelValue,
|
|
1732
|
-
() =>
|
|
1738
|
+
() => i.value ? p.value : o.options ?? [],
|
|
1733
1739
|
() => o.selected ?? []
|
|
1734
|
-
),
|
|
1740
|
+
), I = (ee) => R.value.find((d) => d.id === ee), z = Pe(), j = V(() => z.disabled !== void 0 && z.disabled !== !1), X = (ee) => {
|
|
1735
1741
|
$(ee), l("update:modelValue", ee);
|
|
1736
1742
|
}, ie = (ee) => {
|
|
1737
1743
|
if (j.value) return;
|
|
@@ -1746,7 +1752,7 @@ const $a = {
|
|
|
1746
1752
|
clearable: !e.multiple && e.clearable,
|
|
1747
1753
|
filterable: "",
|
|
1748
1754
|
"fit-input-width": "",
|
|
1749
|
-
remote:
|
|
1755
|
+
remote: i.value,
|
|
1750
1756
|
"remote-method": a(b),
|
|
1751
1757
|
loading: a(v),
|
|
1752
1758
|
"popper-class": a(y),
|
|
@@ -1754,13 +1760,13 @@ const $a = {
|
|
|
1754
1760
|
onVisibleChange: a(_)
|
|
1755
1761
|
}, Se({
|
|
1756
1762
|
default: w(() => [
|
|
1757
|
-
(t(!0), s(D, null, J(a(R), (T) => (t(), x(a(
|
|
1763
|
+
(t(!0), s(D, null, J(a(R), (T) => (t(), x(a(ze), {
|
|
1758
1764
|
key: T.id,
|
|
1759
1765
|
label: T.name,
|
|
1760
1766
|
value: T.id
|
|
1761
1767
|
}, {
|
|
1762
1768
|
default: w(() => [
|
|
1763
|
-
m("span",
|
|
1769
|
+
m("span", gl, [
|
|
1764
1770
|
m("span", {
|
|
1765
1771
|
class: "emoo-msel__avatar",
|
|
1766
1772
|
style: pe({ "--tint": T.color || "var(--el-color-primary)" })
|
|
@@ -1770,12 +1776,12 @@ const $a = {
|
|
|
1770
1776
|
src: T.avatar,
|
|
1771
1777
|
alt: "",
|
|
1772
1778
|
class: "emoo-msel__img"
|
|
1773
|
-
}, null, 8,
|
|
1774
|
-
|
|
1779
|
+
}, null, 8, kl)) : (t(), s(D, { key: 1 }, [
|
|
1780
|
+
Y(k(T.name[0]), 1)
|
|
1775
1781
|
], 64))
|
|
1776
1782
|
], 4),
|
|
1777
|
-
m("span",
|
|
1778
|
-
T.dept ? (t(), s("span",
|
|
1783
|
+
m("span", $l, k(T.name), 1),
|
|
1784
|
+
T.dept ? (t(), s("span", _l, k(T.dept), 1)) : S("", !0)
|
|
1779
1785
|
])
|
|
1780
1786
|
]),
|
|
1781
1787
|
_: 2
|
|
@@ -1797,69 +1803,69 @@ const $a = {
|
|
|
1797
1803
|
} : {
|
|
1798
1804
|
name: "label",
|
|
1799
1805
|
fn: w(({ value: T }) => [
|
|
1800
|
-
|
|
1806
|
+
I(T) ? (t(), x(xe, {
|
|
1801
1807
|
key: 0,
|
|
1802
|
-
items: [
|
|
1808
|
+
items: [I(T)]
|
|
1803
1809
|
}, null, 8, ["items"])) : S("", !0)
|
|
1804
1810
|
]),
|
|
1805
1811
|
key: "0"
|
|
1806
1812
|
},
|
|
1807
|
-
a(
|
|
1813
|
+
a(g) ? {
|
|
1808
1814
|
name: "footer",
|
|
1809
1815
|
fn: w(() => [
|
|
1810
|
-
m("div",
|
|
1811
|
-
m("span", null,
|
|
1816
|
+
m("div", wl, [
|
|
1817
|
+
m("span", null, k(a(r)("common.emooSelect.loadFailed")), 1),
|
|
1812
1818
|
m("button", {
|
|
1813
1819
|
type: "button",
|
|
1814
1820
|
"data-testid": "remote-retry",
|
|
1815
1821
|
onClick: d[0] || (d[0] = //@ts-ignore
|
|
1816
1822
|
(...T) => a(u) && a(u)(...T))
|
|
1817
|
-
},
|
|
1823
|
+
}, k(a(r)("common.emooSelect.retry")), 1)
|
|
1818
1824
|
])
|
|
1819
1825
|
]),
|
|
1820
1826
|
key: "2"
|
|
1821
1827
|
} : void 0
|
|
1822
1828
|
]), 1032, ["model-value", "multiple", "placeholder", "clearable", "remote", "remote-method", "loading", "popper-class", "onVisibleChange"]));
|
|
1823
1829
|
}
|
|
1824
|
-
}),
|
|
1830
|
+
}), Kn = /* @__PURE__ */ Z(Sl, [["__scopeId", "data-v-f6059e7c"]]), Cl = ["data-testid", "data-role"], El = {
|
|
1825
1831
|
key: 0,
|
|
1826
1832
|
class: "emoo-message__side"
|
|
1827
|
-
},
|
|
1833
|
+
}, Tl = {
|
|
1828
1834
|
key: 0,
|
|
1829
1835
|
class: "emoo-message__avatar"
|
|
1830
|
-
},
|
|
1836
|
+
}, xl = ["src"], Il = { class: "emoo-message__main" }, zl = {
|
|
1831
1837
|
key: 0,
|
|
1832
1838
|
class: "emoo-message__name"
|
|
1833
|
-
},
|
|
1839
|
+
}, Rl = ["data-status"], Vl = {
|
|
1834
1840
|
key: 0,
|
|
1835
1841
|
class: "emoo-message__dots",
|
|
1836
1842
|
"aria-label": "loading",
|
|
1837
1843
|
role: "status"
|
|
1838
|
-
},
|
|
1844
|
+
}, Bl = {
|
|
1839
1845
|
key: 1,
|
|
1840
1846
|
class: "emoo-message__stopped"
|
|
1841
|
-
},
|
|
1847
|
+
}, Ml = {
|
|
1842
1848
|
key: 2,
|
|
1843
1849
|
class: "emoo-message__error"
|
|
1844
|
-
},
|
|
1850
|
+
}, Dl = {
|
|
1845
1851
|
key: 4,
|
|
1846
1852
|
class: "emoo-message__attachments"
|
|
1847
|
-
},
|
|
1853
|
+
}, Pl = {
|
|
1848
1854
|
key: 1,
|
|
1849
1855
|
class: "emoo-message__foot"
|
|
1850
|
-
},
|
|
1856
|
+
}, Al = {
|
|
1851
1857
|
key: 0,
|
|
1852
1858
|
class: "emoo-message__time"
|
|
1853
|
-
},
|
|
1859
|
+
}, Ll = {
|
|
1854
1860
|
key: 1,
|
|
1855
1861
|
class: "emoo-message__actions"
|
|
1856
|
-
},
|
|
1862
|
+
}, Ol = {
|
|
1857
1863
|
key: 1,
|
|
1858
1864
|
class: "emoo-message__side"
|
|
1859
|
-
},
|
|
1865
|
+
}, Ul = {
|
|
1860
1866
|
key: 0,
|
|
1861
1867
|
class: "emoo-message__avatar"
|
|
1862
|
-
},
|
|
1868
|
+
}, Hl = ["src"], Kl = /* @__PURE__ */ F({
|
|
1863
1869
|
__name: "EmooMessage",
|
|
1864
1870
|
props: {
|
|
1865
1871
|
role: {},
|
|
@@ -1871,59 +1877,59 @@ const $a = {
|
|
|
1871
1877
|
testid: {}
|
|
1872
1878
|
},
|
|
1873
1879
|
setup(e) {
|
|
1874
|
-
const { t:
|
|
1880
|
+
const { t: n } = me();
|
|
1875
1881
|
return (o, l) => (t(), s("div", {
|
|
1876
1882
|
class: W(["emoo-message", [`is-${e.role}`, `is-${e.status}`]]),
|
|
1877
1883
|
"data-testid": e.testid,
|
|
1878
1884
|
"data-role": e.role
|
|
1879
1885
|
}, [
|
|
1880
|
-
e.role === "assistant" || e.role === "system" ? (t(), s("div",
|
|
1881
|
-
|
|
1882
|
-
e.avatar ? (t(), s("span",
|
|
1886
|
+
e.role === "assistant" || e.role === "system" ? (t(), s("div", El, [
|
|
1887
|
+
A(o.$slots, "avatar", {}, () => [
|
|
1888
|
+
e.avatar ? (t(), s("span", Tl, [
|
|
1883
1889
|
m("img", {
|
|
1884
1890
|
src: e.avatar,
|
|
1885
1891
|
alt: ""
|
|
1886
|
-
}, null, 8,
|
|
1892
|
+
}, null, 8, xl)
|
|
1887
1893
|
])) : S("", !0)
|
|
1888
1894
|
], !0)
|
|
1889
1895
|
])) : S("", !0),
|
|
1890
|
-
m("div",
|
|
1891
|
-
e.role === "system" && e.name ? (t(), s("div",
|
|
1896
|
+
m("div", Il, [
|
|
1897
|
+
e.role === "system" && e.name ? (t(), s("div", zl, k(e.name), 1)) : S("", !0),
|
|
1892
1898
|
m("div", {
|
|
1893
1899
|
class: "emoo-message__body",
|
|
1894
1900
|
"data-status": e.status
|
|
1895
1901
|
}, [
|
|
1896
|
-
e.status === "loading" ? (t(), s("span",
|
|
1902
|
+
e.status === "loading" ? (t(), s("span", Vl, [...l[0] || (l[0] = [
|
|
1897
1903
|
m("i", null, null, -1),
|
|
1898
1904
|
m("i", null, null, -1),
|
|
1899
1905
|
m("i", null, null, -1)
|
|
1900
|
-
])])) : e.status === "stopped" ? (t(), s("span",
|
|
1901
|
-
|
|
1906
|
+
])])) : e.status === "stopped" ? (t(), s("span", Bl, k(a(n)("common.emooMessage.stopped")), 1)) : e.status === "error" ? (t(), s("span", Ml, k(e.text || a(n)("common.emooMessage.failed")), 1)) : A(o.$slots, "default", {}, () => [
|
|
1907
|
+
Y(k(e.text), 1)
|
|
1902
1908
|
], !0, 3),
|
|
1903
|
-
o.$slots.attachments ? (t(), s("div",
|
|
1904
|
-
|
|
1909
|
+
o.$slots.attachments ? (t(), s("div", Dl, [
|
|
1910
|
+
A(o.$slots, "attachments", {}, void 0, !0)
|
|
1905
1911
|
])) : S("", !0)
|
|
1906
|
-
], 8,
|
|
1907
|
-
e.time || o.$slots.actions ? (t(), s("div",
|
|
1908
|
-
e.time ? (t(), s("span",
|
|
1909
|
-
o.$slots.actions ? (t(), s("span",
|
|
1910
|
-
|
|
1912
|
+
], 8, Rl),
|
|
1913
|
+
e.time || o.$slots.actions ? (t(), s("div", Pl, [
|
|
1914
|
+
e.time ? (t(), s("span", Al, k(e.time), 1)) : S("", !0),
|
|
1915
|
+
o.$slots.actions ? (t(), s("span", Ll, [
|
|
1916
|
+
A(o.$slots, "actions", {}, void 0, !0)
|
|
1911
1917
|
])) : S("", !0)
|
|
1912
1918
|
])) : S("", !0)
|
|
1913
1919
|
]),
|
|
1914
|
-
e.role === "user" ? (t(), s("div",
|
|
1915
|
-
|
|
1916
|
-
e.avatar ? (t(), s("span",
|
|
1920
|
+
e.role === "user" ? (t(), s("div", Ol, [
|
|
1921
|
+
A(o.$slots, "avatar", {}, () => [
|
|
1922
|
+
e.avatar ? (t(), s("span", Ul, [
|
|
1917
1923
|
m("img", {
|
|
1918
1924
|
src: e.avatar,
|
|
1919
1925
|
alt: ""
|
|
1920
|
-
}, null, 8,
|
|
1926
|
+
}, null, 8, Hl)
|
|
1921
1927
|
])) : S("", !0)
|
|
1922
1928
|
], !0)
|
|
1923
1929
|
])) : S("", !0)
|
|
1924
|
-
], 10,
|
|
1930
|
+
], 10, Cl));
|
|
1925
1931
|
}
|
|
1926
|
-
}),
|
|
1932
|
+
}), Wn = /* @__PURE__ */ Z(Kl, [["__scopeId", "data-v-fca7a127"]]), Wl = /* @__PURE__ */ F({
|
|
1927
1933
|
__name: "EmooNavMenu",
|
|
1928
1934
|
props: {
|
|
1929
1935
|
items: {},
|
|
@@ -1933,16 +1939,16 @@ const $a = {
|
|
|
1933
1939
|
touch: { type: Boolean, default: !1 }
|
|
1934
1940
|
},
|
|
1935
1941
|
emits: ["select", "group-select"],
|
|
1936
|
-
setup(e, { emit:
|
|
1937
|
-
const o = e, l =
|
|
1942
|
+
setup(e, { emit: n }) {
|
|
1943
|
+
const o = e, l = n, { t: r } = me(), i = Et(), p = St(/* @__PURE__ */ new Map()), v = (d) => typeof d.title == "string" ? r(d.title) : d.title, g = (d) => !!(d.children && d.children.length > 0), u = V(
|
|
1938
1944
|
() => o.items.filter((d) => !d.hidden && o.canShow(d))
|
|
1939
|
-
), b = (d) => (d.children ?? []).filter((T) => !T.hidden && o.canShow(T)), _ = V(() => o.activePath ?? ""), y = (d) => !!d.action && !d.path && !d.children, R = (d) => d.active ?? _.value === (d.path || d.key), E = (d) => d.path && _.value.startsWith(d.path) ? !0 : (d.children ?? []).some((T) => T.path && _.value.startsWith(T.path) || E(T)), $ = (d) => p.get(d.key) ?? E(d),
|
|
1945
|
+
), b = (d) => (d.children ?? []).filter((T) => !T.hidden && o.canShow(T)), _ = V(() => o.activePath ?? ""), y = (d) => !!d.action && !d.path && !d.children, R = (d) => d.active ?? _.value === (d.path || d.key), E = (d) => d.path && _.value.startsWith(d.path) ? !0 : (d.children ?? []).some((T) => T.path && _.value.startsWith(T.path) || E(T)), $ = (d) => p.get(d.key) ?? E(d), I = (d) => `emoo-nav-${d.key.replace(/[^a-zA-Z0-9_-]/g, "-")}-children`, z = (d) => {
|
|
1940
1946
|
const T = !$(d);
|
|
1941
1947
|
p.set(d.key, T), T && d.path && o.navigate?.(d.path), l("group-select", d, T);
|
|
1942
1948
|
}, j = (d) => {
|
|
1943
1949
|
l("select", d), d.path ? o.navigate?.(d.path) : d.action && d.action();
|
|
1944
1950
|
}, X = (d) => d.badge !== void 0 && d.badge !== "" ? ve("span", { class: "menu-badge" }, String(d.badge)) : null, ie = (d) => d.trailing ? ve(d.trailing, { class: "trailing-ic" }) : null, ee = (d, T) => {
|
|
1945
|
-
if (!
|
|
1951
|
+
if (!g(d))
|
|
1946
1952
|
return T === 0 ? ve("button", {
|
|
1947
1953
|
type: "button",
|
|
1948
1954
|
class: ["single-menu-item", {
|
|
@@ -1956,7 +1962,7 @@ const $a = {
|
|
|
1956
1962
|
ne.stopPropagation(), j(d);
|
|
1957
1963
|
}
|
|
1958
1964
|
}, [
|
|
1959
|
-
|
|
1965
|
+
i.leading?.({ item: d }) ?? (d.icon ? ve(d.icon, { class: "ic" }) : null),
|
|
1960
1966
|
ve("span", { class: "menu-title" }, v(d)),
|
|
1961
1967
|
ie(d),
|
|
1962
1968
|
X(d)
|
|
@@ -1973,38 +1979,38 @@ const $a = {
|
|
|
1973
1979
|
ie(d),
|
|
1974
1980
|
X(d)
|
|
1975
1981
|
]);
|
|
1976
|
-
const
|
|
1982
|
+
const M = $(d), se = T === 0 ? ve("button", {
|
|
1977
1983
|
type: "button",
|
|
1978
|
-
class: ["menu-group-title", { "is-open":
|
|
1979
|
-
"aria-expanded": String(
|
|
1980
|
-
"aria-controls":
|
|
1984
|
+
class: ["menu-group-title", { "is-open": M }],
|
|
1985
|
+
"aria-expanded": String(M),
|
|
1986
|
+
"aria-controls": I(d),
|
|
1981
1987
|
"data-testid": d.testid ? `${d.testid}-group` : void 0,
|
|
1982
1988
|
onClick: (ne) => {
|
|
1983
|
-
ne.stopPropagation(),
|
|
1989
|
+
ne.stopPropagation(), z(d);
|
|
1984
1990
|
}
|
|
1985
1991
|
}, [
|
|
1986
|
-
|
|
1992
|
+
i.leading?.({ item: d }) ?? (d.icon ? ve(d.icon, { class: "ic" }) : null),
|
|
1987
1993
|
ve("span", { class: "menu-title" }, v(d)),
|
|
1988
1994
|
X(d),
|
|
1989
|
-
ve(
|
|
1995
|
+
ve(Ge, { class: "tree-caret" })
|
|
1990
1996
|
]) : ve("button", {
|
|
1991
1997
|
type: "button",
|
|
1992
|
-
class: ["child-menu-item", "menu-group-child-title", { "is-open":
|
|
1993
|
-
"aria-expanded": String(
|
|
1994
|
-
"aria-controls":
|
|
1998
|
+
class: ["child-menu-item", "menu-group-child-title", { "is-open": M }],
|
|
1999
|
+
"aria-expanded": String(M),
|
|
2000
|
+
"aria-controls": I(d),
|
|
1995
2001
|
"data-testid": d.testid ? `${d.testid}-group` : void 0,
|
|
1996
2002
|
onClick: (ne) => {
|
|
1997
|
-
ne.stopPropagation(),
|
|
2003
|
+
ne.stopPropagation(), z(d);
|
|
1998
2004
|
}
|
|
1999
2005
|
}, [
|
|
2000
2006
|
ve("span", { class: "child-menu-title" }, v(d)),
|
|
2001
|
-
ve(
|
|
2007
|
+
ve(Ge, { class: "tree-caret" })
|
|
2002
2008
|
]);
|
|
2003
2009
|
return ve("div", { class: "menu-group" }, [
|
|
2004
2010
|
se,
|
|
2005
2011
|
ve("div", {
|
|
2006
|
-
id:
|
|
2007
|
-
class: ["children-container", { expanded:
|
|
2012
|
+
id: I(d),
|
|
2013
|
+
class: ["children-container", { expanded: M }],
|
|
2008
2014
|
role: "group",
|
|
2009
2015
|
"aria-label": v(d)
|
|
2010
2016
|
}, b(d).map((ne) => [
|
|
@@ -2016,12 +2022,12 @@ const $a = {
|
|
|
2016
2022
|
return (d, T) => (t(), s("nav", {
|
|
2017
2023
|
class: W(["emoo-nav", { "is-touch": e.touch }])
|
|
2018
2024
|
}, [
|
|
2019
|
-
(t(!0), s(D, null, J(u.value, (
|
|
2020
|
-
key:
|
|
2025
|
+
(t(!0), s(D, null, J(u.value, (M) => (t(), x(Ie(ee(M, 0)), {
|
|
2026
|
+
key: M.key
|
|
2021
2027
|
}))), 128))
|
|
2022
2028
|
], 2));
|
|
2023
2029
|
}
|
|
2024
|
-
}),
|
|
2030
|
+
}), Nn = /* @__PURE__ */ Z(Wl, [["__scopeId", "data-v-ebbf674d"]]), Nl = { class: "emoo-nav-segmented" }, Fl = ["onClick"], ql = /* @__PURE__ */ F({
|
|
2025
2031
|
__name: "EmooNavSegmented",
|
|
2026
2032
|
props: {
|
|
2027
2033
|
items: {},
|
|
@@ -2029,26 +2035,26 @@ const $a = {
|
|
|
2029
2035
|
navigate: {}
|
|
2030
2036
|
},
|
|
2031
2037
|
emits: ["select"],
|
|
2032
|
-
setup(e, { emit:
|
|
2033
|
-
const o = e, l =
|
|
2038
|
+
setup(e, { emit: n }) {
|
|
2039
|
+
const o = e, l = n, { t: r } = me(), i = (v) => typeof v.title == "string" ? r(v.title) : v.title, p = (v) => {
|
|
2034
2040
|
l("select", v), v.path && o.navigate?.(v.path);
|
|
2035
2041
|
};
|
|
2036
|
-
return (v,
|
|
2042
|
+
return (v, g) => (t(), s("nav", Nl, [
|
|
2037
2043
|
(t(!0), s(D, null, J(e.items, (u) => (t(), s("button", {
|
|
2038
2044
|
key: u.key,
|
|
2039
2045
|
type: "button",
|
|
2040
2046
|
class: W(["emoo-nav-segmented__item", { "is-active": u.key === e.activeKey }]),
|
|
2041
2047
|
onClick: le((b) => p(u), ["stop"])
|
|
2042
2048
|
}, [
|
|
2043
|
-
u.icon ? (t(), x(
|
|
2049
|
+
u.icon ? (t(), x(Ie(u.icon), {
|
|
2044
2050
|
key: 0,
|
|
2045
2051
|
"aria-hidden": "true"
|
|
2046
2052
|
})) : S("", !0),
|
|
2047
|
-
m("span", null,
|
|
2048
|
-
], 10,
|
|
2053
|
+
m("span", null, k(i(u)), 1)
|
|
2054
|
+
], 10, Fl))), 128))
|
|
2049
2055
|
]));
|
|
2050
2056
|
}
|
|
2051
|
-
}),
|
|
2057
|
+
}), Fn = /* @__PURE__ */ Z(ql, [["__scopeId", "data-v-a88dea1a"]]), jl = /* @__PURE__ */ F({
|
|
2052
2058
|
__name: "EmooOptionRows",
|
|
2053
2059
|
props: {
|
|
2054
2060
|
options: {},
|
|
@@ -2059,24 +2065,24 @@ const $a = {
|
|
|
2059
2065
|
testid: {}
|
|
2060
2066
|
},
|
|
2061
2067
|
emits: ["update:modelValue"],
|
|
2062
|
-
setup(e, { emit:
|
|
2063
|
-
const o = e, l =
|
|
2064
|
-
o.disabled || o.modelValue !== v || (
|
|
2065
|
-
},
|
|
2068
|
+
setup(e, { emit: n }) {
|
|
2069
|
+
const o = e, l = n, r = (v, g) => {
|
|
2070
|
+
o.disabled || o.modelValue !== v || (g.preventDefault(), g.stopPropagation(), l("update:modelValue", null));
|
|
2071
|
+
}, i = (v) => {
|
|
2066
2072
|
v == null ? l("update:modelValue", null) : (typeof v == "string" || typeof v == "number") && l("update:modelValue", v);
|
|
2067
2073
|
}, p = (v) => {
|
|
2068
2074
|
l("update:modelValue", Array.isArray(v) ? v.filter(
|
|
2069
|
-
(
|
|
2075
|
+
(g) => typeof g == "string" || typeof g == "number"
|
|
2070
2076
|
) : []);
|
|
2071
2077
|
};
|
|
2072
|
-
return (v,
|
|
2078
|
+
return (v, g) => (t(), s("div", {
|
|
2073
2079
|
class: W(["emoo-option-rows", { "emoo-option-rows--inline": e.inline }])
|
|
2074
2080
|
}, [
|
|
2075
2081
|
e.options.length > 4 ? (t(), s("div", {
|
|
2076
2082
|
key: 0,
|
|
2077
2083
|
class: W(["emoo-option-rows__choices", { "emoo-option-rows__choices--inline": e.inline }])
|
|
2078
2084
|
}, [
|
|
2079
|
-
P(
|
|
2085
|
+
P(sa, {
|
|
2080
2086
|
class: "emoo-option-rows__select",
|
|
2081
2087
|
options: e.options,
|
|
2082
2088
|
"model-value": e.modelValue,
|
|
@@ -2084,9 +2090,9 @@ const $a = {
|
|
|
2084
2090
|
disabled: e.disabled,
|
|
2085
2091
|
clearable: !e.multiple,
|
|
2086
2092
|
testid: e.testid,
|
|
2087
|
-
"onUpdate:modelValue":
|
|
2093
|
+
"onUpdate:modelValue": g[0] || (g[0] = (u) => e.multiple ? p(u) : i(u))
|
|
2088
2094
|
}, null, 8, ["options", "model-value", "multiple", "disabled", "clearable", "testid"])
|
|
2089
|
-
], 2)) : e.multiple ? (t(), x(a(
|
|
2095
|
+
], 2)) : e.multiple ? (t(), x(a(xt), {
|
|
2090
2096
|
key: 2,
|
|
2091
2097
|
class: W(["emoo-option-rows__choices", { "emoo-option-rows__choices--inline": e.inline }]),
|
|
2092
2098
|
"model-value": e.modelValue ?? [],
|
|
@@ -2094,25 +2100,25 @@ const $a = {
|
|
|
2094
2100
|
"onUpdate:modelValue": p
|
|
2095
2101
|
}, {
|
|
2096
2102
|
default: w(() => [
|
|
2097
|
-
(t(!0), s(D, null, J(e.options, (u) => (t(), x(a(
|
|
2103
|
+
(t(!0), s(D, null, J(e.options, (u) => (t(), x(a(st), {
|
|
2098
2104
|
key: `${typeof u.value}:${u.value}`,
|
|
2099
2105
|
value: u.value,
|
|
2100
2106
|
"data-testid": e.testid ? `${e.testid}-${String(u.value)}` : void 0,
|
|
2101
2107
|
border: ""
|
|
2102
2108
|
}, {
|
|
2103
2109
|
default: w(() => [
|
|
2104
|
-
|
|
2110
|
+
Y(k(u.label), 1)
|
|
2105
2111
|
]),
|
|
2106
2112
|
_: 2
|
|
2107
2113
|
}, 1032, ["value", "data-testid"]))), 128))
|
|
2108
2114
|
]),
|
|
2109
2115
|
_: 1
|
|
2110
|
-
}, 8, ["class", "model-value", "disabled"])) : (t(), x(a(
|
|
2116
|
+
}, 8, ["class", "model-value", "disabled"])) : (t(), x(a(It), {
|
|
2111
2117
|
key: 1,
|
|
2112
2118
|
class: W(["emoo-option-rows__choices", { "emoo-option-rows__choices--inline": e.inline }]),
|
|
2113
2119
|
"model-value": Array.isArray(e.modelValue) ? void 0 : e.modelValue ?? void 0,
|
|
2114
2120
|
disabled: e.disabled,
|
|
2115
|
-
"onUpdate:modelValue":
|
|
2121
|
+
"onUpdate:modelValue": i
|
|
2116
2122
|
}, {
|
|
2117
2123
|
default: w(() => [
|
|
2118
2124
|
(t(!0), s(D, null, J(e.options, (u) => (t(), x(a(zt), {
|
|
@@ -2123,31 +2129,31 @@ const $a = {
|
|
|
2123
2129
|
onClickCapture: (b) => r(u.value, b)
|
|
2124
2130
|
}, {
|
|
2125
2131
|
default: w(() => [
|
|
2126
|
-
|
|
2132
|
+
Y(k(u.label), 1)
|
|
2127
2133
|
]),
|
|
2128
2134
|
_: 2
|
|
2129
2135
|
}, 1032, ["value", "data-testid", "onClickCapture"]))), 128))
|
|
2130
2136
|
]),
|
|
2131
2137
|
_: 1
|
|
2132
2138
|
}, 8, ["class", "model-value", "disabled"])),
|
|
2133
|
-
|
|
2139
|
+
A(v.$slots, "append", {}, void 0, !0)
|
|
2134
2140
|
], 2));
|
|
2135
2141
|
}
|
|
2136
|
-
}),
|
|
2142
|
+
}), qn = /* @__PURE__ */ Z(jl, [["__scopeId", "data-v-44e7d258"]]), Gl = {
|
|
2137
2143
|
key: 0,
|
|
2138
2144
|
class: "emt-foot",
|
|
2139
2145
|
"data-testid": "emt-foot"
|
|
2140
|
-
},
|
|
2146
|
+
}, Xl = { class: "emt-foot__info" }, Jl = { class: "emt-foot__right" }, Yl = ["aria-label"], Zl = {
|
|
2141
2147
|
class: "emt-foot__size",
|
|
2142
2148
|
type: "button",
|
|
2143
2149
|
"data-testid": "emt-pagesize"
|
|
2144
|
-
},
|
|
2150
|
+
}, Ql = { class: "emt-colmenu__list" }, es = { class: "emt-tick" }, ts = {
|
|
2145
2151
|
class: "emt-pager",
|
|
2146
2152
|
"data-testid": "emt-pager"
|
|
2147
|
-
},
|
|
2153
|
+
}, os = ["disabled", "aria-label"], as = ["data-testid", "onClick"], ls = {
|
|
2148
2154
|
key: 1,
|
|
2149
2155
|
class: "emt-pager__btn is-ellipsis"
|
|
2150
|
-
},
|
|
2156
|
+
}, ss = ["disabled", "aria-label"], ns = /* @__PURE__ */ F({
|
|
2151
2157
|
__name: "EmooPagination",
|
|
2152
2158
|
props: {
|
|
2153
2159
|
total: {},
|
|
@@ -2158,10 +2164,10 @@ const $a = {
|
|
|
2158
2164
|
densityBase: { default: "standard" }
|
|
2159
2165
|
},
|
|
2160
2166
|
emits: ["update:page", "update:pageSize", "update:density"],
|
|
2161
|
-
setup(e, { emit:
|
|
2162
|
-
const o = e, l =
|
|
2163
|
-
const E = p.value, $ =
|
|
2164
|
-
return E <= 7 ? Array.from({ length: E }, (
|
|
2167
|
+
setup(e, { emit: n }) {
|
|
2168
|
+
const o = e, l = n, { t: r } = me(), i = V(() => o.page), p = V(() => Math.max(1, Math.ceil(o.total / o.pageSize))), v = V(() => (i.value - 1) * o.pageSize + 1), g = V(() => Math.min(o.total, i.value * o.pageSize)), u = (E) => E.toLocaleString(), b = V(() => {
|
|
2169
|
+
const E = p.value, $ = i.value;
|
|
2170
|
+
return E <= 7 ? Array.from({ length: E }, (I, z) => z + 1) : $ <= 4 ? [1, 2, 3, 4, 5, "…", E] : $ >= E - 3 ? [1, "…", E - 4, E - 3, E - 2, E - 1, E] : [1, "…", $ - 1, $, $ + 1, "…", E];
|
|
2165
2171
|
}), _ = (E) => {
|
|
2166
2172
|
const $ = Math.min(Math.max(1, E), p.value);
|
|
2167
2173
|
$ !== o.page && l("update:page", $);
|
|
@@ -2174,9 +2180,9 @@ const $a = {
|
|
|
2174
2180
|
const R = V(
|
|
2175
2181
|
() => o.density === "compact" ? r(o.densityBase === "comfort" ? "common.emooTable.switchToComfort" : "common.emooTable.switchToStandard") : r("common.emooTable.switchToCompact")
|
|
2176
2182
|
);
|
|
2177
|
-
return (E, $) => e.total > 0 ? (t(), s("footer",
|
|
2178
|
-
m("span",
|
|
2179
|
-
m("div",
|
|
2183
|
+
return (E, $) => e.total > 0 ? (t(), s("footer", Gl, [
|
|
2184
|
+
m("span", Xl, k(a(r)("common.emooTable.totalInfo", { total: u(e.total), from: u(v.value), to: u(g.value) })), 1),
|
|
2185
|
+
m("div", Jl, [
|
|
2180
2186
|
e.density ? (t(), x(he, {
|
|
2181
2187
|
key: 0,
|
|
2182
2188
|
content: R.value,
|
|
@@ -2188,48 +2194,48 @@ const $a = {
|
|
|
2188
2194
|
type: "button",
|
|
2189
2195
|
"aria-label": R.value,
|
|
2190
2196
|
"data-testid": "emt-density",
|
|
2191
|
-
onClick: $[0] || ($[0] = (
|
|
2197
|
+
onClick: $[0] || ($[0] = (I) => l("update:density", e.density === "compact" ? "default" : "compact"))
|
|
2192
2198
|
}, [
|
|
2193
|
-
P(a(
|
|
2199
|
+
P(a(go), {
|
|
2194
2200
|
size: 14,
|
|
2195
2201
|
"aria-hidden": "true"
|
|
2196
2202
|
})
|
|
2197
|
-
], 10,
|
|
2203
|
+
], 10, Yl)
|
|
2198
2204
|
]),
|
|
2199
2205
|
_: 1
|
|
2200
2206
|
}, 8, ["content"])) : S("", !0),
|
|
2201
|
-
P(a(
|
|
2207
|
+
P(a(nt), {
|
|
2202
2208
|
trigger: "click",
|
|
2203
2209
|
placement: "top-end",
|
|
2204
2210
|
"popper-class": "emt-colmenu",
|
|
2205
|
-
onCommand: $[1] || ($[1] = (
|
|
2211
|
+
onCommand: $[1] || ($[1] = (I) => y(Number(I)))
|
|
2206
2212
|
}, {
|
|
2207
2213
|
dropdown: w(() => [
|
|
2208
|
-
m("div",
|
|
2209
|
-
(t(!0), s(D, null, J(e.pageSizes, (
|
|
2210
|
-
key:
|
|
2211
|
-
class: W(["emt-colmenu__item", { "is-on":
|
|
2212
|
-
command:
|
|
2213
|
-
"data-testid": `emt-pagesize-${
|
|
2214
|
+
m("div", Ql, [
|
|
2215
|
+
(t(!0), s(D, null, J(e.pageSizes, (I) => (t(), x(a(so), {
|
|
2216
|
+
key: I,
|
|
2217
|
+
class: W(["emt-colmenu__item", { "is-on": I === e.pageSize }]),
|
|
2218
|
+
command: I,
|
|
2219
|
+
"data-testid": `emt-pagesize-${I}`
|
|
2214
2220
|
}, {
|
|
2215
2221
|
default: w(() => [
|
|
2216
|
-
m("span",
|
|
2217
|
-
|
|
2222
|
+
m("span", es, [
|
|
2223
|
+
I === e.pageSize ? (t(), x(a(Dt), {
|
|
2218
2224
|
key: 0,
|
|
2219
2225
|
size: 13,
|
|
2220
2226
|
"aria-hidden": "true"
|
|
2221
2227
|
})) : S("", !0)
|
|
2222
2228
|
]),
|
|
2223
|
-
|
|
2229
|
+
Y(k(a(r)("common.emooTable.perPage", { n: I })), 1)
|
|
2224
2230
|
]),
|
|
2225
2231
|
_: 2
|
|
2226
2232
|
}, 1032, ["class", "command", "data-testid"]))), 128))
|
|
2227
2233
|
])
|
|
2228
2234
|
]),
|
|
2229
2235
|
default: w(() => [
|
|
2230
|
-
m("button",
|
|
2231
|
-
|
|
2232
|
-
P(a(
|
|
2236
|
+
m("button", Zl, [
|
|
2237
|
+
Y(k(a(r)("common.emooTable.perPage", { n: e.pageSize })) + " ", 1),
|
|
2238
|
+
P(a(rt), {
|
|
2233
2239
|
size: 11,
|
|
2234
2240
|
"aria-hidden": "true"
|
|
2235
2241
|
})
|
|
@@ -2237,79 +2243,79 @@ const $a = {
|
|
|
2237
2243
|
]),
|
|
2238
2244
|
_: 1
|
|
2239
2245
|
}),
|
|
2240
|
-
m("div",
|
|
2246
|
+
m("div", ts, [
|
|
2241
2247
|
m("button", {
|
|
2242
2248
|
class: "emt-pager__btn",
|
|
2243
2249
|
type: "button",
|
|
2244
|
-
disabled:
|
|
2250
|
+
disabled: i.value <= 1,
|
|
2245
2251
|
"aria-label": a(r)("common.emooTable.prevPage"),
|
|
2246
2252
|
"data-testid": "emt-page-prev",
|
|
2247
|
-
onClick: $[2] || ($[2] = (
|
|
2253
|
+
onClick: $[2] || ($[2] = (I) => _(i.value - 1))
|
|
2248
2254
|
}, [
|
|
2249
|
-
P(a(
|
|
2255
|
+
P(a(Pt), {
|
|
2250
2256
|
size: 14,
|
|
2251
2257
|
"aria-hidden": "true"
|
|
2252
2258
|
})
|
|
2253
|
-
], 8,
|
|
2254
|
-
(t(!0), s(D, null, J(b.value, (
|
|
2255
|
-
typeof
|
|
2259
|
+
], 8, os),
|
|
2260
|
+
(t(!0), s(D, null, J(b.value, (I, z) => (t(), s(D, { key: z }, [
|
|
2261
|
+
typeof I == "number" ? (t(), s("button", {
|
|
2256
2262
|
key: 0,
|
|
2257
|
-
class: W(["emt-pager__btn", { "is-active":
|
|
2263
|
+
class: W(["emt-pager__btn", { "is-active": I === i.value }]),
|
|
2258
2264
|
type: "button",
|
|
2259
|
-
"data-testid": `emt-page-${
|
|
2260
|
-
onClick: (j) => _(
|
|
2261
|
-
},
|
|
2265
|
+
"data-testid": `emt-page-${I}`,
|
|
2266
|
+
onClick: (j) => _(I)
|
|
2267
|
+
}, k(I), 11, as)) : (t(), s("span", ls, "…"))
|
|
2262
2268
|
], 64))), 128)),
|
|
2263
2269
|
m("button", {
|
|
2264
2270
|
class: "emt-pager__btn",
|
|
2265
2271
|
type: "button",
|
|
2266
|
-
disabled:
|
|
2272
|
+
disabled: i.value >= p.value,
|
|
2267
2273
|
"aria-label": a(r)("common.emooTable.nextPage"),
|
|
2268
2274
|
"data-testid": "emt-page-next",
|
|
2269
|
-
onClick: $[3] || ($[3] = (
|
|
2275
|
+
onClick: $[3] || ($[3] = (I) => _(i.value + 1))
|
|
2270
2276
|
}, [
|
|
2271
|
-
P(a(
|
|
2277
|
+
P(a(Ge), {
|
|
2272
2278
|
size: 14,
|
|
2273
2279
|
"aria-hidden": "true"
|
|
2274
2280
|
})
|
|
2275
|
-
], 8,
|
|
2281
|
+
], 8, ss)
|
|
2276
2282
|
])
|
|
2277
2283
|
])
|
|
2278
2284
|
])) : S("", !0);
|
|
2279
2285
|
}
|
|
2280
|
-
}),
|
|
2286
|
+
}), is = /* @__PURE__ */ Z(ns, [["__scopeId", "data-v-fc98e78c"]]), jn = /* @__PURE__ */ F({
|
|
2281
2287
|
__name: "EmooPopover",
|
|
2282
2288
|
props: {
|
|
2283
2289
|
popperClass: { default: "" },
|
|
2284
2290
|
showArrow: { type: Boolean, default: !1 }
|
|
2285
2291
|
},
|
|
2286
2292
|
setup(e) {
|
|
2287
|
-
const
|
|
2288
|
-
return (l, r) => (t(), x(a(
|
|
2293
|
+
const n = e, o = V(() => ["emo-pop", n.popperClass].filter(Boolean).join(" "));
|
|
2294
|
+
return (l, r) => (t(), x(a(no), Xe(l.$attrs, {
|
|
2289
2295
|
"show-arrow": e.showArrow,
|
|
2290
2296
|
"popper-class": o.value
|
|
2291
2297
|
}), Se({
|
|
2292
2298
|
default: w(() => [
|
|
2293
|
-
|
|
2299
|
+
A(l.$slots, "default")
|
|
2294
2300
|
]),
|
|
2295
2301
|
_: 2
|
|
2296
2302
|
}, [
|
|
2297
2303
|
l.$slots.reference ? {
|
|
2298
2304
|
name: "reference",
|
|
2299
2305
|
fn: w(() => [
|
|
2300
|
-
|
|
2306
|
+
A(l.$slots, "reference")
|
|
2301
2307
|
]),
|
|
2302
2308
|
key: "0"
|
|
2303
2309
|
} : void 0
|
|
2304
2310
|
]), 1040, ["show-arrow", "popper-class"]));
|
|
2305
2311
|
}
|
|
2306
|
-
}),
|
|
2312
|
+
}), rs = ["aria-label", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext"], ds = {
|
|
2307
2313
|
class: "emoo-progress__track",
|
|
2308
2314
|
"aria-hidden": "true"
|
|
2309
|
-
},
|
|
2315
|
+
}, us = {
|
|
2310
2316
|
key: 0,
|
|
2311
2317
|
class: "emoo-progress__label"
|
|
2312
|
-
},
|
|
2318
|
+
}, cs = /* @__PURE__ */ F({
|
|
2313
2319
|
__name: "EmooProgress",
|
|
2314
2320
|
props: {
|
|
2315
2321
|
value: { default: null },
|
|
@@ -2319,15 +2325,15 @@ const $a = {
|
|
|
2319
2325
|
ariaLabel: {}
|
|
2320
2326
|
},
|
|
2321
2327
|
setup(e) {
|
|
2322
|
-
const
|
|
2323
|
-
() => typeof
|
|
2324
|
-
), l = V(() => o.value == null), r = V(() => Math.min(100, Math.max(0, o.value ?? 0))),
|
|
2328
|
+
const n = e, o = V(
|
|
2329
|
+
() => typeof n.value == "number" && Number.isFinite(n.value) ? n.value : null
|
|
2330
|
+
), l = V(() => o.value == null), r = V(() => Math.min(100, Math.max(0, o.value ?? 0))), i = V(
|
|
2325
2331
|
() => l.value ? void 0 : { width: `${r.value}%` }
|
|
2326
2332
|
), p = V(() => {
|
|
2327
2333
|
if (!l.value)
|
|
2328
|
-
return
|
|
2334
|
+
return n.label || `${Math.round(r.value)}%`;
|
|
2329
2335
|
});
|
|
2330
|
-
return (v,
|
|
2336
|
+
return (v, g) => (t(), s("span", {
|
|
2331
2337
|
class: W(["emoo-progress", [`is-${e.size}`, `is-${e.status}`, { "is-indeterminate": l.value }]]),
|
|
2332
2338
|
role: "progressbar",
|
|
2333
2339
|
"aria-label": e.ariaLabel || e.label || void 0,
|
|
@@ -2336,23 +2342,23 @@ const $a = {
|
|
|
2336
2342
|
"aria-valuenow": l.value ? void 0 : r.value,
|
|
2337
2343
|
"aria-valuetext": p.value
|
|
2338
2344
|
}, [
|
|
2339
|
-
m("span",
|
|
2345
|
+
m("span", ds, [
|
|
2340
2346
|
m("span", {
|
|
2341
2347
|
class: "emoo-progress__fill",
|
|
2342
|
-
style: pe(
|
|
2348
|
+
style: pe(i.value)
|
|
2343
2349
|
}, null, 4)
|
|
2344
2350
|
]),
|
|
2345
|
-
e.label ? (t(), s("span",
|
|
2346
|
-
], 10,
|
|
2351
|
+
e.label ? (t(), s("span", us, k(e.label), 1)) : S("", !0)
|
|
2352
|
+
], 10, rs));
|
|
2347
2353
|
}
|
|
2348
|
-
}),
|
|
2354
|
+
}), ms = /* @__PURE__ */ Z(cs, [["__scopeId", "data-v-cab4f706"]]), vs = { class: "emoo-rsel__opt" }, fs = ["src"], hs = { class: "emoo-rsel__col" }, ps = { class: "emoo-rsel__name" }, ys = {
|
|
2349
2355
|
key: 0,
|
|
2350
2356
|
class: "emoo-rsel__desc"
|
|
2351
|
-
},
|
|
2357
|
+
}, bs = {
|
|
2352
2358
|
class: "emoo-sel-remote-error",
|
|
2353
2359
|
role: "alert",
|
|
2354
2360
|
"data-testid": "remote-error"
|
|
2355
|
-
},
|
|
2361
|
+
}, gs = /* @__PURE__ */ F({
|
|
2356
2362
|
__name: "EmooRoleSelect",
|
|
2357
2363
|
props: {
|
|
2358
2364
|
modelValue: {},
|
|
@@ -2365,17 +2371,17 @@ const $a = {
|
|
|
2365
2371
|
collapse: { default: 2 }
|
|
2366
2372
|
},
|
|
2367
2373
|
emits: ["update:modelValue", "update:selected"],
|
|
2368
|
-
setup(e, { emit:
|
|
2369
|
-
const o = e, l =
|
|
2374
|
+
setup(e, { emit: n }) {
|
|
2375
|
+
const o = e, l = n, { t: r } = me(), i = V(() => o.source !== void 0), { items: p, loading: v, error: g, retry: u, search: b, onVisibleChange: _, popperClass: y } = Be(() => o.source, "emoo-rsel-popper"), { mergedOptions: R, selectedOptions: E, remember: $ } = Me(
|
|
2370
2376
|
() => o.modelValue,
|
|
2371
|
-
() =>
|
|
2377
|
+
() => i.value ? p.value : o.options ?? [],
|
|
2372
2378
|
() => o.selected ?? []
|
|
2373
|
-
),
|
|
2379
|
+
), I = (d) => R.value.find((T) => T.id === d), z = Pe(), j = V(() => z.disabled !== void 0 && z.disabled !== !1), X = (d) => ({ ...d, square: !0 }), ie = (d) => {
|
|
2374
2380
|
const T = $(d);
|
|
2375
2381
|
l("update:modelValue", d), l("update:selected", T);
|
|
2376
2382
|
}, ee = (d) => {
|
|
2377
2383
|
const T = E.value[d]?.id;
|
|
2378
|
-
T !== void 0 && ie(o.modelValue.filter((
|
|
2384
|
+
T !== void 0 && ie(o.modelValue.filter((M) => M !== T));
|
|
2379
2385
|
};
|
|
2380
2386
|
return (d, T) => (t(), x(a(Ae), {
|
|
2381
2387
|
class: "emoo-rsel",
|
|
@@ -2385,7 +2391,7 @@ const $a = {
|
|
|
2385
2391
|
clearable: !e.multiple && e.clearable,
|
|
2386
2392
|
filterable: "",
|
|
2387
2393
|
"fit-input-width": "",
|
|
2388
|
-
remote:
|
|
2394
|
+
remote: i.value,
|
|
2389
2395
|
"remote-method": a(b),
|
|
2390
2396
|
loading: a(v),
|
|
2391
2397
|
"popper-class": a(y),
|
|
@@ -2393,29 +2399,29 @@ const $a = {
|
|
|
2393
2399
|
onVisibleChange: a(_)
|
|
2394
2400
|
}, Se({
|
|
2395
2401
|
default: w(() => [
|
|
2396
|
-
(t(!0), s(D, null, J(a(R), (
|
|
2397
|
-
key:
|
|
2398
|
-
label:
|
|
2399
|
-
value:
|
|
2402
|
+
(t(!0), s(D, null, J(a(R), (M) => (t(), x(a(ze), {
|
|
2403
|
+
key: M.id,
|
|
2404
|
+
label: M.name,
|
|
2405
|
+
value: M.id
|
|
2400
2406
|
}, {
|
|
2401
2407
|
default: w(() => [
|
|
2402
|
-
m("span",
|
|
2408
|
+
m("span", vs, [
|
|
2403
2409
|
m("span", {
|
|
2404
2410
|
class: "emoo-rsel__avatar",
|
|
2405
|
-
style: pe({ "--tint":
|
|
2411
|
+
style: pe({ "--tint": M.color || "var(--el-color-primary)" })
|
|
2406
2412
|
}, [
|
|
2407
|
-
|
|
2413
|
+
M.avatar ? (t(), s("img", {
|
|
2408
2414
|
key: 0,
|
|
2409
|
-
src:
|
|
2415
|
+
src: M.avatar,
|
|
2410
2416
|
alt: "",
|
|
2411
2417
|
class: "emoo-rsel__img"
|
|
2412
|
-
}, null, 8,
|
|
2413
|
-
|
|
2418
|
+
}, null, 8, fs)) : (t(), s(D, { key: 1 }, [
|
|
2419
|
+
Y(k(M.name[0]), 1)
|
|
2414
2420
|
], 64))
|
|
2415
2421
|
], 4),
|
|
2416
|
-
m("span",
|
|
2417
|
-
m("span",
|
|
2418
|
-
|
|
2422
|
+
m("span", hs, [
|
|
2423
|
+
m("span", ps, k(M.name), 1),
|
|
2424
|
+
M.desc ? (t(), s("span", ys, k(M.desc), 1)) : S("", !0)
|
|
2419
2425
|
])
|
|
2420
2426
|
])
|
|
2421
2427
|
]),
|
|
@@ -2437,44 +2443,44 @@ const $a = {
|
|
|
2437
2443
|
key: "1"
|
|
2438
2444
|
} : {
|
|
2439
2445
|
name: "label",
|
|
2440
|
-
fn: w(({ value:
|
|
2441
|
-
|
|
2446
|
+
fn: w(({ value: M }) => [
|
|
2447
|
+
I(M) ? (t(), x(xe, {
|
|
2442
2448
|
key: 0,
|
|
2443
|
-
items: [X(
|
|
2449
|
+
items: [X(I(M))]
|
|
2444
2450
|
}, null, 8, ["items"])) : S("", !0)
|
|
2445
2451
|
]),
|
|
2446
2452
|
key: "0"
|
|
2447
2453
|
},
|
|
2448
|
-
a(
|
|
2454
|
+
a(g) ? {
|
|
2449
2455
|
name: "footer",
|
|
2450
2456
|
fn: w(() => [
|
|
2451
|
-
m("div",
|
|
2452
|
-
m("span", null,
|
|
2457
|
+
m("div", bs, [
|
|
2458
|
+
m("span", null, k(a(r)("common.emooSelect.loadFailed")), 1),
|
|
2453
2459
|
m("button", {
|
|
2454
2460
|
type: "button",
|
|
2455
2461
|
"data-testid": "remote-retry",
|
|
2456
2462
|
onClick: T[0] || (T[0] = //@ts-ignore
|
|
2457
|
-
(...
|
|
2458
|
-
},
|
|
2463
|
+
(...M) => a(u) && a(u)(...M))
|
|
2464
|
+
}, k(a(r)("common.emooSelect.retry")), 1)
|
|
2459
2465
|
])
|
|
2460
2466
|
]),
|
|
2461
2467
|
key: "2"
|
|
2462
2468
|
} : void 0
|
|
2463
2469
|
]), 1032, ["model-value", "multiple", "placeholder", "clearable", "remote", "remote-method", "loading", "popper-class", "onVisibleChange"]));
|
|
2464
2470
|
}
|
|
2465
|
-
}),
|
|
2471
|
+
}), Gn = /* @__PURE__ */ Z(gs, [["__scopeId", "data-v-6c4ae65a"]]), ks = {
|
|
2466
2472
|
key: 1,
|
|
2467
2473
|
class: "emoo-search-box__top"
|
|
2468
|
-
},
|
|
2474
|
+
}, $s = {
|
|
2469
2475
|
key: 2,
|
|
2470
2476
|
class: "emoo-search-box__extras"
|
|
2471
|
-
},
|
|
2477
|
+
}, _s = { class: "emoo-search-box__field" }, ws = {
|
|
2472
2478
|
key: 3,
|
|
2473
2479
|
class: "emoo-search-box__bar"
|
|
2474
|
-
},
|
|
2480
|
+
}, Ss = {
|
|
2475
2481
|
key: 0,
|
|
2476
2482
|
class: "emoo-search-box__trailing"
|
|
2477
|
-
},
|
|
2483
|
+
}, Cs = /* @__PURE__ */ F({
|
|
2478
2484
|
__name: "EmooSearchBox",
|
|
2479
2485
|
props: {
|
|
2480
2486
|
variant: { default: "composer" },
|
|
@@ -2483,9 +2489,9 @@ const $a = {
|
|
|
2483
2489
|
gripTip: {}
|
|
2484
2490
|
},
|
|
2485
2491
|
emits: ["grip-mousedown"],
|
|
2486
|
-
setup(e, { emit:
|
|
2487
|
-
const { t: o } = me(), l =
|
|
2488
|
-
return (r,
|
|
2492
|
+
setup(e, { emit: n }) {
|
|
2493
|
+
const { t: o } = me(), l = n;
|
|
2494
|
+
return (r, i) => (t(), s("div", {
|
|
2489
2495
|
class: W(["emoo-search-box", [
|
|
2490
2496
|
`emoo-search-box--${e.variant}`,
|
|
2491
2497
|
{ "emoo-search-box--resizing": e.resizing }
|
|
@@ -2498,32 +2504,32 @@ const $a = {
|
|
|
2498
2504
|
default: w(() => [
|
|
2499
2505
|
m("span", {
|
|
2500
2506
|
class: W(["emoo-search-box__grip", { "is-on": e.resizing }]),
|
|
2501
|
-
onMousedown:
|
|
2507
|
+
onMousedown: i[0] || (i[0] = (p) => l("grip-mousedown", p))
|
|
2502
2508
|
}, null, 34)
|
|
2503
2509
|
]),
|
|
2504
2510
|
_: 1
|
|
2505
2511
|
}, 8, ["content"])) : S("", !0),
|
|
2506
|
-
r.$slots.top ? (t(), s("div",
|
|
2507
|
-
|
|
2512
|
+
r.$slots.top ? (t(), s("div", ks, [
|
|
2513
|
+
A(r.$slots, "top", {}, void 0, !0)
|
|
2508
2514
|
])) : S("", !0),
|
|
2509
|
-
r.$slots.extras ? (t(), s("div",
|
|
2510
|
-
|
|
2515
|
+
r.$slots.extras ? (t(), s("div", $s, [
|
|
2516
|
+
A(r.$slots, "extras", {}, void 0, !0)
|
|
2511
2517
|
])) : S("", !0),
|
|
2512
|
-
m("div",
|
|
2513
|
-
|
|
2518
|
+
m("div", _s, [
|
|
2519
|
+
A(r.$slots, "default", {}, void 0, !0)
|
|
2514
2520
|
]),
|
|
2515
|
-
r.$slots.bar || r.$slots.trailing ? (t(), s("div",
|
|
2516
|
-
|
|
2517
|
-
r.$slots.trailing ? (t(), s("div",
|
|
2518
|
-
|
|
2521
|
+
r.$slots.bar || r.$slots.trailing ? (t(), s("div", ws, [
|
|
2522
|
+
A(r.$slots, "bar", {}, void 0, !0),
|
|
2523
|
+
r.$slots.trailing ? (t(), s("div", Ss, [
|
|
2524
|
+
A(r.$slots, "trailing", {}, void 0, !0)
|
|
2519
2525
|
])) : S("", !0)
|
|
2520
2526
|
])) : S("", !0)
|
|
2521
2527
|
], 2));
|
|
2522
2528
|
}
|
|
2523
|
-
}),
|
|
2529
|
+
}), Xn = /* @__PURE__ */ Z(Cs, [["__scopeId", "data-v-98479d22"]]), Es = ["aria-label"], Ts = ["aria-pressed", "aria-label", "disabled", "onClick"], xs = { key: 1 }, Is = {
|
|
2524
2530
|
key: 2,
|
|
2525
2531
|
class: "emoo-segmented__count"
|
|
2526
|
-
},
|
|
2532
|
+
}, zs = /* @__PURE__ */ F({
|
|
2527
2533
|
__name: "EmooSegmented",
|
|
2528
2534
|
props: {
|
|
2529
2535
|
options: {},
|
|
@@ -2533,12 +2539,12 @@ const $a = {
|
|
|
2533
2539
|
ariaLabel: {}
|
|
2534
2540
|
},
|
|
2535
2541
|
emits: ["update:modelValue", "change"],
|
|
2536
|
-
setup(e, { emit:
|
|
2537
|
-
const { t: o } = me(), l = e, r = V(() => l.size === "small" ? 12 : l.size === "large" ? 16 : 14),
|
|
2542
|
+
setup(e, { emit: n }) {
|
|
2543
|
+
const { t: o } = me(), l = e, r = V(() => l.size === "small" ? 12 : l.size === "large" ? 16 : 14), i = n;
|
|
2538
2544
|
function p(v) {
|
|
2539
|
-
l.disabled || v.disabled || v.value === l.modelValue || (
|
|
2545
|
+
l.disabled || v.disabled || v.value === l.modelValue || (i("update:modelValue", v.value), i("change", v.value));
|
|
2540
2546
|
}
|
|
2541
|
-
return (v,
|
|
2547
|
+
return (v, g) => (t(), s("div", {
|
|
2542
2548
|
class: W(["emoo-segmented", `emoo-segmented--${e.size}`]),
|
|
2543
2549
|
role: "group",
|
|
2544
2550
|
"aria-label": e.ariaLabel || a(o)("common.emooSegmented.ariaLabel")
|
|
@@ -2552,17 +2558,17 @@ const $a = {
|
|
|
2552
2558
|
disabled: e.disabled || u.disabled,
|
|
2553
2559
|
onClick: (b) => p(u)
|
|
2554
2560
|
}, [
|
|
2555
|
-
u.icon ? (t(), x(
|
|
2561
|
+
u.icon ? (t(), x(Ie(u.icon), {
|
|
2556
2562
|
key: 0,
|
|
2557
2563
|
size: r.value,
|
|
2558
2564
|
"aria-hidden": "true"
|
|
2559
2565
|
}, null, 8, ["size"])) : S("", !0),
|
|
2560
|
-
u.label ? (t(), s("span",
|
|
2561
|
-
u.count !== void 0 ? (t(), s("span",
|
|
2562
|
-
], 10,
|
|
2563
|
-
], 10,
|
|
2566
|
+
u.label ? (t(), s("span", xs, k(u.label), 1)) : S("", !0),
|
|
2567
|
+
u.count !== void 0 ? (t(), s("span", Is, k(u.count), 1)) : S("", !0)
|
|
2568
|
+
], 10, Ts))), 128))
|
|
2569
|
+
], 10, Es));
|
|
2564
2570
|
}
|
|
2565
|
-
}),
|
|
2571
|
+
}), Jn = /* @__PURE__ */ Z(zs, [["__scopeId", "data-v-bcd69b5a"]]), Rs = /* @__PURE__ */ F({
|
|
2566
2572
|
__name: "EmooSidebarShell",
|
|
2567
2573
|
props: {
|
|
2568
2574
|
collapsed: { type: Boolean, default: !1 },
|
|
@@ -2572,36 +2578,36 @@ const $a = {
|
|
|
2572
2578
|
width: { default: void 0 }
|
|
2573
2579
|
},
|
|
2574
2580
|
setup(e) {
|
|
2575
|
-
const
|
|
2576
|
-
if (
|
|
2577
|
-
return { width: typeof
|
|
2581
|
+
const n = e, o = V(() => {
|
|
2582
|
+
if (n.width !== void 0)
|
|
2583
|
+
return { width: typeof n.width == "number" ? `${n.width}px` : n.width };
|
|
2578
2584
|
});
|
|
2579
2585
|
return (l, r) => (t(), s("aside", {
|
|
2580
2586
|
class: W(["emsh", { "collapsed-hidden": e.collapsed, "collapsed-overlay": e.overlay, resizing: e.resizing, instant: e.instant }]),
|
|
2581
2587
|
style: pe(o.value)
|
|
2582
2588
|
}, [
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2589
|
+
A(l.$slots, "header", {}, void 0, !0),
|
|
2590
|
+
A(l.$slots, "default", {}, void 0, !0),
|
|
2591
|
+
A(l.$slots, "footer", {}, void 0, !0)
|
|
2586
2592
|
], 6));
|
|
2587
2593
|
}
|
|
2588
|
-
}),
|
|
2594
|
+
}), Yn = /* @__PURE__ */ Z(Rs, [["__scopeId", "data-v-8f94cc28"]]), Vs = /* @__PURE__ */ F({
|
|
2589
2595
|
__name: "EmooStatusTag",
|
|
2590
2596
|
props: {
|
|
2591
2597
|
tone: {},
|
|
2592
2598
|
pulse: { type: Boolean }
|
|
2593
2599
|
},
|
|
2594
2600
|
setup(e) {
|
|
2595
|
-
return (
|
|
2601
|
+
return (n, o) => (t(), s("span", {
|
|
2596
2602
|
class: W(["emoo-status-tag", [`emoo-status-tag--${e.tone}`, { "emoo-status-tag--pulse": e.pulse }]])
|
|
2597
2603
|
}, [
|
|
2598
|
-
|
|
2604
|
+
A(n.$slots, "default", {}, void 0, !0)
|
|
2599
2605
|
], 2));
|
|
2600
2606
|
}
|
|
2601
|
-
}),
|
|
2607
|
+
}), Bs = /* @__PURE__ */ Z(Vs, [["__scopeId", "data-v-9c6a9ab7"]]), Ms = { class: "emoo-switcher" }, Ds = {
|
|
2602
2608
|
key: 0,
|
|
2603
2609
|
class: "switcher-title"
|
|
2604
|
-
},
|
|
2610
|
+
}, Ps = ["data-testid", "onClick"], As = ["src", "alt"], Ls = { class: "switcher-label" }, Os = /* @__PURE__ */ F({
|
|
2605
2611
|
__name: "EmooSwitcherPanel",
|
|
2606
2612
|
props: {
|
|
2607
2613
|
title: {},
|
|
@@ -2609,12 +2615,12 @@ const $a = {
|
|
|
2609
2615
|
scrollable: { type: Boolean }
|
|
2610
2616
|
},
|
|
2611
2617
|
emits: ["select"],
|
|
2612
|
-
setup(e, { emit:
|
|
2613
|
-
const o = e, l =
|
|
2618
|
+
setup(e, { emit: n }) {
|
|
2619
|
+
const o = e, l = n, { t: r } = me(), i = (u) => r(u.title), p = V(() => o.title ? r(o.title) : ""), v = V(() => o.items.filter((u) => !u.hidden)), g = (u) => {
|
|
2614
2620
|
l("select", u), u.action?.();
|
|
2615
2621
|
};
|
|
2616
|
-
return (u, b) => (t(), s("div",
|
|
2617
|
-
e.title ? (t(), s("p",
|
|
2622
|
+
return (u, b) => (t(), s("div", Ms, [
|
|
2623
|
+
e.title ? (t(), s("p", Ds, k(p.value), 1)) : S("", !0),
|
|
2618
2624
|
m("div", {
|
|
2619
2625
|
class: W(["switcher-list", { "is-scrollable": e.scrollable }])
|
|
2620
2626
|
}, [
|
|
@@ -2623,27 +2629,27 @@ const $a = {
|
|
|
2623
2629
|
type: "button",
|
|
2624
2630
|
class: W(["switcher-item", { "is-active": _.active }]),
|
|
2625
2631
|
"data-testid": _.testid,
|
|
2626
|
-
onClick: le((y) =>
|
|
2632
|
+
onClick: le((y) => g(_), ["stop"])
|
|
2627
2633
|
}, [
|
|
2628
2634
|
_.image ? (t(), s("img", {
|
|
2629
2635
|
key: 0,
|
|
2630
2636
|
src: _.image,
|
|
2631
|
-
alt:
|
|
2637
|
+
alt: i(_),
|
|
2632
2638
|
class: "switcher-image"
|
|
2633
|
-
}, null, 8,
|
|
2639
|
+
}, null, 8, As)) : _.icon ? (t(), x(Ie(_.icon), {
|
|
2634
2640
|
key: 1,
|
|
2635
2641
|
class: "ic"
|
|
2636
2642
|
})) : S("", !0),
|
|
2637
|
-
m("span",
|
|
2638
|
-
_.active ? (t(), x(a(
|
|
2643
|
+
m("span", Ls, k(i(_)), 1),
|
|
2644
|
+
_.active ? (t(), x(a(Dt), {
|
|
2639
2645
|
key: 2,
|
|
2640
2646
|
class: "switcher-check"
|
|
2641
2647
|
})) : S("", !0)
|
|
2642
|
-
], 10,
|
|
2648
|
+
], 10, Ps))), 128))
|
|
2643
2649
|
], 2)
|
|
2644
2650
|
]));
|
|
2645
2651
|
}
|
|
2646
|
-
}),
|
|
2652
|
+
}), Zn = /* @__PURE__ */ Z(Os, [["__scopeId", "data-v-a2309e72"]]), Us = /* @__PURE__ */ F({
|
|
2647
2653
|
__name: "EmooTagsInput",
|
|
2648
2654
|
props: {
|
|
2649
2655
|
modelValue: { default: () => [] },
|
|
@@ -2652,46 +2658,46 @@ const $a = {
|
|
|
2652
2658
|
disabled: { type: Boolean, default: !1 }
|
|
2653
2659
|
},
|
|
2654
2660
|
emits: ["update:modelValue"],
|
|
2655
|
-
setup(e, { emit:
|
|
2656
|
-
const o = e, l =
|
|
2661
|
+
setup(e, { emit: n }) {
|
|
2662
|
+
const o = e, l = n, { t: r } = me(), i = U(""), p = U(!1), v = U(!1), g = U(), u = U(), b = (E) => {
|
|
2657
2663
|
l("update:modelValue", o.modelValue.filter(($) => $ !== E));
|
|
2658
2664
|
}, _ = () => {
|
|
2659
|
-
p.value = !0, ke(() =>
|
|
2665
|
+
p.value = !0, ke(() => g.value?.focus());
|
|
2660
2666
|
}, y = () => {
|
|
2661
|
-
const E =
|
|
2662
|
-
E !== "" && !o.modelValue.includes(E) && l("update:modelValue", [...o.modelValue, E]), p.value = !1,
|
|
2667
|
+
const E = i.value;
|
|
2668
|
+
E !== "" && !o.modelValue.includes(E) && l("update:modelValue", [...o.modelValue, E]), p.value = !1, i.value = "", setTimeout(() => u.value?.$el?.focus?.(), 0);
|
|
2663
2669
|
}, R = (E) => {
|
|
2664
2670
|
!(E instanceof KeyboardEvent) || E.key !== "Enter" || !v.value && !E.isComposing && y();
|
|
2665
2671
|
};
|
|
2666
2672
|
return (E, $) => (t(), s("div", {
|
|
2667
2673
|
class: W(["emoo-tags-input", { "is-disabled": e.disabled }])
|
|
2668
2674
|
}, [
|
|
2669
|
-
(t(!0), s(D, null, J(e.modelValue, (
|
|
2670
|
-
key: `${
|
|
2675
|
+
(t(!0), s(D, null, J(e.modelValue, (I, z) => (t(), x(a(io), {
|
|
2676
|
+
key: `${z}:${I}`,
|
|
2671
2677
|
class: "emoo-tags-input__tag",
|
|
2672
2678
|
"disable-transitions": !1,
|
|
2673
2679
|
closable: !e.readonly && !e.disabled,
|
|
2674
|
-
"data-testid": `tags-tag-${
|
|
2675
|
-
onClose: (j) => b(
|
|
2680
|
+
"data-testid": `tags-tag-${z}`,
|
|
2681
|
+
onClose: (j) => b(I)
|
|
2676
2682
|
}, {
|
|
2677
2683
|
default: w(() => [
|
|
2678
|
-
|
|
2684
|
+
Y(k(I), 1)
|
|
2679
2685
|
]),
|
|
2680
2686
|
_: 2
|
|
2681
2687
|
}, 1032, ["closable", "data-testid", "onClose"]))), 128)),
|
|
2682
2688
|
!e.readonly && !e.disabled ? (t(), s(D, { key: 0 }, [
|
|
2683
|
-
p.value ? (t(), x(a(
|
|
2689
|
+
p.value ? (t(), x(a(ot), {
|
|
2684
2690
|
key: 0,
|
|
2685
2691
|
ref_key: "inputRef",
|
|
2686
|
-
ref:
|
|
2687
|
-
modelValue:
|
|
2688
|
-
"onUpdate:modelValue": $[0] || ($[0] = (
|
|
2692
|
+
ref: g,
|
|
2693
|
+
modelValue: i.value,
|
|
2694
|
+
"onUpdate:modelValue": $[0] || ($[0] = (I) => i.value = I),
|
|
2689
2695
|
class: "emoo-tags-input__input",
|
|
2690
2696
|
size: "small",
|
|
2691
2697
|
placeholder: e.placeholder,
|
|
2692
2698
|
"data-testid": "tags-input",
|
|
2693
|
-
onCompositionstart: $[1] || ($[1] = (
|
|
2694
|
-
onCompositionend: $[2] || ($[2] = (
|
|
2699
|
+
onCompositionstart: $[1] || ($[1] = (I) => v.value = !0),
|
|
2700
|
+
onCompositionend: $[2] || ($[2] = (I) => v.value = !1),
|
|
2695
2701
|
onKeydown: R,
|
|
2696
2702
|
onBlur: y
|
|
2697
2703
|
}, null, 8, ["modelValue", "placeholder"])) : (t(), x(De, {
|
|
@@ -2704,125 +2710,125 @@ const $a = {
|
|
|
2704
2710
|
onClick: _
|
|
2705
2711
|
}, {
|
|
2706
2712
|
default: w(() => [
|
|
2707
|
-
|
|
2713
|
+
Y(" + " + k(a(r)("common.emooTagsInput.add")), 1)
|
|
2708
2714
|
]),
|
|
2709
2715
|
_: 1
|
|
2710
2716
|
}, 512))
|
|
2711
2717
|
], 64)) : S("", !0)
|
|
2712
2718
|
], 2));
|
|
2713
2719
|
}
|
|
2714
|
-
}),
|
|
2715
|
-
function
|
|
2716
|
-
const
|
|
2720
|
+
}), Qn = /* @__PURE__ */ Z(Us, [["__scopeId", "data-v-2b248a6f"]]), Hs = 140, at = 64;
|
|
2721
|
+
function Ks(e) {
|
|
2722
|
+
const n = e.minColWidth ?? at, o = (C) => e.columns().find((L) => L.key === C), l = () => e.columns().map((C) => ({ key: C.key, visible: !0, fixed: "" })), r = (C) => {
|
|
2717
2723
|
if (!Array.isArray(C)) return l();
|
|
2718
|
-
const
|
|
2719
|
-
for (const
|
|
2720
|
-
if (!
|
|
2721
|
-
const G =
|
|
2722
|
-
!G.key || !e.columns().some((oe) => oe.key === G.key) || (
|
|
2724
|
+
const L = /* @__PURE__ */ new Map(), Q = [];
|
|
2725
|
+
for (const O of C) {
|
|
2726
|
+
if (!O || typeof O != "object") continue;
|
|
2727
|
+
const G = O;
|
|
2728
|
+
!G.key || !e.columns().some((oe) => oe.key === G.key) || (L.set(G.key, G), Q.push(G.key));
|
|
2723
2729
|
}
|
|
2724
|
-
const ae = new Map(Q.map((
|
|
2725
|
-
const G =
|
|
2730
|
+
const ae = new Map(Q.map((O, G) => [O, G])), B = e.columns().map((O) => {
|
|
2731
|
+
const G = L.get(O.key);
|
|
2726
2732
|
return {
|
|
2727
|
-
key:
|
|
2733
|
+
key: O.key,
|
|
2728
2734
|
visible: typeof G?.visible == "boolean" ? G.visible : !0,
|
|
2729
2735
|
fixed: G?.fixed === "left" || G?.fixed === "right" ? G.fixed : "",
|
|
2730
|
-
width: typeof G?.width == "number" && G.width >=
|
|
2736
|
+
width: typeof G?.width == "number" && G.width >= n ? Math.round(G.width) : void 0
|
|
2731
2737
|
};
|
|
2732
2738
|
});
|
|
2733
|
-
return !Q.length || e.persistOrder === !1 ?
|
|
2734
|
-
},
|
|
2739
|
+
return !Q.length || e.persistOrder === !1 ? B : [...B].sort((O, G) => (ae.get(O.key) ?? B.length) - (ae.get(G.key) ?? B.length));
|
|
2740
|
+
}, i = (C) => !!C && typeof C == "object" && typeof C.key == "string" && (C.order === "ascending" || C.order === "descending"), p = () => {
|
|
2735
2741
|
if (!e.storageKey) return { columns: l() };
|
|
2736
2742
|
try {
|
|
2737
2743
|
const C = localStorage.getItem(e.storageKey);
|
|
2738
2744
|
if (!C) return { columns: l() };
|
|
2739
|
-
const
|
|
2740
|
-
if (Array.isArray(
|
|
2741
|
-
if (
|
|
2742
|
-
const Q =
|
|
2745
|
+
const L = JSON.parse(C);
|
|
2746
|
+
if (Array.isArray(L)) return { columns: r(L) };
|
|
2747
|
+
if (L && typeof L == "object") {
|
|
2748
|
+
const Q = L;
|
|
2743
2749
|
return {
|
|
2744
2750
|
columns: r(Q.columns),
|
|
2745
2751
|
pageSize: typeof Q.pageSize == "number" ? Q.pageSize : void 0,
|
|
2746
|
-
sort:
|
|
2752
|
+
sort: i(Q.sort) ? Q.sort : void 0,
|
|
2747
2753
|
density: Q.density === "compact" ? "compact" : "default"
|
|
2748
2754
|
};
|
|
2749
2755
|
}
|
|
2750
2756
|
} catch {
|
|
2751
2757
|
}
|
|
2752
2758
|
return { columns: l() };
|
|
2753
|
-
}, v = p(),
|
|
2759
|
+
}, v = p(), g = U(v.columns), u = U(v.pageSize ?? e.defaultPageSize ?? 20), b = U(v.density ?? "default"), _ = () => {
|
|
2754
2760
|
if (!e.storageKey) return;
|
|
2755
2761
|
const C = {
|
|
2756
|
-
columns:
|
|
2762
|
+
columns: g.value,
|
|
2757
2763
|
pageSize: u.value,
|
|
2758
|
-
sort: T.value &&
|
|
2764
|
+
sort: T.value && M.value ? { key: T.value, order: M.value } : void 0,
|
|
2759
2765
|
density: b.value
|
|
2760
2766
|
};
|
|
2761
2767
|
localStorage.setItem(e.storageKey, JSON.stringify(C));
|
|
2762
2768
|
};
|
|
2763
2769
|
we(
|
|
2764
|
-
|
|
2770
|
+
g,
|
|
2765
2771
|
() => {
|
|
2766
2772
|
_(), ke(() => e.onColumnsChange?.());
|
|
2767
2773
|
},
|
|
2768
2774
|
{ deep: !0 }
|
|
2769
2775
|
);
|
|
2770
|
-
const y = V(() =>
|
|
2776
|
+
const y = V(() => g.value.filter((C) => C.visible)), R = V(() => y.value.length), E = V(() => g.value.filter((C) => !C.visible)), $ = (C) => C.width ?? (o(C.key)?.minWidth ? void 0 : o(C.key)?.width), I = (C) => C.width ?? o(C.key)?.minWidth, z = (C) => (C.width ?? o(C.key)?.width ?? o(C.key)?.minWidth ?? 0) >= Hs, j = (C) => {
|
|
2771
2777
|
R.value <= 1 || (C.visible = !1);
|
|
2772
2778
|
}, X = () => {
|
|
2773
|
-
|
|
2774
|
-
}, ie = (C) =>
|
|
2775
|
-
we([u, b, T,
|
|
2779
|
+
g.value = l();
|
|
2780
|
+
}, ie = (C) => g.value.some((L) => L.key === C.key && L.visible && !!o(C.key)?.sortable), ee = v.sort && ie(v.sort) ? v.sort : null, d = ee ?? (e.defaultSort && ie(e.defaultSort) ? e.defaultSort : null), T = U(d?.key ?? ""), M = U(d?.order ?? null), se = () => v.sort && ie(v.sort) ? v.sort : null;
|
|
2781
|
+
we([u, b, T, M], _), we(
|
|
2776
2782
|
() => e.columns().map((C) => C.key).join(","),
|
|
2777
2783
|
() => {
|
|
2778
|
-
|
|
2784
|
+
g.value = p().columns;
|
|
2779
2785
|
}
|
|
2780
2786
|
);
|
|
2781
2787
|
const ne = (C) => {
|
|
2782
|
-
e.storageKey && localStorage.removeItem(e.storageKey),
|
|
2788
|
+
e.storageKey && localStorage.removeItem(e.storageKey), g.value = l(), u.value = e.defaultPageSize ?? 20, b.value = "default", e.defaultSort ? C(e.defaultSort.key, e.defaultSort.order) : C("", null);
|
|
2783
2789
|
}, ye = () => {
|
|
2784
|
-
const C =
|
|
2785
|
-
let
|
|
2790
|
+
const C = g.value.filter((ae) => ae.visible);
|
|
2791
|
+
let L = !1;
|
|
2786
2792
|
for (const ae of C)
|
|
2787
|
-
ae.fixed === "left" ?
|
|
2793
|
+
ae.fixed === "left" ? L && (ae.fixed = "") : L = !0;
|
|
2788
2794
|
let Q = !1;
|
|
2789
2795
|
for (let ae = C.length - 1; ae >= 0; ae--) {
|
|
2790
|
-
const
|
|
2791
|
-
|
|
2796
|
+
const B = C[ae];
|
|
2797
|
+
B.fixed === "right" ? Q && (B.fixed = "") : Q = !0;
|
|
2792
2798
|
}
|
|
2793
2799
|
}, q = (C) => {
|
|
2794
|
-
for (const
|
|
2800
|
+
for (const L of g.value) L.fixed === C && (L.fixed = "");
|
|
2795
2801
|
}, de = (C) => {
|
|
2796
2802
|
C.fixed && q(C.fixed);
|
|
2797
|
-
}, ce = (C,
|
|
2798
|
-
const Q = y.value, ae = Q.findIndex((
|
|
2799
|
-
ae < 0 || (Q.forEach((
|
|
2800
|
-
(
|
|
2803
|
+
}, ce = (C, L) => {
|
|
2804
|
+
const Q = y.value, ae = Q.findIndex((B) => B.key === C.key);
|
|
2805
|
+
ae < 0 || (Q.forEach((B, O) => {
|
|
2806
|
+
(L === "left" ? O <= ae : O >= ae) ? B.fixed = L : B.fixed === L && (B.fixed = "");
|
|
2801
2807
|
}), ye());
|
|
2802
2808
|
}, H = (C) => {
|
|
2803
|
-
const
|
|
2809
|
+
const L = y.value;
|
|
2804
2810
|
if (C === "left") {
|
|
2805
2811
|
let Q = -1;
|
|
2806
|
-
return
|
|
2807
|
-
ae.fixed === "left" && (Q =
|
|
2812
|
+
return L.forEach((ae, B) => {
|
|
2813
|
+
ae.fixed === "left" && (Q = B);
|
|
2808
2814
|
}), Q;
|
|
2809
2815
|
}
|
|
2810
|
-
return
|
|
2811
|
-
}, te = (C,
|
|
2812
|
-
const ae = y.value.findIndex((
|
|
2813
|
-
if (C.fixed !==
|
|
2814
|
-
ce(C,
|
|
2816
|
+
return L.findIndex((Q) => Q.fixed === "right");
|
|
2817
|
+
}, te = (C, L) => {
|
|
2818
|
+
const ae = y.value.findIndex((B) => B.key === C.key);
|
|
2819
|
+
if (C.fixed !== L) {
|
|
2820
|
+
ce(C, L);
|
|
2815
2821
|
return;
|
|
2816
2822
|
}
|
|
2817
|
-
ae === H(
|
|
2823
|
+
ae === H(L) ? q(L) : ce(C, L);
|
|
2818
2824
|
};
|
|
2819
2825
|
return {
|
|
2820
2826
|
// 状态
|
|
2821
|
-
colState:
|
|
2827
|
+
colState: g,
|
|
2822
2828
|
pageSize: u,
|
|
2823
2829
|
density: b,
|
|
2824
2830
|
sortKey: T,
|
|
2825
|
-
sortOrder:
|
|
2831
|
+
sortOrder: M,
|
|
2826
2832
|
effectiveStoredSort: se,
|
|
2827
2833
|
prefs: v,
|
|
2828
2834
|
storageSort: ee,
|
|
@@ -2836,8 +2842,8 @@ function Os(e) {
|
|
|
2836
2842
|
visibleCount: R,
|
|
2837
2843
|
defOf: o,
|
|
2838
2844
|
colWidth: $,
|
|
2839
|
-
colMinWidth:
|
|
2840
|
-
isWide:
|
|
2845
|
+
colMinWidth: I,
|
|
2846
|
+
isWide: z,
|
|
2841
2847
|
// 列操作
|
|
2842
2848
|
hideColumn: j,
|
|
2843
2849
|
resetColumns: X,
|
|
@@ -2852,12 +2858,12 @@ function Os(e) {
|
|
|
2852
2858
|
te(C, C.fixed);
|
|
2853
2859
|
return;
|
|
2854
2860
|
}
|
|
2855
|
-
const
|
|
2856
|
-
ce(C, Q <
|
|
2861
|
+
const L = y.value, Q = L.findIndex((ae) => ae.key === C.key);
|
|
2862
|
+
ce(C, Q < L.length / 2 ? "left" : "right");
|
|
2857
2863
|
}
|
|
2858
2864
|
};
|
|
2859
2865
|
}
|
|
2860
|
-
const
|
|
2866
|
+
const Ws = ["aria-label", "data-testid", "onDragstart"], Ns = ["onDragover", "onDragleave", "onDrop"], Fs = ["aria-label", "data-testid", "onDragstart"], qs = { class: "emt-th__label" }, js = ["data-testid", "onClick"], Gs = { class: "emt-th__tools" }, Xs = ["data-testid", "onClick"], Js = ["disabled", "data-testid", "onClick"], Ys = ["title", "aria-label", "data-testid"], Zs = ["data-testid", "onMousedown"], Qs = ["aria-label"], en = ["aria-label"], tn = ["aria-label"], on = /* @__PURE__ */ F({
|
|
2861
2867
|
__name: "EmooTable",
|
|
2862
2868
|
props: {
|
|
2863
2869
|
data: {},
|
|
@@ -2881,8 +2887,8 @@ const Us = ["aria-label", "data-testid", "onDragstart"], Hs = ["onDragover", "on
|
|
|
2881
2887
|
defaultDensity: {}
|
|
2882
2888
|
},
|
|
2883
2889
|
emits: ["sort-change", "selection-change", "update:page", "size-change", "row-click", "row-move"],
|
|
2884
|
-
setup(e, { expose:
|
|
2885
|
-
const { t: l } = me(), r = e,
|
|
2890
|
+
setup(e, { expose: n, emit: o }) {
|
|
2891
|
+
const { t: l } = me(), r = e, i = o, p = U(), v = (h) => r.columns.find((c) => c.key === h), g = V(() => {
|
|
2886
2892
|
const h = r.rowKey;
|
|
2887
2893
|
return typeof h != "function" ? h : (c) => String(h(c));
|
|
2888
2894
|
}), u = (h) => v(h)?.sortBy, b = (h) => {
|
|
@@ -2894,15 +2900,15 @@ const Us = ["aria-label", "data-testid", "onDragstart"], Hs = ["onDragover", "on
|
|
|
2894
2900
|
density: R,
|
|
2895
2901
|
sortKey: E,
|
|
2896
2902
|
sortOrder: $,
|
|
2897
|
-
storageSort:
|
|
2898
|
-
restoredSort:
|
|
2903
|
+
storageSort: I,
|
|
2904
|
+
restoredSort: z,
|
|
2899
2905
|
resetPrefsCore: j,
|
|
2900
2906
|
visibleCols: X,
|
|
2901
2907
|
hiddenCols: ie,
|
|
2902
2908
|
visibleCount: ee,
|
|
2903
2909
|
colWidth: d,
|
|
2904
2910
|
colMinWidth: T,
|
|
2905
|
-
isWide:
|
|
2911
|
+
isWide: M,
|
|
2906
2912
|
hideColumn: se,
|
|
2907
2913
|
resetColumns: ne,
|
|
2908
2914
|
normalizeColumns: ye,
|
|
@@ -2910,7 +2916,7 @@ const Us = ["aria-label", "data-testid", "onDragstart"], Hs = ["onDragover", "on
|
|
|
2910
2916
|
pinEdge: de,
|
|
2911
2917
|
togglePinSide: ce,
|
|
2912
2918
|
togglePinSmart: H
|
|
2913
|
-
} =
|
|
2919
|
+
} = Ks({
|
|
2914
2920
|
columns: () => r.columns,
|
|
2915
2921
|
storageKey: r.storageKey,
|
|
2916
2922
|
defaultPageSize: r.defaultPageSize,
|
|
@@ -2924,123 +2930,123 @@ const Us = ["aria-label", "data-testid", "onDragstart"], Hs = ["onDragover", "on
|
|
|
2924
2930
|
}), te = () => {
|
|
2925
2931
|
j((h, c) => {
|
|
2926
2932
|
c === null ? Le("", null) : p.value?.sort(h, c);
|
|
2927
|
-
}),
|
|
2933
|
+
}), i("size-change", y.value), ke(() => {
|
|
2928
2934
|
p.value?.doLayout(), Te();
|
|
2929
2935
|
});
|
|
2930
|
-
},
|
|
2936
|
+
}, N = (h) => {
|
|
2931
2937
|
const c = X.value, f = c.findIndex((K) => K.key === h.key);
|
|
2932
2938
|
return h.fixed === "left" ? f === de("left") ? l("common.emooTable.unpin") : l("common.emooTable.pinLeftThrough") : h.fixed === "right" ? f === de("right") ? l("common.emooTable.unpin") : l("common.emooTable.pinRightFrom") : f < c.length / 2 ? l("common.emooTable.pinLeftThrough") : l("common.emooTable.pinRightFrom");
|
|
2933
|
-
}, C =
|
|
2939
|
+
}, C = U(""), L = U(""), Q = U("left"), ae = (h, c) => {
|
|
2934
2940
|
C.value = h.key, c.dataTransfer && (c.dataTransfer.effectAllowed = "move", c.dataTransfer.setData("text/plain", h.key));
|
|
2935
|
-
},
|
|
2936
|
-
C.value = "",
|
|
2937
|
-
},
|
|
2941
|
+
}, B = () => {
|
|
2942
|
+
C.value = "", L.value = "";
|
|
2943
|
+
}, O = (h, c) => {
|
|
2938
2944
|
if (!C.value) return;
|
|
2939
2945
|
if (C.value === h.key) {
|
|
2940
|
-
|
|
2946
|
+
L.value = "";
|
|
2941
2947
|
return;
|
|
2942
2948
|
}
|
|
2943
|
-
|
|
2949
|
+
L.value = h.key;
|
|
2944
2950
|
const f = c.currentTarget.getBoundingClientRect();
|
|
2945
2951
|
Q.value = c.clientX < f.left + f.width / 2 ? "left" : "right";
|
|
2946
2952
|
}, G = (h, c) => {
|
|
2947
|
-
if (
|
|
2953
|
+
if (L.value !== h.key) return;
|
|
2948
2954
|
const f = c.currentTarget;
|
|
2949
|
-
!f || f.contains(c.relatedTarget) || (
|
|
2955
|
+
!f || f.contains(c.relatedTarget) || (L.value = "");
|
|
2950
2956
|
}, oe = (h) => {
|
|
2951
2957
|
const c = _.value.findIndex((_e) => _e.key === C.value), f = _.value.findIndex((_e) => _e.key === h.key), K = Q.value;
|
|
2952
|
-
if (
|
|
2958
|
+
if (B(), c < 0 || f < 0 || c === f) return;
|
|
2953
2959
|
let ue = K === "left" ? f : f + 1;
|
|
2954
2960
|
const [fe] = _.value.splice(c, 1);
|
|
2955
2961
|
c < ue && (ue -= 1), _.value.splice(ue, 0, fe), ye();
|
|
2956
|
-
}, re =
|
|
2962
|
+
}, re = U(-1), Ce = U(-1), Ze = U("above"), Wt = (h, c) => {
|
|
2957
2963
|
re.value = h, c.dataTransfer && (c.dataTransfer.effectAllowed = "move", c.dataTransfer.setData("text/plain", String(h)));
|
|
2958
|
-
},
|
|
2964
|
+
}, dt = () => {
|
|
2959
2965
|
re.value = -1, Ce.value = -1;
|
|
2960
|
-
},
|
|
2966
|
+
}, ut = (h) => {
|
|
2961
2967
|
const c = h.target.closest(".el-table__body tr"), f = c?.parentElement;
|
|
2962
2968
|
if (!c || !f) return null;
|
|
2963
2969
|
const K = [...f.children].indexOf(c);
|
|
2964
2970
|
if (K < 0) return null;
|
|
2965
2971
|
const ue = c.getBoundingClientRect();
|
|
2966
2972
|
return { idx: K, side: h.clientY < ue.top + ue.height / 2 ? "above" : "below" };
|
|
2967
|
-
},
|
|
2973
|
+
}, Nt = (h) => {
|
|
2968
2974
|
if (re.value < 0) return;
|
|
2969
2975
|
h.preventDefault(), h.dataTransfer && (h.dataTransfer.dropEffect = "move");
|
|
2970
|
-
const c =
|
|
2976
|
+
const c = ut(h);
|
|
2971
2977
|
if (!c) {
|
|
2972
2978
|
Ce.value = -1;
|
|
2973
2979
|
return;
|
|
2974
2980
|
}
|
|
2975
|
-
Ce.value = c.idx,
|
|
2981
|
+
Ce.value = c.idx, Ze.value = c.side;
|
|
2976
2982
|
}, Ft = (h) => {
|
|
2977
2983
|
if (re.value < 0) return;
|
|
2978
2984
|
const c = h.relatedTarget;
|
|
2979
2985
|
c && h.currentTarget.contains(c) || (Ce.value = -1);
|
|
2980
|
-
},
|
|
2986
|
+
}, qt = (h) => {
|
|
2981
2987
|
if (re.value < 0) return;
|
|
2982
2988
|
h.preventDefault();
|
|
2983
|
-
const c =
|
|
2984
|
-
if (
|
|
2989
|
+
const c = ut(h), f = re.value;
|
|
2990
|
+
if (dt(), !c) return;
|
|
2985
2991
|
let K = c.side === "above" ? c.idx : c.idx + 1;
|
|
2986
|
-
f < K && (K -= 1), K !== f &&
|
|
2987
|
-
},
|
|
2992
|
+
f < K && (K -= 1), K !== f && i("row-move", { from: f, to: K });
|
|
2993
|
+
}, jt = (h, c) => {
|
|
2988
2994
|
c.preventDefault(), c.stopPropagation();
|
|
2989
2995
|
const f = _.value.find((Re) => Re.key === h);
|
|
2990
2996
|
if (!f) return;
|
|
2991
|
-
const K = c.clientX, ue = f.width ?? v(h)?.width ?? v(h)?.minWidth ??
|
|
2992
|
-
f.width = Math.max(
|
|
2997
|
+
const K = c.clientX, ue = f.width ?? v(h)?.width ?? v(h)?.minWidth ?? at, fe = (Re) => {
|
|
2998
|
+
f.width = Math.max(at, Math.round(ue + Re.clientX - K));
|
|
2993
2999
|
}, _e = () => {
|
|
2994
3000
|
window.removeEventListener("mousemove", fe), window.removeEventListener("mouseup", _e);
|
|
2995
3001
|
};
|
|
2996
3002
|
window.addEventListener("mousemove", fe), window.addEventListener("mouseup", _e);
|
|
2997
|
-
},
|
|
2998
|
-
E.value = h ?? "", $.value = c,
|
|
3003
|
+
}, Gt = z ? { prop: z.key, order: z.order } : void 0, ct = ({ prop: h, order: c }) => {
|
|
3004
|
+
E.value = h ?? "", $.value = c, i("sort-change", { key: h ?? "", order: c });
|
|
2999
3005
|
}, Le = (h, c) => {
|
|
3000
|
-
c === null ? (p.value?.clearSort(),
|
|
3001
|
-
},
|
|
3006
|
+
c === null ? (p.value?.clearSort(), ct({ prop: "", order: null })) : p.value?.sort(h, c);
|
|
3007
|
+
}, Xt = (h) => {
|
|
3002
3008
|
if (E.value !== h) {
|
|
3003
3009
|
Le(h, "ascending");
|
|
3004
3010
|
return;
|
|
3005
3011
|
}
|
|
3006
3012
|
Le(h, $.value === "ascending" ? "descending" : $.value === "descending" ? null : "ascending");
|
|
3007
|
-
}, Ee =
|
|
3008
|
-
Ee.value = h,
|
|
3009
|
-
},
|
|
3013
|
+
}, Ee = U([]), Jt = (h) => {
|
|
3014
|
+
Ee.value = h, i("selection-change", h);
|
|
3015
|
+
}, Yt = (h) => [
|
|
3010
3016
|
Ee.value.includes(h.row) ? "emt-row-selected" : "",
|
|
3011
3017
|
r.rowClassName?.(h) ?? "",
|
|
3012
|
-
|
|
3013
|
-
].filter(Boolean).join(" "),
|
|
3018
|
+
Zt(h.rowIndex)
|
|
3019
|
+
].filter(Boolean).join(" "), Zt = (h) => {
|
|
3014
3020
|
if (re.value < 0 || Ce.value !== h) return "";
|
|
3015
|
-
let c =
|
|
3016
|
-
return re.value < c && (c -= 1), c === re.value ? "" :
|
|
3017
|
-
},
|
|
3021
|
+
let c = Ze.value === "above" ? Ce.value : Ce.value + 1;
|
|
3022
|
+
return re.value < c && (c -= 1), c === re.value ? "" : Ze.value === "above" ? "emt-drop-above" : "emt-drop-below";
|
|
3023
|
+
}, Qt = () => p.value?.clearSelection(), $e = U(-1), ge = { active: !1, state: !1, last: -1 }, Oe = () => p.value?.store?.states?.data?.value ?? r.data, Qe = (h) => {
|
|
3018
3024
|
const c = h.target.closest("tr"), f = c?.parentElement;
|
|
3019
3025
|
return !c || !f ? -1 : [...f.children].indexOf(c);
|
|
3020
3026
|
}, Ue = (h, c) => {
|
|
3021
3027
|
const f = Oe()[h];
|
|
3022
3028
|
f && Ee.value.includes(f) !== c && p.value?.toggleRowSelection(f, c);
|
|
3023
|
-
},
|
|
3029
|
+
}, mt = (h) => {
|
|
3024
3030
|
const c = h.target, f = c.closest(".el-checkbox");
|
|
3025
3031
|
return f && c.closest(".el-table__body") ? f : null;
|
|
3026
|
-
},
|
|
3027
|
-
if (!
|
|
3028
|
-
const c =
|
|
3032
|
+
}, vt = (h) => {
|
|
3033
|
+
if (!mt(h) || (h.preventDefault(), h.stopPropagation(), !h.shiftKey)) return;
|
|
3034
|
+
const c = Qe(h);
|
|
3029
3035
|
if (!(c < 0))
|
|
3030
3036
|
if ($e.value >= 0 && $e.value !== c) {
|
|
3031
3037
|
const f = !Ee.value.includes(Oe()[c]), [K, ue] = $e.value < c ? [$e.value, c] : [c, $e.value];
|
|
3032
3038
|
for (let fe = K; fe <= ue; fe++) Ue(fe, f);
|
|
3033
3039
|
} else
|
|
3034
3040
|
Ue(c, !Ee.value.includes(Oe()[c])), $e.value = c;
|
|
3035
|
-
}, vt = (h) => {
|
|
3036
|
-
if (!ct(h) || (h.preventDefault(), h.shiftKey)) return;
|
|
3037
|
-
const c = Ze(h);
|
|
3038
|
-
c < 0 || (ge.active = !0, ge.state = !Ee.value.includes(Oe()[c]), ge.last = c, Ue(c, ge.state), $e.value = c);
|
|
3039
3041
|
}, ft = (h) => {
|
|
3042
|
+
if (!mt(h) || (h.preventDefault(), h.shiftKey)) return;
|
|
3043
|
+
const c = Qe(h);
|
|
3044
|
+
c < 0 || (ge.active = !0, ge.state = !Ee.value.includes(Oe()[c]), ge.last = c, Ue(c, ge.state), $e.value = c);
|
|
3045
|
+
}, ht = (h) => {
|
|
3040
3046
|
if (!ge.active || !h.target.closest(".el-table__body")) return;
|
|
3041
|
-
const f =
|
|
3047
|
+
const f = Qe(h);
|
|
3042
3048
|
f < 0 || f === ge.last || (Ue(f, ge.state), ge.last = f);
|
|
3043
|
-
},
|
|
3049
|
+
}, pt = () => {
|
|
3044
3050
|
ge.active = !1;
|
|
3045
3051
|
};
|
|
3046
3052
|
we(
|
|
@@ -3049,14 +3055,14 @@ const Us = ["aria-label", "data-testid", "onDragstart"], Hs = ["onDragover", "on
|
|
|
3049
3055
|
h === 0 && ($e.value = -1);
|
|
3050
3056
|
}
|
|
3051
3057
|
);
|
|
3052
|
-
const
|
|
3058
|
+
const yt = U(), bt = U(!1), gt = U(!1);
|
|
3053
3059
|
let be = null, He = null;
|
|
3054
3060
|
const Te = () => {
|
|
3055
|
-
be && (
|
|
3056
|
-
},
|
|
3061
|
+
be && (bt.value = be.scrollLeft > 2, gt.value = be.scrollLeft + be.clientWidth < be.scrollWidth - 2);
|
|
3062
|
+
}, kt = (h) => {
|
|
3057
3063
|
be?.scrollBy({ left: h * 280, behavior: "smooth" });
|
|
3058
|
-
}, Ke =
|
|
3059
|
-
const c =
|
|
3064
|
+
}, Ke = U(""), $t = (h) => {
|
|
3065
|
+
const c = yt.value;
|
|
3060
3066
|
if (!c) return;
|
|
3061
3067
|
const f = (ue) => {
|
|
3062
3068
|
if (!ue) return !1;
|
|
@@ -3065,15 +3071,15 @@ const Us = ["aria-label", "data-testid", "onDragstart"], Hs = ["onDragover", "on
|
|
|
3065
3071
|
}, K = f(c.querySelector(".emt-scrollbtn.is-left")) ? "left" : f(c.querySelector(".emt-scrollbtn.is-right")) ? "right" : "";
|
|
3066
3072
|
K !== Ke.value && (Ke.value = K);
|
|
3067
3073
|
};
|
|
3068
|
-
return
|
|
3069
|
-
document.addEventListener("mousemove",
|
|
3074
|
+
return Je(() => {
|
|
3075
|
+
document.addEventListener("mousemove", $t, !0);
|
|
3070
3076
|
const h = p.value?.$el;
|
|
3071
|
-
h?.addEventListener("click",
|
|
3072
|
-
}), we(X, () => ke(Te)),
|
|
3073
|
-
document.removeEventListener("mousemove",
|
|
3077
|
+
h?.addEventListener("click", vt, !0), h?.addEventListener("mousedown", ft, !0), h?.addEventListener("mouseover", ht, !0), window.addEventListener("mouseup", pt), be = h?.querySelector(".el-table__body-wrapper .el-scrollbar__wrap") ?? h?.querySelector(".el-table__body-wrapper") ?? null, be?.addEventListener("scroll", Te, { passive: !0 }), be && (He = new ResizeObserver(Te), He.observe(be), be.firstElementChild instanceof HTMLElement && He.observe(be.firstElementChild)), Te(), I && i("sort-change", { key: I.key, order: I.order });
|
|
3078
|
+
}), we(X, () => ke(Te)), lt(() => {
|
|
3079
|
+
document.removeEventListener("mousemove", $t, !0);
|
|
3074
3080
|
const h = p.value?.$el;
|
|
3075
|
-
h?.removeEventListener("click",
|
|
3076
|
-
}),
|
|
3081
|
+
h?.removeEventListener("click", vt, !0), h?.removeEventListener("mousedown", ft, !0), h?.removeEventListener("mouseover", ht, !0), window.removeEventListener("mouseup", pt), be?.removeEventListener("scroll", Te), He?.disconnect();
|
|
3082
|
+
}), n({
|
|
3077
3083
|
colState: _,
|
|
3078
3084
|
pageSize: y,
|
|
3079
3085
|
density: R,
|
|
@@ -3082,7 +3088,7 @@ const Us = ["aria-label", "data-testid", "onDragstart"], Hs = ["onDragover", "on
|
|
|
3082
3088
|
normalizeColumns: ye,
|
|
3083
3089
|
togglePinSide: ce,
|
|
3084
3090
|
togglePinSmart: H,
|
|
3085
|
-
clearSelection:
|
|
3091
|
+
clearSelection: Qt,
|
|
3086
3092
|
toggleRowSelection: (h, c) => p.value?.toggleRowSelection(h, c),
|
|
3087
3093
|
toggleRowExpansion: (h, c) => p.value?.toggleRowExpansion(h, c)
|
|
3088
3094
|
}), (h, c) => (t(), s("div", {
|
|
@@ -3090,29 +3096,29 @@ const Us = ["aria-label", "data-testid", "onDragstart"], Hs = ["onDragover", "on
|
|
|
3090
3096
|
}, [
|
|
3091
3097
|
m("div", {
|
|
3092
3098
|
ref_key: "scrollWrapRef",
|
|
3093
|
-
ref:
|
|
3099
|
+
ref: yt,
|
|
3094
3100
|
class: W(["emt-scroll", { "is-dragging": !!C.value, "is-rowdragging": re.value >= 0 }]),
|
|
3095
|
-
onDragover:
|
|
3101
|
+
onDragover: Nt,
|
|
3096
3102
|
onDragleave: Ft,
|
|
3097
|
-
onDrop:
|
|
3103
|
+
onDrop: qt
|
|
3098
3104
|
}, [
|
|
3099
|
-
P(a(
|
|
3105
|
+
P(a(ro), {
|
|
3100
3106
|
ref_key: "tableRef",
|
|
3101
3107
|
ref: p,
|
|
3102
3108
|
data: e.data,
|
|
3103
|
-
"row-key":
|
|
3104
|
-
"row-class-name":
|
|
3105
|
-
"default-sort": a(
|
|
3109
|
+
"row-key": g.value,
|
|
3110
|
+
"row-class-name": Yt,
|
|
3111
|
+
"default-sort": a(Gt),
|
|
3106
3112
|
height: e.height,
|
|
3107
3113
|
"max-height": e.maxHeight,
|
|
3108
3114
|
"expand-row-keys": e.expandable ? e.expandRowKeys : void 0,
|
|
3109
3115
|
"tooltip-options": { popperClass: "emo-tip", showAfter: 300, placement: "top", transition: "el-fade-in-linear" },
|
|
3110
|
-
onSelectionChange:
|
|
3111
|
-
onSortChange:
|
|
3112
|
-
onRowClick: c[6] || (c[6] = (f, K, ue) =>
|
|
3116
|
+
onSelectionChange: Jt,
|
|
3117
|
+
onSortChange: ct,
|
|
3118
|
+
onRowClick: c[6] || (c[6] = (f, K, ue) => i("row-click", f, K, ue))
|
|
3113
3119
|
}, {
|
|
3114
3120
|
empty: w(() => [
|
|
3115
|
-
|
|
3121
|
+
A(h.$slots, "empty", {}, void 0, !0)
|
|
3116
3122
|
]),
|
|
3117
3123
|
default: w(() => [
|
|
3118
3124
|
e.expandable ? (t(), x(a(Ve), {
|
|
@@ -3120,7 +3126,7 @@ const Us = ["aria-label", "data-testid", "onDragstart"], Hs = ["onDragover", "on
|
|
|
3120
3126
|
type: "expand"
|
|
3121
3127
|
}, {
|
|
3122
3128
|
default: w((f) => [
|
|
3123
|
-
f.$index !== -1 ?
|
|
3129
|
+
f.$index !== -1 ? A(h.$slots, "expand", Fe(qe(f)), void 0, !0, 0) : S("", !0)
|
|
3124
3130
|
]),
|
|
3125
3131
|
_: 3
|
|
3126
3132
|
})) : S("", !0),
|
|
@@ -3147,14 +3153,14 @@ const Us = ["aria-label", "data-testid", "onDragstart"], Hs = ["onDragover", "on
|
|
|
3147
3153
|
"data-testid": `emt-rowdrag-${f}`,
|
|
3148
3154
|
onClick: c[0] || (c[0] = le(() => {
|
|
3149
3155
|
}, ["stop"])),
|
|
3150
|
-
onDragstart: (K) =>
|
|
3151
|
-
onDragend:
|
|
3156
|
+
onDragstart: (K) => Wt(f, K),
|
|
3157
|
+
onDragend: dt
|
|
3152
3158
|
}, [
|
|
3153
|
-
P(a(
|
|
3159
|
+
P(a(wt), {
|
|
3154
3160
|
size: 12,
|
|
3155
3161
|
"aria-hidden": "true"
|
|
3156
3162
|
})
|
|
3157
|
-
], 40,
|
|
3163
|
+
], 40, Ws)
|
|
3158
3164
|
]),
|
|
3159
3165
|
_: 2
|
|
3160
3166
|
}, 1032, ["content"])
|
|
@@ -3184,10 +3190,10 @@ const Us = ["aria-label", "data-testid", "onDragstart"], Hs = ["onDragover", "on
|
|
|
3184
3190
|
header: w(() => [
|
|
3185
3191
|
m("div", {
|
|
3186
3192
|
class: W(["emt-th", {
|
|
3187
|
-
"is-drop-left":
|
|
3188
|
-
"is-drop-right":
|
|
3193
|
+
"is-drop-left": L.value === f.key && Q.value === "left",
|
|
3194
|
+
"is-drop-right": L.value === f.key && Q.value === "right"
|
|
3189
3195
|
}]),
|
|
3190
|
-
onDragover: le((K) =>
|
|
3196
|
+
onDragover: le((K) => O(f, K), ["prevent"]),
|
|
3191
3197
|
onDragleave: (K) => G(f, K),
|
|
3192
3198
|
onDrop: le((K) => oe(f), ["prevent"])
|
|
3193
3199
|
}, [
|
|
@@ -3204,18 +3210,18 @@ const Us = ["aria-label", "data-testid", "onDragstart"], Hs = ["onDragover", "on
|
|
|
3204
3210
|
onClick: c[1] || (c[1] = le(() => {
|
|
3205
3211
|
}, ["stop"])),
|
|
3206
3212
|
onDragstart: (K) => ae(f, K),
|
|
3207
|
-
onDragend:
|
|
3213
|
+
onDragend: B
|
|
3208
3214
|
}, [
|
|
3209
|
-
P(a(
|
|
3215
|
+
P(a(wt), {
|
|
3210
3216
|
size: 12,
|
|
3211
3217
|
"aria-hidden": "true"
|
|
3212
3218
|
})
|
|
3213
|
-
], 40,
|
|
3219
|
+
], 40, Fs)
|
|
3214
3220
|
]),
|
|
3215
3221
|
_: 2
|
|
3216
3222
|
}, 1032, ["content"]),
|
|
3217
|
-
m("span",
|
|
3218
|
-
|
|
3223
|
+
m("span", qs, k(v(f.key)?.label), 1),
|
|
3224
|
+
A(h.$slots, `${f.key}-header`, {
|
|
3219
3225
|
col: v(f.key)
|
|
3220
3226
|
}, void 0, !0),
|
|
3221
3227
|
v(f.key)?.sortable ? (t(), x(he, {
|
|
@@ -3227,33 +3233,33 @@ const Us = ["aria-label", "data-testid", "onDragstart"], Hs = ["onDragover", "on
|
|
|
3227
3233
|
class: "emt-th__sort",
|
|
3228
3234
|
type: "button",
|
|
3229
3235
|
"data-testid": `emt-th-sort-${f.key}`,
|
|
3230
|
-
onClick: le((K) =>
|
|
3236
|
+
onClick: le((K) => Xt(f.key), ["stop"])
|
|
3231
3237
|
}, [
|
|
3232
|
-
a(E) === f.key && a($) === "ascending" ? (t(), x(a(
|
|
3238
|
+
a(E) === f.key && a($) === "ascending" ? (t(), x(a(Rt), {
|
|
3233
3239
|
key: 0,
|
|
3234
3240
|
size: 12,
|
|
3235
3241
|
weight: "bold",
|
|
3236
3242
|
"aria-hidden": "true"
|
|
3237
|
-
})) : a(E) === f.key && a($) === "descending" ? (t(), x(a(
|
|
3243
|
+
})) : a(E) === f.key && a($) === "descending" ? (t(), x(a(rt), {
|
|
3238
3244
|
key: 1,
|
|
3239
3245
|
size: 12,
|
|
3240
3246
|
weight: "bold",
|
|
3241
3247
|
"aria-hidden": "true"
|
|
3242
|
-
})) : (t(), x(a(
|
|
3248
|
+
})) : (t(), x(a(ko), {
|
|
3243
3249
|
key: 2,
|
|
3244
3250
|
size: 12,
|
|
3245
3251
|
class: "emt-th__sortidle",
|
|
3246
3252
|
"aria-hidden": "true"
|
|
3247
3253
|
}))
|
|
3248
|
-
], 8,
|
|
3254
|
+
], 8, js)
|
|
3249
3255
|
]),
|
|
3250
3256
|
_: 2
|
|
3251
3257
|
}, 1032, ["content"])) : S("", !0),
|
|
3252
3258
|
c[13] || (c[13] = m("span", { class: "emt-th__spacer" }, null, -1)),
|
|
3253
|
-
m("span",
|
|
3254
|
-
a(
|
|
3259
|
+
m("span", Gs, [
|
|
3260
|
+
a(M)(f) || f.fixed ? (t(), x(he, {
|
|
3255
3261
|
key: 0,
|
|
3256
|
-
content:
|
|
3262
|
+
content: N(f)
|
|
3257
3263
|
}, {
|
|
3258
3264
|
default: w(() => [
|
|
3259
3265
|
m("button", {
|
|
@@ -3262,16 +3268,16 @@ const Us = ["aria-label", "data-testid", "onDragstart"], Hs = ["onDragover", "on
|
|
|
3262
3268
|
"data-testid": `emt-th-pin-${f.key}`,
|
|
3263
3269
|
onClick: le((K) => a(H)(f), ["stop"])
|
|
3264
3270
|
}, [
|
|
3265
|
-
P(a(
|
|
3271
|
+
P(a($o), {
|
|
3266
3272
|
size: 13,
|
|
3267
3273
|
weight: f.fixed ? "fill" : void 0,
|
|
3268
3274
|
"aria-hidden": "true"
|
|
3269
3275
|
}, null, 8, ["weight"])
|
|
3270
|
-
], 10,
|
|
3276
|
+
], 10, Xs)
|
|
3271
3277
|
]),
|
|
3272
3278
|
_: 2
|
|
3273
3279
|
}, 1032, ["content"])) : S("", !0),
|
|
3274
|
-
a(
|
|
3280
|
+
a(M)(f) ? (t(), x(he, {
|
|
3275
3281
|
key: 1,
|
|
3276
3282
|
content: a(l)("common.emooTable.hideColumn")
|
|
3277
3283
|
}, {
|
|
@@ -3283,15 +3289,15 @@ const Us = ["aria-label", "data-testid", "onDragstart"], Hs = ["onDragover", "on
|
|
|
3283
3289
|
"data-testid": `emt-th-hide-${f.key}`,
|
|
3284
3290
|
onClick: le((K) => a(se)(f), ["stop"])
|
|
3285
3291
|
}, [
|
|
3286
|
-
P(a(
|
|
3292
|
+
P(a(Vt), {
|
|
3287
3293
|
size: 13,
|
|
3288
3294
|
"aria-hidden": "true"
|
|
3289
3295
|
})
|
|
3290
|
-
], 8,
|
|
3296
|
+
], 8, Js)
|
|
3291
3297
|
]),
|
|
3292
3298
|
_: 2
|
|
3293
3299
|
}, 1032, ["content"])) : S("", !0),
|
|
3294
|
-
P(
|
|
3300
|
+
P(ha, {
|
|
3295
3301
|
"col-key": f.key,
|
|
3296
3302
|
sortable: v(f.key)?.sortable,
|
|
3297
3303
|
sorted: a(E) === f.key ? a($) : null,
|
|
@@ -3327,7 +3333,7 @@ const Us = ["aria-label", "data-testid", "onDragstart"], Hs = ["onDragover", "on
|
|
|
3327
3333
|
weight: "bold",
|
|
3328
3334
|
"aria-hidden": "true"
|
|
3329
3335
|
})
|
|
3330
|
-
], 40,
|
|
3336
|
+
], 40, Ys)
|
|
3331
3337
|
]),
|
|
3332
3338
|
_: 2
|
|
3333
3339
|
}, 1032, ["col-key", "sortable", "sorted", "fixed", "can-hide", "hidden", "onSort", "onUnpin", "onPin", "onHide"])
|
|
@@ -3340,21 +3346,21 @@ const Us = ["aria-label", "data-testid", "onDragstart"], Hs = ["onDragover", "on
|
|
|
3340
3346
|
m("span", {
|
|
3341
3347
|
class: "emt-th__resize",
|
|
3342
3348
|
"data-testid": `emt-th-resize-${f.key}`,
|
|
3343
|
-
onMousedown: (K) =>
|
|
3349
|
+
onMousedown: (K) => jt(f.key, K),
|
|
3344
3350
|
onClick: c[5] || (c[5] = le(() => {
|
|
3345
3351
|
}, ["stop"]))
|
|
3346
|
-
}, null, 40,
|
|
3352
|
+
}, null, 40, Zs)
|
|
3347
3353
|
]),
|
|
3348
3354
|
_: 2
|
|
3349
3355
|
}, 1032, ["content"])) : S("", !0)
|
|
3350
|
-
], 42,
|
|
3356
|
+
], 42, Ns)
|
|
3351
3357
|
]),
|
|
3352
3358
|
default: w(({ row: K, $index: ue }) => [
|
|
3353
|
-
ue !== -1 ?
|
|
3359
|
+
ue !== -1 ? A(h.$slots, f.key, {
|
|
3354
3360
|
row: K,
|
|
3355
3361
|
index: ue
|
|
3356
3362
|
}, () => [
|
|
3357
|
-
|
|
3363
|
+
Y(k(K[f.key]), 1)
|
|
3358
3364
|
], !0, 0) : S("", !0)
|
|
3359
3365
|
]),
|
|
3360
3366
|
_: 2
|
|
@@ -3367,7 +3373,7 @@ const Us = ["aria-label", "data-testid", "onDragstart"], Hs = ["onDragover", "on
|
|
|
3367
3373
|
"class-name": "emt-col-actions"
|
|
3368
3374
|
}, {
|
|
3369
3375
|
default: w((f) => [
|
|
3370
|
-
f.$index !== -1 ?
|
|
3376
|
+
f.$index !== -1 ? A(h.$slots, "actions", Fe(qe(f)), void 0, !0, 0) : S("", !0)
|
|
3371
3377
|
]),
|
|
3372
3378
|
_: 3
|
|
3373
3379
|
}, 8, ["width"])) : S("", !0)
|
|
@@ -3378,19 +3384,19 @@ const Us = ["aria-label", "data-testid", "onDragstart"], Hs = ["onDragover", "on
|
|
|
3378
3384
|
content: a(l)("common.emooTable.scrollLeft")
|
|
3379
3385
|
}, {
|
|
3380
3386
|
default: w(() => [
|
|
3381
|
-
|
|
3387
|
+
Ne(m("button", {
|
|
3382
3388
|
class: W(["emt-scrollbtn is-left", { "is-live": Ke.value === "left" }]),
|
|
3383
3389
|
type: "button",
|
|
3384
3390
|
"aria-label": a(l)("common.emooTable.scrollLeft"),
|
|
3385
3391
|
"data-testid": "emt-scroll-left",
|
|
3386
|
-
onClick: c[7] || (c[7] = (f) =>
|
|
3392
|
+
onClick: c[7] || (c[7] = (f) => kt(-1))
|
|
3387
3393
|
}, [
|
|
3388
|
-
P(a(
|
|
3394
|
+
P(a(Pt), {
|
|
3389
3395
|
size: 14,
|
|
3390
3396
|
"aria-hidden": "true"
|
|
3391
3397
|
})
|
|
3392
|
-
], 10,
|
|
3393
|
-
[
|
|
3398
|
+
], 10, Qs), [
|
|
3399
|
+
[tt, bt.value]
|
|
3394
3400
|
])
|
|
3395
3401
|
]),
|
|
3396
3402
|
_: 1
|
|
@@ -3399,19 +3405,19 @@ const Us = ["aria-label", "data-testid", "onDragstart"], Hs = ["onDragover", "on
|
|
|
3399
3405
|
content: a(l)("common.emooTable.scrollRight")
|
|
3400
3406
|
}, {
|
|
3401
3407
|
default: w(() => [
|
|
3402
|
-
|
|
3408
|
+
Ne(m("button", {
|
|
3403
3409
|
class: W(["emt-scrollbtn is-right", { "is-live": Ke.value === "right" }]),
|
|
3404
3410
|
type: "button",
|
|
3405
3411
|
"aria-label": a(l)("common.emooTable.scrollRight"),
|
|
3406
3412
|
"data-testid": "emt-scroll-right",
|
|
3407
|
-
onClick: c[8] || (c[8] = (f) =>
|
|
3413
|
+
onClick: c[8] || (c[8] = (f) => kt(1))
|
|
3408
3414
|
}, [
|
|
3409
|
-
P(a(
|
|
3415
|
+
P(a(Ge), {
|
|
3410
3416
|
size: 14,
|
|
3411
3417
|
"aria-hidden": "true"
|
|
3412
3418
|
})
|
|
3413
|
-
], 10,
|
|
3414
|
-
[
|
|
3419
|
+
], 10, en), [
|
|
3420
|
+
[tt, gt.value]
|
|
3415
3421
|
])
|
|
3416
3422
|
]),
|
|
3417
3423
|
_: 1
|
|
@@ -3423,34 +3429,34 @@ const Us = ["aria-label", "data-testid", "onDragstart"], Hs = ["onDragover", "on
|
|
|
3423
3429
|
"aria-label": a(l)("common.loading"),
|
|
3424
3430
|
"data-testid": "emt-loading"
|
|
3425
3431
|
}, [
|
|
3426
|
-
P(
|
|
3427
|
-
], 8,
|
|
3432
|
+
P(Kt, { size: 18 })
|
|
3433
|
+
], 8, tn)) : S("", !0)
|
|
3428
3434
|
], 34),
|
|
3429
|
-
P(
|
|
3435
|
+
P(is, {
|
|
3430
3436
|
total: e.total ?? 0,
|
|
3431
3437
|
page: e.page ?? 1,
|
|
3432
3438
|
"page-size": a(y),
|
|
3433
3439
|
"page-sizes": e.pageSizes,
|
|
3434
3440
|
density: a(R),
|
|
3435
3441
|
"density-base": e.defaultDensity,
|
|
3436
|
-
"onUpdate:page": c[9] || (c[9] = (f) =>
|
|
3442
|
+
"onUpdate:page": c[9] || (c[9] = (f) => i("update:page", f)),
|
|
3437
3443
|
"onUpdate:pageSize": c[10] || (c[10] = (f) => {
|
|
3438
|
-
y.value = f,
|
|
3444
|
+
y.value = f, i("size-change", f);
|
|
3439
3445
|
}),
|
|
3440
3446
|
"onUpdate:density": c[11] || (c[11] = (f) => R.value = f)
|
|
3441
3447
|
}, null, 8, ["total", "page", "page-size", "page-sizes", "density", "density-base"])
|
|
3442
3448
|
], 2));
|
|
3443
3449
|
}
|
|
3444
|
-
}),
|
|
3450
|
+
}), ei = /* @__PURE__ */ Z(on, [["__scopeId", "data-v-bbdd9cda"]]), an = { class: "emoo-upload" }, ln = ["tabindex", "aria-disabled", "aria-label", "onKeydown"], sn = { class: "emoo-upload__title" }, nn = { class: "emoo-upload__browse" }, rn = {
|
|
3445
3451
|
key: 0,
|
|
3446
3452
|
class: "emoo-upload__hint"
|
|
3447
|
-
},
|
|
3453
|
+
}, dn = ["accept", "multiple"], un = ["data-testid"], cn = { class: "emoo-upload__meta" }, mn = ["disabled", "data-testid", "onClick"], vn = {
|
|
3448
3454
|
key: 0,
|
|
3449
3455
|
class: "emoo-upload__sub"
|
|
3450
|
-
},
|
|
3456
|
+
}, fn = { class: "emoo-upload__err" }, hn = {
|
|
3451
3457
|
key: 2,
|
|
3452
3458
|
class: "emoo-upload__pct"
|
|
3453
|
-
},
|
|
3459
|
+
}, pn = /* @__PURE__ */ F({
|
|
3454
3460
|
__name: "EmooUpload",
|
|
3455
3461
|
props: {
|
|
3456
3462
|
files: {},
|
|
@@ -3462,20 +3468,20 @@ const Us = ["aria-label", "data-testid", "onDragstart"], Hs = ["onDragover", "on
|
|
|
3462
3468
|
listTestId: {}
|
|
3463
3469
|
},
|
|
3464
3470
|
emits: ["select", "remove", "retry", "preview"],
|
|
3465
|
-
setup(e, { emit:
|
|
3466
|
-
const o = e, l =
|
|
3467
|
-
|
|
3471
|
+
setup(e, { emit: n }) {
|
|
3472
|
+
const o = e, l = n, { t: r } = me(), i = U(), p = U(!1), v = ($) => $.status ?? "ready", g = () => o.disabled || o.readonly, u = () => {
|
|
3473
|
+
g() || i.value?.click();
|
|
3468
3474
|
}, b = () => {
|
|
3469
|
-
|
|
3475
|
+
g() || (p.value = !0);
|
|
3470
3476
|
}, _ = ($) => {
|
|
3471
|
-
|
|
3477
|
+
g() || !$.length || l("select", o.multiple ? $ : [$[0]]);
|
|
3472
3478
|
}, y = ($) => {
|
|
3473
|
-
const
|
|
3474
|
-
_(Array.from(
|
|
3479
|
+
const I = $.target;
|
|
3480
|
+
_(Array.from(I.files ?? [])), I.value = "";
|
|
3475
3481
|
}, R = ($) => {
|
|
3476
3482
|
p.value = !1, _(Array.from($.dataTransfer?.files ?? []));
|
|
3477
3483
|
}, E = ($) => $ < 1024 ? `${$} B` : $ < 1024 * 1024 ? `${Math.round($ / 1024)} KB` : $ < 1024 * 1024 * 1024 ? `${($ / 1024 / 1024).toFixed(1)} MB` : `${($ / 1024 / 1024 / 1024).toFixed(1)} GB`;
|
|
3478
|
-
return ($,
|
|
3484
|
+
return ($, I) => (t(), s("div", an, [
|
|
3479
3485
|
e.readonly ? S("", !0) : (t(), s("div", {
|
|
3480
3486
|
key: 0,
|
|
3481
3487
|
class: W(["emoo-upload__drop", { "is-over": p.value, "is-disabled": e.disabled }]),
|
|
@@ -3484,150 +3490,150 @@ const Us = ["aria-label", "data-testid", "onDragstart"], Hs = ["onDragover", "on
|
|
|
3484
3490
|
"aria-disabled": e.disabled,
|
|
3485
3491
|
"aria-label": a(r)("common.emooUpload.dropTitle"),
|
|
3486
3492
|
onDragover: le(b, ["prevent"]),
|
|
3487
|
-
onDragleave:
|
|
3493
|
+
onDragleave: I[0] || (I[0] = (z) => p.value = !1),
|
|
3488
3494
|
onDrop: le(R, ["prevent"]),
|
|
3489
3495
|
onClick: u,
|
|
3490
3496
|
onKeydown: [
|
|
3491
|
-
|
|
3492
|
-
|
|
3497
|
+
je(le(u, ["prevent"]), ["enter"]),
|
|
3498
|
+
je(le(u, ["prevent"]), ["space"])
|
|
3493
3499
|
]
|
|
3494
3500
|
}, [
|
|
3495
|
-
P(a(
|
|
3501
|
+
P(a(_o), {
|
|
3496
3502
|
class: "emoo-upload__ico",
|
|
3497
3503
|
"aria-hidden": "true"
|
|
3498
3504
|
}),
|
|
3499
|
-
m("p",
|
|
3500
|
-
|
|
3501
|
-
m("span",
|
|
3505
|
+
m("p", sn, [
|
|
3506
|
+
Y(k(a(r)("common.emooUpload.dropTitle")) + " ", 1),
|
|
3507
|
+
m("span", nn, k(a(r)("common.emooUpload.browse")), 1)
|
|
3502
3508
|
]),
|
|
3503
|
-
e.hint ? (t(), s("p",
|
|
3509
|
+
e.hint ? (t(), s("p", rn, k(e.hint), 1)) : S("", !0),
|
|
3504
3510
|
m("input", {
|
|
3505
3511
|
ref_key: "inputRef",
|
|
3506
|
-
ref:
|
|
3512
|
+
ref: i,
|
|
3507
3513
|
type: "file",
|
|
3508
3514
|
hidden: "",
|
|
3509
3515
|
accept: e.accept,
|
|
3510
3516
|
multiple: e.multiple,
|
|
3511
3517
|
onChange: y
|
|
3512
|
-
}, null, 40,
|
|
3513
|
-
], 42,
|
|
3518
|
+
}, null, 40, dn)
|
|
3519
|
+
], 42, ln)),
|
|
3514
3520
|
e.files.length ? (t(), s("ul", {
|
|
3515
3521
|
key: 1,
|
|
3516
3522
|
class: "emoo-upload__list",
|
|
3517
3523
|
"data-testid": e.listTestId
|
|
3518
3524
|
}, [
|
|
3519
|
-
(t(!0), s(D, null, J(e.files, (
|
|
3525
|
+
(t(!0), s(D, null, J(e.files, (z, j) => (t(), s("li", {
|
|
3520
3526
|
key: j,
|
|
3521
3527
|
class: "emoo-upload__file"
|
|
3522
3528
|
}, [
|
|
3523
|
-
P(a(
|
|
3529
|
+
P(a(wo), {
|
|
3524
3530
|
class: "emoo-upload__file-ico",
|
|
3525
3531
|
"aria-hidden": "true"
|
|
3526
3532
|
}),
|
|
3527
|
-
m("div",
|
|
3533
|
+
m("div", cn, [
|
|
3528
3534
|
m("button", {
|
|
3529
3535
|
type: "button",
|
|
3530
3536
|
class: "emoo-upload__name",
|
|
3531
3537
|
disabled: e.disabled,
|
|
3532
3538
|
"data-testid": `upload-preview-${j}`,
|
|
3533
|
-
onClick: (X) => l("preview",
|
|
3534
|
-
},
|
|
3535
|
-
|
|
3536
|
-
v(
|
|
3539
|
+
onClick: (X) => l("preview", z)
|
|
3540
|
+
}, k(z.name), 9, mn),
|
|
3541
|
+
z.size != null ? (t(), s("span", vn, k(E(z.size)), 1)) : S("", !0),
|
|
3542
|
+
v(z) === "uploading" ? (t(), x(ms, {
|
|
3537
3543
|
key: 1,
|
|
3538
3544
|
class: "emoo-upload__progress",
|
|
3539
3545
|
size: "mini",
|
|
3540
3546
|
status: "run",
|
|
3541
|
-
value:
|
|
3547
|
+
value: z.progress ?? null
|
|
3542
3548
|
}, null, 8, ["value"])) : S("", !0)
|
|
3543
3549
|
]),
|
|
3544
|
-
v(
|
|
3550
|
+
v(z) === "done" ? (t(), x(Bs, {
|
|
3545
3551
|
key: 0,
|
|
3546
3552
|
tone: "success"
|
|
3547
3553
|
}, {
|
|
3548
3554
|
default: w(() => [
|
|
3549
|
-
|
|
3555
|
+
Y(k(a(r)("common.emooUpload.done")), 1)
|
|
3550
3556
|
]),
|
|
3551
3557
|
_: 1
|
|
3552
|
-
})) : v(
|
|
3553
|
-
m("span",
|
|
3558
|
+
})) : v(z) === "failed" ? (t(), s(D, { key: 1 }, [
|
|
3559
|
+
m("span", fn, k(z.error || a(r)("common.emooUpload.failed")), 1),
|
|
3554
3560
|
e.readonly ? S("", !0) : (t(), x(De, {
|
|
3555
3561
|
key: 0,
|
|
3556
3562
|
variant: "text",
|
|
3557
3563
|
size: "small",
|
|
3558
|
-
onClick: (X) => l("retry",
|
|
3564
|
+
onClick: (X) => l("retry", z)
|
|
3559
3565
|
}, {
|
|
3560
3566
|
icon: w(() => [
|
|
3561
|
-
P(a(
|
|
3567
|
+
P(a(Bt))
|
|
3562
3568
|
]),
|
|
3563
3569
|
default: w(() => [
|
|
3564
|
-
|
|
3570
|
+
Y(" " + k(a(r)("common.emooUpload.retry")), 1)
|
|
3565
3571
|
]),
|
|
3566
3572
|
_: 1
|
|
3567
3573
|
}, 8, ["onClick"]))
|
|
3568
|
-
], 64)) : v(
|
|
3574
|
+
], 64)) : v(z) === "uploading" && z.progress != null ? (t(), s("span", hn, k(Math.round(z.progress)) + "% ", 1)) : S("", !0),
|
|
3569
3575
|
e.readonly ? S("", !0) : (t(), x(De, {
|
|
3570
3576
|
key: 3,
|
|
3571
3577
|
variant: "text",
|
|
3572
3578
|
size: "small",
|
|
3573
3579
|
"icon-only": "",
|
|
3574
|
-
"aria-label": a(r)("common.emooUpload.remove", { name:
|
|
3575
|
-
onClick: (X) => l("remove",
|
|
3580
|
+
"aria-label": a(r)("common.emooUpload.remove", { name: z.name }),
|
|
3581
|
+
onClick: (X) => l("remove", z)
|
|
3576
3582
|
}, {
|
|
3577
3583
|
icon: w(() => [
|
|
3578
|
-
P(a(
|
|
3584
|
+
P(a(it))
|
|
3579
3585
|
]),
|
|
3580
3586
|
_: 1
|
|
3581
3587
|
}, 8, ["aria-label", "onClick"]))
|
|
3582
3588
|
]))), 128))
|
|
3583
|
-
], 8,
|
|
3589
|
+
], 8, un)) : S("", !0)
|
|
3584
3590
|
]));
|
|
3585
3591
|
}
|
|
3586
|
-
}),
|
|
3592
|
+
}), ti = /* @__PURE__ */ Z(pn, [["__scopeId", "data-v-65eda28b"]]), yn = { class: "emoo-value-diff" }, bn = { class: "emoo-value-diff__old" }, gn = /* @__PURE__ */ F({
|
|
3587
3593
|
__name: "EmooValueDiff",
|
|
3588
3594
|
props: {
|
|
3589
3595
|
value: {},
|
|
3590
3596
|
old: {}
|
|
3591
3597
|
},
|
|
3592
3598
|
setup(e) {
|
|
3593
|
-
const
|
|
3594
|
-
return (l, r) => (t(), s("span",
|
|
3599
|
+
const n = e, o = V(() => !!n.old && n.old !== n.value);
|
|
3600
|
+
return (l, r) => (t(), s("span", yn, [
|
|
3595
3601
|
o.value ? (t(), s(D, { key: 0 }, [
|
|
3596
|
-
m("span",
|
|
3597
|
-
P(a(
|
|
3602
|
+
m("span", bn, k(e.old), 1),
|
|
3603
|
+
P(a(So), {
|
|
3598
3604
|
class: "emoo-value-diff__arrow",
|
|
3599
3605
|
"aria-hidden": "true"
|
|
3600
3606
|
})
|
|
3601
3607
|
], 64)) : S("", !0),
|
|
3602
3608
|
m("span", {
|
|
3603
3609
|
class: W(["emoo-value-diff__value", { "emoo-value-diff__value--changed": o.value }])
|
|
3604
|
-
},
|
|
3610
|
+
}, k(e.value), 3)
|
|
3605
3611
|
]));
|
|
3606
3612
|
}
|
|
3607
|
-
}),
|
|
3613
|
+
}), oi = /* @__PURE__ */ Z(gn, [["__scopeId", "data-v-40f98722"]]), kn = {
|
|
3608
3614
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3609
3615
|
viewBox: "0 0 256 256",
|
|
3610
3616
|
width: "1em",
|
|
3611
3617
|
height: "1em",
|
|
3612
3618
|
fill: "currentColor"
|
|
3613
|
-
},
|
|
3619
|
+
}, ai = /* @__PURE__ */ F({
|
|
3614
3620
|
__name: "IconChatCirclePlus",
|
|
3615
3621
|
setup(e) {
|
|
3616
|
-
return (
|
|
3622
|
+
return (n, o) => (t(), s("svg", kn, [...o[0] || (o[0] = [
|
|
3617
3623
|
m("path", { d: "M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24Zm0,192a87.87,87.87,0,0,1-44.06-11.81,8,8,0,0,0-6.54-.67L40,216,52.47,178.6a8,8,0,0,0-.66-6.54A88,88,0,1,1,128,216Z" }, null, -1),
|
|
3618
3624
|
m("path", { d: "M168,128a8,8,0,0,1-8,8H136v32a8,8,0,0,1-16,0V136H88a8,8,0,0,1,0-16h32V88a8,8,0,0,1,16,0v32h24A8,8,0,0,1,168,128Z" }, null, -1)
|
|
3619
3625
|
])]));
|
|
3620
3626
|
}
|
|
3621
3627
|
});
|
|
3622
|
-
function
|
|
3623
|
-
const o =
|
|
3628
|
+
function li(e, n = {}) {
|
|
3629
|
+
const o = n.bottomTolerance ?? 24, l = n.awayThreshold ?? 80, r = U(!0), i = U(!1);
|
|
3624
3630
|
let p = null;
|
|
3625
3631
|
const v = () => {
|
|
3626
3632
|
const R = p;
|
|
3627
3633
|
if (!R) return;
|
|
3628
3634
|
const E = R.scrollHeight - R.scrollTop - R.clientHeight;
|
|
3629
|
-
E <= o ? (!r.value ||
|
|
3630
|
-
},
|
|
3635
|
+
E <= o ? (!r.value || i.value) && (r.value = !0, i.value = !1, n.onDockUpdate?.(!0)) : E > l && (r.value || !i.value) && (r.value = !1, i.value = !0, n.onDockUpdate?.(!1));
|
|
3636
|
+
}, g = () => {
|
|
3631
3637
|
const R = e();
|
|
3632
3638
|
!R || R === p || (p && p.removeEventListener("scroll", v), p = R, R.addEventListener("scroll", v, { passive: !0 }), v());
|
|
3633
3639
|
}, u = () => {
|
|
@@ -3638,73 +3644,107 @@ function Yn(e, i = {}) {
|
|
|
3638
3644
|
p && (p.scrollTo({
|
|
3639
3645
|
top: p.scrollHeight,
|
|
3640
3646
|
behavior: b() ? "auto" : "smooth"
|
|
3641
|
-
}), r.value = !0,
|
|
3647
|
+
}), r.value = !0, i.value = !1, n.onDockUpdate?.(!0));
|
|
3642
3648
|
};
|
|
3643
|
-
return typeof
|
|
3649
|
+
return typeof _t == "function" && _t(u), { docked: r, showScrollToBottom: i, attach: g, detach: u, notifyContentChanged: _, scrollToBottom: y, handleScroll: v };
|
|
3650
|
+
}
|
|
3651
|
+
const $n = 3e3, _n = 5e3;
|
|
3652
|
+
function We(e, n, o = {}) {
|
|
3653
|
+
return uo({
|
|
3654
|
+
type: e,
|
|
3655
|
+
message: n,
|
|
3656
|
+
duration: o.duration ?? (e === "error" ? _n : $n),
|
|
3657
|
+
showClose: o.showClose ?? e === "error"
|
|
3658
|
+
});
|
|
3659
|
+
}
|
|
3660
|
+
const si = {
|
|
3661
|
+
/** 成功反馈:3s,无按钮 */
|
|
3662
|
+
success: (e, n) => We("success", e, n),
|
|
3663
|
+
/** 中性信息:3s,无按钮 */
|
|
3664
|
+
info: (e, n) => We("info", e, n),
|
|
3665
|
+
/** 警告:3s,无按钮 */
|
|
3666
|
+
warning: (e, n) => We("warning", e, n),
|
|
3667
|
+
/** 错误:5s + 关闭钮(默认)——读错要够久 */
|
|
3668
|
+
error: (e, n) => We("error", e, n)
|
|
3669
|
+
};
|
|
3670
|
+
async function ni(e, n) {
|
|
3671
|
+
const { title: o, confirmText: l = "确认", cancelButtonText: r = "取消", tone: i = "default" } = n;
|
|
3672
|
+
try {
|
|
3673
|
+
return await co.confirm(e, o, {
|
|
3674
|
+
type: "warning",
|
|
3675
|
+
confirmButtonText: l,
|
|
3676
|
+
cancelButtonText: r,
|
|
3677
|
+
confirmButtonClass: i === "danger" ? "emoo-confirm-danger" : ""
|
|
3678
|
+
}), !0;
|
|
3679
|
+
} catch {
|
|
3680
|
+
return !1;
|
|
3681
|
+
}
|
|
3644
3682
|
}
|
|
3645
|
-
function
|
|
3646
|
-
const o =
|
|
3647
|
-
for (const [r,
|
|
3648
|
-
l[r.replace("--emoo-", "--el-")] =
|
|
3683
|
+
function ii(e, n = !1) {
|
|
3684
|
+
const o = Co(e, n), l = {};
|
|
3685
|
+
for (const [r, i] of Object.entries(o))
|
|
3686
|
+
l[r.replace("--emoo-", "--el-")] = i;
|
|
3649
3687
|
return l;
|
|
3650
3688
|
}
|
|
3651
3689
|
export {
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3690
|
+
ui as AVATAR_TINT_PALETTE,
|
|
3691
|
+
zn as EmooActionPill,
|
|
3692
|
+
Rn as EmooActionSheet,
|
|
3693
|
+
Vn as EmooAgentSelect,
|
|
3656
3694
|
De as EmooButton,
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3695
|
+
Bn as EmooCard,
|
|
3696
|
+
Mn as EmooChips,
|
|
3697
|
+
sa as EmooChoice,
|
|
3698
|
+
ha as EmooColumnMenu,
|
|
3699
|
+
Dn as EmooDrawer,
|
|
3700
|
+
Ra as EmooEmpty,
|
|
3701
|
+
Pn as EmooField,
|
|
3702
|
+
An as EmooFieldGrid,
|
|
3703
|
+
Ln as EmooGhostButton,
|
|
3704
|
+
On as EmooGroupLabel,
|
|
3705
|
+
Un as EmooHistoryList,
|
|
3706
|
+
Hn as EmooMemberRoleSelect,
|
|
3707
|
+
Kn as EmooMemberSelect,
|
|
3670
3708
|
xe as EmooMemberTag,
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3709
|
+
Wn as EmooMessage,
|
|
3710
|
+
Nn as EmooNavMenu,
|
|
3711
|
+
Fn as EmooNavSegmented,
|
|
3712
|
+
qn as EmooOptionRows,
|
|
3713
|
+
is as EmooPagination,
|
|
3714
|
+
jn as EmooPopover,
|
|
3715
|
+
ms as EmooProgress,
|
|
3716
|
+
Gn as EmooRoleSelect,
|
|
3717
|
+
Xn as EmooSearchBox,
|
|
3718
|
+
Jn as EmooSegmented,
|
|
3719
|
+
Yn as EmooSidebarShell,
|
|
3720
|
+
Ga as EmooSkeleton,
|
|
3721
|
+
Kt as EmooSpinner,
|
|
3722
|
+
Bs as EmooStatusTag,
|
|
3723
|
+
Zn as EmooSwitcherPanel,
|
|
3724
|
+
ei as EmooTable,
|
|
3725
|
+
Qn as EmooTagsInput,
|
|
3688
3726
|
he as EmooTooltip,
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3727
|
+
ti as EmooUpload,
|
|
3728
|
+
oi as EmooValueDiff,
|
|
3729
|
+
Hs as INLINE_TOOLS_MIN_WIDTH,
|
|
3730
|
+
ai as IconChatCirclePlus,
|
|
3731
|
+
at as MIN_COL_WIDTH,
|
|
3732
|
+
ci as PRESET_COLORS,
|
|
3733
|
+
At as SheetDragHandle,
|
|
3734
|
+
mi as avatarTintOf,
|
|
3735
|
+
ii as elementPlusColorVars,
|
|
3736
|
+
ni as emooConfirm,
|
|
3737
|
+
yi as emoouiMessages,
|
|
3738
|
+
ya as getDrawerWidth,
|
|
3739
|
+
vi as hexToRgbString,
|
|
3740
|
+
fi as mixColor,
|
|
3741
|
+
_a as nearestSheetTier,
|
|
3742
|
+
hi as primaryColorVars,
|
|
3743
|
+
ba as saveDrawerWidth,
|
|
3744
|
+
si as toast,
|
|
3745
|
+
Ks as useColumnPrefs,
|
|
3746
|
+
li as useMessageScroll,
|
|
3747
|
+
Be as useRemoteOptions,
|
|
3748
|
+
Me as useSelectedOptions,
|
|
3749
|
+
wa as useSheetHeightDrag
|
|
3710
3750
|
};
|