@feedmepos/mf-report 5.27.13 → 5.27.14-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-BlHs_KyM.js → App-CcdMlfSd.js} +96 -95
- package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-OQRT1HAp.js +389 -0
- package/dist/{Default.vue_vue_type_script_setup_true_lang-CxR3luuJ.js → Default.vue_vue_type_script_setup_true_lang-BoZCI7kN.js} +1 -1
- package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-DJTZFtNV.js +5079 -0
- package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-oCAIT-ax.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-faQ1wSGW.js} +5193 -4810
- package/dist/{InsightView-N5Lzz_b4.js → InsightView-B7hXryQe.js} +4 -4
- package/dist/{Integration-BotRTI4i.js → Integration-Cm0DNd94.js} +3 -3
- package/dist/{Integrations-B26o5QXd.js → Integrations-s2XnL_lQ.js} +2 -2
- package/dist/{Layout-6NKUqxol.js → Layout-BaxsdPkO.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-BijCez3Y.js → MenuTab.vue_vue_type_script_setup_true_lang-D-uVoZ83.js} +4 -4
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-CA9MugVT.js → NavigationTab.vue_vue_type_script_setup_true_lang-40Mxqpsi.js} +2795 -2779
- package/dist/{OverviewView-vdfq-4MN.js → OverviewView-YYCDda7Z.js} +4 -4
- package/dist/{Report-Dz8mKOpQ.js → Report-fQv1rMXB.js} +3 -3
- package/dist/ReportEditor-BQi5vZ5G.js +1828 -0
- package/dist/{ReportView-DHNMt0BV.js → ReportView-CePzSNVf.js} +6 -6
- package/dist/{Setting-Cpy5DtfI.js → Setting-DA1IUerO.js} +14 -14
- package/dist/{Template-6U_iB8qy.js → Template-BNwoCMjJ.js} +3 -3
- package/dist/TileEditor-EBbG7Odu.js +4064 -0
- package/dist/TileGrid.vue_vue_type_script_setup_true_lang-BseyYYvj.js +154 -0
- package/dist/{TransitionFade-C7B6bWjS.js → TransitionFade-vNYa-qkr.js} +760 -828
- package/dist/{app-Dz4qiCQj.js → app-D2QVuN8P.js} +388 -291
- package/dist/app.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{useRestaurantPermission-DDTn3OLP.js → useRestaurantPermission-qFfSh5xv.js} +1 -1
- package/package.json +1 -1
- package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-B9yWyW2A.js +0 -383
- package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-BZdgw5zR.js +0 -4922
- package/dist/ReportEditor-CSq4R2KR.js +0 -1826
- package/dist/TileEditor-REt2Wbx9.js +0 -4036
- package/dist/TileGrid.vue_vue_type_script_setup_true_lang-D0rrgUXG.js +0 -152
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { defineComponent as We, onBeforeMount as ro, onBeforeUnmount as
|
|
1
|
+
import { defineComponent as We, onBeforeMount as ro, onBeforeUnmount as io, resolveComponent as z, createElementBlock as k, openBlock as D, normalizeStyle as Qt, unref as P, renderSlot as pt, createVNode as G, createElementVNode as A, toDisplayString as j, TransitionGroup as ao, nextTick as rn, h as cn, mergeModels as kt, useModel as tt, computed as S, Fragment as Ne, renderList as It, createBlock as be, normalizeClass as Ot, withCtx as ce, Transition as Zt, createCommentVNode as U, ref as q, withDirectives as lo, withKeys as so, withModifiers as St, vModelText as uo, watch as Ke, createTextVNode as co } from "vue";
|
|
2
2
|
import { u as Lt, a as fo, _ as an } from "./_plugin-vue_export-helper-onplcgja.js";
|
|
3
3
|
import { useCoreStore as po } from "@feedmepos/mf-common";
|
|
4
4
|
import { storeToRefs as In } from "pinia";
|
|
5
5
|
import { useRoute as mo } from "vue-router";
|
|
6
|
-
import { W as
|
|
7
|
-
import { p as bo, d as
|
|
8
|
-
import {
|
|
9
|
-
import { u as Eo, F as _o, r as To, d as Ut } from "./app-Dz4qiCQj.js";
|
|
6
|
+
import { W as xe, Q as ho, I as rt, t as On, v as Sn, c as Ge, g as go, q as vo } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-faQ1wSGW.js";
|
|
7
|
+
import { p as bo, d as Cn, a as Rn } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-OQRT1HAp.js";
|
|
8
|
+
import { u as yo, F as Eo, r as _o, d as Ut } from "./app-D2QVuN8P.js";
|
|
10
9
|
import { a as dn } from "./SelectComponent.vue_vue_type_script_setup_true_lang-CGbb3b5G.js";
|
|
11
10
|
import { r as fn } from "./i18n-CI_sQ5d_.js";
|
|
12
|
-
import { useSnackbar as
|
|
13
|
-
|
|
11
|
+
import { useSnackbar as To } from "@feedmepos/ui-library";
|
|
12
|
+
import { g as gt } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-DJTZFtNV.js";
|
|
13
|
+
const wo = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "flex gap-24 flex-col h-screen w-screen justify-center items-center"
|
|
16
|
-
},
|
|
16
|
+
}, xo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, yi = /* @__PURE__ */ We({
|
|
17
17
|
__name: "FullScreen",
|
|
18
18
|
setup(t) {
|
|
19
19
|
const { t: e } = Lt(), n = mo(), { isLoading: o } = In(fo()), r = po();
|
|
20
20
|
return ro(() => {
|
|
21
21
|
r.hideSidebarToggle(!0);
|
|
22
|
-
}),
|
|
22
|
+
}), io(() => {
|
|
23
23
|
r.hideSidebarToggle(!1);
|
|
24
|
-
}), (
|
|
25
|
-
const l =
|
|
24
|
+
}), (i, a) => {
|
|
25
|
+
const l = z("FmCircularProgress");
|
|
26
26
|
return D(), k("div", {
|
|
27
27
|
class: "mx-auto",
|
|
28
28
|
style: Qt({
|
|
29
|
-
height: `calc(100vh - ${
|
|
29
|
+
height: `calc(100vh - ${P(n).query.token && P(n).query.businessId ? "0" : "64"}px)`
|
|
30
30
|
})
|
|
31
31
|
}, [
|
|
32
|
-
|
|
32
|
+
P(o) ? (D(), k("div", wo, [
|
|
33
33
|
G(l, { size: "xl" }),
|
|
34
|
-
A("span",
|
|
35
|
-
])) : pt(
|
|
34
|
+
A("span", xo, j(P(e)("report.common.isLoading")), 1)
|
|
35
|
+
])) : pt(i.$slots, "default", { key: 1 })
|
|
36
36
|
], 4);
|
|
37
37
|
};
|
|
38
38
|
}
|
|
@@ -53,11 +53,11 @@ function pn(t, e) {
|
|
|
53
53
|
}
|
|
54
54
|
return n;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function Oe(t) {
|
|
57
57
|
for (var e = 1; e < arguments.length; e++) {
|
|
58
58
|
var n = arguments[e] != null ? arguments[e] : {};
|
|
59
59
|
e % 2 ? pn(Object(n), !0).forEach(function(o) {
|
|
60
|
-
|
|
60
|
+
Do(t, o, n[o]);
|
|
61
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
|
});
|
|
@@ -72,7 +72,7 @@ function _t(t) {
|
|
|
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 Do(t, e, n) {
|
|
76
76
|
return e in t ? Object.defineProperty(t, e, {
|
|
77
77
|
value: n,
|
|
78
78
|
enumerable: !0,
|
|
@@ -80,49 +80,49 @@ function Io(t, e, n) {
|
|
|
80
80
|
writable: !0
|
|
81
81
|
}) : t[e] = n, t;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
84
|
-
return
|
|
83
|
+
function ke() {
|
|
84
|
+
return ke = Object.assign || function(t) {
|
|
85
85
|
for (var e = 1; e < arguments.length; e++) {
|
|
86
86
|
var n = arguments[e];
|
|
87
87
|
for (var o in n)
|
|
88
88
|
Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]);
|
|
89
89
|
}
|
|
90
90
|
return t;
|
|
91
|
-
},
|
|
91
|
+
}, ke.apply(this, arguments);
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function Io(t, e) {
|
|
94
94
|
if (t == null) return {};
|
|
95
|
-
var n = {}, o = Object.keys(t), r,
|
|
96
|
-
for (
|
|
97
|
-
r = o[
|
|
95
|
+
var n = {}, o = Object.keys(t), r, i;
|
|
96
|
+
for (i = 0; i < o.length; i++)
|
|
97
|
+
r = o[i], !(e.indexOf(r) >= 0) && (n[r] = t[r]);
|
|
98
98
|
return n;
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function Oo(t, e) {
|
|
101
101
|
if (t == null) return {};
|
|
102
|
-
var n =
|
|
102
|
+
var n = Io(t, e), o, r;
|
|
103
103
|
if (Object.getOwnPropertySymbols) {
|
|
104
|
-
var
|
|
105
|
-
for (r = 0; r <
|
|
106
|
-
o =
|
|
104
|
+
var i = Object.getOwnPropertySymbols(t);
|
|
105
|
+
for (r = 0; r < i.length; r++)
|
|
106
|
+
o = i[r], !(e.indexOf(o) >= 0) && Object.prototype.propertyIsEnumerable.call(t, o) && (n[o] = t[o]);
|
|
107
107
|
}
|
|
108
108
|
return n;
|
|
109
109
|
}
|
|
110
110
|
var So = "1.14.0";
|
|
111
|
-
function
|
|
111
|
+
function Ae(t) {
|
|
112
112
|
if (typeof window < "u" && window.navigator)
|
|
113
113
|
return !!/* @__PURE__ */ navigator.userAgent.match(t);
|
|
114
114
|
}
|
|
115
|
-
var
|
|
115
|
+
var Le = Ae(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), mt = Ae(/Edge/i), mn = Ae(/firefox/i), st = Ae(/safari/i) && !Ae(/chrome/i) && !Ae(/android/i), Fn = Ae(/iP(ad|od|hone)/i), Co = Ae(/chrome/i) && Ae(/android/i), Nn = {
|
|
116
116
|
capture: !1,
|
|
117
117
|
passive: !1
|
|
118
118
|
};
|
|
119
119
|
function R(t, e, n) {
|
|
120
|
-
t.addEventListener(e, n, !
|
|
120
|
+
t.addEventListener(e, n, !Le && Nn);
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
t.removeEventListener(e, n, !
|
|
122
|
+
function C(t, e, n) {
|
|
123
|
+
t.removeEventListener(e, n, !Le && Nn);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function Ct(t, e) {
|
|
126
126
|
if (e) {
|
|
127
127
|
if (e[0] === ">" && (e = e.substring(1)), t)
|
|
128
128
|
try {
|
|
@@ -138,22 +138,22 @@ function St(t, e) {
|
|
|
138
138
|
return !1;
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function Ro(t) {
|
|
142
142
|
return t.host && t !== document && t.host.nodeType ? t.host : t.parentNode;
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function De(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 && Ct(t, e) : Ct(t, e)) || o && t === n)
|
|
149
149
|
return t;
|
|
150
150
|
if (t === n) break;
|
|
151
|
-
} while (t =
|
|
151
|
+
} while (t = Ro(t));
|
|
152
152
|
}
|
|
153
153
|
return null;
|
|
154
154
|
}
|
|
155
155
|
var hn = /\s+/g;
|
|
156
|
-
function
|
|
156
|
+
function me(t, e, n) {
|
|
157
157
|
if (t && e)
|
|
158
158
|
if (t.classList)
|
|
159
159
|
t.classList[n ? "add" : "remove"](e);
|
|
@@ -184,35 +184,35 @@ function Je(t, e) {
|
|
|
184
184
|
}
|
|
185
185
|
function An(t, e, n) {
|
|
186
186
|
if (t) {
|
|
187
|
-
var o = t.getElementsByTagName(e), r = 0,
|
|
187
|
+
var o = t.getElementsByTagName(e), r = 0, i = o.length;
|
|
188
188
|
if (n)
|
|
189
|
-
for (; r <
|
|
189
|
+
for (; r < i; r++)
|
|
190
190
|
n(o[r], r);
|
|
191
191
|
return o;
|
|
192
192
|
}
|
|
193
193
|
return [];
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function Ie() {
|
|
196
196
|
var t = document.scrollingElement;
|
|
197
197
|
return t || document.documentElement;
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function ee(t, e, n, o, r) {
|
|
200
200
|
if (!(!t.getBoundingClientRect && t !== window)) {
|
|
201
|
-
var
|
|
202
|
-
if (t !== window && t.parentNode && t !==
|
|
201
|
+
var i, a, l, s, u, f, c;
|
|
202
|
+
if (t !== window && t.parentNode && t !== Ie() ? (i = t.getBoundingClientRect(), a = i.top, l = i.left, s = i.bottom, u = i.right, f = i.height, c = i.width) : (a = 0, l = 0, s = window.innerHeight, u = window.innerWidth, f = window.innerHeight, c = window.innerWidth), (e || n) && t !== window && (r = r || t.parentNode, !Le))
|
|
203
203
|
do
|
|
204
204
|
if (r && r.getBoundingClientRect && (_(r, "transform") !== "none" || n && _(r, "position") !== "static")) {
|
|
205
205
|
var E = r.getBoundingClientRect();
|
|
206
|
-
|
|
206
|
+
a -= E.top + parseInt(_(r, "border-top-width")), l -= E.left + parseInt(_(r, "border-left-width")), s = a + i.height, u = l + i.width;
|
|
207
207
|
break;
|
|
208
208
|
}
|
|
209
209
|
while (r = r.parentNode);
|
|
210
210
|
if (o && t !== window) {
|
|
211
211
|
var b = Je(r || t), y = b && b.a, g = b && b.d;
|
|
212
|
-
b && (
|
|
212
|
+
b && (a /= g, l /= y, c /= y, f /= g, s = a + f, u = l + c);
|
|
213
213
|
}
|
|
214
214
|
return {
|
|
215
|
-
top:
|
|
215
|
+
top: a,
|
|
216
216
|
left: l,
|
|
217
217
|
bottom: s,
|
|
218
218
|
right: u,
|
|
@@ -222,48 +222,48 @@ function te(t, e, n, o, r) {
|
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
function gn(t, e, n) {
|
|
225
|
-
for (var o =
|
|
226
|
-
var
|
|
227
|
-
if (
|
|
228
|
-
if (o ===
|
|
229
|
-
o =
|
|
225
|
+
for (var o = Be(t, !0), r = ee(t)[e]; o; ) {
|
|
226
|
+
var i = ee(o)[n], a = void 0;
|
|
227
|
+
if (a = r >= i, !a) return o;
|
|
228
|
+
if (o === Ie()) break;
|
|
229
|
+
o = Be(o, !1);
|
|
230
230
|
}
|
|
231
231
|
return !1;
|
|
232
232
|
}
|
|
233
233
|
function et(t, e, n, o) {
|
|
234
|
-
for (var r = 0,
|
|
235
|
-
if (i
|
|
234
|
+
for (var r = 0, i = 0, a = t.children; i < a.length; ) {
|
|
235
|
+
if (a[i].style.display !== "none" && a[i] !== T.ghost && (o || a[i] !== T.dragged) && De(a[i], n.draggable, t, !1)) {
|
|
236
236
|
if (r === e)
|
|
237
|
-
return i
|
|
237
|
+
return a[i];
|
|
238
238
|
r++;
|
|
239
239
|
}
|
|
240
|
-
|
|
240
|
+
i++;
|
|
241
241
|
}
|
|
242
242
|
return null;
|
|
243
243
|
}
|
|
244
244
|
function ln(t, e) {
|
|
245
|
-
for (var n = t.lastElementChild; n && (n === T.ghost || _(n, "display") === "none" || e && !
|
|
245
|
+
for (var n = t.lastElementChild; n && (n === T.ghost || _(n, "display") === "none" || e && !Ct(n, e)); )
|
|
246
246
|
n = n.previousElementSibling;
|
|
247
247
|
return n || null;
|
|
248
248
|
}
|
|
249
|
-
function
|
|
249
|
+
function ve(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 || Ct(t, e)) && n++;
|
|
255
255
|
return n;
|
|
256
256
|
}
|
|
257
257
|
function vn(t) {
|
|
258
|
-
var e = 0, n = 0, o =
|
|
258
|
+
var e = 0, n = 0, o = Ie();
|
|
259
259
|
if (t)
|
|
260
260
|
do {
|
|
261
|
-
var r = Je(t),
|
|
262
|
-
e += t.scrollLeft *
|
|
261
|
+
var r = Je(t), i = r.a, a = r.d;
|
|
262
|
+
e += t.scrollLeft * i, n += t.scrollTop * a;
|
|
263
263
|
} while (t !== o && (t = t.parentNode));
|
|
264
264
|
return [e, n];
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function Fo(t, e) {
|
|
267
267
|
for (var n in t)
|
|
268
268
|
if (t.hasOwnProperty(n)) {
|
|
269
269
|
for (var o in e)
|
|
@@ -271,28 +271,28 @@ function No(t, e) {
|
|
|
271
271
|
}
|
|
272
272
|
return -1;
|
|
273
273
|
}
|
|
274
|
-
function
|
|
275
|
-
if (!t || !t.getBoundingClientRect) return
|
|
274
|
+
function Be(t, e) {
|
|
275
|
+
if (!t || !t.getBoundingClientRect) return Ie();
|
|
276
276
|
var n = t, o = !1;
|
|
277
277
|
do
|
|
278
278
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
279
279
|
var r = _(n);
|
|
280
280
|
if (n.clientWidth < n.scrollWidth && (r.overflowX == "auto" || r.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (r.overflowY == "auto" || r.overflowY == "scroll")) {
|
|
281
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
281
|
+
if (!n.getBoundingClientRect || n === document.body) return Ie();
|
|
282
282
|
if (o || e) return n;
|
|
283
283
|
o = !0;
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
286
|
while (n = n.parentNode);
|
|
287
|
-
return
|
|
287
|
+
return Ie();
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function No(t, e) {
|
|
290
290
|
if (t && e)
|
|
291
291
|
for (var n in e)
|
|
292
292
|
e.hasOwnProperty(n) && (t[n] = e[n]);
|
|
293
293
|
return t;
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function $t(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
298
|
var ut;
|
|
@@ -306,18 +306,18 @@ function kn(t, e) {
|
|
|
306
306
|
}
|
|
307
307
|
};
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function Ao() {
|
|
310
310
|
clearTimeout(ut), ut = void 0;
|
|
311
311
|
}
|
|
312
312
|
function Ln(t, e, n) {
|
|
313
313
|
t.scrollLeft += e, t.scrollTop += n;
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function Mn(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 ge = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
320
|
+
function ko() {
|
|
321
321
|
var t = [], e;
|
|
322
322
|
return {
|
|
323
323
|
captureAnimationState: function() {
|
|
@@ -327,14 +327,14 @@ function Lo() {
|
|
|
327
327
|
if (!(_(r, "display") === "none" || r === T.ghost)) {
|
|
328
328
|
t.push({
|
|
329
329
|
target: r,
|
|
330
|
-
rect:
|
|
330
|
+
rect: ee(r)
|
|
331
331
|
});
|
|
332
|
-
var
|
|
332
|
+
var i = Oe({}, t[t.length - 1].rect);
|
|
333
333
|
if (r.thisAnimationDuration) {
|
|
334
|
-
var
|
|
335
|
-
|
|
334
|
+
var a = Je(r, !0);
|
|
335
|
+
a && (i.top -= a.f, i.left -= a.e);
|
|
336
336
|
}
|
|
337
|
-
r.fromRect =
|
|
337
|
+
r.fromRect = i;
|
|
338
338
|
}
|
|
339
339
|
});
|
|
340
340
|
}
|
|
@@ -343,7 +343,7 @@ function Lo() {
|
|
|
343
343
|
t.push(o);
|
|
344
344
|
},
|
|
345
345
|
removeAnimationState: function(o) {
|
|
346
|
-
t.splice(
|
|
346
|
+
t.splice(Fo(t, {
|
|
347
347
|
target: o
|
|
348
348
|
}), 1);
|
|
349
349
|
},
|
|
@@ -353,103 +353,103 @@ function Lo() {
|
|
|
353
353
|
clearTimeout(e), typeof o == "function" && o();
|
|
354
354
|
return;
|
|
355
355
|
}
|
|
356
|
-
var
|
|
356
|
+
var i = !1, a = 0;
|
|
357
357
|
t.forEach(function(l) {
|
|
358
|
-
var s = 0, u = l.target, f = u.fromRect, c =
|
|
359
|
-
g && (c.top -= g.f, c.left -= g.e), u.toRect = c, u.thisAnimationDuration &&
|
|
360
|
-
(y.top - c.top) / (y.left - c.left) === (f.top - c.top) / (f.left - c.left) && (s = Mo(y, E, b, r.options)),
|
|
358
|
+
var s = 0, u = l.target, f = u.fromRect, c = ee(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 && $t(E, c) && !$t(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)), $t(c, f) || (u.prevFromRect = f, u.prevToRect = c, s || (s = r.options.animation), r.animate(u, y, c, s)), s && (i = !0, a = Math.max(a, s), clearTimeout(u.animationResetTimer), u.animationResetTimer = setTimeout(function() {
|
|
361
361
|
u.animationTime = 0, u.prevFromRect = null, u.fromRect = null, u.prevToRect = null, u.thisAnimationDuration = null;
|
|
362
362
|
}, s), u.thisAnimationDuration = s);
|
|
363
|
-
}), clearTimeout(e),
|
|
363
|
+
}), clearTimeout(e), i ? e = setTimeout(function() {
|
|
364
364
|
typeof o == "function" && o();
|
|
365
|
-
},
|
|
365
|
+
}, a) : typeof o == "function" && o(), t = [];
|
|
366
366
|
},
|
|
367
|
-
animate: function(o, r,
|
|
368
|
-
if (
|
|
367
|
+
animate: function(o, r, i, a) {
|
|
368
|
+
if (a) {
|
|
369
369
|
_(o, "transition", ""), _(o, "transform", "");
|
|
370
|
-
var l = Je(this.el), s = l && l.a, u = l && l.d, f = (r.left -
|
|
371
|
-
o.animatingX = !!f, o.animatingY = !!c, _(o, "transform", "translate3d(" + f + "px," + c + "px,0)"), this.forRepaintDummy =
|
|
370
|
+
var l = Je(this.el), s = l && l.a, u = l && l.d, f = (r.left - i.left) / (s || 1), c = (r.top - i.top) / (u || 1);
|
|
371
|
+
o.animatingX = !!f, o.animatingY = !!c, _(o, "transform", "translate3d(" + f + "px," + c + "px,0)"), this.forRepaintDummy = Lo(o), _(o, "transition", "transform " + a + "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
|
+
}, a);
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
376
|
};
|
|
377
377
|
}
|
|
378
|
-
function
|
|
378
|
+
function Lo(t) {
|
|
379
379
|
return t.offsetWidth;
|
|
380
380
|
}
|
|
381
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 je = [], Bt = {
|
|
385
385
|
initializeByDefault: !0
|
|
386
386
|
}, ht = {
|
|
387
387
|
mount: function(e) {
|
|
388
|
-
for (var n in
|
|
389
|
-
|
|
390
|
-
|
|
388
|
+
for (var n in Bt)
|
|
389
|
+
Bt.hasOwnProperty(n) && !(n in e) && (e[n] = Bt[n]);
|
|
390
|
+
je.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
|
+
}), je.push(e);
|
|
394
394
|
},
|
|
395
395
|
pluginEvent: function(e, n, o) {
|
|
396
396
|
var r = this;
|
|
397
397
|
this.eventCanceled = !1, o.cancel = function() {
|
|
398
398
|
r.eventCanceled = !0;
|
|
399
399
|
};
|
|
400
|
-
var
|
|
401
|
-
|
|
402
|
-
n[
|
|
400
|
+
var i = e + "Global";
|
|
401
|
+
je.forEach(function(a) {
|
|
402
|
+
n[a.pluginName] && (n[a.pluginName][i] && n[a.pluginName][i](Oe({
|
|
403
403
|
sortable: n
|
|
404
|
-
}, o)), n.options[
|
|
404
|
+
}, o)), n.options[a.pluginName] && n[a.pluginName][e] && n[a.pluginName][e](Oe({
|
|
405
405
|
sortable: n
|
|
406
406
|
}, o)));
|
|
407
407
|
});
|
|
408
408
|
},
|
|
409
409
|
initializePlugins: function(e, n, o, r) {
|
|
410
|
-
|
|
410
|
+
je.forEach(function(l) {
|
|
411
411
|
var s = l.pluginName;
|
|
412
412
|
if (!(!e.options[s] && !l.initializeByDefault)) {
|
|
413
413
|
var u = new l(e, n, e.options);
|
|
414
|
-
u.sortable = e, u.options = e.options, e[s] = u,
|
|
414
|
+
u.sortable = e, u.options = e.options, e[s] = u, ke(o, u.defaults);
|
|
415
415
|
}
|
|
416
416
|
});
|
|
417
|
-
for (var
|
|
418
|
-
if (e.options.hasOwnProperty(
|
|
419
|
-
var
|
|
420
|
-
typeof
|
|
417
|
+
for (var i in e.options)
|
|
418
|
+
if (e.options.hasOwnProperty(i)) {
|
|
419
|
+
var a = this.modifyOption(e, i, e.options[i]);
|
|
420
|
+
typeof a < "u" && (e.options[i] = a);
|
|
421
421
|
}
|
|
422
422
|
},
|
|
423
423
|
getEventProperties: function(e, n) {
|
|
424
424
|
var o = {};
|
|
425
|
-
return
|
|
426
|
-
typeof r.eventProperties == "function" &&
|
|
425
|
+
return je.forEach(function(r) {
|
|
426
|
+
typeof r.eventProperties == "function" && ke(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
|
|
432
|
-
e[
|
|
431
|
+
return je.forEach(function(i) {
|
|
432
|
+
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[n] == "function" && (r = i.optionListeners[n].call(e[i.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,
|
|
438
|
-
if (e = e || n && n[
|
|
436
|
+
function Po(t) {
|
|
437
|
+
var e = t.sortable, n = t.rootEl, o = t.name, r = t.targetEl, i = t.cloneEl, a = 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[ge], !!e) {
|
|
439
439
|
var g, L = e.options, H = "on" + o.charAt(0).toUpperCase() + o.substr(1);
|
|
440
|
-
window.CustomEvent && !
|
|
440
|
+
window.CustomEvent && !Le && !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 =
|
|
444
|
-
var N =
|
|
445
|
-
for (var
|
|
446
|
-
g[
|
|
443
|
+
}) : (g = document.createEvent("Event"), g.initEvent(o, !0, !0)), g.to = a || n, g.from = l || n, g.item = r || n, g.clone = i, 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 = Oe(Oe({}, y), ht.getEventProperties(o, e));
|
|
445
|
+
for (var $ in N)
|
|
446
|
+
g[$] = N[$];
|
|
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,
|
|
452
|
-
ht.pluginEvent.bind(T)(e, n,
|
|
450
|
+
var Vo = ["evt"], ue = function(e, n) {
|
|
451
|
+
var o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = o.evt, i = Oo(o, Vo);
|
|
452
|
+
ht.pluginEvent.bind(T)(e, n, Oe({
|
|
453
453
|
dragEl: m,
|
|
454
454
|
parentEl: W,
|
|
455
455
|
ghostEl: w,
|
|
@@ -457,122 +457,122 @@ var Uo = ["evt"], ce = function(e, n) {
|
|
|
457
457
|
nextEl: ze,
|
|
458
458
|
lastDownEl: Tt,
|
|
459
459
|
cloneEl: Y,
|
|
460
|
-
cloneHidden:
|
|
461
|
-
dragStarted:
|
|
460
|
+
cloneHidden: $e,
|
|
461
|
+
dragStarted: it,
|
|
462
462
|
putSortable: ie,
|
|
463
463
|
activeSortable: T.active,
|
|
464
464
|
originalEvent: r,
|
|
465
465
|
oldIndex: Ze,
|
|
466
466
|
oldDraggableIndex: ct,
|
|
467
|
-
newIndex:
|
|
467
|
+
newIndex: he,
|
|
468
468
|
newDraggableIndex: Ue,
|
|
469
|
-
hideGhostForTarget:
|
|
470
|
-
unhideGhostForTarget:
|
|
469
|
+
hideGhostForTarget: $n,
|
|
470
|
+
unhideGhostForTarget: Bn,
|
|
471
471
|
cloneNowHidden: function() {
|
|
472
|
-
|
|
472
|
+
$e = !0;
|
|
473
473
|
},
|
|
474
474
|
cloneNowShown: function() {
|
|
475
|
-
|
|
475
|
+
$e = !1;
|
|
476
476
|
},
|
|
477
477
|
dispatchSortableEvent: function(l) {
|
|
478
|
-
|
|
478
|
+
le({
|
|
479
479
|
sortable: n,
|
|
480
480
|
name: l,
|
|
481
481
|
originalEvent: r
|
|
482
482
|
});
|
|
483
483
|
}
|
|
484
|
-
},
|
|
484
|
+
}, i));
|
|
485
485
|
};
|
|
486
|
-
function
|
|
487
|
-
|
|
486
|
+
function le(t) {
|
|
487
|
+
Po(Oe({
|
|
488
488
|
putSortable: ie,
|
|
489
489
|
cloneEl: Y,
|
|
490
490
|
targetEl: m,
|
|
491
491
|
rootEl: V,
|
|
492
492
|
oldIndex: Ze,
|
|
493
493
|
oldDraggableIndex: ct,
|
|
494
|
-
newIndex:
|
|
494
|
+
newIndex: he,
|
|
495
495
|
newDraggableIndex: Ue
|
|
496
496
|
}, t));
|
|
497
497
|
}
|
|
498
|
-
var m, W, w, V, ze, Tt, Y,
|
|
499
|
-
if (
|
|
500
|
-
if (
|
|
498
|
+
var m, W, w, V, ze, Tt, Y, $e, Ze, he, ct, Ue, vt, ie, Qe = !1, Rt = !1, Ft = [], He, we, Wt, Yt, bn, yn, it, qe, dt, ft = !1, bt = !1, wt, ae, Ht = [], Jt = !1, Nt = [], Mt = typeof document < "u", yt = Fn, En = mt || Le ? "cssFloat" : "float", Uo = Mt && !Co && !Fn && "draggable" in document.createElement("div"), Pn = function() {
|
|
499
|
+
if (Mt) {
|
|
500
|
+
if (Le)
|
|
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),
|
|
506
|
+
var o = _(e), r = parseInt(o.width) - parseInt(o.paddingLeft) - parseInt(o.paddingRight) - parseInt(o.borderLeftWidth) - parseInt(o.borderRightWidth), i = et(e, 0, n), a = et(e, 1, n), l = i && _(i), s = a && _(a), u = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + ee(i).width, f = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + ee(a).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 (
|
|
511
|
+
if (i && l.float && l.float !== "none") {
|
|
512
512
|
var c = l.float === "left" ? "left" : "right";
|
|
513
|
-
return
|
|
513
|
+
return a && (s.clear === "both" || s.clear === c) ? "vertical" : "horizontal";
|
|
514
514
|
}
|
|
515
|
-
return
|
|
515
|
+
return i && (l.display === "block" || l.display === "flex" || l.display === "table" || l.display === "grid" || u >= r && o[En] === "none" || a && o[En] === "none" && u + f > r) ? "vertical" : "horizontal";
|
|
516
516
|
}, $o = function(e, n, o) {
|
|
517
|
-
var r = o ? e.left : e.top,
|
|
518
|
-
return r === l ||
|
|
519
|
-
},
|
|
517
|
+
var r = o ? e.left : e.top, i = o ? e.right : e.bottom, a = 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 || i === s || r + a / 2 === l + u / 2;
|
|
519
|
+
}, Bo = function(e, n) {
|
|
520
520
|
var o;
|
|
521
521
|
return Ft.some(function(r) {
|
|
522
|
-
var
|
|
523
|
-
if (!(!
|
|
524
|
-
var
|
|
522
|
+
var i = r[ge].options.emptyInsertThreshold;
|
|
523
|
+
if (!(!i || ln(r))) {
|
|
524
|
+
var a = ee(r), l = e >= a.left - i && e <= a.right + i, s = n >= a.top - i && n <= a.bottom + i;
|
|
525
525
|
if (l && s)
|
|
526
526
|
return o = r;
|
|
527
527
|
}
|
|
528
528
|
}), o;
|
|
529
529
|
}, Un = function(e) {
|
|
530
|
-
function n(
|
|
530
|
+
function n(i, a) {
|
|
531
531
|
return function(l, s, u, f) {
|
|
532
532
|
var c = l.options.group.name && s.options.group.name && l.options.group.name === s.options.group.name;
|
|
533
|
-
if (
|
|
533
|
+
if (i == null && (a || c))
|
|
534
534
|
return !0;
|
|
535
|
-
if (
|
|
535
|
+
if (i == null || i === !1)
|
|
536
536
|
return !1;
|
|
537
|
-
if (
|
|
538
|
-
return
|
|
539
|
-
if (typeof
|
|
540
|
-
return n(
|
|
541
|
-
var E = (
|
|
542
|
-
return
|
|
537
|
+
if (a && i === "clone")
|
|
538
|
+
return i;
|
|
539
|
+
if (typeof i == "function")
|
|
540
|
+
return n(i(l, s, u, f), a)(l, s, u, f);
|
|
541
|
+
var E = (a ? l : s).options.group.name;
|
|
542
|
+
return i === !0 || typeof i == "string" && i === E || i.join && i.indexOf(E) > -1;
|
|
543
543
|
};
|
|
544
544
|
}
|
|
545
545
|
var o = {}, r = e.group;
|
|
546
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
|
-
}, Bn = function() {
|
|
550
|
-
!Mn && w && _(w, "display", "none");
|
|
551
549
|
}, $n = function() {
|
|
552
|
-
!
|
|
550
|
+
!Pn && w && _(w, "display", "none");
|
|
551
|
+
}, Bn = function() {
|
|
552
|
+
!Pn && w && _(w, "display", "");
|
|
553
553
|
};
|
|
554
|
-
|
|
554
|
+
Mt && document.addEventListener("click", function(t) {
|
|
555
555
|
if (Rt)
|
|
556
556
|
return t.preventDefault(), t.stopPropagation && t.stopPropagation(), t.stopImmediatePropagation && t.stopImmediatePropagation(), Rt = !1, !1;
|
|
557
557
|
}, !0);
|
|
558
558
|
var Xe = function(e) {
|
|
559
559
|
if (m) {
|
|
560
560
|
e = e.touches ? e.touches[0] : e;
|
|
561
|
-
var n =
|
|
561
|
+
var n = Bo(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[ge]._onDragOver(o);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
},
|
|
570
|
-
m && m.parentNode[
|
|
569
|
+
}, Wo = function(e) {
|
|
570
|
+
m && m.parentNode[ge]._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 =
|
|
575
|
+
this.el = t, this.options = e = ke({}, e), t[ge] = 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(
|
|
602
|
-
|
|
601
|
+
setData: function(a, l) {
|
|
602
|
+
a.setData("Text", l.textContent);
|
|
603
603
|
},
|
|
604
604
|
dropBubble: !1,
|
|
605
605
|
dragoverBubble: !1,
|
|
@@ -624,7 +624,7 @@ function T(t, e) {
|
|
|
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 : Uo, 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) || []), ke(this, ko());
|
|
628
628
|
}
|
|
629
629
|
T.prototype = /** @lends Sortable.prototype */
|
|
630
630
|
{
|
|
@@ -637,72 +637,72 @@ T.prototype = /** @lends Sortable.prototype */
|
|
|
637
637
|
},
|
|
638
638
|
_onTapStart: function(e) {
|
|
639
639
|
if (e.cancelable) {
|
|
640
|
-
var n = this, o = this.el, r = this.options,
|
|
641
|
-
if (
|
|
642
|
-
if (Ze =
|
|
640
|
+
var n = this, o = this.el, r = this.options, i = r.preventOnFilter, a = 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(a) && e.button !== 0 || r.disabled) && !u.isContentEditable && !(!this.nativeDraggable && st && s && s.tagName.toUpperCase() === "SELECT") && (s = De(s, r.draggable, o, !1), !(s && s.animated) && Tt !== s)) {
|
|
642
|
+
if (Ze = ve(s), ct = ve(s, r.draggable), typeof f == "function") {
|
|
643
643
|
if (f.call(this, e, s, this)) {
|
|
644
|
-
|
|
644
|
+
le({
|
|
645
645
|
sortable: n,
|
|
646
646
|
rootEl: u,
|
|
647
647
|
name: "filter",
|
|
648
648
|
targetEl: s,
|
|
649
649
|
toEl: o,
|
|
650
650
|
fromEl: o
|
|
651
|
-
}),
|
|
651
|
+
}), ue("filter", n, {
|
|
652
652
|
evt: e
|
|
653
|
-
}),
|
|
653
|
+
}), i && e.cancelable && e.preventDefault();
|
|
654
654
|
return;
|
|
655
655
|
}
|
|
656
656
|
} else if (f && (f = f.split(",").some(function(c) {
|
|
657
|
-
if (c =
|
|
658
|
-
return
|
|
657
|
+
if (c = De(u, c.trim(), o, !1), c)
|
|
658
|
+
return le({
|
|
659
659
|
sortable: n,
|
|
660
660
|
rootEl: c,
|
|
661
661
|
name: "filter",
|
|
662
662
|
targetEl: s,
|
|
663
663
|
fromEl: o,
|
|
664
664
|
toEl: o
|
|
665
|
-
}),
|
|
665
|
+
}), ue("filter", n, {
|
|
666
666
|
evt: e
|
|
667
667
|
}), !0;
|
|
668
668
|
}), f)) {
|
|
669
|
-
|
|
669
|
+
i && e.cancelable && e.preventDefault();
|
|
670
670
|
return;
|
|
671
671
|
}
|
|
672
|
-
r.handle && !
|
|
672
|
+
r.handle && !De(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,
|
|
678
|
-
if (o && !m && o.parentNode ===
|
|
679
|
-
var u =
|
|
680
|
-
if (V =
|
|
677
|
+
var r = this, i = r.el, a = r.options, l = i.ownerDocument, s;
|
|
678
|
+
if (o && !m && o.parentNode === i) {
|
|
679
|
+
var u = ee(o);
|
|
680
|
+
if (V = i, m = o, W = m.parentNode, ze = m.nextSibling, Tt = o, vt = a.group, T.dragged = m, He = {
|
|
681
681
|
target: m,
|
|
682
682
|
clientX: (n || e).clientX,
|
|
683
683
|
clientY: (n || e).clientY
|
|
684
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 (
|
|
685
|
+
if (ue("delayEnded", r, {
|
|
686
686
|
evt: e
|
|
687
687
|
}), T.eventCanceled) {
|
|
688
688
|
r._onDrop();
|
|
689
689
|
return;
|
|
690
690
|
}
|
|
691
|
-
r._disableDelayedDragEvents(), !mn && r.nativeDraggable && (m.draggable = !0), r._triggerDragStart(e, n),
|
|
691
|
+
r._disableDelayedDragEvents(), !mn && r.nativeDraggable && (m.draggable = !0), r._triggerDragStart(e, n), le({
|
|
692
692
|
sortable: r,
|
|
693
693
|
name: "choose",
|
|
694
694
|
originalEvent: e
|
|
695
|
-
}),
|
|
696
|
-
},
|
|
695
|
+
}), me(m, a.chosenClass, !0);
|
|
696
|
+
}, a.ignore.split(",").forEach(function(f) {
|
|
697
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),
|
|
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), ue("delayStart", this, {
|
|
699
699
|
evt: e
|
|
700
|
-
}),
|
|
700
|
+
}), a.delay && (!a.delayOnTouchOnly || n) && (!this.nativeDraggable || !(mt || Le))) {
|
|
701
701
|
if (T.eventCanceled) {
|
|
702
702
|
this._onDrop();
|
|
703
703
|
return;
|
|
704
704
|
}
|
|
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),
|
|
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), a.supportPointer && R(l, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
|
|
706
706
|
} else
|
|
707
707
|
s();
|
|
708
708
|
}
|
|
@@ -716,7 +716,7 @@ T.prototype = /** @lends Sortable.prototype */
|
|
|
716
716
|
},
|
|
717
717
|
_disableDelayedDragEvents: function() {
|
|
718
718
|
var e = this.el.ownerDocument;
|
|
719
|
-
|
|
719
|
+
C(e, "mouseup", this._disableDelayedDrag), C(e, "touchend", this._disableDelayedDrag), C(e, "touchcancel", this._disableDelayedDrag), C(e, "mousemove", this._delayedDragTouchMoveHandler), C(e, "touchmove", this._delayedDragTouchMoveHandler), C(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
720
720
|
},
|
|
721
721
|
_triggerDragStart: function(e, n) {
|
|
722
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));
|
|
@@ -729,11 +729,11 @@ T.prototype = /** @lends Sortable.prototype */
|
|
|
729
729
|
},
|
|
730
730
|
_dragStarted: function(e, n) {
|
|
731
731
|
if (Qe = !1, V && m) {
|
|
732
|
-
|
|
732
|
+
ue("dragStarted", this, {
|
|
733
733
|
evt: n
|
|
734
|
-
}), this.nativeDraggable && R(document, "dragover",
|
|
734
|
+
}), this.nativeDraggable && R(document, "dragover", Wo);
|
|
735
735
|
var o = this.options;
|
|
736
|
-
!e &&
|
|
736
|
+
!e && me(m, o.dragClass, !1), me(m, o.ghostClass, !0), T.active = this, e && this._appendGhost(), le({
|
|
737
737
|
sortable: this,
|
|
738
738
|
name: "start",
|
|
739
739
|
originalEvent: n
|
|
@@ -742,17 +742,17 @@ T.prototype = /** @lends Sortable.prototype */
|
|
|
742
742
|
this._nulling();
|
|
743
743
|
},
|
|
744
744
|
_emulateDragOver: function() {
|
|
745
|
-
if (
|
|
746
|
-
this._lastX =
|
|
747
|
-
for (var e = document.elementFromPoint(
|
|
745
|
+
if (we) {
|
|
746
|
+
this._lastX = we.clientX, this._lastY = we.clientY, $n();
|
|
747
|
+
for (var e = document.elementFromPoint(we.clientX, we.clientY), n = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(we.clientX, we.clientY), e !== n); )
|
|
748
748
|
n = e;
|
|
749
|
-
if (m.parentNode[
|
|
749
|
+
if (m.parentNode[ge]._isOutsideThisEl(e), n)
|
|
750
750
|
do {
|
|
751
|
-
if (n[
|
|
751
|
+
if (n[ge]) {
|
|
752
752
|
var o = void 0;
|
|
753
|
-
if (o = n[
|
|
754
|
-
clientX:
|
|
755
|
-
clientY:
|
|
753
|
+
if (o = n[ge]._onDragOver({
|
|
754
|
+
clientX: we.clientX,
|
|
755
|
+
clientY: we.clientY,
|
|
756
756
|
target: e,
|
|
757
757
|
rootEl: n
|
|
758
758
|
}), o && !this.options.dragoverBubble)
|
|
@@ -760,19 +760,19 @@ T.prototype = /** @lends Sortable.prototype */
|
|
|
760
760
|
}
|
|
761
761
|
e = n;
|
|
762
762
|
} while (n = n.parentNode);
|
|
763
|
-
|
|
763
|
+
Bn();
|
|
764
764
|
}
|
|
765
765
|
},
|
|
766
766
|
_onTouchMove: function(e) {
|
|
767
767
|
if (He) {
|
|
768
|
-
var n = this.options, o = n.fallbackTolerance, r = n.fallbackOffset,
|
|
768
|
+
var n = this.options, o = n.fallbackTolerance, r = n.fallbackOffset, i = e.touches ? e.touches[0] : e, a = w && Je(w, !0), l = w && a && a.a, s = w && a && a.d, u = yt && ae && vn(ae), f = (i.clientX - He.clientX + r.x) / (l || 1) + (u ? u[0] - Ht[0] : 0) / (l || 1), c = (i.clientY - He.clientY + r.y) / (s || 1) + (u ? u[1] - Ht[1] : 0) / (s || 1);
|
|
769
769
|
if (!T.active && !Qe) {
|
|
770
|
-
if (o && Math.max(Math.abs(
|
|
770
|
+
if (o && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < o)
|
|
771
771
|
return;
|
|
772
772
|
this._onDragStart(e, !0);
|
|
773
773
|
}
|
|
774
774
|
if (w) {
|
|
775
|
-
|
|
775
|
+
a ? (a.e += f - (Wt || 0), a.f += c - (Yt || 0)) : a = {
|
|
776
776
|
a: 1,
|
|
777
777
|
b: 0,
|
|
778
778
|
c: 0,
|
|
@@ -780,59 +780,59 @@ T.prototype = /** @lends Sortable.prototype */
|
|
|
780
780
|
e: f,
|
|
781
781
|
f: c
|
|
782
782
|
};
|
|
783
|
-
var E = "matrix(".concat(
|
|
784
|
-
_(w, "webkitTransform", E), _(w, "mozTransform", E), _(w, "msTransform", E), _(w, "transform", E), Wt = f, Yt = c,
|
|
783
|
+
var E = "matrix(".concat(a.a, ",").concat(a.b, ",").concat(a.c, ",").concat(a.d, ",").concat(a.e, ",").concat(a.f, ")");
|
|
784
|
+
_(w, "webkitTransform", E), _(w, "mozTransform", E), _(w, "msTransform", E), _(w, "transform", E), Wt = f, Yt = c, we = i;
|
|
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 : V, n =
|
|
791
|
+
var e = this.options.fallbackOnBody ? document.body : V, n = ee(m, !0, yt, !0, e), o = this.options;
|
|
792
792
|
if (yt) {
|
|
793
|
-
for (
|
|
794
|
-
|
|
795
|
-
|
|
793
|
+
for (ae = e; _(ae, "position") === "static" && _(ae, "transform") === "none" && ae !== document; )
|
|
794
|
+
ae = ae.parentNode;
|
|
795
|
+
ae !== document.body && ae !== document.documentElement ? (ae === document && (ae = Ie()), n.top += ae.scrollTop, n.left += ae.scrollLeft) : ae = Ie(), Ht = vn(ae);
|
|
796
796
|
}
|
|
797
|
-
w = m.cloneNode(!0),
|
|
797
|
+
w = m.cloneNode(!0), me(w, o.ghostClass, !1), me(w, o.fallbackClass, !0), me(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
|
-
var o = this, r = e.dataTransfer,
|
|
802
|
-
if (
|
|
801
|
+
var o = this, r = e.dataTransfer, i = o.options;
|
|
802
|
+
if (ue("dragStart", this, {
|
|
803
803
|
evt: e
|
|
804
804
|
}), T.eventCanceled) {
|
|
805
805
|
this._onDrop();
|
|
806
806
|
return;
|
|
807
807
|
}
|
|
808
|
-
|
|
809
|
-
|
|
808
|
+
ue("setupClone", this), T.eventCanceled || (Y = Mn(m), Y.draggable = !1, Y.style["will-change"] = "", this._hideClone(), me(Y, this.options.chosenClass, !1), T.clone = Y), o.cloneId = xt(function() {
|
|
809
|
+
ue("clone", o), !T.eventCanceled && (o.options.removeCloneOnHide || V.insertBefore(Y, m), o._hideClone(), le({
|
|
810
810
|
sortable: o,
|
|
811
811
|
name: "clone"
|
|
812
812
|
}));
|
|
813
|
-
}), !n &&
|
|
813
|
+
}), !n && me(m, i.dragClass, !0), n ? (Rt = !0, o._loopId = setInterval(o._emulateDragOver, 50)) : (C(document, "mouseup", o._onDrop), C(document, "touchend", o._onDrop), C(document, "touchcancel", o._onDrop), r && (r.effectAllowed = "move", i.setData && i.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), it = !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,
|
|
817
|
+
var n = this.el, o = e.target, r, i, a, l = this.options, s = l.group, u = T.active, f = vt === s, c = l.sort, E = ie || u, b, y = this, g = !1;
|
|
818
818
|
if (Jt) return;
|
|
819
|
-
function L(I,
|
|
820
|
-
|
|
819
|
+
function L(I, te) {
|
|
820
|
+
ue(I, y, Oe({
|
|
821
821
|
evt: e,
|
|
822
822
|
isOwner: f,
|
|
823
823
|
axis: b ? "vertical" : "horizontal",
|
|
824
|
-
revert:
|
|
824
|
+
revert: a,
|
|
825
825
|
dragRect: r,
|
|
826
|
-
targetRect:
|
|
826
|
+
targetRect: i,
|
|
827
827
|
canSort: c,
|
|
828
828
|
fromSortable: E,
|
|
829
829
|
target: o,
|
|
830
830
|
completed: N,
|
|
831
|
-
onMove: function(
|
|
832
|
-
return Et(V, n, m, r,
|
|
831
|
+
onMove: function(pe, Ye) {
|
|
832
|
+
return Et(V, n, m, r, pe, ee(pe), e, Ye);
|
|
833
833
|
},
|
|
834
|
-
changed:
|
|
835
|
-
},
|
|
834
|
+
changed: $
|
|
835
|
+
}, te));
|
|
836
836
|
}
|
|
837
837
|
function H() {
|
|
838
838
|
L("dragOverAnimationCapture"), y.captureAnimationState(), y !== E && E.captureAnimationState();
|
|
@@ -840,58 +840,58 @@ T.prototype = /** @lends Sortable.prototype */
|
|
|
840
840
|
function N(I) {
|
|
841
841
|
return L("dragOverCompleted", {
|
|
842
842
|
insertion: I
|
|
843
|
-
}), I && (f ? u._hideClone() : u._showClone(y), y !== E && (
|
|
843
|
+
}), I && (f ? u._hideClone() : u._showClone(y), y !== E && (me(m, ie ? ie.options.ghostClass : u.options.ghostClass, !1), me(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
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[
|
|
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[ge]._isOutsideThisEl(e.target), !I && Xe(e)), !l.dragoverBubble && e.stopPropagation && e.stopPropagation(), g = !0;
|
|
846
846
|
}
|
|
847
|
-
function
|
|
848
|
-
|
|
847
|
+
function $() {
|
|
848
|
+
he = ve(m), Ue = ve(m, l.draggable), le({
|
|
849
849
|
sortable: y,
|
|
850
850
|
name: "change",
|
|
851
851
|
toEl: n,
|
|
852
|
-
newIndex:
|
|
852
|
+
newIndex: he,
|
|
853
853
|
newDraggableIndex: Ue,
|
|
854
854
|
originalEvent: e
|
|
855
855
|
});
|
|
856
856
|
}
|
|
857
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), o =
|
|
857
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), o = De(o, l.draggable, n, !0), L("dragOver"), T.eventCanceled) return g;
|
|
858
858
|
if (m.contains(e.target) || o.animated && o.animatingX && o.animatingY || y._ignoreWhileAnimating === o)
|
|
859
859
|
return N(!1);
|
|
860
|
-
if (Rt = !1, u && !l.disabled && (f ? c || (
|
|
861
|
-
if (b = this._getDirection(e, o) === "vertical", r =
|
|
862
|
-
if (
|
|
860
|
+
if (Rt = !1, u && !l.disabled && (f ? c || (a = 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 = ee(m), L("dragOverValid"), T.eventCanceled) return g;
|
|
862
|
+
if (a)
|
|
863
863
|
return W = V, H(), this._hideClone(), L("revert"), T.eventCanceled || (ze ? V.insertBefore(m, ze) : V.appendChild(m)), N(!0);
|
|
864
|
-
var
|
|
865
|
-
if (
|
|
866
|
-
if (
|
|
864
|
+
var B = ln(n, l.draggable);
|
|
865
|
+
if (!B || Go(e, b, this) && !B.animated) {
|
|
866
|
+
if (B === m)
|
|
867
867
|
return N(!1);
|
|
868
|
-
if (
|
|
869
|
-
return H(), n.appendChild(m), W = n,
|
|
870
|
-
} else if (
|
|
871
|
-
var
|
|
872
|
-
if (
|
|
868
|
+
if (B && n === e.target && (o = B), o && (i = ee(o)), Et(V, n, m, r, o, i, e, !!o) !== !1)
|
|
869
|
+
return H(), n.appendChild(m), W = n, $(), N(!0);
|
|
870
|
+
} else if (B && Xo(e, b, this)) {
|
|
871
|
+
var M = et(n, 0, l, !0);
|
|
872
|
+
if (M === m)
|
|
873
873
|
return N(!1);
|
|
874
|
-
if (o =
|
|
875
|
-
return H(), n.insertBefore(m,
|
|
874
|
+
if (o = M, i = ee(o), Et(V, n, m, r, o, i, e, !1) !== !1)
|
|
875
|
+
return H(), n.insertBefore(m, M), W = n, $(), N(!0);
|
|
876
876
|
} else if (o.parentNode === n) {
|
|
877
|
-
|
|
878
|
-
var X = 0,
|
|
879
|
-
qe !== o && (
|
|
880
|
-
var
|
|
877
|
+
i = ee(o);
|
|
878
|
+
var X = 0, de, Se = m.parentNode !== n, oe = !$o(m.animated && m.toRect || r, o.animated && o.toRect || i, b), ye = b ? "top" : "left", fe = gn(o, "top", "top") || gn(m, "top", "top"), Ce = fe ? fe.scrollTop : void 0;
|
|
879
|
+
qe !== o && (de = i[ye], ft = !1, bt = !oe && l.invertSwap || Se), X = zo(e, o, i, b, oe ? 1 : l.swapThreshold, l.invertedSwapThreshold == null ? l.swapThreshold : l.invertedSwapThreshold, bt, qe === o);
|
|
880
|
+
var Q;
|
|
881
881
|
if (X !== 0) {
|
|
882
|
-
var
|
|
882
|
+
var Ee = ve(m);
|
|
883
883
|
do
|
|
884
|
-
|
|
885
|
-
while (
|
|
884
|
+
Ee -= X, Q = W.children[Ee];
|
|
885
|
+
while (Q && (_(Q, "display") === "none" || Q === w));
|
|
886
886
|
}
|
|
887
|
-
if (X === 0 ||
|
|
887
|
+
if (X === 0 || Q === o)
|
|
888
888
|
return N(!1);
|
|
889
889
|
qe = o, dt = X;
|
|
890
|
-
var
|
|
890
|
+
var Re = o.nextElementSibling, d = !1;
|
|
891
891
|
d = X === 1;
|
|
892
|
-
var v = Et(V, n, m, r, o,
|
|
892
|
+
var v = Et(V, n, m, r, o, i, e, d);
|
|
893
893
|
if (v !== !1)
|
|
894
|
-
return (v === 1 || v === -1) && (d = v === 1), Jt = !0, setTimeout(
|
|
894
|
+
return (v === 1 || v === -1) && (d = v === 1), Jt = !0, setTimeout(Ho, 30), H(), d && !Re ? n.appendChild(m) : o.parentNode.insertBefore(m, d ? Re : o), fe && Ln(fe, 0, Ce - fe.scrollTop), W = m.parentNode, de !== void 0 && !bt && (wt = Math.abs(de - ee(o)[ye])), $(), 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
|
+
C(document, "mousemove", this._onTouchMove), C(document, "touchmove", this._onTouchMove), C(document, "pointermove", this._onTouchMove), C(document, "dragover", Xe), C(document, "mousemove", Xe), C(document, "touchmove", Xe);
|
|
904
904
|
},
|
|
905
905
|
_offUpEvents: function() {
|
|
906
906
|
var e = this.el.ownerDocument;
|
|
907
|
-
|
|
907
|
+
C(e, "mouseup", this._onDrop), C(e, "touchend", this._onDrop), C(e, "pointerup", this._onDrop), C(e, "touchcancel", this._onDrop), C(document, "selectstart", this);
|
|
908
908
|
},
|
|
909
909
|
_onDrop: function(e) {
|
|
910
910
|
var n = this.el, o = this.options;
|
|
911
|
-
if (
|
|
911
|
+
if (he = ve(m), Ue = ve(m, o.draggable), ue("drop", this, {
|
|
912
912
|
evt: e
|
|
913
|
-
}), W = m && m.parentNode,
|
|
913
|
+
}), W = m && m.parentNode, he = ve(m), Ue = ve(m, o.draggable), T.eventCanceled) {
|
|
914
914
|
this._nulling();
|
|
915
915
|
return;
|
|
916
916
|
}
|
|
917
|
-
Qe = !1, bt = !1, ft = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), en(this.cloneId), en(this._dragStartId), this.nativeDraggable && (
|
|
917
|
+
Qe = !1, bt = !1, ft = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), en(this.cloneId), en(this._dragStartId), this.nativeDraggable && (C(document, "drop", this), C(n, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), st && _(document.body, "user-select", ""), _(m, "transform", ""), e && (it && (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 && C(m, "dragend", this), Xt(m), m.style["will-change"] = "", it && !Qe && me(m, ie ? ie.options.ghostClass : this.options.ghostClass, !1), me(m, this.options.chosenClass, !1), le({
|
|
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
|
-
}), V !== W ? (
|
|
924
|
+
}), V !== W ? (he >= 0 && (le({
|
|
925
925
|
rootEl: W,
|
|
926
926
|
name: "add",
|
|
927
927
|
toEl: W,
|
|
928
928
|
fromEl: V,
|
|
929
929
|
originalEvent: e
|
|
930
|
-
}),
|
|
930
|
+
}), le({
|
|
931
931
|
sortable: this,
|
|
932
932
|
name: "remove",
|
|
933
933
|
toEl: W,
|
|
934
934
|
originalEvent: e
|
|
935
|
-
}),
|
|
935
|
+
}), le({
|
|
936
936
|
rootEl: W,
|
|
937
937
|
name: "sort",
|
|
938
938
|
toEl: W,
|
|
939
939
|
fromEl: V,
|
|
940
940
|
originalEvent: e
|
|
941
|
-
}),
|
|
941
|
+
}), le({
|
|
942
942
|
sortable: this,
|
|
943
943
|
name: "sort",
|
|
944
944
|
toEl: W,
|
|
945
945
|
originalEvent: e
|
|
946
|
-
})), ie && ie.save()) :
|
|
946
|
+
})), ie && ie.save()) : he !== Ze && he >= 0 && (le({
|
|
947
947
|
sortable: this,
|
|
948
948
|
name: "update",
|
|
949
949
|
toEl: W,
|
|
950
950
|
originalEvent: e
|
|
951
|
-
}),
|
|
951
|
+
}), le({
|
|
952
952
|
sortable: this,
|
|
953
953
|
name: "sort",
|
|
954
954
|
toEl: W,
|
|
955
955
|
originalEvent: e
|
|
956
|
-
})), T.active && ((
|
|
956
|
+
})), T.active && ((he == null || he === -1) && (he = Ze, Ue = ct), le({
|
|
957
957
|
sortable: this,
|
|
958
958
|
name: "end",
|
|
959
959
|
toEl: W,
|
|
@@ -961,7 +961,7 @@ T.prototype = /** @lends Sortable.prototype */
|
|
|
961
961
|
}), this.save()))), this._nulling();
|
|
962
962
|
},
|
|
963
963
|
_nulling: function() {
|
|
964
|
-
|
|
964
|
+
ue("nulling", this), V = m = W = w = ze = Y = Tt = $e = He = we = it = he = 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
|
},
|
|
@@ -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), Yo(e));
|
|
977
977
|
break;
|
|
978
978
|
case "selectstart":
|
|
979
979
|
e.preventDefault();
|
|
@@ -985,8 +985,8 @@ T.prototype = /** @lends Sortable.prototype */
|
|
|
985
985
|
* @returns {String[]}
|
|
986
986
|
*/
|
|
987
987
|
toArray: function() {
|
|
988
|
-
for (var e = [], n, o = this.el.children, r = 0,
|
|
989
|
-
n = o[r],
|
|
988
|
+
for (var e = [], n, o = this.el.children, r = 0, i = o.length, a = this.options; r < i; r++)
|
|
989
|
+
n = o[r], De(n, a.draggable, this.el, !1) && e.push(n.getAttribute(a.dataIdAttr) || jo(n));
|
|
990
990
|
return e;
|
|
991
991
|
},
|
|
992
992
|
/**
|
|
@@ -995,11 +995,11 @@ T.prototype = /** @lends Sortable.prototype */
|
|
|
995
995
|
*/
|
|
996
996
|
sort: function(e, n) {
|
|
997
997
|
var o = {}, r = this.el;
|
|
998
|
-
this.toArray().forEach(function(
|
|
999
|
-
var l = r.children[
|
|
1000
|
-
|
|
1001
|
-
}, this), n && this.captureAnimationState(), e.forEach(function(
|
|
1002
|
-
o[
|
|
998
|
+
this.toArray().forEach(function(i, a) {
|
|
999
|
+
var l = r.children[a];
|
|
1000
|
+
De(l, this.options.draggable, r, !1) && (o[i] = l);
|
|
1001
|
+
}, this), n && this.captureAnimationState(), e.forEach(function(i) {
|
|
1002
|
+
o[i] && (r.removeChild(o[i]), r.appendChild(o[i]));
|
|
1003
1003
|
}), n && this.animateAll();
|
|
1004
1004
|
},
|
|
1005
1005
|
/**
|
|
@@ -1016,7 +1016,7 @@ T.prototype = /** @lends Sortable.prototype */
|
|
|
1016
1016
|
* @returns {HTMLElement|null}
|
|
1017
1017
|
*/
|
|
1018
1018
|
closest: function(e, n) {
|
|
1019
|
-
return
|
|
1019
|
+
return De(e, n || this.options.draggable, this.el, !1);
|
|
1020
1020
|
},
|
|
1021
1021
|
/**
|
|
1022
1022
|
* Set/get option
|
|
@@ -1035,16 +1035,16 @@ T.prototype = /** @lends Sortable.prototype */
|
|
|
1035
1035
|
* Destroy
|
|
1036
1036
|
*/
|
|
1037
1037
|
destroy: function() {
|
|
1038
|
-
|
|
1038
|
+
ue("destroy", this);
|
|
1039
1039
|
var e = this.el;
|
|
1040
|
-
e[
|
|
1040
|
+
e[ge] = null, C(e, "mousedown", this._onTapStart), C(e, "touchstart", this._onTapStart), C(e, "pointerdown", this._onTapStart), this.nativeDraggable && (C(e, "dragover", this), C(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(n) {
|
|
1041
1041
|
n.removeAttribute("draggable");
|
|
1042
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 (!$e) {
|
|
1046
|
+
if (ue("hideClone", this), T.eventCanceled) return;
|
|
1047
|
+
_(Y, "display", "none"), this.options.removeCloneOnHide && Y.parentNode && Y.parentNode.removeChild(Y), $e = !0;
|
|
1048
1048
|
}
|
|
1049
1049
|
},
|
|
1050
1050
|
_showClone: function(e) {
|
|
@@ -1052,58 +1052,58 @@ T.prototype = /** @lends Sortable.prototype */
|
|
|
1052
1052
|
this._hideClone();
|
|
1053
1053
|
return;
|
|
1054
1054
|
}
|
|
1055
|
-
if (
|
|
1056
|
-
if (
|
|
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", ""),
|
|
1055
|
+
if ($e) {
|
|
1056
|
+
if (ue("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", ""), $e = !1;
|
|
1058
1058
|
}
|
|
1059
1059
|
}
|
|
1060
1060
|
};
|
|
1061
|
-
function
|
|
1061
|
+
function Yo(t) {
|
|
1062
1062
|
t.dataTransfer && (t.dataTransfer.dropEffect = "move"), t.cancelable && t.preventDefault();
|
|
1063
1063
|
}
|
|
1064
|
-
function Et(t, e, n, o, r,
|
|
1065
|
-
var s, u = t[
|
|
1066
|
-
return window.CustomEvent && !
|
|
1064
|
+
function Et(t, e, n, o, r, i, a, l) {
|
|
1065
|
+
var s, u = t[ge], f = u.options.onMove, c;
|
|
1066
|
+
return window.CustomEvent && !Le && !mt ? s = new CustomEvent("move", {
|
|
1067
1067
|
bubbles: !0,
|
|
1068
1068
|
cancelable: !0
|
|
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 =
|
|
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 = i || ee(e), s.willInsertAfter = l, s.originalEvent = a, t.dispatchEvent(s), f && (c = f.call(u, s, a)), c;
|
|
1070
1070
|
}
|
|
1071
1071
|
function Xt(t) {
|
|
1072
1072
|
t.draggable = !1;
|
|
1073
1073
|
}
|
|
1074
|
-
function
|
|
1074
|
+
function Ho() {
|
|
1075
1075
|
Jt = !1;
|
|
1076
1076
|
}
|
|
1077
|
-
function
|
|
1078
|
-
var o =
|
|
1077
|
+
function Xo(t, e, n) {
|
|
1078
|
+
var o = ee(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 =
|
|
1081
|
+
function Go(t, e, n) {
|
|
1082
|
+
var o = ee(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
|
|
1085
|
+
function zo(t, e, n, o, r, i, a, l) {
|
|
1086
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
|
-
if (!
|
|
1087
|
+
if (!a) {
|
|
1088
1088
|
if (l && wt < u * r) {
|
|
1089
|
-
if (!ft && (dt === 1 ? s > f + u *
|
|
1089
|
+
if (!ft && (dt === 1 ? s > f + u * i / 2 : s < c - u * i / 2) && (ft = !0), ft)
|
|
1090
1090
|
E = !0;
|
|
1091
1091
|
else if (dt === 1 ? s < f + wt : s > c - wt)
|
|
1092
1092
|
return -dt;
|
|
1093
1093
|
} else if (s > f + u * (1 - r) / 2 && s < c - u * (1 - r) / 2)
|
|
1094
1094
|
return Ko(e);
|
|
1095
1095
|
}
|
|
1096
|
-
return E = E ||
|
|
1096
|
+
return E = E || a, E && (s < f + u * i / 2 || s > c - u * i / 2) ? s > f + u / 2 ? 1 : -1 : 0;
|
|
1097
1097
|
}
|
|
1098
1098
|
function Ko(t) {
|
|
1099
|
-
return
|
|
1099
|
+
return ve(m) < ve(t) ? 1 : -1;
|
|
1100
1100
|
}
|
|
1101
|
-
function
|
|
1101
|
+
function jo(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
|
|
1106
|
+
function qo(t) {
|
|
1107
1107
|
Nt.length = 0;
|
|
1108
1108
|
for (var e = t.getElementsByTagName("input"), n = e.length; n--; ) {
|
|
1109
1109
|
var o = e[n];
|
|
@@ -1116,30 +1116,30 @@ function xt(t) {
|
|
|
1116
1116
|
function en(t) {
|
|
1117
1117
|
return clearTimeout(t);
|
|
1118
1118
|
}
|
|
1119
|
-
|
|
1119
|
+
Mt && R(document, "touchmove", function(t) {
|
|
1120
1120
|
(T.active || Qe) && t.cancelable && t.preventDefault();
|
|
1121
1121
|
});
|
|
1122
1122
|
T.utils = {
|
|
1123
1123
|
on: R,
|
|
1124
|
-
off:
|
|
1124
|
+
off: C,
|
|
1125
1125
|
css: _,
|
|
1126
1126
|
find: An,
|
|
1127
1127
|
is: function(e, n) {
|
|
1128
|
-
return !!
|
|
1128
|
+
return !!De(e, n, e, !1);
|
|
1129
1129
|
},
|
|
1130
|
-
extend:
|
|
1130
|
+
extend: No,
|
|
1131
1131
|
throttle: kn,
|
|
1132
|
-
closest:
|
|
1133
|
-
toggleClass:
|
|
1134
|
-
clone:
|
|
1135
|
-
index:
|
|
1132
|
+
closest: De,
|
|
1133
|
+
toggleClass: me,
|
|
1134
|
+
clone: Mn,
|
|
1135
|
+
index: ve,
|
|
1136
1136
|
nextTick: xt,
|
|
1137
1137
|
cancelNextTick: en,
|
|
1138
1138
|
detectDirection: Vn,
|
|
1139
1139
|
getChild: et
|
|
1140
1140
|
};
|
|
1141
1141
|
T.get = function(t) {
|
|
1142
|
-
return t[
|
|
1142
|
+
return t[ge];
|
|
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 =
|
|
1150
|
+
o.utils && (T.utils = Oe(Oe({}, 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
1156
|
T.version = So;
|
|
1157
|
-
var K = [],
|
|
1158
|
-
function
|
|
1157
|
+
var K = [], at, tn, nn = !1, Gt, zt, At, lt;
|
|
1158
|
+
function Qo() {
|
|
1159
1159
|
function t() {
|
|
1160
1160
|
this.defaults = {
|
|
1161
1161
|
scroll: !0,
|
|
@@ -1177,32 +1177,32 @@ function Zo() {
|
|
|
1177
1177
|
!this.options.dragOverBubble && !o.rootEl && this._handleAutoScroll(o);
|
|
1178
1178
|
},
|
|
1179
1179
|
drop: function() {
|
|
1180
|
-
this.sortable.nativeDraggable ?
|
|
1180
|
+
this.sortable.nativeDraggable ? C(document, "dragover", this._handleAutoScroll) : (C(document, "pointermove", this._handleFallbackAutoScroll), C(document, "touchmove", this._handleFallbackAutoScroll), C(document, "mousemove", this._handleFallbackAutoScroll)), _n(), Dt(), Ao();
|
|
1181
1181
|
},
|
|
1182
1182
|
nulling: function() {
|
|
1183
|
-
At = tn =
|
|
1183
|
+
At = tn = at = 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,
|
|
1190
|
-
if (At = n, o || this.options.forceAutoScrollFallback || mt ||
|
|
1191
|
-
|
|
1192
|
-
var s =
|
|
1193
|
-
nn && (!lt ||
|
|
1194
|
-
var u =
|
|
1195
|
-
u !== s && (s = u, Dt()),
|
|
1196
|
-
}, 10), Gt =
|
|
1189
|
+
var r = this, i = (n.touches ? n.touches[0] : n).clientX, a = (n.touches ? n.touches[0] : n).clientY, l = document.elementFromPoint(i, a);
|
|
1190
|
+
if (At = n, o || this.options.forceAutoScrollFallback || mt || Le || st) {
|
|
1191
|
+
Kt(n, this.options, l, o);
|
|
1192
|
+
var s = Be(l, !0);
|
|
1193
|
+
nn && (!lt || i !== Gt || a !== zt) && (lt && _n(), lt = setInterval(function() {
|
|
1194
|
+
var u = Be(document.elementFromPoint(i, a), !0);
|
|
1195
|
+
u !== s && (s = u, Dt()), Kt(n, r.options, u, o);
|
|
1196
|
+
}, 10), Gt = i, zt = a);
|
|
1197
1197
|
} else {
|
|
1198
|
-
if (!this.options.bubbleScroll ||
|
|
1198
|
+
if (!this.options.bubbleScroll || Be(l, !0) === Ie()) {
|
|
1199
1199
|
Dt();
|
|
1200
1200
|
return;
|
|
1201
1201
|
}
|
|
1202
|
-
|
|
1202
|
+
Kt(n, this.options, Be(l, !1), !1);
|
|
1203
1203
|
}
|
|
1204
1204
|
}
|
|
1205
|
-
},
|
|
1205
|
+
}, ke(t, {
|
|
1206
1206
|
pluginName: "scroll",
|
|
1207
1207
|
initializeByDefault: !0
|
|
1208
1208
|
});
|
|
@@ -1215,35 +1215,35 @@ function Dt() {
|
|
|
1215
1215
|
function _n() {
|
|
1216
1216
|
clearInterval(lt);
|
|
1217
1217
|
}
|
|
1218
|
-
var
|
|
1218
|
+
var Kt = kn(function(t, e, n, o) {
|
|
1219
1219
|
if (e.scroll) {
|
|
1220
|
-
var r = (t.touches ? t.touches[0] : t).clientX,
|
|
1221
|
-
tn !== n && (tn = n, Dt(),
|
|
1222
|
-
var c = 0, E =
|
|
1220
|
+
var r = (t.touches ? t.touches[0] : t).clientX, i = (t.touches ? t.touches[0] : t).clientY, a = e.scrollSensitivity, l = e.scrollSpeed, s = Ie(), u = !1, f;
|
|
1221
|
+
tn !== n && (tn = n, Dt(), at = e.scroll, f = e.scrollFn, at === !0 && (at = Be(n, !0)));
|
|
1222
|
+
var c = 0, E = at;
|
|
1223
1223
|
do {
|
|
1224
|
-
var b = E, y =
|
|
1225
|
-
b === s ? (
|
|
1226
|
-
var
|
|
1224
|
+
var b = E, y = ee(b), g = y.top, L = y.bottom, H = y.left, N = y.right, $ = y.width, B = y.height, M = void 0, X = void 0, de = b.scrollWidth, Se = b.scrollHeight, oe = _(b), ye = b.scrollLeft, fe = b.scrollTop;
|
|
1225
|
+
b === s ? (M = $ < de && (oe.overflowX === "auto" || oe.overflowX === "scroll" || oe.overflowX === "visible"), X = B < Se && (oe.overflowY === "auto" || oe.overflowY === "scroll" || oe.overflowY === "visible")) : (M = $ < de && (oe.overflowX === "auto" || oe.overflowX === "scroll"), X = B < Se && (oe.overflowY === "auto" || oe.overflowY === "scroll"));
|
|
1226
|
+
var Ce = M && (Math.abs(N - r) <= a && ye + $ < de) - (Math.abs(H - r) <= a && !!ye), Q = X && (Math.abs(L - i) <= a && fe + B < Se) - (Math.abs(g - i) <= a && !!fe);
|
|
1227
1227
|
if (!K[c])
|
|
1228
|
-
for (var
|
|
1229
|
-
K[
|
|
1230
|
-
(K[c].vx !=
|
|
1228
|
+
for (var Ee = 0; Ee <= c; Ee++)
|
|
1229
|
+
K[Ee] || (K[Ee] = {});
|
|
1230
|
+
(K[c].vx != Ce || K[c].vy != Q || K[c].el !== b) && (K[c].el = b, K[c].vx = Ce, K[c].vy = Q, clearInterval(K[c].pid), (Ce != 0 || Q != 0) && (u = !0, K[c].pid = setInterval((function() {
|
|
1231
1231
|
o && this.layer === 0 && T.active._onTouchMove(At);
|
|
1232
|
-
var
|
|
1233
|
-
typeof f == "function" && f.call(T.dragged.parentNode[
|
|
1232
|
+
var Re = 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[ge], d, Re, t, At, K[this.layer].el) !== "continue" || Ln(K[this.layer].el, d, Re);
|
|
1234
1234
|
}).bind({
|
|
1235
1235
|
layer: c
|
|
1236
1236
|
}), 24))), c++;
|
|
1237
|
-
} while (e.bubbleScroll && E !== s && (E =
|
|
1237
|
+
} while (e.bubbleScroll && E !== s && (E = Be(E, !1)));
|
|
1238
1238
|
nn = u;
|
|
1239
1239
|
}
|
|
1240
1240
|
}, 30), Wn = function(e) {
|
|
1241
|
-
var n = e.originalEvent, o = e.putSortable, r = e.dragEl,
|
|
1241
|
+
var n = e.originalEvent, o = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, l = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
1242
1242
|
if (n) {
|
|
1243
|
-
var u = o ||
|
|
1243
|
+
var u = o || i;
|
|
1244
1244
|
l();
|
|
1245
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) && (
|
|
1246
|
+
s(), u && !u.el.contains(c) && (a("spill"), this.onSpill({
|
|
1247
1247
|
dragEl: r,
|
|
1248
1248
|
putSortable: o
|
|
1249
1249
|
}));
|
|
@@ -1265,7 +1265,7 @@ sn.prototype = {
|
|
|
1265
1265
|
},
|
|
1266
1266
|
drop: Wn
|
|
1267
1267
|
};
|
|
1268
|
-
|
|
1268
|
+
ke(sn, {
|
|
1269
1269
|
pluginName: "revertOnSpill"
|
|
1270
1270
|
});
|
|
1271
1271
|
function un() {
|
|
@@ -1277,35 +1277,35 @@ un.prototype = {
|
|
|
1277
1277
|
},
|
|
1278
1278
|
drop: Wn
|
|
1279
1279
|
};
|
|
1280
|
-
|
|
1280
|
+
ke(un, {
|
|
1281
1281
|
pluginName: "removeOnSpill"
|
|
1282
1282
|
});
|
|
1283
|
-
T.mount(new
|
|
1283
|
+
T.mount(new Qo());
|
|
1284
1284
|
T.mount(un, sn);
|
|
1285
|
-
function
|
|
1285
|
+
function jt(t) {
|
|
1286
1286
|
t.parentElement !== null && t.parentElement.removeChild(t);
|
|
1287
1287
|
}
|
|
1288
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 Zo() {
|
|
1293
1293
|
return typeof window < "u" ? window.console : globalThis.console;
|
|
1294
1294
|
}
|
|
1295
|
-
const
|
|
1296
|
-
function
|
|
1295
|
+
const Jo = Zo();
|
|
1296
|
+
function er(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 tr = /-(\w)/g, nr = er((t) => t.replace(tr, (e, n) => n.toUpperCase())), Yn = ["Start", "Add", "Remove", "Update", "End"], Hn = ["Choose", "Unchoose", "Sort", "Filter", "Clone"], Xn = ["Move"], or = [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 rr(t) {
|
|
1308
|
+
return or.indexOf(t) !== -1;
|
|
1309
1309
|
}
|
|
1310
1310
|
const ir = [
|
|
1311
1311
|
"a",
|
|
@@ -1426,10 +1426,10 @@ const ir = [
|
|
|
1426
1426
|
"video",
|
|
1427
1427
|
"wbr"
|
|
1428
1428
|
];
|
|
1429
|
-
function
|
|
1429
|
+
function ar(t) {
|
|
1430
1430
|
return ir.includes(t);
|
|
1431
1431
|
}
|
|
1432
|
-
function
|
|
1432
|
+
function lr(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 sr({ $attrs: t, componentData: e = {} }) {
|
|
1442
1442
|
return {
|
|
1443
1443
|
...zn(
|
|
1444
1444
|
Object.entries(t).filter(([o, r]) => Gn(o))
|
|
@@ -1446,11 +1446,11 @@ function ur({ $attrs: t, componentData: e = {} }) {
|
|
|
1446
1446
|
...e
|
|
1447
1447
|
};
|
|
1448
1448
|
}
|
|
1449
|
-
function
|
|
1450
|
-
const n = zn(
|
|
1451
|
-
Object.entries(e).forEach(([r,
|
|
1452
|
-
on[r].forEach((
|
|
1453
|
-
n[`on${
|
|
1449
|
+
function ur({ $attrs: t, callBackBuilder: e }) {
|
|
1450
|
+
const n = zn(Kn(t));
|
|
1451
|
+
Object.entries(e).forEach(([r, i]) => {
|
|
1452
|
+
on[r].forEach((a) => {
|
|
1453
|
+
n[`on${a}`] = i(a);
|
|
1454
1454
|
});
|
|
1455
1455
|
});
|
|
1456
1456
|
const o = `[data-draggable]${n.draggable || ""}`;
|
|
@@ -1459,29 +1459,29 @@ function cr({ $attrs: t, callBackBuilder: e }) {
|
|
|
1459
1459
|
draggable: o
|
|
1460
1460
|
};
|
|
1461
1461
|
}
|
|
1462
|
-
function
|
|
1463
|
-
return Object.entries(t).filter(([e, n]) => !Gn(e)).map(([e, n]) => [
|
|
1462
|
+
function Kn(t) {
|
|
1463
|
+
return Object.entries(t).filter(([e, n]) => !Gn(e)).map(([e, n]) => [nr(e), n]).filter(([e, n]) => !rr(e));
|
|
1464
1464
|
}
|
|
1465
|
-
const wn = ({ el: t }) => t,
|
|
1466
|
-
class
|
|
1465
|
+
const wn = ({ el: t }) => t, cr = (t, e) => t.__draggable_context = e, xn = (t) => t.__draggable_context;
|
|
1466
|
+
class dr {
|
|
1467
1467
|
constructor({
|
|
1468
1468
|
nodes: { header: e, default: n, footer: o },
|
|
1469
1469
|
root: r,
|
|
1470
|
-
realList:
|
|
1470
|
+
realList: i
|
|
1471
1471
|
}) {
|
|
1472
|
-
this.defaultNodes = n, this.children = [...e, ...n, ...o], this.externalComponent = r.externalComponent, this.rootTransition = r.transition, this.tag = r.tag, this.realList =
|
|
1472
|
+
this.defaultNodes = n, this.children = [...e, ...n, ...o], this.externalComponent = r.externalComponent, this.rootTransition = r.transition, this.tag = r.tag, this.realList = i;
|
|
1473
1473
|
}
|
|
1474
1474
|
get _isRootComponent() {
|
|
1475
1475
|
return this.externalComponent || this.rootTransition;
|
|
1476
1476
|
}
|
|
1477
1477
|
render(e, n) {
|
|
1478
|
-
const { tag: o, children: r, _isRootComponent:
|
|
1479
|
-
return e(o, n,
|
|
1478
|
+
const { tag: o, children: r, _isRootComponent: i } = this;
|
|
1479
|
+
return e(o, n, i ? { default: () => r } : r);
|
|
1480
1480
|
}
|
|
1481
1481
|
updated() {
|
|
1482
1482
|
const { defaultNodes: e, realList: n } = this;
|
|
1483
1483
|
e.forEach((o, r) => {
|
|
1484
|
-
|
|
1484
|
+
cr(wn(o), {
|
|
1485
1485
|
element: n[r],
|
|
1486
1486
|
index: r
|
|
1487
1487
|
});
|
|
@@ -1491,54 +1491,54 @@ class fr {
|
|
|
1491
1491
|
return xn(e);
|
|
1492
1492
|
}
|
|
1493
1493
|
getVmIndexFromDomIndex(e, n) {
|
|
1494
|
-
const { defaultNodes: o } = this, { length: r } = o,
|
|
1495
|
-
if (
|
|
1494
|
+
const { defaultNodes: o } = this, { length: r } = o, i = n.children, a = i.item(e);
|
|
1495
|
+
if (a === null)
|
|
1496
1496
|
return r;
|
|
1497
|
-
const l = xn(
|
|
1497
|
+
const l = xn(a);
|
|
1498
1498
|
if (l)
|
|
1499
1499
|
return l.index;
|
|
1500
1500
|
if (r === 0)
|
|
1501
1501
|
return 0;
|
|
1502
|
-
const s = wn(o[0]), u = [...
|
|
1502
|
+
const s = wn(o[0]), u = [...i].findIndex(
|
|
1503
1503
|
(f) => f === s
|
|
1504
1504
|
);
|
|
1505
1505
|
return e < u ? 0 : r;
|
|
1506
1506
|
}
|
|
1507
1507
|
}
|
|
1508
|
-
function
|
|
1508
|
+
function fr(t, e) {
|
|
1509
1509
|
const n = t[e];
|
|
1510
1510
|
return n ? n() : [];
|
|
1511
1511
|
}
|
|
1512
|
-
function
|
|
1513
|
-
const o = e || [], [r,
|
|
1514
|
-
(s) =>
|
|
1515
|
-
), { item:
|
|
1516
|
-
if (!
|
|
1512
|
+
function pr({ $slots: t, realList: e, getKey: n }) {
|
|
1513
|
+
const o = e || [], [r, i] = ["header", "footer"].map(
|
|
1514
|
+
(s) => fr(t, s)
|
|
1515
|
+
), { item: a } = t;
|
|
1516
|
+
if (!a)
|
|
1517
1517
|
throw new Error("draggable element must have an item slot");
|
|
1518
1518
|
const l = o.flatMap(
|
|
1519
|
-
(s, u) =>
|
|
1519
|
+
(s, u) => a({ element: s, index: u }).map((f) => (f.key = n(s), f.props = { ...f.props || {}, "data-draggable": !0 }, f))
|
|
1520
1520
|
);
|
|
1521
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
|
-
footer:
|
|
1525
|
+
footer: i,
|
|
1526
1526
|
default: l
|
|
1527
1527
|
};
|
|
1528
1528
|
}
|
|
1529
|
-
function
|
|
1530
|
-
const e =
|
|
1529
|
+
function mr(t) {
|
|
1530
|
+
const e = lr(t), n = !ar(t) && !e;
|
|
1531
1531
|
return {
|
|
1532
1532
|
transition: e,
|
|
1533
1533
|
externalComponent: n,
|
|
1534
|
-
tag: n ?
|
|
1534
|
+
tag: n ? z(t) : e ? ao : t
|
|
1535
1535
|
};
|
|
1536
1536
|
}
|
|
1537
|
-
function
|
|
1538
|
-
const r =
|
|
1539
|
-
return new
|
|
1537
|
+
function hr({ $slots: t, tag: e, realList: n, getKey: o }) {
|
|
1538
|
+
const r = pr({ $slots: t, realList: n, getKey: o }), i = mr(e);
|
|
1539
|
+
return new dr({ nodes: r, root: i, realList: n });
|
|
1540
1540
|
}
|
|
1541
|
-
function
|
|
1541
|
+
function jn(t, e) {
|
|
1542
1542
|
rn(() => this.$emit(t.toLowerCase(), e));
|
|
1543
1543
|
}
|
|
1544
1544
|
function qn(t) {
|
|
@@ -1547,14 +1547,14 @@ function qn(t) {
|
|
|
1547
1547
|
return this[`onDrag${t}`](e, n);
|
|
1548
1548
|
};
|
|
1549
1549
|
}
|
|
1550
|
-
function
|
|
1550
|
+
function gr(t) {
|
|
1551
1551
|
const e = qn.call(this, t);
|
|
1552
1552
|
return (n, o) => {
|
|
1553
|
-
e.call(this, n, o),
|
|
1553
|
+
e.call(this, n, o), jn.call(this, t, n);
|
|
1554
1554
|
};
|
|
1555
1555
|
}
|
|
1556
1556
|
let qt = null;
|
|
1557
|
-
const
|
|
1557
|
+
const vr = {
|
|
1558
1558
|
list: {
|
|
1559
1559
|
type: Array,
|
|
1560
1560
|
required: !1,
|
|
@@ -1586,15 +1586,15 @@ const br = {
|
|
|
1586
1586
|
required: !1,
|
|
1587
1587
|
default: null
|
|
1588
1588
|
}
|
|
1589
|
-
},
|
|
1589
|
+
}, br = [
|
|
1590
1590
|
"update:modelValue",
|
|
1591
1591
|
"change",
|
|
1592
1592
|
...[...on.manageAndEmit, ...on.emit].map((t) => t.toLowerCase())
|
|
1593
|
-
],
|
|
1593
|
+
], yr = We({
|
|
1594
1594
|
name: "draggable",
|
|
1595
1595
|
inheritAttrs: !1,
|
|
1596
|
-
props:
|
|
1597
|
-
emits:
|
|
1596
|
+
props: vr,
|
|
1597
|
+
emits: br,
|
|
1598
1598
|
data() {
|
|
1599
1599
|
return {
|
|
1600
1600
|
error: !1
|
|
@@ -1603,21 +1603,21 @@ const br = {
|
|
|
1603
1603
|
render() {
|
|
1604
1604
|
try {
|
|
1605
1605
|
this.error = !1;
|
|
1606
|
-
const { $slots: t, $attrs: e, tag: n, componentData: o, realList: r, getKey:
|
|
1606
|
+
const { $slots: t, $attrs: e, tag: n, componentData: o, realList: r, getKey: i } = this, a = hr({
|
|
1607
1607
|
$slots: t,
|
|
1608
1608
|
tag: n,
|
|
1609
1609
|
realList: r,
|
|
1610
|
-
getKey:
|
|
1610
|
+
getKey: i
|
|
1611
1611
|
});
|
|
1612
|
-
this.componentStructure =
|
|
1613
|
-
const l =
|
|
1614
|
-
return
|
|
1612
|
+
this.componentStructure = a;
|
|
1613
|
+
const l = sr({ $attrs: e, componentData: o });
|
|
1614
|
+
return a.render(cn, l);
|
|
1615
1615
|
} catch (t) {
|
|
1616
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 && Jo.error(
|
|
1621
1621
|
"modelValue and list props are mutually exclusive! Please set one or another."
|
|
1622
1622
|
);
|
|
1623
1623
|
},
|
|
@@ -1626,12 +1626,12 @@ const br = {
|
|
|
1626
1626
|
return;
|
|
1627
1627
|
const { $attrs: t, $el: e, componentStructure: n } = this;
|
|
1628
1628
|
n.updated();
|
|
1629
|
-
const o =
|
|
1629
|
+
const o = ur({
|
|
1630
1630
|
$attrs: t,
|
|
1631
1631
|
callBackBuilder: {
|
|
1632
|
-
manageAndEmit: (
|
|
1633
|
-
emit: (
|
|
1634
|
-
manage: (
|
|
1632
|
+
manageAndEmit: (i) => gr.call(this, i),
|
|
1633
|
+
emit: (i) => jn.bind(this, i),
|
|
1634
|
+
manage: (i) => qn.call(this, i)
|
|
1635
1635
|
}
|
|
1636
1636
|
}), r = e.nodeType === 1 ? e : e.parentElement;
|
|
1637
1637
|
this._sortable = new T(r, o), this.targetDomElement = r, r.__draggable_component__ = this;
|
|
@@ -1656,7 +1656,7 @@ const br = {
|
|
|
1656
1656
|
$attrs: {
|
|
1657
1657
|
handler(t) {
|
|
1658
1658
|
const { _sortable: e } = this;
|
|
1659
|
-
e &&
|
|
1659
|
+
e && Kn(t).forEach(([n, o]) => {
|
|
1660
1660
|
e.option(n, o);
|
|
1661
1661
|
});
|
|
1662
1662
|
},
|
|
@@ -1709,7 +1709,7 @@ const br = {
|
|
|
1709
1709
|
const e = t.item._underlying_vm_;
|
|
1710
1710
|
if (e === void 0)
|
|
1711
1711
|
return;
|
|
1712
|
-
|
|
1712
|
+
jt(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 };
|
|
@@ -1717,7 +1717,7 @@ const br = {
|
|
|
1717
1717
|
},
|
|
1718
1718
|
onDragRemove(t) {
|
|
1719
1719
|
if (Tn(this.$el, t.item, t.oldIndex), t.pullMode === "clone") {
|
|
1720
|
-
|
|
1720
|
+
jt(t.clone);
|
|
1721
1721
|
return;
|
|
1722
1722
|
}
|
|
1723
1723
|
const { index: e, element: n } = this.context;
|
|
@@ -1726,7 +1726,7 @@ const br = {
|
|
|
1726
1726
|
this.emitChanges({ removed: o });
|
|
1727
1727
|
},
|
|
1728
1728
|
onDragUpdate(t) {
|
|
1729
|
-
|
|
1729
|
+
jt(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 };
|
|
@@ -1736,7 +1736,7 @@ const br = {
|
|
|
1736
1736
|
if (!t.element)
|
|
1737
1737
|
return 0;
|
|
1738
1738
|
const n = [...e.to.children].filter(
|
|
1739
|
-
(
|
|
1739
|
+
(a) => a.style.display !== "none"
|
|
1740
1740
|
), o = n.indexOf(e.related), r = t.component.getVmIndexFromDomIndex(
|
|
1741
1741
|
o
|
|
1742
1742
|
);
|
|
@@ -1746,13 +1746,13 @@ const br = {
|
|
|
1746
1746
|
const { move: n, realList: o } = this;
|
|
1747
1747
|
if (!n || !o)
|
|
1748
1748
|
return !0;
|
|
1749
|
-
const r = this.getRelatedContextFromMoveEvent(t),
|
|
1749
|
+
const r = this.getRelatedContextFromMoveEvent(t), i = this.computeFutureIndex(r, t), a = {
|
|
1750
1750
|
...this.context,
|
|
1751
|
-
futureIndex:
|
|
1751
|
+
futureIndex: i
|
|
1752
1752
|
}, l = {
|
|
1753
1753
|
...t,
|
|
1754
1754
|
relatedContext: r,
|
|
1755
|
-
draggedContext:
|
|
1755
|
+
draggedContext: a
|
|
1756
1756
|
};
|
|
1757
1757
|
return n(l, e);
|
|
1758
1758
|
},
|
|
@@ -1760,34 +1760,34 @@ const br = {
|
|
|
1760
1760
|
qt = null;
|
|
1761
1761
|
}
|
|
1762
1762
|
}
|
|
1763
|
-
}),
|
|
1763
|
+
}), Er = Object.entries(xe).map((t) => {
|
|
1764
1764
|
let e = "";
|
|
1765
1765
|
switch (t[1]) {
|
|
1766
|
-
case
|
|
1766
|
+
case xe.BarChart:
|
|
1767
1767
|
e = "bar_chart";
|
|
1768
1768
|
break;
|
|
1769
|
-
case
|
|
1769
|
+
case xe.Table:
|
|
1770
1770
|
e = "table";
|
|
1771
1771
|
break;
|
|
1772
|
-
case
|
|
1772
|
+
case xe.Circular:
|
|
1773
1773
|
e = "pie_chart";
|
|
1774
1774
|
break;
|
|
1775
|
-
case
|
|
1775
|
+
case xe.LineChart:
|
|
1776
1776
|
e = "show_chart";
|
|
1777
1777
|
break;
|
|
1778
|
-
case
|
|
1778
|
+
case xe.Scorecard:
|
|
1779
1779
|
e = "money";
|
|
1780
1780
|
break;
|
|
1781
|
-
case
|
|
1781
|
+
case xe.Spacer:
|
|
1782
1782
|
e = "space_bar";
|
|
1783
1783
|
break;
|
|
1784
|
-
case
|
|
1784
|
+
case xe.StackBarChart:
|
|
1785
1785
|
e = "stacked_bar_chart";
|
|
1786
1786
|
break;
|
|
1787
|
-
case
|
|
1787
|
+
case xe.ClusteredStackBarChart:
|
|
1788
1788
|
e = "stacked_bar_chart";
|
|
1789
1789
|
break;
|
|
1790
|
-
case
|
|
1790
|
+
case xe.StackLineChart:
|
|
1791
1791
|
e = "stacked_line_chart";
|
|
1792
1792
|
break;
|
|
1793
1793
|
}
|
|
@@ -1796,7 +1796,7 @@ const br = {
|
|
|
1796
1796
|
icon: e,
|
|
1797
1797
|
value: t[1]
|
|
1798
1798
|
};
|
|
1799
|
-
}),
|
|
1799
|
+
}), _r = /* @__PURE__ */ We({
|
|
1800
1800
|
__name: "WidgetTypeList",
|
|
1801
1801
|
props: /* @__PURE__ */ kt({
|
|
1802
1802
|
childClass: {
|
|
@@ -1820,24 +1820,24 @@ const br = {
|
|
|
1820
1820
|
}),
|
|
1821
1821
|
emits: ["update:modelValue"],
|
|
1822
1822
|
setup(t) {
|
|
1823
|
-
const { t: e } = Lt(), n = tt(t, "modelValue"), o = t, r =
|
|
1824
|
-
() =>
|
|
1825
|
-
...
|
|
1826
|
-
label: e(`report.widget.types.${
|
|
1823
|
+
const { t: e } = Lt(), n = tt(t, "modelValue"), o = t, r = S(
|
|
1824
|
+
() => Er.map((i) => ({
|
|
1825
|
+
...i,
|
|
1826
|
+
label: e(`report.widget.types.${i.value.toLowerCase()}`)
|
|
1827
1827
|
}))
|
|
1828
1828
|
);
|
|
1829
|
-
return (
|
|
1830
|
-
const l =
|
|
1829
|
+
return (i, a) => {
|
|
1830
|
+
const l = z("FmIcon"), s = z("FmCard");
|
|
1831
1831
|
return D(), k("div", null, [
|
|
1832
|
-
(D(!0), k(
|
|
1832
|
+
(D(!0), k(Ne, null, It(r.value.filter(
|
|
1833
1833
|
(u) => o.excludeWidgeType.indexOf(u.value) === -1
|
|
1834
|
-
), (u, f) => (D(),
|
|
1834
|
+
), (u, f) => (D(), be(s, {
|
|
1835
1835
|
key: f,
|
|
1836
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
1838
|
onClick: (c) => n.value = u.value
|
|
1839
1839
|
}, {
|
|
1840
|
-
default:
|
|
1840
|
+
default: ce(() => [
|
|
1841
1841
|
G(l, {
|
|
1842
1842
|
name: u.icon,
|
|
1843
1843
|
size: o.isList ? "md" : "lg",
|
|
@@ -1845,88 +1845,17 @@ const br = {
|
|
|
1845
1845
|
}, null, 8, ["name", "size"]),
|
|
1846
1846
|
A("span", {
|
|
1847
1847
|
class: Ot(o.isList ? "" : "flex items-center text-center leading-[24px] h-[48px]")
|
|
1848
|
-
},
|
|
1848
|
+
}, j(u.label), 3)
|
|
1849
1849
|
]),
|
|
1850
1850
|
_: 2
|
|
1851
1851
|
}, 1032, ["class", "onClick"]))), 128))
|
|
1852
1852
|
]);
|
|
1853
1853
|
};
|
|
1854
1854
|
}
|
|
1855
|
-
}),
|
|
1856
|
-
function wr(t) {
|
|
1857
|
-
let e, n, o, r;
|
|
1858
|
-
switch (t) {
|
|
1859
|
-
case z.Table:
|
|
1860
|
-
e = [], n = !1, o = yo.top;
|
|
1861
|
-
break;
|
|
1862
|
-
case z.ClusteredStackBarChart:
|
|
1863
|
-
r = !0;
|
|
1864
|
-
break;
|
|
1865
|
-
}
|
|
1866
|
-
return {
|
|
1867
|
-
schemaNames: [],
|
|
1868
|
-
dimensions: [],
|
|
1869
|
-
metrics: [],
|
|
1870
|
-
filters: [],
|
|
1871
|
-
sorts: [],
|
|
1872
|
-
breakdownDimension: void 0,
|
|
1873
|
-
sparklineDimension: void 0,
|
|
1874
|
-
sparklineType: void 0,
|
|
1875
|
-
sparklinePercentOfTotal: void 0,
|
|
1876
|
-
limit: null,
|
|
1877
|
-
showGrandTotal: !1,
|
|
1878
|
-
rollupPosition: o,
|
|
1879
|
-
showSearchBar: n,
|
|
1880
|
-
isTransposed: !1,
|
|
1881
|
-
isDrillable: !1,
|
|
1882
|
-
stackBarOverlap: r,
|
|
1883
|
-
columnIds: [],
|
|
1884
|
-
rowIds: [],
|
|
1885
|
-
joinDatasources: e
|
|
1886
|
-
};
|
|
1887
|
-
}
|
|
1888
|
-
function wa(t, e) {
|
|
1889
|
-
let n = 1, o = 1;
|
|
1890
|
-
switch (t) {
|
|
1891
|
-
case z.Scorecard:
|
|
1892
|
-
n = 1, o = 2;
|
|
1893
|
-
break;
|
|
1894
|
-
case z.BarChart:
|
|
1895
|
-
case z.StackBarChart:
|
|
1896
|
-
case z.ClusteredStackBarChart:
|
|
1897
|
-
case z.LineChart:
|
|
1898
|
-
case z.StackLineChart:
|
|
1899
|
-
n = 4, o = 6;
|
|
1900
|
-
break;
|
|
1901
|
-
case z.Table:
|
|
1902
|
-
n = 4, o = 12;
|
|
1903
|
-
break;
|
|
1904
|
-
case z.Circular:
|
|
1905
|
-
n = 4, o = 4;
|
|
1906
|
-
break;
|
|
1907
|
-
case z.Spacer:
|
|
1908
|
-
n = 0, o = 12;
|
|
1909
|
-
break;
|
|
1910
|
-
}
|
|
1911
|
-
return {
|
|
1912
|
-
size: {
|
|
1913
|
-
width: o,
|
|
1914
|
-
height: n
|
|
1915
|
-
},
|
|
1916
|
-
widget: {
|
|
1917
|
-
title: e || "New widget",
|
|
1918
|
-
type: t,
|
|
1919
|
-
config: wr(t)
|
|
1920
|
-
}
|
|
1921
|
-
};
|
|
1922
|
-
}
|
|
1923
|
-
function xa(t, e) {
|
|
1924
|
-
return t.filter((n, o) => o !== e);
|
|
1925
|
-
}
|
|
1926
|
-
const xr = {
|
|
1855
|
+
}), Ei = /* @__PURE__ */ an(_r, [["__scopeId", "data-v-0535b07b"]]), Tr = {
|
|
1927
1856
|
key: 0,
|
|
1928
1857
|
class: "flex flex-col gap-5"
|
|
1929
|
-
},
|
|
1858
|
+
}, wr = /* @__PURE__ */ We({
|
|
1930
1859
|
__name: "Section",
|
|
1931
1860
|
props: {
|
|
1932
1861
|
isOpen: { type: Boolean, default: !0 },
|
|
@@ -1936,11 +1865,11 @@ const xr = {
|
|
|
1936
1865
|
setup(t) {
|
|
1937
1866
|
const e = tt(t, "isOpen");
|
|
1938
1867
|
return (n, o) => {
|
|
1939
|
-
const r =
|
|
1940
|
-
return D(), k(
|
|
1868
|
+
const r = z("FmIcon"), i = z("FmMenuDivider");
|
|
1869
|
+
return D(), k(Ne, null, [
|
|
1941
1870
|
A("div", {
|
|
1942
1871
|
class: "flex items-center cursor-pointer fm-typo-en-body-lg-600",
|
|
1943
|
-
onClick: o[0] || (o[0] = (
|
|
1872
|
+
onClick: o[0] || (o[0] = (a) => e.value = !e.value)
|
|
1944
1873
|
}, [
|
|
1945
1874
|
pt(n.$slots, "header", {}, void 0, !0),
|
|
1946
1875
|
G(r, {
|
|
@@ -1948,35 +1877,35 @@ const xr = {
|
|
|
1948
1877
|
}, null, 8, ["name"])
|
|
1949
1878
|
]),
|
|
1950
1879
|
G(Zt, { name: "slide-fade" }, {
|
|
1951
|
-
default:
|
|
1952
|
-
e.value ? (D(), k("div",
|
|
1880
|
+
default: ce(() => [
|
|
1881
|
+
e.value ? (D(), k("div", Tr, [
|
|
1953
1882
|
pt(n.$slots, "content", {}, void 0, !0)
|
|
1954
1883
|
])) : U("", !0)
|
|
1955
1884
|
]),
|
|
1956
1885
|
_: 3
|
|
1957
1886
|
}),
|
|
1958
|
-
G(
|
|
1887
|
+
G(i)
|
|
1959
1888
|
], 64);
|
|
1960
1889
|
};
|
|
1961
1890
|
}
|
|
1962
|
-
}),
|
|
1963
|
-
var
|
|
1964
|
-
const
|
|
1891
|
+
}), _i = /* @__PURE__ */ an(wr, [["__scopeId", "data-v-fa67a3a4"]]);
|
|
1892
|
+
var J = /* @__PURE__ */ ((t) => (t.Dimension = "DIMENSION", t.Metric = "METRIC", t))(J || {});
|
|
1893
|
+
const xr = { class: "relative" }, Dr = ["placeholder", "onKeydown"], Ir = { class: "flex items-center gap-1 px-3 py-1" }, Or = {
|
|
1965
1894
|
key: 1,
|
|
1966
1895
|
class: "fm-typo-en-body-sm-400 text-fm-color-system-error-300"
|
|
1967
|
-
},
|
|
1896
|
+
}, Sr = {
|
|
1968
1897
|
key: 2,
|
|
1969
1898
|
class: "fm-typo-en-body-sm-400 text-fm-color-system-success-300"
|
|
1970
|
-
},
|
|
1899
|
+
}, Cr = {
|
|
1971
1900
|
key: 0,
|
|
1972
1901
|
class: "m-2 mb-0 rounded-lg border border-neutral-200 bg-neutral-50 px-4 py-3"
|
|
1973
|
-
},
|
|
1902
|
+
}, Rr = { class: "flex items-center gap-2" }, Fr = { class: "fm-typo-en-title-md-400 text-fm-color-typo-primary" }, Nr = { class: "fm-typo-en-body-sm-400" }, Ar = { 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" }, kr = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400 mt-3 uppercase tracking-wide" }, Lr = { 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" }, Mr = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400 mt-3 uppercase tracking-wide" }, Pr = { 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 = { key: 2 }, Ur = ["onMousedown", "onMouseenter"], $r = { class: "min-w-0 flex-1" }, Br = { class: "flex items-start gap-2 min-w-0" }, Wr = { class: "min-w-0 overflow-hidden text-ellipsis line-clamp-3 fm-typo-en-body-md-400" }, Yr = {
|
|
1974
1903
|
key: 0,
|
|
1975
1904
|
class: "shrink-0 fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400"
|
|
1976
|
-
},
|
|
1905
|
+
}, Hr = { class: "fm-typo-en-body-sm-400" }, Xr = {
|
|
1977
1906
|
key: 0,
|
|
1978
1907
|
class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-300 leading-relaxed whitespace-normal"
|
|
1979
|
-
},
|
|
1908
|
+
}, Gr = /* @__PURE__ */ We({
|
|
1980
1909
|
__name: "FormulaInput",
|
|
1981
1910
|
props: /* @__PURE__ */ kt({
|
|
1982
1911
|
placeholder: {},
|
|
@@ -2013,17 +1942,17 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2013
1942
|
}
|
|
2014
1943
|
}
|
|
2015
1944
|
const o = tt(t, "modelValue"), { t: r } = Lt();
|
|
2016
|
-
function
|
|
1945
|
+
function i(h) {
|
|
2017
1946
|
const O = [h.toLowerCase(), e(h).toLowerCase()];
|
|
2018
1947
|
return h === "KEYWORD" && O.push("expr", "expression"), O;
|
|
2019
1948
|
}
|
|
2020
|
-
function
|
|
2021
|
-
return h ?
|
|
1949
|
+
function a(h, O) {
|
|
1950
|
+
return h ? i(O).some((x) => x.includes(h)) : !1;
|
|
2022
1951
|
}
|
|
2023
1952
|
function l(h, O, x) {
|
|
2024
|
-
return h ?
|
|
1953
|
+
return h ? a(h, O) || x.some((F) => F == null ? void 0 : F.toLowerCase().includes(h)) : !0;
|
|
2025
1954
|
}
|
|
2026
|
-
const s = t, u =
|
|
1955
|
+
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 = S(() => s.formulaField), H = S(() => [
|
|
2027
1956
|
{
|
|
2028
1957
|
value: "AVG",
|
|
2029
1958
|
description: r("report.formulaInput.functionDescription.avg"),
|
|
@@ -2031,7 +1960,7 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2031
1960
|
exampleResult: r("report.formulaInput.functionResult.avg"),
|
|
2032
1961
|
insertText: "AVG()",
|
|
2033
1962
|
cursorOffset: 4,
|
|
2034
|
-
allowedFields: [
|
|
1963
|
+
allowedFields: [J.Metric]
|
|
2035
1964
|
},
|
|
2036
1965
|
{
|
|
2037
1966
|
value: "SUM",
|
|
@@ -2040,7 +1969,7 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2040
1969
|
exampleResult: r("report.formulaInput.functionResult.sum"),
|
|
2041
1970
|
insertText: "SUM()",
|
|
2042
1971
|
cursorOffset: 4,
|
|
2043
|
-
allowedFields: [
|
|
1972
|
+
allowedFields: [J.Metric]
|
|
2044
1973
|
},
|
|
2045
1974
|
{
|
|
2046
1975
|
value: "COUNT",
|
|
@@ -2089,7 +2018,7 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2089
2018
|
exampleResult: r("report.formulaInput.functionResult.replace"),
|
|
2090
2019
|
insertText: "REPLACE()",
|
|
2091
2020
|
cursorOffset: 8,
|
|
2092
|
-
allowedFields: [
|
|
2021
|
+
allowedFields: [J.Dimension]
|
|
2093
2022
|
},
|
|
2094
2023
|
{
|
|
2095
2024
|
value: "RIGHT",
|
|
@@ -2098,7 +2027,7 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2098
2027
|
exampleResult: r("report.formulaInput.functionResult.right"),
|
|
2099
2028
|
insertText: "RIGHT()",
|
|
2100
2029
|
cursorOffset: 6,
|
|
2101
|
-
allowedFields: [
|
|
2030
|
+
allowedFields: [J.Dimension]
|
|
2102
2031
|
},
|
|
2103
2032
|
{
|
|
2104
2033
|
value: "SUBSTR",
|
|
@@ -2107,7 +2036,7 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2107
2036
|
exampleResult: r("report.formulaInput.functionResult.substr"),
|
|
2108
2037
|
insertText: "SUBSTR()",
|
|
2109
2038
|
cursorOffset: 7,
|
|
2110
|
-
allowedFields: [
|
|
2039
|
+
allowedFields: [J.Dimension]
|
|
2111
2040
|
},
|
|
2112
2041
|
{
|
|
2113
2042
|
value: "REGEXP_MATCH",
|
|
@@ -2116,7 +2045,7 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2116
2045
|
exampleResult: r("report.formulaInput.functionResult.regexpMatch"),
|
|
2117
2046
|
insertText: "REGEXP_MATCH()",
|
|
2118
2047
|
cursorOffset: 13,
|
|
2119
|
-
allowedFields: [
|
|
2048
|
+
allowedFields: [J.Dimension]
|
|
2120
2049
|
},
|
|
2121
2050
|
{
|
|
2122
2051
|
value: "REGEXP_REPLACE",
|
|
@@ -2125,7 +2054,7 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2125
2054
|
exampleResult: r("report.formulaInput.functionResult.regexpReplace"),
|
|
2126
2055
|
insertText: "REGEXP_REPLACE()",
|
|
2127
2056
|
cursorOffset: 15,
|
|
2128
|
-
allowedFields: [
|
|
2057
|
+
allowedFields: [J.Dimension]
|
|
2129
2058
|
},
|
|
2130
2059
|
{
|
|
2131
2060
|
value: "TRIM",
|
|
@@ -2134,7 +2063,7 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2134
2063
|
exampleResult: r("report.formulaInput.functionResult.trim"),
|
|
2135
2064
|
insertText: "TRIM()",
|
|
2136
2065
|
cursorOffset: 5,
|
|
2137
|
-
allowedFields: [
|
|
2066
|
+
allowedFields: [J.Dimension]
|
|
2138
2067
|
},
|
|
2139
2068
|
{
|
|
2140
2069
|
value: "COALESCE",
|
|
@@ -2147,7 +2076,7 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2147
2076
|
{
|
|
2148
2077
|
value: "NULLIF",
|
|
2149
2078
|
description: r("report.formulaInput.functionDescription.nullif"),
|
|
2150
|
-
example: "NULLIF(
|
|
2079
|
+
example: "NULLIF(bill_seqnumber_no, '759')",
|
|
2151
2080
|
exampleResult: r("report.formulaInput.functionResult.nullif"),
|
|
2152
2081
|
insertText: "NULLIF()",
|
|
2153
2082
|
cursorOffset: 7
|
|
@@ -2159,7 +2088,7 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2159
2088
|
exampleResult: r("report.formulaInput.functionResult.concat"),
|
|
2160
2089
|
insertText: "CONCAT()",
|
|
2161
2090
|
cursorOffset: 7,
|
|
2162
|
-
allowedFields: [
|
|
2091
|
+
allowedFields: [J.Dimension]
|
|
2163
2092
|
},
|
|
2164
2093
|
{
|
|
2165
2094
|
value: "DATE_TRUNC",
|
|
@@ -2168,7 +2097,7 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2168
2097
|
exampleResult: r("report.formulaInput.functionResult.dateTrunc"),
|
|
2169
2098
|
insertText: "DATE_TRUNC()",
|
|
2170
2099
|
cursorOffset: 11,
|
|
2171
|
-
allowedFields: [
|
|
2100
|
+
allowedFields: [J.Dimension]
|
|
2172
2101
|
},
|
|
2173
2102
|
{
|
|
2174
2103
|
value: "TO_CHAR",
|
|
@@ -2177,7 +2106,7 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2177
2106
|
exampleResult: r("report.formulaInput.functionResult.toChar"),
|
|
2178
2107
|
insertText: "TO_CHAR()",
|
|
2179
2108
|
cursorOffset: 8,
|
|
2180
|
-
allowedFields: [
|
|
2109
|
+
allowedFields: [J.Dimension]
|
|
2181
2110
|
},
|
|
2182
2111
|
{
|
|
2183
2112
|
value: "TO_TIMESTAMP",
|
|
@@ -2194,7 +2123,7 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2194
2123
|
exampleResult: r("report.formulaInput.functionResult.lower"),
|
|
2195
2124
|
insertText: "LOWER()",
|
|
2196
2125
|
cursorOffset: 6,
|
|
2197
|
-
allowedFields: [
|
|
2126
|
+
allowedFields: [J.Dimension]
|
|
2198
2127
|
},
|
|
2199
2128
|
{
|
|
2200
2129
|
value: "UPPER",
|
|
@@ -2203,7 +2132,7 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2203
2132
|
exampleResult: r("report.formulaInput.functionResult.upper"),
|
|
2204
2133
|
insertText: "UPPER()",
|
|
2205
2134
|
cursorOffset: 6,
|
|
2206
|
-
allowedFields: [
|
|
2135
|
+
allowedFields: [J.Dimension]
|
|
2207
2136
|
},
|
|
2208
2137
|
{
|
|
2209
2138
|
value: "EXTRACT",
|
|
@@ -2212,7 +2141,7 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2212
2141
|
exampleResult: r("report.formulaInput.functionResult.extract"),
|
|
2213
2142
|
insertText: "EXTRACT()",
|
|
2214
2143
|
cursorOffset: 8,
|
|
2215
|
-
allowedFields: [
|
|
2144
|
+
allowedFields: [J.Dimension]
|
|
2216
2145
|
},
|
|
2217
2146
|
{
|
|
2218
2147
|
value: "FIRST_VALUE",
|
|
@@ -2221,7 +2150,7 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2221
2150
|
exampleResult: r("report.formulaInput.functionResult.firstValue"),
|
|
2222
2151
|
insertText: "FIRST_VALUE() OVER ()",
|
|
2223
2152
|
cursorOffset: 12,
|
|
2224
|
-
allowedFields: [
|
|
2153
|
+
allowedFields: [J.Metric]
|
|
2225
2154
|
},
|
|
2226
2155
|
{
|
|
2227
2156
|
value: "LAST_VALUE",
|
|
@@ -2230,9 +2159,9 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2230
2159
|
exampleResult: r("report.formulaInput.functionResult.lastValue"),
|
|
2231
2160
|
insertText: "LAST_VALUE() OVER ()",
|
|
2232
2161
|
cursorOffset: 11,
|
|
2233
|
-
allowedFields: [
|
|
2162
|
+
allowedFields: [J.Metric]
|
|
2234
2163
|
}
|
|
2235
|
-
]), N =
|
|
2164
|
+
]), N = S(
|
|
2236
2165
|
() => [
|
|
2237
2166
|
{
|
|
2238
2167
|
value: "PARTITION BY ",
|
|
@@ -2250,7 +2179,7 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2250
2179
|
description: r("report.formulaInput.keywordDescription.rowsBetween")
|
|
2251
2180
|
}
|
|
2252
2181
|
]
|
|
2253
|
-
),
|
|
2182
|
+
), $ = S(() => [
|
|
2254
2183
|
{
|
|
2255
2184
|
value: "CASE",
|
|
2256
2185
|
label: "CASE WHEN THEN ELSE END",
|
|
@@ -2399,12 +2328,20 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2399
2328
|
description: r("report.formulaInput.keywordDescription.year"),
|
|
2400
2329
|
insertText: "YEAR",
|
|
2401
2330
|
cursorOffset: 4
|
|
2331
|
+
},
|
|
2332
|
+
{
|
|
2333
|
+
value: "STRING_LITERAL",
|
|
2334
|
+
label: "String Literal Syntax",
|
|
2335
|
+
description: r("report.formulaInput.keywordDescription.stringLiteral"),
|
|
2336
|
+
insertText: "'text'",
|
|
2337
|
+
cursorOffset: 6,
|
|
2338
|
+
aliases: ["quote", "single quote", "string"]
|
|
2402
2339
|
}
|
|
2403
|
-
]),
|
|
2340
|
+
]), B = S(() => [
|
|
2404
2341
|
...H.value,
|
|
2405
2342
|
...s.functionList || []
|
|
2406
|
-
]),
|
|
2407
|
-
() =>
|
|
2343
|
+
]), M = S(
|
|
2344
|
+
() => B.value.filter(
|
|
2408
2345
|
(h) => !h.allowedFields || h.allowedFields.length === 0 || h.allowedFields.includes(L.value)
|
|
2409
2346
|
)
|
|
2410
2347
|
), X = /* @__PURE__ */ new Set([
|
|
@@ -2414,35 +2351,35 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2414
2351
|
"DATE_TRUNC",
|
|
2415
2352
|
"EXTRACT",
|
|
2416
2353
|
"TO_TIMESTAMP"
|
|
2417
|
-
]),
|
|
2354
|
+
]), de = S(() => v.value ? X.has(v.value.value.toUpperCase()) : !1), Se = S(() => {
|
|
2418
2355
|
const h = o.value || "";
|
|
2419
2356
|
return Math.max(h.split(`
|
|
2420
2357
|
`).length, 1);
|
|
2421
|
-
}),
|
|
2422
|
-
function
|
|
2358
|
+
}), oe = S(() => Array.from({ length: Se.value }, (h, O) => O + 1));
|
|
2359
|
+
function ye(h, O) {
|
|
2423
2360
|
let x = O;
|
|
2424
2361
|
for (; x > 0 && /\w/.test(h[x - 1]); ) x--;
|
|
2425
2362
|
let F = O;
|
|
2426
2363
|
for (; F < h.length && /\w/.test(h[F]); ) F++;
|
|
2427
2364
|
return { start: x, end: F };
|
|
2428
2365
|
}
|
|
2429
|
-
const
|
|
2366
|
+
const fe = S(() => {
|
|
2430
2367
|
const h = o.value || "", O = b.value;
|
|
2431
2368
|
if (!h) return "";
|
|
2432
|
-
const { start: x, end: F } =
|
|
2369
|
+
const { start: x, end: F } = ye(h, O);
|
|
2433
2370
|
return h.substring(x, F);
|
|
2434
|
-
}),
|
|
2435
|
-
|
|
2436
|
-
() =>
|
|
2371
|
+
}), Ce = S(() => fe.value.trim().length > 0);
|
|
2372
|
+
S(
|
|
2373
|
+
() => Ce.value || Q.value.insideParens
|
|
2437
2374
|
);
|
|
2438
|
-
const
|
|
2439
|
-
var
|
|
2375
|
+
const Q = S(() => {
|
|
2376
|
+
var re;
|
|
2440
2377
|
const h = o.value || "", O = b.value, x = h.substring(0, O), F = [];
|
|
2441
2378
|
for (let p = 0; p < x.length; p++)
|
|
2442
2379
|
h[p] === "(" ? F.push(p) : h[p] === ")" && F.pop();
|
|
2443
|
-
const
|
|
2444
|
-
if (
|
|
2445
|
-
const p = x.substring(
|
|
2380
|
+
const se = F.length > 0 ? F[F.length - 1] : -1;
|
|
2381
|
+
if (se !== -1) {
|
|
2382
|
+
const p = x.substring(se + 1), Te = x.substring(0, se).trimEnd(), Pe = Te.match(/(\w+)$/), Ve = Pe ? Pe[1].toUpperCase() : "", ot = Te.match(/(\w+)\([^()]*\)\s+OVER$/i), Vt = Ve === "OVER" ? ((re = ot == null ? void 0 : ot[1]) == null ? void 0 : re.toUpperCase()) || "OVER" : Ve;
|
|
2446
2383
|
return {
|
|
2447
2384
|
insideParens: !0,
|
|
2448
2385
|
functionName: Ve,
|
|
@@ -2456,7 +2393,7 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2456
2393
|
guideFunctionName: "",
|
|
2457
2394
|
hasText: !1
|
|
2458
2395
|
};
|
|
2459
|
-
}),
|
|
2396
|
+
}), Ee = S(() => [
|
|
2460
2397
|
{
|
|
2461
2398
|
value: "TEXT",
|
|
2462
2399
|
label: "::text",
|
|
@@ -2497,13 +2434,13 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2497
2434
|
cursorOffset: 4,
|
|
2498
2435
|
aliases: ["::json"]
|
|
2499
2436
|
}
|
|
2500
|
-
]),
|
|
2501
|
-
const h = o.value || "", O = b.value, { start: x } =
|
|
2437
|
+
]), Re = S(() => {
|
|
2438
|
+
const h = o.value || "", O = b.value, { start: x } = ye(h, O), F = h.substring(0, x);
|
|
2502
2439
|
return /::\s*$/.test(F);
|
|
2503
|
-
}), d =
|
|
2504
|
-
const h =
|
|
2505
|
-
if (
|
|
2506
|
-
return
|
|
2440
|
+
}), d = S(() => {
|
|
2441
|
+
const h = fe.value.toLowerCase(), O = de.value;
|
|
2442
|
+
if (Re.value)
|
|
2443
|
+
return Ee.value.filter(
|
|
2507
2444
|
(p) => l(h, "KEYWORD", [
|
|
2508
2445
|
p.label,
|
|
2509
2446
|
p.value,
|
|
@@ -2530,7 +2467,7 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2530
2467
|
type: "FIELD",
|
|
2531
2468
|
badge: p.badge,
|
|
2532
2469
|
meta: p.meta
|
|
2533
|
-
})), F = O ? [] :
|
|
2470
|
+
})), F = O ? [] : M.value.filter(
|
|
2534
2471
|
(p) => l(h, "FUNCTION", [
|
|
2535
2472
|
p.value,
|
|
2536
2473
|
...p.aliases || []
|
|
@@ -2542,7 +2479,7 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2542
2479
|
description: p.description,
|
|
2543
2480
|
insertText: p.insertText,
|
|
2544
2481
|
cursorOffset: p.cursorOffset
|
|
2545
|
-
})),
|
|
2482
|
+
})), se = O ? [] : $.value.filter(
|
|
2546
2483
|
(p) => l(h, "KEYWORD", [
|
|
2547
2484
|
p.label,
|
|
2548
2485
|
p.value,
|
|
@@ -2555,28 +2492,28 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2555
2492
|
description: p.description,
|
|
2556
2493
|
insertText: p.insertText,
|
|
2557
2494
|
cursorOffset: p.cursorOffset
|
|
2558
|
-
})),
|
|
2495
|
+
})), re = Q.value.insideParens && Q.value.functionName === "OVER" ? N.value.filter(
|
|
2559
2496
|
(p) => l(h, "KEYWORD", [p.label])
|
|
2560
2497
|
).map((p) => ({
|
|
2561
2498
|
...p,
|
|
2562
2499
|
type: "KEYWORD"
|
|
2563
2500
|
/* Keyword */
|
|
2564
2501
|
})) : [];
|
|
2565
|
-
return [...F, ...
|
|
2566
|
-
}), v =
|
|
2567
|
-
if (!
|
|
2568
|
-
const h =
|
|
2569
|
-
return h &&
|
|
2570
|
-
}), I =
|
|
2502
|
+
return [...F, ...se, ...re, ...x];
|
|
2503
|
+
}), v = S(() => {
|
|
2504
|
+
if (!Q.value.insideParens) return null;
|
|
2505
|
+
const h = Q.value.guideFunctionName;
|
|
2506
|
+
return h && M.value.find((O) => O.value.toUpperCase() === h) || null;
|
|
2507
|
+
}), I = S(() => v.value ? "FUNCTION" : void 0), te = S(
|
|
2571
2508
|
() => d.value.find((h) => h.value === g.value)
|
|
2572
|
-
),
|
|
2573
|
-
() => c.value &&
|
|
2574
|
-
), Ye =
|
|
2575
|
-
() => c.value && (
|
|
2509
|
+
), ne = S(() => c.value && d.value.length > 0), pe = S(
|
|
2510
|
+
() => c.value && Q.value.insideParens && !Q.value.hasText && v.value !== null
|
|
2511
|
+
), Ye = S(
|
|
2512
|
+
() => c.value && (pe.value || ne.value)
|
|
2576
2513
|
);
|
|
2577
|
-
function
|
|
2578
|
-
const O = h.getBoundingClientRect(), x = window.getComputedStyle(h), F = parseFloat(x.lineHeight) || 24,
|
|
2579
|
-
|
|
2514
|
+
function Me(h) {
|
|
2515
|
+
const O = h.getBoundingClientRect(), x = window.getComputedStyle(h), F = parseFloat(x.lineHeight) || 24, se = h.value.substring(0, h.selectionStart), re = document.createElement("div");
|
|
2516
|
+
re.style.cssText = `
|
|
2580
2517
|
position: fixed;
|
|
2581
2518
|
top: ${O.top}px;
|
|
2582
2519
|
left: ${O.left}px;
|
|
@@ -2603,50 +2540,50 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2603
2540
|
tab-size: ${x.tabSize};
|
|
2604
2541
|
visibility: hidden;
|
|
2605
2542
|
pointer-events: none;
|
|
2606
|
-
`,
|
|
2543
|
+
`, re.textContent = se;
|
|
2607
2544
|
const p = document.createElement("span");
|
|
2608
|
-
p.textContent = "",
|
|
2609
|
-
const
|
|
2610
|
-
document.body.removeChild(
|
|
2611
|
-
const
|
|
2545
|
+
p.textContent = "", re.appendChild(p), document.body.appendChild(re), re.scrollTop = h.scrollTop, re.scrollLeft = h.scrollLeft;
|
|
2546
|
+
const Te = p.getBoundingClientRect();
|
|
2547
|
+
document.body.removeChild(re);
|
|
2548
|
+
const Pe = 8, Ve = 12, ot = 320, Vt = 360, eo = Te.top + F + Pe, to = Te.left + Pe, no = window.innerHeight - Vt - Ve, oo = window.innerWidth - ot - Ve;
|
|
2612
2549
|
return {
|
|
2613
2550
|
top: Math.max(Ve, Math.min(eo, no)),
|
|
2614
2551
|
left: Math.max(Ve, Math.min(to, oo))
|
|
2615
2552
|
};
|
|
2616
2553
|
}
|
|
2617
2554
|
function nt() {
|
|
2618
|
-
y.value = !0, c.value = !0,
|
|
2555
|
+
y.value = !0, c.value = !0, _e();
|
|
2619
2556
|
}
|
|
2620
|
-
function
|
|
2557
|
+
function Pt() {
|
|
2621
2558
|
setTimeout(() => {
|
|
2622
2559
|
y.value = !1, c.value = !1;
|
|
2623
2560
|
}, 150);
|
|
2624
2561
|
}
|
|
2625
|
-
function
|
|
2626
|
-
u.value && (b.value = u.value.selectionStart, E.value =
|
|
2562
|
+
function _e() {
|
|
2563
|
+
u.value && (b.value = u.value.selectionStart, E.value = Me(u.value));
|
|
2627
2564
|
}
|
|
2628
|
-
function
|
|
2629
|
-
const O = h.type === "FIELD" ? h.value : h.insertText || (h.type === "FUNCTION" ? `${h.value}()` : h.value), x = o.value || "", F = b.value, { start:
|
|
2630
|
-
o.value = x.substring(0,
|
|
2631
|
-
var
|
|
2632
|
-
(
|
|
2633
|
-
const p = h.type === "FUNCTION" || h.type === "KEYWORD" ?
|
|
2634
|
-
(
|
|
2565
|
+
function Fe(h) {
|
|
2566
|
+
const O = h.type === "FIELD" ? h.value : h.insertText || (h.type === "FUNCTION" ? `${h.value}()` : h.value), x = o.value || "", F = b.value, { start: se, end: re } = ye(x, F);
|
|
2567
|
+
o.value = x.substring(0, se) + O + x.substring(re), rn(() => {
|
|
2568
|
+
var Te, Pe;
|
|
2569
|
+
(Te = u.value) == null || Te.focus();
|
|
2570
|
+
const p = h.type === "FUNCTION" || h.type === "KEYWORD" ? se + (h.cursorOffset ?? h.value.length + 1) : se + O.length;
|
|
2571
|
+
(Pe = u.value) == null || Pe.setSelectionRange(p, p), c.value = !0, _e();
|
|
2635
2572
|
});
|
|
2636
2573
|
}
|
|
2637
|
-
function
|
|
2574
|
+
function Z(h) {
|
|
2638
2575
|
g.value = h;
|
|
2639
2576
|
}
|
|
2640
2577
|
function Zn() {
|
|
2641
|
-
!
|
|
2578
|
+
!ne.value || !te.value || Fe(te.value);
|
|
2642
2579
|
}
|
|
2643
2580
|
function Jn() {
|
|
2644
2581
|
u.value && f.value && (f.value.scrollTop = u.value.scrollTop);
|
|
2645
2582
|
}
|
|
2646
2583
|
return (h, O) => {
|
|
2647
|
-
var
|
|
2648
|
-
const x =
|
|
2649
|
-
return D(), k("div",
|
|
2584
|
+
var re;
|
|
2585
|
+
const x = z("FmCircularProgress"), F = z("FmChip"), se = z("FmMenuDivider");
|
|
2586
|
+
return D(), k("div", xr, [
|
|
2650
2587
|
A("div", {
|
|
2651
2588
|
class: "flex h-[200px] rounded-md overflow-hidden items-stretch",
|
|
2652
2589
|
style: Qt({
|
|
@@ -2660,7 +2597,7 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2660
2597
|
ref: f,
|
|
2661
2598
|
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
2599
|
}, [
|
|
2663
|
-
(D(!0), k(
|
|
2600
|
+
(D(!0), k(Ne, null, It(oe.value, (p) => (D(), k("div", { key: p }, j(p), 1))), 128))
|
|
2664
2601
|
], 512),
|
|
2665
2602
|
lo(A("textarea", {
|
|
2666
2603
|
ref_key: "textareaRef",
|
|
@@ -2669,23 +2606,23 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2669
2606
|
placeholder: h.placeholder,
|
|
2670
2607
|
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
2608
|
onFocus: nt,
|
|
2672
|
-
onBlur:
|
|
2673
|
-
onInput:
|
|
2674
|
-
onClick:
|
|
2675
|
-
onKeyup:
|
|
2676
|
-
onKeydown: so(
|
|
2609
|
+
onBlur: Pt,
|
|
2610
|
+
onInput: _e,
|
|
2611
|
+
onClick: _e,
|
|
2612
|
+
onKeyup: _e,
|
|
2613
|
+
onKeydown: so(St(Zn, ["prevent"]), ["tab"]),
|
|
2677
2614
|
onScroll: Jn
|
|
2678
|
-
}, null, 40,
|
|
2615
|
+
}, null, 40, Dr), [
|
|
2679
2616
|
[uo, o.value]
|
|
2680
2617
|
])
|
|
2681
2618
|
], 4),
|
|
2682
|
-
A("div",
|
|
2683
|
-
h.isValidating ? (D(),
|
|
2619
|
+
A("div", Ir, [
|
|
2620
|
+
h.isValidating ? (D(), be(x, {
|
|
2684
2621
|
key: 0,
|
|
2685
2622
|
size: "md"
|
|
2686
2623
|
})) : U("", !0),
|
|
2687
|
-
!h.isValidating && h.validationResult && !h.validationResult.valid ? (D(), k("p",
|
|
2688
|
-
!h.isValidating && h.validationResult && h.validationResult.valid ? (D(), k("p",
|
|
2624
|
+
!h.isValidating && h.validationResult && !h.validationResult.valid ? (D(), k("p", Or, j((re = h.validationResult.error) == null ? void 0 : re.message), 1)) : U("", !0),
|
|
2625
|
+
!h.isValidating && h.validationResult && h.validationResult.valid ? (D(), k("p", Sr, j(h.validFormulaLabel), 1)) : U("", !0)
|
|
2689
2626
|
]),
|
|
2690
2627
|
Ye.value ? (D(), k("div", {
|
|
2691
2628
|
key: 0,
|
|
@@ -2695,118 +2632,118 @@ const Ir = { class: "relative" }, Or = ["placeholder", "onKeydown"], Cr = { clas
|
|
|
2695
2632
|
left: E.value.left + "px"
|
|
2696
2633
|
})
|
|
2697
2634
|
}, [
|
|
2698
|
-
|
|
2699
|
-
A("div",
|
|
2700
|
-
A("p",
|
|
2701
|
-
I.value ? (D(),
|
|
2635
|
+
pe.value ? (D(), k("div", Cr, [
|
|
2636
|
+
A("div", Rr, [
|
|
2637
|
+
A("p", Fr, j(v.value.value) + "() ", 1),
|
|
2638
|
+
I.value ? (D(), be(F, {
|
|
2702
2639
|
key: 0,
|
|
2703
2640
|
compact: !0,
|
|
2704
2641
|
class: Ot(n(I.value))
|
|
2705
2642
|
}, {
|
|
2706
|
-
default:
|
|
2707
|
-
A("p",
|
|
2643
|
+
default: ce(() => [
|
|
2644
|
+
A("p", Nr, j(e(I.value)), 1)
|
|
2708
2645
|
]),
|
|
2709
2646
|
_: 1
|
|
2710
2647
|
}, 8, ["class"])) : U("", !0)
|
|
2711
2648
|
]),
|
|
2712
|
-
A("p",
|
|
2713
|
-
v.value.example ? (D(), k(
|
|
2714
|
-
A("p",
|
|
2715
|
-
A("p",
|
|
2716
|
-
v.value.exampleResult ? (D(), k(
|
|
2717
|
-
A("p",
|
|
2718
|
-
A("p",
|
|
2649
|
+
A("p", Ar, j(v.value.description), 1),
|
|
2650
|
+
v.value.example ? (D(), k(Ne, { key: 0 }, [
|
|
2651
|
+
A("p", kr, j(P(r)("report.formulaInput.section.example")), 1),
|
|
2652
|
+
A("p", Lr, j(v.value.example), 1),
|
|
2653
|
+
v.value.exampleResult ? (D(), k(Ne, { key: 0 }, [
|
|
2654
|
+
A("p", Mr, j(P(r)("report.formulaInput.section.result")), 1),
|
|
2655
|
+
A("p", Pr, j(v.value.exampleResult), 1)
|
|
2719
2656
|
], 64)) : U("", !0)
|
|
2720
2657
|
], 64)) : U("", !0)
|
|
2721
2658
|
])) : U("", !0),
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
(D(!0), k(
|
|
2659
|
+
pe.value && ne.value ? (D(), be(se, { key: 1 })) : U("", !0),
|
|
2660
|
+
ne.value ? (D(), k("div", Vr, [
|
|
2661
|
+
(D(!0), k(Ne, null, It(d.value, (p) => (D(), k("div", {
|
|
2725
2662
|
key: p.value,
|
|
2726
2663
|
class: Ot([
|
|
2727
2664
|
"flex items-start gap-2 px-3 py-1 cursor-pointer transition-colors fm-typo-en-body-lg-400",
|
|
2728
2665
|
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
2666
|
]),
|
|
2730
|
-
onMousedown:
|
|
2731
|
-
onMouseenter: (
|
|
2732
|
-
onMouseleave: O[1] || (O[1] = (
|
|
2667
|
+
onMousedown: St((Te) => Fe(p), ["prevent"]),
|
|
2668
|
+
onMouseenter: (Te) => Z(p.value),
|
|
2669
|
+
onMouseleave: O[1] || (O[1] = (Te) => Z(null))
|
|
2733
2670
|
}, [
|
|
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(),
|
|
2671
|
+
A("div", $r, [
|
|
2672
|
+
A("div", Br, [
|
|
2673
|
+
A("span", Wr, j(p.label), 1),
|
|
2674
|
+
p.type === "FIELD" && p.meta ? (D(), k("span", Yr, j(p.meta), 1)) : U("", !0),
|
|
2675
|
+
p.type === "FIELD" && p.badge ? (D(), be(F, {
|
|
2739
2676
|
key: 1,
|
|
2740
2677
|
compact: !0,
|
|
2741
2678
|
class: "shrink-0 bg-fm-color-primary text-fm-color-typo-white"
|
|
2742
2679
|
}, {
|
|
2743
|
-
default:
|
|
2744
|
-
A("p",
|
|
2680
|
+
default: ce(() => [
|
|
2681
|
+
A("p", Hr, j(p.badge), 1)
|
|
2745
2682
|
]),
|
|
2746
2683
|
_: 2
|
|
2747
2684
|
}, 1024)) : U("", !0),
|
|
2748
|
-
p.type === "FUNCTION" ? (D(),
|
|
2685
|
+
p.type === "FUNCTION" ? (D(), be(F, {
|
|
2749
2686
|
key: 2,
|
|
2750
2687
|
compact: !0,
|
|
2751
2688
|
class: "shrink-0 bg-fm-color-system-info-100 text-fm-color-typo-info"
|
|
2752
2689
|
}, {
|
|
2753
|
-
default:
|
|
2690
|
+
default: ce(() => O[2] || (O[2] = [
|
|
2754
2691
|
A("p", { class: "fm-typo-en-body-sm-400" }, "FUNCTION", -1)
|
|
2755
2692
|
])),
|
|
2756
2693
|
_: 1
|
|
2757
2694
|
})) : U("", !0),
|
|
2758
|
-
p.type === "KEYWORD" ? (D(),
|
|
2695
|
+
p.type === "KEYWORD" ? (D(), be(F, {
|
|
2759
2696
|
key: 3,
|
|
2760
2697
|
compact: !0,
|
|
2761
2698
|
class: "shrink-0 text-fm-color-typo-secondary"
|
|
2762
2699
|
}, {
|
|
2763
|
-
default:
|
|
2700
|
+
default: ce(() => O[3] || (O[3] = [
|
|
2764
2701
|
A("p", { class: "fm-typo-en-body-sm-400" }, "EXPR", -1)
|
|
2765
2702
|
])),
|
|
2766
2703
|
_: 1
|
|
2767
2704
|
})) : U("", !0)
|
|
2768
2705
|
]),
|
|
2769
|
-
p.type !== "FIELD" ? (D(), k("p",
|
|
2770
|
-
G(
|
|
2706
|
+
p.type !== "FIELD" ? (D(), k("p", Xr, j(p.description), 1)) : U("", !0),
|
|
2707
|
+
G(se)
|
|
2771
2708
|
])
|
|
2772
|
-
], 42,
|
|
2709
|
+
], 42, Ur))), 128))
|
|
2773
2710
|
])) : U("", !0)
|
|
2774
2711
|
], 4)) : U("", !0)
|
|
2775
2712
|
]);
|
|
2776
2713
|
};
|
|
2777
2714
|
}
|
|
2778
|
-
}),
|
|
2779
|
-
const { businessId: o } = In(
|
|
2715
|
+
}), zr = async (t, e, n = []) => {
|
|
2716
|
+
const { businessId: o } = In(yo());
|
|
2780
2717
|
if (!t || !t.trim())
|
|
2781
2718
|
return { valid: !1, queryDatasource: e, error: { message: "Formula is empty" } };
|
|
2782
2719
|
if (!o.value)
|
|
2783
2720
|
return { valid: !1, queryDatasource: e, error: { message: "Business ID is not defined" } };
|
|
2784
2721
|
const r = {
|
|
2785
|
-
fetchType:
|
|
2722
|
+
fetchType: Eo.Post,
|
|
2786
2723
|
url: `/${o.value}/formula/validate`,
|
|
2787
2724
|
data: { formula: t, queryDatasource: e, allowedFields: n }
|
|
2788
2725
|
};
|
|
2789
|
-
return
|
|
2726
|
+
return _o.fetch(r);
|
|
2790
2727
|
};
|
|
2791
|
-
function
|
|
2792
|
-
const { getDataFormula: e, getDisplayFormula: n, getIsAdvance: o } = t, r = t.getAllowedFields || (() => []),
|
|
2728
|
+
function Kr(t) {
|
|
2729
|
+
const { getDataFormula: e, getDisplayFormula: n, getIsAdvance: o } = t, r = t.getAllowedFields || (() => []), i = t.getDatasource || (() => ho.Postgres), a = t.immediate ?? !1, l = q(), s = q(), u = q(!1), f = q(!1);
|
|
2793
2730
|
function c() {
|
|
2794
2731
|
return r().map((g) => `${g.fieldId}:${g.type}`).sort().join("|");
|
|
2795
2732
|
}
|
|
2796
2733
|
function E(g) {
|
|
2797
2734
|
let L = 0;
|
|
2798
|
-
const H =
|
|
2799
|
-
async (
|
|
2735
|
+
const H = Cn(
|
|
2736
|
+
async (M, X) => {
|
|
2800
2737
|
if (!(!o() || X !== L)) {
|
|
2801
|
-
if (!
|
|
2738
|
+
if (!M) {
|
|
2802
2739
|
g.setValidation(void 0);
|
|
2803
2740
|
return;
|
|
2804
2741
|
}
|
|
2805
2742
|
try {
|
|
2806
|
-
const
|
|
2743
|
+
const de = await zr(M, i(), r());
|
|
2807
2744
|
if (!o() || X !== L)
|
|
2808
2745
|
return;
|
|
2809
|
-
g.setValidation(
|
|
2746
|
+
g.setValidation(de);
|
|
2810
2747
|
} catch {
|
|
2811
2748
|
if (!o() || X !== L)
|
|
2812
2749
|
return;
|
|
@@ -2818,29 +2755,29 @@ function qr(t) {
|
|
|
2818
2755
|
},
|
|
2819
2756
|
2500
|
|
2820
2757
|
);
|
|
2821
|
-
function N(
|
|
2758
|
+
function N(M) {
|
|
2822
2759
|
L += 1;
|
|
2823
2760
|
const X = L;
|
|
2824
2761
|
if (!o()) {
|
|
2825
2762
|
H.cancel(), g.setIsValidating(!1), g.setValidation(void 0);
|
|
2826
2763
|
return;
|
|
2827
2764
|
}
|
|
2828
|
-
if (!
|
|
2765
|
+
if (!M) {
|
|
2829
2766
|
H.cancel(), g.setValidation(void 0), g.setIsValidating(!1);
|
|
2830
2767
|
return;
|
|
2831
2768
|
}
|
|
2832
|
-
g.setIsValidating(!0), H(
|
|
2769
|
+
g.setIsValidating(!0), H(M, X);
|
|
2833
2770
|
}
|
|
2834
|
-
function
|
|
2771
|
+
function $() {
|
|
2835
2772
|
L += 1, H.cancel(), g.setValidation(void 0), g.setIsValidating(!1);
|
|
2836
2773
|
}
|
|
2837
|
-
function
|
|
2774
|
+
function B() {
|
|
2838
2775
|
N(g.getFormula());
|
|
2839
2776
|
}
|
|
2840
2777
|
return {
|
|
2841
2778
|
trigger: N,
|
|
2842
|
-
clearAndCancel:
|
|
2843
|
-
revalidate:
|
|
2779
|
+
clearAndCancel: $,
|
|
2780
|
+
revalidate: B
|
|
2844
2781
|
};
|
|
2845
2782
|
}
|
|
2846
2783
|
const b = E({
|
|
@@ -2860,25 +2797,25 @@ function qr(t) {
|
|
|
2860
2797
|
f.value = g;
|
|
2861
2798
|
}
|
|
2862
2799
|
});
|
|
2863
|
-
return
|
|
2800
|
+
return Ke(
|
|
2864
2801
|
() => e(),
|
|
2865
2802
|
(g) => {
|
|
2866
2803
|
b.trigger(g);
|
|
2867
2804
|
},
|
|
2868
|
-
{ immediate:
|
|
2869
|
-
),
|
|
2805
|
+
{ immediate: a }
|
|
2806
|
+
), Ke(
|
|
2870
2807
|
() => n(),
|
|
2871
2808
|
(g) => {
|
|
2872
2809
|
y.trigger(g);
|
|
2873
2810
|
},
|
|
2874
|
-
{ immediate:
|
|
2875
|
-
),
|
|
2811
|
+
{ immediate: a }
|
|
2812
|
+
), Ke(
|
|
2876
2813
|
() => o(),
|
|
2877
2814
|
(g) => {
|
|
2878
2815
|
g ? (b.revalidate(), y.revalidate()) : (b.clearAndCancel(), y.clearAndCancel());
|
|
2879
2816
|
},
|
|
2880
|
-
{ immediate:
|
|
2881
|
-
),
|
|
2817
|
+
{ immediate: a }
|
|
2818
|
+
), Ke(
|
|
2882
2819
|
() => c(),
|
|
2883
2820
|
() => {
|
|
2884
2821
|
o() && (b.revalidate(), y.revalidate());
|
|
@@ -2890,10 +2827,10 @@ function qr(t) {
|
|
|
2890
2827
|
isDisplayValidating: f
|
|
2891
2828
|
};
|
|
2892
2829
|
}
|
|
2893
|
-
const
|
|
2830
|
+
const jr = { class: "grow" }, qr = {
|
|
2894
2831
|
key: 2,
|
|
2895
2832
|
class: "w-full"
|
|
2896
|
-
},
|
|
2833
|
+
}, Qr = { key: 0 }, Zr = /* @__PURE__ */ We({
|
|
2897
2834
|
__name: "FilterValueInput",
|
|
2898
2835
|
props: /* @__PURE__ */ kt({
|
|
2899
2836
|
config: {
|
|
@@ -2912,19 +2849,19 @@ const Qr = { class: "grow" }, Zr = {
|
|
|
2912
2849
|
}),
|
|
2913
2850
|
emits: ["update:modelValue"],
|
|
2914
2851
|
setup(t) {
|
|
2915
|
-
const e = tt(t, "modelValue"), n = t, o =
|
|
2852
|
+
const e = tt(t, "modelValue"), n = t, o = q([]);
|
|
2916
2853
|
function r(s) {
|
|
2917
2854
|
return (s ? Ut(s) : Ut()).format("HH:mm");
|
|
2918
2855
|
}
|
|
2919
|
-
function
|
|
2856
|
+
function i({ hour: s, minute: u }) {
|
|
2920
2857
|
return Ut().set("hour", s).set("minute", u).toISOString();
|
|
2921
2858
|
}
|
|
2922
|
-
function
|
|
2859
|
+
function a(s, u) {
|
|
2923
2860
|
var b, y;
|
|
2924
|
-
const f = On(n.option), c =
|
|
2861
|
+
const f = On(n.option), c = Sn(n.option);
|
|
2925
2862
|
((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
2863
|
const E = [...e.value];
|
|
2927
|
-
((y = n.config) == null ? void 0 : y.type) === rt.Timestamp ? E[s] =
|
|
2864
|
+
((y = n.config) == null ? void 0 : y.type) === rt.Timestamp ? E[s] = i({
|
|
2928
2865
|
hour: Number(u.split(":")[0]),
|
|
2929
2866
|
minute: Number(u.split(":")[1])
|
|
2930
2867
|
}) : E[s] = u, e.value = E;
|
|
@@ -2939,37 +2876,37 @@ const Qr = { class: "grow" }, Zr = {
|
|
|
2939
2876
|
}
|
|
2940
2877
|
}
|
|
2941
2878
|
return (s, u) => {
|
|
2942
|
-
const f =
|
|
2943
|
-
return D(!0), k(
|
|
2944
|
-
var L, H, N, B
|
|
2879
|
+
const f = z("FmSelect"), c = z("FmTextField"), E = z("FmTimePicker"), b = z("FmButton");
|
|
2880
|
+
return D(!0), k(Ne, null, It(new Array(e.value.length !== 0 ? e.value.length : 1), (y, g) => {
|
|
2881
|
+
var L, H, N, $, B;
|
|
2945
2882
|
return D(), k("div", {
|
|
2946
2883
|
key: g,
|
|
2947
2884
|
class: "flex flex-row align-center gap-2 w-full"
|
|
2948
2885
|
}, [
|
|
2949
|
-
A("div",
|
|
2950
|
-
((L = n.config) == null ? void 0 : L.type) ===
|
|
2886
|
+
A("div", jr, [
|
|
2887
|
+
((L = n.config) == null ? void 0 : L.type) === P(rt).Select ? (D(), be(f, {
|
|
2951
2888
|
key: 0,
|
|
2952
2889
|
"model-value": e.value[g],
|
|
2953
2890
|
items: n.config.options,
|
|
2954
|
-
"onUpdate:modelValue": (
|
|
2955
|
-
}, null, 8, ["model-value", "items", "onUpdate:modelValue"])) : ((H = n.config) == null ? void 0 : H.type) ===
|
|
2891
|
+
"onUpdate:modelValue": (M) => a(g, M)
|
|
2892
|
+
}, null, 8, ["model-value", "items", "onUpdate:modelValue"])) : ((H = n.config) == null ? void 0 : H.type) === P(rt).TextField ? (D(), be(c, {
|
|
2956
2893
|
key: 1,
|
|
2957
2894
|
"model-value": e.value[g],
|
|
2958
2895
|
type: ((N = n.config) == null ? void 0 : N.dataType) === "number" ? "number" : "text",
|
|
2959
2896
|
"helper-text": o.value[g] || void 0,
|
|
2960
2897
|
"helper-state": "error",
|
|
2961
|
-
"onUpdate:modelValue": (
|
|
2962
|
-
}, null, 8, ["model-value", "type", "helper-text", "onUpdate:modelValue"])) : ((
|
|
2898
|
+
"onUpdate:modelValue": (M) => a(g, M)
|
|
2899
|
+
}, null, 8, ["model-value", "type", "helper-text", "onUpdate:modelValue"])) : (($ = n.config) == null ? void 0 : $.type) === P(rt).Timestamp ? (D(), k("div", qr, [
|
|
2963
2900
|
G(E, {
|
|
2964
2901
|
"model-value": r(e.value[g]),
|
|
2965
|
-
"onUpdate:modelValue": (
|
|
2902
|
+
"onUpdate:modelValue": (M) => a(g, M)
|
|
2966
2903
|
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
2967
2904
|
])) : U("", !0)
|
|
2968
2905
|
]),
|
|
2969
|
-
((
|
|
2906
|
+
((B = n.config) == null ? void 0 : B.fixed) === !1 ? (D(), k("div", Qr, [
|
|
2970
2907
|
G(b, {
|
|
2971
2908
|
icon: g === 0 ? "add" : "remove",
|
|
2972
|
-
onClick: (
|
|
2909
|
+
onClick: (M) => l(g)
|
|
2973
2910
|
}, null, 8, ["icon", "onClick"])
|
|
2974
2911
|
])) : U("", !0)
|
|
2975
2912
|
]);
|
|
@@ -2983,17 +2920,17 @@ const Qr = { class: "grow" }, Zr = {
|
|
|
2983
2920
|
Ge.MonthOfYear,
|
|
2984
2921
|
Ge.TimeOfDay,
|
|
2985
2922
|
Ge.DateTime
|
|
2986
|
-
],
|
|
2923
|
+
], Jr = Qn.filter(
|
|
2987
2924
|
(t) => t !== Ge.DateTime
|
|
2988
2925
|
);
|
|
2989
|
-
function
|
|
2926
|
+
function Ti(t) {
|
|
2990
2927
|
return Qn.map((e) => ({
|
|
2991
2928
|
label: t(`report.section.filter.${Rn(e)}`),
|
|
2992
2929
|
value: e
|
|
2993
2930
|
}));
|
|
2994
2931
|
}
|
|
2995
|
-
function
|
|
2996
|
-
return
|
|
2932
|
+
function ei(t) {
|
|
2933
|
+
return Jr.map((e) => ({
|
|
2997
2934
|
label: t(`report.section.filter.${Rn(e)}`),
|
|
2998
2935
|
value: e
|
|
2999
2936
|
}));
|
|
@@ -3001,27 +2938,27 @@ function na(t) {
|
|
|
3001
2938
|
function Dn(t) {
|
|
3002
2939
|
return "aggregation" in t;
|
|
3003
2940
|
}
|
|
3004
|
-
function
|
|
2941
|
+
function ti({
|
|
3005
2942
|
options: t,
|
|
3006
2943
|
primaryFields: e,
|
|
3007
2944
|
secondaryFields: n,
|
|
3008
2945
|
getLabel: o
|
|
3009
2946
|
}) {
|
|
3010
|
-
const r =
|
|
2947
|
+
const r = S(() => {
|
|
3011
2948
|
const l = /* @__PURE__ */ new Map();
|
|
3012
2949
|
for (const s of e.value)
|
|
3013
2950
|
l.set(gt(s), s);
|
|
3014
2951
|
for (const s of n.value)
|
|
3015
2952
|
l.set(gt(s), s);
|
|
3016
2953
|
return Array.from(l.values());
|
|
3017
|
-
}),
|
|
2954
|
+
}), i = S(
|
|
3018
2955
|
() => r.value.map((l) => ({
|
|
3019
2956
|
label: o(l),
|
|
3020
2957
|
value: gt(l),
|
|
3021
2958
|
badge: Dn(l) ? "Metric" : "Dimension",
|
|
3022
2959
|
meta: Dn(l) ? l.aggregation : void 0
|
|
3023
2960
|
}))
|
|
3024
|
-
),
|
|
2961
|
+
), a = S(
|
|
3025
2962
|
() => r.value.map((l) => {
|
|
3026
2963
|
var u;
|
|
3027
2964
|
const s = (u = t.value.find(
|
|
@@ -3035,11 +2972,11 @@ function oa({
|
|
|
3035
2972
|
);
|
|
3036
2973
|
return {
|
|
3037
2974
|
formulaSuggestionFields: r,
|
|
3038
|
-
formulaFieldDataList:
|
|
3039
|
-
allowedFormulaFields:
|
|
2975
|
+
formulaFieldDataList: i,
|
|
2976
|
+
allowedFormulaFields: a
|
|
3040
2977
|
};
|
|
3041
2978
|
}
|
|
3042
|
-
const
|
|
2979
|
+
const ni = { class: "flex flex-col my-2 gap-8" }, oi = { class: "fm-typo-en-body-lg-600" }, ri = { class: "fm-typo-en-body-sm-600 text-fm-color-neutral-gray-400" }, ii = { class: "fm-typo-en-body-lg-400 text-ellipsis overflow-hidden line-clamp-1" }, wi = /* @__PURE__ */ We({
|
|
3043
2980
|
__name: "FilterSection",
|
|
3044
2981
|
props: /* @__PURE__ */ kt({
|
|
3045
2982
|
options: {
|
|
@@ -3064,42 +3001,42 @@ const ra = { class: "flex flex-col my-2 gap-8" }, aa = { class: "fm-typo-en-body
|
|
|
3064
3001
|
}),
|
|
3065
3002
|
emits: ["update:modelValue"],
|
|
3066
3003
|
setup(t) {
|
|
3067
|
-
const { t: e, te: n } = Lt(), o = tt(t, "modelValue"), r = t,
|
|
3004
|
+
const { t: e, te: n } = Lt(), o = tt(t, "modelValue"), r = t, i = S(() => e(`report.section.filter.${r.label}`)), a = q(!1), l = To(), s = S(
|
|
3068
3005
|
() => o.value.map((d, v) => {
|
|
3069
3006
|
const I = r.options.find(
|
|
3070
|
-
(
|
|
3071
|
-
),
|
|
3007
|
+
(ne) => ne.schemaName === d.schemaName && ne.name === d.name
|
|
3008
|
+
), te = (I == null ? void 0 : I.labels) || [d.schemaName, d.name];
|
|
3072
3009
|
return {
|
|
3073
3010
|
index: v,
|
|
3074
|
-
label:
|
|
3011
|
+
label: te.map((ne) => fn(e, n, ne, "other")).join(" "),
|
|
3075
3012
|
value: d
|
|
3076
3013
|
};
|
|
3077
3014
|
})
|
|
3078
|
-
), u =
|
|
3015
|
+
), u = q(o.value.length > 0 ? 0 : void 0);
|
|
3079
3016
|
function f(d) {
|
|
3080
3017
|
var v;
|
|
3081
|
-
|
|
3018
|
+
a.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), B();
|
|
3082
3019
|
}
|
|
3083
|
-
const c =
|
|
3020
|
+
const c = q(void 0), E = q(!1), b = q(void 0), y = S(
|
|
3084
3021
|
() => r.options.find(
|
|
3085
3022
|
(d) => {
|
|
3086
3023
|
var v, I;
|
|
3087
3024
|
return d.schemaName === ((v = c.value) == null ? void 0 : v.schemaName) && d.name === ((I = c.value) == null ? void 0 : I.name);
|
|
3088
3025
|
}
|
|
3089
3026
|
) ?? {}
|
|
3090
|
-
), g =
|
|
3027
|
+
), g = q([]);
|
|
3091
3028
|
function L(d) {
|
|
3092
3029
|
var v;
|
|
3093
3030
|
return (v = g.value.find((I) => I.option === d)) == null ? void 0 : v.value;
|
|
3094
3031
|
}
|
|
3095
|
-
const H =
|
|
3032
|
+
const H = Cn(
|
|
3096
3033
|
(d, v) => {
|
|
3097
|
-
const I = g.value.find((
|
|
3034
|
+
const I = g.value.find((te) => te.option === d);
|
|
3098
3035
|
I ? I.value = v : g.value.push({ option: d, value: v });
|
|
3099
3036
|
},
|
|
3100
3037
|
300
|
|
3101
3038
|
);
|
|
3102
|
-
|
|
3039
|
+
Ke(
|
|
3103
3040
|
[() => {
|
|
3104
3041
|
var d;
|
|
3105
3042
|
return (d = c.value) == null ? void 0 : d.option;
|
|
@@ -3111,38 +3048,38 @@ const ra = { class: "flex flex-col my-2 gap-8" }, aa = { class: "fm-typo-en-body
|
|
|
3111
3048
|
d !== void 0 && Array.isArray(v) && H(d, v);
|
|
3112
3049
|
},
|
|
3113
3050
|
{ deep: !0 }
|
|
3114
|
-
),
|
|
3051
|
+
), Ke(
|
|
3115
3052
|
() => {
|
|
3116
3053
|
var d;
|
|
3117
3054
|
return (d = c.value) == null ? void 0 : d.option;
|
|
3118
3055
|
},
|
|
3119
3056
|
(d, v) => {
|
|
3120
|
-
v !== void 0 && d !== v && c.value && (
|
|
3057
|
+
v !== void 0 && d !== v && c.value && (B(), N(d), $());
|
|
3121
3058
|
}
|
|
3122
|
-
),
|
|
3059
|
+
), Ke(
|
|
3123
3060
|
() => {
|
|
3124
3061
|
var d;
|
|
3125
3062
|
return (d = c.value) == null ? void 0 : d.operator;
|
|
3126
3063
|
},
|
|
3127
3064
|
(d, v) => {
|
|
3128
|
-
d !== v && y.value && c.value && (
|
|
3065
|
+
d !== v && y.value && c.value && (B(), N(c.value.option), $());
|
|
3129
3066
|
},
|
|
3130
3067
|
{
|
|
3131
3068
|
deep: !0
|
|
3132
3069
|
}
|
|
3133
3070
|
);
|
|
3134
3071
|
function N(d) {
|
|
3135
|
-
var
|
|
3072
|
+
var pe;
|
|
3136
3073
|
if (!c.value || !b.value) return;
|
|
3137
3074
|
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
|
|
3139
|
-
const
|
|
3140
|
-
Array.isArray(I) ?
|
|
3075
|
+
let te;
|
|
3076
|
+
const ne = u.value !== void 0 ? (pe = o.value[u.value]) == null ? void 0 : pe.option : void 0;
|
|
3077
|
+
Array.isArray(I) ? te = I : v.length > 0 && d === ne ? te = v : te = [b.value.default], c.value = {
|
|
3141
3078
|
...c.value,
|
|
3142
|
-
values:
|
|
3079
|
+
values: te
|
|
3143
3080
|
};
|
|
3144
3081
|
}
|
|
3145
|
-
function
|
|
3082
|
+
function $() {
|
|
3146
3083
|
if (!b.value || !c.value) return;
|
|
3147
3084
|
const d = c.value.values.length - b.value.count;
|
|
3148
3085
|
d > 0 && b.value.fixed ? c.value = {
|
|
@@ -3153,7 +3090,7 @@ const ra = { class: "flex flex-col my-2 gap-8" }, aa = { class: "fm-typo-en-body
|
|
|
3153
3090
|
values: [...c.value.values, ...Array(Math.abs(d)).fill(b.value.default)]
|
|
3154
3091
|
});
|
|
3155
3092
|
}
|
|
3156
|
-
function
|
|
3093
|
+
function B() {
|
|
3157
3094
|
y.value && c.value && (b.value = go({
|
|
3158
3095
|
operator: c.value.operator,
|
|
3159
3096
|
dataType: y.value.type,
|
|
@@ -3161,7 +3098,7 @@ const ra = { class: "flex flex-col my-2 gap-8" }, aa = { class: "fm-typo-en-body
|
|
|
3161
3098
|
t: e
|
|
3162
3099
|
}));
|
|
3163
3100
|
}
|
|
3164
|
-
function
|
|
3101
|
+
function M(d) {
|
|
3165
3102
|
var v, I;
|
|
3166
3103
|
(d.schemaName !== ((v = c.value) == null ? void 0 : v.schemaName) || d.name !== ((I = c.value) == null ? void 0 : I.name)) && (c.value = {
|
|
3167
3104
|
schemaName: d.schemaName,
|
|
@@ -3169,45 +3106,43 @@ const ra = { class: "flex flex-col my-2 gap-8" }, aa = { class: "fm-typo-en-body
|
|
|
3169
3106
|
operator: d.filterOperators[0],
|
|
3170
3107
|
option: d.filterDimensionOptions[0],
|
|
3171
3108
|
values: []
|
|
3172
|
-
},
|
|
3109
|
+
}, B(), N(c.value.option), $());
|
|
3173
3110
|
}
|
|
3174
3111
|
function X() {
|
|
3175
|
-
var v, I,
|
|
3176
|
-
const d = [...s.value.map((
|
|
3112
|
+
var v, I, te;
|
|
3113
|
+
const d = [...s.value.map((ne) => ne.value)];
|
|
3177
3114
|
if (c.value) {
|
|
3178
3115
|
E.value || (c.value.dataFormula = void 0);
|
|
3179
|
-
const
|
|
3180
|
-
(
|
|
3181
|
-
).filter((
|
|
3116
|
+
const ne = On((v = c.value) == null ? void 0 : v.option), pe = Sn((I = c.value) == null ? void 0 : I.option), Ye = (te = c.value.values) == null ? void 0 : te.map(
|
|
3117
|
+
(Me, nt) => typeof Me == "number" && !Re(Me, ne, pe) ? nt : null
|
|
3118
|
+
).filter((Me) => Me !== null);
|
|
3182
3119
|
if (!c.value.values || Ye.length > 0) {
|
|
3183
3120
|
l.open({ message: "One or more values are invalid", type: "error" });
|
|
3184
3121
|
return;
|
|
3185
3122
|
}
|
|
3186
|
-
|
|
3187
|
-
(he) => he !== "" && he !== null
|
|
3188
|
-
), u.value !== void 0 ? d[Number(u.value)] = c.value : d.push(c.value), o.value = d;
|
|
3123
|
+
u.value !== void 0 ? d[Number(u.value)] = c.value : d.push(c.value), o.value = d;
|
|
3189
3124
|
}
|
|
3190
|
-
|
|
3125
|
+
a.value = !1;
|
|
3191
3126
|
}
|
|
3192
|
-
function
|
|
3127
|
+
function de(d) {
|
|
3193
3128
|
const v = [...s.value.map((I) => I.value)];
|
|
3194
|
-
v.splice(d, 1), o.value = v,
|
|
3129
|
+
v.splice(d, 1), o.value = v, a.value = !1;
|
|
3195
3130
|
}
|
|
3196
|
-
const Se =
|
|
3131
|
+
const Se = S(
|
|
3197
3132
|
() => r.options.map((d) => ({
|
|
3198
3133
|
label: d.labels.join(" "),
|
|
3199
3134
|
value: d
|
|
3200
3135
|
}))
|
|
3201
3136
|
);
|
|
3202
|
-
function
|
|
3137
|
+
function oe(d) {
|
|
3203
3138
|
return [d.schemaName, d.name, fn(e, n, d.label, "other")].join(" ");
|
|
3204
3139
|
}
|
|
3205
|
-
const { formulaFieldDataList:
|
|
3206
|
-
options:
|
|
3207
|
-
primaryFields:
|
|
3208
|
-
secondaryFields:
|
|
3209
|
-
getLabel:
|
|
3210
|
-
}), { dataValidation:
|
|
3140
|
+
const { formulaFieldDataList: ye, allowedFormulaFields: fe } = ti({
|
|
3141
|
+
options: S(() => r.options),
|
|
3142
|
+
primaryFields: S(() => r.dimensions),
|
|
3143
|
+
secondaryFields: S(() => r.metrics),
|
|
3144
|
+
getLabel: oe
|
|
3145
|
+
}), { dataValidation: Ce, isDataValidating: Q } = Kr({
|
|
3211
3146
|
getDataFormula: () => {
|
|
3212
3147
|
var d;
|
|
3213
3148
|
return (d = c.value) == null ? void 0 : d.dataFormula;
|
|
@@ -3215,75 +3150,75 @@ const ra = { class: "flex flex-col my-2 gap-8" }, aa = { class: "fm-typo-en-body
|
|
|
3215
3150
|
getDisplayFormula: () => {
|
|
3216
3151
|
},
|
|
3217
3152
|
getIsAdvance: () => E.value,
|
|
3218
|
-
getAllowedFields: () =>
|
|
3219
|
-
}),
|
|
3220
|
-
function
|
|
3153
|
+
getAllowedFields: () => fe.value
|
|
3154
|
+
}), Ee = S(() => ei(e));
|
|
3155
|
+
function Re(d, v, I) {
|
|
3221
3156
|
return !(v !== void 0 && d < v || I !== void 0 && d > I);
|
|
3222
3157
|
}
|
|
3223
3158
|
return (d, v) => {
|
|
3224
|
-
const I =
|
|
3225
|
-
return D(), k("div",
|
|
3159
|
+
const I = z("FmCheckbox"), te = z("FmSelect"), ne = z("FmForm"), pe = z("FmIcon"), Ye = z("FmButton"), Me = z("FmListItem"), nt = z("FmList"), Pt = z("FmField");
|
|
3160
|
+
return D(), k("div", ni, [
|
|
3226
3161
|
G(vo, {
|
|
3227
|
-
modelValue:
|
|
3228
|
-
"onUpdate:modelValue": v[6] || (v[6] = (
|
|
3229
|
-
title:
|
|
3230
|
-
"primary-button-label":
|
|
3231
|
-
"secondary-button-label":
|
|
3162
|
+
modelValue: a.value,
|
|
3163
|
+
"onUpdate:modelValue": v[6] || (v[6] = (_e) => a.value = _e),
|
|
3164
|
+
title: i.value,
|
|
3165
|
+
"primary-button-label": P(e)("report.common.confirm"),
|
|
3166
|
+
"secondary-button-label": P(e)("report.common.cancel"),
|
|
3232
3167
|
onConfirm: X
|
|
3233
3168
|
}, {
|
|
3234
|
-
content:
|
|
3235
|
-
G(
|
|
3169
|
+
content: ce(() => [
|
|
3170
|
+
G(ne, {
|
|
3236
3171
|
ref: "form",
|
|
3237
3172
|
class: "flex flex-col gap-2 w-[490px]"
|
|
3238
3173
|
}, {
|
|
3239
|
-
default:
|
|
3240
|
-
var
|
|
3174
|
+
default: ce(() => {
|
|
3175
|
+
var _e, Fe;
|
|
3241
3176
|
return [
|
|
3242
3177
|
G(dn, {
|
|
3243
3178
|
"model-value": y.value,
|
|
3244
3179
|
items: Se.value,
|
|
3245
|
-
placeholder:
|
|
3246
|
-
label:
|
|
3247
|
-
"onUpdate:modelValue": v[0] || (v[0] = (
|
|
3180
|
+
placeholder: i.value,
|
|
3181
|
+
label: i.value,
|
|
3182
|
+
"onUpdate:modelValue": v[0] || (v[0] = (Z) => M(Z))
|
|
3248
3183
|
}, null, 8, ["model-value", "items", "placeholder", "label"]),
|
|
3249
|
-
c.value ? (D(), k(
|
|
3184
|
+
c.value ? (D(), k(Ne, { key: 0 }, [
|
|
3250
3185
|
G(I, {
|
|
3251
3186
|
modelValue: E.value,
|
|
3252
|
-
"onUpdate:modelValue": v[1] || (v[1] = (
|
|
3253
|
-
label:
|
|
3187
|
+
"onUpdate:modelValue": v[1] || (v[1] = (Z) => E.value = Z),
|
|
3188
|
+
label: P(e)("report.section.filter.advance"),
|
|
3254
3189
|
value: !0
|
|
3255
3190
|
}, null, 8, ["modelValue", "label"]),
|
|
3256
|
-
E.value ? (D(),
|
|
3191
|
+
E.value ? (D(), be(Gr, {
|
|
3257
3192
|
key: 0,
|
|
3258
3193
|
modelValue: c.value.dataFormula,
|
|
3259
|
-
"onUpdate:modelValue": v[2] || (v[2] = (
|
|
3260
|
-
placeholder:
|
|
3261
|
-
"field-data-list":
|
|
3262
|
-
"formula-field": y.value.type === "NUMERIC" ?
|
|
3263
|
-
"validation-result":
|
|
3264
|
-
"is-validating":
|
|
3265
|
-
"valid-formula-label":
|
|
3194
|
+
"onUpdate:modelValue": v[2] || (v[2] = (Z) => c.value.dataFormula = Z),
|
|
3195
|
+
placeholder: P(e)("report.section.filter.dataFormula"),
|
|
3196
|
+
"field-data-list": P(ye),
|
|
3197
|
+
"formula-field": y.value.type === "NUMERIC" ? P(J).Metric : P(J).Dimension,
|
|
3198
|
+
"validation-result": P(Ce),
|
|
3199
|
+
"is-validating": P(Q),
|
|
3200
|
+
"valid-formula-label": P(e)("report.common.validFormula")
|
|
3266
3201
|
}, null, 8, ["modelValue", "placeholder", "field-data-list", "formula-field", "validation-result", "is-validating", "valid-formula-label"])) : U("", !0),
|
|
3267
|
-
G(
|
|
3202
|
+
G(te, {
|
|
3268
3203
|
modelValue: c.value.option,
|
|
3269
|
-
"onUpdate:modelValue": v[3] || (v[3] = (
|
|
3270
|
-
items:
|
|
3271
|
-
placeholder:
|
|
3272
|
-
label:
|
|
3204
|
+
"onUpdate:modelValue": v[3] || (v[3] = (Z) => c.value.option = Z),
|
|
3205
|
+
items: Ee.value,
|
|
3206
|
+
placeholder: P(e)("report.section.filter.timeFormatter"),
|
|
3207
|
+
label: P(e)("report.section.filter.timeFormatter")
|
|
3273
3208
|
}, null, 8, ["modelValue", "items", "placeholder", "label"]),
|
|
3274
|
-
(((
|
|
3209
|
+
(((_e = y.value) == null ? void 0 : _e.filterOperators) || []).length > 0 ? (D(), be(dn, {
|
|
3275
3210
|
key: 1,
|
|
3276
3211
|
modelValue: c.value.operator,
|
|
3277
|
-
"onUpdate:modelValue": v[4] || (v[4] = (
|
|
3278
|
-
items: (((
|
|
3279
|
-
label:
|
|
3280
|
-
value:
|
|
3212
|
+
"onUpdate:modelValue": v[4] || (v[4] = (Z) => c.value.operator = Z),
|
|
3213
|
+
items: (((Fe = y.value) == null ? void 0 : Fe.filterOperators) ?? []).map((Z) => ({
|
|
3214
|
+
label: P(e)("report.section.comparisonOperator." + Z),
|
|
3215
|
+
value: Z
|
|
3281
3216
|
}))
|
|
3282
3217
|
}, null, 8, ["modelValue", "items"])) : U("", !0),
|
|
3283
|
-
b.value ? (D(),
|
|
3218
|
+
b.value ? (D(), be(Zr, {
|
|
3284
3219
|
key: c.value.option ?? "",
|
|
3285
3220
|
modelValue: c.value.values,
|
|
3286
|
-
"onUpdate:modelValue": v[5] || (v[5] = (
|
|
3221
|
+
"onUpdate:modelValue": v[5] || (v[5] = (Z) => c.value.values = Z),
|
|
3287
3222
|
config: b.value,
|
|
3288
3223
|
option: c.value.option
|
|
3289
3224
|
}, null, 8, ["modelValue", "config", "option"])) : U("", !0)
|
|
@@ -3296,30 +3231,30 @@ const ra = { class: "flex flex-col my-2 gap-8" }, aa = { class: "fm-typo-en-body
|
|
|
3296
3231
|
_: 1
|
|
3297
3232
|
}, 8, ["modelValue", "title", "primary-button-label", "secondary-button-label"]),
|
|
3298
3233
|
A("div", null, [
|
|
3299
|
-
A("p",
|
|
3300
|
-
A("p",
|
|
3234
|
+
A("p", oi, j(i.value), 1),
|
|
3235
|
+
A("p", ri, j(P(e)("report.section.filter.description")), 1)
|
|
3301
3236
|
]),
|
|
3302
3237
|
G(nt, null, {
|
|
3303
|
-
default:
|
|
3304
|
-
G(
|
|
3238
|
+
default: ce(() => [
|
|
3239
|
+
G(P(yr), {
|
|
3305
3240
|
list: o.value,
|
|
3306
3241
|
"item-key": "id",
|
|
3307
3242
|
class: "flex flex-col gap-2 w-full"
|
|
3308
3243
|
}, {
|
|
3309
|
-
item:
|
|
3310
|
-
G(
|
|
3244
|
+
item: ce(({ element: _e, index: Fe }) => [
|
|
3245
|
+
G(Me, {
|
|
3311
3246
|
class: "!cursor-grab border rounded-md border-neutral-300 h-[40px] !p-[8px]",
|
|
3312
|
-
onClick:
|
|
3247
|
+
onClick: St((Z) => f(s.value[Fe]), ["stop"])
|
|
3313
3248
|
}, {
|
|
3314
|
-
default:
|
|
3315
|
-
G(
|
|
3316
|
-
A("p",
|
|
3249
|
+
default: ce(() => [
|
|
3250
|
+
G(pe, { name: "drag_handle" }),
|
|
3251
|
+
A("p", ii, j(s.value[Fe].label), 1),
|
|
3317
3252
|
v[8] || (v[8] = A("div", { class: "grow" }, null, -1)),
|
|
3318
3253
|
G(Ye, {
|
|
3319
3254
|
icon: "close",
|
|
3320
3255
|
size: "md",
|
|
3321
3256
|
variant: "tertiary",
|
|
3322
|
-
onClick:
|
|
3257
|
+
onClick: St((Z) => de(Fe), ["stop"])
|
|
3323
3258
|
}, null, 8, ["onClick"])
|
|
3324
3259
|
]),
|
|
3325
3260
|
_: 2
|
|
@@ -3330,21 +3265,21 @@ const ra = { class: "flex flex-col my-2 gap-8" }, aa = { class: "fm-typo-en-body
|
|
|
3330
3265
|
]),
|
|
3331
3266
|
_: 1
|
|
3332
3267
|
}),
|
|
3333
|
-
G(
|
|
3268
|
+
G(Pt, {
|
|
3334
3269
|
class: "text-fm-color-typo-tertiary",
|
|
3335
3270
|
onClick: v[7] || (v[7] = () => {
|
|
3336
3271
|
f();
|
|
3337
3272
|
})
|
|
3338
3273
|
}, {
|
|
3339
|
-
default:
|
|
3340
|
-
co(
|
|
3274
|
+
default: ce(() => [
|
|
3275
|
+
co(j(P(e)("report.section.filter.add")), 1)
|
|
3341
3276
|
]),
|
|
3342
3277
|
_: 1
|
|
3343
3278
|
})
|
|
3344
3279
|
]);
|
|
3345
3280
|
};
|
|
3346
3281
|
}
|
|
3347
|
-
}),
|
|
3282
|
+
}), xi = q(null), Di = q([]), ai = /* @__PURE__ */ We({
|
|
3348
3283
|
__name: "TransitionFade",
|
|
3349
3284
|
props: {
|
|
3350
3285
|
modelValue: { type: Boolean, required: !0, default: !0 },
|
|
@@ -3353,38 +3288,35 @@ const ra = { class: "flex flex-col my-2 gap-8" }, aa = { class: "fm-typo-en-body
|
|
|
3353
3288
|
emits: ["update:modelValue"],
|
|
3354
3289
|
setup(t) {
|
|
3355
3290
|
const e = tt(t, "modelValue");
|
|
3356
|
-
return (n, o) => (D(), k(
|
|
3291
|
+
return (n, o) => (D(), k(Ne, null, [
|
|
3357
3292
|
G(Zt, { name: "slide-fade-right" }, {
|
|
3358
|
-
default:
|
|
3293
|
+
default: ce(() => [
|
|
3359
3294
|
e.value ? pt(n.$slots, "right", { key: 0 }, void 0, !0) : U("", !0)
|
|
3360
3295
|
]),
|
|
3361
3296
|
_: 3
|
|
3362
3297
|
}),
|
|
3363
3298
|
G(Zt, { name: "slide-fade-left" }, {
|
|
3364
|
-
default:
|
|
3299
|
+
default: ce(() => [
|
|
3365
3300
|
e.value ? U("", !0) : pt(n.$slots, "left", { key: 0 }, void 0, !0)
|
|
3366
3301
|
]),
|
|
3367
3302
|
_: 3
|
|
3368
3303
|
})
|
|
3369
3304
|
], 64));
|
|
3370
3305
|
}
|
|
3371
|
-
}),
|
|
3306
|
+
}), Ii = /* @__PURE__ */ an(ai, [["__scopeId", "data-v-a98ca9bc"]]);
|
|
3372
3307
|
export {
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
jr as j,
|
|
3388
|
-
wr as k,
|
|
3389
|
-
oa as u
|
|
3308
|
+
J as F,
|
|
3309
|
+
_i as S,
|
|
3310
|
+
Ii as T,
|
|
3311
|
+
Ei as W,
|
|
3312
|
+
Zr as _,
|
|
3313
|
+
wi as a,
|
|
3314
|
+
xi as b,
|
|
3315
|
+
yi as c,
|
|
3316
|
+
yr as d,
|
|
3317
|
+
Di as e,
|
|
3318
|
+
Kr as f,
|
|
3319
|
+
Ti as g,
|
|
3320
|
+
Gr as h,
|
|
3321
|
+
ti as u
|
|
3390
3322
|
};
|