@feedmepos/mf-menu 0.32.45 → 0.32.46-dev.2
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-CczmyQeJ.js → App-DnmPW7GQ.js} +7 -7
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BscsJpMV.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BN_pomak.js} +3 -3
- package/dist/{Catalog-RU_6keJm.js → Catalog-gxj-MZB8.js} +44 -44
- package/dist/{Category-7Fg2kD0h.js → Category-CqWHFR6I.js} +19 -19
- package/dist/{Category-CwEXbsDv.js → Category-JHb56PfQ.js} +24 -24
- package/dist/{CookingGuide-DFu5VStf.js → CookingGuide-DNMfIDDf.js} +105 -105
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CeNfLbfq.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-BYdToHa3.js} +1 -1
- package/dist/{Group-l-YpAi6B.js → Group-DXEgfQ_e.js} +3 -3
- package/dist/{Group-C6vQeBnj.js → Group-bxjyN23A.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-1UdOBdv-.js → Group.vue_vue_type_script_setup_true_lang-DPhYCl15.js} +19 -19
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-C309DrLU.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DAsxXqGu.js} +30 -30
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-C903fhuj.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-BuD8TeFi.js} +2940 -2939
- package/dist/{Ingredient-CHqDo-GY.js → Ingredient-BAnjcaO0.js} +20 -20
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CXHHlrI0.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CppjxcTA.js} +2 -2
- package/dist/{LinkProductSideSheet-DY32g33Q.js → LinkProductSideSheet-CvWcioxX.js} +45 -45
- package/dist/{MenuSetting-DhbxlKuU.js → MenuSetting-DCQM7rh6.js} +47 -47
- package/dist/{PrintRoute-CToZ0ClG.js → PrintRoute-Be0WG4oQ.js} +39 -39
- package/dist/{Product-Cpg32wpg.js → Product-DfYmo4vJ.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-BC2KG1q4.js → Product.vue_vue_type_script_setup_true_lang-BsRZ0VVW.js} +93 -93
- package/dist/{ProductInternalTools-wH9BN1NK.js → ProductInternalTools-D2QTAjE7.js} +66 -66
- package/dist/{Products-CpINHaH6.js → Products-BhY4Cwaz.js} +41 -41
- package/dist/{Publish-CJS_836k.js → Publish-BfEtLeeh.js} +29 -29
- package/dist/{Recipe-Cz7hivmM.js → Recipe-ssNUNy2j.js} +24 -24
- package/dist/RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-DHnuxBck.js +144 -0
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-CRLzqgQe.js → RuleView.vue_vue_type_script_setup_true_lang-CkpwtUSB.js} +176 -176
- package/dist/{Scheduler-QuWCnEJw.js → Scheduler-CAUHWrZs.js} +11 -11
- package/dist/{ServingSequence-CqK5Sjmq.js → ServingSequence-D12rqxa8.js} +44 -44
- package/dist/{Setting-C3tKUfsm.js → Setting-pJ06C7wS.js} +17 -17
- package/dist/{Subcategory-DCtTOPUj.js → Subcategory-Dfd-qx6m.js} +54 -54
- package/dist/{Takeaway-Fi8SAH2t.js → Takeaway-Bnat0taD.js} +13 -13
- package/dist/{Takeaway-BnB1OFnK.js → Takeaway-Cv-kA3M_.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-Cbz7Qt_g.js → Takeaway.vue_vue_type_script_setup_true_lang-9aZi7wvY.js} +33 -33
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-CPM_muXB.js → Thumbnail.vue_vue_type_script_setup_true_lang-C3Sk0LVd.js} +27 -27
- package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-BpL8UrFY.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-5RV7_0Wc.js} +1 -1
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-DtkzQeq4.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-BBXAoJje.js} +5 -5
- package/dist/{TranslationViewChip.vue_vue_type_script_setup_true_lang-CHT7Xozn.js → TranslationViewChip.vue_vue_type_script_setup_true_lang-CIGgeuKb.js} +1 -1
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D9EEpjV6.js +5767 -0
- package/dist/{Unit-5yE2-y9D.js → Unit-DeegDDRz.js} +8 -8
- package/dist/{Variant-C7lIdRID.js → Variant-D8WwGu3E.js} +14 -14
- package/dist/{_id_-08ykp97a.js → _id_-BfOGbmqs.js} +28 -28
- package/dist/app-BmAr9vNI.js +2283 -0
- package/dist/{app-DPovSnb_.js → app-DhZxk0zL.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/api/index.d.ts +1 -1
- package/dist/apps/mf-menu/src/api/menu.d.ts +14 -5
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-WT6deoPw.js → linked-status-CxpcEFX9.js} +5 -5
- package/dist/assets/{menu-export-DxtFXMED.js → menu-export-C09ZbTRq.js} +2 -2
- package/dist/assets/{override-menu-BJGRdWWE.js → override-menu-0rFjySh6.js} +5 -5
- package/dist/assets/{validate-menu-B_tmkHe7.js → validate-menu-cO19zy8y.js} +2 -2
- package/dist/{catalog-D7Jjqj3-.js → catalog-tNpB0Dhn.js} +1 -1
- package/dist/{catalogSetting-Bg_zMUrV.js → catalogSetting-BRnA4v49.js} +1 -1
- package/dist/{currency-DDxFMjAI.js → currency-CyKauaRc.js} +1 -1
- package/dist/dayjs.min-ipgoM27T.js +7 -0
- package/dist/{index-BlLRjkMF.js → index-BGm2uHNk.js} +31 -31
- package/dist/{index-Cq2MVpMv.js → index-CXquA22H.js} +30 -30
- package/dist/{index.vue_vue_type_script_setup_true_lang-C6IVvAua.js → index.vue_vue_type_script_setup_true_lang-D6HyeIid.js} +6918 -6861
- package/dist/{item-Bq6SCc7D.js → item-Cik-YX-L.js} +16 -16
- package/dist/{jszip.min-1MrCGuHF.js → jszip.min-D22BefT1.js} +388 -387
- package/dist/{menu-CKA9uouu.js → menu-ag-37Ofg.js} +1 -1
- package/dist/{menuV2-DBkrmeha.js → menuV2-DZDWxmas.js} +172 -172
- package/dist/{priceTier-Cxr9IcVP.js → priceTier-BmDl3J-3.js} +1 -1
- package/dist/{rules-DFWR7a3m.js → rules-pJdF9REd.js} +12 -12
- package/dist/{scheduler-HKff8Ty2.js → scheduler-DRHXK6kX.js} +29 -29
- package/dist/{toExcel-DopYrxBW.js → toExcel-5kDfvPVG.js} +2 -2
- package/dist/{unit-5G600HMJ.js → unit-CIlgFZ50.js} +35 -35
- package/package.json +1 -1
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DoIgiwHh.js +0 -6130
- package/dist/app-CA4g3v2n.js +0 -363
- package/dist/dayjs.min-BVOO8wJG.js +0 -6
- package/dist/index-CG7GFWlC.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-D6HyeIid.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-D6HyeIid.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-D6HyeIid.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-CkpwtUSB.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-BN_pomak.js";
|
|
8
|
+
import { _ as ue } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-BBXAoJje.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-CyKauaRc.js";
|
|
11
11
|
import { c as de } from "./string-DpfFixWH.js";
|
|
12
|
-
import { g as
|
|
12
|
+
import { g as K } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-5RV7_0Wc.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,37 +194,37 @@ 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
|
const a = s.value;
|
|
199
199
|
E("update:takeaway", {
|
|
200
200
|
...e.value,
|
|
201
201
|
name_locale: a
|
|
202
|
-
}),
|
|
202
|
+
}), F(!1);
|
|
203
203
|
}
|
|
204
204
|
return j(
|
|
205
205
|
() => u.value,
|
|
206
206
|
() => {
|
|
207
207
|
var a;
|
|
208
|
-
u.value && (e.value =
|
|
208
|
+
u.value && (e.value = D(), s.value = (a = m.initialValue) == null ? void 0 : a.name_locale);
|
|
209
209
|
}
|
|
210
210
|
), g({
|
|
211
|
-
trigger:
|
|
211
|
+
trigger: F,
|
|
212
212
|
show: u
|
|
213
213
|
}), (a, t) => {
|
|
214
214
|
const w = x("fm-button"), V = x("FmTooltip"), d = x("fm-text-field"), y = x("fm-side-sheet");
|
|
215
|
-
return L(), I(
|
|
216
|
-
P(a.$slots, "default", { trigger:
|
|
215
|
+
return L(), I(A, null, [
|
|
216
|
+
P(a.$slots, "default", { trigger: F }),
|
|
217
217
|
v(y, {
|
|
218
218
|
id: "group-form",
|
|
219
219
|
modelValue: u.value,
|
|
220
220
|
"onUpdate:modelValue": t[5] || (t[5] = (b) => u.value = b),
|
|
221
221
|
"is-container": i(ne).FmForm,
|
|
222
222
|
"is-container-props": {
|
|
223
|
-
onValidationSuccess:
|
|
223
|
+
onValidationSuccess: G,
|
|
224
224
|
blameFormChildOnValidationFailed: !0
|
|
225
225
|
},
|
|
226
226
|
"max-width": 560,
|
|
227
|
-
"onOn:clickedAway": i(
|
|
227
|
+
"onOn:clickedAway": i(J)
|
|
228
228
|
}, {
|
|
229
229
|
"side-sheet-header": k(() => [
|
|
230
230
|
U("p", ce, O(n.value), 1)
|
|
@@ -275,7 +275,7 @@ const ce = { class: "fm-typo-en-title-md-600" }, fe = { class: "space-y-32" }, v
|
|
|
275
275
|
}, {
|
|
276
276
|
content: k(() => [
|
|
277
277
|
U("div", ve, [
|
|
278
|
-
(L(!0), I(
|
|
278
|
+
(L(!0), I(A, null, le(f.value, (p) => (L(), I("div", {
|
|
279
279
|
key: p.locale
|
|
280
280
|
}, O(p.name) + " (" + O(p.localeDisplay) + ") ", 1))), 128))
|
|
281
281
|
])
|
|
@@ -307,7 +307,7 @@ const ce = { class: "fm-typo-en-title-md-600" }, fe = { class: "space-y-32" }, v
|
|
|
307
307
|
}),
|
|
308
308
|
_: 1
|
|
309
309
|
}),
|
|
310
|
-
a.applyProduct ? (L(),
|
|
310
|
+
a.applyProduct ? (L(), H(re, {
|
|
311
311
|
key: 0,
|
|
312
312
|
overrides: e.value.usedBy,
|
|
313
313
|
"onUpdate:overrides": t[3] || (t[3] = (b) => e.value.usedBy = b),
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as te, ref as f, computed as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as te, ref as f, computed as A, watch as J, resolveComponent as C, createBlock as L, openBlock as h, unref as o, withCtx as k, createElementVNode as p, createVNode as m, createElementBlock as O, createCommentVNode as N, normalizeClass as Q, toDisplayString as F, Fragment as B, renderList as H, renderSlot as se, createSlots as ie } from "vue";
|
|
2
|
+
import { H as E, O as re, B as ue, G as j, A as W, J as X, y as Z } from "./index.vue_vue_type_script_setup_true_lang-D6HyeIid.js";
|
|
3
3
|
import { d as de } from "./vuedraggable-CK8z7qA8.js";
|
|
4
4
|
import { useI18n as ne } from "@feedmepos/mf-common";
|
|
5
5
|
import { useSnackbar as ce, components as me } from "@feedmepos/ui-library";
|
|
6
6
|
import { _ as ve } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
7
|
-
import { _ as pe } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
7
|
+
import { _ as pe } from "./RuleView.vue_vue_type_script_setup_true_lang-CkpwtUSB.js";
|
|
8
8
|
import { u as oe } from "./discardConfirm-BHni0LNu.js";
|
|
9
|
-
import { _ as fe } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
import { _ as _e, a as ee, b as ae, c as le } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-
|
|
9
|
+
import { _ as fe } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-BN_pomak.js";
|
|
10
|
+
import { _ as _e, a as ee, b as ae, c as le } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-5RV7_0Wc.js";
|
|
11
11
|
import { c as he } from "./check-C9mY6LiX.js";
|
|
12
12
|
const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24" }, Ve = { class: "flex flex-col gap-16 border p-16 rounded-lg" }, be = { class: "fm-typo-en-body-lg-600" }, xe = {
|
|
13
13
|
key: 0,
|
|
@@ -30,7 +30,7 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
|
|
|
30
30
|
},
|
|
31
31
|
emits: ["update:modelValue", "update:variant"],
|
|
32
32
|
setup(q, { emit: z }) {
|
|
33
|
-
const d = q, S = z, { t: s } = ne(), w = f(!1), U = f(!1), g = f([]), t = f([]), y = f({}), b = f({}), x = f(""), T = f(""), _ = f({}), D = f({}), $ = f({}),
|
|
33
|
+
const d = q, S = z, { t: s } = ne(), w = f(!1), U = f(!1), g = f([]), t = f([]), y = f({}), b = f({}), x = f(""), T = f(""), _ = f({}), D = f({}), $ = f({}), I = f({}), P = A(() => d.variant.options.map((l, n) => ({
|
|
34
34
|
...l,
|
|
35
35
|
optionIndex: n + 1
|
|
36
36
|
})).filter((l) => l.name.trim() !== ""));
|
|
@@ -52,10 +52,10 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
|
|
|
52
52
|
}), v[e._id] = e.name;
|
|
53
53
|
}), _.value = r, $.value = v;
|
|
54
54
|
}
|
|
55
|
-
|
|
55
|
+
J(
|
|
56
56
|
() => [d.modelValue, d.variant, d.expandSection],
|
|
57
57
|
([l, , n]) => {
|
|
58
|
-
l && (M(), t.value = E.clone(g.value), b.value = E.clone(y.value), T.value = x.value, D.value = E.clone(_.value),
|
|
58
|
+
l && (M(), t.value = E.clone(g.value), b.value = E.clone(y.value), T.value = x.value, D.value = E.clone(_.value), I.value = E.clone($.value), n === "variant" ? (w.value = !0, U.value = !1) : (w.value = !1, U.value = !0));
|
|
59
59
|
},
|
|
60
60
|
{ immediate: !0, deep: !0 }
|
|
61
61
|
);
|
|
@@ -72,7 +72,7 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
|
|
|
72
72
|
g.value = l;
|
|
73
73
|
}
|
|
74
74
|
function G() {
|
|
75
|
-
return !E.isEqual(g.value, t.value) || !E.isEqual(y.value, b.value) || x.value !== T.value || !E.isEqual(_.value, D.value) || !E.isEqual($.value,
|
|
75
|
+
return !E.isEqual(g.value, t.value) || !E.isEqual(y.value, b.value) || x.value !== T.value || !E.isEqual(_.value, D.value) || !E.isEqual($.value, I.value);
|
|
76
76
|
}
|
|
77
77
|
function R() {
|
|
78
78
|
const l = E.clone(d.variant);
|
|
@@ -96,13 +96,13 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
|
|
|
96
96
|
function K() {
|
|
97
97
|
S("update:modelValue", !1);
|
|
98
98
|
}
|
|
99
|
-
const a = oe(G, K), i =
|
|
99
|
+
const a = oe(G, K), i = A({
|
|
100
100
|
get: () => d.modelValue,
|
|
101
101
|
set: (l) => S("update:modelValue", l)
|
|
102
102
|
});
|
|
103
103
|
return (l, n) => {
|
|
104
104
|
const c = C("FmIcon"), r = C("fm-button"), v = C("fm-side-sheet");
|
|
105
|
-
return h(),
|
|
105
|
+
return h(), L(v, {
|
|
106
106
|
modelValue: i.value,
|
|
107
107
|
"onUpdate:modelValue": n[3] || (n[3] = (e) => i.value = e),
|
|
108
108
|
"max-width": 720,
|
|
@@ -141,7 +141,7 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
|
|
|
141
141
|
}, [
|
|
142
142
|
m(c, {
|
|
143
143
|
name: "keyboard_arrow_down",
|
|
144
|
-
class:
|
|
144
|
+
class: Q(["transition-transform", w.value ? "transform rotate-180" : ""])
|
|
145
145
|
}, null, 8, ["class"]),
|
|
146
146
|
p("p", be, F(o(s)("menu.variant.form.translation.variant_name")), 1)
|
|
147
147
|
]),
|
|
@@ -155,7 +155,7 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
|
|
|
155
155
|
m(ae, {
|
|
156
156
|
label: o(s)("menu.variant.form.translation.translation")
|
|
157
157
|
}, null, 8, ["label"]),
|
|
158
|
-
(h(!0), O(
|
|
158
|
+
(h(!0), O(B, null, H(g.value, (e) => (h(), L(le, {
|
|
159
159
|
key: e,
|
|
160
160
|
"locale-code": e,
|
|
161
161
|
modelValue: y.value[e],
|
|
@@ -172,12 +172,12 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
|
|
|
172
172
|
}, [
|
|
173
173
|
m(c, {
|
|
174
174
|
name: "keyboard_arrow_down",
|
|
175
|
-
class:
|
|
175
|
+
class: Q(["transition-transform", U.value ? "transform rotate-180" : ""])
|
|
176
176
|
}, null, 8, ["class"]),
|
|
177
177
|
p("p", Oe, F(o(s)("menu.variant.form.translation.option_value")), 1)
|
|
178
178
|
]),
|
|
179
179
|
U.value ? (h(), O("div", we, [
|
|
180
|
-
(h(!0), O(
|
|
180
|
+
(h(!0), O(B, null, H(P.value, (e) => (h(), O("div", {
|
|
181
181
|
key: e._id,
|
|
182
182
|
class: "space-y-8"
|
|
183
183
|
}, [
|
|
@@ -194,7 +194,7 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
|
|
|
194
194
|
label: o(s)("menu.variant.form.translation.translation"),
|
|
195
195
|
spacing: "sm"
|
|
196
196
|
}, null, 8, ["label"]),
|
|
197
|
-
(h(!0), O(
|
|
197
|
+
(h(!0), O(B, null, H(g.value, (u) => (h(), L(le, {
|
|
198
198
|
key: u,
|
|
199
199
|
"locale-code": u,
|
|
200
200
|
modelValue: _.value[e._id][u],
|
|
@@ -215,15 +215,15 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
|
|
|
215
215
|
}), Te = { class: "fm-typo-en-title-md-600" }, De = { class: "py-16 space-y-32" }, je = ["data-not-allow-sort"], Fe = {
|
|
216
216
|
key: 1,
|
|
217
217
|
class: "w-24"
|
|
218
|
-
},
|
|
218
|
+
}, Le = { class: "flex-1" }, Ie = { class: "flex items-center gap-8" }, Me = { class: "flex gap-8 items-center justify-start" }, Be = /* @__PURE__ */ te({
|
|
219
219
|
__name: "Form",
|
|
220
220
|
props: {
|
|
221
221
|
initialValue: {}
|
|
222
222
|
},
|
|
223
223
|
setup(q, { expose: z }) {
|
|
224
|
-
const d = q, S = re(ue(ce())), { t: s } = ne(), w =
|
|
224
|
+
const d = q, S = re(ue(ce())), { t: s } = ne(), w = A(
|
|
225
225
|
() => d.initialValue ? s("menu.variant.form.title.edit") : s("menu.variant.form.title.add")
|
|
226
|
-
), U =
|
|
226
|
+
), U = A(() => d.initialValue ? "Update" : "Add"), g = () => {
|
|
227
227
|
if (d.initialValue) {
|
|
228
228
|
const a = j(d.initialValue);
|
|
229
229
|
return a.options.push({
|
|
@@ -241,7 +241,7 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
|
|
|
241
241
|
function $(a) {
|
|
242
242
|
t.value = a;
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function I(a) {
|
|
245
245
|
t.value.options = a;
|
|
246
246
|
}
|
|
247
247
|
function P(a, i) {
|
|
@@ -262,7 +262,7 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
|
|
|
262
262
|
const i = j(t.value.options);
|
|
263
263
|
t.value.options = i.filter((l) => l._id !== a);
|
|
264
264
|
}
|
|
265
|
-
|
|
265
|
+
J(
|
|
266
266
|
() => t.value.options,
|
|
267
267
|
(a) => {
|
|
268
268
|
a.length <= 0 && M();
|
|
@@ -309,7 +309,7 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
|
|
|
309
309
|
y.value = !1;
|
|
310
310
|
}
|
|
311
311
|
};
|
|
312
|
-
return
|
|
312
|
+
return J(
|
|
313
313
|
() => b.value,
|
|
314
314
|
(a) => {
|
|
315
315
|
a && (t.value = g());
|
|
@@ -319,7 +319,7 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
|
|
|
319
319
|
trigger: _
|
|
320
320
|
}), (a, i) => {
|
|
321
321
|
const l = C("fm-icon"), n = C("fm-text-field"), c = C("fm-button"), r = C("fm-side-sheet");
|
|
322
|
-
return h(), O(
|
|
322
|
+
return h(), O(B, null, [
|
|
323
323
|
se(a.$slots, "default", { trigger: _ }),
|
|
324
324
|
m(r, {
|
|
325
325
|
id: "variant-form",
|
|
@@ -391,19 +391,19 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
|
|
|
391
391
|
group: "categories",
|
|
392
392
|
handle: ".handle",
|
|
393
393
|
"item-key": "_id",
|
|
394
|
-
"onUpdate:modelValue":
|
|
394
|
+
"onUpdate:modelValue": I
|
|
395
395
|
}, {
|
|
396
396
|
item: k(({ element: e, index: u }) => [
|
|
397
397
|
p("div", {
|
|
398
|
-
class:
|
|
398
|
+
class: Q(["flex items-center", "space-x-8"]),
|
|
399
399
|
"data-not-allow-sort": u === t.value.options.length - 1
|
|
400
400
|
}, [
|
|
401
|
-
u !== t.value.options.length - 1 ? (h(),
|
|
401
|
+
u !== t.value.options.length - 1 ? (h(), L(l, {
|
|
402
402
|
key: 0,
|
|
403
403
|
class: "handle",
|
|
404
404
|
name: "drag_handle"
|
|
405
405
|
})) : u > 0 ? (h(), O("div", Fe)) : N("", !0),
|
|
406
|
-
p("div",
|
|
406
|
+
p("div", Le, [
|
|
407
407
|
m(n, {
|
|
408
408
|
"model-value": e.name,
|
|
409
409
|
rules: [
|
|
@@ -417,7 +417,7 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
|
|
|
417
417
|
u !== t.value.options.length - 1 ? {
|
|
418
418
|
name: "append",
|
|
419
419
|
fn: k(() => [
|
|
420
|
-
p("div",
|
|
420
|
+
p("div", Ie, [
|
|
421
421
|
m(l, {
|
|
422
422
|
name: "g_translate",
|
|
423
423
|
class: "cursor-pointer",
|
|
@@ -444,7 +444,7 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
|
|
|
444
444
|
]),
|
|
445
445
|
_: 1
|
|
446
446
|
}, 8, ["title"]),
|
|
447
|
-
(v = t.value.usedBy) != null && v.length ? (h(),
|
|
447
|
+
(v = t.value.usedBy) != null && v.length ? (h(), L(fe, {
|
|
448
448
|
key: 0,
|
|
449
449
|
editable: !1,
|
|
450
450
|
overrides: t.value.usedBy || [],
|
|
@@ -466,7 +466,7 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
|
|
|
466
466
|
], 64);
|
|
467
467
|
};
|
|
468
468
|
}
|
|
469
|
-
}), We =
|
|
469
|
+
}), We = Be;
|
|
470
470
|
export {
|
|
471
471
|
We as V
|
|
472
472
|
};
|