@feedmepos/mf-menu 0.31.74 → 0.31.75-prod
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-B6Hn5Wwr.js → App-Cw2D3IXT.js} +528 -585
- package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-CFtcqy58.js +161 -0
- package/dist/BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-CnCoRLDg.js +74 -0
- package/dist/{Catalog-D-2hDU2I.js → Catalog-B5kAKdVW.js} +9 -9
- package/dist/{Category-hSOIgBkH.js → Category-CAd9BTRX.js} +8 -8
- package/dist/{Category-DjTbuAvE.js → Category-DKjU47aW.js} +5 -5
- package/dist/{CookingGuide-D7ruB7eP.js → CookingGuide-BN739JkB.js} +7 -7
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-mxVSGXAz.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-gii2CTYD.js} +3 -3
- package/dist/{Group-evJZbgZn.js → Group-DmII5Nwf.js} +4 -4
- package/dist/{Group-CjlhbhDV.js → Group-DnpVxZkN.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-DiKraPiw.js → Group.vue_vue_type_script_setup_true_lang-BEeCwmKt.js} +163 -163
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BYku8MAc.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DB5B3PLx.js} +90 -90
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DScxctPb.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-BEISm7uc.js} +3046 -3046
- package/dist/{Ingredient-jNDx1pUw.js → Ingredient-CpuyDF4n.js} +30 -30
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CuM_k-C3.js → InventoryBinding.vue_vue_type_script_setup_true_lang-GHiwD8VV.js} +1112 -1112
- package/dist/{LinkProductSideSheet-CAPIdf6P.js → LinkProductSideSheet-DrSKOBLg.js} +129 -129
- package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-Bm_hSelC.js +69 -0
- package/dist/{MenuSetting-C2MDgy57.js → MenuSetting-BNuIUnjz.js} +138 -138
- package/dist/{PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js → PageLayout.vue_vue_type_script_setup_true_lang-vFqWGM6P.js} +8 -8
- package/dist/{PrintRoute-SmWbKr9Y.js → PrintRoute-Dl0oWYju.js} +6 -6
- package/dist/{Product-BCm49V9T.js → Product-IQBP1vvY.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-CTOjLqbF.js → Product.vue_vue_type_script_setup_true_lang-Bdss6VRj.js} +607 -607
- package/dist/{ProductInternalTools-DGsvvnIs.js → ProductInternalTools-Dkhbg1WE.js} +11 -11
- package/dist/{Products-D4qeSEfO.js → Products-Dcafs3Lk.js} +59 -59
- package/dist/{Publish-3A3EEQ9x.js → Publish-BTuO4AlR.js} +6 -6
- package/dist/{Recipe-CS7TZGA6.js → Recipe-Dx2ZkHsk.js} +6 -6
- package/dist/{Scheduler-BIwTUJMJ.js → Scheduler-Dh_0J2g9.js} +5 -5
- package/dist/{ServingSequence-C0N8wJfr.js → ServingSequence-DXhx9dcu.js} +5 -5
- package/dist/{Setting-fA6tvQK2.js → Setting-4x_w46t_.js} +5 -5
- package/dist/{Subcategory-BAFAmflQ.js → Subcategory-vztBpQnB.js} +6 -6
- package/dist/{Takeaway-D4aO8zzN.js → Takeaway-CDgIyUrN.js} +5 -5
- package/dist/{Takeaway-CLZouw1j.js → Takeaway-Dz5PxJk_.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-1oN-i9bo.js → Takeaway.vue_vue_type_script_setup_true_lang-BMMXiDFL.js} +6 -6
- package/dist/{TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js → TextChip.vue_vue_type_script_setup_true_lang-BJMcI3U2.js} +5 -5
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-Dwol_Lkd.js → Thumbnail.vue_vue_type_script_setup_true_lang-DJ8JMV28.js} +74 -74
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-cTzWxjM4.js +5996 -0
- package/dist/{Unit-ByqUb4Po.js → Unit-z7OVmlSq.js} +4 -4
- package/dist/{Variant-BmqrUfen.js → Variant-CFRgvlXf.js} +5 -5
- package/dist/{_id_-RUWzOB0B.js → _id_-B9q3j4_m.js} +11 -11
- package/dist/{app-B1N2F0j8.js → app-CdsS_tMb.js} +1 -1
- package/dist/app-CkCBPor3.js +363 -0
- package/dist/{app-5fxKLAzS.js → app-CzXxFrl1.js} +447 -447
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +0 -1
- package/dist/apps/mf-menu/src/components/feature/CategoryManager/CategoriesSelector.vue.d.ts +1 -1
- package/dist/apps/mf-menu/src/components/feature/MenuSelector.vue.d.ts +1 -1
- package/dist/apps/mf-menu/src/components/feature/SubcategoryManager/SubcategorySelector.vue.d.ts +1 -1
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/linked-status-B8qYyYR6.js +13 -0
- package/dist/assets/override-menu-nmSTTTn7.js +13 -0
- package/dist/assets/validate-menu-CF1XZECU.js +13 -0
- package/dist/{catalog-CarmtheV.js → catalog-DBBEUpMo.js} +1 -1
- package/dist/{catalogSetting-BqrTpBP8.js → catalogSetting-DKvBjleU.js} +1 -1
- package/dist/{category-5R83ypNS.js → category-DILExwHL.js} +1 -1
- package/dist/{currency-CUl4r9rT.js → currency-B7Xm1xZJ.js} +1 -1
- package/dist/customAttributes-DrA0YC82.js +180 -0
- package/dist/{index-Ttqt4iFV.js → index-2lrKSO_O.js} +20 -20
- package/dist/{index-DlwLw-BQ.js → index-BoVEGKz7.js} +91 -91
- package/dist/{index-DAWSNP3G.js → index-Bu5LuO1j.js} +4 -4
- package/dist/{index-DUfYYdZ-.js → index-SNNvjtFa.js} +56 -56
- package/dist/{index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js → index.vue_vue_type_script_setup_true_lang-B1_JqsYF.js} +16 -16
- package/dist/{item-B0UPYxsB.js → item-BnOnvN8x.js} +3091 -3174
- package/dist/{iteration-CfmAZiOO.js → iteration-Csz_aSxy.js} +3 -3
- package/dist/{jszip.min-zROpry0S.js → jszip.min-B0T3I-lE.js} +329 -329
- package/dist/{menu-DAac726D.js → menu-3XEn1C9F.js} +6402 -6332
- package/dist/{menu-DpYo8dYR.js → menu-DzbYSPGP.js} +1 -1
- package/dist/{menuV2-DZj_FPqR.js → menuV2-cXg54GYW.js} +93 -93
- package/dist/mf-menu.css +1 -1
- package/dist/packages/shared/src/components/form/SelectFilter.vue.d.ts +1 -1
- package/dist/{priceTier-BvDLl8v2.js → priceTier-DVd27LFd.js} +1 -1
- package/dist/{scheduler-pNUXG6En.js → scheduler-D8IgBrUX.js} +6 -6
- package/dist/{subcategory-DCDCQnAX.js → subcategory-BOpm3s8K.js} +2 -2
- package/dist/{toExcel-DqMa1Hn8.js → toExcel-BJM3fOB2.js} +2 -2
- package/dist/{unit-CuCXoWPG.js → unit-DF9d3piP.js} +151 -151
- package/dist/{vuedraggable-CK8z7qA8.js → vuedraggable-DnBIRDMr.js} +2 -2
- package/package.json +5 -5
- package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-CqGU3bJQ.js +0 -161
- package/dist/BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js +0 -74
- package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js +0 -69
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CabQS55D.js +0 -6012
- package/dist/app-CHpw_EM1.js +0 -2101
- package/dist/apps/mf-menu/src/components/feature/RemyButton.vue.d.ts +0 -15
- package/dist/apps/mf-menu/src/components/feature/RemyDialog.vue.d.ts +0 -15
- package/dist/apps/mf-menu/src/helper/remy.d.ts +0 -5
- package/dist/assets/linked-status-CFdi7K3K.js +0 -13
- package/dist/assets/override-menu-CXOY8i3w.js +0 -13
- package/dist/assets/validate-menu-DLlrsx2f.js +0 -13
- package/dist/customAttributes-BkqKM_KW.js +0 -180
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as be, ref as g, computed as A, watch as ve, resolveComponent as I, createElementBlock as S, openBlock as v, Fragment as
|
|
2
|
-
import { H as F, Q as ye, u as q, z as Ae, I as J } from "./menu-
|
|
3
|
-
import { b as U } from "./app-
|
|
1
|
+
import { defineComponent as be, ref as g, computed as A, watch as ve, resolveComponent as I, createElementBlock as S, openBlock as v, Fragment as L, renderSlot as _e, createVNode as u, unref as l, withCtx as p, createBlock as M, createCommentVNode as T, createElementVNode as _, toDisplayString as Y, renderList as Re } from "vue";
|
|
2
|
+
import { H as F, Q as ye, u as q, z as Ae, I as J } from "./menu-3XEn1C9F.js";
|
|
3
|
+
import { b as U } from "./app-CzXxFrl1.js";
|
|
4
4
|
import { useI18n as ke, useCustomAttributes as K, useCoreStore as Ce, ItemSelector as he, EMPTY_RULE as B, isEmptyRule as W } from "@feedmepos/mf-common";
|
|
5
5
|
import { components as Ve, FmButtonVariant as X } from "@feedmepos/ui-library";
|
|
6
|
-
import { c as ge, u as Ie, a as h, m as O, f as E } from "./customAttributes-
|
|
6
|
+
import { c as ge, u as Ie, a as h, m as O, f as E } from "./customAttributes-DrA0YC82.js";
|
|
7
7
|
import { u as Se } from "./discardConfirm-BHni0LNu.js";
|
|
8
|
-
import { u as we } from "./menuV2-
|
|
8
|
+
import { u as we } from "./menuV2-cXg54GYW.js";
|
|
9
9
|
import { c as Fe } from "./check-C9mY6LiX.js";
|
|
10
10
|
/* empty css */
|
|
11
|
-
const Ue = (
|
|
12
|
-
const
|
|
13
|
-
for (const [w,
|
|
14
|
-
|
|
15
|
-
return
|
|
11
|
+
const Ue = (s, N) => {
|
|
12
|
+
const o = s.__vccOpts || s;
|
|
13
|
+
for (const [w, m] of N)
|
|
14
|
+
o[w] = m;
|
|
15
|
+
return o;
|
|
16
16
|
};
|
|
17
|
-
var
|
|
17
|
+
var c = /* @__PURE__ */ ((s) => (s[s.Normal = 0] = "Normal", s[s.Rules = 1] = "Rules", s))(c || {});
|
|
18
18
|
const Be = { class: "fm-typo-en-title-md-600 mr-auto" }, Oe = {
|
|
19
19
|
key: 1,
|
|
20
20
|
class: "flex items-center gap-12"
|
|
21
|
-
}, Ee = { class: "flex items-center gap-8" }, Ne = { class: "text-neutral-600 fm-typo-body-sm" },
|
|
21
|
+
}, Ee = { class: "flex items-center gap-8" }, Ne = { class: "text-neutral-600 fm-typo-body-sm" }, xe = { class: "grid md:grid-cols-3 gap-16" }, Le = { class: "md:col-span-2 space-y-16" }, Me = { class: "flex justify-end" }, Te = { class: "flex gap-8 items-center justify-start" }, ze = /* @__PURE__ */ be({
|
|
22
22
|
__name: "LinkProductSideSheet",
|
|
23
23
|
props: {
|
|
24
24
|
initialValue: { default: () => [] },
|
|
@@ -35,103 +35,103 @@ const Be = { class: "fm-typo-en-title-md-600 mr-auto" }, Oe = {
|
|
|
35
35
|
useCloseBtn: { type: Boolean }
|
|
36
36
|
},
|
|
37
37
|
emits: ["submit"],
|
|
38
|
-
setup(
|
|
39
|
-
const
|
|
40
|
-
function Z(
|
|
41
|
-
k.value =
|
|
38
|
+
setup(s, { emit: N }) {
|
|
39
|
+
const o = s, w = N, { t: m } = ke(), k = g(c.Normal);
|
|
40
|
+
function Z(t) {
|
|
41
|
+
k.value = t;
|
|
42
42
|
}
|
|
43
|
-
const f = g(!1),
|
|
44
|
-
Fe.isBoolean(
|
|
43
|
+
const f = g(!1), z = (t) => {
|
|
44
|
+
Fe.isBoolean(t) ? f.value = t : f.value = !f.value;
|
|
45
45
|
};
|
|
46
|
-
function
|
|
47
|
-
return
|
|
46
|
+
function x(t) {
|
|
47
|
+
return t.reduce((e, a) => (e[a._id] = [...e[a._id] ?? [], a], e), {});
|
|
48
48
|
}
|
|
49
|
-
const ee =
|
|
50
|
-
menuItems: A(() =>
|
|
51
|
-
categories: A(() =>
|
|
52
|
-
}),
|
|
53
|
-
F(
|
|
54
|
-
),
|
|
55
|
-
function
|
|
56
|
-
var
|
|
57
|
-
return (
|
|
58
|
-
var a,
|
|
49
|
+
const ee = o.initialValue, V = g(x(F(ee))), D = A(() => Object.values(V.value).flatMap((t) => t)), { itemAttributes: te, convertCategoryIdToName: le, convertCategoryNameToId: ae } = ge({
|
|
50
|
+
menuItems: A(() => o.menuItems || []),
|
|
51
|
+
categories: A(() => o.categories || [])
|
|
52
|
+
}), Q = g(
|
|
53
|
+
F(o.linkItemRules)
|
|
54
|
+
), n = g();
|
|
55
|
+
function j() {
|
|
56
|
+
var t;
|
|
57
|
+
return (t = Q.value) == null ? void 0 : t.map((e) => {
|
|
58
|
+
var a, i, b, R;
|
|
59
59
|
return {
|
|
60
|
-
...
|
|
60
|
+
...e,
|
|
61
61
|
restaurantRule: {
|
|
62
|
-
restaurantAttributes: O((a =
|
|
63
|
-
restaurantCustomAttributes: O((
|
|
62
|
+
restaurantAttributes: O((a = e.restaurantRule) == null ? void 0 : a.restaurantAttributes),
|
|
63
|
+
restaurantCustomAttributes: O((i = e.restaurantRule) == null ? void 0 : i.restaurantCustomAttributes)
|
|
64
64
|
},
|
|
65
65
|
itemRule: {
|
|
66
|
-
itemAttributes: le(O((b =
|
|
67
|
-
itemCustomAttributes: O((R =
|
|
66
|
+
itemAttributes: le(O((b = e.itemRule) == null ? void 0 : b.itemAttributes)),
|
|
67
|
+
itemCustomAttributes: O((R = e.itemRule) == null ? void 0 : R.itemCustomAttributes)
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
-
|
|
72
|
+
n.value = j();
|
|
73
73
|
function G() {
|
|
74
|
-
var
|
|
75
|
-
return (
|
|
76
|
-
var a,
|
|
74
|
+
var t;
|
|
75
|
+
return (t = n.value) == null ? void 0 : t.map((e) => {
|
|
76
|
+
var a, i, b, R;
|
|
77
77
|
return {
|
|
78
|
-
...
|
|
78
|
+
...e,
|
|
79
79
|
restaurantRule: {
|
|
80
|
-
restaurantAttributes: E((a =
|
|
81
|
-
restaurantCustomAttributes: E((
|
|
80
|
+
restaurantAttributes: E((a = e.restaurantRule) == null ? void 0 : a.restaurantAttributes),
|
|
81
|
+
restaurantCustomAttributes: E((i = e.restaurantRule) == null ? void 0 : i.restaurantCustomAttributes)
|
|
82
82
|
},
|
|
83
83
|
itemRule: {
|
|
84
|
-
itemAttributes: E(ae((b =
|
|
85
|
-
itemCustomAttributes: E((R =
|
|
84
|
+
itemAttributes: E(ae((b = e.itemRule) == null ? void 0 : b.itemAttributes)),
|
|
85
|
+
itemCustomAttributes: E((R = e.itemRule) == null ? void 0 : R.itemCustomAttributes)
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
90
|
const ue = Se(
|
|
91
91
|
() => {
|
|
92
|
-
const
|
|
93
|
-
return !J.isEqual(
|
|
92
|
+
const t = G() ?? null;
|
|
93
|
+
return !J.isEqual(x(o.initialValue), V.value) || !J.isEqual(o.linkItemRules, t);
|
|
94
94
|
},
|
|
95
95
|
() => {
|
|
96
96
|
f.value = !1;
|
|
97
97
|
}
|
|
98
98
|
);
|
|
99
99
|
function se() {
|
|
100
|
-
k.value ===
|
|
101
|
-
mode:
|
|
100
|
+
k.value === c.Rules ? w("submit", {
|
|
101
|
+
mode: c.Rules,
|
|
102
102
|
linkItemRules: G() ?? []
|
|
103
103
|
}) : w("submit", {
|
|
104
|
-
mode:
|
|
105
|
-
items:
|
|
104
|
+
mode: c.Normal,
|
|
105
|
+
items: D.value
|
|
106
106
|
}), f.value = !1;
|
|
107
107
|
}
|
|
108
108
|
ve(
|
|
109
109
|
() => f.value,
|
|
110
110
|
() => {
|
|
111
|
-
V.value =
|
|
111
|
+
V.value = x(F(o.initialValue)), Q.value = F(o.linkItemRules), n.value = j(), k.value = o.noScheduler && o.linkItemRules && o.linkItemRules.length > 0 ? c.Rules : c.Normal;
|
|
112
112
|
}
|
|
113
113
|
);
|
|
114
114
|
const oe = A(() => {
|
|
115
|
-
const
|
|
116
|
-
return Object.values(
|
|
115
|
+
const t = ye();
|
|
116
|
+
return Object.values(t).sort((e, a) => a.sortingIndex - e.sortingIndex).map((e) => ({ label: e.label, value: e.value }));
|
|
117
117
|
}), re = A(
|
|
118
118
|
() => {
|
|
119
|
-
var
|
|
120
|
-
return (((
|
|
121
|
-
label:
|
|
122
|
-
value:
|
|
119
|
+
var t;
|
|
120
|
+
return (((t = q().state.menu.ruleGroupSettings) == null ? void 0 : t.groups) || []).map((e) => ({
|
|
121
|
+
label: e.name,
|
|
122
|
+
value: e._id
|
|
123
123
|
}));
|
|
124
124
|
}
|
|
125
125
|
), { attributes: ne } = K({
|
|
126
126
|
valueSource: Ce().restaurants,
|
|
127
127
|
entity: "restaurant"
|
|
128
|
-
}), { restaurantAttributes: ie } = Ie(), me = A(() =>
|
|
128
|
+
}), { restaurantAttributes: ie } = Ie(), me = A(() => o.menuItems || []), { attributes: de } = K({
|
|
129
129
|
valueSource: me,
|
|
130
130
|
entity: "item"
|
|
131
131
|
});
|
|
132
132
|
function ce() {
|
|
133
|
-
const
|
|
134
|
-
...
|
|
133
|
+
const t = [
|
|
134
|
+
...n.value || [],
|
|
135
135
|
{
|
|
136
136
|
orderFrom: Ae.F_ORDER_FROM.enum.ALL,
|
|
137
137
|
restaurantRule: {
|
|
@@ -144,36 +144,36 @@ const Be = { class: "fm-typo-en-title-md-600 mr-auto" }, Oe = {
|
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
];
|
|
147
|
-
|
|
147
|
+
n.value = t;
|
|
148
148
|
}
|
|
149
|
-
function pe(
|
|
150
|
-
if (!
|
|
151
|
-
const
|
|
152
|
-
|
|
149
|
+
function pe(t) {
|
|
150
|
+
if (!n.value) return;
|
|
151
|
+
const e = [...n.value];
|
|
152
|
+
e.splice(t, 1), n.value = e.length ? e : [];
|
|
153
153
|
}
|
|
154
|
-
function $(
|
|
155
|
-
if (!
|
|
156
|
-
const
|
|
157
|
-
W(
|
|
154
|
+
function $(t, e, a) {
|
|
155
|
+
if (!n.value) return;
|
|
156
|
+
const i = [...n.value];
|
|
157
|
+
W(e) ? i[t].restaurantRule[a] = null : i[t].restaurantRule[a] = e, n.value = i;
|
|
158
158
|
}
|
|
159
|
-
function P(
|
|
160
|
-
if (!
|
|
161
|
-
const
|
|
162
|
-
W(
|
|
159
|
+
function P(t, e, a) {
|
|
160
|
+
if (!n.value) return;
|
|
161
|
+
const i = [...n.value];
|
|
162
|
+
W(e) ? i[t].itemRule[a] = null : i[t].itemRule[a] = e, n.value = i;
|
|
163
163
|
}
|
|
164
164
|
const H = A(() => {
|
|
165
|
-
const
|
|
166
|
-
return
|
|
165
|
+
const t = o.isLocalOnly ? we() : q();
|
|
166
|
+
return o.noScheduler && t.currentCatalog;
|
|
167
167
|
});
|
|
168
|
-
return (
|
|
169
|
-
const a = I("fm-button"),
|
|
170
|
-
return v(), S(
|
|
171
|
-
_e(
|
|
168
|
+
return (t, e) => {
|
|
169
|
+
const a = I("fm-button"), i = I("fm-switch"), b = I("FmSelect"), R = I("FmCard"), fe = I("fm-side-sheet");
|
|
170
|
+
return v(), S(L, null, [
|
|
171
|
+
_e(t.$slots, "default", { trigger: z }, void 0, !0),
|
|
172
172
|
u(fe, {
|
|
173
173
|
id: "group-form",
|
|
174
174
|
modelValue: f.value,
|
|
175
|
-
"onUpdate:modelValue":
|
|
176
|
-
"close-button":
|
|
175
|
+
"onUpdate:modelValue": e[3] || (e[3] = (d) => f.value = d),
|
|
176
|
+
"close-button": s.useCloseBtn,
|
|
177
177
|
"is-container": l(Ve).FmForm,
|
|
178
178
|
"is-container-props": {
|
|
179
179
|
onValidationSuccess: se,
|
|
@@ -183,37 +183,37 @@ const Be = { class: "fm-typo-en-title-md-600 mr-auto" }, Oe = {
|
|
|
183
183
|
"onOn:clickedAway": l(ue)
|
|
184
184
|
}, {
|
|
185
185
|
"side-sheet-header": p(() => [
|
|
186
|
-
|
|
186
|
+
s.useCloseBtn ? T("", !0) : (v(), M(a, {
|
|
187
187
|
key: 0,
|
|
188
188
|
variant: l(X).Tertiary,
|
|
189
189
|
class: "cursor-pointer mr-4",
|
|
190
190
|
"prepend-icon": "arrow_back",
|
|
191
|
-
onClick:
|
|
191
|
+
onClick: z
|
|
192
192
|
}, null, 8, ["variant"])),
|
|
193
|
-
_("p", Be, Y(
|
|
193
|
+
_("p", Be, Y(s.title || l(m)("menu.link_product.title")), 1),
|
|
194
194
|
H.value ? (v(), S("div", Oe, [
|
|
195
195
|
_("div", Ee, [
|
|
196
|
-
u(
|
|
197
|
-
label: l(
|
|
198
|
-
"model-value": k.value === l(
|
|
199
|
-
"onUpdate:modelValue":
|
|
196
|
+
u(i, {
|
|
197
|
+
label: l(m)("menu.link_product.rules.section_title"),
|
|
198
|
+
"model-value": k.value === l(c).Rules,
|
|
199
|
+
"onUpdate:modelValue": e[0] || (e[0] = (d) => Z(d ? l(c).Rules : l(c).Normal))
|
|
200
200
|
}, null, 8, ["label", "model-value"])
|
|
201
201
|
])
|
|
202
|
-
])) :
|
|
202
|
+
])) : T("", !0)
|
|
203
203
|
]),
|
|
204
204
|
"side-sheet-footer": p(() => [
|
|
205
|
-
_("div",
|
|
205
|
+
_("div", Te, [
|
|
206
206
|
u(a, {
|
|
207
|
-
label: l(
|
|
207
|
+
label: l(m)("menu.common.actions.confirm"),
|
|
208
208
|
size: "lg",
|
|
209
209
|
type: "submit",
|
|
210
210
|
variant: "primary"
|
|
211
211
|
}, null, 8, ["label"]),
|
|
212
212
|
u(a, {
|
|
213
|
-
label: l(
|
|
213
|
+
label: l(m)("menu.common.actions.cancel"),
|
|
214
214
|
size: "lg",
|
|
215
215
|
variant: "tertiary",
|
|
216
|
-
onClick:
|
|
216
|
+
onClick: e[2] || (e[2] = () => f.value = !1)
|
|
217
217
|
}, null, 8, ["label"])
|
|
218
218
|
])
|
|
219
219
|
]),
|
|
@@ -222,60 +222,60 @@ const Be = { class: "fm-typo-en-title-md-600 mr-auto" }, Oe = {
|
|
|
222
222
|
class: "py-8 px-8 overflow-y-auto space-y-24",
|
|
223
223
|
key: k.value
|
|
224
224
|
}, [
|
|
225
|
-
k.value === l(
|
|
225
|
+
k.value === l(c).Normal ? (v(), M(l(he), {
|
|
226
226
|
key: 0,
|
|
227
227
|
"auto-focus-search": !0,
|
|
228
|
-
"categorized-items":
|
|
228
|
+
"categorized-items": s.categorizedItems,
|
|
229
229
|
data: V.value,
|
|
230
|
-
"select-variant":
|
|
231
|
-
"selected-items":
|
|
232
|
-
"show-variant":
|
|
233
|
-
"show-addon":
|
|
234
|
-
"onUpdate:data":
|
|
235
|
-
}, null, 8, ["categorized-items", "data", "select-variant", "selected-items", "show-variant", "show-addon"])) : H.value ? (v(), S(
|
|
236
|
-
_("p", Ne, Y(l(
|
|
237
|
-
(v(!0), S(
|
|
230
|
+
"select-variant": s.selectVariant,
|
|
231
|
+
"selected-items": D.value,
|
|
232
|
+
"show-variant": s.showVariant,
|
|
233
|
+
"show-addon": s.showAddon,
|
|
234
|
+
"onUpdate:data": e[1] || (e[1] = (d) => V.value = d)
|
|
235
|
+
}, null, 8, ["categorized-items", "data", "select-variant", "selected-items", "show-variant", "show-addon"])) : H.value ? (v(), S(L, { key: 1 }, [
|
|
236
|
+
_("p", Ne, Y(l(m)("menu.link_product.rules.hint")), 1),
|
|
237
|
+
(v(!0), S(L, null, Re(n.value, (d, C) => (v(), M(R, {
|
|
238
238
|
key: C,
|
|
239
239
|
class: "p-16 space-y-16",
|
|
240
240
|
variant: "outlined"
|
|
241
241
|
}, {
|
|
242
242
|
default: p(() => [
|
|
243
|
-
_("div",
|
|
243
|
+
_("div", xe, [
|
|
244
244
|
u(h, {
|
|
245
|
-
label: l(
|
|
245
|
+
label: l(m)("menu.link_product.rules.order_from")
|
|
246
246
|
}, {
|
|
247
247
|
default: p(() => [
|
|
248
248
|
u(b, {
|
|
249
249
|
items: oe.value,
|
|
250
|
-
modelValue:
|
|
251
|
-
"onUpdate:modelValue": (
|
|
250
|
+
modelValue: d.orderFrom,
|
|
251
|
+
"onUpdate:modelValue": (r) => d.orderFrom = r
|
|
252
252
|
}, null, 8, ["items", "modelValue", "onUpdate:modelValue"])
|
|
253
253
|
]),
|
|
254
254
|
_: 2
|
|
255
255
|
}, 1032, ["label"]),
|
|
256
256
|
u(h, {
|
|
257
|
-
label: l(
|
|
257
|
+
label: l(m)("menu.rule_groups.title")
|
|
258
258
|
}, {
|
|
259
259
|
default: p(() => [
|
|
260
260
|
u(b, {
|
|
261
261
|
items: re.value,
|
|
262
262
|
multiselect: "",
|
|
263
|
-
"model-value":
|
|
264
|
-
"onUpdate:modelValue": (
|
|
263
|
+
"model-value": d.ruleGroupIds || [],
|
|
264
|
+
"onUpdate:modelValue": (r) => d.ruleGroupIds = r
|
|
265
265
|
}, null, 8, ["items", "model-value", "onUpdate:modelValue"])
|
|
266
266
|
]),
|
|
267
267
|
_: 2
|
|
268
268
|
}, 1032, ["label"]),
|
|
269
|
-
_("div",
|
|
269
|
+
_("div", Le, [
|
|
270
270
|
u(h, {
|
|
271
|
-
label: l(
|
|
271
|
+
label: l(m)("menu.link_product.rules.restaurant_filter")
|
|
272
272
|
}, {
|
|
273
273
|
default: p(() => {
|
|
274
|
-
var
|
|
274
|
+
var r;
|
|
275
275
|
return [
|
|
276
276
|
u(l(U), {
|
|
277
277
|
attributes: l(ie),
|
|
278
|
-
"model-value": ((
|
|
278
|
+
"model-value": ((r = d.restaurantRule) == null ? void 0 : r.restaurantAttributes) || l(B),
|
|
279
279
|
"onUpdate:modelValue": (y) => $(C, y, "restaurantAttributes")
|
|
280
280
|
}, null, 8, ["attributes", "model-value", "onUpdate:modelValue"])
|
|
281
281
|
];
|
|
@@ -283,14 +283,14 @@ const Be = { class: "fm-typo-en-title-md-600 mr-auto" }, Oe = {
|
|
|
283
283
|
_: 2
|
|
284
284
|
}, 1032, ["label"]),
|
|
285
285
|
u(h, {
|
|
286
|
-
label: l(
|
|
286
|
+
label: l(m)("menu.link_product.rules.restaurant_custom_attributes_filter")
|
|
287
287
|
}, {
|
|
288
288
|
default: p(() => {
|
|
289
|
-
var
|
|
289
|
+
var r;
|
|
290
290
|
return [
|
|
291
291
|
u(l(U), {
|
|
292
292
|
attributes: l(ne),
|
|
293
|
-
"model-value": ((
|
|
293
|
+
"model-value": ((r = d.restaurantRule) == null ? void 0 : r.restaurantCustomAttributes) || l(B),
|
|
294
294
|
"onUpdate:modelValue": (y) => $(C, y, "restaurantCustomAttributes")
|
|
295
295
|
}, null, 8, ["attributes", "model-value", "onUpdate:modelValue"])
|
|
296
296
|
];
|
|
@@ -298,14 +298,14 @@ const Be = { class: "fm-typo-en-title-md-600 mr-auto" }, Oe = {
|
|
|
298
298
|
_: 2
|
|
299
299
|
}, 1032, ["label"]),
|
|
300
300
|
u(h, {
|
|
301
|
-
label: l(
|
|
301
|
+
label: l(m)("menu.link_product.rules.item_filter")
|
|
302
302
|
}, {
|
|
303
303
|
default: p(() => {
|
|
304
|
-
var
|
|
304
|
+
var r;
|
|
305
305
|
return [
|
|
306
306
|
u(l(U), {
|
|
307
307
|
attributes: l(te),
|
|
308
|
-
"model-value": ((
|
|
308
|
+
"model-value": ((r = d.itemRule) == null ? void 0 : r.itemAttributes) || l(B),
|
|
309
309
|
"onUpdate:modelValue": (y) => P(C, y, "itemAttributes")
|
|
310
310
|
}, null, 8, ["attributes", "model-value", "onUpdate:modelValue"])
|
|
311
311
|
];
|
|
@@ -313,14 +313,14 @@ const Be = { class: "fm-typo-en-title-md-600 mr-auto" }, Oe = {
|
|
|
313
313
|
_: 2
|
|
314
314
|
}, 1032, ["label"]),
|
|
315
315
|
u(h, {
|
|
316
|
-
label: l(
|
|
316
|
+
label: l(m)("menu.link_product.rules.item_custom_attributes_filter")
|
|
317
317
|
}, {
|
|
318
318
|
default: p(() => {
|
|
319
|
-
var
|
|
319
|
+
var r;
|
|
320
320
|
return [
|
|
321
321
|
u(l(U), {
|
|
322
322
|
attributes: l(de),
|
|
323
|
-
"model-value": ((
|
|
323
|
+
"model-value": ((r = d.itemRule) == null ? void 0 : r.itemCustomAttributes) || l(B),
|
|
324
324
|
"onUpdate:modelValue": (y) => P(C, y, "itemCustomAttributes")
|
|
325
325
|
}, null, 8, ["attributes", "model-value", "onUpdate:modelValue"])
|
|
326
326
|
];
|
|
@@ -329,11 +329,11 @@ const Be = { class: "fm-typo-en-title-md-600 mr-auto" }, Oe = {
|
|
|
329
329
|
}, 1032, ["label"])
|
|
330
330
|
])
|
|
331
331
|
]),
|
|
332
|
-
_("div",
|
|
332
|
+
_("div", Me, [
|
|
333
333
|
u(a, {
|
|
334
334
|
variant: l(X).Tertiary,
|
|
335
335
|
"prepend-icon": "delete",
|
|
336
|
-
onClick: (
|
|
336
|
+
onClick: (r) => pe(C)
|
|
337
337
|
}, null, 8, ["variant", "onClick"])
|
|
338
338
|
])
|
|
339
339
|
]),
|
|
@@ -341,11 +341,11 @@ const Be = { class: "fm-typo-en-title-md-600 mr-auto" }, Oe = {
|
|
|
341
341
|
}, 1024))), 128)),
|
|
342
342
|
_("div", null, [
|
|
343
343
|
u(a, {
|
|
344
|
-
label: l(
|
|
344
|
+
label: l(m)("menu.link_product.rules.add_rule"),
|
|
345
345
|
onClick: ce
|
|
346
346
|
}, null, 8, ["label"])
|
|
347
347
|
])
|
|
348
|
-
], 64)) :
|
|
348
|
+
], 64)) : T("", !0)
|
|
349
349
|
]))
|
|
350
350
|
]),
|
|
351
351
|
_: 1
|
|
@@ -353,9 +353,9 @@ const Be = { class: "fm-typo-en-title-md-600 mr-auto" }, Oe = {
|
|
|
353
353
|
], 64);
|
|
354
354
|
};
|
|
355
355
|
}
|
|
356
|
-
}), Ke = /* @__PURE__ */ Ue(
|
|
356
|
+
}), Ke = /* @__PURE__ */ Ue(ze, [["__scopeId", "data-v-469403ff"]]);
|
|
357
357
|
export {
|
|
358
358
|
Ke as L,
|
|
359
359
|
Ue as _,
|
|
360
|
-
|
|
360
|
+
c as a
|
|
361
361
|
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { defineComponent as k, computed as i, ref as x, resolveComponent as t, createBlock as p, openBlock as s, withCtx as u, createElementVNode as c, createVNode as r, createElementBlock as I, Fragment as L, renderList as M, renderSlot as S, toDisplayString as g } from "vue";
|
|
2
|
+
import { useI18n as B } from "@feedmepos/mf-common";
|
|
3
|
+
const E = { class: "w-full flex items-center justify-between" }, N = { class: "p-4" }, P = { class: "flex-1 overflow-y-auto min-h-0" }, K = /* @__PURE__ */ k({
|
|
4
|
+
__name: "MenuSelector",
|
|
5
|
+
props: {
|
|
6
|
+
modelValue: {},
|
|
7
|
+
items: {},
|
|
8
|
+
placeholder: { default: "" },
|
|
9
|
+
searchPlaceholder: { default: "" },
|
|
10
|
+
title: { default: "" },
|
|
11
|
+
customLabel: {}
|
|
12
|
+
},
|
|
13
|
+
emits: ["update:modelValue"],
|
|
14
|
+
setup(l, { emit: f }) {
|
|
15
|
+
const o = l, h = f, { t: $ } = B(), d = i(() => {
|
|
16
|
+
const e = o.items.find((n) => n.value === o.modelValue);
|
|
17
|
+
return e ? e.label : o.placeholder;
|
|
18
|
+
}), _ = i(() => o.items.filter(
|
|
19
|
+
(e) => e.label.toLowerCase().includes(m.value.toLowerCase())
|
|
20
|
+
)), m = x("");
|
|
21
|
+
function v(e) {
|
|
22
|
+
h("update:modelValue", e);
|
|
23
|
+
}
|
|
24
|
+
return (e, n) => {
|
|
25
|
+
const b = t("FmIcon"), F = t("FmChip"), C = t("FmSearch"), V = t("FmMenuItem"), w = t("FmMenu");
|
|
26
|
+
return s(), p(w, { width: 220 }, {
|
|
27
|
+
"menu-button": u(() => [
|
|
28
|
+
r(F, {
|
|
29
|
+
label: d.value,
|
|
30
|
+
class: "w-full fm-typo-en-body-md-600 text-fm-color-neutral-gray-400"
|
|
31
|
+
}, {
|
|
32
|
+
default: u(() => [
|
|
33
|
+
c("div", E, [
|
|
34
|
+
c("p", null, g(l.customLabel || l.title || d.value), 1),
|
|
35
|
+
r(b, {
|
|
36
|
+
name: "expand_more",
|
|
37
|
+
size: "sm"
|
|
38
|
+
}),
|
|
39
|
+
S(e.$slots, "append")
|
|
40
|
+
])
|
|
41
|
+
]),
|
|
42
|
+
_: 3
|
|
43
|
+
}, 8, ["label"])
|
|
44
|
+
]),
|
|
45
|
+
default: u(() => [
|
|
46
|
+
c("div", N, [
|
|
47
|
+
r(C, {
|
|
48
|
+
autofocus: "",
|
|
49
|
+
modelValue: m.value,
|
|
50
|
+
"onUpdate:modelValue": n[0] || (n[0] = (a) => m.value = a),
|
|
51
|
+
placeholder: l.searchPlaceholder
|
|
52
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
53
|
+
]),
|
|
54
|
+
c("div", P, [
|
|
55
|
+
(s(!0), I(L, null, M(_.value, (a, y) => (s(), p(V, {
|
|
56
|
+
key: y,
|
|
57
|
+
label: a.label,
|
|
58
|
+
onClick: (j) => v(a.value)
|
|
59
|
+
}, null, 8, ["label", "onClick"]))), 128))
|
|
60
|
+
])
|
|
61
|
+
]),
|
|
62
|
+
_: 3
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
export {
|
|
68
|
+
K as _
|
|
69
|
+
};
|