@feedmepos/mf-menu 0.31.33-beta.1 → 0.31.33-beta.6
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-B4rnpCXN.js → App-Dt6RQiUh.js} +6 -6
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-LtwWMoPW.js → ApplyProduct.vue_vue_type_script_setup_true_lang-B_SQpWg7.js} +2 -2
- package/dist/{Catalog-Cd7J8de0.js → Catalog-CFx7t_Nu.js} +79 -79
- package/dist/{Category-p8UUDEiv.js → Category-CPMx86rY.js} +23 -19
- package/dist/{Category-D3WDm9Fe.js → Category-OjK-v--G.js} +5 -5
- package/dist/{CookingGuide-hFtxmtGj.js → CookingGuide-ANnXKBjc.js} +3 -3
- package/dist/CustomAttributeChip.vue_vue_type_script_setup_true_lang-D-1OzZ-i.js +113 -0
- package/dist/{Group-Bv0dyi8v.js → Group--DJjkGab.js} +1 -1
- package/dist/{Group-BTrqZgFd.js → Group-K4925_bP.js} +3 -3
- package/dist/Group.vue_vue_type_script_setup_true_lang-36O78xv0.js +684 -0
- package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BIX-gPUO.js +372 -0
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CxPaVLVu.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-C-z1m3jh.js} +13987 -13378
- package/dist/{Ingredient-BCostN4Y.js → Ingredient-G4Txx6_0.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-MAqpI7ZD.js → InventoryBinding.vue_vue_type_script_setup_true_lang-HgHBlflo.js} +2 -2
- package/dist/{LinkProductSideSheet-abzVzmo3.js → LinkProductSideSheet-CWNarCEs.js} +1 -1
- package/dist/{MenuSetting-TfAo82-E.js → MenuSetting-Cx-EHG-6.js} +4 -4
- package/dist/{PrintRoute-B43rP5A9.js → PrintRoute-IxHGvGzF.js} +3 -3
- package/dist/{Product-C7cYyDHH.js → Product-D1gqn5J6.js} +1 -1
- package/dist/Product.vue_vue_type_script_setup_true_lang-BCQd-ks4.js +1641 -0
- package/dist/{ProductInternalTools-CkswVuAF.js → ProductInternalTools-GJ2OE5gU.js} +5 -5
- package/dist/Products-DJqgSe-Y.js +270 -0
- package/dist/{Publish-DIKqaH2f.js → Publish-C86rd413.js} +3 -3
- package/dist/{Recipe-_ApT00c_.js → Recipe-BbQKou9p.js} +4 -4
- package/dist/{Scheduler-DWY1kKHO.js → Scheduler-DUeTkyGQ.js} +3 -3
- package/dist/{ServingSequence-Z1S9zOTO.js → ServingSequence-BROo5rC_.js} +3 -3
- package/dist/Setting-D-ueTlwO.js +259 -0
- package/dist/{Subcategory-Lqq6XHz2.js → Subcategory-DVewA8HX.js} +4 -4
- package/dist/{Takeaway-DiGzrarg.js → Takeaway-B4lDGQDh.js} +4 -4
- package/dist/{Takeaway-DGvM9SBP.js → Takeaway-DyPjHuCl.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BfWy217t.js → Takeaway.vue_vue_type_script_setup_true_lang-BTDlzYuX.js} +6 -6
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B2wC_Mf0.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B5BAKDRP.js} +642 -642
- package/dist/{Unit-D11rRFAf.js → Unit-CVF0dom4.js} +2 -2
- package/dist/{Variant-LaKYPxDe.js → Variant-DmccAgFU.js} +3 -3
- package/dist/_id_-CWtK62Fy.js +178 -0
- package/dist/{app-C5UXrJGj.js → app-CV_q8OdE.js} +75 -75
- package/dist/{app-Br9mC24D.js → app-ClinzawZ.js} +1 -1
- package/dist/app-DvG3mOom.js +8024 -0
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +60 -1
- package/dist/apps/mf-menu/src/components/feature/AttributesSelector.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/components/feature/LinkProduct/LinkProductUnifiedSideSheet.vue.d.ts +12 -0
- package/dist/apps/mf-menu/src/components/feature/PriceTier/LinkPriceTierSection.vue.d.ts +24 -0
- package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierRuleEditor.vue.d.ts +30 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +77 -0
- package/dist/apps/mf-menu/src/composable/customAttributes.d.ts +88 -0
- package/dist/apps/mf-menu/src/helper/{menuImport.d.ts → import-export.d.ts} +204 -3
- package/dist/apps/mf-menu/src/helper/menu.d.ts +77 -0
- package/dist/apps/mf-menu/src/helper/setting/catalogSetting.d.ts +11 -2
- package/dist/apps/mf-menu/src/manager/menu/item.d.ts +77 -0
- package/dist/apps/mf-menu/src/stores/manager/catalog.d.ts +2 -0
- package/dist/apps/mf-menu/src/stores/menu.d.ts +79 -0
- package/dist/apps/mf-menu/src/views/Publish/UpdateCatalogDialog.vue.d.ts +82 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/linked-status-fZD691Js.js +24 -0
- package/dist/assets/override-menu-Cjy1BJuz.js +24 -0
- package/dist/assets/validate-menu-uwysUwDP.js +24 -0
- package/dist/{catalog-BDyG_i9q.js → catalog-Wx88K6iI.js} +1 -1
- package/dist/catalogSetting-DTEHDSAd.js +71 -0
- package/dist/{category-Bi6gpIYU.js → category-BRTw76Vf.js} +1 -1
- package/dist/{currency-DDseyYg1.js → currency-562bPc2l.js} +1 -1
- package/dist/customAttributes-CXzd5ud1.js +33 -0
- package/dist/{dayjs.min-DoQgN0KD.js → dayjs.min-Cnfm8bQm.js} +1 -1
- package/dist/{index-DxrEwDTr.js → index-4hf9vONw.js} +2 -2
- package/dist/{index-C-zLHAG1.js → index-Crs_eZ0i.js} +28 -28
- package/dist/{index-DTUmry92.js → index-DJXrJdeQ.js} +3 -3
- package/dist/{item-DqXzPUy9.js → item-CuIxc9FT.js} +377 -377
- package/dist/{jszip.min-iAC5WNVU.js → jszip.min-C9xLIvo4.js} +245 -245
- package/dist/menu-ILWxqJQe.js +133263 -0
- package/dist/{menu-D6df9rcz.js → menu-Mkzv9c8C.js} +4 -4
- package/dist/{priceTier-C56BYecC.js → priceTier-D4joq_kN.js} +1 -1
- package/dist/{scheduler-DCSpt65t.js → scheduler-DuxWoNVb.js} +3 -3
- package/dist/{subcategory-CydaPy_X.js → subcategory-CLLMagXY.js} +43 -43
- package/dist/{toExcel-Bil8CwJs.js → toExcel-hGfpS_Uo.js} +2 -2
- package/dist/{unit-8DyuBx-X.js → unit-9fycj1fu.js} +1 -1
- package/package.json +4 -4
- package/dist/CustomAttributeChip.vue_vue_type_script_setup_true_lang-Cf17Iy5i.js +0 -7949
- package/dist/Group.vue_vue_type_script_setup_true_lang-vk1J9IxK.js +0 -698
- package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B1wrLnf6.js +0 -206
- package/dist/Product.vue_vue_type_script_setup_true_lang-BOq8wMzq.js +0 -1560
- package/dist/Products-C7BtAjhB.js +0 -659
- package/dist/Setting-Bfuf26Gc.js +0 -258
- package/dist/_id_-Q_Tyhr4U.js +0 -200
- package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +0 -123
- package/dist/apps/mf-menu/src/helper/menuExport.d.ts +0 -32
- package/dist/assets/linked-status-BhGrXd73.js +0 -24
- package/dist/assets/override-menu-CUNDHOWA.js +0 -24
- package/dist/assets/validate-menu-BqOizHsX.js +0 -24
- package/dist/catalogSetting-C33p_dck.js +0 -65
- package/dist/menu-Cir-22ei.js +0 -108039
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
import { defineComponent as E, useModel as Q, computed as P, resolveComponent as s, createBlock as A, openBlock as d, withCtx as v, createElementBlock as I, createElementVNode as R, Fragment as z, renderList as G, createVNode as u, unref as l, ref as B, createCommentVNode as L, withModifiers as x, watch as J, onMounted as K, renderSlot as X, toDisplayString as D, createTextVNode as Z } from "vue";
|
|
2
|
+
import { useI18n as N, useCoreStore as ee } from "@feedmepos/mf-common";
|
|
3
|
+
import { _ as H } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
4
|
+
import { u as q } from "./priceTier-D4joq_kN.js";
|
|
5
|
+
import { I as le, u as te, H as O, aj as oe } from "./menu-ILWxqJQe.js";
|
|
6
|
+
import { b as ae } from "./app-DvG3mOom.js";
|
|
7
|
+
import { FmButtonVariant as W, useDialog as re, components as ue, FmButtonColorThemeVariant as Y } from "@feedmepos/ui-library";
|
|
8
|
+
import { _ as ne } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
|
|
9
|
+
import { L as C } from "./catalogSetting-DTEHDSAd.js";
|
|
10
|
+
import { L as ie } from "./LinkProductSideSheet-CWNarCEs.js";
|
|
11
|
+
import { c as j } from "./check-C9mY6LiX.js";
|
|
12
|
+
import { c as se } from "./string-DpfFixWH.js";
|
|
13
|
+
const me = /* @__PURE__ */ E({
|
|
14
|
+
__name: "LinkPriceTier",
|
|
15
|
+
props: {
|
|
16
|
+
modelValue: { required: !0 },
|
|
17
|
+
modelModifiers: {}
|
|
18
|
+
},
|
|
19
|
+
emits: ["update:modelValue"],
|
|
20
|
+
setup(y) {
|
|
21
|
+
const { t: S } = N(), t = Q(y, "modelValue"), b = q(), r = P(() => b.priceTiers.value.map((_) => ({
|
|
22
|
+
label: _.key,
|
|
23
|
+
value: _.key
|
|
24
|
+
})));
|
|
25
|
+
return (_, c) => {
|
|
26
|
+
const n = s("FmSelect");
|
|
27
|
+
return d(), A(n, {
|
|
28
|
+
items: r.value,
|
|
29
|
+
"model-value": t.value ?? [],
|
|
30
|
+
multiselect: !0,
|
|
31
|
+
keepSelectionOrder: !0,
|
|
32
|
+
"onUpdate:modelValue": c[0] || (c[0] = (i) => t.value = i)
|
|
33
|
+
}, null, 8, ["items", "model-value"]);
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}), de = {
|
|
37
|
+
class: "flex justify-end"
|
|
38
|
+
}, ce = /* @__PURE__ */ E({
|
|
39
|
+
__name: "PriceTierRuleEditor",
|
|
40
|
+
props: {
|
|
41
|
+
modelValue: {
|
|
42
|
+
required: !0
|
|
43
|
+
},
|
|
44
|
+
modelModifiers: {}
|
|
45
|
+
},
|
|
46
|
+
emits: ["update:modelValue"],
|
|
47
|
+
setup(y) {
|
|
48
|
+
const {
|
|
49
|
+
t: S
|
|
50
|
+
} = N(), t = Q(y, "modelValue"), b = q(), {
|
|
51
|
+
restaurants: r,
|
|
52
|
+
restaurantAttributeSettings: _
|
|
53
|
+
} = ee();
|
|
54
|
+
function c(o) {
|
|
55
|
+
const a = r.value.map((k) => {
|
|
56
|
+
var F;
|
|
57
|
+
return (F = k.customAttributes) == null ? void 0 : F[o];
|
|
58
|
+
}).filter((k) => typeof k == "string" && !!k);
|
|
59
|
+
return [...new Set(a)];
|
|
60
|
+
}
|
|
61
|
+
const n = /* @__PURE__ */ new Set(["string", "number", "date"]), i = P(() => _.value.filter((o) => n.has(o.type)).map((o) => {
|
|
62
|
+
const a = c(o.key);
|
|
63
|
+
return {
|
|
64
|
+
key: o.key,
|
|
65
|
+
type: o.type,
|
|
66
|
+
entity: o.entity,
|
|
67
|
+
values: a
|
|
68
|
+
};
|
|
69
|
+
})), e = {
|
|
70
|
+
logic: "AND",
|
|
71
|
+
rules: []
|
|
72
|
+
};
|
|
73
|
+
function M(o, a) {
|
|
74
|
+
t.value && t.value[o] && (le.isEqual(e, a) ? t.value[o].restaurantAttributes = null : t.value[o].restaurantAttributes = a);
|
|
75
|
+
}
|
|
76
|
+
const g = P(() => b.priceTiers.value.map((o) => ({
|
|
77
|
+
value: o.key,
|
|
78
|
+
label: o.key
|
|
79
|
+
})));
|
|
80
|
+
function f() {
|
|
81
|
+
t.value = [...t.value || [], {
|
|
82
|
+
priceTier: "",
|
|
83
|
+
restaurantAttributes: null
|
|
84
|
+
}];
|
|
85
|
+
}
|
|
86
|
+
function $(o) {
|
|
87
|
+
t.value && t.value.splice(o, 1);
|
|
88
|
+
}
|
|
89
|
+
return (o, a) => {
|
|
90
|
+
const p = s("FmSelect"), k = s("fm-button"), F = s("FmCard"), h = s("FmButton");
|
|
91
|
+
return d(), A(ne, null, {
|
|
92
|
+
default: v(() => [(d(!0), I(z, null, G(t.value, (U, T) => (d(), A(F, {
|
|
93
|
+
key: T,
|
|
94
|
+
class: "p-16 space-y-16",
|
|
95
|
+
variant: "outlined"
|
|
96
|
+
}, {
|
|
97
|
+
default: v(() => [R("div", null, [u(p, {
|
|
98
|
+
label: "Price groups",
|
|
99
|
+
"label-mark": "required",
|
|
100
|
+
items: g.value,
|
|
101
|
+
"model-value": U.priceTier,
|
|
102
|
+
rules: [(V) => !!V || l(S)("menu.common.validation.required_field")],
|
|
103
|
+
"onUpdate:modelValue": (V) => U.priceTier = V
|
|
104
|
+
}, null, 8, ["items", "model-value", "rules", "onUpdate:modelValue"])]), u(H, {
|
|
105
|
+
label: "Restaurant filter"
|
|
106
|
+
}, {
|
|
107
|
+
default: v(() => [u(l(ae), {
|
|
108
|
+
attributes: i.value,
|
|
109
|
+
"model-value": U.restaurantAttributes || e,
|
|
110
|
+
"onUpdate:modelValue": (V) => M(T, V)
|
|
111
|
+
}, null, 8, ["attributes", "model-value", "onUpdate:modelValue"])]),
|
|
112
|
+
_: 2
|
|
113
|
+
}, 1024), R("div", de, [u(k, {
|
|
114
|
+
variant: l(W).Tertiary,
|
|
115
|
+
"prepend-icon": "delete",
|
|
116
|
+
onClick: (V) => $(T)
|
|
117
|
+
}, null, 8, ["variant", "onClick"])])]),
|
|
118
|
+
_: 2
|
|
119
|
+
}, 1024))), 128)), R("div", null, [u(h, {
|
|
120
|
+
label: "Add rule",
|
|
121
|
+
onClick: f
|
|
122
|
+
})])]),
|
|
123
|
+
_: 1
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
}), Ie = /* @__PURE__ */ E({
|
|
128
|
+
__name: "LinkPriceTierSection",
|
|
129
|
+
props: {
|
|
130
|
+
modelValue: {},
|
|
131
|
+
isMainCatalog: {
|
|
132
|
+
type: Boolean
|
|
133
|
+
},
|
|
134
|
+
isV4: {
|
|
135
|
+
type: Boolean
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
emits: ["update:modelValue"],
|
|
139
|
+
setup(y, {
|
|
140
|
+
emit: S
|
|
141
|
+
}) {
|
|
142
|
+
const t = y, b = S, {
|
|
143
|
+
t: r
|
|
144
|
+
} = N(), _ = q(), c = B(t.modelValue.priceTierRules && t.modelValue.priceTierRules.length > 0 ? C.Rules : C.Normal);
|
|
145
|
+
function n(i) {
|
|
146
|
+
b("update:modelValue", {
|
|
147
|
+
...t.modelValue,
|
|
148
|
+
...i
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
return (i, e) => {
|
|
152
|
+
const M = s("fm-radio"), g = s("fm-radio-group");
|
|
153
|
+
return !i.isMainCatalog && i.isV4 && l(_).priceTiers.value.length > 0 ? (d(), A(H, {
|
|
154
|
+
key: 0,
|
|
155
|
+
label: l(r)("menu.price_tier.link_price_tier")
|
|
156
|
+
}, {
|
|
157
|
+
default: v(() => [u(g, {
|
|
158
|
+
"model-value": c.value,
|
|
159
|
+
"onUpdate:modelValue": e[4] || (e[4] = (f) => {
|
|
160
|
+
c.value = f, f === l(C).Normal && n({
|
|
161
|
+
priceTierRules: null
|
|
162
|
+
});
|
|
163
|
+
})
|
|
164
|
+
}, {
|
|
165
|
+
default: v(() => [u(M, {
|
|
166
|
+
value: l(C).Normal,
|
|
167
|
+
label: l(r)("menu.price_tier.link_price_group"),
|
|
168
|
+
sublabel: l(r)("menu.price_tier.link_price_group_description")
|
|
169
|
+
}, null, 8, ["value", "label", "sublabel"]), c.value === l(C).Normal ? (d(), I("div", {
|
|
170
|
+
key: 0,
|
|
171
|
+
onClick: e[1] || (e[1] = x(() => {
|
|
172
|
+
}, ["prevent"])),
|
|
173
|
+
class: "pl-32"
|
|
174
|
+
}, [u(me, {
|
|
175
|
+
"model-value": i.modelValue.usePriceTiers,
|
|
176
|
+
"onUpdate:modelValue": e[0] || (e[0] = (f) => n({
|
|
177
|
+
usePriceTiers: f
|
|
178
|
+
}))
|
|
179
|
+
}, null, 8, ["model-value"])])) : L("", !0), u(M, {
|
|
180
|
+
value: l(C).Rules,
|
|
181
|
+
label: l(r)("menu.price_tier.price_group_rule"),
|
|
182
|
+
sublabel: l(r)("menu.price_tier.price_group_rule_description")
|
|
183
|
+
}, null, 8, ["value", "label", "sublabel"]), c.value === l(C).Rules ? (d(), I("div", {
|
|
184
|
+
key: 1,
|
|
185
|
+
onClick: e[3] || (e[3] = x(() => {
|
|
186
|
+
}, ["prevent"])),
|
|
187
|
+
class: "pl-32"
|
|
188
|
+
}, [u(ce, {
|
|
189
|
+
"model-value": i.modelValue.priceTierRules,
|
|
190
|
+
"onUpdate:modelValue": e[2] || (e[2] = (f) => n({
|
|
191
|
+
priceTierRules: f
|
|
192
|
+
}))
|
|
193
|
+
}, null, 8, ["model-value"])])) : L("", !0)]),
|
|
194
|
+
_: 1
|
|
195
|
+
}, 8, ["model-value"])]),
|
|
196
|
+
_: 1
|
|
197
|
+
}, 8, ["label"])) : L("", !0);
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
}), pe = { class: "space-y-16" }, ve = { class: "ml-32 mt-16 space-y-8" }, fe = {
|
|
201
|
+
key: 0,
|
|
202
|
+
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
203
|
+
}, Re = /* @__PURE__ */ E({
|
|
204
|
+
__name: "GroupMarkupPriceDialog",
|
|
205
|
+
props: {
|
|
206
|
+
modelValue: {},
|
|
207
|
+
items: {},
|
|
208
|
+
categories: {},
|
|
209
|
+
action: {}
|
|
210
|
+
},
|
|
211
|
+
emits: ["update:model-value"],
|
|
212
|
+
setup(y, { emit: S }) {
|
|
213
|
+
const t = y, b = te();
|
|
214
|
+
re();
|
|
215
|
+
const { t: r } = N(), _ = S, c = P(() => t.action === "add" ? r("menu.markup.dialog.title.add") : r("menu.markup.dialog.title.update")), n = B(!1), i = (a) => {
|
|
216
|
+
j.isBoolean(a) ? n.value = a : n.value = !n.value;
|
|
217
|
+
}, e = B(
|
|
218
|
+
t.modelValue ? O(t.modelValue) : {
|
|
219
|
+
percentage: 0,
|
|
220
|
+
includeItems: null
|
|
221
|
+
}
|
|
222
|
+
);
|
|
223
|
+
J(
|
|
224
|
+
() => n.value,
|
|
225
|
+
(a) => {
|
|
226
|
+
a && (e.value = t.modelValue ? O(t.modelValue) : {
|
|
227
|
+
percentage: 0,
|
|
228
|
+
includeItems: null
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
), P(
|
|
232
|
+
() => oe(b.variants, t.categories, t.items)
|
|
233
|
+
);
|
|
234
|
+
function M(a) {
|
|
235
|
+
e.value = {
|
|
236
|
+
...e.value,
|
|
237
|
+
includeItems: a
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
const g = B(
|
|
241
|
+
0
|
|
242
|
+
/* ALL */
|
|
243
|
+
);
|
|
244
|
+
function f(a) {
|
|
245
|
+
g.value = a, e.value = {
|
|
246
|
+
...e.value,
|
|
247
|
+
includeItems: a === 0 ? null : []
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
const $ = P(() => [
|
|
251
|
+
{
|
|
252
|
+
label: r("menu.markup.dialog.options.all"),
|
|
253
|
+
value: 0
|
|
254
|
+
/* ALL */
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
label: r("menu.markup.dialog.options.custom"),
|
|
258
|
+
value: 1
|
|
259
|
+
/* CUSTOM */
|
|
260
|
+
}
|
|
261
|
+
]);
|
|
262
|
+
async function o() {
|
|
263
|
+
_("update:model-value", e.value), i(!1);
|
|
264
|
+
}
|
|
265
|
+
return K(() => {
|
|
266
|
+
g.value = e.value && e.value.includeItems === null ? 0 : 1;
|
|
267
|
+
}), (a, p) => {
|
|
268
|
+
const k = s("fm-icon"), F = s("fm-stepper-field"), h = s("fm-radio"), U = s("fm-radio-group"), T = s("fm-button"), V = s("fm-dialog");
|
|
269
|
+
return d(), I(z, null, [
|
|
270
|
+
X(a.$slots, "default", { trigger: i }),
|
|
271
|
+
u(V, {
|
|
272
|
+
modelValue: n.value,
|
|
273
|
+
"onUpdate:modelValue": p[3] || (p[3] = (w) => n.value = w),
|
|
274
|
+
"is-component": l(ue).FmForm,
|
|
275
|
+
"is-component-props": {
|
|
276
|
+
onValidationSuccess: o
|
|
277
|
+
}
|
|
278
|
+
}, {
|
|
279
|
+
"dialog-header": v(() => [
|
|
280
|
+
Z(D(c.value), 1)
|
|
281
|
+
]),
|
|
282
|
+
"dialog-footer": v(() => [
|
|
283
|
+
u(T, {
|
|
284
|
+
class: "sm:w-full xs:w-full ml-auto",
|
|
285
|
+
label: "Cancel",
|
|
286
|
+
variant: "tertiary",
|
|
287
|
+
onClick: p[2] || (p[2] = (w) => i(!1))
|
|
288
|
+
}),
|
|
289
|
+
u(T, {
|
|
290
|
+
label: l(se)(a.action),
|
|
291
|
+
class: "sm:w-full xs:w-full",
|
|
292
|
+
size: "md",
|
|
293
|
+
type: "submit",
|
|
294
|
+
variant: "primary"
|
|
295
|
+
}, null, 8, ["label"])
|
|
296
|
+
]),
|
|
297
|
+
default: v(() => {
|
|
298
|
+
var w;
|
|
299
|
+
return [
|
|
300
|
+
R("div", pe, [
|
|
301
|
+
u(F, {
|
|
302
|
+
modelValue: e.value.percentage,
|
|
303
|
+
"onUpdate:modelValue": p[0] || (p[0] = (m) => e.value.percentage = m),
|
|
304
|
+
decimal: 0,
|
|
305
|
+
max: 100,
|
|
306
|
+
min: 0,
|
|
307
|
+
rules: [
|
|
308
|
+
(m) => l(j).isSet(m) && m >= 0 || l(r)("menu.markup.dialog.fields.percentage.required")
|
|
309
|
+
],
|
|
310
|
+
label: l(r)("menu.markup.dialog.fields.percentage.label"),
|
|
311
|
+
placeholder: l(r)("menu.markup.dialog.fields.percentage.placeholder")
|
|
312
|
+
}, {
|
|
313
|
+
prepend: v(() => [
|
|
314
|
+
u(k, { name: "percent" })
|
|
315
|
+
]),
|
|
316
|
+
_: 1
|
|
317
|
+
}, 8, ["modelValue", "rules", "label", "placeholder"]),
|
|
318
|
+
R("div", null, [
|
|
319
|
+
u(U, {
|
|
320
|
+
modelValue: g.value,
|
|
321
|
+
"onUpdate:modelValue": [
|
|
322
|
+
p[1] || (p[1] = (m) => g.value = m),
|
|
323
|
+
f
|
|
324
|
+
],
|
|
325
|
+
class: "space-y-8"
|
|
326
|
+
}, {
|
|
327
|
+
default: v(() => [
|
|
328
|
+
(d(!0), I(z, null, G($.value, (m) => (d(), A(h, {
|
|
329
|
+
key: m.value,
|
|
330
|
+
label: m.label,
|
|
331
|
+
value: m.value
|
|
332
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
333
|
+
]),
|
|
334
|
+
_: 1
|
|
335
|
+
}, 8, ["modelValue"]),
|
|
336
|
+
R("div", ve, [
|
|
337
|
+
u(ie, {
|
|
338
|
+
title: "Link products",
|
|
339
|
+
"categorized-items": l(b).categorizedItems,
|
|
340
|
+
"initial-value": e.value.includeItems || [],
|
|
341
|
+
"show-variant": !1,
|
|
342
|
+
onSubmit: M
|
|
343
|
+
}, {
|
|
344
|
+
default: v(({ trigger: m }) => [
|
|
345
|
+
g.value === 1 ? (d(), A(T, {
|
|
346
|
+
key: 0,
|
|
347
|
+
"text-color": l(Y).ColorPrimary,
|
|
348
|
+
"border-color": l(Y).ColorPrimary,
|
|
349
|
+
variant: l(W).Secondary,
|
|
350
|
+
label: l(r)("menu.markup.dialog.products.link"),
|
|
351
|
+
"prepend-icon": "link",
|
|
352
|
+
onClick: m
|
|
353
|
+
}, null, 8, ["text-color", "border-color", "variant", "label", "onClick"])) : L("", !0)
|
|
354
|
+
]),
|
|
355
|
+
_: 1
|
|
356
|
+
}, 8, ["categorized-items", "initial-value"]),
|
|
357
|
+
(w = e.value.includeItems) != null && w.length ? (d(), I("p", fe, D(l(r)("menu.markup.dialog.products.count", { count: e.value.includeItems.length })), 1)) : L("", !0)
|
|
358
|
+
])
|
|
359
|
+
])
|
|
360
|
+
])
|
|
361
|
+
];
|
|
362
|
+
}),
|
|
363
|
+
_: 1
|
|
364
|
+
}, 8, ["modelValue", "is-component", "is-component-props"])
|
|
365
|
+
], 64);
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
export {
|
|
370
|
+
Re as _,
|
|
371
|
+
Ie as a
|
|
372
|
+
};
|