@feedmepos/mf-menu 0.32.14 → 0.32.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-BFBPwGfb.js → App-BFUyUrdi.js} +7 -7
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BDPEBgIX.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BbjRIN7Z.js} +20 -20
- package/dist/{Catalog-CEUlUbTo.js → Catalog-B6VFmr6e.js} +20 -20
- package/dist/{Category-GK_sF5cc.js → Category-B-bTjNFI.js} +24 -24
- package/dist/{Category-oxm_RKMU.js → Category-C8uGxpST.js} +84 -84
- package/dist/{CookingGuide-BIqPXo2F.js → CookingGuide-BL3uetlO.js} +65 -65
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-_LjfOdmQ.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-8yIVwc8E.js} +1 -1
- package/dist/{Group-G3Zm4zVj.js → Group-BvO-gQZe.js} +1 -1
- package/dist/{Group-bW-m1xOv.js → Group-DT9UkkOx.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-DN7BsgdL.js → Group.vue_vue_type_script_setup_true_lang-DZhM1Tpb.js} +27 -27
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BBcZxmMz.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D48u_DHq.js} +5 -5
- package/dist/ImportProductDialog.vue_vue_type_script_setup_true_lang-C_X-lTnN.js +72979 -0
- package/dist/{Ingredient-D0S3lRbC.js → Ingredient-7qWDD9e6.js} +26 -26
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-BYAInJ7N.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CwjW0wfz.js} +2 -2
- package/dist/{LinkProductSideSheet-DduICm_3.js → LinkProductSideSheet-BXW6eNgZ.js} +3 -3
- package/dist/{MenuSetting-Ddpakood.js → MenuSetting-BSF7O2NL.js} +5 -5
- package/dist/{PrintRoute-CxDRBk-Z.js → PrintRoute-b1ii5Uz9.js} +20 -20
- package/dist/{Product-DAwEX6dW.js → Product-Ce0GJb3c.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-BH7BRpJ2.js → Product.vue_vue_type_script_setup_true_lang-BZVvTAOX.js} +49 -49
- package/dist/{ProductInternalTools--i0xQb6O.js → ProductInternalTools-igbOLRap.js} +20 -20
- package/dist/Products-GAyUdhnN.js +292 -0
- package/dist/Publish-g60odzhM.js +1300 -0
- package/dist/{Recipe-DIfPG7dG.js → Recipe-B6aye_iC.js} +9 -9
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DiutI4rb.js → RuleView.vue_vue_type_script_setup_true_lang-By8kwuMB.js} +134 -134
- package/dist/{Scheduler-D-qRoZEk.js → Scheduler-CyaG6Y5v.js} +7 -7
- package/dist/{ServingSequence-DdGQTO5m.js → ServingSequence-BXeypgrN.js} +27 -27
- package/dist/{Setting-Cy3lcj6b.js → Setting-D7GcaNTk.js} +17 -17
- package/dist/{Subcategory-bX7uTJKn.js → Subcategory-DNUp9ojI.js} +37 -37
- package/dist/{Takeaway-DoTobUpw.js → Takeaway-Baqvq5nP.js} +9 -9
- package/dist/{Takeaway-Dt4W1Tmn.js → Takeaway-BjXPeYRv.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-Ccqd0SSb.js → Takeaway.vue_vue_type_script_setup_true_lang-CgXT2UVL.js} +54 -54
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-Bxd5sGBt.js → Thumbnail.vue_vue_type_script_setup_true_lang-CX8cSbDe.js} +12 -12
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BTny5xEr.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DcjGVQEO.js} +14 -14
- package/dist/{Unit-li0qBwz-.js → Unit-mI7lLzCf.js} +2 -2
- package/dist/{Variant-CGcJ_TZj.js → Variant-CVwnODRz.js} +14 -14
- package/dist/{_id_-BWdsDm62.js → _id_-fpn0nBru.js} +14 -14
- package/dist/{app-M9IH0JfT.js → app-CCKI85Te.js} +26 -26
- package/dist/{app-4fAuR8EW.js → app-U5MEN4U1.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +22 -22
- package/dist/apps/mf-menu/src/helper/menuExport.d.ts +59 -33
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-3-xHTXMe.js → linked-status-6Jt70XBp.js} +2 -2
- package/dist/assets/menu-export-CR0a98CA.js +107 -0
- package/dist/assets/{override-menu-9sR4Y3Xg.js → override-menu-Chsc0CSI.js} +2 -2
- package/dist/assets/{validate-menu-BmHir2_T.js → validate-menu-pb0aN4gj.js} +2 -2
- package/dist/{catalog-DFja-c1u.js → catalog-BgQmytEA.js} +1 -1
- package/dist/{catalogSetting-CcpYLKqf.js → catalogSetting-BS5IaQKq.js} +1 -1
- package/dist/{category-DpZwNc4t.js → category-DJMVbmzx.js} +1 -1
- package/dist/{currency-BAE6MewY.js → currency-FHrLDvzy.js} +1 -1
- package/dist/dayjs.min-DJGdQr-B.js +6 -0
- package/dist/{index-CVzNrW67.js → index-BywPDIFW.js} +4 -4
- package/dist/{index-CKinAgXM.js → index-DYxLHjeC.js} +1 -1
- package/dist/{index-vusQqUrf.js → index-XVWDnyu-.js} +17 -17
- package/dist/{index.vue_vue_type_script_setup_true_lang-BdR9Cau8.js → index.vue_vue_type_script_setup_true_lang-kj6HkxwD.js} +2698 -2698
- package/dist/{item-CwwbAMhc.js → item-cmnP2N-a.js} +244 -244
- package/dist/{jszip.min-DYs79nMN.js → jszip.min-psVCZNVl.js} +245 -245
- package/dist/{menu-BaIAvmpZ.js → menu-CgQPOu3W.js} +1 -1
- package/dist/{menuV2-B2fEnjKF.js → menuV2-DHO9OmzU.js} +22 -22
- package/dist/{priceTier-BSQ1vmHy.js → priceTier-CLm9vzaK.js} +1 -1
- package/dist/{scheduler-C7lp1B_N.js → scheduler-BMdZdtpj.js} +4 -4
- package/dist/{subcategory-DUGbyIKt.js → subcategory-Dj_DOvFt.js} +2 -2
- package/dist/{toExcel-CnvNPzQj.js → toExcel-XwFFiTiA.js} +2 -2
- package/dist/{unit-gzTDfacM.js → unit-CsuAQsy7.js} +12 -12
- package/package.json +2 -2
- package/dist/ImportProductDialog.vue_vue_type_script_setup_true_lang-BpYIAC6_.js +0 -96043
- package/dist/Products-DHP2P67R.js +0 -794
- package/dist/Publish-BwI7NOud.js +0 -1264
- package/dist/dayjs.min-Bbp8wB12.js +0 -6
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { defineStore as
|
|
2
|
-
import { defineComponent as me, resolveComponent as N, createElementBlock as te, createBlock as j, openBlock as
|
|
3
|
-
import {
|
|
1
|
+
import { defineStore as Oi } from "pinia";
|
|
2
|
+
import { defineComponent as me, resolveComponent as N, createElementBlock as te, createBlock as j, openBlock as O, createElementVNode as V, createVNode as b, toDisplayString as de, Fragment as Ae, renderList as Ue, h as Se, ref as ee, computed as F, watch as xe, unref as h, renderSlot as ve, withCtx as P, createCommentVNode as ie, Transition as bn, normalizeClass as Oe, resolveDynamicComponent as wt, withDirectives as ut, vShow as St, mergeProps as Fi, withModifiers as Ct, onMounted as ot, onUnmounted as yn, createTextVNode as Pt, resolveDirective as zi, getCurrentInstance as Ii, markRaw as _n, render as Vt, mergeModels as wn, useModel as Sn, nextTick as Ei, normalizeProps as Cn, guardReactiveProps as kn, normalizeStyle as xn } from "vue";
|
|
3
|
+
import { M as Ce, A as G, al as Rn, an as An, Z as Mn, I as ue, D as Ie, B as ke, V as Ti, u as be, J as Ve, G as Xe, Q as qe, R as On, T as Fn, U as zn, W as Ot, af as In, O as En, N as hi } from "./index.vue_vue_type_script_setup_true_lang-kj6HkxwD.js";
|
|
4
4
|
import { useI18n as he, useCoreStore as mt, CustomAttributesForm as Di } from "@feedmepos/mf-common";
|
|
5
5
|
import { useDialog as Ne, useSnackbar as Ee, components as Re, FmButtonColorThemeVariant as Ke, FmButtonVariant as Ze, useBreakpoints as Pi, useDialogChild as Vi } from "@feedmepos/ui-library";
|
|
6
|
-
import { C as je } from "./catalog-
|
|
6
|
+
import { C as je } from "./catalog-BgQmytEA.js";
|
|
7
7
|
import { c as Tn } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
8
8
|
import { a as fi, _ as Ui } from "./tooltip-B5BiPMx9.js";
|
|
9
|
-
import { H as Dn, L as Pn } from "./LinkProductSideSheet-
|
|
10
|
-
import { e as Vn, _ as Be, a as Un } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
9
|
+
import { H as Dn, L as Pn } from "./LinkProductSideSheet-BXW6eNgZ.js";
|
|
10
|
+
import { e as Vn, _ as Be, a as Un } from "./RuleView.vue_vue_type_script_setup_true_lang-By8kwuMB.js";
|
|
11
11
|
import { s as Ut, F as $n, _ as Nn } from "./index-CisutoS9.js";
|
|
12
|
-
import { a as Bn } from "./app-
|
|
12
|
+
import { a as Bn } from "./app-CCKI85Te.js";
|
|
13
13
|
import { _ as it } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
|
-
import { g as $i, b as Ln, c as Gn, a as Kn, m as jn } from "./menuV2-
|
|
14
|
+
import { g as $i, b as Ln, c as Gn, a as Kn, m as jn } from "./menuV2-DHO9OmzU.js";
|
|
15
15
|
import { useAppStore as Yt, RemyButton as Ni } from "@feedmepos/mf-remy-panel";
|
|
16
16
|
import { _ as Ye } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
17
|
-
import { u as Wn } from "./subcategory-
|
|
18
|
-
import { u as Yn } from "./category-
|
|
17
|
+
import { u as Wn } from "./subcategory-Dj_DOvFt.js";
|
|
18
|
+
import { u as Yn } from "./category-DJMVbmzx.js";
|
|
19
19
|
import { u as Ht } from "./discardConfirm-BHni0LNu.js";
|
|
20
|
-
import { _ as et, l as $t, T as Hn } from "./index-
|
|
20
|
+
import { _ as et, l as $t, T as Hn } from "./index-BywPDIFW.js";
|
|
21
21
|
import { useInventoryStore as Bi, InventoryBindingForm as Xn, InventoryBindingSummary as qn } from "@feedmepos/mf-inventory-portal";
|
|
22
22
|
import { c as pt } from "./check-C9mY6LiX.js";
|
|
23
23
|
import { c as Zn } from "./object-DVUNCr7w.js";
|
|
24
|
-
import { f as at } from "./currency-
|
|
25
|
-
import { u as Li } from "./priceTier-
|
|
24
|
+
import { f as at } from "./currency-FHrLDvzy.js";
|
|
25
|
+
import { u as Li } from "./priceTier-CLm9vzaK.js";
|
|
26
26
|
import { u as Qn } from "./search-BAPEUu1R.js";
|
|
27
27
|
import { c as Jn } from "./string-DpfFixWH.js";
|
|
28
28
|
import { d as Gi } from "./vuedraggable-CK8z7qA8.js";
|
|
29
|
-
import { _ as eo } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-
|
|
30
|
-
import { V as vi } from "./index-
|
|
29
|
+
import { _ as eo } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-BbjRIN7Z.js";
|
|
30
|
+
import { V as vi } from "./index-XVWDnyu-.js";
|
|
31
31
|
class yt {
|
|
32
32
|
constructor(i, t, n, a) {
|
|
33
33
|
this.scheduler = i, this.menuStore = t, this.updateMenu = n, this.dialog = a;
|
|
@@ -547,15 +547,15 @@ const oo = {
|
|
|
547
547
|
}
|
|
548
548
|
return (a, o) => {
|
|
549
549
|
const r = N("FmButton");
|
|
550
|
-
return i.variant === "full" ? (
|
|
550
|
+
return i.variant === "full" ? (O(), te("div", oo, [
|
|
551
551
|
V("div", ao, de(a.title), 1),
|
|
552
552
|
b(Dn),
|
|
553
|
-
(
|
|
553
|
+
(O(!0), te(Ae, null, Ue(a.items, (l) => (O(), j(fi, {
|
|
554
554
|
key: l.name,
|
|
555
555
|
name: l.name,
|
|
556
556
|
value: l.value || "--"
|
|
557
557
|
}, null, 8, ["name", "value"]))), 128))
|
|
558
|
-
])) : (
|
|
558
|
+
])) : (O(), j(r, {
|
|
559
559
|
key: 1,
|
|
560
560
|
icon: "info",
|
|
561
561
|
variant: "tertiary",
|
|
@@ -570,7 +570,7 @@ const oo = {
|
|
|
570
570
|
},
|
|
571
571
|
emits: ["update:catalogAndScheduler"],
|
|
572
572
|
setup(e, { emit: i }) {
|
|
573
|
-
const t = e, n = i, { t: a } = he(), o = be(), r = ee(o.state.currentCatalogId || null), l =
|
|
573
|
+
const t = e, n = i, { t: a } = he(), o = be(), r = ee(o.state.currentCatalogId || null), l = F(() => {
|
|
574
574
|
const m = Object.keys(t.linkedStatus.catalogs).map((p) => {
|
|
575
575
|
var v;
|
|
576
576
|
return {
|
|
@@ -585,7 +585,7 @@ const oo = {
|
|
|
585
585
|
},
|
|
586
586
|
...m
|
|
587
587
|
];
|
|
588
|
-
}), s = ee(o.state.currentSchedulerId || null), u = () => r.value ? t.linkedStatus.catalogs[r.value].schedulers : t.linkedStatus.schedulers, d =
|
|
588
|
+
}), s = ee(o.state.currentSchedulerId || null), u = () => r.value ? t.linkedStatus.catalogs[r.value].schedulers : t.linkedStatus.schedulers, d = F(() => {
|
|
589
589
|
const p = u().map((v) => {
|
|
590
590
|
var y;
|
|
591
591
|
return {
|
|
@@ -614,7 +614,7 @@ const oo = {
|
|
|
614
614
|
}
|
|
615
615
|
), (m, p) => {
|
|
616
616
|
const v = N("FmSelect");
|
|
617
|
-
return
|
|
617
|
+
return O(), te("div", ro, [
|
|
618
618
|
V("div", so, [
|
|
619
619
|
V("div", lo, de(h(a)("menu.catalog_scheduler.title")), 1),
|
|
620
620
|
V("div", uo, de(h(a)("menu.catalog_scheduler.subtitle")), 1)
|
|
@@ -656,7 +656,7 @@ const oo = {
|
|
|
656
656
|
const t = i;
|
|
657
657
|
return (n, a) => {
|
|
658
658
|
const o = N("fm-switch"), r = N("fm-card");
|
|
659
|
-
return n.disabled ? ve(n.$slots, "default", { key: 0 }, void 0, !0) : (
|
|
659
|
+
return n.disabled ? ve(n.$slots, "default", { key: 0 }, void 0, !0) : (O(), j(r, {
|
|
660
660
|
key: 1,
|
|
661
661
|
class: "p-16 space-y-24",
|
|
662
662
|
variant: "outlined"
|
|
@@ -665,7 +665,7 @@ const oo = {
|
|
|
665
665
|
V("div", fo, [
|
|
666
666
|
V("div", vo, [
|
|
667
667
|
V("p", go, de(n.title), 1),
|
|
668
|
-
n.description ? (
|
|
668
|
+
n.description ? (O(), te("p", bo, de(n.description), 1)) : ie("", !0)
|
|
669
669
|
]),
|
|
670
670
|
b(o, {
|
|
671
671
|
"model-value": n.toggle,
|
|
@@ -674,7 +674,7 @@ const oo = {
|
|
|
674
674
|
]),
|
|
675
675
|
b(bn, { name: "expand" }, {
|
|
676
676
|
default: P(() => [
|
|
677
|
-
n.toggle ? (
|
|
677
|
+
n.toggle ? (O(), te("div", yo, [
|
|
678
678
|
ve(n.$slots, "default", {}, void 0, !0)
|
|
679
679
|
])) : ie("", !0)
|
|
680
680
|
]),
|
|
@@ -685,7 +685,7 @@ const oo = {
|
|
|
685
685
|
}));
|
|
686
686
|
};
|
|
687
687
|
}
|
|
688
|
-
}), Qe = /* @__PURE__ */ it(_o, [["__scopeId", "data-v-e920f110"]]), wo =
|
|
688
|
+
}), Qe = /* @__PURE__ */ it(_o, [["__scopeId", "data-v-e920f110"]]), wo = Oi("menu-edit-state", {
|
|
689
689
|
state: () => ({
|
|
690
690
|
isUpdatingItem: !1,
|
|
691
691
|
storedCatalogId: null,
|
|
@@ -751,11 +751,11 @@ async function hl(e, i, t = {}) {
|
|
|
751
751
|
}
|
|
752
752
|
const xo = {}, Ro = { class: "pl-32" };
|
|
753
753
|
function Ao(e, i) {
|
|
754
|
-
return
|
|
754
|
+
return O(), te("div", Ro, [
|
|
755
755
|
ve(e.$slots, "default")
|
|
756
756
|
]);
|
|
757
757
|
}
|
|
758
|
-
const Mo = /* @__PURE__ */ it(xo, [["render", Ao]]),
|
|
758
|
+
const Mo = /* @__PURE__ */ it(xo, [["render", Ao]]), Oo = { class: "flex flex-col gap-4" }, Fo = { class: "fm-select__menu__wrapper" }, zo = {
|
|
759
759
|
key: 0,
|
|
760
760
|
class: "flex flex-col gap-4 justify-center"
|
|
761
761
|
}, Io = /* @__PURE__ */ me({
|
|
@@ -801,7 +801,7 @@ const Mo = /* @__PURE__ */ it(xo, [["render", Ao]]), Fo = { class: "flex flex-co
|
|
|
801
801
|
}, u = () => {
|
|
802
802
|
var v;
|
|
803
803
|
(v = o.value) == null || v.toggleMenu(!1);
|
|
804
|
-
}, d =
|
|
804
|
+
}, d = F(() => n.items.reduce(
|
|
805
805
|
(v, y) => (v[y.value] = y, v),
|
|
806
806
|
{}
|
|
807
807
|
)), c = ee(!1);
|
|
@@ -812,12 +812,12 @@ const Mo = /* @__PURE__ */ it(xo, [["render", Ao]]), Fo = { class: "flex flex-co
|
|
|
812
812
|
},
|
|
813
813
|
{ immediate: !0 }
|
|
814
814
|
);
|
|
815
|
-
const m =
|
|
815
|
+
const m = F(() => n.shouldShowSelectedItemsWithinPlaceholder && r.value.length > 0), p = F(() => m.value ? r.value.map((v) => v.label).join(", ") : n.placeholder);
|
|
816
816
|
return i({
|
|
817
817
|
hideMenu: u
|
|
818
818
|
}), (v, y) => {
|
|
819
819
|
const _ = N("FmIcon"), S = N("FmField"), f = N("FmMenuItem"), R = N("FmMenu"), K = N("FmFormGroup"), U = N("FmChipGroup");
|
|
820
|
-
return
|
|
820
|
+
return O(), te("div", Oo, [
|
|
821
821
|
b(K, {
|
|
822
822
|
"model-value": v.modelValue,
|
|
823
823
|
disabled: v.disabled,
|
|
@@ -836,7 +836,7 @@ const Mo = /* @__PURE__ */ it(xo, [["render", Ao]]), Fo = { class: "flex flex-co
|
|
|
836
836
|
}, {
|
|
837
837
|
"menu-button": P(() => [
|
|
838
838
|
b(S, {
|
|
839
|
-
class:
|
|
839
|
+
class: Oe(v.disabled ? "cursor-not-allowed" : "cursor-pointer"),
|
|
840
840
|
focused: c.value,
|
|
841
841
|
invalid: L
|
|
842
842
|
}, {
|
|
@@ -849,7 +849,7 @@ const Mo = /* @__PURE__ */ it(xo, [["render", Ao]]), Fo = { class: "flex flex-co
|
|
|
849
849
|
]),
|
|
850
850
|
default: P(() => [
|
|
851
851
|
V("div", {
|
|
852
|
-
class:
|
|
852
|
+
class: Oe([[
|
|
853
853
|
v.disabled ? "text-fm-color-typo-disabled" : m.value ? "text-fm-color-typo-primary" : "text-fm-color-typo-tertiary"
|
|
854
854
|
], "break-all fm-typo-en-body-lg-400 line-clamp-1"])
|
|
855
855
|
}, de(p.value), 3)
|
|
@@ -858,8 +858,8 @@ const Mo = /* @__PURE__ */ it(xo, [["render", Ao]]), Fo = { class: "flex flex-co
|
|
|
858
858
|
}, 1032, ["class", "focused", "invalid"])
|
|
859
859
|
]),
|
|
860
860
|
default: P(() => [
|
|
861
|
-
V("div",
|
|
862
|
-
(
|
|
861
|
+
V("div", Fo, [
|
|
862
|
+
(O(!0), te(Ae, null, Ue(v.items, (M) => (O(), j(f, {
|
|
863
863
|
key: M.value,
|
|
864
864
|
disabled: M.disabled,
|
|
865
865
|
"has-checkbox": !0,
|
|
@@ -875,7 +875,7 @@ const Mo = /* @__PURE__ */ it(xo, [["render", Ao]]), Fo = { class: "flex flex-co
|
|
|
875
875
|
]),
|
|
876
876
|
_: 3
|
|
877
877
|
}, 8, ["model-value", "disabled", "focused", "helper-state", "helper-text", "rules"]),
|
|
878
|
-
v.shouldShowChips && r.value.length > 0 ? (
|
|
878
|
+
v.shouldShowChips && r.value.length > 0 ? (O(), te("div", zo, [
|
|
879
879
|
b(U, {
|
|
880
880
|
disabled: v.disabled,
|
|
881
881
|
items: r.value.map((L) => ({ label: L.label })),
|
|
@@ -901,14 +901,14 @@ function se(e) {
|
|
|
901
901
|
for (var i = 1; i < arguments.length; i++) {
|
|
902
902
|
var t = arguments[i] != null ? arguments[i] : {};
|
|
903
903
|
i % 2 ? bi(Object(t), !0).forEach(function(n) {
|
|
904
|
-
|
|
904
|
+
Fe(e, n, t[n]);
|
|
905
905
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : bi(Object(t)).forEach(function(n) {
|
|
906
906
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n));
|
|
907
907
|
});
|
|
908
908
|
}
|
|
909
909
|
return e;
|
|
910
910
|
}
|
|
911
|
-
function
|
|
911
|
+
function Fe(e, i, t) {
|
|
912
912
|
return i in e ? Object.defineProperty(e, i, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[i] = t, e;
|
|
913
913
|
}
|
|
914
914
|
function To(e, i) {
|
|
@@ -927,22 +927,22 @@ function To(e, i) {
|
|
|
927
927
|
}
|
|
928
928
|
function tt(e) {
|
|
929
929
|
return function(i) {
|
|
930
|
-
if (Array.isArray(i)) return
|
|
930
|
+
if (Array.isArray(i)) return Ft(i);
|
|
931
931
|
}(e) || function(i) {
|
|
932
932
|
if (typeof Symbol < "u" && i[Symbol.iterator] != null || i["@@iterator"] != null) return Array.from(i);
|
|
933
933
|
}(e) || function(i, t) {
|
|
934
934
|
if (i) {
|
|
935
|
-
if (typeof i == "string") return
|
|
935
|
+
if (typeof i == "string") return Ft(i, t);
|
|
936
936
|
var n = Object.prototype.toString.call(i).slice(8, -1);
|
|
937
937
|
if (n === "Object" && i.constructor && (n = i.constructor.name), n === "Map" || n === "Set") return Array.from(i);
|
|
938
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return
|
|
938
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Ft(i, t);
|
|
939
939
|
}
|
|
940
940
|
}(e) || function() {
|
|
941
941
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
942
942
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
943
943
|
}();
|
|
944
944
|
}
|
|
945
|
-
function
|
|
945
|
+
function Ft(e, i) {
|
|
946
946
|
(i == null || i > e.length) && (i = e.length);
|
|
947
947
|
for (var t = 0, n = new Array(i); t < i; t++) n[t] = e[t];
|
|
948
948
|
return n;
|
|
@@ -1133,7 +1133,7 @@ var ct = function(e, i) {
|
|
|
1133
1133
|
this.touches.length && this.$emit("drag-end"), this.hovered && (this.$emit("leave"), this.hovered = !1), this.touches = [];
|
|
1134
1134
|
} }, emits: ["drag", "drag-end", "leave", "enter"] };
|
|
1135
1135
|
Zt.render = function(e, i, t, n, a, o) {
|
|
1136
|
-
return
|
|
1136
|
+
return O(), j("div", { ref: "draggable", class: t.classname, onTouchstart: i[1] || (i[1] = function() {
|
|
1137
1137
|
return o.onTouchStart && o.onTouchStart.apply(o, arguments);
|
|
1138
1138
|
}), onMousedown: i[2] || (i[2] = function() {
|
|
1139
1139
|
return o.onMouseDown && o.onMouseDown.apply(o, arguments);
|
|
@@ -1147,13 +1147,13 @@ var zt = Te("vue-handler-wrapper"), Zi = { name: "HandlerWrapper", components: {
|
|
|
1147
1147
|
var e;
|
|
1148
1148
|
if (this.horizontalPosition || this.verticalPosition) {
|
|
1149
1149
|
var i, t = Yi(this.horizontalPosition, this.verticalPosition);
|
|
1150
|
-
e = zt((
|
|
1150
|
+
e = zt((Fe(i = {}, t.classname, !0), Fe(i, "disabled", this.disabled), i));
|
|
1151
1151
|
} else e = zt({ disabled: this.disabled });
|
|
1152
1152
|
return { root: e, draggable: zt("draggable") };
|
|
1153
1153
|
} }, emits: ["leave", "enter", "drag", "drag-end"] };
|
|
1154
1154
|
Zi.render = function(e, i, t, n, a, o) {
|
|
1155
1155
|
var r = N("DraggableElement");
|
|
1156
|
-
return
|
|
1156
|
+
return O(), j("div", { class: o.classes.root }, [b(r, { class: o.classes.draggable, onDrag: i[1] || (i[1] = function(l) {
|
|
1157
1157
|
return e.$emit("drag", l);
|
|
1158
1158
|
}), onDragEnd: i[2] || (i[2] = function(l) {
|
|
1159
1159
|
return e.$emit("drag-end");
|
|
@@ -1167,11 +1167,11 @@ Zi.render = function(e, i, t, n, a, o) {
|
|
|
1167
1167
|
};
|
|
1168
1168
|
var Uo = Te("vue-line-wrapper"), Qi = { name: "LineWrapper", components: { DraggableElement: Zt }, props: { position: { type: String, required: !0 }, disabled: { type: Boolean, default: !1 } }, computed: { classname: function() {
|
|
1169
1169
|
var e;
|
|
1170
|
-
return Uo((
|
|
1170
|
+
return Uo((Fe(e = {}, this.position, !0), Fe(e, "disabled", this.disabled), e));
|
|
1171
1171
|
} }, emits: ["leave", "enter", "drag", "drag-end"] };
|
|
1172
1172
|
Qi.render = function(e, i, t, n, a, o) {
|
|
1173
1173
|
var r = N("DraggableElement");
|
|
1174
|
-
return
|
|
1174
|
+
return O(), j(r, { class: o.classname, onDrag: i[1] || (i[1] = function(l) {
|
|
1175
1175
|
return e.$emit("drag", l);
|
|
1176
1176
|
}), onDragEnd: i[2] || (i[2] = function(l) {
|
|
1177
1177
|
return e.$emit("drag-end");
|
|
@@ -1427,7 +1427,7 @@ function gt(e, i, t) {
|
|
|
1427
1427
|
var ta = Te("vue-simple-handler"), ia = Te("vue-simple-handler-wrapper"), Qt = { name: "SimpleHandler", components: { HandlerWrapper: Zi }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
|
|
1428
1428
|
return { hover: !1 };
|
|
1429
1429
|
}, computed: { classes: function() {
|
|
1430
|
-
var e, i = (
|
|
1430
|
+
var e, i = (Fe(e = {}, this.horizontalPosition, !!this.horizontalPosition), Fe(e, this.verticalPosition, !!this.verticalPosition), Fe(e, "".concat(this.horizontalPosition, "-").concat(this.verticalPosition), !!(this.verticalPosition && this.horizontalPosition)), Fe(e, "hover", this.hover), e);
|
|
1431
1431
|
return { default: ge(ta(i), this.defaultClass, this.hover && this.hoverClass), wrapper: ge(ia(i), this.wrapperClass) };
|
|
1432
1432
|
} }, methods: { onDrag: function(e) {
|
|
1433
1433
|
this.$emit("drag", e);
|
|
@@ -1440,14 +1440,14 @@ var ta = Te("vue-simple-handler"), ia = Te("vue-simple-handler-wrapper"), Qt = {
|
|
|
1440
1440
|
} }, emits: ["drag", "drag-end"] };
|
|
1441
1441
|
Qt.render = function(e, i, t, n, a, o) {
|
|
1442
1442
|
var r = N("HandlerWrapper");
|
|
1443
|
-
return
|
|
1443
|
+
return O(), j(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: P(function() {
|
|
1444
1444
|
return [b("div", { class: o.classes.default }, null, 2)];
|
|
1445
1445
|
}), _: 1 }, 8, ["class", "vertical-position", "horizontal-position", "disabled", "onDrag", "onDragEnd", "onEnter", "onLeave"]);
|
|
1446
1446
|
};
|
|
1447
1447
|
var na = Te("vue-simple-line"), oa = Te("vue-simple-line-wrapper"), Jt = { name: "SimpleLine", components: { LineWrapper: Qi }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, position: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
|
|
1448
1448
|
return { hover: !1 };
|
|
1449
1449
|
}, computed: { classes: function() {
|
|
1450
|
-
return { root: ge(na(
|
|
1450
|
+
return { root: ge(na(Fe({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass), wrapper: ge(oa(Fe({}, this.position, !0)), this.wrapperClass) };
|
|
1451
1451
|
} }, methods: { onDrag: function(e) {
|
|
1452
1452
|
this.$emit("drag", e);
|
|
1453
1453
|
}, onEnter: function() {
|
|
@@ -1459,7 +1459,7 @@ var na = Te("vue-simple-line"), oa = Te("vue-simple-line-wrapper"), Jt = { name:
|
|
|
1459
1459
|
} }, emits: ["drag", "drag-end"] };
|
|
1460
1460
|
Jt.render = function(e, i, t, n, a, o) {
|
|
1461
1461
|
var r = N("LineWrapper");
|
|
1462
|
-
return
|
|
1462
|
+
return O(), j(r, { class: o.classes.wrapper, position: t.position, disabled: t.disabled, onDrag: o.onDrag, onDragEnd: o.onDragEnd, onEnter: o.onEnter, onLeave: o.onLeave }, { default: P(function() {
|
|
1463
1463
|
return [b("div", { class: o.classes.root }, null, 2)];
|
|
1464
1464
|
}), _: 1 }, 8, ["class", "position", "disabled", "onDrag", "onDragEnd", "onEnter", "onLeave"]);
|
|
1465
1465
|
};
|
|
@@ -1508,7 +1508,7 @@ var Et = Te("vue-bounding-box"), aa = ["east", "west", null], ra = ["south", "no
|
|
|
1508
1508
|
if (t && n) {
|
|
1509
1509
|
var r = a.horizontalDirection, l = a.verticalDirection, s = r === "east" ? t : r === "west" ? 0 : t / 2, u = l === "south" ? n : l === "north" ? 0 : n / 2;
|
|
1510
1510
|
o.wrapperClass = Et("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));
|
|
1511
|
-
} else o.wrapperClass = Et("handler",
|
|
1511
|
+
} else o.wrapperClass = Et("handler", Fe({}, a.classname, !0));
|
|
1512
1512
|
i.push(o);
|
|
1513
1513
|
}
|
|
1514
1514
|
}), i;
|
|
@@ -1525,14 +1525,14 @@ var Et = Te("vue-bounding-box"), aa = ["east", "west", null], ra = ["south", "no
|
|
|
1525
1525
|
i === "west" ? l.left -= o : i === "east" && (l.right += o), t === "north" ? l.top -= r : t === "south" && (l.bottom += r), !t && i ? n = "width" : t && !i && (n = "height"), this.resizable && this.$emit("resize", new Po(l, { allowedDirections: { left: i === "west" || !i, right: i === "east" || !i, bottom: t === "south" || !t, top: t === "north" || !t }, preserveAspectRatio: e.nativeEvent && e.nativeEvent.shiftKey, respectDirection: n }));
|
|
1526
1526
|
} }, emits: ["resize", "resize-end"] };
|
|
1527
1527
|
nn.render = function(e, i, t, n, a, o) {
|
|
1528
|
-
return
|
|
1529
|
-
return
|
|
1528
|
+
return O(), j("div", { ref: "box", class: o.classes.root, style: o.style }, [ve(e.$slots, "default"), b("div", null, [(O(!0), j(Ae, null, Ue(o.lineNodes, function(r) {
|
|
1529
|
+
return O(), j(wt(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) {
|
|
1530
1530
|
return o.onHandlerDrag(l, r.horizontalDirection, r.verticalDirection);
|
|
1531
1531
|
}, onDragEnd: i[1] || (i[1] = function(l) {
|
|
1532
1532
|
return o.onEnd();
|
|
1533
1533
|
}) }, null, 8, ["default-class", "hover-class", "wrapper-class", "position", "disabled", "onDrag"]);
|
|
1534
|
-
}), 128))]), (
|
|
1535
|
-
return
|
|
1534
|
+
}), 128))]), (O(!0), j(Ae, null, Ue(o.handlerNodes, function(r) {
|
|
1535
|
+
return O(), j("div", { key: r.name, style: r.wrapperStyle, class: r.wrapperClass }, [(O(), j(wt(r.component), { "default-class": r.class, "hover-class": r.hoverClass, "wrapper-class": r.wrapperClass, "horizontal-position": r.horizontalDirection, "vertical-position": r.verticalDirection, disabled: r.disabled, onDrag: function(l) {
|
|
1536
1536
|
return o.onHandlerDrag(l, r.horizontalDirection, r.verticalDirection);
|
|
1537
1537
|
}, onDragEnd: i[2] || (i[2] = function(l) {
|
|
1538
1538
|
return o.onEnd();
|
|
@@ -1578,7 +1578,7 @@ var sa = Te("vue-draggable-area"), on = { name: "DraggableArea", props: { movabl
|
|
|
1578
1578
|
this.touches.length && this.$emit("move-end"), this.touches = [];
|
|
1579
1579
|
} }, emits: ["move", "move-end"] };
|
|
1580
1580
|
on.render = function(e, i, t, n, a, o) {
|
|
1581
|
-
return
|
|
1581
|
+
return O(), j("div", { ref: "container", onTouchstart: i[1] || (i[1] = function() {
|
|
1582
1582
|
return o.onTouchStart && o.onTouchStart.apply(o, arguments);
|
|
1583
1583
|
}), onMousedown: i[2] || (i[2] = function() {
|
|
1584
1584
|
return o.onMouseDown && o.onMouseDown.apply(o, arguments);
|
|
@@ -1722,7 +1722,7 @@ var rn = { props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { typ
|
|
|
1722
1722
|
var r, l;
|
|
1723
1723
|
} }, emits: ["resize", "move", "transform-end"] };
|
|
1724
1724
|
rn.render = function(e, i, t, n, a, o) {
|
|
1725
|
-
return
|
|
1725
|
+
return O(), j("div", { ref: "container", onTouchstart: i[1] || (i[1] = function() {
|
|
1726
1726
|
return o.onTouchStart && o.onTouchStart.apply(o, arguments);
|
|
1727
1727
|
}), onMousedown: i[2] || (i[2] = function() {
|
|
1728
1728
|
return o.onMouseDown && o.onMouseDown.apply(o, arguments);
|
|
@@ -1733,7 +1733,7 @@ rn.render = function(e, i, t, n, a, o) {
|
|
|
1733
1733
|
var jt = { components: { TransformableImage: rn }, props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { type: Boolean, required: !0 }, touchResize: { type: Boolean, required: !0 }, wheelResize: { type: [Boolean, Object], required: !0 } }, emits: ["resize", "move"] };
|
|
1734
1734
|
jt.render = function(e, i, t, n, a, o) {
|
|
1735
1735
|
var r = N("transformable-image");
|
|
1736
|
-
return
|
|
1736
|
+
return O(), j(r, { "touch-move": t.touchMove, "touch-resize": t.touchResize, "mouse-move": t.mouseMove, "wheel-resize": t.wheelResize, onMove: i[1] || (i[1] = function(l) {
|
|
1737
1737
|
return e.$emit("move", l);
|
|
1738
1738
|
}), onResize: i[2] || (i[2] = function(l) {
|
|
1739
1739
|
return e.$emit("resize", l);
|
|
@@ -1785,12 +1785,12 @@ var bt = Te("vue-preview"), sn = { props: { coordinates: { type: Object }, trans
|
|
|
1785
1785
|
e && e.complete && this.refreshImage(), this.refresh();
|
|
1786
1786
|
} } };
|
|
1787
1787
|
sn.render = function(e, i, t, n, a, o) {
|
|
1788
|
-
return
|
|
1788
|
+
return O(), j("div", { ref: "root", class: o.classes.root, style: o.style }, [b("div", { ref: "wrapper", class: o.classes.wrapper, style: o.wrapperStyle }, [ut(b("img", { ref: "image", src: t.image && t.image.src, class: o.classes.image, style: o.imageStyle }, null, 14, ["src"]), [[St, t.image && t.image.src]])], 6)], 6);
|
|
1789
1789
|
};
|
|
1790
1790
|
var ln = { components: { Preview: sn }, inheritAttrs: !1 };
|
|
1791
1791
|
ln.render = function(e, i, t, n, a, o) {
|
|
1792
1792
|
var r = N("preview");
|
|
1793
|
-
return
|
|
1793
|
+
return O(), j(r, Fi(e.$attrs, { fill: !0 }), null, 16);
|
|
1794
1794
|
};
|
|
1795
1795
|
var Dt = Te("vue-rectangle-stencil"), un = { name: "RectangleStencil", components: { StencilPreview: ln, BoundingBox: nn, DraggableArea: on }, props: { image: { type: Object }, coordinates: { type: Object }, stencilCoordinates: { type: Object }, handlers: { type: Object }, handlersComponent: { type: [Object, String], default: function() {
|
|
1796
1796
|
return Qt;
|
|
@@ -1824,7 +1824,7 @@ var Dt = Te("vue-rectangle-stencil"), un = { name: "RectangleStencil", component
|
|
|
1824
1824
|
} }, emits: ["resize", "resize-end", "move", "move-end"] };
|
|
1825
1825
|
un.render = function(e, i, t, n, a, o) {
|
|
1826
1826
|
var r = N("stencil-preview"), l = N("draggable-area"), s = N("bounding-box");
|
|
1827
|
-
return
|
|
1827
|
+
return O(), j("div", { class: o.classes.stencil, style: o.style }, [b(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: P(function() {
|
|
1828
1828
|
return [b(l, { movable: t.movable, onMove: o.onMove, onMoveEnd: o.onMoveEnd }, { default: P(function() {
|
|
1829
1829
|
return [b(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"])];
|
|
1830
1830
|
}), _: 1 }, 8, ["movable", "onMove", "onMoveEnd"])];
|
|
@@ -2257,9 +2257,9 @@ var ca = ["transitions"], Ge = Te("vue-advanced-cropper"), cn = { name: "Cropper
|
|
|
2257
2257
|
}
|
|
2258
2258
|
} }, emits: ["change", "error", "ready"] }, da = { key: 0, ref: "canvas", style: { display: "none" } }, ma = { key: 1, ref: "sourceCanvas", style: { display: "none" } };
|
|
2259
2259
|
cn.render = function(e, i, t, n, a, o) {
|
|
2260
|
-
return
|
|
2260
|
+
return O(), j("div", { ref: "cropper", class: o.classes.cropper }, [b("div", { ref: "stretcher", class: o.classes.stretcher }, null, 2), b("div", { class: o.classes.boundaries, style: o.boundariesStyle }, [(O(), j(wt(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: P(function() {
|
|
2261
2261
|
return [b("div", { class: o.classes.background, style: o.boundariesStyle }, null, 6), b("div", { class: o.classes.imageWrapper }, [b("img", { ref: "image", crossorigin: a.imageAttributes.crossOrigin, src: a.imageAttributes.src, class: o.classes.image, style: o.imageStyle, onMousedown: i[1] || (i[1] = Ct(function() {
|
|
2262
|
-
}, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2), b("div", { class: o.classes.foreground, style: o.boundariesStyle }, null, 6), ut((
|
|
2262
|
+
}, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2), b("div", { class: o.classes.foreground, style: o.boundariesStyle }, null, 6), ut((O(), j(wt(t.stencilComponent), Fi({ 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"])), [[St, a.imageLoaded]]), t.canvas ? (O(), j("canvas", da, null, 512)) : ie("", !0), t.canvas ? (O(), j("canvas", ma, null, 512)) : ie("", !0)];
|
|
2263
2263
|
}), _: 1 }, 8, ["class", "wheel-resize", "touch-resize", "touch-move", "mouse-move", "onMove", "onResize"]))], 6)], 2);
|
|
2264
2264
|
};
|
|
2265
2265
|
function ei(e, i) {
|
|
@@ -2289,15 +2289,15 @@ const fa = {
|
|
|
2289
2289
|
key: 0,
|
|
2290
2290
|
class: "space-y-4"
|
|
2291
2291
|
}, va = { class: "fm-typo-en-body-lg-600" }, ga = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, ba = {
|
|
2292
|
-
class: /* @__PURE__ */
|
|
2292
|
+
class: /* @__PURE__ */ Oe([
|
|
2293
2293
|
"relative",
|
|
2294
2294
|
"h-[150px] w-[200px]",
|
|
2295
2295
|
"border-2 border-dashed border-fm-color-neutral-gray-300 rounded-md"
|
|
2296
2296
|
])
|
|
2297
2297
|
}, ya = {
|
|
2298
|
-
class: /* @__PURE__ */
|
|
2298
|
+
class: /* @__PURE__ */ Oe(["absolute inset-0", "h-full w-full", "rounded-md overflow-hidden"])
|
|
2299
2299
|
}, _a = {
|
|
2300
|
-
class: /* @__PURE__ */
|
|
2300
|
+
class: /* @__PURE__ */ Oe(["relative z-0", "w-full h-full", "overflow-hidden"])
|
|
2301
2301
|
}, wa = { class: "absolute top-12 right-12 z-10 flex flex-col gap-8" }, Sa = { class: "fm-typo-en-body-lg-600 pb-4" }, Ca = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, ka = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xa = /* @__PURE__ */ me({
|
|
2302
2302
|
__name: "ImageDropField",
|
|
2303
2303
|
props: {
|
|
@@ -2306,7 +2306,7 @@ const fa = {
|
|
|
2306
2306
|
},
|
|
2307
2307
|
emits: ["update:model-value", "reset:model-value"],
|
|
2308
2308
|
setup(e, { emit: i }) {
|
|
2309
|
-
const t = e, { t: n } = he(), a = i, o =
|
|
2309
|
+
const t = e, { t: n } = he(), a = i, o = F(() => t.modelValue ? URL.createObjectURL(t.modelValue) : ""), r = ee(), l = ee(), s = ee(!1);
|
|
2310
2310
|
async function u([_]) {
|
|
2311
2311
|
if (!_) return;
|
|
2312
2312
|
s.value = !0;
|
|
@@ -2334,7 +2334,7 @@ const fa = {
|
|
|
2334
2334
|
function m() {
|
|
2335
2335
|
r.value = void 0, l.value = void 0, a("reset:model-value");
|
|
2336
2336
|
}
|
|
2337
|
-
const p = Yt(), v =
|
|
2337
|
+
const p = Yt(), v = F(() => !!p.showRemy);
|
|
2338
2338
|
ei("apply-image", (_) => {
|
|
2339
2339
|
_ != null && _.imageData && (r.value = _.imageData, l.value = _.imageData);
|
|
2340
2340
|
});
|
|
@@ -2352,7 +2352,7 @@ const fa = {
|
|
|
2352
2352
|
}
|
|
2353
2353
|
return (_, S) => {
|
|
2354
2354
|
const f = N("fm-icon"), R = N("fm-drop-field");
|
|
2355
|
-
return r.value || o.value ? (
|
|
2355
|
+
return r.value || o.value ? (O(), te("div", fa, [
|
|
2356
2356
|
V("p", va, [
|
|
2357
2357
|
Pt(de(h(n)("menu.common.labels.product_image")) + " ", 1),
|
|
2358
2358
|
V("span", ga, de(h(n)("menu.common.labels.optional")), 1)
|
|
@@ -2378,15 +2378,15 @@ const fa = {
|
|
|
2378
2378
|
]),
|
|
2379
2379
|
V("div", wa, [
|
|
2380
2380
|
V("button", {
|
|
2381
|
-
class:
|
|
2381
|
+
class: Oe(["w-24 h-24 rounded-[50%]", "bg-fm-color-neutral-white"]),
|
|
2382
2382
|
type: "button",
|
|
2383
2383
|
onClick: m
|
|
2384
2384
|
}, [
|
|
2385
2385
|
b(f, { name: "close" })
|
|
2386
2386
|
]),
|
|
2387
|
-
v.value ? (
|
|
2387
|
+
v.value ? (O(), te("button", {
|
|
2388
2388
|
key: 0,
|
|
2389
|
-
class:
|
|
2389
|
+
class: Oe([
|
|
2390
2390
|
"w-24 h-24 rounded-[50%]",
|
|
2391
2391
|
"bg-fm-color-neutral-white",
|
|
2392
2392
|
"flex items-center justify-center"
|
|
@@ -2402,7 +2402,7 @@ const fa = {
|
|
|
2402
2402
|
])
|
|
2403
2403
|
])
|
|
2404
2404
|
])
|
|
2405
|
-
])) : (
|
|
2405
|
+
])) : (O(), j(R, {
|
|
2406
2406
|
key: 1,
|
|
2407
2407
|
accept: ".jpg, .jpeg, .png, .gif, .JPG, .JPEG, .PNG, .GIF",
|
|
2408
2408
|
"content-class": "h-[150px] w-[200px]",
|
|
@@ -2463,7 +2463,7 @@ const fa = {
|
|
|
2463
2463
|
},
|
|
2464
2464
|
emits: ["update:model-value"],
|
|
2465
2465
|
setup(e, { emit: i }) {
|
|
2466
|
-
const t = e, { t: n } = he(), a = i, o =
|
|
2466
|
+
const t = e, { t: n } = he(), a = i, o = F(() => ({
|
|
2467
2467
|
ALL: {
|
|
2468
2468
|
label: n("menu.order.from.options.all"),
|
|
2469
2469
|
value: G.F_ORDER_FROM.enum.ALL
|
|
@@ -2476,7 +2476,7 @@ const fa = {
|
|
|
2476
2476
|
label: n("menu.order.from.options.none"),
|
|
2477
2477
|
value: G.F_ORDER_FROM.enum.NONE
|
|
2478
2478
|
}
|
|
2479
|
-
})), r =
|
|
2479
|
+
})), r = F(() => {
|
|
2480
2480
|
const u = Object.values(o.value);
|
|
2481
2481
|
if (t.disable) return u;
|
|
2482
2482
|
let d = t.editActiveOnly ? [o.value.ALL, o.value.NONE] : u;
|
|
@@ -2492,14 +2492,14 @@ const fa = {
|
|
|
2492
2492
|
let d = u;
|
|
2493
2493
|
return t.editActiveOnly && u && (d = d === G.F_ORDER_FROM.enum.NONE ? G.F_ORDER_FROM.enum.NONE : G.F_ORDER_FROM.enum.ALL), d;
|
|
2494
2494
|
}
|
|
2495
|
-
const s =
|
|
2495
|
+
const s = F(() => {
|
|
2496
2496
|
if (t.modelValue) return t.modelValue;
|
|
2497
2497
|
const u = t.editActiveOnly || t.required, d = r.value.some((m) => m.value === null), c = u && !d ? t.fallback ?? r.value[0].value : t.modelValue;
|
|
2498
2498
|
return c ? l(c) : null;
|
|
2499
2499
|
});
|
|
2500
2500
|
return (u, d) => {
|
|
2501
2501
|
const c = N("fm-select");
|
|
2502
|
-
return
|
|
2502
|
+
return O(), te("div", null, [
|
|
2503
2503
|
b(c, {
|
|
2504
2504
|
disabled: e.disable,
|
|
2505
2505
|
items: r.value,
|
|
@@ -2513,10 +2513,10 @@ const fa = {
|
|
|
2513
2513
|
]);
|
|
2514
2514
|
};
|
|
2515
2515
|
}
|
|
2516
|
-
}), Ra = { class: "flex flex-col gap-4" }, Aa = { class: "fm-select__menu__wrapper" }, Ma = { class: "fm-typo-en-body-lg-600 text-fm-color-primary" },
|
|
2516
|
+
}), Ra = { class: "flex flex-col gap-4" }, Aa = { class: "fm-select__menu__wrapper" }, Ma = { class: "fm-typo-en-body-lg-600 text-fm-color-primary" }, Oa = {
|
|
2517
2517
|
key: 0,
|
|
2518
2518
|
class: "flex flex-col gap-4 justify-center"
|
|
2519
|
-
},
|
|
2519
|
+
}, Fa = /* @__PURE__ */ me({
|
|
2520
2520
|
__name: "SubcategorySelector",
|
|
2521
2521
|
props: {
|
|
2522
2522
|
modelValue: {},
|
|
@@ -2547,10 +2547,10 @@ const fa = {
|
|
|
2547
2547
|
}, v = () => {
|
|
2548
2548
|
var f;
|
|
2549
2549
|
(f = u.value) == null || f.toggleMenu(!1), c.create();
|
|
2550
|
-
}, y =
|
|
2550
|
+
}, y = F(() => t.items.reduce(
|
|
2551
2551
|
(f, R) => (f[R.value] = R, f),
|
|
2552
2552
|
{}
|
|
2553
|
-
)), _ =
|
|
2553
|
+
)), _ = F(() => d.value.length > 0 ? d.value.map((f) => f.label).join("/") : t.placeholder), S = ee(!1);
|
|
2554
2554
|
return xe(
|
|
2555
2555
|
() => t.modelValue,
|
|
2556
2556
|
(f) => {
|
|
@@ -2559,7 +2559,7 @@ const fa = {
|
|
|
2559
2559
|
{ immediate: !0 }
|
|
2560
2560
|
), (f, R) => {
|
|
2561
2561
|
const K = N("FmIcon"), U = N("FmField"), L = N("FmMenuItem"), M = N("FmMenu"), T = N("FmFormGroup"), I = N("FmChipGroup");
|
|
2562
|
-
return
|
|
2562
|
+
return O(), te("div", Ra, [
|
|
2563
2563
|
b(T, {
|
|
2564
2564
|
"model-value": f.modelValue,
|
|
2565
2565
|
disabled: f.disabled,
|
|
@@ -2578,7 +2578,7 @@ const fa = {
|
|
|
2578
2578
|
}, {
|
|
2579
2579
|
"menu-button": P(() => [
|
|
2580
2580
|
b(U, {
|
|
2581
|
-
class:
|
|
2581
|
+
class: Oe(f.disabled ? "cursor-not-allowed" : "cursor-pointer"),
|
|
2582
2582
|
focused: S.value,
|
|
2583
2583
|
invalid: w
|
|
2584
2584
|
}, {
|
|
@@ -2591,7 +2591,7 @@ const fa = {
|
|
|
2591
2591
|
]),
|
|
2592
2592
|
default: P(() => [
|
|
2593
2593
|
V("div", {
|
|
2594
|
-
class:
|
|
2594
|
+
class: Oe([[
|
|
2595
2595
|
f.disabled ? "text-fm-color-typo-disabled" : d.value.length > 0 ? "text-fm-color-typo-primary" : "text-fm-color-typo-tertiary"
|
|
2596
2596
|
], "break-all fm-typo-en-body-lg-400 line-clamp-1"])
|
|
2597
2597
|
}, de(_.value), 3)
|
|
@@ -2601,7 +2601,7 @@ const fa = {
|
|
|
2601
2601
|
]),
|
|
2602
2602
|
default: P(() => [
|
|
2603
2603
|
V("div", Aa, [
|
|
2604
|
-
(
|
|
2604
|
+
(O(!0), te(Ae, null, Ue(f.items, (A) => (O(), j(L, {
|
|
2605
2605
|
key: A.value,
|
|
2606
2606
|
disabled: A.disabled,
|
|
2607
2607
|
"has-checkbox": !0,
|
|
@@ -2628,7 +2628,7 @@ const fa = {
|
|
|
2628
2628
|
]),
|
|
2629
2629
|
_: 1
|
|
2630
2630
|
}, 8, ["model-value", "disabled", "focused", "helper-state", "helper-text", "rules"]),
|
|
2631
|
-
d.value.length > 0 ? (
|
|
2631
|
+
d.value.length > 0 ? (O(), te("div", Oa, [
|
|
2632
2632
|
b(I, {
|
|
2633
2633
|
disabled: f.disabled,
|
|
2634
2634
|
items: d.value.map((w) => ({ label: w.label })),
|
|
@@ -2639,7 +2639,7 @@ const fa = {
|
|
|
2639
2639
|
]);
|
|
2640
2640
|
};
|
|
2641
2641
|
}
|
|
2642
|
-
}), za = /* @__PURE__ */ it(
|
|
2642
|
+
}), za = /* @__PURE__ */ it(Fa, [["__scopeId", "data-v-ca5e943c"]]);
|
|
2643
2643
|
function dn(e, i) {
|
|
2644
2644
|
return e || (i ? void 0 : "");
|
|
2645
2645
|
}
|
|
@@ -2648,7 +2648,7 @@ const Ia = {
|
|
|
2648
2648
|
}, Ea = {
|
|
2649
2649
|
class: "flex-1 flex flex-col gap-24"
|
|
2650
2650
|
}, Ta = {
|
|
2651
|
-
class: /* @__PURE__ */
|
|
2651
|
+
class: /* @__PURE__ */ Oe(["flex space-x-16", "xs:flex-col xs:space-x-0 xs:space-y-16"])
|
|
2652
2652
|
}, Da = {
|
|
2653
2653
|
class: "w-[160px] xs:w-full"
|
|
2654
2654
|
}, Pa = {
|
|
@@ -2699,13 +2699,13 @@ const ja = /* @__PURE__ */ me({
|
|
|
2699
2699
|
menuLoader: s
|
|
2700
2700
|
}), {
|
|
2701
2701
|
checkMenuIsLoading: d
|
|
2702
|
-
} = qe(Xe(Ee())), c = i, m =
|
|
2702
|
+
} = qe(Xe(Ee())), c = i, m = F(() => n.rules.item), p = F(() => n.categorizedItems), v = F(() => {
|
|
2703
2703
|
const g = p.value.map((C) => ({
|
|
2704
2704
|
label: C.name,
|
|
2705
2705
|
value: C.id
|
|
2706
2706
|
}));
|
|
2707
2707
|
return t.isAddon ? g : g.filter((C) => !!C.value);
|
|
2708
|
-
}), y =
|
|
2708
|
+
}), y = F(() => m.value.addon), _ = F(() => !v.value.find((g) => !!g.value)), S = F(() => On(t.form.category ? t.form : t.fallback) || []), f = F(() => S.value.reduce((g, C) => (g[C._id] = C, g), {})), R = F({
|
|
2709
2709
|
get() {
|
|
2710
2710
|
return S.value.map((g) => g._id);
|
|
2711
2711
|
},
|
|
@@ -2752,11 +2752,11 @@ const ja = /* @__PURE__ */ me({
|
|
|
2752
2752
|
ot(async () => {
|
|
2753
2753
|
!_.value && t.form.category === void 0 && t.isCreate && I(Je.PRODUCT);
|
|
2754
2754
|
});
|
|
2755
|
-
const L =
|
|
2755
|
+
const L = F(() => {
|
|
2756
2756
|
var C;
|
|
2757
2757
|
const g = t.form.name || ((C = t.fallback) == null ? void 0 : C.name);
|
|
2758
2758
|
return g ? n.items.filter((W) => !!W.category && W._id !== t.form._id && W.name === g).length : 0;
|
|
2759
|
-
}), M =
|
|
2759
|
+
}), M = F(() => {
|
|
2760
2760
|
var ae, re, E;
|
|
2761
2761
|
if (!n.state.featureFlags.uniqueProductCode) return 0;
|
|
2762
2762
|
const g = t.form.code || ((ae = t.fallback) == null ? void 0 : ae.code);
|
|
@@ -2766,7 +2766,7 @@ const ja = /* @__PURE__ */ me({
|
|
|
2766
2766
|
return (W == null ? void 0 : W.code) === g && (C -= 1), (E = (re = W == null ? void 0 : W.variant) == null ? void 0 : re.variantCombinations) == null || E.forEach((D) => {
|
|
2767
2767
|
D.code === g && (C -= 1);
|
|
2768
2768
|
}), C;
|
|
2769
|
-
}), T =
|
|
2769
|
+
}), T = F(() => t.isAddon ? Je.ADD_ON : Je.PRODUCT);
|
|
2770
2770
|
function I(g) {
|
|
2771
2771
|
var W, ae, re;
|
|
2772
2772
|
if (T.value === g) return;
|
|
@@ -2793,10 +2793,10 @@ const ja = /* @__PURE__ */ me({
|
|
|
2793
2793
|
command: "suggestDescription"
|
|
2794
2794
|
});
|
|
2795
2795
|
}
|
|
2796
|
-
const k =
|
|
2796
|
+
const k = F(() => n.subcategories), x = F(() => k.value.map((g) => ({
|
|
2797
2797
|
label: g.name,
|
|
2798
2798
|
value: g._id
|
|
2799
|
-
}))), $ =
|
|
2799
|
+
}))), $ = F({
|
|
2800
2800
|
get() {
|
|
2801
2801
|
return t.form.subCategories || [];
|
|
2802
2802
|
},
|
|
@@ -2808,7 +2808,7 @@ const ja = /* @__PURE__ */ me({
|
|
|
2808
2808
|
} = he();
|
|
2809
2809
|
return (g, C) => {
|
|
2810
2810
|
const W = N("fm-text-field"), ae = N("fm-textarea"), re = N("fm-radio"), E = N("FmSnackbar"), D = N("FmButton"), Y = N("fm-radio-group"), q = N("FmFormGroup"), Z = N("FmStepperField"), X = zi("tooltip");
|
|
2811
|
-
return
|
|
2811
|
+
return O(), j(Be, {
|
|
2812
2812
|
title: h(z)("menu.product.form.detail.title")
|
|
2813
2813
|
}, {
|
|
2814
2814
|
default: P(() => {
|
|
@@ -2855,7 +2855,7 @@ const ja = /* @__PURE__ */ me({
|
|
|
2855
2855
|
}, null, 8, ["disabled", "model-value"])]), b(Ye, {
|
|
2856
2856
|
label: h(n).isV4 ? h(z)("menu.product.form.detail.category.label") : h(z)("menu.product.form.detail.category.label_singular")
|
|
2857
2857
|
}, {
|
|
2858
|
-
default: P(() => [y.value ? (
|
|
2858
|
+
default: P(() => [y.value ? (O(), j(Y, {
|
|
2859
2859
|
key: 0,
|
|
2860
2860
|
disabled: !m.value.category,
|
|
2861
2861
|
"model-value": T.value,
|
|
@@ -2867,11 +2867,11 @@ const ja = /* @__PURE__ */ me({
|
|
|
2867
2867
|
label: h(z)("menu.product.form.detail.category.options.product.label"),
|
|
2868
2868
|
sublabel: h(z)("menu.product.form.detail.category.options.product.sublabel")
|
|
2869
2869
|
}, null, 8, ["disabled", "value", "label", "sublabel"]), b(Mo, null, {
|
|
2870
|
-
default: P(() => [h(n).isV4 ? (
|
|
2870
|
+
default: P(() => [h(n).isV4 ? (O(), j(U, {
|
|
2871
2871
|
key: 0
|
|
2872
2872
|
})) : ie("", !0)]),
|
|
2873
2873
|
_: 1
|
|
2874
|
-
})]), _.value ? (
|
|
2874
|
+
})]), _.value ? (O(), te("div", La, [b(E, {
|
|
2875
2875
|
title: h(z)("menu.product.form.detail.category.add_first"),
|
|
2876
2876
|
variant: "info"
|
|
2877
2877
|
}, null, 8, ["title"]), b(D, {
|
|
@@ -2885,7 +2885,7 @@ const ja = /* @__PURE__ */ me({
|
|
|
2885
2885
|
sublabel: h(z)("menu.product.form.detail.category.options.addon.sublabel")
|
|
2886
2886
|
}, null, 8, ["value", "label", "sublabel"])])]),
|
|
2887
2887
|
_: 1
|
|
2888
|
-
}, 8, ["disabled", "model-value"])) : ie("", !0), h(n).isV4 ? ie("", !0) : (
|
|
2888
|
+
}, 8, ["disabled", "model-value"])) : ie("", !0), h(n).isV4 ? ie("", !0) : (O(), j(q, {
|
|
2889
2889
|
key: 1,
|
|
2890
2890
|
"model-value": g.form.category,
|
|
2891
2891
|
rules: [(ne) => !ne && !g.isOverride ? "Category is required" : !0],
|
|
@@ -2897,7 +2897,7 @@ const ja = /* @__PURE__ */ me({
|
|
|
2897
2897
|
_: 1
|
|
2898
2898
|
}, 8, ["model-value", "rules"]))]),
|
|
2899
2899
|
_: 1
|
|
2900
|
-
}, 8, ["label"]), h(n).isV4 && !g.isAddon ? (
|
|
2900
|
+
}, 8, ["label"]), h(n).isV4 && !g.isAddon ? (O(), j(Ye, {
|
|
2901
2901
|
key: 0,
|
|
2902
2902
|
label: h(z)("menu.product.form.detail.path.label")
|
|
2903
2903
|
}, {
|
|
@@ -2930,7 +2930,7 @@ const ja = /* @__PURE__ */ me({
|
|
|
2930
2930
|
}
|
|
2931
2931
|
}), Wa = /* @__PURE__ */ it(ja, [["__scopeId", "data-v-47b11a8d"]]), Ya = {}, Ha = { class: "overflow-x-auto" }, Xa = { class: "xs:w-[600px]" };
|
|
2932
2932
|
function qa(e, i) {
|
|
2933
|
-
return
|
|
2933
|
+
return O(), te("div", Ha, [
|
|
2934
2934
|
V("div", Xa, [
|
|
2935
2935
|
ve(e.$slots, "default")
|
|
2936
2936
|
])
|
|
@@ -2939,7 +2939,7 @@ function qa(e, i) {
|
|
|
2939
2939
|
const mn = /* @__PURE__ */ it(Ya, [["render", qa]]), Za = /* @__PURE__ */ me({
|
|
2940
2940
|
__name: "AddForm",
|
|
2941
2941
|
setup(e) {
|
|
2942
|
-
const i = be(), t =
|
|
2942
|
+
const i = be(), t = F(() => i.rules.group), n = F(() => !!i.state.currentCatalogId || !!i.state.currentSchedulerId), a = F(() => {
|
|
2943
2943
|
const s = !i.state.currentSchedulerId, u = i.rules.group.type, d = i.version === G.F_MENU_VERSION.enum.v3, c = i.rules.item.orderFromActiveOnly, m = i.rules.item.bindToVariant;
|
|
2944
2944
|
return function(v) {
|
|
2945
2945
|
return {
|
|
@@ -2967,7 +2967,7 @@ const mn = /* @__PURE__ */ it(Ya, [["render", qa]]), Za = /* @__PURE__ */ me({
|
|
|
2967
2967
|
position: i.groups.length - 1,
|
|
2968
2968
|
itemsLinked: []
|
|
2969
2969
|
}), r = ee(o()), { t: l } = he();
|
|
2970
|
-
return (s, u) => t.value.create ? (
|
|
2970
|
+
return (s, u) => t.value.create ? (O(), j(h(kr), {
|
|
2971
2971
|
key: 0,
|
|
2972
2972
|
"categorized-items": h(i).categorizedItems,
|
|
2973
2973
|
config: a.value,
|
|
@@ -2987,7 +2987,7 @@ const mn = /* @__PURE__ */ it(Ya, [["render", qa]]), Za = /* @__PURE__ */ me({
|
|
|
2987
2987
|
}
|
|
2988
2988
|
}), Qa = {}, Ja = { class: "flex gap-16" };
|
|
2989
2989
|
function er(e, i) {
|
|
2990
|
-
return
|
|
2990
|
+
return O(), te("div", Ja, [
|
|
2991
2991
|
ve(e.$slots, "default")
|
|
2992
2992
|
]);
|
|
2993
2993
|
}
|
|
@@ -3025,7 +3025,7 @@ const tr = /* @__PURE__ */ it(Qa, [["render", er]]), ir = { class: "fm-typo-en-t
|
|
|
3025
3025
|
const { t: c } = he(), m = Bi();
|
|
3026
3026
|
return (p, v) => {
|
|
3027
3027
|
const y = N("fm-text-field"), _ = N("fm-card"), S = N("fm-button"), f = N("fm-side-sheet");
|
|
3028
|
-
return
|
|
3028
|
+
return O(), te(Ae, null, [
|
|
3029
3029
|
ve(p.$slots, "default", { trigger: o }),
|
|
3030
3030
|
b(f, {
|
|
3031
3031
|
id: "inventory-form",
|
|
@@ -3172,7 +3172,7 @@ const pn = /* @__PURE__ */ me({
|
|
|
3172
3172
|
}];
|
|
3173
3173
|
return (r, l) => {
|
|
3174
3174
|
const s = N("FmTable");
|
|
3175
|
-
return
|
|
3175
|
+
return O(), te("div", null, [b(s, {
|
|
3176
3176
|
"column-defs": o,
|
|
3177
3177
|
"row-data": r.priceTiers,
|
|
3178
3178
|
"page-size": r.priceTiers.length,
|
|
@@ -3191,7 +3191,7 @@ const pn = /* @__PURE__ */ me({
|
|
|
3191
3191
|
setup(e, { emit: i }) {
|
|
3192
3192
|
const { t } = he(), n = i, a = ee(!0), o = () => {
|
|
3193
3193
|
a.value = !1, n("update:show", !1);
|
|
3194
|
-
}, r =
|
|
3194
|
+
}, r = F(() => t("menu.price_tier.price_tier_config")), l = F(() => t("common.update")), s = e, u = Li(s.menuStore), d = ee(s.initialValue ? Zn(s.initialValue) : {}), c = Ht(
|
|
3195
3195
|
() => !Ve.isEqual(s.initialValue || {}, d.value),
|
|
3196
3196
|
() => {
|
|
3197
3197
|
o();
|
|
@@ -3202,7 +3202,7 @@ const pn = /* @__PURE__ */ me({
|
|
|
3202
3202
|
}
|
|
3203
3203
|
return (p, v) => {
|
|
3204
3204
|
const y = N("FmButton"), _ = N("fm-button"), S = N("FmSideSheet");
|
|
3205
|
-
return
|
|
3205
|
+
return O(), j(S, {
|
|
3206
3206
|
id: "business-form",
|
|
3207
3207
|
modelValue: a.value,
|
|
3208
3208
|
"onUpdate:modelValue": v[1] || (v[1] = (f) => a.value = f),
|
|
@@ -3274,7 +3274,7 @@ const pn = /* @__PURE__ */ me({
|
|
|
3274
3274
|
},
|
|
3275
3275
|
emits: ["update:priceTiers"],
|
|
3276
3276
|
setup(e, { emit: i }) {
|
|
3277
|
-
const t = e, n = i, a =
|
|
3277
|
+
const t = e, n = i, a = F(() => Object.keys(t.priceTiers || {}).length > 0 ? "filled" : "outline"), o = rr();
|
|
3278
3278
|
function r() {
|
|
3279
3279
|
o.open({
|
|
3280
3280
|
component: cr,
|
|
@@ -3290,7 +3290,7 @@ const pn = /* @__PURE__ */ me({
|
|
|
3290
3290
|
const { t: l } = he();
|
|
3291
3291
|
return (s, u) => {
|
|
3292
3292
|
const d = N("FmButton"), c = N("FmTooltip");
|
|
3293
|
-
return s.$slots.default ? ve(s.$slots, "default", { key: 0 }) : (
|
|
3293
|
+
return s.$slots.default ? ve(s.$slots, "default", { key: 0 }) : (O(), j(c, {
|
|
3294
3294
|
key: 1,
|
|
3295
3295
|
content: h(l)("menu.price_tier.price_tier_config"),
|
|
3296
3296
|
"z-index": 999,
|
|
@@ -3334,7 +3334,7 @@ const pn = /* @__PURE__ */ me({
|
|
|
3334
3334
|
}) {
|
|
3335
3335
|
const t = e, n = i;
|
|
3336
3336
|
Ee();
|
|
3337
|
-
const a = mt(), o = be(), r =
|
|
3337
|
+
const a = mt(), o = be(), r = F(() => ke.Country.getCountry(a.currentCountry.value)), l = ee(!1), s = F(() => t.config.isV4 || t.group.type === G.F_ADDON_GROUP_TYPE.enum.PRODUCT), u = F(() => s.value), d = F(() => s.value), c = F(() => Object.values(t.group.items).flatMap((E) => [{
|
|
3338
3338
|
_id: E._id,
|
|
3339
3339
|
combinationKey: void 0
|
|
3340
3340
|
}, ...(E.items ?? []).filter((D) => D.orderFrom !== G.F_ORDER_FROM.enum.NONE).map((D) => ({
|
|
@@ -3343,7 +3343,7 @@ const pn = /* @__PURE__ */ me({
|
|
|
3343
3343
|
}))])), {
|
|
3344
3344
|
searchKey: m,
|
|
3345
3345
|
filter: p
|
|
3346
|
-
} = Qn(), v =
|
|
3346
|
+
} = Qn(), v = F(() => {
|
|
3347
3347
|
const E = Object.entries(t.group.items).filter(([, D]) => p([D.code || "", D.name || D.fallbackName, S(D.price ?? D.fallbackPrice), f(D.orderFrom || D.fallbackOrder), ...(D.items || []).map((Y) => [Y.code || "", Y.name || Y.fallbackName, S(Y.price ?? Y.fallbackPrice), f(Y.orderFrom || Y.fallbackOrder)].join(""))]));
|
|
3348
3348
|
return Object.fromEntries(E);
|
|
3349
3349
|
}), y = (E) => ({
|
|
@@ -3352,10 +3352,10 @@ const pn = /* @__PURE__ */ me({
|
|
|
3352
3352
|
link: t.config.link(E),
|
|
3353
3353
|
name: t.config.name(E),
|
|
3354
3354
|
orderFrom: t.config.orderFrom(E)
|
|
3355
|
-
}), _ =
|
|
3355
|
+
}), _ = F(() => !0), S = (E) => E ? at(E, !1) : "", f = (E) => {
|
|
3356
3356
|
var D;
|
|
3357
|
-
return E == null ? "" : (D =
|
|
3358
|
-
}, R =
|
|
3357
|
+
return E == null ? "" : (D = Fn()[E]) == null ? void 0 : D.label;
|
|
3358
|
+
}, R = F(() => Object.values(v.value)), K = ee({}), {
|
|
3359
3359
|
t: U
|
|
3360
3360
|
} = he(), L = ee([{
|
|
3361
3361
|
accessorKey: "isDefault",
|
|
@@ -3581,7 +3581,7 @@ const pn = /* @__PURE__ */ me({
|
|
|
3581
3581
|
}
|
|
3582
3582
|
}, null)]);
|
|
3583
3583
|
}
|
|
3584
|
-
}]), M =
|
|
3584
|
+
}]), M = F(() => ({
|
|
3585
3585
|
code: d.value,
|
|
3586
3586
|
name: !0,
|
|
3587
3587
|
price: y(null).price,
|
|
@@ -3634,7 +3634,7 @@ const pn = /* @__PURE__ */ me({
|
|
|
3634
3634
|
const D = ue(t.group);
|
|
3635
3635
|
delete D.items[E], n("update:group", D);
|
|
3636
3636
|
}
|
|
3637
|
-
const k =
|
|
3637
|
+
const k = F(() => t.categorizedItems.flatMap((E) => E.items).reduce((E, D) => {
|
|
3638
3638
|
var Y;
|
|
3639
3639
|
return E[D._id] = {
|
|
3640
3640
|
price: D.price,
|
|
@@ -3647,7 +3647,7 @@ const pn = /* @__PURE__ */ me({
|
|
|
3647
3647
|
name: Ti(be().variants, ((X = Y == null ? void 0 : Y.variant) == null ? void 0 : X.variantGroupIds) || [])[E.combinationKey]
|
|
3648
3648
|
} : Y;
|
|
3649
3649
|
return q == null ? void 0 : q.name;
|
|
3650
|
-
}, $ =
|
|
3650
|
+
}, $ = F(() => o.state.menu.modules.item.reduce((E, D) => (E[D._id] = D, E), {}));
|
|
3651
3651
|
function z(E) {
|
|
3652
3652
|
const D = [], Y = new Set(E.filter((q) => q.combinationKey).map((q) => `${q._id}:${q.combinationKey}`));
|
|
3653
3653
|
return E.forEach((q) => {
|
|
@@ -3693,16 +3693,16 @@ const pn = /* @__PURE__ */ me({
|
|
|
3693
3693
|
[q._id]: q
|
|
3694
3694
|
}), {}), n("update:group", D);
|
|
3695
3695
|
}
|
|
3696
|
-
const ae = Pi(), re =
|
|
3696
|
+
const ae = Pi(), re = F(() => ae.breakpoints.value.xs);
|
|
3697
3697
|
return (E, D) => {
|
|
3698
3698
|
const Y = N("fm-button"), q = N("fm-table");
|
|
3699
|
-
return
|
|
3699
|
+
return O(), j(Be, {
|
|
3700
3700
|
title: h(U)("menu.group.option.title"),
|
|
3701
3701
|
"sub-title": E.config.link() && u.value ? h(U)("menu.group.option.subtitle") : ""
|
|
3702
3702
|
}, {
|
|
3703
|
-
"append-title": P(() => [E.config.link() ? (
|
|
3703
|
+
"append-title": P(() => [E.config.link() ? (O(), te(Ae, {
|
|
3704
3704
|
key: 0
|
|
3705
|
-
}, [u.value ? (
|
|
3705
|
+
}, [u.value ? (O(), te("div", dr, [b(Pn, {
|
|
3706
3706
|
"categorized-items": E.categorizedItems,
|
|
3707
3707
|
"initial-value": c.value,
|
|
3708
3708
|
"show-variant": E.config.bindToVariant,
|
|
@@ -3723,7 +3723,7 @@ const pn = /* @__PURE__ */ me({
|
|
|
3723
3723
|
onClick: Z
|
|
3724
3724
|
}, null, 8, ["text-color", "border-color", "label", "onClick"])]),
|
|
3725
3725
|
_: 1
|
|
3726
|
-
}, 8, ["categorized-items", "initial-value", "show-variant", "title"])])) : (
|
|
3726
|
+
}, 8, ["categorized-items", "initial-value", "show-variant", "title"])])) : (O(), te("div", mr, [b(Y, {
|
|
3727
3727
|
"text-color": h(Ke).ColorPrimary,
|
|
3728
3728
|
"border-color": h(Ke).ColorPrimary,
|
|
3729
3729
|
variant: "secondary",
|
|
@@ -3774,7 +3774,7 @@ function vr(e) {
|
|
|
3774
3774
|
function a(r) {
|
|
3775
3775
|
return t(r) <= r.max ? !0 : i("menu.common.validation.max_default_items", { max: r.max });
|
|
3776
3776
|
}
|
|
3777
|
-
const o =
|
|
3777
|
+
const o = F(() => [
|
|
3778
3778
|
// Check if min and max are integers
|
|
3779
3779
|
() => {
|
|
3780
3780
|
const r = e();
|
|
@@ -3830,7 +3830,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
3830
3830
|
() => n.group
|
|
3831
3831
|
), p = ee(!1), v = ee(!1), y = (g) => {
|
|
3832
3832
|
pt.isBoolean(g) ? v.value = g : v.value = !v.value;
|
|
3833
|
-
}, _ =
|
|
3833
|
+
}, _ = F(() => n.group ? n.config(n.group) : null), S = F(() => Wi(_.value)), f = (g) => S.value.includes(g), R = F(() => [
|
|
3834
3834
|
{
|
|
3835
3835
|
label: "Normal",
|
|
3836
3836
|
value: G.F_ADDON_GROUP_TYPE.enum.NORMAL
|
|
@@ -3879,7 +3879,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
3879
3879
|
() => {
|
|
3880
3880
|
v.value = !1;
|
|
3881
3881
|
}
|
|
3882
|
-
), I =
|
|
3882
|
+
), I = F(() => n.action === "add" ? z("common.add") : z("common.update"));
|
|
3883
3883
|
async function w() {
|
|
3884
3884
|
var g;
|
|
3885
3885
|
if (n.action === "add") {
|
|
@@ -3918,10 +3918,10 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
3918
3918
|
a("status:show", g), g && (await Ei(), M.value = Ve.clone(n.group));
|
|
3919
3919
|
}
|
|
3920
3920
|
);
|
|
3921
|
-
const A =
|
|
3921
|
+
const A = F(() => {
|
|
3922
3922
|
var g;
|
|
3923
3923
|
return ((g = r.groupAttributeSettings) == null ? void 0 : g.value.length) > 0 && !_.value.isOverride;
|
|
3924
|
-
}), k =
|
|
3924
|
+
}), k = F(() => {
|
|
3925
3925
|
const g = {};
|
|
3926
3926
|
return o.state.menu.modules.group.forEach((C) => {
|
|
3927
3927
|
var W;
|
|
@@ -3933,7 +3933,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
3933
3933
|
...n.group,
|
|
3934
3934
|
customAttributes: g
|
|
3935
3935
|
});
|
|
3936
|
-
}, $ =
|
|
3936
|
+
}, $ = F(() => [
|
|
3937
3937
|
// Required validation
|
|
3938
3938
|
(g) => !!g || z("menu.common.validation.required", { field: z("menu.common.labels.group_name") }),
|
|
3939
3939
|
// Duplicate name validation
|
|
@@ -3946,7 +3946,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
3946
3946
|
const { t: z } = he();
|
|
3947
3947
|
return (g, C) => {
|
|
3948
3948
|
const W = N("fm-text-field"), ae = N("fm-stepper-field"), re = N("FmFormGroup"), E = N("fm-radio"), D = N("fm-radio-group"), Y = N("fm-switch"), q = N("fm-button"), Z = N("fm-side-sheet");
|
|
3949
|
-
return
|
|
3949
|
+
return O(), te(Ae, null, [
|
|
3950
3950
|
ve(g.$slots, "default", { trigger: y }),
|
|
3951
3951
|
b(Z, {
|
|
3952
3952
|
id: "group-form",
|
|
@@ -3981,7 +3981,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
3981
3981
|
])
|
|
3982
3982
|
]),
|
|
3983
3983
|
default: P(() => [
|
|
3984
|
-
g.group ? (
|
|
3984
|
+
g.group ? (O(), te("div", br, [
|
|
3985
3985
|
ve(g.$slots, "variant-section"),
|
|
3986
3986
|
b(Un, null, {
|
|
3987
3987
|
default: P(() => [
|
|
@@ -4024,7 +4024,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4024
4024
|
]),
|
|
4025
4025
|
_: 1
|
|
4026
4026
|
}, 8, ["model-value", "rules"]),
|
|
4027
|
-
_.value.type ? (
|
|
4027
|
+
_.value.type ? (O(), j(Ye, {
|
|
4028
4028
|
key: 0,
|
|
4029
4029
|
label: h(z)("menu.common.labels.group_type")
|
|
4030
4030
|
}, {
|
|
@@ -4035,7 +4035,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4035
4035
|
"onUpdate:modelValue": C[3] || (C[3] = (X) => U(X))
|
|
4036
4036
|
}, {
|
|
4037
4037
|
default: P(() => [
|
|
4038
|
-
(
|
|
4038
|
+
(O(!0), te(Ae, null, Ue(R.value, (X) => (O(), j(E, {
|
|
4039
4039
|
key: X.value,
|
|
4040
4040
|
label: h(z)(`menu.group.types.${X.label.toLowerCase()}`),
|
|
4041
4041
|
value: X.value
|
|
@@ -4061,7 +4061,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4061
4061
|
]),
|
|
4062
4062
|
_: 1
|
|
4063
4063
|
}, 8, ["label"]),
|
|
4064
|
-
A.value ? (
|
|
4064
|
+
A.value ? (O(), j(Be, {
|
|
4065
4065
|
key: 1,
|
|
4066
4066
|
title: h(z)("menu.group.form.tagging.title"),
|
|
4067
4067
|
"sub-title": h(z)("menu.group.form.tagging.subtitle")
|
|
@@ -4117,14 +4117,14 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4117
4117
|
emits: ["update:combinations"],
|
|
4118
4118
|
setup(e, { expose: i, emit: t }) {
|
|
4119
4119
|
var K, U;
|
|
4120
|
-
const n = e, a = t, o = be(), r = Ne(), l = qe(Xe(Ee())), s = ee([]), u = ee(n.combinations[0].combinationKey || ""), d =
|
|
4120
|
+
const n = e, a = t, o = be(), r = Ne(), l = qe(Xe(Ee())), s = ee([]), u = ee(n.combinations[0].combinationKey || ""), d = F(
|
|
4121
4121
|
() => s.value.findIndex((L) => L.combinationKey == u.value)
|
|
4122
|
-
), c =
|
|
4122
|
+
), c = F(
|
|
4123
4123
|
() => n.combinations.map((L) => ({
|
|
4124
4124
|
label: n.fullCombinations[L.combinationKey || ""],
|
|
4125
4125
|
value: L.combinationKey || ""
|
|
4126
4126
|
}))
|
|
4127
|
-
), m =
|
|
4127
|
+
), m = F(() => {
|
|
4128
4128
|
var A, k;
|
|
4129
4129
|
if (!S.value) return null;
|
|
4130
4130
|
const L = ((k = (A = s.value[d.value]) == null ? void 0 : A.groups) == null ? void 0 : k.find((x) => x._id === n.groupId)) || {
|
|
@@ -4210,7 +4210,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4210
4210
|
const { t: R } = he();
|
|
4211
4211
|
return (L, M) => {
|
|
4212
4212
|
const T = N("fm-select"), I = N("fm-button"), w = N("fm-card");
|
|
4213
|
-
return
|
|
4213
|
+
return O(), j(fn, {
|
|
4214
4214
|
ref_key: "baseFormRef",
|
|
4215
4215
|
ref: f,
|
|
4216
4216
|
"allow-refund-inventory": !0,
|
|
@@ -4227,7 +4227,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4227
4227
|
ve(L.$slots, "default", { trigger: A })
|
|
4228
4228
|
]),
|
|
4229
4229
|
"variant-section": P(() => [
|
|
4230
|
-
u.value ? (
|
|
4230
|
+
u.value ? (O(), j(w, {
|
|
4231
4231
|
key: 0,
|
|
4232
4232
|
class: "p-16 bg-fm-color-neutral-gray-100 space-y-24",
|
|
4233
4233
|
variant: "outlined"
|
|
@@ -4267,7 +4267,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4267
4267
|
}), kr = fn, Mi = Za, xr = Cr, Rr = {
|
|
4268
4268
|
key: 0,
|
|
4269
4269
|
class: "flex flex-col space-y-16 h-[440px]"
|
|
4270
|
-
}, Ar = { class: "flex-1 flex-shrink space-y-8 min-h-0 overflow-y-scroll p-8" }, Mr = { class: "flex justify-between pb-16" },
|
|
4270
|
+
}, Ar = { class: "flex-1 flex-shrink space-y-8 min-h-0 overflow-y-scroll p-8" }, Mr = { class: "flex justify-between pb-16" }, Or = { class: "flex gap-8" }, Fr = {
|
|
4271
4271
|
key: 1,
|
|
4272
4272
|
class: "flex flex-col items-center space-y-16"
|
|
4273
4273
|
}, zr = { class: "flex flex-col items-center space-y-4 w-full" }, Ir = { class: "fm-typo-en-title-sm-600" }, Er = { class: "text-fm-color-typo-secondary" }, Tr = /* @__PURE__ */ me({
|
|
@@ -4276,20 +4276,20 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4276
4276
|
groupIds: {}
|
|
4277
4277
|
},
|
|
4278
4278
|
setup(e) {
|
|
4279
|
-
const i = e, t = Ne(), { emitData: n, emitAction: a } = Vi(), o = be(), r =
|
|
4279
|
+
const i = e, t = Ne(), { emitData: n, emitAction: a } = Vi(), o = be(), r = F(() => o.rules.group), l = F(() => o.groups);
|
|
4280
4280
|
function s(_) {
|
|
4281
4281
|
return ue(_ ?? []).sort((f, R) => f.position - R.position);
|
|
4282
4282
|
}
|
|
4283
|
-
const u =
|
|
4283
|
+
const u = F(() => s(l.value).reduce((_, S) => (_[S._id] = {
|
|
4284
4284
|
name: S.name,
|
|
4285
4285
|
type: kt(o.items, S.items)
|
|
4286
|
-
}, _), {})), d =
|
|
4286
|
+
}, _), {})), d = F(() => [
|
|
4287
4287
|
...Object.entries(u.value).map(([_, { name: S, type: f }]) => ({
|
|
4288
4288
|
label: `${S} ${r.value.type ? `(${Ut(f)})` : ""}`.trim(),
|
|
4289
4289
|
value: _
|
|
4290
4290
|
}))
|
|
4291
|
-
]), c =
|
|
4292
|
-
|
|
4291
|
+
]), c = F(() => !!o.state.currentCatalogId || !!o.state.currentSchedulerId);
|
|
4292
|
+
F(() => {
|
|
4293
4293
|
const _ = !o.state.currentSchedulerId, S = o.rules.group.type, f = o.version == G.F_MENU_VERSION.enum.v3, R = o.rules.item.orderFromActiveOnly, K = o.rules.item.bindToVariant;
|
|
4294
4294
|
return function(L) {
|
|
4295
4295
|
return {
|
|
@@ -4310,7 +4310,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4310
4310
|
isV4: !f
|
|
4311
4311
|
};
|
|
4312
4312
|
};
|
|
4313
|
-
}),
|
|
4313
|
+
}), F(() => ({
|
|
4314
4314
|
...Ie.generator.initMenuV4Group(),
|
|
4315
4315
|
type: o.version === G.F_MENU_VERSION.enum.v4 ? G.F_ADDON_GROUP_TYPE.enum.PRODUCT : G.F_ADDON_GROUP_TYPE.enum.NORMAL,
|
|
4316
4316
|
items: {},
|
|
@@ -4322,7 +4322,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4322
4322
|
};
|
|
4323
4323
|
return (_, S) => {
|
|
4324
4324
|
const f = N("FmSearch"), R = N("FmCheckbox"), K = N("FmButton");
|
|
4325
|
-
return d.value.length > 0 ? (
|
|
4325
|
+
return d.value.length > 0 ? (O(), te("div", Rr, [
|
|
4326
4326
|
V("div", null, [
|
|
4327
4327
|
b(f, {
|
|
4328
4328
|
autofocus: "",
|
|
@@ -4333,7 +4333,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4333
4333
|
]),
|
|
4334
4334
|
V("div", Ar, [
|
|
4335
4335
|
V("div", null, [
|
|
4336
|
-
(
|
|
4336
|
+
(O(!0), te(Ae, null, Ue(d.value, (U) => (O(), te("div", {
|
|
4337
4337
|
key: U.value
|
|
4338
4338
|
}, [
|
|
4339
4339
|
ut(b(R, {
|
|
@@ -4362,7 +4362,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4362
4362
|
]),
|
|
4363
4363
|
_: 1
|
|
4364
4364
|
}),
|
|
4365
|
-
V("div",
|
|
4365
|
+
V("div", Or, [
|
|
4366
4366
|
b(K, {
|
|
4367
4367
|
label: h(v)("menu.common.actions.cancel"),
|
|
4368
4368
|
variant: "tertiary",
|
|
@@ -4374,7 +4374,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4374
4374
|
}, null, 8, ["label"])
|
|
4375
4375
|
])
|
|
4376
4376
|
])
|
|
4377
|
-
])) : (
|
|
4377
|
+
])) : (O(), te("div", Fr, [
|
|
4378
4378
|
V("div", zr, [
|
|
4379
4379
|
V("p", Ir, de(h(v)("menu.common.empty.no_group.title")), 1),
|
|
4380
4380
|
V("p", Er, de(h(v)("menu.common.empty.no_group.subtitle")), 1)
|
|
@@ -4411,7 +4411,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4411
4411
|
}) {
|
|
4412
4412
|
const t = e, n = Ee(), a = be(), o = ii(), r = Ne(), {
|
|
4413
4413
|
t: l
|
|
4414
|
-
} = he(), s = i, u =
|
|
4414
|
+
} = he(), s = i, u = F(() => a.rules.group), d = F(() => a.rules.item), c = F(() => a.groups);
|
|
4415
4415
|
function m(k, x) {
|
|
4416
4416
|
return ue(x ?? []).map((z) => {
|
|
4417
4417
|
const g = k.find((C) => C._id === z._id);
|
|
@@ -4422,7 +4422,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4422
4422
|
};
|
|
4423
4423
|
});
|
|
4424
4424
|
}
|
|
4425
|
-
const p =
|
|
4425
|
+
const p = F(() => {
|
|
4426
4426
|
var x;
|
|
4427
4427
|
return [...v(m(c.value, t.form.groups || ((x = t.fallback) == null ? void 0 : x.groups) || [])).map(($) => $._id)];
|
|
4428
4428
|
});
|
|
@@ -4450,16 +4450,16 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4450
4450
|
})})` : C;
|
|
4451
4451
|
});
|
|
4452
4452
|
}
|
|
4453
|
-
const _ =
|
|
4453
|
+
const _ = F(() => v(c.value).reduce((k, x) => (k[x._id] = {
|
|
4454
4454
|
name: x.name,
|
|
4455
4455
|
type: kt(a.items, x.items)
|
|
4456
|
-
}, k), {})), S =
|
|
4456
|
+
}, k), {})), S = F(() => [...Object.entries(_.value).map(([k, {
|
|
4457
4457
|
name: x,
|
|
4458
4458
|
type: $
|
|
4459
4459
|
}]) => ({
|
|
4460
4460
|
label: `${x} ${u.value.type ? `(${Ut($)})` : ""}`.trim(),
|
|
4461
4461
|
value: k
|
|
4462
|
-
}))]), f =
|
|
4462
|
+
}))]), f = F(() => [{
|
|
4463
4463
|
accessorKey: "name",
|
|
4464
4464
|
header: () => l("menu.product.form.group.columns.title"),
|
|
4465
4465
|
enableSorting: !1,
|
|
@@ -4537,7 +4537,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4537
4537
|
})
|
|
4538
4538
|
})]);
|
|
4539
4539
|
}
|
|
4540
|
-
}]), R =
|
|
4540
|
+
}]), R = F(() => ({
|
|
4541
4541
|
type: a.version !== G.F_MENU_VERSION.enum.v4
|
|
4542
4542
|
}));
|
|
4543
4543
|
function K() {
|
|
@@ -4591,10 +4591,10 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4591
4591
|
groups: x
|
|
4592
4592
|
}));
|
|
4593
4593
|
}
|
|
4594
|
-
const M =
|
|
4594
|
+
const M = F(() => {
|
|
4595
4595
|
var k;
|
|
4596
4596
|
return !!((k = t.form.variant) != null && k.variantGroupIds.length);
|
|
4597
|
-
}), T =
|
|
4597
|
+
}), T = F(() => {
|
|
4598
4598
|
var k;
|
|
4599
4599
|
return M.value ? (k = t.form.variant) == null ? void 0 : k.variantCombinations : [{
|
|
4600
4600
|
_id: t.form._id,
|
|
@@ -4630,7 +4630,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4630
4630
|
};
|
|
4631
4631
|
return (k, x) => {
|
|
4632
4632
|
const $ = N("FmButton"), z = N("FmTable");
|
|
4633
|
-
return
|
|
4633
|
+
return O(), j(Be, {
|
|
4634
4634
|
title: h(l)("menu.product.form.group.title"),
|
|
4635
4635
|
"sub-title": h(l)("menu.product.form.group.subtitle")
|
|
4636
4636
|
}, {
|
|
@@ -4644,7 +4644,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4644
4644
|
default: P(() => [b(mn, null, {
|
|
4645
4645
|
default: P(() => {
|
|
4646
4646
|
var g;
|
|
4647
|
-
return [((g = p.value) == null ? void 0 : g.length) > 0 ? (
|
|
4647
|
+
return [((g = p.value) == null ? void 0 : g.length) > 0 ? (O(), j(z, {
|
|
4648
4648
|
key: 0,
|
|
4649
4649
|
"column-defs": f.value,
|
|
4650
4650
|
"column-visibility": R.value,
|
|
@@ -4686,7 +4686,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4686
4686
|
}) {
|
|
4687
4687
|
const {
|
|
4688
4688
|
t
|
|
4689
|
-
} = he(), n = e, a = i, o = be(), r =
|
|
4689
|
+
} = he(), n = e, a = i, o = be(), r = F(() => o.rules.item), l = F(() => r.value.inventory);
|
|
4690
4690
|
function s(y, _, S, f) {
|
|
4691
4691
|
return !_ || _ && _.length === 0 ? [{
|
|
4692
4692
|
_id: "",
|
|
@@ -4698,10 +4698,10 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4698
4698
|
binding: R.inventoryBindings || []
|
|
4699
4699
|
}));
|
|
4700
4700
|
}
|
|
4701
|
-
const u =
|
|
4701
|
+
const u = F(() => {
|
|
4702
4702
|
var y;
|
|
4703
4703
|
return n.form.name || ((y = n.fallback) == null ? void 0 : y.name) || "";
|
|
4704
|
-
}), d =
|
|
4704
|
+
}), d = F(() => {
|
|
4705
4705
|
var y;
|
|
4706
4706
|
return s(n.form.inventoryBindings || [], ((y = n.form.variant) == null ? void 0 : y.variantCombinations) || [], u.value, o.variants);
|
|
4707
4707
|
});
|
|
@@ -4790,11 +4790,11 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4790
4790
|
const v = Bi();
|
|
4791
4791
|
return ot(() => {
|
|
4792
4792
|
v.readInventory();
|
|
4793
|
-
}), (y, _) => (
|
|
4793
|
+
}), (y, _) => (O(), j(Be, {
|
|
4794
4794
|
title: h(t)("menu.inventory.title"),
|
|
4795
4795
|
subTitle: h(t)("menu.inventory.subtitle")
|
|
4796
4796
|
}, {
|
|
4797
|
-
default: P(() => [V("div", Pr, [V("div", Vr, [(
|
|
4797
|
+
default: P(() => [V("div", Pr, [V("div", Vr, [(O(!0), te(Ae, null, Ue(d.value, (S) => (O(), j(h(Wt), {
|
|
4798
4798
|
key: S._id,
|
|
4799
4799
|
ref_for: !0,
|
|
4800
4800
|
ref_key: "inventoryManagerForms",
|
|
@@ -4816,7 +4816,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4816
4816
|
}, 8, ["title", "subTitle"]));
|
|
4817
4817
|
}
|
|
4818
4818
|
}), $r = {
|
|
4819
|
-
class: /* @__PURE__ */
|
|
4819
|
+
class: /* @__PURE__ */ Oe(["flex space-x-16", "xs:flex-col xs:space-x-0 xs:space-y-16"])
|
|
4820
4820
|
}, Nr = { class: "space-y-16" }, Br = { class: "space-y-8" }, Lr = {
|
|
4821
4821
|
key: 0,
|
|
4822
4822
|
class: "pl-32 pb-4 space-x-16 flex items-center"
|
|
@@ -4839,18 +4839,18 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4839
4839
|
},
|
|
4840
4840
|
emits: ["update:form"],
|
|
4841
4841
|
setup(e, { emit: i }) {
|
|
4842
|
-
const t = e, n = mt(), a = be(), o = Li(), { t: r } = he(), l = i, s =
|
|
4842
|
+
const t = e, n = mt(), a = be(), o = Li(), { t: r } = he(), l = i, s = F(() => a.rules.item), u = F(() => {
|
|
4843
4843
|
var K, U;
|
|
4844
4844
|
const f = t.isOverride ? ((K = t.fallback) == null ? void 0 : K.unit) ?? ((U = t.fallback) == null ? void 0 : U.perXUnit) : void 0, R = t.form.unit ?? t.form.perXUnit ?? f;
|
|
4845
4845
|
return R != null;
|
|
4846
4846
|
}), d = (f) => {
|
|
4847
4847
|
l("update:form", "unit", f ? "" : void 0), l("update:form", "perXUnit", f ? 0 : void 0);
|
|
4848
|
-
}, c =
|
|
4848
|
+
}, c = F(() => {
|
|
4849
4849
|
const f = a.isV4;
|
|
4850
|
-
return
|
|
4851
|
-
}), m =
|
|
4850
|
+
return Ot.setCoreStore(n).taxSetting(f);
|
|
4851
|
+
}), m = F(() => {
|
|
4852
4852
|
var f;
|
|
4853
|
-
return
|
|
4853
|
+
return Ot.getSelectedTax(
|
|
4854
4854
|
t.form.taxes,
|
|
4855
4855
|
(f = t.fallback) == null ? void 0 : f.taxes,
|
|
4856
4856
|
c.value.countryTaxOptions
|
|
@@ -4889,13 +4889,13 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4889
4889
|
command: "suggestPrice"
|
|
4890
4890
|
});
|
|
4891
4891
|
}
|
|
4892
|
-
const S =
|
|
4892
|
+
const S = F(() => {
|
|
4893
4893
|
var f, R;
|
|
4894
4894
|
return ((f = a.currentCatalog) == null ? void 0 : f.priceTierRules) ?? ((R = a.currentCatalog) == null ? void 0 : R.usePriceTiers) ?? [];
|
|
4895
4895
|
});
|
|
4896
4896
|
return (f, R) => {
|
|
4897
4897
|
const K = N("fm-select"), U = N("FmButton"), L = N("fm-checkbox"), M = N("fm-text-field"), T = zi("tooltip");
|
|
4898
|
-
return
|
|
4898
|
+
return O(), j(Be, {
|
|
4899
4899
|
title: h(r)("menu.product.form.price.title")
|
|
4900
4900
|
}, {
|
|
4901
4901
|
default: P(() => {
|
|
@@ -4935,10 +4935,10 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4935
4935
|
placeholder: "--",
|
|
4936
4936
|
class: "flex-1",
|
|
4937
4937
|
"shift-menu": "",
|
|
4938
|
-
"onUpdate:modelValue": R[1] || (R[1] = (w) => l("update:form", "taxes", [h(
|
|
4938
|
+
"onUpdate:modelValue": R[1] || (R[1] = (w) => l("update:form", "taxes", [h(Ot).decodeTax(w)]))
|
|
4939
4939
|
}, null, 8, ["disabled", "items", "label", "model-value"])
|
|
4940
4940
|
]),
|
|
4941
|
-
!f.isOverride && h(a).isV4 ? (
|
|
4941
|
+
!f.isOverride && h(a).isV4 ? (O(), j(Ye, {
|
|
4942
4942
|
key: 0,
|
|
4943
4943
|
label: h(r)("menu.price_tier.price_group"),
|
|
4944
4944
|
description: h(r)("menu.price_tier.description")
|
|
@@ -4954,7 +4954,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4954
4954
|
default: P(() => {
|
|
4955
4955
|
var w;
|
|
4956
4956
|
return [
|
|
4957
|
-
f.isOverride ? ie("", !0) : (
|
|
4957
|
+
f.isOverride ? ie("", !0) : (O(), j(pn, {
|
|
4958
4958
|
key: 0,
|
|
4959
4959
|
"price-tiers": h(o).priceTiers.value,
|
|
4960
4960
|
"model-value": f.form.priceTiers || ((w = f.fallback) == null ? void 0 : w.priceTiers) || {},
|
|
@@ -4989,7 +4989,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
4989
4989
|
sublabel: h(r)("menu.product.form.price.settings.sell_by_unit.sublabel"),
|
|
4990
4990
|
"onUpdate:modelValue": d
|
|
4991
4991
|
}, null, 8, ["disabled", "model-value", "value", "label", "sublabel"]),
|
|
4992
|
-
u.value ? (
|
|
4992
|
+
u.value ? (O(), te("div", Lr, [
|
|
4993
4993
|
V("p", Gr, de(h(r)("menu.product.form.price.settings.sell_by_unit.per_unit.label")), 1),
|
|
4994
4994
|
V("div", Kr, [
|
|
4995
4995
|
b(M, {
|
|
@@ -5019,14 +5019,14 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
5019
5019
|
])
|
|
5020
5020
|
])) : ie("", !0)
|
|
5021
5021
|
]),
|
|
5022
|
-
s.value.costing ? (
|
|
5022
|
+
s.value.costing ? (O(), te("div", Wr, [
|
|
5023
5023
|
b(L, {
|
|
5024
5024
|
"model-value": !!f.form.costing,
|
|
5025
5025
|
value: !!f.form.costing,
|
|
5026
5026
|
label: h(r)("menu.product.form.price.settings.track_costing.label"),
|
|
5027
5027
|
"onUpdate:modelValue": R[5] || (R[5] = (x) => l("update:form", "costing", x ? h(ke.Dinero).zero().toObject() : void 0))
|
|
5028
5028
|
}, null, 8, ["model-value", "value", "label"]),
|
|
5029
|
-
f.form.costing ? (
|
|
5029
|
+
f.form.costing ? (O(), te("div", Yr, [
|
|
5030
5030
|
V("div", Hr, [
|
|
5031
5031
|
b(et, {
|
|
5032
5032
|
class: "w-full",
|
|
@@ -5039,7 +5039,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
5039
5039
|
])
|
|
5040
5040
|
])) : ie("", !0)
|
|
5041
5041
|
])) : ie("", !0),
|
|
5042
|
-
s.value.minPrice ? (
|
|
5042
|
+
s.value.minPrice ? (O(), te("div", Xr, [
|
|
5043
5043
|
b(L, {
|
|
5044
5044
|
disabled: !s.value.minPrice || f.isAddon,
|
|
5045
5045
|
"model-value": !!f.form.minPrice,
|
|
@@ -5049,7 +5049,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
5049
5049
|
}, null, 8, ["disabled", "model-value", "value", "label"]),
|
|
5050
5050
|
V("div", qr, [
|
|
5051
5051
|
V("div", Zr, [
|
|
5052
|
-
f.form.minPrice ? (
|
|
5052
|
+
f.form.minPrice ? (O(), j(et, {
|
|
5053
5053
|
key: 0,
|
|
5054
5054
|
max: h(ke.Dinero).fromFdoDinero(f.form.price).toUnit(),
|
|
5055
5055
|
min: 0,
|
|
@@ -5079,9 +5079,9 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
5079
5079
|
applyProduct: { type: Boolean }
|
|
5080
5080
|
},
|
|
5081
5081
|
setup(e) {
|
|
5082
|
-
const { t: i } = he(), t = e, n = qe(Xe(Ee())), a =
|
|
5082
|
+
const { t: i } = he(), t = e, n = qe(Xe(Ee())), a = F(
|
|
5083
5083
|
() => t.initialValue ? i("menu.print_dept.update") : i("menu.print_dept.add")
|
|
5084
|
-
), o =
|
|
5084
|
+
), o = F(
|
|
5085
5085
|
() => t.initialValue ? i("menu.common.actions.update") : i("menu.common.actions.add")
|
|
5086
5086
|
), r = ee(
|
|
5087
5087
|
t.initialValue ? ue(t.initialValue) : { ...Ie.generator.initMenuV4PrintDepartment(), usedBy: [] }
|
|
@@ -5121,7 +5121,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
5121
5121
|
}
|
|
5122
5122
|
), (c, m) => {
|
|
5123
5123
|
const p = N("fm-text-field"), v = N("fm-button"), y = N("fm-side-sheet");
|
|
5124
|
-
return
|
|
5124
|
+
return O(), te(Ae, null, [
|
|
5125
5125
|
ve(c.$slots, "default", { trigger: u }),
|
|
5126
5126
|
b(y, {
|
|
5127
5127
|
id: "variant-form",
|
|
@@ -5168,7 +5168,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
5168
5168
|
autofocus: "",
|
|
5169
5169
|
label: h(i)("menu.print_dept.columns.name")
|
|
5170
5170
|
}, null, 8, ["modelValue", "rules", "label"]),
|
|
5171
|
-
c.applyProduct ? (
|
|
5171
|
+
c.applyProduct ? (O(), j(eo, {
|
|
5172
5172
|
key: 0,
|
|
5173
5173
|
overrides: r.value.usedBy || [],
|
|
5174
5174
|
"select-variant": !1,
|
|
@@ -5202,16 +5202,16 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
5202
5202
|
toRoot: !1
|
|
5203
5203
|
};
|
|
5204
5204
|
}
|
|
5205
|
-
const l =
|
|
5205
|
+
const l = F(() => n.rules.item), s = F(() => n.printDepartments), u = F(() => {
|
|
5206
5206
|
var S;
|
|
5207
5207
|
return ((S = t.form.print) == null ? void 0 : S.sequential) ?? !1;
|
|
5208
|
-
}), d =
|
|
5208
|
+
}), d = F(() => {
|
|
5209
5209
|
var S;
|
|
5210
5210
|
return u.value ? s.value.reduce(
|
|
5211
5211
|
(f, { _id: R }) => (f.includes(R) || (f = [...f, R]), f),
|
|
5212
5212
|
[...((S = t.form.print) == null ? void 0 : S.department) ?? []]
|
|
5213
5213
|
) : s.value.map(({ _id: f }) => f);
|
|
5214
|
-
}), c =
|
|
5214
|
+
}), c = F(() => s.value.reduce((S, f) => (S[f._id] = f.name, S), {}));
|
|
5215
5215
|
function m(S) {
|
|
5216
5216
|
o("update:form", "print", {
|
|
5217
5217
|
...r(),
|
|
@@ -5245,7 +5245,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
5245
5245
|
department: R
|
|
5246
5246
|
});
|
|
5247
5247
|
}
|
|
5248
|
-
const _ =
|
|
5248
|
+
const _ = F(() => [
|
|
5249
5249
|
{
|
|
5250
5250
|
label: a("menu.product.form.print.kds.options.all.label"),
|
|
5251
5251
|
value: !1,
|
|
@@ -5262,13 +5262,13 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
5262
5262
|
() => y(s.value[s.value.length - 1]._id, !0)
|
|
5263
5263
|
), (S, f) => {
|
|
5264
5264
|
const R = N("fm-switch"), K = N("fm-radio"), U = N("fm-radio-group"), L = N("fm-button"), M = N("fm-checkbox");
|
|
5265
|
-
return
|
|
5265
|
+
return O(), j(Be, {
|
|
5266
5266
|
title: h(a)("menu.product.form.print.title")
|
|
5267
5267
|
}, {
|
|
5268
5268
|
default: P(() => {
|
|
5269
5269
|
var T;
|
|
5270
5270
|
return [
|
|
5271
|
-
l.value.printConfig ? (
|
|
5271
|
+
l.value.printConfig ? (O(), j(Ye, {
|
|
5272
5272
|
key: 0,
|
|
5273
5273
|
label: h(a)("menu.product.form.print.config.label")
|
|
5274
5274
|
}, {
|
|
@@ -5293,7 +5293,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
5293
5293
|
}, {
|
|
5294
5294
|
default: P(() => [
|
|
5295
5295
|
V("div", os, [
|
|
5296
|
-
(
|
|
5296
|
+
(O(!0), te(Ae, null, Ue(_.value, (I, w) => (O(), j(K, {
|
|
5297
5297
|
key: w,
|
|
5298
5298
|
label: I.label,
|
|
5299
5299
|
sublabel: I.description,
|
|
@@ -5307,7 +5307,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
5307
5307
|
label: h(a)("menu.product.form.print.routes.label")
|
|
5308
5308
|
}, {
|
|
5309
5309
|
default: P(() => [
|
|
5310
|
-
d.value.length ? (
|
|
5310
|
+
d.value.length ? (O(), j(h(Gi), {
|
|
5311
5311
|
key: 0,
|
|
5312
5312
|
"item-key": (I) => I,
|
|
5313
5313
|
"model-value": d.value,
|
|
@@ -5320,7 +5320,7 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
5320
5320
|
return [
|
|
5321
5321
|
V("div", as, [
|
|
5322
5322
|
V("div", rs, [
|
|
5323
|
-
u.value ? (
|
|
5323
|
+
u.value ? (O(), j(L, {
|
|
5324
5324
|
key: 0,
|
|
5325
5325
|
disabled: !((A = (w = t.form.print) == null ? void 0 : w.department) != null && A.includes(I)),
|
|
5326
5326
|
class: "handle",
|
|
@@ -5368,10 +5368,10 @@ const gr = { class: "fm-typo-en-title-md-600" }, br = {
|
|
|
5368
5368
|
}
|
|
5369
5369
|
});
|
|
5370
5370
|
function us(e, i, t) {
|
|
5371
|
-
const n =
|
|
5371
|
+
const n = F(() => {
|
|
5372
5372
|
var s, u;
|
|
5373
5373
|
return !!((u = (s = e.form.variant) == null ? void 0 : s.variantCombinations) != null && u.length);
|
|
5374
|
-
}), a =
|
|
5374
|
+
}), a = F(() => n.value && t.value.bindToVariant), o = F(() => {
|
|
5375
5375
|
var s;
|
|
5376
5376
|
return [
|
|
5377
5377
|
{
|
|
@@ -5392,7 +5392,7 @@ function us(e, i, t) {
|
|
|
5392
5392
|
}
|
|
5393
5393
|
}
|
|
5394
5394
|
];
|
|
5395
|
-
}), r =
|
|
5395
|
+
}), r = F(() => {
|
|
5396
5396
|
var u;
|
|
5397
5397
|
const s = (((u = e.form.variant) == null ? void 0 : u.variantCombinations) || []).map((d, c) => ({
|
|
5398
5398
|
key: d.combinationKey || "",
|
|
@@ -5408,7 +5408,7 @@ function us(e, i, t) {
|
|
|
5408
5408
|
}
|
|
5409
5409
|
}));
|
|
5410
5410
|
return [...o.value, ...s];
|
|
5411
|
-
}), l =
|
|
5411
|
+
}), l = F(
|
|
5412
5412
|
() => a.value ? r.value : o.value
|
|
5413
5413
|
);
|
|
5414
5414
|
return {
|
|
@@ -5433,12 +5433,12 @@ const cs = /* @__PURE__ */ me({
|
|
|
5433
5433
|
setup(e, {
|
|
5434
5434
|
emit: i
|
|
5435
5435
|
}) {
|
|
5436
|
-
const t = e, n = be(), a =
|
|
5436
|
+
const t = e, n = be(), a = F(() => n.rules.item), o = qe(Xe(Ee())), {
|
|
5437
5437
|
t: r
|
|
5438
5438
|
} = he(), l = i, {
|
|
5439
5439
|
hasVariant: s,
|
|
5440
5440
|
takeaways: u
|
|
5441
|
-
} = us(t, l, a), d =
|
|
5441
|
+
} = us(t, l, a), d = F(() => [t.isOverride ? {
|
|
5442
5442
|
label: r("menu.product.form.takeaway.options.follows_main"),
|
|
5443
5443
|
value: null
|
|
5444
5444
|
} : {
|
|
@@ -5498,7 +5498,7 @@ const cs = /* @__PURE__ */ me({
|
|
|
5498
5498
|
}]);
|
|
5499
5499
|
return (m, p) => {
|
|
5500
5500
|
const v = N("fm-table");
|
|
5501
|
-
return
|
|
5501
|
+
return O(), j(Be, {
|
|
5502
5502
|
title: h(r)("menu.product.form.takeaway.title"),
|
|
5503
5503
|
"sub-title": h(r)("menu.product.form.takeaway.subtitle")
|
|
5504
5504
|
}, {
|
|
@@ -5524,7 +5524,7 @@ const cs = /* @__PURE__ */ me({
|
|
|
5524
5524
|
selectedVariants: {}
|
|
5525
5525
|
},
|
|
5526
5526
|
setup(e) {
|
|
5527
|
-
const i = Ne(), { emitData: t, emitAction: n } = Vi(), a = be(), { t: o } = he(), r = e, l =
|
|
5527
|
+
const i = Ne(), { emitData: t, emitAction: n } = Vi(), a = be(), { t: o } = he(), r = e, l = F(() => a.variants.map((c) => ({
|
|
5528
5528
|
label: c.name,
|
|
5529
5529
|
value: c._id,
|
|
5530
5530
|
disabled: !1
|
|
@@ -5533,7 +5533,7 @@ const cs = /* @__PURE__ */ me({
|
|
|
5533
5533
|
};
|
|
5534
5534
|
return (c, m) => {
|
|
5535
5535
|
const p = N("FmSearch"), v = N("FmCheckbox"), y = N("FmButton");
|
|
5536
|
-
return l.value.length > 0 ? (
|
|
5536
|
+
return l.value.length > 0 ? (O(), te("div", ds, [
|
|
5537
5537
|
V("div", null, [
|
|
5538
5538
|
b(p, {
|
|
5539
5539
|
autofocus: "",
|
|
@@ -5544,7 +5544,7 @@ const cs = /* @__PURE__ */ me({
|
|
|
5544
5544
|
]),
|
|
5545
5545
|
V("div", ms, [
|
|
5546
5546
|
V("div", null, [
|
|
5547
|
-
(
|
|
5547
|
+
(O(!0), te(Ae, null, Ue(l.value, (_) => (O(), te("div", {
|
|
5548
5548
|
key: _.value
|
|
5549
5549
|
}, [
|
|
5550
5550
|
ut(b(v, {
|
|
@@ -5564,7 +5564,7 @@ const cs = /* @__PURE__ */ me({
|
|
|
5564
5564
|
V("div", ps, [
|
|
5565
5565
|
b(h(vi), null, {
|
|
5566
5566
|
default: P(({ trigger: _ }) => [
|
|
5567
|
-
h(a).rules.item.variant ? (
|
|
5567
|
+
h(a).rules.item.variant ? (O(), j(y, {
|
|
5568
5568
|
key: 0,
|
|
5569
5569
|
label: h(o)("menu.common.actions.add_new_variant"),
|
|
5570
5570
|
variant: "tertiary",
|
|
@@ -5586,7 +5586,7 @@ const cs = /* @__PURE__ */ me({
|
|
|
5586
5586
|
}, null, 8, ["label"])
|
|
5587
5587
|
])
|
|
5588
5588
|
])
|
|
5589
|
-
])) : (
|
|
5589
|
+
])) : (O(), te("div", fs, [
|
|
5590
5590
|
V("div", vs, [
|
|
5591
5591
|
V("p", gs, de(h(o)("menu.common.empty.no_variant.title")), 1),
|
|
5592
5592
|
V("p", bs, de(h(o)("menu.common.empty.no_variant.subtitle")), 1)
|
|
@@ -5631,7 +5631,7 @@ const cs = /* @__PURE__ */ me({
|
|
|
5631
5631
|
}) {
|
|
5632
5632
|
const t = e, n = be(), a = ii(), o = Ee(), r = Ne(), {
|
|
5633
5633
|
t: l
|
|
5634
|
-
} = he(), s = ee(!1), u =
|
|
5634
|
+
} = he(), s = ee(!1), u = F(() => n.rules.item), d = F(() => u.value.minPrice && !!t.form.minPrice), c = F(() => !n.state.currentCatalogId), m = F(() => n.variants.reduce((w, A) => (w[A._id] = A, w), {})), p = i;
|
|
5635
5635
|
function v(w) {
|
|
5636
5636
|
const A = Ve.clone(t.form);
|
|
5637
5637
|
for (const {
|
|
@@ -5674,7 +5674,7 @@ const cs = /* @__PURE__ */ me({
|
|
|
5674
5674
|
}
|
|
5675
5675
|
const f = (w) => {
|
|
5676
5676
|
K(w);
|
|
5677
|
-
}, R =
|
|
5677
|
+
}, R = F(() => {
|
|
5678
5678
|
var A;
|
|
5679
5679
|
return (((A = t.form.variant) == null ? void 0 : A.variantCombinations) || []).map((k) => {
|
|
5680
5680
|
var $, z;
|
|
@@ -5748,10 +5748,10 @@ const cs = /* @__PURE__ */ me({
|
|
|
5748
5748
|
value: x.variant
|
|
5749
5749
|
}]);
|
|
5750
5750
|
}
|
|
5751
|
-
const L =
|
|
5751
|
+
const L = F(() => {
|
|
5752
5752
|
var w, A;
|
|
5753
5753
|
return ((w = n.currentCatalog) == null ? void 0 : w.priceTierRules) ?? ((A = n.currentCatalog) == null ? void 0 : A.usePriceTiers) ?? [];
|
|
5754
|
-
}), M =
|
|
5754
|
+
}), M = F(() => [{
|
|
5755
5755
|
accessorKey: "combinationKey",
|
|
5756
5756
|
header: () => l("menu.product.form.variant.columns.variant"),
|
|
5757
5757
|
enableSorting: !1,
|
|
@@ -5767,7 +5767,7 @@ const cs = /* @__PURE__ */ me({
|
|
|
5767
5767
|
modelValue: A,
|
|
5768
5768
|
placeholder: $ || l("menu.product.form.variant.placeholders.no_code"),
|
|
5769
5769
|
rules: [(C) => {
|
|
5770
|
-
const W = C, ae =
|
|
5770
|
+
const W = C, ae = F(() => {
|
|
5771
5771
|
var E;
|
|
5772
5772
|
if (!n.state.featureFlags.uniqueProductCode || !W) return 0;
|
|
5773
5773
|
let re = n.itemCodeMap.get(W) || 0;
|
|
@@ -5848,7 +5848,7 @@ const cs = /* @__PURE__ */ me({
|
|
|
5848
5848
|
showCurrency: !1
|
|
5849
5849
|
}, null);
|
|
5850
5850
|
}
|
|
5851
|
-
}]), T =
|
|
5851
|
+
}]), T = F(() => ({
|
|
5852
5852
|
minPrice: d.value
|
|
5853
5853
|
}));
|
|
5854
5854
|
function I(w) {
|
|
@@ -5858,11 +5858,11 @@ const cs = /* @__PURE__ */ me({
|
|
|
5858
5858
|
}
|
|
5859
5859
|
return (w, A) => {
|
|
5860
5860
|
const k = N("fm-button"), x = N("fm-icon"), $ = N("FmFormGroup"), z = N("fm-table");
|
|
5861
|
-
return
|
|
5861
|
+
return O(), j(Be, {
|
|
5862
5862
|
title: h(l)("menu.product.form.variant.title"),
|
|
5863
5863
|
"sub-title": h(l)("menu.product.form.variant.subtitle")
|
|
5864
5864
|
}, {
|
|
5865
|
-
"append-title": P(() => [h(n).rules.item.variant ? (
|
|
5865
|
+
"append-title": P(() => [h(n).rules.item.variant ? (O(), j(k, {
|
|
5866
5866
|
key: 0,
|
|
5867
5867
|
label: h(l)("menu.product.form.variant.add"),
|
|
5868
5868
|
variant: "secondary",
|
|
@@ -5907,7 +5907,7 @@ const cs = /* @__PURE__ */ me({
|
|
|
5907
5907
|
}),
|
|
5908
5908
|
_: 1
|
|
5909
5909
|
}, 8, ["model-value", "rules"]), b(mn, null, {
|
|
5910
|
-
default: P(() => [R.value.length ? (
|
|
5910
|
+
default: P(() => [R.value.length ? (O(), j(z, {
|
|
5911
5911
|
key: 0,
|
|
5912
5912
|
class: "w-full",
|
|
5913
5913
|
"column-defs": M.value,
|
|
@@ -5925,7 +5925,7 @@ const cs = /* @__PURE__ */ me({
|
|
|
5925
5925
|
};
|
|
5926
5926
|
}
|
|
5927
5927
|
}), xs = {
|
|
5928
|
-
class: /* @__PURE__ */
|
|
5928
|
+
class: /* @__PURE__ */ Oe(["flex", "space-x-40", "max-w-[1200px] mx-auto w-full"])
|
|
5929
5929
|
}, Rs = {
|
|
5930
5930
|
key: 1,
|
|
5931
5931
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
@@ -5935,10 +5935,10 @@ const cs = /* @__PURE__ */ me({
|
|
|
5935
5935
|
}, Ms = {
|
|
5936
5936
|
key: 4,
|
|
5937
5937
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
5938
|
-
},
|
|
5938
|
+
}, Os = {
|
|
5939
5939
|
key: 6,
|
|
5940
5940
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
5941
|
-
},
|
|
5941
|
+
}, Fs = {
|
|
5942
5942
|
key: 7,
|
|
5943
5943
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
5944
5944
|
}, zs = {
|
|
@@ -5958,7 +5958,7 @@ const cs = /* @__PURE__ */ me({
|
|
|
5958
5958
|
emits: ["update:show", "submit:form"],
|
|
5959
5959
|
setup(e, { emit: i }) {
|
|
5960
5960
|
var oi, ai, ri, si, li;
|
|
5961
|
-
const t = e, n = i, a = be(), o = mt(), { t: r } = he(), l =
|
|
5961
|
+
const t = e, n = i, a = be(), o = mt(), { t: r } = he(), l = F(() => t.action === "add" ? r("menu.product.form.title.add") : r("menu.product.form.title.update")), s = F(() => a.rules.item), u = (H) => new Promise((B) => setTimeout(B, H));
|
|
5962
5962
|
ot(async () => {
|
|
5963
5963
|
t.autoShow && (await u(100), c());
|
|
5964
5964
|
});
|
|
@@ -5996,7 +5996,7 @@ const cs = /* @__PURE__ */ me({
|
|
|
5996
5996
|
a.selectCatalog(H), a.selectScheduler(B), await Ei(), y.update(p.value._id), setTimeout(() => {
|
|
5997
5997
|
n("update:show", !1);
|
|
5998
5998
|
}, 100);
|
|
5999
|
-
}, S =
|
|
5999
|
+
}, S = F(() => {
|
|
6000
6000
|
var H;
|
|
6001
6001
|
return a.mapVariant((H = p.value.variant) == null ? void 0 : H.variantGroupIds);
|
|
6002
6002
|
}), f = ee(null);
|
|
@@ -6025,12 +6025,12 @@ const cs = /* @__PURE__ */ me({
|
|
|
6025
6025
|
(B = a.currentScheduler) == null ? void 0 : B._id
|
|
6026
6026
|
))[0] : void 0;
|
|
6027
6027
|
}
|
|
6028
|
-
const U =
|
|
6028
|
+
const U = F(
|
|
6029
6029
|
() => !!a.currentCatalog || !!a.state.currentSchedulerId
|
|
6030
|
-
), L =
|
|
6030
|
+
), L = F(() => {
|
|
6031
6031
|
var H;
|
|
6032
6032
|
return U.value ? p.value.category == "" || p.value.category == null && ((H = m.value) == null ? void 0 : H.category) == null : a.version === G.F_MENU_VERSION.enum.v4 && p.value.category == null;
|
|
6033
|
-
}), M =
|
|
6033
|
+
}), M = F(() => o.itemAttributeSettings.value.length > 0 && !U.value);
|
|
6034
6034
|
function T() {
|
|
6035
6035
|
var fe;
|
|
6036
6036
|
const H = a.getSelectedTax(
|
|
@@ -6043,7 +6043,7 @@ const cs = /* @__PURE__ */ me({
|
|
|
6043
6043
|
function I() {
|
|
6044
6044
|
f.value = null, p.value.thumbnail = null;
|
|
6045
6045
|
}
|
|
6046
|
-
const w =
|
|
6046
|
+
const w = F(() => {
|
|
6047
6047
|
var H, B, pe, fe, Q, ui, ci, di, mi;
|
|
6048
6048
|
return {
|
|
6049
6049
|
title: r("menu.product.form.summary.title"),
|
|
@@ -6099,7 +6099,7 @@ const cs = /* @__PURE__ */ me({
|
|
|
6099
6099
|
orderFrom: void 0
|
|
6100
6100
|
});
|
|
6101
6101
|
}
|
|
6102
|
-
const x =
|
|
6102
|
+
const x = F(() => {
|
|
6103
6103
|
const H = {};
|
|
6104
6104
|
return a.state.menu.modules.item.forEach((B) => {
|
|
6105
6105
|
var pe;
|
|
@@ -6237,7 +6237,7 @@ const cs = /* @__PURE__ */ me({
|
|
|
6237
6237
|
c(), oe();
|
|
6238
6238
|
}
|
|
6239
6239
|
const { isAtMost: Le } = Pi(), ni = ee(null), gn = Bn(ni);
|
|
6240
|
-
return (H, B) => (
|
|
6240
|
+
return (H, B) => (O(), te(Ae, null, [
|
|
6241
6241
|
ve(H.$slots, "trigger", Cn(kn({
|
|
6242
6242
|
trigger: c
|
|
6243
6243
|
}))),
|
|
@@ -6257,7 +6257,7 @@ const cs = /* @__PURE__ */ me({
|
|
|
6257
6257
|
onOnCancel: ne
|
|
6258
6258
|
}, {
|
|
6259
6259
|
"append-title": P(() => [
|
|
6260
|
-
h(Le)("sm") ? (
|
|
6260
|
+
h(Le)("sm") ? (O(), j(gi, {
|
|
6261
6261
|
key: 0,
|
|
6262
6262
|
variant: "dialog",
|
|
6263
6263
|
title: w.value.title,
|
|
@@ -6267,7 +6267,7 @@ const cs = /* @__PURE__ */ me({
|
|
|
6267
6267
|
default: P(() => {
|
|
6268
6268
|
var pe, fe;
|
|
6269
6269
|
return [
|
|
6270
|
-
h(Le)("sm") ? ie("", !0) : (
|
|
6270
|
+
h(Le)("sm") ? ie("", !0) : (O(), j(gi, {
|
|
6271
6271
|
key: 0,
|
|
6272
6272
|
class: "fixed",
|
|
6273
6273
|
style: xn({
|
|
@@ -6282,9 +6282,9 @@ const cs = /* @__PURE__ */ me({
|
|
|
6282
6282
|
V("div", {
|
|
6283
6283
|
ref_key: "formWrapper",
|
|
6284
6284
|
ref: ni,
|
|
6285
|
-
class:
|
|
6285
|
+
class: Oe(["flex-1 py-24 space-y-24", "xs:w-full"])
|
|
6286
6286
|
}, [
|
|
6287
|
-
v.value && (Object.keys(v.value.catalogs || {}).length > 0 || v.value.schedulers.length > 0) ? (
|
|
6287
|
+
v.value && (Object.keys(v.value.catalogs || {}).length > 0 || v.value.schedulers.length > 0) ? (O(), j(ho, {
|
|
6288
6288
|
key: 0,
|
|
6289
6289
|
"linked-status": v.value,
|
|
6290
6290
|
"onUpdate:catalogAndScheduler": _
|
|
@@ -6315,8 +6315,8 @@ const cs = /* @__PURE__ */ me({
|
|
|
6315
6315
|
]),
|
|
6316
6316
|
_: 1
|
|
6317
6317
|
}, 8, ["toggle", "disabled", "description", "title"]),
|
|
6318
|
-
U.value ? ie("", !0) : (
|
|
6319
|
-
M.value ? (
|
|
6318
|
+
U.value ? ie("", !0) : (O(), te("div", Rs)),
|
|
6319
|
+
M.value ? (O(), j(Be, {
|
|
6320
6320
|
key: 2,
|
|
6321
6321
|
title: h(r)("menu.product.form.sections.tagging.title"),
|
|
6322
6322
|
"sub-title": h(r)("menu.product.form.sections.tagging.subtitle")
|
|
@@ -6331,7 +6331,7 @@ const cs = /* @__PURE__ */ me({
|
|
|
6331
6331
|
]),
|
|
6332
6332
|
_: 1
|
|
6333
6333
|
}, 8, ["title", "sub-title"])) : ie("", !0),
|
|
6334
|
-
M.value ? (
|
|
6334
|
+
M.value ? (O(), te("div", As)) : ie("", !0),
|
|
6335
6335
|
b(Qe, {
|
|
6336
6336
|
toggle: $.value,
|
|
6337
6337
|
"onUpdate:toggle": [
|
|
@@ -6353,8 +6353,8 @@ const cs = /* @__PURE__ */ me({
|
|
|
6353
6353
|
]),
|
|
6354
6354
|
_: 1
|
|
6355
6355
|
}, 8, ["toggle", "disabled", "description", "title"]),
|
|
6356
|
-
s.value.print && !U.value ? (
|
|
6357
|
-
s.value.print ? (
|
|
6356
|
+
s.value.print && !U.value ? (O(), te("div", Ms)) : ie("", !0),
|
|
6357
|
+
s.value.print ? (O(), j(Qe, {
|
|
6358
6358
|
key: 5,
|
|
6359
6359
|
toggle: D.value,
|
|
6360
6360
|
"onUpdate:toggle": [
|
|
@@ -6378,7 +6378,7 @@ const cs = /* @__PURE__ */ me({
|
|
|
6378
6378
|
]),
|
|
6379
6379
|
_: 1
|
|
6380
6380
|
}, 8, ["toggle"])) : ie("", !0),
|
|
6381
|
-
U.value ? ie("", !0) : (
|
|
6381
|
+
U.value ? ie("", !0) : (O(), te("div", Os)),
|
|
6382
6382
|
b(Qe, {
|
|
6383
6383
|
toggle: g.value,
|
|
6384
6384
|
"onUpdate:toggle": [
|
|
@@ -6402,8 +6402,8 @@ const cs = /* @__PURE__ */ me({
|
|
|
6402
6402
|
]),
|
|
6403
6403
|
_: 1
|
|
6404
6404
|
}, 8, ["toggle", "disabled", "description", "title"]),
|
|
6405
|
-
s.value.group && !U.value ? (
|
|
6406
|
-
s.value.group ? (
|
|
6405
|
+
s.value.group && !U.value ? (O(), te("div", Fs)) : ie("", !0),
|
|
6406
|
+
s.value.group ? (O(), j(Qe, {
|
|
6407
6407
|
key: 8,
|
|
6408
6408
|
toggle: q.value,
|
|
6409
6409
|
"onUpdate:toggle": [
|
|
@@ -6427,8 +6427,8 @@ const cs = /* @__PURE__ */ me({
|
|
|
6427
6427
|
]),
|
|
6428
6428
|
_: 1
|
|
6429
6429
|
}, 8, ["toggle", "disabled"])) : ie("", !0),
|
|
6430
|
-
s.value.inventory && !U.value ? (
|
|
6431
|
-
s.value.inventory ? (
|
|
6430
|
+
s.value.inventory && !U.value ? (O(), te("div", zs)) : ie("", !0),
|
|
6431
|
+
s.value.inventory ? (O(), j(Qe, {
|
|
6432
6432
|
key: 10,
|
|
6433
6433
|
toggle: W.value,
|
|
6434
6434
|
"onUpdate:toggle": [
|
|
@@ -6452,8 +6452,8 @@ const cs = /* @__PURE__ */ me({
|
|
|
6452
6452
|
]),
|
|
6453
6453
|
_: 1
|
|
6454
6454
|
}, 8, ["toggle", "disabled", "description", "title"])) : ie("", !0),
|
|
6455
|
-
s.value.takeaway(p.value.category ?? ((pe = m.value) == null ? void 0 : pe.category)) && !U.value ? (
|
|
6456
|
-
s.value.takeaway(p.value.category ?? ((fe = m.value) == null ? void 0 : fe.category)) ? (
|
|
6455
|
+
s.value.takeaway(p.value.category ?? ((pe = m.value) == null ? void 0 : pe.category)) && !U.value ? (O(), te("div", Is)) : ie("", !0),
|
|
6456
|
+
s.value.takeaway(p.value.category ?? ((fe = m.value) == null ? void 0 : fe.category)) ? (O(), j(Qe, {
|
|
6457
6457
|
key: 12,
|
|
6458
6458
|
toggle: re.value,
|
|
6459
6459
|
"onUpdate:toggle": [
|
|
@@ -6584,7 +6584,7 @@ function Vs(e, i) {
|
|
|
6584
6584
|
_id: e._id
|
|
6585
6585
|
};
|
|
6586
6586
|
}
|
|
6587
|
-
const ii =
|
|
6587
|
+
const ii = Oi("item-manager", () => {
|
|
6588
6588
|
const e = be(), i = Ee(), t = Ne(), n = Xe(i), a = qe(n), o = Ii(), { t: r } = he(), l = (M) => {
|
|
6589
6589
|
if (!o) throw new Error("No current instance found");
|
|
6590
6590
|
const { container: T } = Tn(Ts, o, {
|