@feedmepos/mf-menu 0.25.3 → 0.26.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-Bt0tTUMI.js → App-Sw8rjIwn.js} +406 -406
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-8EptxhJ4.js → ApplyProduct.vue_vue_type_script_setup_true_lang-DhEfSD7v.js} +2 -2
- package/dist/{Catalog-B49_0UwR.js → Catalog-DfwCG9-L.js} +5 -5
- package/dist/{Category-BzZ7gsuV.js → Category-CB9aBm3p.js} +6 -6
- package/dist/{CookingGuide-Dh-V5CcH.js → CookingGuide-C-vL6Dog.js} +4 -4
- package/dist/{Group-8cPxy4eO.js → Group-CuD_VXiq.js} +1 -1
- package/dist/{Group-D5j0uXIg.js → Group-MWa5_Tq9.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-u05bCaib.js → Group.vue_vue_type_script_setup_true_lang-4zyBQD13.js} +8 -8
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CLe68kpV.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-C4lDKSIv.js} +3 -3
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CLkkiXKh.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-BgzuY4Yg.js} +1349 -1350
- package/dist/{Ingredient-WbqtjoBF.js → Ingredient-CHp0PcYG.js} +4 -4
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CgVuwzYX.js → InventoryBinding.vue_vue_type_script_setup_true_lang-Ae6UlmPv.js} +2 -2
- package/dist/{LinkProductSideSheet-JKLUBGym.js → LinkProductSideSheet-DEPaf_j7.js} +2 -2
- package/dist/{MenuSetting-Bji17kaR.js → MenuSetting-DlgaihXg.js} +4 -4
- package/dist/{PrintRoute-ZtBwEdNU.js → PrintRoute--9yiBCBk.js} +4 -4
- package/dist/{Product-Cmj6sS-O.js → Product-Dx2MPBQJ.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-BqnW4xnY.js → Product.vue_vue_type_script_setup_true_lang-CR636tBX.js} +11 -11
- package/dist/{Products-BK77mCn2.js → Products-O-vZR09c.js} +11 -11
- package/dist/{Publish-C8ypRB-T.js → Publish-DOp_ox2-.js} +4 -4
- package/dist/{Recipe-UYDk6hUr.js → Recipe-Dh91pbdy.js} +5 -5
- package/dist/{Scheduler-CKQ1miwS.js → Scheduler-dYtjVSLa.js} +3 -3
- package/dist/{SchedulerSelector.vue_vue_type_script_setup_true_lang-BHDYwuCj.js → SchedulerSelector.vue_vue_type_script_setup_true_lang-CAGrdaJt.js} +1 -1
- package/dist/{ServingSequence-CPfiO5zk.js → ServingSequence-DIB0QXor.js} +3 -3
- package/dist/{Setting-CxxhP0vg.js → Setting-CMOoG3N1.js} +4 -4
- package/dist/{Takeaway-4taVwG37.js → Takeaway-BQPPRTXi.js} +4 -4
- package/dist/{Takeaway-CFH9ziz0.js → Takeaway-PK1KguKF.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CSLr_V1k.js → Takeaway.vue_vue_type_script_setup_true_lang-BkfH1-uR.js} +5 -5
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DYAKOa6d.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B4CgLHYC.js} +353 -353
- package/dist/{Unit-CobwveQf.js → Unit-C02_4yny.js} +2 -2
- package/dist/{Variant-mvBbeEt3.js → Variant-ClH-VXSL.js} +3 -3
- package/dist/{_id_-d7aAY1_n.js → _id_-CjNfqMBZ.js} +9 -9
- package/dist/{app-DE1FsRXb.js → app-D1nA01NS.js} +1 -1
- package/dist/{app-CqiVLzCh.js → app-WFFTY1pG.js} +21 -21
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +1 -2
- package/dist/apps/mf-menu/src/components/import/PreviewImportForm.vue.d.ts +2 -2
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-pTfdBz-O.js → linked-status-TRg8tFJY.js} +2 -2
- package/dist/assets/{override-menu-BQsGnPlZ.js → override-menu-B5qNj6Bh.js} +2 -2
- package/dist/assets/{validate-menu-Ds4GcvaA.js → validate-menu-CJ3sLXFt.js} +2 -2
- package/dist/{catalog-Clq9QbSy.js → catalog-lnm7RR9x.js} +1 -1
- package/dist/{catalogSetting-BW-vBD0C.js → catalogSetting-CkHIbYnz.js} +1 -1
- package/dist/{currency-CUc3AJpo.js → currency-Xc5i24AY.js} +1 -1
- package/dist/{dayjs.min-xy0P0Nm2.js → dayjs.min-DcTAEbuZ.js} +1 -1
- package/dist/{discardConfirm-Bpn0ZxgR.js → discardConfirm-rNslsf9i.js} +1 -1
- package/dist/{index-BrFxWX-D.js → index-DHEdDX_v.js} +3 -3
- package/dist/{index-CHAi2D62.js → index-mGN_4r9K.js} +4 -4
- package/dist/{item-7f4Tua2z.js → item-BCd-jhvR.js} +14 -14
- package/dist/{menu-DNN3VM4q.js → menu-B7Mbe5op.js} +1 -1
- package/dist/{menu-80HZXQQB.js → menu-BTKdAj-2.js} +7 -7
- package/dist/{object-ZMox5mFh.js → object-wzHm5FGc.js} +1 -1
- package/dist/{priceTier-HXFmFvQh.js → priceTier-8ouC_eGT.js} +1 -1
- package/dist/{scheduler-DBqBfDHM.js → scheduler-DKJyyU6v.js} +4 -4
- package/dist/{toExcel-1dmoAUG_.js → toExcel-CXtFww1_.js} +2 -2
- package/dist/{unit-DKONF-U8.js → unit-DJvu6GY6.js} +2 -2
- package/package.json +2 -2
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { computed as x, shallowRef as ft, ref as H, watch as Ce, nextTick as gt, getCurrentInstance as Vn, onMounted as We, shallowReactive as Pn, defineComponent as de, resolveComponent as q, createElementBlock as Z, openBlock as P, createBlock as ne, normalizeClass as ye, createElementVNode as N, createVNode as I, unref as a, withCtx as z, toDisplayString as be, mergeModels as en, useModel as tn, createCommentVNode as te, resolveDirective as St, withDirectives as rt, createTextVNode as Yt, renderSlot as Ae, h as he, Fragment as De, renderList as Le, vShow as nn, withModifiers as qe, createSlots as Un, onBeforeUnmount as Ut, watchEffect as Rn, onUnmounted as $n, normalizeStyle as ct, mergeProps as Nn, normalizeProps as An, guardReactiveProps as Ln, Teleport as Gn, Transition as Kn, withKeys as Bn } from "vue";
|
|
2
|
-
import { g as Yn, o as zn, a as jn, _ as zt, f as Hn, b as Wn, n as on, c as rn, I as qn, d as Rt, R as je, e as an, h as ln, j as Ft, k as sn, F as Xn, M as un, l as Jn, m as dn, p as jt, q as cn, r as Qn, P as Zn, s as mn, u as eo, T as Be, t as to } from "./item-
|
|
3
|
-
import { _ as no, T as oo } from "./app-
|
|
4
|
-
import { l as Ie, u as $t } from "./discardConfirm-
|
|
2
|
+
import { g as Yn, o as zn, a as jn, _ as zt, f as Hn, b as Wn, n as on, c as rn, I as qn, d as Rt, R as je, e as an, h as ln, j as Ft, k as sn, F as Xn, M as un, l as Jn, m as dn, p as jt, q as cn, r as Qn, P as Zn, s as mn, u as eo, T as Be, t as to } from "./item-BCd-jhvR.js";
|
|
3
|
+
import { _ as no, T as oo } from "./app-WFFTY1pG.js";
|
|
4
|
+
import { l as Ie, u as $t } from "./discardConfirm-rNslsf9i.js";
|
|
5
5
|
import { useCoreStore as Je, useI18n as me, CustomAttributesForm as ro } from "@feedmepos/mf-common";
|
|
6
6
|
import { useSnackbar as xe, useDialog as $e, useDialogChild as Nt, FmButtonColorThemeVariant as Me, components as Ee, FmButtonVariant as He, useBreakpoints as ao } from "@feedmepos/ui-library";
|
|
7
|
-
import { y as we, J as pe, H as Q, K as Oe, c as yt, M as Ne, N as Ht, O as lo, P as io, Q as so, z as Ve, R as uo, T as Wt, D as Ke, U as co, V as mo, W as po, X as et, Y as fo, I as ge, Z as go, $ as At, a0 as bt, a1 as vo, u as pn, a2 as _o } from "./menu-
|
|
7
|
+
import { y as we, J as pe, H as Q, K as Oe, c as yt, M as Ne, N as Ht, O as lo, P as io, Q as so, z as Ve, R as uo, T as Wt, D as Ke, U as co, V as mo, W as po, X as et, Y as fo, I as ge, Z as go, $ as At, a0 as bt, a1 as vo, u as pn, a2 as _o } from "./menu-BTKdAj-2.js";
|
|
8
8
|
import { defineStore as fn } from "pinia";
|
|
9
9
|
import { _ as Pe, a as yo } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
|
|
10
|
-
import { s as Ot, _ as bo, c as mt } from "./object-
|
|
10
|
+
import { s as Ot, _ as bo, c as mt } from "./object-wzHm5FGc.js";
|
|
11
11
|
import { _ as Ge } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
12
12
|
import { _ as ho } from "./Thumbnail.vue_vue_type_script_setup_true_lang-CvOTKNYT.js";
|
|
13
|
-
import { _ as tt, L as Mt } from "./LinkProductSideSheet-
|
|
13
|
+
import { _ as tt, L as Mt } from "./LinkProductSideSheet-DEPaf_j7.js";
|
|
14
14
|
import { _ as gn } from "./tooltip-B5BiPMx9.js";
|
|
15
|
-
import { _ as Xe, T as wo, l as Co } from "./index-
|
|
15
|
+
import { _ as Xe, T as wo, l as Co } from "./index-mGN_4r9K.js";
|
|
16
16
|
import { u as Io } from "./search-BAPEUu1R.js";
|
|
17
17
|
import { c as Lt } from "./check-C9mY6LiX.js";
|
|
18
|
-
import { f as at } from "./currency-
|
|
18
|
+
import { f as at } from "./currency-Xc5i24AY.js";
|
|
19
19
|
import { c as ko } from "./string-DpfFixWH.js";
|
|
20
20
|
import { useInventoryStore as Eo, InventoryBindingSummary as To } from "@feedmepos/mf-inventory-portal";
|
|
21
|
-
import { u as xo } from "./priceTier-
|
|
21
|
+
import { u as xo } from "./priceTier-8ouC_eGT.js";
|
|
22
22
|
import { d as Gt } from "./vuedraggable-CK8z7qA8.js";
|
|
23
|
-
import { _ as So } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-
|
|
23
|
+
import { _ as So } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-DhEfSD7v.js";
|
|
24
24
|
/* empty css */
|
|
25
25
|
import { i as Fo, t as Kt, w as Oo, a as vn, b as _n, n as Mo, c as Do, u as Vo, r as Po } from "./index-Ce4v8o7D.js";
|
|
26
|
-
import { C as Dt } from "./catalog-
|
|
26
|
+
import { C as Dt } from "./catalog-lnm7RR9x.js";
|
|
27
27
|
import { _ as Uo } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
|
|
28
28
|
import { _ as qt } from "./MenuSelector.vue_vue_type_script_setup_true_lang-BShs7c1r.js";
|
|
29
29
|
function ze(e) {
|
|
@@ -37,21 +37,21 @@ function Xt(...e) {
|
|
|
37
37
|
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([t, n, f] = e, o = Qe) : [o, t, n, f] = e, !o)
|
|
38
38
|
return Mo;
|
|
39
39
|
Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
|
|
40
|
-
const l = [],
|
|
40
|
+
const l = [], p = () => {
|
|
41
41
|
l.forEach((r) => r()), l.length = 0;
|
|
42
|
-
}, s = (r, d, c,
|
|
42
|
+
}, s = (r, d, c, m) => (r.addEventListener(d, c, m), () => r.removeEventListener(d, c, m)), v = Ce(
|
|
43
43
|
() => [ze(o), Kt(f)],
|
|
44
44
|
([r, d]) => {
|
|
45
|
-
if (
|
|
45
|
+
if (p(), !r)
|
|
46
46
|
return;
|
|
47
47
|
const c = Do(d) ? { ...d } : d;
|
|
48
48
|
l.push(
|
|
49
|
-
...t.flatMap((
|
|
49
|
+
...t.flatMap((m) => n.map((S) => s(r, m, S, c)))
|
|
50
50
|
);
|
|
51
51
|
},
|
|
52
52
|
{ immediate: !0, flush: "post" }
|
|
53
53
|
), _ = () => {
|
|
54
|
-
v(),
|
|
54
|
+
v(), p();
|
|
55
55
|
};
|
|
56
56
|
return _n(_), _;
|
|
57
57
|
}
|
|
@@ -113,14 +113,14 @@ function Bo(e, o, t, n = {}) {
|
|
|
113
113
|
var f;
|
|
114
114
|
const {
|
|
115
115
|
flush: l = "pre",
|
|
116
|
-
deep:
|
|
116
|
+
deep: p = !0,
|
|
117
117
|
listenToStorageChanges: s = !0,
|
|
118
118
|
writeDefaults: v = !0,
|
|
119
119
|
mergeDefaults: _ = !1,
|
|
120
120
|
shallow: r,
|
|
121
121
|
window: d = Qe,
|
|
122
122
|
eventFilter: c,
|
|
123
|
-
onError:
|
|
123
|
+
onError: m = (i) => {
|
|
124
124
|
console.error(i);
|
|
125
125
|
},
|
|
126
126
|
initOnMounted: S
|
|
@@ -132,14 +132,14 @@ function Bo(e, o, t, n = {}) {
|
|
|
132
132
|
return (i = Qe) == null ? void 0 : i.localStorage;
|
|
133
133
|
})();
|
|
134
134
|
} catch (i) {
|
|
135
|
-
|
|
135
|
+
m(i);
|
|
136
136
|
}
|
|
137
137
|
if (!t)
|
|
138
138
|
return E;
|
|
139
139
|
const T = Kt(o), w = Go(T), h = (f = n.serializer) != null ? f : Ko[w], { pause: k, resume: O } = Oo(
|
|
140
140
|
E,
|
|
141
141
|
() => g(E.value),
|
|
142
|
-
{ flush: l, deep:
|
|
142
|
+
{ flush: l, deep: p, eventFilter: c }
|
|
143
143
|
);
|
|
144
144
|
d && s && vn(() => {
|
|
145
145
|
Xt(d, "storage", F), Xt(d, Jt, y), S && F();
|
|
@@ -164,7 +164,7 @@ function Bo(e, o, t, n = {}) {
|
|
|
164
164
|
b !== V && (t.setItem(e, V), M(b, V));
|
|
165
165
|
}
|
|
166
166
|
} catch (b) {
|
|
167
|
-
|
|
167
|
+
m(b);
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
function u(i) {
|
|
@@ -187,7 +187,7 @@ function Bo(e, o, t, n = {}) {
|
|
|
187
187
|
try {
|
|
188
188
|
(i == null ? void 0 : i.newValue) !== h.write(E.value) && (E.value = u(i));
|
|
189
189
|
} catch (b) {
|
|
190
|
-
|
|
190
|
+
m(b);
|
|
191
191
|
} finally {
|
|
192
192
|
i ? gt(O) : O();
|
|
193
193
|
}
|
|
@@ -202,12 +202,12 @@ function Bo(e, o, t, n = {}) {
|
|
|
202
202
|
function Yo(e, o, t = {}) {
|
|
203
203
|
const { window: n = Qe, ...f } = t;
|
|
204
204
|
let l;
|
|
205
|
-
const
|
|
205
|
+
const p = $o(() => n && "ResizeObserver" in n), s = () => {
|
|
206
206
|
l && (l.disconnect(), l = void 0);
|
|
207
207
|
}, v = x(() => Array.isArray(e) ? e.map((d) => ze(d)) : [ze(e)]), _ = Ce(
|
|
208
208
|
v,
|
|
209
209
|
(d) => {
|
|
210
|
-
if (s(),
|
|
210
|
+
if (s(), p.value && n) {
|
|
211
211
|
l = new ResizeObserver(o);
|
|
212
212
|
for (const c of d)
|
|
213
213
|
c && l.observe(c, f);
|
|
@@ -218,7 +218,7 @@ function Yo(e, o, t = {}) {
|
|
|
218
218
|
s(), _();
|
|
219
219
|
};
|
|
220
220
|
return _n(r), {
|
|
221
|
-
isSupported:
|
|
221
|
+
isSupported: p,
|
|
222
222
|
stop: r
|
|
223
223
|
};
|
|
224
224
|
}
|
|
@@ -226,39 +226,39 @@ function zo(e, o = { width: 0, height: 0 }, t = {}) {
|
|
|
226
226
|
const { window: n = Qe, box: f = "content-box" } = t, l = x(() => {
|
|
227
227
|
var d, c;
|
|
228
228
|
return (c = (d = ze(e)) == null ? void 0 : d.namespaceURI) == null ? void 0 : c.includes("svg");
|
|
229
|
-
}),
|
|
229
|
+
}), p = H(o.width), s = H(o.height), { stop: v } = Yo(
|
|
230
230
|
e,
|
|
231
231
|
([d]) => {
|
|
232
232
|
const c = f === "border-box" ? d.borderBoxSize : f === "content-box" ? d.contentBoxSize : d.devicePixelContentBoxSize;
|
|
233
233
|
if (n && l.value) {
|
|
234
|
-
const
|
|
235
|
-
if (
|
|
236
|
-
const S =
|
|
237
|
-
|
|
234
|
+
const m = ze(e);
|
|
235
|
+
if (m) {
|
|
236
|
+
const S = m.getBoundingClientRect();
|
|
237
|
+
p.value = S.width, s.value = S.height;
|
|
238
238
|
}
|
|
239
239
|
} else if (c) {
|
|
240
|
-
const
|
|
241
|
-
|
|
240
|
+
const m = Array.isArray(c) ? c : [c];
|
|
241
|
+
p.value = m.reduce((S, { inlineSize: E }) => S + E, 0), s.value = m.reduce((S, { blockSize: E }) => S + E, 0);
|
|
242
242
|
} else
|
|
243
|
-
|
|
243
|
+
p.value = d.contentRect.width, s.value = d.contentRect.height;
|
|
244
244
|
},
|
|
245
245
|
t
|
|
246
246
|
);
|
|
247
247
|
vn(() => {
|
|
248
248
|
const d = ze(e);
|
|
249
|
-
d && (
|
|
249
|
+
d && (p.value = "offsetWidth" in d ? d.offsetWidth : o.width, s.value = "offsetHeight" in d ? d.offsetHeight : o.height);
|
|
250
250
|
});
|
|
251
251
|
const _ = Ce(
|
|
252
252
|
() => ze(e),
|
|
253
253
|
(d) => {
|
|
254
|
-
|
|
254
|
+
p.value = d ? o.width : 0, s.value = d ? o.height : 0;
|
|
255
255
|
}
|
|
256
256
|
);
|
|
257
257
|
function r() {
|
|
258
258
|
v(), _();
|
|
259
259
|
}
|
|
260
260
|
return {
|
|
261
|
-
width:
|
|
261
|
+
width: p,
|
|
262
262
|
height: s,
|
|
263
263
|
stop: r
|
|
264
264
|
};
|
|
@@ -268,9 +268,9 @@ function jo(e, o, t = {}) {
|
|
|
268
268
|
return Bo(e, o, n == null ? void 0 : n.localStorage, t);
|
|
269
269
|
}
|
|
270
270
|
function Ho(e, o) {
|
|
271
|
-
const { containerStyle: t, wrapperProps: n, scrollTo: f, calculateRange: l, currentList:
|
|
271
|
+
const { containerStyle: t, wrapperProps: n, scrollTo: f, calculateRange: l, currentList: p, containerRef: s } = "itemHeight" in o ? Xo(o, e) : qo(o, e);
|
|
272
272
|
return {
|
|
273
|
-
list:
|
|
273
|
+
list: p,
|
|
274
274
|
scrollTo: f,
|
|
275
275
|
containerProps: {
|
|
276
276
|
ref: s,
|
|
@@ -291,13 +291,13 @@ function bn(e, o, t) {
|
|
|
291
291
|
if (typeof t == "number")
|
|
292
292
|
return Math.ceil(n / t);
|
|
293
293
|
const { start: f = 0 } = e.value;
|
|
294
|
-
let l = 0,
|
|
294
|
+
let l = 0, p = 0;
|
|
295
295
|
for (let s = f; s < o.value.length; s++) {
|
|
296
296
|
const v = t(s);
|
|
297
|
-
if (l += v,
|
|
297
|
+
if (l += v, p = s, l > n)
|
|
298
298
|
break;
|
|
299
299
|
}
|
|
300
|
-
return
|
|
300
|
+
return p - f;
|
|
301
301
|
};
|
|
302
302
|
}
|
|
303
303
|
function hn(e, o) {
|
|
@@ -306,8 +306,8 @@ function hn(e, o) {
|
|
|
306
306
|
return Math.floor(t / o) + 1;
|
|
307
307
|
let n = 0, f = 0;
|
|
308
308
|
for (let l = 0; l < e.value.length; l++) {
|
|
309
|
-
const
|
|
310
|
-
if (n +=
|
|
309
|
+
const p = o(l);
|
|
310
|
+
if (n += p, n >= t) {
|
|
311
311
|
f = l;
|
|
312
312
|
break;
|
|
313
313
|
}
|
|
@@ -315,7 +315,7 @@ function hn(e, o) {
|
|
|
315
315
|
return f + 1;
|
|
316
316
|
};
|
|
317
317
|
}
|
|
318
|
-
function wn(e, o, t, n, { containerRef: f, state: l, currentList:
|
|
318
|
+
function wn(e, o, t, n, { containerRef: f, state: l, currentList: p, source: s }) {
|
|
319
319
|
return () => {
|
|
320
320
|
const v = f.value;
|
|
321
321
|
if (v) {
|
|
@@ -323,15 +323,15 @@ function wn(e, o, t, n, { containerRef: f, state: l, currentList: m, source: s }
|
|
|
323
323
|
l.value = {
|
|
324
324
|
start: d < 0 ? 0 : d,
|
|
325
325
|
end: c > s.value.length ? s.value.length : c
|
|
326
|
-
},
|
|
327
|
-
data:
|
|
326
|
+
}, p.value = s.value.slice(l.value.start, l.value.end).map((m, S) => ({
|
|
327
|
+
data: m,
|
|
328
328
|
index: S + l.value.start
|
|
329
329
|
}));
|
|
330
330
|
}
|
|
331
331
|
};
|
|
332
332
|
}
|
|
333
333
|
function Cn(e, o) {
|
|
334
|
-
return (t) => typeof e == "number" ? t * e : o.value.slice(0, t).reduce((f, l,
|
|
334
|
+
return (t) => typeof e == "number" ? t * e : o.value.slice(0, t).reduce((f, l, p) => f + e(p), 0);
|
|
335
335
|
}
|
|
336
336
|
function In(e, o, t, n) {
|
|
337
337
|
Ce([e.width, e.height, o, t], () => {
|
|
@@ -351,9 +351,9 @@ function En(e, o, t, n) {
|
|
|
351
351
|
};
|
|
352
352
|
}
|
|
353
353
|
function qo(e, o) {
|
|
354
|
-
const t = yn(o), { state: n, source: f, currentList: l, size:
|
|
355
|
-
In(
|
|
356
|
-
const w = En("horizontal",
|
|
354
|
+
const t = yn(o), { state: n, source: f, currentList: l, size: p, containerRef: s } = t, v = { overflowX: "auto" }, { itemWidth: _, overscan: r = 5 } = e, d = bn(n, f, _), c = hn(f, _), m = wn("horizontal", r, c, d, t), S = Cn(_, f), E = x(() => S(n.value.start)), T = kn(_, f);
|
|
355
|
+
In(p, o, s, m);
|
|
356
|
+
const w = En("horizontal", m, S, s), h = x(() => ({
|
|
357
357
|
style: {
|
|
358
358
|
height: "100%",
|
|
359
359
|
width: `${T.value - E.value}px`,
|
|
@@ -363,7 +363,7 @@ function qo(e, o) {
|
|
|
363
363
|
}));
|
|
364
364
|
return {
|
|
365
365
|
scrollTo: w,
|
|
366
|
-
calculateRange:
|
|
366
|
+
calculateRange: m,
|
|
367
367
|
wrapperProps: h,
|
|
368
368
|
containerStyle: v,
|
|
369
369
|
currentList: l,
|
|
@@ -371,9 +371,9 @@ function qo(e, o) {
|
|
|
371
371
|
};
|
|
372
372
|
}
|
|
373
373
|
function Xo(e, o) {
|
|
374
|
-
const t = yn(o), { state: n, source: f, currentList: l, size:
|
|
375
|
-
In(
|
|
376
|
-
const w = En("vertical",
|
|
374
|
+
const t = yn(o), { state: n, source: f, currentList: l, size: p, containerRef: s } = t, v = { overflowY: "auto" }, { itemHeight: _, overscan: r = 5 } = e, d = bn(n, f, _), c = hn(f, _), m = wn("vertical", r, c, d, t), S = Cn(_, f), E = x(() => S(n.value.start)), T = kn(_, f);
|
|
375
|
+
In(p, o, s, m);
|
|
376
|
+
const w = En("vertical", m, S, s), h = x(() => ({
|
|
377
377
|
style: {
|
|
378
378
|
width: "100%",
|
|
379
379
|
height: `${T.value - E.value}px`,
|
|
@@ -381,7 +381,7 @@ function Xo(e, o) {
|
|
|
381
381
|
}
|
|
382
382
|
}));
|
|
383
383
|
return {
|
|
384
|
-
calculateRange:
|
|
384
|
+
calculateRange: m,
|
|
385
385
|
scrollTo: w,
|
|
386
386
|
containerStyle: v,
|
|
387
387
|
wrapperProps: h,
|
|
@@ -418,32 +418,32 @@ function Jo(e, o) {
|
|
|
418
418
|
function Qo(e, o) {
|
|
419
419
|
const t = /* @__PURE__ */ new Set();
|
|
420
420
|
function n(l) {
|
|
421
|
-
let
|
|
422
|
-
for (;
|
|
423
|
-
t.add(
|
|
421
|
+
let p = l;
|
|
422
|
+
for (; p.parent; )
|
|
423
|
+
t.add(p.parent.id), p = p.parent;
|
|
424
424
|
}
|
|
425
|
-
function f(l,
|
|
425
|
+
function f(l, p) {
|
|
426
426
|
var d, c;
|
|
427
|
-
if (
|
|
427
|
+
if (p.length === 0 || !l)
|
|
428
428
|
return l;
|
|
429
429
|
const s = [
|
|
430
430
|
l.label.toLowerCase(),
|
|
431
431
|
(d = l.rightLabel) == null ? void 0 : d.label.toLowerCase(),
|
|
432
|
-
...((c = l.chips) == null ? void 0 : c.map((
|
|
433
|
-
].join(" "), v =
|
|
434
|
-
v &&
|
|
432
|
+
...((c = l.chips) == null ? void 0 : c.map((m) => m.label.toLowerCase())) ?? []
|
|
433
|
+
].join(" "), v = p[0].query.every((m) => s.includes(m.toLowerCase()));
|
|
434
|
+
v && p.slice(1).length === 0 && n(l);
|
|
435
435
|
const _ = v ? {
|
|
436
436
|
...l,
|
|
437
|
-
highlightedStrings:
|
|
437
|
+
highlightedStrings: p[0].query
|
|
438
438
|
} : l;
|
|
439
439
|
if (l.children && l.children.length > 0) {
|
|
440
|
-
const
|
|
441
|
-
return
|
|
440
|
+
const m = l.children.map((S) => f(S, v ? p.slice(1) : p)).filter((S) => !!S);
|
|
441
|
+
return m.length > 0 ? {
|
|
442
442
|
..._,
|
|
443
|
-
children:
|
|
443
|
+
children: m
|
|
444
444
|
} : null;
|
|
445
445
|
}
|
|
446
|
-
return v &&
|
|
446
|
+
return v && p.slice(1).length === 0 ? _ : null;
|
|
447
447
|
}
|
|
448
448
|
return {
|
|
449
449
|
// @ts-ignore
|
|
@@ -498,27 +498,27 @@ const vt = fn("mf-menu-tree", () => {
|
|
|
498
498
|
function l(c) {
|
|
499
499
|
t.value = c;
|
|
500
500
|
}
|
|
501
|
-
function
|
|
501
|
+
function p(c) {
|
|
502
502
|
n.value = c;
|
|
503
503
|
}
|
|
504
504
|
function s(c) {
|
|
505
505
|
if (!c)
|
|
506
506
|
return;
|
|
507
|
-
const
|
|
508
|
-
|
|
507
|
+
const m = r.value.get(c);
|
|
508
|
+
m && (t.value = m.id);
|
|
509
509
|
}
|
|
510
510
|
async function v() {
|
|
511
511
|
n.value = [];
|
|
512
512
|
}
|
|
513
513
|
function _() {
|
|
514
514
|
const c = [];
|
|
515
|
-
function
|
|
515
|
+
function m(S) {
|
|
516
516
|
c.push(S.id);
|
|
517
517
|
for (const E of S.children ?? [])
|
|
518
|
-
|
|
518
|
+
m(E);
|
|
519
519
|
}
|
|
520
520
|
for (const S of o.value)
|
|
521
|
-
|
|
521
|
+
m(S);
|
|
522
522
|
n.value = c;
|
|
523
523
|
}
|
|
524
524
|
const r = H(/* @__PURE__ */ new Map());
|
|
@@ -533,7 +533,7 @@ const vt = fn("mf-menu-tree", () => {
|
|
|
533
533
|
setTreeNodes: f,
|
|
534
534
|
setSelectedNodeId: l,
|
|
535
535
|
setSelectedNodeByItemId: s,
|
|
536
|
-
setExpandedNodeIds:
|
|
536
|
+
setExpandedNodeIds: p,
|
|
537
537
|
collapseAllNodes: v,
|
|
538
538
|
expandAllNodes: _,
|
|
539
539
|
getNodeById: d
|
|
@@ -553,7 +553,7 @@ function or(e, o) {
|
|
|
553
553
|
s.inventoryBindings ?? (s.inventoryBindings = []), s.inventoryBindings.length === 0 && (s.inventoryBindings = null);
|
|
554
554
|
}
|
|
555
555
|
function f(s) {
|
|
556
|
-
return !o.state.currentCatalogId && !o.state.currentSchedulerId ? (l(s), !0) :
|
|
556
|
+
return !o.state.currentCatalogId && !o.state.currentSchedulerId ? (l(s), !0) : p(s);
|
|
557
557
|
}
|
|
558
558
|
function l(s) {
|
|
559
559
|
o.updateMenu({
|
|
@@ -562,7 +562,7 @@ function or(e, o) {
|
|
|
562
562
|
data: s
|
|
563
563
|
});
|
|
564
564
|
}
|
|
565
|
-
function
|
|
565
|
+
function p(s) {
|
|
566
566
|
const v = Yn(
|
|
567
567
|
[s],
|
|
568
568
|
o.state.menu,
|
|
@@ -611,13 +611,13 @@ function ar({
|
|
|
611
611
|
schedulerId: t,
|
|
612
612
|
itemId: n
|
|
613
613
|
}) {
|
|
614
|
-
var f, l,
|
|
614
|
+
var f, l, p, s;
|
|
615
615
|
if (!o && !t)
|
|
616
616
|
throw new Error("catalogId or schedulerId are required");
|
|
617
617
|
if (o && !t)
|
|
618
618
|
return (f = e.modules.catalog.find((v) => v._id === o)) == null ? void 0 : f.override.items[n];
|
|
619
619
|
if (!o && t)
|
|
620
|
-
return (
|
|
620
|
+
return (p = (l = e.modules.scheduler.find((v) => v._id === t)) == null ? void 0 : l.items) == null ? void 0 : p.filter((v) => v._id === n);
|
|
621
621
|
{
|
|
622
622
|
const v = e.modules.catalog.find((r) => r._id === o), _ = v == null ? void 0 : v.override.scheduler[t];
|
|
623
623
|
return (s = _ == null ? void 0 : _.items) == null ? void 0 : s.filter((r) => r._id === n);
|
|
@@ -627,7 +627,7 @@ function lr(e, o, t, n) {
|
|
|
627
627
|
const f = ar({ menu: e, catalogId: o, schedulerId: t, itemId: n });
|
|
628
628
|
if (!f)
|
|
629
629
|
throw new Error(`Item overrider ${n} not found`);
|
|
630
|
-
const l = e.modules.item.find((
|
|
630
|
+
const l = e.modules.item.find((p) => p._id === n);
|
|
631
631
|
if (!l)
|
|
632
632
|
throw new Error(`Item ${n} not found in merged menu`);
|
|
633
633
|
return zn(l, f);
|
|
@@ -654,7 +654,7 @@ function sr({
|
|
|
654
654
|
function l(_) {
|
|
655
655
|
o.value.push(_), t.value++, o.value.length > e && (o.value.shift(), t.value--);
|
|
656
656
|
}
|
|
657
|
-
function
|
|
657
|
+
function p() {
|
|
658
658
|
if (n.value)
|
|
659
659
|
return t.value--, o.value[t.value];
|
|
660
660
|
}
|
|
@@ -669,7 +669,7 @@ function sr({
|
|
|
669
669
|
push: l,
|
|
670
670
|
canUndo: n,
|
|
671
671
|
canRedo: f,
|
|
672
|
-
undo:
|
|
672
|
+
undo: p,
|
|
673
673
|
redo: s,
|
|
674
674
|
clear: v
|
|
675
675
|
};
|
|
@@ -727,7 +727,7 @@ const ce = fn(
|
|
|
727
727
|
}) : []), f = x(() => {
|
|
728
728
|
var D;
|
|
729
729
|
return ((D = o.currentBusiness.value) == null ? void 0 : D.menuVersion) || yt.F_MENU_VERSION.v3;
|
|
730
|
-
}), l = x(() => f.value === yt.F_MENU_VERSION.v4),
|
|
730
|
+
}), l = x(() => f.value === yt.F_MENU_VERSION.v4), p = x(() => {
|
|
731
731
|
const D = d.value.modules.catalog;
|
|
732
732
|
return Oe(D, { selector: "name" });
|
|
733
733
|
}), s = x(() => e.menu.modules.catalog.find((D) => D._id === e.currentCatalogId)), v = x(() => Oe(d.value.modules.scheduler, { selector: "name" })), _ = x(() => e.menu.modules.scheduler.find(
|
|
@@ -736,7 +736,7 @@ const ce = fn(
|
|
|
736
736
|
function r(D, j = !0) {
|
|
737
737
|
e.menu = { ...D, _rev: e.menu._rev }, j && ee.push(e.menu);
|
|
738
738
|
}
|
|
739
|
-
const d = ft(xn()), c = H(!1),
|
|
739
|
+
const d = ft(xn()), c = H(!1), m = H(1);
|
|
740
740
|
async function S() {
|
|
741
741
|
c.value = !0;
|
|
742
742
|
const D = await jn(
|
|
@@ -752,7 +752,7 @@ const ce = fn(
|
|
|
752
752
|
), ie = new Set(((R == null ? void 0 : R.items) || []).map((ue) => ue._id));
|
|
753
753
|
D.modules.item = D.modules.item.filter((ue) => ie.has(ue._id));
|
|
754
754
|
}
|
|
755
|
-
return d.value = D, c.value = !1,
|
|
755
|
+
return d.value = D, c.value = !1, m.value = m.value + 1, D;
|
|
756
756
|
}
|
|
757
757
|
const T = Ie.debounce(S, 200);
|
|
758
758
|
Ce(
|
|
@@ -766,7 +766,7 @@ const ce = fn(
|
|
|
766
766
|
label: "Main",
|
|
767
767
|
value: null
|
|
768
768
|
},
|
|
769
|
-
...
|
|
769
|
+
...p.value.map((D) => ({
|
|
770
770
|
label: D.name,
|
|
771
771
|
value: D._id
|
|
772
772
|
}))
|
|
@@ -849,7 +849,7 @@ const ce = fn(
|
|
|
849
849
|
code: R,
|
|
850
850
|
name: D && R,
|
|
851
851
|
description: D && R,
|
|
852
|
-
category:
|
|
852
|
+
category: D && R,
|
|
853
853
|
thumbnail: D && R,
|
|
854
854
|
orderFrom: (j || D) && R,
|
|
855
855
|
orderFromNone: D,
|
|
@@ -977,14 +977,14 @@ const ce = fn(
|
|
|
977
977
|
state: e,
|
|
978
978
|
// loading state
|
|
979
979
|
workerIsComputing: c,
|
|
980
|
-
mergedMenuChangeId:
|
|
980
|
+
mergedMenuChangeId: m,
|
|
981
981
|
// async computed state
|
|
982
982
|
mergedMenu: d,
|
|
983
983
|
// Computed
|
|
984
984
|
version: f,
|
|
985
985
|
isV4: l,
|
|
986
986
|
serveSequence: n,
|
|
987
|
-
catalogs:
|
|
987
|
+
catalogs: p,
|
|
988
988
|
currentCatalog: s,
|
|
989
989
|
schedulers: v,
|
|
990
990
|
currentScheduler: _,
|
|
@@ -1098,7 +1098,7 @@ const _t = () => {
|
|
|
1098
1098
|
!0
|
|
1099
1099
|
), o.close();
|
|
1100
1100
|
}
|
|
1101
|
-
async function
|
|
1101
|
+
async function p(s) {
|
|
1102
1102
|
await t.updateMenu({
|
|
1103
1103
|
module: Q.F_MENU_MODULE_V4_KEY.enum.category,
|
|
1104
1104
|
operation: pe.F_OPERATION_TYPE.rearrange,
|
|
@@ -1109,7 +1109,7 @@ const _t = () => {
|
|
|
1109
1109
|
create: n,
|
|
1110
1110
|
update: f,
|
|
1111
1111
|
deleteCategory: l,
|
|
1112
|
-
rearrange:
|
|
1112
|
+
rearrange: p
|
|
1113
1113
|
};
|
|
1114
1114
|
}, cr = { class: "flex flex-col items-center" }, mr = {
|
|
1115
1115
|
key: 0,
|
|
@@ -1142,13 +1142,13 @@ const _t = () => {
|
|
|
1142
1142
|
}
|
|
1143
1143
|
const l = (_) => {
|
|
1144
1144
|
f([_]);
|
|
1145
|
-
}, { emitData:
|
|
1145
|
+
}, { emitData: p } = Nt();
|
|
1146
1146
|
async function s(_) {
|
|
1147
|
-
const { canvas: r } = _, d = r.toDataURL("image/jpeg", 0.75), c = await (await fetch(d)).blob(),
|
|
1148
|
-
m
|
|
1147
|
+
const { canvas: r } = _, d = r.toDataURL("image/jpeg", 0.75), c = await (await fetch(d)).blob(), m = new File([c], "img.jpeg", { type: "image/jpeg" });
|
|
1148
|
+
p(m);
|
|
1149
1149
|
}
|
|
1150
1150
|
function v() {
|
|
1151
|
-
t.value = void 0,
|
|
1151
|
+
t.value = void 0, p(null);
|
|
1152
1152
|
}
|
|
1153
1153
|
return (_, r) => {
|
|
1154
1154
|
const d = q("fm-icon"), c = q("fm-drop-field");
|
|
@@ -1199,7 +1199,7 @@ const _t = () => {
|
|
|
1199
1199
|
};
|
|
1200
1200
|
}
|
|
1201
1201
|
});
|
|
1202
|
-
var _r = { firebase: { storageBucket: "image.
|
|
1202
|
+
var _r = { firebase: { storageBucket: "image.feedmedev.cc" } };
|
|
1203
1203
|
const yr = {
|
|
1204
1204
|
key: 0,
|
|
1205
1205
|
class: "absolute inset-0 flex items-center justify-center image-action-overlay"
|
|
@@ -1227,7 +1227,7 @@ const yr = {
|
|
|
1227
1227
|
H(!1);
|
|
1228
1228
|
const f = $e(), l = () => {
|
|
1229
1229
|
n.value = null;
|
|
1230
|
-
},
|
|
1230
|
+
}, p = () => {
|
|
1231
1231
|
f.open({
|
|
1232
1232
|
title: "Delete image",
|
|
1233
1233
|
message: "Are you sure you want to delete this image?",
|
|
@@ -1271,8 +1271,8 @@ const yr = {
|
|
|
1271
1271
|
});
|
|
1272
1272
|
};
|
|
1273
1273
|
return (r, d) => {
|
|
1274
|
-
const c = q("FmButton"),
|
|
1275
|
-
return P(), ne(
|
|
1274
|
+
const c = q("FmButton"), m = q("FmFormGroup");
|
|
1275
|
+
return P(), ne(m, {
|
|
1276
1276
|
tag: "div",
|
|
1277
1277
|
"model-value": n.value,
|
|
1278
1278
|
label: a(o)("menu.common.labels.product_image"),
|
|
@@ -1299,7 +1299,7 @@ const yr = {
|
|
|
1299
1299
|
"text-color": a(Me).NeutralGray400,
|
|
1300
1300
|
variant: "secondary",
|
|
1301
1301
|
class: "bg-white",
|
|
1302
|
-
onClick:
|
|
1302
|
+
onClick: p
|
|
1303
1303
|
}, null, 8, ["text-color"])) : te("", !0)])]))], 2)]),
|
|
1304
1304
|
_: 1
|
|
1305
1305
|
}, 8, ["model-value", "label"]);
|
|
@@ -1353,13 +1353,13 @@ const Vr = /* @__PURE__ */ de({
|
|
|
1353
1353
|
}) {
|
|
1354
1354
|
const t = e, n = ce(), f = _t(), {
|
|
1355
1355
|
checkMenuIsLoading: l
|
|
1356
|
-
} = et(Ke(xe())),
|
|
1356
|
+
} = et(Ke(xe())), p = Je(), s = o, v = x(() => n.rules.item), _ = x(() => n.categorizedItems), r = x(() => {
|
|
1357
1357
|
const O = _.value.map((M) => ({
|
|
1358
1358
|
label: M.name,
|
|
1359
1359
|
value: M.id
|
|
1360
1360
|
}));
|
|
1361
1361
|
return t.isAddon ? O : O.filter((M) => !!M.value);
|
|
1362
|
-
}), d = x(() => v.value.addon), c = x(() => !r.value.find((O) => !!O.value)),
|
|
1362
|
+
}), d = x(() => v.value.addon), c = x(() => !r.value.find((O) => !!O.value)), m = () => {
|
|
1363
1363
|
var O;
|
|
1364
1364
|
return t.isAddon ? null : rt(I(Ee.FmSelect, {
|
|
1365
1365
|
disabled: !v.value.category || t.isAddon || l(),
|
|
@@ -1407,7 +1407,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
1407
1407
|
}
|
|
1408
1408
|
if (!T.value)
|
|
1409
1409
|
try {
|
|
1410
|
-
T.value = !0,
|
|
1410
|
+
T.value = !0, p.pushDataLayer({
|
|
1411
1411
|
event: "menu_catalog_item_general_remy_suggest_description"
|
|
1412
1412
|
}), je.toggleDialog(!0);
|
|
1413
1413
|
const u = await ((M = (O = je).getItemDescription) == null ? void 0 : M.call(O, {
|
|
@@ -1488,7 +1488,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
1488
1488
|
label: a(k)("menu.product.form.detail.category.options.product.label"),
|
|
1489
1489
|
sublabel: a(k)("menu.product.form.detail.category.options.product.sublabel")
|
|
1490
1490
|
}, null, 8, ["disabled", "value", "label", "sublabel"]), I(qn, null, {
|
|
1491
|
-
default: z(() => [a(n).isV4 ? (P(), ne(
|
|
1491
|
+
default: z(() => [a(n).isV4 ? (P(), ne(m, {
|
|
1492
1492
|
key: 0
|
|
1493
1493
|
})) : te("", !0)]),
|
|
1494
1494
|
_: 1
|
|
@@ -1511,7 +1511,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
1511
1511
|
"model-value": O.form.category,
|
|
1512
1512
|
rules: [(re) => !re && !O.isOverride ? "Category is required" : !0]
|
|
1513
1513
|
}, {
|
|
1514
|
-
default: z(() => [I(
|
|
1514
|
+
default: z(() => [I(m)]),
|
|
1515
1515
|
_: 1
|
|
1516
1516
|
}, 8, ["model-value", "rules"]))]),
|
|
1517
1517
|
_: 1
|
|
@@ -1566,15 +1566,15 @@ const Vr = /* @__PURE__ */ de({
|
|
|
1566
1566
|
items: {},
|
|
1567
1567
|
position: o.groups.length - 1,
|
|
1568
1568
|
itemsLinked: []
|
|
1569
|
-
}),
|
|
1569
|
+
}), p = H(l()), { t: s } = me();
|
|
1570
1570
|
return (v, _) => t.value.create ? (P(), ne(a(Wr), {
|
|
1571
1571
|
key: 0,
|
|
1572
1572
|
"categorized-items": a(o).categorizedItems,
|
|
1573
1573
|
config: f.value,
|
|
1574
|
-
group:
|
|
1575
|
-
"onUpdate:group": _[0] || (_[0] = (r) =>
|
|
1574
|
+
group: p.value,
|
|
1575
|
+
"onUpdate:group": _[0] || (_[0] = (r) => p.value = r),
|
|
1576
1576
|
"onStatus:show": _[1] || (_[1] = (r) => {
|
|
1577
|
-
r || (
|
|
1577
|
+
r || (p.value = l());
|
|
1578
1578
|
}),
|
|
1579
1579
|
action: "add",
|
|
1580
1580
|
title: a(s)("menu.group.add")
|
|
@@ -1607,14 +1607,14 @@ const Vr = /* @__PURE__ */ de({
|
|
|
1607
1607
|
setup(e, {
|
|
1608
1608
|
emit: o
|
|
1609
1609
|
}) {
|
|
1610
|
-
const t = e, n = o, f = xe(), l = Je(),
|
|
1610
|
+
const t = e, n = o, f = xe(), l = Je(), p = ce(), s = x(() => we.Country.getCountry(l.currentCountry.value)), v = H(!1), _ = x(() => t.config.isV4 || t.group.type === Q.F_ADDON_GROUP_TYPE.enum.PRODUCT), r = x(() => _.value), d = x(() => _.value), c = x(() => Object.values(t.group.items).flatMap((L) => [{
|
|
1611
1611
|
_id: L._id,
|
|
1612
1612
|
combinationKey: void 0
|
|
1613
1613
|
}, ...(L.items ?? []).map((B) => ({
|
|
1614
1614
|
_id: B._id,
|
|
1615
1615
|
combinationKey: B.combinationKey
|
|
1616
1616
|
}))])), {
|
|
1617
|
-
searchKey:
|
|
1617
|
+
searchKey: m,
|
|
1618
1618
|
filter: S
|
|
1619
1619
|
} = Io(), E = x(() => {
|
|
1620
1620
|
const L = Object.entries(t.group.items).filter(([, B]) => S([B.code || "", B.name || B.fallbackName, h(B.price ?? B.fallbackPrice), k(B.orderFrom || B.fallbackOrder), ...(B.items || []).map((C) => [C.code || "", C.name || C.fallbackName, h(C.price ?? C.fallbackPrice), k(C.orderFrom || C.fallbackOrder)].join(""))]));
|
|
@@ -1788,7 +1788,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
1788
1788
|
return I("div", {
|
|
1789
1789
|
class: "flex items-center justify-end"
|
|
1790
1790
|
}, [T(null).priceTier && I(ln, {
|
|
1791
|
-
menuStore:
|
|
1791
|
+
menuStore: p,
|
|
1792
1792
|
priceTiers: B.priceTiers,
|
|
1793
1793
|
"onUpdate:priceTiers": (G) => {
|
|
1794
1794
|
var W;
|
|
@@ -1932,7 +1932,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
1932
1932
|
}, L;
|
|
1933
1933
|
}, {})), Y = (L) => {
|
|
1934
1934
|
var W, X;
|
|
1935
|
-
const C =
|
|
1935
|
+
const C = p.state.menu.modules.item.find((ae) => ae._id === L._id), G = L.combinationKey ? {
|
|
1936
1936
|
...(W = C == null ? void 0 : C.variant) == null ? void 0 : W.variantCombinations.find((ae) => ae.combinationKey === L.combinationKey),
|
|
1937
1937
|
name: At(ce().variants, ((X = C == null ? void 0 : C.variant) == null ? void 0 : X.variantGroupIds) || [])[L.combinationKey]
|
|
1938
1938
|
} : C;
|
|
@@ -2002,7 +2002,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
2002
2002
|
"get-sub-row": J,
|
|
2003
2003
|
"page-size": 999,
|
|
2004
2004
|
"row-data": O.value,
|
|
2005
|
-
"search-value": a(
|
|
2005
|
+
"search-value": a(m),
|
|
2006
2006
|
"shrink-at": !1,
|
|
2007
2007
|
"hide-footer": "",
|
|
2008
2008
|
"onUpdate:expandedState": B[0] || (B[0] = (W) => M.value = W),
|
|
@@ -2029,7 +2029,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
2029
2029
|
emits: ["update:group", "submit:group", "status:show"],
|
|
2030
2030
|
setup(e, { expose: o, emit: t }) {
|
|
2031
2031
|
let n = e;
|
|
2032
|
-
const f = t, l = ce(),
|
|
2032
|
+
const f = t, l = ce(), p = $e(), s = et(Ke(xe())), v = H(!1), _ = H(!1), r = (u) => {
|
|
2033
2033
|
Lt.isBoolean(u) ? _.value = u : _.value = !_.value;
|
|
2034
2034
|
}, d = x(() => n.group ? n.config(n.group) : null), c = x(() => [
|
|
2035
2035
|
{
|
|
@@ -2045,18 +2045,18 @@ const Vr = /* @__PURE__ */ de({
|
|
|
2045
2045
|
value: Q.F_ADDON_GROUP_TYPE.enum.DYNAMIC
|
|
2046
2046
|
}
|
|
2047
2047
|
]);
|
|
2048
|
-
function
|
|
2048
|
+
function m(u) {
|
|
2049
2049
|
f("update:group", u);
|
|
2050
2050
|
}
|
|
2051
2051
|
function S(u) {
|
|
2052
2052
|
function F() {
|
|
2053
|
-
|
|
2053
|
+
m({
|
|
2054
2054
|
...n.group,
|
|
2055
2055
|
items: {},
|
|
2056
2056
|
type: u
|
|
2057
2057
|
});
|
|
2058
2058
|
}
|
|
2059
|
-
Object.keys(n.group.items).length > 0 ?
|
|
2059
|
+
Object.keys(n.group.items).length > 0 ? p.open({
|
|
2060
2060
|
title: "Change addon group type",
|
|
2061
2061
|
message: "Change addon group type will clear all products. Are you sure to proceed?",
|
|
2062
2062
|
primaryActions: {
|
|
@@ -2070,7 +2070,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
2070
2070
|
}).onPrimary(F) : F();
|
|
2071
2071
|
}
|
|
2072
2072
|
function E(u) {
|
|
2073
|
-
return new un(l, s.updateMenu,
|
|
2073
|
+
return new un(l, s.updateMenu, p).mapGroups(
|
|
2074
2074
|
[u],
|
|
2075
2075
|
d.value.isOverride
|
|
2076
2076
|
)[0];
|
|
@@ -2261,8 +2261,8 @@ const Vr = /* @__PURE__ */ de({
|
|
|
2261
2261
|
"categorized-items": u.categorizedItems,
|
|
2262
2262
|
config: d.value,
|
|
2263
2263
|
group: u.group,
|
|
2264
|
-
"onUpdate:group": F[5] || (F[5] = (J) =>
|
|
2265
|
-
"onUpdate:unmapGroup": F[6] || (F[6] = (J) =>
|
|
2264
|
+
"onUpdate:group": F[5] || (F[5] = (J) => m(J)),
|
|
2265
|
+
"onUpdate:unmapGroup": F[6] || (F[6] = (J) => m(E(J)))
|
|
2266
2266
|
}, null, 8, ["allow-refund-inventory", "categorized-items", "config", "group"])
|
|
2267
2267
|
]),
|
|
2268
2268
|
_: 1
|
|
@@ -2284,7 +2284,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
2284
2284
|
emits: ["update:combinations"],
|
|
2285
2285
|
setup(e, { expose: o, emit: t }) {
|
|
2286
2286
|
var O, M;
|
|
2287
|
-
const n = e, f = t, l = ce(),
|
|
2287
|
+
const n = e, f = t, l = ce(), p = $e(), s = et(Ke(xe())), v = H([]), _ = H(n.combinations[0].combinationKey || ""), r = x(
|
|
2288
2288
|
() => v.value.findIndex((g) => g.combinationKey == _.value)
|
|
2289
2289
|
), d = x(
|
|
2290
2290
|
() => n.combinations.map((g) => ({
|
|
@@ -2316,9 +2316,9 @@ const Vr = /* @__PURE__ */ de({
|
|
|
2316
2316
|
};
|
|
2317
2317
|
})
|
|
2318
2318
|
};
|
|
2319
|
-
return new un(l, s.updateMenu,
|
|
2319
|
+
return new un(l, s.updateMenu, p).mapGroups([i], !0)[0];
|
|
2320
2320
|
});
|
|
2321
|
-
function
|
|
2321
|
+
function m(g) {
|
|
2322
2322
|
var i, b;
|
|
2323
2323
|
const u = (i = v.value[r.value].groups) == null ? void 0 : i.findIndex(
|
|
2324
2324
|
(V) => V._id === n.groupId
|
|
@@ -2379,7 +2379,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
2379
2379
|
group: c.value,
|
|
2380
2380
|
action: "update",
|
|
2381
2381
|
title: a(k)("menu.group.update"),
|
|
2382
|
-
"onUpdate:group": u[3] || (u[3] = (b) =>
|
|
2382
|
+
"onUpdate:group": u[3] || (u[3] = (b) => m(b)),
|
|
2383
2383
|
"onSubmit:group": u[4] || (u[4] = (b) => T()),
|
|
2384
2384
|
"onStatus:show": u[5] || (u[5] = (b) => w.value = b)
|
|
2385
2385
|
}, {
|
|
@@ -2436,7 +2436,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
2436
2436
|
groupIds: {}
|
|
2437
2437
|
},
|
|
2438
2438
|
setup(e) {
|
|
2439
|
-
const o = e, t = $e(), { emitData: n, emitAction: f } = Nt(), l = ce(),
|
|
2439
|
+
const o = e, t = $e(), { emitData: n, emitAction: f } = Nt(), l = ce(), p = x(() => l.rules.group), s = x(() => l.groups);
|
|
2440
2440
|
function v(T) {
|
|
2441
2441
|
return ge(T ?? []).sort((h, k) => h.position - k.position);
|
|
2442
2442
|
}
|
|
@@ -2445,7 +2445,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
2445
2445
|
type: dn(l.items, w.items)
|
|
2446
2446
|
}, T), {})), r = x(() => [
|
|
2447
2447
|
...Object.entries(_.value).map(([T, { name: w, type: h }]) => ({
|
|
2448
|
-
label: `${w} ${
|
|
2448
|
+
label: `${w} ${p.value.type ? `(${Ot(h)})` : ""}`.trim(),
|
|
2449
2449
|
value: T
|
|
2450
2450
|
}))
|
|
2451
2451
|
]), d = x(() => !!l.state.currentCatalogId || !!l.state.currentSchedulerId);
|
|
@@ -2477,7 +2477,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
2477
2477
|
position: l.groups.length - 1,
|
|
2478
2478
|
itemsLinked: []
|
|
2479
2479
|
}));
|
|
2480
|
-
const c = H(ge(o.groupIds || [])),
|
|
2480
|
+
const c = H(ge(o.groupIds || [])), m = H(""), { t: S } = me(), E = () => {
|
|
2481
2481
|
n(c.value), f("primary"), t.close();
|
|
2482
2482
|
};
|
|
2483
2483
|
return (T, w) => {
|
|
@@ -2486,8 +2486,8 @@ const Vr = /* @__PURE__ */ de({
|
|
|
2486
2486
|
N("div", null, [
|
|
2487
2487
|
I(h, {
|
|
2488
2488
|
autofocus: "",
|
|
2489
|
-
modelValue:
|
|
2490
|
-
"onUpdate:modelValue": w[0] || (w[0] = (M) =>
|
|
2489
|
+
modelValue: m.value,
|
|
2490
|
+
"onUpdate:modelValue": w[0] || (w[0] = (M) => m.value = M),
|
|
2491
2491
|
placeholder: a(S)("menu.common.labels.search_groups")
|
|
2492
2492
|
}, null, 8, ["modelValue", "placeholder"])
|
|
2493
2493
|
]),
|
|
@@ -2505,7 +2505,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
2505
2505
|
label: M.label,
|
|
2506
2506
|
value: M.value
|
|
2507
2507
|
}, null, 8, ["modelValue", "label", "value"]), [
|
|
2508
|
-
[nn, M.label.toLowerCase().includes(
|
|
2508
|
+
[nn, M.label.toLowerCase().includes(m.value.toLowerCase())]
|
|
2509
2509
|
])
|
|
2510
2510
|
]))), 128))
|
|
2511
2511
|
])
|
|
@@ -2571,7 +2571,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
2571
2571
|
}) {
|
|
2572
2572
|
const t = e, n = ce(), f = $e(), {
|
|
2573
2573
|
t: l
|
|
2574
|
-
} = me(),
|
|
2574
|
+
} = me(), p = o, s = x(() => n.rules.group), v = x(() => n.rules.item), _ = x(() => n.groups);
|
|
2575
2575
|
et(Ke(xe())), H(!1);
|
|
2576
2576
|
function r(i, b) {
|
|
2577
2577
|
return ge(b ?? []).map(($) => {
|
|
@@ -2590,7 +2590,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
2590
2590
|
function c(i) {
|
|
2591
2591
|
return ge(i ?? []).sort((V, $) => V.position - $.position);
|
|
2592
2592
|
}
|
|
2593
|
-
function
|
|
2593
|
+
function m(i) {
|
|
2594
2594
|
const b = _.value.find((A) => A._id === i);
|
|
2595
2595
|
if (!b)
|
|
2596
2596
|
return [];
|
|
@@ -2644,7 +2644,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
2644
2644
|
enableSorting: !1,
|
|
2645
2645
|
size: 200,
|
|
2646
2646
|
cell: (i) => {
|
|
2647
|
-
const b = i.row.original._id, $ =
|
|
2647
|
+
const b = i.row.original._id, $ = m(b).join(", ");
|
|
2648
2648
|
return I(Ee.FmTooltip, {
|
|
2649
2649
|
"z-index": 51,
|
|
2650
2650
|
class: "flex",
|
|
@@ -2722,7 +2722,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
2722
2722
|
};
|
|
2723
2723
|
return V.push(A), V;
|
|
2724
2724
|
}, []);
|
|
2725
|
-
|
|
2725
|
+
p("replace:form", jt(n, {
|
|
2726
2726
|
...t.form,
|
|
2727
2727
|
groups: b
|
|
2728
2728
|
}));
|
|
@@ -2735,7 +2735,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
2735
2735
|
b.splice(b.findIndex((Y) => Y._id === i), 1);
|
|
2736
2736
|
for (const Y of ((V = t.form.variant) == null ? void 0 : V.variantCombinations) || [])
|
|
2737
2737
|
(A = Y.groups) == null || A.splice(($ = Y.groups) == null ? void 0 : $.findIndex((oe) => oe._id === i), 1);
|
|
2738
|
-
|
|
2738
|
+
p("replace:form", jt(n, {
|
|
2739
2739
|
...t.form,
|
|
2740
2740
|
groups: b
|
|
2741
2741
|
}));
|
|
@@ -2778,10 +2778,10 @@ const Vr = /* @__PURE__ */ de({
|
|
|
2778
2778
|
return (b = E.value.find((V) => V.value === i)) == null ? void 0 : b.label;
|
|
2779
2779
|
}, y = (i) => {
|
|
2780
2780
|
var b;
|
|
2781
|
-
M.value ?
|
|
2781
|
+
M.value ? p("update:form", "variant", {
|
|
2782
2782
|
variantGroupIds: ((b = t.form.variant) == null ? void 0 : b.variantGroupIds) || [],
|
|
2783
2783
|
variantCombinations: i
|
|
2784
|
-
}) :
|
|
2784
|
+
}) : p("update:form", "groups", i[0].groups || []);
|
|
2785
2785
|
};
|
|
2786
2786
|
return (i, b) => {
|
|
2787
2787
|
const V = q("FmButton"), $ = q("FmTable");
|
|
@@ -2842,7 +2842,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
2842
2842
|
}) {
|
|
2843
2843
|
const {
|
|
2844
2844
|
t
|
|
2845
|
-
} = me(), n = e, f = o, l = ce(),
|
|
2845
|
+
} = me(), n = e, f = o, l = ce(), p = x(() => l.rules.item), s = x(() => p.value.inventory);
|
|
2846
2846
|
function v(E, T, w, h) {
|
|
2847
2847
|
return !T || T && T.length === 0 ? [{
|
|
2848
2848
|
_id: "",
|
|
@@ -2937,7 +2937,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
2937
2937
|
}
|
|
2938
2938
|
}]);
|
|
2939
2939
|
const c = H([]);
|
|
2940
|
-
async function
|
|
2940
|
+
async function m({
|
|
2941
2941
|
_id: E
|
|
2942
2942
|
}) {
|
|
2943
2943
|
for (const T of c.value)
|
|
@@ -2966,7 +2966,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
2966
2966
|
}
|
|
2967
2967
|
}, null, 8, ["title", "name", "bindingKey", "initialValue", "onUpdate:inventory"]))), 128)), I(a(To), {
|
|
2968
2968
|
"row-data": r.value,
|
|
2969
|
-
onRowClick:
|
|
2969
|
+
onRowClick: m
|
|
2970
2970
|
}, null, 8, ["row-data"])])])]),
|
|
2971
2971
|
_: 1
|
|
2972
2972
|
}, 8, ["title", "subTitle"]));
|
|
@@ -2993,12 +2993,12 @@ const Vr = /* @__PURE__ */ de({
|
|
|
2993
2993
|
},
|
|
2994
2994
|
emits: ["update:form"],
|
|
2995
2995
|
setup(e, { emit: o }) {
|
|
2996
|
-
const t = e, n = Je(), f = ce(), { t: l } = me(),
|
|
2996
|
+
const t = e, n = Je(), f = ce(), { t: l } = me(), p = o, s = x(() => f.rules.item), v = x(() => {
|
|
2997
2997
|
var O, M;
|
|
2998
2998
|
const h = t.isOverride ? ((O = t.fallback) == null ? void 0 : O.unit) ?? ((M = t.fallback) == null ? void 0 : M.perXUnit) : void 0, k = t.form.unit ?? t.form.perXUnit ?? h;
|
|
2999
2999
|
return k != null;
|
|
3000
3000
|
}), _ = (h) => {
|
|
3001
|
-
|
|
3001
|
+
p("update:form", "unit", h ? "" : void 0), p("update:form", "perXUnit", h ? 0 : void 0);
|
|
3002
3002
|
}, r = x(() => bt.setCoreStore(n).taxSetting()), d = x(() => {
|
|
3003
3003
|
var h;
|
|
3004
3004
|
return bt.getSelectedTax(
|
|
@@ -3010,14 +3010,14 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3010
3010
|
function c(h) {
|
|
3011
3011
|
const k = h.replace(/[^0-9.]/g, "");
|
|
3012
3012
|
if (!h) return !1;
|
|
3013
|
-
|
|
3013
|
+
p("update:form", "perXUnit", parseFloat(k));
|
|
3014
3014
|
}
|
|
3015
|
-
function
|
|
3015
|
+
function m(h) {
|
|
3016
3016
|
if (!h && t.form.perXUnit) {
|
|
3017
3017
|
const [k, O] = t.form.perXUnit.toString().split(".");
|
|
3018
3018
|
if (O && O.length > 4) {
|
|
3019
3019
|
const g = (typeof t.form.perXUnit == "string" ? parseFloat(t.form.perXUnit) : t.form.perXUnit).toFixed(4);
|
|
3020
|
-
|
|
3020
|
+
p("update:form", "perXUnit", parseFloat(g));
|
|
3021
3021
|
}
|
|
3022
3022
|
}
|
|
3023
3023
|
}
|
|
@@ -3035,7 +3035,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3035
3035
|
if (!S.value)
|
|
3036
3036
|
try {
|
|
3037
3037
|
S.value = !0, n.pushDataLayer({ event: "menu_catalog_item_price_remy_suggest_pricing" }), je.toggleDialog(!0), je.registerOnSelect((b) => {
|
|
3038
|
-
typeof b == "number" &&
|
|
3038
|
+
typeof b == "number" && p(
|
|
3039
3039
|
"update:form",
|
|
3040
3040
|
"price",
|
|
3041
3041
|
we.Dinero.fromNumber({
|
|
@@ -3082,7 +3082,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3082
3082
|
class: "w-[258px] xs:w-full",
|
|
3083
3083
|
label: a(l)("menu.product.form.price.fields.selling_price.label"),
|
|
3084
3084
|
"show-currency": "",
|
|
3085
|
-
"onUpdate:modelValue": k[0] || (k[0] = (i) => i &&
|
|
3085
|
+
"onUpdate:modelValue": k[0] || (k[0] = (i) => i && p("update:form", "price", i))
|
|
3086
3086
|
}, {
|
|
3087
3087
|
append: z(() => [
|
|
3088
3088
|
rt(I(rn, {
|
|
@@ -3104,7 +3104,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3104
3104
|
placeholder: "--",
|
|
3105
3105
|
class: "flex-1",
|
|
3106
3106
|
"shift-menu": "",
|
|
3107
|
-
"onUpdate:modelValue": k[1] || (k[1] = (i) =>
|
|
3107
|
+
"onUpdate:modelValue": k[1] || (k[1] = (i) => p("update:form", "taxes", [a(bt).decodeTax(i)]))
|
|
3108
3108
|
}, null, 8, ["disabled", "items", "label", "model-value"])
|
|
3109
3109
|
], 8, ua),
|
|
3110
3110
|
!h.isOverride && a(f).isV4 ? (P(), ne(Ge, {
|
|
@@ -3127,7 +3127,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3127
3127
|
key: 0,
|
|
3128
3128
|
"price-tiers": a(T).priceTiers.value,
|
|
3129
3129
|
"model-value": h.form.priceTiers || ((i = h.fallback) == null ? void 0 : i.priceTiers) || {},
|
|
3130
|
-
"onUpdate:modelValue": k[2] || (k[2] = (b) =>
|
|
3130
|
+
"onUpdate:modelValue": k[2] || (k[2] = (b) => p("update:form", "priceTiers", b))
|
|
3131
3131
|
}, null, 8, ["price-tiers", "model-value"]))
|
|
3132
3132
|
];
|
|
3133
3133
|
}),
|
|
@@ -3146,7 +3146,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3146
3146
|
value: h.form.openPrice,
|
|
3147
3147
|
label: a(l)("menu.product.form.price.settings.open_price.label"),
|
|
3148
3148
|
sublabel: a(l)("menu.product.form.price.settings.open_price.sublabel"),
|
|
3149
|
-
"onUpdate:modelValue": k[3] || (k[3] = ($) =>
|
|
3149
|
+
"onUpdate:modelValue": k[3] || (k[3] = ($) => p("update:form", "openPrice", $))
|
|
3150
3150
|
}, null, 8, ["disabled", "model-value", "value", "label", "sublabel"]),
|
|
3151
3151
|
N("div", ca, [
|
|
3152
3152
|
I(g, {
|
|
@@ -3170,7 +3170,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3170
3170
|
inputmode: "numeric",
|
|
3171
3171
|
placeholder: a(l)("menu.product.form.price.settings.sell_by_unit.per_unit.placeholder"),
|
|
3172
3172
|
type: "number",
|
|
3173
|
-
onFocusChanged:
|
|
3173
|
+
onFocusChanged: m,
|
|
3174
3174
|
"onUpdate:modelValue": c
|
|
3175
3175
|
}, null, 8, ["disabled", "model-value", "rules", "placeholder"])
|
|
3176
3176
|
]),
|
|
@@ -3182,7 +3182,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3182
3182
|
($) => !!$ || a(l)("menu.product.form.price.settings.sell_by_unit.unit.required")
|
|
3183
3183
|
],
|
|
3184
3184
|
placeholder: a(l)("menu.product.form.price.settings.sell_by_unit.unit.placeholder"),
|
|
3185
|
-
"onUpdate:modelValue": k[4] || (k[4] = ($) =>
|
|
3185
|
+
"onUpdate:modelValue": k[4] || (k[4] = ($) => p("update:form", "unit", $))
|
|
3186
3186
|
}, null, 8, ["disabled", "model-value", "rules", "placeholder"])
|
|
3187
3187
|
])
|
|
3188
3188
|
])) : te("", !0)
|
|
@@ -3192,7 +3192,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3192
3192
|
"model-value": !!h.form.costing,
|
|
3193
3193
|
value: !!h.form.costing,
|
|
3194
3194
|
label: a(l)("menu.product.form.price.settings.track_costing.label"),
|
|
3195
|
-
"onUpdate:modelValue": k[5] || (k[5] = ($) =>
|
|
3195
|
+
"onUpdate:modelValue": k[5] || (k[5] = ($) => p("update:form", "costing", $ ? a(we.Dinero).zero().toObject() : void 0))
|
|
3196
3196
|
}, null, 8, ["model-value", "value", "label"]),
|
|
3197
3197
|
h.form.costing ? (P(), Z("div", _a, [
|
|
3198
3198
|
N("div", ya, [
|
|
@@ -3202,7 +3202,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3202
3202
|
"model-value": h.form.costing || null,
|
|
3203
3203
|
nullable: "",
|
|
3204
3204
|
"show-currency": "",
|
|
3205
|
-
"onUpdate:modelValue": k[6] || (k[6] = ($) =>
|
|
3205
|
+
"onUpdate:modelValue": k[6] || (k[6] = ($) => p("update:form", "costing", $ ?? a(we.Dinero).zero().toObject()))
|
|
3206
3206
|
}, null, 8, ["model-value"])
|
|
3207
3207
|
])
|
|
3208
3208
|
])) : te("", !0)
|
|
@@ -3213,7 +3213,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3213
3213
|
"model-value": !!h.form.minPrice,
|
|
3214
3214
|
value: !!h.form.minPrice,
|
|
3215
3215
|
label: a(l)("menu.product.form.price.settings.min_price.label"),
|
|
3216
|
-
"onUpdate:modelValue": k[7] || (k[7] = ($) =>
|
|
3216
|
+
"onUpdate:modelValue": k[7] || (k[7] = ($) => p("update:form", "minPrice", $ ? a(we.Dinero).zero().toObject() : void 0))
|
|
3217
3217
|
}, null, 8, ["disabled", "model-value", "value", "label"]),
|
|
3218
3218
|
N("div", ha, [
|
|
3219
3219
|
N("div", wa, [
|
|
@@ -3224,7 +3224,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3224
3224
|
"model-value": h.form.minPrice || null,
|
|
3225
3225
|
class: "flex-1",
|
|
3226
3226
|
"show-currency": "",
|
|
3227
|
-
"onUpdate:modelValue": k[8] || (k[8] = ($) =>
|
|
3227
|
+
"onUpdate:modelValue": k[8] || (k[8] = ($) => p("update:form", "minPrice", $ ?? a(we.Dinero).zero().toObject()))
|
|
3228
3228
|
}, null, 8, ["max", "model-value"])) : te("", !0)
|
|
3229
3229
|
])
|
|
3230
3230
|
])
|
|
@@ -3252,7 +3252,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3252
3252
|
emits: ["update:form", "replace:form"],
|
|
3253
3253
|
setup(e, { emit: o }) {
|
|
3254
3254
|
const t = e, n = ce(), { t: f } = me(), l = o;
|
|
3255
|
-
function
|
|
3255
|
+
function p() {
|
|
3256
3256
|
return {
|
|
3257
3257
|
...Ve.generator.initMenuV4PrintSetting(),
|
|
3258
3258
|
// make toRoot default to false
|
|
@@ -3271,21 +3271,21 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3271
3271
|
}), d = x(() => v.value.reduce((w, h) => (w[h._id] = h.name, w), {}));
|
|
3272
3272
|
function c(w) {
|
|
3273
3273
|
l("update:form", "print", {
|
|
3274
|
-
...
|
|
3274
|
+
...p(),
|
|
3275
3275
|
...t.form.print,
|
|
3276
3276
|
toRoot: !w
|
|
3277
3277
|
});
|
|
3278
3278
|
}
|
|
3279
|
-
function
|
|
3279
|
+
function m(w) {
|
|
3280
3280
|
l("update:form", "print", {
|
|
3281
|
-
...
|
|
3281
|
+
...p(),
|
|
3282
3282
|
...t.form.print,
|
|
3283
3283
|
sequential: w
|
|
3284
3284
|
});
|
|
3285
3285
|
}
|
|
3286
3286
|
function S(w) {
|
|
3287
3287
|
l("update:form", "print", {
|
|
3288
|
-
...
|
|
3288
|
+
...p(),
|
|
3289
3289
|
...t.form.print,
|
|
3290
3290
|
department: w.filter((h) => {
|
|
3291
3291
|
var k;
|
|
@@ -3297,7 +3297,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3297
3297
|
var O, M;
|
|
3298
3298
|
let k = [...((M = (O = t.form) == null ? void 0 : O.print) == null ? void 0 : M.department) ?? []];
|
|
3299
3299
|
h && !k.includes(w) ? k = [...k, w] : h || (k = k.filter((g) => g !== w)), l("update:form", "print", {
|
|
3300
|
-
...
|
|
3300
|
+
...p(),
|
|
3301
3301
|
...t.form.print,
|
|
3302
3302
|
department: k
|
|
3303
3303
|
});
|
|
@@ -3346,7 +3346,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3346
3346
|
I(M, {
|
|
3347
3347
|
label: a(f)("menu.product.form.print.kds.label"),
|
|
3348
3348
|
"model-value": ((F = w.form.print) == null ? void 0 : F.sequential) ?? !1,
|
|
3349
|
-
"onUpdate:modelValue": h[1] || (h[1] = (y) =>
|
|
3349
|
+
"onUpdate:modelValue": h[1] || (h[1] = (y) => m(y))
|
|
3350
3350
|
}, {
|
|
3351
3351
|
default: z(() => [
|
|
3352
3352
|
N("div", Ia, [
|
|
@@ -3444,27 +3444,27 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3444
3444
|
et(Ke(xe()));
|
|
3445
3445
|
const {
|
|
3446
3446
|
t: l
|
|
3447
|
-
} = me(),
|
|
3448
|
-
var
|
|
3449
|
-
return !!((S = (
|
|
3447
|
+
} = me(), p = o, s = x(() => {
|
|
3448
|
+
var m, S;
|
|
3449
|
+
return !!((S = (m = t.form.variant) == null ? void 0 : m.variantCombinations) != null && S.length);
|
|
3450
3450
|
}), v = x(() => {
|
|
3451
|
-
var
|
|
3451
|
+
var m;
|
|
3452
3452
|
return [{
|
|
3453
3453
|
key: "",
|
|
3454
|
-
name: t.form.name || ((
|
|
3454
|
+
name: t.form.name || ((m = t.fallback) == null ? void 0 : m.name) || "Product",
|
|
3455
3455
|
takeaway: t.form.takeawayUsed,
|
|
3456
|
-
onUpdate: (S) =>
|
|
3456
|
+
onUpdate: (S) => p("update:form", "takeawayUsed", S)
|
|
3457
3457
|
}];
|
|
3458
3458
|
}), _ = x(() => {
|
|
3459
|
-
var
|
|
3460
|
-
return (((
|
|
3459
|
+
var m;
|
|
3460
|
+
return (((m = t.form.variant) == null ? void 0 : m.variantCombinations) || []).map((S, E) => ({
|
|
3461
3461
|
key: S.combinationKey || "",
|
|
3462
3462
|
name: t.fullCombinations[S.combinationKey || ""],
|
|
3463
3463
|
takeaway: S.takeawayUsed,
|
|
3464
3464
|
onUpdate: (T) => {
|
|
3465
3465
|
var h, k;
|
|
3466
3466
|
const w = ge(((h = t.form.variant) == null ? void 0 : h.variantCombinations) || []);
|
|
3467
|
-
w[E].takeawayUsed = T,
|
|
3467
|
+
w[E].takeawayUsed = T, p("update:form", "variant", {
|
|
3468
3468
|
variantGroupIds: ((k = t.form.variant) == null ? void 0 : k.variantGroupIds) || [],
|
|
3469
3469
|
variantCombinations: w
|
|
3470
3470
|
});
|
|
@@ -3476,9 +3476,9 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3476
3476
|
} : {
|
|
3477
3477
|
label: l("menu.product.form.takeaway.options.no_preset"),
|
|
3478
3478
|
value: null
|
|
3479
|
-
}, ...n.takeaways.map((
|
|
3480
|
-
label:
|
|
3481
|
-
value:
|
|
3479
|
+
}, ...n.takeaways.map((m) => ({
|
|
3480
|
+
label: m.name,
|
|
3481
|
+
value: m._id
|
|
3482
3482
|
}))]), c = H([{
|
|
3483
3483
|
accessorKey: "name",
|
|
3484
3484
|
enableSorting: !1,
|
|
@@ -3487,8 +3487,8 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3487
3487
|
accessorKey: "takeaway",
|
|
3488
3488
|
enableSorting: !1,
|
|
3489
3489
|
header: () => l("menu.product.form.takeaway.columns.takeaway"),
|
|
3490
|
-
cell: (
|
|
3491
|
-
const S =
|
|
3490
|
+
cell: (m) => {
|
|
3491
|
+
const S = m.getValue(), E = m.row.original;
|
|
3492
3492
|
return he(wo, {
|
|
3493
3493
|
action: "add",
|
|
3494
3494
|
applyProduct: !1,
|
|
@@ -3528,7 +3528,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3528
3528
|
});
|
|
3529
3529
|
}
|
|
3530
3530
|
}]);
|
|
3531
|
-
return (
|
|
3531
|
+
return (m, S) => {
|
|
3532
3532
|
const E = q("fm-table");
|
|
3533
3533
|
return P(), ne(Pe, {
|
|
3534
3534
|
title: a(l)("menu.product.form.takeaway.title"),
|
|
@@ -3558,8 +3558,8 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3558
3558
|
setTimeout(() => {
|
|
3559
3559
|
n("update:show", !1);
|
|
3560
3560
|
}, 100);
|
|
3561
|
-
}, l = ce(), { t:
|
|
3562
|
-
() => t.initialValue ?
|
|
3561
|
+
}, l = ce(), { t: p } = me(), s = x(
|
|
3562
|
+
() => t.initialValue ? p("menu.variant.form.title.edit") : p("menu.variant.form.title.add")
|
|
3563
3563
|
), v = x(() => t.initialValue ? "Update" : "Add"), _ = () => {
|
|
3564
3564
|
if (t.initialValue) {
|
|
3565
3565
|
const O = ge(t.initialValue);
|
|
@@ -3570,7 +3570,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3570
3570
|
} else
|
|
3571
3571
|
return { ...Ve.generator.initMenuV4VariantGroup(), usedBy: [] };
|
|
3572
3572
|
}, r = H(_()), d = H(!1), c = H(!1);
|
|
3573
|
-
function
|
|
3573
|
+
function m(O) {
|
|
3574
3574
|
r.value.options = O;
|
|
3575
3575
|
}
|
|
3576
3576
|
function S(O, M) {
|
|
@@ -3666,7 +3666,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3666
3666
|
variant: "primary"
|
|
3667
3667
|
}, null, 8, ["label", "loading"]),
|
|
3668
3668
|
I(F, {
|
|
3669
|
-
label: a(
|
|
3669
|
+
label: a(p)("menu.common.actions.cancel"),
|
|
3670
3670
|
size: "lg",
|
|
3671
3671
|
variant: "tertiary",
|
|
3672
3672
|
onClick: M[1] || (M[1] = () => c.value = !1)
|
|
@@ -3678,20 +3678,20 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3678
3678
|
return [
|
|
3679
3679
|
N("div", Oa, [
|
|
3680
3680
|
I(Pe, {
|
|
3681
|
-
title: a(
|
|
3681
|
+
title: a(p)("menu.variant.form.detail")
|
|
3682
3682
|
}, {
|
|
3683
3683
|
default: z(() => [
|
|
3684
3684
|
I(g, {
|
|
3685
3685
|
autofocus: "",
|
|
3686
|
-
label: a(
|
|
3687
|
-
"helper-text": a(
|
|
3686
|
+
label: a(p)("menu.variant.form.name.label"),
|
|
3687
|
+
"helper-text": a(p)("menu.variant.form.name.helper"),
|
|
3688
3688
|
modelValue: r.value.name,
|
|
3689
3689
|
"onUpdate:modelValue": M[0] || (M[0] = (b) => r.value.name = b),
|
|
3690
|
-
rules: [(b) => !!b || a(
|
|
3691
|
-
placeholder: a(
|
|
3690
|
+
rules: [(b) => !!b || a(p)("menu.variant.form.name.required")],
|
|
3691
|
+
placeholder: a(p)("menu.variant.form.name.placeholder")
|
|
3692
3692
|
}, null, 8, ["label", "helper-text", "modelValue", "rules", "placeholder"]),
|
|
3693
3693
|
I(Ge, {
|
|
3694
|
-
label: a(
|
|
3694
|
+
label: a(p)("menu.variant.form.options.title")
|
|
3695
3695
|
}, {
|
|
3696
3696
|
default: z(() => [
|
|
3697
3697
|
N("div", null, [
|
|
@@ -3702,7 +3702,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3702
3702
|
group: "categories",
|
|
3703
3703
|
handle: ".handle",
|
|
3704
3704
|
"item-key": "_id",
|
|
3705
|
-
"onUpdate:modelValue":
|
|
3705
|
+
"onUpdate:modelValue": m
|
|
3706
3706
|
}, {
|
|
3707
3707
|
item: z(({ element: b, index: V }) => [
|
|
3708
3708
|
N("div", {
|
|
@@ -3718,11 +3718,11 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3718
3718
|
I(g, {
|
|
3719
3719
|
"model-value": b.name,
|
|
3720
3720
|
rules: [
|
|
3721
|
-
() => !!r.value.options.length || a(
|
|
3722
|
-
($) => V === r.value.options.length - 1 || $ ? !0 : a(
|
|
3721
|
+
() => !!r.value.options.length || a(p)("menu.variant.form.options.min_required"),
|
|
3722
|
+
($) => V === r.value.options.length - 1 || $ ? !0 : a(p)("menu.variant.form.options.name_required")
|
|
3723
3723
|
],
|
|
3724
3724
|
class: "flex-1",
|
|
3725
|
-
placeholder: a(
|
|
3725
|
+
placeholder: a(p)("menu.variant.form.options.placeholder"),
|
|
3726
3726
|
"onUpdate:modelValue": ($) => S(b._id, $)
|
|
3727
3727
|
}, Un({ _: 2 }, [
|
|
3728
3728
|
V !== r.value.options.length - 1 ? {
|
|
@@ -3753,7 +3753,7 @@ const Vr = /* @__PURE__ */ de({
|
|
|
3753
3753
|
editable: !1,
|
|
3754
3754
|
overrides: r.value.usedBy || [],
|
|
3755
3755
|
"select-variant": !1,
|
|
3756
|
-
title: a(
|
|
3756
|
+
title: a(p)("menu.variant.form.applied_product")
|
|
3757
3757
|
}, null, 8, ["overrides", "title"])) : te("", !0)
|
|
3758
3758
|
])
|
|
3759
3759
|
];
|
|
@@ -3789,21 +3789,21 @@ const $a = {
|
|
|
3789
3789
|
selectedVariants: {}
|
|
3790
3790
|
},
|
|
3791
3791
|
setup(e) {
|
|
3792
|
-
const o = $e(), { emitData: t, emitAction: n } = Nt(), f = ce(), { t: l } = me(),
|
|
3792
|
+
const o = $e(), { emitData: t, emitAction: n } = Nt(), f = ce(), { t: l } = me(), p = e, s = x(() => f.variants.map((c) => ({
|
|
3793
3793
|
label: c.name,
|
|
3794
3794
|
value: c._id,
|
|
3795
3795
|
disabled: !1
|
|
3796
|
-
}))), v = H(ge(
|
|
3796
|
+
}))), v = H(ge(p.selectedVariants)), _ = H(""), { createVariant: r } = Ra(), d = () => {
|
|
3797
3797
|
t(v.value), n("primary"), o.close();
|
|
3798
3798
|
};
|
|
3799
|
-
return (c,
|
|
3799
|
+
return (c, m) => {
|
|
3800
3800
|
const S = q("FmSearch"), E = q("FmCheckbox"), T = q("FmButton");
|
|
3801
3801
|
return s.value.length > 0 ? (P(), Z("div", $a, [
|
|
3802
3802
|
N("div", null, [
|
|
3803
3803
|
I(S, {
|
|
3804
3804
|
autofocus: "",
|
|
3805
3805
|
modelValue: _.value,
|
|
3806
|
-
"onUpdate:modelValue":
|
|
3806
|
+
"onUpdate:modelValue": m[0] || (m[0] = (w) => _.value = w),
|
|
3807
3807
|
placeholder: a(l)("menu.common.labels.search_variants")
|
|
3808
3808
|
}, null, 8, ["modelValue", "placeholder"])
|
|
3809
3809
|
]),
|
|
@@ -3815,8 +3815,8 @@ const $a = {
|
|
|
3815
3815
|
rt(I(E, {
|
|
3816
3816
|
modelValue: v.value,
|
|
3817
3817
|
"onUpdate:modelValue": [
|
|
3818
|
-
|
|
3819
|
-
|
|
3818
|
+
m[1] || (m[1] = (h) => v.value = h),
|
|
3819
|
+
m[2] || (m[2] = (h) => a(t)(v.value))
|
|
3820
3820
|
],
|
|
3821
3821
|
label: w.label,
|
|
3822
3822
|
value: w.value
|
|
@@ -3832,17 +3832,17 @@ const $a = {
|
|
|
3832
3832
|
label: a(l)("menu.common.actions.add_new_variant"),
|
|
3833
3833
|
variant: "tertiary",
|
|
3834
3834
|
"text-color": "primary",
|
|
3835
|
-
onClick:
|
|
3835
|
+
onClick: m[3] || (m[3] = (w) => a(r)())
|
|
3836
3836
|
}, null, 8, ["label"])) : te("", !0),
|
|
3837
3837
|
N("div", La, [
|
|
3838
3838
|
I(T, {
|
|
3839
3839
|
label: a(l)("menu.common.actions.cancel"),
|
|
3840
3840
|
variant: "tertiary",
|
|
3841
|
-
onClick:
|
|
3841
|
+
onClick: m[4] || (m[4] = (w) => a(o).close())
|
|
3842
3842
|
}, null, 8, ["label"]),
|
|
3843
3843
|
I(T, {
|
|
3844
3844
|
label: a(l)("menu.common.actions.confirm"),
|
|
3845
|
-
onClick:
|
|
3845
|
+
onClick: m[5] || (m[5] = (w) => d())
|
|
3846
3846
|
}, null, 8, ["label"])
|
|
3847
3847
|
])
|
|
3848
3848
|
])
|
|
@@ -3854,7 +3854,7 @@ const $a = {
|
|
|
3854
3854
|
I(T, {
|
|
3855
3855
|
label: a(l)("menu.variant.add"),
|
|
3856
3856
|
icon: "add",
|
|
3857
|
-
onClick:
|
|
3857
|
+
onClick: m[6] || (m[6] = (w) => a(r)())
|
|
3858
3858
|
}, null, 8, ["label"])
|
|
3859
3859
|
]));
|
|
3860
3860
|
};
|
|
@@ -3884,12 +3884,12 @@ const $a = {
|
|
|
3884
3884
|
setup(e, {
|
|
3885
3885
|
emit: o
|
|
3886
3886
|
}) {
|
|
3887
|
-
const t = e, n = ce(), f = eo(), l = xe(),
|
|
3887
|
+
const t = e, n = ce(), f = eo(), l = xe(), p = $e(), {
|
|
3888
3888
|
t: s
|
|
3889
3889
|
} = me(), v = x(() => n.rules.item), _ = x(() => v.value.minPrice && !!t.form.minPrice), r = x(() => !n.state.currentCatalogId), d = x(() => n.variants.reduce((y, i) => (y[i._id] = i, y), {}));
|
|
3890
3890
|
H(!1);
|
|
3891
3891
|
const c = o;
|
|
3892
|
-
function
|
|
3892
|
+
function m(y) {
|
|
3893
3893
|
const i = Ie.clone(t.form);
|
|
3894
3894
|
for (const {
|
|
3895
3895
|
key: b,
|
|
@@ -3919,7 +3919,7 @@ const $a = {
|
|
|
3919
3919
|
}
|
|
3920
3920
|
function E() {
|
|
3921
3921
|
var y;
|
|
3922
|
-
|
|
3922
|
+
p.open({
|
|
3923
3923
|
title: "Add variant",
|
|
3924
3924
|
contentComponent: za,
|
|
3925
3925
|
contentComponentProps: {
|
|
@@ -3989,7 +3989,7 @@ const $a = {
|
|
|
3989
3989
|
};
|
|
3990
3990
|
} else {
|
|
3991
3991
|
const A = ($ = t.form.variant) == null ? void 0 : $.variantCombinations.map((oe) => oe.takeawayUsed), Y = [...new Set(A)];
|
|
3992
|
-
|
|
3992
|
+
m([{
|
|
3993
3993
|
key: "variant",
|
|
3994
3994
|
value: void 0
|
|
3995
3995
|
}, {
|
|
@@ -4005,7 +4005,7 @@ const $a = {
|
|
|
4005
4005
|
}
|
|
4006
4006
|
async function O(y, i, b) {
|
|
4007
4007
|
const V = Ie.clone(t.form);
|
|
4008
|
-
V.variant.variantCombinations[y][i] = b,
|
|
4008
|
+
V.variant.variantCombinations[y][i] = b, m([{
|
|
4009
4009
|
key: "variant",
|
|
4010
4010
|
value: V.variant
|
|
4011
4011
|
}]);
|
|
@@ -4208,12 +4208,12 @@ const $a = {
|
|
|
4208
4208
|
emits: ["update:editingState"],
|
|
4209
4209
|
setup(e, { expose: o, emit: t }) {
|
|
4210
4210
|
var X, ae, ee, fe, se;
|
|
4211
|
-
const n = e, f = t, l = Je(),
|
|
4211
|
+
const n = e, f = t, l = Je(), p = ce(), { t: s } = me();
|
|
4212
4212
|
x(() => {
|
|
4213
4213
|
var U;
|
|
4214
4214
|
return (U = n.initialForm) != null && U._id ? s("menu.product.form.title.update") : s("menu.product.form.title.add");
|
|
4215
4215
|
});
|
|
4216
|
-
const v = x(() =>
|
|
4216
|
+
const v = x(() => p.rules.item), _ = H(), r = H(
|
|
4217
4217
|
n.initialForm ? ge(n.initialForm) : {
|
|
4218
4218
|
...Ve.generator.initMenuV4Item(),
|
|
4219
4219
|
category: n.categoryId
|
|
@@ -4229,7 +4229,7 @@ const $a = {
|
|
|
4229
4229
|
...ge(r.value),
|
|
4230
4230
|
[U]: K
|
|
4231
4231
|
}, ve());
|
|
4232
|
-
},
|
|
4232
|
+
}, m = (U) => {
|
|
4233
4233
|
r.value = U, ve();
|
|
4234
4234
|
};
|
|
4235
4235
|
async function S() {
|
|
@@ -4237,12 +4237,12 @@ const $a = {
|
|
|
4237
4237
|
n.mergedMenu,
|
|
4238
4238
|
[r.value],
|
|
4239
4239
|
n.menu,
|
|
4240
|
-
|
|
4241
|
-
|
|
4240
|
+
p.state.currentCatalogId,
|
|
4241
|
+
p.state.currentSchedulerId || void 0
|
|
4242
4242
|
))[0] : void 0;
|
|
4243
4243
|
}
|
|
4244
4244
|
const E = x(
|
|
4245
|
-
() => !!
|
|
4245
|
+
() => !!p.state.currentCatalogId || !!p.state.currentSchedulerId
|
|
4246
4246
|
), T = x(() => {
|
|
4247
4247
|
var U;
|
|
4248
4248
|
return E.value ? r.value.category == "" || r.value.category == null && ((U = _.value) == null ? void 0 : U.category) == null : Tn(n.menu) && r.value.category == null;
|
|
@@ -4434,7 +4434,7 @@ const $a = {
|
|
|
4434
4434
|
default: z(() => {
|
|
4435
4435
|
var D, j;
|
|
4436
4436
|
return [
|
|
4437
|
-
I(bo, { "menu-store": a(
|
|
4437
|
+
I(bo, { "menu-store": a(p) }, null, 8, ["menu-store"]),
|
|
4438
4438
|
I(Be, {
|
|
4439
4439
|
toggle: h.value,
|
|
4440
4440
|
"onUpdate:toggle": [
|
|
@@ -4518,7 +4518,7 @@ const $a = {
|
|
|
4518
4518
|
"is-addon": T.value,
|
|
4519
4519
|
"is-override": E.value,
|
|
4520
4520
|
"onUpdate:form": c,
|
|
4521
|
-
"onReplace:form": K[5] || (K[5] = (R) =>
|
|
4521
|
+
"onReplace:form": K[5] || (K[5] = (R) => m(R))
|
|
4522
4522
|
}, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
|
|
4523
4523
|
]),
|
|
4524
4524
|
_: 1
|
|
@@ -4542,7 +4542,7 @@ const $a = {
|
|
|
4542
4542
|
"is-addon": T.value,
|
|
4543
4543
|
"is-override": E.value,
|
|
4544
4544
|
"onUpdate:form": c,
|
|
4545
|
-
"onReplace:form": K[8] || (K[8] = (R) =>
|
|
4545
|
+
"onReplace:form": K[8] || (K[8] = (R) => m(R))
|
|
4546
4546
|
}, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
|
|
4547
4547
|
]),
|
|
4548
4548
|
_: 1
|
|
@@ -4567,7 +4567,7 @@ const $a = {
|
|
|
4567
4567
|
"is-addon": T.value,
|
|
4568
4568
|
"is-override": E.value,
|
|
4569
4569
|
"onUpdate:form": c,
|
|
4570
|
-
"onReplace:form": K[11] || (K[11] = (R) =>
|
|
4570
|
+
"onReplace:form": K[11] || (K[11] = (R) => m(R))
|
|
4571
4571
|
}, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
|
|
4572
4572
|
]),
|
|
4573
4573
|
_: 1
|
|
@@ -4592,7 +4592,7 @@ const $a = {
|
|
|
4592
4592
|
"is-addon": T.value,
|
|
4593
4593
|
"is-override": E.value,
|
|
4594
4594
|
"onUpdate:form": c,
|
|
4595
|
-
"onReplace:form": K[14] || (K[14] = (R) =>
|
|
4595
|
+
"onReplace:form": K[14] || (K[14] = (R) => m(R))
|
|
4596
4596
|
}, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
|
|
4597
4597
|
]),
|
|
4598
4598
|
_: 1
|
|
@@ -4617,7 +4617,7 @@ const $a = {
|
|
|
4617
4617
|
"is-addon": T.value,
|
|
4618
4618
|
"is-override": E.value,
|
|
4619
4619
|
"onUpdate:form": c,
|
|
4620
|
-
"onReplace:form": K[17] || (K[17] = (R) =>
|
|
4620
|
+
"onReplace:form": K[17] || (K[17] = (R) => m(R))
|
|
4621
4621
|
}, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
|
|
4622
4622
|
]),
|
|
4623
4623
|
_: 1
|
|
@@ -4630,24 +4630,24 @@ const $a = {
|
|
|
4630
4630
|
}
|
|
4631
4631
|
});
|
|
4632
4632
|
function al(e) {
|
|
4633
|
-
const { storageKey: o, defaultWidth: t, minWidth: n, maxWidth: f } = e, l = jo(o, t),
|
|
4633
|
+
const { storageKey: o, defaultWidth: t, minWidth: n, maxWidth: f } = e, l = jo(o, t), p = H(!1), s = H(null);
|
|
4634
4634
|
function v(d) {
|
|
4635
|
-
d.preventDefault(),
|
|
4635
|
+
d.preventDefault(), p.value = !0, document.addEventListener("mousemove", _), document.addEventListener("mouseup", r), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
4636
4636
|
}
|
|
4637
4637
|
function _(d) {
|
|
4638
|
-
if (
|
|
4639
|
-
const c = s.value.getBoundingClientRect(),
|
|
4640
|
-
|
|
4638
|
+
if (p.value && s.value) {
|
|
4639
|
+
const c = s.value.getBoundingClientRect(), m = d.clientX - c.left;
|
|
4640
|
+
m >= n && m <= f && (l.value = m);
|
|
4641
4641
|
}
|
|
4642
4642
|
}
|
|
4643
4643
|
function r() {
|
|
4644
|
-
|
|
4644
|
+
p.value = !1, document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", r), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
4645
4645
|
}
|
|
4646
4646
|
return $n(() => {
|
|
4647
4647
|
document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", r);
|
|
4648
4648
|
}), {
|
|
4649
4649
|
panelWidth: l,
|
|
4650
|
-
isDragging:
|
|
4650
|
+
isDragging: p,
|
|
4651
4651
|
containerRef: s,
|
|
4652
4652
|
startResize: v,
|
|
4653
4653
|
stopResize: r
|
|
@@ -4687,7 +4687,7 @@ const ll = {
|
|
|
4687
4687
|
N("div", {
|
|
4688
4688
|
class: "absolute left-[-3px] right-[-3px] top-0 bottom-0 resize-handle z-10",
|
|
4689
4689
|
onMousedown: l[0] || (l[0] = //@ts-ignore
|
|
4690
|
-
(...
|
|
4690
|
+
(...p) => a(n) && a(n)(...p))
|
|
4691
4691
|
}, null, 32)
|
|
4692
4692
|
]),
|
|
4693
4693
|
N("div", il, [
|
|
@@ -4700,19 +4700,19 @@ const ll = {
|
|
|
4700
4700
|
}
|
|
4701
4701
|
}), fl = /* @__PURE__ */ tt(pl, [["__scopeId", "data-v-570141b0"]]);
|
|
4702
4702
|
function Fn() {
|
|
4703
|
-
const e = ce(), o = x(() => e.categorizedRawMenuItems.filter((
|
|
4704
|
-
const
|
|
4705
|
-
return
|
|
4703
|
+
const e = ce(), o = x(() => e.categorizedRawMenuItems.filter((p) => p.items.length > 0)), t = x(() => {
|
|
4704
|
+
const p = e.currentCatalog;
|
|
4705
|
+
return p ? Dt.getItemAvailable(p).map((s) => ({ _id: s })) : [];
|
|
4706
4706
|
});
|
|
4707
|
-
async function n(
|
|
4707
|
+
async function n(p) {
|
|
4708
4708
|
var r;
|
|
4709
4709
|
const s = e.currentCatalog;
|
|
4710
4710
|
if (!s) return;
|
|
4711
|
-
const v =
|
|
4711
|
+
const v = p.reduce(
|
|
4712
4712
|
(d, c) => (d[c] = kt(
|
|
4713
4713
|
c,
|
|
4714
4714
|
s.override.items[c],
|
|
4715
|
-
|
|
4715
|
+
p.includes(c),
|
|
4716
4716
|
e.version === Q.F_MENU_VERSION.enum.v3
|
|
4717
4717
|
), d),
|
|
4718
4718
|
{}
|
|
@@ -4732,16 +4732,16 @@ function Fn() {
|
|
|
4732
4732
|
data: _
|
|
4733
4733
|
});
|
|
4734
4734
|
}
|
|
4735
|
-
async function f(
|
|
4735
|
+
async function f(p) {
|
|
4736
4736
|
var r;
|
|
4737
4737
|
const s = e.currentCatalog;
|
|
4738
4738
|
if (!s) return;
|
|
4739
|
-
const v =
|
|
4739
|
+
const v = p.reduce(
|
|
4740
4740
|
(d, c) => {
|
|
4741
|
-
const
|
|
4741
|
+
const m = s.override.items[c];
|
|
4742
4742
|
return d[c] = kt(
|
|
4743
4743
|
c,
|
|
4744
|
-
|
|
4744
|
+
m,
|
|
4745
4745
|
!0,
|
|
4746
4746
|
e.version === Q.F_MENU_VERSION.enum.v3
|
|
4747
4747
|
), d;
|
|
@@ -4763,16 +4763,16 @@ function Fn() {
|
|
|
4763
4763
|
data: _
|
|
4764
4764
|
});
|
|
4765
4765
|
}
|
|
4766
|
-
async function l(
|
|
4766
|
+
async function l(p) {
|
|
4767
4767
|
var r;
|
|
4768
4768
|
const s = e.currentCatalog;
|
|
4769
4769
|
if (!s) return;
|
|
4770
|
-
const v =
|
|
4770
|
+
const v = p.reduce(
|
|
4771
4771
|
(d, c) => {
|
|
4772
|
-
const
|
|
4772
|
+
const m = s.override.items[c];
|
|
4773
4773
|
return d[c] = kt(
|
|
4774
4774
|
c,
|
|
4775
|
-
|
|
4775
|
+
m,
|
|
4776
4776
|
!1,
|
|
4777
4777
|
e.version === Q.F_MENU_VERSION.enum.v3
|
|
4778
4778
|
), d;
|
|
@@ -4803,12 +4803,12 @@ function Fn() {
|
|
|
4803
4803
|
};
|
|
4804
4804
|
}
|
|
4805
4805
|
function kt(e, o, t, n) {
|
|
4806
|
-
const f = o == null ? void 0 : o.find((s) => !s.combinationKey), l = t ? null : Q.F_ORDER_FROM.enum.NONE,
|
|
4806
|
+
const f = o == null ? void 0 : o.find((s) => !s.combinationKey), l = t ? null : Q.F_ORDER_FROM.enum.NONE, p = n ? t ? null : "" : f == null ? void 0 : f.category;
|
|
4807
4807
|
return [
|
|
4808
4808
|
{
|
|
4809
4809
|
...f ?? {},
|
|
4810
4810
|
orderFrom: l,
|
|
4811
|
-
category:
|
|
4811
|
+
category: p,
|
|
4812
4812
|
_id: e
|
|
4813
4813
|
},
|
|
4814
4814
|
...(o == null ? void 0 : o.filter((s) => !!s.combinationKey)) ?? []
|
|
@@ -4823,7 +4823,7 @@ function gl() {
|
|
|
4823
4823
|
...r,
|
|
4824
4824
|
items: r.items.filter((d) => _.has(d._id))
|
|
4825
4825
|
})).filter((r) => r.items.length > 0);
|
|
4826
|
-
}),
|
|
4826
|
+
}), p = x(() => {
|
|
4827
4827
|
var d;
|
|
4828
4828
|
const v = e.currentScheduler;
|
|
4829
4829
|
if (!v) return [];
|
|
@@ -4850,14 +4850,14 @@ function gl() {
|
|
|
4850
4850
|
});
|
|
4851
4851
|
} else {
|
|
4852
4852
|
const d = v.reduce(
|
|
4853
|
-
(
|
|
4853
|
+
(m, S) => {
|
|
4854
4854
|
const E = _.items.filter((T) => T._id == S) ?? [];
|
|
4855
|
-
return
|
|
4855
|
+
return m = m.concat(
|
|
4856
4856
|
vo(S, E, (T) => ({
|
|
4857
4857
|
...T,
|
|
4858
4858
|
orderFrom: null
|
|
4859
4859
|
}))
|
|
4860
|
-
),
|
|
4860
|
+
), m;
|
|
4861
4861
|
},
|
|
4862
4862
|
[]
|
|
4863
4863
|
), c = {
|
|
@@ -4873,7 +4873,7 @@ function gl() {
|
|
|
4873
4873
|
}
|
|
4874
4874
|
return {
|
|
4875
4875
|
linkableItems: l,
|
|
4876
|
-
currentItems:
|
|
4876
|
+
currentItems: p,
|
|
4877
4877
|
applyProduct: s
|
|
4878
4878
|
};
|
|
4879
4879
|
}
|
|
@@ -4893,8 +4893,8 @@ function _l(e, o, t) {
|
|
|
4893
4893
|
subCategoryMeta: {}
|
|
4894
4894
|
}), f = mt(e);
|
|
4895
4895
|
let l = f;
|
|
4896
|
-
for (const
|
|
4897
|
-
l.subCategoryMeta = l.subCategoryMeta ?? {}, l.subCategoryMeta[
|
|
4896
|
+
for (const p of o)
|
|
4897
|
+
l.subCategoryMeta = l.subCategoryMeta ?? {}, l.subCategoryMeta[p] = l.subCategoryMeta[p] ?? n(), l = l.subCategoryMeta[p];
|
|
4898
4898
|
return Object.assign(l, t), f;
|
|
4899
4899
|
}
|
|
4900
4900
|
var ke = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "SELECT_CATEGORY", e.CREATE_CATEGORY = "CREATE_CATEGORY", e.UPDATE_CATEGORY = "UPDATE_CATEGORY", e.DELETE_CATEGORY = "DELETE_CATEGORY", e.SELECT_ITEM = "SELECT_ITEM", e.CREATE_ITEM = "CREATE_ITEM", e.UPDATE_ITEM = "UPDATE_ITEM", e.DELETE_ITEM = "DELETE_ITEM", e.SELECT_PRICE = "SELECT_PRICE", e.SELECT_VARIANT = "SELECT_VARIANT", e.SELECT_GROUP = "SELECT_GROUP", e.EDIT_GROUP = "EDIT_GROUP", e))(ke || {});
|
|
@@ -4946,10 +4946,10 @@ function On() {
|
|
|
4946
4946
|
else
|
|
4947
4947
|
throw new Error("Invalid item type");
|
|
4948
4948
|
});
|
|
4949
|
-
const
|
|
4950
|
-
|
|
4949
|
+
const m = c.modules.category.find((S) => S._id === (v == null ? void 0 : v._id) || null);
|
|
4950
|
+
m && (m.subCategoryMeta = r.subCategoryMeta), e.setMenu(c);
|
|
4951
4951
|
}
|
|
4952
|
-
async function
|
|
4952
|
+
async function p(s, v) {
|
|
4953
4953
|
await e.updateMenu({
|
|
4954
4954
|
module: Q.F_MENU_MODULE_V4_KEY.enum.item,
|
|
4955
4955
|
operation: pe.F_OPERATION_TYPE.update,
|
|
@@ -4962,7 +4962,7 @@ function On() {
|
|
|
4962
4962
|
deleteItem: n,
|
|
4963
4963
|
rearrange: f,
|
|
4964
4964
|
rearrangeWithSubCategory: l,
|
|
4965
|
-
updateItem:
|
|
4965
|
+
updateItem: p
|
|
4966
4966
|
};
|
|
4967
4967
|
}
|
|
4968
4968
|
var ot = /* @__PURE__ */ ((e) => (e.CATEGORY = "category", e.ITEM = "item", e.SUB_CATEGORY = "subCategory", e))(ot || {});
|
|
@@ -4972,8 +4972,8 @@ function yl() {
|
|
|
4972
4972
|
function f(r) {
|
|
4973
4973
|
function d(c) {
|
|
4974
4974
|
if (c.children && c.children.length > 0)
|
|
4975
|
-
for (const
|
|
4976
|
-
|
|
4975
|
+
for (const m of c.children)
|
|
4976
|
+
m.parent = c, d(m);
|
|
4977
4977
|
}
|
|
4978
4978
|
for (const c of r)
|
|
4979
4979
|
d(c);
|
|
@@ -4981,13 +4981,13 @@ function yl() {
|
|
|
4981
4981
|
}
|
|
4982
4982
|
function l(r) {
|
|
4983
4983
|
return r.map((d) => {
|
|
4984
|
-
var
|
|
4984
|
+
var m, S, E;
|
|
4985
4985
|
const c = {
|
|
4986
4986
|
...d,
|
|
4987
4987
|
children: []
|
|
4988
4988
|
};
|
|
4989
4989
|
for (const T of d.children ?? []) {
|
|
4990
|
-
if (((
|
|
4990
|
+
if (((m = T.meta) == null ? void 0 : m.nodeType) !== "item")
|
|
4991
4991
|
continue;
|
|
4992
4992
|
const w = ut.get((S = T.meta) == null ? void 0 : S.rawId);
|
|
4993
4993
|
if (!(w != null && w.subCategory) || !w.subCategory.length)
|
|
@@ -5024,9 +5024,9 @@ function yl() {
|
|
|
5024
5024
|
return c;
|
|
5025
5025
|
});
|
|
5026
5026
|
}
|
|
5027
|
-
function
|
|
5028
|
-
var
|
|
5029
|
-
if (((
|
|
5027
|
+
function p(r) {
|
|
5028
|
+
var m, S, E, T;
|
|
5029
|
+
if (((m = r.meta) == null ? void 0 : m.nodeType) !== "subCategory")
|
|
5030
5030
|
throw new Error("Node is not a sub category");
|
|
5031
5031
|
let d = r;
|
|
5032
5032
|
const c = [];
|
|
@@ -5048,13 +5048,13 @@ function yl() {
|
|
|
5048
5048
|
var d, c;
|
|
5049
5049
|
return r.children && (((d = r.meta) == null ? void 0 : d.nodeType) === "category" || ((c = r.meta) == null ? void 0 : c.nodeType) === "subCategory") ? (r.children = Ne(
|
|
5050
5050
|
r.children,
|
|
5051
|
-
(
|
|
5052
|
-
(
|
|
5051
|
+
(m) => m.label,
|
|
5052
|
+
(m) => {
|
|
5053
5053
|
var S, E, T;
|
|
5054
|
-
if (((S =
|
|
5055
|
-
return m
|
|
5056
|
-
if (((E =
|
|
5057
|
-
return ((T =
|
|
5054
|
+
if (((S = m.meta) == null ? void 0 : S.nodeType) === "subCategory")
|
|
5055
|
+
return p(m);
|
|
5056
|
+
if (((E = m.meta) == null ? void 0 : E.nodeType) === "item")
|
|
5057
|
+
return ((T = m.meta.rawObject) == null ? void 0 : T.position) ?? null;
|
|
5058
5058
|
throw new Error("Should not have other node type in category");
|
|
5059
5059
|
}
|
|
5060
5060
|
), { ...r, children: r.children.map(s) }) : r;
|
|
@@ -5064,7 +5064,7 @@ function yl() {
|
|
|
5064
5064
|
}
|
|
5065
5065
|
async function _({ eventEmitter: r }) {
|
|
5066
5066
|
var $, A, Y, oe, J, re, ve, Se, L, B;
|
|
5067
|
-
const d = o.state.menu, c = !o.state.currentCatalogId,
|
|
5067
|
+
const d = o.state.menu, c = !o.state.currentCatalogId, m = !o.state.currentSchedulerId, S = Fn(), E = o.mergedMenu;
|
|
5068
5068
|
ut.clear(), dt.clear();
|
|
5069
5069
|
for (const C of d.modules.item)
|
|
5070
5070
|
ut.set(C._id, C);
|
|
@@ -5257,7 +5257,7 @@ function yl() {
|
|
|
5257
5257
|
onClick: () => {
|
|
5258
5258
|
t.deleteCategory(C);
|
|
5259
5259
|
}
|
|
5260
|
-
}), !c &&
|
|
5260
|
+
}), !c && m && G.push({
|
|
5261
5261
|
id: `apply-to-catalog-${C._id}`,
|
|
5262
5262
|
icon: "add_link",
|
|
5263
5263
|
showOnHover: !0,
|
|
@@ -5336,7 +5336,7 @@ function yl() {
|
|
|
5336
5336
|
const se = (ve = o.currentCatalog) == null ? void 0 : ve.override.items, U = (Se = se == null ? void 0 : se[C._id]) == null ? void 0 : Se.find(
|
|
5337
5337
|
(D) => !D.combinationKey
|
|
5338
5338
|
), K = (U == null ? void 0 : U.orderFrom) === Q.F_ORDER_FROM.enum.NONE;
|
|
5339
|
-
!c &&
|
|
5339
|
+
!c && m && (K ? fe.push({
|
|
5340
5340
|
id: `apply-to-catalog-${C._id}`,
|
|
5341
5341
|
icon: "add_link",
|
|
5342
5342
|
showOnHover: !0,
|
|
@@ -5417,7 +5417,7 @@ function bl() {
|
|
|
5417
5417
|
const l = (g) => {
|
|
5418
5418
|
var u;
|
|
5419
5419
|
return ((u = g.meta) == null ? void 0 : u.nodeType) === ot.CATEGORY;
|
|
5420
|
-
},
|
|
5420
|
+
}, p = (g) => {
|
|
5421
5421
|
var u;
|
|
5422
5422
|
return ((u = g.meta) == null ? void 0 : u.nodeType) === ot.ITEM;
|
|
5423
5423
|
}, s = (g) => {
|
|
@@ -5445,7 +5445,7 @@ function bl() {
|
|
|
5445
5445
|
}
|
|
5446
5446
|
function r(g) {
|
|
5447
5447
|
return g.children ? g.children.map((u) => {
|
|
5448
|
-
if (
|
|
5448
|
+
if (p(u))
|
|
5449
5449
|
return {
|
|
5450
5450
|
type: "item",
|
|
5451
5451
|
id: u.meta.rawId
|
|
@@ -5464,12 +5464,12 @@ function bl() {
|
|
|
5464
5464
|
function c(g, u, F, y, i) {
|
|
5465
5465
|
return !!y && !!i && y.id === i.id && F !== "inside";
|
|
5466
5466
|
}
|
|
5467
|
-
function
|
|
5468
|
-
return !!(
|
|
5467
|
+
function m(g, u, F, y, i) {
|
|
5468
|
+
return !!(p(u) && (y == null ? void 0 : y.id) === (i == null ? void 0 : i.id) || l(u) && y && u.id !== y.id && F === "inside" || p(u) && (i == null ? void 0 : i.id) !== (y == null ? void 0 : y.id) || s(u));
|
|
5469
5469
|
}
|
|
5470
5470
|
const S = (g, u, F) => {
|
|
5471
5471
|
const y = n.getNodeById(g), i = n.getNodeById(u), b = y == null ? void 0 : y.parent, V = i == null ? void 0 : i.parent;
|
|
5472
|
-
return !y || !i ? !1 : l(y) ? d(y, i) : s(y) ? c(y, i, F, b, V) :
|
|
5472
|
+
return !y || !i ? !1 : l(y) ? d(y, i) : s(y) ? c(y, i, F, b, V) : p(y) ? m(y, i, F, b, V) : !1;
|
|
5473
5473
|
};
|
|
5474
5474
|
async function E(g, u, F) {
|
|
5475
5475
|
if (!d(g, u)) {
|
|
@@ -5489,7 +5489,7 @@ function bl() {
|
|
|
5489
5489
|
var F;
|
|
5490
5490
|
if (l(g) && u === "inside")
|
|
5491
5491
|
return { parent: g, index: 0 };
|
|
5492
|
-
if (
|
|
5492
|
+
if (p(g)) {
|
|
5493
5493
|
if (!g.parent) throw new Error("Target item's parent not found");
|
|
5494
5494
|
let y = ((F = g.parent.children) == null ? void 0 : F.findIndex((i) => i.id === g.id)) ?? -1;
|
|
5495
5495
|
if (y === -1) throw new Error("Target item not found in parent");
|
|
@@ -5528,7 +5528,7 @@ function bl() {
|
|
|
5528
5528
|
async function k(g, u, F) {
|
|
5529
5529
|
var y;
|
|
5530
5530
|
try {
|
|
5531
|
-
if (!
|
|
5531
|
+
if (!m(g, u, F, g.parent, u.parent)) {
|
|
5532
5532
|
f("Cannot drop item here");
|
|
5533
5533
|
return;
|
|
5534
5534
|
}
|
|
@@ -5572,11 +5572,11 @@ function bl() {
|
|
|
5572
5572
|
}
|
|
5573
5573
|
async function M(g) {
|
|
5574
5574
|
const u = n.getNodeById(g.draggedNodeId), F = n.getNodeById(g.targetNodeId);
|
|
5575
|
-
!u || !F || (l(u) ? await E(u, F, g.dragPosition) :
|
|
5575
|
+
!u || !F || (l(u) ? await E(u, F, g.dragPosition) : p(u) ? await k(u, F, g.dragPosition) : s(u) ? await O(u, F, g.dragPosition) : f("Unsupported drag operation"));
|
|
5576
5576
|
}
|
|
5577
5577
|
return {
|
|
5578
5578
|
isCategoryNode: l,
|
|
5579
|
-
isItemNode:
|
|
5579
|
+
isItemNode: p,
|
|
5580
5580
|
isSubCategoryNode: s,
|
|
5581
5581
|
canDropFn: S,
|
|
5582
5582
|
handleNodeDragDrop: M
|
|
@@ -5639,15 +5639,15 @@ const Vt = /* @__PURE__ */ de({
|
|
|
5639
5639
|
}
|
|
5640
5640
|
}), Mn = 200;
|
|
5641
5641
|
function hl(e) {
|
|
5642
|
-
const { itemHeight: o, emit: t, getFlattenedItems: n, getContainerRef: f, canDropFn: l } = e,
|
|
5643
|
-
function
|
|
5642
|
+
const { itemHeight: o, emit: t, getFlattenedItems: n, getContainerRef: f, canDropFn: l } = e, p = H(!1), s = H(null), v = H(null), _ = H(null), r = H(0), d = H({ x: 0, y: 0 }), c = H(/* @__PURE__ */ new Map());
|
|
5643
|
+
function m(w, h) {
|
|
5644
5644
|
h.button === 0 && (d.value = { x: h.clientX, y: h.clientY }, s.value = w, r.value = h.clientY, c.value = nr(n()), setTimeout(() => {
|
|
5645
|
-
s.value === w && (
|
|
5645
|
+
s.value === w && (p.value = !0, d.value = { x: h.clientX, y: h.clientY }, t("updateDragState", w, null, null), document.addEventListener("mousemove", S), document.addEventListener("mouseup", E));
|
|
5646
5646
|
}, Mn));
|
|
5647
5647
|
}
|
|
5648
5648
|
function S(w) {
|
|
5649
5649
|
var F;
|
|
5650
|
-
if (!
|
|
5650
|
+
if (!p.value || !s.value) return;
|
|
5651
5651
|
requestAnimationFrame(() => {
|
|
5652
5652
|
d.value = { x: w.clientX, y: w.clientY };
|
|
5653
5653
|
});
|
|
@@ -5676,22 +5676,22 @@ function hl(e) {
|
|
|
5676
5676
|
w.clientY - k.top < u ? h.scrollTop -= 10 : k.bottom - w.clientY < u && (h.scrollTop += 10);
|
|
5677
5677
|
}
|
|
5678
5678
|
function E() {
|
|
5679
|
-
document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", E),
|
|
5679
|
+
document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", E), p.value && s.value && v.value && _.value && t("nodeDragDrop", {
|
|
5680
5680
|
draggedNodeId: s.value,
|
|
5681
5681
|
targetNodeId: v.value,
|
|
5682
5682
|
dragPosition: _.value
|
|
5683
|
-
}),
|
|
5683
|
+
}), p.value = !1, t("updateDragState", null, null, null), s.value = null, v.value = null, _.value = null, c.value.clear();
|
|
5684
5684
|
}
|
|
5685
5685
|
function T() {
|
|
5686
|
-
document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", E),
|
|
5686
|
+
document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", E), p.value = !1, t("updateDragState", null, null, null), s.value = null, v.value = null, _.value = null, c.value.clear();
|
|
5687
5687
|
}
|
|
5688
5688
|
return {
|
|
5689
|
-
isDragging:
|
|
5689
|
+
isDragging: p,
|
|
5690
5690
|
draggedNodeId: s,
|
|
5691
5691
|
dropTargetNodeId: v,
|
|
5692
5692
|
dropPosition: _,
|
|
5693
5693
|
mousePosition: d,
|
|
5694
|
-
onDragStart:
|
|
5694
|
+
onDragStart: m,
|
|
5695
5695
|
cancelDrag: T
|
|
5696
5696
|
};
|
|
5697
5697
|
}
|
|
@@ -5706,13 +5706,13 @@ function wl(e, o) {
|
|
|
5706
5706
|
function l() {
|
|
5707
5707
|
t && (clearTimeout(t), t = null);
|
|
5708
5708
|
}
|
|
5709
|
-
function
|
|
5709
|
+
function p() {
|
|
5710
5710
|
t && (clearTimeout(t), t = null);
|
|
5711
5711
|
}
|
|
5712
5712
|
return {
|
|
5713
5713
|
onMouseDown: f,
|
|
5714
5714
|
onMouseMove: l,
|
|
5715
|
-
onMouseUp:
|
|
5715
|
+
onMouseUp: p
|
|
5716
5716
|
};
|
|
5717
5717
|
}
|
|
5718
5718
|
const Cl = { key: 0 }, Il = ["innerHTML"], kl = /* @__PURE__ */ de({
|
|
@@ -5788,35 +5788,35 @@ const Cl = { key: 0 }, Il = ["innerHTML"], kl = /* @__PURE__ */ de({
|
|
|
5788
5788
|
setup(e, {
|
|
5789
5789
|
emit: o
|
|
5790
5790
|
}) {
|
|
5791
|
-
const t = e, n = x(() => t.expanded ? "expand_more" : "chevron_right"), f = x(() => t.node.disabled ? "text-fm-color-neutral-gray-200" : ""), l = x(() => t.node.disabled ? "cursor-not-allowed" : t.node.onClick ? "cursor-pointer" : ""),
|
|
5791
|
+
const t = e, n = x(() => t.expanded ? "expand_more" : "chevron_right"), f = x(() => t.node.disabled ? "text-fm-color-neutral-gray-200" : ""), l = x(() => t.node.disabled ? "cursor-not-allowed" : t.node.onClick ? "cursor-pointer" : ""), p = x(() => t.selected ? "bg-fm-color-system-warning-100" : t.dropTarget && t.dropPosition === "inside" ? "bg-fm-color-primary-50" : ""), s = x(() => t.selected ? "text-fm-color-primary" : ""), v = o, {
|
|
5792
5792
|
onMouseDown: _,
|
|
5793
5793
|
onMouseMove: r,
|
|
5794
5794
|
onMouseUp: d
|
|
5795
5795
|
} = wl((c) => {
|
|
5796
|
-
var
|
|
5797
|
-
(
|
|
5796
|
+
var m;
|
|
5797
|
+
(m = t.node) != null && m.draggable && v("dragStart", c);
|
|
5798
5798
|
}, () => {
|
|
5799
5799
|
var c;
|
|
5800
5800
|
return !!t.node.disabled || !((c = t.node) != null && c.draggable);
|
|
5801
5801
|
});
|
|
5802
|
-
return (c,
|
|
5802
|
+
return (c, m) => {
|
|
5803
5803
|
var T, w, h;
|
|
5804
5804
|
const S = q("FmIcon"), E = q("FmTooltip");
|
|
5805
5805
|
return P(), Z("div", {
|
|
5806
|
-
class: ye(["tree-node", "max-w-full", "py-4 px-8 flex items-center justify-between gap-4", "fm-corner-radius-sm", "select-none", f.value, l.value,
|
|
5806
|
+
class: ye(["tree-node", "max-w-full", "py-4 px-8 flex items-center justify-between gap-4", "fm-corner-radius-sm", "select-none", f.value, l.value, p.value, {
|
|
5807
5807
|
"opacity-50": c.dragging
|
|
5808
5808
|
}, "hover-effect"]),
|
|
5809
|
-
onClick:
|
|
5809
|
+
onClick: m[2] || (m[2] = qe(() => {
|
|
5810
5810
|
var k, O;
|
|
5811
5811
|
c.node.disabled || (O = (k = c.node).onClick) == null || O.call(k);
|
|
5812
5812
|
}, ["stop"])),
|
|
5813
|
-
onMousedown:
|
|
5813
|
+
onMousedown: m[3] || (m[3] = //@ts-ignore
|
|
5814
5814
|
(...k) => a(_) && a(_)(...k)),
|
|
5815
|
-
onMousemove:
|
|
5815
|
+
onMousemove: m[4] || (m[4] = //@ts-ignore
|
|
5816
5816
|
(...k) => a(r) && a(r)(...k)),
|
|
5817
|
-
onMouseup:
|
|
5817
|
+
onMouseup: m[5] || (m[5] = //@ts-ignore
|
|
5818
5818
|
(...k) => a(d) && a(d)(...k)),
|
|
5819
|
-
onMouseleave:
|
|
5819
|
+
onMouseleave: m[6] || (m[6] = //@ts-ignore
|
|
5820
5820
|
(...k) => a(d) && a(d)(...k))
|
|
5821
5821
|
}, [N("div", El, [N("div", Tl, [(T = c.node) != null && T.draggable && !c.node.disabled ? (P(), ne(S, {
|
|
5822
5822
|
key: 0,
|
|
@@ -5827,7 +5827,7 @@ const Cl = { key: 0 }, Il = ["innerHTML"], kl = /* @__PURE__ */ de({
|
|
|
5827
5827
|
})) : te("", !0), I(Vt, {
|
|
5828
5828
|
name: n.value,
|
|
5829
5829
|
visible: t.expandable,
|
|
5830
|
-
onClick:
|
|
5830
|
+
onClick: m[0] || (m[0] = qe(() => {
|
|
5831
5831
|
c.node.disabled || v("toggleExpand");
|
|
5832
5832
|
}, ["stop"]))
|
|
5833
5833
|
}, null, 8, ["name", "visible"]), c.node.icon ? (P(), ne(S, {
|
|
@@ -5872,7 +5872,7 @@ const Cl = { key: 0 }, Il = ["innerHTML"], kl = /* @__PURE__ */ de({
|
|
|
5872
5872
|
class: ye(["fm-typo-en-body-md-400", ((w = c.node.rightLabel) == null ? void 0 : w.variant) === a(Ze).PRIMARY ? "text-fm-color-primary" : "text-fm-color-typo-secondary"]),
|
|
5873
5873
|
text: (h = c.node.rightLabel) == null ? void 0 : h.label,
|
|
5874
5874
|
highlightedStrings: c.highlightedStrings,
|
|
5875
|
-
onClick:
|
|
5875
|
+
onClick: m[1] || (m[1] = qe((k) => {
|
|
5876
5876
|
var O, M;
|
|
5877
5877
|
return (M = (O = c.node.rightLabel) == null ? void 0 : O.onClick) == null ? void 0 : M.call(O);
|
|
5878
5878
|
}, ["stop"]))
|
|
@@ -5902,7 +5902,7 @@ const Cl = { key: 0 }, Il = ["innerHTML"], kl = /* @__PURE__ */ de({
|
|
|
5902
5902
|
const {
|
|
5903
5903
|
t: n
|
|
5904
5904
|
} = me(), f = e, l = t;
|
|
5905
|
-
function
|
|
5905
|
+
function p(g) {
|
|
5906
5906
|
const u = f.expandedNodeIds;
|
|
5907
5907
|
u != null && u.includes(g) ? l("updateExpandedNodeIds", u.filter((F) => F !== g)) : l("updateExpandedNodeIds", [...u || [], g]);
|
|
5908
5908
|
}
|
|
@@ -5933,7 +5933,7 @@ const Cl = { key: 0 }, Il = ["innerHTML"], kl = /* @__PURE__ */ de({
|
|
|
5933
5933
|
const u = d.ref.value;
|
|
5934
5934
|
u && g * Tt < u.scrollTop && (await gt(), r(0));
|
|
5935
5935
|
});
|
|
5936
|
-
function
|
|
5936
|
+
function m() {
|
|
5937
5937
|
r(0);
|
|
5938
5938
|
}
|
|
5939
5939
|
function S(g) {
|
|
@@ -5958,7 +5958,7 @@ const Cl = { key: 0 }, Il = ["innerHTML"], kl = /* @__PURE__ */ de({
|
|
|
5958
5958
|
canDropFn: f.canDropFn
|
|
5959
5959
|
});
|
|
5960
5960
|
return o({
|
|
5961
|
-
scrollToTop:
|
|
5961
|
+
scrollToTop: m,
|
|
5962
5962
|
scrollToNode: S,
|
|
5963
5963
|
cancelDrag: M
|
|
5964
5964
|
}), (g, u) => {
|
|
@@ -5990,7 +5990,7 @@ const Cl = { key: 0 }, Il = ["innerHTML"], kl = /* @__PURE__ */ de({
|
|
|
5990
5990
|
dragging: a(E) && a(T) === i.id,
|
|
5991
5991
|
dropTarget: a(w) === i.id,
|
|
5992
5992
|
dropPosition: a(w) === i.id ? a(h) : null,
|
|
5993
|
-
onToggleExpand: (V) =>
|
|
5993
|
+
onToggleExpand: (V) => p(i.id),
|
|
5994
5994
|
onDragStart: (V) => a(O)(i.id, V),
|
|
5995
5995
|
style: ct({
|
|
5996
5996
|
paddingLeft: `${i.level * 20}px`
|
|
@@ -6049,14 +6049,14 @@ const Cl = { key: 0 }, Il = ["innerHTML"], kl = /* @__PURE__ */ de({
|
|
|
6049
6049
|
setup(e, {
|
|
6050
6050
|
emit: o
|
|
6051
6051
|
}) {
|
|
6052
|
-
const t = e, n = o, f = vt(), l = ce(),
|
|
6052
|
+
const t = e, n = o, f = vt(), l = ce(), p = _t(), s = Fn(), v = gl(), {
|
|
6053
6053
|
canDropFn: _,
|
|
6054
6054
|
handleNodeDragDrop: r
|
|
6055
6055
|
} = bl(), d = x(() => t.filterState.searchKey), c = Po(d, 300), {
|
|
6056
|
-
generateTreeFromMenu:
|
|
6056
|
+
generateTreeFromMenu: m
|
|
6057
6057
|
} = yl();
|
|
6058
6058
|
async function S() {
|
|
6059
|
-
return await
|
|
6059
|
+
return await m({
|
|
6060
6060
|
filterState: t.filterState,
|
|
6061
6061
|
eventEmitter: (T) => {
|
|
6062
6062
|
n("tree-event", T);
|
|
@@ -6078,7 +6078,7 @@ const Cl = { key: 0 }, Il = ["innerHTML"], kl = /* @__PURE__ */ de({
|
|
|
6078
6078
|
key: 0,
|
|
6079
6079
|
label: a(E)("menu.tree_editor.actions.add_category"),
|
|
6080
6080
|
icon: "add",
|
|
6081
|
-
onClick: w[0] || (w[0] = (h) => a(
|
|
6081
|
+
onClick: w[0] || (w[0] = (h) => a(p).create())
|
|
6082
6082
|
}, null, 8, ["label"])) : te("", !0), a(l).state.currentCatalogId && !a(l).state.currentSchedulerId ? (P(), ne(Mt, {
|
|
6083
6083
|
key: 1,
|
|
6084
6084
|
"categorized-items": a(s).linkableItems.value,
|
|
@@ -6155,13 +6155,13 @@ const Cl = { key: 0 }, Il = ["innerHTML"], kl = /* @__PURE__ */ de({
|
|
|
6155
6155
|
label: r.name,
|
|
6156
6156
|
value: r._id
|
|
6157
6157
|
}))
|
|
6158
|
-
]),
|
|
6158
|
+
]), p = x(() => {
|
|
6159
6159
|
var c;
|
|
6160
|
-
const r = o("menu.common.labels.catalog"), d = ((c = l.value.find((
|
|
6160
|
+
const r = o("menu.common.labels.catalog"), d = ((c = l.value.find((m) => m.value === f.value.catalogId)) == null ? void 0 : c.label) || o("menu.tree_editor.labels.main_catalog");
|
|
6161
6161
|
return `${r}: ${d}`;
|
|
6162
6162
|
}), s = x(() => {
|
|
6163
6163
|
var c;
|
|
6164
|
-
const r = o("menu.common.labels.scheduler"), d = ((c = _.value.find((
|
|
6164
|
+
const r = o("menu.common.labels.scheduler"), d = ((c = _.value.find((m) => m.value === f.value.schedulerId)) == null ? void 0 : c.label) || o("menu.tree_editor.labels.all_time");
|
|
6165
6165
|
return `${r}: ${d}`;
|
|
6166
6166
|
}), v = x(() => n.isV4), _ = x(() => [
|
|
6167
6167
|
{
|
|
@@ -6176,11 +6176,6 @@ const Cl = { key: 0 }, Il = ["innerHTML"], kl = /* @__PURE__ */ de({
|
|
|
6176
6176
|
return (r, d) => {
|
|
6177
6177
|
const c = q("FmSearch");
|
|
6178
6178
|
return P(), Z("div", Hl, [
|
|
6179
|
-
I(c, {
|
|
6180
|
-
"model-value": f.value.searchKey || "",
|
|
6181
|
-
"onUpdate:modelValue": d[0] || (d[0] = (p) => f.value.searchKey = p),
|
|
6182
|
-
placeholder: a(o)("common.search")
|
|
6183
|
-
}, null, 8, ["model-value", "placeholder"]),
|
|
6184
6179
|
N("div", Wl, [
|
|
6185
6180
|
N("div", ql, [
|
|
6186
6181
|
I(qt, {
|
|
@@ -6188,8 +6183,8 @@ const Cl = { key: 0 }, Il = ["innerHTML"], kl = /* @__PURE__ */ de({
|
|
|
6188
6183
|
items: l.value,
|
|
6189
6184
|
placeholder: a(o)("menu.tree_editor.labels.main_catalog"),
|
|
6190
6185
|
"search-placeholder": a(o)("common.search"),
|
|
6191
|
-
"custom-label":
|
|
6192
|
-
"onUpdate:modelValue": d[
|
|
6186
|
+
"custom-label": p.value,
|
|
6187
|
+
"onUpdate:modelValue": d[0] || (d[0] = (m) => f.value.catalogId = m)
|
|
6193
6188
|
}, null, 8, ["model-value", "items", "placeholder", "search-placeholder", "custom-label"])
|
|
6194
6189
|
]),
|
|
6195
6190
|
v.value ? (P(), Z("div", Xl, [
|
|
@@ -6199,10 +6194,16 @@ const Cl = { key: 0 }, Il = ["innerHTML"], kl = /* @__PURE__ */ de({
|
|
|
6199
6194
|
placeholder: a(o)("menu.tree_editor.labels.all_time"),
|
|
6200
6195
|
"search-placeholder": a(o)("common.search"),
|
|
6201
6196
|
"custom-label": s.value,
|
|
6202
|
-
"onUpdate:modelValue": d[
|
|
6197
|
+
"onUpdate:modelValue": d[1] || (d[1] = (m) => f.value.schedulerId = m)
|
|
6203
6198
|
}, null, 8, ["model-value", "items", "placeholder", "search-placeholder", "custom-label"])
|
|
6204
6199
|
])) : te("", !0)
|
|
6205
|
-
])
|
|
6200
|
+
]),
|
|
6201
|
+
d[3] || (d[3] = N("div", { class: "h-[1px] bg-fm-color-neutral-gray-100" }, null, -1)),
|
|
6202
|
+
I(c, {
|
|
6203
|
+
"model-value": f.value.searchKey || "",
|
|
6204
|
+
"onUpdate:modelValue": d[2] || (d[2] = (m) => f.value.searchKey = m),
|
|
6205
|
+
placeholder: a(o)("common.search")
|
|
6206
|
+
}, null, 8, ["model-value", "placeholder"])
|
|
6206
6207
|
]);
|
|
6207
6208
|
};
|
|
6208
6209
|
}
|
|
@@ -6225,23 +6226,22 @@ const Cl = { key: 0 }, Il = ["innerHTML"], kl = /* @__PURE__ */ de({
|
|
|
6225
6226
|
}), f = ce();
|
|
6226
6227
|
return Ce([() => n.value.catalogId, () => n.value.schedulerId], () => {
|
|
6227
6228
|
f.selectCatalog(n.value.catalogId), f.selectScheduler(n.value.schedulerId);
|
|
6228
|
-
}), (l,
|
|
6229
|
+
}), (l, p) => {
|
|
6229
6230
|
const s = q("FmCircularProgress");
|
|
6230
6231
|
return P(), Z("div", Ql, [
|
|
6231
6232
|
N("div", Zl, [
|
|
6232
6233
|
I(Jl, {
|
|
6233
6234
|
menu: l.menu,
|
|
6234
6235
|
modelValue: n.value,
|
|
6235
|
-
"onUpdate:modelValue":
|
|
6236
|
+
"onUpdate:modelValue": p[0] || (p[0] = (v) => n.value = v)
|
|
6236
6237
|
}, null, 8, ["menu", "modelValue"])
|
|
6237
6238
|
]),
|
|
6238
|
-
m[2] || (m[2] = N("div", { class: "h-[1px] bg-fm-color-neutral-gray-100" }, null, -1)),
|
|
6239
6239
|
N("div", ei, [
|
|
6240
6240
|
I(jl, {
|
|
6241
6241
|
menu: l.menu,
|
|
6242
6242
|
"overrided-menu": l.overridedMenu,
|
|
6243
6243
|
"filter-state": n.value,
|
|
6244
|
-
onTreeEvent:
|
|
6244
|
+
onTreeEvent: p[1] || (p[1] = (v) => t("tree-event", v))
|
|
6245
6245
|
}, null, 8, ["menu", "overrided-menu", "filter-state"])
|
|
6246
6246
|
]),
|
|
6247
6247
|
l.loading ? (P(), Z("div", ti, [
|
|
@@ -6264,39 +6264,39 @@ const Cl = { key: 0 }, Il = ["innerHTML"], kl = /* @__PURE__ */ de({
|
|
|
6264
6264
|
}), Ut(() => {
|
|
6265
6265
|
n.clearHistory(), f.setExpandedNodeIds([]), f.setSelectedNodeId(null);
|
|
6266
6266
|
});
|
|
6267
|
-
const l = H(null), { currentItemId:
|
|
6268
|
-
async function d(
|
|
6269
|
-
if (
|
|
6270
|
-
if (!c(
|
|
6267
|
+
const l = H(null), { currentItemId: p, initialForm: s, itemFormKey: v } = ir(n), { saveItemFormEditingState: _ } = or(l, n), r = H(null);
|
|
6268
|
+
async function d(m) {
|
|
6269
|
+
if (m.type === ke.SELECT_ITEM || m.type === ke.SELECT_PRICE || m.type === ke.SELECT_GROUP || m.type === ke.SELECT_VARIANT) {
|
|
6270
|
+
if (!c(m.itemId))
|
|
6271
6271
|
return;
|
|
6272
|
-
await gt(),
|
|
6272
|
+
await gt(), m.type === ke.SELECT_ITEM ? r.value = {
|
|
6273
6273
|
type: "general"
|
|
6274
|
-
} :
|
|
6274
|
+
} : m.type === ke.SELECT_PRICE ? r.value = {
|
|
6275
6275
|
type: "price"
|
|
6276
|
-
} :
|
|
6276
|
+
} : m.type === ke.SELECT_GROUP ? r.value = {
|
|
6277
6277
|
type: "group",
|
|
6278
|
-
id:
|
|
6279
|
-
} :
|
|
6278
|
+
id: m.groupId
|
|
6279
|
+
} : m.type === ke.SELECT_VARIANT && (r.value = {
|
|
6280
6280
|
type: "variant",
|
|
6281
|
-
id:
|
|
6281
|
+
id: m.combinationKey
|
|
6282
6282
|
});
|
|
6283
6283
|
}
|
|
6284
6284
|
}
|
|
6285
|
-
function c(
|
|
6285
|
+
function c(m) {
|
|
6286
6286
|
var S, E, T;
|
|
6287
|
-
if (((S = s.value) == null ? void 0 : S._id) ===
|
|
6287
|
+
if (((S = s.value) == null ? void 0 : S._id) === m)
|
|
6288
6288
|
return !0;
|
|
6289
|
-
if (
|
|
6289
|
+
if (p.value && p.value !== m && ((E = l.value) != null && E.hasUnsavedChanges())) {
|
|
6290
6290
|
const w = (T = l.value) == null ? void 0 : T.validate();
|
|
6291
6291
|
if (!w || w.length > 0)
|
|
6292
6292
|
return !1;
|
|
6293
6293
|
}
|
|
6294
|
-
return
|
|
6294
|
+
return m && (p.value = m, f.setSelectedNodeByItemId(m)), !0;
|
|
6295
6295
|
}
|
|
6296
|
-
return (
|
|
6296
|
+
return (m, S) => (P(), ne(fl, null, {
|
|
6297
6297
|
"left-panel": z(() => [
|
|
6298
6298
|
I(oi, {
|
|
6299
|
-
menu:
|
|
6299
|
+
menu: m.menu,
|
|
6300
6300
|
"overrided-menu": a(n).mergedMenu,
|
|
6301
6301
|
loading: a(n).workerIsComputing,
|
|
6302
6302
|
onTreeEvent: d
|
|
@@ -6339,14 +6339,14 @@ const Cl = { key: 0 }, Il = ["innerHTML"], kl = /* @__PURE__ */ de({
|
|
|
6339
6339
|
},
|
|
6340
6340
|
emits: ["update:show", "submit"],
|
|
6341
6341
|
setup(e, { emit: o }) {
|
|
6342
|
-
const t = e, n = xe(), { minor: f } = Ke(n), { t: l } = me(),
|
|
6343
|
-
|
|
6342
|
+
const t = e, n = xe(), { minor: f } = Ke(n), { t: l } = me(), p = o, s = () => {
|
|
6343
|
+
p("update:show", !1);
|
|
6344
6344
|
}, v = pn(), _ = ce();
|
|
6345
6345
|
_.selectCatalog(null), _.selectScheduler(null);
|
|
6346
6346
|
const r = H(!1), d = () => {
|
|
6347
6347
|
f(
|
|
6348
6348
|
async () => {
|
|
6349
|
-
const
|
|
6349
|
+
const m = _.state.menu, S = _o(m);
|
|
6350
6350
|
await v.updateMenuSetting(S), await v.importMenu(S), s();
|
|
6351
6351
|
},
|
|
6352
6352
|
{
|
|
@@ -6361,7 +6361,7 @@ const Cl = { key: 0 }, Il = ["innerHTML"], kl = /* @__PURE__ */ de({
|
|
|
6361
6361
|
s();
|
|
6362
6362
|
}
|
|
6363
6363
|
);
|
|
6364
|
-
return (
|
|
6364
|
+
return (m, S) => {
|
|
6365
6365
|
const E = q("fm-button"), T = q("fm-form");
|
|
6366
6366
|
return P(), ne(Gn, { to: "body" }, [
|
|
6367
6367
|
I(Kn, { name: "fade" }, {
|
|
@@ -6369,7 +6369,7 @@ const Cl = { key: 0 }, Il = ["innerHTML"], kl = /* @__PURE__ */ de({
|
|
|
6369
6369
|
I(T, {
|
|
6370
6370
|
"blame-form-child-on-validation-failed": "",
|
|
6371
6371
|
class: ye(["fixed inset-0", "flex flex-col", "w-screen h-dvh", "bg-fm-color-neutral-white"]),
|
|
6372
|
-
style: ct({ zIndex:
|
|
6372
|
+
style: ct({ zIndex: m.zIndex }),
|
|
6373
6373
|
tabindex: "-1",
|
|
6374
6374
|
onValidationSuccess: d,
|
|
6375
6375
|
onKeyup: Bn(a(c), ["esc"])
|
|
@@ -6404,7 +6404,7 @@ const Cl = { key: 0 }, Il = ["innerHTML"], kl = /* @__PURE__ */ de({
|
|
|
6404
6404
|
])
|
|
6405
6405
|
]),
|
|
6406
6406
|
N("div", ci, [
|
|
6407
|
-
I(ii, { menu:
|
|
6407
|
+
I(ii, { menu: m.menu }, null, 8, ["menu"])
|
|
6408
6408
|
])
|
|
6409
6409
|
]),
|
|
6410
6410
|
_: 1
|
|
@@ -6428,14 +6428,14 @@ const Cl = { key: 0 }, Il = ["innerHTML"], kl = /* @__PURE__ */ de({
|
|
|
6428
6428
|
props: { menu: o.state.menu }
|
|
6429
6429
|
});
|
|
6430
6430
|
};
|
|
6431
|
-
function l(
|
|
6432
|
-
|
|
6431
|
+
function l(p) {
|
|
6432
|
+
p.data.type === oo && f();
|
|
6433
6433
|
}
|
|
6434
6434
|
return We(() => {
|
|
6435
6435
|
window.addEventListener("message", l);
|
|
6436
6436
|
}), Ut(() => {
|
|
6437
6437
|
window.removeEventListener("message", l);
|
|
6438
|
-
}), (
|
|
6438
|
+
}), (p, s) => Ae(p.$slots, "default", { trigger: n });
|
|
6439
6439
|
}
|
|
6440
6440
|
});
|
|
6441
6441
|
export {
|