@feedmepos/mf-menu 0.31.33-beta.7 → 0.31.33-beta.9
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-CZEABsQj.js → App-WQChaTIO.js} +6 -6
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-D_ak48OL.js → ApplyProduct.vue_vue_type_script_setup_true_lang-t1K3plXk.js} +20 -20
- package/dist/{Catalog-DS7IAwCI.js → Catalog-BX_1g0ru.js} +6 -6
- package/dist/{Category-Bi3vbTgq.js → Category-C6BSLYTZ.js} +19 -19
- package/dist/{Category-DKes4JxR.js → Category-COTd0h8i.js} +14 -14
- package/dist/{CookingGuide-Cl-JvfNC.js → CookingGuide-DTTGVOtZ.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-C01PGALf.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-UQQSF2Fv.js} +1 -1
- package/dist/{Group-CDmNdtn6.js → Group-BKhYr_XK.js} +3 -3
- package/dist/{Group-CPd33rHj.js → Group-tv4NRLFA.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-DLhPMn7r.js → Group.vue_vue_type_script_setup_true_lang-Cql0J4TN.js} +38 -36
- package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DIUX09XZ.js +367 -0
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DZgnCsAY.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-azTd9oJY.js} +12597 -12946
- package/dist/{Ingredient-C5iKMG5S.js → Ingredient-EhrV45jG.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CYb8p8df.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DNLOCn6Z.js} +2 -2
- package/dist/LinkProductSideSheet-CLUkYMJx.js +297 -0
- package/dist/{MenuSetting-DeLFW5Q0.js → MenuSetting-DMYnqQqF.js} +4 -4
- package/dist/{PrintRoute-BptA-_Yt.js → PrintRoute-Ct0vYBI0.js} +89 -88
- package/dist/{Product-D5WYsf9P.js → Product-CVOGBfGP.js} +1 -1
- package/dist/Product.vue_vue_type_script_setup_true_lang-3qo4KHwM.js +1578 -0
- package/dist/{ProductInternalTools-_ml77R5u.js → ProductInternalTools-BD4pbpTq.js} +5 -5
- package/dist/Products-DiqJJi0G.js +283 -0
- package/dist/{Publish-BB_8J3PJ.js → Publish-DNW7kAyt.js} +3 -3
- package/dist/{Recipe-Dc7mD-Mu.js → Recipe-DB59Oilo.js} +4 -4
- package/dist/{Scheduler-H2mx0WJm.js → Scheduler-CdvXOmD9.js} +3 -3
- package/dist/{ServingSequence-GYdFh7RK.js → ServingSequence-BJidBanx.js} +3 -3
- package/dist/{Setting-B_-Bv8NR.js → Setting-CT0-ErCV.js} +5 -5
- package/dist/{Subcategory-CHcCMqcS.js → Subcategory-Qss-q16J.js} +4 -4
- package/dist/{Takeaway-BeDox-sK.js → Takeaway-Cco68UWM.js} +1 -1
- package/dist/{Takeaway-BaDz1y8l.js → Takeaway-DJZrAOhK.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CwWyzrey.js → Takeaway.vue_vue_type_script_setup_true_lang-_UIxFm40.js} +5 -5
- package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-DQ8A_b8N.js +431 -0
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-C-GQNgOs.js +5990 -0
- package/dist/{Unit-D4uSc8lg.js → Unit-jNMtjCqg.js} +2 -2
- package/dist/{Variant-MVe8LhBc.js → Variant-vgkCtn6k.js} +3 -3
- package/dist/_id_-VWD7FuB8.js +202 -0
- package/dist/{app-BbIBgy7D.js → app-DCfZrw5q.js} +1 -1
- package/dist/{app-B0ogzdm0.js → app-FT-17pdN.js} +24 -24
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/components/feature/RestaurantAttributesSelector.vue.d.ts +33 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/catalog.d.ts +2 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +3 -1
- package/dist/apps/mf-menu/src/composable/linkProducts.d.ts +1276 -0
- package/dist/apps/mf-menu/src/types/linkProducts.d.ts +21 -0
- package/dist/apps/mf-menu/src/views/PrintRoute/PrintDepartmentDialog.vue.d.ts +5 -3
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-DepVvcGX.js → linked-status-CgdauMC-.js} +8 -8
- package/dist/assets/{override-menu-Cb7cvOj9.js → override-menu-BjjuzKpf.js} +8 -8
- package/dist/assets/{validate-menu-Hc7m9hHC.js → validate-menu-C0NftO2y.js} +8 -8
- package/dist/{catalog-_R7Bi_aW.js → catalog-Cu3xX3Ij.js} +1 -1
- package/dist/{catalogSetting-Bnr55VnE.js → catalogSetting-MeAAWjBX.js} +1 -1
- package/dist/{category-C0kozMAs.js → category-D5yCmLTw.js} +1 -1
- package/dist/{currency-DFA-7C9k.js → currency-DQtVpVAB.js} +1 -1
- package/dist/{dayjs.min-BzOsbxFW.js → dayjs.min-B17nF95f.js} +1 -1
- package/dist/{index-asthzgeW.js → index-1CsXkVcJ.js} +1 -1
- package/dist/{index-y3TkmTDS.js → index-B6mBc4vZ.js} +3 -3
- package/dist/{index-LrL2OIsF.js → index-CAsg0n3_.js} +3 -3
- package/dist/index-D7yR1j9C.js +215 -0
- package/dist/{item-BHFMgTjL.js → item-BXuPBp61.js} +196 -194
- package/dist/{jszip.min-BYCWga7V.js → jszip.min-Dzj1bdkj.js} +245 -245
- package/dist/{menu-UNNs3oeu.js → menu-CpOCeOvo.js} +1201 -1192
- package/dist/{menu-7YBc_V0y.js → menu-CzQXSBCu.js} +1 -1
- package/dist/menuV2-Cw9jPRug.js +707 -0
- package/dist/mf-menu.css +1 -1
- package/dist/{priceTier-I7O5kuz-.js → priceTier-DmDrpMES.js} +1 -1
- package/dist/{scheduler-c0cSXqeD.js → scheduler-f8MIyGun.js} +16 -17
- package/dist/subcategory-C3sMuoGj.js +148 -0
- package/dist/{toExcel-C8d-m0RH.js → toExcel-BoLqUKHC.js} +2 -2
- package/dist/{unit-B0Bl56gY.js → unit-CAKmah7M.js} +5 -4
- package/package.json +3 -3
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +0 -26
- package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DW1ET8Ys.js +0 -372
- package/dist/LinkProductSideSheet-QUllj_xC.js +0 -112
- package/dist/Product.vue_vue_type_script_setup_true_lang-TwmxZaik.js +0 -1644
- package/dist/Products-BA-G2Yya.js +0 -270
- package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-DzQ8_6Bi.js +0 -71
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Dp2eaieu.js +0 -6149
- package/dist/_id_-CoMVzmjC.js +0 -178
- package/dist/apps/mf-menu/src/components/feature/AttributesSelector.vue.d.ts +0 -2
- package/dist/apps/mf-menu/src/components/feature/LinkProduct/LinkProductSideSheet.vue.d.ts +0 -70
- package/dist/apps/mf-menu/src/components/feature/LinkProduct/LinkProductUnifiedSideSheet.vue.d.ts +0 -12
- package/dist/apps/mf-menu/src/composable/customAttributes.d.ts +0 -88
- package/dist/customAttributes-C1FljtXt.js +0 -33
- package/dist/index-Ce4v8o7D.js +0 -106
- package/dist/subcategory-YHkkwrLj.js +0 -817
- /package/dist/{app-DvG3mOom.js → LinkProductSideSheet.vue_vue_type_style_index_0_scoped_97fa9d58_lang-DvG3mOom.js} +0 -0
- /package/dist/{apps/mf-menu/src/components → packages/shared/src/components/info}/CustomAttributeChip.vue.d.ts +0 -0
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
import { defineComponent as B, useModel as G, computed as A, resolveComponent as p, createBlock as S, openBlock as v, ref as I, watch as H, withCtx as _, createElementBlock as C, createElementVNode as M, Fragment as z, renderList as Y, createVNode as u, unref as e, createCommentVNode as U, withModifiers as q, onMounted as Z, renderSlot as ee, toDisplayString as D, createTextVNode as le } from "vue";
|
|
2
|
+
import { useI18n as L, EMPTY_RULE as x, isEmptyMongoQuery as te, isEmptyRule as h, useCustomAttributes as ae, useCoreStore as oe } from "@feedmepos/mf-common";
|
|
3
|
+
import { a as J, L as re } from "./LinkProductSideSheet-CLUkYMJx.js";
|
|
4
|
+
import { u as w } from "./priceTier-DmDrpMES.js";
|
|
5
|
+
import { x as ue, N as ne, b as ie } from "./LinkProductSideSheet.vue_vue_type_style_index_0_scoped_97fa9d58_lang-DvG3mOom.js";
|
|
6
|
+
import { FmButtonVariant as K, useDialog as se, components as me, FmButtonColorThemeVariant as j } from "@feedmepos/ui-library";
|
|
7
|
+
import { _ as de } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
|
|
8
|
+
import { L as y } from "./catalogSetting-MeAAWjBX.js";
|
|
9
|
+
import { c as O } from "./check-C9mY6LiX.js";
|
|
10
|
+
import { u as pe, H as Q, aj as ce } from "./menu-CpOCeOvo.js";
|
|
11
|
+
import { c as ve } from "./string-DpfFixWH.js";
|
|
12
|
+
const fe = /* @__PURE__ */ B({
|
|
13
|
+
__name: "LinkPriceTier",
|
|
14
|
+
props: {
|
|
15
|
+
modelValue: { required: !0 },
|
|
16
|
+
modelModifiers: {}
|
|
17
|
+
},
|
|
18
|
+
emits: ["update:modelValue"],
|
|
19
|
+
setup(k) {
|
|
20
|
+
const { t: T } = L(), o = G(k, "modelValue"), r = w(), a = A(() => r.priceTiers.value.map((b) => ({
|
|
21
|
+
label: b.key,
|
|
22
|
+
value: b.key
|
|
23
|
+
})));
|
|
24
|
+
return (b, f) => {
|
|
25
|
+
const i = p("FmSelect");
|
|
26
|
+
return v(), S(i, {
|
|
27
|
+
items: a.value,
|
|
28
|
+
"model-value": o.value ?? [],
|
|
29
|
+
multiselect: !0,
|
|
30
|
+
keepSelectionOrder: !0,
|
|
31
|
+
"onUpdate:modelValue": f[0] || (f[0] = (s) => o.value = s)
|
|
32
|
+
}, null, 8, ["items", "model-value"]);
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}), _e = {
|
|
36
|
+
class: "flex justify-end"
|
|
37
|
+
}, be = /* @__PURE__ */ B({
|
|
38
|
+
__name: "PriceTierRuleEditor",
|
|
39
|
+
props: {
|
|
40
|
+
modelValue: {
|
|
41
|
+
required: !0
|
|
42
|
+
},
|
|
43
|
+
modelModifiers: {}
|
|
44
|
+
},
|
|
45
|
+
emits: ["update:modelValue"],
|
|
46
|
+
setup(k) {
|
|
47
|
+
var V;
|
|
48
|
+
const {
|
|
49
|
+
t: T
|
|
50
|
+
} = L(), o = G(k, "modelValue"), r = I((V = o.value) == null ? void 0 : V.map((t) => ({
|
|
51
|
+
...t,
|
|
52
|
+
restaurantAttributes: te(t.restaurantAttributes) ? x : ue.build(t.restaurantAttributes)
|
|
53
|
+
})));
|
|
54
|
+
H(r, (t) => {
|
|
55
|
+
o.value = t == null ? void 0 : t.map((n) => ({
|
|
56
|
+
priceTier: n.priceTier,
|
|
57
|
+
restaurantAttributes: h(n.restaurantAttributes) ? null : ne.build(n.restaurantAttributes)
|
|
58
|
+
}));
|
|
59
|
+
}, {
|
|
60
|
+
deep: !0
|
|
61
|
+
});
|
|
62
|
+
const a = w(), {
|
|
63
|
+
attributes: b
|
|
64
|
+
} = ae({
|
|
65
|
+
valueSource: oe().restaurants,
|
|
66
|
+
entity: "restaurant"
|
|
67
|
+
});
|
|
68
|
+
function f(t, n) {
|
|
69
|
+
r.value && r.value[t] && (h(n) ? r.value[t].restaurantAttributes = x : r.value[t].restaurantAttributes = n);
|
|
70
|
+
}
|
|
71
|
+
const i = A(() => a.priceTiers.value.map((t) => ({
|
|
72
|
+
value: t.key,
|
|
73
|
+
label: t.key
|
|
74
|
+
})));
|
|
75
|
+
function s() {
|
|
76
|
+
r.value = [...r.value || [], {
|
|
77
|
+
priceTier: "",
|
|
78
|
+
restaurantAttributes: x
|
|
79
|
+
}];
|
|
80
|
+
}
|
|
81
|
+
function l(t) {
|
|
82
|
+
r.value && r.value.splice(t, 1);
|
|
83
|
+
}
|
|
84
|
+
return (t, n) => {
|
|
85
|
+
const N = p("FmSelect"), $ = p("fm-button"), m = p("FmCard"), c = p("FmButton");
|
|
86
|
+
return v(), S(de, null, {
|
|
87
|
+
default: _(() => [(v(!0), C(z, null, Y(r.value, (F, P) => (v(), S(m, {
|
|
88
|
+
key: P,
|
|
89
|
+
class: "p-16 space-y-16",
|
|
90
|
+
variant: "outlined"
|
|
91
|
+
}, {
|
|
92
|
+
default: _(() => [M("div", null, [u(N, {
|
|
93
|
+
label: "Price groups",
|
|
94
|
+
"label-mark": "required",
|
|
95
|
+
items: i.value,
|
|
96
|
+
"model-value": F.priceTier,
|
|
97
|
+
rules: [(g) => !!g || e(T)("menu.common.validation.required_field")],
|
|
98
|
+
"onUpdate:modelValue": (g) => F.priceTier = g
|
|
99
|
+
}, null, 8, ["items", "model-value", "rules", "onUpdate:modelValue"])]), u(J, {
|
|
100
|
+
label: "Restaurant filter"
|
|
101
|
+
}, {
|
|
102
|
+
default: _(() => [u(e(ie), {
|
|
103
|
+
attributes: e(b),
|
|
104
|
+
"model-value": F.restaurantAttributes,
|
|
105
|
+
"onUpdate:modelValue": (g) => f(P, g)
|
|
106
|
+
}, null, 8, ["attributes", "model-value", "onUpdate:modelValue"])]),
|
|
107
|
+
_: 2
|
|
108
|
+
}, 1024), M("div", _e, [u($, {
|
|
109
|
+
variant: e(K).Tertiary,
|
|
110
|
+
"prepend-icon": "delete",
|
|
111
|
+
onClick: (g) => l(P)
|
|
112
|
+
}, null, 8, ["variant", "onClick"])])]),
|
|
113
|
+
_: 2
|
|
114
|
+
}, 1024))), 128)), M("div", null, [u(c, {
|
|
115
|
+
label: "Add rule",
|
|
116
|
+
onClick: s
|
|
117
|
+
})])]),
|
|
118
|
+
_: 1
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
}), Be = /* @__PURE__ */ B({
|
|
123
|
+
__name: "LinkPriceTierSection",
|
|
124
|
+
props: {
|
|
125
|
+
modelValue: {},
|
|
126
|
+
isMainCatalog: {
|
|
127
|
+
type: Boolean
|
|
128
|
+
},
|
|
129
|
+
isV4: {
|
|
130
|
+
type: Boolean
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
emits: ["update:modelValue"],
|
|
134
|
+
setup(k, {
|
|
135
|
+
emit: T
|
|
136
|
+
}) {
|
|
137
|
+
const o = k, r = T, {
|
|
138
|
+
t: a
|
|
139
|
+
} = L(), b = w(), f = I(o.modelValue.priceTierRules && o.modelValue.priceTierRules.length > 0 ? y.Rules : y.Normal);
|
|
140
|
+
function i(s) {
|
|
141
|
+
r("update:modelValue", {
|
|
142
|
+
...o.modelValue,
|
|
143
|
+
...s
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
return (s, l) => {
|
|
147
|
+
const V = p("fm-radio"), t = p("fm-radio-group");
|
|
148
|
+
return !s.isMainCatalog && s.isV4 && e(b).priceTiers.value.length > 0 ? (v(), S(J, {
|
|
149
|
+
key: 0,
|
|
150
|
+
label: e(a)("menu.price_tier.link_price_tier")
|
|
151
|
+
}, {
|
|
152
|
+
default: _(() => [u(t, {
|
|
153
|
+
"model-value": f.value,
|
|
154
|
+
"onUpdate:modelValue": l[4] || (l[4] = (n) => {
|
|
155
|
+
f.value = n, n === e(y).Normal && i({
|
|
156
|
+
priceTierRules: null
|
|
157
|
+
});
|
|
158
|
+
})
|
|
159
|
+
}, {
|
|
160
|
+
default: _(() => [u(V, {
|
|
161
|
+
value: e(y).Normal,
|
|
162
|
+
label: e(a)("menu.price_tier.link_price_group"),
|
|
163
|
+
sublabel: e(a)("menu.price_tier.link_price_group_description")
|
|
164
|
+
}, null, 8, ["value", "label", "sublabel"]), f.value === e(y).Normal ? (v(), C("div", {
|
|
165
|
+
key: 0,
|
|
166
|
+
onClick: l[1] || (l[1] = q(() => {
|
|
167
|
+
}, ["prevent"])),
|
|
168
|
+
class: "pl-32"
|
|
169
|
+
}, [u(fe, {
|
|
170
|
+
"model-value": s.modelValue.usePriceTiers,
|
|
171
|
+
"onUpdate:modelValue": l[0] || (l[0] = (n) => i({
|
|
172
|
+
usePriceTiers: n
|
|
173
|
+
}))
|
|
174
|
+
}, null, 8, ["model-value"])])) : U("", !0), u(V, {
|
|
175
|
+
value: e(y).Rules,
|
|
176
|
+
label: e(a)("menu.price_tier.price_group_rule"),
|
|
177
|
+
sublabel: e(a)("menu.price_tier.price_group_rule_description")
|
|
178
|
+
}, null, 8, ["value", "label", "sublabel"]), f.value === e(y).Rules ? (v(), C("div", {
|
|
179
|
+
key: 1,
|
|
180
|
+
onClick: l[3] || (l[3] = q(() => {
|
|
181
|
+
}, ["prevent"])),
|
|
182
|
+
class: "pl-32"
|
|
183
|
+
}, [u(be, {
|
|
184
|
+
"model-value": s.modelValue.priceTierRules,
|
|
185
|
+
"onUpdate:modelValue": l[2] || (l[2] = (n) => i({
|
|
186
|
+
priceTierRules: n
|
|
187
|
+
}))
|
|
188
|
+
}, null, 8, ["model-value"])])) : U("", !0)]),
|
|
189
|
+
_: 1
|
|
190
|
+
}, 8, ["model-value"])]),
|
|
191
|
+
_: 1
|
|
192
|
+
}, 8, ["label"])) : U("", !0);
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
}), ge = { class: "space-y-16" }, ke = { class: "ml-32 mt-16 space-y-8" }, Ve = {
|
|
196
|
+
key: 0,
|
|
197
|
+
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
198
|
+
}, Le = /* @__PURE__ */ B({
|
|
199
|
+
__name: "GroupMarkupPriceDialog",
|
|
200
|
+
props: {
|
|
201
|
+
modelValue: {},
|
|
202
|
+
items: {},
|
|
203
|
+
categories: {},
|
|
204
|
+
action: {}
|
|
205
|
+
},
|
|
206
|
+
emits: ["update:model-value"],
|
|
207
|
+
setup(k, { emit: T }) {
|
|
208
|
+
const o = k, r = pe();
|
|
209
|
+
se();
|
|
210
|
+
const { t: a } = L(), b = T, f = A(() => o.action === "add" ? a("menu.markup.dialog.title.add") : a("menu.markup.dialog.title.update")), i = I(!1), s = (m) => {
|
|
211
|
+
O.isBoolean(m) ? i.value = m : i.value = !i.value;
|
|
212
|
+
}, l = I(
|
|
213
|
+
o.modelValue ? Q(o.modelValue) : {
|
|
214
|
+
percentage: 0,
|
|
215
|
+
includeItems: null
|
|
216
|
+
}
|
|
217
|
+
);
|
|
218
|
+
H(
|
|
219
|
+
() => i.value,
|
|
220
|
+
(m) => {
|
|
221
|
+
m && (l.value = o.modelValue ? Q(o.modelValue) : {
|
|
222
|
+
percentage: 0,
|
|
223
|
+
includeItems: null
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
), A(
|
|
227
|
+
() => ce(r.variants, o.categories, o.items)
|
|
228
|
+
);
|
|
229
|
+
function V(m) {
|
|
230
|
+
l.value = {
|
|
231
|
+
...l.value,
|
|
232
|
+
includeItems: m
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
const t = I(
|
|
236
|
+
0
|
|
237
|
+
/* ALL */
|
|
238
|
+
);
|
|
239
|
+
function n(m) {
|
|
240
|
+
t.value = m, l.value = {
|
|
241
|
+
...l.value,
|
|
242
|
+
includeItems: m === 0 ? null : []
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
const N = A(() => [
|
|
246
|
+
{
|
|
247
|
+
label: a("menu.markup.dialog.options.all"),
|
|
248
|
+
value: 0
|
|
249
|
+
/* ALL */
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
label: a("menu.markup.dialog.options.custom"),
|
|
253
|
+
value: 1
|
|
254
|
+
/* CUSTOM */
|
|
255
|
+
}
|
|
256
|
+
]);
|
|
257
|
+
async function $() {
|
|
258
|
+
b("update:model-value", l.value), s(!1);
|
|
259
|
+
}
|
|
260
|
+
return Z(() => {
|
|
261
|
+
t.value = l.value && l.value.includeItems === null ? 0 : 1;
|
|
262
|
+
}), (m, c) => {
|
|
263
|
+
const F = p("fm-icon"), P = p("fm-stepper-field"), g = p("fm-radio"), W = p("fm-radio-group"), E = p("fm-button"), X = p("fm-dialog");
|
|
264
|
+
return v(), C(z, null, [
|
|
265
|
+
ee(m.$slots, "default", { trigger: s }),
|
|
266
|
+
u(X, {
|
|
267
|
+
modelValue: i.value,
|
|
268
|
+
"onUpdate:modelValue": c[4] || (c[4] = (R) => i.value = R),
|
|
269
|
+
"is-component": e(me).FmForm,
|
|
270
|
+
"is-component-props": {
|
|
271
|
+
onValidationSuccess: $
|
|
272
|
+
}
|
|
273
|
+
}, {
|
|
274
|
+
"dialog-header": _(() => [
|
|
275
|
+
le(D(f.value), 1)
|
|
276
|
+
]),
|
|
277
|
+
"dialog-footer": _(() => [
|
|
278
|
+
u(E, {
|
|
279
|
+
class: "sm:w-full xs:w-full ml-auto",
|
|
280
|
+
label: "Cancel",
|
|
281
|
+
variant: "tertiary",
|
|
282
|
+
onClick: c[3] || (c[3] = (R) => s(!1))
|
|
283
|
+
}),
|
|
284
|
+
u(E, {
|
|
285
|
+
label: e(ve)(m.action),
|
|
286
|
+
class: "sm:w-full xs:w-full",
|
|
287
|
+
size: "md",
|
|
288
|
+
type: "submit",
|
|
289
|
+
variant: "primary"
|
|
290
|
+
}, null, 8, ["label"])
|
|
291
|
+
]),
|
|
292
|
+
default: _(() => {
|
|
293
|
+
var R;
|
|
294
|
+
return [
|
|
295
|
+
M("div", ge, [
|
|
296
|
+
u(P, {
|
|
297
|
+
modelValue: l.value.percentage,
|
|
298
|
+
"onUpdate:modelValue": c[0] || (c[0] = (d) => l.value.percentage = d),
|
|
299
|
+
decimal: 0,
|
|
300
|
+
max: 100,
|
|
301
|
+
min: 0,
|
|
302
|
+
rules: [
|
|
303
|
+
(d) => e(O).isSet(d) && d >= 0 || e(a)("menu.markup.dialog.fields.percentage.required")
|
|
304
|
+
],
|
|
305
|
+
label: e(a)("menu.markup.dialog.fields.percentage.label"),
|
|
306
|
+
placeholder: e(a)("menu.markup.dialog.fields.percentage.placeholder")
|
|
307
|
+
}, {
|
|
308
|
+
prepend: _(() => [
|
|
309
|
+
u(F, { name: "percent" })
|
|
310
|
+
]),
|
|
311
|
+
_: 1
|
|
312
|
+
}, 8, ["modelValue", "rules", "label", "placeholder"]),
|
|
313
|
+
M("div", null, [
|
|
314
|
+
u(W, {
|
|
315
|
+
modelValue: t.value,
|
|
316
|
+
"onUpdate:modelValue": [
|
|
317
|
+
c[1] || (c[1] = (d) => t.value = d),
|
|
318
|
+
n
|
|
319
|
+
],
|
|
320
|
+
class: "space-y-8"
|
|
321
|
+
}, {
|
|
322
|
+
default: _(() => [
|
|
323
|
+
(v(!0), C(z, null, Y(N.value, (d) => (v(), S(g, {
|
|
324
|
+
key: d.value,
|
|
325
|
+
label: d.label,
|
|
326
|
+
value: d.value
|
|
327
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
328
|
+
]),
|
|
329
|
+
_: 1
|
|
330
|
+
}, 8, ["modelValue"]),
|
|
331
|
+
M("div", ke, [
|
|
332
|
+
u(re, {
|
|
333
|
+
title: "Link products",
|
|
334
|
+
"categorized-items": e(r).categorizedItems,
|
|
335
|
+
"initial-value": l.value.includeItems || [],
|
|
336
|
+
"show-variant": !1,
|
|
337
|
+
onSubmit: c[2] || (c[2] = ({ items: d }) => V(d))
|
|
338
|
+
}, {
|
|
339
|
+
default: _(({ trigger: d }) => [
|
|
340
|
+
t.value === 1 ? (v(), S(E, {
|
|
341
|
+
key: 0,
|
|
342
|
+
"text-color": e(j).ColorPrimary,
|
|
343
|
+
"border-color": e(j).ColorPrimary,
|
|
344
|
+
variant: e(K).Secondary,
|
|
345
|
+
label: e(a)("menu.markup.dialog.products.link"),
|
|
346
|
+
"prepend-icon": "link",
|
|
347
|
+
onClick: d
|
|
348
|
+
}, null, 8, ["text-color", "border-color", "variant", "label", "onClick"])) : U("", !0)
|
|
349
|
+
]),
|
|
350
|
+
_: 1
|
|
351
|
+
}, 8, ["categorized-items", "initial-value"]),
|
|
352
|
+
(R = l.value.includeItems) != null && R.length ? (v(), C("p", Ve, D(e(a)("menu.markup.dialog.products.count", { count: l.value.includeItems.length })), 1)) : U("", !0)
|
|
353
|
+
])
|
|
354
|
+
])
|
|
355
|
+
])
|
|
356
|
+
];
|
|
357
|
+
}),
|
|
358
|
+
_: 1
|
|
359
|
+
}, 8, ["modelValue", "is-component", "is-component-props"])
|
|
360
|
+
], 64);
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
});
|
|
364
|
+
export {
|
|
365
|
+
Le as _,
|
|
366
|
+
Be as a
|
|
367
|
+
};
|