@feedmepos/mf-menu 0.32.43-dev.1 → 0.32.44
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-CiqMdAvF.js → App-BXkiQoTM.js} +7 -7
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-CVs7MfmX.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BoSL4dm7.js} +3 -3
- package/dist/{Catalog-KzftKfOt.js → Catalog-CLFVLyor.js} +44 -44
- package/dist/{Category-pNQdkIvn.js → Category-BdyouDU8.js} +24 -24
- package/dist/{Category-em6K5yk3.js → Category-CNuVHuI3.js} +25 -25
- package/dist/{CookingGuide-Bp9CvTAi.js → CookingGuide-Bed7bUt1.js} +105 -105
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-BbsxEs6O.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CZDL2xJC.js} +1 -1
- package/dist/{Group-mIwdwq58.js → Group-D4UTsIxI.js} +3 -3
- package/dist/{Group-eE_snSRq.js → Group-TUqCPmO3.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-C5l4ycJB.js → Group.vue_vue_type_script_setup_true_lang-BJPT8flL.js} +19 -19
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B4PznWDZ.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D83liryu.js} +30 -30
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-eS8pMvVG.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CRIRinHB.js} +1651 -1652
- package/dist/{Ingredient-BNvYYdb5.js → Ingredient-CcxoeuDd.js} +20 -20
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CzQIddna.js → InventoryBinding.vue_vue_type_script_setup_true_lang-58tyxdVh.js} +2 -2
- package/dist/{LinkProductSideSheet-BQQtUuCr.js → LinkProductSideSheet-DazOkwkd.js} +45 -45
- package/dist/{MenuSetting-s9syqMsT.js → MenuSetting-B3oLll4C.js} +47 -47
- package/dist/{PrintRoute-BqMxtnus.js → PrintRoute-D878qPu8.js} +39 -39
- package/dist/{Product-CHhpb-2E.js → Product-DOC8y_mW.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-DHny0uGc.js → Product.vue_vue_type_script_setup_true_lang-tZyBhWYT.js} +140 -140
- package/dist/{ProductInternalTools-DEB8Xhnv.js → ProductInternalTools-9TgIc2bR.js} +66 -66
- package/dist/Products-DfUGnHmD.js +1568 -0
- package/dist/{Publish-tnJY6n8r.js → Publish-BktK_PKq.js} +29 -29
- package/dist/{Recipe-DDPXv3AU.js → Recipe-eA0xrGYk.js} +24 -24
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-roEHTZnU.js → RuleView.vue_vue_type_script_setup_true_lang-t8M7z09s.js} +366 -366
- package/dist/{Scheduler-CMKwUkNN.js → Scheduler-CKSqPZLQ.js} +11 -11
- package/dist/{ServingSequence-NA0yeDMF.js → ServingSequence-Ea20baNj.js} +44 -44
- package/dist/{Setting-BRfi_hxY.js → Setting-u6lX_Dzg.js} +17 -17
- package/dist/{Subcategory-W9faZY7n.js → Subcategory-C6s7OMOb.js} +51 -51
- package/dist/{Takeaway-fijUedLA.js → Takeaway-B9kr-Nf4.js} +13 -13
- package/dist/{Takeaway-5DKxdpZ3.js → Takeaway-lWxS9oWe.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BhiFnON_.js → Takeaway.vue_vue_type_script_setup_true_lang-oA0e9oI5.js} +54 -54
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-BUNPf1OD.js → Thumbnail.vue_vue_type_script_setup_true_lang-T40ChY7j.js} +27 -27
- package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-CcIGCUwk.js +194 -0
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B1e3d-uX.js +6130 -0
- package/dist/{Unit-582FVjPq.js → Unit-DkQlUg2l.js} +8 -8
- package/dist/{Variant-Cb02SmoL.js → Variant-BF5r2WLL.js} +25 -25
- package/dist/{_id_-BYU1xwzB.js → _id_-_oqk-OhC.js} +28 -28
- package/dist/app-CfCYl2pO.js +363 -0
- package/dist/{app-CcPyLfvj.js → app-DIYHNWEw.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-C1DHqpkR.js → linked-status-AoXjo9FF.js} +5 -5
- package/dist/assets/{menu-export-Ci-MXpn1.js → menu-export-BHcaWhM3.js} +2 -2
- package/dist/assets/{override-menu-CajXgOdO.js → override-menu-B9xQcjuJ.js} +5 -5
- package/dist/assets/{validate-menu-DDPswAia.js → validate-menu-D-ezd4W8.js} +2 -2
- package/dist/{catalog-Bs3SNL7n.js → catalog-CvN9Wu8V.js} +1 -1
- package/dist/{catalogSetting-BN4d_FvT.js → catalogSetting-qS5Np22q.js} +1 -1
- package/dist/{currency-Cma3AX0v.js → currency-Nxod6uwl.js} +1 -1
- package/dist/dayjs.min-B1AjAGva.js +6 -0
- package/dist/index-C0Zw1cSS.js +545 -0
- package/dist/{index-3wsuY29D.js → index-Cq-czJjU.js} +31 -31
- package/dist/index-nKlYiotY.js +246 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-DotsunNI.js → index.vue_vue_type_script_setup_true_lang-YXKayPEp.js} +269 -244
- package/dist/{item-DOcT7NVT.js → item-CUZSonzT.js} +2587 -2587
- package/dist/{jszip.min-h2cXUF_-.js → jszip.min-BnkZQ6lD.js} +6 -7
- package/dist/{menu-CAmS3pcT.js → menu-BP_ArXCI.js} +1 -1
- package/dist/{menuV2-COwLB3e1.js → menuV2-BGEYgQ8-.js} +128 -128
- package/dist/{priceTier-DrrQcFCh.js → priceTier-B-Qa0xaO.js} +1 -1
- package/dist/{rules-DGRdKiV6.js → rules-Dchd_ilF.js} +12 -12
- package/dist/{scheduler-BpEV0N8K.js → scheduler-DN7ZGLk8.js} +29 -29
- package/dist/{toExcel-eN1zgiqN.js → toExcel-jHmkDqcm.js} +2 -2
- package/dist/{translation-BCZ1Ruvv.js → translation-Cdap0IVg.js} +21 -35
- package/dist/{unit-BAcozp9s.js → unit-DgL56pkI.js} +35 -35
- package/package.json +2 -2
- package/dist/Products-C7UtJMGZ.js +0 -307
- package/dist/RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-PFRwBb1c.js +0 -144
- package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-DZp38dX4.js +0 -196
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DC4naR16.js +0 -5767
- package/dist/app-0m01R0SM.js +0 -2286
- package/dist/dayjs.min-D-HR3H5W.js +0 -7
- package/dist/index-DXY5zcNA.js +0 -545
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { defineComponent as R, ref as h, computed as _, watch as j, onMounted as ee, onBeforeUnmount as ae, resolveComponent as x, createBlock as
|
|
1
|
+
import { B as $, A as Z, u as G, I as Q, D as A, J as X } from "./index.vue_vue_type_script_setup_true_lang-YXKayPEp.js";
|
|
2
|
+
import { defineComponent as R, ref as h, computed as _, watch as j, onMounted as ee, onBeforeUnmount as ae, resolveComponent as x, createBlock as J, openBlock as L, withModifiers as q, withCtx as k, renderSlot as P, createElementBlock as I, Fragment as K, createVNode as v, unref as i, createElementVNode as U, createCommentVNode as te, renderList as le, toDisplayString as O } from "vue";
|
|
3
3
|
import { useI18n as W } from "@feedmepos/mf-common";
|
|
4
4
|
import { components as ne } from "@feedmepos/ui-library";
|
|
5
|
-
import { _ as oe } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _ as oe } from "./RuleView.vue_vue_type_script_setup_true_lang-t8M7z09s.js";
|
|
6
6
|
import { u as ie } from "./discardConfirm-BHni0LNu.js";
|
|
7
|
-
import { _ as re } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { _ as ue } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-
|
|
7
|
+
import { _ as re } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-BoSL4dm7.js";
|
|
8
|
+
import { _ as ue } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-CcIGCUwk.js";
|
|
9
9
|
import { c as se } from "./check-C9mY6LiX.js";
|
|
10
|
-
import { f as me } from "./currency-
|
|
10
|
+
import { f as me } from "./currency-Nxod6uwl.js";
|
|
11
11
|
import { c as de } from "./string-DpfFixWH.js";
|
|
12
|
-
import { g as
|
|
12
|
+
import { g as z } from "./translation-Cdap0IVg.js";
|
|
13
13
|
const pe = /* @__PURE__ */ R({
|
|
14
14
|
__name: "CurrencyInput",
|
|
15
15
|
props: {
|
|
@@ -79,14 +79,14 @@ const pe = /* @__PURE__ */ R({
|
|
|
79
79
|
n = Number.isNaN(n) ? 0 : n, N("update:model-value", $.Dinero.fromNumber({ number: n }).toObject());
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
const
|
|
82
|
+
const D = _(() => typeof l.min == "number" && l.min >= 0), F = (e) => {
|
|
83
83
|
var n, c, f;
|
|
84
84
|
if (!(e.ctrlKey || e.metaKey)) {
|
|
85
85
|
if (e.key === "Enter") {
|
|
86
86
|
(n = r.value) != null && n.inputEl && s((f = (c = r.value) == null ? void 0 : c.inputEl) == null ? void 0 : f.value);
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
|
-
if (e.key === "-" &&
|
|
89
|
+
if (e.key === "-" && D.value) {
|
|
90
90
|
e.preventDefault();
|
|
91
91
|
return;
|
|
92
92
|
}
|
|
@@ -95,13 +95,13 @@ const pe = /* @__PURE__ */ R({
|
|
|
95
95
|
};
|
|
96
96
|
return ee(() => {
|
|
97
97
|
var e;
|
|
98
|
-
r.value && ((e = r.value.inputEl) == null || e.addEventListener("keydown",
|
|
98
|
+
r.value && ((e = r.value.inputEl) == null || e.addEventListener("keydown", F));
|
|
99
99
|
}), ae(() => {
|
|
100
100
|
var e;
|
|
101
|
-
r.value && ((e = r.value.inputEl) == null || e.removeEventListener("keydown",
|
|
101
|
+
r.value && ((e = r.value.inputEl) == null || e.removeEventListener("keydown", F));
|
|
102
102
|
}), (e, n) => {
|
|
103
103
|
const c = x("fm-text-field");
|
|
104
|
-
return L(),
|
|
104
|
+
return L(), J(c, {
|
|
105
105
|
ref_key: "inputRef",
|
|
106
106
|
ref: r,
|
|
107
107
|
autofocus: l.autofocus,
|
|
@@ -130,7 +130,7 @@ const pe = /* @__PURE__ */ R({
|
|
|
130
130
|
});
|
|
131
131
|
function Le(B) {
|
|
132
132
|
return B.map((g) => ({
|
|
133
|
-
module:
|
|
133
|
+
module: Z.F_MENU_MODULE_V4_KEY.enum.item,
|
|
134
134
|
id: g._id,
|
|
135
135
|
discriminator: g.combinationKey,
|
|
136
136
|
data: void 0
|
|
@@ -147,30 +147,30 @@ const ce = { class: "fm-typo-en-title-md-600" }, fe = { class: "space-y-32" }, v
|
|
|
147
147
|
},
|
|
148
148
|
emits: ["update:takeaway"],
|
|
149
149
|
setup(B, { expose: g, emit: l }) {
|
|
150
|
-
const { t: o } = W(), m = B, E = l, r =
|
|
150
|
+
const { t: o } = W(), m = B, E = l, r = G(), M = _(() => r.rules.takeaway), N = h(!1), u = h(!1), C = h(!1), s = h(void 0), D = (a) => {
|
|
151
151
|
se.isBoolean(a) ? u.value = a : u.value = !u.value;
|
|
152
152
|
};
|
|
153
|
-
function
|
|
153
|
+
function F() {
|
|
154
154
|
var t;
|
|
155
155
|
const a = {
|
|
156
|
-
...
|
|
156
|
+
...A.generator.initMenuV4Takeaway(),
|
|
157
157
|
usedBy: [],
|
|
158
158
|
...Q(m.initialValue ?? {})
|
|
159
159
|
};
|
|
160
160
|
return (t = m.fallback) != null && t.price && (a.price = null), a;
|
|
161
161
|
}
|
|
162
|
-
const e = h(
|
|
162
|
+
const e = h(F()), n = _(() => m.action === "add" ? o("menu.takeaway.add") : o("menu.takeaway.update")), c = _(() => !!e.value.name), f = _(() => {
|
|
163
163
|
var V;
|
|
164
164
|
const a = [], t = "en-US", w = (V = s.value) == null ? void 0 : V[t];
|
|
165
165
|
return e.value.name && !w && a.push({
|
|
166
166
|
locale: t,
|
|
167
167
|
name: e.value.name,
|
|
168
|
-
localeDisplay:
|
|
168
|
+
localeDisplay: z(t)
|
|
169
169
|
}), s.value && Object.entries(s.value).filter(([d, y]) => y && y.trim()).sort(([d], [y]) => d.localeCompare(y)).forEach(([d, y]) => {
|
|
170
170
|
a.push({
|
|
171
171
|
locale: d,
|
|
172
172
|
name: y,
|
|
173
|
-
localeDisplay:
|
|
173
|
+
localeDisplay: z(d)
|
|
174
174
|
});
|
|
175
175
|
}), a;
|
|
176
176
|
});
|
|
@@ -180,13 +180,13 @@ const ce = { class: "fm-typo-en-title-md-600" }, fe = { class: "space-y-32" }, v
|
|
|
180
180
|
function T(a) {
|
|
181
181
|
e.value.name = a;
|
|
182
182
|
}
|
|
183
|
-
const
|
|
183
|
+
const H = ie(
|
|
184
184
|
() => {
|
|
185
185
|
var d;
|
|
186
186
|
const a = !X.isEqual(
|
|
187
187
|
e.value,
|
|
188
188
|
m.initialValue || {
|
|
189
|
-
...
|
|
189
|
+
...A.generator.initMenuV4Takeaway(),
|
|
190
190
|
usedBy: []
|
|
191
191
|
}
|
|
192
192
|
), t = ((d = m.initialValue) == null ? void 0 : d.name_locale) || {}, w = s.value || {}, V = JSON.stringify(t) !== JSON.stringify(w);
|
|
@@ -194,36 +194,36 @@ const ce = { class: "fm-typo-en-title-md-600" }, fe = { class: "space-y-32" }, v
|
|
|
194
194
|
},
|
|
195
195
|
() => u.value = !1
|
|
196
196
|
);
|
|
197
|
-
function
|
|
197
|
+
function Y() {
|
|
198
198
|
E("update:takeaway", {
|
|
199
199
|
...e.value,
|
|
200
200
|
...s.value && { name_locale: s.value }
|
|
201
|
-
}),
|
|
201
|
+
}), D(!1);
|
|
202
202
|
}
|
|
203
203
|
return j(
|
|
204
204
|
() => u.value,
|
|
205
205
|
() => {
|
|
206
206
|
var a;
|
|
207
|
-
u.value && (e.value =
|
|
207
|
+
u.value && (e.value = F(), s.value = (a = m.initialValue) == null ? void 0 : a.name_locale);
|
|
208
208
|
}
|
|
209
209
|
), g({
|
|
210
|
-
trigger:
|
|
210
|
+
trigger: D,
|
|
211
211
|
show: u
|
|
212
212
|
}), (a, t) => {
|
|
213
213
|
const w = x("fm-button"), V = x("FmTooltip"), d = x("fm-text-field"), y = x("fm-side-sheet");
|
|
214
|
-
return L(), I(
|
|
215
|
-
P(a.$slots, "default", { trigger:
|
|
214
|
+
return L(), I(K, null, [
|
|
215
|
+
P(a.$slots, "default", { trigger: D }),
|
|
216
216
|
v(y, {
|
|
217
217
|
id: "group-form",
|
|
218
218
|
modelValue: u.value,
|
|
219
219
|
"onUpdate:modelValue": t[5] || (t[5] = (b) => u.value = b),
|
|
220
220
|
"is-container": i(ne).FmForm,
|
|
221
221
|
"is-container-props": {
|
|
222
|
-
onValidationSuccess:
|
|
222
|
+
onValidationSuccess: Y,
|
|
223
223
|
blameFormChildOnValidationFailed: !0
|
|
224
224
|
},
|
|
225
225
|
"max-width": 560,
|
|
226
|
-
"onOn:clickedAway": i(
|
|
226
|
+
"onOn:clickedAway": i(H)
|
|
227
227
|
}, {
|
|
228
228
|
"side-sheet-header": k(() => [
|
|
229
229
|
U("p", ce, O(n.value), 1)
|
|
@@ -274,7 +274,7 @@ const ce = { class: "fm-typo-en-title-md-600" }, fe = { class: "space-y-32" }, v
|
|
|
274
274
|
}, {
|
|
275
275
|
content: k(() => [
|
|
276
276
|
U("div", ve, [
|
|
277
|
-
(L(!0), I(
|
|
277
|
+
(L(!0), I(K, null, le(f.value, (p) => (L(), I("div", {
|
|
278
278
|
key: p.locale
|
|
279
279
|
}, O(p.name) + " (" + O(p.localeDisplay) + ") ", 1))), 128))
|
|
280
280
|
])
|
|
@@ -306,7 +306,7 @@ const ce = { class: "fm-typo-en-title-md-600" }, fe = { class: "space-y-32" }, v
|
|
|
306
306
|
}),
|
|
307
307
|
_: 1
|
|
308
308
|
}),
|
|
309
|
-
a.applyProduct ? (L(),
|
|
309
|
+
a.applyProduct ? (L(), J(re, {
|
|
310
310
|
key: 0,
|
|
311
311
|
overrides: e.value.usedBy,
|
|
312
312
|
"onUpdate:overrides": t[3] || (t[3] = (b) => e.value.usedBy = b),
|
|
@@ -0,0 +1,246 @@
|
|
|
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
|
+
import { useI18n as q, useCustomAttributes as H, useCoreStore as J } from "@feedmepos/mf-common";
|
|
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-t8M7z09s.js";
|
|
5
|
+
const Y = {
|
|
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
|
+
}, Z = {
|
|
8
|
+
class: "fm-typo-en-title-sm-600"
|
|
9
|
+
}, ee = {
|
|
10
|
+
class: "max-h-[60vh] flex-1 overflow-y-auto min-h-0"
|
|
11
|
+
}, me = /* @__PURE__ */ W({
|
|
12
|
+
__name: "RestaurantAttributesSelector",
|
|
13
|
+
props: {
|
|
14
|
+
fullWidth: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: !1
|
|
17
|
+
},
|
|
18
|
+
currentRestaurantAttrParams: {}
|
|
19
|
+
},
|
|
20
|
+
emits: ["confirm"],
|
|
21
|
+
setup(e, {
|
|
22
|
+
emit: n
|
|
23
|
+
}) {
|
|
24
|
+
const o = e, {
|
|
25
|
+
t
|
|
26
|
+
} = q(), {
|
|
27
|
+
attributes: r
|
|
28
|
+
} = H({
|
|
29
|
+
valueSource: J().restaurants,
|
|
30
|
+
entity: "restaurant"
|
|
31
|
+
}), {
|
|
32
|
+
restaurantAttributes: a
|
|
33
|
+
} = X(), y = [{
|
|
34
|
+
header: () => t("portalshell.customAttributes.form.key"),
|
|
35
|
+
accessorKey: "key",
|
|
36
|
+
enableSorting: !1
|
|
37
|
+
}, {
|
|
38
|
+
header: () => t("portalshell.customAttributes.form.value"),
|
|
39
|
+
accessorKey: "values",
|
|
40
|
+
enableSorting: !1,
|
|
41
|
+
cell: (f) => {
|
|
42
|
+
const s = f.row.original, u = s.values;
|
|
43
|
+
return G(Q.FmSelect, {
|
|
44
|
+
modelValue: s.value,
|
|
45
|
+
placeholder: t("portalshell.customAttributes.form.valuePlaceholder"),
|
|
46
|
+
items: u.map((l) => ({
|
|
47
|
+
label: l,
|
|
48
|
+
value: l
|
|
49
|
+
})),
|
|
50
|
+
clearable: !0,
|
|
51
|
+
searchable: !0,
|
|
52
|
+
"onUpdate:modelValue": (l) => s.value = l
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}], m = n;
|
|
56
|
+
function b(f) {
|
|
57
|
+
return f.reduce((s, u) => (u.value != null && (s[u.key] = u.value), s), {});
|
|
58
|
+
}
|
|
59
|
+
const h = () => {
|
|
60
|
+
const f = r.value.filter((l) => l.value != null), s = a.value.filter((l) => l.value != null), u = {
|
|
61
|
+
restaurantCustomAttributes: b(f),
|
|
62
|
+
restaurantAttributes: b(s)
|
|
63
|
+
};
|
|
64
|
+
m("confirm", u), C();
|
|
65
|
+
}, p = A(!1);
|
|
66
|
+
function w() {
|
|
67
|
+
var u, l;
|
|
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
|
+
});
|
|
73
|
+
const s = ((l = o.currentRestaurantAttrParams) == null ? void 0 : l.restaurantAttributes) ?? {};
|
|
74
|
+
a.value.forEach((d) => {
|
|
75
|
+
d.value = s[d.key] ?? void 0;
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function C() {
|
|
79
|
+
p.value = !1;
|
|
80
|
+
}
|
|
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
|
+
return I(), E(B, null, [g("div", {
|
|
84
|
+
class: "cursor-pointer",
|
|
85
|
+
onClick: w
|
|
86
|
+
}, [c(l, {
|
|
87
|
+
class: T([f.fullWidth ? "w-full justify-between" : ""])
|
|
88
|
+
}, {
|
|
89
|
+
default: _(() => [g("div", Y, S(i(t)("menu.catalog.form.restaurant_attributes_title")), 1), c(u, {
|
|
90
|
+
color: "neutral-gray-400",
|
|
91
|
+
name: "launch",
|
|
92
|
+
size: "sm"
|
|
93
|
+
})]),
|
|
94
|
+
_: 1
|
|
95
|
+
}, 8, ["class"])]), c(j, {
|
|
96
|
+
modelValue: p.value,
|
|
97
|
+
"onUpdate:modelValue": s[0] || (s[0] = (R) => p.value = R),
|
|
98
|
+
overlay: !0,
|
|
99
|
+
"min-width": "min(calc(100% - 48px), 560px)"
|
|
100
|
+
}, {
|
|
101
|
+
"dialog-header": _(() => [g("div", Z, S(i(t)("menu.catalog.form.restaurant_attributes_title")), 1)]),
|
|
102
|
+
"dialog-footer": _(() => [c(V), c(F, {
|
|
103
|
+
label: i(t)("menu.common.actions.confirm"),
|
|
104
|
+
size: "lg",
|
|
105
|
+
type: "submit",
|
|
106
|
+
variant: "primary",
|
|
107
|
+
onClick: h
|
|
108
|
+
}, null, 8, ["label"]), c(F, {
|
|
109
|
+
label: i(t)("menu.common.actions.cancel"),
|
|
110
|
+
size: "lg",
|
|
111
|
+
variant: "tertiary",
|
|
112
|
+
onClick: C
|
|
113
|
+
}, null, 8, ["label"])]),
|
|
114
|
+
default: _(() => [g("div", ee, [c(k, {
|
|
115
|
+
title: i(t)("menu.link_product.rules.restaurant_custom_attributes_filter")
|
|
116
|
+
}, {
|
|
117
|
+
default: _(() => [c(d, {
|
|
118
|
+
"column-defs": y,
|
|
119
|
+
"row-data": i(r),
|
|
120
|
+
"shrink-at": !1,
|
|
121
|
+
"page-size": i(r).length,
|
|
122
|
+
"hide-footer": ""
|
|
123
|
+
}, null, 8, ["row-data", "page-size"])]),
|
|
124
|
+
_: 1
|
|
125
|
+
}, 8, ["title"]), c(k, {
|
|
126
|
+
title: i(t)("menu.link_product.rules.restaurant_filter")
|
|
127
|
+
}, {
|
|
128
|
+
default: _(() => [c(d, {
|
|
129
|
+
"column-defs": y,
|
|
130
|
+
"row-data": i(a),
|
|
131
|
+
"shrink-at": !1,
|
|
132
|
+
"page-size": i(a).length,
|
|
133
|
+
"hide-footer": ""
|
|
134
|
+
}, null, 8, ["row-data", "page-size"])]),
|
|
135
|
+
_: 1
|
|
136
|
+
}, 8, ["title"])])]),
|
|
137
|
+
_: 1
|
|
138
|
+
}, 8, ["modelValue"])], 64);
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
function fe(e) {
|
|
143
|
+
return L() ? ($(e), !0) : !1;
|
|
144
|
+
}
|
|
145
|
+
function x(e) {
|
|
146
|
+
return typeof e == "function" ? e() : i(e);
|
|
147
|
+
}
|
|
148
|
+
const pe = typeof window < "u" && typeof document < "u";
|
|
149
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
150
|
+
const te = Object.prototype.toString, de = (e) => te.call(e) === "[object Object]", D = () => {
|
|
151
|
+
};
|
|
152
|
+
function P(e, n) {
|
|
153
|
+
function o(...t) {
|
|
154
|
+
return new Promise((r, a) => {
|
|
155
|
+
Promise.resolve(e(() => n.apply(this, t), { fn: n, thisArg: this, args: t })).then(r).catch(a);
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
return o;
|
|
159
|
+
}
|
|
160
|
+
const z = (e) => e();
|
|
161
|
+
function ne(e, n = {}) {
|
|
162
|
+
let o, t, r = D;
|
|
163
|
+
const a = (m) => {
|
|
164
|
+
clearTimeout(m), r(), r = D;
|
|
165
|
+
};
|
|
166
|
+
return (m) => {
|
|
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((p, w) => {
|
|
169
|
+
r = n.rejectOnCancel ? w : p, h && !t && (t = setTimeout(() => {
|
|
170
|
+
o && a(o), t = null, p(m());
|
|
171
|
+
}, h)), o = setTimeout(() => {
|
|
172
|
+
t && a(t), t = null, p(m());
|
|
173
|
+
}, b);
|
|
174
|
+
});
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
function oe(e = z) {
|
|
178
|
+
const n = A(!0);
|
|
179
|
+
function o() {
|
|
180
|
+
n.value = !1;
|
|
181
|
+
}
|
|
182
|
+
function t() {
|
|
183
|
+
n.value = !0;
|
|
184
|
+
}
|
|
185
|
+
const r = (...a) => {
|
|
186
|
+
n.value && e(...a);
|
|
187
|
+
};
|
|
188
|
+
return { isActive: N(n), pause: o, resume: t, eventFilter: r };
|
|
189
|
+
}
|
|
190
|
+
function re(e) {
|
|
191
|
+
return U();
|
|
192
|
+
}
|
|
193
|
+
function ae(e, n = 200, o = {}) {
|
|
194
|
+
return P(
|
|
195
|
+
ne(n, o),
|
|
196
|
+
e
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
function be(e, n = 200, o = {}) {
|
|
200
|
+
const t = A(e.value), r = ae(() => {
|
|
201
|
+
t.value = e.value;
|
|
202
|
+
}, n, o);
|
|
203
|
+
return O(e, () => r()), t;
|
|
204
|
+
}
|
|
205
|
+
function se(e, n, o = {}) {
|
|
206
|
+
const {
|
|
207
|
+
eventFilter: t = z,
|
|
208
|
+
...r
|
|
209
|
+
} = o;
|
|
210
|
+
return O(
|
|
211
|
+
e,
|
|
212
|
+
P(
|
|
213
|
+
t,
|
|
214
|
+
n
|
|
215
|
+
),
|
|
216
|
+
r
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
function he(e, n, o = {}) {
|
|
220
|
+
const {
|
|
221
|
+
eventFilter: t,
|
|
222
|
+
...r
|
|
223
|
+
} = o, { eventFilter: a, pause: y, resume: m, isActive: b } = oe(t);
|
|
224
|
+
return { stop: se(
|
|
225
|
+
e,
|
|
226
|
+
n,
|
|
227
|
+
{
|
|
228
|
+
...r,
|
|
229
|
+
eventFilter: a
|
|
230
|
+
}
|
|
231
|
+
), pause: y, resume: m, isActive: b };
|
|
232
|
+
}
|
|
233
|
+
function ve(e, n = !0, o) {
|
|
234
|
+
re() ? K(e, o) : n ? e() : M(e);
|
|
235
|
+
}
|
|
236
|
+
export {
|
|
237
|
+
me as _,
|
|
238
|
+
ve as a,
|
|
239
|
+
fe as b,
|
|
240
|
+
de as c,
|
|
241
|
+
pe as i,
|
|
242
|
+
D as n,
|
|
243
|
+
be as r,
|
|
244
|
+
x as t,
|
|
245
|
+
he as w
|
|
246
|
+
};
|