@feedmepos/mf-menu 0.32.83-dev.1 → 0.32.83
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-BYdCC3TK.js → App-Bw-ozzec.js} +8 -8
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-CsMCfu1s.js → ApplyProduct.vue_vue_type_script_setup_true_lang-DHDH7KKi.js} +3 -3
- package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-CWH86f_J.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-BXUoYPtC.js} +3 -3
- package/dist/{Catalog-BPRRb4QE.js → Catalog-Dmi4r1Zs.js} +6 -6
- package/dist/{CatalogBinding-B2vhvUHz.js → CatalogBinding-B7H-nEwM.js} +13 -13
- package/dist/{Category-zKR2QaeE.js → Category-BKwpeCXh.js} +4 -4
- package/dist/{Category-DeeXKn4P.js → Category-CwBmbR5g.js} +4 -4
- package/dist/{CookingGuide-Wm39wm7Q.js → CookingGuide-Dhsu1zWp.js} +5 -5
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CAHNxiEJ.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-DvGdDV9p.js} +1 -1
- package/dist/{Group-BNcZYOU4.js → Group-Ceu7Copf.js} +3 -3
- package/dist/{Group-E2HYqd9f.js → Group-DNC-Usx0.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-DPk_cgPi.js → Group.vue_vue_type_script_setup_true_lang-D7J8SXa7.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B0X5brpK.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CHdTcTM3.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DxowkX0c.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-pBlcLv-w.js} +212 -212
- package/dist/{Ingredient-DcJrO6OE.js → Ingredient-CC0JhuTG.js} +4 -4
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-DfrJBP75.js → InventoryBinding.vue_vue_type_script_setup_true_lang-hv2j96xE.js} +2 -2
- package/dist/{LinkProductSideSheet-DTzuEcF5.js → LinkProductSideSheet-TN2_U83N.js} +4 -4
- package/dist/{MenuSetting-DICpAfNK.js → MenuSetting-CVvexu1x.js} +7 -7
- package/dist/{OrderPacing-pD1pgJG5.js → OrderPacing-Bdwdg02x.js} +5 -5
- package/dist/{PrintRoute-BAY_gpJS.js → PrintRoute-CjFa5lDf.js} +5 -5
- package/dist/{Product-B_YsLenC.js → Product-CJju3e91.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-DEsNttgJ.js → Product.vue_vue_type_script_setup_true_lang-CgyRlUfF.js} +14 -14
- package/dist/{ProductInternalTools-CfA-6XtS.js → ProductInternalTools-x58c-Eqi.js} +7 -7
- package/dist/{Products-arAA8I2u.js → Products-C1kMAf09.js} +34 -34
- package/dist/Publish-CWU3b98i.js +1608 -0
- package/dist/{Recipe-DRcrzXhA.js → Recipe-DzzZnDyw.js} +5 -5
- package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-CAVrU6RI.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-C1SJG0VC.js} +1 -1
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DYnnO3SQ.js → RuleView.vue_vue_type_script_setup_true_lang-DKCI5FWu.js} +731 -731
- package/dist/{Scheduler-oxLqE74K.js → Scheduler-BNfWt8Dg.js} +3 -3
- package/dist/{ServingSequence-DVkB7hDy.js → ServingSequence-Cd4h0cg6.js} +3 -3
- package/dist/{Setting-DOsTp22X.js → Setting-Doi12dmL.js} +5 -5
- package/dist/{Subcategory-BaclYZ5p.js → Subcategory-DWeszc_Q.js} +6 -6
- package/dist/Takeaway-BN4ALKLd.js +64 -0
- package/dist/{Takeaway-D2jvmsuu.js → Takeaway-hxK-Doql.js} +1 -1
- package/dist/Takeaway.vue_vue_type_script_setup_true_lang-6IZPDhaJ.js +331 -0
- package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-M3Oh6Dr6.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-CoJ6I8th.js} +1 -1
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-DjswjUjQ.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-R8Uq2q8a.js} +2 -2
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Dcd1ek03.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CDE3C737.js} +602 -601
- package/dist/{Unit-Dx8HMvAE.js → Unit-eH2N7G3C.js} +2 -2
- package/dist/{Variant-Dx6EWp55.js → Variant-6Le_fght.js} +3 -3
- package/dist/{_id_-DIsWlajV.js → _id_-DEsYj32K.js} +10 -10
- package/dist/{app-curMXZbh.js → app-BchMdmn0.js} +1 -1
- package/dist/{app-BdtPzkjA.js → app-C3fvLdk6.js} +392 -392
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +25 -0
- package/dist/apps/mf-menu/src/components/feature/TakeAwayManager/Form.vue.d.ts +3 -3
- package/dist/apps/mf-menu/src/helper/takeawayOverride.d.ts +12 -0
- package/dist/apps/mf-menu/src/manager/menu/takeaway.d.ts +14 -0
- package/dist/apps/mf-menu/src/views/Publish/publishError.d.ts +20 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-DsxqMxwe.js → linked-status-6gBSlnSK.js} +2 -2
- package/dist/assets/{menu-export-DcW52Lu3.js → menu-export--ku4LX8B.js} +2 -2
- package/dist/assets/{override-menu-DPPsvKsd.js → override-menu-Cfr4mD2N.js} +2 -2
- package/dist/assets/{validate-menu-Byl7hJI2.js → validate-menu-p5dTyV3b.js} +2 -2
- package/dist/{catalog-D4uhTN3P.js → catalog-BBW_JOmi.js} +1 -1
- package/dist/{catalogSetting-_zy50XFm.js → catalogSetting-FUxG-o8e.js} +1 -1
- package/dist/{currency-8AD3AdtT.js → currency-dN61r7Dj.js} +1 -1
- package/dist/{dayjs.min-CSadJcjJ.js → dayjs.min-zUn0kE7h.js} +2 -2
- package/dist/{discardConfirm-egY5vwUU.js → discardConfirm-JSuBPCBO.js} +1 -1
- package/dist/{index-B0hyUFIc.js → index-26hFA0dv.js} +1 -1
- package/dist/{index-BPGZgTH-.js → index-BXf2ffOW.js} +5 -5
- package/dist/{index-BpoYrrVu.js → index-wndkX4SS.js} +137 -131
- package/dist/{index.vue_vue_type_script_setup_true_lang-qUahjdoy.js → index.vue_vue_type_script_setup_true_lang-BAVu4NTt.js} +10602 -10592
- package/dist/{item-CGqK7sn4.js → item-D6itBJWi.js} +1290 -1289
- package/dist/{jszip.min-Qb_fhEy6.js → jszip.min-CJAQHq0K.js} +3 -3
- package/dist/{linkProducts-DwBnfj3L.js → linkProducts-BCBOugXd.js} +4 -4
- package/dist/{memberPricing-CcXhcbV9.js → memberPricing-D4BvlT66.js} +1 -1
- package/dist/{menu-Cmz90lOu.js → menu-Bn85J25r.js} +1 -1
- package/dist/{menuV2-yXOZpuda.js → menuV2-DwgKWOb1.js} +38 -38
- package/dist/{order_pacing-Bp1Hpcp2.js → order_pacing-DlMIzFpD.js} +5 -5
- package/dist/{priceTier-B14Zw5XH.js → priceTier-mtlQOB7P.js} +1 -1
- package/dist/{rules-COZi7aRn.js → rules-CpmrQrSF.js} +3 -3
- package/dist/{scheduler-eoUNmYqB.js → scheduler-574B11my.js} +5 -5
- package/dist/{toExcel-BkhEG-vD.js → toExcel-B-Qbf0yE.js} +2 -2
- package/dist/{unit-Bmje7das.js → unit-BvrDtd_s.js} +3 -3
- package/package.json +2 -2
- package/dist/Publish-BORONVKG.js +0 -1582
- package/dist/Takeaway-BbcmF6t2.js +0 -64
- package/dist/Takeaway.vue_vue_type_script_setup_true_lang-BpswLmDw.js +0 -324
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as p, F as m, l as c, h as g, i as h, W as v } from "./index.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { u as p, F as m, l as c, h as g, i as h, W as v } from "./index.vue_vue_type_script_setup_true_lang-BAVu4NTt.js";
|
|
2
2
|
import "@feedmepos/ui-library";
|
|
3
3
|
function E(s) {
|
|
4
4
|
const t = Object.values(s.items).reduce((e, a) => (e.push({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as u, f as a } from "./index.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { l as u, f as a } from "./index.vue_vue_type_script_setup_true_lang-BAVu4NTt.js";
|
|
2
2
|
var n = /* @__PURE__ */ ((e) => (e.AUTO = "auto", e.MANUAL = "manual", e))(n || {}), l = /* @__PURE__ */ ((e) => (e[e.Normal = 0] = "Normal", e[e.Rules = 1] = "Rules", e))(l || {});
|
|
3
3
|
class t {
|
|
4
4
|
static fromCatalog(r, s) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as r } from "./app-
|
|
2
|
-
import { X as o } from "./index.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { g as r } from "./app-C3fvLdk6.js";
|
|
2
|
+
import { X as o } from "./index.vue_vue_type_script_setup_true_lang-BAVu4NTt.js";
|
|
3
3
|
var a = o();
|
|
4
4
|
const m = /* @__PURE__ */ r(a);
|
|
5
5
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as R } from "./discardConfirm-
|
|
1
|
+
import { l as R } from "./discardConfirm-JSuBPCBO.js";
|
|
2
2
|
import { defineComponent as x, resolveComponent as p, createBlock as d, openBlock as c, Teleport as k, createVNode as g, Transition as N, withCtx as C, createCommentVNode as w, withKeys as $, normalizeStyle as I, normalizeClass as f, createElementVNode as h, renderSlot as S, createElementBlock as y, toDisplayString as z, Fragment as U, renderList as B, computed as m, unref as W, ref as P } from "vue";
|
|
3
3
|
import { _ as V } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import { useI18n as F } from "@feedmepos/mf-common";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as le, ref as f, computed as q, watch as J, resolveComponent as C, createBlock as I, openBlock as h, unref as s, withCtx as k, createElementVNode as p, createVNode as c, createElementBlock as O, createCommentVNode as T, normalizeClass as Q, toDisplayString as F, Fragment as M, renderList as H, renderSlot as se, createSlots as ie } from "vue";
|
|
2
|
-
import { l as E, u as te } from "./discardConfirm-
|
|
2
|
+
import { l as E, u as te } from "./discardConfirm-JSuBPCBO.js";
|
|
3
3
|
import { d as re } from "./RuleConditionSelector.vue_vue_type_style_index_0_lang-CK8z7qA8.js";
|
|
4
|
-
import { j as ue, b as de, f as D, m as W, h as X, i as Z } from "./index.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { j as ue, b as de, f as D, m as W, h as X, i as Z } from "./index.vue_vue_type_script_setup_true_lang-BAVu4NTt.js";
|
|
5
5
|
import { useI18n as oe } from "@feedmepos/mf-common";
|
|
6
6
|
import { useSnackbar as me, components as ce } from "@feedmepos/ui-library";
|
|
7
7
|
import { _ as ve } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
8
|
-
import { _ as pe } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { _ as fe } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
import { _ as _e, a as ee, b as ae, c as ne } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { _ as pe } from "./RuleView.vue_vue_type_script_setup_true_lang-DKCI5FWu.js";
|
|
9
|
+
import { _ as fe } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-DHDH7KKi.js";
|
|
10
|
+
import { _ as _e, a as ee, b as ae, c as ne } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-CoJ6I8th.js";
|
|
11
11
|
import { c as he } from "./check-C9mY6LiX.js";
|
|
12
12
|
const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24" }, Ve = { class: "flex flex-col gap-16 border p-16 rounded-lg" }, be = { class: "fm-typo-en-body-lg-600" }, xe = {
|
|
13
13
|
key: 0,
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { u as
|
|
1
|
+
import { a as R, i as G, u as Q, f as X, m as z } from "./index.vue_vue_type_script_setup_true_lang-BAVu4NTt.js";
|
|
2
|
+
import { defineComponent as j, computed as V, ref as g, watch as W, onMounted as ee, onBeforeUnmount as ae, resolveComponent as T, createBlock as H, openBlock as F, withModifiers as K, withCtx as h, renderSlot as J, createElementBlock as q, createCommentVNode as Y, toDisplayString as I, Fragment as A, createVNode as k, unref as i, createElementVNode as M, renderList as te } from "vue";
|
|
3
|
+
import { u as ne, l as le } from "./discardConfirm-JSuBPCBO.js";
|
|
4
4
|
import { useCoreStore as oe, useI18n as Z } from "@feedmepos/mf-common";
|
|
5
5
|
import { components as re } from "@feedmepos/ui-library";
|
|
6
|
-
import { _ as ie } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { _ as ue } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { _ as se } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { _ as ie } from "./RuleView.vue_vue_type_script_setup_true_lang-DKCI5FWu.js";
|
|
7
|
+
import { _ as ue } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-DHDH7KKi.js";
|
|
8
|
+
import { _ as se } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-R8Uq2q8a.js";
|
|
9
9
|
import { c as me } from "./check-C9mY6LiX.js";
|
|
10
|
-
import { f as de } from "./currency-
|
|
10
|
+
import { f as de } from "./currency-dN61r7Dj.js";
|
|
11
11
|
import { c as ce } from "./string-DpfFixWH.js";
|
|
12
|
-
import { g as
|
|
12
|
+
import { g as P } from "./translation-fNx6yEpy.js";
|
|
13
13
|
function pe({
|
|
14
|
-
showCurrency:
|
|
15
|
-
country:
|
|
14
|
+
showCurrency: u,
|
|
15
|
+
country: y
|
|
16
16
|
}) {
|
|
17
|
-
if (!
|
|
18
|
-
if (!
|
|
17
|
+
if (!u) return "";
|
|
18
|
+
if (!y) return "$";
|
|
19
19
|
try {
|
|
20
|
-
return
|
|
20
|
+
return R.Country.getCountry(y).currency.symbol || "$";
|
|
21
21
|
} catch {
|
|
22
22
|
return "$";
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
const fe = { key: 0 },
|
|
25
|
+
const fe = { key: 0 }, ye = /* @__PURE__ */ j({
|
|
26
26
|
__name: "CurrencyInput",
|
|
27
27
|
props: {
|
|
28
28
|
modelValue: {},
|
|
@@ -64,41 +64,41 @@ const fe = { key: 0 }, ve = /* @__PURE__ */ P({
|
|
|
64
64
|
helperState: {}
|
|
65
65
|
},
|
|
66
66
|
emits: ["update:model-value"],
|
|
67
|
-
setup(
|
|
68
|
-
const
|
|
69
|
-
showCurrency:
|
|
67
|
+
setup(u, { emit: y }) {
|
|
68
|
+
const n = u, r = oe(), { t: d } = Z(), O = V(() => pe({
|
|
69
|
+
showCurrency: n.showCurrency,
|
|
70
70
|
country: r.currentCountry.value
|
|
71
|
-
})),
|
|
71
|
+
})), S = g(!1), D = g(!1), s = g(), m = V(() => n.modelValue ? R.Dinero.fromFdoDinero(n.modelValue).toUnit().toFixed(2) : "");
|
|
72
72
|
W(
|
|
73
|
-
() =>
|
|
73
|
+
() => D.value,
|
|
74
74
|
(e) => {
|
|
75
|
-
var
|
|
76
|
-
e ? (
|
|
75
|
+
var l, v, b, U, $;
|
|
76
|
+
e ? (S.value || (S.value = !0), (v = (l = s.value) == null ? void 0 : l.inputEl) == null || v.select()) : (S.value = !1, (b = s.value) != null && b.inputEl && x(($ = (U = s.value) == null ? void 0 : U.inputEl) == null ? void 0 : $.value));
|
|
77
77
|
}
|
|
78
78
|
);
|
|
79
|
-
const C =
|
|
80
|
-
field:
|
|
79
|
+
const C = y, c = V(() => typeof n.required == "string" ? n.required : d("menu.common.validation.field_required", {
|
|
80
|
+
field: n.label ?? d("menu.currency.input.field")
|
|
81
81
|
})), L = [
|
|
82
|
-
(e) =>
|
|
83
|
-
(e) =>
|
|
84
|
-
(e) =>
|
|
85
|
-
...
|
|
82
|
+
(e) => n.required ? !!e || c.value : !0,
|
|
83
|
+
(e) => n.min !== void 0 && e && parseFloat(e.toString()) < n.min ? d("menu.common.validation.min_value", { value: n.min }) : !0,
|
|
84
|
+
(e) => n.max !== void 0 && e && parseFloat(e.toString()) > n.max ? d("menu.common.validation.max_value", { value: n.max }) : !0,
|
|
85
|
+
...n.rules ?? []
|
|
86
86
|
];
|
|
87
87
|
function x(e) {
|
|
88
|
-
if (typeof e != "number" && !e &&
|
|
88
|
+
if (typeof e != "number" && !e && n.nullable)
|
|
89
89
|
C("update:model-value", void 0);
|
|
90
90
|
else {
|
|
91
91
|
if (typeof e == "string" && e === "-")
|
|
92
92
|
return;
|
|
93
|
-
let
|
|
94
|
-
|
|
93
|
+
let l = parseFloat((e || "").toString());
|
|
94
|
+
l = Number.isNaN(l) ? 0 : l, C("update:model-value", R.Dinero.fromNumber({ number: l }).toObject());
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
const o =
|
|
98
|
-
var
|
|
97
|
+
const o = V(() => typeof n.min == "number" && n.min >= 0), N = (e) => {
|
|
98
|
+
var l, v, b;
|
|
99
99
|
if (!(e.ctrlKey || e.metaKey)) {
|
|
100
100
|
if (e.key === "Enter") {
|
|
101
|
-
(
|
|
101
|
+
(l = s.value) != null && l.inputEl && x((b = (v = s.value) == null ? void 0 : v.inputEl) == null ? void 0 : b.value);
|
|
102
102
|
return;
|
|
103
103
|
}
|
|
104
104
|
if (e.key === "-" && o.value) {
|
|
@@ -110,34 +110,34 @@ const fe = { key: 0 }, ve = /* @__PURE__ */ P({
|
|
|
110
110
|
};
|
|
111
111
|
return ee(() => {
|
|
112
112
|
var e;
|
|
113
|
-
|
|
113
|
+
s.value && ((e = s.value.inputEl) == null || e.addEventListener("keydown", N));
|
|
114
114
|
}), ae(() => {
|
|
115
115
|
var e;
|
|
116
|
-
|
|
117
|
-
}), (e,
|
|
118
|
-
const v =
|
|
119
|
-
return
|
|
116
|
+
s.value && ((e = s.value.inputEl) == null || e.removeEventListener("keydown", N));
|
|
117
|
+
}), (e, l) => {
|
|
118
|
+
const v = T("fm-text-field");
|
|
119
|
+
return F(), H(v, {
|
|
120
120
|
ref_key: "inputRef",
|
|
121
|
-
ref:
|
|
122
|
-
autofocus:
|
|
123
|
-
disabled:
|
|
121
|
+
ref: s,
|
|
122
|
+
autofocus: n.autofocus,
|
|
123
|
+
disabled: n.disable,
|
|
124
124
|
label: e.label,
|
|
125
|
-
"model-value":
|
|
126
|
-
placeholder:
|
|
125
|
+
"model-value": m.value,
|
|
126
|
+
placeholder: n.placeholder,
|
|
127
127
|
rules: L,
|
|
128
128
|
inputmode: "decimal",
|
|
129
|
-
onFocusChanged:
|
|
130
|
-
onWheel:
|
|
129
|
+
onFocusChanged: l[0] || (l[0] = (b) => D.value = b),
|
|
130
|
+
onWheel: l[1] || (l[1] = K(() => {
|
|
131
131
|
}, ["prevent"])),
|
|
132
|
-
onTouchmove:
|
|
132
|
+
onTouchmove: l[2] || (l[2] = K(() => {
|
|
133
133
|
}, ["prevent"])),
|
|
134
|
-
onScroll:
|
|
134
|
+
onScroll: l[3] || (l[3] = K(() => {
|
|
135
135
|
}, ["prevent"]))
|
|
136
136
|
}, {
|
|
137
|
-
prepend:
|
|
138
|
-
e.showCurrency ? (
|
|
137
|
+
prepend: h(() => [
|
|
138
|
+
e.showCurrency ? (F(), q("span", fe, I(O.value), 1)) : Y("", !0)
|
|
139
139
|
]),
|
|
140
|
-
append:
|
|
140
|
+
append: h(() => [
|
|
141
141
|
J(e.$slots, "append")
|
|
142
142
|
]),
|
|
143
143
|
_: 3
|
|
@@ -145,15 +145,20 @@ const fe = { key: 0 }, ve = /* @__PURE__ */ P({
|
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
147
|
});
|
|
148
|
-
function
|
|
149
|
-
|
|
148
|
+
function Ne(u) {
|
|
149
|
+
if (!u.price)
|
|
150
|
+
throw new Error(`Takeaway "${u.name}" has no price`);
|
|
151
|
+
return { ...u, price: u.price };
|
|
152
|
+
}
|
|
153
|
+
function Ue(u) {
|
|
154
|
+
return u.map((y) => ({
|
|
150
155
|
module: G.enum.item,
|
|
151
|
-
id:
|
|
152
|
-
discriminator:
|
|
156
|
+
id: y._id,
|
|
157
|
+
discriminator: y.combinationKey,
|
|
153
158
|
data: void 0
|
|
154
159
|
}));
|
|
155
160
|
}
|
|
156
|
-
const
|
|
161
|
+
const ve = { class: "fm-typo-en-title-md-600" }, be = { class: "space-y-32" }, ke = { class: "py-12 px-16 space-y-4" }, he = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__ */ j({
|
|
157
162
|
__name: "Form",
|
|
158
163
|
props: {
|
|
159
164
|
action: {},
|
|
@@ -163,118 +168,118 @@ const ye = { class: "fm-typo-en-title-md-600" }, be = { class: "space-y-32" }, k
|
|
|
163
168
|
bindToVariant: { type: Boolean }
|
|
164
169
|
},
|
|
165
170
|
emits: ["update:takeaway"],
|
|
166
|
-
setup(
|
|
167
|
-
const { t: r } = Z(),
|
|
168
|
-
me.isBoolean(a) ?
|
|
171
|
+
setup(u, { expose: y, emit: n }) {
|
|
172
|
+
const { t: r } = Z(), d = u, O = n, S = Q(), D = V(() => S.rules.takeaway), s = g(!1), m = g(!1), C = g(!1), c = g(void 0), L = (a) => {
|
|
173
|
+
me.isBoolean(a) ? m.value = a : m.value = !m.value;
|
|
169
174
|
};
|
|
170
175
|
function x() {
|
|
171
176
|
var t;
|
|
172
177
|
const a = {
|
|
173
|
-
...
|
|
178
|
+
...z.generator.initMenuV4Takeaway(),
|
|
174
179
|
usedBy: [],
|
|
175
|
-
...X(
|
|
180
|
+
...X(d.initialValue ?? {})
|
|
176
181
|
};
|
|
177
|
-
return (t =
|
|
182
|
+
return (t = d.fallback) != null && t.price && (a.price = null), a;
|
|
178
183
|
}
|
|
179
|
-
const o =
|
|
184
|
+
const o = g(x()), N = V(() => d.action === "add" ? r("menu.takeaway.add") : r("menu.takeaway.update")), e = V(() => !!o.value.name), l = V(() => {
|
|
180
185
|
var E;
|
|
181
|
-
const a = [], t = "en-US", B = (E =
|
|
186
|
+
const a = [], t = "en-US", B = (E = c.value) == null ? void 0 : E[t];
|
|
182
187
|
return o.value.name && !B && a.push({
|
|
183
188
|
locale: t,
|
|
184
189
|
name: o.value.name,
|
|
185
|
-
localeDisplay:
|
|
186
|
-
}),
|
|
190
|
+
localeDisplay: P(t)
|
|
191
|
+
}), c.value && Object.entries(c.value).filter(([p, w]) => w && w.trim()).sort(([p], [w]) => p.localeCompare(w)).forEach(([p, w]) => {
|
|
187
192
|
a.push({
|
|
188
|
-
locale:
|
|
189
|
-
name:
|
|
190
|
-
localeDisplay:
|
|
193
|
+
locale: p,
|
|
194
|
+
name: w,
|
|
195
|
+
localeDisplay: P(p)
|
|
191
196
|
});
|
|
192
197
|
}), a;
|
|
193
198
|
});
|
|
194
199
|
function v(a) {
|
|
195
|
-
|
|
200
|
+
c.value = a;
|
|
196
201
|
}
|
|
197
|
-
function
|
|
202
|
+
function b(a) {
|
|
198
203
|
o.value.name = a;
|
|
199
204
|
}
|
|
200
|
-
const U =
|
|
205
|
+
const U = ne(
|
|
201
206
|
() => {
|
|
202
|
-
var
|
|
203
|
-
const a = !
|
|
207
|
+
var p;
|
|
208
|
+
const a = !le.isEqual(
|
|
204
209
|
o.value,
|
|
205
|
-
|
|
206
|
-
...
|
|
210
|
+
d.initialValue || {
|
|
211
|
+
...z.generator.initMenuV4Takeaway(),
|
|
207
212
|
usedBy: []
|
|
208
213
|
}
|
|
209
|
-
), t = ((
|
|
214
|
+
), t = ((p = d.initialValue) == null ? void 0 : p.name_locale) || {}, B = c.value || {}, E = JSON.stringify(t) !== JSON.stringify(B);
|
|
210
215
|
return a || E;
|
|
211
216
|
},
|
|
212
|
-
() =>
|
|
217
|
+
() => m.value = !1
|
|
213
218
|
);
|
|
214
|
-
function
|
|
215
|
-
const a =
|
|
216
|
-
|
|
219
|
+
function $() {
|
|
220
|
+
const a = c.value;
|
|
221
|
+
O("update:takeaway", {
|
|
217
222
|
...o.value,
|
|
218
223
|
name_locale: a
|
|
219
224
|
}), L(!1);
|
|
220
225
|
}
|
|
221
226
|
return W(
|
|
222
|
-
() =>
|
|
227
|
+
() => m.value,
|
|
223
228
|
() => {
|
|
224
229
|
var a;
|
|
225
|
-
|
|
230
|
+
m.value && (o.value = x(), c.value = (a = d.initialValue) == null ? void 0 : a.name_locale);
|
|
226
231
|
}
|
|
227
|
-
),
|
|
232
|
+
), y({
|
|
228
233
|
trigger: L,
|
|
229
|
-
show:
|
|
234
|
+
show: m
|
|
230
235
|
}), (a, t) => {
|
|
231
|
-
const B =
|
|
232
|
-
return
|
|
236
|
+
const B = T("fm-button"), E = T("FmTooltip"), p = T("fm-text-field"), w = T("fm-side-sheet");
|
|
237
|
+
return F(), q(A, null, [
|
|
233
238
|
J(a.$slots, "default", { trigger: L }),
|
|
234
|
-
|
|
239
|
+
k(w, {
|
|
235
240
|
id: "group-form",
|
|
236
|
-
modelValue:
|
|
237
|
-
"onUpdate:modelValue": t[5] || (t[5] = (
|
|
241
|
+
modelValue: m.value,
|
|
242
|
+
"onUpdate:modelValue": t[5] || (t[5] = (_) => m.value = _),
|
|
238
243
|
"is-container": i(re).FmForm,
|
|
239
244
|
"is-container-props": {
|
|
240
|
-
onValidationSuccess:
|
|
245
|
+
onValidationSuccess: $,
|
|
241
246
|
blameFormChildOnValidationFailed: !0
|
|
242
247
|
},
|
|
243
248
|
"max-width": 560,
|
|
244
249
|
"onOn:clickedAway": i(U)
|
|
245
250
|
}, {
|
|
246
|
-
"side-sheet-header":
|
|
247
|
-
|
|
251
|
+
"side-sheet-header": h(() => [
|
|
252
|
+
M("p", ve, I(N.value), 1)
|
|
248
253
|
]),
|
|
249
|
-
"side-sheet-footer":
|
|
250
|
-
|
|
251
|
-
|
|
254
|
+
"side-sheet-footer": h(() => [
|
|
255
|
+
M("div", he, [
|
|
256
|
+
k(B, {
|
|
252
257
|
label: i(ce)(i(r)(`menu.common.actions.${a.action}`)),
|
|
253
|
-
loading:
|
|
258
|
+
loading: s.value,
|
|
254
259
|
size: "lg",
|
|
255
260
|
type: "submit",
|
|
256
261
|
variant: "primary"
|
|
257
262
|
}, null, 8, ["label", "loading"]),
|
|
258
|
-
|
|
263
|
+
k(B, {
|
|
259
264
|
label: i(r)("menu.common.actions.cancel"),
|
|
260
265
|
size: "lg",
|
|
261
266
|
variant: "tertiary",
|
|
262
|
-
onClick: t[4] || (t[4] = () =>
|
|
267
|
+
onClick: t[4] || (t[4] = () => m.value = !1)
|
|
263
268
|
}, null, 8, ["label"])
|
|
264
269
|
])
|
|
265
270
|
]),
|
|
266
|
-
default:
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
default:
|
|
270
|
-
var
|
|
271
|
+
default: h(() => [
|
|
272
|
+
M("div", be, [
|
|
273
|
+
k(ie, null, {
|
|
274
|
+
default: h(() => {
|
|
275
|
+
var _;
|
|
271
276
|
return [
|
|
272
|
-
|
|
277
|
+
k(p, {
|
|
273
278
|
modelValue: o.value.name,
|
|
274
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
275
|
-
disabled: !
|
|
279
|
+
"onUpdate:modelValue": t[1] || (t[1] = (f) => o.value.name = f),
|
|
280
|
+
disabled: !D.value.name,
|
|
276
281
|
rules: [
|
|
277
|
-
(
|
|
282
|
+
(f) => !!f || i(r)("menu.common.validation.required", {
|
|
278
283
|
field: i(r)("menu.takeaway.columns.title").toLowerCase()
|
|
279
284
|
})
|
|
280
285
|
],
|
|
@@ -284,25 +289,25 @@ const ye = { class: "fm-typo-en-title-md-600" }, be = { class: "space-y-32" }, k
|
|
|
284
289
|
required: "",
|
|
285
290
|
title: i(r)("menu.takeaway.columns.title")
|
|
286
291
|
}, {
|
|
287
|
-
append:
|
|
288
|
-
|
|
292
|
+
append: h(() => [
|
|
293
|
+
k(E, {
|
|
289
294
|
variant: "plain",
|
|
290
295
|
placement: "top",
|
|
291
296
|
"z-index": 999
|
|
292
297
|
}, {
|
|
293
|
-
content:
|
|
294
|
-
|
|
295
|
-
(
|
|
296
|
-
key:
|
|
297
|
-
},
|
|
298
|
+
content: h(() => [
|
|
299
|
+
M("div", ke, [
|
|
300
|
+
(F(!0), q(A, null, te(l.value, (f) => (F(), q("div", {
|
|
301
|
+
key: f.locale
|
|
302
|
+
}, I(f.name) + " (" + I(f.localeDisplay) + ") ", 1))), 128))
|
|
298
303
|
])
|
|
299
304
|
]),
|
|
300
|
-
default:
|
|
301
|
-
|
|
305
|
+
default: h(() => [
|
|
306
|
+
k(B, {
|
|
302
307
|
variant: "tertiary",
|
|
303
308
|
icon: "g_translate",
|
|
304
|
-
onClick: t[0] || (t[0] = (
|
|
305
|
-
disabled: !e.value || !
|
|
309
|
+
onClick: t[0] || (t[0] = (f) => C.value = !0),
|
|
310
|
+
disabled: !e.value || !D.value.name
|
|
306
311
|
}, null, 8, ["disabled"])
|
|
307
312
|
]),
|
|
308
313
|
_: 1
|
|
@@ -310,12 +315,12 @@ const ye = { class: "fm-typo-en-title-md-600" }, be = { class: "space-y-32" }, k
|
|
|
310
315
|
]),
|
|
311
316
|
_: 1
|
|
312
317
|
}, 8, ["modelValue", "disabled", "rules", "label", "placeholder", "title"]),
|
|
313
|
-
|
|
318
|
+
k(ye, {
|
|
314
319
|
modelValue: o.value.price,
|
|
315
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
320
|
+
"onUpdate:modelValue": t[2] || (t[2] = (f) => o.value.price = f),
|
|
316
321
|
min: 0,
|
|
317
322
|
nullable: !!a.fallback,
|
|
318
|
-
placeholder: (
|
|
323
|
+
placeholder: (_ = a.fallback) != null && _.price ? i(de)(a.fallback.price, !1) : void 0,
|
|
319
324
|
label: i(r)("menu.takeaway.columns.price"),
|
|
320
325
|
"show-currency": "",
|
|
321
326
|
title: i(r)("menu.takeaway.columns.price")
|
|
@@ -324,10 +329,10 @@ const ye = { class: "fm-typo-en-title-md-600" }, be = { class: "space-y-32" }, k
|
|
|
324
329
|
}),
|
|
325
330
|
_: 1
|
|
326
331
|
}),
|
|
327
|
-
a.applyProduct ? (
|
|
332
|
+
a.applyProduct ? (F(), H(ue, {
|
|
328
333
|
key: 0,
|
|
329
334
|
overrides: o.value.usedBy,
|
|
330
|
-
"onUpdate:overrides": t[3] || (t[3] = (
|
|
335
|
+
"onUpdate:overrides": t[3] || (t[3] = (_) => o.value.usedBy = _),
|
|
331
336
|
"select-variant": a.bindToVariant,
|
|
332
337
|
editable: "",
|
|
333
338
|
title: i(r)("menu.common.labels.product")
|
|
@@ -336,22 +341,23 @@ const ye = { class: "fm-typo-en-title-md-600" }, be = { class: "space-y-32" }, k
|
|
|
336
341
|
]),
|
|
337
342
|
_: 1
|
|
338
343
|
}, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"]),
|
|
339
|
-
|
|
344
|
+
k(se, {
|
|
340
345
|
modelValue: C.value,
|
|
341
|
-
"onUpdate:modelValue": t[6] || (t[6] = (
|
|
346
|
+
"onUpdate:modelValue": t[6] || (t[6] = (_) => C.value = _),
|
|
342
347
|
title: i(r)("menu.takeaway.title"),
|
|
343
348
|
name: o.value.name,
|
|
344
|
-
"name-locale":
|
|
345
|
-
"onUpdate:name":
|
|
349
|
+
"name-locale": c.value,
|
|
350
|
+
"onUpdate:name": b,
|
|
346
351
|
"onUpdate:nameLocale": v
|
|
347
352
|
}, null, 8, ["modelValue", "title", "name", "name-locale"])
|
|
348
353
|
], 64);
|
|
349
354
|
};
|
|
350
355
|
}
|
|
351
|
-
}),
|
|
356
|
+
}), $e = we;
|
|
352
357
|
export {
|
|
353
|
-
|
|
354
|
-
|
|
358
|
+
$e as T,
|
|
359
|
+
ye as _,
|
|
355
360
|
we as a,
|
|
356
|
-
|
|
361
|
+
Ue as l,
|
|
362
|
+
Ne as w
|
|
357
363
|
};
|