@feedmepos/mf-menu 0.32.84-dev.1 → 0.32.84
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-C0CJza2q.js → App-DQYGVwqw.js} +8 -8
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BSoX-vdS.js → ApplyProduct.vue_vue_type_script_setup_true_lang-By550ll2.js} +3 -3
- package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-Zb_wxRhM.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-C9RL7B4X.js} +3 -3
- package/dist/{Catalog-DBM3kYSx.js → Catalog-SipvJmOi.js} +6 -6
- package/dist/{CatalogBinding-DZrL3XdA.js → CatalogBinding-DxJFf3hZ.js} +3 -3
- package/dist/{Category-DFTUBtuz.js → Category-Cvnddg_P.js} +4 -4
- package/dist/{Category-Bn4gKAEx.js → Category-eLeO5RmT.js} +4 -4
- package/dist/{CookingGuide-B1ck6hOY.js → CookingGuide-Dwy7sJ7L.js} +5 -5
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang--qmx0gaj.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-2G8bjM0G.js} +1 -1
- package/dist/{Group-Btvfhg2_.js → Group-BHlqxHJa.js} +3 -3
- package/dist/{Group-CxbrS8LX.js → Group-Blprrrqp.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-WlKR7vnP.js → Group.vue_vue_type_script_setup_true_lang-tVdhx2MC.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BdGLiSeH.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CLTOwiqJ.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Ck4OcekO.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-D9CnWzhf.js} +7 -7
- package/dist/{Ingredient-C6BmEu3Y.js → Ingredient-CRDTN_Xq.js} +4 -4
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-yvo4FOzt.js → InventoryBinding.vue_vue_type_script_setup_true_lang-RgpcLcfL.js} +2 -2
- package/dist/{LinkProductSideSheet-BciRCFgw.js → LinkProductSideSheet-t3GdVkkM.js} +4 -4
- package/dist/{MenuSetting-ua6e0J96.js → MenuSetting-CeHAYZIi.js} +7 -7
- package/dist/{OrderPacing-DsSb0d82.js → OrderPacing-DNj1_lES.js} +5 -5
- package/dist/{PrintRoute-By7rKEeY.js → PrintRoute-BJl3KimH.js} +5 -5
- package/dist/{Product-BvuX4kla.js → Product-CyZoxce5.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-Q92ZObBx.js → Product.vue_vue_type_script_setup_true_lang-xteY_0JW.js} +14 -14
- package/dist/{ProductInternalTools-BtNmXtBF.js → ProductInternalTools-CzBTkNnO.js} +7 -7
- package/dist/{Products-BDP44ubL.js → Products-CGgaDz0x.js} +60 -60
- package/dist/{Publish-B_sq_Rdm.js → Publish-BGsOETCG.js} +4 -4
- package/dist/{Recipe-DB7b28aL.js → Recipe-Bkz-2WLW.js} +5 -5
- package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-DxiI6Yg2.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-1bgL6T7Z.js} +1 -1
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DHnqK3HS.js → RuleView.vue_vue_type_script_setup_true_lang-DKPBnekp.js} +455 -455
- package/dist/{Scheduler-DSWgbQqO.js → Scheduler-DfVF2O45.js} +3 -3
- package/dist/{ServingSequence-DGmKHdVL.js → ServingSequence-C8h-r1rS.js} +3 -3
- package/dist/{Setting-CLrVzQni.js → Setting-DeDTKNG9.js} +5 -5
- package/dist/{Subcategory-RGVFEs_8.js → Subcategory-DVXY-Dc9.js} +6 -6
- package/dist/{Takeaway-q1XPt-xG.js → Takeaway-Gw4FjoA7.js} +1 -1
- package/dist/{Takeaway-C0B2-YY0.js → Takeaway-UvvKWAyD.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-D2xNekdv.js → Takeaway.vue_vue_type_script_setup_true_lang-w0UeCL3D.js} +5 -5
- package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-DG4rqFP5.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-Cv7w6gYb.js} +1 -1
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-DeOLLmms.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-C6Cp-fU6.js} +2 -2
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BM_TcYip.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-iaxM178x.js} +16 -16
- package/dist/{Unit-CaDn4AB7.js → Unit-DX3fO6F6.js} +2 -2
- package/dist/{Variant-BlZkFuwb.js → Variant-Bi18iF8B.js} +3 -3
- package/dist/{_id_-7CmnuauP.js → _id_-Cd_4U6pd.js} +10 -10
- package/dist/{app-DvfEk_tx.js → app-C2JspNB6.js} +33 -33
- package/dist/{app-DDg9y6nS.js → app-CTLoSpZF.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/assets/{linked-status-CqHj18wq.js → linked-status-Bc6oKGN7.js} +2 -2
- package/dist/assets/{menu-export-BEuvHQDu.js → menu-export-B083R0x2.js} +2 -2
- package/dist/assets/{override-menu-ioMaRcaH.js → override-menu-CMbBDi39.js} +2 -2
- package/dist/assets/{validate-menu-BN1dXwXL.js → validate-menu-4cf4mMlP.js} +12 -12
- package/dist/{catalog-D9azICZp.js → catalog-Bh1Fuirs.js} +1 -1
- package/dist/{catalogSetting-C6S9C3VK.js → catalogSetting-D52y96em.js} +1 -1
- package/dist/{currency-Ip3nWHBD.js → currency-B8nwmKHp.js} +1 -1
- package/dist/{dayjs.min-D8s9B1CS.js → dayjs.min-D9nrsB-v.js} +2 -2
- package/dist/{discardConfirm-BjinlfVb.js → discardConfirm-CuPIlVDv.js} +1 -1
- package/dist/{index-B-rFt9Jy.js → index-C2oCP5Yy.js} +1 -1
- package/dist/{index-B1rT1gBF.js → index-DEYN7phN.js} +5 -5
- package/dist/{index-DiF-CeuH.js → index-eNqjLjgW.js} +6 -6
- package/dist/{index.vue_vue_type_script_setup_true_lang-HQ-O91gV.js → index.vue_vue_type_script_setup_true_lang-BMh4uaSK.js} +6 -6
- package/dist/{item-Cyw-rGsb.js → item-L4ip2ikT.js} +20 -20
- package/dist/{jszip.min-DyzVhWhL.js → jszip.min-DGhJqVaW.js} +3 -3
- package/dist/{linkProducts-Dvljyse1.js → linkProducts-DzezeBIt.js} +4 -4
- package/dist/{memberPricing-COMDAgBA.js → memberPricing-COizG9lb.js} +1 -1
- package/dist/{menu-_pIw2GFF.js → menu-BaTAUzXN.js} +1 -1
- package/dist/{menuV2--SWLAQrl.js → menuV2-Bnf7F2oE.js} +85 -85
- package/dist/{order_pacing-DvvQbf-W.js → order_pacing-DCfDFy7Z.js} +5 -5
- package/dist/{priceTier-COyenLLF.js → priceTier-oaQlHY3a.js} +1 -1
- package/dist/{rules-D6Tuu57X.js → rules-CtgKAyt5.js} +3 -3
- package/dist/{scheduler-Y40zEk8u.js → scheduler--koGNOyt.js} +5 -5
- package/dist/{toExcel-sjWRPlid.js → toExcel-CU27GHuS.js} +2 -2
- package/dist/{unit-BBIfO-BP.js → unit-PI7Buwy-.js} +3 -3
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var We = Object.defineProperty;
|
|
2
2
|
var Le = (e, t, n) => t in e ? We(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var ne = (e, t, n) => Le(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { l as ae } from "./discardConfirm-
|
|
4
|
+
import { l as ae } from "./discardConfirm-CuPIlVDv.js";
|
|
5
5
|
import { defineStore as qe } from "pinia";
|
|
6
|
-
import { shallowRef as
|
|
7
|
-
import { f as C, g as ue, m as T, l as ie, at as re, h as
|
|
6
|
+
import { shallowRef as N, ref as B, computed as S, shallowReactive as ze, effectScope as Be, watch as He } from "vue";
|
|
7
|
+
import { f as C, g as ue, m as T, l as ie, at as re, h as H, R as x, c as L, s as V, $ as oe, au as Ge, av as Je, a as Ye, T as Qe, aw as Xe, ax as Ze, O as et } from "./index.vue_vue_type_script_setup_true_lang-BMh4uaSK.js";
|
|
8
8
|
import { useCoreStore as se } from "@feedmepos/mf-common";
|
|
9
9
|
import { useSnackbar as tt } from "@feedmepos/ui-library";
|
|
10
10
|
function nt(e) {
|
|
@@ -16,7 +16,7 @@ function nt(e) {
|
|
|
16
16
|
}
|
|
17
17
|
return delete t.variant, delete t.thumbnail, delete t.images, [t, ...n || []];
|
|
18
18
|
}
|
|
19
|
-
const rt = "/assets/linked-status-
|
|
19
|
+
const rt = "/assets/linked-status-Bc6oKGN7.js", ot = "/assets/override-menu-CMbBDi39.js";
|
|
20
20
|
function st(e, t, n, s) {
|
|
21
21
|
const r = C(t), u = n ? r.modules.catalog.find((f) => f._id === n) : null, c = s ? r.modules.scheduler.find((f) => f._id === s) : null, a = u ? C(u) : void 0, d = n ? r.modules.catalog.filter((f) => f._id !== n) : [], l = c ? C(c) : void 0, g = e.reduce((f, v) => (f[v._id] = nt(v), f), {});
|
|
22
22
|
function y(f = []) {
|
|
@@ -189,7 +189,7 @@ function Tt(e, t) {
|
|
|
189
189
|
}, [])) || []).join(" / ");
|
|
190
190
|
}
|
|
191
191
|
const q = /* @__PURE__ */ new Map();
|
|
192
|
-
async function
|
|
192
|
+
async function Kt(e, t) {
|
|
193
193
|
const n = `${e._id}-${e.updatedAt}-${t}`;
|
|
194
194
|
if (q.has(n))
|
|
195
195
|
return q.get(n);
|
|
@@ -209,15 +209,15 @@ async function ce(e, t, n) {
|
|
|
209
209
|
schedulerId: n
|
|
210
210
|
});
|
|
211
211
|
}
|
|
212
|
-
const
|
|
212
|
+
const z = /* @__PURE__ */ new Map();
|
|
213
213
|
async function it(e, t, n) {
|
|
214
214
|
const s = `${e._id}-${e.updatedAt}-${t || "null"}-${n || "null"}`;
|
|
215
|
-
if (
|
|
216
|
-
return
|
|
215
|
+
if (z.has(s))
|
|
216
|
+
return z.get(s);
|
|
217
217
|
const r = await ce(e, t, n);
|
|
218
|
-
return
|
|
218
|
+
return z.set(s, r), r;
|
|
219
219
|
}
|
|
220
|
-
async function
|
|
220
|
+
async function $t(e, t, n) {
|
|
221
221
|
var c, a;
|
|
222
222
|
const s = await it(e, t, null), r = [], u = (d, l) => {
|
|
223
223
|
const g = C(d);
|
|
@@ -229,8 +229,8 @@ async function Kt(e, t, n) {
|
|
|
229
229
|
const l = (c = d.items) == null ? void 0 : c.find((y) => y._id === n && !y.combinationKey), g = e.modules.item.find((y) => y._id === n);
|
|
230
230
|
if (l) {
|
|
231
231
|
const y = (a = d.items) == null ? void 0 : a.filter((v) => v._id === n && v.combinationKey), f = [l, ...y].map((v) => {
|
|
232
|
-
var
|
|
233
|
-
const h = v.combinationKey ? (I = (
|
|
232
|
+
var M, I;
|
|
233
|
+
const h = v.combinationKey ? (I = (M = g == null ? void 0 : g.variant) == null ? void 0 : M.variantCombinations) == null ? void 0 : I.find(
|
|
234
234
|
(E) => E.combinationKey === v.combinationKey
|
|
235
235
|
) : g, b = h && g ? u(g, h) : v;
|
|
236
236
|
return u(b, v);
|
|
@@ -243,7 +243,7 @@ async function Kt(e, t, n) {
|
|
|
243
243
|
}
|
|
244
244
|
return r;
|
|
245
245
|
}
|
|
246
|
-
const
|
|
246
|
+
const w = 0, K = 3;
|
|
247
247
|
function ct(e) {
|
|
248
248
|
const t = /^\/(.*)\/([gimyu]*)$/.exec(e.toString());
|
|
249
249
|
if (!t)
|
|
@@ -269,10 +269,10 @@ function O(e) {
|
|
|
269
269
|
function P(e) {
|
|
270
270
|
return e instanceof RegExp ? e.toString() : e;
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function k(e) {
|
|
273
273
|
return typeof e == "object" && e !== null && !Array.isArray(e) && !(e instanceof Date) && !(e instanceof RegExp);
|
|
274
274
|
}
|
|
275
|
-
function
|
|
275
|
+
function $(e, t) {
|
|
276
276
|
if (e === t) return !0;
|
|
277
277
|
if (typeof e != typeof t) return !1;
|
|
278
278
|
if (e instanceof Date && t instanceof Date)
|
|
@@ -282,14 +282,14 @@ function K(e, t) {
|
|
|
282
282
|
if (Array.isArray(e) && Array.isArray(t)) {
|
|
283
283
|
if (e.length !== t.length) return !1;
|
|
284
284
|
for (let n = 0; n < e.length; n++)
|
|
285
|
-
if (
|
|
285
|
+
if (!$(e[n], t[n])) return !1;
|
|
286
286
|
return !0;
|
|
287
287
|
}
|
|
288
|
-
if (
|
|
288
|
+
if (k(e) && k(t)) {
|
|
289
289
|
const n = Object.keys(e), s = Object.keys(t);
|
|
290
290
|
if (n.length !== s.length) return !1;
|
|
291
291
|
for (const r of n)
|
|
292
|
-
if (!Object.prototype.hasOwnProperty.call(t, r) ||
|
|
292
|
+
if (!Object.prototype.hasOwnProperty.call(t, r) || !$(e[r], t[r])) return !1;
|
|
293
293
|
return !0;
|
|
294
294
|
}
|
|
295
295
|
return !1;
|
|
@@ -305,7 +305,7 @@ function lt(e, t, n) {
|
|
|
305
305
|
const l = e[d], g = n ? n(l) : JSON.stringify(l), y = u.get(g);
|
|
306
306
|
if (y) {
|
|
307
307
|
for (const f of y)
|
|
308
|
-
if (!a.has(f) &&
|
|
308
|
+
if (!a.has(f) && $(l, t[f])) {
|
|
309
309
|
c.push({ leftIndex: d, rightIndex: f }), a.add(f);
|
|
310
310
|
break;
|
|
311
311
|
}
|
|
@@ -315,15 +315,15 @@ function lt(e, t, n) {
|
|
|
315
315
|
}
|
|
316
316
|
function dt(e, t, n) {
|
|
317
317
|
var f, v;
|
|
318
|
-
if (
|
|
318
|
+
if ($(e, t)) return;
|
|
319
319
|
const s = { _t: "a" }, r = ((f = n == null ? void 0 : n.arrays) == null ? void 0 : f.detectMove) !== !1, u = ((v = n == null ? void 0 : n.arrays) == null ? void 0 : v.includeValueOnMove) === !0, c = n == null ? void 0 : n.objectHash;
|
|
320
320
|
let a = r ? lt(e, t, c) : [];
|
|
321
321
|
if (!c && e.length === t.length && e.length > 0 && a.length < e.length) {
|
|
322
|
-
const h =
|
|
322
|
+
const h = k(e[0]) || Array.isArray(e[0]), b = a.length > 0;
|
|
323
323
|
if (h || b) {
|
|
324
324
|
a = [];
|
|
325
|
-
for (let
|
|
326
|
-
a.push({ leftIndex:
|
|
325
|
+
for (let M = 0; M < e.length; M++)
|
|
326
|
+
a.push({ leftIndex: M, rightIndex: M });
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
new Set(a.map((h) => h.leftIndex));
|
|
@@ -333,14 +333,14 @@ function dt(e, t, n) {
|
|
|
333
333
|
for (let h = 0; h < e.length; h++) {
|
|
334
334
|
const b = l.get(h);
|
|
335
335
|
if (b !== void 0) {
|
|
336
|
-
const
|
|
337
|
-
if (
|
|
338
|
-
const I = `_${h}`, E = u ? [e[h], b,
|
|
336
|
+
const M = J(e[h], t[b], n);
|
|
337
|
+
if (M !== void 0 && (s[b] = M), r && b !== h) {
|
|
338
|
+
const I = `_${h}`, E = u ? [e[h], b, K] : ["", b, K];
|
|
339
339
|
s[I] = E;
|
|
340
340
|
}
|
|
341
341
|
} else {
|
|
342
|
-
const
|
|
343
|
-
s[
|
|
342
|
+
const M = `_${h}`;
|
|
343
|
+
s[M] = [e[h], w, w];
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
for (let h = 0; h < t.length; h++)
|
|
@@ -350,7 +350,7 @@ function dt(e, t, n) {
|
|
|
350
350
|
return s;
|
|
351
351
|
}
|
|
352
352
|
function mt(e, t, n) {
|
|
353
|
-
if (
|
|
353
|
+
if ($(e, t)) return;
|
|
354
354
|
const s = {}, r = Object.keys(e), u = Object.keys(t), c = /* @__PURE__ */ new Set([...r, ...u]);
|
|
355
355
|
for (const a of c) {
|
|
356
356
|
if (n != null && n.propertyFilter && !n.propertyFilter(a, { left: e, right: t }))
|
|
@@ -361,13 +361,13 @@ function mt(e, t, n) {
|
|
|
361
361
|
g !== void 0 && (s[a] = g);
|
|
362
362
|
} else if (d && !l) {
|
|
363
363
|
const g = n != null && n.omitRemovedValues ? 0 : e[a];
|
|
364
|
-
s[a] = [g,
|
|
364
|
+
s[a] = [g, w, w];
|
|
365
365
|
} else !d && l && (s[a] = [t[a]]);
|
|
366
366
|
}
|
|
367
367
|
return Object.keys(s).length > 0 ? s : void 0;
|
|
368
368
|
}
|
|
369
369
|
function J(e, t, n) {
|
|
370
|
-
if (
|
|
370
|
+
if ($(e, t)) return;
|
|
371
371
|
if (e === void 0 && t !== void 0) {
|
|
372
372
|
const a = n != null && n.cloneDiffValues ? O(t) : t;
|
|
373
373
|
return [P(a)];
|
|
@@ -378,7 +378,7 @@ function J(e, t, n) {
|
|
|
378
378
|
}
|
|
379
379
|
if (Array.isArray(e) && Array.isArray(t))
|
|
380
380
|
return dt(e, t, n);
|
|
381
|
-
if (
|
|
381
|
+
if (k(e) && k(t))
|
|
382
382
|
return mt(e, t, n);
|
|
383
383
|
const u = n != null && n.cloneDiffValues ? O(e) : e, c = n != null && n.cloneDiffValues ? O(t) : t;
|
|
384
384
|
return [P(u), P(c)];
|
|
@@ -391,7 +391,7 @@ function vt(e, t, n) {
|
|
|
391
391
|
for (const a in t) {
|
|
392
392
|
if (a === "_t" || !a.startsWith("_")) continue;
|
|
393
393
|
const d = parseInt(a.slice(1)), l = t[a];
|
|
394
|
-
Array.isArray(l) && (l.length === 3 && l[2] ===
|
|
394
|
+
Array.isArray(l) && (l.length === 3 && l[2] === w ? s.add(d) : l.length === 3 && l[2] === K && r.set(d, l[1]));
|
|
395
395
|
}
|
|
396
396
|
const u = [];
|
|
397
397
|
let c = 0;
|
|
@@ -428,7 +428,7 @@ function yt(e, t, n) {
|
|
|
428
428
|
const s = { ...e };
|
|
429
429
|
for (const r in t) {
|
|
430
430
|
const u = t[r];
|
|
431
|
-
Array.isArray(u) ? u.length === 1 ? s[r] = u[0] : u.length === 3 && u[2] ===
|
|
431
|
+
Array.isArray(u) ? u.length === 1 ? s[r] = u[0] : u.length === 3 && u[2] === w ? delete s[r] : u.length === 2 && (s[r] = u[1]) : s[r] = Y(s[r], u);
|
|
432
432
|
}
|
|
433
433
|
return s;
|
|
434
434
|
}
|
|
@@ -439,10 +439,10 @@ function Y(e, t, n) {
|
|
|
439
439
|
return t[0];
|
|
440
440
|
if (t.length === 2)
|
|
441
441
|
return t[1];
|
|
442
|
-
if (t.length === 3 && t[2] ===
|
|
442
|
+
if (t.length === 3 && t[2] === w)
|
|
443
443
|
return;
|
|
444
444
|
}
|
|
445
|
-
return
|
|
445
|
+
return k(t) && t._t === "a" ? vt(e, t) : k(t) && k(e) ? yt(e, t) : e;
|
|
446
446
|
}
|
|
447
447
|
function le(e, t, n) {
|
|
448
448
|
return Y(e, t);
|
|
@@ -454,17 +454,17 @@ function gt(e) {
|
|
|
454
454
|
if (n.startsWith("_")) {
|
|
455
455
|
const s = parseInt(n.slice(1)), r = e[n];
|
|
456
456
|
if (Array.isArray(r)) {
|
|
457
|
-
if (r.length === 3 && r[2] ===
|
|
457
|
+
if (r.length === 3 && r[2] === w)
|
|
458
458
|
t[s] = [r[0]];
|
|
459
|
-
else if (r.length === 3 && r[2] ===
|
|
459
|
+
else if (r.length === 3 && r[2] === K) {
|
|
460
460
|
const u = r[1];
|
|
461
|
-
t[`_${u}`] = [r[0], s,
|
|
461
|
+
t[`_${u}`] = [r[0], s, K];
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
464
|
} else {
|
|
465
465
|
const s = parseInt(n), r = e[n];
|
|
466
466
|
if (Array.isArray(r) && r.length === 1)
|
|
467
|
-
t[`_${s}`] = [r[0],
|
|
467
|
+
t[`_${s}`] = [r[0], w, w];
|
|
468
468
|
else {
|
|
469
469
|
const u = Q(r);
|
|
470
470
|
u !== void 0 && (t[n] = u);
|
|
@@ -477,7 +477,7 @@ function ht(e) {
|
|
|
477
477
|
for (const n in e) {
|
|
478
478
|
const s = e[n];
|
|
479
479
|
if (Array.isArray(s))
|
|
480
|
-
s.length === 1 ? t[n] = [s[0],
|
|
480
|
+
s.length === 1 ? t[n] = [s[0], w, w] : s.length === 3 && s[2] === w ? t[n] = [s[0]] : s.length === 2 && (t[n] = [s[1], s[0]]);
|
|
481
481
|
else {
|
|
482
482
|
const r = Q(s);
|
|
483
483
|
r !== void 0 && (t[n] = r);
|
|
@@ -489,15 +489,15 @@ function Q(e) {
|
|
|
489
489
|
if (e !== void 0) {
|
|
490
490
|
if (Array.isArray(e)) {
|
|
491
491
|
if (e.length === 1)
|
|
492
|
-
return [e[0],
|
|
492
|
+
return [e[0], w, w];
|
|
493
493
|
if (e.length === 2)
|
|
494
494
|
return [e[1], e[0]];
|
|
495
|
-
if (e.length === 3 && e[2] ===
|
|
495
|
+
if (e.length === 3 && e[2] === w)
|
|
496
496
|
return [e[0]];
|
|
497
|
-
if (e.length === 3 && e[2] ===
|
|
497
|
+
if (e.length === 3 && e[2] === K)
|
|
498
498
|
return e;
|
|
499
499
|
}
|
|
500
|
-
return
|
|
500
|
+
return k(e) && e._t === "a" ? gt(e) : k(e) ? ht(e) : e;
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
503
|
function de(e) {
|
|
@@ -541,7 +541,7 @@ function bt({
|
|
|
541
541
|
includeValueOnMove: !1
|
|
542
542
|
},
|
|
543
543
|
cloneDiffValues: !1
|
|
544
|
-
}), n =
|
|
544
|
+
}), n = N(null), s = N([]), r = B(-1), u = N(null), c = S(() => r.value > 0), a = S(() => r.value < s.value.length - 1);
|
|
545
545
|
function d(v) {
|
|
546
546
|
if (n.value === null) {
|
|
547
547
|
n.value = C(v), u.value = C(v), s.value = [{ delta: null }], r.value = 0;
|
|
@@ -558,8 +558,8 @@ function bt({
|
|
|
558
558
|
return;
|
|
559
559
|
let h = C(n.value);
|
|
560
560
|
for (let b = 1; b <= v; b++) {
|
|
561
|
-
const
|
|
562
|
-
|
|
561
|
+
const M = s.value[b];
|
|
562
|
+
M.delta && (h = t.patch(h, M.delta));
|
|
563
563
|
}
|
|
564
564
|
return h;
|
|
565
565
|
}
|
|
@@ -589,9 +589,9 @@ function bt({
|
|
|
589
589
|
clear: f
|
|
590
590
|
};
|
|
591
591
|
}
|
|
592
|
-
const
|
|
592
|
+
const Mt = {
|
|
593
593
|
async updateMenuModule(e, t) {
|
|
594
|
-
const n =
|
|
594
|
+
const n = H.RequestRunner.operation(t, e.modules);
|
|
595
595
|
if (n.validateError.length > 0)
|
|
596
596
|
throw new Error(n.validateError.join(`
|
|
597
597
|
`));
|
|
@@ -626,7 +626,7 @@ function me() {
|
|
|
626
626
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
627
627
|
};
|
|
628
628
|
}
|
|
629
|
-
function
|
|
629
|
+
function wt() {
|
|
630
630
|
return {
|
|
631
631
|
restaurants: [],
|
|
632
632
|
menu: { ...me(), _rev: "" },
|
|
@@ -642,7 +642,7 @@ function Mt() {
|
|
|
642
642
|
const Pt = qe(
|
|
643
643
|
"mf-menu-store-v2",
|
|
644
644
|
() => {
|
|
645
|
-
const e =
|
|
645
|
+
const e = ze(wt()), t = se(), n = tt(), s = S(() => e.menu.modules.serveSequence ? x(e.menu.modules.serveSequence, {
|
|
646
646
|
selector: "position"
|
|
647
647
|
}) : []), r = S(() => {
|
|
648
648
|
var o;
|
|
@@ -667,7 +667,7 @@ const Pt = qe(
|
|
|
667
667
|
function g(o, i = !0) {
|
|
668
668
|
e.menu = { ...o, _rev: e.menu._rev }, i && D.push(e.menu);
|
|
669
669
|
}
|
|
670
|
-
const y =
|
|
670
|
+
const y = N(me()), f = B(!1), v = B(1);
|
|
671
671
|
async function h() {
|
|
672
672
|
var m;
|
|
673
673
|
f.value = !0;
|
|
@@ -694,21 +694,21 @@ const Pt = qe(
|
|
|
694
694
|
);
|
|
695
695
|
if (e.currentSchedulerId != null) {
|
|
696
696
|
const p = e.menu.modules.catalog.find(
|
|
697
|
-
(
|
|
697
|
+
(R) => R._id === e.currentCatalogId
|
|
698
698
|
), _ = p ? p.override.scheduler[e.currentSchedulerId] : e.menu.modules.scheduler.find(
|
|
699
|
-
(
|
|
700
|
-
), A = new Set(((_ == null ? void 0 : _.items) || []).map((
|
|
701
|
-
i.modules.item = i.modules.item.filter((
|
|
699
|
+
(R) => R._id === e.currentSchedulerId
|
|
700
|
+
), A = new Set(((_ == null ? void 0 : _.items) || []).map((R) => R._id));
|
|
701
|
+
i.modules.item = i.modules.item.filter((R) => A.has(R._id));
|
|
702
702
|
}
|
|
703
703
|
return y.value = i, f.value = !1, v.value = v.value + 1, i;
|
|
704
704
|
}
|
|
705
|
-
const
|
|
705
|
+
const M = ae.debounce(h, 200);
|
|
706
706
|
let I = null, E = null;
|
|
707
707
|
function X() {
|
|
708
|
-
E && (E(), E = null), I && I.stop(), I =
|
|
708
|
+
E && (E(), E = null), I && I.stop(), I = Be(!0), E = I.run(() => He(
|
|
709
709
|
() => [e.menu, e.currentCatalogId, e.currentSchedulerId],
|
|
710
710
|
() => {
|
|
711
|
-
f.value ||
|
|
711
|
+
f.value || M();
|
|
712
712
|
}
|
|
713
713
|
)) || null;
|
|
714
714
|
}
|
|
@@ -745,7 +745,7 @@ const Pt = qe(
|
|
|
745
745
|
o = o.filter((p) => {
|
|
746
746
|
var A;
|
|
747
747
|
const _ = (A = m == null ? void 0 : m[p._id]) == null ? void 0 : A.find(
|
|
748
|
-
(
|
|
748
|
+
(R) => !R.combinationKey
|
|
749
749
|
);
|
|
750
750
|
return (_ == null ? void 0 : _.orderFrom) !== ie.enum.NONE;
|
|
751
751
|
});
|
|
@@ -760,7 +760,7 @@ const Pt = qe(
|
|
|
760
760
|
m,
|
|
761
761
|
(p) => p.code || p.name
|
|
762
762
|
).reduce((p, _, A) => (p[_._id] = A + i[_.category || ""], p), {});
|
|
763
|
-
}), ge = S(() => oe(
|
|
763
|
+
}), ge = S(() => oe(j.value, Z.value, ee.value)), he = S(() => {
|
|
764
764
|
const o = U.value.item.addon ? [
|
|
765
765
|
{
|
|
766
766
|
_id: e.currentCatalogId ? "" : null,
|
|
@@ -774,17 +774,17 @@ const Pt = qe(
|
|
|
774
774
|
o,
|
|
775
775
|
e.menu.modules.item
|
|
776
776
|
);
|
|
777
|
-
}),
|
|
777
|
+
}), j = S(() => {
|
|
778
778
|
const o = y.value.modules.variant;
|
|
779
779
|
return x(o, { selector: "name" });
|
|
780
780
|
});
|
|
781
781
|
function pe(o = []) {
|
|
782
|
-
const i = o.map((p) =>
|
|
782
|
+
const i = o.map((p) => j.value.find((_) => _._id === p)).filter((p) => !!p);
|
|
783
783
|
return T.fullVariantCombination(i).reduce((p, _) => (p[_.combinationKey] = _.selectionName.join(" / "), p), {});
|
|
784
784
|
}
|
|
785
785
|
const _e = S(() => V(y.value.modules.group, (o) => o.name)), Se = S(() => x(y.value.modules.takeaway, { selector: "name" })), be = S(() => x(e.menu.modules.printDepartment || [], {
|
|
786
786
|
selector: "name"
|
|
787
|
-
})),
|
|
787
|
+
})), Me = S(() => x(e.menu.modules.unit, { selector: "name" })), we = S(() => x(Ge(e.menu.modules.recipe, e.menu.modules.sku), {
|
|
788
788
|
selector: "name"
|
|
789
789
|
})), Ae = S(() => e.menu.modules.cookingGuide), Ce = S(() => {
|
|
790
790
|
const o = Je(e.menu.modules.sku);
|
|
@@ -878,10 +878,10 @@ const Pt = qe(
|
|
|
878
878
|
const [i, m] = o.split("/");
|
|
879
879
|
return { systemCode: i, taxCode: m };
|
|
880
880
|
}
|
|
881
|
-
function
|
|
881
|
+
function ke(o, i, m) {
|
|
882
882
|
return (o ?? i ?? []).map((p) => W(p)).find((p) => m.some((_) => _.value === p));
|
|
883
883
|
}
|
|
884
|
-
const
|
|
884
|
+
const Re = S(() => {
|
|
885
885
|
var p;
|
|
886
886
|
const o = ["SV5", "SV10"], i = Ye.Country.getCountryFlattenTaxes(
|
|
887
887
|
se().currentCountry.value
|
|
@@ -918,7 +918,7 @@ const Pt = qe(
|
|
|
918
918
|
e.currentCategoryIds = o;
|
|
919
919
|
}, Te = (o) => {
|
|
920
920
|
e.currentRestaurantAttrParams = o;
|
|
921
|
-
},
|
|
921
|
+
}, Ke = async (o, i) => {
|
|
922
922
|
const m = Array.isArray(o) ? o : [o];
|
|
923
923
|
if (!m.length) return;
|
|
924
924
|
const p = m.map((_) => ({
|
|
@@ -928,12 +928,12 @@ const Pt = qe(
|
|
|
928
928
|
}));
|
|
929
929
|
try {
|
|
930
930
|
if (i || p.some(
|
|
931
|
-
(A) => [
|
|
931
|
+
(A) => [H.F_OPERATION_TYPE.delete, H.F_OPERATION_TYPE.deleteMany].includes(A.operation)
|
|
932
932
|
)) {
|
|
933
933
|
const A = await Xe(p, e.menu.modules);
|
|
934
934
|
if (A !== !0) throw new Error(A);
|
|
935
935
|
}
|
|
936
|
-
const _ = await
|
|
936
|
+
const _ = await Mt.updateMenuModule(e.menu, p);
|
|
937
937
|
return g(_.menu), _;
|
|
938
938
|
} catch (_) {
|
|
939
939
|
n.open({
|
|
@@ -942,7 +942,7 @@ const Pt = qe(
|
|
|
942
942
|
message: _
|
|
943
943
|
});
|
|
944
944
|
}
|
|
945
|
-
},
|
|
945
|
+
}, $e = async (o) => {
|
|
946
946
|
const i = {
|
|
947
947
|
...e.menu,
|
|
948
948
|
masterCatalogSetting: o.masterCatalogSetting,
|
|
@@ -950,10 +950,10 @@ const Pt = qe(
|
|
|
950
950
|
priceTierSettings: o.priceTierSettings
|
|
951
951
|
};
|
|
952
952
|
return g(i), i;
|
|
953
|
-
}, D = bt({ maxHistorySize: 50 }), Pe = S(() => D.canUndo.value), Fe = S(() => D.canRedo.value),
|
|
953
|
+
}, D = bt({ maxHistorySize: 50 }), Pe = S(() => D.canUndo.value), Fe = S(() => D.canRedo.value), Ne = () => {
|
|
954
954
|
const o = D.undo();
|
|
955
955
|
o && g(o, !1);
|
|
956
|
-
},
|
|
956
|
+
}, je = () => {
|
|
957
957
|
const o = D.redo();
|
|
958
958
|
o && g(o, !1);
|
|
959
959
|
}, Ue = () => {
|
|
@@ -982,16 +982,16 @@ const Pt = qe(
|
|
|
982
982
|
itemCodeMap: Ie,
|
|
983
983
|
categorizedItems: ge,
|
|
984
984
|
categorizedRawMenuItems: he,
|
|
985
|
-
variants:
|
|
985
|
+
variants: j,
|
|
986
986
|
groups: _e,
|
|
987
987
|
takeaways: Se,
|
|
988
988
|
printDepartments: be,
|
|
989
|
-
units:
|
|
990
|
-
recipes:
|
|
989
|
+
units: Me,
|
|
990
|
+
recipes: we,
|
|
991
991
|
cookingGuide: Ae,
|
|
992
992
|
skus: Ce,
|
|
993
993
|
rules: U,
|
|
994
|
-
taxSetting:
|
|
994
|
+
taxSetting: Re,
|
|
995
995
|
// Action
|
|
996
996
|
setMenu: g,
|
|
997
997
|
readMenu: xe,
|
|
@@ -1000,22 +1000,22 @@ const Pt = qe(
|
|
|
1000
1000
|
selectScheduler: De,
|
|
1001
1001
|
selectCategory: Ve,
|
|
1002
1002
|
setRestaurantAttrParams: Te,
|
|
1003
|
-
updateMenu:
|
|
1004
|
-
updateMenuSetting:
|
|
1003
|
+
updateMenu: Ke,
|
|
1004
|
+
updateMenuSetting: $e,
|
|
1005
1005
|
computeMergedMenu: h,
|
|
1006
1006
|
// helper
|
|
1007
1007
|
encodeTax: W,
|
|
1008
1008
|
decodeTax: Ee,
|
|
1009
|
-
getSelectedTax:
|
|
1009
|
+
getSelectedTax: ke,
|
|
1010
1010
|
mapVariant: pe,
|
|
1011
1011
|
// history
|
|
1012
1012
|
canUndoHistory: Pe,
|
|
1013
1013
|
canRedoHistory: Fe,
|
|
1014
|
-
undoHistory:
|
|
1015
|
-
redoHistory:
|
|
1014
|
+
undoHistory: Ne,
|
|
1015
|
+
redoHistory: je,
|
|
1016
1016
|
// cleanup
|
|
1017
1017
|
$dispose: () => {
|
|
1018
|
-
|
|
1018
|
+
M.cancel(), E && (E(), E = null), I && (I.stop(), I = null), Ue();
|
|
1019
1019
|
},
|
|
1020
1020
|
$reinitialize: () => {
|
|
1021
1021
|
X();
|
|
@@ -1024,8 +1024,8 @@ const Pt = qe(
|
|
|
1024
1024
|
}
|
|
1025
1025
|
);
|
|
1026
1026
|
export {
|
|
1027
|
-
|
|
1028
|
-
|
|
1027
|
+
Kt as a,
|
|
1028
|
+
$t as f,
|
|
1029
1029
|
Tt as g,
|
|
1030
1030
|
nt as i,
|
|
1031
1031
|
Vt as m,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as q, ref as V, h as S, computed as N, resolveComponent as I, createBlock as X, openBlock as w, unref as l, withCtx as x, createElementVNode as k, createVNode as v, watch as Z, createElementBlock as L, Fragment as M, renderSlot as ee, renderList as H, toDisplayString as $, createCommentVNode as ae, getCurrentInstance as te, render as ne } from "vue";
|
|
2
|
-
import { u as Y, j as oe, b as le, h as B, i as K } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { u as Y, j as oe, b as le, h as B, i as K } from "./index.vue_vue_type_script_setup_true_lang-BMh4uaSK.js";
|
|
3
3
|
import { useI18n as j } from "@feedmepos/mf-common";
|
|
4
4
|
import { components as A, FmButtonVariant as re, FmButtonColorThemeVariant as R, useSnackbar as ie } from "@feedmepos/ui-library";
|
|
5
|
-
import { _ as J, u as se } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _ as J, u as se } from "./RuleView.vue_vue_type_script_setup_true_lang-DKPBnekp.js";
|
|
6
6
|
import { c as de } from "./object-DVUNCr7w.js";
|
|
7
|
-
import { _ as ue } from "./app-
|
|
8
|
-
import { L as ce } from "./LinkProductSideSheet-
|
|
7
|
+
import { _ as ue } from "./app-C2JspNB6.js";
|
|
8
|
+
import { L as ce } from "./LinkProductSideSheet-t3GdVkkM.js";
|
|
9
9
|
import { u as me } from "./search-BAPEUu1R.js";
|
|
10
|
-
import { _ as pe } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-
|
|
10
|
+
import { _ as pe } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-C6Cp-fU6.js";
|
|
11
11
|
import { c as ge } from "./check-C9mY6LiX.js";
|
|
12
12
|
import { g as G } from "./translation-fNx6yEpy.js";
|
|
13
13
|
import { c as _e } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
@@ -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, b as M } from "./index.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { u as k, b as M } from "./index.vue_vue_type_script_setup_true_lang-BMh4uaSK.js";
|
|
5
5
|
const b = /* @__PURE__ */ d({
|
|
6
6
|
__name: "AddPriceGroupDialog",
|
|
7
7
|
setup(s) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as I, watch as P, ref as E, computed as w, resolveComponent as _, createElementBlock as h, openBlock as F, Fragment as M, createVNode as f, unref as g, withCtx as b, createElementVNode as O, renderList as q, toDisplayString as S } from "vue";
|
|
2
|
-
import { h as v, i as C, u as Y } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { h as v, i as C, u as Y } from "./index.vue_vue_type_script_setup_true_lang-BMh4uaSK.js";
|
|
3
3
|
import { useI18n as D } from "@feedmepos/mf-common";
|
|
4
4
|
import { useDialogChild as k } from "@feedmepos/ui-library";
|
|
5
|
-
import { u as R } from "./menuV2
|
|
6
|
-
import { _ as $ } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { u as R } from "./menuV2-Bnf7F2oE.js";
|
|
6
|
+
import { _ as $ } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-C6Cp-fU6.js";
|
|
7
7
|
import { g as N } from "./translation-fNx6yEpy.js";
|
|
8
8
|
const B = { class: "py-12 px-16 space-y-4" }, U = /* @__PURE__ */ I({
|
|
9
9
|
__name: "AddSubcategoryDialogContentComponent",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as ce, computed as T, resolveComponent as p, createElementBlock as r, openBlock as s, createVNode as t, createCommentVNode as k, unref as a, toDisplayString as D, createElementVNode as y, withCtx as m, Fragment as $, renderList as N, createBlock as Y, ref as L, Transition as de, createTextVNode as he } from "vue";
|
|
2
|
-
import { u as ge, l as Ve } from "./discardConfirm-
|
|
3
|
-
import { f as w, B as U, u as ke, F as Fe, C as q, h as ie, i as re, S as me } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { u as ge, l as Ve } from "./discardConfirm-CuPIlVDv.js";
|
|
3
|
+
import { f as w, B as U, u as ke, F as Fe, C as q, h as ie, i as re, S as me } from "./index.vue_vue_type_script_setup_true_lang-BMh4uaSK.js";
|
|
4
4
|
import { useI18n as pe, useAppLocale as be, prefersHour12 as xe } from "@feedmepos/mf-common";
|
|
5
5
|
import { components as Ce } from "@feedmepos/ui-library";
|
|
6
6
|
import { _ as Se } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
7
|
-
import { _ as se } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { u as we } from "./menu-
|
|
9
|
-
import { L as Pe } from "./LinkProductSideSheet-
|
|
7
|
+
import { _ as se } from "./RuleView.vue_vue_type_script_setup_true_lang-DKPBnekp.js";
|
|
8
|
+
import { u as we } from "./menu-BaTAUzXN.js";
|
|
9
|
+
import { L as Pe } from "./LinkProductSideSheet-t3GdVkkM.js";
|
|
10
10
|
const Ee = { class: "space-y-8" }, Ue = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "space-y-16"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import "./discardConfirm-
|
|
1
|
+
import { u as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-D9CnWzhf.js";
|
|
2
|
+
import "./discardConfirm-CuPIlVDv.js";
|
|
3
3
|
var Z = {
|
|
4
4
|
defaultAmount: 0,
|
|
5
5
|
defaultCurrency: "USD",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineStore as W } from "pinia";
|
|
2
2
|
import { defineComponent as M, computed as x, ref as A, watch as S, resolveComponent as V, createBlock as J, openBlock as F, withCtx as w, createVNode as m, createElementVNode as f, normalizeClass as Q, createElementBlock as k, toDisplayString as C, unref as l, Fragment as O, renderSlot as X, renderList as Z, getCurrentInstance as ee } from "vue";
|
|
3
|
-
import { G as P, H as te, D as B, f as E, j as $, b as j, m as h, E as ne, h as T, i as D, u as oe } from "./index.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { G as P, H as te, D as B, f as E, j as $, b as j, m as h, E as ne, h as T, i as D, u as oe } from "./index.vue_vue_type_script_setup_true_lang-BMh4uaSK.js";
|
|
4
4
|
import { useI18n as q } from "@feedmepos/mf-common";
|
|
5
5
|
import { useSnackbar as I, components as ae, useDialog as le, FmButtonVariant as ue } from "@feedmepos/ui-library";
|
|
6
|
-
import { u as ie, l as se } from "./discardConfirm-
|
|
6
|
+
import { u as ie, l as se } from "./discardConfirm-CuPIlVDv.js";
|
|
7
7
|
import { c as re } from "./check-C9mY6LiX.js";
|
|
8
8
|
import "./RuleConditionSelector.vue_vue_type_style_index_0_lang-CK8z7qA8.js";
|
|
9
|
-
import "./menuV2
|
|
9
|
+
import "./menuV2-Bnf7F2oE.js";
|
|
10
10
|
import "./app-5fxKLAzS.js";
|
|
11
11
|
/* empty css */
|
|
12
12
|
import { c as me } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|