@feedmepos/mf-menu 0.32.41 → 0.32.42-dev.3
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-Bt5lFavE.js → App-1oMjfIcc.js} +7 -7
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DpyJ5gr2.js → ApplyProduct.vue_vue_type_script_setup_true_lang-AIw0Zgzf.js} +3 -3
- package/dist/{Catalog-DJyGxDRP.js → Catalog-CvQo24ck.js} +44 -44
- package/dist/{Category-BlIUSUxn.js → Category-C8bM8EwO.js} +24 -24
- package/dist/{Category-CNTOOIJE.js → Category-DmIaxrrK.js} +24 -24
- package/dist/{CookingGuide-CpZfKE5H.js → CookingGuide-CKEbyk4o.js} +105 -105
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-QzZR2W1U.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-Ci4gwgnH.js} +1 -1
- package/dist/{Group-B88fbCOf.js → Group-CoYyRvcx.js} +1 -1
- package/dist/{Group-Bhnov3p8.js → Group-EnJDk54z.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-CRAX3mIt.js → Group.vue_vue_type_script_setup_true_lang-tH2U82rV.js} +18 -18
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Bqh6a0oO.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BDxjuWcY.js} +30 -30
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DPAxkce6.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-gVXNoAaN.js} +1457 -1456
- package/dist/{Ingredient-BORYH8yl.js → Ingredient-7PPPp7Yf.js} +20 -20
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-Ci-CaBED.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DQPjpqtv.js} +2 -2
- package/dist/{LinkProductSideSheet-DQN59t0a.js → LinkProductSideSheet-BS-MEIOG.js} +45 -45
- package/dist/{MenuSetting-cI0j1omE.js → MenuSetting-BNVyT0oG.js} +47 -47
- package/dist/{PrintRoute-CXSuomGR.js → PrintRoute-BMdk0zDv.js} +39 -39
- package/dist/{Product-DgbQeeKt.js → Product-DbIK7Eog.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-D0cnQC3i.js → Product.vue_vue_type_script_setup_true_lang-FnX_M8lJ.js} +139 -139
- package/dist/{ProductInternalTools-B1zpNBze.js → ProductInternalTools-BC8jWpQd.js} +66 -66
- package/dist/Products-CPi2vuUO.js +307 -0
- package/dist/{Publish-Cqdk3SjG.js → Publish-BcxHXZ1J.js} +29 -29
- package/dist/{Recipe-anT6QBZT.js → Recipe-egyxyFfA.js} +24 -24
- package/dist/RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-CP1NjxzF.js +144 -0
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-Cc_k57qi.js → RuleView.vue_vue_type_script_setup_true_lang-CPMCeAK9.js} +366 -366
- package/dist/{Scheduler-Z64VCw-y.js → Scheduler-Cb-IJtj8.js} +11 -11
- package/dist/{ServingSequence-B7ZbvY1v.js → ServingSequence-B46n34xA.js} +44 -44
- package/dist/{Setting-DnVCq2hY.js → Setting-B_dZG5ZC.js} +17 -17
- package/dist/{Subcategory-dpz-Um56.js → Subcategory-DbjLfXvf.js} +51 -51
- package/dist/{Takeaway-DiyOBq1g.js → Takeaway-D4axornr.js} +13 -13
- package/dist/{Takeaway-mwLXbT9q.js → Takeaway-DNu6jYFC.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-tg3AJE3_.js → Takeaway.vue_vue_type_script_setup_true_lang-Dvm8Lfp3.js} +28 -28
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-FRH0zCh6.js → Thumbnail.vue_vue_type_script_setup_true_lang-BjPOOURv.js} +27 -27
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-nGzNSAX9.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-CXGsdChM.js} +4 -4
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-C9eskCL4.js +5767 -0
- package/dist/{Unit-CmF2olR8.js → Unit-jV5Bee8E.js} +8 -8
- package/dist/{Variant-C9-_-SLX.js → Variant-jGcgA-W8.js} +24 -24
- package/dist/{_id_-C4Zpr6wS.js → _id_-CtvQ64EN.js} +28 -28
- package/dist/app-B6laFmet.js +2286 -0
- package/dist/{app-CrcPPLl1.js → app-eq7TaFfk.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-68qGGp41.js → linked-status-Db18QnYH.js} +5 -5
- package/dist/assets/{menu-export-CRtF4W1I.js → menu-export-24uzPEwW.js} +2 -2
- package/dist/assets/{override-menu-DB0DJf_x.js → override-menu-DreGPEa-.js} +5 -5
- package/dist/assets/{validate-menu-oi_J1ue-.js → validate-menu-BSFHH8O3.js} +2 -2
- package/dist/{catalog-Cp4kVRAL.js → catalog-CXcQ-QmP.js} +1 -1
- package/dist/{catalogSetting-Cr0DX5kw.js → catalogSetting-DnUHD0I1.js} +1 -1
- package/dist/{currency-C_IuOt0j.js → currency-CwtLEvAZ.js} +1 -1
- package/dist/dayjs.min-BgQgGKeN.js +7 -0
- package/dist/{index-CXzIkkUH.js → index-Cx1Nqii7.js} +31 -31
- package/dist/{index-DzLNqNMt.js → index-D-Saeea8.js} +43 -43
- package/dist/{index.vue_vue_type_script_setup_true_lang-DyiwvQnC.js → index.vue_vue_type_script_setup_true_lang-CA1qH7Vf.js} +244 -269
- package/dist/{item-C3_GKsNy.js → item-CKRLnCIs.js} +15 -15
- package/dist/{jszip.min-BiRK-xY3.js → jszip.min-DOHC0a7i.js} +388 -387
- package/dist/{menu-CYrjppCV.js → menu-BduvULfe.js} +1 -1
- package/dist/{menuV2-DWQ093x3.js → menuV2-Da1zBhkS.js} +83 -83
- package/dist/{priceTier-CD3j-Ccs.js → priceTier-tObdSj6z.js} +1 -1
- package/dist/{rules-BTZh0AjD.js → rules-DD816lrT.js} +11 -11
- package/dist/{scheduler-PVlNN-pB.js → scheduler-CDhxmmVX.js} +29 -29
- package/dist/{toExcel-lSyQhZQ9.js → toExcel-tz6MIiQY.js} +2 -2
- package/dist/{unit-1MnbZYm8.js → unit-NGl3h7Qh.js} +35 -35
- package/package.json +2 -1
- package/dist/Products-JodXj4IG.js +0 -291
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BzwlZ9jW.js +0 -6130
- package/dist/app-BC-PDZ1J.js +0 -363
- package/dist/dayjs.min-fN9Ef6y1.js +0 -6
- package/dist/index-vqNnqeRW.js +0 -246
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as h,
|
|
1
|
+
import { u as h, y as n, J as d, ai as _ } from "./index.vue_vue_type_script_setup_true_lang-CA1qH7Vf.js";
|
|
2
2
|
import "@feedmepos/ui-library";
|
|
3
3
|
class u {
|
|
4
4
|
constructor(t, e, r, a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { y as u, G as i } from "./index.vue_vue_type_script_setup_true_lang-CA1qH7Vf.js";
|
|
2
2
|
var a = /* @__PURE__ */ ((e) => (e.AUTO = "auto", e.MANUAL = "manual", e))(a || {}), m = /* @__PURE__ */ ((e) => (e[e.Normal = 0] = "Normal", e[e.Rules = 1] = "Rules", e))(m || {});
|
|
3
3
|
class s {
|
|
4
4
|
static fromCatalog(r, n) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { defineComponent as R, ref as h, computed as _, watch as j, onMounted as ee, onBeforeUnmount as ae, resolveComponent as x, createBlock as
|
|
1
|
+
import { z as $, y as Y, u as Z, G as Q, A as z, H as X } from "./index.vue_vue_type_script_setup_true_lang-CA1qH7Vf.js";
|
|
2
|
+
import { defineComponent as R, ref as h, computed as _, watch as j, onMounted as ee, onBeforeUnmount as ae, resolveComponent as x, createBlock as H, openBlock as L, withModifiers as q, withCtx as k, renderSlot as P, createElementBlock as I, Fragment as A, createVNode as v, unref as i, createElementVNode as U, createCommentVNode as te, renderList as le, toDisplayString as O } from "vue";
|
|
3
3
|
import { useI18n as W } from "@feedmepos/mf-common";
|
|
4
4
|
import { components as ne } from "@feedmepos/ui-library";
|
|
5
|
-
import { _ as oe } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _ as oe } from "./RuleView.vue_vue_type_script_setup_true_lang-CPMCeAK9.js";
|
|
6
6
|
import { u as ie } from "./discardConfirm-BHni0LNu.js";
|
|
7
|
-
import { _ as re } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { _ as ue } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-
|
|
7
|
+
import { _ as re } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-AIw0Zgzf.js";
|
|
8
|
+
import { _ as ue } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-CXGsdChM.js";
|
|
9
9
|
import { c as se } from "./check-C9mY6LiX.js";
|
|
10
|
-
import { f as me } from "./currency-
|
|
10
|
+
import { f as me } from "./currency-CwtLEvAZ.js";
|
|
11
11
|
import { c as de } from "./string-DpfFixWH.js";
|
|
12
|
-
import { g as
|
|
12
|
+
import { g as K } from "./translation-Cdap0IVg.js";
|
|
13
13
|
const pe = /* @__PURE__ */ R({
|
|
14
14
|
__name: "CurrencyInput",
|
|
15
15
|
props: {
|
|
@@ -79,14 +79,14 @@ const pe = /* @__PURE__ */ R({
|
|
|
79
79
|
n = Number.isNaN(n) ? 0 : n, N("update:model-value", $.Dinero.fromNumber({ number: n }).toObject());
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
const
|
|
82
|
+
const F = _(() => typeof l.min == "number" && l.min >= 0), D = (e) => {
|
|
83
83
|
var n, c, f;
|
|
84
84
|
if (!(e.ctrlKey || e.metaKey)) {
|
|
85
85
|
if (e.key === "Enter") {
|
|
86
86
|
(n = r.value) != null && n.inputEl && s((f = (c = r.value) == null ? void 0 : c.inputEl) == null ? void 0 : f.value);
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
|
-
if (e.key === "-" &&
|
|
89
|
+
if (e.key === "-" && F.value) {
|
|
90
90
|
e.preventDefault();
|
|
91
91
|
return;
|
|
92
92
|
}
|
|
@@ -95,13 +95,13 @@ const pe = /* @__PURE__ */ R({
|
|
|
95
95
|
};
|
|
96
96
|
return ee(() => {
|
|
97
97
|
var e;
|
|
98
|
-
r.value && ((e = r.value.inputEl) == null || e.addEventListener("keydown",
|
|
98
|
+
r.value && ((e = r.value.inputEl) == null || e.addEventListener("keydown", D));
|
|
99
99
|
}), ae(() => {
|
|
100
100
|
var e;
|
|
101
|
-
r.value && ((e = r.value.inputEl) == null || e.removeEventListener("keydown",
|
|
101
|
+
r.value && ((e = r.value.inputEl) == null || e.removeEventListener("keydown", D));
|
|
102
102
|
}), (e, n) => {
|
|
103
103
|
const c = x("fm-text-field");
|
|
104
|
-
return L(),
|
|
104
|
+
return L(), H(c, {
|
|
105
105
|
ref_key: "inputRef",
|
|
106
106
|
ref: r,
|
|
107
107
|
autofocus: l.autofocus,
|
|
@@ -130,7 +130,7 @@ const pe = /* @__PURE__ */ R({
|
|
|
130
130
|
});
|
|
131
131
|
function Le(B) {
|
|
132
132
|
return B.map((g) => ({
|
|
133
|
-
module:
|
|
133
|
+
module: Y.F_MENU_MODULE_V4_KEY.enum.item,
|
|
134
134
|
id: g._id,
|
|
135
135
|
discriminator: g.combinationKey,
|
|
136
136
|
data: void 0
|
|
@@ -147,30 +147,30 @@ const ce = { class: "fm-typo-en-title-md-600" }, fe = { class: "space-y-32" }, v
|
|
|
147
147
|
},
|
|
148
148
|
emits: ["update:takeaway"],
|
|
149
149
|
setup(B, { expose: g, emit: l }) {
|
|
150
|
-
const { t: o } = W(), m = B, E = l, r =
|
|
150
|
+
const { t: o } = W(), m = B, E = l, r = Z(), M = _(() => r.rules.takeaway), N = h(!1), u = h(!1), C = h(!1), s = h(void 0), F = (a) => {
|
|
151
151
|
se.isBoolean(a) ? u.value = a : u.value = !u.value;
|
|
152
152
|
};
|
|
153
|
-
function
|
|
153
|
+
function D() {
|
|
154
154
|
var t;
|
|
155
155
|
const a = {
|
|
156
|
-
...
|
|
156
|
+
...z.generator.initMenuV4Takeaway(),
|
|
157
157
|
usedBy: [],
|
|
158
158
|
...Q(m.initialValue ?? {})
|
|
159
159
|
};
|
|
160
160
|
return (t = m.fallback) != null && t.price && (a.price = null), a;
|
|
161
161
|
}
|
|
162
|
-
const e = h(
|
|
162
|
+
const e = h(D()), n = _(() => m.action === "add" ? o("menu.takeaway.add") : o("menu.takeaway.update")), c = _(() => !!e.value.name), f = _(() => {
|
|
163
163
|
var V;
|
|
164
164
|
const a = [], t = "en-US", w = (V = s.value) == null ? void 0 : V[t];
|
|
165
165
|
return e.value.name && !w && a.push({
|
|
166
166
|
locale: t,
|
|
167
167
|
name: e.value.name,
|
|
168
|
-
localeDisplay:
|
|
168
|
+
localeDisplay: K(t)
|
|
169
169
|
}), s.value && Object.entries(s.value).filter(([d, y]) => y && y.trim()).sort(([d], [y]) => d.localeCompare(y)).forEach(([d, y]) => {
|
|
170
170
|
a.push({
|
|
171
171
|
locale: d,
|
|
172
172
|
name: y,
|
|
173
|
-
localeDisplay:
|
|
173
|
+
localeDisplay: K(d)
|
|
174
174
|
});
|
|
175
175
|
}), a;
|
|
176
176
|
});
|
|
@@ -180,13 +180,13 @@ const ce = { class: "fm-typo-en-title-md-600" }, fe = { class: "space-y-32" }, v
|
|
|
180
180
|
function T(a) {
|
|
181
181
|
e.value.name = a;
|
|
182
182
|
}
|
|
183
|
-
const
|
|
183
|
+
const J = ie(
|
|
184
184
|
() => {
|
|
185
185
|
var d;
|
|
186
186
|
const a = !X.isEqual(
|
|
187
187
|
e.value,
|
|
188
188
|
m.initialValue || {
|
|
189
|
-
...
|
|
189
|
+
...z.generator.initMenuV4Takeaway(),
|
|
190
190
|
usedBy: []
|
|
191
191
|
}
|
|
192
192
|
), t = ((d = m.initialValue) == null ? void 0 : d.name_locale) || {}, w = s.value || {}, V = JSON.stringify(t) !== JSON.stringify(w);
|
|
@@ -194,36 +194,36 @@ const ce = { class: "fm-typo-en-title-md-600" }, fe = { class: "space-y-32" }, v
|
|
|
194
194
|
},
|
|
195
195
|
() => u.value = !1
|
|
196
196
|
);
|
|
197
|
-
function
|
|
197
|
+
function G() {
|
|
198
198
|
E("update:takeaway", {
|
|
199
199
|
...e.value,
|
|
200
200
|
...s.value && { name_locale: s.value }
|
|
201
|
-
}),
|
|
201
|
+
}), F(!1);
|
|
202
202
|
}
|
|
203
203
|
return j(
|
|
204
204
|
() => u.value,
|
|
205
205
|
() => {
|
|
206
206
|
var a;
|
|
207
|
-
u.value && (e.value =
|
|
207
|
+
u.value && (e.value = D(), s.value = (a = m.initialValue) == null ? void 0 : a.name_locale);
|
|
208
208
|
}
|
|
209
209
|
), g({
|
|
210
|
-
trigger:
|
|
210
|
+
trigger: F,
|
|
211
211
|
show: u
|
|
212
212
|
}), (a, t) => {
|
|
213
213
|
const w = x("fm-button"), V = x("FmTooltip"), d = x("fm-text-field"), y = x("fm-side-sheet");
|
|
214
|
-
return L(), I(
|
|
215
|
-
P(a.$slots, "default", { trigger:
|
|
214
|
+
return L(), I(A, null, [
|
|
215
|
+
P(a.$slots, "default", { trigger: F }),
|
|
216
216
|
v(y, {
|
|
217
217
|
id: "group-form",
|
|
218
218
|
modelValue: u.value,
|
|
219
219
|
"onUpdate:modelValue": t[5] || (t[5] = (b) => u.value = b),
|
|
220
220
|
"is-container": i(ne).FmForm,
|
|
221
221
|
"is-container-props": {
|
|
222
|
-
onValidationSuccess:
|
|
222
|
+
onValidationSuccess: G,
|
|
223
223
|
blameFormChildOnValidationFailed: !0
|
|
224
224
|
},
|
|
225
225
|
"max-width": 560,
|
|
226
|
-
"onOn:clickedAway": i(
|
|
226
|
+
"onOn:clickedAway": i(J)
|
|
227
227
|
}, {
|
|
228
228
|
"side-sheet-header": k(() => [
|
|
229
229
|
U("p", ce, O(n.value), 1)
|
|
@@ -274,7 +274,7 @@ const ce = { class: "fm-typo-en-title-md-600" }, fe = { class: "space-y-32" }, v
|
|
|
274
274
|
}, {
|
|
275
275
|
content: k(() => [
|
|
276
276
|
U("div", ve, [
|
|
277
|
-
(L(!0), I(
|
|
277
|
+
(L(!0), I(A, null, le(f.value, (p) => (L(), I("div", {
|
|
278
278
|
key: p.locale
|
|
279
279
|
}, O(p.name) + " (" + O(p.localeDisplay) + ") ", 1))), 128))
|
|
280
280
|
])
|
|
@@ -306,7 +306,7 @@ const ce = { class: "fm-typo-en-title-md-600" }, fe = { class: "space-y-32" }, v
|
|
|
306
306
|
}),
|
|
307
307
|
_: 1
|
|
308
308
|
}),
|
|
309
|
-
a.applyProduct ? (L(),
|
|
309
|
+
a.applyProduct ? (L(), H(re, {
|
|
310
310
|
key: 0,
|
|
311
311
|
overrides: e.value.usedBy,
|
|
312
312
|
"onUpdate:overrides": t[3] || (t[3] = (b) => e.value.usedBy = b),
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { defineComponent as re, ref as _, computed as z, watch as ae, unref as t, resolveComponent as U, createBlock as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as re, ref as _, computed as z, watch as ae, unref as t, resolveComponent as U, createBlock as H, openBlock as f, withCtx as k, createElementVNode as o, toDisplayString as x, createElementBlock as y, createCommentVNode as F, Fragment as B, renderList as A, createVNode as u, normalizeClass as te, renderSlot as me, createSlots as ve } from "vue";
|
|
2
|
+
import { H as w, O as fe, B as pe, G as q, A as le, J as ne, y as oe } from "./index.vue_vue_type_script_setup_true_lang-CA1qH7Vf.js";
|
|
3
3
|
import { d as _e } from "./vuedraggable-CK8z7qA8.js";
|
|
4
4
|
import { useI18n as ce, useLocale as ye } from "@feedmepos/mf-common";
|
|
5
5
|
import { useSnackbar as he, components as be } from "@feedmepos/ui-library";
|
|
6
6
|
import { _ as ge } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
7
|
-
import { _ as xe } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
7
|
+
import { _ as xe } from "./RuleView.vue_vue_type_script_setup_true_lang-CPMCeAK9.js";
|
|
8
8
|
import { u as de } from "./discardConfirm-BHni0LNu.js";
|
|
9
|
-
import { _ as Ve } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-
|
|
9
|
+
import { _ as Ve } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-AIw0Zgzf.js";
|
|
10
10
|
import { g as K, a as ee, _ as se, b as ie } from "./translation-Cdap0IVg.js";
|
|
11
11
|
import { c as ke } from "./check-C9mY6LiX.js";
|
|
12
|
-
const Ce = { class: "fm-typo-en-title-md-600" }, Ee = { class: "pt-8 space-y-24" }, we = { class: "flex flex-col gap-8" }, Oe = { class: "text-fm-color-typo-primary fm-typo-en-body-lg-600" }, Ue = { class: "flex items-center gap-8 flex-wrap" }, $e = { class: "w-24 h-24 rounded-full bg-fm-color-primary-oats text-fm-color-primary flex items-center justify-center fm-typo-en-body-sm-600" }, Ne = { class: "fm-typo-en-body-md-600" }, je = ["onClick"], Le = { class: "flex items-center gap-8" }, Se = { class: "w-24 h-24 rounded-full bg-fm-color-opacity-sm flex items-center justify-center fm-typo-en-body-sm-600" }, Te = { class: "fm-typo-en-body-md-400" },
|
|
12
|
+
const Ce = { class: "fm-typo-en-title-md-600" }, Ee = { class: "pt-8 space-y-24" }, we = { class: "flex flex-col gap-8" }, Oe = { class: "text-fm-color-typo-primary fm-typo-en-body-lg-600" }, Ue = { class: "flex items-center gap-8 flex-wrap" }, $e = { class: "w-24 h-24 rounded-full bg-fm-color-primary-oats text-fm-color-primary flex items-center justify-center fm-typo-en-body-sm-600" }, Ne = { class: "fm-typo-en-body-md-600" }, je = ["onClick"], Le = { class: "flex items-center gap-8" }, Se = { class: "w-24 h-24 rounded-full bg-fm-color-opacity-sm flex items-center justify-center fm-typo-en-body-sm-600" }, Te = { class: "fm-typo-en-body-md-400" }, Fe = { class: "flex flex-col gap-16 border p-16 rounded-lg" }, De = { class: "fm-typo-en-body-lg-600" }, Me = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "flex flex-col gap-32 pl-32"
|
|
15
15
|
}, Ie = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "space-y-8"
|
|
18
|
-
},
|
|
18
|
+
}, Be = { class: "flex w-[100px] items-center gap-8" }, Ae = { class: "w-24 h-24 rounded-full bg-fm-color-opacity-sm flex items-center justify-center fm-typo-en-body-sm-600" }, qe = { class: "fm-typo-en-body-md-400" }, ze = { class: "flex-1" }, Pe = { class: "flex flex-col gap-16 border p-16 rounded-lg" }, Ye = { class: "fm-typo-en-body-lg-600" }, Ge = {
|
|
19
19
|
key: 0,
|
|
20
20
|
class: "flex flex-col gap-32 pl-32"
|
|
21
|
-
}, Re = { class: "fm-typo-en-body-md-600 text-fm-color-primary border border-fm-color-primary inline-block rounded-md px-8 py-4" }, Ke = { class: "space-y-32" },
|
|
21
|
+
}, Re = { class: "fm-typo-en-body-md-600 text-fm-color-primary border border-fm-color-primary inline-block rounded-md px-8 py-4" }, Ke = { class: "space-y-32" }, He = {
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "space-y-8"
|
|
24
|
-
},
|
|
24
|
+
}, Je = { class: "flex w-[100px] items-center gap-8" }, Qe = { class: "w-24 h-24 rounded-full bg-fm-color-opacity-sm flex items-center justify-center fm-typo-en-body-sm-600" }, We = { class: "fm-typo-en-body-md-400" }, Xe = { class: "flex-1" }, Ze = { class: "flex gap-8 items-center justify-start" }, ea = /* @__PURE__ */ re({
|
|
25
25
|
__name: "ProductVariantTranslation",
|
|
26
26
|
props: {
|
|
27
27
|
modelValue: { type: Boolean },
|
|
@@ -29,8 +29,8 @@ const Ce = { class: "fm-typo-en-title-md-600" }, Ee = { class: "pt-8 space-y-24"
|
|
|
29
29
|
expandSection: { default: "variant" }
|
|
30
30
|
},
|
|
31
31
|
emits: ["update:modelValue", "update:variant"],
|
|
32
|
-
setup(
|
|
33
|
-
const m =
|
|
32
|
+
setup(J, { emit: Q }) {
|
|
33
|
+
const m = J, S = Q, { t: r } = ce(), { localeList: $ } = ye(), N = _(!1), O = _(!1), a = _([]), D = _([]), p = _({}), M = _({}), E = _(""), I = _(""), h = _({}), P = _({}), j = _({}), Y = _({}), G = z(() => m.variant.options.map((s, e) => ({
|
|
34
34
|
...s,
|
|
35
35
|
optionIndex: e + 1
|
|
36
36
|
})).filter((s) => s.name.trim() !== ""));
|
|
@@ -63,7 +63,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, Ee = { class: "pt-8 space-y-24"
|
|
|
63
63
|
ae(
|
|
64
64
|
() => [m.modelValue, m.variant, m.expandSection],
|
|
65
65
|
([s, , e]) => {
|
|
66
|
-
s && (W(),
|
|
66
|
+
s && (W(), D.value = w.clone(a.value), M.value = w.clone(p.value), I.value = E.value, P.value = w.clone(h.value), Y.value = w.clone(j.value), e === "variant" ? (N.value = !0, O.value = !1) : (N.value = !1, O.value = !0));
|
|
67
67
|
},
|
|
68
68
|
{ immediate: !0, deep: !0 }
|
|
69
69
|
);
|
|
@@ -91,7 +91,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, Ee = { class: "pt-8 space-y-24"
|
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
93
|
function l() {
|
|
94
|
-
return !w.isEqual(a.value,
|
|
94
|
+
return !w.isEqual(a.value, D.value) || !w.isEqual(p.value, M.value) || E.value !== I.value || !w.isEqual(h.value, P.value) || !w.isEqual(j.value, Y.value);
|
|
95
95
|
}
|
|
96
96
|
function c() {
|
|
97
97
|
const s = w.clone(m.variant);
|
|
@@ -121,7 +121,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, Ee = { class: "pt-8 space-y-24"
|
|
|
121
121
|
});
|
|
122
122
|
return (s, e) => {
|
|
123
123
|
const i = U("FmIcon"), v = U("fm-button"), g = U("FmMenu"), d = U("fm-text-field"), V = U("fm-side-sheet");
|
|
124
|
-
return f(),
|
|
124
|
+
return f(), H(V, {
|
|
125
125
|
modelValue: T.value,
|
|
126
126
|
"onUpdate:modelValue": e[3] || (e[3] = (n) => T.value = n),
|
|
127
127
|
"max-width": 720,
|
|
@@ -151,7 +151,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, Ee = { class: "pt-8 space-y-24"
|
|
|
151
151
|
o("div", we, [
|
|
152
152
|
o("p", Oe, x(t(r)("menu.variant.form.translation.language")), 1),
|
|
153
153
|
o("div", Ue, [
|
|
154
|
-
(f(!0), y(
|
|
154
|
+
(f(!0), y(B, null, A(a.value, (n) => (f(), y("div", {
|
|
155
155
|
key: n.localeCode,
|
|
156
156
|
class: "flex items-center gap-8 p-8 border border-fm-color-primary text-fm-color-primary rounded-full"
|
|
157
157
|
}, [
|
|
@@ -164,7 +164,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, Ee = { class: "pt-8 space-y-24"
|
|
|
164
164
|
onClick: (C) => Z(n.localeCode)
|
|
165
165
|
}, null, 8, ["onClick"])
|
|
166
166
|
]))), 128)),
|
|
167
|
-
R.value.length > 0 ? (f(),
|
|
167
|
+
R.value.length > 0 ? (f(), H(g, { key: 0 }, {
|
|
168
168
|
"menu-button": k(() => [
|
|
169
169
|
u(v, {
|
|
170
170
|
variant: "secondary",
|
|
@@ -174,7 +174,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, Ee = { class: "pt-8 space-y-24"
|
|
|
174
174
|
})
|
|
175
175
|
]),
|
|
176
176
|
default: k(() => [
|
|
177
|
-
(f(!0), y(
|
|
177
|
+
(f(!0), y(B, null, A(R.value, (n) => (f(), y("div", {
|
|
178
178
|
key: n.code,
|
|
179
179
|
class: "p-12 cursor-pointer hover:bg-fm-color-opacity-md rounded-sm",
|
|
180
180
|
onClick: (C) => X(n.code)
|
|
@@ -186,10 +186,10 @@ const Ce = { class: "fm-typo-en-title-md-600" }, Ee = { class: "pt-8 space-y-24"
|
|
|
186
186
|
], 8, je))), 128))
|
|
187
187
|
]),
|
|
188
188
|
_: 1
|
|
189
|
-
})) :
|
|
189
|
+
})) : F("", !0)
|
|
190
190
|
])
|
|
191
191
|
]),
|
|
192
|
-
o("div",
|
|
192
|
+
o("div", Fe, [
|
|
193
193
|
o("div", {
|
|
194
194
|
class: "flex items-center gap-16 cursor-pointer",
|
|
195
195
|
onClick: e[0] || (e[0] = (n) => N.value = !N.value)
|
|
@@ -198,7 +198,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, Ee = { class: "pt-8 space-y-24"
|
|
|
198
198
|
name: "keyboard_arrow_down",
|
|
199
199
|
class: te(["transition-transform", N.value ? "transform rotate-180" : ""])
|
|
200
200
|
}, null, 8, ["class"]),
|
|
201
|
-
o("p",
|
|
201
|
+
o("p", De, x(t(r)("menu.variant.form.translation.variant_name")), 1)
|
|
202
202
|
]),
|
|
203
203
|
N.value ? (f(), y("div", Me, [
|
|
204
204
|
u(se, {
|
|
@@ -210,12 +210,12 @@ const Ce = { class: "fm-typo-en-title-md-600" }, Ee = { class: "pt-8 space-y-24"
|
|
|
210
210
|
u(ie, {
|
|
211
211
|
label: t(r)("menu.variant.form.translation.translation")
|
|
212
212
|
}, null, 8, ["label"]),
|
|
213
|
-
(f(!0), y(
|
|
213
|
+
(f(!0), y(B, null, A(a.value, (n) => (f(), y("div", {
|
|
214
214
|
key: n.localeCode,
|
|
215
215
|
class: "flex items-center gap-16"
|
|
216
216
|
}, [
|
|
217
|
-
o("div",
|
|
218
|
-
o("div",
|
|
217
|
+
o("div", Be, [
|
|
218
|
+
o("div", Ae, x(t(K)(n.localeCode)), 1),
|
|
219
219
|
o("span", qe, x(t(ee)(n.localeCode, t($))), 1)
|
|
220
220
|
]),
|
|
221
221
|
o("div", ze, [
|
|
@@ -226,8 +226,8 @@ const Ce = { class: "fm-typo-en-title-md-600" }, Ee = { class: "pt-8 space-y-24"
|
|
|
226
226
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
|
|
227
227
|
])
|
|
228
228
|
]))), 128))
|
|
229
|
-
])) :
|
|
230
|
-
])) :
|
|
229
|
+
])) : F("", !0)
|
|
230
|
+
])) : F("", !0)
|
|
231
231
|
]),
|
|
232
232
|
o("div", Pe, [
|
|
233
233
|
o("div", {
|
|
@@ -241,7 +241,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, Ee = { class: "pt-8 space-y-24"
|
|
|
241
241
|
o("p", Ye, x(t(r)("menu.variant.form.translation.option_value")), 1)
|
|
242
242
|
]),
|
|
243
243
|
O.value ? (f(), y("div", Ge, [
|
|
244
|
-
(f(!0), y(
|
|
244
|
+
(f(!0), y(B, null, A(G.value, (n) => (f(), y("div", {
|
|
245
245
|
key: n._id,
|
|
246
246
|
class: "space-y-8"
|
|
247
247
|
}, [
|
|
@@ -253,17 +253,17 @@ const Ce = { class: "fm-typo-en-title-md-600" }, Ee = { class: "pt-8 space-y-24"
|
|
|
253
253
|
"onUpdate:modelValue": (C) => j.value[n._id] = C,
|
|
254
254
|
spacing: "sm"
|
|
255
255
|
}, null, 8, ["label", "modelValue", "onUpdate:modelValue"]),
|
|
256
|
-
a.value.length > 0 ? (f(), y("div",
|
|
256
|
+
a.value.length > 0 ? (f(), y("div", He, [
|
|
257
257
|
u(ie, {
|
|
258
258
|
label: t(r)("menu.variant.form.translation.translation"),
|
|
259
259
|
spacing: "sm"
|
|
260
260
|
}, null, 8, ["label"]),
|
|
261
|
-
(f(!0), y(
|
|
261
|
+
(f(!0), y(B, null, A(a.value, (C) => (f(), y("div", {
|
|
262
262
|
key: C.localeCode,
|
|
263
263
|
class: "flex items-center gap-16"
|
|
264
264
|
}, [
|
|
265
|
-
o("div",
|
|
266
|
-
o("div",
|
|
265
|
+
o("div", Je, [
|
|
266
|
+
o("div", Qe, x(t(K)(C.localeCode)), 1),
|
|
267
267
|
o("span", We, x(t(ee)(C.localeCode, t($))), 1)
|
|
268
268
|
]),
|
|
269
269
|
o("div", Xe, [
|
|
@@ -274,10 +274,10 @@ const Ce = { class: "fm-typo-en-title-md-600" }, Ee = { class: "pt-8 space-y-24"
|
|
|
274
274
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
|
|
275
275
|
])
|
|
276
276
|
]))), 128))
|
|
277
|
-
])) :
|
|
277
|
+
])) : F("", !0)
|
|
278
278
|
])
|
|
279
279
|
]))), 128))
|
|
280
|
-
])) :
|
|
280
|
+
])) : F("", !0)
|
|
281
281
|
])
|
|
282
282
|
])
|
|
283
283
|
]),
|
|
@@ -293,8 +293,8 @@ const Ce = { class: "fm-typo-en-title-md-600" }, Ee = { class: "pt-8 space-y-24"
|
|
|
293
293
|
props: {
|
|
294
294
|
initialValue: {}
|
|
295
295
|
},
|
|
296
|
-
setup(
|
|
297
|
-
const m =
|
|
296
|
+
setup(J, { expose: Q }) {
|
|
297
|
+
const m = J, S = fe(pe(he())), { t: r } = ce(), $ = z(
|
|
298
298
|
() => m.initialValue ? r("menu.variant.form.title.edit") : r("menu.variant.form.title.add")
|
|
299
299
|
), N = z(() => m.initialValue ? "Update" : "Add"), O = () => {
|
|
300
300
|
if (m.initialValue) {
|
|
@@ -305,7 +305,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, Ee = { class: "pt-8 space-y-24"
|
|
|
305
305
|
}), l;
|
|
306
306
|
} else
|
|
307
307
|
return { ...le.generator.initMenuV4VariantGroup(), usedBy: [] };
|
|
308
|
-
}, a = _(O()),
|
|
308
|
+
}, a = _(O()), D = _(!1), p = _(!1), M = _(!1), E = _("variant"), I = (l) => {
|
|
309
309
|
ke.isBoolean(l) ? p.value = l : p.value = !p.value;
|
|
310
310
|
};
|
|
311
311
|
function h(l) {
|
|
@@ -361,7 +361,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, Ee = { class: "pt-8 space-y-24"
|
|
|
361
361
|
}
|
|
362
362
|
), Z = async () => {
|
|
363
363
|
try {
|
|
364
|
-
|
|
364
|
+
D.value = !0;
|
|
365
365
|
const l = q(a.value);
|
|
366
366
|
l.options = l.options.filter((c) => !!c.name.trim()), m.initialValue ? await S.updateMenu(
|
|
367
367
|
{
|
|
@@ -379,7 +379,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, Ee = { class: "pt-8 space-y-24"
|
|
|
379
379
|
l.name
|
|
380
380
|
), I(!1), a.value = { ...le.generator.initMenuV4VariantGroup(), usedBy: [] };
|
|
381
381
|
} finally {
|
|
382
|
-
|
|
382
|
+
D.value = !1;
|
|
383
383
|
}
|
|
384
384
|
};
|
|
385
385
|
return ae(
|
|
@@ -387,12 +387,12 @@ const Ce = { class: "fm-typo-en-title-md-600" }, Ee = { class: "pt-8 space-y-24"
|
|
|
387
387
|
(l) => {
|
|
388
388
|
l && (a.value = O());
|
|
389
389
|
}
|
|
390
|
-
),
|
|
390
|
+
), Q({
|
|
391
391
|
show: p,
|
|
392
392
|
trigger: I
|
|
393
393
|
}), (l, c) => {
|
|
394
394
|
const b = U("fm-icon"), L = U("fm-text-field"), T = U("fm-button"), s = U("fm-side-sheet");
|
|
395
|
-
return f(), y(
|
|
395
|
+
return f(), y(B, null, [
|
|
396
396
|
me(l.$slots, "default", { trigger: I }),
|
|
397
397
|
u(s, {
|
|
398
398
|
id: "variant-form",
|
|
@@ -413,7 +413,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, Ee = { class: "pt-8 space-y-24"
|
|
|
413
413
|
o("div", ia, [
|
|
414
414
|
u(T, {
|
|
415
415
|
label: N.value,
|
|
416
|
-
loading:
|
|
416
|
+
loading: D.value,
|
|
417
417
|
size: "lg",
|
|
418
418
|
type: "submit",
|
|
419
419
|
variant: "primary"
|
|
@@ -471,11 +471,11 @@ const Ce = { class: "fm-typo-en-title-md-600" }, Ee = { class: "pt-8 space-y-24"
|
|
|
471
471
|
class: te(["flex items-center", "space-x-8"]),
|
|
472
472
|
"data-not-allow-sort": v === a.value.options.length - 1
|
|
473
473
|
}, [
|
|
474
|
-
v !== a.value.options.length - 1 ? (f(),
|
|
474
|
+
v !== a.value.options.length - 1 ? (f(), H(b, {
|
|
475
475
|
key: 0,
|
|
476
476
|
class: "handle",
|
|
477
477
|
name: "drag_handle"
|
|
478
|
-
})) : v > 0 ? (f(), y("div", na)) :
|
|
478
|
+
})) : v > 0 ? (f(), y("div", na)) : F("", !0),
|
|
479
479
|
o("div", oa, [
|
|
480
480
|
u(L, {
|
|
481
481
|
"model-value": i.name,
|
|
@@ -517,13 +517,13 @@ const Ce = { class: "fm-typo-en-title-md-600" }, Ee = { class: "pt-8 space-y-24"
|
|
|
517
517
|
]),
|
|
518
518
|
_: 1
|
|
519
519
|
}, 8, ["title"]),
|
|
520
|
-
(e = a.value.usedBy) != null && e.length ? (f(),
|
|
520
|
+
(e = a.value.usedBy) != null && e.length ? (f(), H(Ve, {
|
|
521
521
|
key: 0,
|
|
522
522
|
editable: !1,
|
|
523
523
|
overrides: a.value.usedBy || [],
|
|
524
524
|
"select-variant": !1,
|
|
525
525
|
title: t(r)("menu.variant.form.applied_product")
|
|
526
|
-
}, null, 8, ["overrides", "title"])) :
|
|
526
|
+
}, null, 8, ["overrides", "title"])) : F("", !0)
|
|
527
527
|
])
|
|
528
528
|
];
|
|
529
529
|
}),
|