@feedmepos/mf-menu 0.32.7-beta.2 → 0.32.7
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-BIQ0CTci.js → App-6Q1nmlfA.js} +99 -99
- package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-xLPJOt02.js +161 -0
- package/dist/BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js +74 -0
- package/dist/{Catalog-D2wc24o8.js → Catalog-Bf5JieUH.js} +9 -9
- package/dist/{Category-DA5-55d2.js → Category-BBATgN1o.js} +7 -7
- package/dist/{Category-BPufryqK.js → Category-BSBZlBHF.js} +4 -4
- package/dist/{CookingGuide-DKvou40e.js → CookingGuide-BnjSTAL4.js} +6 -6
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-DHoAYdGI.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-BXdLDaBB.js} +3 -3
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +26 -0
- package/dist/{Group-D60oAvmM.js → Group-BqXtHWr2.js} +1 -1
- package/dist/{Group-Bgpc6qE1.js → Group-Dpbz5j1x.js} +4 -4
- package/dist/{Group.vue_vue_type_script_setup_true_lang-BXn3--BL.js → Group.vue_vue_type_script_setup_true_lang-Bz5hEPov.js} +128 -128
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BD9IZkwW.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-3a6eV6cB.js} +91 -91
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-BE3LdBYY.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-C6Z7OJz7.js} +6075 -6075
- package/dist/{Ingredient-Brv4hml-.js → Ingredient-BZfbbI--.js} +29 -29
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CIOX-pq1.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DfyUAd9n.js} +104 -104
- package/dist/{LinkProductSideSheet-BDMbKJ8o.js → LinkProductSideSheet-C-CcvD1Y.js} +251 -251
- package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js +69 -0
- package/dist/{MenuSetting-DvCu23my.js → MenuSetting-CRCXtk6n.js} +77 -77
- package/dist/{PageLayout.vue_vue_type_script_setup_true_lang-vFqWGM6P.js → PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js} +8 -8
- package/dist/{PrintRoute-DwgLKDUV.js → PrintRoute-BqRkve5U.js} +5 -5
- package/dist/{Product-EmoWM778.js → Product-cj-wKww4.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-5HyO_RYw.js → Product.vue_vue_type_script_setup_true_lang-DtCzSk94.js} +606 -606
- package/dist/{ProductInternalTools-PqzouaF2.js → ProductInternalTools-B5V7Hs15.js} +11 -11
- package/dist/{Products-ZgfTT9dI.js → Products-a0N50IJw.js} +52 -52
- package/dist/{Publish-CUdRwmN1.js → Publish-CyiUajCw.js} +5 -5
- package/dist/{Recipe-BRUxyire.js → Recipe-CKIoGrBI.js} +5 -5
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-CPFGkaTr.js → RuleView.vue_vue_type_script_setup_true_lang-fp_IdVVZ.js} +451 -448
- package/dist/{Scheduler-BXdZh-xC.js → Scheduler-CwTdAm-V.js} +4 -4
- package/dist/{ServingSequence-EAZHOHiy.js → ServingSequence-BAxm0bx1.js} +4 -4
- package/dist/{Setting-BRut_Xj0.js → Setting-J9s4VpKm.js} +6 -6
- package/dist/{Subcategory-D6Yrs-vO.js → Subcategory-BXJ2H9cr.js} +5 -5
- package/dist/{Takeaway-Bi8JfDWa.js → Takeaway-CPPrIbb0.js} +5 -5
- package/dist/{Takeaway-CRdlNTu7.js → Takeaway-Cm9DdUdf.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-DKQZ9J8Z.js → Takeaway.vue_vue_type_script_setup_true_lang-PRAGlbyK.js} +5 -5
- package/dist/{TextChip.vue_vue_type_script_setup_true_lang-BJMcI3U2.js → TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js} +5 -5
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-DDWk-WUW.js → Thumbnail.vue_vue_type_script_setup_true_lang-BQcHroCG.js} +74 -74
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BRmrp3_3.js +6038 -0
- package/dist/{Unit-Ccs_k5IS.js → Unit-9pTm3F5W.js} +3 -3
- package/dist/{Variant-BHmgMXq7.js → Variant-qGJvwVW3.js} +4 -4
- package/dist/{_id_-DSSoi4Gy.js → _id_-BPgTKleB.js} +11 -11
- package/dist/{app-CzXxFrl1.js → app-5fxKLAzS.js} +447 -447
- package/dist/{app-B9seAt5l.js → app-BYd7KCR0.js} +1 -1
- package/dist/{app-C8Dm2-h4.js → app-BoVVV8kG.js} +35 -35
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +20 -0
- 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/src/components/feature/TreeEditor/store/menuV2.d.ts +2 -1
- package/dist/apps/mf-menu/src/stores/menu.d.ts +1 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/linked-status-YBCdx1_k.js +13 -0
- package/dist/assets/override-menu-D2ffZ3LE.js +13 -0
- package/dist/assets/validate-menu-C55soZke.js +13 -0
- package/dist/{catalog-CD-fdGdY.js → catalog-DjMrJdom.js} +1 -1
- package/dist/{catalogSetting-Ci85lXor.js → catalogSetting-DMUZ11RQ.js} +1 -1
- package/dist/{category-6NAH0dUF.js → category-DRr-IdFP.js} +1 -1
- package/dist/{currency-BP_z7R5d.js → currency-CAUInXnj.js} +1 -1
- package/dist/{index-BLMijxTj.js → index-By_yIps1.js} +91 -91
- package/dist/{index-DgDQzkPR.js → index-CG5i_sE7.js} +30 -30
- package/dist/{index-C1XCbqC-.js → index-DOwV5hqi.js} +56 -56
- package/dist/{index-Cftm4-G_.js → index-hDyuidIm.js} +5 -5
- package/dist/{index.vue_vue_type_script_setup_true_lang-D-k9WcQV.js → index.vue_vue_type_script_setup_true_lang-Dcq1bwDq.js} +40027 -40154
- package/dist/item-Cq7YkZBk.js +7685 -0
- package/dist/{iteration-ZG64Re91.js → iteration-V9L5Rk-0.js} +1 -1
- package/dist/{jszip.min-BETdv0rh.js → jszip.min-Danu3otn.js} +429 -429
- package/dist/{menu-COMXycAe.js → menu-D1PHF11v.js} +1 -1
- package/dist/{menuV2-CeRS0Jw3.js → menuV2-BfvbnMWo.js} +356 -347
- package/dist/mf-menu.css +1 -1
- package/dist/packages/shared/src/components/form/SelectFilter.vue.d.ts +1 -1
- package/dist/{priceTier-t2T3Q87F.js → priceTier-DszOAydN.js} +1 -1
- package/dist/{scheduler-BbJUVuiK.js → scheduler-BbQrleYX.js} +7 -7
- package/dist/{subcategory-61kOQh4g.js → subcategory-BnW2z6Vy.js} +2 -2
- package/dist/{toExcel-DIYaK18-.js → toExcel-De8V6KyO.js} +2 -2
- package/dist/{unit-B6StucsI.js → unit-BjQ-Hi7b.js} +151 -151
- package/dist/{vuedraggable-DnBIRDMr.js → vuedraggable-CK8z7qA8.js} +2 -2
- package/package.json +3 -2
- package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-BpEjqhAC.js +0 -161
- package/dist/BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-CnCoRLDg.js +0 -74
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-B3Ixruh-.js +0 -26
- package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-Bm_hSelC.js +0 -69
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-JdHaBpaX.js +0 -5997
- package/dist/assets/linked-status-Cuf8X8_g.js +0 -13
- package/dist/assets/override-menu-yxQLf82k.js +0 -13
- package/dist/assets/validate-menu-BwbenBs6.js +0 -13
- package/dist/item-ByEPWjef.js +0 -6819
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as h, z as n, J as d, ak as _ } from "./index.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { u as h, z as n, J as d, ak as _ } from "./index.vue_vue_type_script_setup_true_lang-Dcq1bwDq.js";
|
|
2
2
|
import "@feedmepos/ui-library";
|
|
3
3
|
class u {
|
|
4
4
|
constructor(t, e, r, a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z as u, H as i } from "./index.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { z as u, H as i } from "./index.vue_vue_type_script_setup_true_lang-Dcq1bwDq.js";
|
|
2
2
|
var a = /* @__PURE__ */ ((e) => (e.AUTO = "auto", e.MANUAL = "manual", e))(a || {}), m = /* @__PURE__ */ ((e) => (e[e.Normal = 0] = "Normal", e[e.Rules = 1] = "Rules", e))(m || {});
|
|
3
3
|
class s {
|
|
4
4
|
static fromCatalog(r, n) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as M, watch as _, ref as f, resolveComponent as g, createBlock as x, openBlock as C, unref as l, withCtx as V, createVNode as A } from "vue";
|
|
2
|
-
import { J as s, z as u, u as F } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { J as s, z as u, u as F } from "./index.vue_vue_type_script_setup_true_lang-Dcq1bwDq.js";
|
|
3
3
|
import { useI18n as E } from "@feedmepos/mf-common";
|
|
4
4
|
import { useDialogChild as O } from "@feedmepos/ui-library";
|
|
5
5
|
const y = /* @__PURE__ */ M({
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { A as S, z as A, u as K, H as O, B as q, I as z } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { defineComponent as T, ref as
|
|
1
|
+
import { A as S, z as A, u as K, H as O, B as q, I as z } from "./index.vue_vue_type_script_setup_true_lang-Dcq1bwDq.js";
|
|
2
|
+
import { defineComponent as T, ref as f, computed as B, watch as L, onMounted as R, onBeforeUnmount as H, resolveComponent as F, createBlock as N, openBlock as M, withModifiers as C, withCtx as g, renderSlot as U, createElementBlock as P, Fragment as W, createVNode as c, unref as i, createElementVNode as D, createCommentVNode as j, toDisplayString as Y } from "vue";
|
|
3
3
|
import { useI18n as I } from "@feedmepos/mf-common";
|
|
4
4
|
import { components as Z } from "@feedmepos/ui-library";
|
|
5
|
-
import { _ as G } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _ as G } from "./RuleView.vue_vue_type_script_setup_true_lang-fp_IdVVZ.js";
|
|
6
6
|
import { u as J } from "./discardConfirm-BHni0LNu.js";
|
|
7
|
-
import { _ as Q } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-
|
|
7
|
+
import { _ as Q } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-xLPJOt02.js";
|
|
8
8
|
import { c as X } from "./check-C9mY6LiX.js";
|
|
9
|
-
import { f as ee } from "./currency-
|
|
10
|
-
import { c as
|
|
11
|
-
const
|
|
9
|
+
import { f as ee } from "./currency-CAUInXnj.js";
|
|
10
|
+
import { c as ae } from "./string-DpfFixWH.js";
|
|
11
|
+
const te = /* @__PURE__ */ T({
|
|
12
12
|
__name: "CurrencyInput",
|
|
13
13
|
props: {
|
|
14
14
|
modelValue: {},
|
|
@@ -50,41 +50,41 @@ const ae = /* @__PURE__ */ T({
|
|
|
50
50
|
helperState: {}
|
|
51
51
|
},
|
|
52
52
|
emits: ["update:model-value"],
|
|
53
|
-
setup(
|
|
54
|
-
const
|
|
53
|
+
setup(y, { emit: m }) {
|
|
54
|
+
const a = y, { t: n } = I(), d = f(!1), v = f(!1), r = f(), x = B(() => a.modelValue ? (v.value && !d.value && (d.value = !0), S.Dinero.fromFdoDinero(a.modelValue).toUnit().toFixed(2)) : "");
|
|
55
55
|
L(
|
|
56
56
|
() => v.value,
|
|
57
57
|
(e) => {
|
|
58
|
-
var
|
|
59
|
-
e ? (
|
|
58
|
+
var t, l, o, E, w;
|
|
59
|
+
e ? (l = (t = r.value) == null ? void 0 : t.inputEl) == null || l.select() : (d.value = !1, (o = r.value) != null && o.inputEl && k((w = (E = r.value) == null ? void 0 : E.inputEl) == null ? void 0 : w.value));
|
|
60
60
|
}
|
|
61
61
|
);
|
|
62
|
-
const V =
|
|
63
|
-
field:
|
|
62
|
+
const V = m, u = B(() => typeof a.required == "string" ? a.required : n("menu.common.validation.field_required", {
|
|
63
|
+
field: a.label ?? n("menu.currency.input.field")
|
|
64
64
|
})), b = [
|
|
65
|
-
(e) =>
|
|
66
|
-
(e) =>
|
|
67
|
-
(e) =>
|
|
68
|
-
...
|
|
65
|
+
(e) => a.required ? !!e || u.value : !0,
|
|
66
|
+
(e) => a.min !== void 0 && e && parseFloat(e.toString()) < a.min ? n("menu.common.validation.min_value", { value: a.min }) : !0,
|
|
67
|
+
(e) => a.max !== void 0 && e && parseFloat(e.toString()) > a.max ? n("menu.common.validation.max_value", { value: a.max }) : !0,
|
|
68
|
+
...a.rules ?? []
|
|
69
69
|
];
|
|
70
70
|
function k(e) {
|
|
71
|
-
if (typeof e != "number" && !e &&
|
|
71
|
+
if (typeof e != "number" && !e && a.nullable)
|
|
72
72
|
V("update:model-value", void 0);
|
|
73
73
|
else {
|
|
74
74
|
if (typeof e == "string" && e === "-")
|
|
75
75
|
return;
|
|
76
|
-
let
|
|
77
|
-
|
|
76
|
+
let t = parseFloat((e || "").toString());
|
|
77
|
+
t = Number.isNaN(t) ? 0 : t, V("update:model-value", S.Dinero.fromNumber({ number: t }).toObject());
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
const
|
|
81
|
-
var
|
|
80
|
+
const s = B(() => typeof a.min == "number" && a.min >= 0), _ = (e) => {
|
|
81
|
+
var t, l, o;
|
|
82
82
|
if (!(e.ctrlKey || e.metaKey)) {
|
|
83
83
|
if (e.key === "Enter") {
|
|
84
|
-
(
|
|
84
|
+
(t = r.value) != null && t.inputEl && k((o = (l = r.value) == null ? void 0 : l.inputEl) == null ? void 0 : o.value);
|
|
85
85
|
return;
|
|
86
86
|
}
|
|
87
|
-
if (e.key === "-" &&
|
|
87
|
+
if (e.key === "-" && s.value) {
|
|
88
88
|
e.preventDefault();
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
@@ -93,29 +93,29 @@ const ae = /* @__PURE__ */ T({
|
|
|
93
93
|
};
|
|
94
94
|
return R(() => {
|
|
95
95
|
var e;
|
|
96
|
-
|
|
96
|
+
r.value && ((e = r.value.inputEl) == null || e.addEventListener("keydown", _));
|
|
97
97
|
}), H(() => {
|
|
98
98
|
var e;
|
|
99
|
-
|
|
100
|
-
}), (e,
|
|
101
|
-
const
|
|
102
|
-
return M(), N(
|
|
99
|
+
r.value && ((e = r.value.inputEl) == null || e.removeEventListener("keydown", _));
|
|
100
|
+
}), (e, t) => {
|
|
101
|
+
const l = F("fm-text-field");
|
|
102
|
+
return M(), N(l, {
|
|
103
103
|
ref_key: "inputRef",
|
|
104
|
-
ref:
|
|
105
|
-
autofocus:
|
|
106
|
-
disabled:
|
|
107
|
-
label:
|
|
108
|
-
"model-value":
|
|
109
|
-
placeholder:
|
|
110
|
-
"prepend-icon":
|
|
104
|
+
ref: r,
|
|
105
|
+
autofocus: a.autofocus,
|
|
106
|
+
disabled: a.disable,
|
|
107
|
+
label: e.label,
|
|
108
|
+
"model-value": x.value,
|
|
109
|
+
placeholder: a.placeholder,
|
|
110
|
+
"prepend-icon": e.showCurrency ? "attach_money" : void 0,
|
|
111
111
|
rules: b,
|
|
112
112
|
inputmode: "decimal",
|
|
113
|
-
onFocusChanged:
|
|
114
|
-
onWheel:
|
|
113
|
+
onFocusChanged: t[0] || (t[0] = (o) => v.value = o),
|
|
114
|
+
onWheel: t[1] || (t[1] = C(() => {
|
|
115
115
|
}, ["prevent"])),
|
|
116
|
-
onTouchmove:
|
|
116
|
+
onTouchmove: t[2] || (t[2] = C(() => {
|
|
117
117
|
}, ["prevent"])),
|
|
118
|
-
onScroll:
|
|
118
|
+
onScroll: t[3] || (t[3] = C(() => {
|
|
119
119
|
}, ["prevent"]))
|
|
120
120
|
}, {
|
|
121
121
|
append: g(() => [
|
|
@@ -126,15 +126,15 @@ const ae = /* @__PURE__ */ T({
|
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
128
|
});
|
|
129
|
-
function be(
|
|
130
|
-
return
|
|
129
|
+
function be(y) {
|
|
130
|
+
return y.map((m) => ({
|
|
131
131
|
module: A.F_MENU_MODULE_V4_KEY.enum.item,
|
|
132
|
-
id:
|
|
133
|
-
discriminator:
|
|
132
|
+
id: m._id,
|
|
133
|
+
discriminator: m.combinationKey,
|
|
134
134
|
data: void 0
|
|
135
135
|
}));
|
|
136
136
|
}
|
|
137
|
-
const le = { class: "fm-typo-en-title-md-600" },
|
|
137
|
+
const le = { class: "fm-typo-en-title-md-600" }, oe = { class: "space-y-32" }, ne = { class: "flex gap-8 items-center justify-start" }, ie = /* @__PURE__ */ T({
|
|
138
138
|
__name: "Form",
|
|
139
139
|
props: {
|
|
140
140
|
action: {},
|
|
@@ -144,86 +144,86 @@ const le = { class: "fm-typo-en-title-md-600" }, ne = { class: "space-y-32" }, o
|
|
|
144
144
|
bindToVariant: { type: Boolean }
|
|
145
145
|
},
|
|
146
146
|
emits: ["update:takeaway"],
|
|
147
|
-
setup(
|
|
148
|
-
const { t: n } = I(),
|
|
149
|
-
X.isBoolean(
|
|
147
|
+
setup(y, { expose: m, emit: a }) {
|
|
148
|
+
const { t: n } = I(), d = y, v = a, r = K(), x = B(() => r.rules.takeaway), V = f(!1), u = f(!1), b = (l) => {
|
|
149
|
+
X.isBoolean(l) ? u.value = l : u.value = !u.value;
|
|
150
150
|
};
|
|
151
151
|
function k() {
|
|
152
|
-
var
|
|
153
|
-
const
|
|
152
|
+
var o;
|
|
153
|
+
const l = {
|
|
154
154
|
...q.generator.initMenuV4Takeaway(),
|
|
155
155
|
usedBy: [],
|
|
156
|
-
...O(
|
|
156
|
+
...O(d.initialValue ?? {})
|
|
157
157
|
};
|
|
158
|
-
return (
|
|
158
|
+
return (o = d.fallback) != null && o.price && (l.price = null), l;
|
|
159
159
|
}
|
|
160
|
-
const
|
|
160
|
+
const s = f(k()), _ = B(() => d.action === "add" ? n("menu.takeaway.add") : n("menu.takeaway.update")), e = J(
|
|
161
161
|
() => !z.isEqual(
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
s.value,
|
|
163
|
+
d.initialValue || {
|
|
164
164
|
...q.generator.initMenuV4Takeaway(),
|
|
165
165
|
usedBy: []
|
|
166
166
|
}
|
|
167
167
|
),
|
|
168
|
-
() =>
|
|
168
|
+
() => u.value = !1
|
|
169
169
|
);
|
|
170
|
-
function
|
|
171
|
-
v("update:takeaway",
|
|
170
|
+
function t() {
|
|
171
|
+
v("update:takeaway", s.value), b(!1);
|
|
172
172
|
}
|
|
173
173
|
return L(
|
|
174
|
-
() =>
|
|
174
|
+
() => u.value,
|
|
175
175
|
() => {
|
|
176
|
-
|
|
176
|
+
u.value && (s.value = k());
|
|
177
177
|
}
|
|
178
|
-
),
|
|
178
|
+
), m({
|
|
179
179
|
trigger: b,
|
|
180
|
-
show:
|
|
181
|
-
}), (
|
|
182
|
-
const E =
|
|
180
|
+
show: u
|
|
181
|
+
}), (l, o) => {
|
|
182
|
+
const E = F("fm-text-field"), w = F("fm-button"), $ = F("fm-side-sheet");
|
|
183
183
|
return M(), P(W, null, [
|
|
184
|
-
U(
|
|
185
|
-
|
|
184
|
+
U(l.$slots, "default", { trigger: b }),
|
|
185
|
+
c($, {
|
|
186
186
|
id: "group-form",
|
|
187
|
-
modelValue:
|
|
188
|
-
"onUpdate:modelValue":
|
|
187
|
+
modelValue: u.value,
|
|
188
|
+
"onUpdate:modelValue": o[4] || (o[4] = (p) => u.value = p),
|
|
189
189
|
"is-container": i(Z).FmForm,
|
|
190
190
|
"is-container-props": {
|
|
191
|
-
onValidationSuccess:
|
|
191
|
+
onValidationSuccess: t,
|
|
192
192
|
blameFormChildOnValidationFailed: !0
|
|
193
193
|
},
|
|
194
194
|
"max-width": 560,
|
|
195
195
|
"onOn:clickedAway": i(e)
|
|
196
196
|
}, {
|
|
197
197
|
"side-sheet-header": g(() => [
|
|
198
|
-
D("p", le, Y(
|
|
198
|
+
D("p", le, Y(_.value), 1)
|
|
199
199
|
]),
|
|
200
200
|
"side-sheet-footer": g(() => [
|
|
201
|
-
D("div",
|
|
202
|
-
|
|
203
|
-
label: i(
|
|
201
|
+
D("div", ne, [
|
|
202
|
+
c(w, {
|
|
203
|
+
label: i(ae)(i(n)(`menu.common.actions.${l.action}`)),
|
|
204
204
|
loading: V.value,
|
|
205
205
|
size: "lg",
|
|
206
206
|
type: "submit",
|
|
207
207
|
variant: "primary"
|
|
208
208
|
}, null, 8, ["label", "loading"]),
|
|
209
|
-
|
|
209
|
+
c(w, {
|
|
210
210
|
label: i(n)("menu.common.actions.cancel"),
|
|
211
211
|
size: "lg",
|
|
212
212
|
variant: "tertiary",
|
|
213
|
-
onClick:
|
|
213
|
+
onClick: o[3] || (o[3] = () => u.value = !1)
|
|
214
214
|
}, null, 8, ["label"])
|
|
215
215
|
])
|
|
216
216
|
]),
|
|
217
217
|
default: g(() => [
|
|
218
|
-
D("div",
|
|
219
|
-
|
|
218
|
+
D("div", oe, [
|
|
219
|
+
c(G, null, {
|
|
220
220
|
default: g(() => {
|
|
221
221
|
var p;
|
|
222
222
|
return [
|
|
223
|
-
|
|
224
|
-
modelValue:
|
|
225
|
-
"onUpdate:modelValue":
|
|
226
|
-
disabled: !
|
|
223
|
+
c(E, {
|
|
224
|
+
modelValue: s.value.name,
|
|
225
|
+
"onUpdate:modelValue": o[0] || (o[0] = (h) => s.value.name = h),
|
|
226
|
+
disabled: !x.value.name,
|
|
227
227
|
rules: [
|
|
228
228
|
(h) => !!h || i(n)("menu.common.validation.required", {
|
|
229
229
|
field: i(n)("menu.takeaway.columns.title").toLowerCase()
|
|
@@ -235,12 +235,12 @@ const le = { class: "fm-typo-en-title-md-600" }, ne = { class: "space-y-32" }, o
|
|
|
235
235
|
required: "",
|
|
236
236
|
title: i(n)("menu.takeaway.columns.title")
|
|
237
237
|
}, null, 8, ["modelValue", "disabled", "rules", "label", "placeholder", "title"]),
|
|
238
|
-
|
|
239
|
-
modelValue:
|
|
240
|
-
"onUpdate:modelValue":
|
|
238
|
+
c(te, {
|
|
239
|
+
modelValue: s.value.price,
|
|
240
|
+
"onUpdate:modelValue": o[1] || (o[1] = (h) => s.value.price = h),
|
|
241
241
|
min: 0,
|
|
242
|
-
nullable: !!
|
|
243
|
-
placeholder: (p =
|
|
242
|
+
nullable: !!l.fallback,
|
|
243
|
+
placeholder: (p = l.fallback) != null && p.price ? i(ee)(l.fallback.price, !1) : void 0,
|
|
244
244
|
label: i(n)("menu.takeaway.columns.price"),
|
|
245
245
|
"show-currency": "",
|
|
246
246
|
title: i(n)("menu.takeaway.columns.price")
|
|
@@ -249,11 +249,11 @@ const le = { class: "fm-typo-en-title-md-600" }, ne = { class: "space-y-32" }, o
|
|
|
249
249
|
}),
|
|
250
250
|
_: 1
|
|
251
251
|
}),
|
|
252
|
-
|
|
252
|
+
l.applyProduct ? (M(), N(Q, {
|
|
253
253
|
key: 0,
|
|
254
|
-
overrides:
|
|
255
|
-
"onUpdate:overrides":
|
|
256
|
-
"select-variant":
|
|
254
|
+
overrides: s.value.usedBy,
|
|
255
|
+
"onUpdate:overrides": o[2] || (o[2] = (p) => s.value.usedBy = p),
|
|
256
|
+
"select-variant": l.bindToVariant,
|
|
257
257
|
editable: "",
|
|
258
258
|
title: i(n)("menu.common.labels.product")
|
|
259
259
|
}, null, 8, ["overrides", "select-variant", "title"])) : j("", !0)
|
|
@@ -267,7 +267,7 @@ const le = { class: "fm-typo-en-title-md-600" }, ne = { class: "space-y-32" }, o
|
|
|
267
267
|
}), ke = ie;
|
|
268
268
|
export {
|
|
269
269
|
ke as T,
|
|
270
|
-
|
|
270
|
+
te as _,
|
|
271
271
|
ie as a,
|
|
272
272
|
be as l
|
|
273
273
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as W, ref as A, resolveComponent as v, createElementBlock as E, openBlock as I, Fragment as B, createElementVNode as g, createVNode as c, normalizeClass as T, withCtx as _, toDisplayString as S, unref as i, h as G, watch as O, onMounted as K, nextTick as M, readonly as N, getCurrentInstance as U, getCurrentScope as L, onScopeDispose as $ } from "vue";
|
|
2
2
|
import { useI18n as q, useCustomAttributes as H, useCoreStore as J } from "@feedmepos/mf-common";
|
|
3
3
|
import { components as Q } from "@feedmepos/ui-library";
|
|
4
|
-
import { d as X, _ as k } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { d as X, _ as k } from "./RuleView.vue_vue_type_script_setup_true_lang-fp_IdVVZ.js";
|
|
5
5
|
const Y = {
|
|
6
6
|
class: /* @__PURE__ */ T(["fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap", "text-fm-color-neutral-gray-400"])
|
|
7
7
|
}, Z = {
|
|
@@ -38,8 +38,8 @@ const Y = {
|
|
|
38
38
|
header: () => t("portalshell.customAttributes.form.value"),
|
|
39
39
|
accessorKey: "values",
|
|
40
40
|
enableSorting: !1,
|
|
41
|
-
cell: (
|
|
42
|
-
const s =
|
|
41
|
+
cell: (f) => {
|
|
42
|
+
const s = f.row.original, u = s.values;
|
|
43
43
|
return G(Q.FmSelect, {
|
|
44
44
|
modelValue: s.value,
|
|
45
45
|
placeholder: t("portalshell.customAttributes.form.valuePlaceholder"),
|
|
@@ -53,38 +53,38 @@ const Y = {
|
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
}], m = n;
|
|
56
|
-
function b(
|
|
57
|
-
return
|
|
56
|
+
function b(f) {
|
|
57
|
+
return f.reduce((s, u) => (u.value != null && (s[u.key] = u.value), s), {});
|
|
58
58
|
}
|
|
59
59
|
const h = () => {
|
|
60
|
-
const
|
|
61
|
-
restaurantCustomAttributes: b(
|
|
60
|
+
const f = r.value.filter((l) => l.value != null), s = a.value.filter((l) => l.value != null), u = {
|
|
61
|
+
restaurantCustomAttributes: b(f),
|
|
62
62
|
restaurantAttributes: b(s)
|
|
63
63
|
};
|
|
64
64
|
m("confirm", u), C();
|
|
65
|
-
},
|
|
65
|
+
}, p = A(!1);
|
|
66
66
|
function w() {
|
|
67
67
|
var u, l;
|
|
68
|
-
|
|
69
|
-
const
|
|
70
|
-
r.value.forEach((
|
|
71
|
-
|
|
68
|
+
p.value = !0;
|
|
69
|
+
const f = ((u = o.currentRestaurantAttrParams) == null ? void 0 : u.restaurantCustomAttributes) ?? {};
|
|
70
|
+
r.value.forEach((d) => {
|
|
71
|
+
d.value = f[d.key] ?? void 0;
|
|
72
72
|
});
|
|
73
73
|
const s = ((l = o.currentRestaurantAttrParams) == null ? void 0 : l.restaurantAttributes) ?? {};
|
|
74
|
-
a.value.forEach((
|
|
75
|
-
|
|
74
|
+
a.value.forEach((d) => {
|
|
75
|
+
d.value = s[d.key] ?? void 0;
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
function C() {
|
|
79
|
-
|
|
79
|
+
p.value = !1;
|
|
80
80
|
}
|
|
81
|
-
return (
|
|
82
|
-
const u = v("FmIcon"), l = v("FmChip"),
|
|
81
|
+
return (f, s) => {
|
|
82
|
+
const u = v("FmIcon"), l = v("FmChip"), d = v("FmTable"), V = v("FmSpacer"), F = v("fm-button"), j = v("FmDialog");
|
|
83
83
|
return I(), E(B, null, [g("div", {
|
|
84
84
|
class: "cursor-pointer",
|
|
85
85
|
onClick: w
|
|
86
86
|
}, [c(l, {
|
|
87
|
-
class: T([
|
|
87
|
+
class: T([f.fullWidth ? "w-full justify-between" : ""])
|
|
88
88
|
}, {
|
|
89
89
|
default: _(() => [g("div", Y, S(i(t)("menu.catalog.form.restaurant_attributes_title")), 1), c(u, {
|
|
90
90
|
color: "neutral-gray-400",
|
|
@@ -93,8 +93,8 @@ const Y = {
|
|
|
93
93
|
})]),
|
|
94
94
|
_: 1
|
|
95
95
|
}, 8, ["class"])]), c(j, {
|
|
96
|
-
modelValue:
|
|
97
|
-
"onUpdate:modelValue": s[0] || (s[0] = (R) =>
|
|
96
|
+
modelValue: p.value,
|
|
97
|
+
"onUpdate:modelValue": s[0] || (s[0] = (R) => p.value = R),
|
|
98
98
|
overlay: !0,
|
|
99
99
|
"min-width": "min(calc(100% - 48px), 560px)"
|
|
100
100
|
}, {
|
|
@@ -114,7 +114,7 @@ const Y = {
|
|
|
114
114
|
default: _(() => [g("div", ee, [c(k, {
|
|
115
115
|
title: i(t)("menu.link_product.rules.restaurant_custom_attributes_filter")
|
|
116
116
|
}, {
|
|
117
|
-
default: _(() => [c(
|
|
117
|
+
default: _(() => [c(d, {
|
|
118
118
|
"column-defs": y,
|
|
119
119
|
"row-data": i(r),
|
|
120
120
|
"shrink-at": !1,
|
|
@@ -125,7 +125,7 @@ const Y = {
|
|
|
125
125
|
}, 8, ["title"]), c(k, {
|
|
126
126
|
title: i(t)("menu.link_product.rules.restaurant_filter")
|
|
127
127
|
}, {
|
|
128
|
-
default: _(() => [c(
|
|
128
|
+
default: _(() => [c(d, {
|
|
129
129
|
"column-defs": y,
|
|
130
130
|
"row-data": i(a),
|
|
131
131
|
"shrink-at": !1,
|
|
@@ -145,9 +145,9 @@ function fe(e) {
|
|
|
145
145
|
function x(e) {
|
|
146
146
|
return typeof e == "function" ? e() : i(e);
|
|
147
147
|
}
|
|
148
|
-
const
|
|
148
|
+
const pe = typeof window < "u" && typeof document < "u";
|
|
149
149
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
150
|
-
const te = Object.prototype.toString,
|
|
150
|
+
const te = Object.prototype.toString, de = (e) => te.call(e) === "[object Object]", D = () => {
|
|
151
151
|
};
|
|
152
152
|
function P(e, n) {
|
|
153
153
|
function o(...t) {
|
|
@@ -165,11 +165,11 @@ function ne(e, n = {}) {
|
|
|
165
165
|
};
|
|
166
166
|
return (m) => {
|
|
167
167
|
const b = x(e), h = x(n.maxWait);
|
|
168
|
-
return o && a(o), b <= 0 || h !== void 0 && h <= 0 ? (t && (a(t), t = null), Promise.resolve(m())) : new Promise((
|
|
169
|
-
r = n.rejectOnCancel ? w :
|
|
170
|
-
o && a(o), t = null,
|
|
168
|
+
return o && a(o), b <= 0 || h !== void 0 && h <= 0 ? (t && (a(t), t = null), Promise.resolve(m())) : new Promise((p, w) => {
|
|
169
|
+
r = n.rejectOnCancel ? w : p, h && !t && (t = setTimeout(() => {
|
|
170
|
+
o && a(o), t = null, p(m());
|
|
171
171
|
}, h)), o = setTimeout(() => {
|
|
172
|
-
t && a(t), t = null,
|
|
172
|
+
t && a(t), t = null, p(m());
|
|
173
173
|
}, b);
|
|
174
174
|
});
|
|
175
175
|
};
|
|
@@ -237,8 +237,8 @@ export {
|
|
|
237
237
|
me as _,
|
|
238
238
|
ve as a,
|
|
239
239
|
fe as b,
|
|
240
|
-
|
|
241
|
-
|
|
240
|
+
de as c,
|
|
241
|
+
pe as i,
|
|
242
242
|
D as n,
|
|
243
243
|
be as r,
|
|
244
244
|
x as t,
|