@feedmepos/mf-report 5.27.3 → 5.27.4-beta.0
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/{App-BQvyBxQZ.js → App-CVUjMQDz.js} +60 -60
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-C2vOon8y.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-D7KWRFL7.js} +1 -1
- package/dist/{Default.vue_vue_type_script_setup_true_lang-Cl3LOLSX.js → Default.vue_vue_type_script_setup_true_lang-_Pxgsq5e.js} +1 -1
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-C4SArHXe.js → DynamicWidget.vue_vue_type_script_setup_true_lang-ECz1NPi7.js} +3 -3
- package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-CvDkDKbD.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-CQNNicq4.js} +2 -2
- package/dist/{InsightView-DPiU9k6Z.js → InsightView-CDW0JBkk.js} +4 -4
- package/dist/{Integration-Fe0X2kBX.js → Integration-DLwAnT21.js} +3 -3
- package/dist/{Integrations-C6qtgYcR.js → Integrations-D0oVZDbH.js} +2 -2
- package/dist/{Layout-k9kowgUp.js → Layout-D9pO69wt.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-BxzUzgKQ.js → MenuTab.vue_vue_type_script_setup_true_lang-DXkWMv9I.js} +4 -4
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-DE2dxChA.js → NavigationTab.vue_vue_type_script_setup_true_lang-CgUtDgUA.js} +3 -3
- package/dist/{OverviewView-Bn1Dsyht.js → OverviewView-DWKUFy4L.js} +4 -4
- package/dist/{Report-Dry5TCio.js → Report-Dq69Kao8.js} +3 -3
- package/dist/{ReportEditor-CTEY808t.js → ReportEditor-qo-3ylaP.js} +5 -5
- package/dist/{ReportView-fYYP6O89.js → ReportView-CM-bxuxT.js} +6 -6
- package/dist/{Setting-B19AiqLB.js → Setting-CPIM8l2c.js} +3 -3
- package/dist/{Template-CenPPWyy.js → Template-ChJoYLdm.js} +3 -3
- package/dist/TileEditor-Dt7uvirF.js +4023 -0
- package/dist/{TileGrid.vue_vue_type_script_setup_true_lang-DP9grlTV.js → TileGrid.vue_vue_type_script_setup_true_lang-CuFuqoo2.js} +1 -1
- package/dist/{TransitionFade-BxomnpMj.js → TransitionFade-rqX_v3T0.js} +941 -915
- package/dist/{app-DVjmSBbE.js → app-Ck-MFCfm.js} +13 -13
- package/dist/app.js +1 -1
- package/dist/{useRestaurantPermission-0AzpqbLa.js → useRestaurantPermission-DuopS9pb.js} +1 -1
- package/package.json +1 -1
- package/dist/TileEditor-BTJlWp-V.js +0 -4077
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { u as
|
|
3
|
-
import { useCoreStore as
|
|
1
|
+
import { defineComponent as We, onBeforeMount as ro, onBeforeUnmount as ao, resolveComponent as j, createElementBlock as k, openBlock as D, normalizeStyle as Qt, unref as M, renderSlot as pt, createVNode as G, createElementVNode as A, toDisplayString as q, TransitionGroup as io, nextTick as rn, h as cn, mergeModels as kt, useModel as tt, computed as C, Fragment as Ae, renderList as It, createBlock as Ee, normalizeClass as Ot, withCtx as de, Transition as Zt, createCommentVNode as U, ref as Q, withDirectives as lo, withKeys as so, withModifiers as Ct, vModelText as uo, watch as je, createTextVNode as co } from "vue";
|
|
2
|
+
import { u as Lt, a as fo } from "./vue-i18n-DVWuTfed.js";
|
|
3
|
+
import { useCoreStore as po } from "@feedmepos/mf-common";
|
|
4
4
|
import { storeToRefs as In } from "pinia";
|
|
5
|
-
import { useRoute as
|
|
6
|
-
import { W as z, Q as
|
|
7
|
-
import { p as
|
|
8
|
-
import { b as
|
|
9
|
-
import { R as
|
|
10
|
-
import { u as
|
|
11
|
-
import { r as
|
|
12
|
-
import { useSnackbar as
|
|
13
|
-
const
|
|
5
|
+
import { useRoute as mo } from "vue-router";
|
|
6
|
+
import { W as z, Q as ho, I as rt, t as On, v as Cn, c as Ge, g as go, q as vo } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-CQNNicq4.js";
|
|
7
|
+
import { p as bo, d as Sn, a as Rn } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-D7KWRFL7.js";
|
|
8
|
+
import { b as an, a as dn } from "./SelectComponent.vue_vue_type_script_setup_true_lang-BL1jpiXN.js";
|
|
9
|
+
import { R as yo, g as gt } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-ECz1NPi7.js";
|
|
10
|
+
import { u as Eo, F as _o, r as To, d as Ut } from "./app-Ck-MFCfm.js";
|
|
11
|
+
import { r as fn } from "./i18n-CI_sQ5d_.js";
|
|
12
|
+
import { useSnackbar as wo } from "@feedmepos/ui-library";
|
|
13
|
+
const xo = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "flex gap-24 flex-col h-screen w-screen justify-center items-center"
|
|
16
|
-
},
|
|
16
|
+
}, Do = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _a = /* @__PURE__ */ We({
|
|
17
17
|
__name: "FullScreen",
|
|
18
18
|
setup(t) {
|
|
19
|
-
const { t: e } =
|
|
20
|
-
return
|
|
19
|
+
const { t: e } = Lt(), n = mo(), { isLoading: o } = In(fo()), r = po();
|
|
20
|
+
return ro(() => {
|
|
21
21
|
r.hideSidebarToggle(!0);
|
|
22
|
-
}),
|
|
22
|
+
}), ao(() => {
|
|
23
23
|
r.hideSidebarToggle(!1);
|
|
24
24
|
}), (a, i) => {
|
|
25
|
-
const
|
|
25
|
+
const l = j("FmCircularProgress");
|
|
26
26
|
return D(), k("div", {
|
|
27
27
|
class: "mx-auto",
|
|
28
|
-
style:
|
|
29
|
-
height: `calc(100vh - ${
|
|
28
|
+
style: Qt({
|
|
29
|
+
height: `calc(100vh - ${M(n).query.token && M(n).query.businessId ? "0" : "64"}px)`
|
|
30
30
|
})
|
|
31
31
|
}, [
|
|
32
|
-
|
|
33
|
-
G(
|
|
34
|
-
A("span",
|
|
35
|
-
])) :
|
|
32
|
+
M(o) ? (D(), k("div", xo, [
|
|
33
|
+
G(l, { size: "xl" }),
|
|
34
|
+
A("span", Do, q(M(e)("report.common.isLoading")), 1)
|
|
35
|
+
])) : pt(a.$slots, "default", { key: 1 })
|
|
36
36
|
], 4);
|
|
37
37
|
};
|
|
38
38
|
}
|
|
@@ -43,7 +43,7 @@ const To = {
|
|
|
43
43
|
* @author owenm <owen23355@gmail.com>
|
|
44
44
|
* @license MIT
|
|
45
45
|
*/
|
|
46
|
-
function
|
|
46
|
+
function pn(t, e) {
|
|
47
47
|
var n = Object.keys(t);
|
|
48
48
|
if (Object.getOwnPropertySymbols) {
|
|
49
49
|
var o = Object.getOwnPropertySymbols(t);
|
|
@@ -56,23 +56,23 @@ function mn(t, e) {
|
|
|
56
56
|
function Ce(t) {
|
|
57
57
|
for (var e = 1; e < arguments.length; e++) {
|
|
58
58
|
var n = arguments[e] != null ? arguments[e] : {};
|
|
59
|
-
e % 2 ?
|
|
60
|
-
|
|
61
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) :
|
|
59
|
+
e % 2 ? pn(Object(n), !0).forEach(function(o) {
|
|
60
|
+
Io(t, o, n[o]);
|
|
61
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : pn(Object(n)).forEach(function(o) {
|
|
62
62
|
Object.defineProperty(t, o, Object.getOwnPropertyDescriptor(n, o));
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
return t;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function _t(t) {
|
|
68
68
|
"@babel/helpers - typeof";
|
|
69
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ?
|
|
69
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? _t = function(e) {
|
|
70
70
|
return typeof e;
|
|
71
|
-
} :
|
|
71
|
+
} : _t = function(e) {
|
|
72
72
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
73
|
-
},
|
|
73
|
+
}, _t(t);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function Io(t, e, n) {
|
|
76
76
|
return e in t ? Object.defineProperty(t, e, {
|
|
77
77
|
value: n,
|
|
78
78
|
enumerable: !0,
|
|
@@ -90,16 +90,16 @@ function Le() {
|
|
|
90
90
|
return t;
|
|
91
91
|
}, Le.apply(this, arguments);
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function Oo(t, e) {
|
|
94
94
|
if (t == null) return {};
|
|
95
95
|
var n = {}, o = Object.keys(t), r, a;
|
|
96
96
|
for (a = 0; a < o.length; a++)
|
|
97
97
|
r = o[a], !(e.indexOf(r) >= 0) && (n[r] = t[r]);
|
|
98
98
|
return n;
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function Co(t, e) {
|
|
101
101
|
if (t == null) return {};
|
|
102
|
-
var n =
|
|
102
|
+
var n = Oo(t, e), o, r;
|
|
103
103
|
if (Object.getOwnPropertySymbols) {
|
|
104
104
|
var a = Object.getOwnPropertySymbols(t);
|
|
105
105
|
for (r = 0; r < a.length; r++)
|
|
@@ -107,22 +107,22 @@ function Io(t, e) {
|
|
|
107
107
|
}
|
|
108
108
|
return n;
|
|
109
109
|
}
|
|
110
|
-
var
|
|
110
|
+
var So = "1.14.0";
|
|
111
111
|
function ke(t) {
|
|
112
112
|
if (typeof window < "u" && window.navigator)
|
|
113
113
|
return !!/* @__PURE__ */ navigator.userAgent.match(t);
|
|
114
114
|
}
|
|
115
|
-
var Pe = ke(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),
|
|
115
|
+
var Pe = ke(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), mt = ke(/Edge/i), mn = ke(/firefox/i), st = ke(/safari/i) && !ke(/chrome/i) && !ke(/android/i), Fn = ke(/iP(ad|od|hone)/i), Ro = ke(/chrome/i) && ke(/android/i), Nn = {
|
|
116
116
|
capture: !1,
|
|
117
117
|
passive: !1
|
|
118
118
|
};
|
|
119
|
-
function
|
|
119
|
+
function R(t, e, n) {
|
|
120
120
|
t.addEventListener(e, n, !Pe && Nn);
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function S(t, e, n) {
|
|
123
123
|
t.removeEventListener(e, n, !Pe && Nn);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function St(t, e) {
|
|
126
126
|
if (e) {
|
|
127
127
|
if (e[0] === ">" && (e = e.substring(1)), t)
|
|
128
128
|
try {
|
|
@@ -138,28 +138,28 @@ function Ft(t, e) {
|
|
|
138
138
|
return !1;
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function Fo(t) {
|
|
142
142
|
return t.host && t !== document && t.host.nodeType ? t.host : t.parentNode;
|
|
143
143
|
}
|
|
144
144
|
function Ie(t, e, n, o) {
|
|
145
145
|
if (t) {
|
|
146
146
|
n = n || document;
|
|
147
147
|
do {
|
|
148
|
-
if (e != null && (e[0] === ">" ? t.parentNode === n &&
|
|
148
|
+
if (e != null && (e[0] === ">" ? t.parentNode === n && St(t, e) : St(t, e)) || o && t === n)
|
|
149
149
|
return t;
|
|
150
150
|
if (t === n) break;
|
|
151
|
-
} while (t =
|
|
151
|
+
} while (t = Fo(t));
|
|
152
152
|
}
|
|
153
153
|
return null;
|
|
154
154
|
}
|
|
155
|
-
var
|
|
156
|
-
function
|
|
155
|
+
var hn = /\s+/g;
|
|
156
|
+
function ge(t, e, n) {
|
|
157
157
|
if (t && e)
|
|
158
158
|
if (t.classList)
|
|
159
159
|
t.classList[n ? "add" : "remove"](e);
|
|
160
160
|
else {
|
|
161
|
-
var o = (" " + t.className + " ").replace(
|
|
162
|
-
t.className = (o + (n ? " " + e : "")).replace(
|
|
161
|
+
var o = (" " + t.className + " ").replace(hn, " ").replace(" " + e + " ", " ");
|
|
162
|
+
t.className = (o + (n ? " " + e : "")).replace(hn, " ");
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
function _(t, e, n) {
|
|
@@ -170,7 +170,7 @@ function _(t, e, n) {
|
|
|
170
170
|
!(e in o) && e.indexOf("webkit") === -1 && (e = "-webkit-" + e), o[e] = n + (typeof n == "string" ? "" : "px");
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function Je(t, e) {
|
|
174
174
|
var n = "";
|
|
175
175
|
if (typeof t == "string")
|
|
176
176
|
n = t;
|
|
@@ -198,39 +198,39 @@ function Oe() {
|
|
|
198
198
|
}
|
|
199
199
|
function te(t, e, n, o, r) {
|
|
200
200
|
if (!(!t.getBoundingClientRect && t !== window)) {
|
|
201
|
-
var a, i,
|
|
202
|
-
if (t !== window && t.parentNode && t !== Oe() ? (a = t.getBoundingClientRect(), i = a.top,
|
|
201
|
+
var a, i, l, s, u, f, c;
|
|
202
|
+
if (t !== window && t.parentNode && t !== Oe() ? (a = t.getBoundingClientRect(), i = a.top, l = a.left, s = a.bottom, u = a.right, f = a.height, c = a.width) : (i = 0, l = 0, s = window.innerHeight, u = window.innerWidth, f = window.innerHeight, c = window.innerWidth), (e || n) && t !== window && (r = r || t.parentNode, !Pe))
|
|
203
203
|
do
|
|
204
204
|
if (r && r.getBoundingClientRect && (_(r, "transform") !== "none" || n && _(r, "position") !== "static")) {
|
|
205
205
|
var E = r.getBoundingClientRect();
|
|
206
|
-
i -= E.top + parseInt(_(r, "border-top-width")),
|
|
206
|
+
i -= E.top + parseInt(_(r, "border-top-width")), l -= E.left + parseInt(_(r, "border-left-width")), s = i + a.height, u = l + a.width;
|
|
207
207
|
break;
|
|
208
208
|
}
|
|
209
209
|
while (r = r.parentNode);
|
|
210
210
|
if (o && t !== window) {
|
|
211
|
-
var
|
|
212
|
-
|
|
211
|
+
var b = Je(r || t), y = b && b.a, g = b && b.d;
|
|
212
|
+
b && (i /= g, l /= y, c /= y, f /= g, s = i + f, u = l + c);
|
|
213
213
|
}
|
|
214
214
|
return {
|
|
215
215
|
top: i,
|
|
216
|
-
left:
|
|
217
|
-
bottom:
|
|
218
|
-
right:
|
|
219
|
-
width:
|
|
216
|
+
left: l,
|
|
217
|
+
bottom: s,
|
|
218
|
+
right: u,
|
|
219
|
+
width: c,
|
|
220
220
|
height: f
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
function
|
|
225
|
-
for (var o =
|
|
224
|
+
function gn(t, e, n) {
|
|
225
|
+
for (var o = $e(t, !0), r = te(t)[e]; o; ) {
|
|
226
226
|
var a = te(o)[n], i = void 0;
|
|
227
227
|
if (i = r >= a, !i) return o;
|
|
228
228
|
if (o === Oe()) break;
|
|
229
|
-
o =
|
|
229
|
+
o = $e(o, !1);
|
|
230
230
|
}
|
|
231
231
|
return !1;
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function et(t, e, n, o) {
|
|
234
234
|
for (var r = 0, a = 0, i = t.children; a < i.length; ) {
|
|
235
235
|
if (i[a].style.display !== "none" && i[a] !== T.ghost && (o || i[a] !== T.dragged) && Ie(i[a], n.draggable, t, !1)) {
|
|
236
236
|
if (r === e)
|
|
@@ -241,29 +241,29 @@ function nt(t, e, n, o) {
|
|
|
241
241
|
}
|
|
242
242
|
return null;
|
|
243
243
|
}
|
|
244
|
-
function
|
|
245
|
-
for (var n = t.lastElementChild; n && (n === T.ghost || _(n, "display") === "none" || e && !
|
|
244
|
+
function ln(t, e) {
|
|
245
|
+
for (var n = t.lastElementChild; n && (n === T.ghost || _(n, "display") === "none" || e && !St(n, e)); )
|
|
246
246
|
n = n.previousElementSibling;
|
|
247
247
|
return n || null;
|
|
248
248
|
}
|
|
249
|
-
function
|
|
249
|
+
function ye(t, e) {
|
|
250
250
|
var n = 0;
|
|
251
251
|
if (!t || !t.parentNode)
|
|
252
252
|
return -1;
|
|
253
253
|
for (; t = t.previousElementSibling; )
|
|
254
|
-
t.nodeName.toUpperCase() !== "TEMPLATE" && t !== T.clone && (!e ||
|
|
254
|
+
t.nodeName.toUpperCase() !== "TEMPLATE" && t !== T.clone && (!e || St(t, e)) && n++;
|
|
255
255
|
return n;
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function vn(t) {
|
|
258
258
|
var e = 0, n = 0, o = Oe();
|
|
259
259
|
if (t)
|
|
260
260
|
do {
|
|
261
|
-
var r =
|
|
261
|
+
var r = Je(t), a = r.a, i = r.d;
|
|
262
262
|
e += t.scrollLeft * a, n += t.scrollTop * i;
|
|
263
263
|
} while (t !== o && (t = t.parentNode));
|
|
264
264
|
return [e, n];
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function No(t, e) {
|
|
267
267
|
for (var n in t)
|
|
268
268
|
if (t.hasOwnProperty(n)) {
|
|
269
269
|
for (var o in e)
|
|
@@ -271,7 +271,7 @@ function Ro(t, e) {
|
|
|
271
271
|
}
|
|
272
272
|
return -1;
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function $e(t, e) {
|
|
275
275
|
if (!t || !t.getBoundingClientRect) return Oe();
|
|
276
276
|
var n = t, o = !1;
|
|
277
277
|
do
|
|
@@ -286,7 +286,7 @@ function He(t, e) {
|
|
|
286
286
|
while (n = n.parentNode);
|
|
287
287
|
return Oe();
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function Ao(t, e) {
|
|
290
290
|
if (t && e)
|
|
291
291
|
for (var n in e)
|
|
292
292
|
e.hasOwnProperty(n) && (t[n] = e[n]);
|
|
@@ -295,19 +295,19 @@ function Fo(t, e) {
|
|
|
295
295
|
function Bt(t, e) {
|
|
296
296
|
return Math.round(t.top) === Math.round(e.top) && Math.round(t.left) === Math.round(e.left) && Math.round(t.height) === Math.round(e.height) && Math.round(t.width) === Math.round(e.width);
|
|
297
297
|
}
|
|
298
|
-
var
|
|
298
|
+
var ut;
|
|
299
299
|
function kn(t, e) {
|
|
300
300
|
return function() {
|
|
301
|
-
if (!
|
|
301
|
+
if (!ut) {
|
|
302
302
|
var n = arguments, o = this;
|
|
303
|
-
n.length === 1 ? t.call(o, n[0]) : t.apply(o, n),
|
|
304
|
-
|
|
303
|
+
n.length === 1 ? t.call(o, n[0]) : t.apply(o, n), ut = setTimeout(function() {
|
|
304
|
+
ut = void 0;
|
|
305
305
|
}, e);
|
|
306
306
|
}
|
|
307
307
|
};
|
|
308
308
|
}
|
|
309
|
-
function
|
|
310
|
-
clearTimeout(
|
|
309
|
+
function ko() {
|
|
310
|
+
clearTimeout(ut), ut = void 0;
|
|
311
311
|
}
|
|
312
312
|
function Ln(t, e, n) {
|
|
313
313
|
t.scrollLeft += e, t.scrollTop += n;
|
|
@@ -316,8 +316,8 @@ function Pn(t) {
|
|
|
316
316
|
var e = window.Polymer, n = window.jQuery || window.Zepto;
|
|
317
317
|
return e && e.dom ? e.dom(t).cloneNode(!0) : n ? n(t).clone(!0)[0] : t.cloneNode(!0);
|
|
318
318
|
}
|
|
319
|
-
var
|
|
320
|
-
function
|
|
319
|
+
var be = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
320
|
+
function Lo() {
|
|
321
321
|
var t = [], e;
|
|
322
322
|
return {
|
|
323
323
|
captureAnimationState: function() {
|
|
@@ -331,7 +331,7 @@ function Ao() {
|
|
|
331
331
|
});
|
|
332
332
|
var a = Ce({}, t[t.length - 1].rect);
|
|
333
333
|
if (r.thisAnimationDuration) {
|
|
334
|
-
var i =
|
|
334
|
+
var i = Je(r, !0);
|
|
335
335
|
i && (a.top -= i.f, a.left -= i.e);
|
|
336
336
|
}
|
|
337
337
|
r.fromRect = a;
|
|
@@ -343,7 +343,7 @@ function Ao() {
|
|
|
343
343
|
t.push(o);
|
|
344
344
|
},
|
|
345
345
|
removeAnimationState: function(o) {
|
|
346
|
-
t.splice(
|
|
346
|
+
t.splice(No(t, {
|
|
347
347
|
target: o
|
|
348
348
|
}), 1);
|
|
349
349
|
},
|
|
@@ -354,12 +354,12 @@ function Ao() {
|
|
|
354
354
|
return;
|
|
355
355
|
}
|
|
356
356
|
var a = !1, i = 0;
|
|
357
|
-
t.forEach(function(
|
|
358
|
-
var
|
|
359
|
-
g && (
|
|
360
|
-
(
|
|
361
|
-
|
|
362
|
-
},
|
|
357
|
+
t.forEach(function(l) {
|
|
358
|
+
var s = 0, u = l.target, f = u.fromRect, c = te(u), E = u.prevFromRect, b = u.prevToRect, y = l.rect, g = Je(u, !0);
|
|
359
|
+
g && (c.top -= g.f, c.left -= g.e), u.toRect = c, u.thisAnimationDuration && Bt(E, c) && !Bt(f, c) && // Make sure animatingRect is on line between toRect & fromRect
|
|
360
|
+
(y.top - c.top) / (y.left - c.left) === (f.top - c.top) / (f.left - c.left) && (s = Mo(y, E, b, r.options)), Bt(c, f) || (u.prevFromRect = f, u.prevToRect = c, s || (s = r.options.animation), r.animate(u, y, c, s)), s && (a = !0, i = Math.max(i, s), clearTimeout(u.animationResetTimer), u.animationResetTimer = setTimeout(function() {
|
|
361
|
+
u.animationTime = 0, u.prevFromRect = null, u.fromRect = null, u.prevToRect = null, u.thisAnimationDuration = null;
|
|
362
|
+
}, s), u.thisAnimationDuration = s);
|
|
363
363
|
}), clearTimeout(e), a ? e = setTimeout(function() {
|
|
364
364
|
typeof o == "function" && o();
|
|
365
365
|
}, i) : typeof o == "function" && o(), t = [];
|
|
@@ -367,30 +367,30 @@ function Ao() {
|
|
|
367
367
|
animate: function(o, r, a, i) {
|
|
368
368
|
if (i) {
|
|
369
369
|
_(o, "transition", ""), _(o, "transform", "");
|
|
370
|
-
var
|
|
371
|
-
o.animatingX = !!f, o.animatingY = !!
|
|
370
|
+
var l = Je(this.el), s = l && l.a, u = l && l.d, f = (r.left - a.left) / (s || 1), c = (r.top - a.top) / (u || 1);
|
|
371
|
+
o.animatingX = !!f, o.animatingY = !!c, _(o, "transform", "translate3d(" + f + "px," + c + "px,0)"), this.forRepaintDummy = Po(o), _(o, "transition", "transform " + i + "ms" + (this.options.easing ? " " + this.options.easing : "")), _(o, "transform", "translate3d(0,0,0)"), typeof o.animated == "number" && clearTimeout(o.animated), o.animated = setTimeout(function() {
|
|
372
372
|
_(o, "transition", ""), _(o, "transform", ""), o.animated = !1, o.animatingX = !1, o.animatingY = !1;
|
|
373
373
|
}, i);
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
376
|
};
|
|
377
377
|
}
|
|
378
|
-
function
|
|
378
|
+
function Po(t) {
|
|
379
379
|
return t.offsetWidth;
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function Mo(t, e, n, o) {
|
|
382
382
|
return Math.sqrt(Math.pow(e.top - t.top, 2) + Math.pow(e.left - t.left, 2)) / Math.sqrt(Math.pow(e.top - n.top, 2) + Math.pow(e.left - n.left, 2)) * o.animation;
|
|
383
383
|
}
|
|
384
|
-
var
|
|
384
|
+
var Ke = [], $t = {
|
|
385
385
|
initializeByDefault: !0
|
|
386
|
-
},
|
|
386
|
+
}, ht = {
|
|
387
387
|
mount: function(e) {
|
|
388
|
-
for (var n in
|
|
389
|
-
|
|
390
|
-
|
|
388
|
+
for (var n in $t)
|
|
389
|
+
$t.hasOwnProperty(n) && !(n in e) && (e[n] = $t[n]);
|
|
390
|
+
Ke.forEach(function(o) {
|
|
391
391
|
if (o.pluginName === e.pluginName)
|
|
392
392
|
throw "Sortable: Cannot mount plugin ".concat(e.pluginName, " more than once");
|
|
393
|
-
}),
|
|
393
|
+
}), Ke.push(e);
|
|
394
394
|
},
|
|
395
395
|
pluginEvent: function(e, n, o) {
|
|
396
396
|
var r = this;
|
|
@@ -398,7 +398,7 @@ var Qe = [], Wt = {
|
|
|
398
398
|
r.eventCanceled = !0;
|
|
399
399
|
};
|
|
400
400
|
var a = e + "Global";
|
|
401
|
-
|
|
401
|
+
Ke.forEach(function(i) {
|
|
402
402
|
n[i.pluginName] && (n[i.pluginName][a] && n[i.pluginName][a](Ce({
|
|
403
403
|
sortable: n
|
|
404
404
|
}, o)), n.options[i.pluginName] && n[i.pluginName][e] && n[i.pluginName][e](Ce({
|
|
@@ -407,11 +407,11 @@ var Qe = [], Wt = {
|
|
|
407
407
|
});
|
|
408
408
|
},
|
|
409
409
|
initializePlugins: function(e, n, o, r) {
|
|
410
|
-
|
|
411
|
-
var
|
|
412
|
-
if (!(!e.options[
|
|
413
|
-
var
|
|
414
|
-
|
|
410
|
+
Ke.forEach(function(l) {
|
|
411
|
+
var s = l.pluginName;
|
|
412
|
+
if (!(!e.options[s] && !l.initializeByDefault)) {
|
|
413
|
+
var u = new l(e, n, e.options);
|
|
414
|
+
u.sortable = e, u.options = e.options, e[s] = u, Le(o, u.defaults);
|
|
415
415
|
}
|
|
416
416
|
});
|
|
417
417
|
for (var a in e.options)
|
|
@@ -422,157 +422,157 @@ var Qe = [], Wt = {
|
|
|
422
422
|
},
|
|
423
423
|
getEventProperties: function(e, n) {
|
|
424
424
|
var o = {};
|
|
425
|
-
return
|
|
425
|
+
return Ke.forEach(function(r) {
|
|
426
426
|
typeof r.eventProperties == "function" && Le(o, r.eventProperties.call(n[r.pluginName], e));
|
|
427
427
|
}), o;
|
|
428
428
|
},
|
|
429
429
|
modifyOption: function(e, n, o) {
|
|
430
430
|
var r;
|
|
431
|
-
return
|
|
431
|
+
return Ke.forEach(function(a) {
|
|
432
432
|
e[a.pluginName] && a.optionListeners && typeof a.optionListeners[n] == "function" && (r = a.optionListeners[n].call(e[a.pluginName], o));
|
|
433
433
|
}), r;
|
|
434
434
|
}
|
|
435
435
|
};
|
|
436
|
-
function
|
|
437
|
-
var e = t.sortable, n = t.rootEl, o = t.name, r = t.targetEl, a = t.cloneEl, i = t.toEl,
|
|
438
|
-
if (e = e || n && n[
|
|
436
|
+
function Vo(t) {
|
|
437
|
+
var e = t.sortable, n = t.rootEl, o = t.name, r = t.targetEl, a = t.cloneEl, i = t.toEl, l = t.fromEl, s = t.oldIndex, u = t.newIndex, f = t.oldDraggableIndex, c = t.newDraggableIndex, E = t.originalEvent, b = t.putSortable, y = t.extraEventProperties;
|
|
438
|
+
if (e = e || n && n[be], !!e) {
|
|
439
439
|
var g, L = e.options, H = "on" + o.charAt(0).toUpperCase() + o.substr(1);
|
|
440
|
-
window.CustomEvent && !Pe && !
|
|
440
|
+
window.CustomEvent && !Pe && !mt ? g = new CustomEvent(o, {
|
|
441
441
|
bubbles: !0,
|
|
442
442
|
cancelable: !0
|
|
443
|
-
}) : (g = document.createEvent("Event"), g.initEvent(o, !0, !0)), g.to = i || n, g.from =
|
|
444
|
-
var N = Ce(Ce({},
|
|
445
|
-
for (var
|
|
446
|
-
g[
|
|
443
|
+
}) : (g = document.createEvent("Event"), g.initEvent(o, !0, !0)), g.to = i || n, g.from = l || n, g.item = r || n, g.clone = a, g.oldIndex = s, g.newIndex = u, g.oldDraggableIndex = f, g.newDraggableIndex = c, g.originalEvent = E, g.pullMode = b ? b.lastPutMode : void 0;
|
|
444
|
+
var N = Ce(Ce({}, y), ht.getEventProperties(o, e));
|
|
445
|
+
for (var B in N)
|
|
446
|
+
g[B] = N[B];
|
|
447
447
|
n && n.dispatchEvent(g), L[H] && L[H].call(e, g);
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
|
-
var
|
|
451
|
-
var o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = o.evt, a =
|
|
452
|
-
|
|
450
|
+
var Uo = ["evt"], ce = function(e, n) {
|
|
451
|
+
var o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = o.evt, a = Co(o, Uo);
|
|
452
|
+
ht.pluginEvent.bind(T)(e, n, Ce({
|
|
453
453
|
dragEl: m,
|
|
454
454
|
parentEl: W,
|
|
455
455
|
ghostEl: w,
|
|
456
|
-
rootEl:
|
|
457
|
-
nextEl:
|
|
458
|
-
lastDownEl:
|
|
456
|
+
rootEl: V,
|
|
457
|
+
nextEl: ze,
|
|
458
|
+
lastDownEl: Tt,
|
|
459
459
|
cloneEl: Y,
|
|
460
|
-
cloneHidden:
|
|
461
|
-
dragStarted:
|
|
460
|
+
cloneHidden: Be,
|
|
461
|
+
dragStarted: at,
|
|
462
462
|
putSortable: ie,
|
|
463
463
|
activeSortable: T.active,
|
|
464
464
|
originalEvent: r,
|
|
465
|
-
oldIndex:
|
|
466
|
-
oldDraggableIndex:
|
|
467
|
-
newIndex:
|
|
468
|
-
newDraggableIndex:
|
|
469
|
-
hideGhostForTarget:
|
|
470
|
-
unhideGhostForTarget:
|
|
465
|
+
oldIndex: Ze,
|
|
466
|
+
oldDraggableIndex: ct,
|
|
467
|
+
newIndex: ve,
|
|
468
|
+
newDraggableIndex: Ue,
|
|
469
|
+
hideGhostForTarget: Bn,
|
|
470
|
+
unhideGhostForTarget: $n,
|
|
471
471
|
cloneNowHidden: function() {
|
|
472
|
-
|
|
472
|
+
Be = !0;
|
|
473
473
|
},
|
|
474
474
|
cloneNowShown: function() {
|
|
475
|
-
|
|
475
|
+
Be = !1;
|
|
476
476
|
},
|
|
477
|
-
dispatchSortableEvent: function(
|
|
478
|
-
|
|
477
|
+
dispatchSortableEvent: function(l) {
|
|
478
|
+
se({
|
|
479
479
|
sortable: n,
|
|
480
|
-
name:
|
|
480
|
+
name: l,
|
|
481
481
|
originalEvent: r
|
|
482
482
|
});
|
|
483
483
|
}
|
|
484
484
|
}, a));
|
|
485
485
|
};
|
|
486
|
-
function
|
|
487
|
-
|
|
486
|
+
function se(t) {
|
|
487
|
+
Vo(Ce({
|
|
488
488
|
putSortable: ie,
|
|
489
489
|
cloneEl: Y,
|
|
490
490
|
targetEl: m,
|
|
491
|
-
rootEl:
|
|
492
|
-
oldIndex:
|
|
493
|
-
oldDraggableIndex:
|
|
494
|
-
newIndex:
|
|
495
|
-
newDraggableIndex:
|
|
491
|
+
rootEl: V,
|
|
492
|
+
oldIndex: Ze,
|
|
493
|
+
oldDraggableIndex: ct,
|
|
494
|
+
newIndex: ve,
|
|
495
|
+
newDraggableIndex: Ue
|
|
496
496
|
}, t));
|
|
497
497
|
}
|
|
498
|
-
var m, W, w,
|
|
499
|
-
if (
|
|
498
|
+
var m, W, w, V, ze, Tt, Y, Be, Ze, ve, ct, Ue, vt, ie, Qe = !1, Rt = !1, Ft = [], He, De, Wt, Yt, bn, yn, at, qe, dt, ft = !1, bt = !1, wt, le, Ht = [], Jt = !1, Nt = [], Pt = typeof document < "u", yt = Fn, En = mt || Pe ? "cssFloat" : "float", Bo = Pt && !Ro && !Fn && "draggable" in document.createElement("div"), Mn = function() {
|
|
499
|
+
if (Pt) {
|
|
500
500
|
if (Pe)
|
|
501
501
|
return !1;
|
|
502
502
|
var t = document.createElement("x");
|
|
503
503
|
return t.style.cssText = "pointer-events:auto", t.style.pointerEvents === "auto";
|
|
504
504
|
}
|
|
505
505
|
}(), Vn = function(e, n) {
|
|
506
|
-
var o = _(e), r = parseInt(o.width) - parseInt(o.paddingLeft) - parseInt(o.paddingRight) - parseInt(o.borderLeftWidth) - parseInt(o.borderRightWidth), a =
|
|
506
|
+
var o = _(e), r = parseInt(o.width) - parseInt(o.paddingLeft) - parseInt(o.paddingRight) - parseInt(o.borderLeftWidth) - parseInt(o.borderRightWidth), a = et(e, 0, n), i = et(e, 1, n), l = a && _(a), s = i && _(i), u = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + te(a).width, f = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + te(i).width;
|
|
507
507
|
if (o.display === "flex")
|
|
508
508
|
return o.flexDirection === "column" || o.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
509
509
|
if (o.display === "grid")
|
|
510
510
|
return o.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
511
|
-
if (a &&
|
|
512
|
-
var
|
|
513
|
-
return i && (
|
|
511
|
+
if (a && l.float && l.float !== "none") {
|
|
512
|
+
var c = l.float === "left" ? "left" : "right";
|
|
513
|
+
return i && (s.clear === "both" || s.clear === c) ? "vertical" : "horizontal";
|
|
514
514
|
}
|
|
515
|
-
return a && (
|
|
516
|
-
},
|
|
517
|
-
var r = o ? e.left : e.top, a = o ? e.right : e.bottom, i = o ? e.width : e.height,
|
|
518
|
-
return r ===
|
|
519
|
-
},
|
|
515
|
+
return a && (l.display === "block" || l.display === "flex" || l.display === "table" || l.display === "grid" || u >= r && o[En] === "none" || i && o[En] === "none" && u + f > r) ? "vertical" : "horizontal";
|
|
516
|
+
}, $o = function(e, n, o) {
|
|
517
|
+
var r = o ? e.left : e.top, a = o ? e.right : e.bottom, i = o ? e.width : e.height, l = o ? n.left : n.top, s = o ? n.right : n.bottom, u = o ? n.width : n.height;
|
|
518
|
+
return r === l || a === s || r + i / 2 === l + u / 2;
|
|
519
|
+
}, Wo = function(e, n) {
|
|
520
520
|
var o;
|
|
521
|
-
return
|
|
522
|
-
var a = r[
|
|
523
|
-
if (!(!a ||
|
|
524
|
-
var i = te(r),
|
|
525
|
-
if (
|
|
521
|
+
return Ft.some(function(r) {
|
|
522
|
+
var a = r[be].options.emptyInsertThreshold;
|
|
523
|
+
if (!(!a || ln(r))) {
|
|
524
|
+
var i = te(r), l = e >= i.left - a && e <= i.right + a, s = n >= i.top - a && n <= i.bottom + a;
|
|
525
|
+
if (l && s)
|
|
526
526
|
return o = r;
|
|
527
527
|
}
|
|
528
528
|
}), o;
|
|
529
529
|
}, Un = function(e) {
|
|
530
530
|
function n(a, i) {
|
|
531
|
-
return function(
|
|
532
|
-
var
|
|
533
|
-
if (a == null && (i ||
|
|
531
|
+
return function(l, s, u, f) {
|
|
532
|
+
var c = l.options.group.name && s.options.group.name && l.options.group.name === s.options.group.name;
|
|
533
|
+
if (a == null && (i || c))
|
|
534
534
|
return !0;
|
|
535
535
|
if (a == null || a === !1)
|
|
536
536
|
return !1;
|
|
537
537
|
if (i && a === "clone")
|
|
538
538
|
return a;
|
|
539
539
|
if (typeof a == "function")
|
|
540
|
-
return n(a(
|
|
541
|
-
var E = (i ?
|
|
540
|
+
return n(a(l, s, u, f), i)(l, s, u, f);
|
|
541
|
+
var E = (i ? l : s).options.group.name;
|
|
542
542
|
return a === !0 || typeof a == "string" && a === E || a.join && a.indexOf(E) > -1;
|
|
543
543
|
};
|
|
544
544
|
}
|
|
545
545
|
var o = {}, r = e.group;
|
|
546
|
-
(!r ||
|
|
546
|
+
(!r || _t(r) != "object") && (r = {
|
|
547
547
|
name: r
|
|
548
548
|
}), o.name = r.name, o.checkPull = n(r.pull, !0), o.checkPut = n(r.put), o.revertClone = r.revertClone, e.group = o;
|
|
549
|
-
}, $n = function() {
|
|
550
|
-
!Mn && w && _(w, "display", "none");
|
|
551
549
|
}, Bn = function() {
|
|
550
|
+
!Mn && w && _(w, "display", "none");
|
|
551
|
+
}, $n = function() {
|
|
552
552
|
!Mn && w && _(w, "display", "");
|
|
553
553
|
};
|
|
554
|
-
|
|
555
|
-
if (
|
|
556
|
-
return t.preventDefault(), t.stopPropagation && t.stopPropagation(), t.stopImmediatePropagation && t.stopImmediatePropagation(),
|
|
554
|
+
Pt && document.addEventListener("click", function(t) {
|
|
555
|
+
if (Rt)
|
|
556
|
+
return t.preventDefault(), t.stopPropagation && t.stopPropagation(), t.stopImmediatePropagation && t.stopImmediatePropagation(), Rt = !1, !1;
|
|
557
557
|
}, !0);
|
|
558
|
-
var
|
|
558
|
+
var Xe = function(e) {
|
|
559
559
|
if (m) {
|
|
560
560
|
e = e.touches ? e.touches[0] : e;
|
|
561
|
-
var n =
|
|
561
|
+
var n = Wo(e.clientX, e.clientY);
|
|
562
562
|
if (n) {
|
|
563
563
|
var o = {};
|
|
564
564
|
for (var r in e)
|
|
565
565
|
e.hasOwnProperty(r) && (o[r] = e[r]);
|
|
566
|
-
o.target = o.rootEl = n, o.preventDefault = void 0, o.stopPropagation = void 0, n[
|
|
566
|
+
o.target = o.rootEl = n, o.preventDefault = void 0, o.stopPropagation = void 0, n[be]._onDragOver(o);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
},
|
|
570
|
-
m && m.parentNode[
|
|
569
|
+
}, Yo = function(e) {
|
|
570
|
+
m && m.parentNode[be]._isOutsideThisEl(e.target);
|
|
571
571
|
};
|
|
572
572
|
function T(t, e) {
|
|
573
573
|
if (!(t && t.nodeType && t.nodeType === 1))
|
|
574
574
|
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));
|
|
575
|
-
this.el = t, this.options = e = Le({}, e), t[
|
|
575
|
+
this.el = t, this.options = e = Le({}, e), t[be] = this;
|
|
576
576
|
var n = {
|
|
577
577
|
group: null,
|
|
578
578
|
sort: !0,
|
|
@@ -598,8 +598,8 @@ function T(t, e) {
|
|
|
598
598
|
preventOnFilter: !0,
|
|
599
599
|
animation: 0,
|
|
600
600
|
easing: null,
|
|
601
|
-
setData: function(i,
|
|
602
|
-
i.setData("Text",
|
|
601
|
+
setData: function(i, l) {
|
|
602
|
+
i.setData("Text", l.textContent);
|
|
603
603
|
},
|
|
604
604
|
dropBubble: !1,
|
|
605
605
|
dragoverBubble: !1,
|
|
@@ -615,96 +615,96 @@ function T(t, e) {
|
|
|
615
615
|
x: 0,
|
|
616
616
|
y: 0
|
|
617
617
|
},
|
|
618
|
-
supportPointer: T.supportPointer !== !1 && "PointerEvent" in window && !
|
|
618
|
+
supportPointer: T.supportPointer !== !1 && "PointerEvent" in window && !st,
|
|
619
619
|
emptyInsertThreshold: 5
|
|
620
620
|
};
|
|
621
|
-
|
|
621
|
+
ht.initializePlugins(this, t, n);
|
|
622
622
|
for (var o in n)
|
|
623
623
|
!(o in e) && (e[o] = n[o]);
|
|
624
624
|
Un(e);
|
|
625
625
|
for (var r in this)
|
|
626
626
|
r.charAt(0) === "_" && typeof this[r] == "function" && (this[r] = this[r].bind(this));
|
|
627
|
-
this.nativeDraggable = e.forceFallback ? !1 :
|
|
627
|
+
this.nativeDraggable = e.forceFallback ? !1 : Bo, this.nativeDraggable && (this.options.touchStartThreshold = 1), e.supportPointer ? R(t, "pointerdown", this._onTapStart) : (R(t, "mousedown", this._onTapStart), R(t, "touchstart", this._onTapStart)), this.nativeDraggable && (R(t, "dragover", this), R(t, "dragenter", this)), Ft.push(this.el), e.store && e.store.get && this.sort(e.store.get(this) || []), Le(this, Lo());
|
|
628
628
|
}
|
|
629
629
|
T.prototype = /** @lends Sortable.prototype */
|
|
630
630
|
{
|
|
631
631
|
constructor: T,
|
|
632
632
|
_isOutsideThisEl: function(e) {
|
|
633
|
-
!this.el.contains(e) && e !== this.el && (
|
|
633
|
+
!this.el.contains(e) && e !== this.el && (qe = null);
|
|
634
634
|
},
|
|
635
635
|
_getDirection: function(e, n) {
|
|
636
636
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, n, m) : this.options.direction;
|
|
637
637
|
},
|
|
638
638
|
_onTapStart: function(e) {
|
|
639
639
|
if (e.cancelable) {
|
|
640
|
-
var n = this, o = this.el, r = this.options, a = r.preventOnFilter, i = e.type,
|
|
641
|
-
if (
|
|
642
|
-
if (
|
|
643
|
-
if (f.call(this, e,
|
|
644
|
-
|
|
640
|
+
var n = this, o = this.el, r = this.options, a = r.preventOnFilter, i = e.type, l = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (l || e).target, u = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, f = r.filter;
|
|
641
|
+
if (Qo(o), !m && !(/mousedown|pointerdown/.test(i) && e.button !== 0 || r.disabled) && !u.isContentEditable && !(!this.nativeDraggable && st && s && s.tagName.toUpperCase() === "SELECT") && (s = Ie(s, r.draggable, o, !1), !(s && s.animated) && Tt !== s)) {
|
|
642
|
+
if (Ze = ye(s), ct = ye(s, r.draggable), typeof f == "function") {
|
|
643
|
+
if (f.call(this, e, s, this)) {
|
|
644
|
+
se({
|
|
645
645
|
sortable: n,
|
|
646
|
-
rootEl:
|
|
646
|
+
rootEl: u,
|
|
647
647
|
name: "filter",
|
|
648
|
-
targetEl:
|
|
648
|
+
targetEl: s,
|
|
649
649
|
toEl: o,
|
|
650
650
|
fromEl: o
|
|
651
|
-
}),
|
|
651
|
+
}), ce("filter", n, {
|
|
652
652
|
evt: e
|
|
653
653
|
}), a && e.cancelable && e.preventDefault();
|
|
654
654
|
return;
|
|
655
655
|
}
|
|
656
|
-
} else if (f && (f = f.split(",").some(function(
|
|
657
|
-
if (
|
|
658
|
-
return
|
|
656
|
+
} else if (f && (f = f.split(",").some(function(c) {
|
|
657
|
+
if (c = Ie(u, c.trim(), o, !1), c)
|
|
658
|
+
return se({
|
|
659
659
|
sortable: n,
|
|
660
|
-
rootEl:
|
|
660
|
+
rootEl: c,
|
|
661
661
|
name: "filter",
|
|
662
|
-
targetEl:
|
|
662
|
+
targetEl: s,
|
|
663
663
|
fromEl: o,
|
|
664
664
|
toEl: o
|
|
665
|
-
}),
|
|
665
|
+
}), ce("filter", n, {
|
|
666
666
|
evt: e
|
|
667
667
|
}), !0;
|
|
668
668
|
}), f)) {
|
|
669
669
|
a && e.cancelable && e.preventDefault();
|
|
670
670
|
return;
|
|
671
671
|
}
|
|
672
|
-
r.handle && !Ie(
|
|
672
|
+
r.handle && !Ie(u, r.handle, o, !1) || this._prepareDragStart(e, l, s);
|
|
673
673
|
}
|
|
674
674
|
}
|
|
675
675
|
},
|
|
676
676
|
_prepareDragStart: function(e, n, o) {
|
|
677
|
-
var r = this, a = r.el, i = r.options,
|
|
677
|
+
var r = this, a = r.el, i = r.options, l = a.ownerDocument, s;
|
|
678
678
|
if (o && !m && o.parentNode === a) {
|
|
679
|
-
var
|
|
680
|
-
if (
|
|
679
|
+
var u = te(o);
|
|
680
|
+
if (V = a, m = o, W = m.parentNode, ze = m.nextSibling, Tt = o, vt = i.group, T.dragged = m, He = {
|
|
681
681
|
target: m,
|
|
682
682
|
clientX: (n || e).clientX,
|
|
683
683
|
clientY: (n || e).clientY
|
|
684
|
-
},
|
|
685
|
-
if (
|
|
684
|
+
}, bn = He.clientX - u.left, yn = He.clientY - u.top, this._lastX = (n || e).clientX, this._lastY = (n || e).clientY, m.style["will-change"] = "all", s = function() {
|
|
685
|
+
if (ce("delayEnded", r, {
|
|
686
686
|
evt: e
|
|
687
687
|
}), T.eventCanceled) {
|
|
688
688
|
r._onDrop();
|
|
689
689
|
return;
|
|
690
690
|
}
|
|
691
|
-
r._disableDelayedDragEvents(), !
|
|
691
|
+
r._disableDelayedDragEvents(), !mn && r.nativeDraggable && (m.draggable = !0), r._triggerDragStart(e, n), se({
|
|
692
692
|
sortable: r,
|
|
693
693
|
name: "choose",
|
|
694
694
|
originalEvent: e
|
|
695
|
-
}),
|
|
695
|
+
}), ge(m, i.chosenClass, !0);
|
|
696
696
|
}, i.ignore.split(",").forEach(function(f) {
|
|
697
|
-
An(m, f.trim(),
|
|
698
|
-
}),
|
|
697
|
+
An(m, f.trim(), Xt);
|
|
698
|
+
}), R(l, "dragover", Xe), R(l, "mousemove", Xe), R(l, "touchmove", Xe), R(l, "mouseup", r._onDrop), R(l, "touchend", r._onDrop), R(l, "touchcancel", r._onDrop), mn && this.nativeDraggable && (this.options.touchStartThreshold = 4, m.draggable = !0), ce("delayStart", this, {
|
|
699
699
|
evt: e
|
|
700
|
-
}), i.delay && (!i.delayOnTouchOnly || n) && (!this.nativeDraggable || !(
|
|
700
|
+
}), i.delay && (!i.delayOnTouchOnly || n) && (!this.nativeDraggable || !(mt || Pe))) {
|
|
701
701
|
if (T.eventCanceled) {
|
|
702
702
|
this._onDrop();
|
|
703
703
|
return;
|
|
704
704
|
}
|
|
705
|
-
|
|
705
|
+
R(l, "mouseup", r._disableDelayedDrag), R(l, "touchend", r._disableDelayedDrag), R(l, "touchcancel", r._disableDelayedDrag), R(l, "mousemove", r._delayedDragTouchMoveHandler), R(l, "touchmove", r._delayedDragTouchMoveHandler), i.supportPointer && R(l, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, i.delay);
|
|
706
706
|
} else
|
|
707
|
-
|
|
707
|
+
s();
|
|
708
708
|
}
|
|
709
709
|
},
|
|
710
710
|
_delayedDragTouchMoveHandler: function(e) {
|
|
@@ -712,28 +712,28 @@ T.prototype = /** @lends Sortable.prototype */
|
|
|
712
712
|
Math.max(Math.abs(n.clientX - this._lastX), Math.abs(n.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
713
713
|
},
|
|
714
714
|
_disableDelayedDrag: function() {
|
|
715
|
-
m &&
|
|
715
|
+
m && Xt(m), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
716
716
|
},
|
|
717
717
|
_disableDelayedDragEvents: function() {
|
|
718
718
|
var e = this.el.ownerDocument;
|
|
719
|
-
|
|
719
|
+
S(e, "mouseup", this._disableDelayedDrag), S(e, "touchend", this._disableDelayedDrag), S(e, "touchcancel", this._disableDelayedDrag), S(e, "mousemove", this._delayedDragTouchMoveHandler), S(e, "touchmove", this._delayedDragTouchMoveHandler), S(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
720
720
|
},
|
|
721
721
|
_triggerDragStart: function(e, n) {
|
|
722
|
-
n = n || e.pointerType == "touch" && e, !this.nativeDraggable || n ? this.options.supportPointer ?
|
|
722
|
+
n = n || e.pointerType == "touch" && e, !this.nativeDraggable || n ? this.options.supportPointer ? R(document, "pointermove", this._onTouchMove) : n ? R(document, "touchmove", this._onTouchMove) : R(document, "mousemove", this._onTouchMove) : (R(m, "dragend", this), R(V, "dragstart", this._onDragStart));
|
|
723
723
|
try {
|
|
724
|
-
document.selection ?
|
|
724
|
+
document.selection ? xt(function() {
|
|
725
725
|
document.selection.empty();
|
|
726
726
|
}) : window.getSelection().removeAllRanges();
|
|
727
727
|
} catch {
|
|
728
728
|
}
|
|
729
729
|
},
|
|
730
730
|
_dragStarted: function(e, n) {
|
|
731
|
-
if (
|
|
732
|
-
|
|
731
|
+
if (Qe = !1, V && m) {
|
|
732
|
+
ce("dragStarted", this, {
|
|
733
733
|
evt: n
|
|
734
|
-
}), this.nativeDraggable &&
|
|
734
|
+
}), this.nativeDraggable && R(document, "dragover", Yo);
|
|
735
735
|
var o = this.options;
|
|
736
|
-
!e &&
|
|
736
|
+
!e && ge(m, o.dragClass, !1), ge(m, o.ghostClass, !0), T.active = this, e && this._appendGhost(), se({
|
|
737
737
|
sortable: this,
|
|
738
738
|
name: "start",
|
|
739
739
|
originalEvent: n
|
|
@@ -743,14 +743,14 @@ T.prototype = /** @lends Sortable.prototype */
|
|
|
743
743
|
},
|
|
744
744
|
_emulateDragOver: function() {
|
|
745
745
|
if (De) {
|
|
746
|
-
this._lastX = De.clientX, this._lastY = De.clientY,
|
|
746
|
+
this._lastX = De.clientX, this._lastY = De.clientY, Bn();
|
|
747
747
|
for (var e = document.elementFromPoint(De.clientX, De.clientY), n = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(De.clientX, De.clientY), e !== n); )
|
|
748
748
|
n = e;
|
|
749
|
-
if (m.parentNode[
|
|
749
|
+
if (m.parentNode[be]._isOutsideThisEl(e), n)
|
|
750
750
|
do {
|
|
751
|
-
if (n[
|
|
751
|
+
if (n[be]) {
|
|
752
752
|
var o = void 0;
|
|
753
|
-
if (o = n[
|
|
753
|
+
if (o = n[be]._onDragOver({
|
|
754
754
|
clientX: De.clientX,
|
|
755
755
|
clientY: De.clientY,
|
|
756
756
|
target: e,
|
|
@@ -760,138 +760,138 @@ T.prototype = /** @lends Sortable.prototype */
|
|
|
760
760
|
}
|
|
761
761
|
e = n;
|
|
762
762
|
} while (n = n.parentNode);
|
|
763
|
-
|
|
763
|
+
$n();
|
|
764
764
|
}
|
|
765
765
|
},
|
|
766
766
|
_onTouchMove: function(e) {
|
|
767
|
-
if (
|
|
768
|
-
var n = this.options, o = n.fallbackTolerance, r = n.fallbackOffset, a = e.touches ? e.touches[0] : e, i = w &&
|
|
769
|
-
if (!T.active && !
|
|
767
|
+
if (He) {
|
|
768
|
+
var n = this.options, o = n.fallbackTolerance, r = n.fallbackOffset, a = e.touches ? e.touches[0] : e, i = w && Je(w, !0), l = w && i && i.a, s = w && i && i.d, u = yt && le && vn(le), f = (a.clientX - He.clientX + r.x) / (l || 1) + (u ? u[0] - Ht[0] : 0) / (l || 1), c = (a.clientY - He.clientY + r.y) / (s || 1) + (u ? u[1] - Ht[1] : 0) / (s || 1);
|
|
769
|
+
if (!T.active && !Qe) {
|
|
770
770
|
if (o && Math.max(Math.abs(a.clientX - this._lastX), Math.abs(a.clientY - this._lastY)) < o)
|
|
771
771
|
return;
|
|
772
772
|
this._onDragStart(e, !0);
|
|
773
773
|
}
|
|
774
774
|
if (w) {
|
|
775
|
-
i ? (i.e += f - (
|
|
775
|
+
i ? (i.e += f - (Wt || 0), i.f += c - (Yt || 0)) : i = {
|
|
776
776
|
a: 1,
|
|
777
777
|
b: 0,
|
|
778
778
|
c: 0,
|
|
779
779
|
d: 1,
|
|
780
780
|
e: f,
|
|
781
|
-
f:
|
|
781
|
+
f: c
|
|
782
782
|
};
|
|
783
783
|
var E = "matrix(".concat(i.a, ",").concat(i.b, ",").concat(i.c, ",").concat(i.d, ",").concat(i.e, ",").concat(i.f, ")");
|
|
784
|
-
_(w, "webkitTransform", E), _(w, "mozTransform", E), _(w, "msTransform", E), _(w, "transform", E),
|
|
784
|
+
_(w, "webkitTransform", E), _(w, "mozTransform", E), _(w, "msTransform", E), _(w, "transform", E), Wt = f, Yt = c, De = a;
|
|
785
785
|
}
|
|
786
786
|
e.cancelable && e.preventDefault();
|
|
787
787
|
}
|
|
788
788
|
},
|
|
789
789
|
_appendGhost: function() {
|
|
790
790
|
if (!w) {
|
|
791
|
-
var e = this.options.fallbackOnBody ? document.body :
|
|
792
|
-
if (
|
|
793
|
-
for (
|
|
794
|
-
|
|
795
|
-
|
|
791
|
+
var e = this.options.fallbackOnBody ? document.body : V, n = te(m, !0, yt, !0, e), o = this.options;
|
|
792
|
+
if (yt) {
|
|
793
|
+
for (le = e; _(le, "position") === "static" && _(le, "transform") === "none" && le !== document; )
|
|
794
|
+
le = le.parentNode;
|
|
795
|
+
le !== document.body && le !== document.documentElement ? (le === document && (le = Oe()), n.top += le.scrollTop, n.left += le.scrollLeft) : le = Oe(), Ht = vn(le);
|
|
796
796
|
}
|
|
797
|
-
w = m.cloneNode(!0),
|
|
797
|
+
w = m.cloneNode(!0), ge(w, o.ghostClass, !1), ge(w, o.fallbackClass, !0), ge(w, o.dragClass, !0), _(w, "transition", ""), _(w, "transform", ""), _(w, "box-sizing", "border-box"), _(w, "margin", 0), _(w, "top", n.top), _(w, "left", n.left), _(w, "width", n.width), _(w, "height", n.height), _(w, "opacity", "0.8"), _(w, "position", yt ? "absolute" : "fixed"), _(w, "zIndex", "100000"), _(w, "pointerEvents", "none"), T.ghost = w, e.appendChild(w), _(w, "transform-origin", bn / parseInt(w.style.width) * 100 + "% " + yn / parseInt(w.style.height) * 100 + "%");
|
|
798
798
|
}
|
|
799
799
|
},
|
|
800
800
|
_onDragStart: function(e, n) {
|
|
801
801
|
var o = this, r = e.dataTransfer, a = o.options;
|
|
802
|
-
if (
|
|
802
|
+
if (ce("dragStart", this, {
|
|
803
803
|
evt: e
|
|
804
804
|
}), T.eventCanceled) {
|
|
805
805
|
this._onDrop();
|
|
806
806
|
return;
|
|
807
807
|
}
|
|
808
|
-
|
|
809
|
-
|
|
808
|
+
ce("setupClone", this), T.eventCanceled || (Y = Pn(m), Y.draggable = !1, Y.style["will-change"] = "", this._hideClone(), ge(Y, this.options.chosenClass, !1), T.clone = Y), o.cloneId = xt(function() {
|
|
809
|
+
ce("clone", o), !T.eventCanceled && (o.options.removeCloneOnHide || V.insertBefore(Y, m), o._hideClone(), se({
|
|
810
810
|
sortable: o,
|
|
811
811
|
name: "clone"
|
|
812
812
|
}));
|
|
813
|
-
}), !n &&
|
|
813
|
+
}), !n && ge(m, a.dragClass, !0), n ? (Rt = !0, o._loopId = setInterval(o._emulateDragOver, 50)) : (S(document, "mouseup", o._onDrop), S(document, "touchend", o._onDrop), S(document, "touchcancel", o._onDrop), r && (r.effectAllowed = "move", a.setData && a.setData.call(o, r, m)), R(document, "drop", o), _(m, "transform", "translateZ(0)")), Qe = !0, o._dragStartId = xt(o._dragStarted.bind(o, n, e)), R(document, "selectstart", o), at = !0, st && _(document.body, "user-select", "none");
|
|
814
814
|
},
|
|
815
815
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
816
816
|
_onDragOver: function(e) {
|
|
817
|
-
var n = this.el, o = e.target, r, a, i,
|
|
818
|
-
if (
|
|
819
|
-
function L(
|
|
820
|
-
|
|
817
|
+
var n = this.el, o = e.target, r, a, i, l = this.options, s = l.group, u = T.active, f = vt === s, c = l.sort, E = ie || u, b, y = this, g = !1;
|
|
818
|
+
if (Jt) return;
|
|
819
|
+
function L(I, ne) {
|
|
820
|
+
ce(I, y, Ce({
|
|
821
821
|
evt: e,
|
|
822
822
|
isOwner: f,
|
|
823
|
-
axis:
|
|
823
|
+
axis: b ? "vertical" : "horizontal",
|
|
824
824
|
revert: i,
|
|
825
825
|
dragRect: r,
|
|
826
826
|
targetRect: a,
|
|
827
|
-
canSort:
|
|
827
|
+
canSort: c,
|
|
828
828
|
fromSortable: E,
|
|
829
829
|
target: o,
|
|
830
830
|
completed: N,
|
|
831
|
-
onMove: function(
|
|
832
|
-
return
|
|
831
|
+
onMove: function(me, Ye) {
|
|
832
|
+
return Et(V, n, m, r, me, te(me), e, Ye);
|
|
833
833
|
},
|
|
834
|
-
changed:
|
|
835
|
-
},
|
|
834
|
+
changed: B
|
|
835
|
+
}, ne));
|
|
836
836
|
}
|
|
837
837
|
function H() {
|
|
838
|
-
L("dragOverAnimationCapture"),
|
|
838
|
+
L("dragOverAnimationCapture"), y.captureAnimationState(), y !== E && E.captureAnimationState();
|
|
839
839
|
}
|
|
840
|
-
function N(
|
|
840
|
+
function N(I) {
|
|
841
841
|
return L("dragOverCompleted", {
|
|
842
|
-
insertion:
|
|
843
|
-
}),
|
|
844
|
-
L("dragOverAnimationComplete"),
|
|
845
|
-
}),
|
|
842
|
+
insertion: I
|
|
843
|
+
}), I && (f ? u._hideClone() : u._showClone(y), y !== E && (ge(m, ie ? ie.options.ghostClass : u.options.ghostClass, !1), ge(m, l.ghostClass, !0)), ie !== y && y !== T.active ? ie = y : y === T.active && ie && (ie = null), E === y && (y._ignoreWhileAnimating = o), y.animateAll(function() {
|
|
844
|
+
L("dragOverAnimationComplete"), y._ignoreWhileAnimating = null;
|
|
845
|
+
}), y !== E && (E.animateAll(), E._ignoreWhileAnimating = null)), (o === m && !m.animated || o === n && !o.animated) && (qe = null), !l.dragoverBubble && !e.rootEl && o !== document && (m.parentNode[be]._isOutsideThisEl(e.target), !I && Xe(e)), !l.dragoverBubble && e.stopPropagation && e.stopPropagation(), g = !0;
|
|
846
846
|
}
|
|
847
|
-
function
|
|
848
|
-
|
|
849
|
-
sortable:
|
|
847
|
+
function B() {
|
|
848
|
+
ve = ye(m), Ue = ye(m, l.draggable), se({
|
|
849
|
+
sortable: y,
|
|
850
850
|
name: "change",
|
|
851
851
|
toEl: n,
|
|
852
|
-
newIndex:
|
|
853
|
-
newDraggableIndex:
|
|
852
|
+
newIndex: ve,
|
|
853
|
+
newDraggableIndex: Ue,
|
|
854
854
|
originalEvent: e
|
|
855
855
|
});
|
|
856
856
|
}
|
|
857
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), o = Ie(o,
|
|
858
|
-
if (m.contains(e.target) || o.animated && o.animatingX && o.animatingY ||
|
|
857
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), o = Ie(o, l.draggable, n, !0), L("dragOver"), T.eventCanceled) return g;
|
|
858
|
+
if (m.contains(e.target) || o.animated && o.animatingX && o.animatingY || y._ignoreWhileAnimating === o)
|
|
859
859
|
return N(!1);
|
|
860
|
-
if (
|
|
861
|
-
if (
|
|
860
|
+
if (Rt = !1, u && !l.disabled && (f ? c || (i = W !== V) : ie === this || (this.lastPutMode = vt.checkPull(this, u, m, e)) && s.checkPut(this, u, m, e))) {
|
|
861
|
+
if (b = this._getDirection(e, o) === "vertical", r = te(m), L("dragOverValid"), T.eventCanceled) return g;
|
|
862
862
|
if (i)
|
|
863
|
-
return W =
|
|
864
|
-
var
|
|
865
|
-
if (
|
|
866
|
-
if (
|
|
863
|
+
return W = V, H(), this._hideClone(), L("revert"), T.eventCanceled || (ze ? V.insertBefore(m, ze) : V.appendChild(m)), N(!0);
|
|
864
|
+
var $ = ln(n, l.draggable);
|
|
865
|
+
if (!$ || zo(e, b, this) && !$.animated) {
|
|
866
|
+
if ($ === m)
|
|
867
867
|
return N(!1);
|
|
868
|
-
if (
|
|
869
|
-
return H(), n.appendChild(m), W = n,
|
|
870
|
-
} else if (
|
|
871
|
-
var P =
|
|
868
|
+
if ($ && n === e.target && (o = $), o && (a = te(o)), Et(V, n, m, r, o, a, e, !!o) !== !1)
|
|
869
|
+
return H(), n.appendChild(m), W = n, B(), N(!0);
|
|
870
|
+
} else if ($ && Go(e, b, this)) {
|
|
871
|
+
var P = et(n, 0, l, !0);
|
|
872
872
|
if (P === m)
|
|
873
873
|
return N(!1);
|
|
874
|
-
if (o = P, a = te(o),
|
|
875
|
-
return H(), n.insertBefore(m, P), W = n,
|
|
874
|
+
if (o = P, a = te(o), Et(V, n, m, r, o, a, e, !1) !== !1)
|
|
875
|
+
return H(), n.insertBefore(m, P), W = n, B(), N(!0);
|
|
876
876
|
} else if (o.parentNode === n) {
|
|
877
877
|
a = te(o);
|
|
878
|
-
var X = 0,
|
|
879
|
-
|
|
880
|
-
var
|
|
878
|
+
var X = 0, fe, Se = m.parentNode !== n, re = !$o(m.animated && m.toRect || r, o.animated && o.toRect || a, b), _e = b ? "top" : "left", pe = gn(o, "top", "top") || gn(m, "top", "top"), Re = pe ? pe.scrollTop : void 0;
|
|
879
|
+
qe !== o && (fe = a[_e], ft = !1, bt = !re && l.invertSwap || Se), X = jo(e, o, a, b, re ? 1 : l.swapThreshold, l.invertedSwapThreshold == null ? l.swapThreshold : l.invertedSwapThreshold, bt, qe === o);
|
|
880
|
+
var Z;
|
|
881
881
|
if (X !== 0) {
|
|
882
|
-
var
|
|
882
|
+
var Te = ye(m);
|
|
883
883
|
do
|
|
884
|
-
|
|
885
|
-
while (
|
|
884
|
+
Te -= X, Z = W.children[Te];
|
|
885
|
+
while (Z && (_(Z, "display") === "none" || Z === w));
|
|
886
886
|
}
|
|
887
|
-
if (X === 0 ||
|
|
887
|
+
if (X === 0 || Z === o)
|
|
888
888
|
return N(!1);
|
|
889
|
-
|
|
890
|
-
var Fe = o.nextElementSibling,
|
|
891
|
-
|
|
892
|
-
var
|
|
893
|
-
if (
|
|
894
|
-
return (
|
|
889
|
+
qe = o, dt = X;
|
|
890
|
+
var Fe = o.nextElementSibling, d = !1;
|
|
891
|
+
d = X === 1;
|
|
892
|
+
var v = Et(V, n, m, r, o, a, e, d);
|
|
893
|
+
if (v !== !1)
|
|
894
|
+
return (v === 1 || v === -1) && (d = v === 1), Jt = !0, setTimeout(Xo, 30), H(), d && !Fe ? n.appendChild(m) : o.parentNode.insertBefore(m, d ? Fe : o), pe && Ln(pe, 0, Re - pe.scrollTop), W = m.parentNode, fe !== void 0 && !bt && (wt = Math.abs(fe - te(o)[_e])), B(), N(!0);
|
|
895
895
|
}
|
|
896
896
|
if (n.contains(m))
|
|
897
897
|
return N(!1);
|
|
@@ -900,60 +900,60 @@ T.prototype = /** @lends Sortable.prototype */
|
|
|
900
900
|
},
|
|
901
901
|
_ignoreWhileAnimating: null,
|
|
902
902
|
_offMoveEvents: function() {
|
|
903
|
-
|
|
903
|
+
S(document, "mousemove", this._onTouchMove), S(document, "touchmove", this._onTouchMove), S(document, "pointermove", this._onTouchMove), S(document, "dragover", Xe), S(document, "mousemove", Xe), S(document, "touchmove", Xe);
|
|
904
904
|
},
|
|
905
905
|
_offUpEvents: function() {
|
|
906
906
|
var e = this.el.ownerDocument;
|
|
907
|
-
|
|
907
|
+
S(e, "mouseup", this._onDrop), S(e, "touchend", this._onDrop), S(e, "pointerup", this._onDrop), S(e, "touchcancel", this._onDrop), S(document, "selectstart", this);
|
|
908
908
|
},
|
|
909
909
|
_onDrop: function(e) {
|
|
910
910
|
var n = this.el, o = this.options;
|
|
911
|
-
if (
|
|
911
|
+
if (ve = ye(m), Ue = ye(m, o.draggable), ce("drop", this, {
|
|
912
912
|
evt: e
|
|
913
|
-
}), W = m && m.parentNode,
|
|
913
|
+
}), W = m && m.parentNode, ve = ye(m), Ue = ye(m, o.draggable), T.eventCanceled) {
|
|
914
914
|
this._nulling();
|
|
915
915
|
return;
|
|
916
916
|
}
|
|
917
|
-
|
|
917
|
+
Qe = !1, bt = !1, ft = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), en(this.cloneId), en(this._dragStartId), this.nativeDraggable && (S(document, "drop", this), S(n, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), st && _(document.body, "user-select", ""), _(m, "transform", ""), e && (at && (e.cancelable && e.preventDefault(), !o.dropBubble && e.stopPropagation()), w && w.parentNode && w.parentNode.removeChild(w), (V === W || ie && ie.lastPutMode !== "clone") && Y && Y.parentNode && Y.parentNode.removeChild(Y), m && (this.nativeDraggable && S(m, "dragend", this), Xt(m), m.style["will-change"] = "", at && !Qe && ge(m, ie ? ie.options.ghostClass : this.options.ghostClass, !1), ge(m, this.options.chosenClass, !1), se({
|
|
918
918
|
sortable: this,
|
|
919
919
|
name: "unchoose",
|
|
920
920
|
toEl: W,
|
|
921
921
|
newIndex: null,
|
|
922
922
|
newDraggableIndex: null,
|
|
923
923
|
originalEvent: e
|
|
924
|
-
}),
|
|
924
|
+
}), V !== W ? (ve >= 0 && (se({
|
|
925
925
|
rootEl: W,
|
|
926
926
|
name: "add",
|
|
927
927
|
toEl: W,
|
|
928
|
-
fromEl:
|
|
928
|
+
fromEl: V,
|
|
929
929
|
originalEvent: e
|
|
930
|
-
}),
|
|
930
|
+
}), se({
|
|
931
931
|
sortable: this,
|
|
932
932
|
name: "remove",
|
|
933
933
|
toEl: W,
|
|
934
934
|
originalEvent: e
|
|
935
|
-
}),
|
|
935
|
+
}), se({
|
|
936
936
|
rootEl: W,
|
|
937
937
|
name: "sort",
|
|
938
938
|
toEl: W,
|
|
939
|
-
fromEl:
|
|
939
|
+
fromEl: V,
|
|
940
940
|
originalEvent: e
|
|
941
|
-
}),
|
|
941
|
+
}), se({
|
|
942
942
|
sortable: this,
|
|
943
943
|
name: "sort",
|
|
944
944
|
toEl: W,
|
|
945
945
|
originalEvent: e
|
|
946
|
-
})), ie && ie.save()) :
|
|
946
|
+
})), ie && ie.save()) : ve !== Ze && ve >= 0 && (se({
|
|
947
947
|
sortable: this,
|
|
948
948
|
name: "update",
|
|
949
949
|
toEl: W,
|
|
950
950
|
originalEvent: e
|
|
951
|
-
}),
|
|
951
|
+
}), se({
|
|
952
952
|
sortable: this,
|
|
953
953
|
name: "sort",
|
|
954
954
|
toEl: W,
|
|
955
955
|
originalEvent: e
|
|
956
|
-
})), T.active && ((
|
|
956
|
+
})), T.active && ((ve == null || ve === -1) && (ve = Ze, Ue = ct), se({
|
|
957
957
|
sortable: this,
|
|
958
958
|
name: "end",
|
|
959
959
|
toEl: W,
|
|
@@ -961,9 +961,9 @@ T.prototype = /** @lends Sortable.prototype */
|
|
|
961
961
|
}), this.save()))), this._nulling();
|
|
962
962
|
},
|
|
963
963
|
_nulling: function() {
|
|
964
|
-
|
|
964
|
+
ce("nulling", this), V = m = W = w = ze = Y = Tt = Be = He = De = at = ve = Ue = Ze = ct = qe = dt = ie = vt = T.dragged = T.ghost = T.clone = T.active = null, Nt.forEach(function(e) {
|
|
965
965
|
e.checked = !0;
|
|
966
|
-
}),
|
|
966
|
+
}), Nt.length = Wt = Yt = 0;
|
|
967
967
|
},
|
|
968
968
|
handleEvent: function(e) {
|
|
969
969
|
switch (e.type) {
|
|
@@ -973,7 +973,7 @@ T.prototype = /** @lends Sortable.prototype */
|
|
|
973
973
|
break;
|
|
974
974
|
case "dragenter":
|
|
975
975
|
case "dragover":
|
|
976
|
-
m && (this._onDragOver(e),
|
|
976
|
+
m && (this._onDragOver(e), Ho(e));
|
|
977
977
|
break;
|
|
978
978
|
case "selectstart":
|
|
979
979
|
e.preventDefault();
|
|
@@ -986,7 +986,7 @@ T.prototype = /** @lends Sortable.prototype */
|
|
|
986
986
|
*/
|
|
987
987
|
toArray: function() {
|
|
988
988
|
for (var e = [], n, o = this.el.children, r = 0, a = o.length, i = this.options; r < a; r++)
|
|
989
|
-
n = o[r], Ie(n, i.draggable, this.el, !1) && e.push(n.getAttribute(i.dataIdAttr) ||
|
|
989
|
+
n = o[r], Ie(n, i.draggable, this.el, !1) && e.push(n.getAttribute(i.dataIdAttr) || qo(n));
|
|
990
990
|
return e;
|
|
991
991
|
},
|
|
992
992
|
/**
|
|
@@ -996,8 +996,8 @@ T.prototype = /** @lends Sortable.prototype */
|
|
|
996
996
|
sort: function(e, n) {
|
|
997
997
|
var o = {}, r = this.el;
|
|
998
998
|
this.toArray().forEach(function(a, i) {
|
|
999
|
-
var
|
|
1000
|
-
Ie(
|
|
999
|
+
var l = r.children[i];
|
|
1000
|
+
Ie(l, this.options.draggable, r, !1) && (o[a] = l);
|
|
1001
1001
|
}, this), n && this.captureAnimationState(), e.forEach(function(a) {
|
|
1002
1002
|
o[a] && (r.removeChild(o[a]), r.appendChild(o[a]));
|
|
1003
1003
|
}), n && this.animateAll();
|
|
@@ -1028,23 +1028,23 @@ T.prototype = /** @lends Sortable.prototype */
|
|
|
1028
1028
|
var o = this.options;
|
|
1029
1029
|
if (n === void 0)
|
|
1030
1030
|
return o[e];
|
|
1031
|
-
var r =
|
|
1031
|
+
var r = ht.modifyOption(this, e, n);
|
|
1032
1032
|
typeof r < "u" ? o[e] = r : o[e] = n, e === "group" && Un(o);
|
|
1033
1033
|
},
|
|
1034
1034
|
/**
|
|
1035
1035
|
* Destroy
|
|
1036
1036
|
*/
|
|
1037
1037
|
destroy: function() {
|
|
1038
|
-
|
|
1038
|
+
ce("destroy", this);
|
|
1039
1039
|
var e = this.el;
|
|
1040
|
-
e[
|
|
1040
|
+
e[be] = null, S(e, "mousedown", this._onTapStart), S(e, "touchstart", this._onTapStart), S(e, "pointerdown", this._onTapStart), this.nativeDraggable && (S(e, "dragover", this), S(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(n) {
|
|
1041
1041
|
n.removeAttribute("draggable");
|
|
1042
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
1042
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), Ft.splice(Ft.indexOf(this.el), 1), this.el = e = null;
|
|
1043
1043
|
},
|
|
1044
1044
|
_hideClone: function() {
|
|
1045
|
-
if (!
|
|
1046
|
-
if (
|
|
1047
|
-
_(Y, "display", "none"), this.options.removeCloneOnHide && Y.parentNode && Y.parentNode.removeChild(Y),
|
|
1045
|
+
if (!Be) {
|
|
1046
|
+
if (ce("hideClone", this), T.eventCanceled) return;
|
|
1047
|
+
_(Y, "display", "none"), this.options.removeCloneOnHide && Y.parentNode && Y.parentNode.removeChild(Y), Be = !0;
|
|
1048
1048
|
}
|
|
1049
1049
|
},
|
|
1050
1050
|
_showClone: function(e) {
|
|
@@ -1052,94 +1052,94 @@ T.prototype = /** @lends Sortable.prototype */
|
|
|
1052
1052
|
this._hideClone();
|
|
1053
1053
|
return;
|
|
1054
1054
|
}
|
|
1055
|
-
if (
|
|
1056
|
-
if (
|
|
1057
|
-
m.parentNode ==
|
|
1055
|
+
if (Be) {
|
|
1056
|
+
if (ce("showClone", this), T.eventCanceled) return;
|
|
1057
|
+
m.parentNode == V && !this.options.group.revertClone ? V.insertBefore(Y, m) : ze ? V.insertBefore(Y, ze) : V.appendChild(Y), this.options.group.revertClone && this.animate(m, Y), _(Y, "display", ""), Be = !1;
|
|
1058
1058
|
}
|
|
1059
1059
|
}
|
|
1060
1060
|
};
|
|
1061
|
-
function
|
|
1061
|
+
function Ho(t) {
|
|
1062
1062
|
t.dataTransfer && (t.dataTransfer.dropEffect = "move"), t.cancelable && t.preventDefault();
|
|
1063
1063
|
}
|
|
1064
|
-
function
|
|
1065
|
-
var
|
|
1066
|
-
return window.CustomEvent && !Pe && !
|
|
1064
|
+
function Et(t, e, n, o, r, a, i, l) {
|
|
1065
|
+
var s, u = t[be], f = u.options.onMove, c;
|
|
1066
|
+
return window.CustomEvent && !Pe && !mt ? s = new CustomEvent("move", {
|
|
1067
1067
|
bubbles: !0,
|
|
1068
1068
|
cancelable: !0
|
|
1069
|
-
}) : (
|
|
1069
|
+
}) : (s = document.createEvent("Event"), s.initEvent("move", !0, !0)), s.to = e, s.from = t, s.dragged = n, s.draggedRect = o, s.related = r || e, s.relatedRect = a || te(e), s.willInsertAfter = l, s.originalEvent = i, t.dispatchEvent(s), f && (c = f.call(u, s, i)), c;
|
|
1070
1070
|
}
|
|
1071
|
-
function
|
|
1071
|
+
function Xt(t) {
|
|
1072
1072
|
t.draggable = !1;
|
|
1073
1073
|
}
|
|
1074
|
-
function
|
|
1075
|
-
|
|
1074
|
+
function Xo() {
|
|
1075
|
+
Jt = !1;
|
|
1076
1076
|
}
|
|
1077
|
-
function
|
|
1078
|
-
var o = te(
|
|
1077
|
+
function Go(t, e, n) {
|
|
1078
|
+
var o = te(et(n.el, 0, n.options, !0)), r = 10;
|
|
1079
1079
|
return e ? t.clientX < o.left - r || t.clientY < o.top && t.clientX < o.right : t.clientY < o.top - r || t.clientY < o.bottom && t.clientX < o.left;
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1082
|
-
var o = te(
|
|
1081
|
+
function zo(t, e, n) {
|
|
1082
|
+
var o = te(ln(n.el, n.options.draggable)), r = 10;
|
|
1083
1083
|
return e ? t.clientX > o.right + r || t.clientX <= o.right && t.clientY > o.bottom && t.clientX >= o.left : t.clientX > o.right && t.clientY > o.top || t.clientX <= o.right && t.clientY > o.bottom + r;
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1086
|
-
var
|
|
1085
|
+
function jo(t, e, n, o, r, a, i, l) {
|
|
1086
|
+
var s = o ? t.clientY : t.clientX, u = o ? n.height : n.width, f = o ? n.top : n.left, c = o ? n.bottom : n.right, E = !1;
|
|
1087
1087
|
if (!i) {
|
|
1088
|
-
if (
|
|
1089
|
-
if (!
|
|
1088
|
+
if (l && wt < u * r) {
|
|
1089
|
+
if (!ft && (dt === 1 ? s > f + u * a / 2 : s < c - u * a / 2) && (ft = !0), ft)
|
|
1090
1090
|
E = !0;
|
|
1091
|
-
else if (
|
|
1092
|
-
return -
|
|
1093
|
-
} else if (
|
|
1094
|
-
return
|
|
1091
|
+
else if (dt === 1 ? s < f + wt : s > c - wt)
|
|
1092
|
+
return -dt;
|
|
1093
|
+
} else if (s > f + u * (1 - r) / 2 && s < c - u * (1 - r) / 2)
|
|
1094
|
+
return Ko(e);
|
|
1095
1095
|
}
|
|
1096
|
-
return E = E || i, E && (
|
|
1096
|
+
return E = E || i, E && (s < f + u * a / 2 || s > c - u * a / 2) ? s > f + u / 2 ? 1 : -1 : 0;
|
|
1097
1097
|
}
|
|
1098
|
-
function
|
|
1099
|
-
return
|
|
1098
|
+
function Ko(t) {
|
|
1099
|
+
return ye(m) < ye(t) ? 1 : -1;
|
|
1100
1100
|
}
|
|
1101
|
-
function
|
|
1101
|
+
function qo(t) {
|
|
1102
1102
|
for (var e = t.tagName + t.className + t.src + t.href + t.textContent, n = e.length, o = 0; n--; )
|
|
1103
1103
|
o += e.charCodeAt(n);
|
|
1104
1104
|
return o.toString(36);
|
|
1105
1105
|
}
|
|
1106
|
-
function
|
|
1107
|
-
|
|
1106
|
+
function Qo(t) {
|
|
1107
|
+
Nt.length = 0;
|
|
1108
1108
|
for (var e = t.getElementsByTagName("input"), n = e.length; n--; ) {
|
|
1109
1109
|
var o = e[n];
|
|
1110
|
-
o.checked &&
|
|
1110
|
+
o.checked && Nt.push(o);
|
|
1111
1111
|
}
|
|
1112
1112
|
}
|
|
1113
|
-
function
|
|
1113
|
+
function xt(t) {
|
|
1114
1114
|
return setTimeout(t, 0);
|
|
1115
1115
|
}
|
|
1116
|
-
function
|
|
1116
|
+
function en(t) {
|
|
1117
1117
|
return clearTimeout(t);
|
|
1118
1118
|
}
|
|
1119
|
-
|
|
1120
|
-
(T.active ||
|
|
1119
|
+
Pt && R(document, "touchmove", function(t) {
|
|
1120
|
+
(T.active || Qe) && t.cancelable && t.preventDefault();
|
|
1121
1121
|
});
|
|
1122
1122
|
T.utils = {
|
|
1123
|
-
on:
|
|
1124
|
-
off:
|
|
1123
|
+
on: R,
|
|
1124
|
+
off: S,
|
|
1125
1125
|
css: _,
|
|
1126
1126
|
find: An,
|
|
1127
1127
|
is: function(e, n) {
|
|
1128
1128
|
return !!Ie(e, n, e, !1);
|
|
1129
1129
|
},
|
|
1130
|
-
extend:
|
|
1130
|
+
extend: Ao,
|
|
1131
1131
|
throttle: kn,
|
|
1132
1132
|
closest: Ie,
|
|
1133
|
-
toggleClass:
|
|
1133
|
+
toggleClass: ge,
|
|
1134
1134
|
clone: Pn,
|
|
1135
|
-
index:
|
|
1136
|
-
nextTick:
|
|
1137
|
-
cancelNextTick:
|
|
1135
|
+
index: ye,
|
|
1136
|
+
nextTick: xt,
|
|
1137
|
+
cancelNextTick: en,
|
|
1138
1138
|
detectDirection: Vn,
|
|
1139
|
-
getChild:
|
|
1139
|
+
getChild: et
|
|
1140
1140
|
};
|
|
1141
1141
|
T.get = function(t) {
|
|
1142
|
-
return t[
|
|
1142
|
+
return t[be];
|
|
1143
1143
|
};
|
|
1144
1144
|
T.mount = function() {
|
|
1145
1145
|
for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
|
|
@@ -1147,15 +1147,15 @@ T.mount = function() {
|
|
|
1147
1147
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(o) {
|
|
1148
1148
|
if (!o.prototype || !o.prototype.constructor)
|
|
1149
1149
|
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));
|
|
1150
|
-
o.utils && (T.utils = Ce(Ce({}, T.utils), o.utils)),
|
|
1150
|
+
o.utils && (T.utils = Ce(Ce({}, T.utils), o.utils)), ht.mount(o);
|
|
1151
1151
|
});
|
|
1152
1152
|
};
|
|
1153
1153
|
T.create = function(t, e) {
|
|
1154
1154
|
return new T(t, e);
|
|
1155
1155
|
};
|
|
1156
|
-
T.version =
|
|
1157
|
-
var
|
|
1158
|
-
function
|
|
1156
|
+
T.version = So;
|
|
1157
|
+
var K = [], it, tn, nn = !1, Gt, zt, At, lt;
|
|
1158
|
+
function Zo() {
|
|
1159
1159
|
function t() {
|
|
1160
1160
|
this.defaults = {
|
|
1161
1161
|
scroll: !0,
|
|
@@ -1170,36 +1170,36 @@ function qo() {
|
|
|
1170
1170
|
return t.prototype = {
|
|
1171
1171
|
dragStarted: function(n) {
|
|
1172
1172
|
var o = n.originalEvent;
|
|
1173
|
-
this.sortable.nativeDraggable ?
|
|
1173
|
+
this.sortable.nativeDraggable ? R(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? R(document, "pointermove", this._handleFallbackAutoScroll) : o.touches ? R(document, "touchmove", this._handleFallbackAutoScroll) : R(document, "mousemove", this._handleFallbackAutoScroll);
|
|
1174
1174
|
},
|
|
1175
1175
|
dragOverCompleted: function(n) {
|
|
1176
1176
|
var o = n.originalEvent;
|
|
1177
1177
|
!this.options.dragOverBubble && !o.rootEl && this._handleAutoScroll(o);
|
|
1178
1178
|
},
|
|
1179
1179
|
drop: function() {
|
|
1180
|
-
this.sortable.nativeDraggable ?
|
|
1180
|
+
this.sortable.nativeDraggable ? S(document, "dragover", this._handleAutoScroll) : (S(document, "pointermove", this._handleFallbackAutoScroll), S(document, "touchmove", this._handleFallbackAutoScroll), S(document, "mousemove", this._handleFallbackAutoScroll)), _n(), Dt(), ko();
|
|
1181
1181
|
},
|
|
1182
1182
|
nulling: function() {
|
|
1183
|
-
|
|
1183
|
+
At = tn = it = nn = lt = Gt = zt = null, K.length = 0;
|
|
1184
1184
|
},
|
|
1185
1185
|
_handleFallbackAutoScroll: function(n) {
|
|
1186
1186
|
this._handleAutoScroll(n, !0);
|
|
1187
1187
|
},
|
|
1188
1188
|
_handleAutoScroll: function(n, o) {
|
|
1189
|
-
var r = this, a = (n.touches ? n.touches[0] : n).clientX, i = (n.touches ? n.touches[0] : n).clientY,
|
|
1190
|
-
if (
|
|
1191
|
-
|
|
1192
|
-
var
|
|
1193
|
-
|
|
1194
|
-
var
|
|
1195
|
-
|
|
1196
|
-
}, 10),
|
|
1189
|
+
var r = this, a = (n.touches ? n.touches[0] : n).clientX, i = (n.touches ? n.touches[0] : n).clientY, l = document.elementFromPoint(a, i);
|
|
1190
|
+
if (At = n, o || this.options.forceAutoScrollFallback || mt || Pe || st) {
|
|
1191
|
+
jt(n, this.options, l, o);
|
|
1192
|
+
var s = $e(l, !0);
|
|
1193
|
+
nn && (!lt || a !== Gt || i !== zt) && (lt && _n(), lt = setInterval(function() {
|
|
1194
|
+
var u = $e(document.elementFromPoint(a, i), !0);
|
|
1195
|
+
u !== s && (s = u, Dt()), jt(n, r.options, u, o);
|
|
1196
|
+
}, 10), Gt = a, zt = i);
|
|
1197
1197
|
} else {
|
|
1198
|
-
if (!this.options.bubbleScroll ||
|
|
1199
|
-
|
|
1198
|
+
if (!this.options.bubbleScroll || $e(l, !0) === Oe()) {
|
|
1199
|
+
Dt();
|
|
1200
1200
|
return;
|
|
1201
1201
|
}
|
|
1202
|
-
|
|
1202
|
+
jt(n, this.options, $e(l, !1), !1);
|
|
1203
1203
|
}
|
|
1204
1204
|
}
|
|
1205
1205
|
}, Le(t, {
|
|
@@ -1207,51 +1207,51 @@ function qo() {
|
|
|
1207
1207
|
initializeByDefault: !0
|
|
1208
1208
|
});
|
|
1209
1209
|
}
|
|
1210
|
-
function
|
|
1211
|
-
|
|
1210
|
+
function Dt() {
|
|
1211
|
+
K.forEach(function(t) {
|
|
1212
1212
|
clearInterval(t.pid);
|
|
1213
|
-
}),
|
|
1213
|
+
}), K = [];
|
|
1214
1214
|
}
|
|
1215
|
-
function
|
|
1216
|
-
clearInterval(
|
|
1215
|
+
function _n() {
|
|
1216
|
+
clearInterval(lt);
|
|
1217
1217
|
}
|
|
1218
|
-
var
|
|
1218
|
+
var jt = kn(function(t, e, n, o) {
|
|
1219
1219
|
if (e.scroll) {
|
|
1220
|
-
var r = (t.touches ? t.touches[0] : t).clientX, a = (t.touches ? t.touches[0] : t).clientY, i = e.scrollSensitivity,
|
|
1221
|
-
|
|
1222
|
-
var
|
|
1220
|
+
var r = (t.touches ? t.touches[0] : t).clientX, a = (t.touches ? t.touches[0] : t).clientY, i = e.scrollSensitivity, l = e.scrollSpeed, s = Oe(), u = !1, f;
|
|
1221
|
+
tn !== n && (tn = n, Dt(), it = e.scroll, f = e.scrollFn, it === !0 && (it = $e(n, !0)));
|
|
1222
|
+
var c = 0, E = it;
|
|
1223
1223
|
do {
|
|
1224
|
-
var
|
|
1225
|
-
|
|
1226
|
-
var Re = P && (Math.abs(N - r) <= i &&
|
|
1227
|
-
if (!
|
|
1228
|
-
for (var
|
|
1229
|
-
|
|
1230
|
-
(
|
|
1231
|
-
o && this.layer === 0 && T.active._onTouchMove(
|
|
1232
|
-
var Fe =
|
|
1233
|
-
typeof f == "function" && f.call(T.dragged.parentNode[
|
|
1224
|
+
var b = E, y = te(b), g = y.top, L = y.bottom, H = y.left, N = y.right, B = y.width, $ = y.height, P = void 0, X = void 0, fe = b.scrollWidth, Se = b.scrollHeight, re = _(b), _e = b.scrollLeft, pe = b.scrollTop;
|
|
1225
|
+
b === s ? (P = B < fe && (re.overflowX === "auto" || re.overflowX === "scroll" || re.overflowX === "visible"), X = $ < Se && (re.overflowY === "auto" || re.overflowY === "scroll" || re.overflowY === "visible")) : (P = B < fe && (re.overflowX === "auto" || re.overflowX === "scroll"), X = $ < Se && (re.overflowY === "auto" || re.overflowY === "scroll"));
|
|
1226
|
+
var Re = P && (Math.abs(N - r) <= i && _e + B < fe) - (Math.abs(H - r) <= i && !!_e), Z = X && (Math.abs(L - a) <= i && pe + $ < Se) - (Math.abs(g - a) <= i && !!pe);
|
|
1227
|
+
if (!K[c])
|
|
1228
|
+
for (var Te = 0; Te <= c; Te++)
|
|
1229
|
+
K[Te] || (K[Te] = {});
|
|
1230
|
+
(K[c].vx != Re || K[c].vy != Z || K[c].el !== b) && (K[c].el = b, K[c].vx = Re, K[c].vy = Z, clearInterval(K[c].pid), (Re != 0 || Z != 0) && (u = !0, K[c].pid = setInterval((function() {
|
|
1231
|
+
o && this.layer === 0 && T.active._onTouchMove(At);
|
|
1232
|
+
var Fe = K[this.layer].vy ? K[this.layer].vy * l : 0, d = K[this.layer].vx ? K[this.layer].vx * l : 0;
|
|
1233
|
+
typeof f == "function" && f.call(T.dragged.parentNode[be], d, Fe, t, At, K[this.layer].el) !== "continue" || Ln(K[this.layer].el, d, Fe);
|
|
1234
1234
|
}).bind({
|
|
1235
|
-
layer:
|
|
1236
|
-
}), 24))),
|
|
1237
|
-
} while (e.bubbleScroll && E !==
|
|
1238
|
-
|
|
1235
|
+
layer: c
|
|
1236
|
+
}), 24))), c++;
|
|
1237
|
+
} while (e.bubbleScroll && E !== s && (E = $e(E, !1)));
|
|
1238
|
+
nn = u;
|
|
1239
1239
|
}
|
|
1240
1240
|
}, 30), Wn = function(e) {
|
|
1241
|
-
var n = e.originalEvent, o = e.putSortable, r = e.dragEl, a = e.activeSortable, i = e.dispatchSortableEvent,
|
|
1241
|
+
var n = e.originalEvent, o = e.putSortable, r = e.dragEl, a = e.activeSortable, i = e.dispatchSortableEvent, l = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
1242
1242
|
if (n) {
|
|
1243
|
-
var
|
|
1244
|
-
|
|
1245
|
-
var f = n.changedTouches && n.changedTouches.length ? n.changedTouches[0] : n,
|
|
1246
|
-
|
|
1243
|
+
var u = o || a;
|
|
1244
|
+
l();
|
|
1245
|
+
var f = n.changedTouches && n.changedTouches.length ? n.changedTouches[0] : n, c = document.elementFromPoint(f.clientX, f.clientY);
|
|
1246
|
+
s(), u && !u.el.contains(c) && (i("spill"), this.onSpill({
|
|
1247
1247
|
dragEl: r,
|
|
1248
1248
|
putSortable: o
|
|
1249
1249
|
}));
|
|
1250
1250
|
}
|
|
1251
1251
|
};
|
|
1252
|
-
function
|
|
1252
|
+
function sn() {
|
|
1253
1253
|
}
|
|
1254
|
-
|
|
1254
|
+
sn.prototype = {
|
|
1255
1255
|
startIndex: null,
|
|
1256
1256
|
dragStart: function(e) {
|
|
1257
1257
|
var n = e.oldDraggableIndex;
|
|
@@ -1260,54 +1260,54 @@ un.prototype = {
|
|
|
1260
1260
|
onSpill: function(e) {
|
|
1261
1261
|
var n = e.dragEl, o = e.putSortable;
|
|
1262
1262
|
this.sortable.captureAnimationState(), o && o.captureAnimationState();
|
|
1263
|
-
var r =
|
|
1263
|
+
var r = et(this.sortable.el, this.startIndex, this.options);
|
|
1264
1264
|
r ? this.sortable.el.insertBefore(n, r) : this.sortable.el.appendChild(n), this.sortable.animateAll(), o && o.animateAll();
|
|
1265
1265
|
},
|
|
1266
1266
|
drop: Wn
|
|
1267
1267
|
};
|
|
1268
|
-
Le(
|
|
1268
|
+
Le(sn, {
|
|
1269
1269
|
pluginName: "revertOnSpill"
|
|
1270
1270
|
});
|
|
1271
|
-
function
|
|
1271
|
+
function un() {
|
|
1272
1272
|
}
|
|
1273
|
-
|
|
1273
|
+
un.prototype = {
|
|
1274
1274
|
onSpill: function(e) {
|
|
1275
1275
|
var n = e.dragEl, o = e.putSortable, r = o || this.sortable;
|
|
1276
1276
|
r.captureAnimationState(), n.parentNode && n.parentNode.removeChild(n), r.animateAll();
|
|
1277
1277
|
},
|
|
1278
1278
|
drop: Wn
|
|
1279
1279
|
};
|
|
1280
|
-
Le(
|
|
1280
|
+
Le(un, {
|
|
1281
1281
|
pluginName: "removeOnSpill"
|
|
1282
1282
|
});
|
|
1283
|
-
T.mount(new
|
|
1284
|
-
T.mount(
|
|
1285
|
-
function
|
|
1283
|
+
T.mount(new Zo());
|
|
1284
|
+
T.mount(un, sn);
|
|
1285
|
+
function Kt(t) {
|
|
1286
1286
|
t.parentElement !== null && t.parentElement.removeChild(t);
|
|
1287
1287
|
}
|
|
1288
|
-
function
|
|
1288
|
+
function Tn(t, e, n) {
|
|
1289
1289
|
const o = n === 0 ? t.children[0] : t.children[n - 1].nextSibling;
|
|
1290
1290
|
t.insertBefore(e, o);
|
|
1291
1291
|
}
|
|
1292
|
-
function
|
|
1292
|
+
function Jo() {
|
|
1293
1293
|
return typeof window < "u" ? window.console : globalThis.console;
|
|
1294
1294
|
}
|
|
1295
|
-
const
|
|
1296
|
-
function
|
|
1295
|
+
const er = Jo();
|
|
1296
|
+
function tr(t) {
|
|
1297
1297
|
const e = /* @__PURE__ */ Object.create(null);
|
|
1298
1298
|
return function(o) {
|
|
1299
1299
|
return e[o] || (e[o] = t(o));
|
|
1300
1300
|
};
|
|
1301
1301
|
}
|
|
1302
|
-
const
|
|
1302
|
+
const nr = /-(\w)/g, or = tr((t) => t.replace(nr, (e, n) => n.toUpperCase())), Yn = ["Start", "Add", "Remove", "Update", "End"], Hn = ["Choose", "Unchoose", "Sort", "Filter", "Clone"], Xn = ["Move"], rr = [Xn, Yn, Hn].flatMap((t) => t).map((t) => `on${t}`), on = {
|
|
1303
1303
|
manage: Xn,
|
|
1304
1304
|
manageAndEmit: Yn,
|
|
1305
1305
|
emit: Hn
|
|
1306
1306
|
};
|
|
1307
|
-
function
|
|
1308
|
-
return
|
|
1307
|
+
function ar(t) {
|
|
1308
|
+
return rr.indexOf(t) !== -1;
|
|
1309
1309
|
}
|
|
1310
|
-
const
|
|
1310
|
+
const ir = [
|
|
1311
1311
|
"a",
|
|
1312
1312
|
"abbr",
|
|
1313
1313
|
"address",
|
|
@@ -1426,10 +1426,10 @@ const rr = [
|
|
|
1426
1426
|
"video",
|
|
1427
1427
|
"wbr"
|
|
1428
1428
|
];
|
|
1429
|
-
function
|
|
1430
|
-
return
|
|
1429
|
+
function lr(t) {
|
|
1430
|
+
return ir.includes(t);
|
|
1431
1431
|
}
|
|
1432
|
-
function
|
|
1432
|
+
function sr(t) {
|
|
1433
1433
|
return ["transition-group", "TransitionGroup"].includes(t);
|
|
1434
1434
|
}
|
|
1435
1435
|
function Gn(t) {
|
|
@@ -1438,7 +1438,7 @@ function Gn(t) {
|
|
|
1438
1438
|
function zn(t) {
|
|
1439
1439
|
return t.reduce((e, [n, o]) => (e[n] = o, e), {});
|
|
1440
1440
|
}
|
|
1441
|
-
function
|
|
1441
|
+
function ur({ $attrs: t, componentData: e = {} }) {
|
|
1442
1442
|
return {
|
|
1443
1443
|
...zn(
|
|
1444
1444
|
Object.entries(t).filter(([o, r]) => Gn(o))
|
|
@@ -1446,10 +1446,10 @@ function lr({ $attrs: t, componentData: e = {} }) {
|
|
|
1446
1446
|
...e
|
|
1447
1447
|
};
|
|
1448
1448
|
}
|
|
1449
|
-
function
|
|
1449
|
+
function cr({ $attrs: t, callBackBuilder: e }) {
|
|
1450
1450
|
const n = zn(jn(t));
|
|
1451
1451
|
Object.entries(e).forEach(([r, a]) => {
|
|
1452
|
-
|
|
1452
|
+
on[r].forEach((i) => {
|
|
1453
1453
|
n[`on${i}`] = a(i);
|
|
1454
1454
|
});
|
|
1455
1455
|
});
|
|
@@ -1460,10 +1460,10 @@ function sr({ $attrs: t, callBackBuilder: e }) {
|
|
|
1460
1460
|
};
|
|
1461
1461
|
}
|
|
1462
1462
|
function jn(t) {
|
|
1463
|
-
return Object.entries(t).filter(([e, n]) => !Gn(e)).map(([e, n]) => [
|
|
1463
|
+
return Object.entries(t).filter(([e, n]) => !Gn(e)).map(([e, n]) => [or(e), n]).filter(([e, n]) => !ar(e));
|
|
1464
1464
|
}
|
|
1465
|
-
const
|
|
1466
|
-
class
|
|
1465
|
+
const wn = ({ el: t }) => t, dr = (t, e) => t.__draggable_context = e, xn = (t) => t.__draggable_context;
|
|
1466
|
+
class fr {
|
|
1467
1467
|
constructor({
|
|
1468
1468
|
nodes: { header: e, default: n, footer: o },
|
|
1469
1469
|
root: r,
|
|
@@ -1481,65 +1481,65 @@ class cr {
|
|
|
1481
1481
|
updated() {
|
|
1482
1482
|
const { defaultNodes: e, realList: n } = this;
|
|
1483
1483
|
e.forEach((o, r) => {
|
|
1484
|
-
|
|
1484
|
+
dr(wn(o), {
|
|
1485
1485
|
element: n[r],
|
|
1486
1486
|
index: r
|
|
1487
1487
|
});
|
|
1488
1488
|
});
|
|
1489
1489
|
}
|
|
1490
1490
|
getUnderlyingVm(e) {
|
|
1491
|
-
return
|
|
1491
|
+
return xn(e);
|
|
1492
1492
|
}
|
|
1493
1493
|
getVmIndexFromDomIndex(e, n) {
|
|
1494
1494
|
const { defaultNodes: o } = this, { length: r } = o, a = n.children, i = a.item(e);
|
|
1495
1495
|
if (i === null)
|
|
1496
1496
|
return r;
|
|
1497
|
-
const
|
|
1498
|
-
if (
|
|
1499
|
-
return
|
|
1497
|
+
const l = xn(i);
|
|
1498
|
+
if (l)
|
|
1499
|
+
return l.index;
|
|
1500
1500
|
if (r === 0)
|
|
1501
1501
|
return 0;
|
|
1502
|
-
const
|
|
1503
|
-
(f) => f ===
|
|
1502
|
+
const s = wn(o[0]), u = [...a].findIndex(
|
|
1503
|
+
(f) => f === s
|
|
1504
1504
|
);
|
|
1505
|
-
return e <
|
|
1505
|
+
return e < u ? 0 : r;
|
|
1506
1506
|
}
|
|
1507
1507
|
}
|
|
1508
|
-
function
|
|
1508
|
+
function pr(t, e) {
|
|
1509
1509
|
const n = t[e];
|
|
1510
1510
|
return n ? n() : [];
|
|
1511
1511
|
}
|
|
1512
|
-
function
|
|
1512
|
+
function mr({ $slots: t, realList: e, getKey: n }) {
|
|
1513
1513
|
const o = e || [], [r, a] = ["header", "footer"].map(
|
|
1514
|
-
(
|
|
1514
|
+
(s) => pr(t, s)
|
|
1515
1515
|
), { item: i } = t;
|
|
1516
1516
|
if (!i)
|
|
1517
1517
|
throw new Error("draggable element must have an item slot");
|
|
1518
|
-
const
|
|
1519
|
-
(
|
|
1518
|
+
const l = o.flatMap(
|
|
1519
|
+
(s, u) => i({ element: s, index: u }).map((f) => (f.key = n(s), f.props = { ...f.props || {}, "data-draggable": !0 }, f))
|
|
1520
1520
|
);
|
|
1521
|
-
if (
|
|
1521
|
+
if (l.length !== o.length)
|
|
1522
1522
|
throw new Error("Item slot must have only one child");
|
|
1523
1523
|
return {
|
|
1524
1524
|
header: r,
|
|
1525
1525
|
footer: a,
|
|
1526
|
-
default:
|
|
1526
|
+
default: l
|
|
1527
1527
|
};
|
|
1528
1528
|
}
|
|
1529
|
-
function
|
|
1530
|
-
const e =
|
|
1529
|
+
function hr(t) {
|
|
1530
|
+
const e = sr(t), n = !lr(t) && !e;
|
|
1531
1531
|
return {
|
|
1532
1532
|
transition: e,
|
|
1533
1533
|
externalComponent: n,
|
|
1534
|
-
tag: n ? j(t) : e ?
|
|
1534
|
+
tag: n ? j(t) : e ? io : t
|
|
1535
1535
|
};
|
|
1536
1536
|
}
|
|
1537
|
-
function
|
|
1538
|
-
const r =
|
|
1539
|
-
return new
|
|
1537
|
+
function gr({ $slots: t, tag: e, realList: n, getKey: o }) {
|
|
1538
|
+
const r = mr({ $slots: t, realList: n, getKey: o }), a = hr(e);
|
|
1539
|
+
return new fr({ nodes: r, root: a, realList: n });
|
|
1540
1540
|
}
|
|
1541
1541
|
function Kn(t, e) {
|
|
1542
|
-
|
|
1542
|
+
rn(() => this.$emit(t.toLowerCase(), e));
|
|
1543
1543
|
}
|
|
1544
1544
|
function qn(t) {
|
|
1545
1545
|
return (e, n) => {
|
|
@@ -1547,14 +1547,14 @@ function qn(t) {
|
|
|
1547
1547
|
return this[`onDrag${t}`](e, n);
|
|
1548
1548
|
};
|
|
1549
1549
|
}
|
|
1550
|
-
function
|
|
1550
|
+
function vr(t) {
|
|
1551
1551
|
const e = qn.call(this, t);
|
|
1552
1552
|
return (n, o) => {
|
|
1553
1553
|
e.call(this, n, o), Kn.call(this, t, n);
|
|
1554
1554
|
};
|
|
1555
1555
|
}
|
|
1556
|
-
let
|
|
1557
|
-
const
|
|
1556
|
+
let qt = null;
|
|
1557
|
+
const br = {
|
|
1558
1558
|
list: {
|
|
1559
1559
|
type: Array,
|
|
1560
1560
|
required: !1,
|
|
@@ -1586,15 +1586,15 @@ const gr = {
|
|
|
1586
1586
|
required: !1,
|
|
1587
1587
|
default: null
|
|
1588
1588
|
}
|
|
1589
|
-
},
|
|
1589
|
+
}, yr = [
|
|
1590
1590
|
"update:modelValue",
|
|
1591
1591
|
"change",
|
|
1592
|
-
...[...
|
|
1593
|
-
],
|
|
1592
|
+
...[...on.manageAndEmit, ...on.emit].map((t) => t.toLowerCase())
|
|
1593
|
+
], Er = We({
|
|
1594
1594
|
name: "draggable",
|
|
1595
1595
|
inheritAttrs: !1,
|
|
1596
|
-
props:
|
|
1597
|
-
emits:
|
|
1596
|
+
props: br,
|
|
1597
|
+
emits: yr,
|
|
1598
1598
|
data() {
|
|
1599
1599
|
return {
|
|
1600
1600
|
error: !1
|
|
@@ -1603,21 +1603,21 @@ const gr = {
|
|
|
1603
1603
|
render() {
|
|
1604
1604
|
try {
|
|
1605
1605
|
this.error = !1;
|
|
1606
|
-
const { $slots: t, $attrs: e, tag: n, componentData: o, realList: r, getKey: a } = this, i =
|
|
1606
|
+
const { $slots: t, $attrs: e, tag: n, componentData: o, realList: r, getKey: a } = this, i = gr({
|
|
1607
1607
|
$slots: t,
|
|
1608
1608
|
tag: n,
|
|
1609
1609
|
realList: r,
|
|
1610
1610
|
getKey: a
|
|
1611
1611
|
});
|
|
1612
1612
|
this.componentStructure = i;
|
|
1613
|
-
const
|
|
1614
|
-
return i.render(
|
|
1613
|
+
const l = ur({ $attrs: e, componentData: o });
|
|
1614
|
+
return i.render(cn, l);
|
|
1615
1615
|
} catch (t) {
|
|
1616
|
-
return this.error = !0,
|
|
1616
|
+
return this.error = !0, cn("pre", { style: { color: "red" } }, t.stack);
|
|
1617
1617
|
}
|
|
1618
1618
|
},
|
|
1619
1619
|
created() {
|
|
1620
|
-
this.list !== null && this.modelValue !== null &&
|
|
1620
|
+
this.list !== null && this.modelValue !== null && er.error(
|
|
1621
1621
|
"modelValue and list props are mutually exclusive! Please set one or another."
|
|
1622
1622
|
);
|
|
1623
1623
|
},
|
|
@@ -1626,10 +1626,10 @@ const gr = {
|
|
|
1626
1626
|
return;
|
|
1627
1627
|
const { $attrs: t, $el: e, componentStructure: n } = this;
|
|
1628
1628
|
n.updated();
|
|
1629
|
-
const o =
|
|
1629
|
+
const o = cr({
|
|
1630
1630
|
$attrs: t,
|
|
1631
1631
|
callBackBuilder: {
|
|
1632
|
-
manageAndEmit: (a) =>
|
|
1632
|
+
manageAndEmit: (a) => vr.call(this, a),
|
|
1633
1633
|
emit: (a) => Kn.bind(this, a),
|
|
1634
1634
|
manage: (a) => qn.call(this, a)
|
|
1635
1635
|
}
|
|
@@ -1671,7 +1671,7 @@ const gr = {
|
|
|
1671
1671
|
return t.__draggable_component__;
|
|
1672
1672
|
},
|
|
1673
1673
|
emitChanges(t) {
|
|
1674
|
-
|
|
1674
|
+
rn(() => this.$emit("change", t));
|
|
1675
1675
|
},
|
|
1676
1676
|
alterList(t) {
|
|
1677
1677
|
if (this.list) {
|
|
@@ -1703,21 +1703,21 @@ const gr = {
|
|
|
1703
1703
|
);
|
|
1704
1704
|
},
|
|
1705
1705
|
onDragStart(t) {
|
|
1706
|
-
this.context = this.getUnderlyingVm(t.item), t.item._underlying_vm_ = this.clone(this.context.element),
|
|
1706
|
+
this.context = this.getUnderlyingVm(t.item), t.item._underlying_vm_ = this.clone(this.context.element), qt = t.item;
|
|
1707
1707
|
},
|
|
1708
1708
|
onDragAdd(t) {
|
|
1709
1709
|
const e = t.item._underlying_vm_;
|
|
1710
1710
|
if (e === void 0)
|
|
1711
1711
|
return;
|
|
1712
|
-
|
|
1712
|
+
Kt(t.item);
|
|
1713
1713
|
const n = this.getVmIndexFromDomIndex(t.newIndex);
|
|
1714
1714
|
this.spliceList(n, 0, e);
|
|
1715
1715
|
const o = { element: e, newIndex: n };
|
|
1716
1716
|
this.emitChanges({ added: o });
|
|
1717
1717
|
},
|
|
1718
1718
|
onDragRemove(t) {
|
|
1719
|
-
if (
|
|
1720
|
-
|
|
1719
|
+
if (Tn(this.$el, t.item, t.oldIndex), t.pullMode === "clone") {
|
|
1720
|
+
Kt(t.clone);
|
|
1721
1721
|
return;
|
|
1722
1722
|
}
|
|
1723
1723
|
const { index: e, element: n } = this.context;
|
|
@@ -1726,7 +1726,7 @@ const gr = {
|
|
|
1726
1726
|
this.emitChanges({ removed: o });
|
|
1727
1727
|
},
|
|
1728
1728
|
onDragUpdate(t) {
|
|
1729
|
-
|
|
1729
|
+
Kt(t.item), Tn(t.from, t.item, t.oldIndex);
|
|
1730
1730
|
const e = this.context.index, n = this.getVmIndexFromDomIndex(t.newIndex);
|
|
1731
1731
|
this.updatePosition(e, n);
|
|
1732
1732
|
const o = { element: this.context.element, oldIndex: e, newIndex: n };
|
|
@@ -1740,7 +1740,7 @@ const gr = {
|
|
|
1740
1740
|
), o = n.indexOf(e.related), r = t.component.getVmIndexFromDomIndex(
|
|
1741
1741
|
o
|
|
1742
1742
|
);
|
|
1743
|
-
return n.indexOf(
|
|
1743
|
+
return n.indexOf(qt) !== -1 || !e.willInsertAfter ? r : r + 1;
|
|
1744
1744
|
},
|
|
1745
1745
|
onDragMove(t, e) {
|
|
1746
1746
|
const { move: n, realList: o } = this;
|
|
@@ -1749,18 +1749,18 @@ const gr = {
|
|
|
1749
1749
|
const r = this.getRelatedContextFromMoveEvent(t), a = this.computeFutureIndex(r, t), i = {
|
|
1750
1750
|
...this.context,
|
|
1751
1751
|
futureIndex: a
|
|
1752
|
-
},
|
|
1752
|
+
}, l = {
|
|
1753
1753
|
...t,
|
|
1754
1754
|
relatedContext: r,
|
|
1755
1755
|
draggedContext: i
|
|
1756
1756
|
};
|
|
1757
|
-
return n(
|
|
1757
|
+
return n(l, e);
|
|
1758
1758
|
},
|
|
1759
1759
|
onDragEnd() {
|
|
1760
|
-
|
|
1760
|
+
qt = null;
|
|
1761
1761
|
}
|
|
1762
1762
|
}
|
|
1763
|
-
}),
|
|
1763
|
+
}), _r = Object.entries(z).map((t) => {
|
|
1764
1764
|
let e = "";
|
|
1765
1765
|
switch (t[1]) {
|
|
1766
1766
|
case z.BarChart:
|
|
@@ -1792,13 +1792,13 @@ const gr = {
|
|
|
1792
1792
|
break;
|
|
1793
1793
|
}
|
|
1794
1794
|
return {
|
|
1795
|
-
label:
|
|
1795
|
+
label: bo(t[0]),
|
|
1796
1796
|
icon: e,
|
|
1797
1797
|
value: t[1]
|
|
1798
1798
|
};
|
|
1799
|
-
}),
|
|
1799
|
+
}), Tr = /* @__PURE__ */ We({
|
|
1800
1800
|
__name: "WidgetTypeList",
|
|
1801
|
-
props: /* @__PURE__ */
|
|
1801
|
+
props: /* @__PURE__ */ kt({
|
|
1802
1802
|
childClass: {
|
|
1803
1803
|
type: String,
|
|
1804
1804
|
default: ""
|
|
@@ -1820,44 +1820,44 @@ const gr = {
|
|
|
1820
1820
|
}),
|
|
1821
1821
|
emits: ["update:modelValue"],
|
|
1822
1822
|
setup(t) {
|
|
1823
|
-
const { t: e } =
|
|
1824
|
-
() =>
|
|
1823
|
+
const { t: e } = Lt(), n = tt(t, "modelValue"), o = t, r = C(
|
|
1824
|
+
() => _r.map((a) => ({
|
|
1825
1825
|
...a,
|
|
1826
1826
|
label: e(`report.widget.types.${a.value.toLowerCase()}`)
|
|
1827
1827
|
}))
|
|
1828
1828
|
);
|
|
1829
1829
|
return (a, i) => {
|
|
1830
|
-
const
|
|
1830
|
+
const l = j("FmIcon"), s = j("FmCard");
|
|
1831
1831
|
return D(), k("div", null, [
|
|
1832
|
-
(D(!0), k(Ae, null,
|
|
1833
|
-
(
|
|
1834
|
-
), (
|
|
1832
|
+
(D(!0), k(Ae, null, It(r.value.filter(
|
|
1833
|
+
(u) => o.excludeWidgeType.indexOf(u.value) === -1
|
|
1834
|
+
), (u, f) => (D(), Ee(s, {
|
|
1835
1835
|
key: f,
|
|
1836
|
-
class:
|
|
1836
|
+
class: Ot(`items-center ${o.childClass} cursor-pointer rounded-[8px] ${o.isList ? "" : "gap-[16px] h-[120px] justify-center"} ${n.value === u.value ? "selected-widget" : ""}`),
|
|
1837
1837
|
variant: "outlined",
|
|
1838
|
-
onClick: (
|
|
1838
|
+
onClick: (c) => n.value = u.value
|
|
1839
1839
|
}, {
|
|
1840
|
-
default:
|
|
1841
|
-
G(
|
|
1842
|
-
name:
|
|
1840
|
+
default: de(() => [
|
|
1841
|
+
G(l, {
|
|
1842
|
+
name: u.icon,
|
|
1843
1843
|
size: o.isList ? "md" : "lg",
|
|
1844
1844
|
outline: !0
|
|
1845
1845
|
}, null, 8, ["name", "size"]),
|
|
1846
1846
|
A("span", {
|
|
1847
|
-
class:
|
|
1848
|
-
},
|
|
1847
|
+
class: Ot(o.isList ? "" : "flex items-center text-center leading-[24px] h-[48px]")
|
|
1848
|
+
}, q(u.label), 3)
|
|
1849
1849
|
]),
|
|
1850
1850
|
_: 2
|
|
1851
1851
|
}, 1032, ["class", "onClick"]))), 128))
|
|
1852
1852
|
]);
|
|
1853
1853
|
};
|
|
1854
1854
|
}
|
|
1855
|
-
}),
|
|
1856
|
-
function
|
|
1855
|
+
}), Ta = /* @__PURE__ */ an(Tr, [["__scopeId", "data-v-0535b07b"]]);
|
|
1856
|
+
function wr(t) {
|
|
1857
1857
|
let e, n, o, r;
|
|
1858
1858
|
switch (t) {
|
|
1859
1859
|
case z.Table:
|
|
1860
|
-
e = [], n = !1, o =
|
|
1860
|
+
e = [], n = !1, o = yo.top;
|
|
1861
1861
|
break;
|
|
1862
1862
|
case z.ClusteredStackBarChart:
|
|
1863
1863
|
r = !0;
|
|
@@ -1885,7 +1885,7 @@ function _r(t) {
|
|
|
1885
1885
|
joinDatasources: e
|
|
1886
1886
|
};
|
|
1887
1887
|
}
|
|
1888
|
-
function
|
|
1888
|
+
function wa(t, e) {
|
|
1889
1889
|
let n = 1, o = 1;
|
|
1890
1890
|
switch (t) {
|
|
1891
1891
|
case z.Scorecard:
|
|
@@ -1916,17 +1916,17 @@ function Ea(t, e) {
|
|
|
1916
1916
|
widget: {
|
|
1917
1917
|
title: e || "New widget",
|
|
1918
1918
|
type: t,
|
|
1919
|
-
config:
|
|
1919
|
+
config: wr(t)
|
|
1920
1920
|
}
|
|
1921
1921
|
};
|
|
1922
1922
|
}
|
|
1923
|
-
function
|
|
1923
|
+
function xa(t, e) {
|
|
1924
1924
|
return t.filter((n, o) => o !== e);
|
|
1925
1925
|
}
|
|
1926
|
-
const
|
|
1926
|
+
const xr = {
|
|
1927
1927
|
key: 0,
|
|
1928
1928
|
class: "flex flex-col gap-5"
|
|
1929
|
-
},
|
|
1929
|
+
}, Dr = /* @__PURE__ */ We({
|
|
1930
1930
|
__name: "Section",
|
|
1931
1931
|
props: {
|
|
1932
1932
|
isOpen: { type: Boolean, default: !0 },
|
|
@@ -1934,7 +1934,7 @@ const Tr = {
|
|
|
1934
1934
|
},
|
|
1935
1935
|
emits: ["update:isOpen"],
|
|
1936
1936
|
setup(t) {
|
|
1937
|
-
const e =
|
|
1937
|
+
const e = tt(t, "isOpen");
|
|
1938
1938
|
return (n, o) => {
|
|
1939
1939
|
const r = j("FmIcon"), a = j("FmMenuDivider");
|
|
1940
1940
|
return D(), k(Ae, null, [
|
|
@@ -1942,15 +1942,15 @@ const Tr = {
|
|
|
1942
1942
|
class: "flex items-center cursor-pointer fm-typo-en-body-lg-600",
|
|
1943
1943
|
onClick: o[0] || (o[0] = (i) => e.value = !e.value)
|
|
1944
1944
|
}, [
|
|
1945
|
-
|
|
1945
|
+
pt(n.$slots, "header", {}, void 0, !0),
|
|
1946
1946
|
G(r, {
|
|
1947
1947
|
name: e.value ? "keyboard_arrow_up" : "keyboard_arrow_down"
|
|
1948
1948
|
}, null, 8, ["name"])
|
|
1949
1949
|
]),
|
|
1950
|
-
G(
|
|
1951
|
-
default:
|
|
1952
|
-
e.value ? (D(), k("div",
|
|
1953
|
-
|
|
1950
|
+
G(Zt, { name: "slide-fade" }, {
|
|
1951
|
+
default: de(() => [
|
|
1952
|
+
e.value ? (D(), k("div", xr, [
|
|
1953
|
+
pt(n.$slots, "content", {}, void 0, !0)
|
|
1954
1954
|
])) : U("", !0)
|
|
1955
1955
|
]),
|
|
1956
1956
|
_: 3
|
|
@@ -1959,26 +1959,26 @@ const Tr = {
|
|
|
1959
1959
|
], 64);
|
|
1960
1960
|
};
|
|
1961
1961
|
}
|
|
1962
|
-
}),
|
|
1962
|
+
}), Da = /* @__PURE__ */ an(Dr, [["__scopeId", "data-v-fa67a3a4"]]);
|
|
1963
1963
|
var ee = /* @__PURE__ */ ((t) => (t.Dimension = "DIMENSION", t.Metric = "METRIC", t))(ee || {});
|
|
1964
|
-
const
|
|
1964
|
+
const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { class: "flex items-center gap-1 px-3 py-1" }, Sr = {
|
|
1965
1965
|
key: 1,
|
|
1966
1966
|
class: "fm-typo-en-body-sm-400 text-fm-color-system-error-300"
|
|
1967
|
-
},
|
|
1967
|
+
}, Rr = {
|
|
1968
1968
|
key: 2,
|
|
1969
1969
|
class: "fm-typo-en-body-sm-400 text-fm-color-system-success-300"
|
|
1970
|
-
},
|
|
1970
|
+
}, Fr = {
|
|
1971
1971
|
key: 0,
|
|
1972
1972
|
class: "m-2 mb-0 rounded-lg border border-neutral-200 bg-neutral-50 px-4 py-3"
|
|
1973
|
-
},
|
|
1973
|
+
}, Nr = { class: "flex items-center gap-2" }, Ar = { class: "fm-typo-en-title-md-400 text-fm-color-typo-primary" }, kr = { class: "fm-typo-en-body-sm-400" }, Lr = { class: "mt-3 border-l-2 border-fm-color-system-info-100 pl-3 fm-typo-en-body-md-400 text-fm-color-typo-primary leading-relaxed" }, Pr = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400 mt-3 uppercase tracking-wide" }, Mr = { class: "mt-1 rounded-md bg-fm-color-neutral-white px-3 py-2 fm-typo-en-body-md-400 text-fm-color-typo-primary leading-relaxed break-words" }, Vr = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400 mt-3 uppercase tracking-wide" }, Ur = { class: "mt-1 rounded-md bg-fm-color-neutral-white px-3 py-2 fm-typo-en-body-md-400 text-fm-color-typo-primary leading-relaxed break-words" }, Br = { key: 2 }, $r = ["onMousedown", "onMouseenter"], Wr = { class: "min-w-0 flex-1" }, Yr = { class: "flex items-start gap-2 min-w-0" }, Hr = { class: "min-w-0 overflow-hidden text-ellipsis line-clamp-3 fm-typo-en-body-md-400" }, Xr = {
|
|
1974
1974
|
key: 0,
|
|
1975
1975
|
class: "shrink-0 fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400"
|
|
1976
|
-
},
|
|
1976
|
+
}, Gr = { class: "fm-typo-en-body-sm-400" }, zr = {
|
|
1977
1977
|
key: 0,
|
|
1978
1978
|
class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-300 leading-relaxed whitespace-normal"
|
|
1979
|
-
},
|
|
1979
|
+
}, jr = /* @__PURE__ */ We({
|
|
1980
1980
|
__name: "FormulaInput",
|
|
1981
|
-
props: /* @__PURE__ */
|
|
1981
|
+
props: /* @__PURE__ */ kt({
|
|
1982
1982
|
placeholder: {},
|
|
1983
1983
|
fieldDataList: {},
|
|
1984
1984
|
functionList: {},
|
|
@@ -2012,18 +2012,18 @@ const xr = { class: "relative" }, Dr = ["placeholder", "onKeydown"], Ir = { clas
|
|
|
2012
2012
|
return "text-fm-color-typo-secondary";
|
|
2013
2013
|
}
|
|
2014
2014
|
}
|
|
2015
|
-
const o =
|
|
2015
|
+
const o = tt(t, "modelValue"), { t: r } = Lt();
|
|
2016
2016
|
function a(h) {
|
|
2017
|
-
const
|
|
2018
|
-
return h === "KEYWORD" &&
|
|
2017
|
+
const O = [h.toLowerCase(), e(h).toLowerCase()];
|
|
2018
|
+
return h === "KEYWORD" && O.push("expr", "expression"), O;
|
|
2019
2019
|
}
|
|
2020
|
-
function i(h,
|
|
2021
|
-
return h ? a(
|
|
2020
|
+
function i(h, O) {
|
|
2021
|
+
return h ? a(O).some((x) => x.includes(h)) : !1;
|
|
2022
2022
|
}
|
|
2023
|
-
function
|
|
2024
|
-
return h ? i(h,
|
|
2023
|
+
function l(h, O, x) {
|
|
2024
|
+
return h ? i(h, O) || x.some((F) => F == null ? void 0 : F.toLowerCase().includes(h)) : !0;
|
|
2025
2025
|
}
|
|
2026
|
-
const
|
|
2026
|
+
const s = t, u = Q(null), f = Q(null), c = Q(!1), E = Q({ top: 0, left: 0 }), b = Q(0), y = Q(!1), g = Q(null), L = C(() => s.formulaField), H = C(() => [
|
|
2027
2027
|
{
|
|
2028
2028
|
value: "AVG",
|
|
2029
2029
|
description: r("report.formulaInput.functionDescription.avg"),
|
|
@@ -2232,7 +2232,7 @@ const xr = { class: "relative" }, Dr = ["placeholder", "onKeydown"], Ir = { clas
|
|
|
2232
2232
|
cursorOffset: 11,
|
|
2233
2233
|
allowedFields: [ee.Metric]
|
|
2234
2234
|
}
|
|
2235
|
-
]), N =
|
|
2235
|
+
]), N = C(
|
|
2236
2236
|
() => [
|
|
2237
2237
|
{
|
|
2238
2238
|
value: "PARTITION BY ",
|
|
@@ -2250,7 +2250,7 @@ const xr = { class: "relative" }, Dr = ["placeholder", "onKeydown"], Ir = { clas
|
|
|
2250
2250
|
description: r("report.formulaInput.keywordDescription.rowsBetween")
|
|
2251
2251
|
}
|
|
2252
2252
|
]
|
|
2253
|
-
),
|
|
2253
|
+
), B = C(() => [
|
|
2254
2254
|
{
|
|
2255
2255
|
value: "CASE",
|
|
2256
2256
|
label: "CASE WHEN THEN ELSE END",
|
|
@@ -2400,11 +2400,11 @@ const xr = { class: "relative" }, Dr = ["placeholder", "onKeydown"], Ir = { clas
|
|
|
2400
2400
|
insertText: "YEAR",
|
|
2401
2401
|
cursorOffset: 4
|
|
2402
2402
|
}
|
|
2403
|
-
]),
|
|
2403
|
+
]), $ = C(() => [
|
|
2404
2404
|
...H.value,
|
|
2405
|
-
...
|
|
2406
|
-
]), P =
|
|
2407
|
-
() =>
|
|
2405
|
+
...s.functionList || []
|
|
2406
|
+
]), P = C(
|
|
2407
|
+
() => $.value.filter(
|
|
2408
2408
|
(h) => !h.allowedFields || h.allowedFields.length === 0 || h.allowedFields.includes(L.value)
|
|
2409
2409
|
)
|
|
2410
2410
|
), X = /* @__PURE__ */ new Set([
|
|
@@ -2414,39 +2414,39 @@ const xr = { class: "relative" }, Dr = ["placeholder", "onKeydown"], Ir = { clas
|
|
|
2414
2414
|
"DATE_TRUNC",
|
|
2415
2415
|
"EXTRACT",
|
|
2416
2416
|
"TO_TIMESTAMP"
|
|
2417
|
-
]),
|
|
2417
|
+
]), fe = C(() => v.value ? X.has(v.value.value.toUpperCase()) : !1), Se = C(() => {
|
|
2418
2418
|
const h = o.value || "";
|
|
2419
2419
|
return Math.max(h.split(`
|
|
2420
2420
|
`).length, 1);
|
|
2421
|
-
}),
|
|
2422
|
-
function
|
|
2423
|
-
let x =
|
|
2421
|
+
}), re = C(() => Array.from({ length: Se.value }, (h, O) => O + 1));
|
|
2422
|
+
function _e(h, O) {
|
|
2423
|
+
let x = O;
|
|
2424
2424
|
for (; x > 0 && /\w/.test(h[x - 1]); ) x--;
|
|
2425
|
-
let F =
|
|
2425
|
+
let F = O;
|
|
2426
2426
|
for (; F < h.length && /\w/.test(h[F]); ) F++;
|
|
2427
2427
|
return { start: x, end: F };
|
|
2428
2428
|
}
|
|
2429
|
-
const
|
|
2430
|
-
const h = o.value || "",
|
|
2429
|
+
const pe = C(() => {
|
|
2430
|
+
const h = o.value || "", O = b.value;
|
|
2431
2431
|
if (!h) return "";
|
|
2432
|
-
const { start: x, end: F } =
|
|
2432
|
+
const { start: x, end: F } = _e(h, O);
|
|
2433
2433
|
return h.substring(x, F);
|
|
2434
|
-
}), Re =
|
|
2435
|
-
|
|
2436
|
-
() => Re.value ||
|
|
2434
|
+
}), Re = C(() => pe.value.trim().length > 0);
|
|
2435
|
+
C(
|
|
2436
|
+
() => Re.value || Z.value.insideParens
|
|
2437
2437
|
);
|
|
2438
|
-
const
|
|
2438
|
+
const Z = C(() => {
|
|
2439
2439
|
var ae;
|
|
2440
|
-
const h = o.value || "",
|
|
2440
|
+
const h = o.value || "", O = b.value, x = h.substring(0, O), F = [];
|
|
2441
2441
|
for (let p = 0; p < x.length; p++)
|
|
2442
2442
|
h[p] === "(" ? F.push(p) : h[p] === ")" && F.pop();
|
|
2443
|
-
const
|
|
2444
|
-
if (
|
|
2445
|
-
const p = x.substring(
|
|
2443
|
+
const ue = F.length > 0 ? F[F.length - 1] : -1;
|
|
2444
|
+
if (ue !== -1) {
|
|
2445
|
+
const p = x.substring(ue + 1), xe = x.substring(0, ue).trimEnd(), Me = xe.match(/(\w+)$/), Ve = Me ? Me[1].toUpperCase() : "", ot = xe.match(/(\w+)\([^()]*\)\s+OVER$/i), Vt = Ve === "OVER" ? ((ae = ot == null ? void 0 : ot[1]) == null ? void 0 : ae.toUpperCase()) || "OVER" : Ve;
|
|
2446
2446
|
return {
|
|
2447
2447
|
insideParens: !0,
|
|
2448
|
-
functionName:
|
|
2449
|
-
guideFunctionName:
|
|
2448
|
+
functionName: Ve,
|
|
2449
|
+
guideFunctionName: Vt,
|
|
2450
2450
|
hasText: p.trim().length > 0
|
|
2451
2451
|
};
|
|
2452
2452
|
}
|
|
@@ -2456,7 +2456,7 @@ const xr = { class: "relative" }, Dr = ["placeholder", "onKeydown"], Ir = { clas
|
|
|
2456
2456
|
guideFunctionName: "",
|
|
2457
2457
|
hasText: !1
|
|
2458
2458
|
};
|
|
2459
|
-
}),
|
|
2459
|
+
}), Te = C(() => [
|
|
2460
2460
|
{
|
|
2461
2461
|
value: "TEXT",
|
|
2462
2462
|
label: "::text",
|
|
@@ -2497,14 +2497,14 @@ const xr = { class: "relative" }, Dr = ["placeholder", "onKeydown"], Ir = { clas
|
|
|
2497
2497
|
cursorOffset: 4,
|
|
2498
2498
|
aliases: ["::json"]
|
|
2499
2499
|
}
|
|
2500
|
-
]), Fe =
|
|
2501
|
-
const h = o.value || "",
|
|
2500
|
+
]), Fe = C(() => {
|
|
2501
|
+
const h = o.value || "", O = b.value, { start: x } = _e(h, O), F = h.substring(0, x);
|
|
2502
2502
|
return /::\s*$/.test(F);
|
|
2503
|
-
}),
|
|
2504
|
-
const h =
|
|
2503
|
+
}), d = C(() => {
|
|
2504
|
+
const h = pe.value.toLowerCase(), O = fe.value;
|
|
2505
2505
|
if (Fe.value)
|
|
2506
|
-
return
|
|
2507
|
-
(p) =>
|
|
2506
|
+
return Te.value.filter(
|
|
2507
|
+
(p) => l(h, "KEYWORD", [
|
|
2508
2508
|
p.label,
|
|
2509
2509
|
p.value,
|
|
2510
2510
|
...p.aliases || []
|
|
@@ -2517,8 +2517,8 @@ const xr = { class: "relative" }, Dr = ["placeholder", "onKeydown"], Ir = { clas
|
|
|
2517
2517
|
insertText: p.insertText,
|
|
2518
2518
|
cursorOffset: p.cursorOffset
|
|
2519
2519
|
}));
|
|
2520
|
-
const x =
|
|
2521
|
-
(p) =>
|
|
2520
|
+
const x = s.fieldDataList.filter(
|
|
2521
|
+
(p) => l(h, "FIELD", [
|
|
2522
2522
|
p.label,
|
|
2523
2523
|
p.value,
|
|
2524
2524
|
p.badge,
|
|
@@ -2530,8 +2530,8 @@ const xr = { class: "relative" }, Dr = ["placeholder", "onKeydown"], Ir = { clas
|
|
|
2530
2530
|
type: "FIELD",
|
|
2531
2531
|
badge: p.badge,
|
|
2532
2532
|
meta: p.meta
|
|
2533
|
-
})), F =
|
|
2534
|
-
(p) =>
|
|
2533
|
+
})), F = O ? [] : P.value.filter(
|
|
2534
|
+
(p) => l(h, "FUNCTION", [
|
|
2535
2535
|
p.value,
|
|
2536
2536
|
...p.aliases || []
|
|
2537
2537
|
])
|
|
@@ -2542,8 +2542,8 @@ const xr = { class: "relative" }, Dr = ["placeholder", "onKeydown"], Ir = { clas
|
|
|
2542
2542
|
description: p.description,
|
|
2543
2543
|
insertText: p.insertText,
|
|
2544
2544
|
cursorOffset: p.cursorOffset
|
|
2545
|
-
})),
|
|
2546
|
-
(p) =>
|
|
2545
|
+
})), ue = O ? [] : B.value.filter(
|
|
2546
|
+
(p) => l(h, "KEYWORD", [
|
|
2547
2547
|
p.label,
|
|
2548
2548
|
p.value,
|
|
2549
2549
|
...p.aliases || []
|
|
@@ -2555,31 +2555,31 @@ const xr = { class: "relative" }, Dr = ["placeholder", "onKeydown"], Ir = { clas
|
|
|
2555
2555
|
description: p.description,
|
|
2556
2556
|
insertText: p.insertText,
|
|
2557
2557
|
cursorOffset: p.cursorOffset
|
|
2558
|
-
})), ae =
|
|
2559
|
-
(p) =>
|
|
2558
|
+
})), ae = Z.value.insideParens && Z.value.functionName === "OVER" ? N.value.filter(
|
|
2559
|
+
(p) => l(h, "KEYWORD", [p.label])
|
|
2560
2560
|
).map((p) => ({
|
|
2561
2561
|
...p,
|
|
2562
2562
|
type: "KEYWORD"
|
|
2563
2563
|
/* Keyword */
|
|
2564
2564
|
})) : [];
|
|
2565
|
-
return [...F, ...
|
|
2566
|
-
}),
|
|
2567
|
-
if (!
|
|
2568
|
-
const h =
|
|
2569
|
-
return h && P.value.find((
|
|
2570
|
-
}),
|
|
2571
|
-
() =>
|
|
2572
|
-
),
|
|
2573
|
-
() =>
|
|
2574
|
-
),
|
|
2575
|
-
() =>
|
|
2565
|
+
return [...F, ...ue, ...ae, ...x];
|
|
2566
|
+
}), v = C(() => {
|
|
2567
|
+
if (!Z.value.insideParens) return null;
|
|
2568
|
+
const h = Z.value.guideFunctionName;
|
|
2569
|
+
return h && P.value.find((O) => O.value.toUpperCase() === h) || null;
|
|
2570
|
+
}), I = C(() => v.value ? "FUNCTION" : void 0), ne = C(
|
|
2571
|
+
() => d.value.find((h) => h.value === g.value)
|
|
2572
|
+
), oe = C(() => c.value && d.value.length > 0), me = C(
|
|
2573
|
+
() => c.value && Z.value.insideParens && !Z.value.hasText && v.value !== null
|
|
2574
|
+
), Ye = C(
|
|
2575
|
+
() => c.value && (me.value || oe.value)
|
|
2576
2576
|
);
|
|
2577
|
-
function
|
|
2578
|
-
const
|
|
2577
|
+
function he(h) {
|
|
2578
|
+
const O = h.getBoundingClientRect(), x = window.getComputedStyle(h), F = parseFloat(x.lineHeight) || 24, ue = h.value.substring(0, h.selectionStart), ae = document.createElement("div");
|
|
2579
2579
|
ae.style.cssText = `
|
|
2580
2580
|
position: fixed;
|
|
2581
|
-
top: ${
|
|
2582
|
-
left: ${
|
|
2581
|
+
top: ${O.top}px;
|
|
2582
|
+
left: ${O.left}px;
|
|
2583
2583
|
width: ${h.clientWidth}px;
|
|
2584
2584
|
height: ${h.clientHeight}px;
|
|
2585
2585
|
padding: ${x.padding};
|
|
@@ -2603,56 +2603,56 @@ const xr = { class: "relative" }, Dr = ["placeholder", "onKeydown"], Ir = { clas
|
|
|
2603
2603
|
tab-size: ${x.tabSize};
|
|
2604
2604
|
visibility: hidden;
|
|
2605
2605
|
pointer-events: none;
|
|
2606
|
-
`, ae.textContent =
|
|
2606
|
+
`, ae.textContent = ue;
|
|
2607
2607
|
const p = document.createElement("span");
|
|
2608
2608
|
p.textContent = "", ae.appendChild(p), document.body.appendChild(ae), ae.scrollTop = h.scrollTop, ae.scrollLeft = h.scrollLeft;
|
|
2609
2609
|
const xe = p.getBoundingClientRect();
|
|
2610
2610
|
document.body.removeChild(ae);
|
|
2611
|
-
const
|
|
2611
|
+
const Me = 8, Ve = 12, ot = 320, Vt = 360, eo = xe.top + F + Me, to = xe.left + Me, no = window.innerHeight - Vt - Ve, oo = window.innerWidth - ot - Ve;
|
|
2612
2612
|
return {
|
|
2613
|
-
top: Math.max(
|
|
2614
|
-
left: Math.max(
|
|
2613
|
+
top: Math.max(Ve, Math.min(eo, no)),
|
|
2614
|
+
left: Math.max(Ve, Math.min(to, oo))
|
|
2615
2615
|
};
|
|
2616
2616
|
}
|
|
2617
|
-
function
|
|
2618
|
-
|
|
2617
|
+
function nt() {
|
|
2618
|
+
y.value = !0, c.value = !0, we();
|
|
2619
2619
|
}
|
|
2620
|
-
function
|
|
2620
|
+
function Mt() {
|
|
2621
2621
|
setTimeout(() => {
|
|
2622
|
-
|
|
2622
|
+
y.value = !1, c.value = !1;
|
|
2623
2623
|
}, 150);
|
|
2624
2624
|
}
|
|
2625
|
-
function
|
|
2626
|
-
|
|
2625
|
+
function we() {
|
|
2626
|
+
u.value && (b.value = u.value.selectionStart, E.value = he(u.value));
|
|
2627
2627
|
}
|
|
2628
|
-
function
|
|
2629
|
-
const
|
|
2630
|
-
o.value = x.substring(0,
|
|
2631
|
-
var xe,
|
|
2632
|
-
(xe =
|
|
2633
|
-
const p = h.type === "FUNCTION" || h.type === "KEYWORD" ?
|
|
2634
|
-
(
|
|
2628
|
+
function Ne(h) {
|
|
2629
|
+
const O = h.type === "FIELD" ? h.value : h.insertText || (h.type === "FUNCTION" ? `${h.value}()` : h.value), x = o.value || "", F = b.value, { start: ue, end: ae } = _e(x, F);
|
|
2630
|
+
o.value = x.substring(0, ue) + O + x.substring(ae), rn(() => {
|
|
2631
|
+
var xe, Me;
|
|
2632
|
+
(xe = u.value) == null || xe.focus();
|
|
2633
|
+
const p = h.type === "FUNCTION" || h.type === "KEYWORD" ? ue + (h.cursorOffset ?? h.value.length + 1) : ue + O.length;
|
|
2634
|
+
(Me = u.value) == null || Me.setSelectionRange(p, p), c.value = !0, we();
|
|
2635
2635
|
});
|
|
2636
2636
|
}
|
|
2637
|
-
function
|
|
2637
|
+
function J(h) {
|
|
2638
2638
|
g.value = h;
|
|
2639
2639
|
}
|
|
2640
|
-
function
|
|
2641
|
-
!
|
|
2640
|
+
function Zn() {
|
|
2641
|
+
!oe.value || !ne.value || Ne(ne.value);
|
|
2642
2642
|
}
|
|
2643
|
-
function
|
|
2644
|
-
|
|
2643
|
+
function Jn() {
|
|
2644
|
+
u.value && f.value && (f.value.scrollTop = u.value.scrollTop);
|
|
2645
2645
|
}
|
|
2646
|
-
return (h,
|
|
2646
|
+
return (h, O) => {
|
|
2647
2647
|
var ae;
|
|
2648
|
-
const x = j("FmCircularProgress"), F = j("FmChip"),
|
|
2649
|
-
return D(), k("div",
|
|
2648
|
+
const x = j("FmCircularProgress"), F = j("FmChip"), ue = j("FmMenuDivider");
|
|
2649
|
+
return D(), k("div", Ir, [
|
|
2650
2650
|
A("div", {
|
|
2651
2651
|
class: "flex h-[200px] rounded-md overflow-hidden items-stretch",
|
|
2652
|
-
style:
|
|
2652
|
+
style: Qt({
|
|
2653
2653
|
outline: "none",
|
|
2654
|
-
border:
|
|
2655
|
-
boxShadow:
|
|
2654
|
+
border: y.value ? "2px solid var(--fm-color-primary)" : "1px solid rgb(212 212 216)",
|
|
2655
|
+
boxShadow: y.value ? "0 0 0 2px #fff4e4" : "none"
|
|
2656
2656
|
})
|
|
2657
2657
|
}, [
|
|
2658
2658
|
A("div", {
|
|
@@ -2660,137 +2660,137 @@ const xr = { class: "relative" }, Dr = ["placeholder", "onKeydown"], Ir = { clas
|
|
|
2660
2660
|
ref: f,
|
|
2661
2661
|
class: "h-full shrink-0 overflow-hidden select-none text-right min-w-[32px] px-2 py-1 text-fm-color-neutral-gray-300 fm-typo-en-body-lg-400 border-r leading-normal"
|
|
2662
2662
|
}, [
|
|
2663
|
-
(D(!0), k(Ae, null,
|
|
2663
|
+
(D(!0), k(Ae, null, It(re.value, (p) => (D(), k("div", { key: p }, q(p), 1))), 128))
|
|
2664
2664
|
], 512),
|
|
2665
|
-
|
|
2665
|
+
lo(A("textarea", {
|
|
2666
2666
|
ref_key: "textareaRef",
|
|
2667
|
-
ref:
|
|
2668
|
-
"onUpdate:modelValue":
|
|
2667
|
+
ref: u,
|
|
2668
|
+
"onUpdate:modelValue": O[0] || (O[0] = (p) => o.value = p),
|
|
2669
2669
|
placeholder: h.placeholder,
|
|
2670
2670
|
class: "fm-typo-en-body-lg-400 px-3 py-1 w-full resize-none h-full min-h-0 border-0 flex-1 leading-normal focus:outline-none fm-color-typo-primary",
|
|
2671
|
-
onFocus:
|
|
2672
|
-
onBlur:
|
|
2673
|
-
onInput:
|
|
2674
|
-
onClick:
|
|
2675
|
-
onKeyup:
|
|
2676
|
-
onKeydown:
|
|
2677
|
-
onScroll:
|
|
2678
|
-
}, null, 40,
|
|
2679
|
-
[
|
|
2671
|
+
onFocus: nt,
|
|
2672
|
+
onBlur: Mt,
|
|
2673
|
+
onInput: we,
|
|
2674
|
+
onClick: we,
|
|
2675
|
+
onKeyup: we,
|
|
2676
|
+
onKeydown: so(Ct(Zn, ["prevent"]), ["tab"]),
|
|
2677
|
+
onScroll: Jn
|
|
2678
|
+
}, null, 40, Or), [
|
|
2679
|
+
[uo, o.value]
|
|
2680
2680
|
])
|
|
2681
2681
|
], 4),
|
|
2682
|
-
A("div",
|
|
2683
|
-
h.isValidating ? (D(),
|
|
2682
|
+
A("div", Cr, [
|
|
2683
|
+
h.isValidating ? (D(), Ee(x, {
|
|
2684
2684
|
key: 0,
|
|
2685
2685
|
size: "md"
|
|
2686
2686
|
})) : U("", !0),
|
|
2687
|
-
!h.isValidating && h.validationResult && !h.validationResult.valid ? (D(), k("p",
|
|
2688
|
-
!h.isValidating && h.validationResult && h.validationResult.valid ? (D(), k("p",
|
|
2687
|
+
!h.isValidating && h.validationResult && !h.validationResult.valid ? (D(), k("p", Sr, q((ae = h.validationResult.error) == null ? void 0 : ae.message), 1)) : U("", !0),
|
|
2688
|
+
!h.isValidating && h.validationResult && h.validationResult.valid ? (D(), k("p", Rr, q(h.validFormulaLabel), 1)) : U("", !0)
|
|
2689
2689
|
]),
|
|
2690
|
-
|
|
2690
|
+
Ye.value ? (D(), k("div", {
|
|
2691
2691
|
key: 0,
|
|
2692
2692
|
class: "fixed z-[999] bg-fm-color-neutral-white shadow-light-300 rounded-md border border-neutral-200 min-w-[260px] max-w-[320px] max-h-[360px] overflow-x-hidden overflow-y-auto",
|
|
2693
|
-
style:
|
|
2693
|
+
style: Qt({
|
|
2694
2694
|
top: E.value.top + "px",
|
|
2695
2695
|
left: E.value.left + "px"
|
|
2696
2696
|
})
|
|
2697
2697
|
}, [
|
|
2698
|
-
|
|
2699
|
-
A("div",
|
|
2700
|
-
A("p",
|
|
2701
|
-
|
|
2698
|
+
me.value ? (D(), k("div", Fr, [
|
|
2699
|
+
A("div", Nr, [
|
|
2700
|
+
A("p", Ar, q(v.value.value) + "() ", 1),
|
|
2701
|
+
I.value ? (D(), Ee(F, {
|
|
2702
2702
|
key: 0,
|
|
2703
2703
|
compact: !0,
|
|
2704
|
-
class:
|
|
2704
|
+
class: Ot(n(I.value))
|
|
2705
2705
|
}, {
|
|
2706
|
-
default:
|
|
2707
|
-
A("p",
|
|
2706
|
+
default: de(() => [
|
|
2707
|
+
A("p", kr, q(e(I.value)), 1)
|
|
2708
2708
|
]),
|
|
2709
2709
|
_: 1
|
|
2710
2710
|
}, 8, ["class"])) : U("", !0)
|
|
2711
2711
|
]),
|
|
2712
|
-
A("p",
|
|
2713
|
-
|
|
2714
|
-
A("p",
|
|
2715
|
-
A("p",
|
|
2716
|
-
|
|
2717
|
-
A("p",
|
|
2718
|
-
A("p",
|
|
2712
|
+
A("p", Lr, q(v.value.description), 1),
|
|
2713
|
+
v.value.example ? (D(), k(Ae, { key: 0 }, [
|
|
2714
|
+
A("p", Pr, q(M(r)("report.formulaInput.section.example")), 1),
|
|
2715
|
+
A("p", Mr, q(v.value.example), 1),
|
|
2716
|
+
v.value.exampleResult ? (D(), k(Ae, { key: 0 }, [
|
|
2717
|
+
A("p", Vr, q(M(r)("report.formulaInput.section.result")), 1),
|
|
2718
|
+
A("p", Ur, q(v.value.exampleResult), 1)
|
|
2719
2719
|
], 64)) : U("", !0)
|
|
2720
2720
|
], 64)) : U("", !0)
|
|
2721
2721
|
])) : U("", !0),
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
(D(!0), k(Ae, null,
|
|
2722
|
+
me.value && oe.value ? (D(), Ee(ue, { key: 1 })) : U("", !0),
|
|
2723
|
+
oe.value ? (D(), k("div", Br, [
|
|
2724
|
+
(D(!0), k(Ae, null, It(d.value, (p) => (D(), k("div", {
|
|
2725
2725
|
key: p.value,
|
|
2726
|
-
class:
|
|
2726
|
+
class: Ot([
|
|
2727
2727
|
"flex items-start gap-2 px-3 py-1 cursor-pointer transition-colors fm-typo-en-body-lg-400",
|
|
2728
2728
|
g.value === p.value ? "bg-fm-color-primary-50 ring-1 ring-inset ring-fm-color-primary/20" : "hover:bg-fm-color-primary-50"
|
|
2729
2729
|
]),
|
|
2730
|
-
onMousedown:
|
|
2731
|
-
onMouseenter: (xe) =>
|
|
2732
|
-
onMouseleave:
|
|
2730
|
+
onMousedown: Ct((xe) => Ne(p), ["prevent"]),
|
|
2731
|
+
onMouseenter: (xe) => J(p.value),
|
|
2732
|
+
onMouseleave: O[1] || (O[1] = (xe) => J(null))
|
|
2733
2733
|
}, [
|
|
2734
|
-
A("div",
|
|
2735
|
-
A("div",
|
|
2736
|
-
A("span",
|
|
2737
|
-
p.type === "FIELD" && p.meta ? (D(), k("span",
|
|
2738
|
-
p.type === "FIELD" && p.badge ? (D(),
|
|
2734
|
+
A("div", Wr, [
|
|
2735
|
+
A("div", Yr, [
|
|
2736
|
+
A("span", Hr, q(p.label), 1),
|
|
2737
|
+
p.type === "FIELD" && p.meta ? (D(), k("span", Xr, q(p.meta), 1)) : U("", !0),
|
|
2738
|
+
p.type === "FIELD" && p.badge ? (D(), Ee(F, {
|
|
2739
2739
|
key: 1,
|
|
2740
2740
|
compact: !0,
|
|
2741
2741
|
class: "shrink-0 bg-fm-color-primary text-fm-color-typo-white"
|
|
2742
2742
|
}, {
|
|
2743
|
-
default:
|
|
2744
|
-
A("p",
|
|
2743
|
+
default: de(() => [
|
|
2744
|
+
A("p", Gr, q(p.badge), 1)
|
|
2745
2745
|
]),
|
|
2746
2746
|
_: 2
|
|
2747
2747
|
}, 1024)) : U("", !0),
|
|
2748
|
-
p.type === "FUNCTION" ? (D(),
|
|
2748
|
+
p.type === "FUNCTION" ? (D(), Ee(F, {
|
|
2749
2749
|
key: 2,
|
|
2750
2750
|
compact: !0,
|
|
2751
2751
|
class: "shrink-0 bg-fm-color-system-info-100 text-fm-color-typo-info"
|
|
2752
2752
|
}, {
|
|
2753
|
-
default:
|
|
2753
|
+
default: de(() => O[2] || (O[2] = [
|
|
2754
2754
|
A("p", { class: "fm-typo-en-body-sm-400" }, "FUNCTION", -1)
|
|
2755
2755
|
])),
|
|
2756
2756
|
_: 1
|
|
2757
2757
|
})) : U("", !0),
|
|
2758
|
-
p.type === "KEYWORD" ? (D(),
|
|
2758
|
+
p.type === "KEYWORD" ? (D(), Ee(F, {
|
|
2759
2759
|
key: 3,
|
|
2760
2760
|
compact: !0,
|
|
2761
2761
|
class: "shrink-0 text-fm-color-typo-secondary"
|
|
2762
2762
|
}, {
|
|
2763
|
-
default:
|
|
2763
|
+
default: de(() => O[3] || (O[3] = [
|
|
2764
2764
|
A("p", { class: "fm-typo-en-body-sm-400" }, "EXPR", -1)
|
|
2765
2765
|
])),
|
|
2766
2766
|
_: 1
|
|
2767
2767
|
})) : U("", !0)
|
|
2768
2768
|
]),
|
|
2769
|
-
p.type !== "FIELD" ? (D(), k("p",
|
|
2770
|
-
G(
|
|
2769
|
+
p.type !== "FIELD" ? (D(), k("p", zr, q(p.description), 1)) : U("", !0),
|
|
2770
|
+
G(ue)
|
|
2771
2771
|
])
|
|
2772
|
-
], 42,
|
|
2772
|
+
], 42, $r))), 128))
|
|
2773
2773
|
])) : U("", !0)
|
|
2774
2774
|
], 4)) : U("", !0)
|
|
2775
2775
|
]);
|
|
2776
2776
|
};
|
|
2777
2777
|
}
|
|
2778
|
-
}),
|
|
2779
|
-
const { businessId: o } = In(
|
|
2778
|
+
}), Kr = async (t, e, n = []) => {
|
|
2779
|
+
const { businessId: o } = In(Eo());
|
|
2780
2780
|
if (!t || !t.trim())
|
|
2781
2781
|
return { valid: !1, queryDatasource: e, error: { message: "Formula is empty" } };
|
|
2782
2782
|
if (!o.value)
|
|
2783
2783
|
return { valid: !1, queryDatasource: e, error: { message: "Business ID is not defined" } };
|
|
2784
2784
|
const r = {
|
|
2785
|
-
fetchType:
|
|
2785
|
+
fetchType: _o.Post,
|
|
2786
2786
|
url: `/${o.value}/formula/validate`,
|
|
2787
2787
|
data: { formula: t, queryDatasource: e, allowedFields: n }
|
|
2788
2788
|
};
|
|
2789
|
-
return
|
|
2789
|
+
return To.fetch(r);
|
|
2790
2790
|
};
|
|
2791
|
-
function
|
|
2792
|
-
const { getDataFormula: e, getDisplayFormula: n, getIsAdvance: o } = t, r = t.getAllowedFields || (() => []), a = t.getDatasource || (() =>
|
|
2793
|
-
function
|
|
2791
|
+
function qr(t) {
|
|
2792
|
+
const { getDataFormula: e, getDisplayFormula: n, getIsAdvance: o } = t, r = t.getAllowedFields || (() => []), a = t.getDatasource || (() => ho.Postgres), i = t.immediate ?? !1, l = Q(), s = Q(), u = Q(!1), f = Q(!1);
|
|
2793
|
+
function c() {
|
|
2794
2794
|
return r().map((g) => `${g.fieldId}:${g.type}`).sort().join("|");
|
|
2795
2795
|
}
|
|
2796
2796
|
function E(g) {
|
|
@@ -2803,10 +2803,10 @@ function jr(t) {
|
|
|
2803
2803
|
return;
|
|
2804
2804
|
}
|
|
2805
2805
|
try {
|
|
2806
|
-
const
|
|
2806
|
+
const fe = await Kr(P, a(), r());
|
|
2807
2807
|
if (!o() || X !== L)
|
|
2808
2808
|
return;
|
|
2809
|
-
g.setValidation(
|
|
2809
|
+
g.setValidation(fe);
|
|
2810
2810
|
} catch {
|
|
2811
2811
|
if (!o() || X !== L)
|
|
2812
2812
|
return;
|
|
@@ -2831,71 +2831,71 @@ function jr(t) {
|
|
|
2831
2831
|
}
|
|
2832
2832
|
g.setIsValidating(!0), H(P, X);
|
|
2833
2833
|
}
|
|
2834
|
-
function
|
|
2834
|
+
function B() {
|
|
2835
2835
|
L += 1, H.cancel(), g.setValidation(void 0), g.setIsValidating(!1);
|
|
2836
2836
|
}
|
|
2837
|
-
function
|
|
2837
|
+
function $() {
|
|
2838
2838
|
N(g.getFormula());
|
|
2839
2839
|
}
|
|
2840
2840
|
return {
|
|
2841
2841
|
trigger: N,
|
|
2842
|
-
clearAndCancel:
|
|
2843
|
-
revalidate:
|
|
2842
|
+
clearAndCancel: B,
|
|
2843
|
+
revalidate: $
|
|
2844
2844
|
};
|
|
2845
2845
|
}
|
|
2846
|
-
const
|
|
2846
|
+
const b = E({
|
|
2847
2847
|
getFormula: e,
|
|
2848
2848
|
setValidation: (g) => {
|
|
2849
|
-
|
|
2849
|
+
l.value = g;
|
|
2850
2850
|
},
|
|
2851
2851
|
setIsValidating: (g) => {
|
|
2852
|
-
|
|
2852
|
+
u.value = g;
|
|
2853
2853
|
}
|
|
2854
|
-
}),
|
|
2854
|
+
}), y = E({
|
|
2855
2855
|
getFormula: n,
|
|
2856
2856
|
setValidation: (g) => {
|
|
2857
|
-
|
|
2857
|
+
s.value = g;
|
|
2858
2858
|
},
|
|
2859
2859
|
setIsValidating: (g) => {
|
|
2860
2860
|
f.value = g;
|
|
2861
2861
|
}
|
|
2862
2862
|
});
|
|
2863
|
-
return
|
|
2863
|
+
return je(
|
|
2864
2864
|
() => e(),
|
|
2865
2865
|
(g) => {
|
|
2866
|
-
|
|
2866
|
+
b.trigger(g);
|
|
2867
2867
|
},
|
|
2868
2868
|
{ immediate: i }
|
|
2869
|
-
),
|
|
2869
|
+
), je(
|
|
2870
2870
|
() => n(),
|
|
2871
2871
|
(g) => {
|
|
2872
|
-
|
|
2872
|
+
y.trigger(g);
|
|
2873
2873
|
},
|
|
2874
2874
|
{ immediate: i }
|
|
2875
|
-
),
|
|
2875
|
+
), je(
|
|
2876
2876
|
() => o(),
|
|
2877
2877
|
(g) => {
|
|
2878
|
-
g ? (
|
|
2878
|
+
g ? (b.revalidate(), y.revalidate()) : (b.clearAndCancel(), y.clearAndCancel());
|
|
2879
2879
|
},
|
|
2880
2880
|
{ immediate: i }
|
|
2881
|
-
),
|
|
2882
|
-
() =>
|
|
2881
|
+
), je(
|
|
2882
|
+
() => c(),
|
|
2883
2883
|
() => {
|
|
2884
|
-
o() && (
|
|
2884
|
+
o() && (b.revalidate(), y.revalidate());
|
|
2885
2885
|
}
|
|
2886
2886
|
), {
|
|
2887
|
-
dataValidation:
|
|
2888
|
-
displayValidation:
|
|
2889
|
-
isDataValidating:
|
|
2887
|
+
dataValidation: l,
|
|
2888
|
+
displayValidation: s,
|
|
2889
|
+
isDataValidating: u,
|
|
2890
2890
|
isDisplayValidating: f
|
|
2891
2891
|
};
|
|
2892
2892
|
}
|
|
2893
|
-
const
|
|
2893
|
+
const Qr = { class: "grow" }, Zr = {
|
|
2894
2894
|
key: 2,
|
|
2895
2895
|
class: "w-full"
|
|
2896
|
-
},
|
|
2896
|
+
}, Jr = { key: 0 }, ea = /* @__PURE__ */ We({
|
|
2897
2897
|
__name: "FilterValueInput",
|
|
2898
|
-
props: /* @__PURE__ */
|
|
2898
|
+
props: /* @__PURE__ */ kt({
|
|
2899
2899
|
config: {
|
|
2900
2900
|
type: Object,
|
|
2901
2901
|
default: () => {
|
|
@@ -2912,64 +2912,64 @@ const Kr = { class: "grow" }, qr = {
|
|
|
2912
2912
|
}),
|
|
2913
2913
|
emits: ["update:modelValue"],
|
|
2914
2914
|
setup(t) {
|
|
2915
|
-
const e =
|
|
2916
|
-
function r(
|
|
2917
|
-
return (
|
|
2915
|
+
const e = tt(t, "modelValue"), n = t, o = Q([]);
|
|
2916
|
+
function r(s) {
|
|
2917
|
+
return (s ? Ut(s) : Ut()).format("HH:mm");
|
|
2918
2918
|
}
|
|
2919
|
-
function a({ hour:
|
|
2920
|
-
return
|
|
2919
|
+
function a({ hour: s, minute: u }) {
|
|
2920
|
+
return Ut().set("hour", s).set("minute", u).toISOString();
|
|
2921
2921
|
}
|
|
2922
|
-
function i(
|
|
2923
|
-
var
|
|
2924
|
-
const f = On(n.option),
|
|
2925
|
-
((
|
|
2922
|
+
function i(s, u) {
|
|
2923
|
+
var b, y;
|
|
2924
|
+
const f = On(n.option), c = Cn(n.option);
|
|
2925
|
+
((b = n.config) == null ? void 0 : b.type) === rt.TextField && (f !== void 0 && u < f || c !== void 0 && u > c) && (o.value[s] = `Value must be between ${f} and ${c}`);
|
|
2926
2926
|
const E = [...e.value];
|
|
2927
|
-
((
|
|
2928
|
-
hour: Number(
|
|
2929
|
-
minute: Number(
|
|
2930
|
-
}) : E[
|
|
2931
|
-
}
|
|
2932
|
-
function
|
|
2933
|
-
var
|
|
2934
|
-
if (
|
|
2935
|
-
e.value = [(
|
|
2927
|
+
((y = n.config) == null ? void 0 : y.type) === rt.Timestamp ? E[s] = a({
|
|
2928
|
+
hour: Number(u.split(":")[0]),
|
|
2929
|
+
minute: Number(u.split(":")[1])
|
|
2930
|
+
}) : E[s] = u, e.value = E;
|
|
2931
|
+
}
|
|
2932
|
+
function l(s) {
|
|
2933
|
+
var u;
|
|
2934
|
+
if (s === 0)
|
|
2935
|
+
e.value = [(u = n.config) == null ? void 0 : u.default, ...e.value];
|
|
2936
2936
|
else {
|
|
2937
2937
|
const f = [...e.value];
|
|
2938
|
-
f.splice(
|
|
2938
|
+
f.splice(s, 1), e.value = f;
|
|
2939
2939
|
}
|
|
2940
2940
|
}
|
|
2941
|
-
return (
|
|
2942
|
-
const f = j("FmSelect"),
|
|
2943
|
-
return D(!0), k(Ae, null,
|
|
2944
|
-
var L, H, N,
|
|
2941
|
+
return (s, u) => {
|
|
2942
|
+
const f = j("FmSelect"), c = j("FmTextField"), E = j("FmTimePicker"), b = j("FmButton");
|
|
2943
|
+
return D(!0), k(Ae, null, It(new Array(e.value.length !== 0 ? e.value.length : 1), (y, g) => {
|
|
2944
|
+
var L, H, N, B, $;
|
|
2945
2945
|
return D(), k("div", {
|
|
2946
2946
|
key: g,
|
|
2947
2947
|
class: "flex flex-row align-center gap-2 w-full"
|
|
2948
2948
|
}, [
|
|
2949
|
-
A("div",
|
|
2950
|
-
((L = n.config) == null ? void 0 : L.type) ===
|
|
2949
|
+
A("div", Qr, [
|
|
2950
|
+
((L = n.config) == null ? void 0 : L.type) === M(rt).Select ? (D(), Ee(f, {
|
|
2951
2951
|
key: 0,
|
|
2952
2952
|
"model-value": e.value[g],
|
|
2953
2953
|
items: n.config.options,
|
|
2954
2954
|
"onUpdate:modelValue": (P) => i(g, P)
|
|
2955
|
-
}, null, 8, ["model-value", "items", "onUpdate:modelValue"])) : ((H = n.config) == null ? void 0 : H.type) ===
|
|
2955
|
+
}, null, 8, ["model-value", "items", "onUpdate:modelValue"])) : ((H = n.config) == null ? void 0 : H.type) === M(rt).TextField ? (D(), Ee(c, {
|
|
2956
2956
|
key: 1,
|
|
2957
2957
|
"model-value": e.value[g],
|
|
2958
2958
|
type: ((N = n.config) == null ? void 0 : N.dataType) === "number" ? "number" : "text",
|
|
2959
2959
|
"helper-text": o.value[g] || void 0,
|
|
2960
2960
|
"helper-state": "error",
|
|
2961
2961
|
"onUpdate:modelValue": (P) => i(g, P)
|
|
2962
|
-
}, null, 8, ["model-value", "type", "helper-text", "onUpdate:modelValue"])) : ((
|
|
2962
|
+
}, null, 8, ["model-value", "type", "helper-text", "onUpdate:modelValue"])) : ((B = n.config) == null ? void 0 : B.type) === M(rt).Timestamp ? (D(), k("div", Zr, [
|
|
2963
2963
|
G(E, {
|
|
2964
2964
|
"model-value": r(e.value[g]),
|
|
2965
2965
|
"onUpdate:modelValue": (P) => i(g, P)
|
|
2966
2966
|
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
2967
2967
|
])) : U("", !0)
|
|
2968
2968
|
]),
|
|
2969
|
-
((
|
|
2970
|
-
G(
|
|
2969
|
+
(($ = n.config) == null ? void 0 : $.fixed) === !1 ? (D(), k("div", Jr, [
|
|
2970
|
+
G(b, {
|
|
2971
2971
|
icon: g === 0 ? "add" : "remove",
|
|
2972
|
-
onClick: (P) =>
|
|
2972
|
+
onClick: (P) => l(g)
|
|
2973
2973
|
}, null, 8, ["icon", "onClick"])
|
|
2974
2974
|
])) : U("", !0)
|
|
2975
2975
|
]);
|
|
@@ -2977,34 +2977,83 @@ const Kr = { class: "grow" }, qr = {
|
|
|
2977
2977
|
};
|
|
2978
2978
|
}
|
|
2979
2979
|
}), Qn = [
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
],
|
|
2987
|
-
(t) => t !==
|
|
2980
|
+
Ge.HourOfDay,
|
|
2981
|
+
Ge.DayOfMonth,
|
|
2982
|
+
Ge.DayOfWeek,
|
|
2983
|
+
Ge.MonthOfYear,
|
|
2984
|
+
Ge.TimeOfDay,
|
|
2985
|
+
Ge.DateTime
|
|
2986
|
+
], ta = Qn.filter(
|
|
2987
|
+
(t) => t !== Ge.DateTime
|
|
2988
2988
|
);
|
|
2989
|
-
function
|
|
2989
|
+
function Ia(t) {
|
|
2990
2990
|
return Qn.map((e) => ({
|
|
2991
2991
|
label: t(`report.section.filter.${Rn(e)}`),
|
|
2992
2992
|
value: e
|
|
2993
2993
|
}));
|
|
2994
2994
|
}
|
|
2995
|
-
function
|
|
2996
|
-
return
|
|
2995
|
+
function na(t) {
|
|
2996
|
+
return ta.map((e) => ({
|
|
2997
2997
|
label: t(`report.section.filter.${Rn(e)}`),
|
|
2998
2998
|
value: e
|
|
2999
2999
|
}));
|
|
3000
3000
|
}
|
|
3001
|
-
|
|
3001
|
+
function Dn(t) {
|
|
3002
|
+
return "aggregation" in t;
|
|
3003
|
+
}
|
|
3004
|
+
function oa({
|
|
3005
|
+
options: t,
|
|
3006
|
+
primaryFields: e,
|
|
3007
|
+
secondaryFields: n,
|
|
3008
|
+
getLabel: o
|
|
3009
|
+
}) {
|
|
3010
|
+
const r = C(() => {
|
|
3011
|
+
const l = /* @__PURE__ */ new Map();
|
|
3012
|
+
for (const s of e.value)
|
|
3013
|
+
l.set(gt(s), s);
|
|
3014
|
+
for (const s of n.value)
|
|
3015
|
+
l.set(gt(s), s);
|
|
3016
|
+
return Array.from(l.values());
|
|
3017
|
+
}), a = C(
|
|
3018
|
+
() => r.value.map((l) => ({
|
|
3019
|
+
label: o(l),
|
|
3020
|
+
value: gt(l),
|
|
3021
|
+
badge: Dn(l) ? "Metric" : "Dimension",
|
|
3022
|
+
meta: Dn(l) ? l.aggregation : void 0
|
|
3023
|
+
}))
|
|
3024
|
+
), i = C(
|
|
3025
|
+
() => r.value.map((l) => {
|
|
3026
|
+
var u;
|
|
3027
|
+
const s = (u = t.value.find(
|
|
3028
|
+
(f) => f.schemaName === l.schemaName && f.name === l.name
|
|
3029
|
+
)) == null ? void 0 : u.type;
|
|
3030
|
+
return s ? {
|
|
3031
|
+
fieldId: gt(l),
|
|
3032
|
+
type: s
|
|
3033
|
+
} : void 0;
|
|
3034
|
+
}).filter((l) => !!l)
|
|
3035
|
+
);
|
|
3036
|
+
return {
|
|
3037
|
+
formulaSuggestionFields: r,
|
|
3038
|
+
formulaFieldDataList: a,
|
|
3039
|
+
allowedFormulaFields: i
|
|
3040
|
+
};
|
|
3041
|
+
}
|
|
3042
|
+
const ra = { class: "flex flex-col my-2 gap-8" }, aa = { class: "fm-typo-en-body-lg-600" }, ia = { class: "fm-typo-en-body-sm-600 text-fm-color-neutral-gray-400" }, la = { class: "fm-typo-en-body-lg-400 text-ellipsis overflow-hidden line-clamp-1" }, Oa = /* @__PURE__ */ We({
|
|
3002
3043
|
__name: "FilterSection",
|
|
3003
|
-
props: /* @__PURE__ */
|
|
3044
|
+
props: /* @__PURE__ */ kt({
|
|
3004
3045
|
options: {
|
|
3005
3046
|
type: Array,
|
|
3006
3047
|
default: () => []
|
|
3007
3048
|
},
|
|
3049
|
+
dimensions: {
|
|
3050
|
+
type: Array,
|
|
3051
|
+
default: () => []
|
|
3052
|
+
},
|
|
3053
|
+
metrics: {
|
|
3054
|
+
type: Array,
|
|
3055
|
+
default: () => []
|
|
3056
|
+
},
|
|
3008
3057
|
label: {
|
|
3009
3058
|
type: String,
|
|
3010
3059
|
default: "title"
|
|
@@ -3015,252 +3064,228 @@ const ta = { class: "flex flex-col my-2 gap-8" }, na = { class: "fm-typo-en-body
|
|
|
3015
3064
|
}),
|
|
3016
3065
|
emits: ["update:modelValue"],
|
|
3017
3066
|
setup(t) {
|
|
3018
|
-
const { t: e, te: n } =
|
|
3067
|
+
const { t: e, te: n } = Lt(), o = tt(t, "modelValue"), r = t, a = C(() => e(`report.section.filter.${r.label}`)), i = Q(!1), l = wo(), s = C(
|
|
3019
3068
|
() => o.value.map((d, v) => {
|
|
3020
|
-
const
|
|
3021
|
-
(
|
|
3022
|
-
),
|
|
3069
|
+
const I = r.options.find(
|
|
3070
|
+
(oe) => oe.schemaName === d.schemaName && oe.name === d.name
|
|
3071
|
+
), ne = (I == null ? void 0 : I.labels) || [d.schemaName, d.name];
|
|
3023
3072
|
return {
|
|
3024
3073
|
index: v,
|
|
3025
|
-
label:
|
|
3074
|
+
label: ne.map((oe) => fn(e, n, oe, "other")).join(" "),
|
|
3026
3075
|
value: d
|
|
3027
3076
|
};
|
|
3028
3077
|
})
|
|
3029
|
-
),
|
|
3078
|
+
), u = Q(o.value.length > 0 ? 0 : void 0);
|
|
3030
3079
|
function f(d) {
|
|
3031
3080
|
var v;
|
|
3032
|
-
i.value = !0, g.value = [],
|
|
3081
|
+
i.value = !0, g.value = [], c.value = d != null && d.value ? JSON.parse(JSON.stringify(d.value)) : void 0, u.value = d == null ? void 0 : d.index, E.value = !!((v = c.value) != null && v.dataFormula), $();
|
|
3033
3082
|
}
|
|
3034
|
-
const
|
|
3083
|
+
const c = Q(void 0), E = Q(!1), b = Q(void 0), y = C(
|
|
3035
3084
|
() => r.options.find(
|
|
3036
3085
|
(d) => {
|
|
3037
|
-
var v,
|
|
3038
|
-
return d.schemaName === ((v =
|
|
3086
|
+
var v, I;
|
|
3087
|
+
return d.schemaName === ((v = c.value) == null ? void 0 : v.schemaName) && d.name === ((I = c.value) == null ? void 0 : I.name);
|
|
3039
3088
|
}
|
|
3040
3089
|
) ?? {}
|
|
3041
|
-
), g =
|
|
3090
|
+
), g = Q([]);
|
|
3042
3091
|
function L(d) {
|
|
3043
3092
|
var v;
|
|
3044
|
-
return (v = g.value.find((
|
|
3093
|
+
return (v = g.value.find((I) => I.option === d)) == null ? void 0 : v.value;
|
|
3045
3094
|
}
|
|
3046
3095
|
const H = Sn(
|
|
3047
3096
|
(d, v) => {
|
|
3048
|
-
const
|
|
3049
|
-
|
|
3097
|
+
const I = g.value.find((ne) => ne.option === d);
|
|
3098
|
+
I ? I.value = v : g.value.push({ option: d, value: v });
|
|
3050
3099
|
},
|
|
3051
3100
|
300
|
|
3052
3101
|
);
|
|
3053
|
-
|
|
3102
|
+
je(
|
|
3054
3103
|
[() => {
|
|
3055
3104
|
var d;
|
|
3056
|
-
return (d =
|
|
3105
|
+
return (d = c.value) == null ? void 0 : d.option;
|
|
3057
3106
|
}, () => {
|
|
3058
3107
|
var d;
|
|
3059
|
-
return (d =
|
|
3108
|
+
return (d = c.value) == null ? void 0 : d.values;
|
|
3060
3109
|
}],
|
|
3061
3110
|
([d, v]) => {
|
|
3062
3111
|
d !== void 0 && Array.isArray(v) && H(d, v);
|
|
3063
3112
|
},
|
|
3064
3113
|
{ deep: !0 }
|
|
3065
|
-
),
|
|
3114
|
+
), je(
|
|
3066
3115
|
() => {
|
|
3067
3116
|
var d;
|
|
3068
|
-
return (d =
|
|
3117
|
+
return (d = c.value) == null ? void 0 : d.option;
|
|
3069
3118
|
},
|
|
3070
3119
|
(d, v) => {
|
|
3071
|
-
v !== void 0 && d !== v &&
|
|
3120
|
+
v !== void 0 && d !== v && c.value && ($(), N(d), B());
|
|
3072
3121
|
}
|
|
3073
|
-
),
|
|
3122
|
+
), je(
|
|
3074
3123
|
() => {
|
|
3075
3124
|
var d;
|
|
3076
|
-
return (d =
|
|
3125
|
+
return (d = c.value) == null ? void 0 : d.operator;
|
|
3077
3126
|
},
|
|
3078
3127
|
(d, v) => {
|
|
3079
|
-
d !== v &&
|
|
3128
|
+
d !== v && y.value && c.value && ($(), N(c.value.option), B());
|
|
3080
3129
|
},
|
|
3081
3130
|
{
|
|
3082
3131
|
deep: !0
|
|
3083
3132
|
}
|
|
3084
3133
|
);
|
|
3085
3134
|
function N(d) {
|
|
3086
|
-
var
|
|
3087
|
-
if (!
|
|
3088
|
-
const v =
|
|
3089
|
-
let
|
|
3090
|
-
const
|
|
3091
|
-
Array.isArray(
|
|
3092
|
-
...
|
|
3093
|
-
values:
|
|
3135
|
+
var me;
|
|
3136
|
+
if (!c.value || !b.value) return;
|
|
3137
|
+
const v = u.value !== void 0 && o.value[u.value] && Array.isArray(o.value[u.value].values) ? [...o.value[u.value].values] : [], I = L(d);
|
|
3138
|
+
let ne;
|
|
3139
|
+
const oe = u.value !== void 0 ? (me = o.value[u.value]) == null ? void 0 : me.option : void 0;
|
|
3140
|
+
Array.isArray(I) ? ne = I : v.length > 0 && d === oe ? ne = v : ne = [b.value.default], c.value = {
|
|
3141
|
+
...c.value,
|
|
3142
|
+
values: ne
|
|
3094
3143
|
};
|
|
3095
3144
|
}
|
|
3096
|
-
function
|
|
3097
|
-
if (!
|
|
3098
|
-
const d =
|
|
3099
|
-
d > 0 &&
|
|
3100
|
-
...
|
|
3101
|
-
values:
|
|
3102
|
-
} : d < 0 && (
|
|
3103
|
-
...
|
|
3104
|
-
values: [...
|
|
3145
|
+
function B() {
|
|
3146
|
+
if (!b.value || !c.value) return;
|
|
3147
|
+
const d = c.value.values.length - b.value.count;
|
|
3148
|
+
d > 0 && b.value.fixed ? c.value = {
|
|
3149
|
+
...c.value,
|
|
3150
|
+
values: c.value.values.slice(0, b.value.count)
|
|
3151
|
+
} : d < 0 && (c.value = {
|
|
3152
|
+
...c.value,
|
|
3153
|
+
values: [...c.value.values, ...Array(Math.abs(d)).fill(b.value.default)]
|
|
3105
3154
|
});
|
|
3106
3155
|
}
|
|
3107
|
-
function
|
|
3108
|
-
|
|
3109
|
-
operator:
|
|
3110
|
-
dataType:
|
|
3111
|
-
dimensionOption:
|
|
3156
|
+
function $() {
|
|
3157
|
+
y.value && c.value && (b.value = go({
|
|
3158
|
+
operator: c.value.operator,
|
|
3159
|
+
dataType: y.value.type,
|
|
3160
|
+
dimensionOption: c.value.option,
|
|
3112
3161
|
t: e
|
|
3113
3162
|
}));
|
|
3114
3163
|
}
|
|
3115
3164
|
function P(d) {
|
|
3116
|
-
var v,
|
|
3117
|
-
(d.schemaName !== ((v =
|
|
3165
|
+
var v, I;
|
|
3166
|
+
(d.schemaName !== ((v = c.value) == null ? void 0 : v.schemaName) || d.name !== ((I = c.value) == null ? void 0 : I.name)) && (c.value = {
|
|
3118
3167
|
schemaName: d.schemaName,
|
|
3119
3168
|
name: d.name,
|
|
3120
3169
|
operator: d.filterOperators[0],
|
|
3121
3170
|
option: d.filterDimensionOptions[0],
|
|
3122
3171
|
values: []
|
|
3123
|
-
},
|
|
3172
|
+
}, $(), N(c.value.option), B());
|
|
3124
3173
|
}
|
|
3125
3174
|
function X() {
|
|
3126
|
-
var v,
|
|
3127
|
-
const d = [...
|
|
3128
|
-
if (
|
|
3129
|
-
E.value || (
|
|
3130
|
-
const
|
|
3131
|
-
(
|
|
3132
|
-
).filter((
|
|
3133
|
-
if (!
|
|
3134
|
-
|
|
3175
|
+
var v, I, ne;
|
|
3176
|
+
const d = [...s.value.map((oe) => oe.value)];
|
|
3177
|
+
if (c.value) {
|
|
3178
|
+
E.value || (c.value.dataFormula = void 0);
|
|
3179
|
+
const oe = On((v = c.value) == null ? void 0 : v.option), me = Cn((I = c.value) == null ? void 0 : I.option), Ye = (ne = c.value.values) == null ? void 0 : ne.map(
|
|
3180
|
+
(he, nt) => he == null || he === "" || !Fe(he, oe, me) ? nt : null
|
|
3181
|
+
).filter((he) => he !== null);
|
|
3182
|
+
if (!c.value.values || Ye.length > 0) {
|
|
3183
|
+
l.open({ message: "One or more values are invalid", type: "error" });
|
|
3135
3184
|
return;
|
|
3136
3185
|
}
|
|
3137
|
-
|
|
3138
|
-
(
|
|
3139
|
-
),
|
|
3186
|
+
c.value.values = c.value.values.filter(
|
|
3187
|
+
(he) => he !== "" && he !== null
|
|
3188
|
+
), u.value !== void 0 ? d[Number(u.value)] = c.value : d.push(c.value), o.value = d;
|
|
3140
3189
|
}
|
|
3141
3190
|
i.value = !1;
|
|
3142
3191
|
}
|
|
3143
|
-
function
|
|
3144
|
-
const v = [...
|
|
3192
|
+
function fe(d) {
|
|
3193
|
+
const v = [...s.value.map((I) => I.value)];
|
|
3145
3194
|
v.splice(d, 1), o.value = v, i.value = !1;
|
|
3146
3195
|
}
|
|
3147
|
-
const Se =
|
|
3196
|
+
const Se = C(
|
|
3148
3197
|
() => r.options.map((d) => ({
|
|
3149
3198
|
label: d.labels.join(" "),
|
|
3150
3199
|
value: d
|
|
3151
3200
|
}))
|
|
3152
3201
|
);
|
|
3153
|
-
function
|
|
3154
|
-
return
|
|
3155
|
-
}
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
return !l.value || !((d = b.value) != null && d.name) ? [] : [
|
|
3163
|
-
{
|
|
3164
|
-
label: `@self (${Te(b.value)})`,
|
|
3165
|
-
value: "@self"
|
|
3166
|
-
}
|
|
3167
|
-
];
|
|
3168
|
-
}
|
|
3169
|
-
), Re = R(
|
|
3170
|
-
() => {
|
|
3171
|
-
var d, v;
|
|
3172
|
-
return !((d = b.value) != null && d.name) || !((v = b.value) != null && v.type) ? [] : [
|
|
3173
|
-
{
|
|
3174
|
-
fieldId: ne(b.value),
|
|
3175
|
-
type: b.value.type
|
|
3176
|
-
}
|
|
3177
|
-
];
|
|
3178
|
-
}
|
|
3179
|
-
);
|
|
3180
|
-
function J(d) {
|
|
3181
|
-
var O;
|
|
3182
|
-
const v = (O = b.value) != null && O.name ? ne(b.value) : void 0;
|
|
3183
|
-
return v ? d == null ? void 0 : d.replace(/@self/g, v) : d;
|
|
3184
|
-
}
|
|
3185
|
-
const { dataValidation: we, isDataValidating: Fe } = jr({
|
|
3202
|
+
function re(d) {
|
|
3203
|
+
return [d.schemaName, d.name, fn(e, n, d.label, "other")].join(" ");
|
|
3204
|
+
}
|
|
3205
|
+
const { formulaFieldDataList: _e, allowedFormulaFields: pe } = oa({
|
|
3206
|
+
options: C(() => r.options),
|
|
3207
|
+
primaryFields: C(() => r.dimensions),
|
|
3208
|
+
secondaryFields: C(() => r.metrics),
|
|
3209
|
+
getLabel: re
|
|
3210
|
+
}), { dataValidation: Re, isDataValidating: Z } = qr({
|
|
3186
3211
|
getDataFormula: () => {
|
|
3187
3212
|
var d;
|
|
3188
|
-
return
|
|
3213
|
+
return (d = c.value) == null ? void 0 : d.dataFormula;
|
|
3189
3214
|
},
|
|
3190
3215
|
getDisplayFormula: () => {
|
|
3191
3216
|
},
|
|
3192
3217
|
getIsAdvance: () => E.value,
|
|
3193
|
-
getAllowedFields: () =>
|
|
3194
|
-
}),
|
|
3195
|
-
function
|
|
3196
|
-
return !(v !== void 0 && d < v ||
|
|
3218
|
+
getAllowedFields: () => pe.value
|
|
3219
|
+
}), Te = C(() => na(e));
|
|
3220
|
+
function Fe(d, v, I) {
|
|
3221
|
+
return !(v !== void 0 && d < v || I !== void 0 && d > I);
|
|
3197
3222
|
}
|
|
3198
3223
|
return (d, v) => {
|
|
3199
|
-
const
|
|
3200
|
-
return D(), k("div",
|
|
3201
|
-
G(
|
|
3224
|
+
const I = j("FmCheckbox"), ne = j("FmSelect"), oe = j("FmForm"), me = j("FmIcon"), Ye = j("FmButton"), he = j("FmListItem"), nt = j("FmList"), Mt = j("FmField");
|
|
3225
|
+
return D(), k("div", ra, [
|
|
3226
|
+
G(vo, {
|
|
3202
3227
|
modelValue: i.value,
|
|
3203
|
-
"onUpdate:modelValue": v[6] || (v[6] = (
|
|
3228
|
+
"onUpdate:modelValue": v[6] || (v[6] = (we) => i.value = we),
|
|
3204
3229
|
title: a.value,
|
|
3205
|
-
"primary-button-label":
|
|
3206
|
-
"secondary-button-label":
|
|
3230
|
+
"primary-button-label": M(e)("report.common.confirm"),
|
|
3231
|
+
"secondary-button-label": M(e)("report.common.cancel"),
|
|
3207
3232
|
onConfirm: X
|
|
3208
3233
|
}, {
|
|
3209
|
-
content:
|
|
3210
|
-
G(
|
|
3234
|
+
content: de(() => [
|
|
3235
|
+
G(oe, {
|
|
3211
3236
|
ref: "form",
|
|
3212
3237
|
class: "flex flex-col gap-2 w-[490px]"
|
|
3213
3238
|
}, {
|
|
3214
|
-
default:
|
|
3215
|
-
var
|
|
3239
|
+
default: de(() => {
|
|
3240
|
+
var we, Ne;
|
|
3216
3241
|
return [
|
|
3217
|
-
G(
|
|
3218
|
-
"model-value":
|
|
3242
|
+
G(dn, {
|
|
3243
|
+
"model-value": y.value,
|
|
3219
3244
|
items: Se.value,
|
|
3220
3245
|
placeholder: a.value,
|
|
3221
3246
|
label: a.value,
|
|
3222
|
-
"onUpdate:modelValue": v[0] || (v[0] = (
|
|
3247
|
+
"onUpdate:modelValue": v[0] || (v[0] = (J) => P(J))
|
|
3223
3248
|
}, null, 8, ["model-value", "items", "placeholder", "label"]),
|
|
3224
|
-
|
|
3225
|
-
G(
|
|
3249
|
+
c.value ? (D(), k(Ae, { key: 0 }, [
|
|
3250
|
+
G(I, {
|
|
3226
3251
|
modelValue: E.value,
|
|
3227
|
-
"onUpdate:modelValue": v[1] || (v[1] = (
|
|
3228
|
-
label:
|
|
3252
|
+
"onUpdate:modelValue": v[1] || (v[1] = (J) => E.value = J),
|
|
3253
|
+
label: M(e)("report.section.filter.advance"),
|
|
3229
3254
|
value: !0
|
|
3230
3255
|
}, null, 8, ["modelValue", "label"]),
|
|
3231
|
-
E.value ? (D(),
|
|
3256
|
+
E.value ? (D(), Ee(jr, {
|
|
3232
3257
|
key: 0,
|
|
3233
|
-
modelValue:
|
|
3234
|
-
"onUpdate:modelValue": v[2] || (v[2] = (
|
|
3235
|
-
placeholder:
|
|
3236
|
-
"field-data-list":
|
|
3237
|
-
"formula-field":
|
|
3238
|
-
"validation-result":
|
|
3239
|
-
"is-validating":
|
|
3240
|
-
"valid-formula-label":
|
|
3258
|
+
modelValue: c.value.dataFormula,
|
|
3259
|
+
"onUpdate:modelValue": v[2] || (v[2] = (J) => c.value.dataFormula = J),
|
|
3260
|
+
placeholder: M(e)("report.section.filter.dataFormula"),
|
|
3261
|
+
"field-data-list": M(_e),
|
|
3262
|
+
"formula-field": y.value.type === "NUMERIC" ? M(ee).Metric : M(ee).Dimension,
|
|
3263
|
+
"validation-result": M(Re),
|
|
3264
|
+
"is-validating": M(Z),
|
|
3265
|
+
"valid-formula-label": M(e)("report.common.validFormula")
|
|
3241
3266
|
}, null, 8, ["modelValue", "placeholder", "field-data-list", "formula-field", "validation-result", "is-validating", "valid-formula-label"])) : U("", !0),
|
|
3242
|
-
G(
|
|
3243
|
-
modelValue:
|
|
3244
|
-
"onUpdate:modelValue": v[3] || (v[3] = (
|
|
3245
|
-
items:
|
|
3246
|
-
placeholder:
|
|
3247
|
-
label:
|
|
3267
|
+
G(ne, {
|
|
3268
|
+
modelValue: c.value.option,
|
|
3269
|
+
"onUpdate:modelValue": v[3] || (v[3] = (J) => c.value.option = J),
|
|
3270
|
+
items: Te.value,
|
|
3271
|
+
placeholder: M(e)("report.section.filter.timeFormatter"),
|
|
3272
|
+
label: M(e)("report.section.filter.timeFormatter")
|
|
3248
3273
|
}, null, 8, ["modelValue", "items", "placeholder", "label"]),
|
|
3249
|
-
(((
|
|
3274
|
+
(((we = y.value) == null ? void 0 : we.filterOperators) || []).length > 0 ? (D(), Ee(dn, {
|
|
3250
3275
|
key: 1,
|
|
3251
|
-
modelValue:
|
|
3252
|
-
"onUpdate:modelValue": v[4] || (v[4] = (
|
|
3253
|
-
items: (((
|
|
3254
|
-
label:
|
|
3255
|
-
value:
|
|
3276
|
+
modelValue: c.value.operator,
|
|
3277
|
+
"onUpdate:modelValue": v[4] || (v[4] = (J) => c.value.operator = J),
|
|
3278
|
+
items: (((Ne = y.value) == null ? void 0 : Ne.filterOperators) ?? []).map((J) => ({
|
|
3279
|
+
label: M(e)("report.section.comparisonOperator." + J),
|
|
3280
|
+
value: J
|
|
3256
3281
|
}))
|
|
3257
3282
|
}, null, 8, ["modelValue", "items"])) : U("", !0),
|
|
3258
|
-
|
|
3259
|
-
key:
|
|
3260
|
-
modelValue:
|
|
3261
|
-
"onUpdate:modelValue": v[5] || (v[5] = (
|
|
3262
|
-
config:
|
|
3263
|
-
option:
|
|
3283
|
+
b.value ? (D(), Ee(ea, {
|
|
3284
|
+
key: c.value.option ?? "",
|
|
3285
|
+
modelValue: c.value.values,
|
|
3286
|
+
"onUpdate:modelValue": v[5] || (v[5] = (J) => c.value.values = J),
|
|
3287
|
+
config: b.value,
|
|
3288
|
+
option: c.value.option
|
|
3264
3289
|
}, null, 8, ["modelValue", "config", "option"])) : U("", !0)
|
|
3265
3290
|
], 64)) : U("", !0)
|
|
3266
3291
|
];
|
|
@@ -3271,30 +3296,30 @@ const ta = { class: "flex flex-col my-2 gap-8" }, na = { class: "fm-typo-en-body
|
|
|
3271
3296
|
_: 1
|
|
3272
3297
|
}, 8, ["modelValue", "title", "primary-button-label", "secondary-button-label"]),
|
|
3273
3298
|
A("div", null, [
|
|
3274
|
-
A("p",
|
|
3275
|
-
A("p",
|
|
3299
|
+
A("p", aa, q(a.value), 1),
|
|
3300
|
+
A("p", ia, q(M(e)("report.section.filter.description")), 1)
|
|
3276
3301
|
]),
|
|
3277
|
-
G(
|
|
3278
|
-
default:
|
|
3279
|
-
G(
|
|
3302
|
+
G(nt, null, {
|
|
3303
|
+
default: de(() => [
|
|
3304
|
+
G(M(Er), {
|
|
3280
3305
|
list: o.value,
|
|
3281
3306
|
"item-key": "id",
|
|
3282
3307
|
class: "flex flex-col gap-2 w-full"
|
|
3283
3308
|
}, {
|
|
3284
|
-
item:
|
|
3285
|
-
G(
|
|
3309
|
+
item: de(({ element: we, index: Ne }) => [
|
|
3310
|
+
G(he, {
|
|
3286
3311
|
class: "!cursor-grab border rounded-md border-neutral-300 h-[40px] !p-[8px]",
|
|
3287
|
-
onClick:
|
|
3312
|
+
onClick: Ct((J) => f(s.value[Ne]), ["stop"])
|
|
3288
3313
|
}, {
|
|
3289
|
-
default:
|
|
3290
|
-
G(
|
|
3291
|
-
A("p",
|
|
3314
|
+
default: de(() => [
|
|
3315
|
+
G(me, { name: "drag_handle" }),
|
|
3316
|
+
A("p", la, q(s.value[Ne].label), 1),
|
|
3292
3317
|
v[8] || (v[8] = A("div", { class: "grow" }, null, -1)),
|
|
3293
|
-
G(
|
|
3318
|
+
G(Ye, {
|
|
3294
3319
|
icon: "close",
|
|
3295
3320
|
size: "md",
|
|
3296
3321
|
variant: "tertiary",
|
|
3297
|
-
onClick:
|
|
3322
|
+
onClick: Ct((J) => fe(Ne), ["stop"])
|
|
3298
3323
|
}, null, 8, ["onClick"])
|
|
3299
3324
|
]),
|
|
3300
3325
|
_: 2
|
|
@@ -3305,21 +3330,21 @@ const ta = { class: "flex flex-col my-2 gap-8" }, na = { class: "fm-typo-en-body
|
|
|
3305
3330
|
]),
|
|
3306
3331
|
_: 1
|
|
3307
3332
|
}),
|
|
3308
|
-
G(
|
|
3333
|
+
G(Mt, {
|
|
3309
3334
|
class: "text-fm-color-typo-tertiary",
|
|
3310
3335
|
onClick: v[7] || (v[7] = () => {
|
|
3311
3336
|
f();
|
|
3312
3337
|
})
|
|
3313
3338
|
}, {
|
|
3314
|
-
default:
|
|
3315
|
-
|
|
3339
|
+
default: de(() => [
|
|
3340
|
+
co(q(M(e)("report.section.filter.add")), 1)
|
|
3316
3341
|
]),
|
|
3317
3342
|
_: 1
|
|
3318
3343
|
})
|
|
3319
3344
|
]);
|
|
3320
3345
|
};
|
|
3321
3346
|
}
|
|
3322
|
-
}),
|
|
3347
|
+
}), Ca = Q(null), Sa = Q([]), sa = /* @__PURE__ */ We({
|
|
3323
3348
|
__name: "TransitionFade",
|
|
3324
3349
|
props: {
|
|
3325
3350
|
modelValue: { type: Boolean, required: !0, default: !0 },
|
|
@@ -3327,38 +3352,39 @@ const ta = { class: "flex flex-col my-2 gap-8" }, na = { class: "fm-typo-en-body
|
|
|
3327
3352
|
},
|
|
3328
3353
|
emits: ["update:modelValue"],
|
|
3329
3354
|
setup(t) {
|
|
3330
|
-
const e =
|
|
3355
|
+
const e = tt(t, "modelValue");
|
|
3331
3356
|
return (n, o) => (D(), k(Ae, null, [
|
|
3332
|
-
G(
|
|
3333
|
-
default:
|
|
3334
|
-
e.value ?
|
|
3357
|
+
G(Zt, { name: "slide-fade-right" }, {
|
|
3358
|
+
default: de(() => [
|
|
3359
|
+
e.value ? pt(n.$slots, "right", { key: 0 }, void 0, !0) : U("", !0)
|
|
3335
3360
|
]),
|
|
3336
3361
|
_: 3
|
|
3337
3362
|
}),
|
|
3338
|
-
G(
|
|
3339
|
-
default:
|
|
3340
|
-
e.value ? U("", !0) :
|
|
3363
|
+
G(Zt, { name: "slide-fade-left" }, {
|
|
3364
|
+
default: de(() => [
|
|
3365
|
+
e.value ? U("", !0) : pt(n.$slots, "left", { key: 0 }, void 0, !0)
|
|
3341
3366
|
]),
|
|
3342
3367
|
_: 3
|
|
3343
3368
|
})
|
|
3344
3369
|
], 64));
|
|
3345
3370
|
}
|
|
3346
|
-
}),
|
|
3371
|
+
}), Ra = /* @__PURE__ */ an(sa, [["__scopeId", "data-v-a98ca9bc"]]);
|
|
3347
3372
|
export {
|
|
3348
3373
|
ee as F,
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3374
|
+
Da as S,
|
|
3375
|
+
Ra as T,
|
|
3376
|
+
Ta as W,
|
|
3377
|
+
ea as _,
|
|
3378
|
+
Oa as a,
|
|
3379
|
+
Ca as b,
|
|
3380
|
+
_a as c,
|
|
3381
|
+
Er as d,
|
|
3382
|
+
Sa as e,
|
|
3383
|
+
qr as f,
|
|
3384
|
+
Ia as g,
|
|
3385
|
+
xa as h,
|
|
3386
|
+
wa as i,
|
|
3387
|
+
jr as j,
|
|
3388
|
+
wr as k,
|
|
3389
|
+
oa as u
|
|
3364
3390
|
};
|