@feedmepos/mf-menu 0.32.15 → 0.32.17-dev
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-BFUyUrdi.js → App-CS86owo3.js} +5 -5
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BbjRIN7Z.js → ApplyProduct.vue_vue_type_script_setup_true_lang-DaUTgTs_.js} +3 -3
- package/dist/{Catalog-B6VFmr6e.js → Catalog-DRNhdGGD.js} +6 -6
- package/dist/{Category-C8uGxpST.js → Category-BNhbD0VA.js} +6 -6
- package/dist/{Category-B-bTjNFI.js → Category-mS09ECzt.js} +4 -4
- package/dist/{CookingGuide-BL3uetlO.js → CookingGuide-CtE-ueBG.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-8yIVwc8E.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-DCbTamf9.js} +1 -1
- package/dist/{Group-BvO-gQZe.js → Group-CsurQlC9.js} +1 -1
- package/dist/{Group-DT9UkkOx.js → Group-D2RLkrxZ.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-DZhM1Tpb.js → Group.vue_vue_type_script_setup_true_lang-Chq5Pcnw.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D48u_DHq.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Ch9xYGvB.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-C_X-lTnN.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DTKmyt73.js} +5056 -5055
- package/dist/{Ingredient-7qWDD9e6.js → Ingredient-Civo_6ts.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CwjW0wfz.js → InventoryBinding.vue_vue_type_script_setup_true_lang-LDadxBhp.js} +1052 -1052
- package/dist/{LinkProductSideSheet-BXW6eNgZ.js → LinkProductSideSheet-8NK_5ryH.js} +3 -3
- package/dist/{MenuSetting-BSF7O2NL.js → MenuSetting-BnPspVfy.js} +5 -5
- package/dist/{PrintRoute-b1ii5Uz9.js → PrintRoute-WToP4QnZ.js} +4 -4
- package/dist/{Product-Ce0GJb3c.js → Product-D2pWNPhP.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-BZVvTAOX.js → Product.vue_vue_type_script_setup_true_lang-Cq42j791.js} +12 -12
- package/dist/{ProductInternalTools-igbOLRap.js → ProductInternalTools-DzzhanaE.js} +5 -5
- package/dist/{Products-GAyUdhnN.js → Products-J9XiGz-3.js} +102 -103
- package/dist/{Publish-g60odzhM.js → Publish-B0KcuZAD.js} +3 -3
- package/dist/{Recipe-B6aye_iC.js → Recipe-C0hVFbp4.js} +4 -4
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-By8kwuMB.js → RuleView.vue_vue_type_script_setup_true_lang-CpNKX-sg.js} +2 -2
- package/dist/{Scheduler-CyaG6Y5v.js → Scheduler-DsWzD3qp.js} +3 -3
- package/dist/{ServingSequence-BXeypgrN.js → ServingSequence-BvBJtPsT.js} +3 -3
- package/dist/{Setting-D7GcaNTk.js → Setting-lZyb72vf.js} +5 -5
- package/dist/{Subcategory-DNUp9ojI.js → Subcategory-BdPHqNYT.js} +4 -4
- package/dist/{Takeaway-Baqvq5nP.js → Takeaway-1-_pOBc_.js} +4 -4
- package/dist/{Takeaway-BjXPeYRv.js → Takeaway-BGGKoWV5.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CgXT2UVL.js → Takeaway.vue_vue_type_script_setup_true_lang-yDE3yWDr.js} +5 -5
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-CX8cSbDe.js → Thumbnail.vue_vue_type_script_setup_true_lang-h9yZ2fAu.js} +4 -4
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DcjGVQEO.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-C3q_7RGw.js} +147 -141
- package/dist/{Unit-mI7lLzCf.js → Unit-DnWI2GGt.js} +2 -2
- package/dist/{Variant-CVwnODRz.js → Variant-CBIO_Py6.js} +3 -3
- package/dist/{_id_-fpn0nBru.js → _id_-CWZxFATG.js} +9 -9
- package/dist/{app-CCKI85Te.js → app-BoMEYIIR.js} +26 -26
- package/dist/{app-U5MEN4U1.js → app-DQFmgarT.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +1 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-6Jt70XBp.js → linked-status-HhBW6D7W.js} +2 -2
- package/dist/assets/{menu-export-CR0a98CA.js → menu-export-qkOR6zu5.js} +3 -3
- package/dist/assets/{override-menu-Chsc0CSI.js → override-menu-ClYLJDqA.js} +2 -2
- package/dist/assets/{validate-menu-pb0aN4gj.js → validate-menu-WQ3U3WZa.js} +2 -2
- package/dist/{catalog-BgQmytEA.js → catalog-DDqEdble.js} +1 -1
- package/dist/{catalogSetting-BS5IaQKq.js → catalogSetting-CCmJsXTh.js} +1 -1
- package/dist/{category-DJMVbmzx.js → category-Dx7d5TEa.js} +1 -1
- package/dist/{currency-FHrLDvzy.js → currency-CM1RnQcP.js} +1 -1
- package/dist/{dayjs.min-DJGdQr-B.js → dayjs.min-Dk58BsuL.js} +1 -1
- package/dist/{index-BywPDIFW.js → index-CEen9P1H.js} +4 -4
- package/dist/{index-DYxLHjeC.js → index-Mlze1KnJ.js} +1 -1
- package/dist/{index-XVWDnyu-.js → index-mCZY4RLs.js} +3 -3
- package/dist/{index.vue_vue_type_script_setup_true_lang-kj6HkxwD.js → index.vue_vue_type_script_setup_true_lang-CvDwvRNY.js} +284 -284
- package/dist/{item-cmnP2N-a.js → item-va1GmngO.js} +96 -90
- package/dist/{jszip.min-psVCZNVl.js → jszip.min-BwKJLdao.js} +353 -353
- package/dist/{menu-CgQPOu3W.js → menu-C8VGzuie.js} +1 -1
- package/dist/{menuV2-DHO9OmzU.js → menuV2-t3v9Mt48.js} +86 -86
- package/dist/mf-menu.css +1 -1
- package/dist/{priceTier-CLm9vzaK.js → priceTier-CfMNR5R4.js} +1 -1
- package/dist/{scheduler-BMdZdtpj.js → scheduler-Br2nYK4b.js} +4 -4
- package/dist/{subcategory-Dj_DOvFt.js → subcategory-D9UJvB3z.js} +2 -2
- package/dist/{toExcel-XwFFiTiA.js → toExcel-BdhvLkrS.js} +2 -2
- package/dist/{unit-CsuAQsy7.js → unit-DfSNL7du.js} +2 -2
- package/package.json +2 -2
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { computed as V, shallowRef as Wt, ref as
|
|
2
|
-
import { g as Nn, o as Ln, f as Gn, a as Kn, b as Qt, n as Zt, I as Bn, S as zn, _ as Dt, C as Yn, c as en, d as Et, e as tn, h as jn, m as Wn, F as qn, M as nn, i as Hn, r as Xn, j as on, k as Nt, l as rn, p as Jn, P as Qn, q as Zn, s as an, u as eo, T as Be } from "./item-
|
|
3
|
-
import { _ as to, T as no } from "./app-
|
|
4
|
-
import { B as ye, M as he, A as oe, G as nt, N as oo, O as ro, P as ao, u as ft, Q as Vt, R as lo, D as Le, T as io, I as fe, U as so, V as $t, J as Ie, W as vt, X as uo, Y as co, Z as bt, $ as Lt, a0 as mo, a1 as po } from "./index.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { computed as V, shallowRef as Wt, ref as H, watch as we, nextTick as tt, getCurrentInstance as Sn, onMounted as Ae, defineComponent as le, resolveComponent as j, createElementBlock as Z, openBlock as P, createBlock as J, normalizeClass as ve, createElementVNode as A, createVNode as C, unref as n, withCtx as B, toDisplayString as be, mergeModels as qt, useModel as Ht, createCommentVNode as Q, resolveDirective as Xt, withDirectives as pt, createTextVNode as Fn, renderSlot as Re, h as _e, Fragment as Oe, renderList as Ne, vShow as Jt, withModifiers as qe, createSlots as On, onBeforeUnmount as Ot, watchEffect as Dn, onUnmounted as Vn, normalizeStyle as dt, mergeProps as $n, normalizeProps as Pn, guardReactiveProps as Un, Teleport as Mn, Transition as Rn, withKeys as An } from "vue";
|
|
2
|
+
import { g as Nn, o as Ln, f as Gn, a as Kn, b as Qt, n as Zt, I as Bn, S as zn, _ as Dt, C as Yn, c as en, d as Et, e as tn, h as jn, m as Wn, F as qn, M as nn, i as Hn, r as Xn, j as on, k as Nt, l as rn, p as Jn, P as Qn, q as Zn, s as an, u as eo, T as Be } from "./item-va1GmngO.js";
|
|
3
|
+
import { _ as to, T as no } from "./app-BoMEYIIR.js";
|
|
4
|
+
import { B as ye, M as he, A as oe, G as nt, N as oo, O as ro, P as ao, u as ft, Q as Vt, R as lo, D as Le, T as io, I as fe, U as so, V as $t, J as Ie, W as vt, X as uo, Y as co, Z as bt, $ as Lt, a0 as mo, a1 as po } from "./index.vue_vue_type_script_setup_true_lang-CvDwvRNY.js";
|
|
5
5
|
import { useI18n as me, useCoreStore as ot, CustomAttributesForm as ln } from "@feedmepos/mf-common";
|
|
6
6
|
import { useDialog as Ge, useDialogChild as Pt, useSnackbar as Me, FmButtonColorThemeVariant as Fe, components as ke, FmButtonVariant as We, useBreakpoints as fo } from "@feedmepos/ui-library";
|
|
7
7
|
import { u as Ut } from "./discardConfirm-BHni0LNu.js";
|
|
8
8
|
import { defineStore as go } from "pinia";
|
|
9
|
-
import { _ as De, a as vo } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
import { u as ue, g as sn, m as bo } from "./menuV2-
|
|
9
|
+
import { _ as De, a as vo } from "./RuleView.vue_vue_type_script_setup_true_lang-CpNKX-sg.js";
|
|
10
|
+
import { u as ue, g as sn, m as bo } from "./menuV2-t3v9Mt48.js";
|
|
11
11
|
import { s as Tt, _ as _o } from "./index-CisutoS9.js";
|
|
12
12
|
import { useAppStore as un, RemyButton as dn } from "@feedmepos/mf-remy-panel";
|
|
13
13
|
import { _ as Ue } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
14
|
-
import { _ as Gt } from "./category-
|
|
15
|
-
import { _ as yo, a as ho, u as wo } from "./Thumbnail.vue_vue_type_script_setup_true_lang-
|
|
14
|
+
import { _ as Gt } from "./category-Dx7d5TEa.js";
|
|
15
|
+
import { _ as yo, a as ho, u as wo } from "./Thumbnail.vue_vue_type_script_setup_true_lang-h9yZ2fAu.js";
|
|
16
16
|
import { _ as Qe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
17
|
import { _ as cn } from "./tooltip-B5BiPMx9.js";
|
|
18
|
-
import { _ as He, T as Co, l as ko } from "./index-
|
|
19
|
-
import { L as xt } from "./LinkProductSideSheet-
|
|
18
|
+
import { _ as He, T as Co, l as ko } from "./index-CEen9P1H.js";
|
|
19
|
+
import { L as xt } from "./LinkProductSideSheet-8NK_5ryH.js";
|
|
20
20
|
import { u as Io } from "./search-BAPEUu1R.js";
|
|
21
21
|
import { c as Mt } from "./check-C9mY6LiX.js";
|
|
22
|
-
import { f as et } from "./currency-
|
|
22
|
+
import { f as et } from "./currency-CM1RnQcP.js";
|
|
23
23
|
import { c as Eo } from "./string-DpfFixWH.js";
|
|
24
24
|
import { useInventoryStore as To, InventoryBindingSummary as xo } from "@feedmepos/mf-inventory-portal";
|
|
25
|
-
import { u as So } from "./priceTier-
|
|
25
|
+
import { u as So } from "./priceTier-CfMNR5R4.js";
|
|
26
26
|
import { d as Rt } from "./vuedraggable-CK8z7qA8.js";
|
|
27
|
-
import { _ as Fo } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-
|
|
27
|
+
import { _ as Fo } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-DaUTgTs_.js";
|
|
28
28
|
import "./app-5fxKLAzS.js";
|
|
29
29
|
/* empty css */
|
|
30
|
-
import { i as Oo, t as At, w as Do, a as mn, b as pn, n as Vo, c as $o, r as Po, _ as Uo } from "./index-
|
|
30
|
+
import { i as Oo, t as At, w as Do, a as mn, b as pn, n as Vo, c as $o, r as Po, _ as Uo } from "./index-Mlze1KnJ.js";
|
|
31
31
|
import { c as ct } from "./object-DVUNCr7w.js";
|
|
32
32
|
import { _ as Mo } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
|
|
33
33
|
import { _ as Kt } from "./MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js";
|
|
@@ -61,7 +61,7 @@ function Bt(...t) {
|
|
|
61
61
|
return pn(_), _;
|
|
62
62
|
}
|
|
63
63
|
function Ro() {
|
|
64
|
-
const t =
|
|
64
|
+
const t = H(!1), r = Sn();
|
|
65
65
|
return r && Ae(() => {
|
|
66
66
|
t.value = !0;
|
|
67
67
|
}, r), t;
|
|
@@ -129,7 +129,7 @@ function zo(t, r, e, o = {}) {
|
|
|
129
129
|
console.error(l);
|
|
130
130
|
},
|
|
131
131
|
initOnMounted: I
|
|
132
|
-
} = o, S = (w ? Wt :
|
|
132
|
+
} = o, S = (w ? Wt : H)(typeof r == "function" ? r() : r);
|
|
133
133
|
if (!e)
|
|
134
134
|
try {
|
|
135
135
|
e = Go("getDefaultStorage", () => {
|
|
@@ -231,7 +231,7 @@ function jo(t, r = { width: 0, height: 0 }, e = {}) {
|
|
|
231
231
|
const { window: o = Xe, box: s = "content-box" } = e, i = V(() => {
|
|
232
232
|
var v, g;
|
|
233
233
|
return (g = (v = ze(t)) == null ? void 0 : v.namespaceURI) == null ? void 0 : g.includes("svg");
|
|
234
|
-
}), p =
|
|
234
|
+
}), p = H(r.width), h = H(r.height), { stop: b } = Yo(
|
|
235
235
|
t,
|
|
236
236
|
([v]) => {
|
|
237
237
|
const g = s === "border-box" ? v.borderBoxSize : s === "content-box" ? v.contentBoxSize : v.devicePixelContentBoxSize;
|
|
@@ -288,8 +288,8 @@ function qo(t, r) {
|
|
|
288
288
|
};
|
|
289
289
|
}
|
|
290
290
|
function fn(t) {
|
|
291
|
-
const r =
|
|
292
|
-
return { state:
|
|
291
|
+
const r = H(null), e = jo(r), o = H([]), s = Wt(t);
|
|
292
|
+
return { state: H({ start: 0, end: 10 }), source: s, currentList: o, size: e, containerRef: r };
|
|
293
293
|
}
|
|
294
294
|
function gn(t, r, e) {
|
|
295
295
|
return (o) => {
|
|
@@ -496,7 +496,7 @@ function or(t) {
|
|
|
496
496
|
}), r;
|
|
497
497
|
}
|
|
498
498
|
const rt = go("mf-menu-tree", () => {
|
|
499
|
-
const t =
|
|
499
|
+
const t = H(), r = H([]), e = H(null), o = H([]);
|
|
500
500
|
function s(g) {
|
|
501
501
|
r.value = g, w.value = nr(g);
|
|
502
502
|
}
|
|
@@ -526,7 +526,7 @@ const rt = go("mf-menu-tree", () => {
|
|
|
526
526
|
a(I);
|
|
527
527
|
o.value = g;
|
|
528
528
|
}
|
|
529
|
-
const w =
|
|
529
|
+
const w = H(/* @__PURE__ */ new Map());
|
|
530
530
|
function v(g) {
|
|
531
531
|
return w.value.get(g);
|
|
532
532
|
}
|
|
@@ -645,7 +645,7 @@ function ir(t, r, e, o) {
|
|
|
645
645
|
return Ln(i, s);
|
|
646
646
|
}
|
|
647
647
|
function sr(t) {
|
|
648
|
-
const r =
|
|
648
|
+
const r = H(null), e = V(() => r.value ? !t.state.currentCatalogId && !t.state.currentSchedulerId ? t.state.menu.modules.item.find(
|
|
649
649
|
(s) => s._id === r.value
|
|
650
650
|
) : ir(
|
|
651
651
|
t.state.menu,
|
|
@@ -748,7 +748,7 @@ const gt = () => {
|
|
|
748
748
|
}, pr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fr = /* @__PURE__ */ le({
|
|
749
749
|
__name: "ImageUploadDialog",
|
|
750
750
|
setup(t) {
|
|
751
|
-
const { t: r } = me(), e =
|
|
751
|
+
const { t: r } = me(), e = H(), o = H(!1);
|
|
752
752
|
async function s([_]) {
|
|
753
753
|
if (!_) return;
|
|
754
754
|
o.value = !0;
|
|
@@ -847,7 +847,7 @@ const vr = {
|
|
|
847
847
|
const {
|
|
848
848
|
t: r
|
|
849
849
|
} = me(), e = t, o = Ht(t, "modelValue");
|
|
850
|
-
|
|
850
|
+
H(!1);
|
|
851
851
|
const s = Ge(), i = () => {
|
|
852
852
|
o.value = null;
|
|
853
853
|
}, p = () => {
|
|
@@ -992,8 +992,8 @@ const $r = /* @__PURE__ */ le({
|
|
|
992
992
|
},
|
|
993
993
|
set(f = []) {
|
|
994
994
|
const [c, ...$] = f.map((G) => {
|
|
995
|
-
const
|
|
996
|
-
return
|
|
995
|
+
const X = S.value[G];
|
|
996
|
+
return X || {
|
|
997
997
|
_id: G,
|
|
998
998
|
position: null
|
|
999
999
|
};
|
|
@@ -1004,7 +1004,7 @@ const $r = /* @__PURE__ */ le({
|
|
|
1004
1004
|
}
|
|
1005
1005
|
b("update:form", "category", c._id), b("update:form", "additionalCategories", $);
|
|
1006
1006
|
}
|
|
1007
|
-
}), E =
|
|
1007
|
+
}), E = H(), m = ({
|
|
1008
1008
|
multiple: f = !0
|
|
1009
1009
|
} = {}) => e.isAddon ? null : C(Yn, {
|
|
1010
1010
|
ref: E,
|
|
@@ -1038,9 +1038,9 @@ const $r = /* @__PURE__ */ le({
|
|
|
1038
1038
|
const f = e.form.name || ((c = e.fallback) == null ? void 0 : c.name);
|
|
1039
1039
|
return f ? s.items.filter(($) => !!$.category && $._id !== e.form._id && $.name === f).length : 0;
|
|
1040
1040
|
}), U = V(() => {
|
|
1041
|
-
var
|
|
1041
|
+
var X, ee, ie;
|
|
1042
1042
|
if (!o.state.featureFlags.uniqueProductCode) return 0;
|
|
1043
|
-
const c = e.form.code || ((
|
|
1043
|
+
const c = e.form.code || ((X = e.fallback) == null ? void 0 : X.code);
|
|
1044
1044
|
if (!c) return 0;
|
|
1045
1045
|
let $ = s.itemCodeMap.get(c) || 0;
|
|
1046
1046
|
const G = s.items.find((pe) => pe._id === e.form._id);
|
|
@@ -1049,10 +1049,10 @@ const $r = /* @__PURE__ */ le({
|
|
|
1049
1049
|
}), $;
|
|
1050
1050
|
}), R = V(() => e.isAddon ? Pe.ADD_ON : Pe.PRODUCT);
|
|
1051
1051
|
function O(f) {
|
|
1052
|
-
var $, G,
|
|
1052
|
+
var $, G, X;
|
|
1053
1053
|
if (R.value === f) return;
|
|
1054
1054
|
const c = f == Pe.ADD_ON;
|
|
1055
|
-
b("update:form", "category", e.isOverride ? c ? "" : (($ = e.fallback) == null ? void 0 : $.category) ?? ((G = v.value.find((ee) => !!ee.value)) == null ? void 0 : G.value) : c ? null : (
|
|
1055
|
+
b("update:form", "category", e.isOverride ? c ? "" : (($ = e.fallback) == null ? void 0 : $.category) ?? ((G = v.value.find((ee) => !!ee.value)) == null ? void 0 : G.value) : c ? null : (X = v.value.find((ee) => !!ee.value)) == null ? void 0 : X.value), c && b("update:form", "additionalCategories", []);
|
|
1056
1056
|
}
|
|
1057
1057
|
const M = un();
|
|
1058
1058
|
Qt("apply-description", (f) => {
|
|
@@ -1088,7 +1088,7 @@ const $r = /* @__PURE__ */ le({
|
|
|
1088
1088
|
t: y
|
|
1089
1089
|
} = me();
|
|
1090
1090
|
return (f, c) => {
|
|
1091
|
-
const $ = j("fm-text-field"), G = j("fm-textarea"),
|
|
1091
|
+
const $ = j("fm-text-field"), G = j("fm-textarea"), X = j("fm-radio"), ee = j("FmSnackbar"), ie = j("FmButton"), pe = j("fm-radio-group"), d = j("FmFormGroup"), D = j("fm-stepper-field"), N = Xt("tooltip");
|
|
1092
1092
|
return P(), J(De, {
|
|
1093
1093
|
title: n(y)("menu.product.form.detail.title")
|
|
1094
1094
|
}, {
|
|
@@ -1098,10 +1098,10 @@ const $r = /* @__PURE__ */ le({
|
|
|
1098
1098
|
"model-value": f.form.code,
|
|
1099
1099
|
placeholder: ((W = f.fallback) == null ? void 0 : W.code) || n(y)("menu.product.form.detail.fields.code.placeholder"),
|
|
1100
1100
|
label: n(y)("menu.product.form.detail.fields.code.label"),
|
|
1101
|
-
rules: [(
|
|
1101
|
+
rules: [(q) => U.value === 0 || n(y)("menu.product.form.detail.fields.code.duplicate_warning", {
|
|
1102
1102
|
count: U.value
|
|
1103
1103
|
})],
|
|
1104
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
|
1104
|
+
"onUpdate:modelValue": c[0] || (c[0] = (q) => b("update:form", "code", n(Zt)(q, f.isOverride)))
|
|
1105
1105
|
}, null, 8, ["model-value", "placeholder", "label", "rules"])]), A("div", Ir, [C($, {
|
|
1106
1106
|
id: "product-name",
|
|
1107
1107
|
disabled: !_.value.name,
|
|
@@ -1110,15 +1110,15 @@ const $r = /* @__PURE__ */ le({
|
|
|
1110
1110
|
}) : void 0,
|
|
1111
1111
|
"model-value": f.form.name,
|
|
1112
1112
|
placeholder: (L = f.fallback) == null ? void 0 : L.name,
|
|
1113
|
-
rules: _.value.name ? [(
|
|
1113
|
+
rules: _.value.name ? [(q) => !!q || n(y)("menu.product.form.detail.fields.name.required")] : void 0,
|
|
1114
1114
|
"label-mark": "required",
|
|
1115
1115
|
label: n(y)("menu.product.form.detail.fields.name.label"),
|
|
1116
|
-
"onUpdate:modelValue": c[1] || (c[1] = (
|
|
1116
|
+
"onUpdate:modelValue": c[1] || (c[1] = (q) => b("update:form", "name", q))
|
|
1117
1117
|
}, null, 8, ["disabled", "helper-text", "model-value", "placeholder", "rules", "label"])])]), A("div", Er, [C(G, {
|
|
1118
1118
|
disabled: !_.value.description,
|
|
1119
1119
|
"model-value": f.form.description || "",
|
|
1120
1120
|
placeholder: n(y)("menu.product.form.detail.fields.description.placeholder"),
|
|
1121
|
-
"onUpdate:modelValue": c[2] || (c[2] = (
|
|
1121
|
+
"onUpdate:modelValue": c[2] || (c[2] = (q) => b("update:form", "description", q.trim())),
|
|
1122
1122
|
class: "description"
|
|
1123
1123
|
}, {
|
|
1124
1124
|
label: B(() => [A("p", Tr, [Fn(be(n(y)("menu.product.form.detail.fields.description.label")) + " ", 1), A("span", xr, be(n(y)("menu.product.form.detail.fields.description.optional")), 1)])]),
|
|
@@ -1130,7 +1130,7 @@ const $r = /* @__PURE__ */ le({
|
|
|
1130
1130
|
disabled: !_.value.thumbnail,
|
|
1131
1131
|
"item-id": f.form._id || "",
|
|
1132
1132
|
"model-value": f.form.thumbnail || ((K = f.fallback) == null ? void 0 : K.thumbnail) || null,
|
|
1133
|
-
"onUpdate:modelValue": c[3] || (c[3] = (
|
|
1133
|
+
"onUpdate:modelValue": c[3] || (c[3] = (q) => b("update:form", "thumbnail", q))
|
|
1134
1134
|
}, null, 8, ["disabled", "item-id", "model-value"])]), C(Ue, {
|
|
1135
1135
|
label: n(s).isV4 ? n(y)("menu.product.form.detail.category.label") : n(y)("menu.product.form.detail.category.label_singular")
|
|
1136
1136
|
}, {
|
|
@@ -1138,9 +1138,9 @@ const $r = /* @__PURE__ */ le({
|
|
|
1138
1138
|
key: 0,
|
|
1139
1139
|
disabled: !_.value.category,
|
|
1140
1140
|
"model-value": f.isAddon ? Pe.ADD_ON : Pe.PRODUCT,
|
|
1141
|
-
"onUpdate:modelValue": c[4] || (c[4] = (
|
|
1141
|
+
"onUpdate:modelValue": c[4] || (c[4] = (q) => O(q))
|
|
1142
1142
|
}, {
|
|
1143
|
-
default: B(() => [A("div", Sr, [A("div", Fr, [C(
|
|
1143
|
+
default: B(() => [A("div", Sr, [A("div", Fr, [C(X, {
|
|
1144
1144
|
disabled: a.value,
|
|
1145
1145
|
value: Pe.PRODUCT,
|
|
1146
1146
|
label: n(y)("menu.product.form.detail.category.options.product.label"),
|
|
@@ -1158,7 +1158,7 @@ const $r = /* @__PURE__ */ le({
|
|
|
1158
1158
|
"prepend-icon": "add",
|
|
1159
1159
|
variant: "secondary",
|
|
1160
1160
|
onClick: n(i).create
|
|
1161
|
-
}, null, 8, ["label", "onClick"])])) : Q("", !0), C(
|
|
1161
|
+
}, null, 8, ["label", "onClick"])])) : Q("", !0), C(X, {
|
|
1162
1162
|
value: Pe.ADD_ON,
|
|
1163
1163
|
disabled: !1,
|
|
1164
1164
|
label: n(y)("menu.product.form.detail.category.options.addon.label"),
|
|
@@ -1168,7 +1168,7 @@ const $r = /* @__PURE__ */ le({
|
|
|
1168
1168
|
}, 8, ["disabled", "model-value"])) : Q("", !0), n(s).isV4 ? Q("", !0) : (P(), J(d, {
|
|
1169
1169
|
key: 1,
|
|
1170
1170
|
"model-value": f.form.category,
|
|
1171
|
-
rules: [(
|
|
1171
|
+
rules: [(q) => !q && !f.isOverride ? "Category is required" : !0]
|
|
1172
1172
|
}, {
|
|
1173
1173
|
default: B(() => [C(m, {
|
|
1174
1174
|
multiple: !1
|
|
@@ -1182,7 +1182,7 @@ const $r = /* @__PURE__ */ le({
|
|
|
1182
1182
|
}, {
|
|
1183
1183
|
default: B(() => [A("div", Dr, [C(zn, {
|
|
1184
1184
|
modelValue: u.value,
|
|
1185
|
-
"onUpdate:modelValue": c[5] || (c[5] = (
|
|
1185
|
+
"onUpdate:modelValue": c[5] || (c[5] = (q) => u.value = q),
|
|
1186
1186
|
items: l.value,
|
|
1187
1187
|
placeholder: n(y)("menu.product.form.detail.path.placeholder"),
|
|
1188
1188
|
disabled: !_.value.category,
|
|
@@ -1192,22 +1192,27 @@ const $r = /* @__PURE__ */ le({
|
|
|
1192
1192
|
}, 8, ["label"])) : Q("", !0), A("div", Vr, [C(D, {
|
|
1193
1193
|
label: "Shelf Life (mins)",
|
|
1194
1194
|
"model-value": f.form.shelfLife ?? null,
|
|
1195
|
-
|
|
1196
|
-
|
|
1195
|
+
rules: [(q) => q == null || q > 0 || n(y)("menu.common.validation.min_value", {
|
|
1196
|
+
value: 1
|
|
1197
|
+
})],
|
|
1198
|
+
"onUpdate:modelValue": c[6] || (c[6] = (q) => {
|
|
1199
|
+
(q == null || q > 0) && b("update:form", "shelfLife", q);
|
|
1200
|
+
})
|
|
1201
|
+
}, null, 8, ["model-value", "rules"])]), C(Dt, {
|
|
1197
1202
|
disabled: !_.value.orderFrom,
|
|
1198
1203
|
"model-value": f.form.orderFrom,
|
|
1199
1204
|
"order-from-none": _.value.orderFromNone,
|
|
1200
1205
|
required: _.value.orderFrom,
|
|
1201
1206
|
"default-label": n(y)("menu.product.form.detail.order_from.default"),
|
|
1202
1207
|
label: n(y)("menu.product.form.detail.order_from.label"),
|
|
1203
|
-
"onUpdate:modelValue": c[7] || (c[7] = (
|
|
1208
|
+
"onUpdate:modelValue": c[7] || (c[7] = (q) => q && b("update:form", "orderFrom", q))
|
|
1204
1209
|
}, null, 8, ["disabled", "model-value", "order-from-none", "required", "default-label", "label"])];
|
|
1205
1210
|
}),
|
|
1206
1211
|
_: 1
|
|
1207
1212
|
}, 8, ["title"]);
|
|
1208
1213
|
};
|
|
1209
1214
|
}
|
|
1210
|
-
}), Pr = /* @__PURE__ */ Qe($r, [["__scopeId", "data-v-
|
|
1215
|
+
}), Pr = /* @__PURE__ */ Qe($r, [["__scopeId", "data-v-06c9411a"]]), Ur = /* @__PURE__ */ le({
|
|
1211
1216
|
__name: "AddForm",
|
|
1212
1217
|
setup(t) {
|
|
1213
1218
|
const r = ue(), e = V(() => r.rules.group), o = V(() => !!r.state.currentCatalogId || !!r.state.currentSchedulerId), s = V(() => {
|
|
@@ -1237,7 +1242,7 @@ const $r = /* @__PURE__ */ le({
|
|
|
1237
1242
|
items: {},
|
|
1238
1243
|
position: r.groups.length - 1,
|
|
1239
1244
|
itemsLinked: []
|
|
1240
|
-
}), p =
|
|
1245
|
+
}), p = H(i()), { t: h } = me();
|
|
1241
1246
|
return (b, _) => e.value.create ? (P(), J(n(qr), {
|
|
1242
1247
|
key: 0,
|
|
1243
1248
|
"categorized-items": n(r).categorizedItems,
|
|
@@ -1278,7 +1283,7 @@ const $r = /* @__PURE__ */ le({
|
|
|
1278
1283
|
setup(t, {
|
|
1279
1284
|
emit: r
|
|
1280
1285
|
}) {
|
|
1281
|
-
const e = t, o = r, s = Me(), i = ot(), p = ue(), h = V(() => ye.Country.getCountry(i.currentCountry.value)), b =
|
|
1286
|
+
const e = t, o = r, s = Me(), i = ot(), p = ue(), h = V(() => ye.Country.getCountry(i.currentCountry.value)), b = H(!1), _ = V(() => e.config.isV4 || e.group.type === oe.F_ADDON_GROUP_TYPE.enum.PRODUCT), w = V(() => _.value), v = V(() => _.value), g = V(() => Object.values(e.group.items).flatMap((d) => [{
|
|
1282
1287
|
_id: d._id,
|
|
1283
1288
|
combinationKey: void 0
|
|
1284
1289
|
}, ...(d.items ?? []).map((D) => ({
|
|
@@ -1299,9 +1304,9 @@ const $r = /* @__PURE__ */ le({
|
|
|
1299
1304
|
}), E = V(() => !0), m = (d) => d ? et(d, !1) : "", T = (d) => {
|
|
1300
1305
|
var D;
|
|
1301
1306
|
return d == null ? "" : (D = io()[d]) == null ? void 0 : D.label;
|
|
1302
|
-
}, U = V(() => Object.values(S.value)), R =
|
|
1307
|
+
}, U = V(() => Object.values(S.value)), R = H({}), {
|
|
1303
1308
|
t: O
|
|
1304
|
-
} = me(), M =
|
|
1309
|
+
} = me(), M = H([{
|
|
1305
1310
|
accessorKey: "isDefault",
|
|
1306
1311
|
header: () => O("menu.group.option.is_default"),
|
|
1307
1312
|
enableSorting: !1,
|
|
@@ -1315,14 +1320,14 @@ const $r = /* @__PURE__ */ le({
|
|
|
1315
1320
|
value: "default",
|
|
1316
1321
|
modelValue: W,
|
|
1317
1322
|
disabled: !F(N.combinationKey).isDefault,
|
|
1318
|
-
"onUpdate:modelValue": (
|
|
1323
|
+
"onUpdate:modelValue": (q) => {
|
|
1319
1324
|
var re;
|
|
1320
1325
|
if (D) {
|
|
1321
1326
|
const ne = (re = d.row.getParentRow()) == null ? void 0 : re.original;
|
|
1322
1327
|
if (!ne) return;
|
|
1323
|
-
u(ne._id, N.combinationKey ?? "", "isDefault",
|
|
1328
|
+
u(ne._id, N.combinationKey ?? "", "isDefault", q);
|
|
1324
1329
|
} else
|
|
1325
|
-
l(N._id, "isDefault",
|
|
1330
|
+
l(N._id, "isDefault", q);
|
|
1326
1331
|
}
|
|
1327
1332
|
}, null);
|
|
1328
1333
|
}
|
|
@@ -1355,9 +1360,9 @@ const $r = /* @__PURE__ */ le({
|
|
|
1355
1360
|
disabled: !F(N.combinationKey).name,
|
|
1356
1361
|
rules: L ? void 0 : [(K) => K.length > 0 || O("menu.group.option.product_title_required")],
|
|
1357
1362
|
"onUpdate:modelValue": (K) => {
|
|
1358
|
-
var
|
|
1363
|
+
var q;
|
|
1359
1364
|
if (W) {
|
|
1360
|
-
const re = (
|
|
1365
|
+
const re = (q = d.row.getParentRow()) == null ? void 0 : q.original;
|
|
1361
1366
|
if (!re) return;
|
|
1362
1367
|
u(re._id, N.combinationKey ?? "", "name", K);
|
|
1363
1368
|
} else
|
|
@@ -1366,8 +1371,8 @@ const $r = /* @__PURE__ */ le({
|
|
|
1366
1371
|
class: "min-w-[300px]"
|
|
1367
1372
|
}, {
|
|
1368
1373
|
append: () => {
|
|
1369
|
-
var K,
|
|
1370
|
-
return (
|
|
1374
|
+
var K, q;
|
|
1375
|
+
return (q = (K = d.row.original) == null ? void 0 : K.items) != null && q.length ? _e(ke.FmIcon, {
|
|
1371
1376
|
name: "keyboard_arrow_up",
|
|
1372
1377
|
onClick: d.row.getToggleExpandedHandler(),
|
|
1373
1378
|
class: ["cursor-pointer", "transition-transform", d.row.getIsExpanded() ? "transform rotate-180" : ""],
|
|
@@ -1395,7 +1400,7 @@ const $r = /* @__PURE__ */ le({
|
|
|
1395
1400
|
required: !L && !W,
|
|
1396
1401
|
nullable: !!L,
|
|
1397
1402
|
min: E.value ? void 0 : 0,
|
|
1398
|
-
"onUpdate:modelValue": (
|
|
1403
|
+
"onUpdate:modelValue": (q) => {
|
|
1399
1404
|
var re;
|
|
1400
1405
|
if (K) {
|
|
1401
1406
|
const ne = (re = d.row.getParentRow()) == null ? void 0 : re.original;
|
|
@@ -1405,10 +1410,10 @@ const $r = /* @__PURE__ */ le({
|
|
|
1405
1410
|
N.combinationKey ?? "",
|
|
1406
1411
|
// @ts-ignore
|
|
1407
1412
|
"price",
|
|
1408
|
-
|
|
1413
|
+
q
|
|
1409
1414
|
);
|
|
1410
1415
|
} else
|
|
1411
|
-
l(N._id, "price",
|
|
1416
|
+
l(N._id, "price", q);
|
|
1412
1417
|
},
|
|
1413
1418
|
showCurrency: !1,
|
|
1414
1419
|
class: "min-w-[88px]"
|
|
@@ -1428,9 +1433,9 @@ const $r = /* @__PURE__ */ le({
|
|
|
1428
1433
|
required: !0,
|
|
1429
1434
|
editActiveOnly: F(N.combinationKey).orderFromActiveOnly,
|
|
1430
1435
|
"onUpdate:modelValue": (K) => {
|
|
1431
|
-
var
|
|
1436
|
+
var q;
|
|
1432
1437
|
if (L) {
|
|
1433
|
-
const re = (
|
|
1438
|
+
const re = (q = d.row.getParentRow()) == null ? void 0 : q.original;
|
|
1434
1439
|
if (!re) return;
|
|
1435
1440
|
u(
|
|
1436
1441
|
re._id,
|
|
@@ -1581,11 +1586,11 @@ const $r = /* @__PURE__ */ le({
|
|
|
1581
1586
|
var re, ne;
|
|
1582
1587
|
const L = fe(e.group), K = (re = L.items[d].items) == null ? void 0 : re.findIndex((ge) => ge.combinationKey === D);
|
|
1583
1588
|
if (!Mt.isSet(K)) return;
|
|
1584
|
-
let
|
|
1585
|
-
|
|
1586
|
-
...
|
|
1589
|
+
let q = (ne = L.items[d].items) == null ? void 0 : ne[K];
|
|
1590
|
+
q && (q = {
|
|
1591
|
+
...q,
|
|
1587
1592
|
[N]: W
|
|
1588
|
-
}, L.items[d].items[K] =
|
|
1593
|
+
}, L.items[d].items[K] = q, o("update:group", L));
|
|
1589
1594
|
}
|
|
1590
1595
|
function y(d) {
|
|
1591
1596
|
const D = fe(e.group);
|
|
@@ -1603,8 +1608,8 @@ const $r = /* @__PURE__ */ le({
|
|
|
1603
1608
|
}, d;
|
|
1604
1609
|
}, {})), $ = (d) => {
|
|
1605
1610
|
var L, K;
|
|
1606
|
-
const N = p.state.menu.modules.item.find((
|
|
1607
|
-
...(L = N == null ? void 0 : N.variant) == null ? void 0 : L.variantCombinations.find((
|
|
1611
|
+
const N = p.state.menu.modules.item.find((q) => q._id === d._id), W = d.combinationKey ? {
|
|
1612
|
+
...(L = N == null ? void 0 : N.variant) == null ? void 0 : L.variantCombinations.find((q) => q.combinationKey === d.combinationKey),
|
|
1608
1613
|
name: $t(ue().variants, ((K = N == null ? void 0 : N.variant) == null ? void 0 : K.variantGroupIds) || [])[d.combinationKey]
|
|
1609
1614
|
} : N;
|
|
1610
1615
|
return W == null ? void 0 : W.name;
|
|
@@ -1622,7 +1627,7 @@ const $r = /* @__PURE__ */ le({
|
|
|
1622
1627
|
};
|
|
1623
1628
|
})
|
|
1624
1629
|
}, o("update:unmap-group", D);
|
|
1625
|
-
},
|
|
1630
|
+
}, X = (d) => d.items;
|
|
1626
1631
|
function ee(d) {
|
|
1627
1632
|
const D = fe(e.group);
|
|
1628
1633
|
D.items = d.reduce((N, W) => ({
|
|
@@ -1673,7 +1678,7 @@ const $r = /* @__PURE__ */ le({
|
|
|
1673
1678
|
"column-visibility": x.value,
|
|
1674
1679
|
draggable: !pe.value && F(null).name,
|
|
1675
1680
|
"expanded-state": b.value ? {} : R.value,
|
|
1676
|
-
"get-sub-row":
|
|
1681
|
+
"get-sub-row": X,
|
|
1677
1682
|
"page-size": 999,
|
|
1678
1683
|
"row-data": U.value,
|
|
1679
1684
|
"search-value": n(a),
|
|
@@ -1705,7 +1710,7 @@ const $r = /* @__PURE__ */ le({
|
|
|
1705
1710
|
let o = t;
|
|
1706
1711
|
const s = e, i = ue(), p = ot(), h = Ge(), b = Vt(nt(Me())), { countDefaultItems: _, validateGroupItems: w, minMaxValidationRules: v } = jn(
|
|
1707
1712
|
() => o.group
|
|
1708
|
-
), g =
|
|
1713
|
+
), g = H(!1), a = H(!1), I = (c) => {
|
|
1709
1714
|
Mt.isBoolean(c) ? a.value = c : a.value = !a.value;
|
|
1710
1715
|
}, S = V(() => o.group ? o.config(o.group) : null), F = V(() => Wn(S.value)), E = (c) => F.value.includes(c), m = V(() => [
|
|
1711
1716
|
{
|
|
@@ -1751,7 +1756,7 @@ const $r = /* @__PURE__ */ le({
|
|
|
1751
1756
|
S.value.isOverride
|
|
1752
1757
|
)[0];
|
|
1753
1758
|
}
|
|
1754
|
-
const O =
|
|
1759
|
+
const O = H(Ie.clone(o.group)), M = Ut(
|
|
1755
1760
|
() => !Ie.isEqual(o.group, O.value),
|
|
1756
1761
|
() => {
|
|
1757
1762
|
a.value = !1;
|
|
@@ -1788,8 +1793,8 @@ const $r = /* @__PURE__ */ le({
|
|
|
1788
1793
|
const c = {};
|
|
1789
1794
|
return i.state.menu.modules.group.forEach(($) => {
|
|
1790
1795
|
var G;
|
|
1791
|
-
for (const [
|
|
1792
|
-
typeof ee == "string" && ee && !((G = c[
|
|
1796
|
+
for (const [X, ee] of Object.entries($.customAttributes || {}))
|
|
1797
|
+
typeof ee == "string" && ee && !((G = c[X]) != null && G.includes(ee)) && (c[X] = [...c[X] || [], ee]);
|
|
1793
1798
|
}), c;
|
|
1794
1799
|
}), y = (c) => {
|
|
1795
1800
|
o.group && T({
|
|
@@ -1803,7 +1808,7 @@ const $r = /* @__PURE__ */ le({
|
|
|
1803
1808
|
});
|
|
1804
1809
|
const { t: f } = me();
|
|
1805
1810
|
return (c, $) => {
|
|
1806
|
-
const G = j("fm-text-field"),
|
|
1811
|
+
const G = j("fm-text-field"), X = j("fm-stepper-field"), ee = j("FmFormGroup"), ie = j("fm-radio"), pe = j("fm-radio-group"), d = j("fm-switch"), D = j("FormSection"), N = j("fm-button"), W = j("fm-side-sheet");
|
|
1807
1812
|
return P(), Z(Oe, null, [
|
|
1808
1813
|
Re(c.$slots, "default", { trigger: I }),
|
|
1809
1814
|
C(W, {
|
|
@@ -1862,7 +1867,7 @@ const $r = /* @__PURE__ */ le({
|
|
|
1862
1867
|
default: B(() => [
|
|
1863
1868
|
C(qn, null, {
|
|
1864
1869
|
default: B(() => [
|
|
1865
|
-
C(
|
|
1870
|
+
C(X, {
|
|
1866
1871
|
modelValue: c.group.min,
|
|
1867
1872
|
"onUpdate:modelValue": $[1] || ($[1] = (L) => c.group.min = L),
|
|
1868
1873
|
disabled: E("min"),
|
|
@@ -1870,7 +1875,7 @@ const $r = /* @__PURE__ */ le({
|
|
|
1870
1875
|
class: "flex-1",
|
|
1871
1876
|
label: n(f)("menu.common.labels.min_select")
|
|
1872
1877
|
}, null, 8, ["modelValue", "disabled", "label"]),
|
|
1873
|
-
C(
|
|
1878
|
+
C(X, {
|
|
1874
1879
|
modelValue: c.group.max,
|
|
1875
1880
|
"onUpdate:modelValue": $[2] || ($[2] = (L) => c.group.max = L),
|
|
1876
1881
|
disabled: E("max"),
|
|
@@ -1977,7 +1982,7 @@ const $r = /* @__PURE__ */ le({
|
|
|
1977
1982
|
emits: ["update:combinations"],
|
|
1978
1983
|
setup(t, { expose: r, emit: e }) {
|
|
1979
1984
|
var U, R;
|
|
1980
|
-
const o = t, s = e, i = ue(), p = Ge(), h = Vt(nt(Me())), b =
|
|
1985
|
+
const o = t, s = e, i = ue(), p = Ge(), h = Vt(nt(Me())), b = H([]), _ = H(o.combinations[0].combinationKey || ""), w = V(
|
|
1981
1986
|
() => b.value.findIndex((O) => O.combinationKey == _.value)
|
|
1982
1987
|
), v = V(
|
|
1983
1988
|
() => o.combinations.map((O) => ({
|
|
@@ -2055,14 +2060,14 @@ const $r = /* @__PURE__ */ le({
|
|
|
2055
2060
|
});
|
|
2056
2061
|
s("update:combinations", O);
|
|
2057
2062
|
}
|
|
2058
|
-
const E =
|
|
2063
|
+
const E = H(!1);
|
|
2059
2064
|
we(
|
|
2060
2065
|
() => E.value,
|
|
2061
2066
|
(O) => {
|
|
2062
2067
|
O && (b.value = fe(o.combinations), _.value = o.combinations[0].combinationKey || "");
|
|
2063
2068
|
}
|
|
2064
2069
|
);
|
|
2065
|
-
const m =
|
|
2070
|
+
const m = H();
|
|
2066
2071
|
r({
|
|
2067
2072
|
show: (U = m.value) == null ? void 0 : U.show,
|
|
2068
2073
|
trigger: (R = m.value) == null ? void 0 : R.trigger
|
|
@@ -2177,7 +2182,7 @@ const $r = /* @__PURE__ */ le({
|
|
|
2177
2182
|
position: i.groups.length - 1,
|
|
2178
2183
|
itemsLinked: []
|
|
2179
2184
|
}));
|
|
2180
|
-
const g =
|
|
2185
|
+
const g = H(fe(r.groupIds || [])), a = H(""), { t: I } = me(), S = () => {
|
|
2181
2186
|
o(g.value), s("primary"), e.close();
|
|
2182
2187
|
};
|
|
2183
2188
|
return (F, E) => {
|
|
@@ -2297,7 +2302,7 @@ const $r = /* @__PURE__ */ le({
|
|
|
2297
2302
|
return u.items.forEach((c) => {
|
|
2298
2303
|
if (c.combinationKey)
|
|
2299
2304
|
return;
|
|
2300
|
-
const $ = o.items.find((
|
|
2305
|
+
const $ = o.items.find((X) => X._id === c._id), G = u.items.filter((X) => X._id === c._id && X.combinationKey).length;
|
|
2301
2306
|
y.push({
|
|
2302
2307
|
code: c.code || ($ == null ? void 0 : $.code),
|
|
2303
2308
|
name: c.name || ($ == null ? void 0 : $.name),
|
|
@@ -2576,7 +2581,7 @@ const $r = /* @__PURE__ */ le({
|
|
|
2576
2581
|
};
|
|
2577
2582
|
s("replace:form", E);
|
|
2578
2583
|
}
|
|
2579
|
-
|
|
2584
|
+
H([{
|
|
2580
2585
|
accessorKey: "name",
|
|
2581
2586
|
header: () => _.value || e("menu.inventory.columns.product_name"),
|
|
2582
2587
|
enableSorting: !1
|
|
@@ -2629,7 +2634,7 @@ const $r = /* @__PURE__ */ le({
|
|
|
2629
2634
|
})]) : null;
|
|
2630
2635
|
}
|
|
2631
2636
|
}]);
|
|
2632
|
-
const g =
|
|
2637
|
+
const g = H([]);
|
|
2633
2638
|
async function a({
|
|
2634
2639
|
_id: S
|
|
2635
2640
|
}) {
|
|
@@ -2768,6 +2773,7 @@ const $r = /* @__PURE__ */ le({
|
|
|
2768
2773
|
append: B(() => [
|
|
2769
2774
|
pt(C(n(dn), {
|
|
2770
2775
|
"pure-styling": "",
|
|
2776
|
+
class: "shrink-0 scale-75",
|
|
2771
2777
|
onClick: S
|
|
2772
2778
|
}, null, 512), [
|
|
2773
2779
|
[x, n(cn)("Suggest pricing")]
|
|
@@ -3136,7 +3142,7 @@ const $r = /* @__PURE__ */ le({
|
|
|
3136
3142
|
}, ...o.takeaways.map((v) => ({
|
|
3137
3143
|
label: v.name,
|
|
3138
3144
|
value: v._id
|
|
3139
|
-
}))]), w =
|
|
3145
|
+
}))]), w = H([{
|
|
3140
3146
|
accessorKey: "name",
|
|
3141
3147
|
enableSorting: !1,
|
|
3142
3148
|
header: () => h.value ? i("menu.product.form.takeaway.columns.variant") : i("menu.product.form.takeaway.columns.product")
|
|
@@ -3226,7 +3232,7 @@ const $r = /* @__PURE__ */ le({
|
|
|
3226
3232
|
}), U;
|
|
3227
3233
|
} else
|
|
3228
3234
|
return { ...Le.generator.initMenuV4VariantGroup(), usedBy: [] };
|
|
3229
|
-
}, w =
|
|
3235
|
+
}, w = H(_()), v = H(!1), g = H(!1);
|
|
3230
3236
|
function a(U) {
|
|
3231
3237
|
w.value.options = U;
|
|
3232
3238
|
}
|
|
@@ -3450,7 +3456,7 @@ const Ra = {
|
|
|
3450
3456
|
label: g.name,
|
|
3451
3457
|
value: g._id,
|
|
3452
3458
|
disabled: !1
|
|
3453
|
-
}))), b =
|
|
3459
|
+
}))), b = H(fe(p.selectedVariants)), _ = H(""), { createVariant: w } = Ma(), v = () => {
|
|
3454
3460
|
e(b.value), o("primary"), r.close();
|
|
3455
3461
|
};
|
|
3456
3462
|
return (g, a) => {
|
|
@@ -3580,8 +3586,8 @@ const Ra = {
|
|
|
3580
3586
|
});
|
|
3581
3587
|
}
|
|
3582
3588
|
function E(l) {
|
|
3583
|
-
var G,
|
|
3584
|
-
const u = ((G = e.form.variant) == null ? void 0 : G.variantGroupIds) || [], y = (
|
|
3589
|
+
var G, X;
|
|
3590
|
+
const u = ((G = e.form.variant) == null ? void 0 : G.variantGroupIds) || [], y = (X = e.form.variant) == null ? void 0 : X.variantCombinations, $ = l.split(/(?=variant)/g).map((ee) => ee.replace(/\/*$/, "")).filter((ee) => u.some((ie) => ee.includes(ie))).join("/");
|
|
3585
3591
|
return y == null ? void 0 : y.find((ee) => ee.combinationKey === $);
|
|
3586
3592
|
}
|
|
3587
3593
|
const m = (l) => {
|
|
@@ -3611,14 +3617,14 @@ const Ra = {
|
|
|
3611
3617
|
const y = l.filter(($) => !!$);
|
|
3612
3618
|
let f;
|
|
3613
3619
|
if (y.length) {
|
|
3614
|
-
const $ = y.map((
|
|
3615
|
-
combinationKey:
|
|
3620
|
+
const $ = y.map((X) => s.variants.find((ee) => ee._id === X)), G = Le.fullVariantCombination($).map(({
|
|
3621
|
+
combinationKey: X
|
|
3616
3622
|
}) => {
|
|
3617
3623
|
var ie;
|
|
3618
|
-
const ee = (ie = e.form.variant) == null ? void 0 : ie.variantCombinations.find((pe) => pe.combinationKey ===
|
|
3624
|
+
const ee = (ie = e.form.variant) == null ? void 0 : ie.variantCombinations.find((pe) => pe.combinationKey === X);
|
|
3619
3625
|
return u(ee || {
|
|
3620
3626
|
_id: e.form._id,
|
|
3621
|
-
combinationKey:
|
|
3627
|
+
combinationKey: X
|
|
3622
3628
|
});
|
|
3623
3629
|
});
|
|
3624
3630
|
if (G.length > 100) {
|
|
@@ -3638,7 +3644,7 @@ const Ra = {
|
|
|
3638
3644
|
takeawayUsed: null
|
|
3639
3645
|
};
|
|
3640
3646
|
} else {
|
|
3641
|
-
const $ = (c = e.form.variant) == null ? void 0 : c.variantCombinations.map((
|
|
3647
|
+
const $ = (c = e.form.variant) == null ? void 0 : c.variantCombinations.map((X) => X.takeawayUsed), G = [...new Set($)];
|
|
3642
3648
|
I([{
|
|
3643
3649
|
key: "variant",
|
|
3644
3650
|
value: void 0
|
|
@@ -3673,8 +3679,8 @@ const Ra = {
|
|
|
3673
3679
|
header: () => b("menu.product.form.variant.columns.code"),
|
|
3674
3680
|
enableSorting: !1,
|
|
3675
3681
|
cell: (l) => {
|
|
3676
|
-
var G,
|
|
3677
|
-
const u = l.getValue(), y = l.row.original, c = ((G = y.fallback) == null ? void 0 : G.code) ?? e.form.code ?? ((
|
|
3682
|
+
var G, X;
|
|
3683
|
+
const u = l.getValue(), y = l.row.original, c = ((G = y.fallback) == null ? void 0 : G.code) ?? e.form.code ?? ((X = e.fallback) == null ? void 0 : X.code), $ = o.state.featureFlags.uniqueProductCode;
|
|
3678
3684
|
return _e(ke.FmTextField, {
|
|
3679
3685
|
modelValue: u,
|
|
3680
3686
|
placeholder: c || b("menu.product.form.variant.placeholders.no_code"),
|
|
@@ -3721,7 +3727,7 @@ const Ra = {
|
|
|
3721
3727
|
header: () => b("menu.product.form.variant.columns.price"),
|
|
3722
3728
|
enableSorting: !1,
|
|
3723
3729
|
cell: (l) => {
|
|
3724
|
-
var $, G,
|
|
3730
|
+
var $, G, X;
|
|
3725
3731
|
const u = l.getValue(), y = l.row.original, c = (($ = y.fallback) == null ? void 0 : $.price) ?? e.form.price ?? ((G = e.fallback) == null ? void 0 : G.price);
|
|
3726
3732
|
return C("div", {
|
|
3727
3733
|
id: mt(Se.VARIANT, y.combinationKey ?? ""),
|
|
@@ -3739,7 +3745,7 @@ const Ra = {
|
|
|
3739
3745
|
}, null), s.isV4 && !e.isOverride && C(en, {
|
|
3740
3746
|
"menu-store": s,
|
|
3741
3747
|
"price-tiers": y.priceTiers,
|
|
3742
|
-
fallback: (
|
|
3748
|
+
fallback: (X = y.fallback) == null ? void 0 : X.priceTiers,
|
|
3743
3749
|
"onUpdate:price-tiers": (ee) => R(l.row.index, "priceTiers", ee)
|
|
3744
3750
|
}, null)]);
|
|
3745
3751
|
}
|
|
@@ -3748,12 +3754,12 @@ const Ra = {
|
|
|
3748
3754
|
header: () => b("menu.product.form.variant.columns.min_price"),
|
|
3749
3755
|
enableSorting: !1,
|
|
3750
3756
|
cell: (l) => {
|
|
3751
|
-
var $, G,
|
|
3757
|
+
var $, G, X;
|
|
3752
3758
|
const u = l.getValue(), y = l.row.original, c = (($ = y.fallback) == null ? void 0 : $.minPrice) ?? e.form.minPrice ?? ((G = e.fallback) == null ? void 0 : G.minPrice);
|
|
3753
3759
|
return _e(He, {
|
|
3754
3760
|
placeholder: c ? et(c) : void 0,
|
|
3755
3761
|
modelValue: u,
|
|
3756
|
-
max: ye.Dinero.fromFdoDinero(y.price ?? ((
|
|
3762
|
+
max: ye.Dinero.fromFdoDinero(y.price ?? ((X = y.fallback) == null ? void 0 : X.price) ?? ye.Dinero.zero().toObject()).toUnit(),
|
|
3757
3763
|
"onUpdate:modelValue": (ee) => {
|
|
3758
3764
|
R(l.row.index, "minPrice", ee);
|
|
3759
3765
|
},
|
|
@@ -3790,9 +3796,9 @@ const Ra = {
|
|
|
3790
3796
|
rules: [k]
|
|
3791
3797
|
}, {
|
|
3792
3798
|
default: B(() => {
|
|
3793
|
-
var
|
|
3799
|
+
var X;
|
|
3794
3800
|
return [C(n(Rt), {
|
|
3795
|
-
"model-value": ((
|
|
3801
|
+
"model-value": ((X = l.form.variant) == null ? void 0 : X.variantGroupIds) ?? [],
|
|
3796
3802
|
class: "space-y-16",
|
|
3797
3803
|
group: "variants",
|
|
3798
3804
|
handle: ".handle",
|
|
@@ -3889,12 +3895,12 @@ const Ra = {
|
|
|
3889
3895
|
route: ""
|
|
3890
3896
|
}), ae = ae.parent;
|
|
3891
3897
|
return Y.reverse();
|
|
3892
|
-
}), w =
|
|
3898
|
+
}), w = H(null);
|
|
3893
3899
|
Ae(() => {
|
|
3894
3900
|
var z;
|
|
3895
3901
|
(z = w.value) == null || z.setSelectedItemIndex(_.value.length - 1);
|
|
3896
3902
|
});
|
|
3897
|
-
const v = V(() => p.rules.item), g =
|
|
3903
|
+
const v = V(() => p.rules.item), g = H(), a = H(
|
|
3898
3904
|
o.initialForm ? fe(o.initialForm) : {
|
|
3899
3905
|
...Le.generator.initMenuV4Item(),
|
|
3900
3906
|
category: o.categoryId
|
|
@@ -3927,7 +3933,7 @@ const Ra = {
|
|
|
3927
3933
|
), T = V(() => {
|
|
3928
3934
|
var z;
|
|
3929
3935
|
return m.value ? a.value.category == "" || a.value.category == null && ((z = g.value) == null ? void 0 : z.category) == null : kn(o.menu) && a.value.category == null;
|
|
3930
|
-
}), U = V(() => i.itemAttributeSettings.value.length > 0 && !m.value), R =
|
|
3936
|
+
}), U = V(() => i.itemAttributeSettings.value.length > 0 && !m.value), R = H(
|
|
3931
3937
|
a.value.category != null || !!a.value.code || !!a.value.orderFrom
|
|
3932
3938
|
);
|
|
3933
3939
|
function O(z) {
|
|
@@ -3946,7 +3952,7 @@ const Ra = {
|
|
|
3946
3952
|
for (const [de, se] of Object.entries(Y.customAttributes || {}))
|
|
3947
3953
|
typeof se == "string" && se && !((ae = z[de]) != null && ae.includes(se)) && (z[de] = [...z[de] || [], se]);
|
|
3948
3954
|
}), z;
|
|
3949
|
-
}), x =
|
|
3955
|
+
}), x = H(!!a.value.price || !!a.value.minPrice || !!a.value.costing);
|
|
3950
3956
|
function k(z) {
|
|
3951
3957
|
z || (a.value = {
|
|
3952
3958
|
...a.value,
|
|
@@ -3955,7 +3961,7 @@ const Ra = {
|
|
|
3955
3961
|
price: void 0
|
|
3956
3962
|
}, d());
|
|
3957
3963
|
}
|
|
3958
|
-
const l =
|
|
3964
|
+
const l = H(
|
|
3959
3965
|
(((re = a.value.variant) == null ? void 0 : re.variantCombinations) || []).some(
|
|
3960
3966
|
(z) => !!z.price || !!z.orderFrom || !!z.code
|
|
3961
3967
|
)
|
|
@@ -3975,7 +3981,7 @@ const Ra = {
|
|
|
3975
3981
|
}
|
|
3976
3982
|
}, d());
|
|
3977
3983
|
}
|
|
3978
|
-
const y =
|
|
3984
|
+
const y = H(
|
|
3979
3985
|
!!a.value.inventoryBindings || (((ne = a.value.variant) == null ? void 0 : ne.variantCombinations) || []).some((z) => !!z.inventoryBindings) || !1
|
|
3980
3986
|
);
|
|
3981
3987
|
function f(z) {
|
|
@@ -3992,7 +3998,7 @@ const Ra = {
|
|
|
3992
3998
|
} : void 0
|
|
3993
3999
|
}, d());
|
|
3994
4000
|
}
|
|
3995
|
-
const c =
|
|
4001
|
+
const c = H(
|
|
3996
4002
|
a.value.takeawayUsed != null || (((ge = a.value.variant) == null ? void 0 : ge.variantCombinations) || []).some((z) => z.takeawayUsed != null) || !1
|
|
3997
4003
|
);
|
|
3998
4004
|
function $(z) {
|
|
@@ -4009,11 +4015,11 @@ const Ra = {
|
|
|
4009
4015
|
}
|
|
4010
4016
|
}, d());
|
|
4011
4017
|
}
|
|
4012
|
-
const G =
|
|
4013
|
-
function
|
|
4018
|
+
const G = H(!!a.value.print);
|
|
4019
|
+
function X(z) {
|
|
4014
4020
|
z || (a.value = { ...a.value, print: void 0 }, d());
|
|
4015
4021
|
}
|
|
4016
|
-
const ee =
|
|
4022
|
+
const ee = H(
|
|
4017
4023
|
!!((Ee = a.value.groups) != null && Ee.length) != null || (((Ve = a.value.variant) == null ? void 0 : Ve.variantCombinations) || []).some((z) => {
|
|
4018
4024
|
var Y;
|
|
4019
4025
|
return !!((Y = z.groups) != null && Y.length);
|
|
@@ -4066,7 +4072,7 @@ const Ra = {
|
|
|
4066
4072
|
function d() {
|
|
4067
4073
|
s("update:editingState", Ie.cloneDeep(a.value));
|
|
4068
4074
|
}
|
|
4069
|
-
const D =
|
|
4075
|
+
const D = H(null);
|
|
4070
4076
|
function N() {
|
|
4071
4077
|
return !Ie.isEqual(a.value, o.initialForm);
|
|
4072
4078
|
}
|
|
@@ -4089,11 +4095,11 @@ const Ra = {
|
|
|
4089
4095
|
} else
|
|
4090
4096
|
console.warn(`Element with id ${z} not found`);
|
|
4091
4097
|
}
|
|
4092
|
-
function
|
|
4098
|
+
function q(z) {
|
|
4093
4099
|
z.type === "general" ? K(Se.GENERAL) : z.type === "price" ? K(Se.PRICE, !0) : z.type === "variant" ? K(mt(Se.VARIANT, z.id), !0) : z.type === "group" && K(mt(Se.GROUP, z.id), !0);
|
|
4094
4100
|
}
|
|
4095
4101
|
return Dn(() => {
|
|
4096
|
-
o.focused &&
|
|
4102
|
+
o.focused && q(o.focused);
|
|
4097
4103
|
}), r({
|
|
4098
4104
|
validate: W,
|
|
4099
4105
|
getData: L,
|
|
@@ -4185,7 +4191,7 @@ const Ra = {
|
|
|
4185
4191
|
toggle: G.value,
|
|
4186
4192
|
"onUpdate:toggle": [
|
|
4187
4193
|
Y[6] || (Y[6] = (te) => G.value = te),
|
|
4188
|
-
Y[7] || (Y[7] = (te) =>
|
|
4194
|
+
Y[7] || (Y[7] = (te) => X(te))
|
|
4189
4195
|
],
|
|
4190
4196
|
description: "Use a different print setting",
|
|
4191
4197
|
disabled: "",
|
|
@@ -4311,7 +4317,7 @@ const Ra = {
|
|
|
4311
4317
|
}
|
|
4312
4318
|
});
|
|
4313
4319
|
function al(t) {
|
|
4314
|
-
const { storageKey: r, defaultWidth: e, minWidth: o, maxWidth: s } = t, i = Wo(r, e), p =
|
|
4320
|
+
const { storageKey: r, defaultWidth: e, minWidth: o, maxWidth: s } = t, i = Wo(r, e), p = H(!1), h = H(null);
|
|
4315
4321
|
function b(v) {
|
|
4316
4322
|
v.preventDefault(), p.value = !0, document.addEventListener("mousemove", _), document.addEventListener("mouseup", w), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
4317
4323
|
}
|
|
@@ -4575,8 +4581,8 @@ function vl() {
|
|
|
4575
4581
|
return a.map(w);
|
|
4576
4582
|
}
|
|
4577
4583
|
async function g({ eventEmitter: a }) {
|
|
4578
|
-
var
|
|
4579
|
-
const I = r.state.menu, S = !r.state.currentCatalogId, F = !r.state.currentSchedulerId, E = (((ee = (
|
|
4584
|
+
var X, ee, ie, pe;
|
|
4585
|
+
const I = r.state.menu, S = !r.state.currentCatalogId, F = !r.state.currentSchedulerId, E = (((ee = (X = r.currentCatalog) == null ? void 0 : X.linkItemRules) == null ? void 0 : ee.length) ?? 0) > 0, m = ho(), T = r.mergedMenu;
|
|
4580
4586
|
st.clear(), ut.clear();
|
|
4581
4587
|
for (const d of I.modules.item)
|
|
4582
4588
|
st.set(d._id, d);
|
|
@@ -4600,7 +4606,7 @@ function vl() {
|
|
|
4600
4606
|
);
|
|
4601
4607
|
if (!W)
|
|
4602
4608
|
throw new Error(`Item ${d._id} has unknown group ${N._id}`);
|
|
4603
|
-
return (L = W.items) == null ? void 0 : L.map((K,
|
|
4609
|
+
return (L = W.items) == null ? void 0 : L.map((K, q) => {
|
|
4604
4610
|
var Te, te;
|
|
4605
4611
|
const re = !!K.combinationKey, ne = (Te = N.items) == null ? void 0 : Te.find(
|
|
4606
4612
|
(ce) => ce._id === K._id && ce.combinationKey === K.combinationKey
|
|
@@ -4655,7 +4661,7 @@ function vl() {
|
|
|
4655
4661
|
variant: de ? Je.PRIMARY : Je.PLAIN
|
|
4656
4662
|
};
|
|
4657
4663
|
return {
|
|
4658
|
-
id: `item-${d._id}-variant-${D == null ? void 0 : D.combinationKey}-group-${N._id}-${K._id}-${K.combinationKey}-${
|
|
4664
|
+
id: `item-${d._id}-variant-${D == null ? void 0 : D.combinationKey}-group-${N._id}-${K._id}-${K.combinationKey}-${q}`,
|
|
4659
4665
|
icon: K.combinationKey ? $e.VARIANT : $e.ITEM,
|
|
4660
4666
|
label: Yt(z(), Ve()),
|
|
4661
4667
|
rightLabel: se,
|
|
@@ -4677,15 +4683,15 @@ function vl() {
|
|
|
4677
4683
|
re.push(...d.groups || []);
|
|
4678
4684
|
return re;
|
|
4679
4685
|
}
|
|
4680
|
-
const K = L(),
|
|
4686
|
+
const K = L(), q = bt(
|
|
4681
4687
|
K.map((re) => {
|
|
4682
4688
|
const ne = ut.get(re._id);
|
|
4683
4689
|
return { ...re, position: ne == null ? void 0 : ne.position, name: (ne == null ? void 0 : ne.name) || "" };
|
|
4684
4690
|
}),
|
|
4685
4691
|
(re) => re.name
|
|
4686
4692
|
);
|
|
4687
|
-
if (
|
|
4688
|
-
for (const re of
|
|
4693
|
+
if (q)
|
|
4694
|
+
for (const re of q) {
|
|
4689
4695
|
const ne = ut.get(re._id);
|
|
4690
4696
|
if (!ne)
|
|
4691
4697
|
throw new Error(`Item ${d._id} has unknown group ${re._id}`);
|
|
@@ -4716,7 +4722,7 @@ function vl() {
|
|
|
4716
4722
|
D.push(...K);
|
|
4717
4723
|
}
|
|
4718
4724
|
if (W) {
|
|
4719
|
-
const K = (ne, ge) => `item-${ne}-variant-${ge}`,
|
|
4725
|
+
const K = (ne, ge) => `item-${ne}-variant-${ge}`, q = $t(
|
|
4720
4726
|
I.modules.variant,
|
|
4721
4727
|
d.variant.variantGroupIds
|
|
4722
4728
|
), re = d.variant.variantCombinations.map(
|
|
@@ -4728,7 +4734,7 @@ function vl() {
|
|
|
4728
4734
|
id: K(d._id, ne.combinationKey),
|
|
4729
4735
|
icon: $e.VARIANT,
|
|
4730
4736
|
label: Yt(
|
|
4731
|
-
ar(
|
|
4737
|
+
ar(q, ne.combinationKey),
|
|
4732
4738
|
ne.code
|
|
4733
4739
|
),
|
|
4734
4740
|
children: M(d, ne),
|
|
@@ -4824,14 +4830,14 @@ function vl() {
|
|
|
4824
4830
|
const c = (d, D) => `item-${D ?? "addon"}-${d}`;
|
|
4825
4831
|
for (const d of T.modules.item)
|
|
4826
4832
|
Lt(d).forEach(({ _id: N }) => {
|
|
4827
|
-
var L, K,
|
|
4833
|
+
var L, K, q, re, ne, ge, Ee, Ve;
|
|
4828
4834
|
const W = N ? l.find((z) => z.id === k(N)) : f;
|
|
4829
4835
|
if (W) {
|
|
4830
4836
|
const z = _t(
|
|
4831
4837
|
((L = d.groups) == null ? void 0 : L.length) ?? 0,
|
|
4832
4838
|
t("menu.tree_editor.labels.groups", { count: (K = d.groups) == null ? void 0 : K.length })
|
|
4833
4839
|
), Y = _t(
|
|
4834
|
-
((re = (
|
|
4840
|
+
((re = (q = d.variant) == null ? void 0 : q.variantCombinations) == null ? void 0 : re.length) ?? 0,
|
|
4835
4841
|
t("menu.tree_editor.labels.variants", {
|
|
4836
4842
|
count: (ge = (ne = d.variant) == null ? void 0 : ne.variantCombinations) == null ? void 0 : ge.length
|
|
4837
4843
|
})
|
|
@@ -4997,8 +5003,8 @@ function bl() {
|
|
|
4997
5003
|
const f = I(x), c = I(k);
|
|
4998
5004
|
return (f == null ? void 0 : f.id) === (c == null ? void 0 : c.id) ? !0 : !((f == null ? void 0 : f.id) !== (c == null ? void 0 : c.id) && a(c).some(
|
|
4999
5005
|
($) => {
|
|
5000
|
-
var G,
|
|
5001
|
-
return ((G = $.meta) == null ? void 0 : G.rawId) === ((
|
|
5006
|
+
var G, X;
|
|
5007
|
+
return ((G = $.meta) == null ? void 0 : G.rawId) === ((X = x.meta) == null ? void 0 : X.rawId);
|
|
5002
5008
|
}
|
|
5003
5009
|
));
|
|
5004
5010
|
}
|
|
@@ -5020,8 +5026,8 @@ function bl() {
|
|
|
5020
5026
|
let f = u.findIndex((G) => G.id === k.id);
|
|
5021
5027
|
l === "after" && f++;
|
|
5022
5028
|
const c = u.map((G) => {
|
|
5023
|
-
var
|
|
5024
|
-
return (
|
|
5029
|
+
var X;
|
|
5030
|
+
return (X = G.meta) == null ? void 0 : X.rawId;
|
|
5025
5031
|
}).filter(Boolean), $ = wt(c, y, f);
|
|
5026
5032
|
await e.rearrange($);
|
|
5027
5033
|
}
|
|
@@ -5047,7 +5053,7 @@ function bl() {
|
|
|
5047
5053
|
}
|
|
5048
5054
|
async function T(x, k, l, u) {
|
|
5049
5055
|
var G;
|
|
5050
|
-
const y = w(k), f = ((G = k.children) == null ? void 0 : G.findIndex((
|
|
5056
|
+
const y = w(k), f = ((G = k.children) == null ? void 0 : G.findIndex((X) => X.id === x.id)) ?? -1;
|
|
5051
5057
|
if (f === -1) throw new Error("Source index not found");
|
|
5052
5058
|
const c = wt(y, f, l), $ = _(k);
|
|
5053
5059
|
await r.rearrangeWithSubCategory(c, u, $);
|
|
@@ -5114,8 +5120,8 @@ function bl() {
|
|
|
5114
5120
|
if (f === -1 || c === -1)
|
|
5115
5121
|
throw new Error("Source or target index not found");
|
|
5116
5122
|
l === "after" && c++;
|
|
5117
|
-
const $ = wt(y, f, c), G = b(u),
|
|
5118
|
-
await r.rearrangeWithSubCategory($, G,
|
|
5123
|
+
const $ = wt(y, f, c), G = b(u), X = _(u);
|
|
5124
|
+
await r.rearrangeWithSubCategory($, G, X);
|
|
5119
5125
|
}
|
|
5120
5126
|
async function M(x) {
|
|
5121
5127
|
const k = o.getNodeById(x.draggedNodeId), l = o.getNodeById(x.targetNodeId);
|
|
@@ -5186,7 +5192,7 @@ const St = /* @__PURE__ */ le({
|
|
|
5186
5192
|
}
|
|
5187
5193
|
}), Tn = 300;
|
|
5188
5194
|
function _l(t) {
|
|
5189
|
-
const { itemHeight: r, emit: e, getFlattenedItems: o, getContainerRef: s, canDropFn: i } = t, p =
|
|
5195
|
+
const { itemHeight: r, emit: e, getFlattenedItems: o, getContainerRef: s, canDropFn: i } = t, p = H(!1), h = H(null), b = H(null), _ = H(null), w = H(0), v = H({ x: 0, y: 0 }), g = H(/* @__PURE__ */ new Map());
|
|
5190
5196
|
function a(E, m) {
|
|
5191
5197
|
m.button === 0 && (v.value = { x: m.clientX, y: m.clientY }, h.value = E, w.value = m.clientY, g.value = or(o()), setTimeout(() => {
|
|
5192
5198
|
h.value === E && (p.value = !0, v.value = { x: m.clientX, y: m.clientY }, e("updateDragState", E, null, null), document.addEventListener("mousemove", I), document.addEventListener("mouseup", S));
|
|
@@ -5466,7 +5472,7 @@ const hl = { key: 0 }, wl = ["innerHTML"], Cl = /* @__PURE__ */ le({
|
|
|
5466
5472
|
}
|
|
5467
5473
|
return M(s.nodes), O;
|
|
5468
5474
|
});
|
|
5469
|
-
|
|
5475
|
+
H(null);
|
|
5470
5476
|
const {
|
|
5471
5477
|
list: _,
|
|
5472
5478
|
scrollTo: w,
|
|
@@ -5785,7 +5791,7 @@ const hl = { key: 0 }, wl = ["innerHTML"], Cl = /* @__PURE__ */ le({
|
|
|
5785
5791
|
},
|
|
5786
5792
|
emits: ["tree-event"],
|
|
5787
5793
|
setup(t, { emit: r }) {
|
|
5788
|
-
const e = r, o =
|
|
5794
|
+
const e = r, o = H({
|
|
5789
5795
|
catalogId: null,
|
|
5790
5796
|
schedulerId: null,
|
|
5791
5797
|
searchKey: ""
|
|
@@ -5830,7 +5836,7 @@ const hl = { key: 0 }, wl = ["innerHTML"], Cl = /* @__PURE__ */ le({
|
|
|
5830
5836
|
}), Ot(() => {
|
|
5831
5837
|
o.$dispose(), s.setExpandedNodeIds([]), s.setSelectedNodeId(null);
|
|
5832
5838
|
});
|
|
5833
|
-
const i =
|
|
5839
|
+
const i = H(null), { currentItemId: p, initialForm: h, itemFormKey: b } = sr(o), { saveItemFormEditingStateDebounced: _ } = rr(i, o), w = H(null);
|
|
5834
5840
|
async function v(a) {
|
|
5835
5841
|
if (a.type === Ce.SELECT_ITEM || a.type === Ce.SELECT_PRICE || a.type === Ce.SELECT_GROUP || a.type === Ce.SELECT_VARIANT) {
|
|
5836
5842
|
if (!g(a.itemId))
|
|
@@ -5909,7 +5915,7 @@ const hl = { key: 0 }, wl = ["innerHTML"], Cl = /* @__PURE__ */ le({
|
|
|
5909
5915
|
p("update:show", !1);
|
|
5910
5916
|
}, b = ft(), _ = ue();
|
|
5911
5917
|
_.selectCatalog(null), _.selectScheduler(null);
|
|
5912
|
-
const w =
|
|
5918
|
+
const w = H(!1), v = () => {
|
|
5913
5919
|
s(
|
|
5914
5920
|
async () => {
|
|
5915
5921
|
Cn(), await tt();
|