@feedmepos/mf-menu-portal 1.0.4-dev.2 → 1.0.4-dev.4
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-DtX4DyDA.js → App-CrpoLCjA.js} +3 -3
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-C9OSr8ft.js → ApplyProduct.vue_vue_type_script_setup_true_lang-Hdsnu29V.js} +1 -1
- package/dist/{BindingTable.vue_vue_type_script_setup_true_lang-BJN8ajuD.js → BindingTable.vue_vue_type_script_setup_true_lang-D3CmOOPY.js} +1 -1
- package/dist/{Catalog-Dly_r1yA.js → Catalog-VU3HhNro.js} +4 -4
- package/dist/{CatalogBinding-CNG4YcVq.js → CatalogBinding-BNATtZEY.js} +3 -3
- package/dist/{CatalogEditTabs.vue_vue_type_script_setup_true_lang-Cy2culdR.js → CatalogEditTabs.vue_vue_type_script_setup_true_lang-BmG-xpW4.js} +3 -3
- package/dist/CatalogEditor.vue_vue_type_script_setup_true_lang-BFsRDFpj.js +784 -0
- package/dist/{CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-4EZ4yM_N.js → CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-Bk4FqVmx.js} +14 -14
- package/dist/{Category-Dz1yFYyY.js → Category-DMoXTsfG.js} +5 -5
- package/dist/{Category-BS-vFDYy.js → Category-DxjdQ-NN.js} +2 -2
- package/dist/CategoryList.vue_vue_type_script_setup_true_lang-B3Ts1O-9.js +847 -0
- package/dist/{CookingGuide-CmbvWFgp.js → CookingGuide-DiZZDYD-.js} +5 -5
- package/dist/{Group-B7s-vPXb.js → Group-DFR8q-tt.js} +5 -5
- package/dist/{Group-BRmWZnHh.js → Group-rzfh_o6r.js} +2 -2
- package/dist/GroupList.vue_vue_type_script_setup_true_lang-DiN-wQXX.js +1807 -0
- package/dist/Ingredient-DpjGIuH9.js +505 -0
- package/dist/LinkProductSideSheet.vue_vue_type_script_setup_true_lang-CnI80Ojd.js +782 -0
- package/dist/{MenuSetting-Ci7V_Jxn.js → MenuSetting-DR-pDSF_.js} +4 -4
- package/dist/OrderPacing-JcTuweqF.js +769 -0
- package/dist/{OrderPacingFields.vue_vue_type_script_setup_true_lang-NCH-SrZU.js → OrderPacingFields.vue_vue_type_script_setup_true_lang-HwwJ2mGv.js} +2 -2
- package/dist/{Preview-BBGNaj1F.js → Preview-BZyun5lZ.js} +1 -1
- package/dist/{PriceTierNotice.vue_vue_type_script_setup_true_lang-BXJDpDCm.js → PriceTierNotice.vue_vue_type_script_setup_true_lang-DquqNbE1.js} +1 -1
- package/dist/PrintRoute-CzEx2dCt.js +518 -0
- package/dist/{Product-DqN0NFUU.js → Product-CQb0n06E.js} +4 -4
- package/dist/ProductAttributeFilter.vue_vue_type_script_setup_true_lang-B2KdolJS.js +7931 -0
- package/dist/{ProductEditorHost.vue_vue_type_script_setup_true_lang-Fkiw4lZp.js → ProductEditorHost.vue_vue_type_script_setup_true_lang-CBlDEjqF.js} +9 -9
- package/dist/ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-D8NQTCLx.js +2011 -0
- package/dist/{ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-CNWCT1OB.js → ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-cG47Pu-6.js} +1 -1
- package/dist/{ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-BoQ9mVPY.js → ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-0UwUcA2L.js} +800 -749
- package/dist/{ProductInternalTools-CC3SWSlT.js → ProductInternalTools-QrBR1nFp.js} +2 -2
- package/dist/{ProductInventoryDialog-SAhsVekx.js → ProductInventoryDialog-fV38GO1a.js} +1 -1
- package/dist/{ProductInventoryDialog.vue_vue_type_script_setup_true_lang-BB8UIIsW.js → ProductInventoryDialog.vue_vue_type_script_setup_true_lang-Bzb3RrMg.js} +1 -1
- package/dist/ProductList.vue_vue_type_script_setup_true_lang-BwKQESr3.js +2765 -0
- package/dist/{ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-BMDSkfcn.js → ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-CDYcHXo1.js} +1 -1
- package/dist/{Products-Cn6j1DOQ.js → Products-B8tysOAL.js} +3 -3
- package/dist/Publish-DTvOvFNa.js +1337 -0
- package/dist/Recipe-Ddx31csF.js +388 -0
- package/dist/{Scheduler-DlaSVACJ.js → Scheduler-CST5L_cw.js} +314 -254
- package/dist/ServingSequence-DYyEZI2S.js +374 -0
- package/dist/{Setting-CyCp2uw4.js → Setting-Ip0pGjks.js} +6 -6
- package/dist/Subcategory-BIgjzVta.js +459 -0
- package/dist/{Takeaway-sVVykWDg.js → Takeaway-CekhGM-m.js} +2 -2
- package/dist/{Takeaway-tYHCAXYU.js → Takeaway-aXsPg4JT.js} +5 -5
- package/dist/{TakeawayList.vue_vue_type_script_setup_true_lang-CV24v8Zg.js → TakeawayList.vue_vue_type_script_setup_true_lang-CaRR4_j3.js} +4 -4
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CshqYpc9.js +1291 -0
- package/dist/Unit-BMW8u0Us.js +424 -0
- package/dist/{Variant-BNnR5rLv.js → Variant-CZsrYRMU.js} +5 -5
- package/dist/{_id_-a9ZtdjtT.js → _id_-D4swrvNa.js} +3 -3
- package/dist/{app-CmElp8cO.js → app-BWwwHsWi.js} +337 -337
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +80 -0
- package/dist/apps/mf-menu/src/components/PriceTier/LinkPriceTierSection.vue.d.ts +9 -0
- package/dist/apps/mf-menu/src/components/Product/BulkCategorySelect.vue.d.ts +37 -0
- package/dist/apps/mf-menu/src/components/Product/ProductAttributeFilter.vue.d.ts +11 -1
- package/dist/apps/mf-menu/src/components/ProductList.vue.d.ts +2 -2
- package/dist/apps/mf-menu/src/components/feature/NestedGroupManager/NestedGroupOverrideSheets.vue.d.ts +27 -0
- package/dist/apps/mf-menu/src/components/feature/RestaurantAttributesFilter.vue.d.ts +20 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{menu-compute-B_wpWLAj.js → menu-compute-D7TdiHt4.js} +4 -4
- package/dist/assets/{validate-menu-DjxNxUxH.js → validate-menu-DXppWUVq.js} +2 -2
- package/dist/mf-menu-portal.css +1 -1
- package/dist/{provide-BJRbSauL.js → provide-CDmXzkhz.js} +67539 -65978
- package/dist/{useActionFeedback-89GwO41T.js → useActionFeedback-Dm2HDa_2.js} +1 -1
- package/dist/{FormSection.vue_vue_type_script_setup_true_lang-pY-_msnM.js → vuedraggable-CBtQLb_S.js} +140 -139
- package/package.json +2 -2
- package/dist/CatalogEditor.vue_vue_type_script_setup_true_lang-Byp1db9_.js +0 -484
- package/dist/CategoryList.vue_vue_type_script_setup_true_lang-CrHYjrTn.js +0 -797
- package/dist/GroupList.vue_vue_type_script_setup_true_lang-CWr52_a-.js +0 -2183
- package/dist/Ingredient-BMAlctE4.js +0 -463
- package/dist/LinkProductSideSheet.vue_vue_type_script_setup_true_lang-CR99740r.js +0 -709
- package/dist/OrderPacing-Bz5kn6DY.js +0 -698
- package/dist/PrintRoute-BnARWdR2.js +0 -473
- package/dist/ProductChipSummary.vue_vue_type_script_setup_true_lang-D8DygCBl.js +0 -110
- package/dist/ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-DryxrG-x.js +0 -1257
- package/dist/ProductList.vue_vue_type_script_setup_true_lang-BDnTs366.js +0 -10353
- package/dist/Publish-BPJhG39B.js +0 -1261
- package/dist/Recipe-mt1vec5-.js +0 -350
- package/dist/ServingSequence-Cr1REWZP.js +0 -336
- package/dist/Subcategory-kuB7gYvc.js +0 -412
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Dz-Chgek.js +0 -1213
- package/dist/Unit-BSOvZxRy.js +0 -385
- package/dist/apps/mf-menu/src/views/MenuManagementEditor/RestaurantAttributesFilter.vue.d.ts +0 -2
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
import { defineComponent as ae, computed as p, ref as ve, shallowRef as X, h as pe, withModifiers as Y, onUnmounted as be, resolveComponent as h, openBlock as r, createBlock as F, unref as e, withCtx as V, createElementBlock as v, toDisplayString as x, Fragment as j, createElementVNode as c, createVNode as m, renderList as Z, createCommentVNode as $, mergeProps as I } from "vue";
|
|
2
|
+
import { useI18n as fe } from "@feedmepos/mf-common";
|
|
3
|
+
import { useDialog as ye, useBreakpoints as _e, components as ee, FmButtonVariant as ge } from "@feedmepos/ui-library";
|
|
4
|
+
import { _ as ke } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
|
|
5
|
+
import { _ as he } from "./ListCountTag.vue_vue_type_script_setup_true_lang-0bjk8Aly.js";
|
|
6
|
+
import { _ as xe } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
|
|
7
|
+
import { u as we } from "./useActionFeedback-Dm2HDa_2.js";
|
|
8
|
+
import { u as Ce } from "./useEditorValidation-Ctef5Bxt.js";
|
|
9
|
+
import { b as Fe, u as Se, a as Me } from "./provide-CDmXzkhz.js";
|
|
10
|
+
const Ve = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "flex-1 flex justify-between gap-8 pl-8"
|
|
13
|
+
}, $e = { class: "flex items-center" }, Ie = {
|
|
14
|
+
key: 0,
|
|
15
|
+
role: "alert",
|
|
16
|
+
class: "text-fm-color-typo-secondary"
|
|
17
|
+
}, Ne = {
|
|
18
|
+
key: 1,
|
|
19
|
+
class: "text-fm-color-typo-secondary"
|
|
20
|
+
}, Ue = { class: "flex justify-end items-center" }, Be = { class: "w-[320px] xs:w-full xs:px-16 xs:mt-8" }, Ee = {
|
|
21
|
+
key: 1,
|
|
22
|
+
class: "flex-1 min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64"
|
|
23
|
+
}, je = ["onClick"], Ae = { class: "min-w-0 flex-1" }, ze = { class: "fm-typo-en-body-lg-600 mb-4 break-words" }, Pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary break-words" }, De = {
|
|
24
|
+
key: 2,
|
|
25
|
+
class: "fixed right-16 bottom-[72px] z-[100]"
|
|
26
|
+
}, Oe = { class: "fm-typo-en-title-md-600" }, Re = { class: "pt-8 space-y-40" }, Te = { class: "flex flex-row gap-16" }, Le = { class: "flex justify-between items-center" }, Ke = { class: "fm-typo-en-body-md-600" }, qe = { class: "flex flex-row gap-8" }, Qe = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ge = { class: "flex gap-8 items-center justify-start" }, He = /* @__PURE__ */ ae({
|
|
27
|
+
__name: "UnitList",
|
|
28
|
+
props: {
|
|
29
|
+
sdk: {}
|
|
30
|
+
},
|
|
31
|
+
setup(A) {
|
|
32
|
+
const _ = A, { t: a } = fe(), w = Fe(), z = ye(), { run: P } = we(), b = Se(_.sdk.unit.list), d = p(
|
|
33
|
+
() => b.value.status === "ready" ? b.value.value : null
|
|
34
|
+
), le = p(() => {
|
|
35
|
+
var l;
|
|
36
|
+
return ((l = d.value) == null ? void 0 : l.query) ?? "";
|
|
37
|
+
}), { breakpoints: te } = _e(), N = p(() => te.value.xs), se = p(() => {
|
|
38
|
+
var l;
|
|
39
|
+
return [...((l = d.value) == null ? void 0 : l.rows) ?? []];
|
|
40
|
+
}), f = ve(!1), i = X(_.sdk.unit.editor()), S = X(
|
|
41
|
+
i.value.get()
|
|
42
|
+
);
|
|
43
|
+
let U = i.value.subscribe(
|
|
44
|
+
(l) => {
|
|
45
|
+
S.value = l;
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
const o = p(
|
|
49
|
+
() => S.value.status === "ready" ? S.value.value : null
|
|
50
|
+
), y = Ce(() => i.value), D = p(
|
|
51
|
+
() => o.value ? y.issue(o.value.fieldIssues, "name") ?? o.value.nameIssue : null
|
|
52
|
+
), O = p(
|
|
53
|
+
() => o.value ? y.issue(o.value.fieldIssues, "symbol") ?? o.value.symbolIssue : null
|
|
54
|
+
);
|
|
55
|
+
function R(l) {
|
|
56
|
+
var g;
|
|
57
|
+
const t = l == null ? void 0 : l.match(/^(measurementName|measurementSymbol):(\d+)$/), u = t ? (g = o.value) == null ? void 0 : g.measurements[Number(t[2]) - 1] : void 0;
|
|
58
|
+
return t && u ? `${t[1]}:${u.id}` : l;
|
|
59
|
+
}
|
|
60
|
+
const oe = p(
|
|
61
|
+
() => {
|
|
62
|
+
var l;
|
|
63
|
+
return Object.fromEntries(
|
|
64
|
+
Object.entries(((l = o.value) == null ? void 0 : l.fieldIssues) ?? {}).map(
|
|
65
|
+
([t, u]) => [R(t), u]
|
|
66
|
+
)
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
function T(l, t, u) {
|
|
71
|
+
const g = y.issue(oe.value, `${t}:${l}`) ?? u;
|
|
72
|
+
return g ? [w(g)] : [];
|
|
73
|
+
}
|
|
74
|
+
function L(l) {
|
|
75
|
+
U(), i.value.dispose(), i.value = _.sdk.unit.editor(l), S.value = i.value.get(), U = i.value.subscribe(
|
|
76
|
+
(t) => {
|
|
77
|
+
S.value = t;
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
function B() {
|
|
82
|
+
var l;
|
|
83
|
+
((l = d.value) == null ? void 0 : l.create.state) === "allowed" && (L(), f.value = !0);
|
|
84
|
+
}
|
|
85
|
+
function K(l) {
|
|
86
|
+
L(l.id), f.value = !0;
|
|
87
|
+
}
|
|
88
|
+
async function ne() {
|
|
89
|
+
(await P(
|
|
90
|
+
() => y.submit(async () => {
|
|
91
|
+
const t = await i.value.submit();
|
|
92
|
+
return t.kind === "rejected" ? {
|
|
93
|
+
...t,
|
|
94
|
+
issues: t.issues.map((u) => ({
|
|
95
|
+
...u,
|
|
96
|
+
field: R(u.field)
|
|
97
|
+
}))
|
|
98
|
+
} : t;
|
|
99
|
+
}),
|
|
100
|
+
{
|
|
101
|
+
// `submit()` publishes `submitting` synchronously only when it will
|
|
102
|
+
// actually perform a write. A required-field rejection is decided locally
|
|
103
|
+
// and issues no request, and legacy showed no spinner for it — the frozen
|
|
104
|
+
// `unit/create/validation-rejected` and `unit/update/validation-rejected`
|
|
105
|
+
// groups record the inline message and no snackbar at all.
|
|
106
|
+
showLoading: () => {
|
|
107
|
+
var t;
|
|
108
|
+
return ((t = o.value) == null ? void 0 : t.status) === "submitting";
|
|
109
|
+
},
|
|
110
|
+
// The SDK returns the name it stored, so the toast renders the value that
|
|
111
|
+
// was actually written rather than a second trim of the draft.
|
|
112
|
+
successMessage: (t) => a("menu.unit.form.saved", { name: t.name })
|
|
113
|
+
}
|
|
114
|
+
)).kind === "success" && (f.value = !1);
|
|
115
|
+
}
|
|
116
|
+
function ie() {
|
|
117
|
+
var l;
|
|
118
|
+
if (!((l = o.value) != null && l.dirty)) {
|
|
119
|
+
f.value = !1;
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
z.open({
|
|
123
|
+
title: a("menu.common.dialog.dismiss.title"),
|
|
124
|
+
message: a("menu.common.dialog.dismiss.message"),
|
|
125
|
+
primaryActions: {
|
|
126
|
+
text: a("menu.common.dialog.dismiss.discard"),
|
|
127
|
+
close: !0
|
|
128
|
+
},
|
|
129
|
+
secondaryActions: {
|
|
130
|
+
text: a("menu.common.actions.cancel"),
|
|
131
|
+
close: !0
|
|
132
|
+
}
|
|
133
|
+
}).onPrimary(() => {
|
|
134
|
+
f.value = !1;
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
function q(l) {
|
|
138
|
+
l.remove.state === "allowed" && z.open({
|
|
139
|
+
title: a("menu.common.dialog.remove.unit.title"),
|
|
140
|
+
message: a("menu.common.dialog.remove.unit.message", {
|
|
141
|
+
name: l.name
|
|
142
|
+
}),
|
|
143
|
+
primaryActions: {
|
|
144
|
+
text: a("menu.common.actions.remove"),
|
|
145
|
+
close: !0,
|
|
146
|
+
variant: ge.Destructive
|
|
147
|
+
},
|
|
148
|
+
secondaryActions: {
|
|
149
|
+
text: a("menu.common.actions.cancel"),
|
|
150
|
+
close: !0
|
|
151
|
+
}
|
|
152
|
+
}).onPrimary(async () => {
|
|
153
|
+
await P(() => _.sdk.unit.remove(l.id), {
|
|
154
|
+
successMessage: a("menu.unit.form.removed", { name: l.name })
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
const ue = p(() => [
|
|
159
|
+
{
|
|
160
|
+
accessorKey: "name",
|
|
161
|
+
header: () => a("menu.unit.columns.name"),
|
|
162
|
+
enableSorting: !1
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
accessorKey: "symbol",
|
|
166
|
+
header: () => a("menu.unit.columns.symbol"),
|
|
167
|
+
enableSorting: !1
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
id: "actions",
|
|
171
|
+
size: 52,
|
|
172
|
+
meta: { cellClass: "pl-16", headerContentClass: "-mx-16" },
|
|
173
|
+
header: "",
|
|
174
|
+
cell: (l) => pe(ee.FmButton, {
|
|
175
|
+
icon: "delete",
|
|
176
|
+
variant: "tertiary",
|
|
177
|
+
textColor: "neutral-gray-400",
|
|
178
|
+
disabled: l.row.original.remove.state !== "allowed",
|
|
179
|
+
"aria-label": a("menu.common.actions.delete"),
|
|
180
|
+
onClick: Y(
|
|
181
|
+
() => q(l.row.original),
|
|
182
|
+
["stop", "prevent"]
|
|
183
|
+
)
|
|
184
|
+
})
|
|
185
|
+
}
|
|
186
|
+
]);
|
|
187
|
+
return be(() => {
|
|
188
|
+
U(), i.value.dispose();
|
|
189
|
+
}), (l, t) => {
|
|
190
|
+
const u = h("FmButton"), g = h("FmCircularProgress"), re = h("FmSearch"), me = h("FmTable"), M = h("FmTextField"), de = h("FmStepperField"), ce = h("FmSideSheet");
|
|
191
|
+
return r(), F(xe, {
|
|
192
|
+
"data-visual-root": "unit",
|
|
193
|
+
heading: e(a)("menu.unit.title")
|
|
194
|
+
}, {
|
|
195
|
+
"append-heading": V(() => [
|
|
196
|
+
e(b).status === "ready" && d.value ? (r(), v("div", Ve, [
|
|
197
|
+
c("div", $e, [
|
|
198
|
+
m(he, {
|
|
199
|
+
value: d.value.totalCount
|
|
200
|
+
}, null, 8, ["value"])
|
|
201
|
+
]),
|
|
202
|
+
d.value.totalCount > 0 && !N.value ? (r(), F(u, {
|
|
203
|
+
key: 0,
|
|
204
|
+
disabled: d.value.create.state !== "allowed",
|
|
205
|
+
label: e(a)("menu.unit.add"),
|
|
206
|
+
"prepend-icon": "add",
|
|
207
|
+
onClick: B
|
|
208
|
+
}, null, 8, ["disabled", "label"])) : $("", !0)
|
|
209
|
+
])) : $("", !0)
|
|
210
|
+
]),
|
|
211
|
+
default: V(() => [
|
|
212
|
+
e(b).status === "error" ? (r(), v("p", Ie, x(e(w)(e(b).error.message)), 1)) : e(b).status === "unavailable" ? (r(), v("p", Ne, x(e(w)(e(b).reason)), 1)) : e(b).status === "loading" ? (r(), F(g, { key: 2 })) : d.value && d.value.totalCount === 0 ? (r(), F(e(ke), {
|
|
213
|
+
key: 3,
|
|
214
|
+
action: { text: e(a)("menu.unit.add"), callback: B },
|
|
215
|
+
title: e(a)("menu.unit.empty.title"),
|
|
216
|
+
subtitle: e(a)("menu.unit.empty.subtitle")
|
|
217
|
+
}, null, 8, ["action", "title", "subtitle"])) : d.value ? (r(), v(j, { key: 4 }, [
|
|
218
|
+
c("div", Ue, [
|
|
219
|
+
c("div", Be, [
|
|
220
|
+
m(re, {
|
|
221
|
+
autofocus: "",
|
|
222
|
+
class: "mb-8",
|
|
223
|
+
"model-value": le.value,
|
|
224
|
+
placeholder: e(a)("menu.unit.table.search.placeholder"),
|
|
225
|
+
"onUpdate:modelValue": _.sdk.unit.search
|
|
226
|
+
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])
|
|
227
|
+
])
|
|
228
|
+
]),
|
|
229
|
+
N.value ? (r(), v("div", Ee, [
|
|
230
|
+
(r(!0), v(j, null, Z(d.value.rows, (n) => (r(), v("div", {
|
|
231
|
+
key: n.id,
|
|
232
|
+
class: "py-12 px-16 flex space-x-8 items-center",
|
|
233
|
+
onClick: (k) => K(n)
|
|
234
|
+
}, [
|
|
235
|
+
c("div", Ae, [
|
|
236
|
+
c("p", ze, x(n.name), 1),
|
|
237
|
+
c("p", Pe, x(e(a)("menu.common.labels.a11y_labelled_name", {
|
|
238
|
+
label: e(a)("menu.common.labels.symbol"),
|
|
239
|
+
name: n.symbol
|
|
240
|
+
})), 1)
|
|
241
|
+
]),
|
|
242
|
+
m(u, {
|
|
243
|
+
class: "shrink-0",
|
|
244
|
+
"aria-label": e(a)("menu.common.actions.delete"),
|
|
245
|
+
disabled: n.remove.state !== "allowed",
|
|
246
|
+
"prepend-icon": "delete",
|
|
247
|
+
"text-color": "neutral-gray-400",
|
|
248
|
+
variant: "tertiary",
|
|
249
|
+
onClick: Y((k) => q(n), ["stop"])
|
|
250
|
+
}, null, 8, ["aria-label", "disabled", "onClick"])
|
|
251
|
+
], 8, je))), 128))
|
|
252
|
+
])) : (r(), F(me, {
|
|
253
|
+
key: 0,
|
|
254
|
+
"column-defs": ue.value,
|
|
255
|
+
"hide-footer": "",
|
|
256
|
+
"page-size": Math.max(d.value.rows.length, 1),
|
|
257
|
+
"pin-header-row": "",
|
|
258
|
+
"row-data": se.value,
|
|
259
|
+
"shrink-at": !1,
|
|
260
|
+
onRowClick: t[0] || (t[0] = (n) => K(n.original))
|
|
261
|
+
}, null, 8, ["column-defs", "page-size", "row-data"])),
|
|
262
|
+
d.value.totalCount > 0 && N.value ? (r(), v("div", De, [
|
|
263
|
+
m(u, {
|
|
264
|
+
disabled: d.value.create.state !== "allowed",
|
|
265
|
+
label: e(a)("menu.unit.add"),
|
|
266
|
+
"prepend-icon": "add",
|
|
267
|
+
variant: "fab",
|
|
268
|
+
onClick: B
|
|
269
|
+
}, null, 8, ["disabled", "label"])
|
|
270
|
+
])) : $("", !0)
|
|
271
|
+
], 64)) : $("", !0),
|
|
272
|
+
m(ce, {
|
|
273
|
+
modelValue: f.value,
|
|
274
|
+
"onUpdate:modelValue": t[4] || (t[4] = (n) => f.value = n),
|
|
275
|
+
"is-container": e(ee).FmForm,
|
|
276
|
+
"is-container-props": { onValidationSuccess: ne },
|
|
277
|
+
"max-width": 560,
|
|
278
|
+
"onOn:clickedAway": ie
|
|
279
|
+
}, {
|
|
280
|
+
"side-sheet-header": V(() => {
|
|
281
|
+
var n;
|
|
282
|
+
return [
|
|
283
|
+
c("p", Oe, x(((n = o.value) == null ? void 0 : n.mode) === "update" ? e(a)("menu.unit.update") : e(a)("menu.unit.add")), 1)
|
|
284
|
+
];
|
|
285
|
+
}),
|
|
286
|
+
"side-sheet-footer": V(() => {
|
|
287
|
+
var n, k;
|
|
288
|
+
return [
|
|
289
|
+
c("div", Ge, [
|
|
290
|
+
m(u, {
|
|
291
|
+
disabled: ((n = o.value) == null ? void 0 : n.submit.state) !== "allowed",
|
|
292
|
+
label: ((k = o.value) == null ? void 0 : k.mode) === "update" ? e(a)("menu.common.actions.update") : e(a)("menu.common.actions.add"),
|
|
293
|
+
size: "lg",
|
|
294
|
+
type: "submit",
|
|
295
|
+
variant: "primary"
|
|
296
|
+
}, null, 8, ["disabled", "label"]),
|
|
297
|
+
m(u, {
|
|
298
|
+
label: e(a)("menu.common.actions.cancel"),
|
|
299
|
+
size: "lg",
|
|
300
|
+
variant: "tertiary",
|
|
301
|
+
onClick: t[3] || (t[3] = (E) => f.value = !1)
|
|
302
|
+
}, null, 8, ["label"])
|
|
303
|
+
])
|
|
304
|
+
];
|
|
305
|
+
}),
|
|
306
|
+
default: V(() => {
|
|
307
|
+
var n, k, E, Q, G, H, J;
|
|
308
|
+
return [
|
|
309
|
+
c("div", Re, [
|
|
310
|
+
c("div", Te, [
|
|
311
|
+
m(M, I({
|
|
312
|
+
class: "flex-2",
|
|
313
|
+
"error-messages": D.value ? [e(w)(D.value)] : [],
|
|
314
|
+
label: e(a)("menu.unit.columns.name"),
|
|
315
|
+
"model-value": ((n = o.value) == null ? void 0 : n.name) ?? ""
|
|
316
|
+
}, e(y).field("name", i.value.setName)), null, 16, ["error-messages", "label", "model-value"]),
|
|
317
|
+
m(M, I({
|
|
318
|
+
class: "flex-1",
|
|
319
|
+
"error-messages": O.value ? [e(w)(O.value)] : [],
|
|
320
|
+
label: e(a)("menu.unit.columns.symbol"),
|
|
321
|
+
"model-value": ((k = o.value) == null ? void 0 : k.symbol) ?? ""
|
|
322
|
+
}, e(y).field("symbol", i.value.setSymbol)), null, 16, ["error-messages", "label", "model-value"])
|
|
323
|
+
]),
|
|
324
|
+
m(de, {
|
|
325
|
+
label: e(a)("menu.unit.precision"),
|
|
326
|
+
max: (E = o.value) == null ? void 0 : E.precisionMax,
|
|
327
|
+
min: (Q = o.value) == null ? void 0 : Q.precisionMin,
|
|
328
|
+
"model-value": ((G = o.value) == null ? void 0 : G.precision) ?? 0,
|
|
329
|
+
placeholder: e(a)("menu.unit.precision_placeholder"),
|
|
330
|
+
step: 1,
|
|
331
|
+
"onUpdate:modelValue": t[1] || (t[1] = (s) => i.value.setPrecision(Number(s)))
|
|
332
|
+
}, null, 8, ["label", "max", "min", "model-value", "placeholder"]),
|
|
333
|
+
m(u, {
|
|
334
|
+
disabled: ((H = o.value) == null ? void 0 : H.addMeasurement.state) !== "allowed",
|
|
335
|
+
label: e(a)("menu.unit.measurement.add"),
|
|
336
|
+
variant: "secondary",
|
|
337
|
+
onClick: t[2] || (t[2] = (s) => i.value.addMeasurement())
|
|
338
|
+
}, null, 8, ["disabled", "label"]),
|
|
339
|
+
(r(!0), v(j, null, Z(((J = o.value) == null ? void 0 : J.measurements) ?? [], (s) => {
|
|
340
|
+
var W;
|
|
341
|
+
return r(), v("div", {
|
|
342
|
+
key: s.id,
|
|
343
|
+
class: "flex flex-col gap-8"
|
|
344
|
+
}, [
|
|
345
|
+
c("div", Le, [
|
|
346
|
+
c("p", Ke, x(e(a)("menu.unit.measurement.title", {
|
|
347
|
+
number: s.position
|
|
348
|
+
})), 1),
|
|
349
|
+
m(u, {
|
|
350
|
+
"aria-label": e(a)("menu.unit.measurement.remove", {
|
|
351
|
+
number: s.position
|
|
352
|
+
}),
|
|
353
|
+
disabled: s.remove.state !== "allowed",
|
|
354
|
+
icon: "delete",
|
|
355
|
+
variant: "secondary",
|
|
356
|
+
onClick: (C) => i.value.removeMeasurement(s.id)
|
|
357
|
+
}, null, 8, ["aria-label", "disabled", "onClick"])
|
|
358
|
+
]),
|
|
359
|
+
c("div", qe, [
|
|
360
|
+
m(M, I(
|
|
361
|
+
{
|
|
362
|
+
"error-messages": T(
|
|
363
|
+
s.id,
|
|
364
|
+
"measurementName",
|
|
365
|
+
s.nameIssue
|
|
366
|
+
),
|
|
367
|
+
label: e(a)("menu.unit.measurement.name"),
|
|
368
|
+
"model-value": s.name
|
|
369
|
+
},
|
|
370
|
+
{ ref_for: !0 },
|
|
371
|
+
e(y).field(
|
|
372
|
+
`measurementName:${s.id}`,
|
|
373
|
+
(C) => i.value.setMeasurementName(s.id, C)
|
|
374
|
+
)
|
|
375
|
+
), null, 16, ["error-messages", "label", "model-value"]),
|
|
376
|
+
m(M, I(
|
|
377
|
+
{
|
|
378
|
+
"error-messages": T(
|
|
379
|
+
s.id,
|
|
380
|
+
"measurementSymbol",
|
|
381
|
+
s.symbolIssue
|
|
382
|
+
),
|
|
383
|
+
label: e(a)("menu.unit.measurement.symbol"),
|
|
384
|
+
"model-value": s.symbol
|
|
385
|
+
},
|
|
386
|
+
{ ref_for: !0 },
|
|
387
|
+
e(y).field(
|
|
388
|
+
`measurementSymbol:${s.id}`,
|
|
389
|
+
(C) => i.value.setMeasurementSymbol(s.id, C)
|
|
390
|
+
)
|
|
391
|
+
), null, 16, ["error-messages", "label", "model-value"])
|
|
392
|
+
]),
|
|
393
|
+
m(M, {
|
|
394
|
+
label: e(a)("menu.unit.measurement.conversion"),
|
|
395
|
+
"model-value": s.conversion,
|
|
396
|
+
"onUpdate:modelValue": (C) => i.value.setMeasurementConversion(s.id, C)
|
|
397
|
+
}, null, 8, ["label", "model-value", "onUpdate:modelValue"]),
|
|
398
|
+
c("p", Qe, x(e(a)("menu.unit.measurement.preview_line", {
|
|
399
|
+
name: s.name,
|
|
400
|
+
value: s.conversionValue,
|
|
401
|
+
unit: ((W = o.value) == null ? void 0 : W.name) ?? ""
|
|
402
|
+
})), 1)
|
|
403
|
+
]);
|
|
404
|
+
}), 128))
|
|
405
|
+
])
|
|
406
|
+
];
|
|
407
|
+
}),
|
|
408
|
+
_: 1
|
|
409
|
+
}, 8, ["modelValue", "is-container", "is-container-props"])
|
|
410
|
+
]),
|
|
411
|
+
_: 1
|
|
412
|
+
}, 8, ["heading"]);
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
}), sa = /* @__PURE__ */ ae({
|
|
416
|
+
__name: "Unit",
|
|
417
|
+
setup(A) {
|
|
418
|
+
const _ = Me();
|
|
419
|
+
return (a, w) => (r(), F(He, { sdk: e(_) }, null, 8, ["sdk"]));
|
|
420
|
+
}
|
|
421
|
+
});
|
|
422
|
+
export {
|
|
423
|
+
sa as default
|
|
424
|
+
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { defineComponent as fe, computed as h, ref as Pe, shallowRef as B, h as x, withModifiers as ue, onUnmounted as Te, resolveComponent as b, openBlock as i, createBlock as f, unref as t, withCtx as p, createElementBlock as C, toDisplayString as S, Fragment as ce, createElementVNode as d, normalizeClass as me, createVNode as r, renderList as Ve, createCommentVNode as L, mergeProps as de, createSlots as $e, nextTick as Ee } from "vue";
|
|
2
|
-
import { _ as Oe, d as ze } from "./
|
|
2
|
+
import { _ as Oe, d as ze } from "./vuedraggable-CBtQLb_S.js";
|
|
3
3
|
import { useI18n as Me } from "@feedmepos/mf-common";
|
|
4
4
|
import { useDialog as je, useBreakpoints as Be, components as pe, FmButtonVariant as H } from "@feedmepos/ui-library";
|
|
5
|
-
import { _ as Ue } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _ as Ue } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-Hdsnu29V.js";
|
|
6
6
|
import { _ as Ae } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
|
|
7
|
-
import { _ as Ne } from "./ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-
|
|
7
|
+
import { _ as Ne } from "./ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-CDYcHXo1.js";
|
|
8
8
|
import { _ as qe } from "./FormItem.vue_vue_type_script_setup_true_lang-C2S6QCyR.js";
|
|
9
9
|
import { _ as De } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
|
|
10
10
|
import { _ as ve } from "./TranslationViewChip.vue_vue_type_script_setup_true_lang-CAkLEmSA.js";
|
|
11
|
-
import { u as Re } from "./useActionFeedback-
|
|
11
|
+
import { u as Re } from "./useActionFeedback-Dm2HDa_2.js";
|
|
12
12
|
import { u as Qe } from "./useEditorValidation-Ctef5Bxt.js";
|
|
13
|
-
import { b as Ge, u as He, a as Ke } from "./provide-
|
|
13
|
+
import { b as Ge, u as He, a as Ke } from "./provide-CDmXzkhz.js";
|
|
14
14
|
const Je = {
|
|
15
15
|
key: 0,
|
|
16
16
|
class: "text-fm-color-typo-secondary",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as i, watch as l, onUnmounted as m, openBlock as d, createBlock as p, unref as f } from "vue";
|
|
2
2
|
import { useRoute as _, useRouter as g, RouterView as k } from "vue-router";
|
|
3
|
-
import { a as R, u as w } from "./provide-
|
|
4
|
-
import { u as h } from "./useActionFeedback-
|
|
5
|
-
import { R as y } from "./app-
|
|
3
|
+
import { a as R, u as w } from "./provide-CDmXzkhz.js";
|
|
4
|
+
import { u as h } from "./useActionFeedback-Dm2HDa_2.js";
|
|
5
|
+
import { R as y } from "./app-BWwwHsWi.js";
|
|
6
6
|
const M = /* @__PURE__ */ i({
|
|
7
7
|
__name: "[id]",
|
|
8
8
|
setup(x) {
|