@feedmepos/mf-kitchen 1.0.4 → 1.0.5-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/{AdvanceModeView-4fbb592c.js → AdvanceModeView-bf31793f.js} +1058 -1024
- package/dist/{NormalModeView-9c657951.js → NormalModeView-c9e891a1.js} +58 -57
- package/dist/ReceiptTemplate-aed86f36.js +113 -0
- package/dist/TemplateHeader-3a3b15b3.js +72655 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/{app-57cd590d.js → app-70a6f50f.js} +8 -8
- package/dist/app.js +1 -1
- package/dist/components/EditingPanel.vue.d.ts +56 -42
- package/dist/components/Preview.vue.d.ts +128 -46
- package/dist/components/ReceiptEditor.vue.d.ts +56 -42
- package/dist/components/advance/AdvanceModeLeftPanel.vue.d.ts +196 -50
- package/dist/components/normal/NormalModeEditor.vue.d.ts +64 -0
- package/dist/editors/CheckboxWidgetEditor.vue.d.ts +60 -46
- package/dist/editors/CommonWidgetEditor.vue.d.ts +60 -46
- package/dist/editors/DividerWidgetEditor.vue.d.ts +60 -46
- package/dist/editors/ImageWidgetEditor.vue.d.ts +74 -46
- package/dist/editors/QrCodeWidgetEditor.vue.d.ts +62 -48
- package/dist/editors/SpacerWidgetEditor.vue.d.ts +60 -46
- package/dist/editors/TextWidgetEditor.vue.d.ts +62 -48
- package/dist/shared/ReceiptSettingBase.vue.d.ts +68 -0
- package/dist/shared/SaveDialogPopUp.vue.d.ts +128 -46
- package/dist/shared/TemplateHeader.vue.d.ts +128 -46
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/dist/ReceiptTemplate-9d2103ec.js +0 -111
- package/dist/TemplateHeader-88f309d9.js +0 -40370
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as ee, computed as
|
|
2
|
-
import { e as
|
|
3
|
-
import { useI18n as me, useCoreStore as
|
|
1
|
+
import { defineComponent as ee, computed as P, toRefs as Go, unref as b, ref as j, reactive as Ho, h as jo, getCurrentInstance as Gt, watch as Ye, onUnmounted as Ko, onMounted as bo, nextTick as yo, isRef as Dt, openBlock as x, createElementBlock as W, normalizeStyle as ge, createElementVNode as k, toDisplayString as H, resolveComponent as K, createBlock as ye, resolveDynamicComponent as _o, markRaw as qo, mergeProps as Zo, createVNode as S, withCtx as be, Fragment as _e, renderList as Se, normalizeClass as qt, createCommentVNode as Ne, createTextVNode as Jo, onBeforeUnmount as Qo } from "vue";
|
|
2
|
+
import { e as A, t as en, w as it, b as at, c as tn, d as on, Z as nn, F as pe, W as Le, f as ln, K as lt, I as an, i as rn, h as Co, j as sn, k as dn, l as un, m as cn, u as mn, _ as pn, P as fn, r as Zt, n as Jt, a as gn, T as hn, o as Qt, g as vn } from "./TemplateHeader-3a3b15b3.js";
|
|
3
|
+
import { useI18n as me, useCoreStore as bn } from "@feedmepos/mf-common";
|
|
4
4
|
import { useSnackbar as Eo } from "@feedmepos/ui-library";
|
|
5
|
-
import { _ as St } from "./app-
|
|
6
|
-
var
|
|
5
|
+
import { _ as St } from "./app-70a6f50f.js";
|
|
6
|
+
var yn = Object.defineProperty, yt = Object.getOwnPropertySymbols, To = Object.prototype.hasOwnProperty, wo = Object.prototype.propertyIsEnumerable, eo = (e, o, t) => o in e ? yn(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t, Ue = (e, o) => {
|
|
7
7
|
for (var t in o || (o = {}))
|
|
8
8
|
To.call(o, t) && eo(e, t, o[t]);
|
|
9
9
|
if (yt)
|
|
@@ -20,20 +20,20 @@ var bn = Object.defineProperty, yt = Object.getOwnPropertySymbols, To = Object.p
|
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
22
|
const Vo = "[vue-draggable-plus]: ";
|
|
23
|
-
function
|
|
23
|
+
function _n(e) {
|
|
24
24
|
console.warn(Vo + e);
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function Cn(e) {
|
|
27
27
|
console.error(Vo + e);
|
|
28
28
|
}
|
|
29
29
|
function to(e, o, t) {
|
|
30
30
|
return t >= 0 && t < e.length && e.splice(t, 0, e.splice(o, 1)[0]), e;
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function En(e) {
|
|
33
33
|
return e.replace(/-(\w)/g, (o, t) => t ? t.toUpperCase() : "");
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
return Object.keys(e).reduce((o, t) => (typeof e[t] < "u" && (o[
|
|
35
|
+
function Tn(e) {
|
|
36
|
+
return Object.keys(e).reduce((o, t) => (typeof e[t] < "u" && (o[En(t)] = e[t]), o), {});
|
|
37
37
|
}
|
|
38
38
|
function oo(e, o) {
|
|
39
39
|
return Array.isArray(e) && e.splice(o, 1), e;
|
|
@@ -41,10 +41,10 @@ function oo(e, o) {
|
|
|
41
41
|
function no(e, o, t) {
|
|
42
42
|
return Array.isArray(e) && e.splice(o, 0, t), e;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function wn(e) {
|
|
45
45
|
return typeof e > "u";
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function Sn(e) {
|
|
48
48
|
return typeof e == "string";
|
|
49
49
|
}
|
|
50
50
|
function lo(e, o, t) {
|
|
@@ -54,23 +54,23 @@ function lo(e, o, t) {
|
|
|
54
54
|
function Ft(e) {
|
|
55
55
|
e.parentNode && e.parentNode.removeChild(e);
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function Vn(e, o = document) {
|
|
58
58
|
var t;
|
|
59
59
|
let n = null;
|
|
60
|
-
return typeof (o == null ? void 0 : o.querySelector) == "function" ? n = (t = o == null ? void 0 : o.querySelector) == null ? void 0 : t.call(o, e) : n = document.querySelector(e), n ||
|
|
60
|
+
return typeof (o == null ? void 0 : o.querySelector) == "function" ? n = (t = o == null ? void 0 : o.querySelector) == null ? void 0 : t.call(o, e) : n = document.querySelector(e), n || _n(`Element not found: ${e}`), n;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function kn(e, o, t = null) {
|
|
63
63
|
return function(...n) {
|
|
64
64
|
return e.apply(t, n), o.apply(t, n);
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function xn(e, o) {
|
|
68
68
|
const t = Ue({}, e);
|
|
69
69
|
return Object.keys(o).forEach((n) => {
|
|
70
|
-
t[n] ? t[n] =
|
|
70
|
+
t[n] ? t[n] = kn(e[n], o[n]) : t[n] = o[n];
|
|
71
71
|
}), t;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function In(e) {
|
|
74
74
|
return e instanceof HTMLElement;
|
|
75
75
|
}
|
|
76
76
|
function io(e, o) {
|
|
@@ -82,7 +82,7 @@ function Dn(e) {
|
|
|
82
82
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // uppercase letter
|
|
83
83
|
(e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
84
84
|
}
|
|
85
|
-
const
|
|
85
|
+
const Fn = Object.assign;
|
|
86
86
|
/**!
|
|
87
87
|
* Sortable 1.15.2
|
|
88
88
|
* @author RubaXa <trash@rubaxa.org>
|
|
@@ -99,11 +99,11 @@ function ao(e, o) {
|
|
|
99
99
|
}
|
|
100
100
|
return t;
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function Ee(e) {
|
|
103
103
|
for (var o = 1; o < arguments.length; o++) {
|
|
104
104
|
var t = arguments[o] != null ? arguments[o] : {};
|
|
105
105
|
o % 2 ? ao(Object(t), !0).forEach(function(n) {
|
|
106
|
-
|
|
106
|
+
On(e, n, t[n]);
|
|
107
107
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ao(Object(t)).forEach(function(n) {
|
|
108
108
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n));
|
|
109
109
|
});
|
|
@@ -118,7 +118,7 @@ function ft(e) {
|
|
|
118
118
|
return o && typeof Symbol == "function" && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
119
119
|
}, ft(e);
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function On(e, o, t) {
|
|
122
122
|
return o in e ? Object.defineProperty(e, o, {
|
|
123
123
|
value: t,
|
|
124
124
|
enumerable: !0,
|
|
@@ -136,7 +136,7 @@ function ke() {
|
|
|
136
136
|
return e;
|
|
137
137
|
}, ke.apply(this, arguments);
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function An(e, o) {
|
|
140
140
|
if (e == null)
|
|
141
141
|
return {};
|
|
142
142
|
var t = {}, n = Object.keys(e), l, a;
|
|
@@ -147,7 +147,7 @@ function On(e, o) {
|
|
|
147
147
|
function Rn(e, o) {
|
|
148
148
|
if (e == null)
|
|
149
149
|
return {};
|
|
150
|
-
var t =
|
|
150
|
+
var t = An(e, o), n, l;
|
|
151
151
|
if (Object.getOwnPropertySymbols) {
|
|
152
152
|
var a = Object.getOwnPropertySymbols(e);
|
|
153
153
|
for (l = 0; l < a.length; l++)
|
|
@@ -155,20 +155,20 @@ function Rn(e, o) {
|
|
|
155
155
|
}
|
|
156
156
|
return t;
|
|
157
157
|
}
|
|
158
|
-
var
|
|
158
|
+
var Wn = "1.15.2";
|
|
159
159
|
function Ve(e) {
|
|
160
160
|
if (typeof window < "u" && window.navigator)
|
|
161
161
|
return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
162
162
|
}
|
|
163
|
-
var xe = Ve(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), rt = Ve(/Edge/i), ro = Ve(/firefox/i),
|
|
163
|
+
var xe = Ve(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), rt = Ve(/Edge/i), ro = Ve(/firefox/i), Je = Ve(/safari/i) && !Ve(/chrome/i) && !Ve(/android/i), ko = Ve(/iP(ad|od|hone)/i), xo = Ve(/chrome/i) && Ve(/android/i), Io = {
|
|
164
164
|
capture: !1,
|
|
165
165
|
passive: !1
|
|
166
166
|
};
|
|
167
|
-
function z(e, o, t) {
|
|
168
|
-
e.addEventListener(o, t, !xe && Do);
|
|
169
|
-
}
|
|
170
167
|
function X(e, o, t) {
|
|
171
|
-
e.
|
|
168
|
+
e.addEventListener(o, t, !xe && Io);
|
|
169
|
+
}
|
|
170
|
+
function U(e, o, t) {
|
|
171
|
+
e.removeEventListener(o, t, !xe && Io);
|
|
172
172
|
}
|
|
173
173
|
function _t(e, o) {
|
|
174
174
|
if (o) {
|
|
@@ -186,10 +186,10 @@ function _t(e, o) {
|
|
|
186
186
|
return !1;
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function Nn(e) {
|
|
190
190
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function ve(e, o, t, n) {
|
|
193
193
|
if (e) {
|
|
194
194
|
t = t || document;
|
|
195
195
|
do {
|
|
@@ -197,7 +197,7 @@ function he(e, o, t, n) {
|
|
|
197
197
|
return e;
|
|
198
198
|
if (e === t)
|
|
199
199
|
break;
|
|
200
|
-
} while (e =
|
|
200
|
+
} while (e = Nn(e));
|
|
201
201
|
}
|
|
202
202
|
return null;
|
|
203
203
|
}
|
|
@@ -211,7 +211,7 @@ function de(e, o, t) {
|
|
|
211
211
|
e.className = (n + (t ? " " + o : "")).replace(so, " ");
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function D(e, o, t) {
|
|
215
215
|
var n = e && e.style;
|
|
216
216
|
if (n) {
|
|
217
217
|
if (t === void 0)
|
|
@@ -225,13 +225,13 @@ function ze(e, o) {
|
|
|
225
225
|
t = e;
|
|
226
226
|
else
|
|
227
227
|
do {
|
|
228
|
-
var n =
|
|
228
|
+
var n = D(e, "transform");
|
|
229
229
|
n && n !== "none" && (t = n + " " + t);
|
|
230
230
|
} while (!o && (e = e.parentNode));
|
|
231
231
|
var l = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
232
232
|
return l && new l(t);
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function Do(e, o, t) {
|
|
235
235
|
if (e) {
|
|
236
236
|
var n = e.getElementsByTagName(o), l = 0, a = n.length;
|
|
237
237
|
if (t)
|
|
@@ -241,31 +241,31 @@ function Io(e, o, t) {
|
|
|
241
241
|
}
|
|
242
242
|
return [];
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function Ce() {
|
|
245
245
|
var e = document.scrollingElement;
|
|
246
246
|
return e || document.documentElement;
|
|
247
247
|
}
|
|
248
248
|
function oe(e, o, t, n, l) {
|
|
249
249
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
250
|
-
var a, i, s, r, d, u,
|
|
251
|
-
if (e !== window && e.parentNode && e !==
|
|
250
|
+
var a, i, s, r, d, u, m;
|
|
251
|
+
if (e !== window && e.parentNode && e !== Ce() ? (a = e.getBoundingClientRect(), i = a.top, s = a.left, r = a.bottom, d = a.right, u = a.height, m = a.width) : (i = 0, s = 0, r = window.innerHeight, d = window.innerWidth, u = window.innerHeight, m = window.innerWidth), (o || t) && e !== window && (l = l || e.parentNode, !xe))
|
|
252
252
|
do
|
|
253
|
-
if (l && l.getBoundingClientRect && (
|
|
253
|
+
if (l && l.getBoundingClientRect && (D(l, "transform") !== "none" || t && D(l, "position") !== "static")) {
|
|
254
254
|
var p = l.getBoundingClientRect();
|
|
255
|
-
i -= p.top + parseInt(
|
|
255
|
+
i -= p.top + parseInt(D(l, "border-top-width")), s -= p.left + parseInt(D(l, "border-left-width")), r = i + a.height, d = s + a.width;
|
|
256
256
|
break;
|
|
257
257
|
}
|
|
258
258
|
while (l = l.parentNode);
|
|
259
259
|
if (n && e !== window) {
|
|
260
|
-
var f = ze(l || e),
|
|
261
|
-
f && (i /=
|
|
260
|
+
var f = ze(l || e), O = f && f.a, C = f && f.d;
|
|
261
|
+
f && (i /= C, s /= O, m /= O, u /= C, r = i + u, d = s + m);
|
|
262
262
|
}
|
|
263
263
|
return {
|
|
264
264
|
top: i,
|
|
265
265
|
left: s,
|
|
266
266
|
bottom: r,
|
|
267
267
|
right: d,
|
|
268
|
-
width:
|
|
268
|
+
width: m,
|
|
269
269
|
height: u
|
|
270
270
|
};
|
|
271
271
|
}
|
|
@@ -275,7 +275,7 @@ function uo(e, o, t) {
|
|
|
275
275
|
var a = oe(n)[t], i = void 0;
|
|
276
276
|
if (i = l >= a, !i)
|
|
277
277
|
return n;
|
|
278
|
-
if (n ===
|
|
278
|
+
if (n === Ce())
|
|
279
279
|
break;
|
|
280
280
|
n = Oe(n, !1);
|
|
281
281
|
}
|
|
@@ -283,7 +283,7 @@ function uo(e, o, t) {
|
|
|
283
283
|
}
|
|
284
284
|
function Ge(e, o, t, n) {
|
|
285
285
|
for (var l = 0, a = 0, i = e.children; a < i.length; ) {
|
|
286
|
-
if (i[a].style.display !== "none" && i[a] !==
|
|
286
|
+
if (i[a].style.display !== "none" && i[a] !== F.ghost && (n || i[a] !== F.dragged) && ve(i[a], t.draggable, e, !1)) {
|
|
287
287
|
if (l === o)
|
|
288
288
|
return i[a];
|
|
289
289
|
l++;
|
|
@@ -293,7 +293,7 @@ function Ge(e, o, t, n) {
|
|
|
293
293
|
return null;
|
|
294
294
|
}
|
|
295
295
|
function Ht(e, o) {
|
|
296
|
-
for (var t = e.lastElementChild; t && (t ===
|
|
296
|
+
for (var t = e.lastElementChild; t && (t === F.ghost || D(t, "display") === "none" || o && !_t(t, o)); )
|
|
297
297
|
t = t.previousElementSibling;
|
|
298
298
|
return t || null;
|
|
299
299
|
}
|
|
@@ -302,11 +302,11 @@ function fe(e, o) {
|
|
|
302
302
|
if (!e || !e.parentNode)
|
|
303
303
|
return -1;
|
|
304
304
|
for (; e = e.previousElementSibling; )
|
|
305
|
-
e.nodeName.toUpperCase() !== "TEMPLATE" && e !==
|
|
305
|
+
e.nodeName.toUpperCase() !== "TEMPLATE" && e !== F.clone && (!o || _t(e, o)) && t++;
|
|
306
306
|
return t;
|
|
307
307
|
}
|
|
308
308
|
function co(e) {
|
|
309
|
-
var o = 0, t = 0, n =
|
|
309
|
+
var o = 0, t = 0, n = Ce();
|
|
310
310
|
if (e)
|
|
311
311
|
do {
|
|
312
312
|
var l = ze(e), a = l.a, i = l.d;
|
|
@@ -314,7 +314,7 @@ function co(e) {
|
|
|
314
314
|
} while (e !== n && (e = e.parentNode));
|
|
315
315
|
return [o, t];
|
|
316
316
|
}
|
|
317
|
-
function
|
|
317
|
+
function Pn(e, o) {
|
|
318
318
|
for (var t in e)
|
|
319
319
|
if (e.hasOwnProperty(t)) {
|
|
320
320
|
for (var n in o)
|
|
@@ -325,23 +325,23 @@ function Nn(e, o) {
|
|
|
325
325
|
}
|
|
326
326
|
function Oe(e, o) {
|
|
327
327
|
if (!e || !e.getBoundingClientRect)
|
|
328
|
-
return
|
|
328
|
+
return Ce();
|
|
329
329
|
var t = e, n = !1;
|
|
330
330
|
do
|
|
331
331
|
if (t.clientWidth < t.scrollWidth || t.clientHeight < t.scrollHeight) {
|
|
332
|
-
var l =
|
|
332
|
+
var l = D(t);
|
|
333
333
|
if (t.clientWidth < t.scrollWidth && (l.overflowX == "auto" || l.overflowX == "scroll") || t.clientHeight < t.scrollHeight && (l.overflowY == "auto" || l.overflowY == "scroll")) {
|
|
334
334
|
if (!t.getBoundingClientRect || t === document.body)
|
|
335
|
-
return
|
|
335
|
+
return Ce();
|
|
336
336
|
if (n || o)
|
|
337
337
|
return t;
|
|
338
338
|
n = !0;
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
while (t = t.parentNode);
|
|
342
|
-
return
|
|
342
|
+
return Ce();
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function Ln(e, o) {
|
|
345
345
|
if (e && o)
|
|
346
346
|
for (var t in o)
|
|
347
347
|
o.hasOwnProperty(t) && (e[t] = o[t]);
|
|
@@ -361,40 +361,40 @@ function Fo(e, o) {
|
|
|
361
361
|
}
|
|
362
362
|
};
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function $n() {
|
|
365
365
|
clearTimeout(Qe), Qe = void 0;
|
|
366
366
|
}
|
|
367
367
|
function Oo(e, o, t) {
|
|
368
368
|
e.scrollLeft += o, e.scrollTop += t;
|
|
369
369
|
}
|
|
370
|
-
function
|
|
370
|
+
function Ao(e) {
|
|
371
371
|
var o = window.Polymer, t = window.jQuery || window.Zepto;
|
|
372
372
|
return o && o.dom ? o.dom(e).cloneNode(!0) : t ? t(e).clone(!0)[0] : e.cloneNode(!0);
|
|
373
373
|
}
|
|
374
|
-
function
|
|
374
|
+
function Ro(e, o, t) {
|
|
375
375
|
var n = {};
|
|
376
376
|
return Array.from(e.children).forEach(function(l) {
|
|
377
377
|
var a, i, s, r;
|
|
378
|
-
if (!(!
|
|
378
|
+
if (!(!ve(l, o.draggable, e, !1) || l.animated || l === t)) {
|
|
379
379
|
var d = oe(l);
|
|
380
380
|
n.left = Math.min((a = n.left) !== null && a !== void 0 ? a : 1 / 0, d.left), n.top = Math.min((i = n.top) !== null && i !== void 0 ? i : 1 / 0, d.top), n.right = Math.max((s = n.right) !== null && s !== void 0 ? s : -1 / 0, d.right), n.bottom = Math.max((r = n.bottom) !== null && r !== void 0 ? r : -1 / 0, d.bottom);
|
|
381
381
|
}
|
|
382
382
|
}), n.width = n.right - n.left, n.height = n.bottom - n.top, n.x = n.left, n.y = n.top, n;
|
|
383
383
|
}
|
|
384
384
|
var ce = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
385
|
-
function
|
|
385
|
+
function Bn() {
|
|
386
386
|
var e = [], o;
|
|
387
387
|
return {
|
|
388
388
|
captureAnimationState: function() {
|
|
389
389
|
if (e = [], !!this.options.animation) {
|
|
390
390
|
var t = [].slice.call(this.el.children);
|
|
391
391
|
t.forEach(function(n) {
|
|
392
|
-
if (!(
|
|
392
|
+
if (!(D(n, "display") === "none" || n === F.ghost)) {
|
|
393
393
|
e.push({
|
|
394
394
|
target: n,
|
|
395
395
|
rect: oe(n)
|
|
396
396
|
});
|
|
397
|
-
var l =
|
|
397
|
+
var l = Ee({}, e[e.length - 1].rect);
|
|
398
398
|
if (n.thisAnimationDuration) {
|
|
399
399
|
var a = ze(n, !0);
|
|
400
400
|
a && (l.top -= a.f, l.left -= a.e);
|
|
@@ -408,7 +408,7 @@ function $n() {
|
|
|
408
408
|
e.push(t);
|
|
409
409
|
},
|
|
410
410
|
removeAnimationState: function(t) {
|
|
411
|
-
e.splice(
|
|
411
|
+
e.splice(Pn(e, {
|
|
412
412
|
target: t
|
|
413
413
|
}), 1);
|
|
414
414
|
},
|
|
@@ -420,9 +420,9 @@ function $n() {
|
|
|
420
420
|
}
|
|
421
421
|
var l = !1, a = 0;
|
|
422
422
|
e.forEach(function(i) {
|
|
423
|
-
var s = 0, r = i.target, d = r.fromRect, u = oe(r),
|
|
424
|
-
|
|
425
|
-
(f.top - u.top) / (f.left - u.left) === (d.top - u.top) / (d.left - u.left) && (s =
|
|
423
|
+
var s = 0, r = i.target, d = r.fromRect, u = oe(r), m = r.prevFromRect, p = r.prevToRect, f = i.rect, O = ze(r, !0);
|
|
424
|
+
O && (u.top -= O.f, u.left -= O.e), r.toRect = u, r.thisAnimationDuration && Ot(m, u) && !Ot(d, u) && // Make sure animatingRect is on line between toRect & fromRect
|
|
425
|
+
(f.top - u.top) / (f.left - u.left) === (d.top - u.top) / (d.left - u.left) && (s = Un(f, m, p, n.options)), Ot(u, d) || (r.prevFromRect = d, r.prevToRect = u, s || (s = n.options.animation), n.animate(r, f, u, s)), s && (l = !0, a = Math.max(a, s), clearTimeout(r.animationResetTimer), r.animationResetTimer = setTimeout(function() {
|
|
426
426
|
r.animationTime = 0, r.prevFromRect = null, r.fromRect = null, r.prevToRect = null, r.thisAnimationDuration = null;
|
|
427
427
|
}, s), r.thisAnimationDuration = s);
|
|
428
428
|
}), clearTimeout(o), l ? o = setTimeout(function() {
|
|
@@ -431,31 +431,31 @@ function $n() {
|
|
|
431
431
|
},
|
|
432
432
|
animate: function(t, n, l, a) {
|
|
433
433
|
if (a) {
|
|
434
|
-
|
|
434
|
+
D(t, "transition", ""), D(t, "transform", "");
|
|
435
435
|
var i = ze(this.el), s = i && i.a, r = i && i.d, d = (n.left - l.left) / (s || 1), u = (n.top - l.top) / (r || 1);
|
|
436
|
-
t.animatingX = !!d, t.animatingY = !!u,
|
|
437
|
-
|
|
436
|
+
t.animatingX = !!d, t.animatingY = !!u, D(t, "transform", "translate3d(" + d + "px," + u + "px,0)"), this.forRepaintDummy = Mn(t), D(t, "transition", "transform " + a + "ms" + (this.options.easing ? " " + this.options.easing : "")), D(t, "transform", "translate3d(0,0,0)"), typeof t.animated == "number" && clearTimeout(t.animated), t.animated = setTimeout(function() {
|
|
437
|
+
D(t, "transition", ""), D(t, "transform", ""), t.animated = !1, t.animatingX = !1, t.animatingY = !1;
|
|
438
438
|
}, a);
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
441
|
};
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function Mn(e) {
|
|
444
444
|
return e.offsetWidth;
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function Un(e, o, t, n) {
|
|
447
447
|
return Math.sqrt(Math.pow(o.top - e.top, 2) + Math.pow(o.left - e.left, 2)) / Math.sqrt(Math.pow(o.top - t.top, 2) + Math.pow(o.left - t.left, 2)) * n.animation;
|
|
448
448
|
}
|
|
449
|
-
var
|
|
449
|
+
var $e = [], At = {
|
|
450
450
|
initializeByDefault: !0
|
|
451
451
|
}, st = {
|
|
452
452
|
mount: function(e) {
|
|
453
|
-
for (var o in
|
|
454
|
-
|
|
455
|
-
|
|
453
|
+
for (var o in At)
|
|
454
|
+
At.hasOwnProperty(o) && !(o in e) && (e[o] = At[o]);
|
|
455
|
+
$e.forEach(function(t) {
|
|
456
456
|
if (t.pluginName === e.pluginName)
|
|
457
457
|
throw "Sortable: Cannot mount plugin ".concat(e.pluginName, " more than once");
|
|
458
|
-
}),
|
|
458
|
+
}), $e.push(e);
|
|
459
459
|
},
|
|
460
460
|
pluginEvent: function(e, o, t) {
|
|
461
461
|
var n = this;
|
|
@@ -463,16 +463,16 @@ var Le = [], Rt = {
|
|
|
463
463
|
n.eventCanceled = !0;
|
|
464
464
|
};
|
|
465
465
|
var l = e + "Global";
|
|
466
|
-
|
|
467
|
-
o[a.pluginName] && (o[a.pluginName][l] && o[a.pluginName][l](
|
|
466
|
+
$e.forEach(function(a) {
|
|
467
|
+
o[a.pluginName] && (o[a.pluginName][l] && o[a.pluginName][l](Ee({
|
|
468
468
|
sortable: o
|
|
469
|
-
}, t)), o.options[a.pluginName] && o[a.pluginName][e] && o[a.pluginName][e](
|
|
469
|
+
}, t)), o.options[a.pluginName] && o[a.pluginName][e] && o[a.pluginName][e](Ee({
|
|
470
470
|
sortable: o
|
|
471
471
|
}, t)));
|
|
472
472
|
});
|
|
473
473
|
},
|
|
474
474
|
initializePlugins: function(e, o, t, n) {
|
|
475
|
-
|
|
475
|
+
$e.forEach(function(i) {
|
|
476
476
|
var s = i.pluginName;
|
|
477
477
|
if (!(!e.options[s] && !i.initializeByDefault)) {
|
|
478
478
|
var r = new i(e, o, e.options);
|
|
@@ -487,50 +487,50 @@ var Le = [], Rt = {
|
|
|
487
487
|
},
|
|
488
488
|
getEventProperties: function(e, o) {
|
|
489
489
|
var t = {};
|
|
490
|
-
return
|
|
490
|
+
return $e.forEach(function(n) {
|
|
491
491
|
typeof n.eventProperties == "function" && ke(t, n.eventProperties.call(o[n.pluginName], e));
|
|
492
492
|
}), t;
|
|
493
493
|
},
|
|
494
494
|
modifyOption: function(e, o, t) {
|
|
495
495
|
var n;
|
|
496
|
-
return
|
|
496
|
+
return $e.forEach(function(l) {
|
|
497
497
|
e[l.pluginName] && l.optionListeners && typeof l.optionListeners[o] == "function" && (n = l.optionListeners[o].call(e[l.pluginName], t));
|
|
498
498
|
}), n;
|
|
499
499
|
}
|
|
500
500
|
};
|
|
501
|
-
function
|
|
502
|
-
var o = e.sortable, t = e.rootEl, n = e.name, l = e.targetEl, a = e.cloneEl, i = e.toEl, s = e.fromEl, r = e.oldIndex, d = e.newIndex, u = e.oldDraggableIndex,
|
|
501
|
+
function Xn(e) {
|
|
502
|
+
var o = e.sortable, t = e.rootEl, n = e.name, l = e.targetEl, a = e.cloneEl, i = e.toEl, s = e.fromEl, r = e.oldIndex, d = e.newIndex, u = e.oldDraggableIndex, m = e.newDraggableIndex, p = e.originalEvent, f = e.putSortable, O = e.extraEventProperties;
|
|
503
503
|
if (o = o || t && t[ce], !!o) {
|
|
504
|
-
var
|
|
505
|
-
window.CustomEvent && !xe && !rt ?
|
|
504
|
+
var C, E = o.options, $ = "on" + n.charAt(0).toUpperCase() + n.substr(1);
|
|
505
|
+
window.CustomEvent && !xe && !rt ? C = new CustomEvent(n, {
|
|
506
506
|
bubbles: !0,
|
|
507
507
|
cancelable: !0
|
|
508
|
-
}) : (
|
|
509
|
-
var
|
|
510
|
-
for (var B in
|
|
511
|
-
|
|
512
|
-
t && t.dispatchEvent(
|
|
508
|
+
}) : (C = document.createEvent("Event"), C.initEvent(n, !0, !0)), C.to = i || t, C.from = s || t, C.item = l || t, C.clone = a, C.oldIndex = r, C.newIndex = d, C.oldDraggableIndex = u, C.newDraggableIndex = m, C.originalEvent = p, C.pullMode = f ? f.lastPutMode : void 0;
|
|
509
|
+
var q = Ee(Ee({}, O), st.getEventProperties(n, o));
|
|
510
|
+
for (var B in q)
|
|
511
|
+
C[B] = q[B];
|
|
512
|
+
t && t.dispatchEvent(C), E[$] && E[$].call(o, C);
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
|
-
var
|
|
516
|
-
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = t.evt, l = Rn(t,
|
|
517
|
-
st.pluginEvent.bind(
|
|
518
|
-
dragEl:
|
|
515
|
+
var zn = ["evt"], se = function(e, o) {
|
|
516
|
+
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = t.evt, l = Rn(t, zn);
|
|
517
|
+
st.pluginEvent.bind(F)(e, o, Ee({
|
|
518
|
+
dragEl: h,
|
|
519
519
|
parentEl: Q,
|
|
520
|
-
ghostEl:
|
|
521
|
-
rootEl:
|
|
520
|
+
ghostEl: R,
|
|
521
|
+
rootEl: Z,
|
|
522
522
|
nextEl: We,
|
|
523
523
|
lastDownEl: gt,
|
|
524
|
-
cloneEl:
|
|
524
|
+
cloneEl: J,
|
|
525
525
|
cloneHidden: Fe,
|
|
526
526
|
dragStarted: Ke,
|
|
527
527
|
putSortable: ne,
|
|
528
|
-
activeSortable:
|
|
528
|
+
activeSortable: F.active,
|
|
529
529
|
originalEvent: n,
|
|
530
530
|
oldIndex: Xe,
|
|
531
531
|
oldDraggableIndex: et,
|
|
532
532
|
newIndex: ue,
|
|
533
|
-
newDraggableIndex:
|
|
533
|
+
newDraggableIndex: De,
|
|
534
534
|
hideGhostForTarget: Lo,
|
|
535
535
|
unhideGhostForTarget: $o,
|
|
536
536
|
cloneNowHidden: function() {
|
|
@@ -549,18 +549,18 @@ var Xn = ["evt"], se = function(e, o) {
|
|
|
549
549
|
}, l));
|
|
550
550
|
};
|
|
551
551
|
function re(e) {
|
|
552
|
-
|
|
552
|
+
Xn(Ee({
|
|
553
553
|
putSortable: ne,
|
|
554
|
-
cloneEl:
|
|
555
|
-
targetEl:
|
|
556
|
-
rootEl:
|
|
554
|
+
cloneEl: J,
|
|
555
|
+
targetEl: h,
|
|
556
|
+
rootEl: Z,
|
|
557
557
|
oldIndex: Xe,
|
|
558
558
|
oldDraggableIndex: et,
|
|
559
559
|
newIndex: ue,
|
|
560
|
-
newDraggableIndex:
|
|
560
|
+
newDraggableIndex: De
|
|
561
561
|
}, e));
|
|
562
562
|
}
|
|
563
|
-
var
|
|
563
|
+
var h, Q, R, Z, We, gt, J, Fe, Xe, ue, et, De, ut, ne, Me = !1, Ct = !1, Et = [], Ae, he, Rt, Wt, mo, po, Ke, Be, tt, ot = !1, ct = !1, ht, ie, Nt = [], Mt = !1, Tt = [], Vt = typeof document < "u", mt = ko, fo = rt || xe ? "cssFloat" : "float", Yn = Vt && !xo && !ko && "draggable" in document.createElement("div"), Wo = function() {
|
|
564
564
|
if (Vt) {
|
|
565
565
|
if (xe)
|
|
566
566
|
return !1;
|
|
@@ -568,7 +568,7 @@ var g, Q, A, q, We, gt, Z, Fe, Xe, ue, et, Ie, ut, ne, Be = !1, Ct = !1, Et = []
|
|
|
568
568
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
569
569
|
}
|
|
570
570
|
}(), No = function(e, o) {
|
|
571
|
-
var t =
|
|
571
|
+
var t = D(e), n = parseInt(t.width) - parseInt(t.paddingLeft) - parseInt(t.paddingRight) - parseInt(t.borderLeftWidth) - parseInt(t.borderRightWidth), l = Ge(e, 0, o), a = Ge(e, 1, o), i = l && D(l), s = a && D(a), r = i && parseInt(i.marginLeft) + parseInt(i.marginRight) + oe(l).width, d = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + oe(a).width;
|
|
572
572
|
if (t.display === "flex")
|
|
573
573
|
return t.flexDirection === "column" || t.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
574
574
|
if (t.display === "grid")
|
|
@@ -578,10 +578,10 @@ var g, Q, A, q, We, gt, Z, Fe, Xe, ue, et, Ie, ut, ne, Be = !1, Ct = !1, Et = []
|
|
|
578
578
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
579
579
|
}
|
|
580
580
|
return l && (i.display === "block" || i.display === "flex" || i.display === "table" || i.display === "grid" || r >= n && t[fo] === "none" || a && t[fo] === "none" && r + d > n) ? "vertical" : "horizontal";
|
|
581
|
-
},
|
|
581
|
+
}, Gn = function(e, o, t) {
|
|
582
582
|
var n = t ? e.left : e.top, l = t ? e.right : e.bottom, a = t ? e.width : e.height, i = t ? o.left : o.top, s = t ? o.right : o.bottom, r = t ? o.width : o.height;
|
|
583
583
|
return n === i || l === s || n + a / 2 === i + r / 2;
|
|
584
|
-
},
|
|
584
|
+
}, Hn = function(e, o) {
|
|
585
585
|
var t;
|
|
586
586
|
return Et.some(function(n) {
|
|
587
587
|
var l = n[ce].options.emptyInsertThreshold;
|
|
@@ -603,8 +603,8 @@ var g, Q, A, q, We, gt, Z, Fe, Xe, ue, et, Ie, ut, ne, Be = !1, Ct = !1, Et = []
|
|
|
603
603
|
return l;
|
|
604
604
|
if (typeof l == "function")
|
|
605
605
|
return o(l(i, s, r, d), a)(i, s, r, d);
|
|
606
|
-
var
|
|
607
|
-
return l === !0 || typeof l == "string" && l ===
|
|
606
|
+
var m = (a ? i : s).options.group.name;
|
|
607
|
+
return l === !0 || typeof l == "string" && l === m || l.join && l.indexOf(m) > -1;
|
|
608
608
|
};
|
|
609
609
|
}
|
|
610
610
|
var t = {}, n = e.group;
|
|
@@ -612,18 +612,18 @@ var g, Q, A, q, We, gt, Z, Fe, Xe, ue, et, Ie, ut, ne, Be = !1, Ct = !1, Et = []
|
|
|
612
612
|
name: n
|
|
613
613
|
}), t.name = n.name, t.checkPull = o(n.pull, !0), t.checkPut = o(n.put), t.revertClone = n.revertClone, e.group = t;
|
|
614
614
|
}, Lo = function() {
|
|
615
|
-
!Wo &&
|
|
615
|
+
!Wo && R && D(R, "display", "none");
|
|
616
616
|
}, $o = function() {
|
|
617
|
-
!Wo &&
|
|
617
|
+
!Wo && R && D(R, "display", "");
|
|
618
618
|
};
|
|
619
619
|
Vt && !xo && document.addEventListener("click", function(e) {
|
|
620
620
|
if (Ct)
|
|
621
621
|
return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Ct = !1, !1;
|
|
622
622
|
}, !0);
|
|
623
|
-
var
|
|
624
|
-
if (
|
|
623
|
+
var Re = function(e) {
|
|
624
|
+
if (h) {
|
|
625
625
|
e = e.touches ? e.touches[0] : e;
|
|
626
|
-
var o =
|
|
626
|
+
var o = Hn(e.clientX, e.clientY);
|
|
627
627
|
if (o) {
|
|
628
628
|
var t = {};
|
|
629
629
|
for (var n in e)
|
|
@@ -631,10 +631,10 @@ var Ae = function(e) {
|
|
|
631
631
|
t.target = t.rootEl = o, t.preventDefault = void 0, t.stopPropagation = void 0, o[ce]._onDragOver(t);
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
|
-
},
|
|
635
|
-
|
|
634
|
+
}, jn = function(e) {
|
|
635
|
+
h && h.parentNode[ce]._isOutsideThisEl(e.target);
|
|
636
636
|
};
|
|
637
|
-
function
|
|
637
|
+
function F(e, o) {
|
|
638
638
|
if (!(e && e.nodeType && e.nodeType === 1))
|
|
639
639
|
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));
|
|
640
640
|
this.el = e, this.options = o = ke({}, o), e[ce] = this;
|
|
@@ -680,7 +680,7 @@ function O(e, o) {
|
|
|
680
680
|
x: 0,
|
|
681
681
|
y: 0
|
|
682
682
|
},
|
|
683
|
-
supportPointer:
|
|
683
|
+
supportPointer: F.supportPointer !== !1 && "PointerEvent" in window && !Je,
|
|
684
684
|
emptyInsertThreshold: 5
|
|
685
685
|
};
|
|
686
686
|
st.initializePlugins(this, e, t);
|
|
@@ -689,21 +689,21 @@ function O(e, o) {
|
|
|
689
689
|
Po(o);
|
|
690
690
|
for (var l in this)
|
|
691
691
|
l.charAt(0) === "_" && typeof this[l] == "function" && (this[l] = this[l].bind(this));
|
|
692
|
-
this.nativeDraggable = o.forceFallback ? !1 :
|
|
692
|
+
this.nativeDraggable = o.forceFallback ? !1 : Yn, this.nativeDraggable && (this.options.touchStartThreshold = 1), o.supportPointer ? X(e, "pointerdown", this._onTapStart) : (X(e, "mousedown", this._onTapStart), X(e, "touchstart", this._onTapStart)), this.nativeDraggable && (X(e, "dragover", this), X(e, "dragenter", this)), Et.push(this.el), o.store && o.store.get && this.sort(o.store.get(this) || []), ke(this, Bn());
|
|
693
693
|
}
|
|
694
|
-
|
|
694
|
+
F.prototype = /** @lends Sortable.prototype */
|
|
695
695
|
{
|
|
696
|
-
constructor:
|
|
696
|
+
constructor: F,
|
|
697
697
|
_isOutsideThisEl: function(e) {
|
|
698
|
-
!this.el.contains(e) && e !== this.el && (
|
|
698
|
+
!this.el.contains(e) && e !== this.el && (Be = null);
|
|
699
699
|
},
|
|
700
700
|
_getDirection: function(e, o) {
|
|
701
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, o,
|
|
701
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, o, h) : this.options.direction;
|
|
702
702
|
},
|
|
703
703
|
_onTapStart: function(e) {
|
|
704
704
|
if (e.cancelable) {
|
|
705
705
|
var o = this, t = this.el, n = this.options, l = n.preventOnFilter, a = e.type, i = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (i || e).target, r = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, d = n.filter;
|
|
706
|
-
if (
|
|
706
|
+
if (ol(t), !h && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || n.disabled) && !r.isContentEditable && !(!this.nativeDraggable && Je && s && s.tagName.toUpperCase() === "SELECT") && (s = ve(s, n.draggable, t, !1), !(s && s.animated) && gt !== s)) {
|
|
707
707
|
if (Xe = fe(s), et = fe(s, n.draggable), typeof d == "function") {
|
|
708
708
|
if (d.call(this, e, s, this)) {
|
|
709
709
|
re({
|
|
@@ -719,7 +719,7 @@ O.prototype = /** @lends Sortable.prototype */
|
|
|
719
719
|
return;
|
|
720
720
|
}
|
|
721
721
|
} else if (d && (d = d.split(",").some(function(u) {
|
|
722
|
-
if (u =
|
|
722
|
+
if (u = ve(r, u.trim(), t, !1), u)
|
|
723
723
|
return re({
|
|
724
724
|
sortable: o,
|
|
725
725
|
rootEl: u,
|
|
@@ -734,40 +734,40 @@ O.prototype = /** @lends Sortable.prototype */
|
|
|
734
734
|
l && e.cancelable && e.preventDefault();
|
|
735
735
|
return;
|
|
736
736
|
}
|
|
737
|
-
n.handle && !
|
|
737
|
+
n.handle && !ve(r, n.handle, t, !1) || this._prepareDragStart(e, i, s);
|
|
738
738
|
}
|
|
739
739
|
}
|
|
740
740
|
},
|
|
741
741
|
_prepareDragStart: function(e, o, t) {
|
|
742
742
|
var n = this, l = n.el, a = n.options, i = l.ownerDocument, s;
|
|
743
|
-
if (t && !
|
|
743
|
+
if (t && !h && t.parentNode === l) {
|
|
744
744
|
var r = oe(t);
|
|
745
|
-
if (
|
|
746
|
-
target:
|
|
745
|
+
if (Z = l, h = t, Q = h.parentNode, We = h.nextSibling, gt = t, ut = a.group, F.dragged = h, Ae = {
|
|
746
|
+
target: h,
|
|
747
747
|
clientX: (o || e).clientX,
|
|
748
748
|
clientY: (o || e).clientY
|
|
749
|
-
}, mo =
|
|
749
|
+
}, mo = Ae.clientX - r.left, po = Ae.clientY - r.top, this._lastX = (o || e).clientX, this._lastY = (o || e).clientY, h.style["will-change"] = "all", s = function() {
|
|
750
750
|
if (se("delayEnded", n, {
|
|
751
751
|
evt: e
|
|
752
|
-
}),
|
|
752
|
+
}), F.eventCanceled) {
|
|
753
753
|
n._onDrop();
|
|
754
754
|
return;
|
|
755
755
|
}
|
|
756
|
-
n._disableDelayedDragEvents(), !ro && n.nativeDraggable && (
|
|
756
|
+
n._disableDelayedDragEvents(), !ro && n.nativeDraggable && (h.draggable = !0), n._triggerDragStart(e, o), re({
|
|
757
757
|
sortable: n,
|
|
758
758
|
name: "choose",
|
|
759
759
|
originalEvent: e
|
|
760
|
-
}), de(
|
|
760
|
+
}), de(h, a.chosenClass, !0);
|
|
761
761
|
}, a.ignore.split(",").forEach(function(d) {
|
|
762
|
-
|
|
763
|
-
}),
|
|
762
|
+
Do(h, d.trim(), Pt);
|
|
763
|
+
}), X(i, "dragover", Re), X(i, "mousemove", Re), X(i, "touchmove", Re), X(i, "mouseup", n._onDrop), X(i, "touchend", n._onDrop), X(i, "touchcancel", n._onDrop), ro && this.nativeDraggable && (this.options.touchStartThreshold = 4, h.draggable = !0), se("delayStart", this, {
|
|
764
764
|
evt: e
|
|
765
765
|
}), a.delay && (!a.delayOnTouchOnly || o) && (!this.nativeDraggable || !(rt || xe))) {
|
|
766
|
-
if (
|
|
766
|
+
if (F.eventCanceled) {
|
|
767
767
|
this._onDrop();
|
|
768
768
|
return;
|
|
769
769
|
}
|
|
770
|
-
|
|
770
|
+
X(i, "mouseup", n._disableDelayedDrag), X(i, "touchend", n._disableDelayedDrag), X(i, "touchcancel", n._disableDelayedDrag), X(i, "mousemove", n._delayedDragTouchMoveHandler), X(i, "touchmove", n._delayedDragTouchMoveHandler), a.supportPointer && X(i, "pointermove", n._delayedDragTouchMoveHandler), n._dragStartTimer = setTimeout(s, a.delay);
|
|
771
771
|
} else
|
|
772
772
|
s();
|
|
773
773
|
}
|
|
@@ -777,28 +777,28 @@ O.prototype = /** @lends Sortable.prototype */
|
|
|
777
777
|
Math.max(Math.abs(o.clientX - this._lastX), Math.abs(o.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
778
778
|
},
|
|
779
779
|
_disableDelayedDrag: function() {
|
|
780
|
-
|
|
780
|
+
h && Pt(h), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
781
781
|
},
|
|
782
782
|
_disableDelayedDragEvents: function() {
|
|
783
783
|
var e = this.el.ownerDocument;
|
|
784
|
-
|
|
784
|
+
U(e, "mouseup", this._disableDelayedDrag), U(e, "touchend", this._disableDelayedDrag), U(e, "touchcancel", this._disableDelayedDrag), U(e, "mousemove", this._delayedDragTouchMoveHandler), U(e, "touchmove", this._delayedDragTouchMoveHandler), U(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
785
785
|
},
|
|
786
786
|
_triggerDragStart: function(e, o) {
|
|
787
|
-
o = o || e.pointerType == "touch" && e, !this.nativeDraggable || o ? this.options.supportPointer ?
|
|
787
|
+
o = o || e.pointerType == "touch" && e, !this.nativeDraggable || o ? this.options.supportPointer ? X(document, "pointermove", this._onTouchMove) : o ? X(document, "touchmove", this._onTouchMove) : X(document, "mousemove", this._onTouchMove) : (X(h, "dragend", this), X(Z, "dragstart", this._onDragStart));
|
|
788
788
|
try {
|
|
789
|
-
document.selection ?
|
|
789
|
+
document.selection ? vt(function() {
|
|
790
790
|
document.selection.empty();
|
|
791
791
|
}) : window.getSelection().removeAllRanges();
|
|
792
792
|
} catch {
|
|
793
793
|
}
|
|
794
794
|
},
|
|
795
795
|
_dragStarted: function(e, o) {
|
|
796
|
-
if (
|
|
796
|
+
if (Me = !1, Z && h) {
|
|
797
797
|
se("dragStarted", this, {
|
|
798
798
|
evt: o
|
|
799
|
-
}), this.nativeDraggable &&
|
|
799
|
+
}), this.nativeDraggable && X(document, "dragover", jn);
|
|
800
800
|
var t = this.options;
|
|
801
|
-
!e && de(
|
|
801
|
+
!e && de(h, t.dragClass, !1), de(h, t.ghostClass, !0), F.active = this, e && this._appendGhost(), re({
|
|
802
802
|
sortable: this,
|
|
803
803
|
name: "start",
|
|
804
804
|
originalEvent: o
|
|
@@ -807,17 +807,17 @@ O.prototype = /** @lends Sortable.prototype */
|
|
|
807
807
|
this._nulling();
|
|
808
808
|
},
|
|
809
809
|
_emulateDragOver: function() {
|
|
810
|
-
if (
|
|
811
|
-
this._lastX =
|
|
812
|
-
for (var e = document.elementFromPoint(
|
|
810
|
+
if (he) {
|
|
811
|
+
this._lastX = he.clientX, this._lastY = he.clientY, Lo();
|
|
812
|
+
for (var e = document.elementFromPoint(he.clientX, he.clientY), o = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(he.clientX, he.clientY), e !== o); )
|
|
813
813
|
o = e;
|
|
814
|
-
if (
|
|
814
|
+
if (h.parentNode[ce]._isOutsideThisEl(e), o)
|
|
815
815
|
do {
|
|
816
816
|
if (o[ce]) {
|
|
817
817
|
var t = void 0;
|
|
818
818
|
if (t = o[ce]._onDragOver({
|
|
819
|
-
clientX:
|
|
820
|
-
clientY:
|
|
819
|
+
clientX: he.clientX,
|
|
820
|
+
clientY: he.clientY,
|
|
821
821
|
target: e,
|
|
822
822
|
rootEl: o
|
|
823
823
|
}), t && !this.options.dragoverBubble)
|
|
@@ -829,15 +829,15 @@ O.prototype = /** @lends Sortable.prototype */
|
|
|
829
829
|
}
|
|
830
830
|
},
|
|
831
831
|
_onTouchMove: function(e) {
|
|
832
|
-
if (
|
|
833
|
-
var o = this.options, t = o.fallbackTolerance, n = o.fallbackOffset, l = e.touches ? e.touches[0] : e, a =
|
|
834
|
-
if (!
|
|
832
|
+
if (Ae) {
|
|
833
|
+
var o = this.options, t = o.fallbackTolerance, n = o.fallbackOffset, l = e.touches ? e.touches[0] : e, a = R && ze(R, !0), i = R && a && a.a, s = R && a && a.d, r = mt && ie && co(ie), d = (l.clientX - Ae.clientX + n.x) / (i || 1) + (r ? r[0] - Nt[0] : 0) / (i || 1), u = (l.clientY - Ae.clientY + n.y) / (s || 1) + (r ? r[1] - Nt[1] : 0) / (s || 1);
|
|
834
|
+
if (!F.active && !Me) {
|
|
835
835
|
if (t && Math.max(Math.abs(l.clientX - this._lastX), Math.abs(l.clientY - this._lastY)) < t)
|
|
836
836
|
return;
|
|
837
837
|
this._onDragStart(e, !0);
|
|
838
838
|
}
|
|
839
|
-
if (
|
|
840
|
-
a ? (a.e += d - (
|
|
839
|
+
if (R) {
|
|
840
|
+
a ? (a.e += d - (Rt || 0), a.f += u - (Wt || 0)) : a = {
|
|
841
841
|
a: 1,
|
|
842
842
|
b: 0,
|
|
843
843
|
c: 0,
|
|
@@ -845,45 +845,45 @@ O.prototype = /** @lends Sortable.prototype */
|
|
|
845
845
|
e: d,
|
|
846
846
|
f: u
|
|
847
847
|
};
|
|
848
|
-
var
|
|
849
|
-
|
|
848
|
+
var m = "matrix(".concat(a.a, ",").concat(a.b, ",").concat(a.c, ",").concat(a.d, ",").concat(a.e, ",").concat(a.f, ")");
|
|
849
|
+
D(R, "webkitTransform", m), D(R, "mozTransform", m), D(R, "msTransform", m), D(R, "transform", m), Rt = d, Wt = u, he = l;
|
|
850
850
|
}
|
|
851
851
|
e.cancelable && e.preventDefault();
|
|
852
852
|
}
|
|
853
853
|
},
|
|
854
854
|
_appendGhost: function() {
|
|
855
|
-
if (!
|
|
856
|
-
var e = this.options.fallbackOnBody ? document.body :
|
|
855
|
+
if (!R) {
|
|
856
|
+
var e = this.options.fallbackOnBody ? document.body : Z, o = oe(h, !0, mt, !0, e), t = this.options;
|
|
857
857
|
if (mt) {
|
|
858
|
-
for (ie = e;
|
|
858
|
+
for (ie = e; D(ie, "position") === "static" && D(ie, "transform") === "none" && ie !== document; )
|
|
859
859
|
ie = ie.parentNode;
|
|
860
|
-
ie !== document.body && ie !== document.documentElement ? (ie === document && (ie =
|
|
860
|
+
ie !== document.body && ie !== document.documentElement ? (ie === document && (ie = Ce()), o.top += ie.scrollTop, o.left += ie.scrollLeft) : ie = Ce(), Nt = co(ie);
|
|
861
861
|
}
|
|
862
|
-
|
|
862
|
+
R = h.cloneNode(!0), de(R, t.ghostClass, !1), de(R, t.fallbackClass, !0), de(R, t.dragClass, !0), D(R, "transition", ""), D(R, "transform", ""), D(R, "box-sizing", "border-box"), D(R, "margin", 0), D(R, "top", o.top), D(R, "left", o.left), D(R, "width", o.width), D(R, "height", o.height), D(R, "opacity", "0.8"), D(R, "position", mt ? "absolute" : "fixed"), D(R, "zIndex", "100000"), D(R, "pointerEvents", "none"), F.ghost = R, e.appendChild(R), D(R, "transform-origin", mo / parseInt(R.style.width) * 100 + "% " + po / parseInt(R.style.height) * 100 + "%");
|
|
863
863
|
}
|
|
864
864
|
},
|
|
865
865
|
_onDragStart: function(e, o) {
|
|
866
866
|
var t = this, n = e.dataTransfer, l = t.options;
|
|
867
867
|
if (se("dragStart", this, {
|
|
868
868
|
evt: e
|
|
869
|
-
}),
|
|
869
|
+
}), F.eventCanceled) {
|
|
870
870
|
this._onDrop();
|
|
871
871
|
return;
|
|
872
872
|
}
|
|
873
|
-
se("setupClone", this),
|
|
874
|
-
se("clone", t), !
|
|
873
|
+
se("setupClone", this), F.eventCanceled || (J = Ao(h), J.removeAttribute("id"), J.draggable = !1, J.style["will-change"] = "", this._hideClone(), de(J, this.options.chosenClass, !1), F.clone = J), t.cloneId = vt(function() {
|
|
874
|
+
se("clone", t), !F.eventCanceled && (t.options.removeCloneOnHide || Z.insertBefore(J, h), t._hideClone(), re({
|
|
875
875
|
sortable: t,
|
|
876
876
|
name: "clone"
|
|
877
877
|
}));
|
|
878
|
-
}), !o && de(
|
|
878
|
+
}), !o && de(h, l.dragClass, !0), o ? (Ct = !0, t._loopId = setInterval(t._emulateDragOver, 50)) : (U(document, "mouseup", t._onDrop), U(document, "touchend", t._onDrop), U(document, "touchcancel", t._onDrop), n && (n.effectAllowed = "move", l.setData && l.setData.call(t, n, h)), X(document, "drop", t), D(h, "transform", "translateZ(0)")), Me = !0, t._dragStartId = vt(t._dragStarted.bind(t, o, e)), X(document, "selectstart", t), Ke = !0, Je && D(document.body, "user-select", "none");
|
|
879
879
|
},
|
|
880
880
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
881
881
|
_onDragOver: function(e) {
|
|
882
|
-
var o = this.el, t = e.target, n, l, a, i = this.options, s = i.group, r =
|
|
882
|
+
var o = this.el, t = e.target, n, l, a, i = this.options, s = i.group, r = F.active, d = ut === s, u = i.sort, m = ne || r, p, f = this, O = !1;
|
|
883
883
|
if (Mt)
|
|
884
884
|
return;
|
|
885
|
-
function
|
|
886
|
-
se(le, f,
|
|
885
|
+
function C(le, Te) {
|
|
886
|
+
se(le, f, Ee({
|
|
887
887
|
evt: e,
|
|
888
888
|
isOwner: d,
|
|
889
889
|
axis: p ? "vertical" : "horizontal",
|
|
@@ -891,109 +891,109 @@ O.prototype = /** @lends Sortable.prototype */
|
|
|
891
891
|
dragRect: n,
|
|
892
892
|
targetRect: l,
|
|
893
893
|
canSort: u,
|
|
894
|
-
fromSortable:
|
|
894
|
+
fromSortable: m,
|
|
895
895
|
target: t,
|
|
896
|
-
completed:
|
|
897
|
-
onMove: function(
|
|
898
|
-
return pt(
|
|
896
|
+
completed: $,
|
|
897
|
+
onMove: function(I, M) {
|
|
898
|
+
return pt(Z, o, h, n, I, oe(I), e, M);
|
|
899
899
|
},
|
|
900
|
-
changed:
|
|
901
|
-
},
|
|
900
|
+
changed: q
|
|
901
|
+
}, Te));
|
|
902
902
|
}
|
|
903
|
-
function
|
|
904
|
-
|
|
903
|
+
function E() {
|
|
904
|
+
C("dragOverAnimationCapture"), f.captureAnimationState(), f !== m && m.captureAnimationState();
|
|
905
905
|
}
|
|
906
|
-
function
|
|
907
|
-
return
|
|
906
|
+
function $(le) {
|
|
907
|
+
return C("dragOverCompleted", {
|
|
908
908
|
insertion: le
|
|
909
|
-
}), le && (d ? r._hideClone() : r._showClone(f), f !==
|
|
910
|
-
|
|
911
|
-
}), f !==
|
|
909
|
+
}), le && (d ? r._hideClone() : r._showClone(f), f !== m && (de(h, ne ? ne.options.ghostClass : r.options.ghostClass, !1), de(h, i.ghostClass, !0)), ne !== f && f !== F.active ? ne = f : f === F.active && ne && (ne = null), m === f && (f._ignoreWhileAnimating = t), f.animateAll(function() {
|
|
910
|
+
C("dragOverAnimationComplete"), f._ignoreWhileAnimating = null;
|
|
911
|
+
}), f !== m && (m.animateAll(), m._ignoreWhileAnimating = null)), (t === h && !h.animated || t === o && !t.animated) && (Be = null), !i.dragoverBubble && !e.rootEl && t !== document && (h.parentNode[ce]._isOutsideThisEl(e.target), !le && Re(e)), !i.dragoverBubble && e.stopPropagation && e.stopPropagation(), O = !0;
|
|
912
912
|
}
|
|
913
|
-
function
|
|
914
|
-
ue = fe(
|
|
913
|
+
function q() {
|
|
914
|
+
ue = fe(h), De = fe(h, i.draggable), re({
|
|
915
915
|
sortable: f,
|
|
916
916
|
name: "change",
|
|
917
917
|
toEl: o,
|
|
918
918
|
newIndex: ue,
|
|
919
|
-
newDraggableIndex:
|
|
919
|
+
newDraggableIndex: De,
|
|
920
920
|
originalEvent: e
|
|
921
921
|
});
|
|
922
922
|
}
|
|
923
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), t =
|
|
924
|
-
return
|
|
925
|
-
if (
|
|
926
|
-
return
|
|
927
|
-
if (Ct = !1, r && !i.disabled && (d ? u || (a = Q !==
|
|
928
|
-
if (p = this._getDirection(e, t) === "vertical", n = oe(
|
|
929
|
-
return
|
|
923
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), t = ve(t, i.draggable, o, !0), C("dragOver"), F.eventCanceled)
|
|
924
|
+
return O;
|
|
925
|
+
if (h.contains(e.target) || t.animated && t.animatingX && t.animatingY || f._ignoreWhileAnimating === t)
|
|
926
|
+
return $(!1);
|
|
927
|
+
if (Ct = !1, r && !i.disabled && (d ? u || (a = Q !== Z) : ne === this || (this.lastPutMode = ut.checkPull(this, r, h, e)) && s.checkPut(this, r, h, e))) {
|
|
928
|
+
if (p = this._getDirection(e, t) === "vertical", n = oe(h), C("dragOverValid"), F.eventCanceled)
|
|
929
|
+
return O;
|
|
930
930
|
if (a)
|
|
931
|
-
return Q =
|
|
931
|
+
return Q = Z, E(), this._hideClone(), C("revert"), F.eventCanceled || (We ? Z.insertBefore(h, We) : Z.appendChild(h)), $(!0);
|
|
932
932
|
var B = Ht(o, i.draggable);
|
|
933
933
|
if (!B || Jn(e, p, this) && !B.animated) {
|
|
934
|
-
if (B ===
|
|
935
|
-
return
|
|
936
|
-
if (B && o === e.target && (t = B), t && (l = oe(t)), pt(
|
|
937
|
-
return
|
|
938
|
-
} else if (B &&
|
|
939
|
-
var
|
|
940
|
-
if (
|
|
941
|
-
return
|
|
942
|
-
if (t =
|
|
943
|
-
return
|
|
934
|
+
if (B === h)
|
|
935
|
+
return $(!1);
|
|
936
|
+
if (B && o === e.target && (t = B), t && (l = oe(t)), pt(Z, o, h, n, t, l, e, !!t) !== !1)
|
|
937
|
+
return E(), B && B.nextSibling ? o.insertBefore(h, B.nextSibling) : o.appendChild(h), Q = o, q(), $(!0);
|
|
938
|
+
} else if (B && Zn(e, p, this)) {
|
|
939
|
+
var Y = Ge(o, 0, i, !0);
|
|
940
|
+
if (Y === h)
|
|
941
|
+
return $(!1);
|
|
942
|
+
if (t = Y, l = oe(t), pt(Z, o, h, n, t, l, e, !1) !== !1)
|
|
943
|
+
return E(), o.insertBefore(h, Y), Q = o, q(), $(!0);
|
|
944
944
|
} else if (t.parentNode === o) {
|
|
945
945
|
l = oe(t);
|
|
946
|
-
var
|
|
947
|
-
|
|
948
|
-
var
|
|
949
|
-
if (
|
|
950
|
-
var
|
|
946
|
+
var z = 0, L, v = h.parentNode !== o, g = !Gn(h.animated && h.toRect || n, t.animated && t.toRect || l, p), _ = p ? "top" : "left", c = uo(t, "top", "top") || uo(h, "top", "top"), w = c ? c.scrollTop : void 0;
|
|
947
|
+
Be !== t && (L = l[_], ot = !1, ct = !g && i.invertSwap || v), z = Qn(e, t, l, p, g ? 1 : i.swapThreshold, i.invertedSwapThreshold == null ? i.swapThreshold : i.invertedSwapThreshold, ct, Be === t);
|
|
948
|
+
var T;
|
|
949
|
+
if (z !== 0) {
|
|
950
|
+
var V = fe(h);
|
|
951
951
|
do
|
|
952
|
-
|
|
953
|
-
while (
|
|
952
|
+
V -= z, T = Q.children[V];
|
|
953
|
+
while (T && (D(T, "display") === "none" || T === R));
|
|
954
954
|
}
|
|
955
|
-
if (
|
|
956
|
-
return
|
|
957
|
-
|
|
958
|
-
var
|
|
959
|
-
|
|
960
|
-
var G = pt(
|
|
955
|
+
if (z === 0 || T === t)
|
|
956
|
+
return $(!1);
|
|
957
|
+
Be = t, tt = z;
|
|
958
|
+
var y = t.nextElementSibling, N = !1;
|
|
959
|
+
N = z === 1;
|
|
960
|
+
var G = pt(Z, o, h, n, t, l, e, N);
|
|
961
961
|
if (G !== !1)
|
|
962
|
-
return (G === 1 || G === -1) && (
|
|
962
|
+
return (G === 1 || G === -1) && (N = G === 1), Mt = !0, setTimeout(qn, 30), E(), N && !y ? o.appendChild(h) : t.parentNode.insertBefore(h, N ? y : t), c && Oo(c, 0, w - c.scrollTop), Q = h.parentNode, L !== void 0 && !ct && (ht = Math.abs(L - oe(t)[_])), q(), $(!0);
|
|
963
963
|
}
|
|
964
|
-
if (o.contains(
|
|
965
|
-
return
|
|
964
|
+
if (o.contains(h))
|
|
965
|
+
return $(!1);
|
|
966
966
|
}
|
|
967
967
|
return !1;
|
|
968
968
|
},
|
|
969
969
|
_ignoreWhileAnimating: null,
|
|
970
970
|
_offMoveEvents: function() {
|
|
971
|
-
|
|
971
|
+
U(document, "mousemove", this._onTouchMove), U(document, "touchmove", this._onTouchMove), U(document, "pointermove", this._onTouchMove), U(document, "dragover", Re), U(document, "mousemove", Re), U(document, "touchmove", Re);
|
|
972
972
|
},
|
|
973
973
|
_offUpEvents: function() {
|
|
974
974
|
var e = this.el.ownerDocument;
|
|
975
|
-
|
|
975
|
+
U(e, "mouseup", this._onDrop), U(e, "touchend", this._onDrop), U(e, "pointerup", this._onDrop), U(e, "touchcancel", this._onDrop), U(document, "selectstart", this);
|
|
976
976
|
},
|
|
977
977
|
_onDrop: function(e) {
|
|
978
978
|
var o = this.el, t = this.options;
|
|
979
|
-
if (ue = fe(
|
|
979
|
+
if (ue = fe(h), De = fe(h, t.draggable), se("drop", this, {
|
|
980
980
|
evt: e
|
|
981
|
-
}), Q =
|
|
981
|
+
}), Q = h && h.parentNode, ue = fe(h), De = fe(h, t.draggable), F.eventCanceled) {
|
|
982
982
|
this._nulling();
|
|
983
983
|
return;
|
|
984
984
|
}
|
|
985
|
-
|
|
985
|
+
Me = !1, ct = !1, ot = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Ut(this.cloneId), Ut(this._dragStartId), this.nativeDraggable && (U(document, "drop", this), U(o, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Je && D(document.body, "user-select", ""), D(h, "transform", ""), e && (Ke && (e.cancelable && e.preventDefault(), !t.dropBubble && e.stopPropagation()), R && R.parentNode && R.parentNode.removeChild(R), (Z === Q || ne && ne.lastPutMode !== "clone") && J && J.parentNode && J.parentNode.removeChild(J), h && (this.nativeDraggable && U(h, "dragend", this), Pt(h), h.style["will-change"] = "", Ke && !Me && de(h, ne ? ne.options.ghostClass : this.options.ghostClass, !1), de(h, this.options.chosenClass, !1), re({
|
|
986
986
|
sortable: this,
|
|
987
987
|
name: "unchoose",
|
|
988
988
|
toEl: Q,
|
|
989
989
|
newIndex: null,
|
|
990
990
|
newDraggableIndex: null,
|
|
991
991
|
originalEvent: e
|
|
992
|
-
}),
|
|
992
|
+
}), Z !== Q ? (ue >= 0 && (re({
|
|
993
993
|
rootEl: Q,
|
|
994
994
|
name: "add",
|
|
995
995
|
toEl: Q,
|
|
996
|
-
fromEl:
|
|
996
|
+
fromEl: Z,
|
|
997
997
|
originalEvent: e
|
|
998
998
|
}), re({
|
|
999
999
|
sortable: this,
|
|
@@ -1004,7 +1004,7 @@ O.prototype = /** @lends Sortable.prototype */
|
|
|
1004
1004
|
rootEl: Q,
|
|
1005
1005
|
name: "sort",
|
|
1006
1006
|
toEl: Q,
|
|
1007
|
-
fromEl:
|
|
1007
|
+
fromEl: Z,
|
|
1008
1008
|
originalEvent: e
|
|
1009
1009
|
}), re({
|
|
1010
1010
|
sortable: this,
|
|
@@ -1021,7 +1021,7 @@ O.prototype = /** @lends Sortable.prototype */
|
|
|
1021
1021
|
name: "sort",
|
|
1022
1022
|
toEl: Q,
|
|
1023
1023
|
originalEvent: e
|
|
1024
|
-
})),
|
|
1024
|
+
})), F.active && ((ue == null || ue === -1) && (ue = Xe, De = et), re({
|
|
1025
1025
|
sortable: this,
|
|
1026
1026
|
name: "end",
|
|
1027
1027
|
toEl: Q,
|
|
@@ -1029,9 +1029,9 @@ O.prototype = /** @lends Sortable.prototype */
|
|
|
1029
1029
|
}), this.save()))), this._nulling();
|
|
1030
1030
|
},
|
|
1031
1031
|
_nulling: function() {
|
|
1032
|
-
se("nulling", this),
|
|
1032
|
+
se("nulling", this), Z = h = Q = R = We = J = gt = Fe = Ae = he = Ke = ue = De = Xe = et = Be = tt = ne = ut = F.dragged = F.ghost = F.clone = F.active = null, Tt.forEach(function(e) {
|
|
1033
1033
|
e.checked = !0;
|
|
1034
|
-
}), Tt.length =
|
|
1034
|
+
}), Tt.length = Rt = Wt = 0;
|
|
1035
1035
|
},
|
|
1036
1036
|
handleEvent: function(e) {
|
|
1037
1037
|
switch (e.type) {
|
|
@@ -1041,7 +1041,7 @@ O.prototype = /** @lends Sortable.prototype */
|
|
|
1041
1041
|
break;
|
|
1042
1042
|
case "dragenter":
|
|
1043
1043
|
case "dragover":
|
|
1044
|
-
|
|
1044
|
+
h && (this._onDragOver(e), Kn(e));
|
|
1045
1045
|
break;
|
|
1046
1046
|
case "selectstart":
|
|
1047
1047
|
e.preventDefault();
|
|
@@ -1054,7 +1054,7 @@ O.prototype = /** @lends Sortable.prototype */
|
|
|
1054
1054
|
*/
|
|
1055
1055
|
toArray: function() {
|
|
1056
1056
|
for (var e = [], o, t = this.el.children, n = 0, l = t.length, a = this.options; n < l; n++)
|
|
1057
|
-
o = t[n],
|
|
1057
|
+
o = t[n], ve(o, a.draggable, this.el, !1) && e.push(o.getAttribute(a.dataIdAttr) || tl(o));
|
|
1058
1058
|
return e;
|
|
1059
1059
|
},
|
|
1060
1060
|
/**
|
|
@@ -1065,7 +1065,7 @@ O.prototype = /** @lends Sortable.prototype */
|
|
|
1065
1065
|
var t = {}, n = this.el;
|
|
1066
1066
|
this.toArray().forEach(function(l, a) {
|
|
1067
1067
|
var i = n.children[a];
|
|
1068
|
-
|
|
1068
|
+
ve(i, this.options.draggable, n, !1) && (t[l] = i);
|
|
1069
1069
|
}, this), o && this.captureAnimationState(), e.forEach(function(l) {
|
|
1070
1070
|
t[l] && (n.removeChild(t[l]), n.appendChild(t[l]));
|
|
1071
1071
|
}), o && this.animateAll();
|
|
@@ -1084,7 +1084,7 @@ O.prototype = /** @lends Sortable.prototype */
|
|
|
1084
1084
|
* @returns {HTMLElement|null}
|
|
1085
1085
|
*/
|
|
1086
1086
|
closest: function(e, o) {
|
|
1087
|
-
return
|
|
1087
|
+
return ve(e, o || this.options.draggable, this.el, !1);
|
|
1088
1088
|
},
|
|
1089
1089
|
/**
|
|
1090
1090
|
* Set/get option
|
|
@@ -1105,15 +1105,15 @@ O.prototype = /** @lends Sortable.prototype */
|
|
|
1105
1105
|
destroy: function() {
|
|
1106
1106
|
se("destroy", this);
|
|
1107
1107
|
var e = this.el;
|
|
1108
|
-
e[ce] = null,
|
|
1108
|
+
e[ce] = null, U(e, "mousedown", this._onTapStart), U(e, "touchstart", this._onTapStart), U(e, "pointerdown", this._onTapStart), this.nativeDraggable && (U(e, "dragover", this), U(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(o) {
|
|
1109
1109
|
o.removeAttribute("draggable");
|
|
1110
1110
|
}), this._onDrop(), this._disableDelayedDragEvents(), Et.splice(Et.indexOf(this.el), 1), this.el = e = null;
|
|
1111
1111
|
},
|
|
1112
1112
|
_hideClone: function() {
|
|
1113
1113
|
if (!Fe) {
|
|
1114
|
-
if (se("hideClone", this),
|
|
1114
|
+
if (se("hideClone", this), F.eventCanceled)
|
|
1115
1115
|
return;
|
|
1116
|
-
|
|
1116
|
+
D(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J), Fe = !0;
|
|
1117
1117
|
}
|
|
1118
1118
|
},
|
|
1119
1119
|
_showClone: function(e) {
|
|
@@ -1122,110 +1122,110 @@ O.prototype = /** @lends Sortable.prototype */
|
|
|
1122
1122
|
return;
|
|
1123
1123
|
}
|
|
1124
1124
|
if (Fe) {
|
|
1125
|
-
if (se("showClone", this),
|
|
1125
|
+
if (se("showClone", this), F.eventCanceled)
|
|
1126
1126
|
return;
|
|
1127
|
-
|
|
1127
|
+
h.parentNode == Z && !this.options.group.revertClone ? Z.insertBefore(J, h) : We ? Z.insertBefore(J, We) : Z.appendChild(J), this.options.group.revertClone && this.animate(h, J), D(J, "display", ""), Fe = !1;
|
|
1128
1128
|
}
|
|
1129
1129
|
}
|
|
1130
1130
|
};
|
|
1131
|
-
function
|
|
1131
|
+
function Kn(e) {
|
|
1132
1132
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
1133
1133
|
}
|
|
1134
1134
|
function pt(e, o, t, n, l, a, i, s) {
|
|
1135
|
-
var r, d = e[ce], u = d.options.onMove,
|
|
1135
|
+
var r, d = e[ce], u = d.options.onMove, m;
|
|
1136
1136
|
return window.CustomEvent && !xe && !rt ? r = new CustomEvent("move", {
|
|
1137
1137
|
bubbles: !0,
|
|
1138
1138
|
cancelable: !0
|
|
1139
|
-
}) : (r = document.createEvent("Event"), r.initEvent("move", !0, !0)), r.to = o, r.from = e, r.dragged = t, r.draggedRect = n, r.related = l || o, r.relatedRect = a || oe(o), r.willInsertAfter = s, r.originalEvent = i, e.dispatchEvent(r), u && (
|
|
1139
|
+
}) : (r = document.createEvent("Event"), r.initEvent("move", !0, !0)), r.to = o, r.from = e, r.dragged = t, r.draggedRect = n, r.related = l || o, r.relatedRect = a || oe(o), r.willInsertAfter = s, r.originalEvent = i, e.dispatchEvent(r), u && (m = u.call(d, r, i)), m;
|
|
1140
1140
|
}
|
|
1141
1141
|
function Pt(e) {
|
|
1142
1142
|
e.draggable = !1;
|
|
1143
1143
|
}
|
|
1144
|
-
function
|
|
1144
|
+
function qn() {
|
|
1145
1145
|
Mt = !1;
|
|
1146
1146
|
}
|
|
1147
|
-
function
|
|
1148
|
-
var n = oe(Ge(t.el, 0, t.options, !0)), l =
|
|
1147
|
+
function Zn(e, o, t) {
|
|
1148
|
+
var n = oe(Ge(t.el, 0, t.options, !0)), l = Ro(t.el, t.options, R), a = 10;
|
|
1149
1149
|
return o ? e.clientX < l.left - a || e.clientY < n.top && e.clientX < n.right : e.clientY < l.top - a || e.clientY < n.bottom && e.clientX < n.left;
|
|
1150
1150
|
}
|
|
1151
1151
|
function Jn(e, o, t) {
|
|
1152
|
-
var n = oe(Ht(t.el, t.options.draggable)), l =
|
|
1152
|
+
var n = oe(Ht(t.el, t.options.draggable)), l = Ro(t.el, t.options, R), a = 10;
|
|
1153
1153
|
return o ? e.clientX > l.right + a || e.clientY > n.bottom && e.clientX > n.left : e.clientY > l.bottom + a || e.clientX > n.right && e.clientY > n.top;
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1156
|
-
var r = n ? e.clientY : e.clientX, d = n ? t.height : t.width, u = n ? t.top : t.left,
|
|
1155
|
+
function Qn(e, o, t, n, l, a, i, s) {
|
|
1156
|
+
var r = n ? e.clientY : e.clientX, d = n ? t.height : t.width, u = n ? t.top : t.left, m = n ? t.bottom : t.right, p = !1;
|
|
1157
1157
|
if (!i) {
|
|
1158
|
-
if (s &&
|
|
1159
|
-
if (!ot && (tt === 1 ? r > u + d * a / 2 : r <
|
|
1158
|
+
if (s && ht < d * l) {
|
|
1159
|
+
if (!ot && (tt === 1 ? r > u + d * a / 2 : r < m - d * a / 2) && (ot = !0), ot)
|
|
1160
1160
|
p = !0;
|
|
1161
|
-
else if (tt === 1 ? r < u +
|
|
1161
|
+
else if (tt === 1 ? r < u + ht : r > m - ht)
|
|
1162
1162
|
return -tt;
|
|
1163
|
-
} else if (r > u + d * (1 - l) / 2 && r <
|
|
1164
|
-
return
|
|
1163
|
+
} else if (r > u + d * (1 - l) / 2 && r < m - d * (1 - l) / 2)
|
|
1164
|
+
return el(o);
|
|
1165
1165
|
}
|
|
1166
|
-
return p = p || i, p && (r < u + d * a / 2 || r >
|
|
1167
|
-
}
|
|
1168
|
-
function Qn(e) {
|
|
1169
|
-
return fe(g) < fe(e) ? 1 : -1;
|
|
1166
|
+
return p = p || i, p && (r < u + d * a / 2 || r > m - d * a / 2) ? r > u + d / 2 ? 1 : -1 : 0;
|
|
1170
1167
|
}
|
|
1171
1168
|
function el(e) {
|
|
1169
|
+
return fe(h) < fe(e) ? 1 : -1;
|
|
1170
|
+
}
|
|
1171
|
+
function tl(e) {
|
|
1172
1172
|
for (var o = e.tagName + e.className + e.src + e.href + e.textContent, t = o.length, n = 0; t--; )
|
|
1173
1173
|
n += o.charCodeAt(t);
|
|
1174
1174
|
return n.toString(36);
|
|
1175
1175
|
}
|
|
1176
|
-
function
|
|
1176
|
+
function ol(e) {
|
|
1177
1177
|
Tt.length = 0;
|
|
1178
1178
|
for (var o = e.getElementsByTagName("input"), t = o.length; t--; ) {
|
|
1179
1179
|
var n = o[t];
|
|
1180
1180
|
n.checked && Tt.push(n);
|
|
1181
1181
|
}
|
|
1182
1182
|
}
|
|
1183
|
-
function
|
|
1183
|
+
function vt(e) {
|
|
1184
1184
|
return setTimeout(e, 0);
|
|
1185
1185
|
}
|
|
1186
1186
|
function Ut(e) {
|
|
1187
1187
|
return clearTimeout(e);
|
|
1188
1188
|
}
|
|
1189
|
-
Vt &&
|
|
1190
|
-
(
|
|
1189
|
+
Vt && X(document, "touchmove", function(e) {
|
|
1190
|
+
(F.active || Me) && e.cancelable && e.preventDefault();
|
|
1191
1191
|
});
|
|
1192
|
-
|
|
1193
|
-
on:
|
|
1194
|
-
off:
|
|
1195
|
-
css:
|
|
1196
|
-
find:
|
|
1192
|
+
F.utils = {
|
|
1193
|
+
on: X,
|
|
1194
|
+
off: U,
|
|
1195
|
+
css: D,
|
|
1196
|
+
find: Do,
|
|
1197
1197
|
is: function(e, o) {
|
|
1198
|
-
return !!
|
|
1198
|
+
return !!ve(e, o, e, !1);
|
|
1199
1199
|
},
|
|
1200
|
-
extend:
|
|
1200
|
+
extend: Ln,
|
|
1201
1201
|
throttle: Fo,
|
|
1202
|
-
closest:
|
|
1202
|
+
closest: ve,
|
|
1203
1203
|
toggleClass: de,
|
|
1204
|
-
clone:
|
|
1204
|
+
clone: Ao,
|
|
1205
1205
|
index: fe,
|
|
1206
|
-
nextTick:
|
|
1206
|
+
nextTick: vt,
|
|
1207
1207
|
cancelNextTick: Ut,
|
|
1208
1208
|
detectDirection: No,
|
|
1209
1209
|
getChild: Ge
|
|
1210
1210
|
};
|
|
1211
|
-
|
|
1211
|
+
F.get = function(e) {
|
|
1212
1212
|
return e[ce];
|
|
1213
1213
|
};
|
|
1214
|
-
|
|
1214
|
+
F.mount = function() {
|
|
1215
1215
|
for (var e = arguments.length, o = new Array(e), t = 0; t < e; t++)
|
|
1216
1216
|
o[t] = arguments[t];
|
|
1217
1217
|
o[0].constructor === Array && (o = o[0]), o.forEach(function(n) {
|
|
1218
1218
|
if (!n.prototype || !n.prototype.constructor)
|
|
1219
1219
|
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));
|
|
1220
|
-
n.utils && (
|
|
1220
|
+
n.utils && (F.utils = Ee(Ee({}, F.utils), n.utils)), st.mount(n);
|
|
1221
1221
|
});
|
|
1222
1222
|
};
|
|
1223
|
-
|
|
1224
|
-
return new
|
|
1223
|
+
F.create = function(e, o) {
|
|
1224
|
+
return new F(e, o);
|
|
1225
1225
|
};
|
|
1226
|
-
|
|
1227
|
-
var te = [], qe, Xt, zt = !1, Lt, $t, wt,
|
|
1228
|
-
function
|
|
1226
|
+
F.version = Wn;
|
|
1227
|
+
var te = [], qe, Xt, zt = !1, Lt, $t, wt, Ze;
|
|
1228
|
+
function nl() {
|
|
1229
1229
|
function e() {
|
|
1230
1230
|
this.defaults = {
|
|
1231
1231
|
scroll: !0,
|
|
@@ -1240,32 +1240,32 @@ function ol() {
|
|
|
1240
1240
|
return e.prototype = {
|
|
1241
1241
|
dragStarted: function(o) {
|
|
1242
1242
|
var t = o.originalEvent;
|
|
1243
|
-
this.sortable.nativeDraggable ?
|
|
1243
|
+
this.sortable.nativeDraggable ? X(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? X(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? X(document, "touchmove", this._handleFallbackAutoScroll) : X(document, "mousemove", this._handleFallbackAutoScroll);
|
|
1244
1244
|
},
|
|
1245
1245
|
dragOverCompleted: function(o) {
|
|
1246
1246
|
var t = o.originalEvent;
|
|
1247
1247
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
1248
1248
|
},
|
|
1249
1249
|
drop: function() {
|
|
1250
|
-
this.sortable.nativeDraggable ?
|
|
1250
|
+
this.sortable.nativeDraggable ? U(document, "dragover", this._handleAutoScroll) : (U(document, "pointermove", this._handleFallbackAutoScroll), U(document, "touchmove", this._handleFallbackAutoScroll), U(document, "mousemove", this._handleFallbackAutoScroll)), go(), bt(), $n();
|
|
1251
1251
|
},
|
|
1252
1252
|
nulling: function() {
|
|
1253
|
-
wt = Xt = qe = zt =
|
|
1253
|
+
wt = Xt = qe = zt = Ze = Lt = $t = null, te.length = 0;
|
|
1254
1254
|
},
|
|
1255
1255
|
_handleFallbackAutoScroll: function(o) {
|
|
1256
1256
|
this._handleAutoScroll(o, !0);
|
|
1257
1257
|
},
|
|
1258
1258
|
_handleAutoScroll: function(o, t) {
|
|
1259
1259
|
var n = this, l = (o.touches ? o.touches[0] : o).clientX, a = (o.touches ? o.touches[0] : o).clientY, i = document.elementFromPoint(l, a);
|
|
1260
|
-
if (wt = o, t || this.options.forceAutoScrollFallback || rt || xe ||
|
|
1260
|
+
if (wt = o, t || this.options.forceAutoScrollFallback || rt || xe || Je) {
|
|
1261
1261
|
Bt(o, this.options, i, t);
|
|
1262
1262
|
var s = Oe(i, !0);
|
|
1263
|
-
zt && (!
|
|
1263
|
+
zt && (!Ze || l !== Lt || a !== $t) && (Ze && go(), Ze = setInterval(function() {
|
|
1264
1264
|
var r = Oe(document.elementFromPoint(l, a), !0);
|
|
1265
1265
|
r !== s && (s = r, bt()), Bt(o, n.options, r, t);
|
|
1266
1266
|
}, 10), Lt = l, $t = a);
|
|
1267
1267
|
} else {
|
|
1268
|
-
if (!this.options.bubbleScroll || Oe(i, !0) ===
|
|
1268
|
+
if (!this.options.bubbleScroll || Oe(i, !0) === Ce()) {
|
|
1269
1269
|
bt();
|
|
1270
1270
|
return;
|
|
1271
1271
|
}
|
|
@@ -1283,27 +1283,27 @@ function bt() {
|
|
|
1283
1283
|
}), te = [];
|
|
1284
1284
|
}
|
|
1285
1285
|
function go() {
|
|
1286
|
-
clearInterval(
|
|
1286
|
+
clearInterval(Ze);
|
|
1287
1287
|
}
|
|
1288
1288
|
var Bt = Fo(function(e, o, t, n) {
|
|
1289
1289
|
if (o.scroll) {
|
|
1290
|
-
var l = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, i = o.scrollSensitivity, s = o.scrollSpeed, r =
|
|
1290
|
+
var l = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, i = o.scrollSensitivity, s = o.scrollSpeed, r = Ce(), d = !1, u;
|
|
1291
1291
|
Xt !== t && (Xt = t, bt(), qe = o.scroll, u = o.scrollFn, qe === !0 && (qe = Oe(t, !0)));
|
|
1292
|
-
var
|
|
1292
|
+
var m = 0, p = qe;
|
|
1293
1293
|
do {
|
|
1294
|
-
var f = p,
|
|
1295
|
-
f === r ? (
|
|
1296
|
-
var
|
|
1297
|
-
if (!te[
|
|
1298
|
-
for (var
|
|
1299
|
-
te[
|
|
1300
|
-
(te[
|
|
1301
|
-
n && this.layer === 0 &&
|
|
1302
|
-
var
|
|
1303
|
-
typeof u == "function" && u.call(
|
|
1294
|
+
var f = p, O = oe(f), C = O.top, E = O.bottom, $ = O.left, q = O.right, B = O.width, Y = O.height, z = void 0, L = void 0, v = f.scrollWidth, g = f.scrollHeight, _ = D(f), c = f.scrollLeft, w = f.scrollTop;
|
|
1295
|
+
f === r ? (z = B < v && (_.overflowX === "auto" || _.overflowX === "scroll" || _.overflowX === "visible"), L = Y < g && (_.overflowY === "auto" || _.overflowY === "scroll" || _.overflowY === "visible")) : (z = B < v && (_.overflowX === "auto" || _.overflowX === "scroll"), L = Y < g && (_.overflowY === "auto" || _.overflowY === "scroll"));
|
|
1296
|
+
var T = z && (Math.abs(q - l) <= i && c + B < v) - (Math.abs($ - l) <= i && !!c), V = L && (Math.abs(E - a) <= i && w + Y < g) - (Math.abs(C - a) <= i && !!w);
|
|
1297
|
+
if (!te[m])
|
|
1298
|
+
for (var y = 0; y <= m; y++)
|
|
1299
|
+
te[y] || (te[y] = {});
|
|
1300
|
+
(te[m].vx != T || te[m].vy != V || te[m].el !== f) && (te[m].el = f, te[m].vx = T, te[m].vy = V, clearInterval(te[m].pid), (T != 0 || V != 0) && (d = !0, te[m].pid = setInterval((function() {
|
|
1301
|
+
n && this.layer === 0 && F.active._onTouchMove(wt);
|
|
1302
|
+
var N = te[this.layer].vy ? te[this.layer].vy * s : 0, G = te[this.layer].vx ? te[this.layer].vx * s : 0;
|
|
1303
|
+
typeof u == "function" && u.call(F.dragged.parentNode[ce], G, N, e, wt, te[this.layer].el) !== "continue" || Oo(te[this.layer].el, G, N);
|
|
1304
1304
|
}).bind({
|
|
1305
|
-
layer:
|
|
1306
|
-
}), 24))),
|
|
1305
|
+
layer: m
|
|
1306
|
+
}), 24))), m++;
|
|
1307
1307
|
} while (o.bubbleScroll && p !== r && (p = Oe(p, !1)));
|
|
1308
1308
|
zt = d;
|
|
1309
1309
|
}
|
|
@@ -1350,161 +1350,161 @@ Kt.prototype = {
|
|
|
1350
1350
|
ke(Kt, {
|
|
1351
1351
|
pluginName: "removeOnSpill"
|
|
1352
1352
|
});
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
function
|
|
1353
|
+
F.mount(new nl());
|
|
1354
|
+
F.mount(Kt, jt);
|
|
1355
|
+
function ll(e) {
|
|
1356
1356
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
1357
1357
|
}
|
|
1358
|
-
function
|
|
1358
|
+
function il(e) {
|
|
1359
1359
|
Gt() && Ko(e);
|
|
1360
1360
|
}
|
|
1361
|
-
function
|
|
1361
|
+
function al(e) {
|
|
1362
1362
|
Gt() ? bo(e) : yo(e);
|
|
1363
1363
|
}
|
|
1364
1364
|
let Mo = null, Uo = null;
|
|
1365
|
-
function
|
|
1365
|
+
function ho(e = null, o = null) {
|
|
1366
1366
|
Mo = e, Uo = o;
|
|
1367
1367
|
}
|
|
1368
|
-
function
|
|
1368
|
+
function rl() {
|
|
1369
1369
|
return {
|
|
1370
1370
|
data: Mo,
|
|
1371
1371
|
clonedData: Uo
|
|
1372
1372
|
};
|
|
1373
1373
|
}
|
|
1374
|
-
const
|
|
1375
|
-
function
|
|
1374
|
+
const vo = Symbol("cloneElement");
|
|
1375
|
+
function sl(...e) {
|
|
1376
1376
|
var o, t;
|
|
1377
1377
|
const n = (o = Gt()) == null ? void 0 : o.proxy;
|
|
1378
1378
|
let l = null;
|
|
1379
1379
|
const a = e[0];
|
|
1380
1380
|
let [, i, s] = e;
|
|
1381
|
-
Array.isArray(
|
|
1381
|
+
Array.isArray(b(i)) || (s = i, i = null);
|
|
1382
1382
|
let r = null;
|
|
1383
1383
|
const {
|
|
1384
1384
|
immediate: d = !0,
|
|
1385
|
-
clone: u =
|
|
1386
|
-
customUpdate:
|
|
1387
|
-
} = (t =
|
|
1388
|
-
function p(
|
|
1385
|
+
clone: u = ll,
|
|
1386
|
+
customUpdate: m
|
|
1387
|
+
} = (t = b(s)) != null ? t : {};
|
|
1388
|
+
function p(g) {
|
|
1389
1389
|
var _;
|
|
1390
|
-
const { from:
|
|
1391
|
-
l = Array.from(
|
|
1392
|
-
const
|
|
1393
|
-
|
|
1390
|
+
const { from: c, oldIndex: w, item: T } = g;
|
|
1391
|
+
l = Array.from(c.childNodes);
|
|
1392
|
+
const V = b((_ = b(i)) == null ? void 0 : _[w]), y = u(V);
|
|
1393
|
+
ho(V, y), T[vo] = y;
|
|
1394
1394
|
}
|
|
1395
|
-
function f(
|
|
1396
|
-
const _ =
|
|
1397
|
-
if (!
|
|
1398
|
-
if (Ft(
|
|
1399
|
-
const
|
|
1400
|
-
i.value = no(
|
|
1395
|
+
function f(g) {
|
|
1396
|
+
const _ = g.item[vo];
|
|
1397
|
+
if (!wn(_)) {
|
|
1398
|
+
if (Ft(g.item), Dt(i)) {
|
|
1399
|
+
const c = [...b(i)];
|
|
1400
|
+
i.value = no(c, g.newDraggableIndex, _);
|
|
1401
1401
|
return;
|
|
1402
1402
|
}
|
|
1403
|
-
no(
|
|
1403
|
+
no(b(i), g.newDraggableIndex, _);
|
|
1404
1404
|
}
|
|
1405
1405
|
}
|
|
1406
|
-
function
|
|
1407
|
-
const { from: _, item:
|
|
1408
|
-
if (lo(_,
|
|
1409
|
-
Ft(
|
|
1406
|
+
function O(g) {
|
|
1407
|
+
const { from: _, item: c, oldIndex: w, oldDraggableIndex: T, pullMode: V, clone: y } = g;
|
|
1408
|
+
if (lo(_, c, w), V === "clone") {
|
|
1409
|
+
Ft(y);
|
|
1410
1410
|
return;
|
|
1411
1411
|
}
|
|
1412
|
-
if (
|
|
1413
|
-
const
|
|
1414
|
-
i.value = oo(
|
|
1412
|
+
if (Dt(i)) {
|
|
1413
|
+
const N = [...b(i)];
|
|
1414
|
+
i.value = oo(N, T);
|
|
1415
1415
|
return;
|
|
1416
1416
|
}
|
|
1417
|
-
oo(
|
|
1417
|
+
oo(b(i), T);
|
|
1418
1418
|
}
|
|
1419
|
-
function
|
|
1420
|
-
if (
|
|
1421
|
-
|
|
1419
|
+
function C(g) {
|
|
1420
|
+
if (m) {
|
|
1421
|
+
m(g);
|
|
1422
1422
|
return;
|
|
1423
1423
|
}
|
|
1424
|
-
const { from: _, item:
|
|
1425
|
-
if (Ft(
|
|
1426
|
-
const
|
|
1424
|
+
const { from: _, item: c, oldIndex: w, oldDraggableIndex: T, newDraggableIndex: V } = g;
|
|
1425
|
+
if (Ft(c), lo(_, c, w), Dt(i)) {
|
|
1426
|
+
const y = [...b(i)];
|
|
1427
1427
|
i.value = to(
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1428
|
+
y,
|
|
1429
|
+
T,
|
|
1430
|
+
V
|
|
1431
1431
|
);
|
|
1432
1432
|
return;
|
|
1433
1433
|
}
|
|
1434
|
-
to(
|
|
1434
|
+
to(b(i), T, V);
|
|
1435
1435
|
}
|
|
1436
|
-
function
|
|
1437
|
-
const { newIndex: _, oldIndex:
|
|
1438
|
-
let
|
|
1439
|
-
const
|
|
1436
|
+
function E(g) {
|
|
1437
|
+
const { newIndex: _, oldIndex: c, from: w, to: T } = g;
|
|
1438
|
+
let V = null;
|
|
1439
|
+
const y = _ === c && w === T;
|
|
1440
1440
|
try {
|
|
1441
|
-
if (
|
|
1442
|
-
let
|
|
1441
|
+
if (y) {
|
|
1442
|
+
let N = null;
|
|
1443
1443
|
l == null || l.some((G, le) => {
|
|
1444
|
-
if (
|
|
1445
|
-
return
|
|
1446
|
-
const
|
|
1447
|
-
|
|
1444
|
+
if (N && (l == null ? void 0 : l.length) !== T.childNodes.length)
|
|
1445
|
+
return w.insertBefore(N, G.nextSibling), !0;
|
|
1446
|
+
const Te = T.childNodes[le];
|
|
1447
|
+
N = T == null ? void 0 : T.replaceChild(G, Te);
|
|
1448
1448
|
});
|
|
1449
1449
|
}
|
|
1450
|
-
} catch (
|
|
1451
|
-
|
|
1450
|
+
} catch (N) {
|
|
1451
|
+
V = N;
|
|
1452
1452
|
} finally {
|
|
1453
1453
|
l = null;
|
|
1454
1454
|
}
|
|
1455
1455
|
yo(() => {
|
|
1456
|
-
if (
|
|
1457
|
-
throw
|
|
1456
|
+
if (ho(), V)
|
|
1457
|
+
throw V;
|
|
1458
1458
|
});
|
|
1459
1459
|
}
|
|
1460
|
-
const
|
|
1461
|
-
onUpdate:
|
|
1460
|
+
const $ = {
|
|
1461
|
+
onUpdate: C,
|
|
1462
1462
|
onStart: p,
|
|
1463
1463
|
onAdd: f,
|
|
1464
|
-
onRemove:
|
|
1465
|
-
onEnd:
|
|
1464
|
+
onRemove: O,
|
|
1465
|
+
onEnd: E
|
|
1466
1466
|
};
|
|
1467
|
-
function
|
|
1468
|
-
const _ =
|
|
1469
|
-
return
|
|
1467
|
+
function q(g) {
|
|
1468
|
+
const _ = b(a);
|
|
1469
|
+
return g || (g = Sn(_) ? Vn(_, n == null ? void 0 : n.$el) : _), g && !In(g) && (g = g.$el), g || Cn("Root element not found"), g;
|
|
1470
1470
|
}
|
|
1471
1471
|
function B() {
|
|
1472
|
-
var
|
|
1473
|
-
const _ = (
|
|
1474
|
-
return io(
|
|
1475
|
-
Dn(
|
|
1476
|
-
const
|
|
1477
|
-
return
|
|
1472
|
+
var g;
|
|
1473
|
+
const _ = (g = b(s)) != null ? g : {}, c = So(_, ["immediate", "clone"]);
|
|
1474
|
+
return io(c, (w, T) => {
|
|
1475
|
+
Dn(w) && (c[w] = (V, ...y) => {
|
|
1476
|
+
const N = rl();
|
|
1477
|
+
return Fn(V, N), T(V, ...y);
|
|
1478
1478
|
});
|
|
1479
|
-
}),
|
|
1480
|
-
i === null ? {} :
|
|
1481
|
-
|
|
1479
|
+
}), xn(
|
|
1480
|
+
i === null ? {} : $,
|
|
1481
|
+
c
|
|
1482
1482
|
);
|
|
1483
1483
|
}
|
|
1484
|
-
const
|
|
1485
|
-
|
|
1484
|
+
const Y = (g) => {
|
|
1485
|
+
g = q(g), r && z.destroy(), r = new F(g, B());
|
|
1486
1486
|
};
|
|
1487
1487
|
Ye(
|
|
1488
1488
|
() => s,
|
|
1489
1489
|
() => {
|
|
1490
|
-
r && io(B(), (
|
|
1491
|
-
r == null || r.option(
|
|
1490
|
+
r && io(B(), (g, _) => {
|
|
1491
|
+
r == null || r.option(g, _);
|
|
1492
1492
|
});
|
|
1493
1493
|
},
|
|
1494
1494
|
{ deep: !0 }
|
|
1495
1495
|
);
|
|
1496
|
-
const
|
|
1497
|
-
option: (
|
|
1496
|
+
const z = {
|
|
1497
|
+
option: (g, _) => r == null ? void 0 : r.option(g, _),
|
|
1498
1498
|
destroy: () => {
|
|
1499
1499
|
r == null || r.destroy(), r = null;
|
|
1500
1500
|
},
|
|
1501
1501
|
save: () => r == null ? void 0 : r.save(),
|
|
1502
1502
|
toArray: () => r == null ? void 0 : r.toArray(),
|
|
1503
|
-
closest: (...
|
|
1504
|
-
},
|
|
1505
|
-
return
|
|
1506
|
-
d &&
|
|
1507
|
-
}),
|
|
1503
|
+
closest: (...g) => r == null ? void 0 : r.closest(...g)
|
|
1504
|
+
}, L = () => z == null ? void 0 : z.option("disabled", !0), v = () => z == null ? void 0 : z.option("disabled", !1);
|
|
1505
|
+
return al(() => {
|
|
1506
|
+
d && Y();
|
|
1507
|
+
}), il(z.destroy), Ue({ start: Y, pause: L, resume: v }, z);
|
|
1508
1508
|
}
|
|
1509
1509
|
const Yt = [
|
|
1510
1510
|
"update",
|
|
@@ -1519,7 +1519,7 @@ const Yt = [
|
|
|
1519
1519
|
"clone",
|
|
1520
1520
|
"move",
|
|
1521
1521
|
"change"
|
|
1522
|
-
],
|
|
1522
|
+
], dl = [
|
|
1523
1523
|
"clone",
|
|
1524
1524
|
"animation",
|
|
1525
1525
|
"ghostClass",
|
|
@@ -1570,36 +1570,36 @@ const Yt = [
|
|
|
1570
1570
|
prop: "modelValue",
|
|
1571
1571
|
event: "update:modelValue"
|
|
1572
1572
|
},
|
|
1573
|
-
props:
|
|
1573
|
+
props: dl,
|
|
1574
1574
|
emits: ["update:modelValue", ...Yt],
|
|
1575
1575
|
setup(e, { slots: o, emit: t, expose: n, attrs: l }) {
|
|
1576
|
-
const a = Yt.reduce((u,
|
|
1577
|
-
const p = `on${
|
|
1578
|
-
return u[p] = (...f) => t(
|
|
1579
|
-
}, {}), i =
|
|
1580
|
-
const u = Go(e),
|
|
1581
|
-
const
|
|
1582
|
-
return
|
|
1576
|
+
const a = Yt.reduce((u, m) => {
|
|
1577
|
+
const p = `on${m.replace(/^\S/, (f) => f.toUpperCase())}`;
|
|
1578
|
+
return u[p] = (...f) => t(m, ...f), u;
|
|
1579
|
+
}, {}), i = P(() => {
|
|
1580
|
+
const u = Go(e), m = So(u, ["modelValue"]), p = Object.entries(m).reduce((f, [O, C]) => {
|
|
1581
|
+
const E = b(C);
|
|
1582
|
+
return E !== void 0 && (f[O] = E), f;
|
|
1583
1583
|
}, {});
|
|
1584
|
-
return Ue(Ue({}, a),
|
|
1585
|
-
}), s =
|
|
1584
|
+
return Ue(Ue({}, a), Tn(Ue(Ue({}, l), p)));
|
|
1585
|
+
}), s = P({
|
|
1586
1586
|
get: () => e.modelValue,
|
|
1587
1587
|
set: (u) => t("update:modelValue", u)
|
|
1588
1588
|
}), r = j(), d = Ho(
|
|
1589
|
-
|
|
1589
|
+
sl(e.target || r, s, i)
|
|
1590
1590
|
);
|
|
1591
1591
|
return n(d), () => {
|
|
1592
1592
|
var u;
|
|
1593
1593
|
return jo(e.tag || "div", { ref: r }, (u = o == null ? void 0 : o.default) == null ? void 0 : u.call(o, d));
|
|
1594
1594
|
};
|
|
1595
1595
|
}
|
|
1596
|
-
}),
|
|
1596
|
+
}), Pe = {
|
|
1597
1597
|
BLACK: "#000000",
|
|
1598
1598
|
WHITE: "#FFFFFF",
|
|
1599
1599
|
RED: "#FF0000",
|
|
1600
1600
|
NEUTRAL_GRAY_200_HEX: "#BCC1C3",
|
|
1601
1601
|
NEUTRAL_GRAY_200: "var(--fm-color-neutral-gray-200)"
|
|
1602
|
-
},
|
|
1602
|
+
}, ul = /* @__PURE__ */ ee({
|
|
1603
1603
|
__name: "TextWidget",
|
|
1604
1604
|
props: {
|
|
1605
1605
|
modelValue: {},
|
|
@@ -1607,8 +1607,8 @@ const Yt = [
|
|
|
1607
1607
|
disabled: { type: Boolean }
|
|
1608
1608
|
},
|
|
1609
1609
|
setup(e) {
|
|
1610
|
-
const o = e, t =
|
|
1611
|
-
const a = (o.modelValue.color ??
|
|
1610
|
+
const o = e, t = P(() => {
|
|
1611
|
+
const a = (o.modelValue.color ?? A.F_PRINT_COLOR.Enum.BLACK) === A.F_PRINT_COLOR.Enum.BLACK, i = o.modelValue.isInvert, s = o.disabled ? Pe.NEUTRAL_GRAY_200 : i ? "white" : a ? "black" : "red", r = i ? a ? "black" : "red" : "transparent";
|
|
1612
1612
|
return {
|
|
1613
1613
|
textAlign: en(o.modelValue.textAlign),
|
|
1614
1614
|
fontSize: `${o.fontSize * o.modelValue.factor}px`,
|
|
@@ -1618,33 +1618,33 @@ const Yt = [
|
|
|
1618
1618
|
textDecoration: o.modelValue.isUnderline ? "underline" : "none",
|
|
1619
1619
|
backgroundColor: r
|
|
1620
1620
|
};
|
|
1621
|
-
}), n =
|
|
1621
|
+
}), n = P(() => ({
|
|
1622
1622
|
height: o.modelValue.height === null ? "auto" : `${o.modelValue.height}px`
|
|
1623
1623
|
}));
|
|
1624
1624
|
return (l, a) => (x(), W("div", {
|
|
1625
1625
|
style: ge(n.value)
|
|
1626
1626
|
}, [
|
|
1627
|
-
|
|
1627
|
+
k("div", {
|
|
1628
1628
|
class: "text-sm",
|
|
1629
1629
|
style: ge(t.value)
|
|
1630
1630
|
}, H(o.modelValue.value.length ? o.modelValue.value : "Enter value here"), 5)
|
|
1631
1631
|
], 4));
|
|
1632
1632
|
}
|
|
1633
|
-
}),
|
|
1633
|
+
}), cl = /* @__PURE__ */ ee({
|
|
1634
1634
|
__name: "CheckboxWidget",
|
|
1635
1635
|
props: {
|
|
1636
1636
|
modelValue: {},
|
|
1637
1637
|
disabled: { type: Boolean }
|
|
1638
1638
|
},
|
|
1639
1639
|
setup(e) {
|
|
1640
|
-
const o = e, t =
|
|
1641
|
-
const i = (o.modelValue.color ??
|
|
1640
|
+
const o = e, t = P(() => o.modelValue.height == null ? o.modelValue.size : Math.min(o.modelValue.height, o.modelValue.size)), n = P(() => {
|
|
1641
|
+
const i = (o.modelValue.color ?? A.F_PRINT_COLOR.Enum.BLACK) === A.F_PRINT_COLOR.Enum.BLACK;
|
|
1642
1642
|
return {
|
|
1643
1643
|
width: `${o.modelValue.size}px`,
|
|
1644
1644
|
height: `${t.value}px`,
|
|
1645
|
-
borderColor: o.disabled ?
|
|
1645
|
+
borderColor: o.disabled ? Pe.NEUTRAL_GRAY_200 : i ? "black" : "red"
|
|
1646
1646
|
};
|
|
1647
|
-
}), l =
|
|
1647
|
+
}), l = P(() => {
|
|
1648
1648
|
const a = it(o.modelValue.alignment), i = at(o.modelValue.alignment);
|
|
1649
1649
|
return {
|
|
1650
1650
|
display: "flex",
|
|
@@ -1655,39 +1655,39 @@ const Yt = [
|
|
|
1655
1655
|
return (a, i) => (x(), W("div", {
|
|
1656
1656
|
style: ge(l.value)
|
|
1657
1657
|
}, [
|
|
1658
|
-
|
|
1658
|
+
k("div", {
|
|
1659
1659
|
class: "border",
|
|
1660
1660
|
style: ge(n.value)
|
|
1661
1661
|
}, null, 4)
|
|
1662
1662
|
], 4));
|
|
1663
1663
|
}
|
|
1664
|
-
}),
|
|
1664
|
+
}), ml = { class: "flex flex-col gap-2" }, pl = /* @__PURE__ */ ee({
|
|
1665
1665
|
__name: "SpacerWidget",
|
|
1666
1666
|
props: {
|
|
1667
1667
|
modelValue: {}
|
|
1668
1668
|
},
|
|
1669
1669
|
setup(e) {
|
|
1670
|
-
const o = e, t =
|
|
1670
|
+
const o = e, t = P(() => ({
|
|
1671
1671
|
height: `${o.modelValue.height}px`
|
|
1672
1672
|
}));
|
|
1673
|
-
return (n, l) => (x(), W("div",
|
|
1674
|
-
|
|
1673
|
+
return (n, l) => (x(), W("div", ml, [
|
|
1674
|
+
k("div", {
|
|
1675
1675
|
class: "w-full",
|
|
1676
1676
|
style: ge(t.value)
|
|
1677
1677
|
}, null, 4)
|
|
1678
1678
|
]));
|
|
1679
1679
|
}
|
|
1680
|
-
}),
|
|
1680
|
+
}), fl = ["src"], gl = /* @__PURE__ */ ee({
|
|
1681
1681
|
__name: "ImageWidget",
|
|
1682
1682
|
props: {
|
|
1683
1683
|
modelValue: {}
|
|
1684
1684
|
},
|
|
1685
1685
|
setup(e) {
|
|
1686
|
-
const o = e, t =
|
|
1686
|
+
const o = e, t = P(() => tn(o.modelValue.imgData).value), n = P(() => ({
|
|
1687
1687
|
height: o.modelValue.height ? `${o.modelValue.height}px` : "auto",
|
|
1688
1688
|
width: o.modelValue.width ? `${o.modelValue.width}px` : "auto",
|
|
1689
1689
|
maxWidth: "100%"
|
|
1690
|
-
})), l =
|
|
1690
|
+
})), l = P(() => {
|
|
1691
1691
|
const a = it(o.modelValue.alignment), i = at(o.modelValue.alignment);
|
|
1692
1692
|
return {
|
|
1693
1693
|
display: "flex",
|
|
@@ -1696,7 +1696,7 @@ const Yt = [
|
|
|
1696
1696
|
};
|
|
1697
1697
|
});
|
|
1698
1698
|
return (a, i) => {
|
|
1699
|
-
const s =
|
|
1699
|
+
const s = K("FmIcon");
|
|
1700
1700
|
return x(), W("div", {
|
|
1701
1701
|
style: ge(l.value)
|
|
1702
1702
|
}, [
|
|
@@ -1705,7 +1705,7 @@ const Yt = [
|
|
|
1705
1705
|
src: t.value,
|
|
1706
1706
|
alt: "Image Widget",
|
|
1707
1707
|
style: ge(n.value)
|
|
1708
|
-
}, null, 12,
|
|
1708
|
+
}, null, 12, fl)) : (x(), ye(s, {
|
|
1709
1709
|
key: 1,
|
|
1710
1710
|
name: "image",
|
|
1711
1711
|
size: "md"
|
|
@@ -1713,7 +1713,7 @@ const Yt = [
|
|
|
1713
1713
|
], 4);
|
|
1714
1714
|
};
|
|
1715
1715
|
}
|
|
1716
|
-
}),
|
|
1716
|
+
}), hl = ["src"], vl = /* @__PURE__ */ ee({
|
|
1717
1717
|
__name: "QrCodeWidget",
|
|
1718
1718
|
props: {
|
|
1719
1719
|
modelValue: {},
|
|
@@ -1722,12 +1722,12 @@ const Yt = [
|
|
|
1722
1722
|
setup(e) {
|
|
1723
1723
|
const o = e, t = j(""), { t: n } = me(), l = Eo(), a = async (s, r) => {
|
|
1724
1724
|
try {
|
|
1725
|
-
const u = (r ??
|
|
1725
|
+
const u = (r ?? A.F_PRINT_COLOR.Enum.BLACK) === A.F_PRINT_COLOR.Enum.BLACK;
|
|
1726
1726
|
t.value = await on.toDataURL(s, {
|
|
1727
1727
|
width: o.modelValue.size,
|
|
1728
1728
|
color: {
|
|
1729
|
-
dark: o.disabled ?
|
|
1730
|
-
light:
|
|
1729
|
+
dark: o.disabled ? Pe.NEUTRAL_GRAY_200_HEX : u ? Pe.BLACK : Pe.RED,
|
|
1730
|
+
light: Pe.WHITE
|
|
1731
1731
|
},
|
|
1732
1732
|
margin: 0
|
|
1733
1733
|
});
|
|
@@ -1741,7 +1741,7 @@ const Yt = [
|
|
|
1741
1741
|
3e3
|
|
1742
1742
|
);
|
|
1743
1743
|
}
|
|
1744
|
-
}, i =
|
|
1744
|
+
}, i = P(() => {
|
|
1745
1745
|
const s = it(o.modelValue.alignment), r = at(o.modelValue.alignment);
|
|
1746
1746
|
return {
|
|
1747
1747
|
display: "flex",
|
|
@@ -1757,7 +1757,7 @@ const Yt = [
|
|
|
1757
1757
|
},
|
|
1758
1758
|
{ immediate: !0 }
|
|
1759
1759
|
), (s, r) => {
|
|
1760
|
-
const d =
|
|
1760
|
+
const d = K("FmIcon");
|
|
1761
1761
|
return x(), W("div", {
|
|
1762
1762
|
style: ge(i.value)
|
|
1763
1763
|
}, [
|
|
@@ -1765,7 +1765,7 @@ const Yt = [
|
|
|
1765
1765
|
key: 0,
|
|
1766
1766
|
src: t.value,
|
|
1767
1767
|
alt: "QR Code"
|
|
1768
|
-
}, null, 8,
|
|
1768
|
+
}, null, 8, hl)) : (x(), ye(d, {
|
|
1769
1769
|
key: 1,
|
|
1770
1770
|
name: "qr_code_scanner",
|
|
1771
1771
|
size: "md"
|
|
@@ -1773,30 +1773,30 @@ const Yt = [
|
|
|
1773
1773
|
], 4);
|
|
1774
1774
|
};
|
|
1775
1775
|
}
|
|
1776
|
-
}),
|
|
1776
|
+
}), bl = /* @__PURE__ */ ee({
|
|
1777
1777
|
__name: "DividerWidget",
|
|
1778
1778
|
props: {
|
|
1779
1779
|
modelValue: {},
|
|
1780
1780
|
disabled: { type: Boolean }
|
|
1781
1781
|
},
|
|
1782
1782
|
setup(e) {
|
|
1783
|
-
const o = e, t =
|
|
1784
|
-
const l = (o.modelValue.color ??
|
|
1783
|
+
const o = e, t = P(() => {
|
|
1784
|
+
const l = (o.modelValue.color ?? A.F_PRINT_COLOR.Enum.BLACK) === A.F_PRINT_COLOR.Enum.BLACK;
|
|
1785
1785
|
return {
|
|
1786
1786
|
borderTop: `${o.modelValue.thickness}px solid black`,
|
|
1787
1787
|
width: "100%",
|
|
1788
|
-
borderColor: o.disabled ?
|
|
1788
|
+
borderColor: o.disabled ? Pe.NEUTRAL_GRAY_200 : l ? "black" : "red"
|
|
1789
1789
|
};
|
|
1790
1790
|
});
|
|
1791
1791
|
return (n, l) => (x(), W("div", {
|
|
1792
1792
|
style: ge({ height: `${n.modelValue.height}px` })
|
|
1793
1793
|
}, [
|
|
1794
|
-
|
|
1794
|
+
k("div", {
|
|
1795
1795
|
style: ge(t.value)
|
|
1796
1796
|
}, null, 4)
|
|
1797
1797
|
], 4));
|
|
1798
1798
|
}
|
|
1799
|
-
}),
|
|
1799
|
+
}), yl = /* @__PURE__ */ ee({
|
|
1800
1800
|
__name: "WidgetView",
|
|
1801
1801
|
props: {
|
|
1802
1802
|
modelValue: {
|
|
@@ -1813,52 +1813,52 @@ const Yt = [
|
|
|
1813
1813
|
}
|
|
1814
1814
|
},
|
|
1815
1815
|
setup(e) {
|
|
1816
|
-
const o = e, t =
|
|
1816
|
+
const o = e, t = P(() => {
|
|
1817
1817
|
switch (o.modelValue.data.type) {
|
|
1818
|
-
case
|
|
1818
|
+
case A.F_WIDGET_TEMPLATE_TYPE.enum.TEXT:
|
|
1819
1819
|
return {
|
|
1820
|
-
component:
|
|
1820
|
+
component: ul,
|
|
1821
1821
|
properties: {
|
|
1822
1822
|
modelValue: o.modelValue.data,
|
|
1823
1823
|
fontSize: o.fontSize,
|
|
1824
1824
|
disabled: o.disabled
|
|
1825
1825
|
}
|
|
1826
1826
|
};
|
|
1827
|
-
case
|
|
1827
|
+
case A.F_WIDGET_TEMPLATE_TYPE.enum.CHECKBOX:
|
|
1828
1828
|
return {
|
|
1829
|
-
component:
|
|
1829
|
+
component: cl,
|
|
1830
1830
|
properties: { modelValue: o.modelValue.data, disabled: o.disabled }
|
|
1831
1831
|
};
|
|
1832
|
-
case
|
|
1832
|
+
case A.F_WIDGET_TEMPLATE_TYPE.enum.IMAGE:
|
|
1833
1833
|
return {
|
|
1834
|
-
component:
|
|
1834
|
+
component: gl,
|
|
1835
1835
|
properties: { modelValue: o.modelValue.data }
|
|
1836
1836
|
};
|
|
1837
|
-
case
|
|
1837
|
+
case A.F_WIDGET_TEMPLATE_TYPE.enum.QR:
|
|
1838
1838
|
return {
|
|
1839
1839
|
component: vl,
|
|
1840
1840
|
properties: { modelValue: o.modelValue.data, disabled: o.disabled }
|
|
1841
1841
|
};
|
|
1842
|
-
case
|
|
1842
|
+
case A.F_WIDGET_TEMPLATE_TYPE.enum.DIVIDER:
|
|
1843
1843
|
return {
|
|
1844
|
-
component:
|
|
1844
|
+
component: bl,
|
|
1845
1845
|
properties: { modelValue: o.modelValue.data, disabled: o.disabled }
|
|
1846
1846
|
};
|
|
1847
|
-
case
|
|
1847
|
+
case A.F_WIDGET_TEMPLATE_TYPE.enum.EMPTY:
|
|
1848
1848
|
default:
|
|
1849
1849
|
return {
|
|
1850
|
-
component:
|
|
1850
|
+
component: pl,
|
|
1851
1851
|
properties: { modelValue: o.modelValue.data }
|
|
1852
1852
|
};
|
|
1853
1853
|
}
|
|
1854
|
-
}), n =
|
|
1854
|
+
}), n = P(() => {
|
|
1855
1855
|
const a = it(o.modelValue.data.alignment), i = at(o.modelValue.data.alignment);
|
|
1856
1856
|
return {
|
|
1857
1857
|
display: "flex",
|
|
1858
1858
|
justifyContent: a,
|
|
1859
1859
|
alignItems: i
|
|
1860
1860
|
};
|
|
1861
|
-
}), l =
|
|
1861
|
+
}), l = P(() => {
|
|
1862
1862
|
const { top: a, right: i, bottom: s, left: r } = o.modelValue.data.padding;
|
|
1863
1863
|
return {
|
|
1864
1864
|
padding: `${a}px ${i}px ${s}px ${r}px`,
|
|
@@ -1870,14 +1870,14 @@ const Yt = [
|
|
|
1870
1870
|
return x(), W("div", {
|
|
1871
1871
|
style: ge(l.value)
|
|
1872
1872
|
}, [
|
|
1873
|
-
(x(), ye(_o(qo((s = t.value) == null ? void 0 : s.component)),
|
|
1873
|
+
(x(), ye(_o(qo((s = t.value) == null ? void 0 : s.component)), Zo({
|
|
1874
1874
|
class: "widget",
|
|
1875
1875
|
style: n.value
|
|
1876
1876
|
}, (r = t.value) == null ? void 0 : r.properties), null, 16, ["style"]))
|
|
1877
1877
|
], 4);
|
|
1878
1878
|
};
|
|
1879
1879
|
}
|
|
1880
|
-
}),
|
|
1880
|
+
}), _l = { class: "flex h-fit w-[375px] bg-fm-color-neutral-white" }, Cl = { class: "rows-zone" }, El = ["onClick"], Tl = /* @__PURE__ */ ee({
|
|
1881
1881
|
__name: "ReceiptEditor",
|
|
1882
1882
|
props: {
|
|
1883
1883
|
modelValue: {},
|
|
@@ -1889,184 +1889,184 @@ const Yt = [
|
|
|
1889
1889
|
emits: ["selectWidget", "update:model-value"],
|
|
1890
1890
|
setup(e, { emit: o }) {
|
|
1891
1891
|
const t = e, n = o, l = j(t.modelValue), a = j(null), i = j(null), s = j(null), r = j(null), d = j(null), u = j(null);
|
|
1892
|
-
function c
|
|
1893
|
-
i.value =
|
|
1892
|
+
function m(c, w, T, V) {
|
|
1893
|
+
i.value = c, s.value = w, r.value = T, Y({ config: c, position: { row: w, col: T, cell: V } });
|
|
1894
1894
|
}
|
|
1895
|
-
function p(
|
|
1896
|
-
return
|
|
1895
|
+
function p(c) {
|
|
1896
|
+
return c.newIndex;
|
|
1897
1897
|
}
|
|
1898
|
-
function f(
|
|
1899
|
-
var le,
|
|
1900
|
-
const
|
|
1901
|
-
if (
|
|
1898
|
+
function f(c, w, T, V) {
|
|
1899
|
+
var le, Te, I;
|
|
1900
|
+
const y = p(c);
|
|
1901
|
+
if (y == null)
|
|
1902
1902
|
return;
|
|
1903
|
-
const
|
|
1904
|
-
row:
|
|
1905
|
-
col:
|
|
1906
|
-
cell:
|
|
1907
|
-
}, G = (
|
|
1908
|
-
G != null &&
|
|
1909
|
-
}
|
|
1910
|
-
function
|
|
1911
|
-
f(
|
|
1912
|
-
}
|
|
1913
|
-
function
|
|
1914
|
-
f(
|
|
1915
|
-
}
|
|
1916
|
-
function
|
|
1917
|
-
f(
|
|
1918
|
-
}
|
|
1919
|
-
function
|
|
1920
|
-
const
|
|
1921
|
-
...
|
|
1922
|
-
columns:
|
|
1923
|
-
})).filter((
|
|
1924
|
-
l.value =
|
|
1925
|
-
}
|
|
1926
|
-
function
|
|
1927
|
-
const
|
|
1928
|
-
var
|
|
1929
|
-
if (
|
|
1930
|
-
return
|
|
1931
|
-
let
|
|
1932
|
-
return s.value != null ?
|
|
1903
|
+
const N = {
|
|
1904
|
+
row: w ?? y,
|
|
1905
|
+
col: T ?? y,
|
|
1906
|
+
cell: V ?? y
|
|
1907
|
+
}, G = (I = (Te = (le = l.value) == null ? void 0 : le[N.row].columns) == null ? void 0 : Te[N.col]) == null ? void 0 : I.cells[N.cell];
|
|
1908
|
+
G != null && Y({ config: G, position: N });
|
|
1909
|
+
}
|
|
1910
|
+
function O(c) {
|
|
1911
|
+
f(c, void 0, 0, 0);
|
|
1912
|
+
}
|
|
1913
|
+
function C(c, w) {
|
|
1914
|
+
f(c, w, void 0, 0);
|
|
1915
|
+
}
|
|
1916
|
+
function E(c, w, T) {
|
|
1917
|
+
f(c, w, T, void 0);
|
|
1918
|
+
}
|
|
1919
|
+
function $() {
|
|
1920
|
+
const c = l.value.map((w) => ({
|
|
1921
|
+
...w,
|
|
1922
|
+
columns: w.columns.filter((T) => T.cells && T.cells.length > 0)
|
|
1923
|
+
})).filter((w) => w.columns.length > 0);
|
|
1924
|
+
l.value = c, n("update:model-value", c);
|
|
1925
|
+
}
|
|
1926
|
+
function q(c) {
|
|
1927
|
+
const w = c.map((T, V) => {
|
|
1928
|
+
var N;
|
|
1929
|
+
if (T.columns)
|
|
1930
|
+
return T;
|
|
1931
|
+
let y;
|
|
1932
|
+
return s.value != null ? y = c[s.value].sectionType ?? u.value : y = T.sectionType ? T.sectionType : V > 0 && ((N = c[V - 1]) != null && N.sectionType) ? c[V - 1].sectionType : u.value, {
|
|
1933
1933
|
columns: [
|
|
1934
1934
|
{
|
|
1935
1935
|
width: {
|
|
1936
|
-
type:
|
|
1936
|
+
type: A.F_CELL_WIDTH_TYPE.Enum.FLEX,
|
|
1937
1937
|
value: 100
|
|
1938
1938
|
},
|
|
1939
|
-
cells: [{ ...
|
|
1939
|
+
cells: [{ ...T }]
|
|
1940
1940
|
}
|
|
1941
1941
|
],
|
|
1942
|
-
sectionType:
|
|
1942
|
+
sectionType: y
|
|
1943
1943
|
};
|
|
1944
1944
|
});
|
|
1945
|
-
l.value =
|
|
1945
|
+
l.value = w, n("update:model-value", w);
|
|
1946
1946
|
}
|
|
1947
|
-
function B(
|
|
1948
|
-
const
|
|
1949
|
-
cells: [{ ...
|
|
1950
|
-
}),
|
|
1951
|
-
(
|
|
1947
|
+
function B(c, w) {
|
|
1948
|
+
const T = c.map((y) => y.cells ? y : {
|
|
1949
|
+
cells: [{ ...y }]
|
|
1950
|
+
}), V = l.value.map(
|
|
1951
|
+
(y, N) => N === w ? { ...y, columns: T } : y
|
|
1952
1952
|
);
|
|
1953
|
-
l.value =
|
|
1953
|
+
l.value = V, n("update:model-value", V);
|
|
1954
1954
|
}
|
|
1955
|
-
function
|
|
1956
|
-
a.value =
|
|
1955
|
+
function Y(c) {
|
|
1956
|
+
a.value = c.position, d.value = c.position.row, n("selectWidget", c);
|
|
1957
1957
|
}
|
|
1958
|
-
const
|
|
1958
|
+
const z = (c, w, T) => {
|
|
1959
1959
|
if (t.selectedWidget != null) {
|
|
1960
|
-
const
|
|
1961
|
-
return (
|
|
1960
|
+
const V = a.value;
|
|
1961
|
+
return (V == null ? void 0 : V.row) === c && (V == null ? void 0 : V.col) === w && (V == null ? void 0 : V.cell) === T;
|
|
1962
1962
|
}
|
|
1963
1963
|
};
|
|
1964
|
-
function
|
|
1965
|
-
return
|
|
1966
|
-
flex:
|
|
1967
|
-
} :
|
|
1968
|
-
width: `${
|
|
1964
|
+
function L(c) {
|
|
1965
|
+
return c == null ? {} : c.type === A.F_CELL_WIDTH_TYPE.Enum.FLEX ? {
|
|
1966
|
+
flex: c.value
|
|
1967
|
+
} : c.type === A.F_CELL_WIDTH_TYPE.Enum.FIXED ? {
|
|
1968
|
+
width: `${c.value}px`,
|
|
1969
1969
|
flex: "none"
|
|
1970
1970
|
} : {};
|
|
1971
1971
|
}
|
|
1972
|
-
function
|
|
1973
|
-
d.value =
|
|
1972
|
+
function v(c, w) {
|
|
1973
|
+
d.value = w, u.value = c;
|
|
1974
1974
|
}
|
|
1975
|
-
function
|
|
1976
|
-
return
|
|
1975
|
+
function g(c) {
|
|
1976
|
+
return c === d.value;
|
|
1977
1977
|
}
|
|
1978
|
-
function _(
|
|
1979
|
-
return t.selectedWidgetSectionType ?
|
|
1978
|
+
function _(c) {
|
|
1979
|
+
return t.selectedWidgetSectionType ? c !== t.selectedWidgetSectionType : !1;
|
|
1980
1980
|
}
|
|
1981
1981
|
return Ye(
|
|
1982
1982
|
() => t.modelValue,
|
|
1983
|
-
(
|
|
1984
|
-
l.value =
|
|
1983
|
+
(c) => {
|
|
1984
|
+
l.value = c;
|
|
1985
1985
|
},
|
|
1986
1986
|
{ deep: !0 }
|
|
1987
1987
|
), Ye(
|
|
1988
1988
|
() => t.selectedWidget,
|
|
1989
|
-
(
|
|
1990
|
-
|
|
1989
|
+
(c) => {
|
|
1990
|
+
c === null && (d.value = null);
|
|
1991
1991
|
}
|
|
1992
|
-
), (
|
|
1993
|
-
|
|
1994
|
-
|
|
1992
|
+
), (c, w) => (x(), W("div", _l, [
|
|
1993
|
+
k("div", Cl, [
|
|
1994
|
+
S(b(nt), {
|
|
1995
1995
|
modelValue: l.value,
|
|
1996
1996
|
"onUpdate:modelValue": [
|
|
1997
|
-
|
|
1998
|
-
|
|
1997
|
+
w[0] || (w[0] = (T) => l.value = T),
|
|
1998
|
+
w[2] || (w[2] = (T) => q(T))
|
|
1999
1999
|
],
|
|
2000
2000
|
"item-key": "index",
|
|
2001
2001
|
group: "widgets",
|
|
2002
|
-
onAdd:
|
|
2002
|
+
onAdd: w[1] || (w[1] = (T) => O(T)),
|
|
2003
2003
|
class: "row-container"
|
|
2004
2004
|
}, {
|
|
2005
2005
|
default: be(() => [
|
|
2006
|
-
(x(!0), W(
|
|
2007
|
-
|
|
2006
|
+
(x(!0), W(_e, null, Se(l.value, (T, V) => (x(), W("div", { key: V }, [
|
|
2007
|
+
k("div", {
|
|
2008
2008
|
class: qt(["row", {
|
|
2009
|
-
rowBorder:
|
|
2009
|
+
rowBorder: g(V)
|
|
2010
2010
|
}])
|
|
2011
2011
|
}, [
|
|
2012
|
-
|
|
2013
|
-
modelValue:
|
|
2014
|
-
"onUpdate:modelValue": [(
|
|
2012
|
+
S(b(nt), {
|
|
2013
|
+
modelValue: T.columns,
|
|
2014
|
+
"onUpdate:modelValue": [(y) => T.columns = y, (y) => B(y, V)],
|
|
2015
2015
|
"item-key": "index",
|
|
2016
2016
|
group: "widgets",
|
|
2017
|
-
"row-index":
|
|
2018
|
-
disabled: _(
|
|
2019
|
-
onAdd: (
|
|
2020
|
-
onDragover: (
|
|
2017
|
+
"row-index": V,
|
|
2018
|
+
disabled: _(T.sectionType),
|
|
2019
|
+
onAdd: (y) => C(y, V),
|
|
2020
|
+
onDragover: (y) => v(T.sectionType, V),
|
|
2021
2021
|
class: "column-container"
|
|
2022
2022
|
}, {
|
|
2023
2023
|
default: be(() => [
|
|
2024
|
-
(x(!0), W(
|
|
2024
|
+
(x(!0), W(_e, null, Se(T.columns, (y, N) => (x(), W("div", {
|
|
2025
2025
|
class: "w-full",
|
|
2026
|
-
key:
|
|
2026
|
+
key: N
|
|
2027
2027
|
}, [
|
|
2028
|
-
|
|
2028
|
+
k("div", {
|
|
2029
2029
|
class: "column",
|
|
2030
|
-
style: ge(
|
|
2030
|
+
style: ge(L(y.width ?? void 0))
|
|
2031
2031
|
}, [
|
|
2032
|
-
|
|
2033
|
-
modelValue:
|
|
2034
|
-
"onUpdate:modelValue": (G) =>
|
|
2032
|
+
S(b(nt), {
|
|
2033
|
+
modelValue: y.cells,
|
|
2034
|
+
"onUpdate:modelValue": (G) => y.cells = G,
|
|
2035
2035
|
"item-key": "index",
|
|
2036
2036
|
group: "widgets",
|
|
2037
|
-
"row-index":
|
|
2038
|
-
"col-index":
|
|
2039
|
-
disabled: _(
|
|
2040
|
-
onAdd: (G) =>
|
|
2041
|
-
onUpdate: (G) =>
|
|
2037
|
+
"row-index": V,
|
|
2038
|
+
"col-index": N,
|
|
2039
|
+
disabled: _(T.sectionType),
|
|
2040
|
+
onAdd: (G) => E(G, V, N),
|
|
2041
|
+
onUpdate: (G) => E(G, V, N),
|
|
2042
2042
|
onStart: (G) => {
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2043
|
+
m(
|
|
2044
|
+
y.cells[G.oldIndex],
|
|
2045
|
+
V,
|
|
2046
|
+
N,
|
|
2047
2047
|
G.oldIndex
|
|
2048
2048
|
);
|
|
2049
2049
|
},
|
|
2050
|
-
onEnd:
|
|
2050
|
+
onEnd: $,
|
|
2051
2051
|
class: "cell-container"
|
|
2052
2052
|
}, {
|
|
2053
2053
|
default: be(() => [
|
|
2054
|
-
(x(!0), W(
|
|
2055
|
-
|
|
2054
|
+
(x(!0), W(_e, null, Se(y.cells, (G, le) => (x(), W("div", { key: le }, [
|
|
2055
|
+
k("div", {
|
|
2056
2056
|
class: qt(["cell", {
|
|
2057
|
-
"selected-widget":
|
|
2057
|
+
"selected-widget": z(V, N, le)
|
|
2058
2058
|
}]),
|
|
2059
|
-
onClick: (
|
|
2059
|
+
onClick: (Te) => Y({
|
|
2060
2060
|
config: G,
|
|
2061
|
-
position: { row:
|
|
2061
|
+
position: { row: V, col: N, cell: le }
|
|
2062
2062
|
})
|
|
2063
2063
|
}, [
|
|
2064
|
-
|
|
2064
|
+
S(yl, {
|
|
2065
2065
|
"model-value": G,
|
|
2066
|
-
"font-size":
|
|
2067
|
-
disabled: _(
|
|
2066
|
+
"font-size": c.fontSize,
|
|
2067
|
+
disabled: _(T.sectionType)
|
|
2068
2068
|
}, null, 8, ["model-value", "font-size", "disabled"])
|
|
2069
|
-
], 10,
|
|
2069
|
+
], 10, El)
|
|
2070
2070
|
]))), 128))
|
|
2071
2071
|
]),
|
|
2072
2072
|
_: 2
|
|
@@ -2081,15 +2081,15 @@ const Yt = [
|
|
|
2081
2081
|
]),
|
|
2082
2082
|
_: 1
|
|
2083
2083
|
}, 8, ["modelValue"]),
|
|
2084
|
-
|
|
2084
|
+
S(nn)
|
|
2085
2085
|
])
|
|
2086
2086
|
]));
|
|
2087
2087
|
}
|
|
2088
2088
|
});
|
|
2089
|
-
const
|
|
2089
|
+
const wl = /* @__PURE__ */ St(Tl, [["__scopeId", "data-v-4bfaa477"]]), Sl = { class: "gap" }, Vl = { class: "block fm-typo-en-body-md-600" }, kl = {
|
|
2090
2090
|
key: 1,
|
|
2091
2091
|
class: "flex items-center fm-typo-en-body-md-600 h-9 my-8"
|
|
2092
|
-
},
|
|
2092
|
+
}, xl = { class: "gap" }, Il = { class: "block fm-typo-en-body-md-600" }, Dl = { class: "grid grid-cols-2 gap-2" }, Fl = { class: "gap" }, Ol = { class: "fm-typo-en-body-lg-600" }, Al = { class: "flex flex-row justify-between" }, Rl = { class: "alignButtonGap" }, Wl = { class: "alignButtonGap" }, Nl = /* @__PURE__ */ ee({
|
|
2093
2093
|
__name: "CommonWidgetEditor",
|
|
2094
2094
|
props: {
|
|
2095
2095
|
modelValue: {},
|
|
@@ -2105,8 +2105,8 @@ const Tl = /* @__PURE__ */ St(El, [["__scopeId", "data-v-4bfaa477"]]), wl = { cl
|
|
|
2105
2105
|
pe.FLEX_START,
|
|
2106
2106
|
pe.CENTER,
|
|
2107
2107
|
pe.FLEX_END
|
|
2108
|
-
], d = (
|
|
2109
|
-
switch (
|
|
2108
|
+
], d = (v) => {
|
|
2109
|
+
switch (v) {
|
|
2110
2110
|
case pe.FLEX_START:
|
|
2111
2111
|
return "align_horizontal_left";
|
|
2112
2112
|
case pe.CENTER:
|
|
@@ -2114,8 +2114,8 @@ const Tl = /* @__PURE__ */ St(El, [["__scopeId", "data-v-4bfaa477"]]), wl = { cl
|
|
|
2114
2114
|
case pe.FLEX_END:
|
|
2115
2115
|
return "align_horizontal_right";
|
|
2116
2116
|
}
|
|
2117
|
-
}, u = (
|
|
2118
|
-
switch (
|
|
2117
|
+
}, u = (v) => {
|
|
2118
|
+
switch (v) {
|
|
2119
2119
|
case pe.FLEX_START:
|
|
2120
2120
|
return "vertical_align_top";
|
|
2121
2121
|
case pe.CENTER:
|
|
@@ -2123,177 +2123,178 @@ const Tl = /* @__PURE__ */ St(El, [["__scopeId", "data-v-4bfaa477"]]), wl = { cl
|
|
|
2123
2123
|
case pe.FLEX_END:
|
|
2124
2124
|
return "vertical_align_bottom";
|
|
2125
2125
|
}
|
|
2126
|
-
},
|
|
2126
|
+
}, m = (v) => {
|
|
2127
2127
|
var _;
|
|
2128
|
-
const
|
|
2129
|
-
switch (
|
|
2130
|
-
case
|
|
2128
|
+
const g = (_ = t.selectedWidgetColumn.width) == null ? void 0 : _.value;
|
|
2129
|
+
switch (v) {
|
|
2130
|
+
case Le.AUTO:
|
|
2131
2131
|
return null;
|
|
2132
|
-
case
|
|
2132
|
+
case Le.PERCENTAGE:
|
|
2133
2133
|
return {
|
|
2134
|
-
type:
|
|
2135
|
-
value:
|
|
2134
|
+
type: A.F_CELL_WIDTH_TYPE.Enum.FLEX,
|
|
2135
|
+
value: g ?? 100
|
|
2136
2136
|
};
|
|
2137
|
-
case
|
|
2137
|
+
case Le.PX:
|
|
2138
2138
|
return {
|
|
2139
|
-
type:
|
|
2140
|
-
value:
|
|
2139
|
+
type: A.F_CELL_WIDTH_TYPE.Enum.FIXED,
|
|
2140
|
+
value: g ?? 10
|
|
2141
2141
|
};
|
|
2142
2142
|
}
|
|
2143
2143
|
}, p = [
|
|
2144
|
-
{ label:
|
|
2145
|
-
{ label:
|
|
2146
|
-
{ label:
|
|
2147
|
-
], f =
|
|
2148
|
-
var
|
|
2149
|
-
switch ((
|
|
2150
|
-
case
|
|
2144
|
+
{ label: Le.AUTO },
|
|
2145
|
+
{ label: Le.PX },
|
|
2146
|
+
{ label: Le.PERCENTAGE }
|
|
2147
|
+
], f = P(() => {
|
|
2148
|
+
var g;
|
|
2149
|
+
switch ((g = t.selectedWidgetColumn.width) == null ? void 0 : g.type) {
|
|
2150
|
+
case A.F_CELL_WIDTH_TYPE.Enum.FIXED:
|
|
2151
2151
|
return p[1];
|
|
2152
|
-
case
|
|
2152
|
+
case A.F_CELL_WIDTH_TYPE.Enum.FLEX:
|
|
2153
2153
|
return p[2];
|
|
2154
2154
|
default:
|
|
2155
2155
|
return p[0];
|
|
2156
2156
|
}
|
|
2157
2157
|
});
|
|
2158
|
-
function
|
|
2158
|
+
function O(v) {
|
|
2159
2159
|
var _;
|
|
2160
|
-
const
|
|
2160
|
+
const g = Math.max(1, Math.min(v, 720));
|
|
2161
2161
|
n("update:selected-widget-column", {
|
|
2162
2162
|
...t.selectedWidgetColumn,
|
|
2163
2163
|
width: {
|
|
2164
|
-
type: ((_ = t.selectedWidgetColumn.width) == null ? void 0 : _.type) ??
|
|
2165
|
-
value:
|
|
2164
|
+
type: ((_ = t.selectedWidgetColumn.width) == null ? void 0 : _.type) ?? A.F_CELL_WIDTH_TYPE.Enum.FLEX,
|
|
2165
|
+
value: g
|
|
2166
2166
|
}
|
|
2167
2167
|
});
|
|
2168
2168
|
}
|
|
2169
|
-
function
|
|
2170
|
-
const
|
|
2171
|
-
|
|
2169
|
+
function C(v) {
|
|
2170
|
+
const g = m(v.label);
|
|
2171
|
+
g == null ? n("update:selected-widget-column", {
|
|
2172
2172
|
...t.selectedWidgetColumn,
|
|
2173
2173
|
width: null
|
|
2174
2174
|
}) : n("update:selected-widget-column", {
|
|
2175
2175
|
...t.selectedWidgetColumn,
|
|
2176
2176
|
width: {
|
|
2177
|
-
type:
|
|
2178
|
-
value:
|
|
2177
|
+
type: g.type,
|
|
2178
|
+
value: g.value
|
|
2179
2179
|
}
|
|
2180
2180
|
});
|
|
2181
2181
|
}
|
|
2182
|
-
function
|
|
2183
|
-
let _ =
|
|
2184
|
-
|
|
2182
|
+
function E(v, g) {
|
|
2183
|
+
let _ = g;
|
|
2184
|
+
v === "height" && g === 0 && (_ = null), n("update:model-value", {
|
|
2185
2185
|
...t.modelValue,
|
|
2186
|
-
[
|
|
2186
|
+
[v]: _
|
|
2187
2187
|
});
|
|
2188
2188
|
}
|
|
2189
|
-
function
|
|
2190
|
-
|
|
2189
|
+
function $(v, g) {
|
|
2190
|
+
const _ = typeof g == "number" && Number.isFinite(g) ? g : 0;
|
|
2191
|
+
E("padding", { ...t.modelValue.padding, [v]: _ });
|
|
2191
2192
|
}
|
|
2192
|
-
function
|
|
2193
|
-
a.value =
|
|
2193
|
+
function q(v) {
|
|
2194
|
+
a.value = v, Y();
|
|
2194
2195
|
}
|
|
2195
|
-
function B(
|
|
2196
|
-
i.value =
|
|
2196
|
+
function B(v) {
|
|
2197
|
+
i.value = v, Y();
|
|
2197
2198
|
}
|
|
2198
|
-
function
|
|
2199
|
-
|
|
2199
|
+
function Y() {
|
|
2200
|
+
E(
|
|
2200
2201
|
"alignment",
|
|
2201
2202
|
ln({ justify: a.value, align: i.value })
|
|
2202
2203
|
);
|
|
2203
2204
|
}
|
|
2204
|
-
function
|
|
2205
|
-
return
|
|
2205
|
+
function z(v) {
|
|
2206
|
+
return v ? "neutral-gray-400" : "neutral-gray-300";
|
|
2206
2207
|
}
|
|
2207
|
-
function
|
|
2208
|
-
return
|
|
2208
|
+
function L(v) {
|
|
2209
|
+
return v ? "neutral-gray-100" : "";
|
|
2209
2210
|
}
|
|
2210
|
-
return (
|
|
2211
|
-
var
|
|
2212
|
-
const _ =
|
|
2213
|
-
return x(), W("div",
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
(
|
|
2211
|
+
return (v, g) => {
|
|
2212
|
+
var T, V;
|
|
2213
|
+
const _ = K("FmStepperField"), c = K("FmButtonGroup"), w = K("FmButton");
|
|
2214
|
+
return x(), W("div", Sl, [
|
|
2215
|
+
k("div", null, [
|
|
2216
|
+
k("label", Vl, H(b(l)("mf-kitchen.editor.columnWidth")), 1),
|
|
2217
|
+
(T = t.selectedWidgetColumn.width) != null && T.type ? (x(), ye(_, {
|
|
2217
2218
|
key: 0,
|
|
2218
|
-
"model-value": ((
|
|
2219
|
+
"model-value": ((V = t.selectedWidgetColumn.width) == null ? void 0 : V.value) ?? null,
|
|
2219
2220
|
max: 720,
|
|
2220
2221
|
min: 1,
|
|
2221
2222
|
step: 1,
|
|
2222
|
-
rules: [(
|
|
2223
|
-
"onUpdate:modelValue":
|
|
2224
|
-
}, null, 8, ["model-value", "rules"])) : (x(), W("label",
|
|
2225
|
-
|
|
2223
|
+
rules: [(y) => y <= 720 || b(l)("mf-kitchen.editor.validation.columnWidthMax")],
|
|
2224
|
+
"onUpdate:modelValue": O
|
|
2225
|
+
}, null, 8, ["model-value", "rules"])) : (x(), W("label", kl, H(b(l)("mf-kitchen.editor.autoWidth")), 1)),
|
|
2226
|
+
S(c, {
|
|
2226
2227
|
"model-value": f.value,
|
|
2227
2228
|
items: p,
|
|
2228
|
-
"onUpdate:modelValue":
|
|
2229
|
+
"onUpdate:modelValue": C
|
|
2229
2230
|
}, null, 8, ["model-value"])
|
|
2230
2231
|
]),
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
"model-value":
|
|
2232
|
+
k("div", xl, [
|
|
2233
|
+
k("label", Il, H(b(l)("mf-kitchen.editor.spacing")), 1),
|
|
2234
|
+
k("div", Dl, [
|
|
2235
|
+
S(_, {
|
|
2236
|
+
"model-value": v.modelValue.padding.top,
|
|
2236
2237
|
min: 0,
|
|
2237
2238
|
step: 1,
|
|
2238
|
-
label:
|
|
2239
|
-
"onUpdate:modelValue":
|
|
2239
|
+
label: b(l)("mf-kitchen.editor.alignmentTop"),
|
|
2240
|
+
"onUpdate:modelValue": g[0] || (g[0] = (y) => $("top", y))
|
|
2240
2241
|
}, null, 8, ["model-value", "label"]),
|
|
2241
|
-
|
|
2242
|
-
"model-value":
|
|
2242
|
+
S(_, {
|
|
2243
|
+
"model-value": v.modelValue.padding.bottom,
|
|
2243
2244
|
min: 0,
|
|
2244
2245
|
step: 1,
|
|
2245
|
-
label:
|
|
2246
|
-
"onUpdate:modelValue":
|
|
2246
|
+
label: b(l)("mf-kitchen.editor.alignmentBottom"),
|
|
2247
|
+
"onUpdate:modelValue": g[1] || (g[1] = (y) => $("bottom", y))
|
|
2247
2248
|
}, null, 8, ["model-value", "label"]),
|
|
2248
|
-
|
|
2249
|
-
"model-value":
|
|
2249
|
+
S(_, {
|
|
2250
|
+
"model-value": v.modelValue.padding.left,
|
|
2250
2251
|
min: 0,
|
|
2251
2252
|
step: 1,
|
|
2252
|
-
label:
|
|
2253
|
-
"onUpdate:modelValue":
|
|
2253
|
+
label: b(l)("mf-kitchen.editor.alignmentLeft"),
|
|
2254
|
+
"onUpdate:modelValue": g[2] || (g[2] = (y) => $("left", y))
|
|
2254
2255
|
}, null, 8, ["model-value", "label"]),
|
|
2255
|
-
|
|
2256
|
-
"model-value":
|
|
2256
|
+
S(_, {
|
|
2257
|
+
"model-value": v.modelValue.padding.right,
|
|
2257
2258
|
min: 0,
|
|
2258
2259
|
step: 1,
|
|
2259
|
-
label:
|
|
2260
|
-
"onUpdate:modelValue":
|
|
2260
|
+
label: b(l)("mf-kitchen.editor.alignmentRight"),
|
|
2261
|
+
"onUpdate:modelValue": g[3] || (g[3] = (y) => $("right", y))
|
|
2261
2262
|
}, null, 8, ["model-value", "label"])
|
|
2262
2263
|
])
|
|
2263
2264
|
]),
|
|
2264
|
-
|
|
2265
|
-
"model-value":
|
|
2265
|
+
S(_, {
|
|
2266
|
+
"model-value": v.modelValue.height ?? 0,
|
|
2266
2267
|
min: 0,
|
|
2267
2268
|
step: 1,
|
|
2268
|
-
label:
|
|
2269
|
-
"onUpdate:modelValue":
|
|
2269
|
+
label: b(l)("mf-kitchen.editor.size"),
|
|
2270
|
+
"onUpdate:modelValue": g[4] || (g[4] = (y) => E("height", y))
|
|
2270
2271
|
}, null, 8, ["model-value", "label"]),
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
(x(), W(
|
|
2276
|
-
w
|
|
2272
|
+
k("div", Fl, [
|
|
2273
|
+
k("label", Ol, H(b(l)("mf-kitchen.editor.alignment")), 1),
|
|
2274
|
+
k("div", Al, [
|
|
2275
|
+
k("div", Rl, [
|
|
2276
|
+
(x(), W(_e, null, Se(r, (y) => k("div", { key: y }, [
|
|
2277
|
+
S(w, {
|
|
2277
2278
|
variant: "tertiary",
|
|
2278
2279
|
size: "md",
|
|
2279
2280
|
class: "alignButtonBorder",
|
|
2280
|
-
icon: u(
|
|
2281
|
-
iconColor:
|
|
2282
|
-
bgColor:
|
|
2283
|
-
onClick: (
|
|
2281
|
+
icon: u(y),
|
|
2282
|
+
iconColor: z(i.value === y),
|
|
2283
|
+
bgColor: L(i.value === y),
|
|
2284
|
+
onClick: (N) => B(y)
|
|
2284
2285
|
}, null, 8, ["icon", "iconColor", "bgColor", "onClick"])
|
|
2285
2286
|
])), 64))
|
|
2286
2287
|
]),
|
|
2287
|
-
|
|
2288
|
-
(x(), W(
|
|
2289
|
-
w
|
|
2288
|
+
k("div", Wl, [
|
|
2289
|
+
(x(), W(_e, null, Se(s, (y) => k("div", { key: y }, [
|
|
2290
|
+
S(w, {
|
|
2290
2291
|
variant: "tertiary",
|
|
2291
2292
|
size: "md",
|
|
2292
2293
|
class: "alignButtonBorder",
|
|
2293
|
-
icon: d(
|
|
2294
|
-
iconColor:
|
|
2295
|
-
bgColor:
|
|
2296
|
-
onClick: (
|
|
2294
|
+
icon: d(y),
|
|
2295
|
+
iconColor: z(a.value === y),
|
|
2296
|
+
bgColor: L(a.value === y),
|
|
2297
|
+
onClick: (N) => q(y)
|
|
2297
2298
|
}, null, 8, ["icon", "iconColor", "bgColor", "onClick"])
|
|
2298
2299
|
])), 64))
|
|
2299
2300
|
])
|
|
@@ -2303,7 +2304,7 @@ const Tl = /* @__PURE__ */ St(El, [["__scopeId", "data-v-4bfaa477"]]), wl = { cl
|
|
|
2303
2304
|
};
|
|
2304
2305
|
}
|
|
2305
2306
|
});
|
|
2306
|
-
const He = /* @__PURE__ */ St(
|
|
2307
|
+
const He = /* @__PURE__ */ St(Nl, [["__scopeId", "data-v-0475415b"]]), Pl = /* @__PURE__ */ ee({
|
|
2307
2308
|
__name: "FormatColorButton",
|
|
2308
2309
|
props: {
|
|
2309
2310
|
isFormatColor: { type: Boolean },
|
|
@@ -2319,11 +2320,11 @@ const He = /* @__PURE__ */ St(Wl, [["__scopeId", "data-v-4c013ae2"]]), Nl = /* @
|
|
|
2319
2320
|
return s ? "neutral-gray-100" : "";
|
|
2320
2321
|
}
|
|
2321
2322
|
function i(s) {
|
|
2322
|
-
const r = s ===
|
|
2323
|
+
const r = s === A.F_PRINT_COLOR.Enum.COLORED ? A.F_PRINT_COLOR.Enum.BLACK : A.F_PRINT_COLOR.Enum.COLORED;
|
|
2323
2324
|
n("update:model-value", r);
|
|
2324
2325
|
}
|
|
2325
2326
|
return (s, r) => {
|
|
2326
|
-
const d =
|
|
2327
|
+
const d = K("FmButton");
|
|
2327
2328
|
return x(), ye(d, {
|
|
2328
2329
|
variant: "tertiary",
|
|
2329
2330
|
size: "md",
|
|
@@ -2336,7 +2337,7 @@ const He = /* @__PURE__ */ St(Wl, [["__scopeId", "data-v-4c013ae2"]]), Nl = /* @
|
|
|
2336
2337
|
};
|
|
2337
2338
|
}
|
|
2338
2339
|
});
|
|
2339
|
-
const kt = /* @__PURE__ */ St(
|
|
2340
|
+
const kt = /* @__PURE__ */ St(Pl, [["__scopeId", "data-v-bee8f17f"]]), Ll = { class: "gap" }, $l = { class: "fm-typo--body-lg-600 mb-2" }, Bl = { class: "fm-typo-en-body-md-600" }, Ml = { class: "flex flex-wrap gap-[8px]" }, Ul = { class: "fm-typo-en-body-lg-600" }, Xl = { class: "flex flex-row gap-2" }, zl = { class: "fm-typo-en-body-lg-600" }, Yl = { class: "flex flex-row gap-2" }, Gl = /* @__PURE__ */ ee({
|
|
2340
2341
|
__name: "TextWidgetEditor",
|
|
2341
2342
|
props: {
|
|
2342
2343
|
modelValue: {},
|
|
@@ -2345,172 +2346,172 @@ const kt = /* @__PURE__ */ St(Nl, [["__scopeId", "data-v-bee8f17f"]]), Pl = { cl
|
|
|
2345
2346
|
},
|
|
2346
2347
|
emits: ["update:model-value", "update:selected-widget-column"],
|
|
2347
2348
|
setup(e, { emit: o }) {
|
|
2348
|
-
const t = e, n = o, l =
|
|
2349
|
-
function
|
|
2349
|
+
const t = e, n = o, l = P(() => t.modelValue.textAlign == A.F_TEXT_ALIGN.Enum.LEFT), a = P(() => t.modelValue.textAlign == A.F_TEXT_ALIGN.Enum.CENTER), i = P(() => t.modelValue.textAlign == A.F_TEXT_ALIGN.Enum.RIGHT), s = P(() => t.modelValue.isBold), r = P(() => t.modelValue.isItalic), d = P(() => t.modelValue.isUnderline), u = P(() => t.modelValue.isInvert ?? !1), m = P(() => t.modelValue.color ?? A.F_PRINT_COLOR.Enum.BLACK), p = P(() => m.value == A.F_PRINT_COLOR.Enum.COLORED), f = j(lt.receipt.schema()), { t: O, locale: C } = me();
|
|
2350
|
+
function E(L, v) {
|
|
2350
2351
|
n("update:model-value", {
|
|
2351
2352
|
...t.modelValue,
|
|
2352
|
-
[
|
|
2353
|
+
[L]: v
|
|
2353
2354
|
});
|
|
2354
2355
|
}
|
|
2355
|
-
function
|
|
2356
|
+
function $(L) {
|
|
2356
2357
|
n("update:selected-widget-column", {
|
|
2357
2358
|
...t.selectedWidgetColumn,
|
|
2358
|
-
|
|
2359
|
+
...L
|
|
2359
2360
|
});
|
|
2360
2361
|
}
|
|
2361
|
-
function
|
|
2362
|
-
let
|
|
2363
|
-
switch (
|
|
2364
|
-
case
|
|
2365
|
-
|
|
2362
|
+
function q(L) {
|
|
2363
|
+
let v = A.F_WIDGET_ALIGNMENT.Enum.CENTER;
|
|
2364
|
+
switch (L) {
|
|
2365
|
+
case A.F_TEXT_ALIGN.Enum.LEFT:
|
|
2366
|
+
v = A.F_WIDGET_ALIGNMENT.Enum.CENTER_LEFT;
|
|
2366
2367
|
break;
|
|
2367
|
-
case
|
|
2368
|
-
|
|
2368
|
+
case A.F_TEXT_ALIGN.Enum.CENTER:
|
|
2369
|
+
v = A.F_WIDGET_ALIGNMENT.Enum.CENTER;
|
|
2369
2370
|
break;
|
|
2370
|
-
case
|
|
2371
|
-
|
|
2371
|
+
case A.F_TEXT_ALIGN.Enum.RIGHT:
|
|
2372
|
+
v = A.F_WIDGET_ALIGNMENT.Enum.CENTER_RIGHT;
|
|
2372
2373
|
break;
|
|
2373
2374
|
}
|
|
2374
2375
|
n("update:model-value", {
|
|
2375
2376
|
...t.modelValue,
|
|
2376
|
-
alignment:
|
|
2377
|
-
textAlign:
|
|
2377
|
+
alignment: v,
|
|
2378
|
+
textAlign: L
|
|
2378
2379
|
});
|
|
2379
2380
|
}
|
|
2380
|
-
function B(
|
|
2381
|
-
return
|
|
2381
|
+
function B(L) {
|
|
2382
|
+
return L ? "neutral-gray-400" : "neutral-gray-300";
|
|
2382
2383
|
}
|
|
2383
|
-
function
|
|
2384
|
-
return
|
|
2384
|
+
function Y(L) {
|
|
2385
|
+
return L ? "neutral-gray-100" : "";
|
|
2385
2386
|
}
|
|
2386
|
-
function
|
|
2387
|
-
const
|
|
2388
|
-
|
|
2387
|
+
function z(L) {
|
|
2388
|
+
const v = (t.modelValue.value || "") + `${L}`;
|
|
2389
|
+
E("value", v);
|
|
2389
2390
|
}
|
|
2390
2391
|
return Ye(
|
|
2391
|
-
() =>
|
|
2392
|
+
() => C.value,
|
|
2392
2393
|
() => {
|
|
2393
2394
|
f.value = lt.receipt.schema();
|
|
2394
2395
|
}
|
|
2395
|
-
), (
|
|
2396
|
-
const
|
|
2397
|
-
return x(), W("div",
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
"model-value":
|
|
2401
|
-
"selected-widget-column":
|
|
2402
|
-
"onUpdate:modelValue":
|
|
2403
|
-
|
|
2404
|
-
...
|
|
2396
|
+
), (L, v) => {
|
|
2397
|
+
const g = K("FmTextField"), _ = K("FmButton");
|
|
2398
|
+
return x(), W("div", Ll, [
|
|
2399
|
+
k("label", $l, H(b(O)("mf-kitchen.editor.textWidget")), 1),
|
|
2400
|
+
S(He, {
|
|
2401
|
+
"model-value": L.modelValue,
|
|
2402
|
+
"selected-widget-column": L.selectedWidgetColumn,
|
|
2403
|
+
"onUpdate:modelValue": v[0] || (v[0] = (c) => n("update:model-value", {
|
|
2404
|
+
...L.modelValue,
|
|
2405
|
+
...c
|
|
2405
2406
|
})),
|
|
2406
|
-
"onUpdate:selectedWidgetColumn":
|
|
2407
|
+
"onUpdate:selectedWidgetColumn": v[1] || (v[1] = (c) => $(c))
|
|
2407
2408
|
}, null, 8, ["model-value", "selected-widget-column"]),
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
"model-value":
|
|
2411
|
-
label:
|
|
2412
|
-
"onUpdate:modelValue":
|
|
2409
|
+
k("label", Bl, H(b(O)("mf-kitchen.editor.editor")), 1),
|
|
2410
|
+
S(g, {
|
|
2411
|
+
"model-value": L.modelValue.value,
|
|
2412
|
+
label: b(O)("mf-kitchen.editor.text"),
|
|
2413
|
+
"onUpdate:modelValue": v[2] || (v[2] = (c) => E("value", c))
|
|
2413
2414
|
}, null, 8, ["model-value", "label"]),
|
|
2414
|
-
|
|
2415
|
-
(x(!0), W(
|
|
2416
|
-
|
|
2415
|
+
k("div", Ml, [
|
|
2416
|
+
(x(!0), W(_e, null, Se(f.value[L.sectionType], (c, w) => (x(), W("div", { key: w }, [
|
|
2417
|
+
S(_, {
|
|
2417
2418
|
variant: "tertiary",
|
|
2418
2419
|
size: "md",
|
|
2419
|
-
label:
|
|
2420
|
+
label: c.label,
|
|
2420
2421
|
bgColor: "neutral-gray-100",
|
|
2421
|
-
onClick: (
|
|
2422
|
+
onClick: (T) => z(c.variable)
|
|
2422
2423
|
}, null, 8, ["label", "onClick"])
|
|
2423
2424
|
]))), 128))
|
|
2424
2425
|
]),
|
|
2425
|
-
|
|
2426
|
-
"model-value":
|
|
2427
|
-
label:
|
|
2426
|
+
S(g, {
|
|
2427
|
+
"model-value": L.modelValue.factor,
|
|
2428
|
+
label: b(O)("mf-kitchen.editor.scale"),
|
|
2428
2429
|
type: "number",
|
|
2429
|
-
rules: [(
|
|
2430
|
-
"onUpdate:modelValue":
|
|
2431
|
-
const
|
|
2432
|
-
|
|
2430
|
+
rules: [(c) => c >= 0.1 || b(O)("mf-kitchen.editor.validation.scale")],
|
|
2431
|
+
"onUpdate:modelValue": v[3] || (v[3] = (c) => {
|
|
2432
|
+
const w = Math.max(0.1, Number(c));
|
|
2433
|
+
E("factor", w);
|
|
2433
2434
|
})
|
|
2434
2435
|
}, null, 8, ["model-value", "label", "rules"]),
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2436
|
+
k("label", Ul, H(b(O)("mf-kitchen.editor.textAlignment")), 1),
|
|
2437
|
+
k("div", Xl, [
|
|
2438
|
+
S(_, {
|
|
2438
2439
|
variant: "tertiary",
|
|
2439
2440
|
size: "md",
|
|
2440
2441
|
class: "buttonBorder",
|
|
2441
2442
|
icon: "format_align_left",
|
|
2442
2443
|
iconColor: B(l.value),
|
|
2443
|
-
bgColor:
|
|
2444
|
-
onClick:
|
|
2444
|
+
bgColor: Y(l.value),
|
|
2445
|
+
onClick: v[4] || (v[4] = (c) => q(b(A.F_TEXT_ALIGN).Enum.LEFT))
|
|
2445
2446
|
}, null, 8, ["iconColor", "bgColor"]),
|
|
2446
|
-
|
|
2447
|
+
S(_, {
|
|
2447
2448
|
variant: "tertiary",
|
|
2448
2449
|
size: "md",
|
|
2449
2450
|
class: "buttonBorder",
|
|
2450
2451
|
icon: "format_align_center",
|
|
2451
2452
|
iconColor: B(a.value),
|
|
2452
|
-
bgColor:
|
|
2453
|
-
onClick:
|
|
2453
|
+
bgColor: Y(a.value),
|
|
2454
|
+
onClick: v[5] || (v[5] = (c) => q(b(A.F_TEXT_ALIGN).Enum.CENTER))
|
|
2454
2455
|
}, null, 8, ["iconColor", "bgColor"]),
|
|
2455
|
-
|
|
2456
|
+
S(_, {
|
|
2456
2457
|
variant: "tertiary",
|
|
2457
2458
|
size: "md",
|
|
2458
2459
|
class: "buttonBorder",
|
|
2459
2460
|
icon: "format_align_right",
|
|
2460
2461
|
iconColor: B(i.value),
|
|
2461
|
-
bgColor:
|
|
2462
|
-
onClick:
|
|
2462
|
+
bgColor: Y(i.value),
|
|
2463
|
+
onClick: v[6] || (v[6] = (c) => q(b(A.F_TEXT_ALIGN).Enum.RIGHT))
|
|
2463
2464
|
}, null, 8, ["iconColor", "bgColor"])
|
|
2464
2465
|
]),
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2466
|
+
k("label", zl, H(b(O)("mf-kitchen.editor.textStyle")), 1),
|
|
2467
|
+
k("div", Yl, [
|
|
2468
|
+
S(_, {
|
|
2468
2469
|
variant: "tertiary",
|
|
2469
2470
|
size: "md",
|
|
2470
2471
|
class: "buttonBorder",
|
|
2471
2472
|
icon: "format_bold",
|
|
2472
2473
|
iconColor: B(s.value),
|
|
2473
|
-
bgColor:
|
|
2474
|
-
onClick:
|
|
2474
|
+
bgColor: Y(s.value),
|
|
2475
|
+
onClick: v[7] || (v[7] = (c) => E("isBold", !t.modelValue.isBold))
|
|
2475
2476
|
}, null, 8, ["iconColor", "bgColor"]),
|
|
2476
|
-
|
|
2477
|
+
S(_, {
|
|
2477
2478
|
variant: "tertiary",
|
|
2478
2479
|
size: "md",
|
|
2479
2480
|
class: "buttonBorder",
|
|
2480
2481
|
icon: "format_italic",
|
|
2481
2482
|
iconColor: B(r.value),
|
|
2482
|
-
bgColor:
|
|
2483
|
-
onClick:
|
|
2483
|
+
bgColor: Y(r.value),
|
|
2484
|
+
onClick: v[8] || (v[8] = (c) => E("isItalic", !t.modelValue.isItalic))
|
|
2484
2485
|
}, null, 8, ["iconColor", "bgColor"]),
|
|
2485
|
-
|
|
2486
|
+
S(_, {
|
|
2486
2487
|
variant: "tertiary",
|
|
2487
2488
|
size: "md",
|
|
2488
2489
|
class: "buttonBorder",
|
|
2489
2490
|
icon: "format_underlined",
|
|
2490
2491
|
iconColor: B(d.value),
|
|
2491
|
-
bgColor:
|
|
2492
|
-
onClick:
|
|
2492
|
+
bgColor: Y(d.value),
|
|
2493
|
+
onClick: v[9] || (v[9] = (c) => E("isUnderline", !t.modelValue.isUnderline))
|
|
2493
2494
|
}, null, 8, ["iconColor", "bgColor"]),
|
|
2494
|
-
|
|
2495
|
+
S(_, {
|
|
2495
2496
|
variant: "tertiary",
|
|
2496
2497
|
size: "md",
|
|
2497
2498
|
class: "buttonBorder",
|
|
2498
2499
|
icon: "ink_highlighter",
|
|
2499
2500
|
iconColor: B(u.value),
|
|
2500
|
-
bgColor:
|
|
2501
|
-
onClick:
|
|
2501
|
+
bgColor: Y(u.value),
|
|
2502
|
+
onClick: v[10] || (v[10] = (c) => E("isInvert", !t.modelValue.isInvert))
|
|
2502
2503
|
}, null, 8, ["iconColor", "bgColor"]),
|
|
2503
|
-
|
|
2504
|
+
S(kt, {
|
|
2504
2505
|
"is-format-color": p.value,
|
|
2505
|
-
"selected-format-color":
|
|
2506
|
-
"onUpdate:modelValue":
|
|
2506
|
+
"selected-format-color": m.value,
|
|
2507
|
+
"onUpdate:modelValue": v[11] || (v[11] = (c) => E("color", c))
|
|
2507
2508
|
}, null, 8, ["is-format-color", "selected-format-color"])
|
|
2508
2509
|
])
|
|
2509
2510
|
]);
|
|
2510
2511
|
};
|
|
2511
2512
|
}
|
|
2512
2513
|
});
|
|
2513
|
-
const
|
|
2514
|
+
const Hl = /* @__PURE__ */ St(Gl, [["__scopeId", "data-v-3d715f0b"]]), jl = { class: "gap" }, Kl = { class: "fm-typo--body-lg-600 mb-2" }, ql = { class: "fm-typo-en-body-md-600" }, Zl = { class: "fm-typo-en-body-lg-600" }, Jl = /* @__PURE__ */ ee({
|
|
2514
2515
|
__name: "CheckboxWidgetEditor",
|
|
2515
2516
|
props: {
|
|
2516
2517
|
modelValue: {},
|
|
@@ -2518,7 +2519,7 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
2518
2519
|
},
|
|
2519
2520
|
emits: ["update:model-value", "update:selected-widget-column"],
|
|
2520
2521
|
setup(e, { emit: o }) {
|
|
2521
|
-
const t = e, n = o, { t: l } = me(), a =
|
|
2522
|
+
const t = e, n = o, { t: l } = me(), a = P(() => t.modelValue.color ?? A.F_PRINT_COLOR.Enum.BLACK), i = P(() => a.value == A.F_PRINT_COLOR.Enum.COLORED);
|
|
2522
2523
|
function s(d) {
|
|
2523
2524
|
n("update:selected-widget-column", {
|
|
2524
2525
|
...t.selectedWidgetColumn,
|
|
@@ -2532,10 +2533,10 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
2532
2533
|
});
|
|
2533
2534
|
}
|
|
2534
2535
|
return (d, u) => {
|
|
2535
|
-
const
|
|
2536
|
-
return x(), W("div",
|
|
2537
|
-
|
|
2538
|
-
|
|
2536
|
+
const m = K("FmTextField");
|
|
2537
|
+
return x(), W("div", jl, [
|
|
2538
|
+
k("label", Kl, H(b(l)("mf-kitchen.editor.checkboxWidget")), 1),
|
|
2539
|
+
S(He, {
|
|
2539
2540
|
"model-value": {
|
|
2540
2541
|
padding: d.modelValue.padding,
|
|
2541
2542
|
alignment: d.modelValue.alignment,
|
|
@@ -2546,19 +2547,19 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
2546
2547
|
"onUpdate:modelValue": u[0] || (u[0] = (p) => n("update:model-value", { ...d.modelValue, ...p })),
|
|
2547
2548
|
"onUpdate:selectedWidgetColumn": u[1] || (u[1] = (p) => s(p))
|
|
2548
2549
|
}, null, 8, ["model-value", "selected-widget-column"]),
|
|
2549
|
-
|
|
2550
|
-
|
|
2550
|
+
k("label", ql, H(b(l)("mf-kitchen.editor.editor")), 1),
|
|
2551
|
+
S(m, {
|
|
2551
2552
|
"model-value": d.modelValue.size,
|
|
2552
|
-
label:
|
|
2553
|
+
label: b(l)("mf-kitchen.editor.size"),
|
|
2553
2554
|
type: "number",
|
|
2554
|
-
rules: [(p) => p >= 1 ||
|
|
2555
|
+
rules: [(p) => p >= 1 || b(l)("mf-kitchen.editor.validation.minOne")],
|
|
2555
2556
|
"onUpdate:modelValue": u[2] || (u[2] = (p) => {
|
|
2556
2557
|
const f = Math.max(1, Number(p));
|
|
2557
2558
|
r(f);
|
|
2558
2559
|
})
|
|
2559
2560
|
}, null, 8, ["model-value", "label", "rules"]),
|
|
2560
|
-
|
|
2561
|
-
|
|
2561
|
+
k("label", Zl, H(b(l)("mf-kitchen.editor.textStyle")), 1),
|
|
2562
|
+
S(kt, {
|
|
2562
2563
|
class: "w-fit",
|
|
2563
2564
|
"is-format-color": i.value,
|
|
2564
2565
|
"selected-format-color": a.value,
|
|
@@ -2567,7 +2568,7 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
2567
2568
|
]);
|
|
2568
2569
|
};
|
|
2569
2570
|
}
|
|
2570
|
-
}),
|
|
2571
|
+
}), Ql = { class: "gap" }, ei = { class: "fm-typo--body-lg-600 mb-2" }, ti = /* @__PURE__ */ ee({
|
|
2571
2572
|
__name: "SpacerWidgetEditor",
|
|
2572
2573
|
props: {
|
|
2573
2574
|
modelValue: {},
|
|
@@ -2582,9 +2583,9 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
2582
2583
|
...i
|
|
2583
2584
|
});
|
|
2584
2585
|
}
|
|
2585
|
-
return (i, s) => (x(), W("div",
|
|
2586
|
-
|
|
2587
|
-
|
|
2586
|
+
return (i, s) => (x(), W("div", Ql, [
|
|
2587
|
+
k("label", ei, H(b(l)("mf-kitchen.editor.spacerWidget")), 1),
|
|
2588
|
+
S(He, {
|
|
2588
2589
|
"model-value": {
|
|
2589
2590
|
padding: i.modelValue.padding,
|
|
2590
2591
|
alignment: i.modelValue.alignment,
|
|
@@ -2597,7 +2598,7 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
2597
2598
|
}, null, 8, ["model-value", "selected-widget-column"])
|
|
2598
2599
|
]));
|
|
2599
2600
|
}
|
|
2600
|
-
}),
|
|
2601
|
+
}), oi = { class: "gap" }, ni = { class: "fm-typo-en-body-lg-600 mb-2" }, li = { class: "fm-typo-en-body-md-600" }, ii = { class: "flex flex-row gap-[24px]" }, ai = /* @__PURE__ */ ee({
|
|
2601
2602
|
__name: "ImageWidgetEditor",
|
|
2602
2603
|
props: {
|
|
2603
2604
|
modelValue: {},
|
|
@@ -2619,10 +2620,10 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
2619
2620
|
});
|
|
2620
2621
|
}
|
|
2621
2622
|
return (r, d) => {
|
|
2622
|
-
const u =
|
|
2623
|
-
return x(), W("div",
|
|
2624
|
-
|
|
2625
|
-
|
|
2623
|
+
const u = K("FmTextField");
|
|
2624
|
+
return x(), W("div", oi, [
|
|
2625
|
+
k("label", ni, H(b(l)("mf-kitchen.editor.imageWidget")), 1),
|
|
2626
|
+
S(He, {
|
|
2626
2627
|
"model-value": {
|
|
2627
2628
|
padding: r.modelValue.padding,
|
|
2628
2629
|
alignment: r.modelValue.alignment,
|
|
@@ -2630,33 +2631,33 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
2630
2631
|
type: r.modelValue.type
|
|
2631
2632
|
},
|
|
2632
2633
|
"selected-widget-column": r.selectedWidgetColumn,
|
|
2633
|
-
"onUpdate:modelValue": d[0] || (d[0] = (
|
|
2634
|
-
"onUpdate:selectedWidgetColumn": d[1] || (d[1] = (
|
|
2634
|
+
"onUpdate:modelValue": d[0] || (d[0] = (m) => n("update:model-value", { ...r.modelValue, ...m })),
|
|
2635
|
+
"onUpdate:selectedWidgetColumn": d[1] || (d[1] = (m) => s(m))
|
|
2635
2636
|
}, null, 8, ["model-value", "selected-widget-column"]),
|
|
2636
|
-
|
|
2637
|
-
|
|
2637
|
+
k("label", li, H(b(l)("mf-kitchen.editor.editor")), 1),
|
|
2638
|
+
S(an, {
|
|
2638
2639
|
"model-value": r.modelValue.imgData,
|
|
2639
|
-
"onUpdate:modelValue": d[2] || (d[2] = (
|
|
2640
|
-
title:
|
|
2640
|
+
"onUpdate:modelValue": d[2] || (d[2] = (m) => a((p) => ({ ...p, imgData: m }))),
|
|
2641
|
+
title: b(l)("mf-kitchen.editor.image")
|
|
2641
2642
|
}, null, 8, ["model-value", "title"]),
|
|
2642
|
-
|
|
2643
|
-
|
|
2643
|
+
k("div", ii, [
|
|
2644
|
+
S(u, {
|
|
2644
2645
|
"model-value": r.modelValue.height,
|
|
2645
|
-
label:
|
|
2646
|
+
label: b(l)("mf-kitchen.editor.height"),
|
|
2646
2647
|
type: "number",
|
|
2647
|
-
rules: [(
|
|
2648
|
-
"onUpdate:modelValue": d[3] || (d[3] = (
|
|
2649
|
-
const p = Math.max(1, Number(
|
|
2648
|
+
rules: [(m) => m >= 1 || b(l)("mf-kitchen.editor.validation.minOne")],
|
|
2649
|
+
"onUpdate:modelValue": d[3] || (d[3] = (m) => {
|
|
2650
|
+
const p = Math.max(1, Number(m));
|
|
2650
2651
|
i("height", p);
|
|
2651
2652
|
})
|
|
2652
2653
|
}, null, 8, ["model-value", "label", "rules"]),
|
|
2653
|
-
|
|
2654
|
+
S(u, {
|
|
2654
2655
|
"model-value": r.modelValue.width,
|
|
2655
|
-
label:
|
|
2656
|
+
label: b(l)("mf-kitchen.editor.width"),
|
|
2656
2657
|
type: "number",
|
|
2657
|
-
rules: [(
|
|
2658
|
-
"onUpdate:modelValue": d[4] || (d[4] = (
|
|
2659
|
-
const p = Math.max(1, Number(
|
|
2658
|
+
rules: [(m) => m >= 1 || b(l)("mf-kitchen.editor.validation.minOne")],
|
|
2659
|
+
"onUpdate:modelValue": d[4] || (d[4] = (m) => {
|
|
2660
|
+
const p = Math.max(1, Number(m));
|
|
2660
2661
|
i("width", p);
|
|
2661
2662
|
})
|
|
2662
2663
|
}, null, 8, ["model-value", "label", "rules"])
|
|
@@ -2664,7 +2665,7 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
2664
2665
|
]);
|
|
2665
2666
|
};
|
|
2666
2667
|
}
|
|
2667
|
-
}),
|
|
2668
|
+
}), ri = { class: "gap" }, si = { class: "fm-typo--body-lg-600 mb-2" }, di = { class: "fm-typo-en-body-md-600" }, ui = { class: "flex flex-wrap gap-[8px]" }, ci = { class: "fm-typo-en-body-lg-600" }, mi = /* @__PURE__ */ ee({
|
|
2668
2669
|
__name: "QrCodeWidgetEditor",
|
|
2669
2670
|
props: {
|
|
2670
2671
|
modelValue: {},
|
|
@@ -2673,7 +2674,7 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
2673
2674
|
},
|
|
2674
2675
|
emits: ["update:model-value", "update:selected-widget-column"],
|
|
2675
2676
|
setup(e, { emit: o }) {
|
|
2676
|
-
const t = e, n = o, l =
|
|
2677
|
+
const t = e, n = o, l = P(() => t.modelValue.color ?? A.F_PRINT_COLOR.Enum.BLACK), a = P(() => l.value == A.F_PRINT_COLOR.Enum.COLORED), i = lt.receipt.schema(), { t: s } = me();
|
|
2677
2678
|
function r(p) {
|
|
2678
2679
|
n("update:model-value", { ...t.modelValue, link: p });
|
|
2679
2680
|
}
|
|
@@ -2687,22 +2688,22 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
2687
2688
|
const f = (t.modelValue.link || "") + `${p}`;
|
|
2688
2689
|
r(f);
|
|
2689
2690
|
}
|
|
2690
|
-
function
|
|
2691
|
+
function m(p) {
|
|
2691
2692
|
const f = {
|
|
2692
2693
|
...t.modelValue,
|
|
2693
2694
|
...p
|
|
2694
2695
|
};
|
|
2695
2696
|
if ("height" in p) {
|
|
2696
|
-
const
|
|
2697
|
-
f.height =
|
|
2697
|
+
const O = p.height === null ? 160 : p.height;
|
|
2698
|
+
f.height = O, f.size = O;
|
|
2698
2699
|
}
|
|
2699
2700
|
n("update:model-value", f);
|
|
2700
2701
|
}
|
|
2701
2702
|
return (p, f) => {
|
|
2702
|
-
const
|
|
2703
|
-
return x(), W("div",
|
|
2704
|
-
|
|
2705
|
-
|
|
2703
|
+
const O = K("FmTextField"), C = K("FmButton");
|
|
2704
|
+
return x(), W("div", ri, [
|
|
2705
|
+
k("label", si, H(b(s)("mf-kitchen.editor.qrCodeWidget")), 1),
|
|
2706
|
+
S(He, {
|
|
2706
2707
|
"model-value": {
|
|
2707
2708
|
padding: p.modelValue.padding,
|
|
2708
2709
|
alignment: p.modelValue.alignment,
|
|
@@ -2710,37 +2711,37 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
2710
2711
|
type: p.modelValue.type
|
|
2711
2712
|
},
|
|
2712
2713
|
"selected-widget-column": p.selectedWidgetColumn,
|
|
2713
|
-
"onUpdate:modelValue": f[0] || (f[0] = (
|
|
2714
|
-
"onUpdate:selectedWidgetColumn": f[1] || (f[1] = (
|
|
2714
|
+
"onUpdate:modelValue": f[0] || (f[0] = (E) => m(E)),
|
|
2715
|
+
"onUpdate:selectedWidgetColumn": f[1] || (f[1] = (E) => d(E))
|
|
2715
2716
|
}, null, 8, ["model-value", "selected-widget-column"]),
|
|
2716
|
-
|
|
2717
|
-
|
|
2717
|
+
k("label", di, H(b(s)("mf-kitchen.editor.editor")), 1),
|
|
2718
|
+
S(O, {
|
|
2718
2719
|
"model-value": p.modelValue.link,
|
|
2719
|
-
label:
|
|
2720
|
-
"onUpdate:modelValue": f[2] || (f[2] = (
|
|
2720
|
+
label: b(s)("mf-kitchen.editor.text"),
|
|
2721
|
+
"onUpdate:modelValue": f[2] || (f[2] = (E) => r(E))
|
|
2721
2722
|
}, null, 8, ["model-value", "label"]),
|
|
2722
|
-
|
|
2723
|
-
(x(!0), W(
|
|
2724
|
-
|
|
2723
|
+
k("div", ui, [
|
|
2724
|
+
(x(!0), W(_e, null, Se(b(i)[p.sectionType], (E, $) => (x(), W("div", { key: $ }, [
|
|
2725
|
+
S(C, {
|
|
2725
2726
|
variant: "tertiary",
|
|
2726
2727
|
size: "md",
|
|
2727
|
-
label:
|
|
2728
|
+
label: b(s)(`${E.label}`),
|
|
2728
2729
|
bgColor: "neutral-gray-100",
|
|
2729
|
-
onClick: (
|
|
2730
|
+
onClick: (q) => u(E.variable)
|
|
2730
2731
|
}, null, 8, ["label", "onClick"])
|
|
2731
2732
|
]))), 128))
|
|
2732
2733
|
]),
|
|
2733
|
-
|
|
2734
|
-
|
|
2734
|
+
k("label", ci, H(b(s)("mf-kitchen.editor.textStyle")), 1),
|
|
2735
|
+
S(kt, {
|
|
2735
2736
|
class: "w-fit",
|
|
2736
2737
|
"is-format-color": a.value,
|
|
2737
2738
|
"selected-format-color": l.value,
|
|
2738
|
-
"onUpdate:modelValue": f[3] || (f[3] = (
|
|
2739
|
+
"onUpdate:modelValue": f[3] || (f[3] = (E) => n("update:model-value", { ...p.modelValue, color: E }))
|
|
2739
2740
|
}, null, 8, ["is-format-color", "selected-format-color"])
|
|
2740
2741
|
]);
|
|
2741
2742
|
};
|
|
2742
2743
|
}
|
|
2743
|
-
}),
|
|
2744
|
+
}), pi = { class: "gap" }, fi = { class: "fm-typo--body-lg-600 mb-2" }, gi = { class: "fm-typo-en-body-md-600" }, hi = { class: "fm-typo-en-body-lg-600" }, vi = /* @__PURE__ */ ee({
|
|
2744
2745
|
__name: "DividerWidgetEditor",
|
|
2745
2746
|
props: {
|
|
2746
2747
|
modelValue: {},
|
|
@@ -2748,7 +2749,7 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
2748
2749
|
},
|
|
2749
2750
|
emits: ["update:model-value", "update:selected-widget-column"],
|
|
2750
2751
|
setup(e, { emit: o }) {
|
|
2751
|
-
const t = e, n = o, { t: l } = me(), a =
|
|
2752
|
+
const t = e, n = o, { t: l } = me(), a = P(() => t.modelValue.color ?? A.F_PRINT_COLOR.Enum.BLACK), i = P(() => a.value == A.F_PRINT_COLOR.Enum.COLORED);
|
|
2752
2753
|
function s(d) {
|
|
2753
2754
|
n("update:selected-widget-column", {
|
|
2754
2755
|
...t.selectedWidgetColumn,
|
|
@@ -2762,10 +2763,10 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
2762
2763
|
});
|
|
2763
2764
|
}
|
|
2764
2765
|
return (d, u) => {
|
|
2765
|
-
const
|
|
2766
|
-
return x(), W("div",
|
|
2767
|
-
|
|
2768
|
-
|
|
2766
|
+
const m = K("FmTextField");
|
|
2767
|
+
return x(), W("div", pi, [
|
|
2768
|
+
k("label", fi, H(b(l)("mf-kitchen.editor.dividerWidget")), 1),
|
|
2769
|
+
S(He, {
|
|
2769
2770
|
"model-value": {
|
|
2770
2771
|
padding: d.modelValue.padding,
|
|
2771
2772
|
alignment: d.modelValue.alignment,
|
|
@@ -2776,19 +2777,19 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
2776
2777
|
"onUpdate:modelValue": u[0] || (u[0] = (p) => n("update:model-value", { ...d.modelValue, ...p })),
|
|
2777
2778
|
"onUpdate:selectedWidgetColumn": u[1] || (u[1] = (p) => s(p))
|
|
2778
2779
|
}, null, 8, ["model-value", "selected-widget-column"]),
|
|
2779
|
-
|
|
2780
|
-
|
|
2780
|
+
k("label", gi, H(b(l)("mf-kitchen.editor.editor")), 1),
|
|
2781
|
+
S(m, {
|
|
2781
2782
|
"model-value": d.modelValue.thickness,
|
|
2782
|
-
label:
|
|
2783
|
+
label: b(l)("mf-kitchen.editor.thickness"),
|
|
2783
2784
|
type: "number",
|
|
2784
|
-
rules: [(p) => p >= 1 ||
|
|
2785
|
+
rules: [(p) => p >= 1 || b(l)("mf-kitchen.editor.validation.minOne")],
|
|
2785
2786
|
"onUpdate:modelValue": u[2] || (u[2] = (p) => {
|
|
2786
2787
|
const f = Math.max(1, Number(p));
|
|
2787
2788
|
r(f);
|
|
2788
2789
|
})
|
|
2789
2790
|
}, null, 8, ["model-value", "label", "rules"]),
|
|
2790
|
-
|
|
2791
|
-
|
|
2791
|
+
k("label", hi, H(b(l)("mf-kitchen.editor.textStyle")), 1),
|
|
2792
|
+
S(kt, {
|
|
2792
2793
|
class: "w-fit",
|
|
2793
2794
|
"is-format-color": i.value,
|
|
2794
2795
|
"selected-format-color": a.value,
|
|
@@ -2797,7 +2798,7 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
2797
2798
|
]);
|
|
2798
2799
|
};
|
|
2799
2800
|
}
|
|
2800
|
-
}),
|
|
2801
|
+
}), bi = { class: "px-[24px] py-[16px] overflow-y-auto" }, yi = { key: 0 }, _i = { key: 1 }, Ci = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary mb-3" }, Ei = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ti = /* @__PURE__ */ ee({
|
|
2801
2802
|
__name: "EditingPanel",
|
|
2802
2803
|
props: {
|
|
2803
2804
|
selectedWidget: {},
|
|
@@ -2807,13 +2808,13 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
2807
2808
|
emits: ["update:widget", "update:selected-widget-column"],
|
|
2808
2809
|
setup(e, { emit: o }) {
|
|
2809
2810
|
const t = e, n = o, { t: l } = me(), a = {
|
|
2810
|
-
TEXT:
|
|
2811
|
+
TEXT: Hl,
|
|
2811
2812
|
CHECKBOX: Jl,
|
|
2812
|
-
EMPTY:
|
|
2813
|
-
IMAGE:
|
|
2814
|
-
QR:
|
|
2813
|
+
EMPTY: ti,
|
|
2814
|
+
IMAGE: ai,
|
|
2815
|
+
QR: mi,
|
|
2815
2816
|
DIVIDER: vi
|
|
2816
|
-
}, i =
|
|
2817
|
+
}, i = P(() => t.selectedWidget ? a[t.selectedWidget.config.data.type] : null);
|
|
2817
2818
|
function s(d) {
|
|
2818
2819
|
if (t.selectedWidget) {
|
|
2819
2820
|
const u = { ...t.selectedWidget };
|
|
@@ -2829,8 +2830,8 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
2829
2830
|
function r(d) {
|
|
2830
2831
|
n("update:selected-widget-column", d);
|
|
2831
2832
|
}
|
|
2832
|
-
return (d, u) => (x(), W("div",
|
|
2833
|
-
d.selectedWidget ? (x(), W("div",
|
|
2833
|
+
return (d, u) => (x(), W("div", bi, [
|
|
2834
|
+
d.selectedWidget ? (x(), W("div", yi, [
|
|
2834
2835
|
i.value ? (x(), ye(_o(i.value), {
|
|
2835
2836
|
key: 0,
|
|
2836
2837
|
"model-value": d.selectedWidget.config.data,
|
|
@@ -2838,18 +2839,18 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
2838
2839
|
"selected-widget-column": d.selectedWidgetColumn,
|
|
2839
2840
|
"onUpdate:modelValue": s,
|
|
2840
2841
|
"onUpdate:selectedWidgetColumn": r
|
|
2841
|
-
}, null, 40, ["model-value", "section-type", "selected-widget-column"])) :
|
|
2842
|
-
])) : (x(), W("div",
|
|
2843
|
-
|
|
2844
|
-
|
|
2842
|
+
}, null, 40, ["model-value", "section-type", "selected-widget-column"])) : Ne("", !0)
|
|
2843
|
+
])) : (x(), W("div", _i, [
|
|
2844
|
+
k("h2", Ci, H(b(l)("mf-kitchen.designPanel")), 1),
|
|
2845
|
+
k("p", Ei, H(b(l)("mf-kitchen.editorDescription")), 1)
|
|
2845
2846
|
]))
|
|
2846
2847
|
]));
|
|
2847
2848
|
}
|
|
2848
|
-
}),
|
|
2849
|
+
}), wi = { class: "gap" }, Si = { class: "fm-typo-en-body-lg-600" }, Vi = /* @__PURE__ */ ee({
|
|
2849
2850
|
__name: "WidgetsComponent",
|
|
2850
2851
|
emits: ["removeSelectedWidget"],
|
|
2851
2852
|
setup(e, { emit: o }) {
|
|
2852
|
-
const t = o, { t: n } = me(), l =
|
|
2853
|
+
const t = o, { t: n } = me(), l = P(() => [
|
|
2853
2854
|
{ data: rn(), name: n("mf-kitchen.editor.spacer"), icon: "add" },
|
|
2854
2855
|
{ data: Co(), name: n("mf-kitchen.editor.text"), icon: "title" },
|
|
2855
2856
|
{ data: sn(), name: n("mf-kitchen.editor.checkbox"), icon: "check_box" },
|
|
@@ -2861,12 +2862,12 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
2861
2862
|
t("removeSelectedWidget", !0);
|
|
2862
2863
|
}
|
|
2863
2864
|
return (s, r) => {
|
|
2864
|
-
const d =
|
|
2865
|
-
return x(), W("div",
|
|
2866
|
-
|
|
2867
|
-
|
|
2865
|
+
const d = K("FmIcon"), u = K("FmCardSection"), m = K("FmCard"), p = K("v-list");
|
|
2866
|
+
return x(), W("div", wi, [
|
|
2867
|
+
k("label", Si, H(b(n)("mf-kitchen.editor.widget_plural")), 1),
|
|
2868
|
+
S(p, null, {
|
|
2868
2869
|
default: be(() => [
|
|
2869
|
-
|
|
2870
|
+
S(b(nt), {
|
|
2870
2871
|
modelValue: l.value,
|
|
2871
2872
|
"onUpdate:modelValue": r[0] || (r[0] = (f) => l.value = f),
|
|
2872
2873
|
"item-key": "id",
|
|
@@ -2877,22 +2878,22 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
2877
2878
|
class: "grid grid-cols-2 gap-x-[24px] gap-y-[15px] cursor-grab"
|
|
2878
2879
|
}, {
|
|
2879
2880
|
default: be(() => [
|
|
2880
|
-
(x(!0), W(
|
|
2881
|
+
(x(!0), W(_e, null, Se(l.value, (f) => (x(), W("div", {
|
|
2881
2882
|
key: f.name
|
|
2882
2883
|
}, [
|
|
2883
|
-
|
|
2884
|
+
S(m, {
|
|
2884
2885
|
variant: "outlined",
|
|
2885
2886
|
class: "flex flex-col justify-center items-center p-[16px]"
|
|
2886
2887
|
}, {
|
|
2887
2888
|
default: be(() => [
|
|
2888
|
-
|
|
2889
|
+
S(d, {
|
|
2889
2890
|
name: f.icon,
|
|
2890
2891
|
size: "md",
|
|
2891
2892
|
class: "mb-[5px] text-fm-color-neutral-gray-400"
|
|
2892
2893
|
}, null, 8, ["name"]),
|
|
2893
|
-
|
|
2894
|
+
S(u, { class: "p-0" }, {
|
|
2894
2895
|
default: be(() => [
|
|
2895
|
-
|
|
2896
|
+
Jo(H(f.name), 1)
|
|
2896
2897
|
]),
|
|
2897
2898
|
_: 2
|
|
2898
2899
|
}, 1024)
|
|
@@ -2909,7 +2910,7 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
2909
2910
|
]);
|
|
2910
2911
|
};
|
|
2911
2912
|
}
|
|
2912
|
-
}),
|
|
2913
|
+
}), ki = { class: "flex flex-col justify-between w-[420px]" }, xi = { class: "flex flex-col px-[24px] py-[16px] overflow-y-auto gap-24" }, Ii = { class: "flex flex-col gap-2" }, Di = { class: "fm-typo-en-body-lg-600" }, Fi = { class: "fm-typo-en-body-lg-600" }, Oi = { class: "p-[16px] fm-shadow-light-300" }, Ai = /* @__PURE__ */ ee({
|
|
2913
2914
|
__name: "AdvanceModeLeftPanel",
|
|
2914
2915
|
props: {
|
|
2915
2916
|
receiptInfo: {},
|
|
@@ -2920,91 +2921,121 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
2920
2921
|
setup(e, { emit: o }) {
|
|
2921
2922
|
const t = e, n = o, l = mn(() => {
|
|
2922
2923
|
n("reset");
|
|
2923
|
-
}), { t: a, locale: i } = me(), s = j(lt.receipt.schema()), r =
|
|
2924
|
+
}), { t: a, locale: i } = me(), s = j(lt.receipt.schema()), r = P(
|
|
2924
2925
|
() => Object.entries(s.value).flatMap(
|
|
2925
|
-
([
|
|
2926
|
-
|
|
2927
|
-
sectionType:
|
|
2926
|
+
([C, E]) => E.map(($) => ({
|
|
2927
|
+
...$,
|
|
2928
|
+
sectionType: C
|
|
2928
2929
|
}))
|
|
2929
2930
|
)
|
|
2930
|
-
), d =
|
|
2931
|
-
() => r.value.map((
|
|
2931
|
+
), d = P(
|
|
2932
|
+
() => r.value.map((C) => ({
|
|
2932
2933
|
data: {
|
|
2933
2934
|
...Co(),
|
|
2934
|
-
value:
|
|
2935
|
+
value: C.variable
|
|
2935
2936
|
},
|
|
2936
|
-
name:
|
|
2937
|
-
sectionType:
|
|
2937
|
+
name: C.label,
|
|
2938
|
+
sectionType: C.sectionType
|
|
2938
2939
|
}))
|
|
2939
|
-
), u =
|
|
2940
|
-
() => t.selectedWidgetSectionType ? d.value.filter((
|
|
2941
|
-
)
|
|
2942
|
-
|
|
2943
|
-
return
|
|
2940
|
+
), u = P(
|
|
2941
|
+
() => t.selectedWidgetSectionType ? d.value.filter((C) => C.sectionType === t.selectedWidgetSectionType) : d.value
|
|
2942
|
+
), m = P(() => {
|
|
2943
|
+
var C;
|
|
2944
|
+
return !((C = t.template) != null && C.billItemsDisplayMode) || t.template.billItemsDisplayMode === "DETAILED";
|
|
2945
|
+
});
|
|
2946
|
+
function p(C) {
|
|
2947
|
+
return JSON.parse(JSON.stringify(C));
|
|
2944
2948
|
}
|
|
2945
|
-
function
|
|
2946
|
-
n("updateReceiptTemplate",
|
|
2949
|
+
function f(C) {
|
|
2950
|
+
n("updateReceiptTemplate", C(t.template));
|
|
2947
2951
|
}
|
|
2948
|
-
function
|
|
2949
|
-
const
|
|
2950
|
-
n("variableSectionType",
|
|
2952
|
+
function O(C) {
|
|
2953
|
+
const E = u.value[C.oldIndex];
|
|
2954
|
+
n("variableSectionType", E.sectionType);
|
|
2951
2955
|
}
|
|
2952
2956
|
return Ye(
|
|
2953
2957
|
() => i.value,
|
|
2954
2958
|
() => {
|
|
2955
2959
|
s.value = lt.receipt.schema();
|
|
2956
2960
|
}
|
|
2957
|
-
), (
|
|
2958
|
-
var
|
|
2959
|
-
const
|
|
2960
|
-
return x(), W("div",
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2961
|
+
), (C, E) => {
|
|
2962
|
+
var z, L, v, g, _;
|
|
2963
|
+
const $ = K("FmSwitch"), q = K("FmStepperField"), B = K("FmButton"), Y = K("v-list");
|
|
2964
|
+
return x(), W("div", ki, [
|
|
2965
|
+
k("div", xi, [
|
|
2966
|
+
k("div", Ii, [
|
|
2967
|
+
k("label", Di, H(b(a)("mf-kitchen.receiptSetting")), 1),
|
|
2968
|
+
C.receiptInfo ? (x(), ye(pn, {
|
|
2965
2969
|
key: 0,
|
|
2966
|
-
"model-value":
|
|
2967
|
-
"
|
|
2968
|
-
|
|
2970
|
+
"model-value": C.receiptInfo,
|
|
2971
|
+
"bill-items-display-mode": (z = C.template) == null ? void 0 : z.billItemsDisplayMode,
|
|
2972
|
+
"hide-hide-settings": !0,
|
|
2973
|
+
"onUpdate:modelValue": E[0] || (E[0] = (c) => n("updateReceiptInfo", c))
|
|
2974
|
+
}, null, 8, ["model-value", "bill-items-display-mode"])) : Ne("", !0),
|
|
2975
|
+
m.value ? (x(), W(_e, { key: 1 }, [
|
|
2976
|
+
S($, {
|
|
2977
|
+
"model-value": ((L = C.template) == null ? void 0 : L.hideProductCode) ?? C.receiptInfo.hideProductCode ?? !1,
|
|
2978
|
+
label: b(a)("mf-kitchen.editor.hideProductCode"),
|
|
2979
|
+
"label-placement": "left",
|
|
2980
|
+
class: "receiptSettingSwitch",
|
|
2981
|
+
"onUpdate:modelValue": E[1] || (E[1] = (c) => f((w) => ({ ...w, hideProductCode: c })))
|
|
2982
|
+
}, null, 8, ["model-value", "label"]),
|
|
2983
|
+
S($, {
|
|
2984
|
+
"model-value": ((v = C.template) == null ? void 0 : v.hideZeroPriceItem) ?? C.receiptInfo.hideZeroPriceItem ?? !1,
|
|
2985
|
+
label: b(a)("mf-kitchen.editor.hideItemWithZeroPrice"),
|
|
2986
|
+
"label-placement": "left",
|
|
2987
|
+
class: "receiptSettingSwitch",
|
|
2988
|
+
"onUpdate:modelValue": E[2] || (E[2] = (c) => f((w) => ({ ...w, hideZeroPriceItem: c })))
|
|
2989
|
+
}, null, 8, ["model-value", "label"]),
|
|
2990
|
+
S($, {
|
|
2991
|
+
"model-value": ((g = C.template) == null ? void 0 : g.hideZeroPriceAddon) ?? C.receiptInfo.hideZeroPriceAddon ?? !1,
|
|
2992
|
+
label: b(a)("mf-kitchen.editor.hideAddonWithZeroPrice"),
|
|
2993
|
+
"label-placement": "left",
|
|
2994
|
+
class: "receiptSettingSwitch",
|
|
2995
|
+
"onUpdate:modelValue": E[3] || (E[3] = (c) => f((w) => ({ ...w, hideZeroPriceAddon: c })))
|
|
2996
|
+
}, null, 8, ["model-value", "label"])
|
|
2997
|
+
], 64)) : Ne("", !0)
|
|
2969
2998
|
]),
|
|
2970
|
-
|
|
2971
|
-
"model-value": ((
|
|
2999
|
+
S(q, {
|
|
3000
|
+
"model-value": ((_ = t.template) == null ? void 0 : _.fontSize) ?? 12,
|
|
2972
3001
|
max: 40,
|
|
2973
3002
|
min: 1,
|
|
2974
3003
|
step: 1,
|
|
2975
|
-
label:
|
|
2976
|
-
rules: [(
|
|
2977
|
-
"onUpdate:modelValue":
|
|
2978
|
-
|
|
2979
|
-
|
|
3004
|
+
label: b(a)("mf-kitchen.editor.overallFontSize"),
|
|
3005
|
+
rules: [(c) => c <= 40 || "More than 40"],
|
|
3006
|
+
"onUpdate:modelValue": E[4] || (E[4] = (c) => {
|
|
3007
|
+
f((w) => ({
|
|
3008
|
+
...w,
|
|
3009
|
+
fontSize: typeof c == "number" && Number.isFinite(c) ? Math.min(c, 40) : w.fontSize
|
|
3010
|
+
}));
|
|
2980
3011
|
})
|
|
2981
3012
|
}, null, 8, ["model-value", "label", "rules"]),
|
|
2982
|
-
|
|
2983
|
-
onRemoveSelectedWidget:
|
|
3013
|
+
S(Vi, {
|
|
3014
|
+
onRemoveSelectedWidget: E[5] || (E[5] = (c) => n("removeSelectedWidget", c))
|
|
2984
3015
|
}),
|
|
2985
|
-
|
|
2986
|
-
|
|
3016
|
+
k("label", Fi, H(b(a)("mf-kitchen.editor.variable_plural")), 1),
|
|
3017
|
+
S(Y, null, {
|
|
2987
3018
|
default: be(() => [
|
|
2988
|
-
|
|
3019
|
+
S(b(nt), {
|
|
2989
3020
|
modelValue: u.value,
|
|
2990
|
-
"onUpdate:modelValue":
|
|
3021
|
+
"onUpdate:modelValue": E[6] || (E[6] = (c) => u.value = c),
|
|
2991
3022
|
"item-key": "name",
|
|
2992
3023
|
group: { name: "widgets", pull: "clone", put: !1 },
|
|
2993
3024
|
sort: !1,
|
|
2994
|
-
clone:
|
|
2995
|
-
onStart:
|
|
2996
|
-
|
|
3025
|
+
clone: p,
|
|
3026
|
+
onStart: E[7] || (E[7] = (c) => {
|
|
3027
|
+
O(c), n("removeSelectedWidget", !0);
|
|
2997
3028
|
}),
|
|
2998
3029
|
class: "flex flex-wrap gap-[8px] cursor-grab"
|
|
2999
3030
|
}, {
|
|
3000
3031
|
default: be(() => [
|
|
3001
|
-
(x(!0), W(
|
|
3002
|
-
key:
|
|
3032
|
+
(x(!0), W(_e, null, Se(u.value, (c) => (x(), W("div", {
|
|
3033
|
+
key: c.name
|
|
3003
3034
|
}, [
|
|
3004
|
-
|
|
3035
|
+
S(B, {
|
|
3005
3036
|
variant: "secondary",
|
|
3006
3037
|
size: "md",
|
|
3007
|
-
label:
|
|
3038
|
+
label: c.name
|
|
3008
3039
|
}, null, 8, ["label"])
|
|
3009
3040
|
]))), 128))
|
|
3010
3041
|
]),
|
|
@@ -3014,13 +3045,13 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
3014
3045
|
_: 1
|
|
3015
3046
|
})
|
|
3016
3047
|
]),
|
|
3017
|
-
|
|
3018
|
-
|
|
3048
|
+
k("div", Oi, [
|
|
3049
|
+
S(B, {
|
|
3019
3050
|
class: "w-full",
|
|
3020
3051
|
variant: "secondary",
|
|
3021
|
-
label:
|
|
3052
|
+
label: b(a)("mf-kitchen.resetToDefault"),
|
|
3022
3053
|
size: "md",
|
|
3023
|
-
onClick:
|
|
3054
|
+
onClick: b(l)
|
|
3024
3055
|
}, null, 8, ["label", "onClick"])
|
|
3025
3056
|
])
|
|
3026
3057
|
]);
|
|
@@ -3036,21 +3067,21 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
3036
3067
|
setup(e) {
|
|
3037
3068
|
const o = e, t = j(!1), { t: n } = me();
|
|
3038
3069
|
return (l, a) => {
|
|
3039
|
-
const i =
|
|
3070
|
+
const i = K("FmButton"), s = K("FmDialog");
|
|
3040
3071
|
return x(), ye(s, {
|
|
3041
3072
|
modelValue: t.value,
|
|
3042
3073
|
"onUpdate:modelValue": a[0] || (a[0] = (r) => t.value = r),
|
|
3043
3074
|
overlay: !0
|
|
3044
3075
|
}, {
|
|
3045
3076
|
"dialog-button": be(() => [
|
|
3046
|
-
|
|
3077
|
+
S(i, {
|
|
3047
3078
|
variant: "primary",
|
|
3048
|
-
label:
|
|
3079
|
+
label: b(n)("mf-kitchen.preview")
|
|
3049
3080
|
}, null, 8, ["label"])
|
|
3050
3081
|
]),
|
|
3051
3082
|
default: be(() => [
|
|
3052
|
-
|
|
3053
|
-
|
|
3083
|
+
k("div", null, [
|
|
3084
|
+
S(fn, {
|
|
3054
3085
|
"receipt-info": o.receiptInfo,
|
|
3055
3086
|
profile: o.profile,
|
|
3056
3087
|
"receipt-template": o.receiptTemplate
|
|
@@ -3061,13 +3092,13 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
3061
3092
|
}, 8, ["modelValue"]);
|
|
3062
3093
|
};
|
|
3063
3094
|
}
|
|
3064
|
-
}),
|
|
3095
|
+
}), Wi = { class: "h-full flex flex-col" }, Ni = { class: "flex flex-row min-h-0" }, Pi = { class: "flex flex-col flex-1" }, Li = { class: "templateBuilderHeader" }, $i = { class: "fm-typo-en-body-lg-600" }, Bi = { class: "flex flex-row gap-2" }, Mi = {
|
|
3065
3096
|
key: 0,
|
|
3066
3097
|
class: "h-full flex justify-center items-center"
|
|
3067
|
-
},
|
|
3098
|
+
}, Ui = { class: "flex flex-col justify-between w-[420px]" }, Xi = {
|
|
3068
3099
|
key: 0,
|
|
3069
3100
|
class: "p-[16px] fm-shadow-light-300"
|
|
3070
|
-
},
|
|
3101
|
+
}, Ki = /* @__PURE__ */ ee({
|
|
3071
3102
|
__name: "AdvanceModeView",
|
|
3072
3103
|
props: {
|
|
3073
3104
|
profile: {
|
|
@@ -3077,36 +3108,36 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
3077
3108
|
},
|
|
3078
3109
|
emits: ["change-mode"],
|
|
3079
3110
|
setup(e, { emit: o }) {
|
|
3080
|
-
const t = Eo(), { t: n } = me(), l =
|
|
3081
|
-
var
|
|
3082
|
-
if (
|
|
3083
|
-
return
|
|
3084
|
-
if (
|
|
3111
|
+
const t = Eo(), { t: n } = me(), l = bn(), a = j(), i = j(), s = j(), r = j(), d = j([]), u = j([]), m = j(null), p = P(() => {
|
|
3112
|
+
var M;
|
|
3113
|
+
if (O.value !== null)
|
|
3114
|
+
return O.value;
|
|
3115
|
+
if (m.value == null)
|
|
3085
3116
|
return null;
|
|
3086
|
-
const
|
|
3087
|
-
return (
|
|
3088
|
-
}), f = j(null),
|
|
3089
|
-
var
|
|
3090
|
-
return ((
|
|
3117
|
+
const I = (M = u.value) == null ? void 0 : M[m.value.position.row];
|
|
3118
|
+
return (I == null ? void 0 : I.sectionType) ?? null;
|
|
3119
|
+
}), f = j(null), O = j(null), C = j(null), E = j(null), $ = j(!1), q = P(() => {
|
|
3120
|
+
var I;
|
|
3121
|
+
return ((I = r.value) == null ? void 0 : I.fontSize) ?? 12;
|
|
3091
3122
|
});
|
|
3092
|
-
function B(
|
|
3093
|
-
|
|
3094
|
-
const
|
|
3095
|
-
f.value = (
|
|
3096
|
-
}
|
|
3097
|
-
function
|
|
3098
|
-
const { row:
|
|
3099
|
-
u.value = u.value.map((
|
|
3100
|
-
if (xt ===
|
|
3101
|
-
const dt =
|
|
3123
|
+
function B(I) {
|
|
3124
|
+
m.value = I;
|
|
3125
|
+
const M = u.value[I.position.row];
|
|
3126
|
+
f.value = (M == null ? void 0 : M.columns[I.position.col]) ?? null, O.value = null;
|
|
3127
|
+
}
|
|
3128
|
+
function Y(I) {
|
|
3129
|
+
const { row: M, col: ae, cell: we } = I.position;
|
|
3130
|
+
u.value = u.value.map((Ie, xt) => {
|
|
3131
|
+
if (xt === M) {
|
|
3132
|
+
const dt = Ie.columns.map((je, Xo) => {
|
|
3102
3133
|
if (Xo === ae) {
|
|
3103
|
-
const zo = je.cells.map((
|
|
3104
|
-
...
|
|
3134
|
+
const zo = je.cells.map((It, Yo) => Yo === we ? {
|
|
3135
|
+
...It,
|
|
3105
3136
|
data: {
|
|
3106
|
-
...
|
|
3107
|
-
...
|
|
3137
|
+
...It.data,
|
|
3138
|
+
...I.config.data
|
|
3108
3139
|
}
|
|
3109
|
-
} :
|
|
3140
|
+
} : It);
|
|
3110
3141
|
return {
|
|
3111
3142
|
...je,
|
|
3112
3143
|
cells: zo
|
|
@@ -3115,108 +3146,111 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
3115
3146
|
return je;
|
|
3116
3147
|
});
|
|
3117
3148
|
return {
|
|
3118
|
-
...
|
|
3149
|
+
...Ie,
|
|
3119
3150
|
columns: dt
|
|
3120
3151
|
};
|
|
3121
3152
|
}
|
|
3122
|
-
return
|
|
3123
|
-
}),
|
|
3124
|
-
...
|
|
3125
|
-
...
|
|
3153
|
+
return Ie;
|
|
3154
|
+
}), m.value && (m.value.config.data = {
|
|
3155
|
+
...m.value.config.data,
|
|
3156
|
+
...I.config.data
|
|
3126
3157
|
});
|
|
3127
3158
|
}
|
|
3128
|
-
function
|
|
3129
|
-
if (!
|
|
3159
|
+
function z(I) {
|
|
3160
|
+
if (!m.value)
|
|
3130
3161
|
return;
|
|
3131
|
-
const { row:
|
|
3132
|
-
u.value = u.value.map((
|
|
3133
|
-
if (
|
|
3134
|
-
return
|
|
3135
|
-
const xt =
|
|
3162
|
+
const { row: M, col: ae } = m.value.position;
|
|
3163
|
+
u.value = u.value.map((we, Ie) => {
|
|
3164
|
+
if (Ie !== M)
|
|
3165
|
+
return we;
|
|
3166
|
+
const xt = we.columns.map((dt, je) => je !== ae ? dt : {
|
|
3136
3167
|
...dt,
|
|
3137
|
-
...
|
|
3168
|
+
...I
|
|
3138
3169
|
});
|
|
3139
3170
|
return {
|
|
3140
|
-
...
|
|
3171
|
+
...we,
|
|
3141
3172
|
columns: xt
|
|
3142
3173
|
};
|
|
3143
|
-
}), f.value =
|
|
3174
|
+
}), f.value = I;
|
|
3144
3175
|
}
|
|
3145
|
-
function
|
|
3146
|
-
const { row:
|
|
3147
|
-
u.value[
|
|
3176
|
+
function L(I) {
|
|
3177
|
+
const { row: M, col: ae, cell: we } = I.position;
|
|
3178
|
+
u.value[M].columns[ae].cells.splice(we, 1), u.value[M].columns[ae].cells.length === 0 && u.value[M].columns.splice(ae, 1), u.value[M].columns.length === 0 && u.value.splice(M, 1), m.value = null;
|
|
3148
3179
|
}
|
|
3149
|
-
const
|
|
3150
|
-
function
|
|
3151
|
-
|
|
3180
|
+
const v = o;
|
|
3181
|
+
function g() {
|
|
3182
|
+
v("change-mode", "normal");
|
|
3152
3183
|
}
|
|
3153
3184
|
async function _() {
|
|
3154
3185
|
try {
|
|
3155
|
-
if (
|
|
3186
|
+
if ($.value = !0, !r.value || !i.value)
|
|
3156
3187
|
return;
|
|
3157
3188
|
r.value.template = Qt(u.value);
|
|
3158
|
-
const
|
|
3159
|
-
|
|
3160
|
-
const
|
|
3161
|
-
|
|
3189
|
+
const I = await Jt.updateTemplate(r.value);
|
|
3190
|
+
y(I);
|
|
3191
|
+
const M = await Zt.updateInfo(i.value);
|
|
3192
|
+
V(M), m.value = null, t.open(
|
|
3162
3193
|
{
|
|
3163
3194
|
title: n("mf-kitchen.template.save.success", { file: n("mf-kitchen.receiptTemplate") }),
|
|
3164
3195
|
type: "success"
|
|
3165
3196
|
},
|
|
3166
3197
|
2e3
|
|
3167
3198
|
);
|
|
3168
|
-
} catch {
|
|
3199
|
+
} catch (I) {
|
|
3169
3200
|
t.open(
|
|
3170
3201
|
{
|
|
3171
3202
|
title: n("mf-kitchen.template.save.failed", { file: n("mf-kitchen.receiptTemplate") }),
|
|
3203
|
+
message: vn(I),
|
|
3172
3204
|
type: "error"
|
|
3173
3205
|
},
|
|
3174
3206
|
3e3
|
|
3175
3207
|
);
|
|
3208
|
+
} finally {
|
|
3209
|
+
$.value = !1;
|
|
3176
3210
|
}
|
|
3177
3211
|
}
|
|
3178
|
-
function
|
|
3179
|
-
s.value =
|
|
3212
|
+
function c(I) {
|
|
3213
|
+
s.value = I, r.value = I;
|
|
3180
3214
|
}
|
|
3181
|
-
function
|
|
3182
|
-
i.value =
|
|
3215
|
+
function w(I) {
|
|
3216
|
+
i.value = I;
|
|
3183
3217
|
}
|
|
3184
|
-
function
|
|
3185
|
-
r.value =
|
|
3218
|
+
function T(I) {
|
|
3219
|
+
r.value = I;
|
|
3186
3220
|
}
|
|
3187
|
-
function
|
|
3188
|
-
a.value =
|
|
3221
|
+
function V(I) {
|
|
3222
|
+
a.value = I, i.value = I;
|
|
3189
3223
|
}
|
|
3190
|
-
function
|
|
3191
|
-
u.value =
|
|
3192
|
-
(
|
|
3224
|
+
function y(I) {
|
|
3225
|
+
u.value = I.template.flatMap(
|
|
3226
|
+
(M) => M.group.rows.map((ae) => ({ ...ae, sectionType: M.type }))
|
|
3193
3227
|
), d.value = JSON.parse(JSON.stringify(u.value));
|
|
3194
3228
|
}
|
|
3195
|
-
function
|
|
3196
|
-
i.value = a.value, r.value = s.value, u.value = JSON.parse(JSON.stringify(d.value)),
|
|
3229
|
+
function N() {
|
|
3230
|
+
i.value = a.value, r.value = s.value, u.value = JSON.parse(JSON.stringify(d.value)), m.value = null, f.value = null;
|
|
3197
3231
|
}
|
|
3198
|
-
function G(
|
|
3199
|
-
const
|
|
3200
|
-
!
|
|
3232
|
+
function G(I) {
|
|
3233
|
+
const M = C.value, ae = E.value;
|
|
3234
|
+
!M || !ae || M.contains(I.target) && !ae.contains(I.target) && (m.value = null);
|
|
3201
3235
|
}
|
|
3202
|
-
function le(
|
|
3203
|
-
|
|
3236
|
+
function le(I) {
|
|
3237
|
+
I && (m.value = null);
|
|
3204
3238
|
}
|
|
3205
|
-
function
|
|
3206
|
-
|
|
3239
|
+
function Te(I) {
|
|
3240
|
+
O.value = I;
|
|
3207
3241
|
}
|
|
3208
3242
|
return bo(async () => {
|
|
3209
3243
|
try {
|
|
3210
3244
|
await l.readRestaurants();
|
|
3211
|
-
const
|
|
3212
|
-
|
|
3213
|
-
const
|
|
3214
|
-
|
|
3215
|
-
} catch (
|
|
3245
|
+
const I = await Zt.readInfo();
|
|
3246
|
+
V(I);
|
|
3247
|
+
const M = await Jt.readTemplate();
|
|
3248
|
+
c(M), y(M), document.addEventListener("click", G);
|
|
3249
|
+
} catch (I) {
|
|
3216
3250
|
t.open(
|
|
3217
3251
|
{
|
|
3218
3252
|
title: n("mf-kitchen.template.load.fail", { file: n("mf-kitchen.receiptTemplate") }),
|
|
3219
|
-
message: `${
|
|
3253
|
+
message: `${I}`,
|
|
3220
3254
|
type: "error"
|
|
3221
3255
|
},
|
|
3222
3256
|
3e3
|
|
@@ -3224,89 +3258,89 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
3224
3258
|
}
|
|
3225
3259
|
}), Qo(() => {
|
|
3226
3260
|
document.removeEventListener("click", G);
|
|
3227
|
-
}), (
|
|
3228
|
-
const ae =
|
|
3229
|
-
return x(), W("div",
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
i.value && r.value ? (x(), ye(
|
|
3261
|
+
}), (I, M) => {
|
|
3262
|
+
const ae = K("FmButton"), we = K("FmCircularProgress");
|
|
3263
|
+
return x(), W("div", Wi, [
|
|
3264
|
+
S(gn),
|
|
3265
|
+
S(hn, { onUpdateTemplate: _ }),
|
|
3266
|
+
k("div", Ni, [
|
|
3267
|
+
i.value && r.value ? (x(), ye(Ai, {
|
|
3234
3268
|
key: 0,
|
|
3235
3269
|
"receipt-info": i.value,
|
|
3236
3270
|
template: r.value,
|
|
3237
3271
|
selectedWidgetSectionType: p.value,
|
|
3238
|
-
onUpdateReceiptInfo:
|
|
3239
|
-
onUpdateReceiptTemplate:
|
|
3240
|
-
onReset:
|
|
3272
|
+
onUpdateReceiptInfo: w,
|
|
3273
|
+
onUpdateReceiptTemplate: T,
|
|
3274
|
+
onReset: N,
|
|
3241
3275
|
onRemoveSelectedWidget: le,
|
|
3242
|
-
onVariableSectionType:
|
|
3243
|
-
}, null, 8, ["receipt-info", "template", "selectedWidgetSectionType"])) :
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3276
|
+
onVariableSectionType: Te
|
|
3277
|
+
}, null, 8, ["receipt-info", "template", "selectedWidgetSectionType"])) : Ne("", !0),
|
|
3278
|
+
k("div", Pi, [
|
|
3279
|
+
k("div", Li, [
|
|
3280
|
+
k("label", $i, H(b(n)("mf-kitchen.advanceTemplateBuilder")), 1),
|
|
3281
|
+
k("div", Bi, [
|
|
3248
3282
|
i.value && e.profile && r.value ? (x(), ye(Ri, {
|
|
3249
3283
|
key: 0,
|
|
3250
3284
|
"receipt-info": i.value,
|
|
3251
3285
|
profile: e.profile,
|
|
3252
3286
|
"receipt-template": {
|
|
3253
3287
|
...r.value,
|
|
3254
|
-
template:
|
|
3288
|
+
template: b(Qt)(u.value)
|
|
3255
3289
|
}
|
|
3256
|
-
}, null, 8, ["receipt-info", "profile", "receipt-template"])) :
|
|
3257
|
-
|
|
3290
|
+
}, null, 8, ["receipt-info", "profile", "receipt-template"])) : Ne("", !0),
|
|
3291
|
+
S(ae, {
|
|
3258
3292
|
variant: "secondary",
|
|
3259
|
-
label:
|
|
3293
|
+
label: b(n)("mf-kitchen.returnToBasicMode"),
|
|
3260
3294
|
"text-color": "primary",
|
|
3261
3295
|
bgColor: "typo-white",
|
|
3262
3296
|
"border-color": "primary",
|
|
3263
|
-
onClick:
|
|
3297
|
+
onClick: g
|
|
3264
3298
|
}, null, 8, ["label"])
|
|
3265
3299
|
])
|
|
3266
3300
|
]),
|
|
3267
|
-
|
|
3301
|
+
k("div", {
|
|
3268
3302
|
class: "h-full flex justify-center py-10 overflow-y-auto bg-fm-color-neutral-gray-100",
|
|
3269
3303
|
ref_key: "receiptEditorRef",
|
|
3270
|
-
ref:
|
|
3304
|
+
ref: C
|
|
3271
3305
|
}, [
|
|
3272
|
-
|
|
3273
|
-
|
|
3306
|
+
$.value ? (x(), W("div", Mi, [
|
|
3307
|
+
S(we, { size: "xxl" })
|
|
3274
3308
|
])) : (x(), W("div", {
|
|
3275
3309
|
key: 1,
|
|
3276
3310
|
ref_key: "receiptEditorContentRef",
|
|
3277
|
-
ref:
|
|
3311
|
+
ref: E
|
|
3278
3312
|
}, [
|
|
3279
|
-
i.value ? (x(), ye(
|
|
3313
|
+
i.value ? (x(), ye(wl, {
|
|
3280
3314
|
key: 0,
|
|
3281
3315
|
modelValue: u.value,
|
|
3282
|
-
"onUpdate:modelValue":
|
|
3316
|
+
"onUpdate:modelValue": M[0] || (M[0] = (Ie) => u.value = Ie),
|
|
3283
3317
|
onSelectWidget: B,
|
|
3284
|
-
"font-size":
|
|
3285
|
-
"selected-widget":
|
|
3318
|
+
"font-size": q.value,
|
|
3319
|
+
"selected-widget": m.value,
|
|
3286
3320
|
"selected-widget-section-type": p.value
|
|
3287
|
-
}, null, 8, ["modelValue", "font-size", "selected-widget", "selected-widget-section-type"])) :
|
|
3321
|
+
}, null, 8, ["modelValue", "font-size", "selected-widget", "selected-widget-section-type"])) : Ne("", !0)
|
|
3288
3322
|
], 512))
|
|
3289
3323
|
], 512)
|
|
3290
3324
|
]),
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
"selected-widget":
|
|
3325
|
+
k("div", Ui, [
|
|
3326
|
+
S(Ti, {
|
|
3327
|
+
"selected-widget": m.value,
|
|
3294
3328
|
"selected-widget-section-type": p.value,
|
|
3295
3329
|
"selected-widget-column": f.value,
|
|
3296
|
-
"onUpdate:widget":
|
|
3297
|
-
"onUpdate:selectedWidgetColumn":
|
|
3330
|
+
"onUpdate:widget": Y,
|
|
3331
|
+
"onUpdate:selectedWidgetColumn": z
|
|
3298
3332
|
}, null, 8, ["selected-widget", "selected-widget-section-type", "selected-widget-column"]),
|
|
3299
|
-
|
|
3300
|
-
|
|
3333
|
+
m.value ? (x(), W("div", Xi, [
|
|
3334
|
+
S(ae, {
|
|
3301
3335
|
class: "w-full",
|
|
3302
3336
|
variant: "secondary",
|
|
3303
3337
|
label: "Remove widget",
|
|
3304
3338
|
size: "md",
|
|
3305
3339
|
"border-color": "system-error-300",
|
|
3306
3340
|
"text-color": "system-error-300",
|
|
3307
|
-
onClick:
|
|
3341
|
+
onClick: M[1] || (M[1] = (Ie) => L(m.value))
|
|
3308
3342
|
})
|
|
3309
|
-
])) :
|
|
3343
|
+
])) : Ne("", !0)
|
|
3310
3344
|
])
|
|
3311
3345
|
])
|
|
3312
3346
|
]);
|
|
@@ -3314,5 +3348,5 @@ const Gl = /* @__PURE__ */ St(Yl, [["__scopeId", "data-v-3d715f0b"]]), Hl = { cl
|
|
|
3314
3348
|
}
|
|
3315
3349
|
});
|
|
3316
3350
|
export {
|
|
3317
|
-
|
|
3351
|
+
Ki as default
|
|
3318
3352
|
};
|