@feedmepos/mf-menu 0.32.54-dev → 0.32.55-dev.2
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-_uZ_L5Bj.js → App-CUxpN61P.js} +5 -5
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-Dli8SXgX.js → ApplyProduct.vue_vue_type_script_setup_true_lang-Cnb9i7hd.js} +3 -3
- package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-U6Aa4RBu.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-C2F7HXQL.js} +2 -2
- package/dist/{Catalog-rve2AyBy.js → Catalog-C6PTas37.js} +6 -6
- package/dist/{Category-Di_80MXe.js → Category-BNP9UuQs.js} +4 -4
- package/dist/{Category-Dx6Iv5dA.js → Category-CbVKsY9x.js} +4 -4
- package/dist/{CookingGuide-03JjR4b3.js → CookingGuide-CrhTTXaK.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-BkpSzeX7.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-BnjQt4mF.js} +1 -1
- package/dist/{Group-DOYvyvNP.js → Group-Cs8zwohX.js} +3 -3
- package/dist/{Group-Bf0jRPu1.js → Group-D-bkPYRH.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-D13BHYJ8.js → Group.vue_vue_type_script_setup_true_lang-FW7kAQKd.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BHbSityl.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BUIjOdVJ.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CfWxf1OZ.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-C5yY5Dkx.js} +7 -7
- package/dist/{Ingredient-woydsWk1.js → Ingredient-BOQ6oSge.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-Bzgn6e5M.js → InventoryBinding.vue_vue_type_script_setup_true_lang-D7CTjrQX.js} +2 -2
- package/dist/{LinkProductSideSheet-BtBCL69w.js → LinkProductSideSheet-qCLknU3I.js} +3 -3
- package/dist/{MenuSetting-CbQ91-NJ.js → MenuSetting-Bk1IjwAf.js} +6 -6
- package/dist/{OrderPacing-CLzZpgsR.js → OrderPacing-nrhOzwqC.js} +5 -5
- package/dist/{PrintRoute-KRiyp9Kl.js → PrintRoute-BM1lD7vb.js} +4 -4
- package/dist/{Product-D3UzjY9t.js → Product-Bkr0EUvR.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-DqCAzLTO.js → Product.vue_vue_type_script_setup_true_lang-AzTv_E2s.js} +12 -12
- package/dist/{ProductInternalTools-Q_KUcji3.js → ProductInternalTools-vFBqmIwi.js} +5 -5
- package/dist/{Products-DEb5wblc.js → Products-BngkeA_d.js} +45 -45
- package/dist/{Publish-CknToYHP.js → Publish-BDR0p0C7.js} +3 -3
- package/dist/{Recipe-C_b8VZgp.js → Recipe-BU6DqVBj.js} +4 -4
- package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-_aZHbTtg.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-BOobVOwv.js} +1 -1
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-CyTH_at9.js → RuleView.vue_vue_type_script_setup_true_lang-CFpe4Iir.js} +207 -207
- package/dist/{Scheduler-PzqfgLBJ.js → Scheduler-BdrdzqH-.js} +3 -3
- package/dist/{ServingSequence-Bxk1S39y.js → ServingSequence-BBUhxb1a.js} +3 -3
- package/dist/{Setting-CO2sP1z2.js → Setting-4WA4XJ3E.js} +5 -5
- package/dist/{Subcategory-5MLdVGr-.js → Subcategory-WET--Di_.js} +5 -5
- package/dist/{Takeaway-CflkNfbT.js → Takeaway-BN8uzwh3.js} +4 -4
- package/dist/{Takeaway-Ctbpomn2.js → Takeaway-CTqJRcps.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BH-1yxKn.js → Takeaway.vue_vue_type_script_setup_true_lang-BvAXnVNf.js} +5 -5
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-B7Nq3IJ1.js → Thumbnail.vue_vue_type_script_setup_true_lang-CvfB2iZM.js} +4 -4
- package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-C_xhyVnX.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-DtLnmZ8B.js} +1 -1
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-B5-Ab7yn.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-CPd-Zjws.js} +2 -2
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CXJT2-tC.js +5940 -0
- package/dist/{Unit-BO-xI_h8.js → Unit-BuuxETQO.js} +2 -2
- package/dist/{Variant-D8CO6krd.js → Variant-BxxvGlMT.js} +3 -3
- package/dist/{_id_-C6UOR3cy.js → _id_-AZAVb9x_.js} +9 -9
- package/dist/{app-BNSww5M4.js → app-BdJnGBwv.js} +139 -139
- package/dist/{app-CfxU4t_L.js → app-BrbwUqdU.js} +1 -1
- 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/Fields/currencySymbol.d.ts +7 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-CddGEfc5.js → linked-status-B-Rl1diH.js} +2 -2
- package/dist/assets/{menu-export-DN0u3z_7.js → menu-export-Dd4iJoCx.js} +2 -2
- package/dist/assets/{override-menu-DG2Z1XPH.js → override-menu-DdjEA-4p.js} +2 -2
- package/dist/assets/{validate-menu-DDEraWh4.js → validate-menu-D3A5C308.js} +2 -2
- package/dist/{catalog-B8cFusU-.js → catalog-3xncYAFx.js} +1 -1
- package/dist/{catalogSetting-hSXLLFjE.js → catalogSetting-DwgGp-Q4.js} +1 -1
- package/dist/{currency-evm4Kufz.js → currency-CzUDPPUv.js} +1 -1
- package/dist/{dayjs.min-DKkIcWKQ.js → dayjs.min-Bdj5ZtP1.js} +2 -2
- package/dist/{index-r-T_x-og.js → index-C2JiJ3sF.js} +4 -4
- package/dist/index-CvWzypxM.js +357 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-H0pKxrKD.js → index.vue_vue_type_script_setup_true_lang-lnHttflC.js} +5 -5
- package/dist/{item-CiGZwVCJ.js → item-DGe5pdOK.js} +2359 -2344
- package/dist/{jszip.min-CTld7lET.js → jszip.min-BkjnmqkP.js} +3 -3
- package/dist/{memberPricing-Bh1SOfnP.js → memberPricing-8Rn67mUQ.js} +1 -1
- package/dist/{menu-l0HseABF.js → menu-CPMmBzMw.js} +1 -1
- package/dist/{menuV2-CmL0MaZU.js → menuV2-BAWKdUqF.js} +53 -53
- package/dist/mf-menu.css +1 -1
- package/dist/{order_pacing-BP0_MGpd.js → order_pacing-Bf1bv6x3.js} +5 -5
- package/dist/{priceTier-W5k8zWVc.js → priceTier-Er6JH5X4.js} +1 -1
- package/dist/{rules-D2vbYzGl.js → rules-DwvGpoGj.js} +3 -3
- package/dist/{scheduler-6526OHxm.js → scheduler-B3PokqlS.js} +4 -4
- package/dist/{toExcel-DCUF2hIQ.js → toExcel-BlwgaARe.js} +2 -2
- package/dist/{unit-CA0Ctbtn.js → unit-DNF8MsPj.js} +2 -2
- package/package.json +1 -1
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Dm_wi_uJ.js +0 -5926
- package/dist/index-DF-RLnW4.js +0 -340
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as p, y as d, U as n, J as g, K as m, as as f } from "./index.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { u as p, y as d, U as n, J as g, K as m, as as f } from "./index.vue_vue_type_script_setup_true_lang-lnHttflC.js";
|
|
2
2
|
import "@feedmepos/ui-library";
|
|
3
3
|
class u {
|
|
4
4
|
constructor(t, e, r, a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as u, G as s } from "./index.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { U as u, G as s } from "./index.vue_vue_type_script_setup_true_lang-lnHttflC.js";
|
|
2
2
|
var n = /* @__PURE__ */ ((e) => (e.AUTO = "auto", e.MANUAL = "manual", e))(n || {}), m = /* @__PURE__ */ ((e) => (e[e.Normal = 0] = "Normal", e[e.Rules = 1] = "Rules", e))(m || {});
|
|
3
3
|
class i {
|
|
4
4
|
static fromCatalog(r, a) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as r } from "./app-
|
|
2
|
-
import { at as a } from "./index.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { g as r } from "./app-BdJnGBwv.js";
|
|
2
|
+
import { at as a } from "./index.vue_vue_type_script_setup_true_lang-lnHttflC.js";
|
|
3
3
|
var o = a();
|
|
4
4
|
const m = /* @__PURE__ */ r(o);
|
|
5
5
|
export {
|
|
@@ -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 m, 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 { H as E, P as re, B as ue, G as D, A as W, J as X, K as Z } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { H as E, P as re, B as ue, G as D, A as W, J as X, K as Z } from "./index.vue_vue_type_script_setup_true_lang-lnHttflC.js";
|
|
3
3
|
import { d as de } from "./vuedraggable-CK8z7qA8.js";
|
|
4
4
|
import { useI18n as te } from "@feedmepos/mf-common";
|
|
5
5
|
import { useSnackbar as ce, components as me } from "@feedmepos/ui-library";
|
|
6
6
|
import { _ as ve } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
7
|
-
import { _ as pe } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
7
|
+
import { _ as pe } from "./RuleView.vue_vue_type_script_setup_true_lang-CFpe4Iir.js";
|
|
8
8
|
import { u as oe } from "./discardConfirm-BHni0LNu.js";
|
|
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-
|
|
9
|
+
import { _ as fe } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-Cnb9i7hd.js";
|
|
10
|
+
import { _ as _e, a as ee, b as ae, c as ne } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-DtLnmZ8B.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,
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
import { z as I, K as Z, u as Q, G as X, A, H as ee } from "./index.vue_vue_type_script_setup_true_lang-lnHttflC.js";
|
|
2
|
+
import { defineComponent as H, computed as g, ref as _, watch as P, onMounted as ae, onBeforeUnmount as te, resolveComponent as N, createBlock as W, openBlock as D, withModifiers as K, withCtx as k, renderSlot as J, createElementBlock as q, createCommentVNode as G, toDisplayString as O, Fragment as j, createVNode as b, unref as i, createElementVNode as $, renderList as le } from "vue";
|
|
3
|
+
import { useCoreStore as ne, useI18n as Y } from "@feedmepos/mf-common";
|
|
4
|
+
import { components as oe } from "@feedmepos/ui-library";
|
|
5
|
+
import { _ as re } from "./RuleView.vue_vue_type_script_setup_true_lang-CFpe4Iir.js";
|
|
6
|
+
import { u as ie } from "./discardConfirm-BHni0LNu.js";
|
|
7
|
+
import { _ as ue } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-Cnb9i7hd.js";
|
|
8
|
+
import { _ as se } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-CPd-Zjws.js";
|
|
9
|
+
import { c as me } from "./check-C9mY6LiX.js";
|
|
10
|
+
import { f as de } from "./currency-CzUDPPUv.js";
|
|
11
|
+
import { c as ce } from "./string-DpfFixWH.js";
|
|
12
|
+
import { g as R } from "./translation-fNx6yEpy.js";
|
|
13
|
+
function pe({
|
|
14
|
+
showCurrency: V,
|
|
15
|
+
country: f
|
|
16
|
+
}) {
|
|
17
|
+
if (!V) return "";
|
|
18
|
+
if (!f) return "$";
|
|
19
|
+
try {
|
|
20
|
+
return I.Country.getCountry(f).currency.symbol || "$";
|
|
21
|
+
} catch {
|
|
22
|
+
return "$";
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const fe = { key: 0 }, ve = /* @__PURE__ */ H({
|
|
26
|
+
__name: "CurrencyInput",
|
|
27
|
+
props: {
|
|
28
|
+
modelValue: {},
|
|
29
|
+
label: {},
|
|
30
|
+
placeholder: {},
|
|
31
|
+
nullable: { type: Boolean },
|
|
32
|
+
showCurrency: { type: Boolean },
|
|
33
|
+
min: {},
|
|
34
|
+
max: {},
|
|
35
|
+
required: { type: [Boolean, String] },
|
|
36
|
+
rules: {},
|
|
37
|
+
disable: { type: Boolean },
|
|
38
|
+
minLength: {},
|
|
39
|
+
maxLength: {},
|
|
40
|
+
inputmode: {},
|
|
41
|
+
type: {},
|
|
42
|
+
readonly: { type: Boolean },
|
|
43
|
+
labelMark: {},
|
|
44
|
+
prependIcon: {},
|
|
45
|
+
appendIcon: {},
|
|
46
|
+
showValidBorder: { type: Boolean },
|
|
47
|
+
labelInfo: {},
|
|
48
|
+
showWordCount: { type: Boolean },
|
|
49
|
+
invalid: { type: Boolean },
|
|
50
|
+
autofocus: { type: Boolean },
|
|
51
|
+
formatter: { type: Function },
|
|
52
|
+
decimal: {},
|
|
53
|
+
datalist: {},
|
|
54
|
+
shiftDatalist: { type: Boolean },
|
|
55
|
+
datalistMaxHeight: {},
|
|
56
|
+
datalistMinHeight: {},
|
|
57
|
+
offsetDatalist: {},
|
|
58
|
+
datalistPlacement: {},
|
|
59
|
+
datalistZIndex: {},
|
|
60
|
+
datalistWidth: {},
|
|
61
|
+
disabled: { type: Boolean },
|
|
62
|
+
focused: { type: Boolean },
|
|
63
|
+
helperText: {},
|
|
64
|
+
helperState: {}
|
|
65
|
+
},
|
|
66
|
+
emits: ["update:model-value"],
|
|
67
|
+
setup(V, { emit: f }) {
|
|
68
|
+
const l = V, r = ne(), { t: m } = Y(), z = g(() => pe({
|
|
69
|
+
showCurrency: l.showCurrency,
|
|
70
|
+
country: r.currentCountry.value
|
|
71
|
+
})), F = _(!1), S = _(!1), u = _(), s = g(() => l.modelValue ? I.Dinero.fromFdoDinero(l.modelValue).toUnit().toFixed(2) : "");
|
|
72
|
+
P(
|
|
73
|
+
() => S.value,
|
|
74
|
+
(e) => {
|
|
75
|
+
var n, v, y, U, M;
|
|
76
|
+
e ? (F.value || (F.value = !0), (v = (n = u.value) == null ? void 0 : n.inputEl) == null || v.select()) : (F.value = !1, (y = u.value) != null && y.inputEl && x((M = (U = u.value) == null ? void 0 : U.inputEl) == null ? void 0 : M.value));
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
const C = f, d = g(() => typeof l.required == "string" ? l.required : m("menu.common.validation.field_required", {
|
|
80
|
+
field: l.label ?? m("menu.currency.input.field")
|
|
81
|
+
})), L = [
|
|
82
|
+
(e) => l.required ? !!e || d.value : !0,
|
|
83
|
+
(e) => l.min !== void 0 && e && parseFloat(e.toString()) < l.min ? m("menu.common.validation.min_value", { value: l.min }) : !0,
|
|
84
|
+
(e) => l.max !== void 0 && e && parseFloat(e.toString()) > l.max ? m("menu.common.validation.max_value", { value: l.max }) : !0,
|
|
85
|
+
...l.rules ?? []
|
|
86
|
+
];
|
|
87
|
+
function x(e) {
|
|
88
|
+
if (typeof e != "number" && !e && l.nullable)
|
|
89
|
+
C("update:model-value", void 0);
|
|
90
|
+
else {
|
|
91
|
+
if (typeof e == "string" && e === "-")
|
|
92
|
+
return;
|
|
93
|
+
let n = parseFloat((e || "").toString());
|
|
94
|
+
n = Number.isNaN(n) ? 0 : n, C("update:model-value", I.Dinero.fromNumber({ number: n }).toObject());
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
const o = g(() => typeof l.min == "number" && l.min >= 0), T = (e) => {
|
|
98
|
+
var n, v, y;
|
|
99
|
+
if (!(e.ctrlKey || e.metaKey)) {
|
|
100
|
+
if (e.key === "Enter") {
|
|
101
|
+
(n = u.value) != null && n.inputEl && x((y = (v = u.value) == null ? void 0 : v.inputEl) == null ? void 0 : y.value);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
if (e.key === "-" && o.value) {
|
|
105
|
+
e.preventDefault();
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
e.key >= "0" && e.key <= "9" || e.key === "." || e.key === "," || e.key === "-" || e.key === "Backspace" || e.key === "ArrowLeft" || e.key === "ArrowRight" || e.key === "Tab" || e.preventDefault();
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
return ae(() => {
|
|
112
|
+
var e;
|
|
113
|
+
u.value && ((e = u.value.inputEl) == null || e.addEventListener("keydown", T));
|
|
114
|
+
}), te(() => {
|
|
115
|
+
var e;
|
|
116
|
+
u.value && ((e = u.value.inputEl) == null || e.removeEventListener("keydown", T));
|
|
117
|
+
}), (e, n) => {
|
|
118
|
+
const v = N("fm-text-field");
|
|
119
|
+
return D(), W(v, {
|
|
120
|
+
ref_key: "inputRef",
|
|
121
|
+
ref: u,
|
|
122
|
+
autofocus: l.autofocus,
|
|
123
|
+
disabled: l.disable,
|
|
124
|
+
label: e.label,
|
|
125
|
+
"model-value": s.value,
|
|
126
|
+
placeholder: l.placeholder,
|
|
127
|
+
rules: L,
|
|
128
|
+
inputmode: "decimal",
|
|
129
|
+
onFocusChanged: n[0] || (n[0] = (y) => S.value = y),
|
|
130
|
+
onWheel: n[1] || (n[1] = K(() => {
|
|
131
|
+
}, ["prevent"])),
|
|
132
|
+
onTouchmove: n[2] || (n[2] = K(() => {
|
|
133
|
+
}, ["prevent"])),
|
|
134
|
+
onScroll: n[3] || (n[3] = K(() => {
|
|
135
|
+
}, ["prevent"]))
|
|
136
|
+
}, {
|
|
137
|
+
prepend: k(() => [
|
|
138
|
+
e.showCurrency ? (D(), q("span", fe, O(z.value), 1)) : G("", !0)
|
|
139
|
+
]),
|
|
140
|
+
append: k(() => [
|
|
141
|
+
J(e.$slots, "append")
|
|
142
|
+
]),
|
|
143
|
+
_: 3
|
|
144
|
+
}, 8, ["autofocus", "disabled", "label", "model-value", "placeholder"]);
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
function Te(V) {
|
|
149
|
+
return V.map((f) => ({
|
|
150
|
+
module: Z.enum.item,
|
|
151
|
+
id: f._id,
|
|
152
|
+
discriminator: f.combinationKey,
|
|
153
|
+
data: void 0
|
|
154
|
+
}));
|
|
155
|
+
}
|
|
156
|
+
const ye = { 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__ */ H({
|
|
157
|
+
__name: "Form",
|
|
158
|
+
props: {
|
|
159
|
+
action: {},
|
|
160
|
+
initialValue: {},
|
|
161
|
+
fallback: {},
|
|
162
|
+
applyProduct: { type: Boolean },
|
|
163
|
+
bindToVariant: { type: Boolean }
|
|
164
|
+
},
|
|
165
|
+
emits: ["update:takeaway"],
|
|
166
|
+
setup(V, { expose: f, emit: l }) {
|
|
167
|
+
const { t: r } = Y(), m = V, z = l, F = Q(), S = g(() => F.rules.takeaway), u = _(!1), s = _(!1), C = _(!1), d = _(void 0), L = (a) => {
|
|
168
|
+
me.isBoolean(a) ? s.value = a : s.value = !s.value;
|
|
169
|
+
};
|
|
170
|
+
function x() {
|
|
171
|
+
var t;
|
|
172
|
+
const a = {
|
|
173
|
+
...A.generator.initMenuV4Takeaway(),
|
|
174
|
+
usedBy: [],
|
|
175
|
+
...X(m.initialValue ?? {})
|
|
176
|
+
};
|
|
177
|
+
return (t = m.fallback) != null && t.price && (a.price = I.Dinero.zero().toObject()), a;
|
|
178
|
+
}
|
|
179
|
+
const o = _(x()), T = g(() => m.action === "add" ? r("menu.takeaway.add") : r("menu.takeaway.update")), e = g(() => !!o.value.name), n = g(() => {
|
|
180
|
+
var E;
|
|
181
|
+
const a = [], t = "en-US", B = (E = d.value) == null ? void 0 : E[t];
|
|
182
|
+
return o.value.name && !B && a.push({
|
|
183
|
+
locale: t,
|
|
184
|
+
name: o.value.name,
|
|
185
|
+
localeDisplay: R(t)
|
|
186
|
+
}), d.value && Object.entries(d.value).filter(([c, h]) => h && h.trim()).sort(([c], [h]) => c.localeCompare(h)).forEach(([c, h]) => {
|
|
187
|
+
a.push({
|
|
188
|
+
locale: c,
|
|
189
|
+
name: h,
|
|
190
|
+
localeDisplay: R(c)
|
|
191
|
+
});
|
|
192
|
+
}), a;
|
|
193
|
+
});
|
|
194
|
+
function v(a) {
|
|
195
|
+
d.value = a;
|
|
196
|
+
}
|
|
197
|
+
function y(a) {
|
|
198
|
+
o.value.name = a;
|
|
199
|
+
}
|
|
200
|
+
const U = ie(
|
|
201
|
+
() => {
|
|
202
|
+
var c;
|
|
203
|
+
const a = !ee.isEqual(
|
|
204
|
+
o.value,
|
|
205
|
+
m.initialValue || {
|
|
206
|
+
...A.generator.initMenuV4Takeaway(),
|
|
207
|
+
usedBy: []
|
|
208
|
+
}
|
|
209
|
+
), t = ((c = m.initialValue) == null ? void 0 : c.name_locale) || {}, B = d.value || {}, E = JSON.stringify(t) !== JSON.stringify(B);
|
|
210
|
+
return a || E;
|
|
211
|
+
},
|
|
212
|
+
() => s.value = !1
|
|
213
|
+
);
|
|
214
|
+
function M() {
|
|
215
|
+
const a = d.value;
|
|
216
|
+
z("update:takeaway", {
|
|
217
|
+
...o.value,
|
|
218
|
+
name_locale: a
|
|
219
|
+
}), L(!1);
|
|
220
|
+
}
|
|
221
|
+
return P(
|
|
222
|
+
() => s.value,
|
|
223
|
+
() => {
|
|
224
|
+
var a;
|
|
225
|
+
s.value && (o.value = x(), d.value = (a = m.initialValue) == null ? void 0 : a.name_locale);
|
|
226
|
+
}
|
|
227
|
+
), f({
|
|
228
|
+
trigger: L,
|
|
229
|
+
show: s
|
|
230
|
+
}), (a, t) => {
|
|
231
|
+
const B = N("fm-button"), E = N("FmTooltip"), c = N("fm-text-field"), h = N("fm-side-sheet");
|
|
232
|
+
return D(), q(j, null, [
|
|
233
|
+
J(a.$slots, "default", { trigger: L }),
|
|
234
|
+
b(h, {
|
|
235
|
+
id: "group-form",
|
|
236
|
+
modelValue: s.value,
|
|
237
|
+
"onUpdate:modelValue": t[5] || (t[5] = (w) => s.value = w),
|
|
238
|
+
"is-container": i(oe).FmForm,
|
|
239
|
+
"is-container-props": {
|
|
240
|
+
onValidationSuccess: M,
|
|
241
|
+
blameFormChildOnValidationFailed: !0
|
|
242
|
+
},
|
|
243
|
+
"max-width": 560,
|
|
244
|
+
"onOn:clickedAway": i(U)
|
|
245
|
+
}, {
|
|
246
|
+
"side-sheet-header": k(() => [
|
|
247
|
+
$("p", ye, O(T.value), 1)
|
|
248
|
+
]),
|
|
249
|
+
"side-sheet-footer": k(() => [
|
|
250
|
+
$("div", he, [
|
|
251
|
+
b(B, {
|
|
252
|
+
label: i(ce)(i(r)(`menu.common.actions.${a.action}`)),
|
|
253
|
+
loading: u.value,
|
|
254
|
+
size: "lg",
|
|
255
|
+
type: "submit",
|
|
256
|
+
variant: "primary"
|
|
257
|
+
}, null, 8, ["label", "loading"]),
|
|
258
|
+
b(B, {
|
|
259
|
+
label: i(r)("menu.common.actions.cancel"),
|
|
260
|
+
size: "lg",
|
|
261
|
+
variant: "tertiary",
|
|
262
|
+
onClick: t[4] || (t[4] = () => s.value = !1)
|
|
263
|
+
}, null, 8, ["label"])
|
|
264
|
+
])
|
|
265
|
+
]),
|
|
266
|
+
default: k(() => [
|
|
267
|
+
$("div", be, [
|
|
268
|
+
b(re, null, {
|
|
269
|
+
default: k(() => {
|
|
270
|
+
var w;
|
|
271
|
+
return [
|
|
272
|
+
b(c, {
|
|
273
|
+
modelValue: o.value.name,
|
|
274
|
+
"onUpdate:modelValue": t[1] || (t[1] = (p) => o.value.name = p),
|
|
275
|
+
disabled: !S.value.name,
|
|
276
|
+
rules: [
|
|
277
|
+
(p) => !!p || i(r)("menu.common.validation.required", {
|
|
278
|
+
field: i(r)("menu.takeaway.columns.title").toLowerCase()
|
|
279
|
+
})
|
|
280
|
+
],
|
|
281
|
+
autofocus: "",
|
|
282
|
+
label: i(r)("menu.takeaway.columns.title"),
|
|
283
|
+
placeholder: i(r)("menu.takeaway.placeholders.title"),
|
|
284
|
+
required: "",
|
|
285
|
+
title: i(r)("menu.takeaway.columns.title")
|
|
286
|
+
}, {
|
|
287
|
+
append: k(() => [
|
|
288
|
+
b(E, {
|
|
289
|
+
variant: "plain",
|
|
290
|
+
placement: "top",
|
|
291
|
+
"z-index": 999
|
|
292
|
+
}, {
|
|
293
|
+
content: k(() => [
|
|
294
|
+
$("div", ke, [
|
|
295
|
+
(D(!0), q(j, null, le(n.value, (p) => (D(), q("div", {
|
|
296
|
+
key: p.locale
|
|
297
|
+
}, O(p.name) + " (" + O(p.localeDisplay) + ") ", 1))), 128))
|
|
298
|
+
])
|
|
299
|
+
]),
|
|
300
|
+
default: k(() => [
|
|
301
|
+
b(B, {
|
|
302
|
+
variant: "tertiary",
|
|
303
|
+
icon: "g_translate",
|
|
304
|
+
onClick: t[0] || (t[0] = (p) => C.value = !0),
|
|
305
|
+
disabled: !e.value || !S.value.name
|
|
306
|
+
}, null, 8, ["disabled"])
|
|
307
|
+
]),
|
|
308
|
+
_: 1
|
|
309
|
+
})
|
|
310
|
+
]),
|
|
311
|
+
_: 1
|
|
312
|
+
}, 8, ["modelValue", "disabled", "rules", "label", "placeholder", "title"]),
|
|
313
|
+
b(ve, {
|
|
314
|
+
modelValue: o.value.price,
|
|
315
|
+
"onUpdate:modelValue": t[2] || (t[2] = (p) => o.value.price = p),
|
|
316
|
+
min: 0,
|
|
317
|
+
nullable: !!a.fallback,
|
|
318
|
+
placeholder: (w = a.fallback) != null && w.price ? i(de)(a.fallback.price, !1) : void 0,
|
|
319
|
+
label: i(r)("menu.takeaway.columns.price"),
|
|
320
|
+
"show-currency": "",
|
|
321
|
+
title: i(r)("menu.takeaway.columns.price")
|
|
322
|
+
}, null, 8, ["modelValue", "nullable", "placeholder", "label", "title"])
|
|
323
|
+
];
|
|
324
|
+
}),
|
|
325
|
+
_: 1
|
|
326
|
+
}),
|
|
327
|
+
a.applyProduct ? (D(), W(ue, {
|
|
328
|
+
key: 0,
|
|
329
|
+
overrides: o.value.usedBy,
|
|
330
|
+
"onUpdate:overrides": t[3] || (t[3] = (w) => o.value.usedBy = w),
|
|
331
|
+
"select-variant": a.bindToVariant,
|
|
332
|
+
editable: "",
|
|
333
|
+
title: i(r)("menu.common.labels.product")
|
|
334
|
+
}, null, 8, ["overrides", "select-variant", "title"])) : G("", !0)
|
|
335
|
+
])
|
|
336
|
+
]),
|
|
337
|
+
_: 1
|
|
338
|
+
}, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"]),
|
|
339
|
+
b(se, {
|
|
340
|
+
modelValue: C.value,
|
|
341
|
+
"onUpdate:modelValue": t[6] || (t[6] = (w) => C.value = w),
|
|
342
|
+
title: i(r)("menu.takeaway.title"),
|
|
343
|
+
name: o.value.name,
|
|
344
|
+
"name-locale": d.value,
|
|
345
|
+
"onUpdate:name": y,
|
|
346
|
+
"onUpdate:nameLocale": v
|
|
347
|
+
}, null, 8, ["modelValue", "title", "name", "name-locale"])
|
|
348
|
+
], 64);
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
}), Ue = we;
|
|
352
|
+
export {
|
|
353
|
+
Ue as T,
|
|
354
|
+
ve as _,
|
|
355
|
+
we as a,
|
|
356
|
+
Te as l
|
|
357
|
+
};
|