dsp-semactic 0.7.9 → 0.7.10
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/index.cjs.js +12 -12
- package/dist/index.es.js +468 -468
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as $, computed as v, watch as Dt, nextTick as Ae, onBeforeUnmount as Sn, createElementBlock as c, openBlock as i, normalizeClass as re, createCommentVNode as A, createBlock as Sa, createElementVNode as n, unref as O, Teleport as en, withModifiers as je, normalizeStyle as be, Fragment as ae, renderList as Le, toDisplayString as L, reactive as Ws, onMounted as Pn, renderSlot as pl, createTextVNode as zl, onUnmounted as hs, withDirectives as
|
|
1
|
+
import { ref as $, computed as v, watch as Dt, nextTick as Ae, onBeforeUnmount as Sn, createElementBlock as c, openBlock as i, normalizeClass as re, createCommentVNode as A, createBlock as Sa, createElementVNode as n, unref as O, Teleport as en, withModifiers as je, normalizeStyle as be, Fragment as ae, renderList as Le, toDisplayString as L, reactive as Ws, onMounted as Pn, renderSlot as pl, createTextVNode as zl, onUnmounted as hs, withDirectives as rl, vShow as _n, createVNode as fn, vModelText as Dl, createStaticVNode as ro, Transition as ms, withCtx as _a, withKeys as ra, useSlots as mo, defineComponent as Go, resolveDynamicComponent as io, mergeProps as uo, toHandlers as co } from "vue";
|
|
2
2
|
import { useI18n as es, createI18n as Qo } from "vue-i18n";
|
|
3
3
|
const Jo = {
|
|
4
4
|
key: 0,
|
|
@@ -82,7 +82,7 @@ const Jo = {
|
|
|
82
82
|
},
|
|
83
83
|
emits: ["update:modelValue"],
|
|
84
84
|
setup(T, { emit: ue }) {
|
|
85
|
-
const I = T, D = ue, { t: ke, locale: Y } = es(), P = $(!1), we = $("days"), xt = /* @__PURE__ */ new Date(), ce = v(() => I.minDate instanceof Date ? I.minDate : xt), y = $(ce.value.getMonth()),
|
|
85
|
+
const I = T, D = ue, { t: ke, locale: Y } = es(), P = $(!1), we = $("days"), xt = /* @__PURE__ */ new Date(), ce = v(() => I.minDate instanceof Date ? I.minDate : xt), y = $(ce.value.getMonth()), Re = $(ce.value.getFullYear()), Ee = $(ce.value.getMonth()), ie = $(ce.value.getFullYear()), le = $(ce.value.getMonth()), $e = $(ce.value.getFullYear()), ze = $("start"), Ce = $(null), Ie = $(null);
|
|
86
86
|
function J() {
|
|
87
87
|
const B = ce.value, U = B.getMonth(), F = B.getFullYear(), ne = U === 11 ? 0 : U + 1, Ye = U === 11 ? F + 1 : F;
|
|
88
88
|
return { left: { month: U, year: F }, right: { month: ne, year: Ye } };
|
|
@@ -91,11 +91,11 @@ const Jo = {
|
|
|
91
91
|
() => ["single", "singleFromAvailable"].includes(I.mode)
|
|
92
92
|
), ct = v(
|
|
93
93
|
() => ["range", "rangeFromAvailable"].includes(I.mode)
|
|
94
|
-
), Ct = v(() => I.mode === "listFromAvailable"),
|
|
94
|
+
), Ct = v(() => I.mode === "listFromAvailable"), il = v(() => {
|
|
95
95
|
if (!["single", "singleFromAvailable", "listFromAvailable"].includes(I.mode)) return null;
|
|
96
96
|
const B = I.modelValue;
|
|
97
97
|
return B instanceof Date ? B : null;
|
|
98
|
-
}),
|
|
98
|
+
}), De = v(() => {
|
|
99
99
|
if (!ct.value) return { start: null, end: null };
|
|
100
100
|
const B = I.modelValue;
|
|
101
101
|
return !B || typeof B != "object" ? { start: null, end: null } : {
|
|
@@ -103,38 +103,38 @@ const Jo = {
|
|
|
103
103
|
end: B.end instanceof Date ? B.end : null
|
|
104
104
|
};
|
|
105
105
|
});
|
|
106
|
-
function
|
|
106
|
+
function al(B) {
|
|
107
107
|
if (!B || !(B instanceof Date)) return "";
|
|
108
108
|
const U = B.getDate(), F = B.getMonth() + 1, ne = B.getFullYear(), Ye = ($t) => String($t).padStart(2, "0");
|
|
109
109
|
return `${Ye(U)}/${Ye(F)}/${ne}`;
|
|
110
110
|
}
|
|
111
|
-
const _t = v(() =>
|
|
112
|
-
const { start: B, end: U } =
|
|
111
|
+
const _t = v(() => al(il.value)), ft = v(() => {
|
|
112
|
+
const { start: B, end: U } = De.value;
|
|
113
113
|
if (!B && !U) return "";
|
|
114
114
|
const F = !U || B && B <= U ? B : U, ne = !B || U && U >= B ? U : B;
|
|
115
|
-
return
|
|
115
|
+
return sl(F, ne) ? al(F) : `${al(F)} - ${al(ne)}`;
|
|
116
116
|
}), Ft = v(() => {
|
|
117
117
|
if (I.mode !== "readonly") return "—";
|
|
118
118
|
const B = I.modelValue;
|
|
119
|
-
if (B instanceof Date) return
|
|
119
|
+
if (B instanceof Date) return al(B) || "—";
|
|
120
120
|
if (B && typeof B == "object" && ("start" in B || "end" in B)) {
|
|
121
121
|
const U = B.start instanceof Date ? B.start : null, F = B.end instanceof Date ? B.end : null;
|
|
122
122
|
if (!U && !F) return "—";
|
|
123
123
|
const ne = !F || U && U <= F ? U : F, Ye = !U || F && F >= U ? F : U;
|
|
124
|
-
return
|
|
124
|
+
return sl(ne, Ye) ? al(ne) : `${al(ne)} - ${al(Ye)}`;
|
|
125
125
|
}
|
|
126
126
|
return "—";
|
|
127
127
|
});
|
|
128
128
|
v(() => {
|
|
129
|
-
const B = new Date(
|
|
129
|
+
const B = new Date(Re.value, y.value, 1);
|
|
130
130
|
return new Intl.DateTimeFormat(Y.value, { month: "long", year: "numeric" }).format(B);
|
|
131
131
|
});
|
|
132
132
|
const gl = v(
|
|
133
133
|
() => Ie.value === "left" ? Ee.value : Ie.value === "right" ? le.value : y.value
|
|
134
134
|
), At = v(
|
|
135
|
-
() => Ie.value === "left" ? ie.value : Ie.value === "right" ? $e.value :
|
|
136
|
-
),
|
|
137
|
-
const B = new Date(
|
|
135
|
+
() => Ie.value === "left" ? ie.value : Ie.value === "right" ? $e.value : Re.value
|
|
136
|
+
), nl = v(() => {
|
|
137
|
+
const B = new Date(Re.value, y.value, 1);
|
|
138
138
|
return new Intl.DateTimeFormat(Y.value, { month: "long" }).format(B);
|
|
139
139
|
}), Lt = v(() => {
|
|
140
140
|
const B = new Date(At.value, gl.value, 1);
|
|
@@ -146,9 +146,9 @@ const Jo = {
|
|
|
146
146
|
(U, F) => B.format(new Date(2024, F, 1))
|
|
147
147
|
);
|
|
148
148
|
}), Nt = v(() => {
|
|
149
|
-
const U = (Ie.value ? At.value :
|
|
149
|
+
const U = (Ie.value ? At.value : Re.value) - Math.floor(vo / 2);
|
|
150
150
|
return Array.from({ length: vo }, (F, ne) => U + ne);
|
|
151
|
-
}),
|
|
151
|
+
}), ul = v(() => {
|
|
152
152
|
const B = Nt.value;
|
|
153
153
|
return B.length ? `${B[0]} – ${B[B.length - 1]}` : "";
|
|
154
154
|
});
|
|
@@ -183,7 +183,7 @@ const Jo = {
|
|
|
183
183
|
return kt;
|
|
184
184
|
}
|
|
185
185
|
const ut = v(
|
|
186
|
-
() => ot(
|
|
186
|
+
() => ot(Re.value, y.value, ve.value)
|
|
187
187
|
), Ut = v(
|
|
188
188
|
() => ot(ie.value, Ee.value, ve.value)
|
|
189
189
|
), We = v(
|
|
@@ -251,14 +251,14 @@ const Jo = {
|
|
|
251
251
|
top: `${ee.value.top}px`,
|
|
252
252
|
zIndex: 1002
|
|
253
253
|
});
|
|
254
|
-
function
|
|
254
|
+
function sl(B, U) {
|
|
255
255
|
return !B || !U ? !1 : B.getFullYear() === U.getFullYear() && B.getMonth() === U.getMonth() && B.getDate() === U.getDate();
|
|
256
256
|
}
|
|
257
257
|
function mt(B) {
|
|
258
258
|
return new Date(B.getFullYear(), B.getMonth(), B.getDate()).getTime();
|
|
259
259
|
}
|
|
260
260
|
function wl(B) {
|
|
261
|
-
return !I.availableDates || !I.availableDates.length ? !0 : I.availableDates.some((U) => U instanceof Date &&
|
|
261
|
+
return !I.availableDates || !I.availableDates.length ? !0 : I.availableDates.some((U) => U instanceof Date && sl(U, B));
|
|
262
262
|
}
|
|
263
263
|
function V(B) {
|
|
264
264
|
const U = mt(B);
|
|
@@ -285,17 +285,17 @@ const Jo = {
|
|
|
285
285
|
return F > ne ? null : { start: S(F), end: S(ne) };
|
|
286
286
|
}
|
|
287
287
|
function he(B) {
|
|
288
|
-
return !I.exceptDates || !I.exceptDates.length ? !1 : I.exceptDates.some((U) => U instanceof Date &&
|
|
288
|
+
return !I.exceptDates || !I.exceptDates.length ? !1 : I.exceptDates.some((U) => U instanceof Date && sl(U, B));
|
|
289
289
|
}
|
|
290
290
|
function Ke(B) {
|
|
291
291
|
return he(B) ? !1 : ["singleFromAvailable", "rangeFromAvailable"].includes(I.mode) ? wl(B) : V(B);
|
|
292
292
|
}
|
|
293
293
|
function Ht(B) {
|
|
294
|
-
const U =
|
|
294
|
+
const U = il.value, F = De.value, ne = mt(B), Ye = ct.value && F.start && F.end && ne > mt(F.start) && ne < mt(F.end), $t = ct.value && F.start && sl(B, F.start), St = ct.value && F.end && sl(B, F.end), kt = $t && St, gt = vt.value && U && sl(B, U) || $t || St;
|
|
295
295
|
let Vl = !1;
|
|
296
296
|
if (ct.value && F.start && !F.end && Ce.value) {
|
|
297
|
-
const Bl = mt(F.start),
|
|
298
|
-
Vl = ne > jt && ne <
|
|
297
|
+
const Bl = mt(F.start), cl = mt(Ce.value), jt = Math.min(Bl, cl), dl = Math.max(Bl, cl);
|
|
298
|
+
Vl = ne > jt && ne < dl;
|
|
299
299
|
}
|
|
300
300
|
return {
|
|
301
301
|
"dss-datepicker__day--selected": gt && !kt,
|
|
@@ -309,7 +309,7 @@ const Jo = {
|
|
|
309
309
|
}
|
|
310
310
|
function ht(B) {
|
|
311
311
|
if (!ct.value) return;
|
|
312
|
-
const U =
|
|
312
|
+
const U = De.value;
|
|
313
313
|
if (!U.start || U.end) {
|
|
314
314
|
Ce.value = null;
|
|
315
315
|
return;
|
|
@@ -325,16 +325,16 @@ const Jo = {
|
|
|
325
325
|
}
|
|
326
326
|
function It() {
|
|
327
327
|
if (!I.doubleCalendar || !ct.value) return;
|
|
328
|
-
const B =
|
|
328
|
+
const B = De.value, { start: U, end: F } = B;
|
|
329
329
|
if (U && F) {
|
|
330
330
|
const $t = U <= F ? U : F, St = U <= F ? F : U, kt = $t.getMonth(), gt = $t.getFullYear(), Vl = St.getMonth(), Bl = St.getFullYear();
|
|
331
331
|
if (kt !== Vl || gt !== Bl) {
|
|
332
|
-
const
|
|
333
|
-
if (
|
|
332
|
+
const cl = Ee.value === kt && ie.value === gt, jt = le.value === Vl && $e.value === Bl;
|
|
333
|
+
if (cl && jt) return;
|
|
334
334
|
Ee.value = kt, ie.value = gt, le.value = Vl, $e.value = Bl;
|
|
335
335
|
} else {
|
|
336
|
-
const
|
|
337
|
-
Ee.value ===
|
|
336
|
+
const cl = kt === 0 ? 11 : kt - 1, jt = kt === 0 ? gt - 1 : gt;
|
|
337
|
+
Ee.value === cl && ie.value === jt && le.value === kt && $e.value === gt || (Ee.value = kt, ie.value = gt, kt === 11 ? (le.value = 0, $e.value = gt + 1) : (le.value = kt + 1, $e.value = gt));
|
|
338
338
|
}
|
|
339
339
|
return;
|
|
340
340
|
}
|
|
@@ -354,12 +354,12 @@ const Jo = {
|
|
|
354
354
|
if (!Ct.value) return [];
|
|
355
355
|
const B = (I.availableDates || []).filter((F) => F instanceof Date && !Number.isNaN(F.getTime())).filter((F) => !he(F) && V(F)).map((F) => new Date(F.getFullYear(), F.getMonth(), F.getDate()));
|
|
356
356
|
B.sort((F, ne) => ne.getTime() - F.getTime());
|
|
357
|
-
const U =
|
|
357
|
+
const U = il.value;
|
|
358
358
|
return B.map((F) => ({
|
|
359
359
|
date: F,
|
|
360
360
|
ts: F.getTime(),
|
|
361
361
|
label: zt.value.format(F),
|
|
362
|
-
selected: !!(U &&
|
|
362
|
+
selected: !!(U && sl(F, U))
|
|
363
363
|
}));
|
|
364
364
|
});
|
|
365
365
|
function Zt() {
|
|
@@ -379,15 +379,15 @@ const Jo = {
|
|
|
379
379
|
function Pt(B = "start") {
|
|
380
380
|
if (I.mode === "readonly") return;
|
|
381
381
|
ze.value = B;
|
|
382
|
-
const U =
|
|
382
|
+
const U = il.value, F = De.value;
|
|
383
383
|
if (vt.value && U)
|
|
384
|
-
y.value = U.getMonth(),
|
|
384
|
+
y.value = U.getMonth(), Re.value = U.getFullYear();
|
|
385
385
|
else if (ct.value)
|
|
386
386
|
if (I.doubleCalendar)
|
|
387
387
|
It();
|
|
388
388
|
else {
|
|
389
389
|
const ne = B === "start" && F.start ? F.start : F.end || F.start;
|
|
390
|
-
ne && (y.value = ne.getMonth(),
|
|
390
|
+
ne && (y.value = ne.getMonth(), Re.value = ne.getFullYear());
|
|
391
391
|
}
|
|
392
392
|
Q.value = vt.value ? Tt.value?.closest(".dss-datepicker__input-wrap") : bt.value, we.value = "days", Ie.value = null, oe.value = "left", P.value = !0, Ne();
|
|
393
393
|
}
|
|
@@ -468,13 +468,13 @@ const Jo = {
|
|
|
468
468
|
Ie.value === "left" ? Ee.value = B : Ie.value === "right" ? le.value = B : y.value = B, aa();
|
|
469
469
|
}
|
|
470
470
|
function Ql(B) {
|
|
471
|
-
Ie.value === "left" ? ie.value = B : Ie.value === "right" ? $e.value = B :
|
|
471
|
+
Ie.value === "left" ? ie.value = B : Ie.value === "right" ? $e.value = B : Re.value = B, aa();
|
|
472
472
|
}
|
|
473
473
|
function Ta() {
|
|
474
|
-
y.value === 0 ? (y.value = 11,
|
|
474
|
+
y.value === 0 ? (y.value = 11, Re.value--) : y.value--;
|
|
475
475
|
}
|
|
476
476
|
function Jl() {
|
|
477
|
-
y.value === 11 ? (y.value = 0,
|
|
477
|
+
y.value === 11 ? (y.value = 0, Re.value++) : y.value++;
|
|
478
478
|
}
|
|
479
479
|
function pn() {
|
|
480
480
|
Ee.value === 0 ? (Ee.value = 11, ie.value--) : Ee.value--;
|
|
@@ -495,7 +495,7 @@ const Jo = {
|
|
|
495
495
|
D("update:modelValue", U), Rl();
|
|
496
496
|
return;
|
|
497
497
|
}
|
|
498
|
-
const F =
|
|
498
|
+
const F = De.value;
|
|
499
499
|
if (!F.start && !F.end) {
|
|
500
500
|
D("update:modelValue", { start: U, end: null }), ze.value = "end";
|
|
501
501
|
return;
|
|
@@ -512,7 +512,7 @@ const Jo = {
|
|
|
512
512
|
ne && Ye && Ye < ne && ([ne, Ye] = [Ye, ne]), D("update:modelValue", { start: ne || Ye, end: Ye || ne }), ze.value = "start";
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
|
-
Dt(
|
|
515
|
+
Dt(De, () => {
|
|
516
516
|
I.doubleCalendar && ct.value && P.value && It();
|
|
517
517
|
}, { deep: !0 });
|
|
518
518
|
let ba = null, da = null, Fl = null;
|
|
@@ -528,7 +528,7 @@ const Jo = {
|
|
|
528
528
|
P.value,
|
|
529
529
|
we.value,
|
|
530
530
|
y.value,
|
|
531
|
-
|
|
531
|
+
Re.value,
|
|
532
532
|
Ee.value,
|
|
533
533
|
ie.value,
|
|
534
534
|
le.value,
|
|
@@ -848,12 +848,12 @@ const Jo = {
|
|
|
848
848
|
type: "button",
|
|
849
849
|
class: "dss-datepicker__month-year-btn",
|
|
850
850
|
onClick: U[6] || (U[6] = (F) => we.value = "months")
|
|
851
|
-
}, L(
|
|
851
|
+
}, L(nl.value), 1),
|
|
852
852
|
n("button", {
|
|
853
853
|
type: "button",
|
|
854
854
|
class: "dss-datepicker__month-year-btn",
|
|
855
855
|
onClick: U[7] || (U[7] = (F) => we.value = "years")
|
|
856
|
-
}, L(
|
|
856
|
+
}, L(Re.value), 1)
|
|
857
857
|
]),
|
|
858
858
|
n("button", {
|
|
859
859
|
type: "button",
|
|
@@ -902,7 +902,7 @@ const Jo = {
|
|
|
902
902
|
])
|
|
903
903
|
], 64)) : we.value === "years" ? (i(), c(ae, { key: 4 }, [
|
|
904
904
|
n("div", Wr, [
|
|
905
|
-
n("span", Zr, L(
|
|
905
|
+
n("span", Zr, L(ul.value), 1)
|
|
906
906
|
]),
|
|
907
907
|
n("div", {
|
|
908
908
|
class: "dss-datepicker__years-wrap",
|
|
@@ -1066,7 +1066,7 @@ const Jo = {
|
|
|
1066
1066
|
};
|
|
1067
1067
|
});
|
|
1068
1068
|
return ue.segmentOrder === "desc" ? [...W].sort((te, ve) => ve.value - te.value) : ue.segmentOrder === "asc" ? [...W].sort((te, ve) => te.value - ve.value) : W;
|
|
1069
|
-
}), y = v(() => xt.value ? ce.value.reduce((W, te) => W + te.value, 0) : we.value),
|
|
1069
|
+
}), y = v(() => xt.value ? ce.value.reduce((W, te) => W + te.value, 0) : we.value), Re = v(() => xt.value ? Number.isFinite(Number(ue.totalValue)) && Number(ue.totalValue) > 0 ? Number(ue.totalValue) : Math.max(1, y.value) : P.value), Ee = v(
|
|
1070
1070
|
() => xt.value && Number.isFinite(Number(ue.totalValue)) && Number(ue.totalValue) > 0
|
|
1071
1071
|
), ie = v(() => Ee.value ? Math.max(0, Number(ue.totalValue) - y.value) : 0), le = v(
|
|
1072
1072
|
() => typeof ue.remainderLabel == "string" && ue.remainderLabel.trim().length > 0
|
|
@@ -1075,12 +1075,12 @@ const Jo = {
|
|
|
1075
1075
|
), Ce = v(
|
|
1076
1076
|
() => ce.value.filter((W) => W.value > 0).map((W) => `${W.label}: ${ft(W.value)}`).join(" | ")
|
|
1077
1077
|
), Ie = v(() => xt.value ? Ee.value ? ce.value.filter((W) => W.value > 0) : ce.value : []), J = v(() => {
|
|
1078
|
-
if (!ue.counterAsPercentage) return `${y.value} / ${
|
|
1079
|
-
const W = Number(
|
|
1078
|
+
if (!ue.counterAsPercentage) return `${y.value} / ${Re.value}`;
|
|
1079
|
+
const W = Number(Re.value);
|
|
1080
1080
|
if (!Number.isFinite(W) || W <= 0) return "0%";
|
|
1081
1081
|
const te = Math.round(Number(y.value) / W * 100);
|
|
1082
1082
|
return `${Math.min(Math.max(te, 0), 100)}%`;
|
|
1083
|
-
}), Tt = v(() => y.value), bt = v(() =>
|
|
1083
|
+
}), Tt = v(() => y.value), bt = v(() => Re.value), Xe = Ws({
|
|
1084
1084
|
visible: !1,
|
|
1085
1085
|
x: 0,
|
|
1086
1086
|
y: 0,
|
|
@@ -1133,8 +1133,8 @@ const Jo = {
|
|
|
1133
1133
|
...Be(ve),
|
|
1134
1134
|
backgroundColor: W.color
|
|
1135
1135
|
};
|
|
1136
|
-
},
|
|
1137
|
-
const te = D(W?.marker) ? W.marker : {}, ve = W?.marker === !0 || te.enabled === !0, Me =
|
|
1136
|
+
}, il = (W) => Number(W?.value || 0) > 0 && Number(W?.value || 0) === ze.value, De = (W) => {
|
|
1137
|
+
const te = D(W?.marker) ? W.marker : {}, ve = W?.marker === !0 || te.enabled === !0, Me = il(W) && Y.value.maxSegment?.marker?.enabled === !0;
|
|
1138
1138
|
if (!(ve || Me)) return { enabled: !1 };
|
|
1139
1139
|
const ut = te.backgroundColor ?? (Me ? Y.value.maxSegment?.marker?.backgroundColor : Y.value.segmentMarker?.backgroundColor), Ut = te.borderColor ?? (Me ? Y.value.maxSegment?.marker?.borderColor : Y.value.segmentMarker?.borderColor), We = te.color ?? (Me ? Y.value.maxSegment?.marker?.color : Y.value.segmentMarker?.color), dt = te.width ?? (Me ? Y.value.maxSegment?.marker?.width : Y.value.segmentMarker?.width), Rt = te.height ?? (Me ? Y.value.maxSegment?.marker?.height : Y.value.segmentMarker?.height);
|
|
1140
1140
|
return {
|
|
@@ -1147,15 +1147,15 @@ const Jo = {
|
|
|
1147
1147
|
icon: te.icon ?? null,
|
|
1148
1148
|
...te
|
|
1149
1149
|
};
|
|
1150
|
-
},
|
|
1151
|
-
const te =
|
|
1150
|
+
}, al = (W) => {
|
|
1151
|
+
const te = De(W);
|
|
1152
1152
|
return {
|
|
1153
1153
|
backgroundColor: te.backgroundColor ?? void 0,
|
|
1154
1154
|
borderColor: te.borderColor ?? void 0,
|
|
1155
1155
|
color: te.color ?? void 0
|
|
1156
1156
|
};
|
|
1157
1157
|
}, _t = (W) => {
|
|
1158
|
-
const te =
|
|
1158
|
+
const te = De(W);
|
|
1159
1159
|
return {
|
|
1160
1160
|
width: te.width ?? void 0,
|
|
1161
1161
|
height: te.height ?? void 0
|
|
@@ -1167,7 +1167,7 @@ const Jo = {
|
|
|
1167
1167
|
ue.disableTooltips || Lt(W, te);
|
|
1168
1168
|
}, At = (W) => {
|
|
1169
1169
|
ue.disableTooltips || ml(W);
|
|
1170
|
-
},
|
|
1170
|
+
}, nl = () => {
|
|
1171
1171
|
ue.disableTooltips || Nt();
|
|
1172
1172
|
}, Lt = (W, te) => {
|
|
1173
1173
|
if (!W || !te?.currentTarget) return;
|
|
@@ -1191,13 +1191,13 @@ const Jo = {
|
|
|
1191
1191
|
Xe.x = ve.x, Xe.y = ve.y, le.value && (Xe.content = `${ue.remainderLabel}: ${ft(ie.value)}`, Xe.visible = !0);
|
|
1192
1192
|
}, Nt = () => {
|
|
1193
1193
|
Xe.visible = !1;
|
|
1194
|
-
},
|
|
1194
|
+
}, ul = () => {
|
|
1195
1195
|
Xe.visible && Nt();
|
|
1196
1196
|
};
|
|
1197
1197
|
Pn(() => {
|
|
1198
|
-
window.addEventListener("scroll",
|
|
1198
|
+
window.addEventListener("scroll", ul, !0);
|
|
1199
1199
|
}), Sn(() => {
|
|
1200
|
-
window.removeEventListener("scroll",
|
|
1200
|
+
window.removeEventListener("scroll", ul, !0);
|
|
1201
1201
|
});
|
|
1202
1202
|
const Se = v(() => ({
|
|
1203
1203
|
"--dss-step-bar-label-color": ue.labelColor ?? void 0,
|
|
@@ -1241,17 +1241,17 @@ const Jo = {
|
|
|
1241
1241
|
(i(!0), c(ae, null, Le(Ie.value, (ve, Me) => (i(), c("div", {
|
|
1242
1242
|
key: `segment-${Me}-${ve.label}`,
|
|
1243
1243
|
class: re(["dss-step-bar__segment dss-step-bar__segment--interactive", {
|
|
1244
|
-
"dss-step-bar__segment--max":
|
|
1245
|
-
"dss-step-bar__segment--marker-enabled":
|
|
1244
|
+
"dss-step-bar__segment--max": il(ve),
|
|
1245
|
+
"dss-step-bar__segment--marker-enabled": De(ve).enabled
|
|
1246
1246
|
}]),
|
|
1247
1247
|
style: be(Ct(ve)),
|
|
1248
1248
|
onMouseenter: (ot) => gl(ve, ot),
|
|
1249
|
-
onMouseleave:
|
|
1249
|
+
onMouseleave: nl
|
|
1250
1250
|
}, [
|
|
1251
|
-
|
|
1251
|
+
De(ve).enabled ? (i(), c("div", {
|
|
1252
1252
|
key: 0,
|
|
1253
1253
|
class: "dss-step-bar__segment-marker",
|
|
1254
|
-
style: be(
|
|
1254
|
+
style: be(al(ve)),
|
|
1255
1255
|
"aria-hidden": "true"
|
|
1256
1256
|
}, [
|
|
1257
1257
|
n("span", {
|
|
@@ -1261,14 +1261,14 @@ const Jo = {
|
|
|
1261
1261
|
pl(W.$slots, "segment-marker-icon", {
|
|
1262
1262
|
segment: ve,
|
|
1263
1263
|
index: Me,
|
|
1264
|
-
marker:
|
|
1264
|
+
marker: De(ve)
|
|
1265
1265
|
}, () => [
|
|
1266
1266
|
pl(W.$slots, "max-segment-icon", {
|
|
1267
1267
|
segment: ve,
|
|
1268
1268
|
index: Me,
|
|
1269
|
-
marker:
|
|
1269
|
+
marker: De(ve)
|
|
1270
1270
|
}, () => [
|
|
1271
|
-
zl(L(
|
|
1271
|
+
zl(L(De(ve).icon || ""), 1)
|
|
1272
1272
|
])
|
|
1273
1273
|
])
|
|
1274
1274
|
], 4)
|
|
@@ -1279,7 +1279,7 @@ const Jo = {
|
|
|
1279
1279
|
class: "dss-step-bar__segment dss-step-bar__segment--remainder",
|
|
1280
1280
|
style: be(Ft.value),
|
|
1281
1281
|
onMouseenter: te[0] || (te[0] = (ve) => At(ve)),
|
|
1282
|
-
onMouseleave:
|
|
1282
|
+
onMouseleave: nl
|
|
1283
1283
|
}, null, 36)) : A("", !0)
|
|
1284
1284
|
], 64)) : (i(!0), c(ae, { key: 1 }, Le(P.value, (ve) => (i(), c("div", {
|
|
1285
1285
|
key: ve,
|
|
@@ -1434,13 +1434,13 @@ const Jo = {
|
|
|
1434
1434
|
const xt = () => {
|
|
1435
1435
|
we && (we(), we = null);
|
|
1436
1436
|
const e = P.value;
|
|
1437
|
-
if (!e ||
|
|
1437
|
+
if (!e || De.value !== "stepbar") return;
|
|
1438
1438
|
const a = (t) => ls(t);
|
|
1439
1439
|
e.addEventListener("wheel", a, { passive: !1 }), we = () => e.removeEventListener("wheel", a);
|
|
1440
|
-
}, ce = $(null), y = $(null),
|
|
1440
|
+
}, ce = $(null), y = $(null), Re = $(0), Ee = $(0);
|
|
1441
1441
|
let ie = null, le = null;
|
|
1442
1442
|
const $e = 20, ze = v(() => {
|
|
1443
|
-
if (Ee.value,
|
|
1443
|
+
if (Ee.value, Re.value, !Y.value || !ce.value) return 0;
|
|
1444
1444
|
try {
|
|
1445
1445
|
const e = Y.value.getBoundingClientRect();
|
|
1446
1446
|
return ce.value.getBoundingClientRect().top - e.top;
|
|
@@ -1705,10 +1705,10 @@ const Jo = {
|
|
|
1705
1705
|
return e && e.chart && e.chart.height === "auto";
|
|
1706
1706
|
}), Te = v(() => {
|
|
1707
1707
|
const e = Q.value;
|
|
1708
|
-
return
|
|
1708
|
+
return fl.value && e?.chart?.height === "fit";
|
|
1709
1709
|
}), Be = v(() => {
|
|
1710
1710
|
const e = Q.value;
|
|
1711
|
-
return qe.value ?
|
|
1711
|
+
return qe.value ? Re.value || 800 : e && e.chart && typeof e.chart.width == "number" ? e.chart.width : 800;
|
|
1712
1712
|
}), vt = $($e), ct = v(() => {
|
|
1713
1713
|
if (at.value) {
|
|
1714
1714
|
const e = ct.value;
|
|
@@ -1716,7 +1716,7 @@ const Jo = {
|
|
|
1716
1716
|
}
|
|
1717
1717
|
}), Ct = v(() => {
|
|
1718
1718
|
const e = Q.value;
|
|
1719
|
-
if (
|
|
1719
|
+
if (De.value === "mini-radial")
|
|
1720
1720
|
return Be.value;
|
|
1721
1721
|
if (Te.value)
|
|
1722
1722
|
return Ma.value;
|
|
@@ -1725,8 +1725,8 @@ const Jo = {
|
|
|
1725
1725
|
return a ?? Math.max(0, (Ee.value || 400) - vt.value);
|
|
1726
1726
|
}
|
|
1727
1727
|
return e && e.chart && typeof e.chart.height == "number" ? e.chart.height : 400;
|
|
1728
|
-
}),
|
|
1729
|
-
if (at.value &&
|
|
1728
|
+
}), il = v(() => {
|
|
1729
|
+
if (at.value && De.value === "semi-radial" && ct.value != null)
|
|
1730
1730
|
return vt.value + Ct.value + "px";
|
|
1731
1731
|
if (at.value) return "100%";
|
|
1732
1732
|
if (Ol.value)
|
|
@@ -1736,11 +1736,11 @@ const Jo = {
|
|
|
1736
1736
|
return Ct.value + (e.legendHeight || 35) + "px";
|
|
1737
1737
|
}
|
|
1738
1738
|
return Ct.value + (Me.value ? 20 : 0) + "px";
|
|
1739
|
-
}),
|
|
1739
|
+
}), De = v(() => {
|
|
1740
1740
|
const e = Q.value;
|
|
1741
1741
|
return e && e.chart && e.chart.type ? e.chart.type : "line";
|
|
1742
|
-
}),
|
|
1743
|
-
const e = J.series.map((a) => a.type ||
|
|
1742
|
+
}), al = v(() => {
|
|
1743
|
+
const e = J.series.map((a) => a.type || De.value);
|
|
1744
1744
|
return new Set(e).size > 1;
|
|
1745
1745
|
}), _t = v(() => {
|
|
1746
1746
|
const e = Q.value;
|
|
@@ -1759,11 +1759,11 @@ const Jo = {
|
|
|
1759
1759
|
}), At = v(() => {
|
|
1760
1760
|
const a = Q.value?.yAxis?.title?.text;
|
|
1761
1761
|
return a == null || String(a).trim() === "" ? "" : String(a);
|
|
1762
|
-
}),
|
|
1762
|
+
}), nl = v(() => {
|
|
1763
1763
|
const e = Q.value;
|
|
1764
1764
|
return e && e.yAxis && e.yAxis.secondary && typeof e.yAxis.secondary == "object" ? e.yAxis.secondary : null;
|
|
1765
1765
|
}), Lt = v(() => {
|
|
1766
|
-
const e =
|
|
1766
|
+
const e = nl.value;
|
|
1767
1767
|
return e && e.title && e.title.text ? e.title.text : "";
|
|
1768
1768
|
}), ml = v(() => {
|
|
1769
1769
|
const e = Q.value;
|
|
@@ -1775,13 +1775,13 @@ const Jo = {
|
|
|
1775
1775
|
if (!e || !e.yAxis) return Yl;
|
|
1776
1776
|
const a = e.yAxis.max;
|
|
1777
1777
|
return typeof a == "number" || a === Yl ? a : Yl;
|
|
1778
|
-
}),
|
|
1779
|
-
const e =
|
|
1778
|
+
}), ul = v(() => {
|
|
1779
|
+
const e = nl.value;
|
|
1780
1780
|
if (!e) return Yl;
|
|
1781
1781
|
const a = e.min;
|
|
1782
1782
|
return typeof a == "number" || a === Yl ? a : Yl;
|
|
1783
1783
|
}), Se = v(() => {
|
|
1784
|
-
const e =
|
|
1784
|
+
const e = nl.value;
|
|
1785
1785
|
if (!e) return Yl;
|
|
1786
1786
|
const a = e.max;
|
|
1787
1787
|
return typeof a == "number" || a === Yl ? a : Yl;
|
|
@@ -1809,7 +1809,7 @@ const Jo = {
|
|
|
1809
1809
|
}), We = v(() => {
|
|
1810
1810
|
const e = Q.value;
|
|
1811
1811
|
if (!e) return !1;
|
|
1812
|
-
if (
|
|
1812
|
+
if (fl.value) {
|
|
1813
1813
|
if (!e.crosshair) return !0;
|
|
1814
1814
|
const t = e.crosshair.show;
|
|
1815
1815
|
return t !== !1 && t !== "false";
|
|
@@ -1845,7 +1845,7 @@ const Jo = {
|
|
|
1845
1845
|
}), it = (e, a) => Ne.value && a === 0 ? 5 : a, Vt = (e) => {
|
|
1846
1846
|
const a = Number(e);
|
|
1847
1847
|
return !Number.isFinite(a) || a <= 0 ? 0 : a;
|
|
1848
|
-
},
|
|
1848
|
+
}, sl = v(() => {
|
|
1849
1849
|
const e = Q.value;
|
|
1850
1850
|
return e && e.fill && e.fill.area && typeof e.fill.area.opacity == "number" ? e.fill.area.opacity : 0.3;
|
|
1851
1851
|
}), mt = v(() => {
|
|
@@ -1928,7 +1928,7 @@ const Jo = {
|
|
|
1928
1928
|
enabled: !1
|
|
1929
1929
|
}
|
|
1930
1930
|
}
|
|
1931
|
-
})), ua = v(() =>
|
|
1931
|
+
})), ua = v(() => fl.value ? Ga.value.map((e) => ({
|
|
1932
1932
|
key: e.key,
|
|
1933
1933
|
label: e.axisLabel || e.label,
|
|
1934
1934
|
totalValue: e.totalValue,
|
|
@@ -1939,7 +1939,7 @@ const Jo = {
|
|
|
1939
1939
|
marker: a.marker
|
|
1940
1940
|
}))
|
|
1941
1941
|
})) : []), Ha = v(() => {
|
|
1942
|
-
if (!
|
|
1942
|
+
if (!fl.value) return [];
|
|
1943
1943
|
const { minY: e, maxY: a } = Ot.value, t = 5, r = [];
|
|
1944
1944
|
for (let m = 0; m <= t; m++) {
|
|
1945
1945
|
const g = e + (a - e) * (m / t);
|
|
@@ -1958,7 +1958,7 @@ const Jo = {
|
|
|
1958
1958
|
width: `${Jl.value}px`,
|
|
1959
1959
|
minHeight: `${ia.value + Al.value}px`
|
|
1960
1960
|
})), ba = v(
|
|
1961
|
-
() =>
|
|
1961
|
+
() => fl.value && We.value && Ue.value.show && !fe.value.isZooming
|
|
1962
1962
|
), da = v(() => {
|
|
1963
1963
|
const e = Pl.value + aa.value;
|
|
1964
1964
|
return {
|
|
@@ -2004,7 +2004,7 @@ const Jo = {
|
|
|
2004
2004
|
return a[e].toString();
|
|
2005
2005
|
const t = gt.value[e];
|
|
2006
2006
|
return Math.round(t / yt.value * 100) + "%";
|
|
2007
|
-
}, Bl = v(() => Q.value?.spider?.gridLabels || null),
|
|
2007
|
+
}, Bl = v(() => Q.value?.spider?.gridLabels || null), cl = v(() => {
|
|
2008
2008
|
const e = Q.value;
|
|
2009
2009
|
return e && e.contextMenu && e.contextMenu.enabled === !0;
|
|
2010
2010
|
}), jt = v(() => {
|
|
@@ -2015,7 +2015,7 @@ const Jo = {
|
|
|
2015
2015
|
downloadCsv: !0
|
|
2016
2016
|
};
|
|
2017
2017
|
return e && e.contextMenu && e.contextMenu.items ? { ...a, ...e.contextMenu.items } : a;
|
|
2018
|
-
}),
|
|
2018
|
+
}), dl = v(() => {
|
|
2019
2019
|
const e = Q.value;
|
|
2020
2020
|
return e && e.contextMenu && Array.isArray(e.contextMenu.customItems) ? e.contextMenu.customItems : [];
|
|
2021
2021
|
}), Wl = v(() => {
|
|
@@ -2250,7 +2250,7 @@ const Jo = {
|
|
|
2250
2250
|
const a = Q.value?.radialBar?.dataCenter?.fontSize;
|
|
2251
2251
|
return typeof a == "number" && a > 0 ? a : 24;
|
|
2252
2252
|
}), ql = v(() => ({
|
|
2253
|
-
x:
|
|
2253
|
+
x: el.value,
|
|
2254
2254
|
y: un.value ? qt.value : qt.value - hn.value / 2
|
|
2255
2255
|
})), Aa = v(() => {
|
|
2256
2256
|
const a = Q.value?.radialBar?.dataCenter?.color;
|
|
@@ -2259,7 +2259,7 @@ const Jo = {
|
|
|
2259
2259
|
if (!mn.value || !Ol.value || !Qa.value.length) return [];
|
|
2260
2260
|
const e = $a.value * Math.PI / 180, a = (Hl.value + yt.value) / 2;
|
|
2261
2261
|
return Qa.value.map((t) => {
|
|
2262
|
-
const m = t.endAngle - t.startAngle >= e && !t.isHidden, g =
|
|
2262
|
+
const m = t.endAngle - t.startAngle >= e && !t.isHidden, g = el.value + Math.cos(t.midAngle) * a, x = qt.value + Math.sin(t.midAngle) * a;
|
|
2263
2263
|
return {
|
|
2264
2264
|
value: jl(t.value),
|
|
2265
2265
|
x: g,
|
|
@@ -2313,7 +2313,7 @@ const Jo = {
|
|
|
2313
2313
|
value: "",
|
|
2314
2314
|
bubbleData: [],
|
|
2315
2315
|
spiderAreas: []
|
|
2316
|
-
}),
|
|
2316
|
+
}), vl = $({
|
|
2317
2317
|
show: !1,
|
|
2318
2318
|
x: 0,
|
|
2319
2319
|
y: 0,
|
|
@@ -2382,7 +2382,7 @@ const Jo = {
|
|
|
2382
2382
|
Ue.value.show = !1;
|
|
2383
2383
|
return;
|
|
2384
2384
|
}
|
|
2385
|
-
const t = e.currentTarget.getBoundingClientRect(), r = e.clientX - t.left, m = e.clientY - t.top, g = Jt.value ? r >= q.value.left - 50 && r <= q.value.right + 50 && m >= q.value.top - 50 && m <= q.value.bottom + 100 :
|
|
2385
|
+
const t = e.currentTarget.getBoundingClientRect(), r = e.clientX - t.left, m = e.clientY - t.top, g = Jt.value ? r >= q.value.left - 50 && r <= q.value.right + 50 && m >= q.value.top - 50 && m <= q.value.bottom + 100 : fl.value ? r >= q.value.left && r <= q.value.right && m >= q.value.top && m <= q.value.bottom + Al.value : r >= q.value.left && r <= q.value.right && m >= q.value.top && m <= q.value.bottom;
|
|
2386
2386
|
if (pt.value = g, Jt.value) {
|
|
2387
2387
|
if (!We.value || !g || fe.value.isDragging || fe.value.isZooming) {
|
|
2388
2388
|
Ue.value.show = !1;
|
|
@@ -2415,11 +2415,11 @@ const Jo = {
|
|
|
2415
2415
|
const Je = k.value, Ze = C.value, Pe = [];
|
|
2416
2416
|
return rt.forEach((Qe) => {
|
|
2417
2417
|
Je.forEach((Wt) => {
|
|
2418
|
-
const
|
|
2418
|
+
const ll = Ze[Wt] || Wt, ha = Js(Wt, Qe);
|
|
2419
2419
|
ha && Pe.push({
|
|
2420
2420
|
seriesName: Qe.seriesName,
|
|
2421
2421
|
label: Qe.label,
|
|
2422
|
-
value: `${
|
|
2422
|
+
value: `${ll}: ${ha}`,
|
|
2423
2423
|
color: Qe.color,
|
|
2424
2424
|
y: Qe.y
|
|
2425
2425
|
});
|
|
@@ -2432,7 +2432,7 @@ const Jo = {
|
|
|
2432
2432
|
}
|
|
2433
2433
|
return;
|
|
2434
2434
|
}
|
|
2435
|
-
if (
|
|
2435
|
+
if (fl.value) {
|
|
2436
2436
|
if (!We.value || !g || fe.value.isDragging || fe.value.isZooming) {
|
|
2437
2437
|
Ue.value.show = !1;
|
|
2438
2438
|
return;
|
|
@@ -2466,7 +2466,7 @@ const Jo = {
|
|
|
2466
2466
|
};
|
|
2467
2467
|
return;
|
|
2468
2468
|
}
|
|
2469
|
-
if (fe.value.isDragging && fe.value.scale > 1 && Xl.value && Rt.value && !
|
|
2469
|
+
if (fe.value.isDragging && fe.value.scale > 1 && Xl.value && Rt.value && !fl.value) {
|
|
2470
2470
|
Ue.value.show = !1;
|
|
2471
2471
|
const tt = e.clientX - fe.value.lastMouseX, { minX: _e, maxX: He } = Ot.value, Ve = He - _e || 1, rt = tt * 0.8;
|
|
2472
2472
|
fe.value.offsetX += rt;
|
|
@@ -2474,13 +2474,13 @@ const Jo = {
|
|
|
2474
2474
|
fe.value.offsetX = Math.max(Qe, Math.min(Wt, fe.value.offsetX)), fe.value.lastMouseX = e.clientX, fe.value.lastMouseY = e.clientY;
|
|
2475
2475
|
return;
|
|
2476
2476
|
}
|
|
2477
|
-
if (!We.value || !Xl.value ||
|
|
2477
|
+
if (!We.value || !Xl.value || fl.value || fe.value.isDragging || fe.value.isZooming || !g) {
|
|
2478
2478
|
Ue.value.show = !1;
|
|
2479
2479
|
return;
|
|
2480
2480
|
}
|
|
2481
2481
|
const { minX: x, maxX: _ } = Ot.value, K = _ - x || 1, N = K / fe.value.scale, Z = x - fe.value.offsetX / q.value.width * K, R = (r - q.value.left) / q.value.width, se = Z + R * N, Fe = Math.round(se);
|
|
2482
2482
|
if (Fe >= 0 && Fe <= _) {
|
|
2483
|
-
const tt = Nl(Fe), _e =
|
|
2483
|
+
const tt = Nl(Fe), _e = tl.value.map((He, Ve) => {
|
|
2484
2484
|
const xe = J.series.findIndex((Je) => Je === He), rt = He.data[Fe];
|
|
2485
2485
|
return {
|
|
2486
2486
|
seriesName: He.name,
|
|
@@ -2505,7 +2505,7 @@ const Jo = {
|
|
|
2505
2505
|
const t = Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.deltaY;
|
|
2506
2506
|
a.scrollLeft += t;
|
|
2507
2507
|
};
|
|
2508
|
-
Dt([P,
|
|
2508
|
+
Dt([P, () => De.value, () => ua.value.length], () => {
|
|
2509
2509
|
Ae(xt);
|
|
2510
2510
|
});
|
|
2511
2511
|
const as = () => ua.value[Ue.value.categoryIndex]?.label || I("chart.fallback.item", { number: Ue.value.categoryIndex + 1 }), ns = () => {
|
|
@@ -2513,7 +2513,7 @@ const Jo = {
|
|
|
2513
2513
|
G.value = null, Ge.value.show = !1;
|
|
2514
2514
|
}, 150);
|
|
2515
2515
|
}, Cs = (e) => {
|
|
2516
|
-
if (e.preventDefault(), e.stopPropagation(), !
|
|
2516
|
+
if (e.preventDefault(), e.stopPropagation(), !cl.value) return;
|
|
2517
2517
|
const a = e.currentTarget.getBoundingClientRect(), t = e.clientX - a.left, r = e.clientY - a.top;
|
|
2518
2518
|
if (Ol.value) {
|
|
2519
2519
|
wt.value.show = !1, Ae(() => {
|
|
@@ -2710,19 +2710,19 @@ const Jo = {
|
|
|
2710
2710
|
let Ze = 0;
|
|
2711
2711
|
J.series.forEach((Pe, Qe) => {
|
|
2712
2712
|
if (!j.value.has(Qe)) {
|
|
2713
|
-
const Wt = kl(Qe),
|
|
2714
|
-
R += `<circle cx="${xe + 6}" cy="${rt - 4}" r="6" fill="${Wt}"/>`, R += `<text x="${xe + 18}" y="${rt}" font-family="Arial, sans-serif" font-size="12" fill="#333">${
|
|
2713
|
+
const Wt = kl(Qe), ll = Pe.name.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
2714
|
+
R += `<circle cx="${xe + 6}" cy="${rt - 4}" r="6" fill="${Wt}"/>`, R += `<text x="${xe + 18}" y="${rt}" font-family="Arial, sans-serif" font-size="12" fill="#333">${ll}</text>`, Ze++, Ze % Je === 0 ? (xe = r - 200, rt += 20) : xe += Math.min(120, ll.length * 8 + 35);
|
|
2715
2715
|
}
|
|
2716
2716
|
});
|
|
2717
2717
|
}
|
|
2718
2718
|
let Fe = "";
|
|
2719
2719
|
if (ka.value)
|
|
2720
2720
|
try {
|
|
2721
|
-
const { width: xe, height: rt } = yl.value, Je = na.value, Ze = q.value.left, Pe = q.value.right, Qe = q.value.top, Wt = q.value.bottom,
|
|
2721
|
+
const { width: xe, height: rt } = yl.value, Je = na.value, Ze = q.value.left, Pe = q.value.right, Qe = q.value.top, Wt = q.value.bottom, ll = q.value.width, ha = q.value.height;
|
|
2722
2722
|
let Il, ga;
|
|
2723
2723
|
switch (Je) {
|
|
2724
2724
|
case "center":
|
|
2725
|
-
Il = Ze + (
|
|
2725
|
+
Il = Ze + (ll - xe) / 2, ga = Qe + (ha - rt) / 2;
|
|
2726
2726
|
break;
|
|
2727
2727
|
case "top-left":
|
|
2728
2728
|
Il = Ze + 15, ga = Qe + 5;
|
|
@@ -2807,8 +2807,8 @@ const Jo = {
|
|
|
2807
2807
|
Z.forEach((xe) => xe.remove()), R.forEach((xe) => xe.remove()), se.forEach((xe) => xe.remove()), N.querySelectorAll("image").forEach((xe, rt) => {
|
|
2808
2808
|
const Je = xe.getAttribute("xlink:href") || xe.getAttribute("href");
|
|
2809
2809
|
if (Je && !Je.startsWith("data:")) {
|
|
2810
|
-
const Ze = ds.value[rt], Pe = Ze ? kl(Ze.seriesIndex) : "#3B82F6", Qe = xe.getAttribute("x") || 0, Wt = xe.getAttribute("y") || 0,
|
|
2811
|
-
Il.setAttribute("cx", parseFloat(Qe) + parseFloat(
|
|
2810
|
+
const Ze = ds.value[rt], Pe = Ze ? kl(Ze.seriesIndex) : "#3B82F6", Qe = xe.getAttribute("x") || 0, Wt = xe.getAttribute("y") || 0, ll = xe.getAttribute("width") || 32, ha = xe.getAttribute("height") || 32, Il = document.createElementNS("http://www.w3.org/2000/svg", "circle");
|
|
2811
|
+
Il.setAttribute("cx", parseFloat(Qe) + parseFloat(ll) / 2), Il.setAttribute("cy", parseFloat(Wt) + parseFloat(ha) / 2), Il.setAttribute("r", Math.min(parseFloat(ll), parseFloat(ha)) / 2 - 1), Il.setAttribute("fill", Pe), Il.setAttribute("stroke", "#fafafa"), Il.setAttribute("stroke-width", "2"), xe.parentNode.replaceChild(Il, xe);
|
|
2812
2812
|
}
|
|
2813
2813
|
});
|
|
2814
2814
|
const tt = new XMLSerializer().serializeToString(N), _e = new Blob([tt], { type: "image/svg+xml;charset=utf-8" }), He = URL.createObjectURL(_e), Ve = new Image();
|
|
@@ -2820,9 +2820,9 @@ const Jo = {
|
|
|
2820
2820
|
g.save(), g.beginPath(), g.arc(Ze, Pe, Qe - 1, 0, 2 * Math.PI), g.fillStyle = Wt, g.fill(), g.strokeStyle = "#fafafa", g.lineWidth = 2, g.stroke(), g.restore();
|
|
2821
2821
|
}), ka.value) {
|
|
2822
2822
|
const Je = new Image(), Ze = () => {
|
|
2823
|
-
const { width: Qe, height: Wt } = yl.value,
|
|
2823
|
+
const { width: Qe, height: Wt } = yl.value, ll = na.value, ha = q.value.left, Il = q.value.right, ga = q.value.top, ps = q.value.bottom, jo = q.value.width, Ko = q.value.height;
|
|
2824
2824
|
let In, Fn;
|
|
2825
|
-
switch (
|
|
2825
|
+
switch (ll) {
|
|
2826
2826
|
case "center":
|
|
2827
2827
|
In = ha + (jo - Qe) / 2, Fn = ga + a.height + (Ko - Wt) / 2;
|
|
2828
2828
|
break;
|
|
@@ -2843,8 +2843,8 @@ const Jo = {
|
|
|
2843
2843
|
g.globalAlpha = Za.value, g.drawImage(Je, In, Fn, Qe, Wt), g.globalAlpha = 1, Pe();
|
|
2844
2844
|
}, Pe = () => {
|
|
2845
2845
|
m.toBlob((Qe) => {
|
|
2846
|
-
const Wt = URL.createObjectURL(Qe),
|
|
2847
|
-
|
|
2846
|
+
const Wt = URL.createObjectURL(Qe), ll = document.createElement("a");
|
|
2847
|
+
ll.href = Wt, ll.download = pa("png"), document.body.appendChild(ll), ll.click(), document.body.removeChild(ll), URL.revokeObjectURL(Wt), URL.revokeObjectURL(He), sa(e), Na(), xe();
|
|
2848
2848
|
}, "image/png");
|
|
2849
2849
|
};
|
|
2850
2850
|
Je.onload = Ze, Je.onerror = Pe, Je.src = xl.value;
|
|
@@ -2870,7 +2870,7 @@ const Jo = {
|
|
|
2870
2870
|
`), ft.value && (e += `# ${I("chart.csv.chartSubtitle")}: ${ft.value}
|
|
2871
2871
|
`), e += `# ${I("chart.csv.generated")}: ${(/* @__PURE__ */ new Date()).toLocaleString()}
|
|
2872
2872
|
|
|
2873
|
-
`,
|
|
2873
|
+
`, fl.value) {
|
|
2874
2874
|
e += `Category,Segment,Value
|
|
2875
2875
|
`, Ga.value.forEach((K) => {
|
|
2876
2876
|
K.segments.forEach((N) => {
|
|
@@ -2930,7 +2930,7 @@ const Jo = {
|
|
|
2930
2930
|
}, Un = (e) => {
|
|
2931
2931
|
wt.value.show && !e.target.closest(".context-menu") && (wt.value.show = !1);
|
|
2932
2932
|
}, is = (e) => {
|
|
2933
|
-
if (!Xl.value || !Rt.value ||
|
|
2933
|
+
if (!Xl.value || !Rt.value || fl.value) return;
|
|
2934
2934
|
e.preventDefault(), e.stopPropagation(), fe.value.isZooming = !0, Ue.value.show = !1, fe.value.zoomTimeout && clearTimeout(fe.value.zoomTimeout);
|
|
2935
2935
|
const t = e.currentTarget.getBoundingClientRect(), r = e.clientX - t.left, m = e.clientY - t.top;
|
|
2936
2936
|
if (r < q.value.left - 50 || r > q.value.right + 50 || m < q.value.top - 50 || m > q.value.bottom + 100) {
|
|
@@ -2983,7 +2983,7 @@ const Jo = {
|
|
|
2983
2983
|
const He = Xe();
|
|
2984
2984
|
let Ve = tt + (R ? 4 : 16) + (se ? Fe : 0), xe = tt + (se ? Fe : 0);
|
|
2985
2985
|
Me.value && ot.value === "left" ? Ve += He.legendWidth || 150 : Me.value && ot.value === "right" && (xe += He.legendWidth || 150);
|
|
2986
|
-
const Je =
|
|
2986
|
+
const Je = De.value === "semi-radial" ? se ? Fe : 8 : se ? Fe : R ? 8 : m + 80, Ze = se ? 14 : 0, Pe = tt + _e + Ze, Qe = {
|
|
2987
2987
|
left: Ve,
|
|
2988
2988
|
top: Pe,
|
|
2989
2989
|
right: xe,
|
|
@@ -2995,7 +2995,7 @@ const Jo = {
|
|
|
2995
2995
|
_t.value && (x += 15), ft.value && (x += 10);
|
|
2996
2996
|
const _ = Xe();
|
|
2997
2997
|
let K = m + 16 + (At.value ? 30 : 0), N = m + (Lt.value ? 30 : 0);
|
|
2998
|
-
Me.value && ot.value === "left" ? K += _.legendWidth || 150 : Me.value && ot.value === "right" && (N += _.legendWidth || 150), Ka.value && (N += 44),
|
|
2998
|
+
Me.value && ot.value === "left" ? K += _.legendWidth || 150 : Me.value && ot.value === "right" && (N += _.legendWidth || 150), Ka.value && (N += 44), fl.value && (g = Al.value + 8);
|
|
2999
2999
|
const Z = { left: K, top: m + x, right: N, bottom: g };
|
|
3000
3000
|
return t != null ? { left: t, top: t, right: t, bottom: t } : r ? { left: r.left ?? Z.left, top: r.top ?? Z.top, right: r.right ?? Z.right, bottom: r.bottom ?? Z.bottom } : Z;
|
|
3001
3001
|
}), q = v(() => ({
|
|
@@ -3005,13 +3005,13 @@ const Jo = {
|
|
|
3005
3005
|
bottom: Ct.value - Ul.value.bottom,
|
|
3006
3006
|
width: Be.value - (Ul.value.left + Ul.value.right),
|
|
3007
3007
|
height: Ct.value - (Ul.value.top + Ul.value.bottom)
|
|
3008
|
-
})), Xl = v(() => ["line", "area", "bar", "stepbar"].includes(
|
|
3008
|
+
})), Xl = v(() => ["line", "area", "bar", "stepbar"].includes(De.value) || al.value), oa = v(() => al.value), un = v(() => De.value === "mini-radial"), Ol = v(() => ["radial", "semi-radial", "mini-radial"].includes(De.value)), Sl = v(() => De.value === "spider"), Jt = v(() => De.value === "bubble"), fl = v(() => De.value === "stepbar"), Ml = v(() => Q.value?.chart?.orientation === "horizontal" && (De.value === "bar" || oa.value)), Pa = (e) => {
|
|
3009
3009
|
const { minY: a, maxY: t } = Ot.value, r = t - a || 1;
|
|
3010
3010
|
return q.value.left + (e - a) / r * q.value.width;
|
|
3011
3011
|
}, Ya = (e) => {
|
|
3012
3012
|
const { maxX: a } = Ot.value, t = a + 1, m = q.value.height / t;
|
|
3013
3013
|
return q.value.top + (e + 0.5) * m;
|
|
3014
|
-
},
|
|
3014
|
+
}, el = v(() => Ol.value ? Ul.value.left + (Be.value - Ul.value.left - Ul.value.right) / 2 : Be.value / 2), qt = v(() => Sl.value ? Ct.value / 2 - 40 : Ol.value ? Ul.value.top + (Ct.value - Ul.value.top - Ul.value.bottom) / 2 : Ct.value / 2), yt = v(() => {
|
|
3015
3015
|
if (Sl.value) {
|
|
3016
3016
|
const e = q.value.width - 80, a = q.value.height - 80;
|
|
3017
3017
|
return Math.min(e, a) / 2;
|
|
@@ -3026,14 +3026,14 @@ const Jo = {
|
|
|
3026
3026
|
}), Dn = v(() => {
|
|
3027
3027
|
const e = ja.value;
|
|
3028
3028
|
if (e === 1 || e <= 0) return;
|
|
3029
|
-
const a =
|
|
3029
|
+
const a = el.value, t = qt.value;
|
|
3030
3030
|
return `translate(${a}, ${t}) scale(${e}) translate(${-a}, ${-t})`;
|
|
3031
|
-
}), xn = $(0), Rn = v(() => `semi-radial-fill-clip-${J.chartId}`), Ba = v(() =>
|
|
3031
|
+
}), xn = $(0), Rn = v(() => `semi-radial-fill-clip-${J.chartId}`), Ba = v(() => De.value === "semi-radial"), s = v(
|
|
3032
3032
|
() => Ba.value && Fl.value && !Ja.value
|
|
3033
3033
|
), l = v(
|
|
3034
3034
|
() => Ba.value && Fl.value && !Ja.value && Da.value === "fill"
|
|
3035
3035
|
), o = v(() => {
|
|
3036
|
-
const e = s.value ? xn.value : 1, a =
|
|
3036
|
+
const e = s.value ? xn.value : 1, a = el.value, t = qt.value, r = Hl.value, m = yt.value, g = Math.PI, x = Math.PI + e * Math.PI;
|
|
3037
3037
|
if (e <= 0) return `M ${a} ${t} L ${a} ${t} Z`;
|
|
3038
3038
|
const _ = a + m * Math.cos(g), K = t + m * Math.sin(g), N = a + m * Math.cos(x), Z = t + m * Math.sin(x), R = a + r * Math.cos(x), se = t + r * Math.sin(x), Fe = a + r * Math.cos(g), tt = t + r * Math.sin(g), _e = e > 0.5 ? 1 : 0;
|
|
3039
3039
|
return `M ${a} ${t} L ${_} ${K} A ${m} ${m} 0 ${_e} 1 ${N} ${Z} L ${R} ${se} A ${r} ${r} 0 ${_e} 1 ${Fe} ${tt} Z`;
|
|
@@ -3043,8 +3043,8 @@ const Jo = {
|
|
|
3043
3043
|
}), d = (e) => {
|
|
3044
3044
|
if (!(!l.value || e !== 0))
|
|
3045
3045
|
return `url(#${Rn.value})`;
|
|
3046
|
-
}, p = $(0), f = v(() => `radial-reveal-clip-${J.chartId}`), h = v(() =>
|
|
3047
|
-
const e = h.value ? p.value : 1, a =
|
|
3046
|
+
}, p = $(0), f = v(() => `radial-reveal-clip-${J.chartId}`), h = v(() => De.value === "radial"), b = v(() => {
|
|
3047
|
+
const e = h.value ? p.value : 1, a = el.value, t = qt.value, r = Math.max(yt.value * 1.5, Be.value, Ct.value);
|
|
3048
3048
|
if (e <= 0) return `M ${a} ${t} L ${a} ${t} Z`;
|
|
3049
3049
|
if (e >= 1) {
|
|
3050
3050
|
const R = a - r, se = a + r;
|
|
@@ -3074,7 +3074,7 @@ const Jo = {
|
|
|
3074
3074
|
}, Et = (e) => {
|
|
3075
3075
|
const a = document.querySelector(`.dss-bubble-image-${e}`);
|
|
3076
3076
|
a && (a.style.display = "none");
|
|
3077
|
-
},
|
|
3077
|
+
}, ol = v(() => J.series), tl = v(() => J.series.filter((e, a) => !j.value.has(a))), bl = (e) => {
|
|
3078
3078
|
if (!e) return "primary";
|
|
3079
3079
|
const a = e.yAxis ?? e.axis ?? e.yAxisId;
|
|
3080
3080
|
return a === "secondary" || a === "right" || a === 1 ? "secondary" : "primary";
|
|
@@ -3087,11 +3087,11 @@ const Jo = {
|
|
|
3087
3087
|
bubbleSize: typeof a.bubbleSize == "number" ? a.bubbleSize : 0
|
|
3088
3088
|
};
|
|
3089
3089
|
}), wa = (e, a) => typeof e?.bubbles?.size == "number" ? e.bubbles.size : typeof e?.bubbleSize == "number" ? e.bubbleSize : a ? Cl.value.bubbleSize : pe.value, La = (e, a) => Kt(e) && Cl.value.usePrimaryColor ? kl(0) : kl(a), la = (e, a) => Sl.value && Kt(e) ? La(e, a) : kl(a), Yn = v(
|
|
3090
|
-
() =>
|
|
3090
|
+
() => tl.value.filter((e) => bl(e) === "primary")
|
|
3091
3091
|
), jn = v(
|
|
3092
|
-
() =>
|
|
3092
|
+
() => tl.value.filter((e) => bl(e) === "secondary")
|
|
3093
3093
|
), Ka = v(
|
|
3094
|
-
() => !Ml.value && !!
|
|
3094
|
+
() => !Ml.value && !!nl.value && jn.value.length > 0
|
|
3095
3095
|
), Kn = (e, a = 0) => {
|
|
3096
3096
|
const t = Number(e);
|
|
3097
3097
|
return Number.isFinite(t) ? t : a;
|
|
@@ -3136,9 +3136,9 @@ const Jo = {
|
|
|
3136
3136
|
seriesIndex: r
|
|
3137
3137
|
};
|
|
3138
3138
|
}, Ga = v(() => {
|
|
3139
|
-
if (!
|
|
3139
|
+
if (!fl.value) return [];
|
|
3140
3140
|
const e = [];
|
|
3141
|
-
return
|
|
3141
|
+
return ol.value.forEach((a, t) => {
|
|
3142
3142
|
j.value.has(t) || !Array.isArray(a?.data) || a.data.forEach((r) => {
|
|
3143
3143
|
const m = us(r, e.length, a, t);
|
|
3144
3144
|
m.segments.length > 0 && e.push(m);
|
|
@@ -3176,15 +3176,15 @@ const Jo = {
|
|
|
3176
3176
|
}, Ot = v(() => {
|
|
3177
3177
|
if (Jt.value)
|
|
3178
3178
|
return go();
|
|
3179
|
-
if (
|
|
3179
|
+
if (fl.value)
|
|
3180
3180
|
return ma();
|
|
3181
|
-
if (!
|
|
3181
|
+
if (!tl.value.length) return { minX: 0, maxX: 1, minY: 0, maxY: 1 };
|
|
3182
3182
|
let e = 0;
|
|
3183
|
-
|
|
3183
|
+
tl.value.forEach((t) => {
|
|
3184
3184
|
t.data && t.data.length && (e = Math.max(e, t.data.length - 1));
|
|
3185
3185
|
}), J.categories.length > 0 && (e = Math.max(e, J.categories.length - 1));
|
|
3186
3186
|
const a = xa(
|
|
3187
|
-
Yn.value.length ? Yn.value :
|
|
3187
|
+
Yn.value.length ? Yn.value : tl.value,
|
|
3188
3188
|
ml.value,
|
|
3189
3189
|
Nt.value
|
|
3190
3190
|
);
|
|
@@ -3204,15 +3204,15 @@ const Jo = {
|
|
|
3204
3204
|
};
|
|
3205
3205
|
}, $s = v(() => Ka.value ? xa(
|
|
3206
3206
|
jn.value,
|
|
3207
|
-
|
|
3207
|
+
ul.value,
|
|
3208
3208
|
Se.value,
|
|
3209
3209
|
Ot.value.minY,
|
|
3210
3210
|
Ot.value.maxY
|
|
3211
3211
|
) : { minY: Ot.value.minY, maxY: Ot.value.maxY }), go = () => {
|
|
3212
|
-
if (!
|
|
3212
|
+
if (!tl.value.length)
|
|
3213
3213
|
return { minX: 0, maxX: 8, minY: 0, maxY: 50, minSize: 10, maxSize: 30 };
|
|
3214
3214
|
let e = 1 / 0, a = -1 / 0, t = 1 / 0, r = -1 / 0, m = 1 / 0, g = -1 / 0, x = !1;
|
|
3215
|
-
if (
|
|
3215
|
+
if (tl.value.forEach((Fe, tt) => {
|
|
3216
3216
|
Fe?.data?.length && Fe.data.forEach((_e, He) => {
|
|
3217
3217
|
let Ve, xe, rt;
|
|
3218
3218
|
if (typeof _e == "object" && _e !== null && !Array.isArray(_e))
|
|
@@ -3278,18 +3278,18 @@ const Jo = {
|
|
|
3278
3278
|
return r;
|
|
3279
3279
|
}, bo = v(() => Ls.value.map((e) => ({
|
|
3280
3280
|
y: e.y
|
|
3281
|
-
}))), Xs = v(() => !
|
|
3281
|
+
}))), Xs = v(() => !fl.value || !Zt.value ? [] : Ls.value.map((e) => ({
|
|
3282
3282
|
y: e.y
|
|
3283
3283
|
}))), As = v(() => {
|
|
3284
3284
|
if (Jt.value)
|
|
3285
3285
|
return Co();
|
|
3286
|
-
if (
|
|
3286
|
+
if (fl.value)
|
|
3287
3287
|
return [];
|
|
3288
|
-
if (
|
|
3288
|
+
if (De.value === "bar") {
|
|
3289
3289
|
if (Ml.value) {
|
|
3290
|
-
const Pe = [], { minY: Qe, maxY: Wt } = Ot.value,
|
|
3291
|
-
for (let Il = 0; Il <=
|
|
3292
|
-
const ga = Qe + ha * (Il /
|
|
3290
|
+
const Pe = [], { minY: Qe, maxY: Wt } = Ot.value, ll = 5, ha = Wt - Qe || 1;
|
|
3291
|
+
for (let Il = 0; Il <= ll; Il++) {
|
|
3292
|
+
const ga = Qe + ha * (Il / ll), ps = Pa(ga);
|
|
3293
3293
|
Pe.push({
|
|
3294
3294
|
x: ps,
|
|
3295
3295
|
y: q.value.bottom + 20,
|
|
@@ -3443,7 +3443,7 @@ const Jo = {
|
|
|
3443
3443
|
a += Math.sqrt(r * r + m * m);
|
|
3444
3444
|
}
|
|
3445
3445
|
return a;
|
|
3446
|
-
}, Ys = v(() =>
|
|
3446
|
+
}, Ys = v(() => De.value === "line" || oa.value ? (oa.value ? J.series.filter((a) => (a.type || De.value) === "line") : ol.value).map((a, t) => {
|
|
3447
3447
|
const r = J.series.findIndex((R) => R === a), m = [];
|
|
3448
3448
|
let g = [];
|
|
3449
3449
|
a.data.forEach((R, se) => {
|
|
@@ -3473,8 +3473,8 @@ const Jo = {
|
|
|
3473
3473
|
isHidden: K
|
|
3474
3474
|
};
|
|
3475
3475
|
}) : []), js = v(() => {
|
|
3476
|
-
if (!(
|
|
3477
|
-
const e = oa.value ? J.series.filter((t) => (t.type ||
|
|
3476
|
+
if (!(De.value === "line" || oa.value)) return [];
|
|
3477
|
+
const e = oa.value ? J.series.filter((t) => (t.type || De.value) === "line") : ol.value, a = [];
|
|
3478
3478
|
return e.forEach((t, r) => {
|
|
3479
3479
|
const m = J.series.findIndex((g) => g === t);
|
|
3480
3480
|
for (let g = 0; g < t.data.length - 1; g++) {
|
|
@@ -3506,7 +3506,7 @@ const Jo = {
|
|
|
3506
3506
|
}
|
|
3507
3507
|
}
|
|
3508
3508
|
}), a;
|
|
3509
|
-
}), xo = v(() =>
|
|
3509
|
+
}), xo = v(() => De.value === "line" || oa.value ? !Fl.value || Ja.value || Gt.value.hasAnimated ? [] : (oa.value ? J.series.filter((a) => (a.type || De.value) === "line") : ol.value).map((a, t) => {
|
|
3510
3510
|
const r = J.series.findIndex((K) => K === a);
|
|
3511
3511
|
let m = "", g = null;
|
|
3512
3512
|
a.data.forEach((K, N) => {
|
|
@@ -3540,9 +3540,9 @@ const Jo = {
|
|
|
3540
3540
|
seriesIndex: r
|
|
3541
3541
|
};
|
|
3542
3542
|
}) : []), _o = v(() => {
|
|
3543
|
-
if (
|
|
3543
|
+
if (De.value !== "line") return [];
|
|
3544
3544
|
const e = [];
|
|
3545
|
-
return
|
|
3545
|
+
return ol.value.forEach((a, t) => {
|
|
3546
3546
|
const r = G.value === t, m = G.value !== null && G.value !== t, g = j.value.has(t);
|
|
3547
3547
|
a.data.forEach((x, _) => {
|
|
3548
3548
|
x != null && e.push({
|
|
@@ -3564,7 +3564,7 @@ const Jo = {
|
|
|
3564
3564
|
}), So = v(() => {
|
|
3565
3565
|
if (!oa.value) return [];
|
|
3566
3566
|
const e = [];
|
|
3567
|
-
return J.series.filter((t) => (t.type ||
|
|
3567
|
+
return J.series.filter((t) => (t.type || De.value) === "line").forEach((t, r) => {
|
|
3568
3568
|
const m = J.series.findIndex((K) => K === t), g = G.value === m, x = G.value !== null && G.value !== m, _ = j.value.has(m);
|
|
3569
3569
|
t.data.forEach((K, N) => {
|
|
3570
3570
|
K != null && e.push({
|
|
@@ -3586,7 +3586,7 @@ const Jo = {
|
|
|
3586
3586
|
}), cs = v(() => {
|
|
3587
3587
|
if (!Jt.value) return [];
|
|
3588
3588
|
const e = [];
|
|
3589
|
-
return
|
|
3589
|
+
return ol.value.forEach((a, t) => {
|
|
3590
3590
|
if (!a?.data?.length) return;
|
|
3591
3591
|
const r = G.value, m = r !== null && r === t, g = r !== null && r !== t, x = j.value.has(t);
|
|
3592
3592
|
a.data.forEach((_, K) => {
|
|
@@ -3620,7 +3620,7 @@ const Jo = {
|
|
|
3620
3620
|
});
|
|
3621
3621
|
});
|
|
3622
3622
|
}), e;
|
|
3623
|
-
}), Ds = v(() =>
|
|
3623
|
+
}), Ds = v(() => De.value !== "area" ? [] : ol.value.map((e, a) => {
|
|
3624
3624
|
const t = [];
|
|
3625
3625
|
let r = [];
|
|
3626
3626
|
if (e.data.forEach((R, se) => {
|
|
@@ -3666,8 +3666,8 @@ const Jo = {
|
|
|
3666
3666
|
isHidden: N
|
|
3667
3667
|
};
|
|
3668
3668
|
})), Ks = v(() => {
|
|
3669
|
-
if (!(["bar"].includes(
|
|
3670
|
-
const e = [], { maxX: a } = Ot.value, t = oa.value ? J.series.filter((m) => (m.type ||
|
|
3669
|
+
if (!(["bar"].includes(De.value) || oa.value)) return [];
|
|
3670
|
+
const e = [], { maxX: a } = Ot.value, t = oa.value ? J.series.filter((m) => (m.type || De.value) === "bar") : ol.value, r = t.length;
|
|
3671
3671
|
if (Ml.value) {
|
|
3672
3672
|
const m = a + 1, x = q.value.height / m, _ = x * (2 / 3), K = Math.min(4, _ / r * 0.15), N = _ - (r - 1) * K, Z = Math.max(4, N / r);
|
|
3673
3673
|
t.forEach((R, se) => {
|
|
@@ -3678,13 +3678,13 @@ const Jo = {
|
|
|
3678
3678
|
const Ze = q.value.top + (xe + 0.5) * x - _ / 2 + se * (Z + K), Pe = q.value.left, Qe = Math.abs(Pa(Ve) - q.value.left);
|
|
3679
3679
|
let Wt = "";
|
|
3680
3680
|
if (mt.value && Qe > 0) {
|
|
3681
|
-
const
|
|
3681
|
+
const ll = Math.min(V.value, Z / 2, Qe / 2);
|
|
3682
3682
|
Wt = [
|
|
3683
3683
|
`M ${Pe} ${Ze}`,
|
|
3684
|
-
`L ${Pe + Qe -
|
|
3685
|
-
`Q ${Pe + Qe} ${Ze} ${Pe + Qe} ${Ze +
|
|
3686
|
-
`L ${Pe + Qe} ${Ze + Z -
|
|
3687
|
-
`Q ${Pe + Qe} ${Ze + Z} ${Pe + Qe -
|
|
3684
|
+
`L ${Pe + Qe - ll} ${Ze}`,
|
|
3685
|
+
`Q ${Pe + Qe} ${Ze} ${Pe + Qe} ${Ze + ll}`,
|
|
3686
|
+
`L ${Pe + Qe} ${Ze + Z - ll}`,
|
|
3687
|
+
`Q ${Pe + Qe} ${Ze + Z} ${Pe + Qe - ll} ${Ze + Z}`,
|
|
3688
3688
|
`L ${Pe} ${Ze + Z}`,
|
|
3689
3689
|
"Z"
|
|
3690
3690
|
].join(" ");
|
|
@@ -3717,13 +3717,13 @@ const Jo = {
|
|
|
3717
3717
|
const Ze = q.value.left + (xe + 0.5) * x - _ / 2 + se * K + N / 2, Pe = cn(Math.max(0, Ve)), Qe = Math.abs(cn(0) - cn(Ve));
|
|
3718
3718
|
let Wt = "";
|
|
3719
3719
|
if (mt.value && Qe > 0) {
|
|
3720
|
-
const
|
|
3720
|
+
const ll = Math.min(V.value, Z / 2, Qe / 2);
|
|
3721
3721
|
Wt = [
|
|
3722
3722
|
`M ${Ze} ${Pe + Qe}`,
|
|
3723
|
-
`L ${Ze} ${Pe +
|
|
3724
|
-
`Q ${Ze} ${Pe} ${Ze +
|
|
3725
|
-
`L ${Ze + Z -
|
|
3726
|
-
`Q ${Ze + Z} ${Pe} ${Ze + Z} ${Pe +
|
|
3723
|
+
`L ${Ze} ${Pe + ll}`,
|
|
3724
|
+
`Q ${Ze} ${Pe} ${Ze + ll} ${Pe}`,
|
|
3725
|
+
`L ${Ze + Z - ll} ${Pe}`,
|
|
3726
|
+
`Q ${Ze + Z} ${Pe} ${Ze + Z} ${Pe + ll}`,
|
|
3727
3727
|
`L ${Ze + Z} ${Pe + Qe}`,
|
|
3728
3728
|
"Z"
|
|
3729
3729
|
].join(" ");
|
|
@@ -3750,11 +3750,11 @@ const Jo = {
|
|
|
3750
3750
|
return e;
|
|
3751
3751
|
}), Qa = v(() => {
|
|
3752
3752
|
if (!Ol.value) return [];
|
|
3753
|
-
const e =
|
|
3753
|
+
const e = ol.value.map((x, _) => ({ series: x, originalIndex: _ })).filter(({ originalIndex: x }) => !j.value.has(x));
|
|
3754
3754
|
if (e.length === 0) return [];
|
|
3755
|
-
let a =
|
|
3756
|
-
const t =
|
|
3757
|
-
const se = x + (_ - x) / 2, Fe = _ - x, tt =
|
|
3755
|
+
let a = De.value === "semi-radial" ? Math.PI : -Math.PI / 2;
|
|
3756
|
+
const t = De.value === "semi-radial" ? Math.PI : Math.PI * 2, r = [], m = (x, _, K, N, Z, R) => {
|
|
3757
|
+
const se = x + (_ - x) / 2, Fe = _ - x, tt = el.value + Math.cos(x) * Hl.value, _e = qt.value + Math.sin(x) * Hl.value, He = el.value + Math.cos(_) * Hl.value, Ve = qt.value + Math.sin(_) * Hl.value, xe = el.value + Math.cos(_) * yt.value, rt = qt.value + Math.sin(_) * yt.value, Je = el.value + Math.cos(x) * yt.value, Ze = qt.value + Math.sin(x) * yt.value, Pe = Fe > Math.PI ? 1 : 0, Qe = [
|
|
3758
3758
|
`M ${tt} ${_e}`,
|
|
3759
3759
|
`A ${Hl.value} ${Hl.value} 0 ${Pe} 1 ${He} ${Ve}`,
|
|
3760
3760
|
`L ${xe} ${rt}`,
|
|
@@ -3782,7 +3782,7 @@ const Jo = {
|
|
|
3782
3782
|
return r.push(m(a, a + t - 1e-3, _ + 1, "Track", 100, Je)), r.push(m(a, a + Fe, _, Ze, N, rt)), r;
|
|
3783
3783
|
}
|
|
3784
3784
|
if (e.length === 1) {
|
|
3785
|
-
const { series: x, originalIndex: _ } = e[0], K = x.data[0] || 0, N = a, Z = a + t - 1e-3, R = N + t / 2, se =
|
|
3785
|
+
const { series: x, originalIndex: _ } = e[0], K = x.data[0] || 0, N = a, Z = a + t - 1e-3, R = N + t / 2, se = el.value + Math.cos(N) * Hl.value, Fe = qt.value + Math.sin(N) * Hl.value, tt = el.value + Math.cos(Z) * Hl.value, _e = qt.value + Math.sin(Z) * Hl.value, He = el.value + Math.cos(Z) * yt.value, Ve = qt.value + Math.sin(Z) * yt.value, xe = el.value + Math.cos(N) * yt.value, rt = qt.value + Math.sin(N) * yt.value, Je = 1, Ze = [
|
|
3786
3786
|
`M ${se} ${Fe}`,
|
|
3787
3787
|
`A ${Hl.value} ${Hl.value} 0 ${Je} 1 ${tt} ${_e}`,
|
|
3788
3788
|
`L ${He} ${Ve}`,
|
|
@@ -3811,7 +3811,7 @@ const Jo = {
|
|
|
3811
3811
|
}
|
|
3812
3812
|
const g = e.reduce((x, { series: _ }) => x + (_.data[0] || 0), 0);
|
|
3813
3813
|
return g === 0 ? [] : (e.forEach(({ series: x, originalIndex: _ }) => {
|
|
3814
|
-
const K = x.data[0] || 0, N = K / g * t, Z = a, R = a + N, se = Z + N / 2, Fe =
|
|
3814
|
+
const K = x.data[0] || 0, N = K / g * t, Z = a, R = a + N, se = Z + N / 2, Fe = el.value + Math.cos(Z) * Hl.value, tt = qt.value + Math.sin(Z) * Hl.value, _e = el.value + Math.cos(R) * Hl.value, He = qt.value + Math.sin(R) * Hl.value, Ve = el.value + Math.cos(R) * yt.value, xe = qt.value + Math.sin(R) * yt.value, rt = el.value + Math.cos(Z) * yt.value, Je = qt.value + Math.sin(Z) * yt.value, Ze = N > Math.PI ? 1 : 0, Pe = [
|
|
3815
3815
|
`M ${Fe} ${tt}`,
|
|
3816
3816
|
`A ${Hl.value} ${Hl.value} 0 ${Ze} 1 ${_e} ${He}`,
|
|
3817
3817
|
`L ${Ve} ${xe}`,
|
|
@@ -3843,7 +3843,7 @@ const Jo = {
|
|
|
3843
3843
|
}), $o = v(() => {
|
|
3844
3844
|
if (!Kl.value || !Ol.value) return [];
|
|
3845
3845
|
const e = qa.value, a = an.value, t = Ra.value, r = Zl.value, m = 15, g = e * 1.3, x = 0.55, _ = (R, se) => {
|
|
3846
|
-
const Fe =
|
|
3846
|
+
const Fe = el.value + Math.cos(R.midAngle) * yt.value, tt = qt.value + Math.sin(R.midAngle) * yt.value, _e = el.value + Math.cos(R.midAngle) * (yt.value + a), He = qt.value + Math.sin(R.midAngle) * (yt.value + a), xe = _e + t * (se ? 1 : -1), rt = se ? _e + m : _e - m, Je = He - r, Ze = `${R.seriesName}: ${jl(R.value)}`, Pe = Ze.length * e * x;
|
|
3847
3847
|
return {
|
|
3848
3848
|
pointerStartX: Fe,
|
|
3849
3849
|
pointerStartY: tt,
|
|
@@ -3977,7 +3977,7 @@ const Jo = {
|
|
|
3977
3977
|
const r = t.getBoundingClientRect(), m = En(e.categoryIndex), g = e.description || e.comment || "";
|
|
3978
3978
|
let x = a.clientX - r.left + 15, _ = a.clientY - r.top - 10;
|
|
3979
3979
|
const K = 200, N = g ? 80 : 50;
|
|
3980
|
-
x + K > Be.value && (x = a.clientX - r.left - K - 15), _ + N > Ct.value && (_ = a.clientY - r.top - N - 10), x < 0 && (x = 10), _ < 0 && (_ = 10),
|
|
3980
|
+
x + K > Be.value && (x = a.clientX - r.left - K - 15), _ + N > Ct.value && (_ = a.clientY - r.top - N - 10), x < 0 && (x = 10), _ < 0 && (_ = 10), vl.value = {
|
|
3981
3981
|
show: !0,
|
|
3982
3982
|
x,
|
|
3983
3983
|
y: _,
|
|
@@ -3985,10 +3985,10 @@ const Jo = {
|
|
|
3985
3985
|
description: g
|
|
3986
3986
|
};
|
|
3987
3987
|
}, Do = () => {
|
|
3988
|
-
|
|
3989
|
-
}, Nn = v(() => J.categories.length || Math.max(...
|
|
3988
|
+
vl.value.show = !1;
|
|
3989
|
+
}, Nn = v(() => J.categories.length || Math.max(...tl.value.map((e) => e.data.length))), Ro = v(() => {
|
|
3990
3990
|
let e = 0;
|
|
3991
|
-
return
|
|
3991
|
+
return tl.value.forEach((a) => {
|
|
3992
3992
|
a.data.forEach((t) => {
|
|
3993
3993
|
typeof t == "number" && (e = Math.max(e, t));
|
|
3994
3994
|
});
|
|
@@ -3996,14 +3996,14 @@ const Jo = {
|
|
|
3996
3996
|
}), to = v(() => {
|
|
3997
3997
|
const e = [], a = Nn.value;
|
|
3998
3998
|
for (let t = 0; t < a; t++) {
|
|
3999
|
-
const r = t * 2 * Math.PI / a - Math.PI / 2, m =
|
|
3999
|
+
const r = t * 2 * Math.PI / a - Math.PI / 2, m = el.value + Math.cos(r) * yt.value, g = qt.value + Math.sin(r) * yt.value;
|
|
4000
4000
|
e.push({ x: m, y: g, angle: r, index: t });
|
|
4001
4001
|
}
|
|
4002
4002
|
return e;
|
|
4003
4003
|
}), Vo = v(() => {
|
|
4004
4004
|
const e = [], a = Nn.value;
|
|
4005
4005
|
return to.value.forEach((t, r) => {
|
|
4006
|
-
const m = yt.value + 15, g = r * 2 * Math.PI / a - Math.PI / 2, x =
|
|
4006
|
+
const m = yt.value + 15, g = r * 2 * Math.PI / a - Math.PI / 2, x = el.value + Math.cos(g) * m, _ = qt.value + Math.sin(g) * m + 5;
|
|
4007
4007
|
let K = "middle", N = "middle";
|
|
4008
4008
|
Math.abs(Math.cos(g)) > 0.5 && (K = Math.cos(g) > 0 ? "start" : "end"), Math.abs(Math.sin(g)) > 0.5 && (N = Math.sin(g) > 0 ? "hanging" : "auto"), e.push({
|
|
4009
4009
|
x,
|
|
@@ -4019,13 +4019,13 @@ const Jo = {
|
|
|
4019
4019
|
}, lo = v(() => {
|
|
4020
4020
|
if (!Sl.value) return [];
|
|
4021
4021
|
const e = [], a = Nn.value;
|
|
4022
|
-
return
|
|
4022
|
+
return ol.value.map((r, m) => ({ series: r, seriesIndex: m })).sort((r, m) => {
|
|
4023
4023
|
const g = Kt(r.series) ? 0 : 1, x = Kt(m.series) ? 0 : 1;
|
|
4024
4024
|
return g - x;
|
|
4025
4025
|
}).forEach(({ series: r, seriesIndex: m }) => {
|
|
4026
4026
|
const g = Kt(r), x = [], _ = [], K = [], N = G.value === m, Z = G.value !== null && G.value !== m, R = j.value.has(m);
|
|
4027
4027
|
for (let se = 0; se < a; se++) {
|
|
4028
|
-
const Fe = r.data[se] || 0, _e = Fe / Ro.value * yt.value, He = se * 2 * Math.PI / a - Math.PI / 2, Ve =
|
|
4028
|
+
const Fe = r.data[se] || 0, _e = Fe / Ro.value * yt.value, He = se * 2 * Math.PI / a - Math.PI / 2, Ve = el.value + Math.cos(He) * _e, xe = qt.value + Math.sin(He) * _e;
|
|
4029
4029
|
x.push(`${Ve},${xe}`), _.push({ x: Ve, y: xe }), K.push({
|
|
4030
4030
|
x: Ve,
|
|
4031
4031
|
y: xe,
|
|
@@ -4121,7 +4121,7 @@ const Jo = {
|
|
|
4121
4121
|
m = Nl(_) + (a.offsetX || 0), g = cn(K) + (a.offsetY || 0);
|
|
4122
4122
|
} else if (Ol.value || Sl.value) {
|
|
4123
4123
|
const _ = Math.PI * 2 / e.logos.length * t;
|
|
4124
|
-
m =
|
|
4124
|
+
m = el.value + Math.cos(_) * (yt.value + 30) + (a.offsetX || 0), g = qt.value + Math.sin(_) * (yt.value + 30) + (a.offsetY || 0);
|
|
4125
4125
|
}
|
|
4126
4126
|
return {
|
|
4127
4127
|
...a,
|
|
@@ -4163,7 +4163,7 @@ const Jo = {
|
|
|
4163
4163
|
let Z;
|
|
4164
4164
|
typeof e.categoryIndex == "number" ? Z = e.categoryIndex : typeof e.dataIndex == "number" ? Z = e.dataIndex : e.label && J.categories.includes(e.label) && (Z = J.categories.indexOf(e.label));
|
|
4165
4165
|
let R = e.seriesName || e.label || "";
|
|
4166
|
-
(Ml.value ||
|
|
4166
|
+
(Ml.value || De.value === "bar") && e.label && (R = e.label), e.tooltipTitle && (R = e.tooltipTitle), Ge.value = {
|
|
4167
4167
|
show: !0,
|
|
4168
4168
|
x: m,
|
|
4169
4169
|
y: g,
|
|
@@ -4247,7 +4247,7 @@ const Jo = {
|
|
|
4247
4247
|
})[e] || "ease-out", Xo = () => {
|
|
4248
4248
|
if (!Fl.value || Ja.value) return "";
|
|
4249
4249
|
const e = ["dss-chart-animated"];
|
|
4250
|
-
return Gt.value.hasAnimated || e.push(`dss-animate-${Da.value}`), Gt.value.hasAnimated || (Ol.value &&
|
|
4250
|
+
return Gt.value.hasAnimated || e.push(`dss-animate-${Da.value}`), Gt.value.hasAnimated || (Ol.value && De.value !== "semi-radial" ? e.push("dss-animate-fill") : Ol.value || e.push(`dss-animate-${Da.value}`)), Gt.value.isAnimating && e.push("dss-is-animating"), e.join(" ");
|
|
4251
4251
|
};
|
|
4252
4252
|
Dt(() => J.series, (e, a) => {
|
|
4253
4253
|
Ye.value && a && Gt.value.hasAnimated && (Gt.value.hasAnimated = !1, Ae(() => {
|
|
@@ -4273,9 +4273,9 @@ const Jo = {
|
|
|
4273
4273
|
!a || !a.contentRect || (le && cancelAnimationFrame(le), le = requestAnimationFrame(() => {
|
|
4274
4274
|
le = null;
|
|
4275
4275
|
const { width: t, height: r } = a.contentRect;
|
|
4276
|
-
|
|
4276
|
+
Re.value = Math.round(t), Ee.value = Math.round(r), y.value && (vt.value = y.value.offsetHeight || $e);
|
|
4277
4277
|
}));
|
|
4278
|
-
}), ie.observe(Y.value)), Fl.value && !Ja.value ?
|
|
4278
|
+
}), ie.observe(Y.value)), Fl.value && !Ja.value ? De.value === "semi-radial" ? setTimeout(() => X(), U.value) : setTimeout(() => ao(), U.value) : (Gt.value.hasAnimated = !0, De.value === "semi-radial" && (xn.value = 1)), document.addEventListener("mousemove", so), document.addEventListener("mouseup", oo), document.addEventListener("click", qn);
|
|
4279
4279
|
}), hs(() => {
|
|
4280
4280
|
we && (we(), we = null), le && cancelAnimationFrame(le), ie && Y.value && (ie.unobserve(Y.value), ie.disconnect(), ie = null), Gt.value.animationId && cancelAnimationFrame(Gt.value.animationId), z && (cancelAnimationFrame(z), z = null), fe.value.zoomTimeout && clearTimeout(fe.value.zoomTimeout), document.removeEventListener("mousemove", so), document.removeEventListener("mouseup", oo), document.removeEventListener("click", qn), document.removeEventListener("click", Un);
|
|
4281
4281
|
});
|
|
@@ -4325,16 +4325,16 @@ const Jo = {
|
|
|
4325
4325
|
]]),
|
|
4326
4326
|
style: be({
|
|
4327
4327
|
width: qe.value ? "100%" : Be.value + "px",
|
|
4328
|
-
height:
|
|
4328
|
+
height: il.value,
|
|
4329
4329
|
...qe.value || at.value ? {
|
|
4330
|
-
overflow: Ol.value ? "visible" : (
|
|
4330
|
+
overflow: Ol.value ? "visible" : (fl.value, "hidden"),
|
|
4331
4331
|
maxWidth: "100%",
|
|
4332
4332
|
maxHeight: "100%"
|
|
4333
4333
|
} : {},
|
|
4334
4334
|
...qo.value,
|
|
4335
4335
|
cursor: Ms()
|
|
4336
4336
|
}),
|
|
4337
|
-
"data-chart-type":
|
|
4337
|
+
"data-chart-type": De.value,
|
|
4338
4338
|
ref_key: "containerEl",
|
|
4339
4339
|
ref: Y,
|
|
4340
4340
|
onWheel: is,
|
|
@@ -4415,7 +4415,7 @@ const Jo = {
|
|
|
4415
4415
|
], 46, ri))), 128))
|
|
4416
4416
|
], 2)) : A("", !0)
|
|
4417
4417
|
], 512),
|
|
4418
|
-
T.showAddMarkerButton &&
|
|
4418
|
+
T.showAddMarkerButton && cl.value && jt.value.addMarker && (Xl.value || Jt.value) && !fl.value ? (i(), c("div", {
|
|
4419
4419
|
key: 0,
|
|
4420
4420
|
class: "dss-add-marker-button",
|
|
4421
4421
|
onClick: kn,
|
|
@@ -4476,7 +4476,7 @@ const Jo = {
|
|
|
4476
4476
|
], 8, yi)) : A("", !0)
|
|
4477
4477
|
]),
|
|
4478
4478
|
Xl.value || Jt.value ? (i(), c("g", Ci, [
|
|
4479
|
-
ve.value && !
|
|
4479
|
+
ve.value && !fl.value ? (i(), c("g", {
|
|
4480
4480
|
key: 0,
|
|
4481
4481
|
class: "dss-grid-lines",
|
|
4482
4482
|
"clip-path": Ie.value
|
|
@@ -4495,7 +4495,7 @@ const Jo = {
|
|
|
4495
4495
|
})
|
|
4496
4496
|
}, null, 12, wi))), 128))
|
|
4497
4497
|
], 8, ki)) : A("", !0),
|
|
4498
|
-
|
|
4498
|
+
fl.value && Xs.value.length ? (i(), c("g", {
|
|
4499
4499
|
key: 1,
|
|
4500
4500
|
class: "dss-stepbar-axis-bars dss-stepbar-axis-bars--y-only",
|
|
4501
4501
|
"clip-path": Ie.value
|
|
@@ -4540,7 +4540,7 @@ const Jo = {
|
|
|
4540
4540
|
}, null, 8, Ai)) : A("", !0)
|
|
4541
4541
|
]),
|
|
4542
4542
|
n("g", Li, [
|
|
4543
|
-
|
|
4543
|
+
fl.value ? A("", !0) : (i(!0), c(ae, { key: 0 }, Le(As.value, (t, r) => (i(), c("text", {
|
|
4544
4544
|
key: `x-${r}`,
|
|
4545
4545
|
x: t.x,
|
|
4546
4546
|
y: t.y,
|
|
@@ -4794,7 +4794,7 @@ const Jo = {
|
|
|
4794
4794
|
onMouseleave: Oa
|
|
4795
4795
|
}, null, 46, Gi))), 128)) : A("", !0)
|
|
4796
4796
|
])
|
|
4797
|
-
])) :
|
|
4797
|
+
])) : De.value === "line" ? (i(), c("g", Qi, [
|
|
4798
4798
|
(i(!0), c(ae, null, Le(xo.value, (t, r) => (i(), c("path", {
|
|
4799
4799
|
key: `anim-${r}`,
|
|
4800
4800
|
d: t.path,
|
|
@@ -4867,7 +4867,7 @@ const Jo = {
|
|
|
4867
4867
|
onMouseover: (m) => dn(t, m),
|
|
4868
4868
|
onMouseleave: Oa
|
|
4869
4869
|
}, null, 46, lu))), 128)) : A("", !0)
|
|
4870
|
-
])) :
|
|
4870
|
+
])) : De.value === "area" ? (i(), c("g", au, [
|
|
4871
4871
|
n("defs", null, [
|
|
4872
4872
|
(i(!0), c(ae, null, Le(Ds.value, (t, r) => (i(), c("mask", {
|
|
4873
4873
|
key: `mask-${r}`,
|
|
@@ -4890,7 +4890,7 @@ const Jo = {
|
|
|
4890
4890
|
key: `area-fill-${r}`,
|
|
4891
4891
|
d: t.areaPath,
|
|
4892
4892
|
fill: t.color,
|
|
4893
|
-
"fill-opacity": t.isHighlighted ?
|
|
4893
|
+
"fill-opacity": t.isHighlighted ? sl.value + 0.2 : sl.value,
|
|
4894
4894
|
mask: `url(#area-mask-${r}-${T.chartId})`,
|
|
4895
4895
|
class: re({
|
|
4896
4896
|
"dss-area-fill-smooth": !0,
|
|
@@ -4918,7 +4918,7 @@ const Jo = {
|
|
|
4918
4918
|
animationDelay: `${r * ne.value}ms`
|
|
4919
4919
|
})
|
|
4920
4920
|
}, null, 14, ru))), 128))
|
|
4921
|
-
])) :
|
|
4921
|
+
])) : De.value === "bar" ? (i(), c("g", {
|
|
4922
4922
|
key: 3,
|
|
4923
4923
|
class: re({ "dss-horizontal-bars": Ml.value })
|
|
4924
4924
|
}, [
|
|
@@ -4965,7 +4965,7 @@ const Jo = {
|
|
|
4965
4965
|
], 64))), 128))
|
|
4966
4966
|
], 2)) : A("", !0)
|
|
4967
4967
|
], 8, Zi),
|
|
4968
|
-
We.value && Ue.value.show && !fe.value.isZooming && !
|
|
4968
|
+
We.value && Ue.value.show && !fe.value.isZooming && !fl.value ? (i(), c("g", {
|
|
4969
4969
|
key: 3,
|
|
4970
4970
|
class: "dss-crosshair",
|
|
4971
4971
|
"clip-path": Ie.value
|
|
@@ -5039,9 +5039,9 @@ const Jo = {
|
|
|
5039
5039
|
class: "radial-chart",
|
|
5040
5040
|
transform: Dn.value
|
|
5041
5041
|
}, [
|
|
5042
|
-
|
|
5042
|
+
De.value === "radial" ? (i(), c("circle", {
|
|
5043
5043
|
key: 0,
|
|
5044
|
-
cx:
|
|
5044
|
+
cx: el.value,
|
|
5045
5045
|
cy: qt.value,
|
|
5046
5046
|
r: yt.value,
|
|
5047
5047
|
fill: "none",
|
|
@@ -5050,7 +5050,7 @@ const Jo = {
|
|
|
5050
5050
|
}, null, 8, yu)) : A("", !0),
|
|
5051
5051
|
n("g", {
|
|
5052
5052
|
class: "dss-radial-data",
|
|
5053
|
-
"data-chart-type":
|
|
5053
|
+
"data-chart-type": De.value,
|
|
5054
5054
|
"clip-path": w.value
|
|
5055
5055
|
}, [
|
|
5056
5056
|
(i(!0), c(ae, null, Le(Mo.value, (t, r) => (i(), c("path", {
|
|
@@ -5071,7 +5071,7 @@ const Jo = {
|
|
|
5071
5071
|
}, null, 42, Cu))), 128))
|
|
5072
5072
|
], 8, bu),
|
|
5073
5073
|
mn.value && Is.value ? (i(), c("g", ku, [
|
|
5074
|
-
(i(!0), c(ae, null, Le(fa.value, (t, r) =>
|
|
5074
|
+
(i(!0), c(ae, null, Le(fa.value, (t, r) => rl((i(), c("text", {
|
|
5075
5075
|
key: `radial-segment-label-${r}`,
|
|
5076
5076
|
x: t.x,
|
|
5077
5077
|
y: t.y,
|
|
@@ -5146,7 +5146,7 @@ const Jo = {
|
|
|
5146
5146
|
ve.value ? (i(), c("g", Au, [
|
|
5147
5147
|
(i(!0), c(ae, null, Le(gt.value, (t, r) => (i(), c("circle", {
|
|
5148
5148
|
key: `spider-grid-circle-${r}`,
|
|
5149
|
-
cx:
|
|
5149
|
+
cx: el.value,
|
|
5150
5150
|
cy: qt.value,
|
|
5151
5151
|
r: Vt(t),
|
|
5152
5152
|
fill: "none",
|
|
@@ -5161,7 +5161,7 @@ const Jo = {
|
|
|
5161
5161
|
key: `spider-grid-label-group-${r}`
|
|
5162
5162
|
}, [
|
|
5163
5163
|
n("rect", {
|
|
5164
|
-
x:
|
|
5164
|
+
x: el.value - 16,
|
|
5165
5165
|
y: qt.value - t - 7,
|
|
5166
5166
|
width: "32",
|
|
5167
5167
|
height: "16",
|
|
@@ -5169,7 +5169,7 @@ const Jo = {
|
|
|
5169
5169
|
stroke: "none"
|
|
5170
5170
|
}, null, 8, Tu),
|
|
5171
5171
|
n("text", {
|
|
5172
|
-
x:
|
|
5172
|
+
x: el.value,
|
|
5173
5173
|
y: qt.value - t + 2,
|
|
5174
5174
|
"text-anchor": "middle",
|
|
5175
5175
|
"dominant-baseline": "central",
|
|
@@ -5184,7 +5184,7 @@ const Jo = {
|
|
|
5184
5184
|
]),
|
|
5185
5185
|
(i(!0), c(ae, null, Le(to.value, (t, r) => (i(), c("line", {
|
|
5186
5186
|
key: `spider-axis-${r}`,
|
|
5187
|
-
x1:
|
|
5187
|
+
x1: el.value,
|
|
5188
5188
|
x2: t.x,
|
|
5189
5189
|
y1: qt.value,
|
|
5190
5190
|
y2: t.y,
|
|
@@ -5291,7 +5291,7 @@ const Jo = {
|
|
|
5291
5291
|
}, null, 46, Bu))), 128))
|
|
5292
5292
|
])
|
|
5293
5293
|
], 8, fi)),
|
|
5294
|
-
|
|
5294
|
+
fl.value && ua.value.length ? (i(), c("div", {
|
|
5295
5295
|
key: 1,
|
|
5296
5296
|
class: "dss-stepbar-chart-host",
|
|
5297
5297
|
style: be(za.value)
|
|
@@ -5368,7 +5368,7 @@ const Jo = {
|
|
|
5368
5368
|
zIndex: 10
|
|
5369
5369
|
})
|
|
5370
5370
|
}, null, 4)) : A("", !0),
|
|
5371
|
-
(i(!0), c(ae, null, Le(Wa.value, (t, r) =>
|
|
5371
|
+
(i(!0), c(ae, null, Le(Wa.value, (t, r) => rl((i(), c("div", {
|
|
5372
5372
|
key: "marker-" + t.id,
|
|
5373
5373
|
class: "dss-chart-marker",
|
|
5374
5374
|
style: be({
|
|
@@ -5396,16 +5396,16 @@ const Jo = {
|
|
|
5396
5396
|
], 44, zu)), [
|
|
5397
5397
|
[_n, tn.value]
|
|
5398
5398
|
])), 128)),
|
|
5399
|
-
|
|
5399
|
+
vl.value.show ? (i(), c("div", {
|
|
5400
5400
|
key: 2,
|
|
5401
5401
|
class: "dss-marker-tooltip",
|
|
5402
5402
|
style: be({
|
|
5403
|
-
left:
|
|
5404
|
-
top:
|
|
5403
|
+
left: vl.value.x + "px",
|
|
5404
|
+
top: vl.value.y + "px"
|
|
5405
5405
|
})
|
|
5406
5406
|
}, [
|
|
5407
|
-
n("div", Zu, L(
|
|
5408
|
-
|
|
5407
|
+
n("div", Zu, L(vl.value.categoryValue), 1),
|
|
5408
|
+
vl.value.description ? (i(), c("div", qu, L(vl.value.description), 1)) : A("", !0)
|
|
5409
5409
|
], 4)) : A("", !0),
|
|
5410
5410
|
Ut.value && (Ge.value.show || We.value && Ue.value.show && !fe.value.isZooming) ? (i(), c("div", {
|
|
5411
5411
|
key: 3,
|
|
@@ -5492,7 +5492,7 @@ const Jo = {
|
|
|
5492
5492
|
], 64)) : A("", !0)
|
|
5493
5493
|
], 64)) : (i(), c(ae, { key: 1 }, [
|
|
5494
5494
|
n("div", vc, [
|
|
5495
|
-
n("div", fc, L(
|
|
5495
|
+
n("div", fc, L(fl.value ? as() : Jt.value ? To() : T.categories[Ue.value.categoryIndex] || `Category ${Ue.value.categoryIndex + 1}`), 1),
|
|
5496
5496
|
Jt.value ? (i(), c("div", pc, [
|
|
5497
5497
|
(i(!0), c(ae, null, Le(Ue.value.data, (t, r) => (i(), c("div", {
|
|
5498
5498
|
key: `crosshair-tooltip-${r}`,
|
|
@@ -5604,7 +5604,7 @@ const Jo = {
|
|
|
5604
5604
|
class: "dss-context-menu-item",
|
|
5605
5605
|
onClick: rs
|
|
5606
5606
|
}, L(O(I)("chart.contextMenu.addMarker")), 1)) : A("", !0),
|
|
5607
|
-
jt.value.addMarker && (jt.value.downloadSvg || jt.value.downloadPng || jt.value.downloadCsv ||
|
|
5607
|
+
jt.value.addMarker && (jt.value.downloadSvg || jt.value.downloadPng || jt.value.downloadCsv || dl.value.length > 0) ? (i(), c("div", Lc)) : A("", !0),
|
|
5608
5608
|
jt.value.downloadSvg ? (i(), c("div", {
|
|
5609
5609
|
key: 2,
|
|
5610
5610
|
class: "dss-context-menu-item",
|
|
@@ -5620,9 +5620,9 @@ const Jo = {
|
|
|
5620
5620
|
class: "dss-context-menu-item",
|
|
5621
5621
|
onClick: Ss
|
|
5622
5622
|
}, L(O(I)("chart.contextMenu.downloadCsv")), 1)) : A("", !0),
|
|
5623
|
-
|
|
5623
|
+
dl.value.length > 0 ? (i(), c(ae, { key: 5 }, [
|
|
5624
5624
|
jt.value.downloadSvg || jt.value.downloadPng || jt.value.downloadCsv ? (i(), c("div", Ec)) : A("", !0),
|
|
5625
|
-
(i(!0), c(ae, null, Le(
|
|
5625
|
+
(i(!0), c(ae, null, Le(dl.value, (t, r) => (i(), c(ae, {
|
|
5626
5626
|
key: "custom-" + r
|
|
5627
5627
|
}, [
|
|
5628
5628
|
t.separator ? (i(), c("div", Tc)) : A("", !0),
|
|
@@ -5674,7 +5674,7 @@ const Jo = {
|
|
|
5674
5674
|
]),
|
|
5675
5675
|
n("div", Fc, [
|
|
5676
5676
|
n("label", Pc, L(O(I)("chart.modalMarker.description")), 1),
|
|
5677
|
-
sn.value ? (i(), c("div", Bc, L(nt.value.description), 1)) :
|
|
5677
|
+
sn.value ? (i(), c("div", Bc, L(nt.value.description), 1)) : rl((i(), c("textarea", {
|
|
5678
5678
|
key: 1,
|
|
5679
5679
|
id: "dss-marker-description",
|
|
5680
5680
|
"onUpdate:modelValue": a[2] || (a[2] = (t) => nt.value.description = t),
|
|
@@ -5760,7 +5760,7 @@ const Jo = {
|
|
|
5760
5760
|
function y(le) {
|
|
5761
5761
|
le.target.tagName === "INPUT" && (ke.value = le.target.tagName);
|
|
5762
5762
|
}
|
|
5763
|
-
function
|
|
5763
|
+
function Re() {
|
|
5764
5764
|
setTimeout(() => {
|
|
5765
5765
|
ke.value = null;
|
|
5766
5766
|
}, 300);
|
|
@@ -5787,12 +5787,12 @@ const Jo = {
|
|
|
5787
5787
|
if (le)
|
|
5788
5788
|
Ee(), document.body.classList.add("dss-modal-open"), setTimeout(() => {
|
|
5789
5789
|
const $e = document.getElementById("dss-modal-backdrop");
|
|
5790
|
-
$e && ($e.addEventListener("focusin", y), $e.addEventListener("focusout",
|
|
5790
|
+
$e && ($e.addEventListener("focusin", y), $e.addEventListener("focusout", Re));
|
|
5791
5791
|
}, 100);
|
|
5792
5792
|
else {
|
|
5793
5793
|
ie(), document.body.classList.remove("dss-modal-open");
|
|
5794
5794
|
const $e = document.getElementById("dss-modal-backdrop");
|
|
5795
|
-
$e && ($e.removeEventListener("focusin", y), $e.removeEventListener("focusout",
|
|
5795
|
+
$e && ($e.removeEventListener("focusin", y), $e.removeEventListener("focusout", Re));
|
|
5796
5796
|
}
|
|
5797
5797
|
},
|
|
5798
5798
|
{ immediate: !0 }
|
|
@@ -5804,7 +5804,7 @@ const Jo = {
|
|
|
5804
5804
|
class: "dss-modal-backdrop",
|
|
5805
5805
|
onClick: ce
|
|
5806
5806
|
}, [
|
|
5807
|
-
|
|
5807
|
+
rl(n("div", {
|
|
5808
5808
|
id: "dss-modal-backdrop",
|
|
5809
5809
|
class: "dss-modal",
|
|
5810
5810
|
style: be(P.value)
|
|
@@ -6023,19 +6023,19 @@ const Jo = {
|
|
|
6023
6023
|
const ce = v(() => we(P, ke.options)), y = v(() => {
|
|
6024
6024
|
const k = ce.value.table.width;
|
|
6025
6025
|
return k === "auto" ? null : typeof k == "number" ? k : null;
|
|
6026
|
-
}),
|
|
6026
|
+
}), Re = v(() => ce.value.table.height), Ee = v(() => ce.value.table.rowHeight ?? "auto"), ie = v(() => ({ height: Ee.value })), le = v(() => ce.value.table.expandable === !0), $e = v(() => ce.value.table.expandableRowData ?? null), ze = v(() => ce.value.table.expandableRowCondition ?? null), Ce = v(() => ce.value.table.truncated === !0), Ie = v(() => ce.value.table.striped), J = v(() => ce.value.table.bordered), Tt = v(() => ce.value.table.hoverable), bt = v(() => ce.value.table.size), Xe = v(() => ce.value.table.align || "left");
|
|
6027
6027
|
v(() => ce.value.title.text), v(() => ce.value.subtitle.text);
|
|
6028
|
-
const st = v(() => ce.value.selection.enabled), Q = v(() => ce.value.selection.mode), qe = v(() => ce.value.selection.rowCondition ?? null), at = v(() => ce.value.sorting.enabled), Te = v(() => ce.value.sorting.mode), Be = v(() => ce.value.pagination.enabled), vt = v(() => ce.value.pagination.rows), ct = v(() => ce.value.pagination.rowsPerPageOptions), Ct = v(() => ce.value.pagination.showCounter !== !1),
|
|
6029
|
-
() => Be.value && (Ct.value ||
|
|
6030
|
-
), ft = v(() => ce.value.scrollable), Ft = v(() => ce.value.emptyMessage || I("table.emptyMessage")), gl = v(() => ce.value.toolbar?.downloads?.pdf !== !1), At = v(() => ce.value.toolbar?.downloads?.excel !== !1),
|
|
6028
|
+
const st = v(() => ce.value.selection.enabled), Q = v(() => ce.value.selection.mode), qe = v(() => ce.value.selection.rowCondition ?? null), at = v(() => ce.value.sorting.enabled), Te = v(() => ce.value.sorting.mode), Be = v(() => ce.value.pagination.enabled), vt = v(() => ce.value.pagination.rows), ct = v(() => ce.value.pagination.rowsPerPageOptions), Ct = v(() => ce.value.pagination.showCounter !== !1), il = v(() => ce.value.pagination.showControlsGroup), De = v(() => il.value === !1 ? !1 : ce.value.pagination.showControls !== !1), al = v(() => il.value === !1 ? !1 : ce.value.pagination.showRowsPerPage !== !1), _t = v(
|
|
6029
|
+
() => Be.value && (Ct.value || De.value || al.value)
|
|
6030
|
+
), ft = v(() => ce.value.scrollable), Ft = v(() => ce.value.emptyMessage || I("table.emptyMessage")), gl = v(() => ce.value.toolbar?.downloads?.pdf !== !1), At = v(() => ce.value.toolbar?.downloads?.excel !== !1), nl = v(() => ce.value.toolbar?.search !== !1), Lt = v(() => gl.value || At.value || nl.value || ml.value), ml = v(() => ce.value.toolbar?.columnVisibility !== !1), Nt = $(""), ul = $(!1), Se = $(null);
|
|
6031
6031
|
let W = null;
|
|
6032
6032
|
function te() {
|
|
6033
|
-
|
|
6033
|
+
ul.value ? (W && (clearTimeout(W), W = null), ul.value = !1, Nt.value = "", Y("search", ""), Se.value?.blur()) : (ul.value = !0, W = setTimeout(() => {
|
|
6034
6034
|
W = null, Se.value?.focus();
|
|
6035
6035
|
}, 80));
|
|
6036
6036
|
}
|
|
6037
6037
|
function ve() {
|
|
6038
|
-
Nt.value || (
|
|
6038
|
+
Nt.value || (ul.value = !1);
|
|
6039
6039
|
}
|
|
6040
6040
|
function Me() {
|
|
6041
6041
|
Nt.value = "", Y("search", ""), Se.value?.focus();
|
|
@@ -6087,9 +6087,9 @@ const Jo = {
|
|
|
6087
6087
|
const M = ut(k, C), j = new Set(ee.value);
|
|
6088
6088
|
j.has(M) ? j.delete(M) : j.add(M), ge.value === null && (Ut.value = j), it(j);
|
|
6089
6089
|
}
|
|
6090
|
-
const
|
|
6090
|
+
const sl = $(null), mt = $(!1);
|
|
6091
6091
|
function wl(k) {
|
|
6092
|
-
|
|
6092
|
+
sl.value && !sl.value.contains(k.target) && (mt.value = !1);
|
|
6093
6093
|
}
|
|
6094
6094
|
const V = v(() => oe.value.length + (st.value ? 1 : 0) + (le.value ? 1 : 0)), S = (k, C) => k?.id ?? k?.key ?? C, E = $(/* @__PURE__ */ new Set()), me = $(null), he = (k, C) => E.value.has(S(k, C)), Ke = (k, C) => {
|
|
6095
6095
|
if (!le.value) return !1;
|
|
@@ -6126,8 +6126,8 @@ const Jo = {
|
|
|
6126
6126
|
() => oe.value.find((k) => pe(k) === Pt.value) ?? null
|
|
6127
6127
|
), Ll = v(() => {
|
|
6128
6128
|
if (!Al.value || Al.value.filter !== "range") return null;
|
|
6129
|
-
const k = Al.value, C = Pt.value, { min: M, max: j } = Da(k), G = k.filterMin ?? M, pt = k.filterMax ?? j, Ge = Ql(C),
|
|
6130
|
-
return { rangeMin: G, rangeMax: pt, currentMin:
|
|
6129
|
+
const k = Al.value, C = Pt.value, { min: M, max: j } = Da(k), G = k.filterMin ?? M, pt = k.filterMax ?? j, Ge = Ql(C), vl = Ge.min ?? G, Ue = Ge.max ?? pt, wt = pt - G, fe = wt === 0 ? 0 : (vl - G) / wt * 100, Tl = wt === 0 ? 100 : (Ue - G) / wt * 100;
|
|
6130
|
+
return { rangeMin: G, rangeMax: pt, currentMin: vl, currentMax: Ue, minPct: fe, maxPct: Tl };
|
|
6131
6131
|
}), Ma = $(null), ia = $("max");
|
|
6132
6132
|
function Pl(k) {
|
|
6133
6133
|
const C = Ma.value, M = Ll.value;
|
|
@@ -6183,24 +6183,24 @@ const Jo = {
|
|
|
6183
6183
|
if (pt) {
|
|
6184
6184
|
if (G.type === "string" && G.value?.trim()) {
|
|
6185
6185
|
const Ge = G.value.trim().toLowerCase();
|
|
6186
|
-
k = k.filter((
|
|
6187
|
-
const Ue = Aa(
|
|
6186
|
+
k = k.filter((vl) => {
|
|
6187
|
+
const Ue = Aa(vl, M);
|
|
6188
6188
|
return String(Ue ?? "").toLowerCase().includes(Ge);
|
|
6189
6189
|
});
|
|
6190
6190
|
} else if (G.type === "range")
|
|
6191
6191
|
k = k.filter((Ge) => {
|
|
6192
|
-
const
|
|
6192
|
+
const vl = fa(Ge, pt), Ue = Number(vl);
|
|
6193
6193
|
return !(Number.isNaN(Ue) || G.min != null && Ue < G.min || G.max != null && Ue > G.max);
|
|
6194
6194
|
});
|
|
6195
6195
|
else if (G.type === "dateRange") {
|
|
6196
|
-
const Ge = G.from ? new Date(G.from).getTime() : null,
|
|
6196
|
+
const Ge = G.from ? new Date(G.from).getTime() : null, vl = G.to ? new Date(G.to).getTime() : null;
|
|
6197
6197
|
k = k.filter((Ue) => {
|
|
6198
6198
|
const wt = fa(Ue, pt), fe = wt ? new Date(wt).getTime() : NaN;
|
|
6199
|
-
return !(Number.isNaN(fe) || Ge != null && fe < Ge ||
|
|
6199
|
+
return !(Number.isNaN(fe) || Ge != null && fe < Ge || vl != null && fe > vl);
|
|
6200
6200
|
});
|
|
6201
6201
|
} else if (G.type === "list" && G.selected?.length) {
|
|
6202
6202
|
const Ge = new Set(G.selected);
|
|
6203
|
-
k = k.filter((
|
|
6203
|
+
k = k.filter((vl) => ca(Aa(vl, M)).some((wt) => Ge.has(wt)));
|
|
6204
6204
|
}
|
|
6205
6205
|
}
|
|
6206
6206
|
}), k;
|
|
@@ -6273,7 +6273,7 @@ const Jo = {
|
|
|
6273
6273
|
Pt.value && !k.target.closest(".dss-table-filter-wrap") && !k.target.closest(".dss-table-filter-dropdown") && (Pt.value = null, Rl.value = null);
|
|
6274
6274
|
}
|
|
6275
6275
|
function gt() {
|
|
6276
|
-
ua(),
|
|
6276
|
+
ua(), dl.value && ea();
|
|
6277
6277
|
}
|
|
6278
6278
|
const Vl = (k) => {
|
|
6279
6279
|
if (!(k.sortable === !1 || !at.value))
|
|
@@ -6300,24 +6300,24 @@ const Jo = {
|
|
|
6300
6300
|
}
|
|
6301
6301
|
return 0;
|
|
6302
6302
|
}), k;
|
|
6303
|
-
}),
|
|
6304
|
-
jt.value = k,
|
|
6303
|
+
}), cl = $(0), jt = $(vt.value), dl = $(!1), Wl = $(null), Ca = $(null), Qt = $("bottom"), Bt = $(null), jl = (k) => {
|
|
6304
|
+
jt.value = k, dl.value = !1, cl.value = 0, Y("page", { page: 0, rows: jt.value });
|
|
6305
6305
|
};
|
|
6306
6306
|
function tn(k) {
|
|
6307
|
-
Wl.value && !Wl.value.contains(k.target) && (
|
|
6307
|
+
Wl.value && !Wl.value.contains(k.target) && (dl.value = !1);
|
|
6308
6308
|
}
|
|
6309
6309
|
function ea() {
|
|
6310
6310
|
const k = Wl.value, C = Ca.value;
|
|
6311
6311
|
if (!k || !C) return;
|
|
6312
6312
|
const M = k.querySelector(".dss-pagination-select-dropdown");
|
|
6313
6313
|
if (!M) return;
|
|
6314
|
-
const j = C.getBoundingClientRect(), G = M.offsetHeight || 0, Ge = (window.innerHeight || document.documentElement.clientHeight) - j.bottom,
|
|
6315
|
-
Qt.value = Ge < G + 8 &&
|
|
6314
|
+
const j = C.getBoundingClientRect(), G = M.offsetHeight || 0, Ge = (window.innerHeight || document.documentElement.clientHeight) - j.bottom, vl = j.top;
|
|
6315
|
+
Qt.value = Ge < G + 8 && vl > Ge ? "top" : "bottom", Bt.value = {
|
|
6316
6316
|
width: `${Math.ceil(j.width)}px`,
|
|
6317
6317
|
left: `${Math.max(0, Math.round(C.offsetLeft))}px`
|
|
6318
6318
|
};
|
|
6319
6319
|
}
|
|
6320
|
-
const Wa = v(() => Bl.value.length), ka = v(() => Math.ceil(Wa.value / jt.value)), Za = v(() => Math.max(ka.value, 1)), ln = v(() => Wa.value === 0 ? 0 : yl.value + 1), na = v(() => Mn.value), yl = v(() => Be.value ?
|
|
6320
|
+
const Wa = v(() => Bl.value.length), ka = v(() => Math.ceil(Wa.value / jt.value)), Za = v(() => Math.max(ka.value, 1)), ln = v(() => Wa.value === 0 ? 0 : yl.value + 1), na = v(() => Mn.value), yl = v(() => Be.value ? cl.value * jt.value : 0), Mn = v(() => Be.value ? Math.min((cl.value + 1) * jt.value, Wa.value) : Wa.value), va = v(() => {
|
|
6321
6321
|
if (!Be.value) return Bl.value;
|
|
6322
6322
|
const k = yl.value, C = Mn.value;
|
|
6323
6323
|
return Bl.value.slice(k, C);
|
|
@@ -6352,13 +6352,13 @@ const Jo = {
|
|
|
6352
6352
|
}, $a = $("1"), nn = () => {
|
|
6353
6353
|
const k = Number.parseInt(String($a.value), 10);
|
|
6354
6354
|
if (!Number.isFinite(k)) {
|
|
6355
|
-
$a.value = String(
|
|
6355
|
+
$a.value = String(cl.value + 1);
|
|
6356
6356
|
return;
|
|
6357
6357
|
}
|
|
6358
6358
|
const C = Math.min(Za.value, Math.max(1, k));
|
|
6359
|
-
C !==
|
|
6359
|
+
C !== cl.value + 1 ? Va(C - 1) : $a.value = String(C);
|
|
6360
6360
|
}, Va = (k) => {
|
|
6361
|
-
k < 0 || k >= ka.value || (
|
|
6361
|
+
k < 0 || k >= ka.value || (cl.value = k, Y("page", { page: k, rows: jt.value }));
|
|
6362
6362
|
}, hn = (k, C, M) => {
|
|
6363
6363
|
Y("row-click", { data: k, index: C, originalEvent: M }), ht(k, yl.value + C);
|
|
6364
6364
|
}, ql = (k, C) => {
|
|
@@ -6386,10 +6386,10 @@ const Jo = {
|
|
|
6386
6386
|
return Dt(() => ke.locale, (k) => {
|
|
6387
6387
|
k && k !== D.value && (D.value = k);
|
|
6388
6388
|
}, { immediate: !0 }), Dt(vt, (k) => {
|
|
6389
|
-
jt.value = k,
|
|
6390
|
-
}), Dt(
|
|
6389
|
+
jt.value = k, cl.value = 0;
|
|
6390
|
+
}), Dt(dl, async (k) => {
|
|
6391
6391
|
k && (await Ae(), ea());
|
|
6392
|
-
}), Dt(
|
|
6392
|
+
}), Dt(cl, (k) => {
|
|
6393
6393
|
$a.value = String(k + 1);
|
|
6394
6394
|
}, { immediate: !0 }), Dt(Nt, (k) => {
|
|
6395
6395
|
Y("search", k ?? "");
|
|
@@ -6411,7 +6411,7 @@ const Jo = {
|
|
|
6411
6411
|
ref: aa,
|
|
6412
6412
|
style: be({
|
|
6413
6413
|
width: y.value + "px",
|
|
6414
|
-
height:
|
|
6414
|
+
height: Re.value ? Re.value + "px" : "auto"
|
|
6415
6415
|
})
|
|
6416
6416
|
}, [
|
|
6417
6417
|
Lt.value ? (i(), c("div", jc, [
|
|
@@ -6438,7 +6438,7 @@ const Jo = {
|
|
|
6438
6438
|
key: 2,
|
|
6439
6439
|
class: "dss-table-toolbar-column-visibility",
|
|
6440
6440
|
ref_key: "columnVisibilityDropdownRef",
|
|
6441
|
-
ref:
|
|
6441
|
+
ref: sl
|
|
6442
6442
|
}, [
|
|
6443
6443
|
n("button", {
|
|
6444
6444
|
type: "button",
|
|
@@ -6455,7 +6455,7 @@ const Jo = {
|
|
|
6455
6455
|
], 10, Gc),
|
|
6456
6456
|
fn(ms, { name: "dss-dropdown" }, {
|
|
6457
6457
|
default: _a(() => [
|
|
6458
|
-
|
|
6458
|
+
rl(n("ul", Qc, [
|
|
6459
6459
|
(i(!0), c(ae, null, Le(T.columns, (M, j) => (i(), c("li", {
|
|
6460
6460
|
key: ut(M, j),
|
|
6461
6461
|
role: "option",
|
|
@@ -6500,11 +6500,11 @@ const Jo = {
|
|
|
6500
6500
|
pl(k.$slots, "header")
|
|
6501
6501
|
]),
|
|
6502
6502
|
n("div", nd, [
|
|
6503
|
-
|
|
6503
|
+
nl.value ? (i(), c("div", {
|
|
6504
6504
|
key: 0,
|
|
6505
|
-
class: re(["dss-table-toolbar-search", { "dss-table-toolbar-search--expanded":
|
|
6505
|
+
class: re(["dss-table-toolbar-search", { "dss-table-toolbar-search--expanded": ul.value || Nt.value }])
|
|
6506
6506
|
}, [
|
|
6507
|
-
|
|
6507
|
+
rl(n("input", {
|
|
6508
6508
|
ref_key: "searchInputRef",
|
|
6509
6509
|
ref: Se,
|
|
6510
6510
|
"onUpdate:modelValue": C[4] || (C[4] = (M) => Nt.value = M),
|
|
@@ -6512,7 +6512,7 @@ const Jo = {
|
|
|
6512
6512
|
class: "dss-table-toolbar-search-input",
|
|
6513
6513
|
placeholder: O(I)("table.searchPlaceholder"),
|
|
6514
6514
|
"aria-label": O(I)("table.searchTableAriaLabel"),
|
|
6515
|
-
onFocus: C[5] || (C[5] = (M) =>
|
|
6515
|
+
onFocus: C[5] || (C[5] = (M) => ul.value = !0),
|
|
6516
6516
|
onBlur: ve
|
|
6517
6517
|
}, null, 40, sd), [
|
|
6518
6518
|
[Dl, Nt.value]
|
|
@@ -6530,7 +6530,7 @@ const Jo = {
|
|
|
6530
6530
|
type: "button",
|
|
6531
6531
|
class: "dss-table-toolbar-search-trigger",
|
|
6532
6532
|
"aria-label": O(I)("table.searchAriaLabel"),
|
|
6533
|
-
"aria-expanded":
|
|
6533
|
+
"aria-expanded": ul.value || !!Nt.value,
|
|
6534
6534
|
onMousedown: je(te, ["prevent"])
|
|
6535
6535
|
}, [...C[27] || (C[27] = [
|
|
6536
6536
|
n("span", {
|
|
@@ -6813,10 +6813,10 @@ const Jo = {
|
|
|
6813
6813
|
})), 1)) : (i(), c("span", Fd, " "))
|
|
6814
6814
|
]),
|
|
6815
6815
|
n("div", Pd, [
|
|
6816
|
-
|
|
6816
|
+
De.value ? (i(), c("div", Bd, [
|
|
6817
6817
|
n("button", {
|
|
6818
6818
|
class: "dss-pagination-btn",
|
|
6819
|
-
disabled:
|
|
6819
|
+
disabled: cl.value === 0,
|
|
6820
6820
|
onClick: C[8] || (C[8] = (M) => Va(0)),
|
|
6821
6821
|
title: O(I)("table.firstPage")
|
|
6822
6822
|
}, [...C[35] || (C[35] = [
|
|
@@ -6827,11 +6827,11 @@ const Jo = {
|
|
|
6827
6827
|
])], 8, Od),
|
|
6828
6828
|
n("button", {
|
|
6829
6829
|
class: "dss-pagination-btn",
|
|
6830
|
-
disabled:
|
|
6831
|
-
onClick: C[9] || (C[9] = (M) => Va(
|
|
6830
|
+
disabled: cl.value === 0,
|
|
6831
|
+
onClick: C[9] || (C[9] = (M) => Va(cl.value - 1)),
|
|
6832
6832
|
title: O(I)("table.previousPage")
|
|
6833
6833
|
}, " ‹ ", 8, zd),
|
|
6834
|
-
|
|
6834
|
+
rl(n("input", {
|
|
6835
6835
|
"onUpdate:modelValue": C[10] || (C[10] = (M) => $a.value = M),
|
|
6836
6836
|
type: "text",
|
|
6837
6837
|
class: "dss-pagination-page-input",
|
|
@@ -6844,13 +6844,13 @@ const Jo = {
|
|
|
6844
6844
|
n("span", Zd, L(O(I)("table.ofPages", { total: Za.value })), 1),
|
|
6845
6845
|
n("button", {
|
|
6846
6846
|
class: "dss-pagination-btn",
|
|
6847
|
-
disabled:
|
|
6848
|
-
onClick: C[11] || (C[11] = (M) => Va(
|
|
6847
|
+
disabled: cl.value >= ka.value - 1,
|
|
6848
|
+
onClick: C[11] || (C[11] = (M) => Va(cl.value + 1)),
|
|
6849
6849
|
title: O(I)("table.nextPage")
|
|
6850
6850
|
}, " › ", 8, qd),
|
|
6851
6851
|
n("button", {
|
|
6852
6852
|
class: "dss-pagination-btn",
|
|
6853
|
-
disabled:
|
|
6853
|
+
disabled: cl.value >= ka.value - 1,
|
|
6854
6854
|
onClick: C[12] || (C[12] = (M) => Va(ka.value - 1)),
|
|
6855
6855
|
title: O(I)("table.lastPage")
|
|
6856
6856
|
}, [...C[36] || (C[36] = [
|
|
@@ -6862,7 +6862,7 @@ const Jo = {
|
|
|
6862
6862
|
])) : A("", !0)
|
|
6863
6863
|
]),
|
|
6864
6864
|
n("div", Xd, [
|
|
6865
|
-
|
|
6865
|
+
al.value ? (i(), c("div", {
|
|
6866
6866
|
key: 0,
|
|
6867
6867
|
class: "dss-pagination-rows-per-page",
|
|
6868
6868
|
ref_key: "rowsPerPageDropdownRef",
|
|
@@ -6871,9 +6871,9 @@ const Jo = {
|
|
|
6871
6871
|
n("span", Yd, L(O(I)("table.rowsPerPage")) + ":", 1),
|
|
6872
6872
|
n("button", {
|
|
6873
6873
|
type: "button",
|
|
6874
|
-
class: re(["dss-pagination-select-trigger", { "dss-pagination-select-open":
|
|
6875
|
-
onClick: C[13] || (C[13] = (M) =>
|
|
6876
|
-
"aria-expanded":
|
|
6874
|
+
class: re(["dss-pagination-select-trigger", { "dss-pagination-select-open": dl.value }]),
|
|
6875
|
+
onClick: C[13] || (C[13] = (M) => dl.value = !dl.value),
|
|
6876
|
+
"aria-expanded": dl.value,
|
|
6877
6877
|
"aria-haspopup": "listbox",
|
|
6878
6878
|
ref_key: "rowsPerPageTriggerRef",
|
|
6879
6879
|
ref: Ca
|
|
@@ -6886,7 +6886,7 @@ const Jo = {
|
|
|
6886
6886
|
], 10, jd),
|
|
6887
6887
|
fn(ms, { name: "dss-dropdown" }, {
|
|
6888
6888
|
default: _a(() => [
|
|
6889
|
-
|
|
6889
|
+
rl(n("ul", {
|
|
6890
6890
|
class: re(["dss-pagination-select-dropdown", { "dss-pagination-select-dropdown--top": Qt.value === "top" }]),
|
|
6891
6891
|
style: be(Bt.value),
|
|
6892
6892
|
role: "listbox"
|
|
@@ -6899,7 +6899,7 @@ const Jo = {
|
|
|
6899
6899
|
onClick: (j) => jl(M)
|
|
6900
6900
|
}, L(M), 11, Kd))), 128))
|
|
6901
6901
|
], 6), [
|
|
6902
|
-
[_n,
|
|
6902
|
+
[_n, dl.value]
|
|
6903
6903
|
])
|
|
6904
6904
|
]),
|
|
6905
6905
|
_: 1
|
|
@@ -6911,7 +6911,7 @@ const Jo = {
|
|
|
6911
6911
|
(i(), Sa(en, { to: "body" }, [
|
|
6912
6912
|
fn(ms, { name: "dss-dropdown" }, {
|
|
6913
6913
|
default: _a(() => [
|
|
6914
|
-
|
|
6914
|
+
rl(n("div", {
|
|
6915
6915
|
class: "dss-table-filter-dropdown dss-table-filter-dropdown--teleport",
|
|
6916
6916
|
style: be(Rl.value ? { top: Rl.value.top + "px", left: Rl.value.left + "px", width: ya + "px" } : void 0),
|
|
6917
6917
|
onClick: C[21] || (C[21] = je(() => {
|
|
@@ -7259,7 +7259,7 @@ const Jo = {
|
|
|
7259
7259
|
h6: b1
|
|
7260
7260
|
}, P = T, we = I, xt = mo(), ce = `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
7261
7261
|
<path d="M10 0C4.5 0 0 4.5 0 10C0 15.5 4.5 20 10 20C15.5 20 20 15.5 20 10C20 4.5 15.5 0 10 0ZM2 10C2 5.6 5.6 2 10 2C11.8 2 13.5 2.6 14.9 3.7L3.7 14.9C2.6 13.5 2 11.8 2 10ZM10 18C8.2 18 6.5 17.4 5.1 16.3L16.3 5.1C17.4 6.5 18 8.2 18 10C18 14.4 14.4 18 10 18Z" fill="#c13340"/>
|
|
7262
|
-
</svg>`, y = $(null),
|
|
7262
|
+
</svg>`, y = $(null), Re = $(null), Ee = $(!1), ie = $(!1), le = $(!1), $e = $(""), ze = $({}), Ce = $(!1), Ie = $(!1), J = $(""), Tt = $(""), bt = $(null), Xe = $(null), st = $(null), Q = $(null), qe = $(""), at = $(!1), Te = $({}), Be = $(!1), vt = $({}), ct = $(null), Ct = $(null), il = $(!1), De = $(""), al = $(null), _t = $(""), ft = $(""), Ft = $(""), gl = $(null), At = $(null), nl = $(null), Lt = $(null), ml = $(null), Nt = $(!1), ul = $(""), Se = $({}), W = $(!1), te = $("upload"), ve = $(""), Me = $(null), ot = $(null), ut = $([]), Ut = $([]), We = $(null), dt = $(!1), Rt = $(""), hl = $(""), ge = $(""), ee = $(""), oe = $(""), pe = $(""), Ne = $(null), it = $(null), Vt = $(null), sl = $(!1), mt = $(null), wl = $(!1), V = $(!1), S = $(null), E = $("p"), me = $(!1), he = $([]), Ke = $(null), Ht = $(null), ht = $(null), lt = $(!1), It = $(0), zt = 100, Mt = $(null), Zt = v(() => !!P.commentUser), Xt = v(() => ({
|
|
7263
7263
|
"dss-text-editor-no-border": !P.border,
|
|
7264
7264
|
"dss-text-editor-rounded": P.rounded,
|
|
7265
7265
|
"dss-text-editor-full-height": P.fullHeight,
|
|
@@ -7385,8 +7385,8 @@ const Jo = {
|
|
|
7385
7385
|
}, Vl = () => {
|
|
7386
7386
|
V.value = !0, gt();
|
|
7387
7387
|
}, Bl = () => {
|
|
7388
|
-
V.value = !1,
|
|
7389
|
-
},
|
|
7388
|
+
V.value = !1, cl();
|
|
7389
|
+
}, cl = () => {
|
|
7390
7390
|
if (!it.value) return;
|
|
7391
7391
|
const s = it.value;
|
|
7392
7392
|
s.style.setProperty("text-overflow", "", "important"), s.style.setProperty("white-space", "", "important"), s.style.setProperty("overflow-x", "", "important"), s.style.setProperty("height", "auto", "important");
|
|
@@ -7399,7 +7399,7 @@ const Jo = {
|
|
|
7399
7399
|
V.value && gt(), we("update:description", o), we("description-change", o), Vt.value = "description", P.richText && (dt.value || (hl.value = Rt.value, oe.value = ge.value, pe.value = ee.value), We.value && clearTimeout(We.value), dt.value = !0, We.value = setTimeout(() => {
|
|
7400
7400
|
dt.value = !1, Qt();
|
|
7401
7401
|
}, 500));
|
|
7402
|
-
},
|
|
7402
|
+
}, dl = () => {
|
|
7403
7403
|
const s = window.getSelection();
|
|
7404
7404
|
if (s.rangeCount === 0) return null;
|
|
7405
7405
|
const l = s.getRangeAt(0);
|
|
@@ -7479,7 +7479,7 @@ const Jo = {
|
|
|
7479
7479
|
if (!y.value) return;
|
|
7480
7480
|
jl(), y.value && Da(y.value);
|
|
7481
7481
|
let l = null;
|
|
7482
|
-
y.value && (y.value.querySelector("p") || (l =
|
|
7482
|
+
y.value && (y.value.querySelector("p") || (l = dl(), tn()));
|
|
7483
7483
|
const o = s && s.inputType && (s.inputType === "insertText" || s.inputType === "insertCompositionText" || s.inputType === "deleteContentBackward" || s.inputType === "deleteContentForward");
|
|
7484
7484
|
o && S.value && (S.value = null), ie.value = !0;
|
|
7485
7485
|
const u = y.value.innerHTML.replace(/<!--[\s\S]*?-->/g, "").replace(/ |\u00A0/g, " "), d = da(u);
|
|
@@ -7589,8 +7589,8 @@ const Jo = {
|
|
|
7589
7589
|
}
|
|
7590
7590
|
});
|
|
7591
7591
|
}, ea = () => {
|
|
7592
|
-
if (y.value && !
|
|
7593
|
-
|
|
7592
|
+
if (y.value && !sl.value) {
|
|
7593
|
+
sl.value = !0;
|
|
7594
7594
|
try {
|
|
7595
7595
|
y.value.querySelectorAll(".dss-image-wrapper").forEach((u) => {
|
|
7596
7596
|
u.querySelector("img") || u.remove();
|
|
@@ -7626,7 +7626,7 @@ const Jo = {
|
|
|
7626
7626
|
}
|
|
7627
7627
|
});
|
|
7628
7628
|
} finally {
|
|
7629
|
-
|
|
7629
|
+
sl.value = !1;
|
|
7630
7630
|
}
|
|
7631
7631
|
}
|
|
7632
7632
|
}, Wa = (s) => {
|
|
@@ -7948,7 +7948,7 @@ const Jo = {
|
|
|
7948
7948
|
let u = null;
|
|
7949
7949
|
if (o && o.rangeCount > 0) {
|
|
7950
7950
|
const p = o.getRangeAt(0);
|
|
7951
|
-
!p.collapsed && Ua(p) && (u =
|
|
7951
|
+
!p.collapsed && Ua(p) && (u = dl());
|
|
7952
7952
|
}
|
|
7953
7953
|
if (s === "createLink" && l) {
|
|
7954
7954
|
const p = window.getSelection();
|
|
@@ -8180,9 +8180,9 @@ const Jo = {
|
|
|
8180
8180
|
return !1;
|
|
8181
8181
|
}
|
|
8182
8182
|
}, $n = (s) => {
|
|
8183
|
-
P.disabled || !P.richText || (
|
|
8183
|
+
P.disabled || !P.richText || (Re.value = Re.value === s ? null : s, s === "askAi" && (Ct.value = null));
|
|
8184
8184
|
}, xl = () => {
|
|
8185
|
-
|
|
8185
|
+
Re.value = null, Me.value = null;
|
|
8186
8186
|
}, Kl = (s) => {
|
|
8187
8187
|
va("formatBlock", s), xl();
|
|
8188
8188
|
}, qa = (s) => {
|
|
@@ -8192,8 +8192,8 @@ const Jo = {
|
|
|
8192
8192
|
for (; Oe && Oe !== y.value; ) {
|
|
8193
8193
|
const Et = Oe.tagName;
|
|
8194
8194
|
if (Et === "P") {
|
|
8195
|
-
const
|
|
8196
|
-
if (
|
|
8195
|
+
const ol = Oe.parentElement;
|
|
8196
|
+
if (ol === y.value || ol.tagName === "BLOCKQUOTE")
|
|
8197
8197
|
return Oe;
|
|
8198
8198
|
}
|
|
8199
8199
|
if (Et === "BLOCKQUOTE")
|
|
@@ -8235,7 +8235,7 @@ const Jo = {
|
|
|
8235
8235
|
let l = s.getRangeAt(0);
|
|
8236
8236
|
!l.collapsed && Ua(l) && (l = qa(l), s.removeAllRanges(), s.addRange(l));
|
|
8237
8237
|
let o = null;
|
|
8238
|
-
!l.collapsed && Ua(l) && (o =
|
|
8238
|
+
!l.collapsed && Ua(l) && (o = dl());
|
|
8239
8239
|
const u = l.commonAncestorContainer, d = u.nodeType === 1 ? u.tagName === "BLOCKQUOTE" ? u : u.closest("blockquote") : u.parentElement?.closest("blockquote");
|
|
8240
8240
|
if (!!(d && y.value.contains(d))) {
|
|
8241
8241
|
if (d) {
|
|
@@ -8341,7 +8341,7 @@ const Jo = {
|
|
|
8341
8341
|
}, mn = () => {
|
|
8342
8342
|
if (!y.value) return;
|
|
8343
8343
|
const s = window.getSelection();
|
|
8344
|
-
s && s.rangeCount > 0 && s.getRangeAt(0), Q.value =
|
|
8344
|
+
s && s.rangeCount > 0 && s.getRangeAt(0), Q.value = dl();
|
|
8345
8345
|
const l = window.getSelection();
|
|
8346
8346
|
let o = "";
|
|
8347
8347
|
l.rangeCount > 0 && (o = l.getRangeAt(0).toString()), J.value = "", Tt.value = o, qe.value = "", st.value = null, Ie.value = !0, xl(), Ae(() => {
|
|
@@ -8458,7 +8458,7 @@ const Jo = {
|
|
|
8458
8458
|
$("");
|
|
8459
8459
|
const G = $(null);
|
|
8460
8460
|
$("");
|
|
8461
|
-
const pt = $([]), Ge = $(!1),
|
|
8461
|
+
const pt = $([]), Ge = $(!1), vl = $(!1), Ue = (s) => {
|
|
8462
8462
|
if (!s) return "";
|
|
8463
8463
|
const l = s.cloneRange(), o = document.createElement("div");
|
|
8464
8464
|
return o.appendChild(l.cloneContents()), o.innerHTML;
|
|
@@ -8473,7 +8473,7 @@ const Jo = {
|
|
|
8473
8473
|
if (!s || s.rangeCount === 0) return;
|
|
8474
8474
|
const l = s.getRangeAt(0);
|
|
8475
8475
|
if (l.collapsed || !Ua(l)) return;
|
|
8476
|
-
j.value = Ue(l) || "", G.value =
|
|
8476
|
+
j.value = Ue(l) || "", G.value = dl();
|
|
8477
8477
|
const o = l.getBoundingClientRect(), u = y.value.parentElement;
|
|
8478
8478
|
if (!u) return;
|
|
8479
8479
|
const d = u.getBoundingClientRect(), p = o.bottom - d.top, h = Math.max(p + 8, 0);
|
|
@@ -8660,7 +8660,7 @@ const Jo = {
|
|
|
8660
8660
|
const d = document.createRange();
|
|
8661
8661
|
d.selectNodeContents(u);
|
|
8662
8662
|
const p = window.getSelection();
|
|
8663
|
-
p && (p.removeAllRanges(), p.addRange(d)), j.value = u.innerHTML || "", G.value =
|
|
8663
|
+
p && (p.removeAllRanges(), p.addRange(d)), j.value = u.innerHTML || "", G.value = dl();
|
|
8664
8664
|
const f = d.getBoundingClientRect(), h = o.parentElement;
|
|
8665
8665
|
if (h) {
|
|
8666
8666
|
const z = h.getBoundingClientRect(), X = f.bottom - z.top, ye = Math.max(X + 8, 0);
|
|
@@ -8705,9 +8705,9 @@ const Jo = {
|
|
|
8705
8705
|
if (X) {
|
|
8706
8706
|
const H = h.getBoundingClientRect(), ye = z.getBoundingClientRect(), de = X.getBoundingClientRect(), et = ye.bottom - H.top, Oe = de.top - H.top, Et = 8;
|
|
8707
8707
|
if (et > Oe - Et) {
|
|
8708
|
-
const
|
|
8708
|
+
const ol = de.height;
|
|
8709
8709
|
k.value = {
|
|
8710
|
-
bottom: `${
|
|
8710
|
+
bottom: `${ol + Et}px`,
|
|
8711
8711
|
top: "auto"
|
|
8712
8712
|
};
|
|
8713
8713
|
}
|
|
@@ -8846,8 +8846,8 @@ const Jo = {
|
|
|
8846
8846
|
u.nodeType === 3 ? f = u.parentElement : u.tagName === "P" || u.tagName === "DIV" ? f = u : f = u.closest("p, div");
|
|
8847
8847
|
const h = (de) => {
|
|
8848
8848
|
if (!de) return !1;
|
|
8849
|
-
const et = de.textContent || "", Et = (de.innerHTML || "").trim(),
|
|
8850
|
-
return et.trim() === "" || Et === "" ||
|
|
8849
|
+
const et = de.textContent || "", Et = (de.innerHTML || "").trim(), ol = Et.replace(/<br\s*\/?>/gi, "").trim();
|
|
8850
|
+
return et.trim() === "" || Et === "" || ol === "" || Et === "<br>" || Et === "<br/>" || Et === "<p></p>" || Et === "<p><br></p>" || Et === "<p><br/></p>" || Et === "<p> </p>" || Et === "<p><br> </p>" || Et === "<div></div>" || Et === "<div><br></div>" || Et === "<div><br/></div>";
|
|
8851
8851
|
}, b = d.lastChild, w = b && b.nodeType === 1 && b.tagName === "BR", z = o.startContainer, X = z.nodeType === 3 ? z.parentElement : z, H = X === d || X && X.parentElement === d;
|
|
8852
8852
|
if (f && h(f) || w && H) {
|
|
8853
8853
|
s.preventDefault(), setTimeout(() => {
|
|
@@ -8919,7 +8919,7 @@ const Jo = {
|
|
|
8919
8919
|
document.execCommand("insertText", !1, o);
|
|
8920
8920
|
Bt();
|
|
8921
8921
|
}, ls = (s) => {
|
|
8922
|
-
if (
|
|
8922
|
+
if (Re.value) {
|
|
8923
8923
|
const o = s.target;
|
|
8924
8924
|
!o.closest(".dss-toolbar-dropdown") && !o.closest(".dss-toolbar-dropdown-toggle") && xl();
|
|
8925
8925
|
}
|
|
@@ -9051,7 +9051,7 @@ const Jo = {
|
|
|
9051
9051
|
Pn(() => {
|
|
9052
9052
|
if (Ae(() => {
|
|
9053
9053
|
requestAnimationFrame(() => {
|
|
9054
|
-
wl.value ? ne() : St(), V.value ? gt() :
|
|
9054
|
+
wl.value ? ne() : St(), V.value ? gt() : cl();
|
|
9055
9055
|
});
|
|
9056
9056
|
}), Ae(() => {
|
|
9057
9057
|
ws();
|
|
@@ -9157,31 +9157,31 @@ const Jo = {
|
|
|
9157
9157
|
mt.value = null;
|
|
9158
9158
|
return;
|
|
9159
9159
|
}
|
|
9160
|
-
const
|
|
9161
|
-
let
|
|
9162
|
-
X ?
|
|
9160
|
+
const ol = z.getAttribute("src");
|
|
9161
|
+
let tl = null;
|
|
9162
|
+
X ? tl = X.cloneNode(!0) : tl = z.cloneNode(!0);
|
|
9163
9163
|
try {
|
|
9164
9164
|
let bl = H.startContainer;
|
|
9165
9165
|
if (bl.nodeType === 3 && (bl = bl.parentElement), X && (bl === X || X.contains(bl))) {
|
|
9166
9166
|
const Cl = document.createRange();
|
|
9167
9167
|
Cl.setStartAfter(X), Cl.collapse(!0), H = Cl;
|
|
9168
9168
|
}
|
|
9169
|
-
H.insertNode(
|
|
9169
|
+
H.insertNode(tl);
|
|
9170
9170
|
const $l = document.createRange();
|
|
9171
|
-
$l.setStartAfter(
|
|
9171
|
+
$l.setStartAfter(tl), $l.collapse(!0);
|
|
9172
9172
|
const Kt = window.getSelection();
|
|
9173
9173
|
Kt.removeAllRanges(), Kt.addRange($l);
|
|
9174
9174
|
} catch {
|
|
9175
9175
|
if (y.value.childNodes.length === 0) {
|
|
9176
9176
|
const $l = document.createElement("p");
|
|
9177
|
-
$l.appendChild(
|
|
9177
|
+
$l.appendChild(tl), y.value.appendChild($l);
|
|
9178
9178
|
} else {
|
|
9179
9179
|
const $l = y.value.lastChild;
|
|
9180
9180
|
if ($l && $l.nodeType === 1)
|
|
9181
|
-
$l.appendChild(
|
|
9181
|
+
$l.appendChild(tl);
|
|
9182
9182
|
else {
|
|
9183
9183
|
const Kt = document.createElement("p");
|
|
9184
|
-
Kt.appendChild(
|
|
9184
|
+
Kt.appendChild(tl), y.value.appendChild(Kt);
|
|
9185
9185
|
}
|
|
9186
9186
|
}
|
|
9187
9187
|
}
|
|
@@ -9189,7 +9189,7 @@ const Jo = {
|
|
|
9189
9189
|
const bl = y.value.querySelectorAll("img");
|
|
9190
9190
|
let $l = !1;
|
|
9191
9191
|
bl.forEach((Kt) => {
|
|
9192
|
-
if (Kt.getAttribute("src") ===
|
|
9192
|
+
if (Kt.getAttribute("src") === ol)
|
|
9193
9193
|
if (!$l)
|
|
9194
9194
|
$l = !0;
|
|
9195
9195
|
else {
|
|
@@ -9239,7 +9239,7 @@ const Jo = {
|
|
|
9239
9239
|
}
|
|
9240
9240
|
Ae(() => {
|
|
9241
9241
|
const h = y.value.innerHTML || "", b = P.title || "", w = P.description || "";
|
|
9242
|
-
Rt.value = h, ge.value = b, ee.value = w, oe.value = b, pe.value = w, ql(), ea(), na(), Ia(), Rn(),
|
|
9242
|
+
Rt.value = h, ge.value = b, ee.value = w, oe.value = b, pe.value = w, ql(), ea(), na(), Ia(), Rn(), fl();
|
|
9243
9243
|
}), Zl(), Gl(), y.value._mutationObserver = f;
|
|
9244
9244
|
}
|
|
9245
9245
|
}), hs(() => {
|
|
@@ -9418,7 +9418,7 @@ const Jo = {
|
|
|
9418
9418
|
zIndex: 10003
|
|
9419
9419
|
}, Be.value = !0;
|
|
9420
9420
|
}, Zn = (s) => {
|
|
9421
|
-
P.disabled || !P.richText || (Ct.value = Ct.value === s ? null : s, s === "askAi" && (
|
|
9421
|
+
P.disabled || !P.richText || (Ct.value = Ct.value === s ? null : s, s === "askAi" && (Re.value = null));
|
|
9422
9422
|
}, os = () => {
|
|
9423
9423
|
Ct.value = null, Me.value = null;
|
|
9424
9424
|
}, pa = (s) => {
|
|
@@ -9443,7 +9443,7 @@ const Jo = {
|
|
|
9443
9443
|
let d = u.getAttribute("alt");
|
|
9444
9444
|
d === null && (d = u.alt || "");
|
|
9445
9445
|
let p = u.getAttribute("data-alt");
|
|
9446
|
-
p === null && (p = d), u.hasAttribute("alt") || u.setAttribute("alt", d), u.hasAttribute("data-alt") || u.setAttribute("data-alt", p), Lt.value = u,
|
|
9446
|
+
p === null && (p = d), u.hasAttribute("alt") || u.setAttribute("alt", d), u.hasAttribute("data-alt") || u.setAttribute("data-alt", p), Lt.value = u, ul.value = d.trim() || D("textEditor.image.noAlt"), Nt.value = !0, W.value = !0, qn(u);
|
|
9447
9447
|
} else !u && rn ? (rn = null, Xa = setTimeout(() => {
|
|
9448
9448
|
W.value || kn();
|
|
9449
9449
|
}, 150)) : u && u === rn && qn(u);
|
|
@@ -9466,7 +9466,7 @@ const Jo = {
|
|
|
9466
9466
|
};
|
|
9467
9467
|
}, kn = () => {
|
|
9468
9468
|
W.value = !1, setTimeout(() => {
|
|
9469
|
-
W.value || (Nt.value = !1,
|
|
9469
|
+
W.value || (Nt.value = !1, ul.value = "", il.value || (Lt.value = null));
|
|
9470
9470
|
}, 100);
|
|
9471
9471
|
}, qn = (s) => {
|
|
9472
9472
|
if (!s || !y.value) return;
|
|
@@ -9496,7 +9496,7 @@ const Jo = {
|
|
|
9496
9496
|
}
|
|
9497
9497
|
}
|
|
9498
9498
|
} else {
|
|
9499
|
-
Q.value =
|
|
9499
|
+
Q.value = dl();
|
|
9500
9500
|
const s = window.getSelection();
|
|
9501
9501
|
let l = "";
|
|
9502
9502
|
s.rangeCount > 0 && (l = s.getRangeAt(0).toString()), J.value = "", Tt.value = l, qe.value = "", st.value = null, Ie.value = !0;
|
|
@@ -9586,7 +9586,7 @@ const Jo = {
|
|
|
9586
9586
|
if (!y.value || ie.value) return;
|
|
9587
9587
|
const s = window.getSelection();
|
|
9588
9588
|
let l = null;
|
|
9589
|
-
s && s.rangeCount > 0 && (l =
|
|
9589
|
+
s && s.rangeCount > 0 && (l = dl());
|
|
9590
9590
|
const o = /(https?:\/\/[^\s<>"{}|\\^`\[\]]+[^\s<>"{}|\\^`\[\].,;:!?])|(www\.[^\s<>"{}|\\^`\[\]]+[^\s<>"{}|\\^`\[\].,;:!?])|([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.([a-zA-Z]{2,})(\/[^\s<>"{}|\\^`\[\]]*)?)/gi, u = document.createTreeWalker(
|
|
9591
9591
|
y.value,
|
|
9592
9592
|
NodeFilter.SHOW_TEXT,
|
|
@@ -9624,11 +9624,11 @@ const Jo = {
|
|
|
9624
9624
|
if (X.forEach((de) => {
|
|
9625
9625
|
const et = de.index, Oe = de[0];
|
|
9626
9626
|
if (et > H) {
|
|
9627
|
-
const
|
|
9628
|
-
|
|
9627
|
+
const tl = w.substring(H, et);
|
|
9628
|
+
tl && ye.appendChild(document.createTextNode(tl));
|
|
9629
9629
|
}
|
|
9630
|
-
const Et = Oe.startsWith("http://") || Oe.startsWith("https://") ? Oe : `https://${Oe}`,
|
|
9631
|
-
|
|
9630
|
+
const Et = Oe.startsWith("http://") || Oe.startsWith("https://") ? Oe : `https://${Oe}`, ol = document.createElement("a");
|
|
9631
|
+
ol.href = Et, ol.textContent = Oe, ol.style.color = "#60afdf", ol.style.textDecoration = "underline", ye.appendChild(ol), H = et + Oe.length;
|
|
9632
9632
|
}), H < w.length) {
|
|
9633
9633
|
const de = w.substring(H);
|
|
9634
9634
|
de && ye.appendChild(document.createTextNode(de));
|
|
@@ -9678,7 +9678,7 @@ const Jo = {
|
|
|
9678
9678
|
const d = u.startContainer.nodeType === Node.TEXT_NODE ? u.startContainer.parentElement?.closest("p, h1, h2, h3, h4, h5, h6, li, td, th, blockquote, div") : u.startContainer.closest?.("p, h1, h2, h3, h4, h5, h6, li, td, th, blockquote, div");
|
|
9679
9679
|
if (!d || d === y.value || !y.value.contains(d)) return;
|
|
9680
9680
|
const p = () => {
|
|
9681
|
-
let
|
|
9681
|
+
let tl = "", bl = 0, $l = !1;
|
|
9682
9682
|
const Kt = document.createTreeWalker(d, NodeFilter.SHOW_TEXT, {
|
|
9683
9683
|
acceptNode: (wa) => wa.parentElement?.closest("a, code, pre") ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
|
|
9684
9684
|
});
|
|
@@ -9687,17 +9687,17 @@ const Jo = {
|
|
|
9687
9687
|
for (; Kt.nextNode(); ) {
|
|
9688
9688
|
const wa = Kt.currentNode, La = wa.textContent || "", la = Cl;
|
|
9689
9689
|
if (Cl += La.length, wa === u.startContainer) {
|
|
9690
|
-
|
|
9690
|
+
tl += La.substring(0, u.startOffset), bl = la + u.startOffset, $l = !0;
|
|
9691
9691
|
break;
|
|
9692
9692
|
}
|
|
9693
|
-
|
|
9693
|
+
tl += La;
|
|
9694
9694
|
}
|
|
9695
|
-
return $l || (bl =
|
|
9695
|
+
return $l || (bl = tl.length), { textBeforeCursor: tl, cursorCharOffset: bl };
|
|
9696
9696
|
}, { textBeforeCursor: f } = p();
|
|
9697
9697
|
if (!f.length) return;
|
|
9698
9698
|
let h = null, b = null;
|
|
9699
9699
|
if (f.endsWith("**") && (h = f.match(/\*\*(.+?)\*\*$/s)) || f.endsWith("__") && (h = f.match(/__(.+?)__$/s)) ? b = "strong" : f.endsWith("*") && !f.endsWith("**") && (h = f.match(new RegExp("(?<!\\*)\\*([^*]+)\\*$"))) || f.endsWith("_") && !f.endsWith("__") && (h = f.match(new RegExp("(?<!_)_([^_]+)_$"))) ? b = "em" : s === ">" && ((h = f.match(/<u>(.+?)<\/u>$/s)) || (h = f.match(/<ins>(.+?)<\/ins>$/s))) && (b = h[0].startsWith("<u>") ? "u" : "ins", h[0].startsWith("<u>"), h[0].startsWith("<u>")), !h || !h[1]) return;
|
|
9700
|
-
const w = h[0], z = h[1], X = f.length - w.length, ye = ((
|
|
9700
|
+
const w = h[0], z = h[1], X = f.length - w.length, ye = ((tl) => {
|
|
9701
9701
|
let bl = 0;
|
|
9702
9702
|
const $l = document.createTreeWalker(d, NodeFilter.SHOW_TEXT, {
|
|
9703
9703
|
acceptNode: (Cl) => Cl.parentElement?.closest("a, code, pre") ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
|
|
@@ -9705,8 +9705,8 @@ const Jo = {
|
|
|
9705
9705
|
let Kt;
|
|
9706
9706
|
for (; Kt = $l.nextNode(); ) {
|
|
9707
9707
|
const Cl = (Kt.textContent || "").length;
|
|
9708
|
-
if (bl + Cl >=
|
|
9709
|
-
return { node: Kt, offset:
|
|
9708
|
+
if (bl + Cl >= tl)
|
|
9709
|
+
return { node: Kt, offset: tl - bl };
|
|
9710
9710
|
bl += Cl;
|
|
9711
9711
|
}
|
|
9712
9712
|
return null;
|
|
@@ -9718,21 +9718,21 @@ const Jo = {
|
|
|
9718
9718
|
et.textContent = z, de.deleteContents(), de.insertNode(et);
|
|
9719
9719
|
const Oe = window.getSelection(), Et = document.createRange();
|
|
9720
9720
|
Et.setStartAfter(et), Et.collapse(!0), Oe.removeAllRanges(), Oe.addRange(Et);
|
|
9721
|
-
const
|
|
9721
|
+
const ol = dl();
|
|
9722
9722
|
Ae(() => {
|
|
9723
|
-
Bt(),
|
|
9723
|
+
Bt(), ol && Wl(ol);
|
|
9724
9724
|
});
|
|
9725
9725
|
}, Ul = () => {
|
|
9726
|
-
y.value && (ml.value =
|
|
9726
|
+
y.value && (ml.value = dl(), De.value = "", _t.value = "", ve.value = "", ft.value = "", Ft.value = "", al.value = null, Lt.value = null, te.value = "upload", il.value = !0, xl(), Ae(() => {
|
|
9727
9727
|
gl.value && gl.value.focus(), At.value && (At.value.value = "");
|
|
9728
9728
|
}));
|
|
9729
9729
|
}, q = (s) => {
|
|
9730
9730
|
const l = s.target?.files?.[0];
|
|
9731
9731
|
if (!l) {
|
|
9732
|
-
|
|
9732
|
+
al.value = null, _t.value = "";
|
|
9733
9733
|
return;
|
|
9734
9734
|
}
|
|
9735
|
-
|
|
9735
|
+
al.value = l;
|
|
9736
9736
|
const o = new FileReader();
|
|
9737
9737
|
o.onload = (u) => {
|
|
9738
9738
|
_t.value = u.target?.result || "";
|
|
@@ -9754,7 +9754,7 @@ const Jo = {
|
|
|
9754
9754
|
}
|
|
9755
9755
|
if (s) {
|
|
9756
9756
|
const l = s.getAttribute("data-alt") || s.getAttribute("alt") || "";
|
|
9757
|
-
Lt.value = s,
|
|
9757
|
+
Lt.value = s, De.value = l.trim() === "" || l.trim() === "Image" ? "" : l;
|
|
9758
9758
|
const o = s.getAttribute("src") || s.src || "";
|
|
9759
9759
|
o.startsWith("http://") || o.startsWith("https://") ? (ve.value = o, _t.value = "", te.value = "url") : (_t.value = o, ve.value = "", te.value = "upload");
|
|
9760
9760
|
const d = s.style.width || s.getAttribute("width") || "", p = s.style.height || s.getAttribute("height") || "";
|
|
@@ -9763,13 +9763,13 @@ const Jo = {
|
|
|
9763
9763
|
Ul();
|
|
9764
9764
|
return;
|
|
9765
9765
|
}
|
|
9766
|
-
|
|
9767
|
-
te.value === "url" &&
|
|
9766
|
+
il.value = !0, W.value = !1, Nt.value = !1, Ae(() => {
|
|
9767
|
+
te.value === "url" && nl.value ? (nl.value.focus(), nl.value.select()) : gl.value && (gl.value.focus(), gl.value.select()), At.value && (At.value.value = "");
|
|
9768
9768
|
});
|
|
9769
9769
|
}, Sl = () => {
|
|
9770
|
-
|
|
9770
|
+
il.value = !1, De.value = "", _t.value = "", ve.value = "", ft.value = "", Ft.value = "", al.value = null, Lt.value = null, ml.value = null, te.value = "upload";
|
|
9771
9771
|
}, Jt = () => {
|
|
9772
|
-
const s = (
|
|
9772
|
+
const s = (De.value || "").trim(), l = y.value?._mutationObserver;
|
|
9773
9773
|
l && l.disconnect(), dt.value ? (We.value && (clearTimeout(We.value), We.value = null), Qt(), dt.value = !1) : Qt();
|
|
9774
9774
|
const o = te.value === "url" ? ve.value.trim() : _t.value;
|
|
9775
9775
|
if (Lt.value && y.value && y.value.contains(Lt.value)) {
|
|
@@ -9852,7 +9852,7 @@ const Jo = {
|
|
|
9852
9852
|
if (P.richText && y.value && !ie.value) {
|
|
9853
9853
|
const l = Fl(s || ""), u = y.value.innerHTML.replace(/ |\u00A0/g, " "), d = l.replace(/ |\u00A0/g, " ");
|
|
9854
9854
|
if (u !== d) {
|
|
9855
|
-
const p =
|
|
9855
|
+
const p = dl();
|
|
9856
9856
|
y.value.innerHTML = l, Ae(() => {
|
|
9857
9857
|
tn();
|
|
9858
9858
|
const f = y.value.innerHTML || "", h = P.title || "", b = P.description || "";
|
|
@@ -9870,7 +9870,7 @@ const Jo = {
|
|
|
9870
9870
|
s && bn(), Ia();
|
|
9871
9871
|
}), Dt(() => P.description, () => {
|
|
9872
9872
|
Ae(() => {
|
|
9873
|
-
V.value ? gt() :
|
|
9873
|
+
V.value ? gt() : cl();
|
|
9874
9874
|
});
|
|
9875
9875
|
}), Dt(() => P.title, () => {
|
|
9876
9876
|
Ae(() => {
|
|
@@ -9886,14 +9886,14 @@ const Jo = {
|
|
|
9886
9886
|
Ge.value = !1;
|
|
9887
9887
|
return;
|
|
9888
9888
|
}
|
|
9889
|
-
|
|
9890
|
-
|
|
9889
|
+
vl.value || P.richText && y.value && Ae(() => {
|
|
9890
|
+
fl();
|
|
9891
9891
|
});
|
|
9892
9892
|
}
|
|
9893
9893
|
}, { deep: !0, immediate: !1 });
|
|
9894
|
-
const
|
|
9895
|
-
if (P.commentUser && !
|
|
9896
|
-
|
|
9894
|
+
const fl = () => {
|
|
9895
|
+
if (P.commentUser && !vl.value && !(!P.comments || !Array.isArray(P.comments) || P.comments.length === 0) && !(!P.richText || !y.value)) {
|
|
9896
|
+
vl.value = !0;
|
|
9897
9897
|
try {
|
|
9898
9898
|
const s = /* @__PURE__ */ new Set(), l = P.comments.filter((f) => {
|
|
9899
9899
|
const h = String(f.conversation_id || f.id);
|
|
@@ -9922,7 +9922,7 @@ const Jo = {
|
|
|
9922
9922
|
return;
|
|
9923
9923
|
}
|
|
9924
9924
|
try {
|
|
9925
|
-
const z =
|
|
9925
|
+
const z = el(f.selection_range, f.selection_text);
|
|
9926
9926
|
if (z && !z.collapsed) {
|
|
9927
9927
|
const X = z.commonAncestorContainer, H = X.nodeType === 3 ? X.parentElement : X;
|
|
9928
9928
|
if (H) {
|
|
@@ -9962,10 +9962,10 @@ const Jo = {
|
|
|
9962
9962
|
} catch {
|
|
9963
9963
|
}
|
|
9964
9964
|
}), Ae(() => {
|
|
9965
|
-
yt("restoreCommentsFromModel"), Bt(),
|
|
9965
|
+
yt("restoreCommentsFromModel"), Bt(), vl.value = !1;
|
|
9966
9966
|
});
|
|
9967
9967
|
} catch {
|
|
9968
|
-
|
|
9968
|
+
vl.value = !1;
|
|
9969
9969
|
}
|
|
9970
9970
|
}
|
|
9971
9971
|
}, Ml = (s) => {
|
|
@@ -10002,7 +10002,7 @@ const Jo = {
|
|
|
10002
10002
|
l = l.nextSibling;
|
|
10003
10003
|
}
|
|
10004
10004
|
return !1;
|
|
10005
|
-
},
|
|
10005
|
+
}, el = (s, l) => {
|
|
10006
10006
|
if (!s || !y.value) return null;
|
|
10007
10007
|
try {
|
|
10008
10008
|
const o = document.createRange();
|
|
@@ -10199,8 +10199,8 @@ const Jo = {
|
|
|
10199
10199
|
o.setAttribute("data-active", "false"), o.style.display = "none", o.style.top = "", o.style.left = "", o.style.visibility = "", o.style.opacity = "";
|
|
10200
10200
|
});
|
|
10201
10201
|
});
|
|
10202
|
-
}), Dt(() => [
|
|
10203
|
-
|
|
10202
|
+
}), Dt(() => [Re.value, Ct.value], () => {
|
|
10203
|
+
Re.value === "askAi" || Ct.value === "askAi" ? Ae(() => {
|
|
10204
10204
|
ss();
|
|
10205
10205
|
}) : (Me.value = null, Ae(() => {
|
|
10206
10206
|
document.querySelectorAll(".dss-toolbar-dropdown-submenu").forEach((l) => {
|
|
@@ -10224,7 +10224,7 @@ const Jo = {
|
|
|
10224
10224
|
}, { immediate: !0 }), ue({
|
|
10225
10225
|
openCommentOverlayForSelector: sn,
|
|
10226
10226
|
updateCommentMarkers: yt,
|
|
10227
|
-
restoreCommentsFromModel:
|
|
10227
|
+
restoreCommentsFromModel: fl
|
|
10228
10228
|
}), (s, l) => (i(), c("div", {
|
|
10229
10229
|
class: re(["dss-text-editor-container", [{ "editor-with-comments": Zt.value }, Xt.value]]),
|
|
10230
10230
|
style: be(Pt.value)
|
|
@@ -10313,7 +10313,7 @@ const Jo = {
|
|
|
10313
10313
|
])])),
|
|
10314
10314
|
l[48] || (l[48] = n("span", { class: "dss-toolbar-dropdown-arrow" }, "˅", -1))
|
|
10315
10315
|
], 8, _1),
|
|
10316
|
-
|
|
10316
|
+
Re.value === "paragraph" ? (i(), c("div", {
|
|
10317
10317
|
key: 0,
|
|
10318
10318
|
class: "dss-toolbar-dropdown",
|
|
10319
10319
|
onClick: l[8] || (l[8] = je(() => {
|
|
@@ -10613,7 +10613,7 @@ const Jo = {
|
|
|
10613
10613
|
], -1)),
|
|
10614
10614
|
n("span", Q1, L(O(D)("textEditor.toolbar.askAi")), 1)
|
|
10615
10615
|
], 8, G1),
|
|
10616
|
-
|
|
10616
|
+
Re.value === "askAi" ? (i(), c("div", {
|
|
10617
10617
|
key: 0,
|
|
10618
10618
|
class: "dss-toolbar-dropdown",
|
|
10619
10619
|
onClick: l[13] || (l[13] = je(() => {
|
|
@@ -10632,7 +10632,7 @@ const Jo = {
|
|
|
10632
10632
|
], 64))), 128))
|
|
10633
10633
|
])
|
|
10634
10634
|
], 32)) : A("", !0),
|
|
10635
|
-
(
|
|
10635
|
+
(Re.value === "paragraph" || Re.value === "askAi") && T.richText ? (i(), c("div", {
|
|
10636
10636
|
key: 1,
|
|
10637
10637
|
class: "dss-toolbar-dropdown-overlay",
|
|
10638
10638
|
onClick: xl
|
|
@@ -10650,7 +10650,7 @@ const Jo = {
|
|
|
10650
10650
|
n("div", l2, [
|
|
10651
10651
|
n("div", a2, [
|
|
10652
10652
|
n("label", n2, L(O(D)("textEditor.link.altText")), 1),
|
|
10653
|
-
|
|
10653
|
+
rl(n("input", {
|
|
10654
10654
|
ref_key: "linkAltInput",
|
|
10655
10655
|
ref: Xe,
|
|
10656
10656
|
type: "text",
|
|
@@ -10664,7 +10664,7 @@ const Jo = {
|
|
|
10664
10664
|
]),
|
|
10665
10665
|
n("div", o2, [
|
|
10666
10666
|
n("label", r2, L(O(D)("textEditor.link.url")), 1),
|
|
10667
|
-
|
|
10667
|
+
rl(n("input", {
|
|
10668
10668
|
ref_key: "linkUrlInput",
|
|
10669
10669
|
ref: bt,
|
|
10670
10670
|
type: "text",
|
|
@@ -10693,7 +10693,7 @@ const Jo = {
|
|
|
10693
10693
|
_: 1
|
|
10694
10694
|
}, 8, ["showModal"]),
|
|
10695
10695
|
fn(fo, {
|
|
10696
|
-
showModal:
|
|
10696
|
+
showModal: il.value,
|
|
10697
10697
|
width: "500px",
|
|
10698
10698
|
height: "80vh",
|
|
10699
10699
|
onCloseModal: Sl
|
|
@@ -10763,21 +10763,21 @@ const Jo = {
|
|
|
10763
10763
|
]),
|
|
10764
10764
|
n("div", m2, [
|
|
10765
10765
|
n("label", h2, L(O(D)("textEditor.image.altText")), 1),
|
|
10766
|
-
|
|
10766
|
+
rl(n("input", {
|
|
10767
10767
|
ref_key: "imageAltInput",
|
|
10768
10768
|
ref: gl,
|
|
10769
10769
|
type: "text",
|
|
10770
|
-
"onUpdate:modelValue": l[19] || (l[19] = (o) =>
|
|
10770
|
+
"onUpdate:modelValue": l[19] || (l[19] = (o) => De.value = o),
|
|
10771
10771
|
class: "dss-link-modal-input",
|
|
10772
10772
|
placeholder: O(D)("textEditor.image.enterAltText"),
|
|
10773
10773
|
onKeyup: ra(Jt, ["enter"])
|
|
10774
10774
|
}, null, 40, g2), [
|
|
10775
|
-
[Dl,
|
|
10775
|
+
[Dl, De.value]
|
|
10776
10776
|
])
|
|
10777
10777
|
]),
|
|
10778
10778
|
n("div", y2, [
|
|
10779
10779
|
n("label", b2, L(O(D)("textEditor.image.width")), 1),
|
|
10780
|
-
|
|
10780
|
+
rl(n("input", {
|
|
10781
10781
|
type: "number",
|
|
10782
10782
|
min: "1",
|
|
10783
10783
|
"onUpdate:modelValue": l[20] || (l[20] = (o) => ft.value = o),
|
|
@@ -10791,7 +10791,7 @@ const Jo = {
|
|
|
10791
10791
|
]),
|
|
10792
10792
|
n("div", k2, [
|
|
10793
10793
|
n("label", w2, L(O(D)("textEditor.image.height")), 1),
|
|
10794
|
-
|
|
10794
|
+
rl(n("input", {
|
|
10795
10795
|
type: "number",
|
|
10796
10796
|
min: "1",
|
|
10797
10797
|
"onUpdate:modelValue": l[21] || (l[21] = (o) => Ft.value = o),
|
|
@@ -10809,9 +10809,9 @@ const Jo = {
|
|
|
10809
10809
|
n("div", S2, [
|
|
10810
10810
|
n("div", M2, [
|
|
10811
10811
|
n("label", $2, L(O(D)("textEditor.image.imageUrl")), 1),
|
|
10812
|
-
|
|
10812
|
+
rl(n("input", {
|
|
10813
10813
|
ref_key: "imageUrlInput",
|
|
10814
|
-
ref:
|
|
10814
|
+
ref: nl,
|
|
10815
10815
|
type: "text",
|
|
10816
10816
|
"onUpdate:modelValue": l[22] || (l[22] = (o) => ve.value = o),
|
|
10817
10817
|
class: "dss-link-modal-input",
|
|
@@ -10823,19 +10823,19 @@ const Jo = {
|
|
|
10823
10823
|
]),
|
|
10824
10824
|
n("div", L2, [
|
|
10825
10825
|
n("label", E2, L(O(D)("textEditor.image.altText")), 1),
|
|
10826
|
-
|
|
10826
|
+
rl(n("input", {
|
|
10827
10827
|
type: "text",
|
|
10828
|
-
"onUpdate:modelValue": l[23] || (l[23] = (o) =>
|
|
10828
|
+
"onUpdate:modelValue": l[23] || (l[23] = (o) => De.value = o),
|
|
10829
10829
|
class: "dss-link-modal-input",
|
|
10830
10830
|
placeholder: O(D)("textEditor.image.enterAltText"),
|
|
10831
10831
|
onKeyup: ra(Jt, ["enter"])
|
|
10832
10832
|
}, null, 40, T2), [
|
|
10833
|
-
[Dl,
|
|
10833
|
+
[Dl, De.value]
|
|
10834
10834
|
])
|
|
10835
10835
|
]),
|
|
10836
10836
|
n("div", H2, [
|
|
10837
10837
|
n("label", D2, L(O(D)("textEditor.image.width")), 1),
|
|
10838
|
-
|
|
10838
|
+
rl(n("input", {
|
|
10839
10839
|
type: "number",
|
|
10840
10840
|
min: "1",
|
|
10841
10841
|
"onUpdate:modelValue": l[24] || (l[24] = (o) => ft.value = o),
|
|
@@ -10849,7 +10849,7 @@ const Jo = {
|
|
|
10849
10849
|
]),
|
|
10850
10850
|
n("div", V2, [
|
|
10851
10851
|
n("label", N2, L(O(D)("textEditor.image.height")), 1),
|
|
10852
|
-
|
|
10852
|
+
rl(n("input", {
|
|
10853
10853
|
type: "number",
|
|
10854
10854
|
min: "1",
|
|
10855
10855
|
"onUpdate:modelValue": l[25] || (l[25] = (o) => Ft.value = o),
|
|
@@ -11060,7 +11060,7 @@ const Jo = {
|
|
|
11060
11060
|
])
|
|
11061
11061
|
])) : A("", !0),
|
|
11062
11062
|
n("div", S0, [
|
|
11063
|
-
|
|
11063
|
+
rl(n("textarea", {
|
|
11064
11064
|
ref_key: "commentInputRef",
|
|
11065
11065
|
ref: M,
|
|
11066
11066
|
"onUpdate:modelValue": l[26] || (l[26] = (o) => C.value = o),
|
|
@@ -11160,7 +11160,7 @@ const Jo = {
|
|
|
11160
11160
|
], 36)) : A("", !0)
|
|
11161
11161
|
])),
|
|
11162
11162
|
(i(), Sa(en, { to: "body" }, [
|
|
11163
|
-
Nt.value &&
|
|
11163
|
+
Nt.value && ul.value && y.value ? (i(), c("div", {
|
|
11164
11164
|
key: 0,
|
|
11165
11165
|
class: "dss-link-popup",
|
|
11166
11166
|
style: be(Se.value),
|
|
@@ -11168,7 +11168,7 @@ const Jo = {
|
|
|
11168
11168
|
onMouseleave: kn
|
|
11169
11169
|
}, [
|
|
11170
11170
|
n("div", R0, [
|
|
11171
|
-
|
|
11171
|
+
ul.value === O(D)("textEditor.image.noAlt") ? (i(), c("div", V0, [...l[72] || (l[72] = [
|
|
11172
11172
|
n("svg", {
|
|
11173
11173
|
width: "20",
|
|
11174
11174
|
height: "20",
|
|
@@ -11184,8 +11184,8 @@ const Jo = {
|
|
|
11184
11184
|
])])) : A("", !0),
|
|
11185
11185
|
n("p", {
|
|
11186
11186
|
class: "dss-image-popup-alt",
|
|
11187
|
-
title:
|
|
11188
|
-
}, L(
|
|
11187
|
+
title: ul.value
|
|
11188
|
+
}, L(ul.value), 9, N0)
|
|
11189
11189
|
]),
|
|
11190
11190
|
n("button", {
|
|
11191
11191
|
type: "button",
|
|
@@ -11624,29 +11624,29 @@ const Jo = {
|
|
|
11624
11624
|
const ee = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(ge);
|
|
11625
11625
|
if (!ee) return { h: 0, s: 0, l: 50 };
|
|
11626
11626
|
const oe = parseInt(ee[1], 16) / 255, pe = parseInt(ee[2], 16) / 255, Ne = parseInt(ee[3], 16) / 255, it = Math.max(oe, pe, Ne), Vt = Math.min(oe, pe, Ne);
|
|
11627
|
-
let
|
|
11627
|
+
let sl = 0, mt = 0;
|
|
11628
11628
|
const wl = (it + Vt) / 2;
|
|
11629
11629
|
if (it !== Vt) {
|
|
11630
11630
|
const V = it - Vt;
|
|
11631
11631
|
switch (mt = wl > 0.5 ? V / (2 - it - Vt) : V / (it + Vt), it) {
|
|
11632
11632
|
case oe:
|
|
11633
|
-
|
|
11633
|
+
sl = ((pe - Ne) / V + (pe < Ne ? 6 : 0)) / 6;
|
|
11634
11634
|
break;
|
|
11635
11635
|
case pe:
|
|
11636
|
-
|
|
11636
|
+
sl = ((Ne - oe) / V + 2) / 6;
|
|
11637
11637
|
break;
|
|
11638
11638
|
case Ne:
|
|
11639
|
-
|
|
11639
|
+
sl = ((oe - pe) / V + 4) / 6;
|
|
11640
11640
|
break;
|
|
11641
11641
|
}
|
|
11642
11642
|
}
|
|
11643
|
-
return { h:
|
|
11643
|
+
return { h: sl * 360, s: mt * 100, l: wl * 100 };
|
|
11644
11644
|
}
|
|
11645
11645
|
function D(ge, ee, oe) {
|
|
11646
11646
|
ee /= 100, oe /= 100;
|
|
11647
11647
|
const pe = ee * Math.min(oe, 1 - oe), Ne = (it) => {
|
|
11648
|
-
const Vt = (it + ge / 30) % 12,
|
|
11649
|
-
return Math.round(255 *
|
|
11648
|
+
const Vt = (it + ge / 30) % 12, sl = oe - pe * Math.max(Math.min(Vt - 3, 9 - Vt, 1), -1);
|
|
11649
|
+
return Math.round(255 * sl).toString(16).padStart(2, "0");
|
|
11650
11650
|
};
|
|
11651
11651
|
return `#${Ne(0)}${Ne(8)}${Ne(4)}`;
|
|
11652
11652
|
}
|
|
@@ -11677,7 +11677,7 @@ const Jo = {
|
|
|
11677
11677
|
const pe = oe * (1 - ee / 2), Ne = pe === 0 || pe === 1 ? 0 : (oe - pe) / Math.min(pe, 1 - pe);
|
|
11678
11678
|
return { h: ge, s: Ne * 100, l: pe * 100 };
|
|
11679
11679
|
}
|
|
11680
|
-
const ce = T, y = ue,
|
|
11680
|
+
const ce = T, y = ue, Re = $(!1), Ee = $(!1), ie = $(!1), le = $(-1), $e = $(-1), ze = $(null), Ce = $(null), Ie = $(null), J = $(null), Tt = $({ top: 0, left: 0 }), bt = $(I(ce.modelValue || "#b8a5de")), Xe = v(
|
|
11681
11681
|
() => Array.isArray(ce.presetGroups) && ce.presetGroups.length > 0
|
|
11682
11682
|
), st = v(() => !ce.disableCustomColors), Q = v(() => Xe.value ? 0 : ce.initialPresetCount != null ? ce.initialPresetCount : $e.value < 0 ? null : $e.value), qe = v(() => {
|
|
11683
11683
|
const ge = Q.value;
|
|
@@ -11704,10 +11704,10 @@ const Jo = {
|
|
|
11704
11704
|
const ee = Q.value;
|
|
11705
11705
|
return ee != null && ge >= ee;
|
|
11706
11706
|
}
|
|
11707
|
-
function
|
|
11707
|
+
function il(ge) {
|
|
11708
11708
|
Ct(ge) && (le.value = ge, bt.value = I(ce.presetColors[ge]), Ee.value = !0, Ae(() => J.value?.focus()));
|
|
11709
11709
|
}
|
|
11710
|
-
function
|
|
11710
|
+
function De(ge) {
|
|
11711
11711
|
if (!Ct(ge)) return;
|
|
11712
11712
|
const ee = ce.presetColors.filter((Ne, it) => it !== ge);
|
|
11713
11713
|
y("update:presetColors", ee);
|
|
@@ -11717,7 +11717,7 @@ const Jo = {
|
|
|
11717
11717
|
Ne && y("update:modelValue", Ne);
|
|
11718
11718
|
}
|
|
11719
11719
|
}
|
|
11720
|
-
function
|
|
11720
|
+
function al() {
|
|
11721
11721
|
ie.value = !ie.value, ie.value || (le.value = -1, Ee.value = !1);
|
|
11722
11722
|
}
|
|
11723
11723
|
function _t() {
|
|
@@ -11748,7 +11748,7 @@ const Jo = {
|
|
|
11748
11748
|
const At = v(() => {
|
|
11749
11749
|
const { h: ge, s: ee, l: oe } = bt.value;
|
|
11750
11750
|
return D(ge, ee, oe);
|
|
11751
|
-
}),
|
|
11751
|
+
}), nl = v(() => At.value.toLowerCase()), Lt = v(() => ({
|
|
11752
11752
|
background: `linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${bt.value.h}, 100%, 50%))`
|
|
11753
11753
|
})), ml = v(() => {
|
|
11754
11754
|
const ge = we(bt.value.h, bt.value.s, bt.value.l);
|
|
@@ -11760,14 +11760,14 @@ const Jo = {
|
|
|
11760
11760
|
}), Nt = v(() => ({
|
|
11761
11761
|
left: `${bt.value.h / 360 * 100}%`,
|
|
11762
11762
|
transform: "translateX(-50%)"
|
|
11763
|
-
})),
|
|
11763
|
+
})), ul = v(() => ({
|
|
11764
11764
|
position: "fixed",
|
|
11765
11765
|
left: `${Tt.value.left}px`,
|
|
11766
11766
|
top: `${Tt.value.top}px`,
|
|
11767
11767
|
zIndex: 1002
|
|
11768
11768
|
}));
|
|
11769
11769
|
function Se() {
|
|
11770
|
-
if (!ze.value || !
|
|
11770
|
+
if (!ze.value || !Re.value) return;
|
|
11771
11771
|
const ge = ze.value.getBoundingClientRect(), ee = window.innerHeight || document.documentElement.clientHeight;
|
|
11772
11772
|
let oe = ge.bottom + 4;
|
|
11773
11773
|
const pe = Ce.value;
|
|
@@ -11781,7 +11781,7 @@ const Jo = {
|
|
|
11781
11781
|
y("update:modelValue", At.value);
|
|
11782
11782
|
}
|
|
11783
11783
|
function ve() {
|
|
11784
|
-
ce.disabled || (
|
|
11784
|
+
ce.disabled || (Re.value = !Re.value, Re.value && (W(), Ae(() => {
|
|
11785
11785
|
Se(), J.value?.focus();
|
|
11786
11786
|
})));
|
|
11787
11787
|
}
|
|
@@ -11798,7 +11798,7 @@ const Jo = {
|
|
|
11798
11798
|
y("update:presetColors", pe), y("update:modelValue", ee);
|
|
11799
11799
|
}
|
|
11800
11800
|
}
|
|
11801
|
-
|
|
11801
|
+
Re.value = !1, Ee.value = !1, ie.value = !1, le.value = -1;
|
|
11802
11802
|
}
|
|
11803
11803
|
function ot(ge) {
|
|
11804
11804
|
if (!Ie.value) return;
|
|
@@ -11833,7 +11833,7 @@ const Jo = {
|
|
|
11833
11833
|
function hl() {
|
|
11834
11834
|
dt && (document.removeEventListener("keydown", dt), dt = null), Rt && (window.removeEventListener("resize", Rt), Rt = null);
|
|
11835
11835
|
}
|
|
11836
|
-
return Dt(
|
|
11836
|
+
return Dt(Re, (ge) => {
|
|
11837
11837
|
if (hl(), ge) {
|
|
11838
11838
|
if (!Xe.value && ce.initialPresetCount == null) {
|
|
11839
11839
|
const ee = ce.presetColors.length;
|
|
@@ -11844,7 +11844,7 @@ const Jo = {
|
|
|
11844
11844
|
}, Rt = Se, document.addEventListener("keydown", dt), window.addEventListener("resize", Rt);
|
|
11845
11845
|
}
|
|
11846
11846
|
}), Dt(() => ce.modelValue, () => {
|
|
11847
|
-
|
|
11847
|
+
Re.value && W();
|
|
11848
11848
|
}, { immediate: !1 }), Dt(vt, (ge) => {
|
|
11849
11849
|
ge.length === 0 && (ie.value = !1, le.value = -1, Ee.value = !1);
|
|
11850
11850
|
}), Sn(hl), (ge, ee) => (i(), c("div", {
|
|
@@ -11853,7 +11853,7 @@ const Jo = {
|
|
|
11853
11853
|
n("div", {
|
|
11854
11854
|
ref_key: "triggerRef",
|
|
11855
11855
|
ref: ze,
|
|
11856
|
-
class: re(["dss-color-picker__trigger", { "dss-color-picker__trigger--open":
|
|
11856
|
+
class: re(["dss-color-picker__trigger", { "dss-color-picker__trigger--open": Re.value }]),
|
|
11857
11857
|
onClick: ve
|
|
11858
11858
|
}, [
|
|
11859
11859
|
n("span", {
|
|
@@ -11877,7 +11877,7 @@ const Jo = {
|
|
|
11877
11877
|
])], 4)
|
|
11878
11878
|
], 2),
|
|
11879
11879
|
(i(), Sa(en, { to: "body" }, [
|
|
11880
|
-
|
|
11880
|
+
Re.value ? (i(), c("div", {
|
|
11881
11881
|
key: 0,
|
|
11882
11882
|
class: "dss-color-picker__overlay",
|
|
11883
11883
|
onClick: je(Me, ["self"])
|
|
@@ -11886,7 +11886,7 @@ const Jo = {
|
|
|
11886
11886
|
ref_key: "dropdownRef",
|
|
11887
11887
|
ref: Ce,
|
|
11888
11888
|
class: "dss-color-picker__dropdown",
|
|
11889
|
-
style: be(
|
|
11889
|
+
style: be(ul.value)
|
|
11890
11890
|
}, [
|
|
11891
11891
|
Te.value ? (i(), c(ae, { key: 0 }, [
|
|
11892
11892
|
Xe.value ? (i(!0), c(ae, { key: 0 }, Le(T.presetGroups, (oe, pe) => (i(), c("div", {
|
|
@@ -11925,7 +11925,7 @@ const Jo = {
|
|
|
11925
11925
|
type: "button",
|
|
11926
11926
|
class: re(["dss-color-picker__manage-icon", { "dss-color-picker__manage-icon--active": ie.value }]),
|
|
11927
11927
|
title: "Manage custom colors",
|
|
11928
|
-
onClick: je(
|
|
11928
|
+
onClick: je(al, ["stop"])
|
|
11929
11929
|
}, [...ee[2] || (ee[2] = [
|
|
11930
11930
|
n("svg", {
|
|
11931
11931
|
viewBox: "0 0 12 12",
|
|
@@ -11955,14 +11955,14 @@ const Jo = {
|
|
|
11955
11955
|
"--dss-preset-color": le.value === ct(pe) ? At.value : oe
|
|
11956
11956
|
}),
|
|
11957
11957
|
title: le.value === ct(pe) ? At.value : oe,
|
|
11958
|
-
onClick: je((Ne) => ie.value ?
|
|
11958
|
+
onClick: je((Ne) => ie.value ? il(ct(pe)) : We(oe), ["stop"])
|
|
11959
11959
|
}, null, 14, M9),
|
|
11960
11960
|
ie.value ? (i(), c("button", {
|
|
11961
11961
|
key: 0,
|
|
11962
11962
|
type: "button",
|
|
11963
11963
|
class: "dss-color-picker__preset-action dss-color-picker__preset-action--delete",
|
|
11964
11964
|
title: "Delete",
|
|
11965
|
-
onClick: je((Ne) =>
|
|
11965
|
+
onClick: je((Ne) => De(ct(pe)), ["stop"])
|
|
11966
11966
|
}, [...ee[4] || (ee[4] = [
|
|
11967
11967
|
n("svg", {
|
|
11968
11968
|
viewBox: "0 0 12 12",
|
|
@@ -12034,7 +12034,7 @@ const Jo = {
|
|
|
12034
12034
|
ref: J,
|
|
12035
12035
|
type: "text",
|
|
12036
12036
|
class: "dss-color-picker__hex-input",
|
|
12037
|
-
value:
|
|
12037
|
+
value: nl.value,
|
|
12038
12038
|
onInput: Ut
|
|
12039
12039
|
}, null, 40, T9)
|
|
12040
12040
|
]),
|
|
@@ -12282,7 +12282,7 @@ const Jo = {
|
|
|
12282
12282
|
background: W
|
|
12283
12283
|
} : {};
|
|
12284
12284
|
}
|
|
12285
|
-
const y = $(null),
|
|
12285
|
+
const y = $(null), Re = $(null), Ee = $(!1), ie = $(-1), le = $(null);
|
|
12286
12286
|
let $e = null, ze = null, Ce = null, Ie = null, J = 0, Tt = 0, bt = "", Xe = null;
|
|
12287
12287
|
const st = 5, Q = v(() => {
|
|
12288
12288
|
const Se = {};
|
|
@@ -12290,7 +12290,7 @@ const Jo = {
|
|
|
12290
12290
|
Se[W.value] = I.items.filter((te) => te[I.columnKey] === W.value).sort((te, ve) => (te[I.positionKey] ?? 0) - (ve[I.positionKey] ?? 0));
|
|
12291
12291
|
return Se;
|
|
12292
12292
|
}), qe = v(() => {
|
|
12293
|
-
const Se = {}, W = !!y.value, te = y.value?.[I.itemKey], ve =
|
|
12293
|
+
const Se = {}, W = !!y.value, te = y.value?.[I.itemKey], ve = Re.value, Me = ie.value;
|
|
12294
12294
|
for (const ot of I.columns) {
|
|
12295
12295
|
const ut = Q.value[ot.value] || [], Ut = [], We = ve == ot.value;
|
|
12296
12296
|
let dt = 0;
|
|
@@ -12354,21 +12354,21 @@ const Jo = {
|
|
|
12354
12354
|
function Ct(Se, W) {
|
|
12355
12355
|
return document.elementFromPoint(Se, W)?.closest(".dss-dnd-column-body") ?? null;
|
|
12356
12356
|
}
|
|
12357
|
-
function
|
|
12357
|
+
function il(Se, W) {
|
|
12358
12358
|
return !!document.elementFromPoint(Se, W)?.closest("[data-dss-dnd-delete-zone]");
|
|
12359
12359
|
}
|
|
12360
|
-
function
|
|
12361
|
-
if (Y.value &&
|
|
12362
|
-
Ee.value = !0,
|
|
12360
|
+
function De(Se, W) {
|
|
12361
|
+
if (Y.value && il(Se, W)) {
|
|
12362
|
+
Ee.value = !0, Re.value = null, ie.value = -1;
|
|
12363
12363
|
return;
|
|
12364
12364
|
}
|
|
12365
12365
|
Ee.value = !1;
|
|
12366
12366
|
const te = Ct(Se, W), ve = te?.getAttribute("data-column") ?? null;
|
|
12367
12367
|
if (!ve) {
|
|
12368
|
-
|
|
12368
|
+
Re.value = null, ie.value = -1;
|
|
12369
12369
|
return;
|
|
12370
12370
|
}
|
|
12371
|
-
|
|
12371
|
+
Re.value = ve;
|
|
12372
12372
|
const Me = te.querySelectorAll(".dss-dnd-item:not(.dss-dnd-item--dragging)");
|
|
12373
12373
|
let ot = Me.length;
|
|
12374
12374
|
for (let ut = 0; ut < Me.length; ut++) {
|
|
@@ -12380,14 +12380,14 @@ const Jo = {
|
|
|
12380
12380
|
}
|
|
12381
12381
|
ie.value = ot;
|
|
12382
12382
|
}
|
|
12383
|
-
function
|
|
12383
|
+
function al(Se) {
|
|
12384
12384
|
Se.preventDefault(), Be(Se.clientX, Se.clientY), !$e && ($e = requestAnimationFrame(() => {
|
|
12385
|
-
$e = null,
|
|
12385
|
+
$e = null, De(Se.clientX, Se.clientY);
|
|
12386
12386
|
}));
|
|
12387
12387
|
}
|
|
12388
12388
|
function _t(Se) {
|
|
12389
|
-
window.removeEventListener("pointermove",
|
|
12390
|
-
const W = Y.value &&
|
|
12389
|
+
window.removeEventListener("pointermove", al), window.removeEventListener("pointerup", _t), window.removeEventListener("pointercancel", _t), Ie?.releasePointerCapture?.(Se.pointerId), ct(Ie), Ie = null;
|
|
12390
|
+
const W = Y.value && il(Se.clientX, Se.clientY);
|
|
12391
12391
|
if (y.value && W)
|
|
12392
12392
|
D("delete", { item: y.value });
|
|
12393
12393
|
else {
|
|
@@ -12407,14 +12407,14 @@ const Jo = {
|
|
|
12407
12407
|
}, 3500);
|
|
12408
12408
|
}
|
|
12409
12409
|
}
|
|
12410
|
-
Ce && (Ce.remove(), Ce = null), bt !== null && (document.body.style.cursor = bt, bt = ""),
|
|
12410
|
+
Ce && (Ce.remove(), Ce = null), bt !== null && (document.body.style.cursor = bt, bt = ""), ul();
|
|
12411
12411
|
}
|
|
12412
12412
|
function ft(Se, W) {
|
|
12413
12413
|
Se.preventDefault();
|
|
12414
12414
|
const te = Se.target.closest(".dss-dnd-item");
|
|
12415
12415
|
if (!te) return;
|
|
12416
12416
|
const ve = te.getBoundingClientRect();
|
|
12417
|
-
J = Se.clientX - ve.left, Tt = Se.clientY - ve.top, bt = document.body.style.cursor, document.body.style.cursor = "grabbing", y.value = W, Ie = te, Te(te, Se.clientX, Se.clientY), requestAnimationFrame(() => vt(te)), te.setPointerCapture?.(Se.pointerId), window.addEventListener("pointermove",
|
|
12417
|
+
J = Se.clientX - ve.left, Tt = Se.clientY - ve.top, bt = document.body.style.cursor, document.body.style.cursor = "grabbing", y.value = W, Ie = te, Te(te, Se.clientX, Se.clientY), requestAnimationFrame(() => vt(te)), te.setPointerCapture?.(Se.pointerId), window.addEventListener("pointermove", al), window.addEventListener("pointerup", _t, { once: !0 }), window.addEventListener("pointercancel", _t, { once: !0 });
|
|
12418
12418
|
}
|
|
12419
12419
|
function Ft() {
|
|
12420
12420
|
Xe && (window.removeEventListener("pointermove", gl), window.removeEventListener("pointerup", At), window.removeEventListener("pointercancel", At), Xe = null);
|
|
@@ -12430,7 +12430,7 @@ const Jo = {
|
|
|
12430
12430
|
function At(Se) {
|
|
12431
12431
|
!Xe || Se.pointerId !== Xe.pointerId || Ft();
|
|
12432
12432
|
}
|
|
12433
|
-
function
|
|
12433
|
+
function nl(Se, W) {
|
|
12434
12434
|
Ft(), Xe = {
|
|
12435
12435
|
item: W,
|
|
12436
12436
|
startX: Se.clientX,
|
|
@@ -12439,16 +12439,16 @@ const Jo = {
|
|
|
12439
12439
|
}, window.addEventListener("pointermove", gl), window.addEventListener("pointerup", At), window.addEventListener("pointercancel", At);
|
|
12440
12440
|
}
|
|
12441
12441
|
function Lt(Se, W) {
|
|
12442
|
-
we.value.useHandle ||
|
|
12442
|
+
we.value.useHandle || nl(Se, W);
|
|
12443
12443
|
}
|
|
12444
12444
|
function ml(Se, W) {
|
|
12445
|
-
|
|
12445
|
+
nl(Se, W);
|
|
12446
12446
|
}
|
|
12447
12447
|
function Nt() {
|
|
12448
12448
|
$e && (cancelAnimationFrame($e), $e = null);
|
|
12449
12449
|
}
|
|
12450
|
-
function
|
|
12451
|
-
Nt(), y.value = null,
|
|
12450
|
+
function ul() {
|
|
12451
|
+
Nt(), y.value = null, Re.value = null, Ee.value = !1, ie.value = -1;
|
|
12452
12452
|
}
|
|
12453
12453
|
return Sn(() => {
|
|
12454
12454
|
Nt(), Ft(), ze && clearTimeout(ze), Ce && (Ce.remove(), Ce = null);
|
|
@@ -12460,7 +12460,7 @@ const Jo = {
|
|
|
12460
12460
|
key: 0,
|
|
12461
12461
|
to: "body"
|
|
12462
12462
|
}, [
|
|
12463
|
-
|
|
12463
|
+
rl(n("div", {
|
|
12464
12464
|
class: re(["dss-dnd-delete-zone", { "dss-dnd-delete-zone--drag-over": Ee.value }]),
|
|
12465
12465
|
"data-dss-dnd-delete-zone": ""
|
|
12466
12466
|
}, [
|
|
@@ -12475,7 +12475,7 @@ const Jo = {
|
|
|
12475
12475
|
(i(!0), c(ae, null, Le(T.columns, (te) => (i(), c("div", {
|
|
12476
12476
|
key: te.value,
|
|
12477
12477
|
class: re(["dss-dnd-column", [
|
|
12478
|
-
{ "dss-dnd-column--drag-over":
|
|
12478
|
+
{ "dss-dnd-column--drag-over": Re.value == te.value },
|
|
12479
12479
|
te.class || ""
|
|
12480
12480
|
]]),
|
|
12481
12481
|
style: be(ce(te))
|
|
@@ -12526,7 +12526,7 @@ const Jo = {
|
|
|
12526
12526
|
])
|
|
12527
12527
|
], 42, j9))
|
|
12528
12528
|
], 64))), 128)),
|
|
12529
|
-
(Q.value[te.value] || []).length === 0 &&
|
|
12529
|
+
(Q.value[te.value] || []).length === 0 && Re.value != te.value ? (i(), c("div", J9, [
|
|
12530
12530
|
pl(Se.$slots, "empty", { column: te }, () => [
|
|
12531
12531
|
W[1] || (W[1] = n("span", { class: "dss-dnd-empty-text" }, "No items", -1))
|
|
12532
12532
|
])
|
|
@@ -12584,7 +12584,7 @@ const Jo = {
|
|
|
12584
12584
|
Ie.tiltAngle += Ie.tiltInc, Ie.y += Ie.speed * ze, Ie.x += Math.sin(Ie.d) * 0.5 * ze, Ie.tilt = Math.sin(Ie.tiltAngle) * 15, $e >= 0.99 && Ie.y > le + 20 && (ke[Ce] = xt(ie));
|
|
12585
12585
|
}
|
|
12586
12586
|
}
|
|
12587
|
-
function
|
|
12587
|
+
function Re() {
|
|
12588
12588
|
D.value = !0, Ae(() => {
|
|
12589
12589
|
const ie = I.value;
|
|
12590
12590
|
if (!ie) return;
|
|
@@ -12607,7 +12607,7 @@ const Jo = {
|
|
|
12607
12607
|
Y && (cancelAnimationFrame(Y), Y = null), ke = [], D.value = !1;
|
|
12608
12608
|
}
|
|
12609
12609
|
return Dt(() => ue.trigger, (ie) => {
|
|
12610
|
-
ie && (P && clearTimeout(P), P = setTimeout(
|
|
12610
|
+
ie && (P && clearTimeout(P), P = setTimeout(Re, ue.delay));
|
|
12611
12611
|
}, { immediate: !0 }), Sn(() => {
|
|
12612
12612
|
Ee(), P && clearTimeout(P);
|
|
12613
12613
|
}), (ie, le) => D.value ? (i(), c("canvas", {
|
|
@@ -12762,7 +12762,7 @@ const Jo = {
|
|
|
12762
12762
|
{ value: "is_empty" },
|
|
12763
12763
|
{ value: "is_not_empty" }
|
|
12764
12764
|
]
|
|
12765
|
-
}, ce = /* @__PURE__ */ new Set(["is_empty", "is_not_empty", "is_true", "is_false"]), y = ["label", "name", "title", "keyword", "full_name", "value", "text"],
|
|
12765
|
+
}, ce = /* @__PURE__ */ new Set(["is_empty", "is_not_empty", "is_true", "is_false"]), y = ["label", "name", "title", "keyword", "full_name", "value", "text"], Re = $(""), Ee = $([]), ie = $(null), le = $(!1), $e = $(null), ze = $(""), Ce = $(null), Ie = $(""), J = $("asc");
|
|
12766
12766
|
let Tt = 1;
|
|
12767
12767
|
function bt(V) {
|
|
12768
12768
|
const S = V.find((E) => E && typeof E == "object");
|
|
@@ -12839,17 +12839,17 @@ const Jo = {
|
|
|
12839
12839
|
const V = ze.value.toLowerCase();
|
|
12840
12840
|
return st.value.filter((S) => S.label.toLowerCase().includes(V));
|
|
12841
12841
|
}), ct = v(() => st.value.filter((V) => !["arraySelect", "arrayText"].includes(V.type))), Ct = v(() => Ie.value ? J.value === "asc" ? "Ascending" : "Descending" : "No sort selected");
|
|
12842
|
-
function
|
|
12843
|
-
ie.value === V ?
|
|
12842
|
+
function il(V) {
|
|
12843
|
+
ie.value === V ? De() : (ie.value = V, ze.value = "", Ce.value = null);
|
|
12844
12844
|
}
|
|
12845
|
-
function
|
|
12845
|
+
function De() {
|
|
12846
12846
|
ie.value = null, ze.value = "", Ce.value = null;
|
|
12847
12847
|
}
|
|
12848
|
-
function
|
|
12848
|
+
function al(V) {
|
|
12849
12849
|
const S = V.target.closest(".dss-datepicker__overlay, .dss-datepicker__dropdown");
|
|
12850
|
-
ie.value && !S && !V.target.closest(".dss-filter-popup") && !V.target.closest(".dss-filter-trigger") && !V.target.closest(".dss-filter-add-btn") &&
|
|
12850
|
+
ie.value && !S && !V.target.closest(".dss-filter-popup") && !V.target.closest(".dss-filter-trigger") && !V.target.closest(".dss-filter-add-btn") && De(), le.value && $e.value && !$e.value.contains(V.target) && (S || (le.value = !1));
|
|
12851
12851
|
}
|
|
12852
|
-
Pn(() => document.addEventListener("click",
|
|
12852
|
+
Pn(() => document.addEventListener("click", al)), Sn(() => document.removeEventListener("click", al));
|
|
12853
12853
|
function _t(V) {
|
|
12854
12854
|
return Q.value[V]?.label || mt(V);
|
|
12855
12855
|
}
|
|
@@ -12869,7 +12869,7 @@ const Jo = {
|
|
|
12869
12869
|
function At(V) {
|
|
12870
12870
|
return ce.has(V);
|
|
12871
12871
|
}
|
|
12872
|
-
function
|
|
12872
|
+
function nl(V) {
|
|
12873
12873
|
const S = Q.value[V.key];
|
|
12874
12874
|
return S ? S.type === "date" ? "date" : S.type === "boolean" ? "boolean" : S.type === "text" || S.type === "arrayText" ? "text" : S.type === "select" || S.type === "arraySelect" ? "multiselect" : S.type === "range" || S.type === "int" ? V.operator === "between" ? "between" : "number" : "text" : "text";
|
|
12875
12875
|
}
|
|
@@ -12882,7 +12882,7 @@ const Jo = {
|
|
|
12882
12882
|
function Nt(V) {
|
|
12883
12883
|
return Q.value[V.key]?.uniqueValues || [];
|
|
12884
12884
|
}
|
|
12885
|
-
function
|
|
12885
|
+
function ul(V) {
|
|
12886
12886
|
const S = Nt(V);
|
|
12887
12887
|
if (!ze.value) return S;
|
|
12888
12888
|
const E = ze.value.toLowerCase();
|
|
@@ -12899,24 +12899,24 @@ const Jo = {
|
|
|
12899
12899
|
key: V,
|
|
12900
12900
|
operator: he,
|
|
12901
12901
|
value: ml(me, he)
|
|
12902
|
-
})),
|
|
12902
|
+
})), De();
|
|
12903
12903
|
}
|
|
12904
12904
|
function te(V) {
|
|
12905
12905
|
Ee.value = Ee.value.filter((S) => S.id !== V);
|
|
12906
12906
|
}
|
|
12907
12907
|
function ve(V, S) {
|
|
12908
12908
|
const me = Q.value[S]?.type || "text";
|
|
12909
|
-
V.key = S, V.operator = Lt(me), V.value = ml(me, V.operator),
|
|
12909
|
+
V.key = S, V.operator = Lt(me), V.value = ml(me, V.operator), De();
|
|
12910
12910
|
}
|
|
12911
12911
|
function Me(V, S) {
|
|
12912
|
-
const E =
|
|
12912
|
+
const E = nl(V);
|
|
12913
12913
|
V.operator = S;
|
|
12914
|
-
const me =
|
|
12914
|
+
const me = nl(V);
|
|
12915
12915
|
if (E !== me || ce.has(S)) {
|
|
12916
12916
|
const he = Q.value[V.key];
|
|
12917
12917
|
V.value = ml(he?.type || "text", S);
|
|
12918
12918
|
}
|
|
12919
|
-
|
|
12919
|
+
De();
|
|
12920
12920
|
}
|
|
12921
12921
|
function ot(V, S) {
|
|
12922
12922
|
const E = S.target.value;
|
|
@@ -12931,10 +12931,10 @@ const Jo = {
|
|
|
12931
12931
|
V.value = me >= 0 ? E.filter((he) => he !== S) : [...E, S];
|
|
12932
12932
|
}
|
|
12933
12933
|
function We() {
|
|
12934
|
-
Ee.value = [],
|
|
12934
|
+
Ee.value = [], Re.value = "", De();
|
|
12935
12935
|
}
|
|
12936
12936
|
function dt(V) {
|
|
12937
|
-
|
|
12937
|
+
Re.value = V.target.value;
|
|
12938
12938
|
}
|
|
12939
12939
|
function Rt(V) {
|
|
12940
12940
|
Ie.value = V.target.value;
|
|
@@ -12945,8 +12945,8 @@ const Jo = {
|
|
|
12945
12945
|
const ge = v(() => {
|
|
12946
12946
|
if (!ke.data) return [];
|
|
12947
12947
|
let V = ke.data;
|
|
12948
|
-
if (
|
|
12949
|
-
const S =
|
|
12948
|
+
if (Re.value) {
|
|
12949
|
+
const S = Re.value.toLowerCase();
|
|
12950
12950
|
V = V.filter((E) => {
|
|
12951
12951
|
for (const me of Object.keys(E)) {
|
|
12952
12952
|
const he = E[me];
|
|
@@ -12980,8 +12980,8 @@ const Jo = {
|
|
|
12980
12980
|
}
|
|
12981
12981
|
function Ne(V, S, E) {
|
|
12982
12982
|
const me = V?.[S.key], he = S.value, Ke = S.operator;
|
|
12983
|
-
if (Ke === "is_empty") return
|
|
12984
|
-
if (Ke === "is_not_empty") return !
|
|
12983
|
+
if (Ke === "is_empty") return sl(me);
|
|
12984
|
+
if (Ke === "is_not_empty") return !sl(me);
|
|
12985
12985
|
const Ht = E.type;
|
|
12986
12986
|
if (Ht === "text" || Ht === "arrayText") {
|
|
12987
12987
|
const ht = Ht === "arrayText" && Array.isArray(me) ? me.filter((zt) => zt != null).map(String).join(" ") : me != null ? String(me) : "", lt = String(he).toLowerCase(), It = ht.toLowerCase();
|
|
@@ -13099,11 +13099,11 @@ const Jo = {
|
|
|
13099
13099
|
const S = V.getFullYear(), E = String(V.getMonth() + 1).padStart(2, "0"), me = String(V.getDate()).padStart(2, "0");
|
|
13100
13100
|
return `${S}-${E}-${me}`;
|
|
13101
13101
|
}
|
|
13102
|
-
function
|
|
13102
|
+
function sl(V) {
|
|
13103
13103
|
return !!(V == null || V === "" || V === "NULL" || Array.isArray(V) && V.length === 0 || Array.isArray(V) && V.every((S) => S == null));
|
|
13104
13104
|
}
|
|
13105
13105
|
Dt(ge, (V) => Y("update:modelValue", V), { immediate: !0 }), Dt(() => ke.data, () => {
|
|
13106
|
-
Ee.value = [],
|
|
13106
|
+
Ee.value = [], Re.value = "", le.value = !1, Ie.value = "", J.value = "asc", De();
|
|
13107
13107
|
});
|
|
13108
13108
|
function mt(V) {
|
|
13109
13109
|
return V.replace(/_/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (S) => S.toUpperCase());
|
|
@@ -13121,7 +13121,7 @@ const Jo = {
|
|
|
13121
13121
|
return S;
|
|
13122
13122
|
};
|
|
13123
13123
|
return {
|
|
13124
|
-
globalSearch:
|
|
13124
|
+
globalSearch: Re.value,
|
|
13125
13125
|
rows: Ee.value.map((S) => ({
|
|
13126
13126
|
key: S.key,
|
|
13127
13127
|
operator: S.operator,
|
|
@@ -13166,13 +13166,13 @@ const Jo = {
|
|
|
13166
13166
|
type: "text",
|
|
13167
13167
|
class: "dss-filter-global-input",
|
|
13168
13168
|
placeholder: O(D)("filter.searchAcrossFields"),
|
|
13169
|
-
value:
|
|
13169
|
+
value: Re.value,
|
|
13170
13170
|
onInput: dt
|
|
13171
13171
|
}, null, 40, av),
|
|
13172
|
-
|
|
13172
|
+
Re.value ? (i(), c("button", {
|
|
13173
13173
|
key: 0,
|
|
13174
13174
|
class: "dss-filter-global-clear",
|
|
13175
|
-
onClick: S[0] || (S[0] = (E) =>
|
|
13175
|
+
onClick: S[0] || (S[0] = (E) => Re.value = "")
|
|
13176
13176
|
}, "×")) : A("", !0),
|
|
13177
13177
|
n("button", {
|
|
13178
13178
|
class: re(["dss-filter-funnel-btn", { active: le.value || Ee.value.length > 0, "dss-filter-funnel-btn--with-sort": ke.showSortBy }]),
|
|
@@ -13252,7 +13252,7 @@ const Jo = {
|
|
|
13252
13252
|
n("div", hv, [
|
|
13253
13253
|
n("button", {
|
|
13254
13254
|
class: "dss-filter-trigger",
|
|
13255
|
-
onClick: je((he) =>
|
|
13255
|
+
onClick: je((he) => il(`${E.id}:field`), ["stop"])
|
|
13256
13256
|
}, [
|
|
13257
13257
|
n("span", yv, L(_t(E.key)), 1),
|
|
13258
13258
|
S[21] || (S[21] = n("svg", {
|
|
@@ -13271,7 +13271,7 @@ const Jo = {
|
|
|
13271
13271
|
onClick: S[3] || (S[3] = je(() => {
|
|
13272
13272
|
}, ["stop"]))
|
|
13273
13273
|
}, [
|
|
13274
|
-
|
|
13274
|
+
rl(n("input", {
|
|
13275
13275
|
type: "text",
|
|
13276
13276
|
class: "dss-filter-popup-search",
|
|
13277
13277
|
"onUpdate:modelValue": S[2] || (S[2] = (he) => ze.value = he),
|
|
@@ -13292,7 +13292,7 @@ const Jo = {
|
|
|
13292
13292
|
ft(E) === "contain" || ft(E) === "date" ? (i(), c("div", xv, [
|
|
13293
13293
|
n("button", {
|
|
13294
13294
|
class: "dss-filter-trigger",
|
|
13295
|
-
onClick: je((he) =>
|
|
13295
|
+
onClick: je((he) => il(`${E.id}:op`), ["stop"])
|
|
13296
13296
|
}, [
|
|
13297
13297
|
n("span", Sv, L(Ft(E.operator)), 1),
|
|
13298
13298
|
S[22] || (S[22] = n("svg", {
|
|
@@ -13321,7 +13321,7 @@ const Jo = {
|
|
|
13321
13321
|
])) : A("", !0)
|
|
13322
13322
|
])) : A("", !0),
|
|
13323
13323
|
At(E.operator) ? A("", !0) : (i(), c("div", Av, [
|
|
13324
|
-
ft(E) === "string" ?
|
|
13324
|
+
ft(E) === "string" ? rl((i(), c("input", {
|
|
13325
13325
|
key: 0,
|
|
13326
13326
|
type: "text",
|
|
13327
13327
|
class: "dss-filter-value-input",
|
|
@@ -13335,7 +13335,7 @@ const Jo = {
|
|
|
13335
13335
|
modelValue: E.value,
|
|
13336
13336
|
"onUpdate:modelValue": (he) => E.value = he
|
|
13337
13337
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
13338
|
-
])) :
|
|
13338
|
+
])) : nl(E) === "text" ? rl((i(), c("input", {
|
|
13339
13339
|
key: 2,
|
|
13340
13340
|
type: "text",
|
|
13341
13341
|
class: "dss-filter-value-input",
|
|
@@ -13343,7 +13343,7 @@ const Jo = {
|
|
|
13343
13343
|
"onUpdate:modelValue": (he) => E.value = he
|
|
13344
13344
|
}, null, 8, Tv)), [
|
|
13345
13345
|
[Dl, E.value]
|
|
13346
|
-
]) :
|
|
13346
|
+
]) : nl(E) === "number" ? (i(), c("input", {
|
|
13347
13347
|
key: 3,
|
|
13348
13348
|
type: "number",
|
|
13349
13349
|
class: "dss-filter-value-input",
|
|
@@ -13351,7 +13351,7 @@ const Jo = {
|
|
|
13351
13351
|
value: E.value,
|
|
13352
13352
|
onInput: (he) => ot(E, he),
|
|
13353
13353
|
step: Q.value[E.key]?.type === "int" ? 1 : void 0
|
|
13354
|
-
}, null, 40, Hv)) :
|
|
13354
|
+
}, null, 40, Hv)) : nl(E) === "between" ? (i(), c("div", Dv, [
|
|
13355
13355
|
n("input", {
|
|
13356
13356
|
type: "number",
|
|
13357
13357
|
class: "dss-filter-value-input",
|
|
@@ -13369,10 +13369,10 @@ const Jo = {
|
|
|
13369
13369
|
onInput: (he) => ut(E, "max", he),
|
|
13370
13370
|
step: Q.value[E.key]?.type === "int" ? 1 : void 0
|
|
13371
13371
|
}, null, 40, Nv)
|
|
13372
|
-
])) :
|
|
13372
|
+
])) : nl(E) === "multiselect" ? (i(), c("div", Iv, [
|
|
13373
13373
|
n("button", {
|
|
13374
13374
|
class: "dss-filter-trigger",
|
|
13375
|
-
onClick: je((he) =>
|
|
13375
|
+
onClick: je((he) => il(`${E.id}:val`), ["stop"])
|
|
13376
13376
|
}, [
|
|
13377
13377
|
n("span", Pv, L(Se(E)), 1),
|
|
13378
13378
|
S[23] || (S[23] = n("svg", {
|
|
@@ -13391,7 +13391,7 @@ const Jo = {
|
|
|
13391
13391
|
onClick: S[6] || (S[6] = je(() => {
|
|
13392
13392
|
}, ["stop"]))
|
|
13393
13393
|
}, [
|
|
13394
|
-
Nt(E).length > 6 ?
|
|
13394
|
+
Nt(E).length > 6 ? rl((i(), c("input", {
|
|
13395
13395
|
key: 0,
|
|
13396
13396
|
type: "text",
|
|
13397
13397
|
class: "dss-filter-popup-search",
|
|
@@ -13401,7 +13401,7 @@ const Jo = {
|
|
|
13401
13401
|
[Dl, ze.value]
|
|
13402
13402
|
]) : A("", !0),
|
|
13403
13403
|
n("ul", Ov, [
|
|
13404
|
-
(i(!0), c(ae, null, Le(
|
|
13404
|
+
(i(!0), c(ae, null, Le(ul(E), (he) => (i(), c("li", {
|
|
13405
13405
|
key: he,
|
|
13406
13406
|
class: "dss-filter-popup-item",
|
|
13407
13407
|
onClick: (Ke) => Ut(E, he)
|
|
@@ -13413,7 +13413,7 @@ const Jo = {
|
|
|
13413
13413
|
}, null, 8, Wv),
|
|
13414
13414
|
n("span", null, L(he), 1)
|
|
13415
13415
|
], 8, zv))), 128)),
|
|
13416
|
-
|
|
13416
|
+
ul(E).length === 0 ? (i(), c("li", Zv, L(O(D)("filter.noMatch")), 1)) : A("", !0)
|
|
13417
13417
|
])
|
|
13418
13418
|
])) : A("", !0)
|
|
13419
13419
|
])) : A("", !0)
|
|
@@ -13449,7 +13449,7 @@ const Jo = {
|
|
|
13449
13449
|
n("div", Xv, [
|
|
13450
13450
|
n("button", {
|
|
13451
13451
|
class: "dss-filter-add-btn",
|
|
13452
|
-
onClick: S[7] || (S[7] = je((E) =>
|
|
13452
|
+
onClick: S[7] || (S[7] = je((E) => il("add"), ["stop"]))
|
|
13453
13453
|
}, L(O(D)("filter.addFilter")), 1),
|
|
13454
13454
|
ie.value === "add" ? (i(), c("div", {
|
|
13455
13455
|
key: 0,
|
|
@@ -13458,7 +13458,7 @@ const Jo = {
|
|
|
13458
13458
|
}, ["stop"]))
|
|
13459
13459
|
}, [
|
|
13460
13460
|
qe.value && !Ce.value && !ze.value ? (i(), c(ae, { key: 0 }, [
|
|
13461
|
-
|
|
13461
|
+
rl(n("input", {
|
|
13462
13462
|
type: "text",
|
|
13463
13463
|
class: "dss-filter-popup-search",
|
|
13464
13464
|
"onUpdate:modelValue": S[8] || (S[8] = (E) => ze.value = E),
|
|
@@ -13505,7 +13505,7 @@ const Jo = {
|
|
|
13505
13505
|
], -1)),
|
|
13506
13506
|
n("span", null, L(Ce.value.label), 1)
|
|
13507
13507
|
]),
|
|
13508
|
-
|
|
13508
|
+
rl(n("input", {
|
|
13509
13509
|
type: "text",
|
|
13510
13510
|
class: "dss-filter-popup-search",
|
|
13511
13511
|
"onUpdate:modelValue": S[10] || (S[10] = (E) => ze.value = E),
|
|
@@ -13522,7 +13522,7 @@ const Jo = {
|
|
|
13522
13522
|
Be.value.length === 0 ? (i(), c("li", l3, L(O(D)("filter.noMatch")), 1)) : A("", !0)
|
|
13523
13523
|
])
|
|
13524
13524
|
], 64)) : (i(), c(ae, { key: 2 }, [
|
|
13525
|
-
|
|
13525
|
+
rl(n("input", {
|
|
13526
13526
|
type: "text",
|
|
13527
13527
|
class: "dss-filter-popup-search",
|
|
13528
13528
|
"onUpdate:modelValue": S[11] || (S[11] = (E) => ze.value = E),
|
|
@@ -13566,9 +13566,9 @@ const Jo = {
|
|
|
13566
13566
|
setup(T, { emit: ue }) {
|
|
13567
13567
|
const I = T, D = ue, ke = $(""), Y = $([...I.modelValue]), P = $(null);
|
|
13568
13568
|
let we = null;
|
|
13569
|
-
const xt = $(null), ce = $(""), y = $(null),
|
|
13570
|
-
if (!
|
|
13571
|
-
const { width: qe, height: at } =
|
|
13569
|
+
const xt = $(null), ce = $(""), y = $(null), Re = $(null), Ee = v(() => {
|
|
13570
|
+
if (!Re.value) return;
|
|
13571
|
+
const { width: qe, height: at } = Re.value;
|
|
13572
13572
|
return {
|
|
13573
13573
|
minWidth: `${qe}px`,
|
|
13574
13574
|
height: `${at}px`
|
|
@@ -13578,7 +13578,7 @@ const Jo = {
|
|
|
13578
13578
|
xt.value === at && (y.value = qe);
|
|
13579
13579
|
}
|
|
13580
13580
|
function le() {
|
|
13581
|
-
xt.value = null, ce.value = "",
|
|
13581
|
+
xt.value = null, ce.value = "", Re.value = null, y.value = null;
|
|
13582
13582
|
}
|
|
13583
13583
|
const $e = v(() => new Set(Y.value.map((qe) => qe.trim()).filter(Boolean)));
|
|
13584
13584
|
function ze(qe) {
|
|
@@ -13610,7 +13610,7 @@ const Jo = {
|
|
|
13610
13610
|
async function Tt(qe, at) {
|
|
13611
13611
|
if (I.disabled) return;
|
|
13612
13612
|
const Te = at.currentTarget.closest(".dss-pill-field__pill");
|
|
13613
|
-
Te && (
|
|
13613
|
+
Te && (Re.value = { width: Te.offsetWidth, height: Te.offsetHeight }), xt.value = qe, ce.value = Y.value[qe] ?? "", await Ae();
|
|
13614
13614
|
const Be = y.value;
|
|
13615
13615
|
if (!Be) return;
|
|
13616
13616
|
Be.focus();
|
|
@@ -13657,14 +13657,14 @@ const Jo = {
|
|
|
13657
13657
|
"dss-pill-field__pill--highlight": P.value === Te,
|
|
13658
13658
|
"dss-pill-field__pill--editing": xt.value === Be
|
|
13659
13659
|
}]),
|
|
13660
|
-
style: be(xt.value === Be &&
|
|
13660
|
+
style: be(xt.value === Be && Re.value ? Ee.value : void 0)
|
|
13661
13661
|
}, [
|
|
13662
13662
|
xt.value === Be ? (i(), c("span", {
|
|
13663
13663
|
key: 0,
|
|
13664
13664
|
class: "dss-pill-field__pill-edit-wrap",
|
|
13665
13665
|
"data-value": ce.value || " "
|
|
13666
13666
|
}, [
|
|
13667
|
-
|
|
13667
|
+
rl(n("input", {
|
|
13668
13668
|
ref_for: !0,
|
|
13669
13669
|
ref: (vt) => ie(vt, Be),
|
|
13670
13670
|
"onUpdate:modelValue": at[0] || (at[0] = (vt) => ce.value = vt),
|
|
@@ -13707,7 +13707,7 @@ const Jo = {
|
|
|
13707
13707
|
]))
|
|
13708
13708
|
], 64))
|
|
13709
13709
|
], 6))), 128)),
|
|
13710
|
-
|
|
13710
|
+
rl(n("input", {
|
|
13711
13711
|
"onUpdate:modelValue": at[1] || (at[1] = (Te) => ke.value = Te),
|
|
13712
13712
|
class: "dss-pill-field__input",
|
|
13713
13713
|
type: "text",
|
|
@@ -13764,7 +13764,7 @@ const Jo = {
|
|
|
13764
13764
|
main: "div",
|
|
13765
13765
|
subtitle: "p",
|
|
13766
13766
|
separator: "span"
|
|
13767
|
-
}, ce = v(() => D.h != null ? `h${D.h}` : xt[D.type] ?? "div"), y = v(() => D.editable ? "plaintext-only" : void 0),
|
|
13767
|
+
}, ce = v(() => D.h != null ? `h${D.h}` : xt[D.type] ?? "div"), y = v(() => D.editable ? "plaintext-only" : void 0), Re = v(() => {
|
|
13768
13768
|
const Ce = {};
|
|
13769
13769
|
return D.size != null && (Ce.fontSize = typeof D.size == "number" ? `${D.size}px` : D.size), D.weight != null && (Ce.fontWeight = D.weight), D.color != null && (Ce.color = D.color), Object.keys(Ce).length ? Ce : void 0;
|
|
13770
13770
|
}), Ee = v(() => D.editable ? {
|
|
@@ -13797,7 +13797,7 @@ const Jo = {
|
|
|
13797
13797
|
ref_key: "titleRef",
|
|
13798
13798
|
ref: Y,
|
|
13799
13799
|
class: ["dss-title__separator-label", we.value, { "dss-title--editable": T.editable }],
|
|
13800
|
-
style:
|
|
13800
|
+
style: Re.value,
|
|
13801
13801
|
contenteditable: y.value,
|
|
13802
13802
|
spellcheck: T.editable ? !1 : void 0
|
|
13803
13803
|
}, co(Ee.value)), {
|
|
@@ -13813,7 +13813,7 @@ const Jo = {
|
|
|
13813
13813
|
ref_key: "titleRef",
|
|
13814
13814
|
ref: Y,
|
|
13815
13815
|
class: ["dss-title", [P.value, we.value, { "dss-title--editable": T.editable }]],
|
|
13816
|
-
style:
|
|
13816
|
+
style: Re.value,
|
|
13817
13817
|
contenteditable: y.value,
|
|
13818
13818
|
spellcheck: T.editable ? !1 : void 0
|
|
13819
13819
|
}, co(Ee.value)), {
|