@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
|
@@ -1,372 +0,0 @@
|
|
|
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-I7O5kuz-.js";
|
|
5
|
-
import { I as le, u as te, H as O, aj as oe } from "./menu-UNNs3oeu.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-Bnr55VnE.js";
|
|
10
|
-
import { L as ie } from "./LinkProductSideSheet-QUllj_xC.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
|
-
};
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { defineComponent as S, ref as V, computed as I, watch as z, resolveComponent as b, createElementBlock as F, openBlock as w, Fragment as O, renderSlot as A, createVNode as r, unref as n, withCtx as f, createElementVNode as y, createBlock as D, createCommentVNode as E, toDisplayString as L } from "vue";
|
|
2
|
-
import { H as _, I as N } from "./menu-UNNs3oeu.js";
|
|
3
|
-
import { useI18n as j, ItemSelector as P } from "@feedmepos/mf-common";
|
|
4
|
-
import { components as U, FmButtonVariant as q } from "@feedmepos/ui-library";
|
|
5
|
-
import { u as H } from "./discardConfirm-BHni0LNu.js";
|
|
6
|
-
import { c as M } from "./check-C9mY6LiX.js";
|
|
7
|
-
/* empty css */
|
|
8
|
-
const T = (i, u) => {
|
|
9
|
-
const s = i.__vccOpts || i;
|
|
10
|
-
for (const [c, t] of u)
|
|
11
|
-
s[c] = t;
|
|
12
|
-
return s;
|
|
13
|
-
}, $ = { class: "fm-typo-en-title-md-600 mr-auto" }, G = { class: "flex gap-8 items-center justify-start" }, J = /* @__PURE__ */ S({
|
|
14
|
-
__name: "LinkProductSideSheet",
|
|
15
|
-
props: {
|
|
16
|
-
initialValue: { default: () => [] },
|
|
17
|
-
categorizedItems: { default: () => [] },
|
|
18
|
-
selectVariant: { type: Boolean, default: !1 },
|
|
19
|
-
showVariant: { type: Boolean, default: !1 },
|
|
20
|
-
showAddon: { type: Boolean, default: !0 },
|
|
21
|
-
title: { default: void 0 },
|
|
22
|
-
useCloseBtn: { type: Boolean }
|
|
23
|
-
},
|
|
24
|
-
emits: ["submit"],
|
|
25
|
-
setup(i, { emit: u }) {
|
|
26
|
-
const s = i, c = u, t = V(!1), v = (e) => {
|
|
27
|
-
M.isBoolean(e) ? t.value = e : t.value = !t.value;
|
|
28
|
-
};
|
|
29
|
-
function d(e) {
|
|
30
|
-
return e.reduce((o, a) => (o[a._id] = [...o[a._id] ?? [], a], o), {});
|
|
31
|
-
}
|
|
32
|
-
const k = s.initialValue, l = V(d(_(k))), h = I(() => Object.values(l.value).flatMap((e) => e)), g = H(
|
|
33
|
-
() => !N.isEqual(d(s.initialValue), l.value),
|
|
34
|
-
() => {
|
|
35
|
-
t.value = !1;
|
|
36
|
-
}
|
|
37
|
-
);
|
|
38
|
-
function B() {
|
|
39
|
-
c("submit", h.value), t.value = !1;
|
|
40
|
-
}
|
|
41
|
-
z(
|
|
42
|
-
() => t.value,
|
|
43
|
-
() => {
|
|
44
|
-
l.value = d(_(s.initialValue));
|
|
45
|
-
}
|
|
46
|
-
);
|
|
47
|
-
const { t: m } = j();
|
|
48
|
-
return (e, o) => {
|
|
49
|
-
const a = b("fm-button"), C = b("fm-side-sheet");
|
|
50
|
-
return w(), F(O, null, [
|
|
51
|
-
A(e.$slots, "default", { trigger: v }, void 0, !0),
|
|
52
|
-
r(C, {
|
|
53
|
-
id: "group-form",
|
|
54
|
-
modelValue: t.value,
|
|
55
|
-
"onUpdate:modelValue": o[2] || (o[2] = (p) => t.value = p),
|
|
56
|
-
"close-button": e.useCloseBtn,
|
|
57
|
-
"is-container": n(U).FmForm,
|
|
58
|
-
"is-container-props": {
|
|
59
|
-
onValidationSuccess: B,
|
|
60
|
-
blameFormChildOnValidationFailed: !0
|
|
61
|
-
},
|
|
62
|
-
"max-width": 560,
|
|
63
|
-
"onOn:clickedAway": n(g)
|
|
64
|
-
}, {
|
|
65
|
-
"side-sheet-header": f(() => [
|
|
66
|
-
e.useCloseBtn ? E("", !0) : (w(), D(a, {
|
|
67
|
-
key: 0,
|
|
68
|
-
variant: n(q).Tertiary,
|
|
69
|
-
class: "cursor-pointer mr-4",
|
|
70
|
-
"prepend-icon": "arrow_back",
|
|
71
|
-
onClick: v
|
|
72
|
-
}, null, 8, ["variant"])),
|
|
73
|
-
y("p", $, L(e.title || n(m)("menu.link_product.title")), 1)
|
|
74
|
-
]),
|
|
75
|
-
"side-sheet-footer": f(() => [
|
|
76
|
-
y("div", G, [
|
|
77
|
-
r(a, {
|
|
78
|
-
label: n(m)("menu.common.actions.confirm"),
|
|
79
|
-
size: "lg",
|
|
80
|
-
type: "submit",
|
|
81
|
-
variant: "primary"
|
|
82
|
-
}, null, 8, ["label"]),
|
|
83
|
-
r(a, {
|
|
84
|
-
label: n(m)("menu.common.actions.cancel"),
|
|
85
|
-
size: "lg",
|
|
86
|
-
variant: "tertiary",
|
|
87
|
-
onClick: o[1] || (o[1] = () => t.value = !1)
|
|
88
|
-
}, null, 8, ["label"])
|
|
89
|
-
])
|
|
90
|
-
]),
|
|
91
|
-
default: f(() => [
|
|
92
|
-
r(n(P), {
|
|
93
|
-
"auto-focus-search": !0,
|
|
94
|
-
"categorized-items": e.categorizedItems,
|
|
95
|
-
data: l.value,
|
|
96
|
-
"select-variant": e.selectVariant,
|
|
97
|
-
"selected-items": h.value,
|
|
98
|
-
"show-variant": e.showVariant,
|
|
99
|
-
"show-addon": e.showAddon,
|
|
100
|
-
"onUpdate:data": o[0] || (o[0] = (p) => l.value = p)
|
|
101
|
-
}, null, 8, ["categorized-items", "data", "select-variant", "selected-items", "show-variant", "show-addon"])
|
|
102
|
-
]),
|
|
103
|
-
_: 1
|
|
104
|
-
}, 8, ["modelValue", "close-button", "is-container", "is-container-props", "onOn:clickedAway"])
|
|
105
|
-
], 64);
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
}), x = /* @__PURE__ */ T(J, [["__scopeId", "data-v-25b0fda9"]]);
|
|
109
|
-
export {
|
|
110
|
-
x as L,
|
|
111
|
-
T as _
|
|
112
|
-
};
|