@feedmepos/mf-menu 0.31.73 → 0.31.74
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-C9BJVGXE.js → App-B6Hn5Wwr.js} +7 -7
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-D5ZzRvQv.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CqGU3bJQ.js} +3 -3
- package/dist/{Catalog--QgvDSuo.js → Catalog-D-2hDU2I.js} +6 -6
- package/dist/{Category-nx2UEJ-W.js → Category-DjTbuAvE.js} +4 -4
- package/dist/{Category-oTrXvIjH.js → Category-hSOIgBkH.js} +6 -6
- package/dist/{CookingGuide-BwBvwfQh.js → CookingGuide-D7ruB7eP.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-C2sGhPv3.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-mxVSGXAz.js} +1 -1
- package/dist/{Group-i-0yKTGl.js → Group-CjlhbhDV.js} +1 -1
- package/dist/{Group-CDZenzP_.js → Group-evJZbgZn.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-BPzuT1Vb.js → Group.vue_vue_type_script_setup_true_lang-DiKraPiw.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B7Ec95lc.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BYku8MAc.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CA1541eR.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DScxctPb.js} +7 -7
- package/dist/{Ingredient-DxllB9CA.js → Ingredient-jNDx1pUw.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-D70_L5Si.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CuM_k-C3.js} +2 -2
- package/dist/{LinkProductSideSheet-B5Di8NBz.js → LinkProductSideSheet-CAPIdf6P.js} +3 -3
- package/dist/{MenuSetting-DNeQl0Ix.js → MenuSetting-C2MDgy57.js} +5 -5
- package/dist/{PrintRoute-BDpqZ5NG.js → PrintRoute-SmWbKr9Y.js} +4 -4
- package/dist/{Product-l0NtL-4b.js → Product-BCm49V9T.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-BGurqd5j.js → Product.vue_vue_type_script_setup_true_lang-CTOjLqbF.js} +13 -13
- package/dist/{ProductInternalTools-BX3wloTv.js → ProductInternalTools-DGsvvnIs.js} +5 -5
- package/dist/{Products-BnSzKAnH.js → Products-D4qeSEfO.js} +11 -11
- package/dist/{Publish-FteASYtL.js → Publish-3A3EEQ9x.js} +3 -3
- package/dist/{Recipe-B0Rtfsr1.js → Recipe-CS7TZGA6.js} +4 -4
- package/dist/{Scheduler-B6H7c0ys.js → Scheduler-BIwTUJMJ.js} +3 -3
- package/dist/{ServingSequence-CNM2jHUA.js → ServingSequence-C0N8wJfr.js} +3 -3
- package/dist/{Setting-CRd5MJU8.js → Setting-fA6tvQK2.js} +5 -5
- package/dist/{Subcategory-WiWFVaSW.js → Subcategory-BAFAmflQ.js} +4 -4
- package/dist/{Takeaway-D4QFumZG.js → Takeaway-CLZouw1j.js} +1 -1
- package/dist/{Takeaway-Dz3W_LuO.js → Takeaway-D4aO8zzN.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-z81IGPlP.js → Takeaway.vue_vue_type_script_setup_true_lang-1oN-i9bo.js} +5 -5
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-Cd0HrXWO.js → Thumbnail.vue_vue_type_script_setup_true_lang-Dwol_Lkd.js} +4 -4
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CEh7j-rN.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CabQS55D.js} +169 -168
- package/dist/{Unit-Bj-W5RXm.js → Unit-ByqUb4Po.js} +2 -2
- package/dist/{Variant-BFn2aZeF.js → Variant-BmqrUfen.js} +3 -3
- package/dist/{_id_-AT7jxwVE.js → _id_-RUWzOB0B.js} +10 -10
- package/dist/{app-Dd_KnIqm.js → app-B1N2F0j8.js} +1 -1
- package/dist/{app-DNxrzHiq.js → app-CHpw_EM1.js} +26 -26
- package/dist/app.js +1 -1
- package/dist/assets/{linked-status-Be2uepOA.js → linked-status-CFdi7K3K.js} +2 -2
- package/dist/assets/{override-menu-BNzx1e7q.js → override-menu-CXOY8i3w.js} +2 -2
- package/dist/assets/{validate-menu-1m_f_apm.js → validate-menu-DLlrsx2f.js} +2 -2
- package/dist/{catalog-V8dAzNBn.js → catalog-CarmtheV.js} +1 -1
- package/dist/{catalogSetting-BC5IqMYN.js → catalogSetting-BqrTpBP8.js} +1 -1
- package/dist/{category-CGuw37sm.js → category-5R83ypNS.js} +1 -1
- package/dist/{currency-DoEQzitl.js → currency-CUl4r9rT.js} +1 -1
- package/dist/{customAttributes-DY9pRcZS.js → customAttributes-BkqKM_KW.js} +1 -1
- package/dist/{index-VYtnXWAq.js → index-DAWSNP3G.js} +3 -3
- package/dist/{index-CM4lBQ4G.js → index-DUfYYdZ-.js} +1 -1
- package/dist/{index-Bq48jgnb.js → index-DlwLw-BQ.js} +4 -4
- package/dist/{index-mYGDBSp_.js → index-Ttqt4iFV.js} +1 -1
- package/dist/{item-D2a5PW0Z.js → item-B0UPYxsB.js} +134 -133
- package/dist/{iteration-wWK05uZ1.js → iteration-CfmAZiOO.js} +1 -1
- package/dist/{jszip.min-DTbH9ENd.js → jszip.min-zROpry0S.js} +353 -353
- package/dist/{menu-C3-r6tS_.js → menu-DAac726D.js} +4 -4
- package/dist/{menu-DNF8Rgvf.js → menu-DpYo8dYR.js} +1 -1
- package/dist/{menuV2-MHU8jzzp.js → menuV2-DZj_FPqR.js} +135 -135
- package/dist/mf-menu.css +1 -1
- package/dist/{priceTier-BvAoerIZ.js → priceTier-BvDLl8v2.js} +1 -1
- package/dist/{scheduler-CmTQ9EiI.js → scheduler-pNUXG6En.js} +4 -4
- package/dist/{subcategory-BIk6KNy_.js → subcategory-DCDCQnAX.js} +2 -2
- package/dist/{toExcel-DGXNf3fi.js → toExcel-DqMa1Hn8.js} +2 -2
- package/dist/{unit-zFDBsOyu.js → unit-CuCXoWPG.js} +2 -2
- package/package.json +1 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { computed as D, shallowRef as Wt, ref as q, watch as ye, nextTick as nt, getCurrentInstance as xn, onMounted as Ae, defineComponent as ae, resolveComponent as j, createElementBlock as J, openBlock as $, createBlock as H, normalizeClass as fe, createElementVNode as N, createVNode as C, unref as o, withCtx as K, toDisplayString as ge, mergeModels as qt, useModel as Ht, createCommentVNode as X, resolveDirective as Xt, withDirectives as ft, createTextVNode as Fn, renderSlot as Me, h as ve, Fragment as Oe, renderList as Ne, vShow as Jt, withModifiers as He, createSlots as Sn, onBeforeUnmount as Ot, watchEffect as On, onUnmounted as Dn, normalizeStyle as ct, mergeProps as Vn, normalizeProps as $n, guardReactiveProps as Pn, Teleport as Rn, Transition as Un, withKeys as Mn } from "vue";
|
|
2
|
-
import { g as An, o as Nn, f as Ln, a as Gn, n as Qt, _ as Zt, I as Kn, S as Bn, b as Dt, C as zn, R as We, c as en, d as Et, e as tn, h as Yn, m as jn, F as Wn, M as nn, j as qn, r as Hn, k as on, l as Nt, p as rn, q as Xn, P as Jn, s as Qn, t as an, u as Zn, T as Be } from "./item-
|
|
3
|
-
import { _ as eo, T as to } from "./app-
|
|
4
|
-
import { A as be, J as _e, z as te, D as ot, K as no, M as oo, N as ro, O as Vt, P as ao, B as Le, Q as lo, H as me, R as io, T as $t, I as ke, U as vt, V as so, W as uo, X as bt, Y as Lt, Z as co, u as ln, $ as mo } from "./menu-
|
|
2
|
+
import { g as An, o as Nn, f as Ln, a as Gn, n as Qt, _ as Zt, I as Kn, S as Bn, b as Dt, C as zn, R as We, c as en, d as Et, e as tn, h as Yn, m as jn, F as Wn, M as nn, j as qn, r as Hn, k as on, l as Nt, p as rn, q as Xn, P as Jn, s as Qn, t as an, u as Zn, T as Be } from "./item-B0UPYxsB.js";
|
|
3
|
+
import { _ as eo, T as to } from "./app-CHpw_EM1.js";
|
|
4
|
+
import { A as be, J as _e, z as te, D as ot, K as no, M as oo, N as ro, O as Vt, P as ao, B as Le, Q as lo, H as me, R as io, T as $t, I as ke, U as vt, V as so, W as uo, X as bt, Y as Lt, Z as co, u as ln, $ as mo } from "./menu-DAac726D.js";
|
|
5
5
|
import { useI18n as ce, useCoreStore as rt, CustomAttributesForm as sn } from "@feedmepos/mf-common";
|
|
6
6
|
import { useDialog as Ge, useDialogChild as Pt, useSnackbar as Ue, FmButtonColorThemeVariant as Se, components as Ie, FmButtonVariant as qe, useBreakpoints as po } from "@feedmepos/ui-library";
|
|
7
7
|
import { u as Rt } from "./discardConfirm-BHni0LNu.js";
|
|
8
8
|
import { defineStore as fo } from "pinia";
|
|
9
|
-
import { _ as De, a as Re, b as go } from "./customAttributes-
|
|
10
|
-
import { u as se, g as un, m as vo } from "./menuV2-
|
|
11
|
-
import { s as Tt, _ as bo } from "./index-
|
|
12
|
-
import { _ as Gt } from "./category-
|
|
13
|
-
import { _ as _o, a as yo, u as ho } from "./Thumbnail.vue_vue_type_script_setup_true_lang-
|
|
14
|
-
import { _ as Ze, L as xt } from "./LinkProductSideSheet-
|
|
9
|
+
import { _ as De, a as Re, b as go } from "./customAttributes-BkqKM_KW.js";
|
|
10
|
+
import { u as se, g as un, m as vo } from "./menuV2-DZj_FPqR.js";
|
|
11
|
+
import { s as Tt, _ as bo } from "./index-DUfYYdZ-.js";
|
|
12
|
+
import { _ as Gt } from "./category-5R83ypNS.js";
|
|
13
|
+
import { _ as _o, a as yo, u as ho } from "./Thumbnail.vue_vue_type_script_setup_true_lang-Dwol_Lkd.js";
|
|
14
|
+
import { _ as Ze, L as xt } from "./LinkProductSideSheet-CAPIdf6P.js";
|
|
15
15
|
import { _ as dn } from "./tooltip-CQW9YRO5.js";
|
|
16
|
-
import { _ as Xe, T as wo, l as Co } from "./index-
|
|
16
|
+
import { _ as Xe, T as wo, l as Co } from "./index-DlwLw-BQ.js";
|
|
17
17
|
import { u as Io } from "./search-BAPEUu1R.js";
|
|
18
18
|
import { c as Ut } from "./check-C9mY6LiX.js";
|
|
19
|
-
import { f as tt } from "./currency-
|
|
19
|
+
import { f as tt } from "./currency-CUl4r9rT.js";
|
|
20
20
|
import { c as ko } from "./string-DpfFixWH.js";
|
|
21
21
|
import { useInventoryStore as Eo, InventoryBindingSummary as To } from "@feedmepos/mf-inventory-portal";
|
|
22
|
-
import { u as xo } from "./priceTier-
|
|
22
|
+
import { u as xo } from "./priceTier-BvDLl8v2.js";
|
|
23
23
|
import { d as Mt } from "./vuedraggable-CK8z7qA8.js";
|
|
24
|
-
import { _ as Fo } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-
|
|
24
|
+
import { _ as Fo } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-CqGU3bJQ.js";
|
|
25
25
|
import "./app-5fxKLAzS.js";
|
|
26
26
|
/* empty css */
|
|
27
|
-
import { i as So, t as At, w as Oo, a as cn, b as mn, n as Do, c as Vo, r as $o, _ as Po } from "./index-
|
|
27
|
+
import { i as So, t as At, w as Oo, a as cn, b as mn, n as Do, c as Vo, r as $o, _ as Po } from "./index-Ttqt4iFV.js";
|
|
28
28
|
import { c as mt } from "./object-DVUNCr7w.js";
|
|
29
29
|
import { _ as Ro } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
|
|
30
30
|
import { _ as Kt } from "./MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js";
|
|
@@ -169,7 +169,7 @@ function Bo(n, r, e, t = {}) {
|
|
|
169
169
|
a(i);
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function M(l) {
|
|
173
173
|
const i = l ? l.newValue : e.getItem(n);
|
|
174
174
|
if (i == null)
|
|
175
175
|
return h && O != null && e.setItem(n, p.write(O)), O;
|
|
@@ -187,7 +187,7 @@ function Bo(n, r, e, t = {}) {
|
|
|
187
187
|
if (!(l && l.key !== n)) {
|
|
188
188
|
T();
|
|
189
189
|
try {
|
|
190
|
-
(l == null ? void 0 : l.newValue) !== p.write(F.value) && (F.value =
|
|
190
|
+
(l == null ? void 0 : l.newValue) !== p.write(F.value) && (F.value = M(l));
|
|
191
191
|
} catch (i) {
|
|
192
192
|
a(i);
|
|
193
193
|
} finally {
|
|
@@ -1065,7 +1065,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1065
1065
|
A.value = !1;
|
|
1066
1066
|
}
|
|
1067
1067
|
}
|
|
1068
|
-
const
|
|
1068
|
+
const M = D(() => t.subcategories), E = D(() => M.value.map((i) => ({
|
|
1069
1069
|
label: i.name,
|
|
1070
1070
|
value: i._id
|
|
1071
1071
|
}))), u = D({
|
|
@@ -1089,7 +1089,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1089
1089
|
"model-value": i.form.code,
|
|
1090
1090
|
placeholder: ((V = i.fallback) == null ? void 0 : V.code) || o(l)("menu.product.form.detail.fields.code.placeholder"),
|
|
1091
1091
|
label: o(l)("menu.product.form.detail.fields.code.label"),
|
|
1092
|
-
"onUpdate:modelValue": v[0] || (v[0] = (
|
|
1092
|
+
"onUpdate:modelValue": v[0] || (v[0] = (U) => d("update:form", "code", o(Qt)(U, i.isOverride)))
|
|
1093
1093
|
}, null, 8, ["model-value", "placeholder", "label"])]), N("div", Ir, [C(x, {
|
|
1094
1094
|
id: "product-name",
|
|
1095
1095
|
disabled: !h.value.name,
|
|
@@ -1098,15 +1098,15 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1098
1098
|
}) : void 0,
|
|
1099
1099
|
"model-value": i.form.name,
|
|
1100
1100
|
placeholder: (L = i.fallback) == null ? void 0 : L.name,
|
|
1101
|
-
rules: h.value.name ? [(
|
|
1101
|
+
rules: h.value.name ? [(U) => !!U || o(l)("menu.product.form.detail.fields.name.required")] : void 0,
|
|
1102
1102
|
"label-mark": "required",
|
|
1103
1103
|
label: o(l)("menu.product.form.detail.fields.name.label"),
|
|
1104
|
-
"onUpdate:modelValue": v[1] || (v[1] = (
|
|
1104
|
+
"onUpdate:modelValue": v[1] || (v[1] = (U) => d("update:form", "name", U))
|
|
1105
1105
|
}, null, 8, ["disabled", "helper-text", "model-value", "placeholder", "rules", "label"])])]), N("div", kr, [C(y, {
|
|
1106
1106
|
disabled: !h.value.description,
|
|
1107
1107
|
"model-value": i.form.description || "",
|
|
1108
1108
|
placeholder: o(l)("menu.product.form.detail.fields.description.placeholder"),
|
|
1109
|
-
"onUpdate:modelValue": v[2] || (v[2] = (
|
|
1109
|
+
"onUpdate:modelValue": v[2] || (v[2] = (U) => d("update:form", "description", U.trim())),
|
|
1110
1110
|
class: "description"
|
|
1111
1111
|
}, {
|
|
1112
1112
|
label: K(() => [N("p", Er, [Fn(ge(o(l)("menu.product.form.detail.fields.description.label")) + " ", 1), N("span", Tr, ge(o(l)("menu.product.form.detail.fields.description.optional")), 1)])]),
|
|
@@ -1118,7 +1118,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1118
1118
|
disabled: !h.value.thumbnail,
|
|
1119
1119
|
"item-id": i.form._id || "",
|
|
1120
1120
|
"model-value": i.form.thumbnail || ((W = i.fallback) == null ? void 0 : W.thumbnail) || null,
|
|
1121
|
-
"onUpdate:modelValue": v[3] || (v[3] = (
|
|
1121
|
+
"onUpdate:modelValue": v[3] || (v[3] = (U) => d("update:form", "thumbnail", U))
|
|
1122
1122
|
}, null, 8, ["disabled", "item-id", "model-value"])]), C(Re, {
|
|
1123
1123
|
label: o(t).isV4 ? o(l)("menu.product.form.detail.category.label") : o(l)("menu.product.form.detail.category.label_singular")
|
|
1124
1124
|
}, {
|
|
@@ -1126,7 +1126,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1126
1126
|
key: 0,
|
|
1127
1127
|
disabled: !h.value.category,
|
|
1128
1128
|
"model-value": i.isAddon ? Pe.ADD_ON : Pe.PRODUCT,
|
|
1129
|
-
"onUpdate:modelValue": v[4] || (v[4] = (
|
|
1129
|
+
"onUpdate:modelValue": v[4] || (v[4] = (U) => R(U))
|
|
1130
1130
|
}, {
|
|
1131
1131
|
default: K(() => [N("div", xr, [N("div", Fr, [C(P, {
|
|
1132
1132
|
disabled: f.value,
|
|
@@ -1156,7 +1156,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1156
1156
|
}, 8, ["disabled", "model-value"])) : X("", !0), o(t).isV4 ? X("", !0) : ($(), H(Ce, {
|
|
1157
1157
|
key: 1,
|
|
1158
1158
|
"model-value": i.form.category,
|
|
1159
|
-
rules: [(
|
|
1159
|
+
rules: [(U) => !U && !i.isOverride ? "Category is required" : !0]
|
|
1160
1160
|
}, {
|
|
1161
1161
|
default: K(() => [C(k, {
|
|
1162
1162
|
multiple: !1
|
|
@@ -1170,7 +1170,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1170
1170
|
}, {
|
|
1171
1171
|
default: K(() => [N("div", Or, [C(Bn, {
|
|
1172
1172
|
modelValue: u.value,
|
|
1173
|
-
"onUpdate:modelValue": v[5] || (v[5] = (
|
|
1173
|
+
"onUpdate:modelValue": v[5] || (v[5] = (U) => u.value = U),
|
|
1174
1174
|
items: E.value,
|
|
1175
1175
|
placeholder: o(l)("menu.product.form.detail.path.placeholder"),
|
|
1176
1176
|
disabled: !h.value.category,
|
|
@@ -1179,7 +1179,8 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1179
1179
|
_: 1
|
|
1180
1180
|
}, 8, ["label"])) : X("", !0), N("div", Dr, [C(he, {
|
|
1181
1181
|
label: "Shelf Life (mins)",
|
|
1182
|
-
"model-value": i.form.shelfLife
|
|
1182
|
+
"model-value": i.form.shelfLife ?? null,
|
|
1183
|
+
"onUpdate:modelValue": v[6] || (v[6] = (U) => U && d("update:form", "shelfLife", U))
|
|
1183
1184
|
}, null, 8, ["model-value"])]), C(Dt, {
|
|
1184
1185
|
disabled: !h.value.orderFrom,
|
|
1185
1186
|
"model-value": i.form.orderFrom,
|
|
@@ -1187,14 +1188,14 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1187
1188
|
required: h.value.orderFrom,
|
|
1188
1189
|
"default-label": o(l)("menu.product.form.detail.order_from.default"),
|
|
1189
1190
|
label: o(l)("menu.product.form.detail.order_from.label"),
|
|
1190
|
-
"onUpdate:modelValue": v[
|
|
1191
|
+
"onUpdate:modelValue": v[7] || (v[7] = (U) => U && d("update:form", "orderFrom", U))
|
|
1191
1192
|
}, null, 8, ["disabled", "model-value", "order-from-none", "required", "default-label", "label"])];
|
|
1192
1193
|
}),
|
|
1193
1194
|
_: 1
|
|
1194
1195
|
}, 8, ["title"]);
|
|
1195
1196
|
};
|
|
1196
1197
|
}
|
|
1197
|
-
}), $r = /* @__PURE__ */ Ze(Vr, [["__scopeId", "data-v-
|
|
1198
|
+
}), $r = /* @__PURE__ */ Ze(Vr, [["__scopeId", "data-v-17b9752f"]]), Pr = /* @__PURE__ */ ae({
|
|
1198
1199
|
__name: "AddForm",
|
|
1199
1200
|
setup(n) {
|
|
1200
1201
|
const r = se(), e = D(() => r.rules.group), t = D(() => !!r.state.currentCatalogId || !!r.state.currentSchedulerId), c = D(() => {
|
|
@@ -1288,14 +1289,14 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1288
1289
|
return m == null ? "" : (V = lo()[m]) == null ? void 0 : V.label;
|
|
1289
1290
|
}, R = D(() => Object.values(F.value)), A = q({}), {
|
|
1290
1291
|
t: S
|
|
1291
|
-
} = ce(),
|
|
1292
|
+
} = ce(), M = q([{
|
|
1292
1293
|
accessorKey: "isDefault",
|
|
1293
1294
|
header: () => S("menu.group.option.is_default"),
|
|
1294
1295
|
enableSorting: !1,
|
|
1295
1296
|
size: 75,
|
|
1296
1297
|
cell: (m) => {
|
|
1297
|
-
var
|
|
1298
|
-
if ((B = (
|
|
1298
|
+
var U, B;
|
|
1299
|
+
if ((B = (U = m.row.original) == null ? void 0 : U.items) != null && B.length)
|
|
1299
1300
|
return null;
|
|
1300
1301
|
const V = m.row.depth > 0, L = m.row.original, W = !!m.getValue();
|
|
1301
1302
|
return C(Ie.FmCheckbox, {
|
|
@@ -1335,12 +1336,12 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1335
1336
|
header: () => S("menu.group.option.product_title"),
|
|
1336
1337
|
enableSorting: !1,
|
|
1337
1338
|
cell: (m) => {
|
|
1338
|
-
const V = m.getValue(), L = m.row.original, W = m.row.depth > 0,
|
|
1339
|
+
const V = m.getValue(), L = m.row.original, W = m.row.depth > 0, U = L.combinationKey ? un(L.combinationKey, se().variants) : null;
|
|
1339
1340
|
return ve("div", ve(Ie.FmTextField, {
|
|
1340
1341
|
modelValue: V,
|
|
1341
|
-
placeholder:
|
|
1342
|
+
placeholder: U ?? "",
|
|
1342
1343
|
disabled: !O(L.combinationKey).name,
|
|
1343
|
-
rules:
|
|
1344
|
+
rules: U ? void 0 : [(B) => B.length > 0 || S("menu.group.option.product_title_required")],
|
|
1344
1345
|
"onUpdate:modelValue": (B) => {
|
|
1345
1346
|
var oe;
|
|
1346
1347
|
if (W) {
|
|
@@ -1374,13 +1375,13 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1374
1375
|
},
|
|
1375
1376
|
size: 100,
|
|
1376
1377
|
cell: (m) => {
|
|
1377
|
-
const V = m.getValue(), L = m.row.original, W = !O(null).priceEdit || L.orderFrom === te.F_ORDER_FROM.enum.NONE,
|
|
1378
|
+
const V = m.getValue(), L = m.row.original, W = !O(null).priceEdit || L.orderFrom === te.F_ORDER_FROM.enum.NONE, U = L.fallbackPrice, B = m.row.depth > 0;
|
|
1378
1379
|
return ve(Xe, {
|
|
1379
1380
|
disable: W,
|
|
1380
|
-
placeholder:
|
|
1381
|
+
placeholder: U ? tt(U) : void 0,
|
|
1381
1382
|
modelValue: V,
|
|
1382
|
-
required: !
|
|
1383
|
-
nullable: !!
|
|
1383
|
+
required: !U && !W,
|
|
1384
|
+
nullable: !!U,
|
|
1384
1385
|
min: k.value ? void 0 : 0,
|
|
1385
1386
|
"onUpdate:modelValue": (oe) => {
|
|
1386
1387
|
var ne;
|
|
@@ -1407,7 +1408,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1407
1408
|
size: 100,
|
|
1408
1409
|
enableSorting: !1,
|
|
1409
1410
|
cell: (m) => {
|
|
1410
|
-
const V = m.getValue(), L = m.row.original, W = L.fallbackOrder,
|
|
1411
|
+
const V = m.getValue(), L = m.row.original, W = L.fallbackOrder, U = m.row.depth > 0;
|
|
1411
1412
|
return ve(Dt, {
|
|
1412
1413
|
modelValue: V,
|
|
1413
1414
|
fallback: W,
|
|
@@ -1416,7 +1417,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1416
1417
|
editActiveOnly: O(L.combinationKey).orderFromActiveOnly,
|
|
1417
1418
|
"onUpdate:modelValue": (B) => {
|
|
1418
1419
|
var oe;
|
|
1419
|
-
if (
|
|
1420
|
+
if (U) {
|
|
1420
1421
|
const ne = (oe = m.row.getParentRow()) == null ? void 0 : oe.original;
|
|
1421
1422
|
if (!ne) return;
|
|
1422
1423
|
i(
|
|
@@ -1449,9 +1450,9 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1449
1450
|
menuStore: g,
|
|
1450
1451
|
priceTiers: V.priceTiers,
|
|
1451
1452
|
"onUpdate:priceTiers": (W) => {
|
|
1452
|
-
var
|
|
1453
|
+
var U;
|
|
1453
1454
|
if (L) {
|
|
1454
|
-
const B = (
|
|
1455
|
+
const B = (U = m.row.getParentRow()) == null ? void 0 : U.original;
|
|
1455
1456
|
if (!B) return;
|
|
1456
1457
|
i(
|
|
1457
1458
|
B._id,
|
|
@@ -1469,9 +1470,9 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1469
1470
|
name: V.name ?? V.fallbackName ?? "",
|
|
1470
1471
|
allowRefund: e.allowRefundInventory,
|
|
1471
1472
|
"onUpdate:inventory": (W) => {
|
|
1472
|
-
var
|
|
1473
|
+
var U;
|
|
1473
1474
|
if (L) {
|
|
1474
|
-
const B = (
|
|
1475
|
+
const B = (U = m.row.getParentRow()) == null ? void 0 : U.original;
|
|
1475
1476
|
if (!B) return;
|
|
1476
1477
|
i(
|
|
1477
1478
|
B._id,
|
|
@@ -1491,11 +1492,11 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1491
1492
|
zIndex: 110
|
|
1492
1493
|
}, {
|
|
1493
1494
|
default: () => {
|
|
1494
|
-
var
|
|
1495
|
+
var U;
|
|
1495
1496
|
return [C(j("fm-button"), {
|
|
1496
1497
|
variant: qe.Tertiary,
|
|
1497
1498
|
prependIcon: "inventory_2",
|
|
1498
|
-
overwriteIconOutline: (
|
|
1499
|
+
overwriteIconOutline: (U = V.inventoryBindings) != null && U.length ? "filled" : "outline",
|
|
1499
1500
|
textColor: Se.NeutralGray400,
|
|
1500
1501
|
onClick: W
|
|
1501
1502
|
}, null)];
|
|
@@ -1506,11 +1507,11 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1506
1507
|
prependIcon: "delete",
|
|
1507
1508
|
textColor: Se.NeutralGray400,
|
|
1508
1509
|
onClick: () => {
|
|
1509
|
-
var W,
|
|
1510
|
+
var W, U;
|
|
1510
1511
|
if (L) {
|
|
1511
1512
|
const B = (W = m.row.getParentRow()) == null ? void 0 : W.original;
|
|
1512
1513
|
if (!B) return;
|
|
1513
|
-
if ((((
|
|
1514
|
+
if ((((U = e.group.items[B._id].items) == null ? void 0 : U.length) || 0) <= 1) {
|
|
1514
1515
|
c.open({
|
|
1515
1516
|
title: S("menu.group.option.should_link_at_least_one_variant", {
|
|
1516
1517
|
name: B.name
|
|
@@ -1553,26 +1554,26 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1553
1554
|
function l(m, V, L) {
|
|
1554
1555
|
const W = e.group.items[m];
|
|
1555
1556
|
if (!W) return;
|
|
1556
|
-
const
|
|
1557
|
+
const U = {
|
|
1557
1558
|
...W
|
|
1558
1559
|
};
|
|
1559
|
-
V === "price" ?
|
|
1560
|
+
V === "price" ? U[V] = !L && !W.fallbackPrice ? be.Dinero.zero().toObject() : L : U[V] = L, t("update:group", {
|
|
1560
1561
|
...e.group,
|
|
1561
1562
|
items: {
|
|
1562
1563
|
...e.group.items,
|
|
1563
|
-
[m]:
|
|
1564
|
+
[m]: U
|
|
1564
1565
|
}
|
|
1565
1566
|
});
|
|
1566
1567
|
}
|
|
1567
1568
|
function i(m, V, L, W) {
|
|
1568
1569
|
var ne, ee;
|
|
1569
|
-
const
|
|
1570
|
+
const U = me(e.group), B = (ne = U.items[m].items) == null ? void 0 : ne.findIndex((pe) => pe.combinationKey === V);
|
|
1570
1571
|
if (!Ut.isSet(B)) return;
|
|
1571
|
-
let oe = (ee =
|
|
1572
|
+
let oe = (ee = U.items[m].items) == null ? void 0 : ee[B];
|
|
1572
1573
|
oe && (oe = {
|
|
1573
1574
|
...oe,
|
|
1574
1575
|
[L]: W
|
|
1575
|
-
},
|
|
1576
|
+
}, U.items[m].items[B] = oe, t("update:group", U));
|
|
1576
1577
|
}
|
|
1577
1578
|
function v(m) {
|
|
1578
1579
|
const V = me(e.group);
|
|
@@ -1580,7 +1581,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1580
1581
|
}
|
|
1581
1582
|
function x(m, V) {
|
|
1582
1583
|
const L = me(e.group), W = L.items[m];
|
|
1583
|
-
W && (W.items = (W.items || []).filter((
|
|
1584
|
+
W && (W.items = (W.items || []).filter((U) => U.combinationKey !== V), L.items[m] = W, t("update:group", L));
|
|
1584
1585
|
}
|
|
1585
1586
|
const y = D(() => e.categorizedItems.flatMap((m) => m.items).reduce((m, V) => {
|
|
1586
1587
|
var L;
|
|
@@ -1589,9 +1590,9 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1589
1590
|
variants: io(((L = V.variant) == null ? void 0 : L.variantCombinations) || [], "combinationKey")
|
|
1590
1591
|
}, m;
|
|
1591
1592
|
}, {})), P = (m) => {
|
|
1592
|
-
var
|
|
1593
|
+
var U, B;
|
|
1593
1594
|
const L = g.state.menu.modules.item.find((oe) => oe._id === m._id), W = m.combinationKey ? {
|
|
1594
|
-
...(
|
|
1595
|
+
...(U = L == null ? void 0 : L.variant) == null ? void 0 : U.variantCombinations.find((oe) => oe.combinationKey === m.combinationKey),
|
|
1595
1596
|
name: $t(se().variants, ((B = L == null ? void 0 : L.variant) == null ? void 0 : B.variantGroupIds) || [])[m.combinationKey]
|
|
1596
1597
|
} : L;
|
|
1597
1598
|
return W == null ? void 0 : W.name;
|
|
@@ -1600,11 +1601,11 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1600
1601
|
V = {
|
|
1601
1602
|
...V,
|
|
1602
1603
|
items: m.map((L) => {
|
|
1603
|
-
const W = V.items.find((B) => B._id == L._id && B.combinationKey == L.combinationKey),
|
|
1604
|
+
const W = V.items.find((B) => B._id == L._id && B.combinationKey == L.combinationKey), U = y.value[L._id];
|
|
1604
1605
|
return W || {
|
|
1605
1606
|
...L,
|
|
1606
1607
|
name: P(L),
|
|
1607
|
-
price: L.combinationKey ?
|
|
1608
|
+
price: L.combinationKey ? U.variants[L.combinationKey || ""].price : U.price,
|
|
1608
1609
|
orderFrom: te.F_ORDER_FROM.enum.ALL
|
|
1609
1610
|
};
|
|
1610
1611
|
})
|
|
@@ -1633,18 +1634,18 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1633
1634
|
title: o(S)("menu.group.option.link_products"),
|
|
1634
1635
|
"is-local-only": !0,
|
|
1635
1636
|
onSubmit: V[0] || (V[0] = ({
|
|
1636
|
-
items:
|
|
1637
|
-
}) => Y(
|
|
1637
|
+
items: U
|
|
1638
|
+
}) => Y(U))
|
|
1638
1639
|
}, {
|
|
1639
1640
|
default: K(({
|
|
1640
|
-
trigger:
|
|
1641
|
+
trigger: U
|
|
1641
1642
|
}) => [C(L, {
|
|
1642
1643
|
"text-color": o(Se).ColorPrimary,
|
|
1643
1644
|
"border-color": o(Se).ColorPrimary,
|
|
1644
1645
|
variant: "secondary",
|
|
1645
1646
|
label: o(S)("menu.group.option.link_products"),
|
|
1646
1647
|
"prepend-icon": "link",
|
|
1647
|
-
onClick:
|
|
1648
|
+
onClick: U
|
|
1648
1649
|
}, null, 8, ["text-color", "border-color", "label", "onClick"])]),
|
|
1649
1650
|
_: 1
|
|
1650
1651
|
}, 8, ["categorized-items", "initial-value", "show-variant", "title"])])) : ($(), J("div", Ur, [C(L, {
|
|
@@ -1656,7 +1657,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1656
1657
|
onClick: u
|
|
1657
1658
|
}, null, 8, ["text-color", "border-color", "label"])]))], 64)) : X("", !0)]),
|
|
1658
1659
|
default: K(() => [N("div", Mr, [N("div", Ar, [C(W, {
|
|
1659
|
-
"column-defs":
|
|
1660
|
+
"column-defs": M.value,
|
|
1660
1661
|
"column-visibility": E.value,
|
|
1661
1662
|
draggable: !he.value && O(null).name,
|
|
1662
1663
|
"expanded-state": h.value ? {} : A.value,
|
|
@@ -1666,9 +1667,9 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1666
1667
|
"search-value": o(a),
|
|
1667
1668
|
"shrink-at": !1,
|
|
1668
1669
|
"hide-footer": "",
|
|
1669
|
-
"onUpdate:expandedState": V[1] || (V[1] = (
|
|
1670
|
-
onDndChanged: V[2] || (V[2] = (
|
|
1671
|
-
"onUpdate:dragging": V[3] || (V[3] = (
|
|
1670
|
+
"onUpdate:expandedState": V[1] || (V[1] = (U) => A.value = U),
|
|
1671
|
+
onDndChanged: V[2] || (V[2] = (U) => le(U)),
|
|
1672
|
+
"onUpdate:dragging": V[3] || (V[3] = (U) => h.value = U)
|
|
1672
1673
|
}, null, 8, ["column-defs", "column-visibility", "draggable", "expanded-state", "row-data", "search-value"])])])]),
|
|
1673
1674
|
_: 1
|
|
1674
1675
|
}, 8, ["title"]);
|
|
@@ -1738,7 +1739,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1738
1739
|
F.value.isOverride
|
|
1739
1740
|
)[0];
|
|
1740
1741
|
}
|
|
1741
|
-
const S = q(ke.clone(t.group)),
|
|
1742
|
+
const S = q(ke.clone(t.group)), M = Rt(
|
|
1742
1743
|
() => !ke.isEqual(t.group, S.value),
|
|
1743
1744
|
() => {
|
|
1744
1745
|
a.value = !1;
|
|
@@ -1796,14 +1797,14 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1796
1797
|
C(W, {
|
|
1797
1798
|
id: "group-form",
|
|
1798
1799
|
modelValue: a.value,
|
|
1799
|
-
"onUpdate:modelValue": P[8] || (P[8] = (
|
|
1800
|
+
"onUpdate:modelValue": P[8] || (P[8] = (U) => a.value = U),
|
|
1800
1801
|
"is-container": o(Ie).FmForm,
|
|
1801
1802
|
"is-container-props": {
|
|
1802
1803
|
onValidationSuccess: u,
|
|
1803
1804
|
blameFormChildOnValidationFailed: !0
|
|
1804
1805
|
},
|
|
1805
1806
|
"max-width": 720,
|
|
1806
|
-
"onOn:clickedAway": o(
|
|
1807
|
+
"onOn:clickedAway": o(M)
|
|
1807
1808
|
}, {
|
|
1808
1809
|
"side-sheet-header": K(() => [
|
|
1809
1810
|
N("p", Lr, ge(y.title), 1)
|
|
@@ -1833,10 +1834,10 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1833
1834
|
N("div", null, [
|
|
1834
1835
|
C(Y, {
|
|
1835
1836
|
modelValue: y.group.name,
|
|
1836
|
-
"onUpdate:modelValue": P[0] || (P[0] = (
|
|
1837
|
+
"onUpdate:modelValue": P[0] || (P[0] = (U) => y.group.name = U),
|
|
1837
1838
|
disabled: k("name"),
|
|
1838
1839
|
rules: [
|
|
1839
|
-
(
|
|
1840
|
+
(U) => !!U || o(x)("menu.common.validation.required", { field: o(x)("menu.common.labels.group_name") })
|
|
1840
1841
|
],
|
|
1841
1842
|
autofocus: "",
|
|
1842
1843
|
label: o(x)("menu.common.labels.group_name")
|
|
@@ -1851,7 +1852,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1851
1852
|
default: K(() => [
|
|
1852
1853
|
C(Q, {
|
|
1853
1854
|
modelValue: y.group.min,
|
|
1854
|
-
"onUpdate:modelValue": P[1] || (P[1] = (
|
|
1855
|
+
"onUpdate:modelValue": P[1] || (P[1] = (U) => y.group.min = U),
|
|
1855
1856
|
disabled: k("min"),
|
|
1856
1857
|
min: 0,
|
|
1857
1858
|
class: "flex-1",
|
|
@@ -1859,7 +1860,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1859
1860
|
}, null, 8, ["modelValue", "disabled", "label"]),
|
|
1860
1861
|
C(Q, {
|
|
1861
1862
|
modelValue: y.group.max,
|
|
1862
|
-
"onUpdate:modelValue": P[2] || (P[2] = (
|
|
1863
|
+
"onUpdate:modelValue": P[2] || (P[2] = (U) => y.group.max = U),
|
|
1863
1864
|
disabled: k("max"),
|
|
1864
1865
|
min: y.group.min,
|
|
1865
1866
|
class: "flex-1",
|
|
@@ -1879,13 +1880,13 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1879
1880
|
C(he, {
|
|
1880
1881
|
disabled: k("type"),
|
|
1881
1882
|
"model-value": y.group.type,
|
|
1882
|
-
"onUpdate:modelValue": P[3] || (P[3] = (
|
|
1883
|
+
"onUpdate:modelValue": P[3] || (P[3] = (U) => R(U))
|
|
1883
1884
|
}, {
|
|
1884
1885
|
default: K(() => [
|
|
1885
|
-
($(!0), J(Oe, null, Ne(p.value, (
|
|
1886
|
-
key:
|
|
1887
|
-
label: o(x)(`menu.group.types.${
|
|
1888
|
-
value:
|
|
1886
|
+
($(!0), J(Oe, null, Ne(p.value, (U) => ($(), H(Ce, {
|
|
1887
|
+
key: U.value,
|
|
1888
|
+
label: o(x)(`menu.group.types.${U.label.toLowerCase()}`),
|
|
1889
|
+
value: U.value
|
|
1889
1890
|
}, null, 8, ["label", "value"]))), 128))
|
|
1890
1891
|
]),
|
|
1891
1892
|
_: 1
|
|
@@ -1899,7 +1900,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1899
1900
|
default: K(() => [
|
|
1900
1901
|
C(m, {
|
|
1901
1902
|
modelValue: y.group.stackable,
|
|
1902
|
-
"onUpdate:modelValue": P[4] || (P[4] = (
|
|
1903
|
+
"onUpdate:modelValue": P[4] || (P[4] = (U) => y.group.stackable = U),
|
|
1903
1904
|
disabled: k("stackable"),
|
|
1904
1905
|
label: o(x)("menu.common.labels.stackable"),
|
|
1905
1906
|
"label-placement": "right",
|
|
@@ -1941,8 +1942,8 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1941
1942
|
"categorized-items": y.categorizedItems,
|
|
1942
1943
|
config: F.value,
|
|
1943
1944
|
group: y.group,
|
|
1944
|
-
"onUpdate:group": P[5] || (P[5] = (
|
|
1945
|
-
"onUpdate:unmapGroup": P[6] || (P[6] = (
|
|
1945
|
+
"onUpdate:group": P[5] || (P[5] = (U) => T(U)),
|
|
1946
|
+
"onUpdate:unmapGroup": P[6] || (P[6] = (U) => T(A(U)))
|
|
1946
1947
|
}, null, 8, ["allow-refund-inventory", "categorized-items", "config", "group"])
|
|
1947
1948
|
]),
|
|
1948
1949
|
_: 1
|
|
@@ -1998,26 +1999,26 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
1998
1999
|
});
|
|
1999
2000
|
function a(S) {
|
|
2000
2001
|
var l, i;
|
|
2001
|
-
const
|
|
2002
|
+
const M = (l = h.value[_.value].groups) == null ? void 0 : l.findIndex(
|
|
2002
2003
|
(v) => v._id === t.groupId
|
|
2003
2004
|
), E = me(h.value), u = { ...tn(S), _id: t.groupId, groupKey: "" };
|
|
2004
|
-
(
|
|
2005
|
+
(M ?? -1) < 0 ? E[_.value] = {
|
|
2005
2006
|
...E[_.value],
|
|
2006
2007
|
groups: [...((i = E[_.value]) == null ? void 0 : i.groups) || [], u]
|
|
2007
|
-
} : E[_.value].groups[
|
|
2008
|
+
} : E[_.value].groups[M] = u, h.value = E;
|
|
2008
2009
|
}
|
|
2009
2010
|
function I(S) {
|
|
2010
|
-
const
|
|
2011
|
+
const M = b.value.length;
|
|
2011
2012
|
let E = _.value;
|
|
2012
|
-
S === "left" ? E = E === 0 ?
|
|
2013
|
+
S === "left" ? E = E === 0 ? M - 1 : E - 1 : E = E === M - 1 ? 0 : E + 1, w.value = b.value[E].value;
|
|
2013
2014
|
}
|
|
2014
2015
|
function F(S) {
|
|
2015
2016
|
return {
|
|
2016
2017
|
isV4: s.version === te.F_MENU_VERSION.enum.v4,
|
|
2017
|
-
isDefault: (
|
|
2018
|
-
link: (
|
|
2019
|
-
orderFrom: (
|
|
2020
|
-
name: (
|
|
2018
|
+
isDefault: (M) => !1,
|
|
2019
|
+
link: (M) => !1,
|
|
2020
|
+
orderFrom: (M) => !0,
|
|
2021
|
+
name: (M) => !1,
|
|
2021
2022
|
bindToVariant: !1,
|
|
2022
2023
|
inventory: !0,
|
|
2023
2024
|
orderFromActiveOnly: s.rules.item.orderFromActiveOnly,
|
|
@@ -2031,11 +2032,11 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
2031
2032
|
};
|
|
2032
2033
|
}
|
|
2033
2034
|
function O() {
|
|
2034
|
-
const S = h.value.map((
|
|
2035
|
+
const S = h.value.map((M) => {
|
|
2035
2036
|
var E;
|
|
2036
2037
|
return {
|
|
2037
|
-
...
|
|
2038
|
-
groups: (E =
|
|
2038
|
+
...M,
|
|
2039
|
+
groups: (E = M.groups) == null ? void 0 : E.map((u) => ({
|
|
2039
2040
|
...Hn(u, F())
|
|
2040
2041
|
}))
|
|
2041
2042
|
};
|
|
@@ -2055,7 +2056,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
2055
2056
|
trigger: (A = p.value) == null ? void 0 : A.trigger
|
|
2056
2057
|
});
|
|
2057
2058
|
const { t: T } = ce();
|
|
2058
|
-
return (S,
|
|
2059
|
+
return (S, M) => {
|
|
2059
2060
|
const E = j("fm-select"), u = j("fm-button"), l = j("fm-card");
|
|
2060
2061
|
return $(), H(In, {
|
|
2061
2062
|
ref_key: "baseFormRef",
|
|
@@ -2066,9 +2067,9 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
2066
2067
|
group: f.value,
|
|
2067
2068
|
action: "update",
|
|
2068
2069
|
title: o(T)("menu.group.update"),
|
|
2069
|
-
"onUpdate:group":
|
|
2070
|
-
"onSubmit:group":
|
|
2071
|
-
"onStatus:show":
|
|
2070
|
+
"onUpdate:group": M[3] || (M[3] = (i) => a(i)),
|
|
2071
|
+
"onSubmit:group": M[4] || (M[4] = (i) => O()),
|
|
2072
|
+
"onStatus:show": M[5] || (M[5] = (i) => k.value = i)
|
|
2072
2073
|
}, {
|
|
2073
2074
|
default: K(({ trigger: i }) => [
|
|
2074
2075
|
Me(S.$slots, "default", { trigger: i })
|
|
@@ -2084,7 +2085,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
2084
2085
|
N("div", zr, [
|
|
2085
2086
|
C(E, {
|
|
2086
2087
|
modelValue: w.value,
|
|
2087
|
-
"onUpdate:modelValue":
|
|
2088
|
+
"onUpdate:modelValue": M[0] || (M[0] = (i) => w.value = i),
|
|
2088
2089
|
items: b.value,
|
|
2089
2090
|
class: "flex-1"
|
|
2090
2091
|
}, null, 8, ["modelValue", "items"]),
|
|
@@ -2093,13 +2094,13 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
2093
2094
|
variant: o(qe).Tertiary,
|
|
2094
2095
|
"prepend-icon": "keyboard_arrow_left",
|
|
2095
2096
|
size: "lg",
|
|
2096
|
-
onClick:
|
|
2097
|
+
onClick: M[1] || (M[1] = (i) => I("left"))
|
|
2097
2098
|
}, null, 8, ["variant"]),
|
|
2098
2099
|
C(u, {
|
|
2099
2100
|
variant: o(qe).Tertiary,
|
|
2100
2101
|
"prepend-icon": "keyboard_arrow_right",
|
|
2101
2102
|
size: "lg",
|
|
2102
|
-
onClick:
|
|
2103
|
+
onClick: M[2] || (M[2] = (i) => I("right"))
|
|
2103
2104
|
}, null, 8, ["variant"])
|
|
2104
2105
|
])
|
|
2105
2106
|
])
|
|
@@ -2140,15 +2141,15 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
2140
2141
|
const O = !s.state.currentSchedulerId, k = s.rules.group.type, p = s.version == te.F_MENU_VERSION.enum.v3, T = s.rules.item.orderFromActiveOnly, R = s.rules.item.bindToVariant;
|
|
2141
2142
|
return function(S) {
|
|
2142
2143
|
return {
|
|
2143
|
-
isDefault: (
|
|
2144
|
-
link: (
|
|
2145
|
-
name: (
|
|
2144
|
+
isDefault: (M) => !b.value && !M,
|
|
2145
|
+
link: (M) => !b.value && (!M || R),
|
|
2146
|
+
name: (M) => !b.value && !M,
|
|
2146
2147
|
type: k && !S._id && !b.value,
|
|
2147
2148
|
price: S.type != te.F_ADDON_GROUP_TYPE.enum.DYNAMIC,
|
|
2148
2149
|
priceEdit: !0,
|
|
2149
2150
|
priceTier: s.isV4,
|
|
2150
2151
|
inventory: O ? p ? !b.value && S.type == te.F_ADDON_GROUP_TYPE.enum.NORMAL : !b.value : !1,
|
|
2151
|
-
orderFrom: (
|
|
2152
|
+
orderFrom: (M) => O ? p ? S.type == te.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? b.value : !!b.value == !M : b.value : !1,
|
|
2152
2153
|
orderFromActiveOnly: T,
|
|
2153
2154
|
showOrderFrom: O ? p ? b.value ? !0 : S.type == te.F_ADDON_GROUP_TYPE.enum.PRODUCT : b.value : !1,
|
|
2154
2155
|
bindToVariant: R,
|
|
@@ -2379,7 +2380,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
2379
2380
|
id: pt(Fe.GROUP, i),
|
|
2380
2381
|
icon: "edit",
|
|
2381
2382
|
variant: "tertiary",
|
|
2382
|
-
disabled: !
|
|
2383
|
+
disabled: !M(i),
|
|
2383
2384
|
textColor: "neutral-gray-400",
|
|
2384
2385
|
onClick: v
|
|
2385
2386
|
})
|
|
@@ -2437,7 +2438,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
2437
2438
|
groups: e.form.groups || []
|
|
2438
2439
|
}];
|
|
2439
2440
|
});
|
|
2440
|
-
function
|
|
2441
|
+
function M(l) {
|
|
2441
2442
|
var v;
|
|
2442
2443
|
if (!l) return !1;
|
|
2443
2444
|
if (h.value.overrideProductGroup) return !0;
|
|
@@ -2548,12 +2549,12 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
2548
2549
|
if ((((R = p == null ? void 0 : p.variantCombinations) == null ? void 0 : R.length) ?? 0) > 0 && p) {
|
|
2549
2550
|
const S = p.variantCombinations.findIndex((E) => E.combinationKey === F);
|
|
2550
2551
|
if (S < 0) return;
|
|
2551
|
-
const
|
|
2552
|
-
|
|
2552
|
+
const M = ke.clone(p.variantCombinations);
|
|
2553
|
+
M[S].inventoryBindings = O, k = {
|
|
2553
2554
|
...k,
|
|
2554
2555
|
variant: {
|
|
2555
2556
|
variantGroupIds: ((A = k.variant) == null ? void 0 : A.variantGroupIds) || [],
|
|
2556
|
-
variantCombinations:
|
|
2557
|
+
variantCombinations: M
|
|
2557
2558
|
}
|
|
2558
2559
|
};
|
|
2559
2560
|
} else
|
|
@@ -2706,7 +2707,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
2706
2707
|
}
|
|
2707
2708
|
const I = q(!1);
|
|
2708
2709
|
async function F() {
|
|
2709
|
-
var T, R, A, S,
|
|
2710
|
+
var T, R, A, S, M, E, u, l;
|
|
2710
2711
|
if (!(e.form.name || "")) {
|
|
2711
2712
|
const i = document.getElementById("product-name");
|
|
2712
2713
|
if (i) {
|
|
@@ -2730,7 +2731,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
2730
2731
|
{
|
|
2731
2732
|
name: e.form.name || "",
|
|
2732
2733
|
lat: (A = (R = (T = t.currentRestaurant) == null ? void 0 : T.value) == null ? void 0 : R.profile.address.coordinates) == null ? void 0 : A[1],
|
|
2733
|
-
lon: (E = (
|
|
2734
|
+
lon: (E = (M = (S = t.currentRestaurant) == null ? void 0 : S.value) == null ? void 0 : M.profile.address.coordinates) == null ? void 0 : E[0]
|
|
2734
2735
|
},
|
|
2735
2736
|
!0
|
|
2736
2737
|
));
|
|
@@ -2743,7 +2744,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
2743
2744
|
return ((p = c.currentCatalog) == null ? void 0 : p.priceTierRules) ?? ((T = c.currentCatalog) == null ? void 0 : T.usePriceTiers) ?? [];
|
|
2744
2745
|
});
|
|
2745
2746
|
return (p, T) => {
|
|
2746
|
-
const R = j("fm-select"), A = j("FmButton"), S = j("fm-checkbox"),
|
|
2747
|
+
const R = j("fm-select"), A = j("FmButton"), S = j("fm-checkbox"), M = j("fm-text-field"), E = Xt("tooltip");
|
|
2747
2748
|
return $(), H(De, {
|
|
2748
2749
|
title: o(s)("menu.product.form.price.title")
|
|
2749
2750
|
}, {
|
|
@@ -2844,7 +2845,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
2844
2845
|
h.value ? ($(), J("div", ca, [
|
|
2845
2846
|
N("p", ma, ge(o(s)("menu.product.form.price.settings.sell_by_unit.per_unit.label")), 1),
|
|
2846
2847
|
N("div", pa, [
|
|
2847
|
-
C(
|
|
2848
|
+
C(M, {
|
|
2848
2849
|
disabled: !d.value.unit,
|
|
2849
2850
|
"model-value": p.form.perXUnit || ((i = p.fallback) == null ? void 0 : i.perXUnit) || null,
|
|
2850
2851
|
rules: [
|
|
@@ -2859,7 +2860,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
2859
2860
|
}, null, 8, ["disabled", "model-value", "rules", "placeholder"])
|
|
2860
2861
|
]),
|
|
2861
2862
|
N("div", fa, [
|
|
2862
|
-
C(
|
|
2863
|
+
C(M, {
|
|
2863
2864
|
disabled: !d.value.unit,
|
|
2864
2865
|
"model-value": p.form.unit || ((v = p.fallback) == null ? void 0 : v.unit) || null,
|
|
2865
2866
|
rules: [
|
|
@@ -3002,7 +3003,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
3002
3003
|
() => h.value.length,
|
|
3003
3004
|
() => F(h.value[h.value.length - 1]._id, !0)
|
|
3004
3005
|
), (k, p) => {
|
|
3005
|
-
const T = j("fm-switch"), R = j("fm-radio"), A = j("fm-radio-group"), S = j("fm-button"),
|
|
3006
|
+
const T = j("fm-switch"), R = j("fm-radio"), A = j("fm-radio-group"), S = j("fm-button"), M = j("fm-checkbox");
|
|
3006
3007
|
return $(), H(De, {
|
|
3007
3008
|
title: o(c)("menu.product.form.print.title")
|
|
3008
3009
|
}, {
|
|
@@ -3071,7 +3072,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
3071
3072
|
}, ["stop"]))
|
|
3072
3073
|
}, null, 8, ["disabled"])) : X("", !0)
|
|
3073
3074
|
]),
|
|
3074
|
-
C(
|
|
3075
|
+
C(M, {
|
|
3075
3076
|
id: u,
|
|
3076
3077
|
"data-checked": (x = (v = e.form.print) == null ? void 0 : v.department) == null ? void 0 : x.includes(u),
|
|
3077
3078
|
label: b.value[u],
|
|
@@ -3233,8 +3234,8 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
3233
3234
|
_.value.options = R;
|
|
3234
3235
|
}
|
|
3235
3236
|
function I(R, A) {
|
|
3236
|
-
const S = me(_.value.options),
|
|
3237
|
-
S[
|
|
3237
|
+
const S = me(_.value.options), M = S.findIndex((E) => E._id == R);
|
|
3238
|
+
S[M].name = A, _.value.options = S, M === _.value.options.length - 1 && F();
|
|
3238
3239
|
}
|
|
3239
3240
|
function F() {
|
|
3240
3241
|
const R = me(_.value.options);
|
|
@@ -3299,7 +3300,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
3299
3300
|
), Ae(() => {
|
|
3300
3301
|
f.value = !0;
|
|
3301
3302
|
}), (R, A) => {
|
|
3302
|
-
const S = j("fm-text-field"),
|
|
3303
|
+
const S = j("fm-text-field"), M = j("fm-icon"), E = j("fm-button"), u = j("fm-side-sheet");
|
|
3303
3304
|
return $(), H(u, {
|
|
3304
3305
|
id: "variant-form",
|
|
3305
3306
|
modelValue: f.value,
|
|
@@ -3368,7 +3369,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
3368
3369
|
class: fe(["flex items-center", "space-x-8"]),
|
|
3369
3370
|
"data-not-allow-sort": v === _.value.options.length - 1
|
|
3370
3371
|
}, [
|
|
3371
|
-
v !== _.value.options.length - 1 ? ($(), H(
|
|
3372
|
+
v !== _.value.options.length - 1 ? ($(), H(M, {
|
|
3372
3373
|
key: 0,
|
|
3373
3374
|
class: "handle",
|
|
3374
3375
|
name: "drag_handle"
|
|
@@ -3387,7 +3388,7 @@ const Vr = /* @__PURE__ */ ae({
|
|
|
3387
3388
|
v !== _.value.options.length - 1 ? {
|
|
3388
3389
|
name: "append",
|
|
3389
3390
|
fn: K(() => [
|
|
3390
|
-
C(
|
|
3391
|
+
C(M, {
|
|
3391
3392
|
name: "close",
|
|
3392
3393
|
onClick: (x) => O(i._id)
|
|
3393
3394
|
}, null, 8, ["onClick"])
|
|
@@ -3757,7 +3758,7 @@ const Ua = {
|
|
|
3757
3758
|
showCurrency: !1
|
|
3758
3759
|
});
|
|
3759
3760
|
}
|
|
3760
|
-
}]),
|
|
3761
|
+
}]), M = D(() => ({
|
|
3761
3762
|
minPrice: w.value
|
|
3762
3763
|
}));
|
|
3763
3764
|
function E(u) {
|
|
@@ -3821,7 +3822,7 @@ const Ua = {
|
|
|
3821
3822
|
key: 0,
|
|
3822
3823
|
class: "w-full",
|
|
3823
3824
|
"column-defs": S.value,
|
|
3824
|
-
"column-visibility":
|
|
3825
|
+
"column-visibility": M.value,
|
|
3825
3826
|
"page-size": p.value.length ?? 0,
|
|
3826
3827
|
"row-data": p.value ?? [],
|
|
3827
3828
|
"hide-footer": "",
|
|
@@ -3935,7 +3936,7 @@ const Ua = {
|
|
|
3935
3936
|
orderFrom: void 0
|
|
3936
3937
|
}, m());
|
|
3937
3938
|
}
|
|
3938
|
-
const
|
|
3939
|
+
const M = D(() => {
|
|
3939
3940
|
const G = {};
|
|
3940
3941
|
return t.menu.modules.item.forEach((z) => {
|
|
3941
3942
|
var re;
|
|
@@ -4075,7 +4076,7 @@ const Ua = {
|
|
|
4075
4076
|
var G;
|
|
4076
4077
|
return (G = V.value) == null ? void 0 : G.validateInputsWithoutSubmit();
|
|
4077
4078
|
}
|
|
4078
|
-
function
|
|
4079
|
+
function U() {
|
|
4079
4080
|
return a.value;
|
|
4080
4081
|
}
|
|
4081
4082
|
async function B(G, z = !1) {
|
|
@@ -4097,7 +4098,7 @@ const Ua = {
|
|
|
4097
4098
|
t.focused && oe(t.focused);
|
|
4098
4099
|
}), r({
|
|
4099
4100
|
validate: W,
|
|
4100
|
-
getData:
|
|
4101
|
+
getData: U,
|
|
4101
4102
|
hasUnsavedChanges: L
|
|
4102
4103
|
}), (G, z) => {
|
|
4103
4104
|
const re = j("FmBreadcrumb"), ue = j("FmForm");
|
|
@@ -4153,7 +4154,7 @@ const Ua = {
|
|
|
4153
4154
|
entity: "item",
|
|
4154
4155
|
"model-value": a.value.customAttributes || {},
|
|
4155
4156
|
"onUpdate:modelValue": z[2] || (z[2] = (Z) => F("customAttributes", Z)),
|
|
4156
|
-
"value-options":
|
|
4157
|
+
"value-options": M.value
|
|
4157
4158
|
}, null, 8, ["model-value", "value-options"])
|
|
4158
4159
|
]),
|
|
4159
4160
|
_: 1
|
|
@@ -4507,12 +4508,12 @@ function gl() {
|
|
|
4507
4508
|
(p = F.children) == null || p.push(T);
|
|
4508
4509
|
else {
|
|
4509
4510
|
let A = F.children, S = "";
|
|
4510
|
-
for (const
|
|
4511
|
-
S +=
|
|
4511
|
+
for (const M of R.subCategories || []) {
|
|
4512
|
+
S += M;
|
|
4512
4513
|
const E = A.find(
|
|
4513
4514
|
(u) => {
|
|
4514
4515
|
var l, i;
|
|
4515
|
-
return ((l = u.meta) == null ? void 0 : l.nodeType) === "subCategory" && ((i = u.meta) == null ? void 0 : i.rawId) ===
|
|
4516
|
+
return ((l = u.meta) == null ? void 0 : l.nodeType) === "subCategory" && ((i = u.meta) == null ? void 0 : i.rawId) === M;
|
|
4516
4517
|
}
|
|
4517
4518
|
);
|
|
4518
4519
|
if (E)
|
|
@@ -4520,13 +4521,13 @@ function gl() {
|
|
|
4520
4521
|
else {
|
|
4521
4522
|
const u = {
|
|
4522
4523
|
id: `category-${I.label}-sub-category-${S}`,
|
|
4523
|
-
label: s(
|
|
4524
|
+
label: s(M),
|
|
4524
4525
|
icon: $e.CATEGORY,
|
|
4525
4526
|
children: [],
|
|
4526
4527
|
draggable: !0,
|
|
4527
4528
|
meta: {
|
|
4528
4529
|
nodeType: "subCategory",
|
|
4529
|
-
rawId:
|
|
4530
|
+
rawId: M
|
|
4530
4531
|
}
|
|
4531
4532
|
};
|
|
4532
4533
|
A.push(u), A = u.children;
|
|
@@ -4595,13 +4596,13 @@ function gl() {
|
|
|
4595
4596
|
};
|
|
4596
4597
|
}
|
|
4597
4598
|
function A(m, V, L) {
|
|
4598
|
-
var
|
|
4599
|
+
var U;
|
|
4599
4600
|
const W = T.modules.group.find(
|
|
4600
4601
|
(B) => B._id === L._id
|
|
4601
4602
|
);
|
|
4602
4603
|
if (!W)
|
|
4603
4604
|
throw new Error(`Item ${m._id} has unknown group ${L._id}`);
|
|
4604
|
-
return (
|
|
4605
|
+
return (U = W.items) == null ? void 0 : U.map((B, oe) => {
|
|
4605
4606
|
var Te, Z;
|
|
4606
4607
|
const ne = !!B.combinationKey, ee = (Te = L.items) == null ? void 0 : Te.find(
|
|
4607
4608
|
(de) => de._id === B._id && de.combinationKey === B.combinationKey
|
|
@@ -4666,7 +4667,7 @@ function gl() {
|
|
|
4666
4667
|
}
|
|
4667
4668
|
function S(m, V) {
|
|
4668
4669
|
const L = (ne) => V ? `item-${m._id}-variant-${V.combinationKey}-group-${ne}` : `item-${m._id}-group-${ne}`, W = [];
|
|
4669
|
-
function
|
|
4670
|
+
function U() {
|
|
4670
4671
|
var ee;
|
|
4671
4672
|
const ne = [];
|
|
4672
4673
|
if (V)
|
|
@@ -4678,7 +4679,7 @@ function gl() {
|
|
|
4678
4679
|
ne.push(...m.groups || []);
|
|
4679
4680
|
return ne;
|
|
4680
4681
|
}
|
|
4681
|
-
const B =
|
|
4682
|
+
const B = U(), oe = bt(
|
|
4682
4683
|
B.map((ne) => {
|
|
4683
4684
|
const ee = dt.get(ne._id);
|
|
4684
4685
|
return { ...ne, position: ee == null ? void 0 : ee.position, name: (ee == null ? void 0 : ee.name) || "" };
|
|
@@ -4706,12 +4707,12 @@ function gl() {
|
|
|
4706
4707
|
}
|
|
4707
4708
|
return W;
|
|
4708
4709
|
}
|
|
4709
|
-
function
|
|
4710
|
+
function M(m, V) {
|
|
4710
4711
|
return S(m, V);
|
|
4711
4712
|
}
|
|
4712
4713
|
function E(m) {
|
|
4713
|
-
var
|
|
4714
|
-
const V = [], L = m.groups && m.groups.length > 0, W = ((
|
|
4714
|
+
var U;
|
|
4715
|
+
const V = [], L = m.groups && m.groups.length > 0, W = ((U = m.variant) == null ? void 0 : U.variantGroupIds) && m.variant.variantGroupIds.length > 0;
|
|
4715
4716
|
if (L && !W) {
|
|
4716
4717
|
const B = S(m);
|
|
4717
4718
|
V.push(...B);
|
|
@@ -4732,7 +4733,7 @@ function gl() {
|
|
|
4732
4733
|
rr(oe, ee.combinationKey),
|
|
4733
4734
|
ee.code
|
|
4734
4735
|
),
|
|
4735
|
-
children:
|
|
4736
|
+
children: M(m, ee),
|
|
4736
4737
|
rightLabel: Jo(m, ee),
|
|
4737
4738
|
chips: Ee,
|
|
4738
4739
|
onClick: () => {
|
|
@@ -4825,11 +4826,11 @@ function gl() {
|
|
|
4825
4826
|
const y = (m, V) => `item-${V ?? "addon"}-${m}`;
|
|
4826
4827
|
for (const m of T.modules.item)
|
|
4827
4828
|
Lt(m).forEach(({ _id: L }) => {
|
|
4828
|
-
var
|
|
4829
|
+
var U, B, oe, ne, ee, pe, Ee, Ve;
|
|
4829
4830
|
const W = L ? l.find((G) => G.id === u(L)) : x;
|
|
4830
4831
|
if (W) {
|
|
4831
4832
|
const G = _t(
|
|
4832
|
-
((
|
|
4833
|
+
((U = m.groups) == null ? void 0 : U.length) ?? 0,
|
|
4833
4834
|
n("menu.tree_editor.labels.groups", { count: (B = m.groups) == null ? void 0 : B.length })
|
|
4834
4835
|
), z = _t(
|
|
4835
4836
|
((ne = (oe = m.variant) == null ? void 0 : oe.variantCombinations) == null ? void 0 : ne.length) ?? 0,
|
|
@@ -5118,7 +5119,7 @@ function vl() {
|
|
|
5118
5119
|
const P = wt(v, x, y), Y = h(i), Q = w(i);
|
|
5119
5120
|
await r.rearrangeWithSubCategory(P, Y, Q);
|
|
5120
5121
|
}
|
|
5121
|
-
async function
|
|
5122
|
+
async function M(E) {
|
|
5122
5123
|
const u = t.getNodeById(E.draggedNodeId), l = t.getNodeById(E.targetNodeId);
|
|
5123
5124
|
!u || !l || (s(u) ? await k(u, l, E.dragPosition) : g(u) ? await A(u, l, E.dragPosition) : d(u) ? await S(u, l, E.dragPosition) : c("Unsupported drag operation"));
|
|
5124
5125
|
}
|
|
@@ -5127,7 +5128,7 @@ function vl() {
|
|
|
5127
5128
|
isItemNode: g,
|
|
5128
5129
|
isSubCategoryNode: d,
|
|
5129
5130
|
canDropFn: O,
|
|
5130
|
-
handleNodeDragDrop:
|
|
5131
|
+
handleNodeDragDrop: M
|
|
5131
5132
|
};
|
|
5132
5133
|
}
|
|
5133
5134
|
const Ft = /* @__PURE__ */ ae({
|
|
@@ -5220,8 +5221,8 @@ function bl(n) {
|
|
|
5220
5221
|
}
|
|
5221
5222
|
e("updateDragState", d.value, h.value, w.value);
|
|
5222
5223
|
}
|
|
5223
|
-
const
|
|
5224
|
-
k.clientY - T.top <
|
|
5224
|
+
const M = 50;
|
|
5225
|
+
k.clientY - T.top < M ? p.scrollTop -= 10 : T.bottom - k.clientY < M && (p.scrollTop += 10);
|
|
5225
5226
|
}
|
|
5226
5227
|
function F() {
|
|
5227
5228
|
document.removeEventListener("mousemove", I), document.removeEventListener("mouseup", F), g.value && d.value && h.value && w.value && e("nodeDragDrop", {
|
|
@@ -5451,21 +5452,21 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ ae({
|
|
|
5451
5452
|
t
|
|
5452
5453
|
} = ce(), c = n, s = e;
|
|
5453
5454
|
function g(S) {
|
|
5454
|
-
const
|
|
5455
|
-
|
|
5455
|
+
const M = c.expandedNodeIds;
|
|
5456
|
+
M != null && M.includes(S) ? s("updateExpandedNodeIds", M.filter((E) => E !== S)) : s("updateExpandedNodeIds", [...M || [], S]);
|
|
5456
5457
|
}
|
|
5457
5458
|
const d = D(() => new Set(c.expandedNodeIds)), h = D(() => {
|
|
5458
5459
|
const S = [];
|
|
5459
|
-
function
|
|
5460
|
+
function M(E, u = 0) {
|
|
5460
5461
|
if (E)
|
|
5461
5462
|
for (const l of E)
|
|
5462
5463
|
S.push({
|
|
5463
5464
|
id: l.id,
|
|
5464
5465
|
level: u,
|
|
5465
5466
|
node: l
|
|
5466
|
-
}), d.value.has(l.id) && l.children && l.children.length > 0 &&
|
|
5467
|
+
}), d.value.has(l.id) && l.children && l.children.length > 0 && M(l.children, u + 1);
|
|
5467
5468
|
}
|
|
5468
|
-
return
|
|
5469
|
+
return M(c.nodes), S;
|
|
5469
5470
|
});
|
|
5470
5471
|
q(null);
|
|
5471
5472
|
const {
|
|
@@ -5478,15 +5479,15 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ ae({
|
|
|
5478
5479
|
overscan: 10
|
|
5479
5480
|
});
|
|
5480
5481
|
ye(() => h.value.length, async (S) => {
|
|
5481
|
-
const
|
|
5482
|
-
|
|
5482
|
+
const M = b.ref.value;
|
|
5483
|
+
M && S * It < M.scrollTop && (await nt(), _(0));
|
|
5483
5484
|
});
|
|
5484
5485
|
function a() {
|
|
5485
5486
|
_(0);
|
|
5486
5487
|
}
|
|
5487
5488
|
function I(S) {
|
|
5488
|
-
const
|
|
5489
|
-
|
|
5489
|
+
const M = h.value.findIndex((E) => E.id === S);
|
|
5490
|
+
M !== -1 && _(M);
|
|
5490
5491
|
}
|
|
5491
5492
|
const {
|
|
5492
5493
|
isDragging: F,
|
|
@@ -5498,8 +5499,8 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ ae({
|
|
|
5498
5499
|
cancelDrag: A
|
|
5499
5500
|
} = bl({
|
|
5500
5501
|
itemHeight: It,
|
|
5501
|
-
emit: (S, ...
|
|
5502
|
-
S === "updateDragState" ? s("updateDragState", ...
|
|
5502
|
+
emit: (S, ...M) => {
|
|
5503
|
+
S === "updateDragState" ? s("updateDragState", ...M) : S === "nodeDragDrop" && s("nodeDragDrop", M[0]);
|
|
5503
5504
|
},
|
|
5504
5505
|
getFlattenedItems: () => h.value,
|
|
5505
5506
|
getContainerRef: () => b.ref.value,
|
|
@@ -5509,7 +5510,7 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ ae({
|
|
|
5509
5510
|
scrollToTop: a,
|
|
5510
5511
|
scrollToNode: I,
|
|
5511
5512
|
cancelDrag: A
|
|
5512
|
-
}), (S,
|
|
5513
|
+
}), (S, M) => {
|
|
5513
5514
|
var u;
|
|
5514
5515
|
const E = j("FmIcon");
|
|
5515
5516
|
return $(), J("div", Vn({
|
|
@@ -5634,7 +5635,7 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ ae({
|
|
|
5634
5635
|
key: 0,
|
|
5635
5636
|
label: o(a)("menu.tree_editor.actions.add_category"),
|
|
5636
5637
|
icon: "add",
|
|
5637
|
-
onClick: S[0] || (S[0] = (
|
|
5638
|
+
onClick: S[0] || (S[0] = (M) => o(g).create())
|
|
5638
5639
|
}, null, 8, ["label"])) : X("", !0), o(s).state.currentCatalogId && !o(s).state.currentSchedulerId ? ($(), H(xt, {
|
|
5639
5640
|
key: 1,
|
|
5640
5641
|
"categorized-items": o(p).linkableItems.value,
|
|
@@ -5648,11 +5649,11 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ ae({
|
|
|
5648
5649
|
onSubmit: o(k)
|
|
5649
5650
|
}, {
|
|
5650
5651
|
default: K(({
|
|
5651
|
-
trigger:
|
|
5652
|
+
trigger: M
|
|
5652
5653
|
}) => [C(kt, {
|
|
5653
5654
|
label: o(a)("menu.catalog.edit.link_product"),
|
|
5654
5655
|
icon: "link",
|
|
5655
|
-
onClick:
|
|
5656
|
+
onClick: M
|
|
5656
5657
|
}, null, 8, ["label", "onClick"])]),
|
|
5657
5658
|
_: 1
|
|
5658
5659
|
}, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])) : X("", !0), o(s).state.currentSchedulerId ? ($(), H(xt, {
|
|
@@ -5668,31 +5669,31 @@ const yl = { key: 0 }, hl = ["innerHTML"], wl = /* @__PURE__ */ ae({
|
|
|
5668
5669
|
onSubmit: o(k)
|
|
5669
5670
|
}, {
|
|
5670
5671
|
default: K(({
|
|
5671
|
-
trigger:
|
|
5672
|
+
trigger: M
|
|
5672
5673
|
}) => [C(kt, {
|
|
5673
5674
|
label: o(a)("menu.catalog.edit.apply_scheduler"),
|
|
5674
5675
|
icon: "link",
|
|
5675
|
-
onClick:
|
|
5676
|
+
onClick: M
|
|
5676
5677
|
}, null, 8, ["label", "onClick"])]),
|
|
5677
5678
|
_: 1
|
|
5678
5679
|
}, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])) : X("", !0), N("div", Kl, [C(St, {
|
|
5679
5680
|
name: "expand_all",
|
|
5680
5681
|
tooltip: o(a)("menu.tree_editor.actions.expand_all"),
|
|
5681
5682
|
visible: !0,
|
|
5682
|
-
onClick: S[1] || (S[1] = (
|
|
5683
|
+
onClick: S[1] || (S[1] = (M) => o(c).expandAllNodes())
|
|
5683
5684
|
}, null, 8, ["tooltip"]), C(St, {
|
|
5684
5685
|
name: "collapse_all",
|
|
5685
5686
|
tooltip: o(a)("menu.tree_editor.actions.collapse_all"),
|
|
5686
5687
|
visible: !0,
|
|
5687
|
-
onClick: S[2] || (S[2] = (
|
|
5688
|
+
onClick: S[2] || (S[2] = (M) => o(c).collapseAllNodes())
|
|
5688
5689
|
}, null, 8, ["tooltip"])])]), C(eo, null, {
|
|
5689
5690
|
default: K(() => [C(Ml, {
|
|
5690
5691
|
nodes: o(c).treeNodes,
|
|
5691
5692
|
selectedNodeId: o(c).selectedNodeId,
|
|
5692
5693
|
expandedNodeIds: o(c).expandedNodeIds,
|
|
5693
5694
|
canDropFn: o(d),
|
|
5694
|
-
onUpdateExpandedNodeIds: S[3] || (S[3] = (
|
|
5695
|
-
onNodeDragDrop: S[4] || (S[4] = (
|
|
5695
|
+
onUpdateExpandedNodeIds: S[3] || (S[3] = (M) => o(c).setExpandedNodeIds(M)),
|
|
5696
|
+
onNodeDragDrop: S[4] || (S[4] = (M) => o(h)(M))
|
|
5696
5697
|
}, null, 8, ["nodes", "selectedNodeId", "expandedNodeIds", "canDropFn"])]),
|
|
5697
5698
|
_: 1
|
|
5698
5699
|
})]));
|