@feedmepos/mf-menu 0.19.4 → 0.19.6
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/{ApplyProduct.vue_vue_type_script_setup_true_lang-D5I3t4Pm.js → ApplyProduct.vue_vue_type_script_setup_true_lang-D8SfpFaN.js} +2 -2
- package/dist/{ApplyProducts.vue_vue_type_script_setup_true_lang-CMvf6CSo.js → ApplyProducts.vue_vue_type_script_setup_true_lang-BOT4NzDW.js} +2 -2
- package/dist/{Catalog-DrSJfj0K.js → Catalog-BrPTH01U.js} +3 -3
- package/dist/{Category-KxWEoj0I.js → Category-ZxkVHoD7.js} +6 -6
- package/dist/{CookingGuide-FyGgMq4P.js → CookingGuide-BiwlYjrs.js} +3 -3
- package/dist/{Group-CRSVns9a.js → Group-BGYDLhGi.js} +4 -4
- package/dist/{Group-RZKjVrQY.js → Group-LSUu0e7W.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-DqibZsLT.js → Group.vue_vue_type_script_setup_true_lang-C05cMUqi.js} +9 -8
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-qFxjy-Pt.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Bm9OzejE.js} +2 -2
- package/dist/{Ingredient-BL7MCtow.js → Ingredient-CP7v0j6k.js} +4 -4
- package/dist/{LinkProductSideSheet-BDmtq8WR.js → LinkProductSideSheet-u1N3b6jK.js} +2 -2
- package/dist/{PrintRoute-CIhp-7sw.js → PrintRoute-T9L8nZ9B.js} +3 -3
- package/dist/{Product-CmattcQj.js → Product-D38RLKA1.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-BVABDLxO.js → Product.vue_vue_type_script_setup_true_lang-CgRUA6Qj.js} +11 -11
- package/dist/{Products-DYldpJfP.js → Products-CcH6QSUD.js} +8 -8
- package/dist/{Publish-SRbEAtN4.js → Publish-C3Q8DBPV.js} +2 -2
- package/dist/{Recipe-BdajaxgI.js → Recipe-D5aneNE6.js} +4 -4
- package/dist/{Scheduler-6vKVn_NF.js → Scheduler-Dg89ueoQ.js} +2 -2
- package/dist/{SchedulerSelector.vue_vue_type_script_setup_true_lang-7ssjYqkD.js → SchedulerSelector.vue_vue_type_script_setup_true_lang-_V2JHz_Y.js} +1 -1
- package/dist/ServingSequence-TSAwQu7K.js +4 -0
- package/dist/{Setting-D6XnUxNl.js → Setting-DrTl8bmQ.js} +1 -1
- package/dist/{Setting.vue_vue_type_script_setup_true_lang-DtFEaGGH.js → Setting.vue_vue_type_script_setup_true_lang-DOUbN7DS.js} +3 -3
- package/dist/{Takeaway-BikYvyEQ.js → Takeaway-DPUJCGTe.js} +4 -4
- package/dist/{Takeaway-B9anZXwZ.js → Takeaway-DZ4Y73A3.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-NFPBD6Fz.js → Takeaway.vue_vue_type_script_setup_true_lang-DrANt9Sm.js} +4 -4
- package/dist/{TaxSetting-C9boVU5D.js → TaxSetting-Da7XV_y8.js} +4 -4
- package/dist/{Unit-C4f45gYW.js → Unit-H_RZ1rwW.js} +2 -2
- package/dist/{Variant-CB-X2fEM.js → Variant-Dx1SBQpk.js} +2 -2
- package/dist/{_id_-BgQXTT0y.js → _id_-CQK3KeRA.js} +6 -6
- package/dist/{app-oYSs-pd6.js → app-8pTTxtUh.js} +584 -584
- package/dist/app.js +2 -2
- package/dist/assets/{linked-status-yCeFxA9l.js → linked-status-BEvHkLGR.js} +7 -7
- package/dist/assets/{validate-menu-B0r-AG5J.js → validate-menu-Ck-kLSND.js} +3 -3
- package/dist/{catalog-BowSAlAz.js → catalog-Bwg-DCUe.js} +432 -432
- package/dist/{catalog-DWTFJ-XO.js → catalog-GP86KvHF.js} +1 -1
- package/dist/{category-WGLqnFd1.js → category-C27vnRQy.js} +1 -1
- package/dist/{currency-CsuG4LkN.js → currency-D1RRZf8R.js} +1 -1
- package/dist/{index-DCYqVoB-.js → index-B3yYbVsk.js} +3 -3
- package/dist/{index-HilfxOC6.js → index-WvNIP0QQ.js} +2 -2
- package/dist/{item-DM3R7WsF.js → item-BN4eJTAF.js} +543 -539
- package/dist/{lodash-CLxIdrX5.js → lodash-D-4Q-_64.js} +1 -1
- package/dist/{menu-C3eh7uuj.js → menu-CSvWN8Ek.js} +1 -1
- package/dist/{object-DbjMvqC0.js → object-Brn35PSS.js} +1 -1
- package/dist/{scheduler-GyLH8lum.js → scheduler-DjArj24l.js} +4 -4
- package/dist/{takeaway-C3XibS8E.js → takeaway-D0gAGqAv.js} +4 -4
- package/dist/{toExcel-D5ymc0w0.js → toExcel-BrUH4lx9.js} +2 -2
- package/dist/{unit-BLHl81L1.js → unit-CRt7ZUjS.js} +2 -2
- package/package.json +1 -1
- package/dist/ServingSequence-Bwotq1_G.js +0 -4
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { defineStore as Vn } from "pinia";
|
|
2
|
-
import { b as B, h as be, G as
|
|
2
|
+
import { b as B, h as be, G as bi, H as yi, I as _i, d as ae, m as ye, c as _e, J as Nn, u as me, K as Sn, L as wi, M as Ue, N as lt, a as Ye, i as He, O as en, P as Et, g as ut, e as Lt, n as Ci, y as Si, Q as Ri, z as ki, F as Ai, l as Mi, S as Rn, T as xi } from "./app-8pTTxtUh.js";
|
|
3
3
|
import { useDialog as xe, useSnackbar as Be, components as Me, useDialogChild as tn, FmButtonVariant as Le, FmButtonColorThemeVariant as $e, useBreakpoints as Bn } from "@feedmepos/ui-library";
|
|
4
|
-
import { C as De } from "./catalog-
|
|
5
|
-
import { openBlock as P, createElementBlock as Z, createElementVNode as D, defineComponent as se, computed as T, resolveComponent as L, createVNode as
|
|
4
|
+
import { C as De } from "./catalog-GP86KvHF.js";
|
|
5
|
+
import { openBlock as P, createElementBlock as Z, createElementVNode as D, defineComponent as se, computed as T, resolveComponent as L, createVNode as A, unref as h, createBlock as W, renderSlot as pe, withCtx as N, Fragment as Re, renderList as Ge, resolveDynamicComponent as _t, withDirectives as Xe, vShow as Ct, mergeProps as Ln, withModifiers as St, createCommentVNode as ee, ref as X, createTextVNode as wt, toDisplayString as le, normalizeClass as Fe, onMounted as gt, resolveDirective as Gt, h as ce, toRaw as Gn, watch as Ce, Transition as Ii, onBeforeUnmount as Oi, normalizeProps as zi, guardReactiveProps as Ei, normalizeStyle as Fi, nextTick as Pi, getCurrentInstance as Di, render as Ti } from "vue";
|
|
6
6
|
import { useI18n as ue, useCoreStore as Rt } from "@feedmepos/mf-common";
|
|
7
|
-
import { u as
|
|
8
|
-
import { a as Wn, _ as
|
|
9
|
-
import { _ as We, a as
|
|
7
|
+
import { u as Ui } from "./category-C27vnRQy.js";
|
|
8
|
+
import { a as Wn, _ as kn } from "./InfoBasic.vue_vue_type_script_setup_true_lang-DxQBDu16.js";
|
|
9
|
+
import { _ as We, a as $i } from "./FormSection.vue_vue_type_script_setup_true_lang-BWJUD8NZ.js";
|
|
10
10
|
import { _ as Qe } from "./FormItem.vue_vue_type_script_setup_true_lang-DKsxEK-8.js";
|
|
11
|
-
import { f as at } from "./currency-
|
|
12
|
-
import { _ as Je, T as
|
|
11
|
+
import { f as at } from "./currency-D1RRZf8R.js";
|
|
12
|
+
import { _ as Je, T as Vi, l as Wt } from "./takeaway-D0gAGqAv.js";
|
|
13
13
|
import { V as Kn } from "./vuedraggable-WU01qJgi.js";
|
|
14
|
-
import { l as Ne, u as
|
|
14
|
+
import { l as Ne, u as Ni } from "./lodash-D-4Q-_64.js";
|
|
15
15
|
import "vue-router";
|
|
16
|
-
import { V as
|
|
17
|
-
import { s as Kt, F as
|
|
18
|
-
import { L as
|
|
19
|
-
import { c as
|
|
20
|
-
import { _ as
|
|
21
|
-
const
|
|
16
|
+
import { V as An } from "./index-B3yYbVsk.js";
|
|
17
|
+
import { s as Kt, F as Bi } from "./object-Brn35PSS.js";
|
|
18
|
+
import { L as Li } from "./LinkProductSideSheet-u1N3b6jK.js";
|
|
19
|
+
import { c as Gi } from "./string-DpfFixWH.js";
|
|
20
|
+
import { _ as Wi } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-D8SfpFaN.js";
|
|
21
|
+
const Ki = {
|
|
22
22
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23
23
|
width: "24",
|
|
24
24
|
height: "24",
|
|
25
25
|
fill: "none"
|
|
26
26
|
};
|
|
27
|
-
function
|
|
28
|
-
return P(), Z("svg",
|
|
27
|
+
function ji(e, n) {
|
|
28
|
+
return P(), Z("svg", Ki, n[0] || (n[0] = [
|
|
29
29
|
D("g", {
|
|
30
30
|
stroke: "#1C1C1E",
|
|
31
31
|
"stroke-linecap": "round",
|
|
@@ -36,14 +36,14 @@ function Ki(e, n) {
|
|
|
36
36
|
], -1)
|
|
37
37
|
]));
|
|
38
38
|
}
|
|
39
|
-
const
|
|
39
|
+
const Yi = { render: ji }, Hi = {
|
|
40
40
|
xmlns: "http://www.w3.org/2000/svg",
|
|
41
41
|
width: "24",
|
|
42
42
|
height: "24",
|
|
43
43
|
fill: "none"
|
|
44
44
|
};
|
|
45
|
-
function
|
|
46
|
-
return P(), Z("svg",
|
|
45
|
+
function Xi(e, n) {
|
|
46
|
+
return P(), Z("svg", Hi, n[0] || (n[0] = [
|
|
47
47
|
D("path", {
|
|
48
48
|
fill: "#1C1C1E",
|
|
49
49
|
d: "M7.6 7.6c.57-.658.9-2.1.9-2.1s.314 1.374.857 2c.572.66 2.143 1 2.143 1s-1.57.198-2.143.857C8.814 9.984 8.5 11.5 8.5 11.5s-.18-1.311-.75-1.91C7.149 8.962 5.5 8.5 5.5 8.5s1.5-.207 2.1-.9M12.2 12.2C13.342 10.885 14 8 14 8s.627 2.747 1.714 4C16.86 13.32 20 14 20 14s-3.141.395-4.286 1.714C14.627 16.967 14 20 14 20s-.358-2.622-1.5-3.818C11.298 14.922 8 14 8 14s2.998-.415 4.2-1.8"
|
|
@@ -57,7 +57,7 @@ function Hi(e, n) {
|
|
|
57
57
|
}, null, -1)
|
|
58
58
|
]));
|
|
59
59
|
}
|
|
60
|
-
const
|
|
60
|
+
const qi = { render: Xi };
|
|
61
61
|
class bt {
|
|
62
62
|
constructor(n, t, i, a) {
|
|
63
63
|
this.scheduler = n, this.menuStore = t, this.updateMenu = i, this.dialog = a;
|
|
@@ -242,7 +242,7 @@ class bt {
|
|
|
242
242
|
const a = n.reduce((r, l) => {
|
|
243
243
|
const s = t.items.filter((u) => u._id == l) ?? [];
|
|
244
244
|
return r = r.concat(
|
|
245
|
-
|
|
245
|
+
bi(l, s, (u) => ({
|
|
246
246
|
...u,
|
|
247
247
|
orderFrom: null
|
|
248
248
|
}))
|
|
@@ -255,10 +255,10 @@ class bt {
|
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
getAvailableItemForLink() {
|
|
258
|
-
const n =
|
|
258
|
+
const n = yi(
|
|
259
259
|
this.menuStore.variants,
|
|
260
260
|
this.menuStore.categories,
|
|
261
|
-
|
|
261
|
+
_i(this.menuStore.state.menu.modules.item, (a) => a.code || a.name)
|
|
262
262
|
), t = new Set(
|
|
263
263
|
this.menuStore.currentCatalog ? De.getItemAvailable(this.menuStore.currentCatalog) : this.menuStore.state.menu.modules.item.map((a) => a._id)
|
|
264
264
|
);
|
|
@@ -268,7 +268,7 @@ class bt {
|
|
|
268
268
|
})).filter((a) => a.items.length > 0);
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
function
|
|
271
|
+
function kt(e, n) {
|
|
272
272
|
for (const t of n) {
|
|
273
273
|
const i = e.find((a) => a._id === t._id);
|
|
274
274
|
if (i != null && i.isDynamicAddon || t.isDynamicAddon) return B.F_ADDON_GROUP_TYPE.enum.DYNAMIC;
|
|
@@ -276,7 +276,7 @@ function At(e, n) {
|
|
|
276
276
|
}
|
|
277
277
|
return B.F_ADDON_GROUP_TYPE.enum.NORMAL;
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function Zi(e) {
|
|
280
280
|
return [...new Set(e.map((t) => t._id))].reduce((t, i) => {
|
|
281
281
|
const a = e.filter((l) => l._id === i), { base: o, variants: r } = a.reduce(
|
|
282
282
|
(l, s) => {
|
|
@@ -401,7 +401,7 @@ class Yn {
|
|
|
401
401
|
const i = this.getFallbackPrices(n), a = this.menuStore.state.menu.modules.item, o = this.menuStore.state.menu.modules.group, r = this.menuStore.items;
|
|
402
402
|
function l(s, u) {
|
|
403
403
|
const c = s.items.reduce((p, d) => {
|
|
404
|
-
var b, F,
|
|
404
|
+
var b, F, k, y;
|
|
405
405
|
const g = a.find((M) => d._id === M._id);
|
|
406
406
|
if (!g && t) return p;
|
|
407
407
|
const w = d.combinationKey ? {
|
|
@@ -409,7 +409,7 @@ class Yn {
|
|
|
409
409
|
(M) => M.combinationKey === d.combinationKey
|
|
410
410
|
),
|
|
411
411
|
name: Nn(me().variants, ((F = g == null ? void 0 : g.variant) == null ? void 0 : F.variantGroupIds) || [])[d.combinationKey]
|
|
412
|
-
} : g, _ = (
|
|
412
|
+
} : g, _ = (k = o.find((M) => M._id === s._id)) == null ? void 0 : k.items.find((M) => M._id === d._id && M.combinationKey === d.combinationKey), C = !t && !d.combinationKey, E = (y = u.find(
|
|
413
413
|
(M) => M._id == d._id && M.combinationKey == d.combinationKey
|
|
414
414
|
)) == null ? void 0 : y.price, I = d.name ?? (_ == null ? void 0 : _.name) ?? (w == null ? void 0 : w.name) ?? "", S = {
|
|
415
415
|
...d,
|
|
@@ -422,11 +422,11 @@ class Yn {
|
|
|
422
422
|
fallbackOrder: w == null ? void 0 : w.orderFrom
|
|
423
423
|
};
|
|
424
424
|
return [...p, S];
|
|
425
|
-
}, []), m =
|
|
425
|
+
}, []), m = kt(a, s.items);
|
|
426
426
|
return {
|
|
427
427
|
...s,
|
|
428
428
|
type: m,
|
|
429
|
-
items:
|
|
429
|
+
items: Zi(c),
|
|
430
430
|
itemsLinked: r.filter((p) => p.groups.some(({ _id: d }) => d === s._id)).map((p) => p._id)
|
|
431
431
|
};
|
|
432
432
|
}
|
|
@@ -485,7 +485,7 @@ class Yn {
|
|
|
485
485
|
const w = i(g.groups ?? [], c);
|
|
486
486
|
return { ...g, groups: w };
|
|
487
487
|
});
|
|
488
|
-
return
|
|
488
|
+
return vi(s, {
|
|
489
489
|
...u,
|
|
490
490
|
groups: m,
|
|
491
491
|
variant: u.variant ? {
|
|
@@ -511,14 +511,14 @@ class Yn {
|
|
|
511
511
|
return !!this.menuStore.state.currentCatalogId || !!this.menuStore.state.currentSchedulerId;
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
|
-
const
|
|
515
|
-
function
|
|
514
|
+
const Ji = "/assets/linked-status-BEvHkLGR.js";
|
|
515
|
+
function Qi(e) {
|
|
516
516
|
var i;
|
|
517
517
|
const n = ae(e), t = (i = n.variant) == null ? void 0 : i.variantCombinations;
|
|
518
518
|
return delete n.variant, delete n.thumbnail, [n, ...t || []];
|
|
519
519
|
}
|
|
520
|
-
function
|
|
521
|
-
const a = ae(n), o = t ? a.modules.catalog.find((p) => p._id === t) : null, r = i ? a.modules.scheduler.find((p) => p._id === i) : null, l = o ? ae(o) : void 0, s = t ? a.modules.catalog.filter((p) => p._id !== t) : [], u = r ? ae(r) : void 0, c = e.reduce((p, d) => (p[d._id] =
|
|
520
|
+
function eo(e, n, t, i) {
|
|
521
|
+
const a = ae(n), o = t ? a.modules.catalog.find((p) => p._id === t) : null, r = i ? a.modules.scheduler.find((p) => p._id === i) : null, l = o ? ae(o) : void 0, s = t ? a.modules.catalog.filter((p) => p._id !== t) : [], u = r ? ae(r) : void 0, c = e.reduce((p, d) => (p[d._id] = Qi(d), p), {});
|
|
522
522
|
function m(p = []) {
|
|
523
523
|
const d = e.map((g) => g._id);
|
|
524
524
|
return [
|
|
@@ -583,7 +583,7 @@ function it(e, n, t) {
|
|
|
583
583
|
groups: a
|
|
584
584
|
};
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function to(e, n) {
|
|
587
587
|
const t = e.groups.map((o) => {
|
|
588
588
|
const r = n.modules.group.find((s) => s._id === o._id), l = ((r == null ? void 0 : r.items) || []).map((s) => {
|
|
589
589
|
var m;
|
|
@@ -626,7 +626,7 @@ function jt(e, n) {
|
|
|
626
626
|
}), a;
|
|
627
627
|
}), t;
|
|
628
628
|
}
|
|
629
|
-
function
|
|
629
|
+
function no(e, n) {
|
|
630
630
|
const t = e.items[n._id];
|
|
631
631
|
n.variant && (n.variant = {
|
|
632
632
|
...n.variant,
|
|
@@ -657,10 +657,10 @@ function to(e, n) {
|
|
|
657
657
|
price: (i == null ? void 0 : i.price) || n.price
|
|
658
658
|
};
|
|
659
659
|
}
|
|
660
|
-
async function
|
|
661
|
-
const r = ae(t), l = o ?
|
|
660
|
+
async function io(e, n, t, i, a, o = !0) {
|
|
661
|
+
const r = ae(t), l = o ? eo(n, r, i, a) : r, s = n.reduce((m, p) => (m[p._id] = l.modules.item.find((d) => d._id === p._id), m), {}), u = n.reduce((m, p) => {
|
|
662
662
|
const d = p._id;
|
|
663
|
-
return m[d] =
|
|
663
|
+
return m[d] = to(s[d], e), m;
|
|
664
664
|
}, {}), c = ye.getFallbackPrices({
|
|
665
665
|
rawMenu: l,
|
|
666
666
|
items: u,
|
|
@@ -670,7 +670,7 @@ async function no(e, n, t, i, a, o = !0) {
|
|
|
670
670
|
return n.map((m) => {
|
|
671
671
|
const p = m._id, d = s[p];
|
|
672
672
|
return {
|
|
673
|
-
...
|
|
673
|
+
...no(c, d),
|
|
674
674
|
category: i || a ? d == null ? void 0 : d.category : null
|
|
675
675
|
};
|
|
676
676
|
});
|
|
@@ -689,12 +689,12 @@ function Hn(e, n) {
|
|
|
689
689
|
}, [])) || []).join(" / ");
|
|
690
690
|
}
|
|
691
691
|
const Ft = /* @__PURE__ */ new Map();
|
|
692
|
-
async function
|
|
692
|
+
async function oo(e, n) {
|
|
693
693
|
const t = `${e._id}-${e.updatedAt}-${n}`;
|
|
694
694
|
if (Ft.has(t))
|
|
695
695
|
return Ft.get(t);
|
|
696
|
-
const i = await
|
|
697
|
-
|
|
696
|
+
const i = await wi(
|
|
697
|
+
Ji,
|
|
698
698
|
JSON.stringify({
|
|
699
699
|
menu: e,
|
|
700
700
|
itemId: n
|
|
@@ -781,7 +781,7 @@ const on = /* @__PURE__ */ se({
|
|
|
781
781
|
return (u, c) => {
|
|
782
782
|
const m = L("fm-select");
|
|
783
783
|
return P(), Z("div", null, [
|
|
784
|
-
|
|
784
|
+
A(m, {
|
|
785
785
|
disabled: e.disable,
|
|
786
786
|
items: r.value,
|
|
787
787
|
label: e.label ?? h(i)("menu.common.labels.order_from"),
|
|
@@ -795,7 +795,7 @@ const on = /* @__PURE__ */ se({
|
|
|
795
795
|
};
|
|
796
796
|
}
|
|
797
797
|
});
|
|
798
|
-
var
|
|
798
|
+
var ao = function(e, n) {
|
|
799
799
|
return Object.assign(document.createElement("canvas"), { width: e, height: n });
|
|
800
800
|
};
|
|
801
801
|
function Mn(e, n) {
|
|
@@ -812,17 +812,17 @@ function ie(e) {
|
|
|
812
812
|
for (var n = 1; n < arguments.length; n++) {
|
|
813
813
|
var t = arguments[n] != null ? arguments[n] : {};
|
|
814
814
|
n % 2 ? Mn(Object(t), !0).forEach(function(i) {
|
|
815
|
-
|
|
815
|
+
ke(e, i, t[i]);
|
|
816
816
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Mn(Object(t)).forEach(function(i) {
|
|
817
817
|
Object.defineProperty(e, i, Object.getOwnPropertyDescriptor(t, i));
|
|
818
818
|
});
|
|
819
819
|
}
|
|
820
820
|
return e;
|
|
821
821
|
}
|
|
822
|
-
function
|
|
822
|
+
function ke(e, n, t) {
|
|
823
823
|
return n in e ? Object.defineProperty(e, n, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = t, e;
|
|
824
824
|
}
|
|
825
|
-
function
|
|
825
|
+
function ro(e, n) {
|
|
826
826
|
if (e == null) return {};
|
|
827
827
|
var t, i, a = function(r, l) {
|
|
828
828
|
if (r == null) return {};
|
|
@@ -858,7 +858,7 @@ function Pt(e, n) {
|
|
|
858
858
|
for (var t = 0, i = new Array(n); t < n; t++) i[t] = e[t];
|
|
859
859
|
return i;
|
|
860
860
|
}
|
|
861
|
-
var xn,
|
|
861
|
+
var xn, so, mt, de = (xn = function(e) {
|
|
862
862
|
/*!
|
|
863
863
|
Copyright (c) 2018 Jed Watson.
|
|
864
864
|
Licensed under the MIT License (MIT), see
|
|
@@ -885,7 +885,7 @@ var xn, ro, mt, de = (xn = function(e) {
|
|
|
885
885
|
}
|
|
886
886
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
887
887
|
})();
|
|
888
|
-
}, xn(mt = { path:
|
|
888
|
+
}, xn(mt = { path: so, exports: {}, require: function(e, n) {
|
|
889
889
|
return function() {
|
|
890
890
|
throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
|
|
891
891
|
}(n == null && mt.path);
|
|
@@ -984,11 +984,11 @@ function Jn(e, n) {
|
|
|
984
984
|
}
|
|
985
985
|
var ot = function(e, n) {
|
|
986
986
|
e === void 0 && (e = {}), n === void 0 && (n = {}), this.type = "manipulateImage", this.move = e, this.scale = n;
|
|
987
|
-
},
|
|
987
|
+
}, lo = function(e, n) {
|
|
988
988
|
n === void 0 && (n = {}), this.type = "resize", this.directions = e, this.params = n;
|
|
989
989
|
}, an = function(e) {
|
|
990
990
|
this.type = "move", this.directions = e;
|
|
991
|
-
},
|
|
991
|
+
}, uo = function() {
|
|
992
992
|
function e(n, t, i, a, o) {
|
|
993
993
|
this.type = "drag", this.nativeEvent = n, this.position = i, this.previousPosition = a, this.element = t, this.anchor = o;
|
|
994
994
|
}
|
|
@@ -1036,7 +1036,7 @@ var ot = function(e, n) {
|
|
|
1036
1036
|
if (this.touches.length) {
|
|
1037
1037
|
if (this.touches.length === 1 && t.length === 1) {
|
|
1038
1038
|
var i = this.$refs.draggable;
|
|
1039
|
-
this.$emit("drag", new
|
|
1039
|
+
this.$emit("drag", new uo(e, i, { left: t[0].clientX, top: t[0].clientY }, { left: this.touches[0].clientX, top: this.touches[0].clientY }, this.anchor));
|
|
1040
1040
|
}
|
|
1041
1041
|
this.touches = t;
|
|
1042
1042
|
}
|
|
@@ -1058,13 +1058,13 @@ var Dt = Ie("vue-handler-wrapper"), Qn = { name: "HandlerWrapper", components: {
|
|
|
1058
1058
|
var e;
|
|
1059
1059
|
if (this.horizontalPosition || this.verticalPosition) {
|
|
1060
1060
|
var n, t = Xn(this.horizontalPosition, this.verticalPosition);
|
|
1061
|
-
e = Dt((
|
|
1061
|
+
e = Dt((ke(n = {}, t.classname, !0), ke(n, "disabled", this.disabled), n));
|
|
1062
1062
|
} else e = Dt({ disabled: this.disabled });
|
|
1063
1063
|
return { root: e, draggable: Dt("draggable") };
|
|
1064
1064
|
} }, emits: ["leave", "enter", "drag", "drag-end"] };
|
|
1065
1065
|
Qn.render = function(e, n, t, i, a, o) {
|
|
1066
1066
|
var r = L("DraggableElement");
|
|
1067
|
-
return P(), W("div", { class: o.classes.root }, [
|
|
1067
|
+
return P(), W("div", { class: o.classes.root }, [A(r, { class: o.classes.draggable, onDrag: n[1] || (n[1] = function(l) {
|
|
1068
1068
|
return e.$emit("drag", l);
|
|
1069
1069
|
}), onDragEnd: n[2] || (n[2] = function(l) {
|
|
1070
1070
|
return e.$emit("drag-end");
|
|
@@ -1076,9 +1076,9 @@ Qn.render = function(e, n, t, i, a, o) {
|
|
|
1076
1076
|
return [pe(e.$slots, "default")];
|
|
1077
1077
|
}), _: 3 }, 8, ["class"])], 2);
|
|
1078
1078
|
};
|
|
1079
|
-
var
|
|
1079
|
+
var co = Ie("vue-line-wrapper"), ei = { name: "LineWrapper", components: { DraggableElement: rn }, props: { position: { type: String, required: !0 }, disabled: { type: Boolean, default: !1 } }, computed: { classname: function() {
|
|
1080
1080
|
var e;
|
|
1081
|
-
return
|
|
1081
|
+
return co((ke(e = {}, this.position, !0), ke(e, "disabled", this.disabled), e));
|
|
1082
1082
|
} }, emits: ["leave", "enter", "drag", "drag-end"] };
|
|
1083
1083
|
ei.render = function(e, n, t, i, a, o) {
|
|
1084
1084
|
var r = L("DraggableElement");
|
|
@@ -1094,7 +1094,7 @@ ei.render = function(e, n, t, i, a, o) {
|
|
|
1094
1094
|
return [pe(e.$slots, "default")];
|
|
1095
1095
|
}), _: 3 }, 8, ["class"]);
|
|
1096
1096
|
};
|
|
1097
|
-
var ze = ["left", "right", "top", "bottom"],
|
|
1097
|
+
var ze = ["left", "right", "top", "bottom"], mo = ["left", "right"], po = ["top", "bottom"], ho = ["left", "top"], fo = ["fill-area", "fit-area", "stencil", "none"], zn = { left: 0, top: 0, width: 0, height: 0 };
|
|
1098
1098
|
function En(e, n, t) {
|
|
1099
1099
|
return !(t = t || ["width", "height", "left", "top"]).some(function(i) {
|
|
1100
1100
|
return e[i] !== n[i];
|
|
@@ -1119,13 +1119,13 @@ function rt(e, n) {
|
|
|
1119
1119
|
function Oe(e, n) {
|
|
1120
1120
|
return { left: e.left - n.left, top: e.top - n.top, width: e.width + n.left + n.right, height: e.height + n.top + n.bottom };
|
|
1121
1121
|
}
|
|
1122
|
-
function
|
|
1122
|
+
function At(e) {
|
|
1123
1123
|
return { left: -e.left, top: -e.top };
|
|
1124
1124
|
}
|
|
1125
1125
|
function Se(e, n) {
|
|
1126
1126
|
return H(H({}, e), { left: e.left + n.left, top: e.top + n.top });
|
|
1127
1127
|
}
|
|
1128
|
-
function
|
|
1128
|
+
function Ae(e, n, t, i) {
|
|
1129
1129
|
if (n !== 1) {
|
|
1130
1130
|
if (t) {
|
|
1131
1131
|
var a = ve(e);
|
|
@@ -1168,12 +1168,12 @@ function Mt(e, n) {
|
|
|
1168
1168
|
function ge(e, n, t) {
|
|
1169
1169
|
t === void 0 && (t = !1);
|
|
1170
1170
|
var i = nt(e, n);
|
|
1171
|
-
return Se(e, t ?
|
|
1171
|
+
return Se(e, t ? At(i) : i);
|
|
1172
1172
|
}
|
|
1173
1173
|
function qt(e) {
|
|
1174
1174
|
return { width: e.right !== void 0 && e.left !== void 0 ? e.right - e.left : 1 / 0, height: e.bottom !== void 0 && e.top !== void 0 ? e.bottom - e.top : 1 / 0 };
|
|
1175
1175
|
}
|
|
1176
|
-
function
|
|
1176
|
+
function vo(e, n) {
|
|
1177
1177
|
return H(H({}, e), { minWidth: Math.min(n.width, e.minWidth), minHeight: Math.min(n.height, e.minHeight), maxWidth: Math.min(n.width, e.maxWidth), maxHeight: Math.min(n.height, e.maxHeight) });
|
|
1178
1178
|
}
|
|
1179
1179
|
function ii(e, n, t) {
|
|
@@ -1212,7 +1212,7 @@ function Zt(e) {
|
|
|
1212
1212
|
var n = e.event, t = e.coordinates, i = e.positionRestrictions, a = i === void 0 ? {} : i, o = Se(t, n.directions);
|
|
1213
1213
|
return Se(o, nt(o, a));
|
|
1214
1214
|
}
|
|
1215
|
-
function
|
|
1215
|
+
function go(e) {
|
|
1216
1216
|
var n = e.coordinates, t = e.transform, i = e.imageSize, a = e.sizeRestrictions, o = e.positionRestrictions, r = e.aspectRatio, l = e.visibleArea, s = function(c, m) {
|
|
1217
1217
|
return Zt({ coordinates: c, positionRestrictions: o, event: new an({ left: m.left - c.left, top: m.top - c.top }) });
|
|
1218
1218
|
}, u = H({}, n);
|
|
@@ -1224,7 +1224,7 @@ function vo(e) {
|
|
|
1224
1224
|
}(u, H(H({}, u), m))), fe(m.left) && fe(m.top) || (u = s(u, H(H({}, u), m)));
|
|
1225
1225
|
}), u;
|
|
1226
1226
|
}
|
|
1227
|
-
function
|
|
1227
|
+
function bo(e) {
|
|
1228
1228
|
e.event;
|
|
1229
1229
|
var n = e.getAreaRestrictions, t = e.boundaries, i = e.coordinates, a = e.visibleArea;
|
|
1230
1230
|
e.aspectRatio;
|
|
@@ -1232,10 +1232,10 @@ function go(e) {
|
|
|
1232
1232
|
e.stencilReference;
|
|
1233
1233
|
var s, u, c, m = H({}, i), p = H({}, a), d = H({}, o);
|
|
1234
1234
|
s = oe(d), u = oe(m), c === void 0 && (c = 1e-3), (s === 0 || u === 0 ? Math.abs(u - s) < c : Math.abs(u / s) < 1 + c && Math.abs(u / s) > 1 - c) || (m = H(H({}, m), Te({ sizeRestrictions: r, width: m.width, height: m.height, aspectRatio: { minimum: oe(d), maximum: oe(d) } })));
|
|
1235
|
-
var g = Mt(p =
|
|
1236
|
-
return g !== 1 && (p =
|
|
1235
|
+
var g = Mt(p = Ae(p, m.width * t.width / (p.width * d.width)), n({ visibleArea: p, type: "resize" }));
|
|
1236
|
+
return g !== 1 && (p = Ae(p, g), m = Ae(m, g)), p = ge(p = Se(p, et(ve(m), ve(p))), n({ visibleArea: p, type: "move" })), { coordinates: m = ge(m, xt(Ee(p), l)), visibleArea: p };
|
|
1237
1237
|
}
|
|
1238
|
-
function
|
|
1238
|
+
function yo(e) {
|
|
1239
1239
|
var n = e.event, t = e.getAreaRestrictions, i = e.boundaries, a = e.coordinates, o = e.visibleArea;
|
|
1240
1240
|
e.aspectRatio, e.stencilSize, e.sizeRestrictions;
|
|
1241
1241
|
var r = e.positionRestrictions;
|
|
@@ -1244,32 +1244,32 @@ function bo(e) {
|
|
|
1244
1244
|
if (a && o && n.type !== "manipulateImage") {
|
|
1245
1245
|
var u = { width: 0, height: 0 };
|
|
1246
1246
|
s.width, i.width, oe(i) > oe(l) ? (u.height = 0.8 * i.height, u.width = u.height * oe(l)) : (u.width = 0.8 * i.width, u.height = u.width * oe(l));
|
|
1247
|
-
var c = Mt(s =
|
|
1248
|
-
s =
|
|
1247
|
+
var c = Mt(s = Ae(s, l.width * i.width / (s.width * u.width)), t({ visibleArea: s, type: "resize" }));
|
|
1248
|
+
s = Ae(s, c), c !== 1 && (u.height /= c, u.width /= c), s = ge(s = Se(s, et(ve(l), ve(s))), t({ visibleArea: s, type: "move" })), l = ge(l, xt(Ee(s), r));
|
|
1249
1249
|
}
|
|
1250
1250
|
return { coordinates: l, visibleArea: s };
|
|
1251
1251
|
}
|
|
1252
|
-
function
|
|
1252
|
+
function _o(e) {
|
|
1253
1253
|
var n = e.event, t = e.coordinates, i = e.visibleArea, a = e.getAreaRestrictions, o = H({}, i), r = H({}, t);
|
|
1254
1254
|
if (n.type === "setCoordinates") {
|
|
1255
1255
|
var l = Math.max(0, r.width - o.width), s = Math.max(0, r.height - o.height);
|
|
1256
|
-
l > s ? o =
|
|
1256
|
+
l > s ? o = Ae(o, Math.min(r.width / o.width, tt(o, a({ visibleArea: o, type: "resize" })))) : s > l && (o = Ae(o, Math.min(r.height / o.height, tt(o, a({ visibleArea: o, type: "resize" }))))), o = ge(o = Se(o, At(nt(r, Ee(o)))), a({ visibleArea: o, type: "move" }));
|
|
1257
1257
|
}
|
|
1258
1258
|
return { visibleArea: o, coordinates: r };
|
|
1259
1259
|
}
|
|
1260
|
-
function
|
|
1260
|
+
function wo(e) {
|
|
1261
1261
|
var n = e.imageSize, t = e.visibleArea, i = e.coordinates, a = t || n;
|
|
1262
1262
|
return { left: (t ? t.left : 0) + a.width / 2 - i.width / 2, top: (t ? t.top : 0) + a.height / 2 - i.height / 2 };
|
|
1263
1263
|
}
|
|
1264
|
-
function
|
|
1264
|
+
function Co(e) {
|
|
1265
1265
|
var n = e.imageSize, t = e.visibleArea, i = e.aspectRatio, a = e.sizeRestrictions, o = t || n, r = Math.min(i.maximum || 1 / 0, Math.max(i.minimum || 0, oe(o))), l = o.width < o.height ? { width: 0.8 * o.width, height: 0.8 * o.width / r } : { height: 0.8 * o.height, width: 0.8 * o.height * r };
|
|
1266
1266
|
return Te(H(H({}, l), { aspectRatio: i, sizeRestrictions: a }));
|
|
1267
1267
|
}
|
|
1268
|
-
function
|
|
1268
|
+
function So(e) {
|
|
1269
1269
|
var n, t, i = e.imageSize, a = e.visibleArea, o = e.boundaries, r = e.aspectRatio, l = e.sizeRestrictions, s = e.stencilSize, u = a || i;
|
|
1270
1270
|
return oe(u) > oe(o) ? t = (n = s.height * u.height / o.height) * oe(s) : n = (t = s.width * u.width / o.width) / oe(s), Te({ width: t, height: n, aspectRatio: r, sizeRestrictions: l });
|
|
1271
1271
|
}
|
|
1272
|
-
function
|
|
1272
|
+
function Ro(e) {
|
|
1273
1273
|
var n = e.getAreaRestrictions, t = e.coordinates, i = e.imageSize, a = oe(e.boundaries);
|
|
1274
1274
|
if (t) {
|
|
1275
1275
|
var o = { height: Math.max(t.height, i.height), width: Math.max(t.width, i.width) }, r = ti({ width: oe(o) > a ? o.width : o.height * a, height: oe(o) > a ? o.width / a : o.height }, qt(n())), l = { left: t.left + t.width / 2 - r.width / 2, top: t.top + t.height / 2 - r.height / 2, width: r.width, height: r.height }, s = rt(t, Ee(H({ left: 0, top: 0 }, i))), u = {};
|
|
@@ -1281,19 +1281,19 @@ function So(e) {
|
|
|
1281
1281
|
function ht(e, n) {
|
|
1282
1282
|
return ii(e, Ee(n));
|
|
1283
1283
|
}
|
|
1284
|
-
function
|
|
1284
|
+
function ko(e) {
|
|
1285
1285
|
var n = e.event, t = e.coordinates, i = e.visibleArea, a = e.sizeRestrictions, o = e.getAreaRestrictions, r = e.positionRestrictions, l = e.adjustStencil, s = n.scale, u = n.move, c = H({}, i), m = H({}, t), p = 1, d = 1, g = s.factor && Math.abs(s.factor - 1) > 1e-3;
|
|
1286
1286
|
c = Se(c, { left: u.left || 0, top: u.top || 0 });
|
|
1287
1287
|
var w = { stencil: { minimum: Math.max(a.minWidth ? a.minWidth / m.width : 0, a.minHeight ? a.minHeight / m.height : 0), maximum: Math.min(a.maxWidth ? a.maxWidth / m.width : 1 / 0, a.maxHeight ? a.maxHeight / m.height : 1 / 0, tt(m, r)) }, area: { maximum: tt(c, o({ visibleArea: c, type: "resize" })) } };
|
|
1288
|
-
s.factor && g && (s.factor < 1 ? (d = Math.max(s.factor, w.stencil.minimum)) > 1 && (d = 1) : s.factor > 1 && (d = Math.min(s.factor, Math.min(w.area.maximum, w.stencil.maximum))) < 1 && (d = 1)), d && (c =
|
|
1288
|
+
s.factor && g && (s.factor < 1 ? (d = Math.max(s.factor, w.stencil.minimum)) > 1 && (d = 1) : s.factor > 1 && (d = Math.min(s.factor, Math.min(w.area.maximum, w.stencil.maximum))) < 1 && (d = 1)), d && (c = Ae(c, d, s.center));
|
|
1289
1289
|
var _ = t.left - i.left, C = i.width + i.left - (t.width + t.left), E = t.top - i.top, I = i.height + i.top - (t.height + t.top);
|
|
1290
|
-
return c = ge(c = Se(c, nt(c, { left: r.left !== void 0 ? r.left - _ * d : void 0, top: r.top !== void 0 ? r.top - E * d : void 0, bottom: r.bottom !== void 0 ? r.bottom + I * d : void 0, right: r.right !== void 0 ? r.right + C * d : void 0 })), o({ visibleArea: c, type: "move" })), m.width = m.width * d, m.height = m.height * d, m.left = c.left + _ * d, m.top = c.top + E * d, m = ge(m, xt(Ee(c), r)), s.factor && g && l && (s.factor > 1 ? p = Math.min(w.area.maximum, s.factor) / d : s.factor < 1 && (p = Math.max(m.height / c.height, m.width / c.width, s.factor / d)), p !== 1 && (c = Se(c = ge(c =
|
|
1290
|
+
return c = ge(c = Se(c, nt(c, { left: r.left !== void 0 ? r.left - _ * d : void 0, top: r.top !== void 0 ? r.top - E * d : void 0, bottom: r.bottom !== void 0 ? r.bottom + I * d : void 0, right: r.right !== void 0 ? r.right + C * d : void 0 })), o({ visibleArea: c, type: "move" })), m.width = m.width * d, m.height = m.height * d, m.left = c.left + _ * d, m.top = c.top + E * d, m = ge(m, xt(Ee(c), r)), s.factor && g && l && (s.factor > 1 ? p = Math.min(w.area.maximum, s.factor) / d : s.factor < 1 && (p = Math.max(m.height / c.height, m.width / c.width, s.factor / d)), p !== 1 && (c = Se(c = ge(c = Ae(c, p, s.factor > 1 ? s.center : ve(m)), o({ visibleArea: c, type: "move" })), At(nt(m, Ee(c)))))), { coordinates: m, visibleArea: c };
|
|
1291
1291
|
}
|
|
1292
1292
|
function Ao(e) {
|
|
1293
1293
|
var n = e.aspectRatio, t = e.getAreaRestrictions, i = e.coordinates, a = e.visibleArea, o = e.sizeRestrictions, r = e.positionRestrictions, l = e.imageSize, s = e.previousImageSize, u = e.angle, c = H({}, i), m = H({}, a), p = Ve(ve(H({ left: 0, top: 0 }, s)), u);
|
|
1294
|
-
return (c = H(H({}, Te({ sizeRestrictions: o, aspectRatio: n, width: c.width, height: c.height })), Ve(ve(c), u))).left -= p.left - l.width / 2 + c.width / 2, c.top -= p.top - l.height / 2 + c.height / 2, m =
|
|
1294
|
+
return (c = H(H({}, Te({ sizeRestrictions: o, aspectRatio: n, width: c.width, height: c.height })), Ve(ve(c), u))).left -= p.left - l.width / 2 + c.width / 2, c.top -= p.top - l.height / 2 + c.height / 2, m = Ae(m, Mt(m, t({ visibleArea: m, type: "resize" }))), { coordinates: c = ge(c, r), visibleArea: m = ge(m = Se(m, et(ve(c), ve(i))), t({ visibleArea: m, type: "move" })) };
|
|
1295
1295
|
}
|
|
1296
|
-
function
|
|
1296
|
+
function Mo(e) {
|
|
1297
1297
|
var n = e.flip, t = e.previousFlip, i = e.rotate, a = e.getAreaRestrictions, o = e.coordinates, r = e.visibleArea, l = e.imageSize, s = H({}, o), u = H({}, r), c = t.horizontal !== n.horizontal, m = t.vertical !== n.vertical;
|
|
1298
1298
|
if (c || m) {
|
|
1299
1299
|
var p = Ve({ left: l.width / 2, top: l.height / 2 }, -i), d = Ve(ve(s), -i), g = Ve({ left: c ? p.left - (d.left - p.left) : d.left, top: m ? p.top - (d.top - p.top) : d.top }, i);
|
|
@@ -1325,9 +1325,9 @@ function Dn(e) {
|
|
|
1325
1325
|
g !== 1 / 0 && ze.forEach(function(w) {
|
|
1326
1326
|
s[w] *= g;
|
|
1327
1327
|
});
|
|
1328
|
-
} else p.width !== 1 / 0 &&
|
|
1328
|
+
} else p.width !== 1 / 0 && mo.forEach(function(w) {
|
|
1329
1329
|
s[w] *= p.width;
|
|
1330
|
-
}), p.height !== 1 / 0 &&
|
|
1330
|
+
}), p.height !== 1 / 0 && po.forEach(function(w) {
|
|
1331
1331
|
s[w] *= p.height;
|
|
1332
1332
|
});
|
|
1333
1333
|
return s;
|
|
@@ -1335,11 +1335,11 @@ function Dn(e) {
|
|
|
1335
1335
|
function ft(e, n, t) {
|
|
1336
1336
|
return n == 0 && t == 0 ? e / 2 : n == 0 ? 0 : t == 0 ? e : e * Math.abs(n / (n + t));
|
|
1337
1337
|
}
|
|
1338
|
-
var
|
|
1338
|
+
var xo = Ie("vue-simple-handler"), Io = Ie("vue-simple-handler-wrapper"), sn = { name: "SimpleHandler", components: { HandlerWrapper: Qn }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
|
|
1339
1339
|
return { hover: !1 };
|
|
1340
1340
|
}, computed: { classes: function() {
|
|
1341
|
-
var e, n = (
|
|
1342
|
-
return { default: de(
|
|
1341
|
+
var e, n = (ke(e = {}, this.horizontalPosition, !!this.horizontalPosition), ke(e, this.verticalPosition, !!this.verticalPosition), ke(e, "".concat(this.horizontalPosition, "-").concat(this.verticalPosition), !!(this.verticalPosition && this.horizontalPosition)), ke(e, "hover", this.hover), e);
|
|
1342
|
+
return { default: de(xo(n), this.defaultClass, this.hover && this.hoverClass), wrapper: de(Io(n), this.wrapperClass) };
|
|
1343
1343
|
} }, methods: { onDrag: function(e) {
|
|
1344
1344
|
this.$emit("drag", e);
|
|
1345
1345
|
}, onEnter: function() {
|
|
@@ -1352,13 +1352,13 @@ var Mo = Ie("vue-simple-handler"), xo = Ie("vue-simple-handler-wrapper"), sn = {
|
|
|
1352
1352
|
sn.render = function(e, n, t, i, a, o) {
|
|
1353
1353
|
var r = L("HandlerWrapper");
|
|
1354
1354
|
return P(), W(r, { class: o.classes.wrapper, "vertical-position": t.verticalPosition, "horizontal-position": t.horizontalPosition, disabled: t.disabled, onDrag: o.onDrag, onDragEnd: o.onDragEnd, onEnter: o.onEnter, onLeave: o.onLeave }, { default: N(function() {
|
|
1355
|
-
return [
|
|
1355
|
+
return [A("div", { class: o.classes.default }, null, 2)];
|
|
1356
1356
|
}), _: 1 }, 8, ["class", "vertical-position", "horizontal-position", "disabled", "onDrag", "onDragEnd", "onEnter", "onLeave"]);
|
|
1357
1357
|
};
|
|
1358
|
-
var
|
|
1358
|
+
var Oo = Ie("vue-simple-line"), zo = Ie("vue-simple-line-wrapper"), ln = { name: "SimpleLine", components: { LineWrapper: ei }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, position: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
|
|
1359
1359
|
return { hover: !1 };
|
|
1360
1360
|
}, computed: { classes: function() {
|
|
1361
|
-
return { root: de(
|
|
1361
|
+
return { root: de(Oo(ke({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass), wrapper: de(zo(ke({}, this.position, !0)), this.wrapperClass) };
|
|
1362
1362
|
} }, methods: { onDrag: function(e) {
|
|
1363
1363
|
this.$emit("drag", e);
|
|
1364
1364
|
}, onEnter: function() {
|
|
@@ -1371,10 +1371,10 @@ var Io = Ie("vue-simple-line"), Oo = Ie("vue-simple-line-wrapper"), ln = { name:
|
|
|
1371
1371
|
ln.render = function(e, n, t, i, a, o) {
|
|
1372
1372
|
var r = L("LineWrapper");
|
|
1373
1373
|
return P(), W(r, { class: o.classes.wrapper, position: t.position, disabled: t.disabled, onDrag: o.onDrag, onDragEnd: o.onDragEnd, onEnter: o.onEnter, onLeave: o.onLeave }, { default: N(function() {
|
|
1374
|
-
return [
|
|
1374
|
+
return [A("div", { class: o.classes.root }, null, 2)];
|
|
1375
1375
|
}), _: 1 }, 8, ["class", "position", "disabled", "onDrag", "onDragEnd", "onEnter", "onLeave"]);
|
|
1376
1376
|
};
|
|
1377
|
-
var Ut = Ie("vue-bounding-box"),
|
|
1377
|
+
var Ut = Ie("vue-bounding-box"), Eo = ["east", "west", null], Fo = ["south", "north", null], oi = { name: "BoundingBox", props: { width: { type: Number }, height: { type: Number }, transitions: { type: Object }, handlers: { type: Object, default: function() {
|
|
1378
1378
|
return { eastNorth: !0, north: !0, westNorth: !0, west: !0, westSouth: !0, south: !0, eastSouth: !0, east: !0 };
|
|
1379
1379
|
} }, handlersComponent: { type: [Object, String], default: function() {
|
|
1380
1380
|
return sn;
|
|
@@ -1392,8 +1392,8 @@ var Ut = Ie("vue-bounding-box"), zo = ["east", "west", null], Eo = ["south", "no
|
|
|
1392
1392
|
return {};
|
|
1393
1393
|
} }, resizable: { type: Boolean, default: !0 } }, data: function() {
|
|
1394
1394
|
var e = [];
|
|
1395
|
-
return
|
|
1396
|
-
|
|
1395
|
+
return Eo.forEach(function(n) {
|
|
1396
|
+
Fo.forEach(function(t) {
|
|
1397
1397
|
if (n !== t) {
|
|
1398
1398
|
var i = Xn(n, t), a = i.name, o = i.classname;
|
|
1399
1399
|
e.push({ name: a, classname: o, verticalDirection: t, horizontalDirection: n });
|
|
@@ -1419,7 +1419,7 @@ var Ut = Ie("vue-bounding-box"), zo = ["east", "west", null], Eo = ["south", "no
|
|
|
1419
1419
|
if (t && i) {
|
|
1420
1420
|
var r = a.horizontalDirection, l = a.verticalDirection, s = r === "east" ? t : r === "west" ? 0 : t / 2, u = l === "south" ? i : l === "north" ? 0 : i / 2;
|
|
1421
1421
|
o.wrapperClass = Ut("handler"), o.wrapperStyle = { transform: "translate(".concat(s, "px, ").concat(u, "px)") }, e.transitions && e.transitions.enabled && (o.wrapperStyle.transition = "".concat(e.transitions.time, "ms ").concat(e.transitions.timingFunction));
|
|
1422
|
-
} else o.wrapperClass = Ut("handler",
|
|
1422
|
+
} else o.wrapperClass = Ut("handler", ke({}, a.classname, !0));
|
|
1423
1423
|
n.push(o);
|
|
1424
1424
|
}
|
|
1425
1425
|
}), n;
|
|
@@ -1433,10 +1433,10 @@ var Ut = Ie("vue-bounding-box"), zo = ["east", "west", null], Eo = ["south", "no
|
|
|
1433
1433
|
this.$emit("resize-end");
|
|
1434
1434
|
}, onHandlerDrag: function(e, n, t) {
|
|
1435
1435
|
var i, a = e.shift(), o = a.left, r = a.top, l = { left: 0, right: 0, top: 0, bottom: 0 };
|
|
1436
|
-
n === "west" ? l.left -= o : n === "east" && (l.right += o), t === "north" ? l.top -= r : t === "south" && (l.bottom += r), !t && n ? i = "width" : t && !n && (i = "height"), this.resizable && this.$emit("resize", new
|
|
1436
|
+
n === "west" ? l.left -= o : n === "east" && (l.right += o), t === "north" ? l.top -= r : t === "south" && (l.bottom += r), !t && n ? i = "width" : t && !n && (i = "height"), this.resizable && this.$emit("resize", new lo(l, { allowedDirections: { left: n === "west" || !n, right: n === "east" || !n, bottom: t === "south" || !t, top: t === "north" || !t }, preserveAspectRatio: e.nativeEvent && e.nativeEvent.shiftKey, respectDirection: i }));
|
|
1437
1437
|
} }, emits: ["resize", "resize-end"] };
|
|
1438
1438
|
oi.render = function(e, n, t, i, a, o) {
|
|
1439
|
-
return P(), W("div", { ref: "box", class: o.classes.root, style: o.style }, [pe(e.$slots, "default"),
|
|
1439
|
+
return P(), W("div", { ref: "box", class: o.classes.root, style: o.style }, [pe(e.$slots, "default"), A("div", null, [(P(!0), W(Re, null, Ge(o.lineNodes, function(r) {
|
|
1440
1440
|
return P(), W(_t(r.component), { key: r.name, "default-class": r.class, "hover-class": r.hoverClass, "wrapper-class": r.wrapperClass, position: r.name, disabled: r.disabled, onDrag: function(l) {
|
|
1441
1441
|
return o.onHandlerDrag(l, r.horizontalDirection, r.verticalDirection);
|
|
1442
1442
|
}, onDragEnd: n[1] || (n[1] = function(l) {
|
|
@@ -1450,8 +1450,8 @@ oi.render = function(e, n, t, i, a, o) {
|
|
|
1450
1450
|
}) }, null, 8, ["default-class", "hover-class", "wrapper-class", "horizontal-position", "vertical-position", "disabled", "onDrag"]))], 6);
|
|
1451
1451
|
}), 128))], 6);
|
|
1452
1452
|
};
|
|
1453
|
-
var
|
|
1454
|
-
return { default:
|
|
1453
|
+
var Po = Ie("vue-draggable-area"), ai = { name: "DraggableArea", props: { movable: { type: Boolean, default: !0 }, activationDistance: { type: Number, default: 20 } }, computed: { classnames: function() {
|
|
1454
|
+
return { default: Po() };
|
|
1455
1455
|
} }, beforeMount: function() {
|
|
1456
1456
|
window.addEventListener("mouseup", this.onMouseUp, { passive: !1 }), window.addEventListener("mousemove", this.onMouseMove, { passive: !1 }), window.addEventListener("touchmove", this.onTouchMove, { passive: !1 }), window.addEventListener("touchend", this.onTouchEnd, { passive: !1 });
|
|
1457
1457
|
}, beforeUnmount: function() {
|
|
@@ -1499,7 +1499,7 @@ function $t(e) {
|
|
|
1499
1499
|
var n, t;
|
|
1500
1500
|
return { rotate: e.rotate || 0, flip: { horizontal: ((n = e == null ? void 0 : e.flip) === null || n === void 0 ? void 0 : n.horizontal) || !1, vertical: ((t = e == null ? void 0 : e.flip) === null || t === void 0 ? void 0 : t.vertical) || !1 } };
|
|
1501
1501
|
}
|
|
1502
|
-
function
|
|
1502
|
+
function Do(e) {
|
|
1503
1503
|
return new Promise(function(n, t) {
|
|
1504
1504
|
try {
|
|
1505
1505
|
if (e) if (/^data:/i.test(e)) n(function(s) {
|
|
@@ -1535,7 +1535,7 @@ function ri(e) {
|
|
|
1535
1535
|
var n = e.rotate, t = e.flip, i = e.scaleX, a = e.scaleY, o = "";
|
|
1536
1536
|
return o += " rotate(" + n + "deg) ", o += " scaleX(" + i * (t.horizontal ? -1 : 1) + ") ", o += " scaleY(" + a * (t.vertical ? -1 : 1) + ") ";
|
|
1537
1537
|
}
|
|
1538
|
-
function
|
|
1538
|
+
function To(e) {
|
|
1539
1539
|
try {
|
|
1540
1540
|
var n, t = new DataView(e), i = void 0, a = void 0, o = void 0, r = void 0;
|
|
1541
1541
|
if (t.getUint8(0) === 255 && t.getUint8(1) === 216) for (var l = t.byteLength, s = 2; s + 1 < l; ) {
|
|
@@ -1696,7 +1696,7 @@ var vt = Ie("vue-preview"), li = { props: { coordinates: { type: Object }, trans
|
|
|
1696
1696
|
e && e.complete && this.refreshImage(), this.refresh();
|
|
1697
1697
|
} } };
|
|
1698
1698
|
li.render = function(e, n, t, i, a, o) {
|
|
1699
|
-
return P(), W("div", { ref: "root", class: o.classes.root, style: o.style }, [
|
|
1699
|
+
return P(), W("div", { ref: "root", class: o.classes.root, style: o.style }, [A("div", { ref: "wrapper", class: o.classes.wrapper, style: o.wrapperStyle }, [Xe(A("img", { ref: "image", src: t.image && t.image.src, class: o.classes.image, style: o.imageStyle }, null, 14, ["src"]), [[Ct, t.image && t.image.src]])], 6)], 6);
|
|
1700
1700
|
};
|
|
1701
1701
|
var ui = { components: { Preview: li }, inheritAttrs: !1 };
|
|
1702
1702
|
ui.render = function(e, n, t, i, a, o) {
|
|
@@ -1735,20 +1735,20 @@ var Vt = Ie("vue-rectangle-stencil"), ci = { name: "RectangleStencil", component
|
|
|
1735
1735
|
} }, emits: ["resize", "resize-end", "move", "move-end"] };
|
|
1736
1736
|
ci.render = function(e, n, t, i, a, o) {
|
|
1737
1737
|
var r = L("stencil-preview"), l = L("draggable-area"), s = L("bounding-box");
|
|
1738
|
-
return P(), W("div", { class: o.classes.stencil, style: o.style }, [
|
|
1739
|
-
return [
|
|
1740
|
-
return [
|
|
1738
|
+
return P(), W("div", { class: o.classes.stencil, style: o.style }, [A(s, { width: t.stencilCoordinates.width, height: t.stencilCoordinates.height, transitions: t.transitions, class: o.classes.boundingBox, handlers: t.handlers, "handlers-component": t.handlersComponent, "handlers-classes": t.handlersClasses, "handlers-wrappers-classes": t.handlersWrappersClasses, lines: t.lines, "lines-component": t.linesComponent, "lines-classes": t.linesClasses, "lines-wrappers-classes": t.linesWrappersClasses, resizable: t.resizable, onResize: o.onResize, onResizeEnd: o.onResizeEnd }, { default: N(function() {
|
|
1739
|
+
return [A(l, { movable: t.movable, onMove: o.onMove, onMoveEnd: o.onMoveEnd }, { default: N(function() {
|
|
1740
|
+
return [A(r, { image: t.image, coordinates: t.coordinates, width: t.stencilCoordinates.width, height: t.stencilCoordinates.height, class: o.classes.preview, transitions: t.transitions }, null, 8, ["image", "coordinates", "width", "height", "class", "transitions"])];
|
|
1741
1741
|
}), _: 1 }, 8, ["movable", "onMove", "onMoveEnd"])];
|
|
1742
1742
|
}), _: 1 }, 8, ["width", "height", "transitions", "class", "handlers", "handlers-component", "handlers-classes", "handlers-wrappers-classes", "lines", "lines-component", "lines-classes", "lines-wrappers-classes", "resizable", "onResize", "onResizeEnd"])], 6);
|
|
1743
1743
|
};
|
|
1744
|
-
var
|
|
1744
|
+
var Uo = ["transitions"], Pe = Ie("vue-advanced-cropper"), di = { name: "Cropper", components: { BackgroundWrapper: Jt }, props: { src: { type: String, default: null }, stencilComponent: { type: [Object, String], default: function() {
|
|
1745
1745
|
return ci;
|
|
1746
1746
|
} }, backgroundWrapperComponent: { type: [Object, String], default: function() {
|
|
1747
1747
|
return Jt;
|
|
1748
1748
|
} }, stencilProps: { type: Object, default: function() {
|
|
1749
1749
|
return {};
|
|
1750
1750
|
} }, autoZoom: { type: Boolean, default: !1 }, imageClass: { type: String }, boundariesClass: { type: String }, backgroundClass: { type: String }, foregroundClass: { type: String }, minWidth: { type: [Number, String] }, minHeight: { type: [Number, String] }, maxWidth: { type: [Number, String] }, maxHeight: { type: [Number, String] }, debounce: { type: [Boolean, Number], default: 500 }, transitions: { type: Boolean, default: !0 }, checkOrientation: { type: Boolean, default: !0 }, canvas: { type: [Object, Boolean], default: !0 }, crossOrigin: { type: [Boolean, String], default: void 0 }, transitionTime: { type: Number, default: 300 }, imageRestriction: { type: String, default: "fit-area", validator: function(e) {
|
|
1751
|
-
return
|
|
1751
|
+
return fo.indexOf(e) !== -1;
|
|
1752
1752
|
} }, roundResult: { type: Boolean, default: !0 }, defaultSize: { type: [Function, Object] }, defaultPosition: { type: [Function, Object] }, defaultVisibleArea: { type: [Function, Object] }, defaultTransforms: { type: [Function, Object] }, defaultBoundaries: { type: [Function, String], validator: function(e) {
|
|
1753
1753
|
return !(typeof e == "string" && e !== "fill" && e !== "fit");
|
|
1754
1754
|
} }, priority: { type: String, default: "coordinates" }, stencilSize: { type: [Object, Function] }, resizeImage: { type: [Boolean, Object], default: !0 }, moveImage: { type: [Boolean, Object], default: !0 }, autoZoomAlgorithm: { type: Function }, resizeAlgorithm: { type: Function, default: function(e) {
|
|
@@ -1785,8 +1785,8 @@ var To = ["transitions"], Pe = Ie("vue-advanced-cropper"), di = { name: "Cropper
|
|
|
1785
1785
|
return r = ge(r = Se(r, et(ve(t), ve(r))), xt(Ee(n), o));
|
|
1786
1786
|
} }, fitVisibleArea: { type: Function, default: function(e) {
|
|
1787
1787
|
var n = e.visibleArea, t = e.boundaries, i = e.getAreaRestrictions, a = e.coordinates, o = H({}, n);
|
|
1788
|
-
o.height = o.width / oe(t), o.top += (n.height - o.height) / 2, (a.height - o.height > 0 || a.width - o.width > 0) && (o =
|
|
1789
|
-
var r =
|
|
1788
|
+
o.height = o.width / oe(t), o.top += (n.height - o.height) / 2, (a.height - o.height > 0 || a.width - o.width > 0) && (o = Ae(o, Math.max(a.height / o.height, a.width / o.width)));
|
|
1789
|
+
var r = At(nt(a, Ee(o = Ae(o, Mt(o, i({ visibleArea: o, type: "resize" }))))));
|
|
1790
1790
|
return o.width < a.width && (r.left = 0), o.height < a.height && (r.top = 0), o = ge(o = Se(o, r), i({ visibleArea: o, type: "move" }));
|
|
1791
1791
|
} }, areaRestrictionsAlgorithm: { type: Function, default: function(e) {
|
|
1792
1792
|
var n = e.visibleArea, t = e.boundaries, i = e.imageSize, a = e.imageRestriction, o = e.type, r = {};
|
|
@@ -1920,11 +1920,11 @@ var To = ["transitions"], Pe = Ie("vue-advanced-cropper"), di = { name: "Cropper
|
|
|
1920
1920
|
}(ie(ie({}, this.getPublicProperties()), {}, { positionRestrictions: ht(this.positionRestrictions, this.visibleArea), coordinates: e })) : e;
|
|
1921
1921
|
}, processAutoZoom: function(e, n, t, i) {
|
|
1922
1922
|
var a = this.autoZoomAlgorithm;
|
|
1923
|
-
a || (a = this.stencilSize ?
|
|
1923
|
+
a || (a = this.stencilSize ? bo : this.autoZoom ? yo : _o);
|
|
1924
1924
|
var o = a({ event: { type: e, params: i }, visibleArea: n, coordinates: t, boundaries: this.boundaries, aspectRatio: this.getAspectRatio(), positionRestrictions: this.positionRestrictions, getAreaRestrictions: this.getAreaRestrictions, sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize() });
|
|
1925
1925
|
return ie(ie({}, o), {}, { changed: !En(o.visibleArea, n) || !En(o.coordinates, t) });
|
|
1926
1926
|
}, runAutoZoom: function(e) {
|
|
1927
|
-
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = n.transitions, i = t !== void 0 && t, a =
|
|
1927
|
+
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = n.transitions, i = t !== void 0 && t, a = ro(n, Uo), o = this.processAutoZoom(e, this.visibleArea, this.coordinates, a), r = o.visibleArea, l = o.coordinates, s = o.changed;
|
|
1928
1928
|
i && s && this.enableTransitions(), this.visibleArea = r, this.coordinates = l, i && s && this.debouncedDisableTransitions();
|
|
1929
1929
|
}, normalizeEvent: function(e) {
|
|
1930
1930
|
return function(n) {
|
|
@@ -1938,7 +1938,7 @@ var To = ["transitions"], Pe = Ie("vue-advanced-cropper"), di = { name: "Cropper
|
|
|
1938
1938
|
}
|
|
1939
1939
|
if (t.type === "move") {
|
|
1940
1940
|
var r = H(H({}, t), { directions: H({}, t.directions) });
|
|
1941
|
-
return
|
|
1941
|
+
return ho.forEach(function(l) {
|
|
1942
1942
|
r.directions[l] *= a;
|
|
1943
1943
|
}), r;
|
|
1944
1944
|
}
|
|
@@ -1972,17 +1972,17 @@ var To = ["transitions"], Pe = Ie("vue-advanced-cropper"), di = { name: "Cropper
|
|
|
1972
1972
|
}, update: function() {
|
|
1973
1973
|
this.$emit("change", this.getResult());
|
|
1974
1974
|
}, applyTransform: function(e) {
|
|
1975
|
-
var n = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], t = this.visibleArea && n ?
|
|
1976
|
-
return
|
|
1975
|
+
var n = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], t = this.visibleArea && n ? vo(this.sizeRestrictions, this.visibleArea) : this.sizeRestrictions, i = this.visibleArea && n ? ht(this.positionRestrictions, this.visibleArea) : this.positionRestrictions;
|
|
1976
|
+
return go({ transform: e, coordinates: this.coordinates, imageSize: this.imageSize, sizeRestrictions: t, positionRestrictions: i, aspectRatio: this.getAspectRatio(), visibleArea: this.visibleArea });
|
|
1977
1977
|
}, resetCoordinates: function() {
|
|
1978
1978
|
var e = this;
|
|
1979
1979
|
if (this.$refs.image) {
|
|
1980
1980
|
this.$refs.cropper, this.$refs.image;
|
|
1981
1981
|
var n = this.defaultSize;
|
|
1982
|
-
n || (n = this.stencilSize ?
|
|
1982
|
+
n || (n = this.stencilSize ? So : Co);
|
|
1983
1983
|
var t = this.sizeRestrictions;
|
|
1984
1984
|
t.minWidth, t.minHeight, t.maxWidth, t.maxHeight;
|
|
1985
|
-
var i = Ze(n) ? n({ boundaries: this.boundaries, imageSize: this.imageSize, aspectRatio: this.getAspectRatio(), sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize(), visibleArea: this.visibleArea }) : n, a = this.defaultPosition ||
|
|
1985
|
+
var i = Ze(n) ? n({ boundaries: this.boundaries, imageSize: this.imageSize, aspectRatio: this.getAspectRatio(), sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize(), visibleArea: this.visibleArea }) : n, a = this.defaultPosition || wo, o = [i, function(r) {
|
|
1986
1986
|
var l = r.coordinates;
|
|
1987
1987
|
return ie({}, Ze(a) ? a({ coordinates: l, imageSize: e.imageSize, visibleArea: e.visibleArea }) : e.defaultPosition);
|
|
1988
1988
|
}];
|
|
@@ -2014,7 +2014,7 @@ var To = ["transitions"], Pe = Ie("vue-advanced-cropper"), di = { name: "Cropper
|
|
|
2014
2014
|
var e = this;
|
|
2015
2015
|
return this.appliedImageTransforms = ie(ie({}, this.defaultImageTransforms), {}, { flip: ie({}, this.defaultImageTransforms.flip) }), this.updateBoundaries().then(function() {
|
|
2016
2016
|
e.priority !== "visible-area" && (e.visibleArea = null, e.resetCoordinates());
|
|
2017
|
-
var n, t, i, a, o, r, l = e.defaultVisibleArea ||
|
|
2017
|
+
var n, t, i, a, o, r, l = e.defaultVisibleArea || Ro;
|
|
2018
2018
|
e.visibleArea = Ze(l) ? l({ imageSize: e.imageSize, boundaries: e.boundaries, coordinates: e.priority !== "visible-area" ? e.coordinates : null, getAreaRestrictions: e.getAreaRestrictions, stencilSize: e.getStencilSize() }) : e.defaultVisibleArea, e.visibleArea = (n = { visibleArea: e.visibleArea, boundaries: e.boundaries, getAreaRestrictions: e.getAreaRestrictions }, t = n.visibleArea, i = n.boundaries, a = n.getAreaRestrictions, o = H({}, t), r = oe(i), o.width / o.height !== r && (o.height = o.width / r), ge(o, a({ visibleArea: o, type: "move" }))), e.priority === "visible-area" ? e.resetCoordinates() : e.coordinates = e.fitCoordinates({ visibleArea: e.visibleArea, coordinates: e.coordinates, aspectRatio: e.getAspectRatio(), positionRestrictions: e.positionRestrictions, sizeRestrictions: e.sizeRestrictions }), e.runAutoZoom("resetVisibleArea");
|
|
2019
2019
|
}).catch(function() {
|
|
2020
2020
|
e.visibleArea = null;
|
|
@@ -2044,8 +2044,8 @@ var To = ["transitions"], Pe = Ie("vue-advanced-cropper"), di = { name: "Cropper
|
|
|
2044
2044
|
}
|
|
2045
2045
|
if (this.checkOrientation) {
|
|
2046
2046
|
var i = (e = this.src, new Promise(function(a) {
|
|
2047
|
-
|
|
2048
|
-
var r =
|
|
2047
|
+
Do(e).then(function(o) {
|
|
2048
|
+
var r = To(o);
|
|
2049
2049
|
a(o ? { source: e, arrayBuffer: o, orientation: r } : { source: e, arrayBuffer: null, orientation: null });
|
|
2050
2050
|
}).catch(function(o) {
|
|
2051
2051
|
console.warn(o), a({ source: e, arrayBuffer: null, orientation: null });
|
|
@@ -2124,7 +2124,7 @@ var To = ["transitions"], Pe = Ie("vue-advanced-cropper"), di = { name: "Cropper
|
|
|
2124
2124
|
if (!this.transitionsOptions.enabled) {
|
|
2125
2125
|
var t = n.transitions, i = t !== void 0 && t, a = n.normalize, o = a === void 0 || a;
|
|
2126
2126
|
i && this.enableTransitions();
|
|
2127
|
-
var r =
|
|
2127
|
+
var r = ko(ie(ie({}, this.getPublicProperties()), {}, { event: o ? this.normalizeEvent(e) : e, getAreaRestrictions: this.getAreaRestrictions, imageRestriction: this.imageRestriction, adjustStencil: !this.stencilSize && this.settings.resizeImage.adjustStencil })), l = r.visibleArea, s = r.coordinates;
|
|
2128
2128
|
this.visibleArea = l, this.coordinates = s, this.runAutoZoom("manipulateImage"), this.onChange(), i && this.debouncedDisableTransitions();
|
|
2129
2129
|
}
|
|
2130
2130
|
}, onPropsChange: function() {
|
|
@@ -2154,7 +2154,7 @@ var To = ["transitions"], Pe = Ie("vue-advanced-cropper"), di = { name: "Cropper
|
|
|
2154
2154
|
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = t.transitions, a = i === void 0 || i;
|
|
2155
2155
|
if (!this.transitionsActive) {
|
|
2156
2156
|
a && this.enableTransitions();
|
|
2157
|
-
var o = ie({}, this.imageTransforms.flip), r =
|
|
2157
|
+
var o = ie({}, this.imageTransforms.flip), r = Mo({ flip: { horizontal: e ? !o.horizontal : o.horizontal, vertical: n ? !o.vertical : o.vertical }, previousFlip: o, rotate: this.imageTransforms.rotate, visibleArea: this.visibleArea, coordinates: this.coordinates, imageSize: this.imageSize, positionRestrictions: this.positionRestrictions, sizeRestrictions: this.sizeRestrictions, getAreaRestrictions: this.getAreaRestrictions, aspectRatio: this.getAspectRatio() }), l = r.visibleArea, s = r.coordinates;
|
|
2158
2158
|
e && (this.appliedImageTransforms.flip.horizontal = !this.appliedImageTransforms.flip.horizontal), n && (this.appliedImageTransforms.flip.vertical = !this.appliedImageTransforms.flip.vertical), this.visibleArea = l, this.coordinates = s, this.onChange(), a && this.debouncedDisableTransitions();
|
|
2159
2159
|
}
|
|
2160
2160
|
}, rotate: function(e) {
|
|
@@ -2166,27 +2166,27 @@ var To = ["transitions"], Pe = Ie("vue-advanced-cropper"), di = { name: "Cropper
|
|
|
2166
2166
|
var o = Ao({ visibleArea: this.visibleArea, coordinates: this.coordinates, previousImageSize: a, imageSize: this.imageSize, angle: e, positionRestrictions: this.positionRestrictions, sizeRestrictions: this.sizeRestrictions, getAreaRestrictions: this.getAreaRestrictions, aspectRatio: this.getAspectRatio() }), r = o.visibleArea, l = o.coordinates, s = this.processAutoZoom("rotateImage", r, l);
|
|
2167
2167
|
r = s.visibleArea, l = s.coordinates, this.visibleArea = r, this.coordinates = l, this.onChange(), i && this.debouncedDisableTransitions();
|
|
2168
2168
|
}
|
|
2169
|
-
} }, emits: ["change", "error", "ready"] },
|
|
2169
|
+
} }, emits: ["change", "error", "ready"] }, $o = { key: 0, ref: "canvas", style: { display: "none" } }, Vo = { key: 1, ref: "sourceCanvas", style: { display: "none" } };
|
|
2170
2170
|
di.render = function(e, n, t, i, a, o) {
|
|
2171
|
-
return P(), W("div", { ref: "cropper", class: o.classes.cropper }, [
|
|
2172
|
-
return [
|
|
2173
|
-
}, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2),
|
|
2171
|
+
return P(), W("div", { ref: "cropper", class: o.classes.cropper }, [A("div", { ref: "stretcher", class: o.classes.stretcher }, null, 2), A("div", { class: o.classes.boundaries, style: o.boundariesStyle }, [(P(), W(_t(t.backgroundWrapperComponent), { class: o.classes.cropperWrapper, "wheel-resize": o.settings.resizeImage.wheel, "touch-resize": o.settings.resizeImage.touch, "touch-move": o.settings.moveImage.touch, "mouse-move": o.settings.moveImage.mouse, onMove: o.onManipulateImage, onResize: o.onManipulateImage }, { default: N(function() {
|
|
2172
|
+
return [A("div", { class: o.classes.background, style: o.boundariesStyle }, null, 6), A("div", { class: o.classes.imageWrapper }, [A("img", { ref: "image", crossorigin: a.imageAttributes.crossOrigin, src: a.imageAttributes.src, class: o.classes.image, style: o.imageStyle, onMousedown: n[1] || (n[1] = St(function() {
|
|
2173
|
+
}, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2), A("div", { class: o.classes.foreground, style: o.boundariesStyle }, null, 6), Xe((P(), W(_t(t.stencilComponent), Ln({ ref: "stencil", image: o.image, coordinates: a.coordinates, "stencil-coordinates": o.stencilCoordinates, transitions: o.transitionsOptions }, t.stencilProps, { onResize: o.onResize, onResizeEnd: o.onResizeEnd, onMove: o.onMove, onMoveEnd: o.onMoveEnd }), null, 16, ["image", "coordinates", "stencil-coordinates", "transitions", "onResize", "onResizeEnd", "onMove", "onMoveEnd"])), [[Ct, a.imageLoaded]]), t.canvas ? (P(), W("canvas", $o, null, 512)) : ee("", !0), t.canvas ? (P(), W("canvas", Vo, null, 512)) : ee("", !0)];
|
|
2174
2174
|
}), _: 1 }, 8, ["class", "wheel-resize", "touch-resize", "touch-move", "mouse-move", "onMove", "onResize"]))], 6)], 2);
|
|
2175
2175
|
};
|
|
2176
|
-
const
|
|
2176
|
+
const No = {
|
|
2177
2177
|
key: 0,
|
|
2178
2178
|
class: "space-y-4"
|
|
2179
|
-
},
|
|
2179
|
+
}, Bo = { class: "fm-typo-en-body-lg-600" }, Lo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, Go = {
|
|
2180
2180
|
class: /* @__PURE__ */ Fe([
|
|
2181
2181
|
"relative",
|
|
2182
2182
|
"h-[150px] w-[200px]",
|
|
2183
2183
|
"border-2 border-dashed border-fm-color-neutral-gray-300 rounded-md"
|
|
2184
2184
|
])
|
|
2185
|
-
}, Go = {
|
|
2186
|
-
class: /* @__PURE__ */ Fe(["absolute inset-0", "h-full w-full", "rounded-md overflow-hidden"])
|
|
2187
2185
|
}, Wo = {
|
|
2186
|
+
class: /* @__PURE__ */ Fe(["absolute inset-0", "h-full w-full", "rounded-md overflow-hidden"])
|
|
2187
|
+
}, Ko = {
|
|
2188
2188
|
class: /* @__PURE__ */ Fe(["relative z-0", "w-full h-full", "overflow-hidden"])
|
|
2189
|
-
},
|
|
2189
|
+
}, jo = { class: "fm-typo-en-body-lg-600 pb-4" }, Yo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, Ho = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xo = /* @__PURE__ */ se({
|
|
2190
2190
|
__name: "ImageDropField",
|
|
2191
2191
|
props: {
|
|
2192
2192
|
modelValue: {}
|
|
@@ -2206,8 +2206,8 @@ const Vo = {
|
|
|
2206
2206
|
const { width: w, height: _ } = g, C = 16 / 9, E = w / _;
|
|
2207
2207
|
let I = w, S = _;
|
|
2208
2208
|
E > C ? S = I / C : I = S * C;
|
|
2209
|
-
const b = l(I, S), F =
|
|
2210
|
-
return M.fillStyle = "white", M.fillRect(0, 0, b.width, b.height), M.drawImage(g, 0, 0, I, S,
|
|
2209
|
+
const b = l(I, S), F = ao(b.width, b.height), k = I > w ? (I - w) / 2 * b.ratio : 0, y = S > _ ? (S - _) / 2 * b.ratio : 0, M = F.getContext("2d");
|
|
2210
|
+
return M.fillStyle = "white", M.fillRect(0, 0, b.width, b.height), M.drawImage(g, 0, 0, I, S, k, y, b.width, b.height), F.toDataURL();
|
|
2211
2211
|
}
|
|
2212
2212
|
const u = X(!1);
|
|
2213
2213
|
async function c([g]) {
|
|
@@ -2237,15 +2237,15 @@ const Vo = {
|
|
|
2237
2237
|
}
|
|
2238
2238
|
return (g, w) => {
|
|
2239
2239
|
const _ = L("fm-icon"), C = L("fm-drop-field");
|
|
2240
|
-
return r.value || o.value ? (P(), Z("div",
|
|
2241
|
-
D("p",
|
|
2240
|
+
return r.value || o.value ? (P(), Z("div", No, [
|
|
2241
|
+
D("p", Bo, [
|
|
2242
2242
|
wt(le(h(i)("menu.common.labels.product_image")) + " ", 1),
|
|
2243
|
-
D("span",
|
|
2243
|
+
D("span", Lo, le(h(i)("menu.common.labels.optional")), 1)
|
|
2244
2244
|
]),
|
|
2245
|
-
D("div",
|
|
2246
|
-
D("div",
|
|
2247
|
-
D("div",
|
|
2248
|
-
|
|
2245
|
+
D("div", Go, [
|
|
2246
|
+
D("div", Wo, [
|
|
2247
|
+
D("div", Ko, [
|
|
2248
|
+
A(h(di), {
|
|
2249
2249
|
class: "cropper h-[150px] w-[200px]",
|
|
2250
2250
|
src: r.value || o.value,
|
|
2251
2251
|
"stencil-props": {
|
|
@@ -2270,7 +2270,7 @@ const Vo = {
|
|
|
2270
2270
|
type: "button",
|
|
2271
2271
|
onClick: d
|
|
2272
2272
|
}, [
|
|
2273
|
-
|
|
2273
|
+
A(_, { name: "close" })
|
|
2274
2274
|
])
|
|
2275
2275
|
])
|
|
2276
2276
|
])
|
|
@@ -2281,13 +2281,13 @@ const Vo = {
|
|
|
2281
2281
|
onFileUpload: m
|
|
2282
2282
|
}, {
|
|
2283
2283
|
label: N(() => [
|
|
2284
|
-
D("p",
|
|
2284
|
+
D("p", jo, [
|
|
2285
2285
|
wt(le(h(i)("menu.common.labels.product_image")) + " ", 1),
|
|
2286
|
-
D("span",
|
|
2286
|
+
D("span", Yo, le(h(i)("menu.common.labels.optional")), 1)
|
|
2287
2287
|
])
|
|
2288
2288
|
]),
|
|
2289
2289
|
"accept-text": N(() => [
|
|
2290
|
-
D("p",
|
|
2290
|
+
D("p", Ho, le(h(i)("menu.common.file.accepts")), 1)
|
|
2291
2291
|
]),
|
|
2292
2292
|
_: 1
|
|
2293
2293
|
}));
|
|
@@ -2309,44 +2309,48 @@ const Vo = {
|
|
|
2309
2309
|
onClick: t[0] || (t[0] = //@ts-ignore
|
|
2310
2310
|
(...a) => n.onClick && n.onClick(...a))
|
|
2311
2311
|
}, [
|
|
2312
|
-
h(Ue).isDialogOpened.value ? (P(), W(h(
|
|
2312
|
+
h(Ue).isDialogOpened.value ? (P(), W(h(qi), { key: 1 })) : (P(), W(h(Yi), { key: 0 }))
|
|
2313
2313
|
], 2)) : ee("", !0);
|
|
2314
2314
|
};
|
|
2315
2315
|
}
|
|
2316
|
-
}),
|
|
2317
|
-
function
|
|
2318
|
-
return P(), Z("div",
|
|
2316
|
+
}), qo = {}, Zo = { class: "pl-32" };
|
|
2317
|
+
function Jo(e, n) {
|
|
2318
|
+
return P(), Z("div", Zo, [
|
|
2319
2319
|
pe(e.$slots, "default")
|
|
2320
2320
|
]);
|
|
2321
2321
|
}
|
|
2322
|
-
const
|
|
2322
|
+
const Qo = /* @__PURE__ */ lt(qo, [["render", Jo]]);
|
|
2323
|
+
function pi(e) {
|
|
2324
|
+
return e || null;
|
|
2325
|
+
}
|
|
2326
|
+
const ea = {
|
|
2323
2327
|
class: "flex flex-row xs:flex-col gap-24"
|
|
2324
|
-
}, ea = {
|
|
2325
|
-
class: "flex-1 flex flex-col gap-24"
|
|
2326
2328
|
}, ta = {
|
|
2327
|
-
class:
|
|
2329
|
+
class: "flex-1 flex flex-col gap-24"
|
|
2328
2330
|
}, na = {
|
|
2329
|
-
class: "
|
|
2331
|
+
class: /* @__PURE__ */ Fe(["flex space-x-16", "xs:flex-col xs:space-x-0 xs:space-y-16"])
|
|
2330
2332
|
}, ia = {
|
|
2331
|
-
class: "
|
|
2333
|
+
class: "w-[160px] xs:w-full"
|
|
2332
2334
|
}, oa = {
|
|
2333
|
-
class: "
|
|
2335
|
+
class: "flex-1"
|
|
2334
2336
|
}, aa = {
|
|
2335
|
-
class: "
|
|
2337
|
+
class: "relative"
|
|
2336
2338
|
}, ra = {
|
|
2337
|
-
class: "fm-typo-en-body-
|
|
2339
|
+
class: "fm-typo-en-body-lg-600"
|
|
2338
2340
|
}, sa = {
|
|
2339
|
-
class: "
|
|
2341
|
+
class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary"
|
|
2340
2342
|
}, la = {
|
|
2341
|
-
class: "
|
|
2343
|
+
class: "flex flex-col gap-16"
|
|
2342
2344
|
}, ua = {
|
|
2345
|
+
class: "space-y-8"
|
|
2346
|
+
}, ca = {
|
|
2343
2347
|
key: 0,
|
|
2344
2348
|
class: "flex items-center gap-8"
|
|
2345
2349
|
};
|
|
2346
2350
|
var je = /* @__PURE__ */ function(e) {
|
|
2347
2351
|
return e.ADD_ON = "ADD_ON", e.PRODUCT = "PRODUCT", e;
|
|
2348
2352
|
}(je || {});
|
|
2349
|
-
const
|
|
2353
|
+
const da = /* @__PURE__ */ se({
|
|
2350
2354
|
__name: "ProductDetail",
|
|
2351
2355
|
props: {
|
|
2352
2356
|
isOverride: {
|
|
@@ -2366,35 +2370,35 @@ const ca = /* @__PURE__ */ se({
|
|
|
2366
2370
|
setup(e, {
|
|
2367
2371
|
emit: n
|
|
2368
2372
|
}) {
|
|
2369
|
-
const t = e, i = me(), a = xe(), o = Be(), r = Ye(o), l = He(r), s =
|
|
2373
|
+
const t = e, i = me(), a = xe(), o = Be(), r = Ye(o), l = He(r), s = Ui({
|
|
2370
2374
|
dialog: a,
|
|
2371
2375
|
menuLoader: l
|
|
2372
2376
|
}), {
|
|
2373
2377
|
checkMenuIsLoading: u
|
|
2374
2378
|
} = He(Ye(Be())), c = n, m = T(() => i.rules.item), p = T(() => i.categorizedItems), d = T(() => {
|
|
2375
|
-
const F = p.value.map((
|
|
2376
|
-
label:
|
|
2377
|
-
value:
|
|
2379
|
+
const F = p.value.map((k) => ({
|
|
2380
|
+
label: k.name,
|
|
2381
|
+
value: k.id
|
|
2378
2382
|
}));
|
|
2379
|
-
return t.isAddon ? F : F.filter((
|
|
2383
|
+
return t.isAddon ? F : F.filter((k) => !!k.value);
|
|
2380
2384
|
}), g = T(() => m.value.addon), w = T(() => !d.value.find((F) => !!F.value)), _ = () => {
|
|
2381
2385
|
var F;
|
|
2382
|
-
return t.isAddon ? null : Xe(
|
|
2386
|
+
return t.isAddon ? null : Xe(A(Me.FmSelect, {
|
|
2383
2387
|
disabled: !m.value.category || t.isAddon || u(),
|
|
2384
2388
|
items: d.value,
|
|
2385
2389
|
modelValue: t.form.category ?? ((F = t.fallback) == null ? void 0 : F.category),
|
|
2386
2390
|
shiftMenu: !0,
|
|
2387
|
-
"onUpdate:model-value": (
|
|
2391
|
+
"onUpdate:model-value": (k) => c("update:form", "category", k)
|
|
2388
2392
|
}, {
|
|
2389
|
-
"append-menu": () =>
|
|
2393
|
+
"append-menu": () => A("button", {
|
|
2390
2394
|
class: "flex items-center py-8 px-16 space-x-8",
|
|
2391
2395
|
type: "button",
|
|
2392
2396
|
onClick: () => s.create()
|
|
2393
|
-
}, [
|
|
2397
|
+
}, [A(Me.FmIcon, {
|
|
2394
2398
|
color: "primary",
|
|
2395
2399
|
name: "add",
|
|
2396
2400
|
size: "md"
|
|
2397
|
-
}, null),
|
|
2401
|
+
}, null), A("p", {
|
|
2398
2402
|
class: "fm-typo-en-body-lg-600 text-fm-color-primary"
|
|
2399
2403
|
}, [wt("Add new Category")])])
|
|
2400
2404
|
}), [[Gt("if"), !t.isAddon]]);
|
|
@@ -2403,18 +2407,18 @@ const ca = /* @__PURE__ */ se({
|
|
|
2403
2407
|
!w.value && !t.form.category && t.isCreate && E(je.PRODUCT);
|
|
2404
2408
|
});
|
|
2405
2409
|
const C = T(() => {
|
|
2406
|
-
var
|
|
2407
|
-
const F = t.form.name || ((
|
|
2410
|
+
var k;
|
|
2411
|
+
const F = t.form.name || ((k = t.fallback) == null ? void 0 : k.name);
|
|
2408
2412
|
return F ? i.items.filter((y) => !!y.category && y._id !== t.form._id && y.name === F).length : 0;
|
|
2409
2413
|
});
|
|
2410
2414
|
function E(F) {
|
|
2411
2415
|
var y, M, f;
|
|
2412
|
-
const
|
|
2413
|
-
c("update:form", "category", t.isOverride ?
|
|
2416
|
+
const k = F == je.ADD_ON;
|
|
2417
|
+
c("update:form", "category", t.isOverride ? k ? "" : ((y = t.fallback) == null ? void 0 : y.category) ?? ((M = d.value.find((v) => !!v.value)) == null ? void 0 : M.value) : k ? null : (f = d.value.find((v) => !!v.value)) == null ? void 0 : f.value);
|
|
2414
2418
|
}
|
|
2415
2419
|
const I = X(!1);
|
|
2416
2420
|
async function S() {
|
|
2417
|
-
var F,
|
|
2421
|
+
var F, k, y;
|
|
2418
2422
|
if (!t.form.name) {
|
|
2419
2423
|
const M = document.getElementById("product-name");
|
|
2420
2424
|
if (M) {
|
|
@@ -2428,7 +2432,7 @@ const ca = /* @__PURE__ */ se({
|
|
|
2428
2432
|
I.value = !0, en({
|
|
2429
2433
|
event: "menu_catalog_item_general_remy_suggest_description"
|
|
2430
2434
|
}), Ue.toggleDialog(!0);
|
|
2431
|
-
const M = await ((
|
|
2435
|
+
const M = await ((k = (F = Ue).getItemDescription) == null ? void 0 : k.call(F, {
|
|
2432
2436
|
name: t.form.name || ""
|
|
2433
2437
|
}, !0)), f = (y = M == null ? void 0 : M.data) == null ? void 0 : y.value;
|
|
2434
2438
|
c("update:form", "description", f);
|
|
@@ -2439,19 +2443,19 @@ const ca = /* @__PURE__ */ se({
|
|
|
2439
2443
|
const {
|
|
2440
2444
|
t: b
|
|
2441
2445
|
} = ue();
|
|
2442
|
-
return (F,
|
|
2446
|
+
return (F, k) => {
|
|
2443
2447
|
const y = L("fm-text-field"), M = L("fm-textarea"), f = L("fm-radio"), v = L("FmSnackbar"), x = L("FmButton"), O = L("fm-radio-group"), R = L("FmFormGroup"), G = Gt("tooltip");
|
|
2444
2448
|
return P(), W(We, {
|
|
2445
2449
|
title: h(b)("menu.product.form.detail.title")
|
|
2446
2450
|
}, {
|
|
2447
2451
|
default: N(() => {
|
|
2448
2452
|
var Y, Q;
|
|
2449
|
-
return [D("div",
|
|
2453
|
+
return [D("div", ea, [D("div", ta, [D("div", na, [D("div", ia, [A(y, {
|
|
2450
2454
|
"model-value": F.form.code,
|
|
2451
2455
|
placeholder: ((Y = F.fallback) == null ? void 0 : Y.code) || h(b)("menu.product.form.detail.fields.code.placeholder"),
|
|
2452
2456
|
label: h(b)("menu.product.form.detail.fields.code.label"),
|
|
2453
|
-
"onUpdate:modelValue":
|
|
2454
|
-
}, null, 8, ["model-value", "placeholder", "label"])]), D("div",
|
|
2457
|
+
"onUpdate:modelValue": k[0] || (k[0] = (z) => c("update:form", "code", h(pi)(z)))
|
|
2458
|
+
}, null, 8, ["model-value", "placeholder", "label"])]), D("div", oa, [A(y, {
|
|
2455
2459
|
id: "product-name",
|
|
2456
2460
|
disabled: !m.value.name,
|
|
2457
2461
|
"helper-text": C.value > 0 ? h(b)("menu.product.form.detail.fields.name.duplicate_warning", {
|
|
@@ -2463,51 +2467,51 @@ const ca = /* @__PURE__ */ se({
|
|
|
2463
2467
|
"label-mark": "required",
|
|
2464
2468
|
autofocus: "",
|
|
2465
2469
|
label: h(b)("menu.product.form.detail.fields.name.label"),
|
|
2466
|
-
"onUpdate:modelValue":
|
|
2467
|
-
}, null, 8, ["disabled", "helper-text", "model-value", "placeholder", "rules", "label"])])]), D("div",
|
|
2470
|
+
"onUpdate:modelValue": k[1] || (k[1] = (z) => c("update:form", "name", z))
|
|
2471
|
+
}, null, 8, ["disabled", "helper-text", "model-value", "placeholder", "rules", "label"])])]), D("div", aa, [A(M, {
|
|
2468
2472
|
disabled: !m.value.description,
|
|
2469
2473
|
"model-value": F.form.description,
|
|
2470
2474
|
placeholder: h(b)("menu.product.form.detail.fields.description.placeholder"),
|
|
2471
|
-
"onUpdate:modelValue":
|
|
2475
|
+
"onUpdate:modelValue": k[2] || (k[2] = (z) => c("update:form", "description", z.trim()))
|
|
2472
2476
|
}, {
|
|
2473
|
-
label: N(() => [D("p",
|
|
2477
|
+
label: N(() => [D("p", ra, [wt(le(h(b)("menu.product.form.detail.fields.description.label")) + " ", 1), D("span", sa, le(h(b)("menu.product.form.detail.fields.description.optional")), 1)])]),
|
|
2474
2478
|
_: 1
|
|
2475
|
-
}, 8, ["disabled", "model-value", "placeholder"]), Xe(
|
|
2479
|
+
}, 8, ["disabled", "model-value", "placeholder"]), Xe(A(mi, {
|
|
2476
2480
|
class: Fe(["absolute top-[100px] left-8"]),
|
|
2477
2481
|
onClick: S
|
|
2478
|
-
}, null, 512), [[G, h(Wn)("Suggest description")]])])]),
|
|
2482
|
+
}, null, 512), [[G, h(Wn)("Suggest description")]])])]), A(Xo, {
|
|
2479
2483
|
disabled: !m.value.thumbnail,
|
|
2480
2484
|
"model-value": F.thumbnail,
|
|
2481
|
-
"onUpdate:modelValue":
|
|
2482
|
-
"onReset:modelValue":
|
|
2483
|
-
}, null, 8, ["disabled", "model-value"])]),
|
|
2485
|
+
"onUpdate:modelValue": k[3] || (k[3] = (z) => c("update:thumbnail", z)),
|
|
2486
|
+
"onReset:modelValue": k[4] || (k[4] = (z) => c("reset:thumbnail"))
|
|
2487
|
+
}, null, 8, ["disabled", "model-value"])]), A(Qe, {
|
|
2484
2488
|
label: h(b)("menu.product.form.detail.category.label")
|
|
2485
2489
|
}, {
|
|
2486
2490
|
default: N(() => [g.value ? (P(), W(O, {
|
|
2487
2491
|
key: 0,
|
|
2488
2492
|
disabled: !m.value.category,
|
|
2489
2493
|
"model-value": F.isAddon ? je.ADD_ON : je.PRODUCT,
|
|
2490
|
-
"onUpdate:modelValue":
|
|
2494
|
+
"onUpdate:modelValue": k[5] || (k[5] = (z) => E(z))
|
|
2491
2495
|
}, {
|
|
2492
|
-
default: N(() => [D("div",
|
|
2496
|
+
default: N(() => [D("div", la, [D("div", ua, [A(f, {
|
|
2493
2497
|
disabled: w.value,
|
|
2494
2498
|
value: je.PRODUCT,
|
|
2495
2499
|
label: h(b)("menu.product.form.detail.category.options.product.label"),
|
|
2496
2500
|
sublabel: h(b)("menu.product.form.detail.category.options.product.sublabel")
|
|
2497
|
-
}, null, 8, ["disabled", "value", "label", "sublabel"]),
|
|
2501
|
+
}, null, 8, ["disabled", "value", "label", "sublabel"]), A(Qo, null, {
|
|
2498
2502
|
default: N(() => [h(i).isV4 ? (P(), W(_, {
|
|
2499
2503
|
key: 0
|
|
2500
2504
|
})) : ee("", !0)]),
|
|
2501
2505
|
_: 1
|
|
2502
|
-
})]), w.value ? (P(), Z("div",
|
|
2506
|
+
})]), w.value ? (P(), Z("div", ca, [A(v, {
|
|
2503
2507
|
title: h(b)("menu.product.form.detail.category.add_first"),
|
|
2504
2508
|
variant: "info"
|
|
2505
|
-
}, null, 8, ["title"]),
|
|
2509
|
+
}, null, 8, ["title"]), A(x, {
|
|
2506
2510
|
label: h(b)("menu.common.actions.add"),
|
|
2507
2511
|
"prepend-icon": "add",
|
|
2508
2512
|
variant: "secondary",
|
|
2509
2513
|
onClick: h(s).create
|
|
2510
|
-
}, null, 8, ["label", "onClick"])])) : ee("", !0),
|
|
2514
|
+
}, null, 8, ["label", "onClick"])])) : ee("", !0), A(f, {
|
|
2511
2515
|
value: je.ADD_ON,
|
|
2512
2516
|
label: h(b)("menu.product.form.detail.category.options.addon.label"),
|
|
2513
2517
|
sublabel: h(b)("menu.product.form.detail.category.options.addon.sublabel")
|
|
@@ -2516,42 +2520,42 @@ const ca = /* @__PURE__ */ se({
|
|
|
2516
2520
|
}, 8, ["disabled", "model-value"])) : ee("", !0), h(i).isV4 ? ee("", !0) : (P(), W(R, {
|
|
2517
2521
|
key: 1,
|
|
2518
2522
|
modelValue: F.form.category,
|
|
2519
|
-
"onUpdate:modelValue":
|
|
2523
|
+
"onUpdate:modelValue": k[6] || (k[6] = (z) => F.form.category = z),
|
|
2520
2524
|
rules: [(z) => z ? !0 : "Category is required"]
|
|
2521
2525
|
}, {
|
|
2522
|
-
default: N(() => [
|
|
2526
|
+
default: N(() => [A(_)]),
|
|
2523
2527
|
_: 1
|
|
2524
2528
|
}, 8, ["modelValue", "rules"]))]),
|
|
2525
2529
|
_: 1
|
|
2526
|
-
}, 8, ["label"]),
|
|
2530
|
+
}, 8, ["label"]), A(on, {
|
|
2527
2531
|
disabled: !m.value.orderFrom,
|
|
2528
2532
|
"model-value": F.form.orderFrom,
|
|
2529
2533
|
"order-from-none": m.value.orderFromNone,
|
|
2530
2534
|
required: m.value.orderFrom,
|
|
2531
2535
|
"default-label": h(b)("menu.product.form.detail.order_from.default"),
|
|
2532
2536
|
label: h(b)("menu.product.form.detail.order_from.label"),
|
|
2533
|
-
"onUpdate:modelValue":
|
|
2537
|
+
"onUpdate:modelValue": k[7] || (k[7] = (z) => z && c("update:form", "orderFrom", z))
|
|
2534
2538
|
}, null, 8, ["disabled", "model-value", "order-from-none", "required", "default-label", "label"])];
|
|
2535
2539
|
}),
|
|
2536
2540
|
_: 1
|
|
2537
2541
|
}, 8, ["title"]);
|
|
2538
2542
|
};
|
|
2539
2543
|
}
|
|
2540
|
-
}),
|
|
2544
|
+
}), ma = {
|
|
2541
2545
|
class: /* @__PURE__ */ Fe(["flex space-x-16", "xs:flex-col xs:space-x-0 xs:space-y-16"])
|
|
2542
|
-
},
|
|
2546
|
+
}, pa = { class: "space-y-16" }, ha = { class: "space-y-8" }, fa = {
|
|
2543
2547
|
key: 0,
|
|
2544
2548
|
class: "pl-32 pb-4 space-x-16 flex items-center"
|
|
2545
|
-
},
|
|
2549
|
+
}, va = { class: "fm-typo-en-body-lg-400" }, ga = { class: "w-[258px]" }, ba = { class: "w-[117px]" }, ya = {
|
|
2546
2550
|
key: 0,
|
|
2547
2551
|
class: "space-y-8"
|
|
2548
|
-
},
|
|
2552
|
+
}, _a = {
|
|
2549
2553
|
key: 0,
|
|
2550
2554
|
class: "pl-32 pb-4 flex space-x-16"
|
|
2551
|
-
},
|
|
2555
|
+
}, wa = { class: "w-[258px] xs:w-full" }, Ca = {
|
|
2552
2556
|
key: 1,
|
|
2553
2557
|
class: "space-y-8"
|
|
2554
|
-
},
|
|
2558
|
+
}, Sa = { class: "pl-32 pb-4 flex space-x-16" }, Ra = { class: "w-[258px] xs:w-full" }, ka = /* @__PURE__ */ se({
|
|
2555
2559
|
__name: "ProductPrice",
|
|
2556
2560
|
props: {
|
|
2557
2561
|
isOverride: { type: Boolean },
|
|
@@ -2591,7 +2595,7 @@ const ca = /* @__PURE__ */ se({
|
|
|
2591
2595
|
}
|
|
2592
2596
|
const g = X(!1);
|
|
2593
2597
|
async function w() {
|
|
2594
|
-
var C, E, I, S, b, F,
|
|
2598
|
+
var C, E, I, S, b, F, k, y;
|
|
2595
2599
|
if (!(t.form.name || "")) {
|
|
2596
2600
|
const M = document.getElementById("product-name");
|
|
2597
2601
|
if (M) {
|
|
@@ -2610,8 +2614,8 @@ const ca = /* @__PURE__ */ se({
|
|
|
2610
2614
|
number: M
|
|
2611
2615
|
}).toObject()
|
|
2612
2616
|
);
|
|
2613
|
-
}), await ((y = (
|
|
2614
|
-
|
|
2617
|
+
}), await ((y = (k = Ue).getItemPricing) == null ? void 0 : y.call(
|
|
2618
|
+
k,
|
|
2615
2619
|
{
|
|
2616
2620
|
name: t.form.name || "",
|
|
2617
2621
|
lat: (I = (E = (C = i.currentRestaurant) == null ? void 0 : C.value) == null ? void 0 : E.profile.address.coordinates) == null ? void 0 : I[1],
|
|
@@ -2631,21 +2635,21 @@ const ca = /* @__PURE__ */ se({
|
|
|
2631
2635
|
default: N(() => {
|
|
2632
2636
|
var F;
|
|
2633
2637
|
return [
|
|
2634
|
-
D("div",
|
|
2635
|
-
|
|
2638
|
+
D("div", ma, [
|
|
2639
|
+
A(Je, {
|
|
2636
2640
|
min: 0,
|
|
2637
2641
|
"model-value": _.form.price || null,
|
|
2638
2642
|
placeholder: (F = _.fallback) != null && F.price ? h(at)(_.fallback.price, !1) : void 0,
|
|
2639
2643
|
rules: [
|
|
2640
|
-
l.value.price ? (
|
|
2644
|
+
l.value.price ? (k) => !!k || h(o)("menu.product.form.price.fields.selling_price.required") : void 0
|
|
2641
2645
|
].filter(h(ut).isSet),
|
|
2642
2646
|
class: "w-[258px] xs:w-full",
|
|
2643
2647
|
label: h(o)("menu.product.form.price.fields.selling_price.label"),
|
|
2644
2648
|
"show-currency": "",
|
|
2645
|
-
"onUpdate:modelValue": C[0] || (C[0] = (
|
|
2649
|
+
"onUpdate:modelValue": C[0] || (C[0] = (k) => k && r("update:form", "price", k))
|
|
2646
2650
|
}, {
|
|
2647
2651
|
append: N(() => [
|
|
2648
|
-
Xe(
|
|
2652
|
+
Xe(A(mi, {
|
|
2649
2653
|
"pure-styling": "",
|
|
2650
2654
|
onClick: w
|
|
2651
2655
|
}, null, 512), [
|
|
@@ -2654,7 +2658,7 @@ const ca = /* @__PURE__ */ se({
|
|
|
2654
2658
|
]),
|
|
2655
2659
|
_: 1
|
|
2656
2660
|
}, 8, ["model-value", "placeholder", "rules", "label"]),
|
|
2657
|
-
|
|
2661
|
+
A(E, {
|
|
2658
2662
|
disabled: !l.value.tax || !c.value.systemCode,
|
|
2659
2663
|
items: c.value.countryTaxOptions,
|
|
2660
2664
|
label: c.value.systemCode ? h(o)("menu.product.form.price.fields.tax.label_with_code", {
|
|
@@ -2664,26 +2668,26 @@ const ca = /* @__PURE__ */ se({
|
|
|
2664
2668
|
placeholder: "--",
|
|
2665
2669
|
class: "flex-1",
|
|
2666
2670
|
"shift-menu": "",
|
|
2667
|
-
"onUpdate:modelValue": C[1] || (C[1] = (
|
|
2671
|
+
"onUpdate:modelValue": C[1] || (C[1] = (k) => r("update:form", "taxes", [h(Et).decodeTax(k)]))
|
|
2668
2672
|
}, null, 8, ["disabled", "items", "label", "model-value"])
|
|
2669
2673
|
]),
|
|
2670
|
-
|
|
2674
|
+
A(Qe, {
|
|
2671
2675
|
label: h(o)("menu.product.form.price.settings.title")
|
|
2672
2676
|
}, {
|
|
2673
2677
|
default: N(() => {
|
|
2674
|
-
var
|
|
2678
|
+
var k;
|
|
2675
2679
|
return [
|
|
2676
|
-
D("div",
|
|
2677
|
-
|
|
2680
|
+
D("div", pa, [
|
|
2681
|
+
A(I, {
|
|
2678
2682
|
disabled: !l.value.openPrice,
|
|
2679
|
-
"model-value": _.form.openPrice ?? ((
|
|
2683
|
+
"model-value": _.form.openPrice ?? ((k = _.fallback) == null ? void 0 : k.openPrice) ?? !1,
|
|
2680
2684
|
value: _.form.openPrice,
|
|
2681
2685
|
label: h(o)("menu.product.form.price.settings.open_price.label"),
|
|
2682
2686
|
sublabel: h(o)("menu.product.form.price.settings.open_price.sublabel"),
|
|
2683
2687
|
"onUpdate:modelValue": C[2] || (C[2] = (y) => r("update:form", "openPrice", y))
|
|
2684
2688
|
}, null, 8, ["disabled", "model-value", "value", "label", "sublabel"]),
|
|
2685
|
-
D("div",
|
|
2686
|
-
|
|
2689
|
+
D("div", ha, [
|
|
2690
|
+
A(I, {
|
|
2687
2691
|
disabled: !l.value.unit,
|
|
2688
2692
|
"model-value": s.value,
|
|
2689
2693
|
value: s.value,
|
|
@@ -2691,10 +2695,10 @@ const ca = /* @__PURE__ */ se({
|
|
|
2691
2695
|
sublabel: h(o)("menu.product.form.price.settings.sell_by_unit.sublabel"),
|
|
2692
2696
|
"onUpdate:modelValue": u
|
|
2693
2697
|
}, null, 8, ["disabled", "model-value", "value", "label", "sublabel"]),
|
|
2694
|
-
s.value ? (P(), Z("div",
|
|
2695
|
-
D("p",
|
|
2696
|
-
D("div",
|
|
2697
|
-
|
|
2698
|
+
s.value ? (P(), Z("div", fa, [
|
|
2699
|
+
D("p", va, le(h(o)("menu.product.form.price.settings.sell_by_unit.per_unit.label")), 1),
|
|
2700
|
+
D("div", ga, [
|
|
2701
|
+
A(S, {
|
|
2698
2702
|
disabled: !l.value.unit,
|
|
2699
2703
|
"model-value": _.form.perXUnit || null,
|
|
2700
2704
|
rules: [
|
|
@@ -2708,8 +2712,8 @@ const ca = /* @__PURE__ */ se({
|
|
|
2708
2712
|
"onUpdate:modelValue": p
|
|
2709
2713
|
}, null, 8, ["disabled", "model-value", "rules", "placeholder"])
|
|
2710
2714
|
]),
|
|
2711
|
-
D("div",
|
|
2712
|
-
|
|
2715
|
+
D("div", ba, [
|
|
2716
|
+
A(S, {
|
|
2713
2717
|
"model-value": _.form.unit || null,
|
|
2714
2718
|
rules: [
|
|
2715
2719
|
(y) => !!y || h(o)("menu.product.form.price.settings.sell_by_unit.unit.required")
|
|
@@ -2720,16 +2724,16 @@ const ca = /* @__PURE__ */ se({
|
|
|
2720
2724
|
])
|
|
2721
2725
|
])) : ee("", !0)
|
|
2722
2726
|
]),
|
|
2723
|
-
l.value.costing ? (P(), Z("div",
|
|
2724
|
-
|
|
2727
|
+
l.value.costing ? (P(), Z("div", ya, [
|
|
2728
|
+
A(I, {
|
|
2725
2729
|
"model-value": !!_.form.costing,
|
|
2726
2730
|
value: !!_.form.costing,
|
|
2727
2731
|
label: h(o)("menu.product.form.price.settings.track_costing.label"),
|
|
2728
2732
|
"onUpdate:modelValue": C[4] || (C[4] = (y) => r("update:form", "costing", y ? h(_e.Dinero).zero().toObject() : void 0))
|
|
2729
2733
|
}, null, 8, ["model-value", "value", "label"]),
|
|
2730
|
-
_.form.costing ? (P(), Z("div",
|
|
2731
|
-
D("div",
|
|
2732
|
-
|
|
2734
|
+
_.form.costing ? (P(), Z("div", _a, [
|
|
2735
|
+
D("div", wa, [
|
|
2736
|
+
A(Je, {
|
|
2733
2737
|
class: "w-full",
|
|
2734
2738
|
min: 0,
|
|
2735
2739
|
"model-value": _.form.costing || null,
|
|
@@ -2740,16 +2744,16 @@ const ca = /* @__PURE__ */ se({
|
|
|
2740
2744
|
])
|
|
2741
2745
|
])) : ee("", !0)
|
|
2742
2746
|
])) : ee("", !0),
|
|
2743
|
-
l.value.minPrice ? (P(), Z("div",
|
|
2744
|
-
|
|
2747
|
+
l.value.minPrice ? (P(), Z("div", Ca, [
|
|
2748
|
+
A(I, {
|
|
2745
2749
|
disabled: !l.value.minPrice,
|
|
2746
2750
|
"model-value": !!_.form.minPrice,
|
|
2747
2751
|
value: !!_.form.minPrice,
|
|
2748
2752
|
label: h(o)("menu.product.form.price.settings.min_price.label"),
|
|
2749
2753
|
"onUpdate:modelValue": C[6] || (C[6] = (y) => r("update:form", "minPrice", y ? h(_e.Dinero).zero().toObject() : void 0))
|
|
2750
2754
|
}, null, 8, ["disabled", "model-value", "value", "label"]),
|
|
2751
|
-
D("div",
|
|
2752
|
-
D("div",
|
|
2755
|
+
D("div", Sa, [
|
|
2756
|
+
D("div", Ra, [
|
|
2753
2757
|
_.form.minPrice ? (P(), W(Je, {
|
|
2754
2758
|
key: 0,
|
|
2755
2759
|
max: h(_e.Dinero).fromFdoDinero(_.form.price).toUnit(),
|
|
@@ -2776,10 +2780,10 @@ const ca = /* @__PURE__ */ se({
|
|
|
2776
2780
|
}), Aa = {
|
|
2777
2781
|
key: 0,
|
|
2778
2782
|
class: "flex flex-col space-y-16 h-[440px]"
|
|
2779
|
-
},
|
|
2783
|
+
}, Ma = { class: "flex-1 flex-shrink space-y-8 min-h-0 overflow-y-scroll p-8" }, xa = { class: "flex justify-between pb-16" }, Ia = { class: "flex gap-8" }, Oa = {
|
|
2780
2784
|
key: 1,
|
|
2781
2785
|
class: "flex flex-col items-center space-y-16"
|
|
2782
|
-
},
|
|
2786
|
+
}, za = { class: "flex flex-col items-center space-y-4 w-full" }, Ea = { class: "fm-typo-en-title-sm-600" }, Fa = { class: "text-fm-color-typo-secondary" }, Pa = /* @__PURE__ */ se({
|
|
2783
2787
|
__name: "SelectVariantDialog",
|
|
2784
2788
|
props: {
|
|
2785
2789
|
selectedVariants: {}
|
|
@@ -2796,18 +2800,18 @@ const ca = /* @__PURE__ */ se({
|
|
|
2796
2800
|
const d = L("FmSearch"), g = L("FmCheckbox"), w = L("FmButton");
|
|
2797
2801
|
return l.value.length > 0 ? (P(), Z("div", Aa, [
|
|
2798
2802
|
D("div", null, [
|
|
2799
|
-
|
|
2803
|
+
A(d, {
|
|
2800
2804
|
modelValue: u.value,
|
|
2801
2805
|
"onUpdate:modelValue": p[0] || (p[0] = (_) => u.value = _),
|
|
2802
2806
|
placeholder: h(o)("menu.common.labels.search_variants")
|
|
2803
2807
|
}, null, 8, ["modelValue", "placeholder"])
|
|
2804
2808
|
]),
|
|
2805
|
-
D("div",
|
|
2809
|
+
D("div", Ma, [
|
|
2806
2810
|
D("div", null, [
|
|
2807
2811
|
(P(!0), Z(Re, null, Ge(l.value, (_) => (P(), Z("div", {
|
|
2808
2812
|
key: _.value
|
|
2809
2813
|
}, [
|
|
2810
|
-
Xe(
|
|
2814
|
+
Xe(A(g, {
|
|
2811
2815
|
modelValue: s.value,
|
|
2812
2816
|
"onUpdate:modelValue": [
|
|
2813
2817
|
p[1] || (p[1] = (C) => s.value = C),
|
|
@@ -2821,8 +2825,8 @@ const ca = /* @__PURE__ */ se({
|
|
|
2821
2825
|
]))), 128))
|
|
2822
2826
|
])
|
|
2823
2827
|
]),
|
|
2824
|
-
D("div",
|
|
2825
|
-
|
|
2828
|
+
D("div", xa, [
|
|
2829
|
+
A(h(An), null, {
|
|
2826
2830
|
default: N(({ trigger: _ }) => [
|
|
2827
2831
|
h(a).rules.item.variant ? (P(), W(w, {
|
|
2828
2832
|
key: 0,
|
|
@@ -2834,26 +2838,26 @@ const ca = /* @__PURE__ */ se({
|
|
|
2834
2838
|
]),
|
|
2835
2839
|
_: 1
|
|
2836
2840
|
}),
|
|
2837
|
-
D("div",
|
|
2838
|
-
|
|
2841
|
+
D("div", Ia, [
|
|
2842
|
+
A(w, {
|
|
2839
2843
|
label: h(o)("menu.common.actions.cancel"),
|
|
2840
2844
|
variant: "tertiary",
|
|
2841
2845
|
onClick: p[3] || (p[3] = (_) => h(n).close())
|
|
2842
2846
|
}, null, 8, ["label"]),
|
|
2843
|
-
|
|
2847
|
+
A(w, {
|
|
2844
2848
|
label: h(o)("menu.common.actions.confirm"),
|
|
2845
2849
|
onClick: p[4] || (p[4] = (_) => c())
|
|
2846
2850
|
}, null, 8, ["label"])
|
|
2847
2851
|
])
|
|
2848
2852
|
])
|
|
2849
|
-
])) : (P(), Z("div",
|
|
2850
|
-
D("div",
|
|
2851
|
-
D("p",
|
|
2852
|
-
D("p",
|
|
2853
|
+
])) : (P(), Z("div", Oa, [
|
|
2854
|
+
D("div", za, [
|
|
2855
|
+
D("p", Ea, le(h(o)("menu.common.empty.no_variant.title")), 1),
|
|
2856
|
+
D("p", Fa, le(h(o)("menu.common.empty.no_variant.subtitle")), 1)
|
|
2853
2857
|
]),
|
|
2854
|
-
|
|
2858
|
+
A(h(An), null, {
|
|
2855
2859
|
default: N(({ trigger: _ }) => [
|
|
2856
|
-
|
|
2860
|
+
A(w, {
|
|
2857
2861
|
label: h(o)("menu.variant.add"),
|
|
2858
2862
|
icon: "add",
|
|
2859
2863
|
onClick: (C) => _()
|
|
@@ -2864,23 +2868,23 @@ const ca = /* @__PURE__ */ se({
|
|
|
2864
2868
|
]));
|
|
2865
2869
|
};
|
|
2866
2870
|
}
|
|
2867
|
-
}),
|
|
2868
|
-
function
|
|
2869
|
-
return P(), Z("div",
|
|
2870
|
-
D("div",
|
|
2871
|
+
}), Da = {}, Ta = { class: "overflow-x-auto" }, Ua = { class: "xs:w-[600px]" };
|
|
2872
|
+
function $a(e, n) {
|
|
2873
|
+
return P(), Z("div", Ta, [
|
|
2874
|
+
D("div", Ua, [
|
|
2871
2875
|
pe(e.$slots, "default")
|
|
2872
2876
|
])
|
|
2873
2877
|
]);
|
|
2874
2878
|
}
|
|
2875
|
-
const
|
|
2879
|
+
const hi = /* @__PURE__ */ lt(Da, [["render", $a]]), Va = {
|
|
2876
2880
|
class: "space-y-16"
|
|
2877
|
-
}, Va = {
|
|
2878
|
-
class: "flex items-center space-x-8"
|
|
2879
2881
|
}, Na = {
|
|
2880
|
-
class: "flex items-center
|
|
2882
|
+
class: "flex items-center space-x-8"
|
|
2881
2883
|
}, Ba = {
|
|
2884
|
+
class: "flex items-center flex-1 h-[36px] px-8 border border-fm-color-neutral-gray-300 rounded-md bg-fm-color-neutral-white"
|
|
2885
|
+
}, La = {
|
|
2882
2886
|
class: "flex-1 fm-typo-en-body-lg-400"
|
|
2883
|
-
},
|
|
2887
|
+
}, Ga = /* @__PURE__ */ se({
|
|
2884
2888
|
__name: "ProductVariants",
|
|
2885
2889
|
props: {
|
|
2886
2890
|
isOverride: {
|
|
@@ -2934,7 +2938,7 @@ const pi = /* @__PURE__ */ lt(Pa, [["render", Ua]]), $a = {
|
|
|
2934
2938
|
var y;
|
|
2935
2939
|
r.open({
|
|
2936
2940
|
title: "Add variant",
|
|
2937
|
-
contentComponent:
|
|
2941
|
+
contentComponent: Pa,
|
|
2938
2942
|
contentComponentProps: {
|
|
2939
2943
|
selectedVariants: ((y = t.form.variant) == null ? void 0 : y.variantGroupIds) ?? []
|
|
2940
2944
|
}
|
|
@@ -3038,7 +3042,7 @@ const pi = /* @__PURE__ */ lt(Pa, [["render", Ua]]), $a = {
|
|
|
3038
3042
|
modelValue: M,
|
|
3039
3043
|
placeholder: x || l("menu.product.form.variant.placeholders.no_code"),
|
|
3040
3044
|
"onUpdate:modelValue": (G) => {
|
|
3041
|
-
S(y.row.index, "code", G);
|
|
3045
|
+
S(y.row.index, "code", pi(G));
|
|
3042
3046
|
}
|
|
3043
3047
|
});
|
|
3044
3048
|
}
|
|
@@ -3101,7 +3105,7 @@ const pi = /* @__PURE__ */ lt(Pa, [["render", Ua]]), $a = {
|
|
|
3101
3105
|
}]), F = T(() => ({
|
|
3102
3106
|
minPrice: u.value
|
|
3103
3107
|
}));
|
|
3104
|
-
function
|
|
3108
|
+
function k(y) {
|
|
3105
3109
|
return y != null && y.length && y.length > i.rules.item.maxVariant ? l("menu.product.form.variant.validation.max_variants", {
|
|
3106
3110
|
max: i.rules.item.maxVariant
|
|
3107
3111
|
}) : !0;
|
|
@@ -3121,13 +3125,13 @@ const pi = /* @__PURE__ */ lt(Pa, [["render", Ua]]), $a = {
|
|
|
3121
3125
|
}, null, 8, ["label"])) : ee("", !0)]),
|
|
3122
3126
|
default: N(() => {
|
|
3123
3127
|
var R;
|
|
3124
|
-
return [D("div",
|
|
3128
|
+
return [D("div", Va, [A(x, {
|
|
3125
3129
|
"model-value": (R = y.form.variant) == null ? void 0 : R.variantGroupIds,
|
|
3126
|
-
rules: [
|
|
3130
|
+
rules: [k]
|
|
3127
3131
|
}, {
|
|
3128
3132
|
default: N(() => {
|
|
3129
3133
|
var G;
|
|
3130
|
-
return [
|
|
3134
|
+
return [A(h(Kn), {
|
|
3131
3135
|
"model-value": ((G = y.form.variant) == null ? void 0 : G.variantGroupIds) ?? [],
|
|
3132
3136
|
class: "space-y-16",
|
|
3133
3137
|
group: "variants",
|
|
@@ -3139,11 +3143,11 @@ const pi = /* @__PURE__ */ lt(Pa, [["render", Ua]]), $a = {
|
|
|
3139
3143
|
element: Y
|
|
3140
3144
|
}) => {
|
|
3141
3145
|
var Q;
|
|
3142
|
-
return [D("div",
|
|
3146
|
+
return [D("div", Na, [A(f, {
|
|
3143
3147
|
variant: h(Le).Tertiary,
|
|
3144
3148
|
class: "handle",
|
|
3145
3149
|
"prepend-icon": "drag_handle"
|
|
3146
|
-
}, null, 8, ["variant"]), D("div",
|
|
3150
|
+
}, null, 8, ["variant"]), D("div", Ba, [D("p", La, le((Q = m.value[Y]) == null ? void 0 : Q.name), 1), A(v, {
|
|
3147
3151
|
class: "cursor-pointer",
|
|
3148
3152
|
name: "close",
|
|
3149
3153
|
onClick: St((z) => {
|
|
@@ -3156,7 +3160,7 @@ const pi = /* @__PURE__ */ lt(Pa, [["render", Ua]]), $a = {
|
|
|
3156
3160
|
}, 8, ["model-value"])];
|
|
3157
3161
|
}),
|
|
3158
3162
|
_: 1
|
|
3159
|
-
}, 8, ["model-value", "rules"]),
|
|
3163
|
+
}, 8, ["model-value", "rules"]), A(hi, null, {
|
|
3160
3164
|
default: N(() => [E.value.length ? (P(), W(O, {
|
|
3161
3165
|
key: 0,
|
|
3162
3166
|
class: "w-full",
|
|
@@ -3174,7 +3178,7 @@ const pi = /* @__PURE__ */ lt(Pa, [["render", Ua]]), $a = {
|
|
|
3174
3178
|
}, 8, ["title", "sub-title"]);
|
|
3175
3179
|
};
|
|
3176
3180
|
}
|
|
3177
|
-
}),
|
|
3181
|
+
}), Wa = /* @__PURE__ */ se({
|
|
3178
3182
|
__name: "AddForm",
|
|
3179
3183
|
setup(e) {
|
|
3180
3184
|
const n = me(), t = T(() => n.rules.group), i = T(() => !!n.state.currentCatalogId || !!n.state.currentSchedulerId), a = T(() => {
|
|
@@ -3202,7 +3206,7 @@ const pi = /* @__PURE__ */ lt(Pa, [["render", Ua]]), $a = {
|
|
|
3202
3206
|
position: n.groups.length - 1,
|
|
3203
3207
|
itemsLinked: []
|
|
3204
3208
|
}), r = X(o()), { t: l } = ue();
|
|
3205
|
-
return (s, u) => t.value.create ? (P(), W(h(
|
|
3209
|
+
return (s, u) => t.value.create ? (P(), W(h(Cr), {
|
|
3206
3210
|
key: 0,
|
|
3207
3211
|
"categorized-items": h(n).categorizedItems,
|
|
3208
3212
|
config: a.value,
|
|
@@ -3240,7 +3244,7 @@ async function un() {
|
|
|
3240
3244
|
function st(e) {
|
|
3241
3245
|
return JSON.parse(JSON.stringify(e));
|
|
3242
3246
|
}
|
|
3243
|
-
function
|
|
3247
|
+
function Ka(e, n) {
|
|
3244
3248
|
var t, i, a;
|
|
3245
3249
|
if (((t = e.inventoryComponents) == null ? void 0 : t.componentType) === It.IFRAME_INVENTORY_BINDINGS_TABLE && (n.data.event === "ready" && ((i = n.source) == null || i.postMessage(
|
|
3246
3250
|
{ event: "config", data: e.inventoryComponents.authInfo },
|
|
@@ -3256,14 +3260,14 @@ function Wa(e, n) {
|
|
|
3256
3260
|
e.inventoryComponents.onOpenBindingDialog(r, o);
|
|
3257
3261
|
}
|
|
3258
3262
|
}
|
|
3259
|
-
function
|
|
3263
|
+
function ja(e) {
|
|
3260
3264
|
try {
|
|
3261
3265
|
return new URL(e), !0;
|
|
3262
3266
|
} catch {
|
|
3263
3267
|
return !1;
|
|
3264
3268
|
}
|
|
3265
3269
|
}
|
|
3266
|
-
function
|
|
3270
|
+
function Ya(e) {
|
|
3267
3271
|
const n = e.startsWith("/") ? e : `/${e}`;
|
|
3268
3272
|
try {
|
|
3269
3273
|
const t = new URL(n, "https://dummy");
|
|
@@ -3272,7 +3276,7 @@ function ja(e) {
|
|
|
3272
3276
|
return !1;
|
|
3273
3277
|
}
|
|
3274
3278
|
}
|
|
3275
|
-
function
|
|
3279
|
+
function Ha(e) {
|
|
3276
3280
|
const { protocol: n, hostname: t, pathname: i, port: a } = new URL(e);
|
|
3277
3281
|
return {
|
|
3278
3282
|
hostname: a ? `${n}//${t}:${a}` : `${n}//${t}`,
|
|
@@ -3280,18 +3284,18 @@ function Ya(e) {
|
|
|
3280
3284
|
};
|
|
3281
3285
|
}
|
|
3282
3286
|
function Nt(e, n) {
|
|
3283
|
-
if (
|
|
3287
|
+
if (ja(e))
|
|
3284
3288
|
throw new Error(
|
|
3285
3289
|
`cannot append path using ${e} to url ${n} because the path is already a valid url`
|
|
3286
3290
|
);
|
|
3287
|
-
if (!
|
|
3291
|
+
if (!Ya(e))
|
|
3288
3292
|
throw new Error(
|
|
3289
3293
|
`cannot append to ${n} because ${e} is not a valid pathname`
|
|
3290
3294
|
);
|
|
3291
|
-
const { hostname: t, pathname: i } =
|
|
3295
|
+
const { hostname: t, pathname: i } = Ha(n), a = e.startsWith("/") ? e : `/${e}`, o = i.endsWith("/") ? i.slice(0, i.length - 1) : i;
|
|
3292
3296
|
return new URL(`${o}${a}`, t).toString();
|
|
3293
3297
|
}
|
|
3294
|
-
function
|
|
3298
|
+
function Xa(e) {
|
|
3295
3299
|
return Array.from(document.getElementsByTagName("iframe")).filter((n) => n.contentWindow === e.source)[0];
|
|
3296
3300
|
}
|
|
3297
3301
|
function Bt(e, n) {
|
|
@@ -3300,7 +3304,7 @@ function Bt(e, n) {
|
|
|
3300
3304
|
value: n
|
|
3301
3305
|
}), e.appendChild(t), t;
|
|
3302
3306
|
}
|
|
3303
|
-
function
|
|
3307
|
+
function qa(e, n) {
|
|
3304
3308
|
var t, i, a;
|
|
3305
3309
|
((t = e.inventoryComponents) == null ? void 0 : t.componentType) === It.IFRAME_INVENTORY_BINDINGS_DIALOG && (n.data.event === "ready" && ((i = n.source) == null || i.postMessage(
|
|
3306
3310
|
{ event: "config", data: e.inventoryComponents.authInfo },
|
|
@@ -3315,7 +3319,7 @@ function Xa(e, n) {
|
|
|
3315
3319
|
n.data.data
|
|
3316
3320
|
), n.data.event === "@update:inventory-bindings" && e.inventoryComponents.onUpdateInventoryBinding(n.data.data));
|
|
3317
3321
|
}
|
|
3318
|
-
function
|
|
3322
|
+
function Za(e, n) {
|
|
3319
3323
|
var t, i, a;
|
|
3320
3324
|
((t = e.inventoryComponents) == null ? void 0 : t.componentType) === It.IFRAME_INVENTORY_BINDINGS_PICKER && (n.data.event === "ready" && ((i = n.source) == null || i.postMessage(
|
|
3321
3325
|
{ event: "config", data: e.inventoryComponents.authInfo },
|
|
@@ -3332,29 +3336,29 @@ function qa(e, n) {
|
|
|
3332
3336
|
)), n.data.event === "@submit:items" && e.inventoryComponents.onSubmitItems(n.data.data), n.data.event === "@close" && e.inventoryComponents.onCloseDialog());
|
|
3333
3337
|
}
|
|
3334
3338
|
var It = /* @__PURE__ */ ((e) => (e.IFRAME_INVENTORY_BINDINGS_TABLE = "/iframe/inventory-bindings/bindings-table", e.IFRAME_INVENTORY_BINDINGS_DIALOG = "/iframe/inventory-bindings/bindings-dialog", e.IFRAME_INVENTORY_BINDINGS_PICKER = "/iframe/inventory-bindings/bindings-picker", e))(It || {});
|
|
3335
|
-
function
|
|
3339
|
+
function Ja(e) {
|
|
3336
3340
|
var n;
|
|
3337
|
-
const t =
|
|
3341
|
+
const t = Xa(e);
|
|
3338
3342
|
if (e.data.event === "resize") {
|
|
3339
3343
|
t.style.minHeight = `${e.data.data}px`;
|
|
3340
3344
|
return;
|
|
3341
3345
|
}
|
|
3342
3346
|
switch ((n = t.inventoryComponents) == null ? void 0 : n.componentType) {
|
|
3343
3347
|
case "/iframe/inventory-bindings/bindings-table": {
|
|
3344
|
-
|
|
3348
|
+
Ka(t, e);
|
|
3345
3349
|
break;
|
|
3346
3350
|
}
|
|
3347
3351
|
case "/iframe/inventory-bindings/bindings-dialog": {
|
|
3348
|
-
|
|
3352
|
+
qa(t, e);
|
|
3349
3353
|
break;
|
|
3350
3354
|
}
|
|
3351
3355
|
case "/iframe/inventory-bindings/bindings-picker": {
|
|
3352
|
-
|
|
3356
|
+
Za(t, e);
|
|
3353
3357
|
break;
|
|
3354
3358
|
}
|
|
3355
3359
|
}
|
|
3356
3360
|
}
|
|
3357
|
-
window.addEventListener("message",
|
|
3361
|
+
window.addEventListener("message", Ja);
|
|
3358
3362
|
function cn(e = "https://inventory.feedmedev.cc/") {
|
|
3359
3363
|
function n(a, o, r) {
|
|
3360
3364
|
const l = Bt(a, {
|
|
@@ -3426,15 +3430,15 @@ function cn(e = "https://inventory.feedmedev.cc/") {
|
|
|
3426
3430
|
mountInventoryBindingPicker: i
|
|
3427
3431
|
};
|
|
3428
3432
|
}
|
|
3429
|
-
var
|
|
3430
|
-
const
|
|
3433
|
+
var Qa = { mainBackend: "https://portal-v2-dev.feedmeapi.com", menuBackend: "https://menu-v4-dev.feedmeapi.com", inventoryPortal: "https://inventory.feedmedev.cc/", remy: "https://remy-dev.feedmeapi.com/v1", firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDomain: "feedme-dev-4c3ef.firebaseapp.com", databaseURL: "https://feedme-dev-4c3ef.firebaseio.com", projectId: "feedme-dev-4c3ef", storageBucket: "feedme-dev-4c3ef.appspot.com", messagingSenderId: "458797803788", appId: "1:458797803788:web:37f2af2926a84288f0c129", measurementId: "G-J2QG09D2Q7" }, gtm: { id: "GTM-P7Z9FMS6", serverUrl: "https://server-side-tagging-rsrq3ogsuq-as.a.run.app", env: "development", serverMeasurementId: "G-759WBZPF06", debug: !0 } };
|
|
3434
|
+
const er = /* @__PURE__ */ se({
|
|
3431
3435
|
__name: "InventoryPicker",
|
|
3432
3436
|
props: {
|
|
3433
3437
|
type: { default: "RECIPE" },
|
|
3434
3438
|
bindings: { default: () => [] }
|
|
3435
3439
|
},
|
|
3436
3440
|
setup(e) {
|
|
3437
|
-
const n = e, t = xe(), i = X(), a = cn(
|
|
3441
|
+
const n = e, t = xe(), i = X(), a = cn(Qa.inventoryPortal);
|
|
3438
3442
|
ue();
|
|
3439
3443
|
async function o() {
|
|
3440
3444
|
if (i.value)
|
|
@@ -3462,8 +3466,8 @@ const Qa = /* @__PURE__ */ se({
|
|
|
3462
3466
|
}, null, 512));
|
|
3463
3467
|
}
|
|
3464
3468
|
});
|
|
3465
|
-
var
|
|
3466
|
-
const
|
|
3469
|
+
var tr = { mainBackend: "https://portal-v2-dev.feedmeapi.com", menuBackend: "https://menu-v4-dev.feedmeapi.com", inventoryPortal: "https://inventory.feedmedev.cc/", remy: "https://remy-dev.feedmeapi.com/v1", firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDomain: "feedme-dev-4c3ef.firebaseapp.com", databaseURL: "https://feedme-dev-4c3ef.firebaseio.com", projectId: "feedme-dev-4c3ef", storageBucket: "feedme-dev-4c3ef.appspot.com", messagingSenderId: "458797803788", appId: "1:458797803788:web:37f2af2926a84288f0c129", measurementId: "G-J2QG09D2Q7" }, gtm: { id: "GTM-P7Z9FMS6", serverUrl: "https://server-side-tagging-rsrq3ogsuq-as.a.run.app", env: "development", serverMeasurementId: "G-759WBZPF06", debug: !0 } };
|
|
3470
|
+
const nr = { class: "fm-typo-en-title-md-600 mr-auto" }, ir = { class: "space-y-40" }, or = { class: "flex gap-8 items-center justify-start" }, ar = /* @__PURE__ */ se({
|
|
3467
3471
|
__name: "Form",
|
|
3468
3472
|
props: {
|
|
3469
3473
|
bindingKey: {},
|
|
@@ -3485,7 +3489,7 @@ const tr = { class: "fm-typo-en-title-md-600 mr-auto" }, nr = { class: "space-y-
|
|
|
3485
3489
|
return;
|
|
3486
3490
|
l("update:inventory", r.value), o(!1);
|
|
3487
3491
|
}
|
|
3488
|
-
const u = X(), c = cn(
|
|
3492
|
+
const u = X(), c = cn(tr.inventoryPortal), m = X();
|
|
3489
3493
|
async function p() {
|
|
3490
3494
|
if (u.value)
|
|
3491
3495
|
try {
|
|
@@ -3520,7 +3524,7 @@ const tr = { class: "fm-typo-en-title-md-600 mr-auto" }, nr = { class: "space-y-
|
|
|
3520
3524
|
return new Promise((I) => {
|
|
3521
3525
|
d.open({
|
|
3522
3526
|
title: `Pick ${C === Lt.F_INVENTORY_BINDING_TYPE.enum.RECIPE ? "recipe" : "ingredient"}`,
|
|
3523
|
-
contentComponent:
|
|
3527
|
+
contentComponent: er,
|
|
3524
3528
|
contentComponentProps: {
|
|
3525
3529
|
type: C,
|
|
3526
3530
|
bindings: E
|
|
@@ -3546,10 +3550,10 @@ const tr = { class: "fm-typo-en-title-md-600 mr-auto" }, nr = { class: "space-y-
|
|
|
3546
3550
|
const I = L("fm-text-field"), S = L("fm-card"), b = L("fm-button"), F = L("fm-side-sheet");
|
|
3547
3551
|
return P(), Z(Re, null, [
|
|
3548
3552
|
pe(C.$slots, "default", { trigger: o }),
|
|
3549
|
-
|
|
3553
|
+
A(F, {
|
|
3550
3554
|
id: "inventory-form",
|
|
3551
3555
|
modelValue: a.value,
|
|
3552
|
-
"onUpdate:modelValue": E[2] || (E[2] = (
|
|
3556
|
+
"onUpdate:modelValue": E[2] || (E[2] = (k) => a.value = k),
|
|
3553
3557
|
"close-button": !1,
|
|
3554
3558
|
"is-container": h(Me).FmForm,
|
|
3555
3559
|
"is-container-props": {
|
|
@@ -3560,17 +3564,17 @@ const tr = { class: "fm-typo-en-title-md-600 mr-auto" }, nr = { class: "space-y-
|
|
|
3560
3564
|
"z-index": 100
|
|
3561
3565
|
}, {
|
|
3562
3566
|
"side-sheet-header": N(() => [
|
|
3563
|
-
D("p",
|
|
3567
|
+
D("p", nr, le(C.title || h(_)("menu.inventory.form.title")), 1)
|
|
3564
3568
|
]),
|
|
3565
3569
|
"side-sheet-footer": N(() => [
|
|
3566
|
-
D("div",
|
|
3567
|
-
|
|
3570
|
+
D("div", or, [
|
|
3571
|
+
A(b, {
|
|
3568
3572
|
label: h(_)("menu.common.actions.add"),
|
|
3569
3573
|
size: "lg",
|
|
3570
3574
|
type: "submit",
|
|
3571
3575
|
variant: "primary"
|
|
3572
3576
|
}, null, 8, ["label"]),
|
|
3573
|
-
|
|
3577
|
+
A(b, {
|
|
3574
3578
|
label: h(_)("menu.common.actions.cancel"),
|
|
3575
3579
|
size: "lg",
|
|
3576
3580
|
variant: "tertiary",
|
|
@@ -3579,13 +3583,13 @@ const tr = { class: "fm-typo-en-title-md-600 mr-auto" }, nr = { class: "space-y-
|
|
|
3579
3583
|
])
|
|
3580
3584
|
]),
|
|
3581
3585
|
default: N(() => [
|
|
3582
|
-
D("div",
|
|
3583
|
-
|
|
3586
|
+
D("div", ir, [
|
|
3587
|
+
A(I, {
|
|
3584
3588
|
"model-value": C.name,
|
|
3585
3589
|
disabled: "",
|
|
3586
3590
|
label: h(_)("menu.inventory.form.product_name")
|
|
3587
3591
|
}, null, 8, ["model-value", "label"]),
|
|
3588
|
-
|
|
3592
|
+
A(S, {
|
|
3589
3593
|
class: "p-16 space-y-24",
|
|
3590
3594
|
variant: "outlined"
|
|
3591
3595
|
}, {
|
|
@@ -3593,7 +3597,7 @@ const tr = { class: "fm-typo-en-title-md-600 mr-auto" }, nr = { class: "space-y-
|
|
|
3593
3597
|
D("div", {
|
|
3594
3598
|
ref_key: "inventoryDialogIframe",
|
|
3595
3599
|
ref: u,
|
|
3596
|
-
onVnodeMounted: E[0] || (E[0] = (
|
|
3600
|
+
onVnodeMounted: E[0] || (E[0] = (k) => p())
|
|
3597
3601
|
}, null, 512)
|
|
3598
3602
|
]),
|
|
3599
3603
|
_: 1
|
|
@@ -3605,15 +3609,15 @@ const tr = { class: "fm-typo-en-title-md-600 mr-auto" }, nr = { class: "space-y-
|
|
|
3605
3609
|
], 64);
|
|
3606
3610
|
};
|
|
3607
3611
|
}
|
|
3608
|
-
}), Qt =
|
|
3612
|
+
}), Qt = ar, rr = {
|
|
3609
3613
|
key: 0
|
|
3610
|
-
}, rr = {
|
|
3611
|
-
key: 1
|
|
3612
3614
|
}, sr = {
|
|
3613
|
-
|
|
3615
|
+
key: 1
|
|
3614
3616
|
}, lr = {
|
|
3617
|
+
class: "xs:overflow-x-scroll"
|
|
3618
|
+
}, ur = {
|
|
3615
3619
|
class: "xs:min-w-[640px]"
|
|
3616
|
-
},
|
|
3620
|
+
}, cr = /* @__PURE__ */ se({
|
|
3617
3621
|
__name: "OptionTable",
|
|
3618
3622
|
props: {
|
|
3619
3623
|
config: {},
|
|
@@ -3636,7 +3640,7 @@ const tr = { class: "fm-typo-en-title-md-600 mr-auto" }, nr = { class: "space-y-
|
|
|
3636
3640
|
}))])), {
|
|
3637
3641
|
searchKey: c,
|
|
3638
3642
|
filter: m
|
|
3639
|
-
} =
|
|
3643
|
+
} = Ci(), p = T(() => {
|
|
3640
3644
|
const z = Object.entries(t.group.items).filter(([, U]) => m([U.code || "", U.name || U.fallbackName, w(U.price ?? U.fallbackPrice), _(U.orderFrom || U.fallbackOrder), ...(U.items || []).map(($) => [$.code || "", $.name || $.fallbackName, w($.price ?? $.fallbackPrice), _($.orderFrom || $.fallbackOrder)].join(""))]));
|
|
3641
3645
|
return Object.fromEntries(z);
|
|
3642
3646
|
}), d = (z) => ({
|
|
@@ -3646,7 +3650,7 @@ const tr = { class: "fm-typo-en-title-md-600 mr-auto" }, nr = { class: "space-y-
|
|
|
3646
3650
|
orderFrom: t.config.orderFrom(z)
|
|
3647
3651
|
}), g = T(() => t.config.isItemGroup), w = (z) => z ? at(z, !1) : "", _ = (z) => {
|
|
3648
3652
|
var U;
|
|
3649
|
-
return z == null ? "" : (U =
|
|
3653
|
+
return z == null ? "" : (U = Si()[z]) == null ? void 0 : U.label;
|
|
3650
3654
|
}, C = T(() => Object.values(p.value)), E = X({}), {
|
|
3651
3655
|
t: I
|
|
3652
3656
|
} = ue(), S = X([{
|
|
@@ -3667,7 +3671,7 @@ const tr = { class: "fm-typo-en-title-md-600 mr-auto" }, nr = { class: "space-y-
|
|
|
3667
3671
|
if (!we) return;
|
|
3668
3672
|
y(we._id, $.combinationKey ?? "", "name", ne);
|
|
3669
3673
|
} else
|
|
3670
|
-
|
|
3674
|
+
k($._id, "name", ne);
|
|
3671
3675
|
},
|
|
3672
3676
|
class: "min-w-[300px]"
|
|
3673
3677
|
}, {
|
|
@@ -3712,7 +3716,7 @@ const tr = { class: "fm-typo-en-title-md-600 mr-auto" }, nr = { class: "space-y-
|
|
|
3712
3716
|
ne
|
|
3713
3717
|
);
|
|
3714
3718
|
} else
|
|
3715
|
-
|
|
3719
|
+
k($._id, "price", ne);
|
|
3716
3720
|
},
|
|
3717
3721
|
showCurrency: !1,
|
|
3718
3722
|
class: "min-w-[88px]"
|
|
@@ -3743,7 +3747,7 @@ const tr = { class: "fm-typo-en-title-md-600 mr-auto" }, nr = { class: "space-y-
|
|
|
3743
3747
|
ne
|
|
3744
3748
|
);
|
|
3745
3749
|
} else
|
|
3746
|
-
|
|
3750
|
+
k($._id, "orderFrom", ne);
|
|
3747
3751
|
},
|
|
3748
3752
|
label: "",
|
|
3749
3753
|
menuZIndex: 101
|
|
@@ -3759,9 +3763,9 @@ const tr = { class: "fm-typo-en-title-md-600 mr-auto" }, nr = { class: "space-y-
|
|
|
3759
3763
|
size: 80,
|
|
3760
3764
|
cell: (z) => {
|
|
3761
3765
|
const U = z.row.original, $ = z.row.depth > 0;
|
|
3762
|
-
return
|
|
3766
|
+
return A("div", {
|
|
3763
3767
|
class: "flex items-center"
|
|
3764
|
-
}, [d(U.combinationKey).inventory &&
|
|
3768
|
+
}, [d(U.combinationKey).inventory && A(Qt, {
|
|
3765
3769
|
title: "Inventory",
|
|
3766
3770
|
initialValue: U.inventoryBindings ?? [],
|
|
3767
3771
|
name: U.name ?? U.fallbackName ?? "",
|
|
@@ -3779,18 +3783,18 @@ const tr = { class: "fm-typo-en-title-md-600 mr-auto" }, nr = { class: "space-y-
|
|
|
3779
3783
|
J
|
|
3780
3784
|
);
|
|
3781
3785
|
} else
|
|
3782
|
-
|
|
3786
|
+
k(U._id, "inventoryBindings", J);
|
|
3783
3787
|
}
|
|
3784
3788
|
}, {
|
|
3785
3789
|
default: ({
|
|
3786
3790
|
trigger: J
|
|
3787
|
-
}) =>
|
|
3791
|
+
}) => A(L("fm-tooltip"), {
|
|
3788
3792
|
content: "Inventory",
|
|
3789
3793
|
zIndex: 110
|
|
3790
3794
|
}, {
|
|
3791
3795
|
default: () => {
|
|
3792
3796
|
var j;
|
|
3793
|
-
return [
|
|
3797
|
+
return [A(L("fm-button"), {
|
|
3794
3798
|
variant: Le.Tertiary,
|
|
3795
3799
|
prependIcon: "inventory_2",
|
|
3796
3800
|
overwriteIconOutline: (j = U.inventoryBindings) != null && j.length ? "filled" : "outline",
|
|
@@ -3799,7 +3803,7 @@ const tr = { class: "fm-typo-en-title-md-600 mr-auto" }, nr = { class: "space-y-
|
|
|
3799
3803
|
}, null)];
|
|
3800
3804
|
}
|
|
3801
3805
|
})
|
|
3802
|
-
}), d(U.combinationKey).link &&
|
|
3806
|
+
}), d(U.combinationKey).link && A(L("fm-button"), {
|
|
3803
3807
|
variant: Le.Tertiary,
|
|
3804
3808
|
prependIcon: "delete",
|
|
3805
3809
|
textColor: $e.NeutralGray400,
|
|
@@ -3838,7 +3842,7 @@ const tr = { class: "fm-typo-en-title-md-600 mr-auto" }, nr = { class: "space-y-
|
|
|
3838
3842
|
}
|
|
3839
3843
|
});
|
|
3840
3844
|
}
|
|
3841
|
-
function
|
|
3845
|
+
function k(z, U, $) {
|
|
3842
3846
|
const J = t.group.items[z];
|
|
3843
3847
|
if (!J) return;
|
|
3844
3848
|
const j = {
|
|
@@ -3874,7 +3878,7 @@ const tr = { class: "fm-typo-en-title-md-600 mr-auto" }, nr = { class: "space-y-
|
|
|
3874
3878
|
var $;
|
|
3875
3879
|
return z[U._id] = {
|
|
3876
3880
|
price: U.price,
|
|
3877
|
-
variants:
|
|
3881
|
+
variants: Ri((($ = U.variant) == null ? void 0 : $.variantCombinations) || [], "combinationKey")
|
|
3878
3882
|
}, z;
|
|
3879
3883
|
}, {})), x = (z) => {
|
|
3880
3884
|
var j, ne;
|
|
@@ -3913,7 +3917,7 @@ const tr = { class: "fm-typo-en-title-md-600 mr-auto" }, nr = { class: "space-y-
|
|
|
3913
3917
|
}, {
|
|
3914
3918
|
"append-title": N(() => [z.config.link() ? (P(), Z(Re, {
|
|
3915
3919
|
key: 0
|
|
3916
|
-
}, [s.value ? (P(), Z("div",
|
|
3920
|
+
}, [s.value ? (P(), Z("div", rr, [A(Li, {
|
|
3917
3921
|
"categorized-items": z.categorizedItems,
|
|
3918
3922
|
"initial-value": u.value,
|
|
3919
3923
|
"show-variant": z.config.bindToVariant,
|
|
@@ -3923,7 +3927,7 @@ const tr = { class: "fm-typo-en-title-md-600 mr-auto" }, nr = { class: "space-y-
|
|
|
3923
3927
|
}, {
|
|
3924
3928
|
default: N(({
|
|
3925
3929
|
trigger: j
|
|
3926
|
-
}) => [
|
|
3930
|
+
}) => [A($, {
|
|
3927
3931
|
"text-color": h($e).ColorPrimary,
|
|
3928
3932
|
"border-color": h($e).ColorPrimary,
|
|
3929
3933
|
variant: "secondary",
|
|
@@ -3932,7 +3936,7 @@ const tr = { class: "fm-typo-en-title-md-600 mr-auto" }, nr = { class: "space-y-
|
|
|
3932
3936
|
onClick: j
|
|
3933
3937
|
}, null, 8, ["text-color", "border-color", "label", "onClick"])]),
|
|
3934
3938
|
_: 1
|
|
3935
|
-
}, 8, ["categorized-items", "initial-value", "show-variant", "title"])])) : (P(), Z("div",
|
|
3939
|
+
}, 8, ["categorized-items", "initial-value", "show-variant", "title"])])) : (P(), Z("div", sr, [A($, {
|
|
3936
3940
|
"text-color": h($e).ColorPrimary,
|
|
3937
3941
|
"border-color": h($e).ColorPrimary,
|
|
3938
3942
|
variant: "secondary",
|
|
@@ -3940,7 +3944,7 @@ const tr = { class: "fm-typo-en-title-md-600 mr-auto" }, nr = { class: "space-y-
|
|
|
3940
3944
|
"prepend-icon": "add",
|
|
3941
3945
|
onClick: F
|
|
3942
3946
|
}, null, 8, ["text-color", "border-color", "label"])]))], 64)) : ee("", !0)]),
|
|
3943
|
-
default: N(() => [D("div",
|
|
3947
|
+
default: N(() => [D("div", lr, [D("div", ur, [A(J, {
|
|
3944
3948
|
"column-defs": S.value,
|
|
3945
3949
|
"column-visibility": b.value,
|
|
3946
3950
|
draggable: !Q.value && d(null).name,
|
|
@@ -3959,16 +3963,16 @@ const tr = { class: "fm-typo-en-title-md-600 mr-auto" }, nr = { class: "space-y-
|
|
|
3959
3963
|
}, 8, ["title"]);
|
|
3960
3964
|
};
|
|
3961
3965
|
}
|
|
3962
|
-
}),
|
|
3963
|
-
function
|
|
3964
|
-
return P(), Z("div",
|
|
3966
|
+
}), dr = {}, mr = { class: "flex gap-16" };
|
|
3967
|
+
function pr(e, n) {
|
|
3968
|
+
return P(), Z("div", mr, [
|
|
3965
3969
|
pe(e.$slots, "default")
|
|
3966
3970
|
]);
|
|
3967
3971
|
}
|
|
3968
|
-
const
|
|
3972
|
+
const hr = /* @__PURE__ */ lt(dr, [["render", pr]]), fr = { class: "fm-typo-en-title-md-600" }, vr = {
|
|
3969
3973
|
key: 0,
|
|
3970
3974
|
class: "pt-8 space-y-32"
|
|
3971
|
-
},
|
|
3975
|
+
}, gr = { class: "flex gap-8 items-center justify-start" }, fi = /* @__PURE__ */ se({
|
|
3972
3976
|
__name: "Form",
|
|
3973
3977
|
props: {
|
|
3974
3978
|
title: {},
|
|
@@ -4027,7 +4031,7 @@ const pr = /* @__PURE__ */ lt(cr, [["render", mr]]), hr = { class: "fm-typo-en-t
|
|
|
4027
4031
|
m.value.isOverride
|
|
4028
4032
|
)[0];
|
|
4029
4033
|
}
|
|
4030
|
-
const _ = X(Ne.clone(i.group)), C =
|
|
4034
|
+
const _ = X(Ne.clone(i.group)), C = Ni(
|
|
4031
4035
|
() => !Ne.isEqual(i.group, _.value),
|
|
4032
4036
|
() => {
|
|
4033
4037
|
u.value = !1;
|
|
@@ -4062,10 +4066,10 @@ const pr = /* @__PURE__ */ lt(cr, [["render", mr]]), hr = { class: "fm-typo-en-t
|
|
|
4062
4066
|
});
|
|
4063
4067
|
const { t: I } = ue();
|
|
4064
4068
|
return (S, b) => {
|
|
4065
|
-
const F = L("fm-text-field"),
|
|
4069
|
+
const F = L("fm-text-field"), k = L("fm-stepper-field"), y = L("FmFormGroup"), M = L("fm-radio"), f = L("fm-radio-group"), v = L("fm-switch"), x = L("fm-button"), O = L("fm-side-sheet");
|
|
4066
4070
|
return P(), Z(Re, null, [
|
|
4067
4071
|
pe(S.$slots, "default", { trigger: c }),
|
|
4068
|
-
|
|
4072
|
+
A(O, {
|
|
4069
4073
|
id: "group-form",
|
|
4070
4074
|
modelValue: u.value,
|
|
4071
4075
|
"onUpdate:modelValue": b[8] || (b[8] = (R) => u.value = R),
|
|
@@ -4079,18 +4083,18 @@ const pr = /* @__PURE__ */ lt(cr, [["render", mr]]), hr = { class: "fm-typo-en-t
|
|
|
4079
4083
|
"onOn:clickedAway": h(C)
|
|
4080
4084
|
}, {
|
|
4081
4085
|
"side-sheet-header": N(() => [
|
|
4082
|
-
D("p",
|
|
4086
|
+
D("p", fr, le(S.title), 1)
|
|
4083
4087
|
]),
|
|
4084
4088
|
"side-sheet-footer": N(() => [
|
|
4085
|
-
D("div",
|
|
4086
|
-
|
|
4087
|
-
label: h(
|
|
4089
|
+
D("div", gr, [
|
|
4090
|
+
A(x, {
|
|
4091
|
+
label: h(Gi)(S.action),
|
|
4088
4092
|
loading: s.value,
|
|
4089
4093
|
size: "lg",
|
|
4090
4094
|
type: "submit",
|
|
4091
4095
|
variant: "primary"
|
|
4092
4096
|
}, null, 8, ["label", "loading"]),
|
|
4093
|
-
|
|
4097
|
+
A(x, {
|
|
4094
4098
|
label: h(I)("menu.common.actions.cancel"),
|
|
4095
4099
|
size: "lg",
|
|
4096
4100
|
variant: "tertiary",
|
|
@@ -4099,12 +4103,12 @@ const pr = /* @__PURE__ */ lt(cr, [["render", mr]]), hr = { class: "fm-typo-en-t
|
|
|
4099
4103
|
])
|
|
4100
4104
|
]),
|
|
4101
4105
|
default: N(() => [
|
|
4102
|
-
S.group ? (P(), Z("div",
|
|
4106
|
+
S.group ? (P(), Z("div", vr, [
|
|
4103
4107
|
pe(S.$slots, "variant-section"),
|
|
4104
|
-
|
|
4108
|
+
A($i, null, {
|
|
4105
4109
|
default: N(() => [
|
|
4106
4110
|
D("div", null, [
|
|
4107
|
-
|
|
4111
|
+
A(F, {
|
|
4108
4112
|
modelValue: S.group.name,
|
|
4109
4113
|
"onUpdate:modelValue": b[0] || (b[0] = (R) => S.group.name = R),
|
|
4110
4114
|
disabled: !m.value.link(),
|
|
@@ -4115,14 +4119,14 @@ const pr = /* @__PURE__ */ lt(cr, [["render", mr]]), hr = { class: "fm-typo-en-t
|
|
|
4115
4119
|
label: h(I)("menu.common.labels.group_name")
|
|
4116
4120
|
}, null, 8, ["modelValue", "disabled", "rules", "label"])
|
|
4117
4121
|
]),
|
|
4118
|
-
|
|
4122
|
+
A(y, {
|
|
4119
4123
|
"model-value": S.group,
|
|
4120
4124
|
rules: [() => S.group.min <= S.group.max || h(I)("menu.common.validation.min_max")]
|
|
4121
4125
|
}, {
|
|
4122
4126
|
default: N(() => [
|
|
4123
|
-
|
|
4127
|
+
A(hr, null, {
|
|
4124
4128
|
default: N(() => [
|
|
4125
|
-
k
|
|
4129
|
+
A(k, {
|
|
4126
4130
|
modelValue: S.group.min,
|
|
4127
4131
|
"onUpdate:modelValue": b[1] || (b[1] = (R) => S.group.min = R),
|
|
4128
4132
|
disabled: !m.value.link(),
|
|
@@ -4130,7 +4134,7 @@ const pr = /* @__PURE__ */ lt(cr, [["render", mr]]), hr = { class: "fm-typo-en-t
|
|
|
4130
4134
|
class: "flex-1",
|
|
4131
4135
|
label: h(I)("menu.common.labels.min_select")
|
|
4132
4136
|
}, null, 8, ["modelValue", "disabled", "label"]),
|
|
4133
|
-
k
|
|
4137
|
+
A(k, {
|
|
4134
4138
|
modelValue: S.group.max,
|
|
4135
4139
|
"onUpdate:modelValue": b[2] || (b[2] = (R) => S.group.max = R),
|
|
4136
4140
|
disabled: !m.value.link(),
|
|
@@ -4149,7 +4153,7 @@ const pr = /* @__PURE__ */ lt(cr, [["render", mr]]), hr = { class: "fm-typo-en-t
|
|
|
4149
4153
|
label: h(I)("menu.common.labels.group_type")
|
|
4150
4154
|
}, {
|
|
4151
4155
|
default: N(() => [
|
|
4152
|
-
|
|
4156
|
+
A(f, {
|
|
4153
4157
|
disabled: !m.value.type,
|
|
4154
4158
|
"model-value": S.group.type,
|
|
4155
4159
|
"onUpdate:modelValue": b[3] || (b[3] = (R) => g(R))
|
|
@@ -4166,11 +4170,11 @@ const pr = /* @__PURE__ */ lt(cr, [["render", mr]]), hr = { class: "fm-typo-en-t
|
|
|
4166
4170
|
]),
|
|
4167
4171
|
_: 1
|
|
4168
4172
|
}, 8, ["label"])) : ee("", !0),
|
|
4169
|
-
|
|
4173
|
+
A(Qe, {
|
|
4170
4174
|
label: h(I)("menu.common.labels.configuration")
|
|
4171
4175
|
}, {
|
|
4172
4176
|
default: N(() => [
|
|
4173
|
-
|
|
4177
|
+
A(v, {
|
|
4174
4178
|
modelValue: S.group.stackable,
|
|
4175
4179
|
"onUpdate:modelValue": b[4] || (b[4] = (R) => S.group.stackable = R),
|
|
4176
4180
|
disabled: !m.value.link(),
|
|
@@ -4184,7 +4188,7 @@ const pr = /* @__PURE__ */ lt(cr, [["render", mr]]), hr = { class: "fm-typo-en-t
|
|
|
4184
4188
|
]),
|
|
4185
4189
|
_: 1
|
|
4186
4190
|
}),
|
|
4187
|
-
|
|
4191
|
+
A(cr, {
|
|
4188
4192
|
"allow-refund-inventory": S.allowRefundInventory ?? !1,
|
|
4189
4193
|
"categorized-items": S.categorizedItems,
|
|
4190
4194
|
config: m.value,
|
|
@@ -4199,7 +4203,7 @@ const pr = /* @__PURE__ */ lt(cr, [["render", mr]]), hr = { class: "fm-typo-en-t
|
|
|
4199
4203
|
], 64);
|
|
4200
4204
|
};
|
|
4201
4205
|
}
|
|
4202
|
-
}),
|
|
4206
|
+
}), br = { class: "fm-typo-en-title-sm-600" }, yr = { class: "flex items-end space-x-24" }, _r = { class: "flex" }, wr = /* @__PURE__ */ se({
|
|
4203
4207
|
__name: "UpdateForm",
|
|
4204
4208
|
props: {
|
|
4205
4209
|
combinations: {},
|
|
@@ -4243,25 +4247,25 @@ const pr = /* @__PURE__ */ lt(cr, [["render", mr]]), hr = { class: "fm-typo-en-t
|
|
|
4243
4247
|
});
|
|
4244
4248
|
function d(F) {
|
|
4245
4249
|
var f, v;
|
|
4246
|
-
const
|
|
4250
|
+
const k = (f = s.value[c.value].groups) == null ? void 0 : f.findIndex(
|
|
4247
4251
|
(x) => x._id === i.groupId
|
|
4248
4252
|
), y = ae(s.value), M = { ...nn(F), _id: i.groupId, groupKey: "" };
|
|
4249
|
-
(
|
|
4253
|
+
(k ?? -1) < 0 ? y[c.value] = {
|
|
4250
4254
|
...y[c.value],
|
|
4251
4255
|
groups: [...((v = y[c.value]) == null ? void 0 : v.groups) || [], M]
|
|
4252
|
-
} : y[c.value].groups[
|
|
4256
|
+
} : y[c.value].groups[k] = M, s.value = y;
|
|
4253
4257
|
}
|
|
4254
4258
|
function g(F) {
|
|
4255
|
-
const
|
|
4259
|
+
const k = m.value.length;
|
|
4256
4260
|
let y = c.value;
|
|
4257
|
-
F === "left" ? y = y === 0 ?
|
|
4261
|
+
F === "left" ? y = y === 0 ? k - 1 : y - 1 : y = y === k - 1 ? 0 : y + 1, u.value = m.value[y].value;
|
|
4258
4262
|
}
|
|
4259
4263
|
function w(F) {
|
|
4260
4264
|
return {
|
|
4261
4265
|
isV4: o.version === B.F_MENU_VERSION.enum.v4,
|
|
4262
|
-
link: (
|
|
4263
|
-
orderFrom: (
|
|
4264
|
-
name: (
|
|
4266
|
+
link: (k) => !1,
|
|
4267
|
+
orderFrom: (k) => !0,
|
|
4268
|
+
name: (k) => !1,
|
|
4265
4269
|
bindToVariant: !1,
|
|
4266
4270
|
inventory: !0,
|
|
4267
4271
|
orderFromActiveOnly: o.rules.item.orderFromActiveOnly,
|
|
@@ -4288,9 +4292,9 @@ const pr = /* @__PURE__ */ lt(cr, [["render", mr]]), hr = { class: "fm-typo-en-t
|
|
|
4288
4292
|
trigger: (b = E.value) == null ? void 0 : b.trigger
|
|
4289
4293
|
});
|
|
4290
4294
|
const { t: I } = ue();
|
|
4291
|
-
return (F,
|
|
4295
|
+
return (F, k) => {
|
|
4292
4296
|
const y = L("fm-select"), M = L("fm-button"), f = L("fm-card");
|
|
4293
|
-
return P(), W(
|
|
4297
|
+
return P(), W(fi, {
|
|
4294
4298
|
ref_key: "sheet",
|
|
4295
4299
|
ref: E,
|
|
4296
4300
|
"allow-refund-inventory": !0,
|
|
@@ -4299,9 +4303,9 @@ const pr = /* @__PURE__ */ lt(cr, [["render", mr]]), hr = { class: "fm-typo-en-t
|
|
|
4299
4303
|
group: p.value,
|
|
4300
4304
|
action: "update",
|
|
4301
4305
|
title: h(I)("menu.group.update"),
|
|
4302
|
-
"onUpdate:group":
|
|
4303
|
-
"onSubmit:group":
|
|
4304
|
-
"onStatus:show":
|
|
4306
|
+
"onUpdate:group": k[3] || (k[3] = (v) => d(v)),
|
|
4307
|
+
"onSubmit:group": k[4] || (k[4] = (v) => _()),
|
|
4308
|
+
"onStatus:show": k[5] || (k[5] = (v) => C.value = v)
|
|
4305
4309
|
}, {
|
|
4306
4310
|
default: N(({ trigger: v }) => [
|
|
4307
4311
|
pe(F.$slots, "default", { trigger: v })
|
|
@@ -4313,27 +4317,27 @@ const pr = /* @__PURE__ */ lt(cr, [["render", mr]]), hr = { class: "fm-typo-en-t
|
|
|
4313
4317
|
variant: "outlined"
|
|
4314
4318
|
}, {
|
|
4315
4319
|
default: N(() => [
|
|
4316
|
-
D("p",
|
|
4317
|
-
D("div",
|
|
4318
|
-
|
|
4320
|
+
D("p", br, le(h(I)("menu.group.option.variant")), 1),
|
|
4321
|
+
D("div", yr, [
|
|
4322
|
+
A(y, {
|
|
4319
4323
|
modelValue: u.value,
|
|
4320
|
-
"onUpdate:modelValue":
|
|
4324
|
+
"onUpdate:modelValue": k[0] || (k[0] = (v) => u.value = v),
|
|
4321
4325
|
items: m.value,
|
|
4322
4326
|
"menu-z-index": 103,
|
|
4323
4327
|
class: "flex-1"
|
|
4324
4328
|
}, null, 8, ["modelValue", "items"]),
|
|
4325
|
-
D("div",
|
|
4326
|
-
|
|
4329
|
+
D("div", _r, [
|
|
4330
|
+
A(M, {
|
|
4327
4331
|
variant: h(Le).Tertiary,
|
|
4328
4332
|
"prepend-icon": "keyboard_arrow_left",
|
|
4329
4333
|
size: "lg",
|
|
4330
|
-
onClick:
|
|
4334
|
+
onClick: k[1] || (k[1] = (v) => g("left"))
|
|
4331
4335
|
}, null, 8, ["variant"]),
|
|
4332
|
-
|
|
4336
|
+
A(M, {
|
|
4333
4337
|
variant: h(Le).Tertiary,
|
|
4334
4338
|
"prepend-icon": "keyboard_arrow_right",
|
|
4335
4339
|
size: "lg",
|
|
4336
|
-
onClick:
|
|
4340
|
+
onClick: k[2] || (k[2] = (v) => g("right"))
|
|
4337
4341
|
}, null, 8, ["variant"])
|
|
4338
4342
|
])
|
|
4339
4343
|
])
|
|
@@ -4345,13 +4349,13 @@ const pr = /* @__PURE__ */ lt(cr, [["render", mr]]), hr = { class: "fm-typo-en-t
|
|
|
4345
4349
|
}, 8, ["categorized-items", "group", "title"]);
|
|
4346
4350
|
};
|
|
4347
4351
|
}
|
|
4348
|
-
}),
|
|
4352
|
+
}), Cr = fi, Un = Wa, Sr = wr, Rr = {
|
|
4349
4353
|
key: 0,
|
|
4350
4354
|
class: "flex flex-col space-y-16 h-[440px]"
|
|
4351
|
-
},
|
|
4355
|
+
}, kr = { class: "flex-1 flex-shrink space-y-8 min-h-0 overflow-y-scroll p-8" }, Ar = { class: "flex justify-between pb-16" }, Mr = { class: "flex gap-8" }, xr = {
|
|
4352
4356
|
key: 1,
|
|
4353
4357
|
class: "flex flex-col items-center space-y-16"
|
|
4354
|
-
},
|
|
4358
|
+
}, Ir = { class: "flex flex-col items-center space-y-4 w-full" }, Or = { class: "fm-typo-en-title-sm-600" }, zr = { class: "text-fm-color-typo-secondary" }, Er = /* @__PURE__ */ se({
|
|
4355
4359
|
__name: "SelectGroupDialog",
|
|
4356
4360
|
props: {
|
|
4357
4361
|
groupIds: {}
|
|
@@ -4363,7 +4367,7 @@ const pr = /* @__PURE__ */ lt(cr, [["render", mr]]), hr = { class: "fm-typo-en-t
|
|
|
4363
4367
|
}
|
|
4364
4368
|
const u = T(() => s(l.value).reduce((E, I) => (E[I._id] = {
|
|
4365
4369
|
name: I.name,
|
|
4366
|
-
type:
|
|
4370
|
+
type: kt(o.items, I.items)
|
|
4367
4371
|
}, E), {})), c = T(() => [
|
|
4368
4372
|
...Object.entries(u.value).map(([E, { name: I, type: S }]) => ({
|
|
4369
4373
|
label: `${I} ${r.value.type ? `(${Kt(S)})` : ""}`.trim(),
|
|
@@ -4398,74 +4402,74 @@ const pr = /* @__PURE__ */ lt(cr, [["render", mr]]), hr = { class: "fm-typo-en-t
|
|
|
4398
4402
|
};
|
|
4399
4403
|
return (E, I) => {
|
|
4400
4404
|
const S = L("FmSearch"), b = L("FmCheckbox"), F = L("FmButton");
|
|
4401
|
-
return c.value.length > 0 ? (P(), Z("div",
|
|
4405
|
+
return c.value.length > 0 ? (P(), Z("div", Rr, [
|
|
4402
4406
|
D("div", null, [
|
|
4403
|
-
|
|
4407
|
+
A(S, {
|
|
4404
4408
|
modelValue: w.value,
|
|
4405
|
-
"onUpdate:modelValue": I[0] || (I[0] = (
|
|
4409
|
+
"onUpdate:modelValue": I[0] || (I[0] = (k) => w.value = k),
|
|
4406
4410
|
placeholder: h(_)("menu.common.labels.search_groups")
|
|
4407
4411
|
}, null, 8, ["modelValue", "placeholder"])
|
|
4408
4412
|
]),
|
|
4409
|
-
D("div",
|
|
4413
|
+
D("div", kr, [
|
|
4410
4414
|
D("div", null, [
|
|
4411
|
-
(P(!0), Z(Re, null, Ge(c.value, (
|
|
4412
|
-
key:
|
|
4415
|
+
(P(!0), Z(Re, null, Ge(c.value, (k) => (P(), Z("div", {
|
|
4416
|
+
key: k.value
|
|
4413
4417
|
}, [
|
|
4414
|
-
Xe(
|
|
4418
|
+
Xe(A(b, {
|
|
4415
4419
|
modelValue: g.value,
|
|
4416
4420
|
"onUpdate:modelValue": [
|
|
4417
4421
|
I[1] || (I[1] = (y) => g.value = y),
|
|
4418
4422
|
I[2] || (I[2] = (y) => h(i)(g.value))
|
|
4419
4423
|
],
|
|
4420
|
-
label:
|
|
4421
|
-
value:
|
|
4424
|
+
label: k.label,
|
|
4425
|
+
value: k.value
|
|
4422
4426
|
}, null, 8, ["modelValue", "label", "value"]), [
|
|
4423
|
-
[Ct,
|
|
4427
|
+
[Ct, k.label.toLowerCase().includes(w.value.toLowerCase())]
|
|
4424
4428
|
])
|
|
4425
4429
|
]))), 128))
|
|
4426
4430
|
])
|
|
4427
4431
|
]),
|
|
4428
4432
|
D("div", Ar, [
|
|
4429
|
-
|
|
4430
|
-
default: N(({ trigger:
|
|
4431
|
-
|
|
4433
|
+
A(h(Un), null, {
|
|
4434
|
+
default: N(({ trigger: k }) => [
|
|
4435
|
+
A(F, {
|
|
4432
4436
|
label: h(_)("menu.common.actions.add_group"),
|
|
4433
4437
|
variant: "tertiary",
|
|
4434
4438
|
"text-color": "primary",
|
|
4435
|
-
onClick: (y) =>
|
|
4439
|
+
onClick: (y) => k()
|
|
4436
4440
|
}, null, 8, ["label", "onClick"])
|
|
4437
4441
|
]),
|
|
4438
4442
|
_: 1
|
|
4439
4443
|
}),
|
|
4440
|
-
D("div",
|
|
4441
|
-
|
|
4444
|
+
D("div", Mr, [
|
|
4445
|
+
A(F, {
|
|
4442
4446
|
label: h(_)("menu.common.actions.cancel"),
|
|
4443
4447
|
variant: "tertiary",
|
|
4444
|
-
onClick: I[3] || (I[3] = (
|
|
4448
|
+
onClick: I[3] || (I[3] = (k) => h(t).close())
|
|
4445
4449
|
}, null, 8, ["label"]),
|
|
4446
|
-
|
|
4450
|
+
A(F, {
|
|
4447
4451
|
label: h(_)("menu.common.actions.confirm"),
|
|
4448
|
-
onClick: I[4] || (I[4] = (
|
|
4452
|
+
onClick: I[4] || (I[4] = (k) => C())
|
|
4449
4453
|
}, null, 8, ["label"])
|
|
4450
4454
|
])
|
|
4451
4455
|
])
|
|
4452
|
-
])) : (P(), Z("div",
|
|
4453
|
-
D("div",
|
|
4454
|
-
D("p",
|
|
4455
|
-
D("p",
|
|
4456
|
+
])) : (P(), Z("div", xr, [
|
|
4457
|
+
D("div", Ir, [
|
|
4458
|
+
D("p", Or, le(h(_)("menu.common.empty.no_group.title")), 1),
|
|
4459
|
+
D("p", zr, le(h(_)("menu.common.empty.no_group.subtitle")), 1)
|
|
4456
4460
|
]),
|
|
4457
|
-
|
|
4461
|
+
A(h(Un), {
|
|
4458
4462
|
"categorized-items": h(o).categorizedItems,
|
|
4459
4463
|
config: p.value,
|
|
4460
4464
|
group: d.value,
|
|
4461
4465
|
action: "add",
|
|
4462
4466
|
title: h(_)("menu.group.add")
|
|
4463
4467
|
}, {
|
|
4464
|
-
default: N(({ trigger:
|
|
4465
|
-
|
|
4468
|
+
default: N(({ trigger: k }) => [
|
|
4469
|
+
A(F, {
|
|
4466
4470
|
label: h(_)("menu.common.actions.add_group"),
|
|
4467
4471
|
icon: "add",
|
|
4468
|
-
onClick: (y) =>
|
|
4472
|
+
onClick: (y) => k()
|
|
4469
4473
|
}, null, 8, ["label", "onClick"])
|
|
4470
4474
|
]),
|
|
4471
4475
|
_: 1
|
|
@@ -4473,7 +4477,7 @@ const pr = /* @__PURE__ */ lt(cr, [["render", mr]]), hr = { class: "fm-typo-en-t
|
|
|
4473
4477
|
]));
|
|
4474
4478
|
};
|
|
4475
4479
|
}
|
|
4476
|
-
}),
|
|
4480
|
+
}), Fr = /* @__PURE__ */ se({
|
|
4477
4481
|
__name: "ProductGroup",
|
|
4478
4482
|
props: {
|
|
4479
4483
|
isOverride: {
|
|
@@ -4513,7 +4517,7 @@ const pr = /* @__PURE__ */ lt(cr, [["render", mr]]), hr = { class: "fm-typo-en-t
|
|
|
4513
4517
|
}
|
|
4514
4518
|
const g = T(() => d(c.value).reduce((f, v) => (f[v._id] = {
|
|
4515
4519
|
name: v.name,
|
|
4516
|
-
type:
|
|
4520
|
+
type: kt(i.items, v.items)
|
|
4517
4521
|
}, f), {})), w = T(() => [...Object.entries(g.value).map(([f, {
|
|
4518
4522
|
name: v,
|
|
4519
4523
|
type: x
|
|
@@ -4553,7 +4557,7 @@ const pr = /* @__PURE__ */ lt(cr, [["render", mr]]), hr = { class: "fm-typo-en-t
|
|
|
4553
4557
|
onClick: St(async () => {
|
|
4554
4558
|
I(v);
|
|
4555
4559
|
}, ["stop", "prevent"])
|
|
4556
|
-
}), ce(
|
|
4560
|
+
}), ce(Sr, {
|
|
4557
4561
|
combinations: b.value ?? [],
|
|
4558
4562
|
fullCombinations: t.fullCombinations,
|
|
4559
4563
|
groupId: v,
|
|
@@ -4577,7 +4581,7 @@ const pr = /* @__PURE__ */ lt(cr, [["render", mr]]), hr = { class: "fm-typo-en-t
|
|
|
4577
4581
|
function C() {
|
|
4578
4582
|
o.open({
|
|
4579
4583
|
title: "Add group",
|
|
4580
|
-
contentComponent:
|
|
4584
|
+
contentComponent: Er,
|
|
4581
4585
|
contentComponentProps: {
|
|
4582
4586
|
groupIds: p.value
|
|
4583
4587
|
}
|
|
@@ -4640,21 +4644,21 @@ const pr = /* @__PURE__ */ lt(cr, [["render", mr]]), hr = { class: "fm-typo-en-t
|
|
|
4640
4644
|
position: i.groups.length - 1,
|
|
4641
4645
|
itemsLinked: []
|
|
4642
4646
|
}));
|
|
4643
|
-
const
|
|
4647
|
+
const k = T(() => !!i.state.currentCatalogId || !!i.state.currentSchedulerId);
|
|
4644
4648
|
T(() => {
|
|
4645
4649
|
const f = !i.state.currentSchedulerId, v = i.rules.group.type, x = i.version == B.F_MENU_VERSION.enum.v3, O = i.rules.item.orderFromActiveOnly, R = i.rules.item.bindToVariant;
|
|
4646
4650
|
return function(Y) {
|
|
4647
4651
|
return {
|
|
4648
|
-
link: (Q) => !
|
|
4649
|
-
name: (Q) => !
|
|
4650
|
-
type: v && !Y._id && !
|
|
4652
|
+
link: (Q) => !k.value && (!Q || R),
|
|
4653
|
+
name: (Q) => !k.value && !Q,
|
|
4654
|
+
type: v && !Y._id && !k.value,
|
|
4651
4655
|
price: Y.type != B.F_ADDON_GROUP_TYPE.enum.DYNAMIC,
|
|
4652
|
-
inventory: f ? x ? !
|
|
4653
|
-
orderFrom: (Q) => f ? x ? Y.type == B.F_ADDON_GROUP_TYPE.enum.DYNAMIC ?
|
|
4656
|
+
inventory: f ? x ? !k.value && Y.type == B.F_ADDON_GROUP_TYPE.enum.NORMAL : !k.value : !1,
|
|
4657
|
+
orderFrom: (Q) => f ? x ? Y.type == B.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? k.value : !!k.value == !Q : k.value : !1,
|
|
4654
4658
|
orderFromActiveOnly: O,
|
|
4655
|
-
showOrderFrom: f ? x ?
|
|
4659
|
+
showOrderFrom: f ? x ? k.value ? !0 : Y.type == B.F_ADDON_GROUP_TYPE.enum.PRODUCT : k.value : !1,
|
|
4656
4660
|
bindToVariant: R,
|
|
4657
|
-
isOverride:
|
|
4661
|
+
isOverride: k.value,
|
|
4658
4662
|
isItemGroup: !1,
|
|
4659
4663
|
isV4: !x
|
|
4660
4664
|
};
|
|
@@ -4676,14 +4680,14 @@ const pr = /* @__PURE__ */ lt(cr, [["render", mr]]), hr = { class: "fm-typo-en-t
|
|
|
4676
4680
|
title: h(r)("menu.product.form.group.title"),
|
|
4677
4681
|
"sub-title": h(r)("menu.product.form.group.subtitle")
|
|
4678
4682
|
}, {
|
|
4679
|
-
"append-title": N(() => [
|
|
4683
|
+
"append-title": N(() => [A(x, {
|
|
4680
4684
|
class: "flex-shrink-0",
|
|
4681
4685
|
label: h(r)("menu.product.form.group.add"),
|
|
4682
4686
|
"prepend-icon": "add",
|
|
4683
4687
|
variant: "secondary",
|
|
4684
4688
|
onClick: C
|
|
4685
4689
|
}, null, 8, ["label"])]),
|
|
4686
|
-
default: N(() => [
|
|
4690
|
+
default: N(() => [A(hi, null, {
|
|
4687
4691
|
default: N(() => {
|
|
4688
4692
|
var R;
|
|
4689
4693
|
return [((R = p.value) == null ? void 0 : R.length) > 0 ? (P(), W(O, {
|
|
@@ -4704,12 +4708,12 @@ const pr = /* @__PURE__ */ lt(cr, [["render", mr]]), hr = { class: "fm-typo-en-t
|
|
|
4704
4708
|
};
|
|
4705
4709
|
}
|
|
4706
4710
|
});
|
|
4707
|
-
var
|
|
4708
|
-
const
|
|
4711
|
+
var Pr = { mainBackend: "https://portal-v2-dev.feedmeapi.com", menuBackend: "https://menu-v4-dev.feedmeapi.com", inventoryPortal: "https://inventory.feedmedev.cc/", remy: "https://remy-dev.feedmeapi.com/v1", firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDomain: "feedme-dev-4c3ef.firebaseapp.com", databaseURL: "https://feedme-dev-4c3ef.firebaseio.com", projectId: "feedme-dev-4c3ef", storageBucket: "feedme-dev-4c3ef.appspot.com", messagingSenderId: "458797803788", appId: "1:458797803788:web:37f2af2926a84288f0c129", measurementId: "G-J2QG09D2Q7" }, gtm: { id: "GTM-P7Z9FMS6", serverUrl: "https://server-side-tagging-rsrq3ogsuq-as.a.run.app", env: "development", serverMeasurementId: "G-759WBZPF06", debug: !0 } };
|
|
4712
|
+
const Dr = {
|
|
4709
4713
|
class: "xs:overflow-x-scroll"
|
|
4710
|
-
},
|
|
4714
|
+
}, Tr = {
|
|
4711
4715
|
class: "xs:min-w-[640px]"
|
|
4712
|
-
},
|
|
4716
|
+
}, Ur = /* @__PURE__ */ se({
|
|
4713
4717
|
__name: "ProductInventory",
|
|
4714
4718
|
props: {
|
|
4715
4719
|
isOverride: {
|
|
@@ -4729,14 +4733,14 @@ const Pr = {
|
|
|
4729
4733
|
const {
|
|
4730
4734
|
t
|
|
4731
4735
|
} = ue(), i = e, a = n, o = me(), r = T(() => o.rules.item), l = T(() => r.value.inventory);
|
|
4732
|
-
function s(S, b, F,
|
|
4736
|
+
function s(S, b, F, k) {
|
|
4733
4737
|
return !b || b && b.length === 0 ? [{
|
|
4734
4738
|
key: "",
|
|
4735
4739
|
name: F,
|
|
4736
4740
|
bindings: S || []
|
|
4737
4741
|
}] : b.map((y) => ({
|
|
4738
4742
|
key: y.combinationKey || "",
|
|
4739
|
-
name: Hn(y.combinationKey || "",
|
|
4743
|
+
name: Hn(y.combinationKey || "", k),
|
|
4740
4744
|
bindings: y.inventoryBindings || []
|
|
4741
4745
|
}));
|
|
4742
4746
|
}
|
|
@@ -4762,11 +4766,11 @@ const Pr = {
|
|
|
4762
4766
|
function p(S, b) {
|
|
4763
4767
|
var M, f;
|
|
4764
4768
|
let F = Ne.clone(i.form);
|
|
4765
|
-
const
|
|
4766
|
-
if ((((M =
|
|
4767
|
-
const v =
|
|
4769
|
+
const k = F.variant;
|
|
4770
|
+
if ((((M = k == null ? void 0 : k.variantCombinations) == null ? void 0 : M.length) ?? 0) > 0 && k) {
|
|
4771
|
+
const v = k.variantCombinations.findIndex((O) => O.combinationKey === S);
|
|
4768
4772
|
if (v < 0) return;
|
|
4769
|
-
const x = Ne.clone(
|
|
4773
|
+
const x = Ne.clone(k.variantCombinations);
|
|
4770
4774
|
x[v].inventoryBindings = b, F = {
|
|
4771
4775
|
...F,
|
|
4772
4776
|
variant: {
|
|
@@ -4811,9 +4815,9 @@ const Pr = {
|
|
|
4811
4815
|
enableSorting: !1,
|
|
4812
4816
|
cell: (S) => {
|
|
4813
4817
|
const b = S.row.original;
|
|
4814
|
-
return l.value ?
|
|
4818
|
+
return l.value ? A("div", {
|
|
4815
4819
|
class: "flex items-center justify-end"
|
|
4816
|
-
}, [
|
|
4820
|
+
}, [A(Qt, {
|
|
4817
4821
|
name: b.name,
|
|
4818
4822
|
initialValue: b.bindings ?? [],
|
|
4819
4823
|
title: t("menu.inventory.dialog.title", {
|
|
@@ -4825,7 +4829,7 @@ const Pr = {
|
|
|
4825
4829
|
}, {
|
|
4826
4830
|
default: ({
|
|
4827
4831
|
trigger: F
|
|
4828
|
-
}) =>
|
|
4832
|
+
}) => A(L("fm-button"), {
|
|
4829
4833
|
variant: Le.Tertiary,
|
|
4830
4834
|
prependIcon: "edit",
|
|
4831
4835
|
textColor: $e.NeutralGray400,
|
|
@@ -4834,7 +4838,7 @@ const Pr = {
|
|
|
4834
4838
|
})]) : null;
|
|
4835
4839
|
}
|
|
4836
4840
|
}]);
|
|
4837
|
-
const d = X(), g = cn(
|
|
4841
|
+
const d = X(), g = cn(Pr.inventoryPortal), w = X();
|
|
4838
4842
|
Ce(m, (S) => {
|
|
4839
4843
|
var b, F;
|
|
4840
4844
|
(F = (b = w.value) == null ? void 0 : b.updateInventoryBinding) == null || F.call(b, S);
|
|
@@ -4865,7 +4869,7 @@ const Pr = {
|
|
|
4865
4869
|
title: h(t)("menu.inventory.title"),
|
|
4866
4870
|
subTitle: h(t)("menu.inventory.subtitle")
|
|
4867
4871
|
}, {
|
|
4868
|
-
default: N(() => [D("div",
|
|
4872
|
+
default: N(() => [D("div", Dr, [D("div", Tr, [(P(!0), Z(Re, null, Ge(m.value, (F) => (P(), W(h(Qt), {
|
|
4869
4873
|
ref_for: !0,
|
|
4870
4874
|
ref_key: "inventoryManagerForms",
|
|
4871
4875
|
ref: E,
|
|
@@ -4875,8 +4879,8 @@ const Pr = {
|
|
|
4875
4879
|
name: F.name,
|
|
4876
4880
|
bindingKey: F.key,
|
|
4877
4881
|
initialValue: F.bindings ?? [],
|
|
4878
|
-
"onUpdate:inventory": (
|
|
4879
|
-
p(F.key,
|
|
4882
|
+
"onUpdate:inventory": (k) => {
|
|
4883
|
+
p(F.key, k);
|
|
4880
4884
|
}
|
|
4881
4885
|
}, null, 8, ["title", "name", "bindingKey", "initialValue", "onUpdate:inventory"]))), 256)), D("div", {
|
|
4882
4886
|
ref_key: "inventoryTableIframe",
|
|
@@ -4887,7 +4891,7 @@ const Pr = {
|
|
|
4887
4891
|
_: 1
|
|
4888
4892
|
}, 8, ["title", "subTitle"]));
|
|
4889
4893
|
}
|
|
4890
|
-
}),
|
|
4894
|
+
}), $r = /* @__PURE__ */ se({
|
|
4891
4895
|
__name: "ProductTakeaway",
|
|
4892
4896
|
props: {
|
|
4893
4897
|
isOverride: {
|
|
@@ -4951,7 +4955,7 @@ const Pr = {
|
|
|
4951
4955
|
header: () => r("menu.product.form.takeaway.columns.takeaway"),
|
|
4952
4956
|
cell: (g) => {
|
|
4953
4957
|
const w = g.getValue(), _ = g.row.original;
|
|
4954
|
-
return ce(
|
|
4958
|
+
return ce(Vi, {
|
|
4955
4959
|
action: "add",
|
|
4956
4960
|
applyProduct: !1,
|
|
4957
4961
|
bindToVariant: i.rules.item.bindToVariant,
|
|
@@ -4996,7 +5000,7 @@ const Pr = {
|
|
|
4996
5000
|
title: h(r)("menu.product.form.takeaway.title"),
|
|
4997
5001
|
"sub-title": h(r)("menu.product.form.takeaway.subtitle")
|
|
4998
5002
|
}, {
|
|
4999
|
-
default: N(() => [
|
|
5003
|
+
default: N(() => [A(_, {
|
|
5000
5004
|
columnDefs: d.value,
|
|
5001
5005
|
"page-size": m.value.length,
|
|
5002
5006
|
"row-data": m.value,
|
|
@@ -5006,7 +5010,7 @@ const Pr = {
|
|
|
5006
5010
|
}, 8, ["title", "sub-title"]);
|
|
5007
5011
|
};
|
|
5008
5012
|
}
|
|
5009
|
-
}),
|
|
5013
|
+
}), Vr = { class: "fm-typo-en-title-md-600" }, Nr = { class: "pt-8 space-y-24" }, Br = { class: "flex gap-8 items-center justify-start" }, Lr = /* @__PURE__ */ se({
|
|
5010
5014
|
__name: "Form",
|
|
5011
5015
|
props: {
|
|
5012
5016
|
initialValue: {},
|
|
@@ -5057,7 +5061,7 @@ const Pr = {
|
|
|
5057
5061
|
const d = L("fm-text-field"), g = L("fm-button"), w = L("fm-side-sheet");
|
|
5058
5062
|
return P(), Z(Re, null, [
|
|
5059
5063
|
pe(m.$slots, "default", { trigger: u }),
|
|
5060
|
-
|
|
5064
|
+
A(w, {
|
|
5061
5065
|
id: "variant-form",
|
|
5062
5066
|
modelValue: s.value,
|
|
5063
5067
|
"onUpdate:modelValue": p[3] || (p[3] = (_) => s.value = _),
|
|
@@ -5071,18 +5075,18 @@ const Pr = {
|
|
|
5071
5075
|
"dismiss-away": ""
|
|
5072
5076
|
}, {
|
|
5073
5077
|
"side-sheet-header": N(() => [
|
|
5074
|
-
D("p",
|
|
5078
|
+
D("p", Vr, le(a.value), 1)
|
|
5075
5079
|
]),
|
|
5076
5080
|
"side-sheet-footer": N(() => [
|
|
5077
|
-
D("div",
|
|
5078
|
-
|
|
5081
|
+
D("div", Br, [
|
|
5082
|
+
A(g, {
|
|
5079
5083
|
label: o.value,
|
|
5080
5084
|
loading: l.value,
|
|
5081
5085
|
size: "lg",
|
|
5082
5086
|
type: "submit",
|
|
5083
5087
|
variant: "primary"
|
|
5084
5088
|
}, null, 8, ["label", "loading"]),
|
|
5085
|
-
|
|
5089
|
+
A(g, {
|
|
5086
5090
|
label: h(n)("menu.common.actions.cancel"),
|
|
5087
5091
|
size: "lg",
|
|
5088
5092
|
variant: "tertiary",
|
|
@@ -5091,8 +5095,8 @@ const Pr = {
|
|
|
5091
5095
|
])
|
|
5092
5096
|
]),
|
|
5093
5097
|
default: N(() => [
|
|
5094
|
-
D("div",
|
|
5095
|
-
|
|
5098
|
+
D("div", Nr, [
|
|
5099
|
+
A(d, {
|
|
5096
5100
|
modelValue: r.value.name,
|
|
5097
5101
|
"onUpdate:modelValue": p[0] || (p[0] = (_) => r.value.name = _),
|
|
5098
5102
|
rules: [
|
|
@@ -5103,7 +5107,7 @@ const Pr = {
|
|
|
5103
5107
|
autofocus: "",
|
|
5104
5108
|
label: h(n)("menu.print_dept.columns.name")
|
|
5105
5109
|
}, null, 8, ["modelValue", "rules", "label"]),
|
|
5106
|
-
m.applyProduct ? (P(), W(
|
|
5110
|
+
m.applyProduct ? (P(), W(Wi, {
|
|
5107
5111
|
key: 0,
|
|
5108
5112
|
overrides: r.value.usedBy || [],
|
|
5109
5113
|
"select-variant": !1,
|
|
@@ -5118,7 +5122,7 @@ const Pr = {
|
|
|
5118
5122
|
], 64);
|
|
5119
5123
|
};
|
|
5120
5124
|
}
|
|
5121
|
-
}),
|
|
5125
|
+
}), Gr = Lr, Wr = { class: "space-y-16" }, Kr = { class: "flex items-center space-x-4" }, jr = { class: "handle" }, Yr = { class: "pt-16" }, Hr = /* @__PURE__ */ se({
|
|
5122
5126
|
__name: "ProductPrint",
|
|
5123
5127
|
props: {
|
|
5124
5128
|
isOverride: { type: Boolean },
|
|
@@ -5196,7 +5200,7 @@ const Pr = {
|
|
|
5196
5200
|
() => s.value.length,
|
|
5197
5201
|
() => w(s.value[s.value.length - 1]._id, !0)
|
|
5198
5202
|
), (C, E) => {
|
|
5199
|
-
const I = L("fm-switch"), S = L("fm-radio"), b = L("fm-radio-group"), F = L("fm-button"),
|
|
5203
|
+
const I = L("fm-switch"), S = L("fm-radio"), b = L("fm-radio-group"), F = L("fm-button"), k = L("fm-checkbox");
|
|
5200
5204
|
return P(), W(We, {
|
|
5201
5205
|
title: h(a)("menu.product.form.print.title")
|
|
5202
5206
|
}, {
|
|
@@ -5210,7 +5214,7 @@ const Pr = {
|
|
|
5210
5214
|
default: N(() => {
|
|
5211
5215
|
var M;
|
|
5212
5216
|
return [
|
|
5213
|
-
|
|
5217
|
+
A(I, {
|
|
5214
5218
|
"model-value": !((M = C.form.print) != null && M.toRoot),
|
|
5215
5219
|
label: h(a)("menu.product.form.print.config.group_parent.label"),
|
|
5216
5220
|
"label-placement": "right",
|
|
@@ -5221,13 +5225,13 @@ const Pr = {
|
|
|
5221
5225
|
}),
|
|
5222
5226
|
_: 1
|
|
5223
5227
|
}, 8, ["label"])) : ee("", !0),
|
|
5224
|
-
|
|
5228
|
+
A(b, {
|
|
5225
5229
|
label: h(a)("menu.product.form.print.kds.label"),
|
|
5226
5230
|
"model-value": ((y = C.form.print) == null ? void 0 : y.sequential) ?? !1,
|
|
5227
5231
|
"onUpdate:modelValue": E[1] || (E[1] = (M) => d(M))
|
|
5228
5232
|
}, {
|
|
5229
5233
|
default: N(() => [
|
|
5230
|
-
D("div",
|
|
5234
|
+
D("div", Wr, [
|
|
5231
5235
|
(P(!0), Z(Re, null, Ge(_.value, (M, f) => (P(), W(S, {
|
|
5232
5236
|
key: f,
|
|
5233
5237
|
label: M.label,
|
|
@@ -5238,7 +5242,7 @@ const Pr = {
|
|
|
5238
5242
|
]),
|
|
5239
5243
|
_: 1
|
|
5240
5244
|
}, 8, ["label", "model-value"]),
|
|
5241
|
-
|
|
5245
|
+
A(Qe, {
|
|
5242
5246
|
label: h(a)("menu.product.form.print.routes.label")
|
|
5243
5247
|
}, {
|
|
5244
5248
|
default: N(() => [
|
|
@@ -5253,8 +5257,8 @@ const Pr = {
|
|
|
5253
5257
|
item: N(({ element: M }) => {
|
|
5254
5258
|
var f, v, x, O, R;
|
|
5255
5259
|
return [
|
|
5256
|
-
D("div",
|
|
5257
|
-
D("div",
|
|
5260
|
+
D("div", Kr, [
|
|
5261
|
+
D("div", jr, [
|
|
5258
5262
|
u.value ? (P(), W(F, {
|
|
5259
5263
|
key: 0,
|
|
5260
5264
|
disabled: !((v = (f = t.form.print) == null ? void 0 : f.department) != null && v.includes(M)),
|
|
@@ -5265,7 +5269,7 @@ const Pr = {
|
|
|
5265
5269
|
}, ["stop"]))
|
|
5266
5270
|
}, null, 8, ["disabled"])) : ee("", !0)
|
|
5267
5271
|
]),
|
|
5268
|
-
k
|
|
5272
|
+
A(k, {
|
|
5269
5273
|
id: M,
|
|
5270
5274
|
"data-checked": (O = (x = t.form.print) == null ? void 0 : x.department) == null ? void 0 : O.includes(M),
|
|
5271
5275
|
label: m.value[M],
|
|
@@ -5279,10 +5283,10 @@ const Pr = {
|
|
|
5279
5283
|
}),
|
|
5280
5284
|
_: 1
|
|
5281
5285
|
}, 8, ["item-key", "model-value"])) : ee("", !0),
|
|
5282
|
-
|
|
5286
|
+
A(h(Gr), { "apply-product": !1 }, {
|
|
5283
5287
|
default: N(({ trigger: M }) => [
|
|
5284
|
-
D("div",
|
|
5285
|
-
|
|
5288
|
+
D("div", Yr, [
|
|
5289
|
+
A(F, {
|
|
5286
5290
|
variant: h(Le).Secondary,
|
|
5287
5291
|
label: h(a)("menu.product.form.print.routes.add"),
|
|
5288
5292
|
"prepend-icon": "add",
|
|
@@ -5301,10 +5305,10 @@ const Pr = {
|
|
|
5301
5305
|
}, 8, ["title"]);
|
|
5302
5306
|
};
|
|
5303
5307
|
}
|
|
5304
|
-
}),
|
|
5308
|
+
}), Xr = { class: "flex items-center justify-between" }, qr = { class: "space-y-4 flex-1" }, Zr = { class: "fm-typo-en-title-sm-600" }, Jr = {
|
|
5305
5309
|
key: 0,
|
|
5306
5310
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
5307
|
-
},
|
|
5311
|
+
}, Qr = { key: 0 }, es = /* @__PURE__ */ se({
|
|
5308
5312
|
__name: "ToggleCard",
|
|
5309
5313
|
props: {
|
|
5310
5314
|
title: {},
|
|
@@ -5323,19 +5327,19 @@ const Pr = {
|
|
|
5323
5327
|
variant: "outlined"
|
|
5324
5328
|
}, {
|
|
5325
5329
|
default: N(() => [
|
|
5326
|
-
D("div",
|
|
5327
|
-
D("div",
|
|
5328
|
-
D("p",
|
|
5329
|
-
i.description ? (P(), Z("p",
|
|
5330
|
+
D("div", Xr, [
|
|
5331
|
+
D("div", qr, [
|
|
5332
|
+
D("p", Zr, le(i.title), 1),
|
|
5333
|
+
i.description ? (P(), Z("p", Jr, le(i.description), 1)) : ee("", !0)
|
|
5330
5334
|
]),
|
|
5331
|
-
|
|
5335
|
+
A(o, {
|
|
5332
5336
|
"model-value": i.toggle,
|
|
5333
5337
|
"onUpdate:modelValue": a[0] || (a[0] = (l) => t("update:toggle", l))
|
|
5334
5338
|
}, null, 8, ["model-value"])
|
|
5335
5339
|
]),
|
|
5336
|
-
|
|
5340
|
+
A(Ii, { name: "expand" }, {
|
|
5337
5341
|
default: N(() => [
|
|
5338
|
-
i.toggle ? (P(), Z("div",
|
|
5342
|
+
i.toggle ? (P(), Z("div", Qr, [
|
|
5339
5343
|
pe(i.$slots, "default", {}, void 0, !0)
|
|
5340
5344
|
])) : ee("", !0)
|
|
5341
5345
|
]),
|
|
@@ -5346,16 +5350,16 @@ const Pr = {
|
|
|
5346
5350
|
}));
|
|
5347
5351
|
};
|
|
5348
5352
|
}
|
|
5349
|
-
}), Ke = /* @__PURE__ */ lt(
|
|
5350
|
-
function
|
|
5351
|
-
return P(), Z("div",
|
|
5353
|
+
}), Ke = /* @__PURE__ */ lt(es, [["__scopeId", "data-v-e920f110"]]), ts = {}, ns = { class: "py-4" };
|
|
5354
|
+
function is(e, n) {
|
|
5355
|
+
return P(), Z("div", ns, n[0] || (n[0] = [
|
|
5352
5356
|
D("div", { class: "h-px w-full bg-fm-color-neutral-gray-100" }, null, -1)
|
|
5353
5357
|
]));
|
|
5354
5358
|
}
|
|
5355
|
-
const
|
|
5359
|
+
const os = /* @__PURE__ */ lt(ts, [["render", is]]), as = {
|
|
5356
5360
|
key: 0,
|
|
5357
5361
|
class: "ml-40 w-[320px] fm-corner-radius-lg p-16 border border-fm-color-neutral-gray-200 space-y-4"
|
|
5358
|
-
},
|
|
5362
|
+
}, rs = { class: "fm-typo-en-title-sm-600" }, $n = /* @__PURE__ */ se({
|
|
5359
5363
|
__name: "Summary",
|
|
5360
5364
|
props: {
|
|
5361
5365
|
title: {},
|
|
@@ -5369,7 +5373,7 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
5369
5373
|
title: n.title,
|
|
5370
5374
|
contentComponent: ce("div", { class: "space-y-4" }, [
|
|
5371
5375
|
...n.items.map(
|
|
5372
|
-
(a) => ce(
|
|
5376
|
+
(a) => ce(kn, {
|
|
5373
5377
|
name: a.name,
|
|
5374
5378
|
value: a.value || "--"
|
|
5375
5379
|
})
|
|
@@ -5379,10 +5383,10 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
5379
5383
|
}
|
|
5380
5384
|
return (a, o) => {
|
|
5381
5385
|
const r = L("FmButton");
|
|
5382
|
-
return n.variant === "full" ? (P(), Z("div",
|
|
5383
|
-
D("div",
|
|
5384
|
-
|
|
5385
|
-
(P(!0), Z(Re, null, Ge(a.items, (l) => (P(), W(
|
|
5386
|
+
return n.variant === "full" ? (P(), Z("div", as, [
|
|
5387
|
+
D("div", rs, le(a.title), 1),
|
|
5388
|
+
A(os),
|
|
5389
|
+
(P(!0), Z(Re, null, Ge(a.items, (l) => (P(), W(kn, {
|
|
5386
5390
|
key: l.name,
|
|
5387
5391
|
name: l.name,
|
|
5388
5392
|
value: l.value || "--"
|
|
@@ -5395,7 +5399,7 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
5395
5399
|
}));
|
|
5396
5400
|
};
|
|
5397
5401
|
}
|
|
5398
|
-
}),
|
|
5402
|
+
}), ss = { class: "space-y-24 p-16 border-fm-color-neutral-gray-200 fm-corner-radius-lg border" }, ls = { class: "space-y-4" }, us = { class: "fm-typo-en-title-sm-600" }, cs = { class: "text-fm-color-typo-secondary" }, ds = { class: "flex gap-16" }, ms = { class: "flex-1" }, ps = { class: "flex-1" }, hs = /* @__PURE__ */ se({
|
|
5399
5403
|
__name: "CatalogSchedulerSelector",
|
|
5400
5404
|
props: {
|
|
5401
5405
|
linkedStatus: {}
|
|
@@ -5446,22 +5450,22 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
5446
5450
|
}
|
|
5447
5451
|
), (p, d) => {
|
|
5448
5452
|
const g = L("FmSelect");
|
|
5449
|
-
return P(), Z("div",
|
|
5450
|
-
D("div",
|
|
5451
|
-
D("div",
|
|
5452
|
-
D("div",
|
|
5453
|
+
return P(), Z("div", ss, [
|
|
5454
|
+
D("div", ls, [
|
|
5455
|
+
D("div", us, le(h(a)("menu.catalog_scheduler.title")), 1),
|
|
5456
|
+
D("div", cs, le(h(a)("menu.catalog_scheduler.subtitle")), 1)
|
|
5453
5457
|
]),
|
|
5454
|
-
D("div",
|
|
5455
|
-
D("div",
|
|
5456
|
-
|
|
5458
|
+
D("div", ds, [
|
|
5459
|
+
D("div", ms, [
|
|
5460
|
+
A(g, {
|
|
5457
5461
|
label: h(a)("menu.common.labels.catalog"),
|
|
5458
5462
|
items: l.value,
|
|
5459
5463
|
modelValue: r.value,
|
|
5460
5464
|
"onUpdate:modelValue": d[0] || (d[0] = (w) => r.value = w)
|
|
5461
5465
|
}, null, 8, ["label", "items", "modelValue"])
|
|
5462
5466
|
]),
|
|
5463
|
-
D("div",
|
|
5464
|
-
|
|
5467
|
+
D("div", ps, [
|
|
5468
|
+
A(g, {
|
|
5465
5469
|
label: h(a)("menu.common.labels.scheduler"),
|
|
5466
5470
|
items: c.value,
|
|
5467
5471
|
modelValue: s.value,
|
|
@@ -5472,33 +5476,33 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
5472
5476
|
]);
|
|
5473
5477
|
};
|
|
5474
5478
|
}
|
|
5475
|
-
}),
|
|
5479
|
+
}), fs = Vn("menu-edit-state", {
|
|
5476
5480
|
state: () => ({
|
|
5477
5481
|
isUpdatingItem: !1,
|
|
5478
5482
|
storedCatalogId: null,
|
|
5479
5483
|
storedSchedulerId: null
|
|
5480
5484
|
})
|
|
5481
|
-
}),
|
|
5485
|
+
}), vs = {
|
|
5482
5486
|
class: /* @__PURE__ */ Fe(["flex", "space-x-40", "max-w-[1200px] mx-auto w-full"])
|
|
5483
|
-
},
|
|
5487
|
+
}, gs = {
|
|
5484
5488
|
key: 1,
|
|
5485
5489
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
5486
|
-
},
|
|
5490
|
+
}, bs = {
|
|
5487
5491
|
key: 2,
|
|
5488
5492
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
5489
|
-
},
|
|
5493
|
+
}, ys = {
|
|
5490
5494
|
key: 4,
|
|
5491
5495
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
5492
|
-
},
|
|
5496
|
+
}, _s = {
|
|
5493
5497
|
key: 5,
|
|
5494
5498
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
5495
|
-
},
|
|
5499
|
+
}, ws = {
|
|
5496
5500
|
key: 7,
|
|
5497
5501
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
5498
|
-
},
|
|
5502
|
+
}, Cs = {
|
|
5499
5503
|
key: 9,
|
|
5500
5504
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
5501
|
-
},
|
|
5505
|
+
}, Ss = /* @__PURE__ */ se({
|
|
5502
5506
|
__name: "Form",
|
|
5503
5507
|
props: {
|
|
5504
5508
|
initialForm: {},
|
|
@@ -5532,7 +5536,7 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
5532
5536
|
() => t.initialForm,
|
|
5533
5537
|
async () => {
|
|
5534
5538
|
if (t.initialForm)
|
|
5535
|
-
g.value = await
|
|
5539
|
+
g.value = await oo(
|
|
5536
5540
|
a.state.menu,
|
|
5537
5541
|
t.initialForm._id
|
|
5538
5542
|
);
|
|
@@ -5544,7 +5548,7 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
5544
5548
|
}
|
|
5545
5549
|
);
|
|
5546
5550
|
const w = dn(), _ = async ([K, V]) => {
|
|
5547
|
-
a.selectCatalog(K), a.selectScheduler(V), await
|
|
5551
|
+
a.selectCatalog(K), a.selectScheduler(V), await Pi(), w.update(d.value._id), setTimeout(() => {
|
|
5548
5552
|
i("update:show", !1);
|
|
5549
5553
|
}, 100);
|
|
5550
5554
|
}, C = T(() => {
|
|
@@ -5572,7 +5576,7 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
5572
5576
|
};
|
|
5573
5577
|
async function S() {
|
|
5574
5578
|
var K, V;
|
|
5575
|
-
p.value = d.value._id ? (await
|
|
5579
|
+
p.value = d.value._id ? (await io(
|
|
5576
5580
|
a.mergedMenu,
|
|
5577
5581
|
[d.value],
|
|
5578
5582
|
a.state.menu,
|
|
@@ -5586,7 +5590,7 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
5586
5590
|
var K;
|
|
5587
5591
|
return b.value ? d.value.category == "" || d.value.category == null && ((K = p.value) == null ? void 0 : K.category) == null : a.version === B.F_MENU_VERSION.enum.v4 && d.value.category == null;
|
|
5588
5592
|
});
|
|
5589
|
-
function
|
|
5593
|
+
function k() {
|
|
5590
5594
|
var he;
|
|
5591
5595
|
const K = a.getSelectedTax(
|
|
5592
5596
|
d.value.taxes,
|
|
@@ -5625,7 +5629,7 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
5625
5629
|
},
|
|
5626
5630
|
{
|
|
5627
5631
|
name: r("menu.product.form.summary.fields.tax"),
|
|
5628
|
-
value:
|
|
5632
|
+
value: k()
|
|
5629
5633
|
},
|
|
5630
5634
|
{
|
|
5631
5635
|
name: r("menu.product.form.summary.fields.inventory"),
|
|
@@ -5769,14 +5773,14 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
5769
5773
|
} catch (re) {
|
|
5770
5774
|
console.log(re);
|
|
5771
5775
|
}
|
|
5772
|
-
}),
|
|
5776
|
+
}), Oi(() => {
|
|
5773
5777
|
try {
|
|
5774
5778
|
Ue.closeSession();
|
|
5775
5779
|
} catch (K) {
|
|
5776
5780
|
console.log(K);
|
|
5777
5781
|
}
|
|
5778
5782
|
});
|
|
5779
|
-
const te =
|
|
5783
|
+
const te = fs();
|
|
5780
5784
|
gt(() => {
|
|
5781
5785
|
te.isUpdatingItem || (te.isUpdatingItem = !0, te.storedCatalogId = a.state.currentCatalogId, te.storedSchedulerId = a.state.currentSchedulerId);
|
|
5782
5786
|
});
|
|
@@ -5791,12 +5795,12 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
5791
5795
|
}
|
|
5792
5796
|
const { isAtMost: Ot } = Bn();
|
|
5793
5797
|
T(() => Ot("sm"));
|
|
5794
|
-
const mn = X(null),
|
|
5798
|
+
const mn = X(null), gi = ki(mn);
|
|
5795
5799
|
return (K, V) => (P(), Z(Re, null, [
|
|
5796
|
-
pe(K.$slots, "trigger",
|
|
5800
|
+
pe(K.$slots, "trigger", zi(Ei({
|
|
5797
5801
|
trigger: m
|
|
5798
5802
|
}))),
|
|
5799
|
-
|
|
5803
|
+
A(Bi, {
|
|
5800
5804
|
title: l.value,
|
|
5801
5805
|
show: c.value,
|
|
5802
5806
|
"primary-action": {
|
|
@@ -5825,26 +5829,26 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
5825
5829
|
h(Ot)("sm") ? ee("", !0) : (P(), W($n, {
|
|
5826
5830
|
key: 0,
|
|
5827
5831
|
class: "fixed",
|
|
5828
|
-
style:
|
|
5832
|
+
style: Fi({
|
|
5829
5833
|
top: "85px",
|
|
5830
|
-
left: h(
|
|
5834
|
+
left: h(gi).right + "px"
|
|
5831
5835
|
}),
|
|
5832
5836
|
variant: "full",
|
|
5833
5837
|
title: M.value.title,
|
|
5834
5838
|
items: M.value.items
|
|
5835
5839
|
}, null, 8, ["style", "title", "items"])),
|
|
5836
|
-
D("div",
|
|
5840
|
+
D("div", vs, [
|
|
5837
5841
|
D("div", {
|
|
5838
5842
|
ref_key: "formWrapper",
|
|
5839
5843
|
ref: mn,
|
|
5840
5844
|
class: Fe(["flex-1 py-24 space-y-24", "xs:w-full"])
|
|
5841
5845
|
}, [
|
|
5842
|
-
g.value && (Object.keys(g.value.catalogs || {}).length > 0 || g.value.schedulers.length > 0) ? (P(), W(
|
|
5846
|
+
g.value && (Object.keys(g.value.catalogs || {}).length > 0 || g.value.schedulers.length > 0) ? (P(), W(hs, {
|
|
5843
5847
|
key: 0,
|
|
5844
5848
|
"linked-status": g.value,
|
|
5845
5849
|
"onUpdate:catalogAndScheduler": _
|
|
5846
5850
|
}, null, 8, ["linked-status"])) : ee("", !0),
|
|
5847
|
-
|
|
5851
|
+
A(Ke, {
|
|
5848
5852
|
toggle: f.value,
|
|
5849
5853
|
"onUpdate:toggle": [
|
|
5850
5854
|
V[1] || (V[1] = (q) => f.value = q),
|
|
@@ -5855,7 +5859,7 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
5855
5859
|
title: h(r)("menu.product.form.sections.general.title")
|
|
5856
5860
|
}, {
|
|
5857
5861
|
default: N(() => [
|
|
5858
|
-
|
|
5862
|
+
A(da, {
|
|
5859
5863
|
fallback: p.value,
|
|
5860
5864
|
form: d.value,
|
|
5861
5865
|
"is-addon": F.value,
|
|
@@ -5869,8 +5873,8 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
5869
5873
|
]),
|
|
5870
5874
|
_: 1
|
|
5871
5875
|
}, 8, ["toggle", "disabled", "description", "title"]),
|
|
5872
|
-
b.value ? ee("", !0) : (P(), Z("div",
|
|
5873
|
-
|
|
5876
|
+
b.value ? ee("", !0) : (P(), Z("div", gs)),
|
|
5877
|
+
A(Ke, {
|
|
5874
5878
|
toggle: x.value,
|
|
5875
5879
|
"onUpdate:toggle": [
|
|
5876
5880
|
V[3] || (V[3] = (q) => x.value = q),
|
|
@@ -5881,7 +5885,7 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
5881
5885
|
title: h(r)("menu.product.form.sections.price.title")
|
|
5882
5886
|
}, {
|
|
5883
5887
|
default: N(() => [
|
|
5884
|
-
|
|
5888
|
+
A(ka, {
|
|
5885
5889
|
fallback: p.value,
|
|
5886
5890
|
form: d.value,
|
|
5887
5891
|
"is-addon": F.value,
|
|
@@ -5891,7 +5895,7 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
5891
5895
|
]),
|
|
5892
5896
|
_: 1
|
|
5893
5897
|
}, 8, ["toggle", "disabled", "description", "title"]),
|
|
5894
|
-
s.value.print && !b.value ? (P(), Z("div",
|
|
5898
|
+
s.value.print && !b.value ? (P(), Z("div", bs)) : ee("", !0),
|
|
5895
5899
|
s.value.print ? (P(), W(Ke, {
|
|
5896
5900
|
key: 3,
|
|
5897
5901
|
toggle: $.value,
|
|
@@ -5904,7 +5908,7 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
5904
5908
|
title: "Update print"
|
|
5905
5909
|
}, {
|
|
5906
5910
|
default: N(() => [
|
|
5907
|
-
|
|
5911
|
+
A(Hr, {
|
|
5908
5912
|
fallback: p.value,
|
|
5909
5913
|
form: d.value,
|
|
5910
5914
|
"full-combinations": C.value,
|
|
@@ -5916,8 +5920,8 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
5916
5920
|
]),
|
|
5917
5921
|
_: 1
|
|
5918
5922
|
}, 8, ["toggle"])) : ee("", !0),
|
|
5919
|
-
b.value ? ee("", !0) : (P(), Z("div",
|
|
5920
|
-
|
|
5923
|
+
b.value ? ee("", !0) : (P(), Z("div", ys)),
|
|
5924
|
+
A(Ke, {
|
|
5921
5925
|
toggle: R.value,
|
|
5922
5926
|
"onUpdate:toggle": [
|
|
5923
5927
|
V[9] || (V[9] = (q) => R.value = q),
|
|
@@ -5928,7 +5932,7 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
5928
5932
|
title: "Update variant"
|
|
5929
5933
|
}, {
|
|
5930
5934
|
default: N(() => [
|
|
5931
|
-
|
|
5935
|
+
A(Ga, {
|
|
5932
5936
|
fallback: p.value,
|
|
5933
5937
|
form: d.value,
|
|
5934
5938
|
"full-combinations": C.value,
|
|
@@ -5940,7 +5944,7 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
5940
5944
|
]),
|
|
5941
5945
|
_: 1
|
|
5942
5946
|
}, 8, ["toggle", "disabled"]),
|
|
5943
|
-
s.value.group && !b.value ? (P(), Z("div",
|
|
5947
|
+
s.value.group && !b.value ? (P(), Z("div", _s)) : ee("", !0),
|
|
5944
5948
|
s.value.group ? (P(), W(Ke, {
|
|
5945
5949
|
key: 6,
|
|
5946
5950
|
toggle: j.value,
|
|
@@ -5953,7 +5957,7 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
5953
5957
|
title: "Update group"
|
|
5954
5958
|
}, {
|
|
5955
5959
|
default: N(() => [
|
|
5956
|
-
|
|
5960
|
+
A(Fr, {
|
|
5957
5961
|
fallback: p.value,
|
|
5958
5962
|
form: d.value,
|
|
5959
5963
|
"full-combinations": C.value,
|
|
@@ -5965,7 +5969,7 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
5965
5969
|
]),
|
|
5966
5970
|
_: 1
|
|
5967
5971
|
}, 8, ["toggle", "disabled"])) : ee("", !0),
|
|
5968
|
-
s.value.inventory && !b.value ? (P(), Z("div",
|
|
5972
|
+
s.value.inventory && !b.value ? (P(), Z("div", ws)) : ee("", !0),
|
|
5969
5973
|
s.value.inventory ? (P(), W(Ke, {
|
|
5970
5974
|
key: 8,
|
|
5971
5975
|
toggle: Y.value,
|
|
@@ -5978,7 +5982,7 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
5978
5982
|
title: "Update inventory"
|
|
5979
5983
|
}, {
|
|
5980
5984
|
default: N(() => [
|
|
5981
|
-
|
|
5985
|
+
A(Ur, {
|
|
5982
5986
|
fallback: p.value,
|
|
5983
5987
|
form: d.value,
|
|
5984
5988
|
"full-combinations": C.value,
|
|
@@ -5990,7 +5994,7 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
5990
5994
|
]),
|
|
5991
5995
|
_: 1
|
|
5992
5996
|
}, 8, ["toggle", "disabled"])) : ee("", !0),
|
|
5993
|
-
s.value.takeaway(d.value.category ?? ((re = p.value) == null ? void 0 : re.category)) && !b.value ? (P(), Z("div",
|
|
5997
|
+
s.value.takeaway(d.value.category ?? ((re = p.value) == null ? void 0 : re.category)) && !b.value ? (P(), Z("div", Cs)) : ee("", !0),
|
|
5994
5998
|
s.value.takeaway(d.value.category ?? ((he = p.value) == null ? void 0 : he.category)) ? (P(), W(Ke, {
|
|
5995
5999
|
key: 10,
|
|
5996
6000
|
toggle: z.value,
|
|
@@ -6003,7 +6007,7 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
6003
6007
|
title: "Update takeaway"
|
|
6004
6008
|
}, {
|
|
6005
6009
|
default: N(() => [
|
|
6006
|
-
|
|
6010
|
+
A($r, {
|
|
6007
6011
|
fallback: p.value,
|
|
6008
6012
|
form: d.value,
|
|
6009
6013
|
"full-combinations": C.value,
|
|
@@ -6024,12 +6028,12 @@ const is = /* @__PURE__ */ lt(es, [["render", ns]]), os = {
|
|
|
6024
6028
|
}, 8, ["title", "show", "primary-action", "secondary-actions"])
|
|
6025
6029
|
], 64));
|
|
6026
6030
|
}
|
|
6027
|
-
}),
|
|
6028
|
-
function
|
|
6031
|
+
}), Rs = Ss;
|
|
6032
|
+
function vi(e, n) {
|
|
6029
6033
|
var o, r, l, s;
|
|
6030
6034
|
const t = (o = n.groups) == null ? void 0 : o.reduce((u, c) => {
|
|
6031
6035
|
const m = e.groups.find((d) => d._id === c._id);
|
|
6032
|
-
return
|
|
6036
|
+
return kt(e.items, m.items) === B.F_ADDON_GROUP_TYPE.enum.DYNAMIC && u.push(m), u;
|
|
6033
6037
|
}, []);
|
|
6034
6038
|
if (!(t != null && t.length)) return n;
|
|
6035
6039
|
const i = t.map((u) => u._id);
|
|
@@ -6070,13 +6074,13 @@ function fi(e, n) {
|
|
|
6070
6074
|
return { ...n, groups: a(n.groups || []) };
|
|
6071
6075
|
}
|
|
6072
6076
|
const dn = Vn("item-manager", () => {
|
|
6073
|
-
const e = me(), n = Be(), t = xe(), i = Ye(n), a = He(i), o =
|
|
6077
|
+
const e = me(), n = Be(), t = xe(), i = Ye(n), a = He(i), o = Di(), { t: r } = ue(), l = (f) => {
|
|
6074
6078
|
if (!o) throw new Error("No current instance found");
|
|
6075
|
-
const { container: v } =
|
|
6079
|
+
const { container: v } = Mi(Rs, o, {
|
|
6076
6080
|
...f,
|
|
6077
6081
|
autoShow: !0,
|
|
6078
6082
|
"onUpdate:show": async (x) => {
|
|
6079
|
-
x || (
|
|
6083
|
+
x || (Ti(null, v), v.remove());
|
|
6080
6084
|
}
|
|
6081
6085
|
});
|
|
6082
6086
|
};
|
|
@@ -6302,7 +6306,7 @@ const dn = Vn("item-manager", () => {
|
|
|
6302
6306
|
e.currentScheduler ? await E(f) : await I(f)
|
|
6303
6307
|
);
|
|
6304
6308
|
}
|
|
6305
|
-
function
|
|
6309
|
+
function k(f) {
|
|
6306
6310
|
const { updateMenu: v } = a, x = f.length > 1 ? `${f.length} products` : f[0].name;
|
|
6307
6311
|
t.open({
|
|
6308
6312
|
title: r("menu.common.dialog.remove.product.title"),
|
|
@@ -6327,7 +6331,7 @@ const dn = Vn("item-manager", () => {
|
|
|
6327
6331
|
!0
|
|
6328
6332
|
);
|
|
6329
6333
|
for (const O of f)
|
|
6330
|
-
O.thumbnail && await
|
|
6334
|
+
O.thumbnail && await xi.delete(O.thumbnail);
|
|
6331
6335
|
n.open({
|
|
6332
6336
|
message: r("menu.common.dialog.remove.product.success"),
|
|
6333
6337
|
type: "success"
|
|
@@ -6345,7 +6349,7 @@ const dn = Vn("item-manager", () => {
|
|
|
6345
6349
|
e,
|
|
6346
6350
|
a.updateMenu,
|
|
6347
6351
|
t
|
|
6348
|
-
).unlinkProduct(f.map((v) => v._id)) :
|
|
6352
|
+
).unlinkProduct(f.map((v) => v._id)) : k(f);
|
|
6349
6353
|
}
|
|
6350
6354
|
async function M(f) {
|
|
6351
6355
|
const { updateMenu: v } = a;
|
|
@@ -6359,7 +6363,7 @@ const dn = Vn("item-manager", () => {
|
|
|
6359
6363
|
);
|
|
6360
6364
|
}
|
|
6361
6365
|
return {
|
|
6362
|
-
initDynamicGroupItem: (f) =>
|
|
6366
|
+
initDynamicGroupItem: (f) => vi(e, f),
|
|
6363
6367
|
create: c,
|
|
6364
6368
|
update: b,
|
|
6365
6369
|
updateMany: F,
|
|
@@ -6371,9 +6375,9 @@ export {
|
|
|
6371
6375
|
Un as A,
|
|
6372
6376
|
Yn as M,
|
|
6373
6377
|
bt as S,
|
|
6374
|
-
|
|
6378
|
+
fi as _,
|
|
6375
6379
|
jn as a,
|
|
6376
6380
|
nn as e,
|
|
6377
|
-
|
|
6381
|
+
io as m,
|
|
6378
6382
|
dn as u
|
|
6379
6383
|
};
|