@feedmepos/mf-menu 0.32.6-dev → 0.32.7-beta.1
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-C0wqjiyq.js → App-Dizmo0gB.js} +5 -5
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BD9HdRa2.js → ApplyProduct.vue_vue_type_script_setup_true_lang-Dn7KPuiC.js} +3 -3
- package/dist/{Catalog-BEXFcRd5.js → Catalog-DW-L1M-N.js} +6 -6
- package/dist/{Category-Cb5LkCw2.js → Category-B3r3_mIm.js} +6 -6
- package/dist/{Category-CxjnUggK.js → Category-CL9z6m_M.js} +4 -4
- package/dist/{CookingGuide-BULsaobB.js → CookingGuide-DgNvztyY.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-Bmu7NSKJ.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-daoGqL4z.js} +1 -1
- package/dist/{Group-DtjBIaHh.js → Group-0sktO0Oa.js} +3 -3
- package/dist/{Group-BrjeKpJD.js → Group-Cl0nNVJd.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-BiZQQrJr.js → Group.vue_vue_type_script_setup_true_lang-CLOi60Q4.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-S9Kxf5sD.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DU7p3reT.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-qLKUXmH0.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CMv6raWo.js} +208 -208
- package/dist/{Ingredient-BFkA3yd3.js → Ingredient-DLu8PljJ.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CxY7hIAB.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DuEgpxkq.js} +2 -2
- package/dist/{LinkProductSideSheet-mEQtnat4.js → LinkProductSideSheet-DkaEnZRb.js} +3 -3
- package/dist/{MenuSetting-mRLxflwf.js → MenuSetting-nJnvZKhV.js} +5 -5
- package/dist/{PrintRoute-CA3H_RRF.js → PrintRoute-4LGqJ2Mo.js} +4 -4
- package/dist/{Product-Btu9jFW4.js → Product-BjlEy81T.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-wznEsaOv.js → Product.vue_vue_type_script_setup_true_lang-v3a6dQ7L.js} +13 -13
- package/dist/{ProductInternalTools-Bhgg8T6E.js → ProductInternalTools-BRPFpO2h.js} +5 -5
- package/dist/{Products-BxKtg4Hc.js → Products-B5Fufkj7.js} +11 -11
- package/dist/{Publish-96mnJzcq.js → Publish-BUS1daoG.js} +3 -3
- package/dist/{Recipe-prZzJ-iF.js → Recipe-DPzWGLTi.js} +4 -4
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DK6_WkwD.js → RuleView.vue_vue_type_script_setup_true_lang-WNjFlKO_.js} +195 -195
- package/dist/{Scheduler-UinCL5_R.js → Scheduler-C0PCdox7.js} +3 -3
- package/dist/{ServingSequence-CfaZr_ap.js → ServingSequence-DOWnq7Th.js} +3 -3
- package/dist/{Setting-BHHKtXDX.js → Setting-CjLavUAz.js} +5 -5
- package/dist/{Subcategory-DW1-JTpN.js → Subcategory-Bpuus-6O.js} +4 -4
- package/dist/{Takeaway-DEJgAuU9.js → Takeaway-CAExkfNT.js} +1 -1
- package/dist/{Takeaway-DYIQe1DD.js → Takeaway-DJdGWe6a.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-ChFueBfy.js → Takeaway.vue_vue_type_script_setup_true_lang-wnuQhpRw.js} +5 -5
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-DLbikHRZ.js → Thumbnail.vue_vue_type_script_setup_true_lang-ByStGRDS.js} +4 -4
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CYNKbXBq.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-AbEssjut.js} +14 -14
- package/dist/{Unit-Bw50_wdS.js → Unit-LkuQKnke.js} +2 -2
- package/dist/{Variant-5QSIwVn-.js → Variant-BUN0ViAe.js} +3 -3
- package/dist/{_id_-S9SSMUZc.js → _id_-CG-8sg2V.js} +10 -10
- package/dist/{app-BecTYei3.js → app-BO-MnIEk.js} +1 -1
- package/dist/{app-BNKEw3UD.js → app-GVwkhygW.js} +26 -26
- package/dist/app.js +1 -1
- package/dist/assets/{linked-status-DUzFn-_H.js → linked-status-DfRfdTLe.js} +2 -2
- package/dist/assets/{override-menu-DQ7zRCWo.js → override-menu-D6rKQPLs.js} +2 -2
- package/dist/assets/{validate-menu-zh6gQBJ1.js → validate-menu-BcNMGDB6.js} +2 -2
- package/dist/{catalog-C_Sjp0In.js → catalog-B80XVDez.js} +1 -1
- package/dist/{catalogSetting-DzdeFq1T.js → catalogSetting-UkyLv3s8.js} +1 -1
- package/dist/{category-Dg4DY9ZM.js → category-Bptaaro-.js} +1 -1
- package/dist/{currency-CzTBOF1N.js → currency-CZBLDn1z.js} +1 -1
- package/dist/{index-B6KX4_fz.js → index-BQUmG7GD.js} +4 -4
- package/dist/{index-dGlwrywa.js → index-Bfc_H1Wk.js} +1 -1
- package/dist/{index-DH-KBSkx.js → index-D6-f96j6.js} +1 -1
- package/dist/{index-BPOiF0LF.js → index-fQOCDH1D.js} +3 -3
- package/dist/{index.vue_vue_type_script_setup_true_lang-Bj2YFzYx.js → index.vue_vue_type_script_setup_true_lang-ChpOX21K.js} +4 -4
- package/dist/{item-DLH-WU0o.js → item-MEx2-toC.js} +14 -14
- package/dist/{iteration-CKwlLYDR.js → iteration-6mSjEGuP.js} +1 -1
- package/dist/{jszip.min-DTxfdnf0.js → jszip.min-DpyTwMsD.js} +2 -2
- package/dist/{menu-BYlx7YYT.js → menu-CQSPnWF_.js} +1 -1
- package/dist/{menuV2-BH6Y6sBZ.js → menuV2-CjZW8UU-.js} +77 -77
- package/dist/{priceTier-B7ZcrSEj.js → priceTier-DLbvTJ9_.js} +1 -1
- package/dist/{scheduler-Bt-xiQof.js → scheduler-DcgRWBFh.js} +4 -4
- package/dist/{subcategory-BcHWM6VM.js → subcategory-aPPLrR8g.js} +2 -2
- package/dist/{toExcel-BKVFrVM_.js → toExcel-CUvRthrb.js} +2 -2
- package/dist/{unit-CzEPSZmH.js → unit-CNr3RFXW.js} +2 -2
- package/package.json +2 -2
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
var Ue = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var ne = (e, t, n) =>
|
|
4
|
-
import { ao as ue, H as
|
|
2
|
+
var Le = (e, t, n) => t in e ? Ue(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var ne = (e, t, n) => Le(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { ao as ue, H as I, B as T, z as ae, ap as re, J as G, I as ie, ac as x, c as W, X as V, am as oe, aq as We, ar as qe, A as ze, ae as Ge, as as He, at as Be, ab as Je } from "./index.vue_vue_type_script_setup_true_lang-ChpOX21K.js";
|
|
5
5
|
import { defineStore as Ye } from "pinia";
|
|
6
|
-
import { shallowRef as j, ref as
|
|
6
|
+
import { shallowRef as j, ref as H, computed as S, shallowReactive as Qe, effectScope as Xe, watch as Ze } from "vue";
|
|
7
7
|
import { useCoreStore as se } from "@feedmepos/mf-common";
|
|
8
8
|
import { useSnackbar as et } from "@feedmepos/ui-library";
|
|
9
|
-
const tt = "/assets/linked-status-
|
|
9
|
+
const tt = "/assets/linked-status-DfRfdTLe.js", nt = "/assets/override-menu-D6rKQPLs.js";
|
|
10
10
|
function rt(e) {
|
|
11
11
|
var o;
|
|
12
|
-
const t =
|
|
12
|
+
const t = I(e), n = (o = t.variant) == null ? void 0 : o.variantCombinations;
|
|
13
13
|
return delete t.variant, delete t.thumbnail, [t, ...n || []];
|
|
14
14
|
}
|
|
15
15
|
function ot(e, t, n, o) {
|
|
16
|
-
const r =
|
|
16
|
+
const r = I(t), a = n ? r.modules.catalog.find((m) => m._id === n) : null, l = o ? r.modules.scheduler.find((m) => m._id === o) : null, u = a ? I(a) : void 0, c = n ? r.modules.catalog.filter((m) => m._id !== n) : [], i = l ? I(l) : void 0, f = e.reduce((m, v) => (m[v._id] = rt(v), m), {});
|
|
17
17
|
function h(m = []) {
|
|
18
18
|
const v = e.map((p) => p._id);
|
|
19
19
|
return [
|
|
@@ -153,7 +153,7 @@ function ut(e, t) {
|
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
155
|
async function Ot(e, t, n, o, r, a = !0) {
|
|
156
|
-
const l =
|
|
156
|
+
const l = I(n), u = a ? ot(t, l, o, r) : l, c = t.reduce((h, m) => (h[m._id] = u.modules.item.find((v) => v._id === m._id), h), {}), i = t.reduce((h, m) => {
|
|
157
157
|
const v = m._id;
|
|
158
158
|
return h[v] = st(c[v], e), h;
|
|
159
159
|
}, {}), f = T.getFallbackPrices({
|
|
@@ -183,11 +183,11 @@ function Dt(e, t) {
|
|
|
183
183
|
return r;
|
|
184
184
|
}, [])) || []).join(" / ");
|
|
185
185
|
}
|
|
186
|
-
const
|
|
186
|
+
const q = /* @__PURE__ */ new Map();
|
|
187
187
|
async function Vt(e, t) {
|
|
188
188
|
const n = `${e._id}-${e.updatedAt}-${t}`;
|
|
189
|
-
if (
|
|
190
|
-
return
|
|
189
|
+
if (q.has(n))
|
|
190
|
+
return q.get(n);
|
|
191
191
|
const o = await ue(
|
|
192
192
|
tt,
|
|
193
193
|
JSON.stringify({
|
|
@@ -195,7 +195,7 @@ async function Vt(e, t) {
|
|
|
195
195
|
itemId: t
|
|
196
196
|
})
|
|
197
197
|
);
|
|
198
|
-
return
|
|
198
|
+
return q.set(n, o), o;
|
|
199
199
|
}
|
|
200
200
|
async function ce(e, t, n) {
|
|
201
201
|
return await ue(nt, {
|
|
@@ -219,7 +219,7 @@ function Tt(e, t, n) {
|
|
|
219
219
|
}
|
|
220
220
|
return r(t, n);
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function Kt(e, t, n) {
|
|
223
223
|
const o = /* @__PURE__ */ new Set();
|
|
224
224
|
function r(a, l) {
|
|
225
225
|
if (!e || !a || !l || o.has(a)) return !1;
|
|
@@ -234,18 +234,18 @@ function Ft(e, t, n) {
|
|
|
234
234
|
}
|
|
235
235
|
return r(t, n);
|
|
236
236
|
}
|
|
237
|
-
const
|
|
237
|
+
const z = /* @__PURE__ */ new Map();
|
|
238
238
|
async function at(e, t, n) {
|
|
239
239
|
const o = `${e._id}-${e.updatedAt}-${t || "null"}-${n || "null"}`;
|
|
240
|
-
if (
|
|
241
|
-
return
|
|
240
|
+
if (z.has(o))
|
|
241
|
+
return z.get(o);
|
|
242
242
|
const r = await ce(e, t, n);
|
|
243
|
-
return
|
|
243
|
+
return z.set(o, r), r;
|
|
244
244
|
}
|
|
245
|
-
async function
|
|
245
|
+
async function Pt(e, t, n) {
|
|
246
246
|
var l, u;
|
|
247
247
|
const o = await at(e, t, null), r = [], a = (c, i) => {
|
|
248
|
-
const f =
|
|
248
|
+
const f = I(c);
|
|
249
249
|
for (const h in i)
|
|
250
250
|
i[h] && (f[h] = i[h]);
|
|
251
251
|
return f;
|
|
@@ -254,8 +254,8 @@ async function Kt(e, t, n) {
|
|
|
254
254
|
const i = (l = c.items) == null ? void 0 : l.find((h) => h._id === n && !h.combinationKey), f = e.modules.item.find((h) => h._id === n);
|
|
255
255
|
if (i) {
|
|
256
256
|
const h = (u = c.items) == null ? void 0 : u.filter((v) => v._id === n && v.combinationKey), m = [i, ...h].map((v) => {
|
|
257
|
-
var w,
|
|
258
|
-
const p = v.combinationKey ? (
|
|
257
|
+
var w, C;
|
|
258
|
+
const p = v.combinationKey ? (C = (w = f == null ? void 0 : f.variant) == null ? void 0 : w.variantCombinations) == null ? void 0 : C.find(
|
|
259
259
|
(R) => R.combinationKey === v.combinationKey
|
|
260
260
|
) : f, b = p && f ? a(f, p) : v;
|
|
261
261
|
return a(b, v);
|
|
@@ -268,7 +268,7 @@ async function Kt(e, t, n) {
|
|
|
268
268
|
}
|
|
269
269
|
return r;
|
|
270
270
|
}
|
|
271
|
-
const M = 0,
|
|
271
|
+
const M = 0, K = 3;
|
|
272
272
|
function it(e) {
|
|
273
273
|
const t = /^\/(.*)\/([gimyu]*)$/.exec(e.toString());
|
|
274
274
|
if (!t)
|
|
@@ -291,13 +291,13 @@ function O(e) {
|
|
|
291
291
|
Object.prototype.hasOwnProperty.call(e, n) && (t[n] = O(e[n]));
|
|
292
292
|
return t;
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function F(e) {
|
|
295
295
|
return e instanceof RegExp ? e.toString() : e;
|
|
296
296
|
}
|
|
297
297
|
function k(e) {
|
|
298
298
|
return typeof e == "object" && e !== null && !Array.isArray(e) && !(e instanceof Date) && !(e instanceof RegExp);
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function P(e, t) {
|
|
301
301
|
if (e === t) return !0;
|
|
302
302
|
if (typeof e != typeof t) return !1;
|
|
303
303
|
if (e instanceof Date && t instanceof Date)
|
|
@@ -307,14 +307,14 @@ function K(e, t) {
|
|
|
307
307
|
if (Array.isArray(e) && Array.isArray(t)) {
|
|
308
308
|
if (e.length !== t.length) return !1;
|
|
309
309
|
for (let n = 0; n < e.length; n++)
|
|
310
|
-
if (!
|
|
310
|
+
if (!P(e[n], t[n])) return !1;
|
|
311
311
|
return !0;
|
|
312
312
|
}
|
|
313
313
|
if (k(e) && k(t)) {
|
|
314
314
|
const n = Object.keys(e), o = Object.keys(t);
|
|
315
315
|
if (n.length !== o.length) return !1;
|
|
316
316
|
for (const r of n)
|
|
317
|
-
if (!Object.prototype.hasOwnProperty.call(t, r) || !
|
|
317
|
+
if (!Object.prototype.hasOwnProperty.call(t, r) || !P(e[r], t[r])) return !1;
|
|
318
318
|
return !0;
|
|
319
319
|
}
|
|
320
320
|
return !1;
|
|
@@ -330,7 +330,7 @@ function ct(e, t, n) {
|
|
|
330
330
|
const i = e[c], f = n ? n(i) : JSON.stringify(i), h = a.get(f);
|
|
331
331
|
if (h) {
|
|
332
332
|
for (const m of h)
|
|
333
|
-
if (!u.has(m) &&
|
|
333
|
+
if (!u.has(m) && P(i, t[m])) {
|
|
334
334
|
l.push({ leftIndex: c, rightIndex: m }), u.add(m);
|
|
335
335
|
break;
|
|
336
336
|
}
|
|
@@ -340,7 +340,7 @@ function ct(e, t, n) {
|
|
|
340
340
|
}
|
|
341
341
|
function lt(e, t, n) {
|
|
342
342
|
var m, v;
|
|
343
|
-
if (
|
|
343
|
+
if (P(e, t)) return;
|
|
344
344
|
const o = { _t: "a" }, r = ((m = n == null ? void 0 : n.arrays) == null ? void 0 : m.detectMove) !== !1, a = ((v = n == null ? void 0 : n.arrays) == null ? void 0 : v.includeValueOnMove) === !0, l = n == null ? void 0 : n.objectHash;
|
|
345
345
|
let u = r ? ct(e, t, l) : [];
|
|
346
346
|
if (!l && e.length === t.length && e.length > 0 && u.length < e.length) {
|
|
@@ -360,8 +360,8 @@ function lt(e, t, n) {
|
|
|
360
360
|
if (b !== void 0) {
|
|
361
361
|
const w = J(e[p], t[b], n);
|
|
362
362
|
if (w !== void 0 && (o[b] = w), r && b !== p) {
|
|
363
|
-
const
|
|
364
|
-
o[
|
|
363
|
+
const C = `_${p}`, R = a ? [e[p], b, K] : ["", b, K];
|
|
364
|
+
o[C] = R;
|
|
365
365
|
}
|
|
366
366
|
} else {
|
|
367
367
|
const w = `_${p}`;
|
|
@@ -375,7 +375,7 @@ function lt(e, t, n) {
|
|
|
375
375
|
return o;
|
|
376
376
|
}
|
|
377
377
|
function dt(e, t, n) {
|
|
378
|
-
if (
|
|
378
|
+
if (P(e, t)) return;
|
|
379
379
|
const o = {}, r = Object.keys(e), a = Object.keys(t), l = /* @__PURE__ */ new Set([...r, ...a]);
|
|
380
380
|
for (const u of l) {
|
|
381
381
|
if (n != null && n.propertyFilter && !n.propertyFilter(u, { left: e, right: t }))
|
|
@@ -392,21 +392,21 @@ function dt(e, t, n) {
|
|
|
392
392
|
return Object.keys(o).length > 0 ? o : void 0;
|
|
393
393
|
}
|
|
394
394
|
function J(e, t, n) {
|
|
395
|
-
if (
|
|
395
|
+
if (P(e, t)) return;
|
|
396
396
|
if (e === void 0 && t !== void 0) {
|
|
397
397
|
const u = n != null && n.cloneDiffValues ? O(t) : t;
|
|
398
|
-
return [
|
|
398
|
+
return [F(u)];
|
|
399
399
|
}
|
|
400
400
|
if (typeof e !== typeof t || e instanceof Date != t instanceof Date || e instanceof RegExp != t instanceof RegExp || Array.isArray(e) !== Array.isArray(t)) {
|
|
401
401
|
const u = n != null && n.cloneDiffValues ? O(e) : e, c = n != null && n.cloneDiffValues ? O(t) : t;
|
|
402
|
-
return [
|
|
402
|
+
return [F(u), F(c)];
|
|
403
403
|
}
|
|
404
404
|
if (Array.isArray(e) && Array.isArray(t))
|
|
405
405
|
return lt(e, t, n);
|
|
406
406
|
if (k(e) && k(t))
|
|
407
407
|
return dt(e, t, n);
|
|
408
408
|
const a = n != null && n.cloneDiffValues ? O(e) : e, l = n != null && n.cloneDiffValues ? O(t) : t;
|
|
409
|
-
return [
|
|
409
|
+
return [F(a), F(l)];
|
|
410
410
|
}
|
|
411
411
|
function ft(e, t, n) {
|
|
412
412
|
return J(e, t, n);
|
|
@@ -416,7 +416,7 @@ function mt(e, t, n) {
|
|
|
416
416
|
for (const u in t) {
|
|
417
417
|
if (u === "_t" || !u.startsWith("_")) continue;
|
|
418
418
|
const c = parseInt(u.slice(1)), i = t[u];
|
|
419
|
-
Array.isArray(i) && (i.length === 3 && i[2] === M ? o.add(c) : i.length === 3 && i[2] ===
|
|
419
|
+
Array.isArray(i) && (i.length === 3 && i[2] === M ? o.add(c) : i.length === 3 && i[2] === K && r.set(c, i[1]));
|
|
420
420
|
}
|
|
421
421
|
const a = [];
|
|
422
422
|
let l = 0;
|
|
@@ -481,9 +481,9 @@ function yt(e) {
|
|
|
481
481
|
if (Array.isArray(r)) {
|
|
482
482
|
if (r.length === 3 && r[2] === M)
|
|
483
483
|
t[o] = [r[0]];
|
|
484
|
-
else if (r.length === 3 && r[2] ===
|
|
484
|
+
else if (r.length === 3 && r[2] === K) {
|
|
485
485
|
const a = r[1];
|
|
486
|
-
t[`_${a}`] = [r[0], o,
|
|
486
|
+
t[`_${a}`] = [r[0], o, K];
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
489
|
} else {
|
|
@@ -519,7 +519,7 @@ function Q(e) {
|
|
|
519
519
|
return [e[1], e[0]];
|
|
520
520
|
if (e.length === 3 && e[2] === M)
|
|
521
521
|
return [e[0]];
|
|
522
|
-
if (e.length === 3 && e[2] ===
|
|
522
|
+
if (e.length === 3 && e[2] === K)
|
|
523
523
|
return e;
|
|
524
524
|
}
|
|
525
525
|
return k(e) && e._t === "a" ? yt(e) : k(e) ? ht(e) : e;
|
|
@@ -566,22 +566,22 @@ function St({
|
|
|
566
566
|
includeValueOnMove: !1
|
|
567
567
|
},
|
|
568
568
|
cloneDiffValues: !1
|
|
569
|
-
}), n = j(null), o = j([]), r =
|
|
569
|
+
}), n = j(null), o = j([]), r = H(-1), a = j(null), l = S(() => r.value > 0), u = S(() => r.value < o.value.length - 1);
|
|
570
570
|
function c(v) {
|
|
571
571
|
if (n.value === null) {
|
|
572
|
-
n.value =
|
|
572
|
+
n.value = I(v), a.value = I(v), o.value = [{ delta: null }], r.value = 0;
|
|
573
573
|
return;
|
|
574
574
|
}
|
|
575
575
|
const p = t.diff(a.value, v);
|
|
576
|
-
if (r.value < o.value.length - 1 && (o.value = o.value.slice(0, r.value + 1)), o.value.push({ delta: p }), r.value++, a.value =
|
|
576
|
+
if (r.value < o.value.length - 1 && (o.value = o.value.slice(0, r.value + 1)), o.value.push({ delta: p }), r.value++, a.value = I(v), o.value.length > e) {
|
|
577
577
|
const b = o.value[1].delta;
|
|
578
|
-
b && n.value && (n.value = t.patch(
|
|
578
|
+
b && n.value && (n.value = t.patch(I(n.value), b)), o.value.shift(), r.value--;
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
581
|
function i(v) {
|
|
582
582
|
if (!n.value || v < 0 || v >= o.value.length)
|
|
583
583
|
return;
|
|
584
|
-
let p =
|
|
584
|
+
let p = I(n.value);
|
|
585
585
|
for (let b = 1; b <= v; b++) {
|
|
586
586
|
const w = o.value[b];
|
|
587
587
|
w.delta && (p = t.patch(p, w.delta));
|
|
@@ -592,14 +592,14 @@ function St({
|
|
|
592
592
|
if (l.value) {
|
|
593
593
|
r.value--;
|
|
594
594
|
const v = i(r.value);
|
|
595
|
-
return v && (a.value =
|
|
595
|
+
return v && (a.value = I(v)), v;
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
598
|
function h() {
|
|
599
599
|
if (u.value) {
|
|
600
600
|
r.value++;
|
|
601
601
|
const v = i(r.value);
|
|
602
|
-
return v && (a.value =
|
|
602
|
+
return v && (a.value = I(v)), v;
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
605
|
function m() {
|
|
@@ -616,7 +616,7 @@ function St({
|
|
|
616
616
|
}
|
|
617
617
|
const bt = {
|
|
618
618
|
async updateMenuModule(e, t) {
|
|
619
|
-
const n =
|
|
619
|
+
const n = G.RequestRunner.operation(t, e.modules);
|
|
620
620
|
if (n.validateError.length > 0)
|
|
621
621
|
throw new Error(n.validateError.join(`
|
|
622
622
|
`));
|
|
@@ -664,15 +664,15 @@ function wt() {
|
|
|
664
664
|
}
|
|
665
665
|
};
|
|
666
666
|
}
|
|
667
|
-
const
|
|
667
|
+
const Ft = Ye(
|
|
668
668
|
"mf-menu-store-v2",
|
|
669
669
|
() => {
|
|
670
670
|
const e = Qe(wt()), t = se(), n = et(), o = S(() => e.menu.modules.serveSequence ? x(e.menu.modules.serveSequence, {
|
|
671
671
|
selector: "position"
|
|
672
672
|
}) : []), r = S(() => {
|
|
673
673
|
var s;
|
|
674
|
-
return ((s = t.currentBusiness.value) == null ? void 0 : s.menuVersion) ||
|
|
675
|
-
}), a = S(() => r.value ===
|
|
674
|
+
return ((s = t.currentBusiness.value) == null ? void 0 : s.menuVersion) || W.F_MENU_VERSION.v3;
|
|
675
|
+
}), a = S(() => r.value === W.F_MENU_VERSION.v4), l = S(() => {
|
|
676
676
|
const s = e.menu.modules.catalog;
|
|
677
677
|
return x(s, { selector: "name" });
|
|
678
678
|
}), u = S(() => {
|
|
@@ -692,7 +692,7 @@ const Pt = Ye(
|
|
|
692
692
|
function f(s, d = !0) {
|
|
693
693
|
e.menu = { ...s, _rev: e.menu._rev }, d && D.push(e.menu);
|
|
694
694
|
}
|
|
695
|
-
const h = j(fe()), m =
|
|
695
|
+
const h = j(fe()), m = H(!1), v = H(1);
|
|
696
696
|
async function p() {
|
|
697
697
|
var y;
|
|
698
698
|
m.value = !0;
|
|
@@ -728,9 +728,9 @@ const Pt = Ye(
|
|
|
728
728
|
return h.value = d, m.value = !1, v.value = v.value + 1, d;
|
|
729
729
|
}
|
|
730
730
|
const w = ie.debounce(p, 200);
|
|
731
|
-
let
|
|
731
|
+
let C = null, R = null;
|
|
732
732
|
function X() {
|
|
733
|
-
R && (R(), R = null),
|
|
733
|
+
R && (R(), R = null), C && C.stop(), C = Xe(!0), R = C.run(() => Ze(
|
|
734
734
|
() => [e.menu, e.currentCatalogId, e.currentSchedulerId],
|
|
735
735
|
() => {
|
|
736
736
|
m.value || w();
|
|
@@ -809,13 +809,13 @@ const Pt = Ye(
|
|
|
809
809
|
}
|
|
810
810
|
const _e = S(() => V(h.value.modules.group, (s) => s.name)), Se = S(() => x(h.value.modules.takeaway, { selector: "name" })), be = S(() => x(e.menu.modules.printDepartment || [], {
|
|
811
811
|
selector: "name"
|
|
812
|
-
})), we = S(() => x(e.menu.modules.unit, { selector: "name" })), Me = S(() => x(
|
|
812
|
+
})), we = S(() => x(e.menu.modules.unit, { selector: "name" })), Me = S(() => x(We(e.menu.modules.recipe, e.menu.modules.sku), {
|
|
813
813
|
selector: "name"
|
|
814
|
-
})), Ae = S(() => e.menu.modules.cookingGuide),
|
|
815
|
-
const s =
|
|
814
|
+
})), Ae = S(() => e.menu.modules.cookingGuide), Ie = S(() => {
|
|
815
|
+
const s = qe(e.menu.modules.sku);
|
|
816
816
|
return x(s, { selector: "code" });
|
|
817
817
|
}), U = S(() => {
|
|
818
|
-
const s = !e.currentCatalogId, d = r.value ===
|
|
818
|
+
const s = !e.currentCatalogId, d = r.value === W.F_MENU_VERSION.v4, y = !e.currentSchedulerId, g = {
|
|
819
819
|
create: s && y,
|
|
820
820
|
edit: s && y,
|
|
821
821
|
delete: s && y
|
|
@@ -884,23 +884,23 @@ const Pt = Ye(
|
|
|
884
884
|
}
|
|
885
885
|
};
|
|
886
886
|
});
|
|
887
|
-
function
|
|
887
|
+
function L(s) {
|
|
888
888
|
return `${s.systemCode}/${s.taxCode}`;
|
|
889
889
|
}
|
|
890
|
-
function
|
|
890
|
+
function Ce(s) {
|
|
891
891
|
const [d, y] = s.split("/");
|
|
892
892
|
return { systemCode: d, taxCode: y };
|
|
893
893
|
}
|
|
894
894
|
function Re(s, d, y) {
|
|
895
|
-
return (s ?? d ?? []).map((g) =>
|
|
895
|
+
return (s ?? d ?? []).map((g) => L(g)).find((g) => y.some((_) => _.value === g));
|
|
896
896
|
}
|
|
897
897
|
const ke = S(() => {
|
|
898
898
|
var g;
|
|
899
|
-
const s = ["SV5", "SV10"], d =
|
|
899
|
+
const s = ["SV5", "SV10"], d = ze.Country.getCountryFlattenTaxes(
|
|
900
900
|
se().currentCountry.value
|
|
901
901
|
), y = d.filter((_) => a.value || !s.includes(_.taxCode)).map((_) => ({
|
|
902
|
-
label: `${_.name} (${
|
|
903
|
-
value:
|
|
902
|
+
label: `${_.name} (${Ge(_.rate)}%)`,
|
|
903
|
+
value: L(_),
|
|
904
904
|
meta: {
|
|
905
905
|
rate: _.rate
|
|
906
906
|
}
|
|
@@ -937,9 +937,9 @@ const Pt = Ye(
|
|
|
937
937
|
}));
|
|
938
938
|
try {
|
|
939
939
|
if (d || g.some(
|
|
940
|
-
(A) => [
|
|
940
|
+
(A) => [G.F_OPERATION_TYPE.delete, G.F_OPERATION_TYPE.deleteMany].includes(A.operation)
|
|
941
941
|
)) {
|
|
942
|
-
const A = await
|
|
942
|
+
const A = await He(g, e.menu.modules);
|
|
943
943
|
if (A !== !0) throw new Error(A);
|
|
944
944
|
}
|
|
945
945
|
const _ = await bt.updateMenuModule(e.menu, g);
|
|
@@ -951,7 +951,7 @@ const Pt = Ye(
|
|
|
951
951
|
message: _
|
|
952
952
|
});
|
|
953
953
|
}
|
|
954
|
-
},
|
|
954
|
+
}, Ke = async (s) => {
|
|
955
955
|
const d = {
|
|
956
956
|
...e.menu,
|
|
957
957
|
masterCatalogSetting: s.masterCatalogSetting,
|
|
@@ -959,7 +959,7 @@ const Pt = Ye(
|
|
|
959
959
|
priceTierSettings: s.priceTierSettings
|
|
960
960
|
};
|
|
961
961
|
return f(d), d;
|
|
962
|
-
}, D = St({ maxHistorySize: 50 }),
|
|
962
|
+
}, D = St({ maxHistorySize: 50 }), Pe = S(() => D.canUndo.value), Fe = S(() => D.canRedo.value), $e = () => {
|
|
963
963
|
const s = D.undo();
|
|
964
964
|
s && f(s, !1);
|
|
965
965
|
}, je = () => {
|
|
@@ -997,7 +997,7 @@ const Pt = Ye(
|
|
|
997
997
|
units: we,
|
|
998
998
|
recipes: Me,
|
|
999
999
|
cookingGuide: Ae,
|
|
1000
|
-
skus:
|
|
1000
|
+
skus: Ie,
|
|
1001
1001
|
rules: U,
|
|
1002
1002
|
taxSetting: ke,
|
|
1003
1003
|
// Action
|
|
@@ -1009,21 +1009,21 @@ const Pt = Ye(
|
|
|
1009
1009
|
selectCategory: De,
|
|
1010
1010
|
setRestaurantAttrParams: Ve,
|
|
1011
1011
|
updateMenu: Te,
|
|
1012
|
-
updateMenuSetting:
|
|
1012
|
+
updateMenuSetting: Ke,
|
|
1013
1013
|
computeMergedMenu: p,
|
|
1014
1014
|
// helper
|
|
1015
|
-
encodeTax:
|
|
1016
|
-
decodeTax:
|
|
1015
|
+
encodeTax: L,
|
|
1016
|
+
decodeTax: Ce,
|
|
1017
1017
|
getSelectedTax: Re,
|
|
1018
1018
|
mapVariant: ge,
|
|
1019
1019
|
// history
|
|
1020
|
-
canUndoHistory:
|
|
1021
|
-
canRedoHistory:
|
|
1020
|
+
canUndoHistory: Pe,
|
|
1021
|
+
canRedoHistory: Fe,
|
|
1022
1022
|
undoHistory: $e,
|
|
1023
1023
|
redoHistory: je,
|
|
1024
1024
|
// cleanup
|
|
1025
1025
|
$dispose: () => {
|
|
1026
|
-
w.cancel(), R && (R(), R = null),
|
|
1026
|
+
w.cancel(), R && (R(), R = null), C && (C.stop(), C = null), Ne();
|
|
1027
1027
|
},
|
|
1028
1028
|
$reinitialize: () => {
|
|
1029
1029
|
X();
|
|
@@ -1034,10 +1034,10 @@ const Pt = Ye(
|
|
|
1034
1034
|
export {
|
|
1035
1035
|
Vt as a,
|
|
1036
1036
|
Tt as b,
|
|
1037
|
-
|
|
1038
|
-
|
|
1037
|
+
Kt as c,
|
|
1038
|
+
Pt as f,
|
|
1039
1039
|
Dt as g,
|
|
1040
1040
|
Ot as m,
|
|
1041
1041
|
at as o,
|
|
1042
|
-
|
|
1042
|
+
Ft as u
|
|
1043
1043
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as d, ref as g, watch as _, resolveComponent as S, createBlock as T, openBlock as f, unref as y, computed as h } from "vue";
|
|
2
2
|
import { useI18n as m } from "@feedmepos/mf-common";
|
|
3
3
|
import { useDialogChild as w, useDialog as x, useSnackbar as C } from "@feedmepos/ui-library";
|
|
4
|
-
import { u as k, D as M } from "./index.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { u as k, D as M } from "./index.vue_vue_type_script_setup_true_lang-ChpOX21K.js";
|
|
5
5
|
const v = /* @__PURE__ */ d({
|
|
6
6
|
__name: "AddPriceGroupDialog",
|
|
7
7
|
setup(s) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as ie, computed as Y, resolveComponent as _, createElementBlock as d, openBlock as u, createVNode as t, createCommentVNode as F, unref as n, toDisplayString as A, createElementVNode as h, withCtx as v, Fragment as N, renderList as M, createBlock as I, ref as H, Transition as se, createTextVNode as me } from "vue";
|
|
2
|
-
import { H as S, z as r, u as pe, I as ve, J as ue } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { H as S, z as r, u as pe, I as ve, J as ue } from "./index.vue_vue_type_script_setup_true_lang-ChpOX21K.js";
|
|
3
3
|
import { useI18n as de } from "@feedmepos/mf-common";
|
|
4
4
|
import { components as _e } from "@feedmepos/ui-library";
|
|
5
5
|
import { _ as fe } from "./FormItem.vue_vue_type_script_setup_true_lang-B3Ixruh-.js";
|
|
6
|
-
import { _ as ne } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { _ as ne } from "./RuleView.vue_vue_type_script_setup_true_lang-WNjFlKO_.js";
|
|
7
7
|
import { u as ye } from "./discardConfirm-BHni0LNu.js";
|
|
8
|
-
import { u as he } from "./menu-
|
|
9
|
-
import { L as ge } from "./LinkProductSideSheet-
|
|
8
|
+
import { u as he } from "./menu-CQSPnWF_.js";
|
|
9
|
+
import { L as ge } from "./LinkProductSideSheet-DkaEnZRb.js";
|
|
10
10
|
const Ve = { class: "space-y-8" }, Fe = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "space-y-16"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as M, watch as _, ref as E, resolveComponent as f, createBlock as x, openBlock as C, unref as c, withCtx as V, createVNode as A } from "vue";
|
|
2
|
-
import { J as l, z as d, u as F } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { J as l, z as d, u as F } from "./index.vue_vue_type_script_setup_true_lang-ChpOX21K.js";
|
|
3
3
|
import { useI18n as b } from "@feedmepos/mf-common";
|
|
4
4
|
import { useDialogChild as P } from "@feedmepos/ui-library";
|
|
5
|
-
import { u as v } from "./menuV2-
|
|
5
|
+
import { u as v } from "./menuV2-CjZW8UU-.js";
|
|
6
6
|
const y = /* @__PURE__ */ M({
|
|
7
7
|
__name: "AddSubcategoryDialogContentComponent",
|
|
8
8
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import "./index.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { u as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-CMv6raWo.js";
|
|
2
|
+
import "./index.vue_vue_type_script_setup_true_lang-ChpOX21K.js";
|
|
3
3
|
var Z = {
|
|
4
4
|
defaultAmount: 0,
|
|
5
5
|
defaultCurrency: "USD",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineStore as J } from "pinia";
|
|
2
2
|
import { defineComponent as O, computed as w, ref as h, watch as T, resolveComponent as _, createBlock as W, openBlock as F, withCtx as x, createVNode as d, createElementVNode as b, normalizeClass as Q, createElementBlock as A, toDisplayString as M, unref as l, Fragment as q, renderSlot as X, renderList as Z, getCurrentInstance as ee } from "vue";
|
|
3
|
-
import { a6 as B, a7 as te, a4 as P, H as k, O as $, D as I, B as E, a5 as ne, J as C, z as D, I as ae, u as oe } from "./index.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { a6 as B, a7 as te, a4 as P, H as k, O as $, D as I, B as E, a5 as ne, J as C, z as D, I as ae, u as oe } from "./index.vue_vue_type_script_setup_true_lang-ChpOX21K.js";
|
|
4
4
|
import { useI18n as L } from "@feedmepos/mf-common";
|
|
5
5
|
import { useSnackbar as j, components as le, useDialog as ue, FmButtonVariant as ie } from "@feedmepos/ui-library";
|
|
6
6
|
import { u as se } from "./discardConfirm-BHni0LNu.js";
|
|
7
7
|
import { c as me } from "./check-C9mY6LiX.js";
|
|
8
8
|
import "./vuedraggable-DnBIRDMr.js";
|
|
9
|
-
import "./menuV2-
|
|
9
|
+
import "./menuV2-CjZW8UU-.js";
|
|
10
10
|
import "./app-CzXxFrl1.js";
|
|
11
11
|
/* empty css */
|
|
12
12
|
import { c as re } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feedmepos/mf-menu",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.7-beta.1",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"vue3-lottie": "^3.3.0",
|
|
54
54
|
"vuedraggable": "^4.1.0",
|
|
55
55
|
"xlsx": "^0.18.5",
|
|
56
|
-
"@feedmepos/mf-common": "^1.
|
|
56
|
+
"@feedmepos/mf-common": "^1.29.10"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@rollup/plugin-commonjs": "^28.0.2",
|