@feedmepos/mf-menu 0.32.43 → 0.32.45-dev

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.
Files changed (84) hide show
  1. package/dist/{App-C9b4SjED.js → App-u5AOIdU4.js} +1472 -1459
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-C1T4Ewek.js → ApplyProduct.vue_vue_type_script_setup_true_lang-RTdI8EVk.js} +3 -3
  3. package/dist/{Catalog-BVrf3VaX.js → Catalog-DDMz6wD9.js} +44 -44
  4. package/dist/{Category-BkReM5IG.js → Category-BE0d0_de.js} +24 -24
  5. package/dist/{Category-BMzIQqIE.js → Category-DoIleKPb.js} +78 -78
  6. package/dist/{CookingGuide-CvctI1TH.js → CookingGuide-iP5hFtlB.js} +105 -105
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-bYSEp6Wb.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CSaMT7Gr.js} +1 -1
  8. package/dist/{Group-CHkNuuHE.js → Group-AXDRjsKC.js} +3 -3
  9. package/dist/{Group-BQzmXagr.js → Group-xjimyqnO.js} +1 -1
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-BkruJTpL.js → Group.vue_vue_type_script_setup_true_lang-DB_X7ws3.js} +173 -173
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CBz83Qd1.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D_IUSYDa.js} +30 -30
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Dpx4meDa.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-Suib7m8i.js} +1750 -1751
  13. package/dist/{Ingredient-BNsKYrQB.js → Ingredient-yr2DWIMw.js} +20 -20
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-DzzwwdA_.js → InventoryBinding.vue_vue_type_script_setup_true_lang-BpiU1gRP.js} +2 -2
  15. package/dist/{LinkProductSideSheet-C6-wef-M.js → LinkProductSideSheet-2MbaATTn.js} +45 -45
  16. package/dist/{MenuSetting-DRaw7b6m.js → MenuSetting-BhkjzPiN.js} +47 -47
  17. package/dist/{PrintRoute-BKB-thVp.js → PrintRoute-ChqpbVo4.js} +39 -39
  18. package/dist/{Product-vviXmBR1.js → Product-BpnGnMzm.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-5h-k6zad.js → Product.vue_vue_type_script_setup_true_lang-COkk299w.js} +465 -463
  20. package/dist/{ProductInternalTools-DtLk3xFR.js → ProductInternalTools-BEwLYcEn.js} +66 -66
  21. package/dist/Products-lONe7x_i.js +291 -0
  22. package/dist/{Publish-jx0_H_26.js → Publish-CXRgBz-S.js} +29 -29
  23. package/dist/{Recipe-Dk04ge-_.js → Recipe-Bbt3hG6N.js} +24 -24
  24. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DaCVUn1i.js → RuleView.vue_vue_type_script_setup_true_lang-DXisBADc.js} +366 -366
  25. package/dist/{Scheduler-vFTvCVcY.js → Scheduler-DJsgP_Hi.js} +11 -11
  26. package/dist/{ServingSequence-DiBqQ_iS.js → ServingSequence-DALjVV2I.js} +44 -44
  27. package/dist/{Setting-CtzJ_pVM.js → Setting-B23o5SoS.js} +17 -17
  28. package/dist/{Subcategory-Cmv2W67T.js → Subcategory-CS4MEgtM.js} +109 -110
  29. package/dist/{Takeaway-DBW4UPFZ.js → Takeaway-CI2Y-_LF.js} +13 -13
  30. package/dist/{Takeaway-ChaYk0Ix.js → Takeaway-D27iA6M6.js} +1 -1
  31. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-C7RL3ITP.js → Takeaway.vue_vue_type_script_setup_true_lang-Ca3qK9zO.js} +111 -111
  32. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-edwJ1203.js → Thumbnail.vue_vue_type_script_setup_true_lang-Da2jQE45.js} +27 -27
  33. package/dist/TranslationFieldSection.vue_vue_type_script_setup_true_lang-DUScE-82.js +278 -0
  34. package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-E3-hgVdd.js +140 -0
  35. package/dist/TranslationViewChip.vue_vue_type_script_setup_true_lang-BlACWsDs.js +60 -0
  36. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DnuNFxC7.js +6130 -0
  37. package/dist/{Unit-BgLqPMLe.js → Unit-5pv3oxSc.js} +8 -8
  38. package/dist/Variant-CTAI6p6r.js +248 -0
  39. package/dist/{_id_-CDN7as0K.js → _id_-D09xegPQ.js} +28 -28
  40. package/dist/{app-0AQBxO0B.js → app-8-JCz9b5.js} +1 -1
  41. package/dist/app-Bk0DN7oZ.js +363 -0
  42. package/dist/app.js +1 -1
  43. package/dist/apps/mf-menu/src/components/translation/LanguageChip.vue.d.ts +18 -0
  44. package/dist/apps/mf-menu/src/components/translation/LanguageSelector.vue.d.ts +33 -0
  45. package/dist/apps/mf-menu/src/components/translation/LocaleIconBadge.vue.d.ts +29 -0
  46. package/dist/apps/mf-menu/src/components/translation/TranslationFieldRow.vue.d.ts +39 -0
  47. package/dist/apps/mf-menu/src/components/translation/TranslationViewChip.vue.d.ts +15 -0
  48. package/dist/apps/mf-menu/src/composable/translationLanguages.d.ts +16 -0
  49. package/dist/apps/mf-menu/src/stores/menu.d.ts +1 -0
  50. package/dist/apps/mf-menu/src/utils/translation.d.ts +1 -1
  51. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  52. package/dist/assets/{linked-status-DTIHdzDw.js → linked-status-dENy3aw3.js} +5 -5
  53. package/dist/assets/{menu-export-CpcyYnR-.js → menu-export-E9V7bg-T.js} +2 -2
  54. package/dist/assets/{override-menu-CASoFjhZ.js → override-menu-HaI7O9Fu.js} +5 -5
  55. package/dist/assets/{validate-menu-C5AkexWv.js → validate-menu-C8LhbVSM.js} +2 -2
  56. package/dist/{catalog-BA1e4WAu.js → catalog-DhXoYsFF.js} +1 -1
  57. package/dist/{catalogSetting-DE5rjVfj.js → catalogSetting-DyRqWzdW.js} +1 -1
  58. package/dist/{currency-D5qYOpxI.js → currency-BkmIftYM.js} +1 -1
  59. package/dist/dayjs.min-nQqVHQcC.js +6 -0
  60. package/dist/index-28XF3UnN.js +246 -0
  61. package/dist/{index-vPs04fVf.js → index-BQ95VVc6.js} +33 -32
  62. package/dist/index-BXWquw9Z.js +472 -0
  63. package/dist/{index.vue_vue_type_script_setup_true_lang-DSZsSghE.js → index.vue_vue_type_script_setup_true_lang-CJO2XWIn.js} +270 -244
  64. package/dist/{item-Dp17qTYi.js → item-DmTvGVsp.js} +3270 -3406
  65. package/dist/{jszip.min-DlpCmtaR.js → jszip.min-8Z5To_Pk.js} +6 -7
  66. package/dist/{menu-BOVrJ7di.js → menu-Csu9X1_I.js} +1 -1
  67. package/dist/{menuV2-BHnldQiM.js → menuV2-CC-vGiv5.js} +71 -71
  68. package/dist/{priceTier-BRQz1GRF.js → priceTier-Bj9Y6SSr.js} +1 -1
  69. package/dist/{rules-CO49kqfr.js → rules-Dod2cBHH.js} +12 -12
  70. package/dist/{scheduler-BDHjl8t7.js → scheduler-B3M-715v.js} +29 -29
  71. package/dist/{toExcel-DGdZKSxT.js → toExcel-67ufpOxx.js} +2 -2
  72. package/dist/{unit-D7QVgTp_.js → unit-BQrnccs6.js} +35 -35
  73. package/package.json +1 -1
  74. package/dist/Products-BR3iBVFd.js +0 -307
  75. package/dist/RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-I6qrPmxY.js +0 -144
  76. package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-Cs6s_csi.js +0 -196
  77. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DIbjlDVn.js +0 -5767
  78. package/dist/Variant-B8yxF5mJ.js +0 -247
  79. package/dist/app-BU6wILmn.js +0 -2286
  80. package/dist/dayjs.min-BFDAHpA8.js +0 -7
  81. package/dist/index--nQbIQ0d.js +0 -545
  82. package/dist/translation-BCZ1Ruvv.js +0 -93
  83. /package/dist/apps/mf-menu/src/components/{TranslationBadge.vue.d.ts → translation/TranslationBadge.vue.d.ts} +0 -0
  84. /package/dist/apps/mf-menu/src/components/{TranslationFieldSection.vue.d.ts → translation/TranslationFieldSection.vue.d.ts} +0 -0
@@ -1,247 +0,0 @@
1
- import { getCurrentInstance as U, defineComponent as $, computed as x, onMounted as R, h as u, resolveComponent as w, createBlock as L, openBlock as p, unref as t, withCtx as _, createElementBlock as y, Fragment as M, createElementVNode as i, createVNode as c, isRef as z, normalizeClass as O, renderList as Y, toDisplayString as S, withModifiers as B, createCommentVNode as G } from "vue";
2
- import { useI18n as N } from "@feedmepos/mf-common";
3
- import { useDialog as J, useSnackbar as D, FmButtonVariant as j, components as q, useBreakpoints as H } from "@feedmepos/ui-library";
4
- import { _ as Q } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
5
- import { _ as W } from "./app-BU6wILmn.js";
6
- import { B as K, u as P, O as A, J as X, y as Z, a2 as ee } from "./index.vue_vue_type_script_setup_true_lang-DSZsSghE.js";
7
- import { V as E } from "./index--nQbIQ0d.js";
8
- import { _ as ae } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
9
- import { u as oe } from "./search-BAPEUu1R.js";
10
- import { defineStore as te } from "pinia";
11
- import { c as ne } from "./createComponentProgrammatically-Bt2rn1IQ.js";
12
- import { g as F } from "./translation-BCZ1Ruvv.js";
13
- const le = te("variant-manager", () => {
14
- const I = J(), n = D(), g = K(n), k = A(g);
15
- P();
16
- const f = U(), { t: m } = N(), V = (r) => {
17
- var h, o;
18
- const { vNode: C } = ne(
19
- E,
20
- f,
21
- r
22
- );
23
- (o = (h = C.component) == null ? void 0 : h.exposed) == null || o.trigger();
24
- };
25
- async function d(r) {
26
- V({
27
- initialValue: r
28
- });
29
- }
30
- async function v(r) {
31
- I.open({
32
- title: m("menu.common.dialog.remove.variant.title"),
33
- message: m("menu.common.dialog.remove.variant.message", { name: r.name }),
34
- primaryActions: {
35
- text: m("menu.common.actions.remove"),
36
- close: !0,
37
- variant: j.Destructive
38
- },
39
- secondaryActions: {
40
- text: m("menu.common.actions.cancel"),
41
- close: !0
42
- }
43
- }).onPrimary(async () => {
44
- await k.updateMenu(
45
- {
46
- module: Z.F_MENU_MODULE_V4_KEY.enum.variant,
47
- operation: X.F_OPERATION_TYPE.delete,
48
- data: r._id
49
- },
50
- r.name,
51
- !0
52
- );
53
- });
54
- }
55
- return {
56
- deleteVariant: v,
57
- updateVariant: d
58
- };
59
- }), se = {
60
- key: 0,
61
- class: "flex-1 flex flex-col overflow-hidden max-h-[calc(100vh-56px)] gap-8"
62
- }, re = {
63
- class: "flex justify-end"
64
- }, ie = {
65
- class: "w-[320px]"
66
- }, ce = {
67
- class: "px-16 py-8"
68
- }, me = {
69
- class: /* @__PURE__ */ O(["flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100", "pb-64"])
70
- }, de = ["onClick"], ue = {
71
- class: "flex-1 space-y-4"
72
- }, pe = {
73
- class: "fm-typo-en-body-lg-600"
74
- }, fe = {
75
- class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
76
- }, _e = {
77
- class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
78
- }, ye = {
79
- key: 1,
80
- class: "xs:pt-16"
81
- }, je = /* @__PURE__ */ $({
82
- __name: "Variant",
83
- setup(I) {
84
- const {
85
- t: n
86
- } = N(), g = P(), k = A(K(D())), f = le(), m = x(() => g.variants.map((o) => ({
87
- ...o,
88
- usedBy: g.items.filter((e) => {
89
- var s;
90
- return (s = e.variant) == null ? void 0 : s.variantGroupIds.includes(o._id);
91
- }).map(({
92
- _id: e
93
- }) => ({
94
- _id: e
95
- }))
96
- }))), {
97
- filter: V,
98
- searchKey: d
99
- } = oe(), v = x(() => m.value.filter((o) => {
100
- var e;
101
- return V([o.name, ...((e = o.options) == null ? void 0 : e.map((s) => s.name)) ?? []]);
102
- }));
103
- R(() => g.selectCatalog(null));
104
- const r = x(() => [{
105
- accessorKey: "name",
106
- header: () => n("menu.variant.columns.name"),
107
- size: 360,
108
- enableSorting: !1,
109
- cell: (o) => {
110
- const e = o.row.original, s = o.getValue(), l = Object.keys(e.name_locale ?? {}).map((a) => F(a));
111
- return u("div", {
112
- class: "flex items-center gap-8"
113
- }, [u("span", {
114
- class: "break-all"
115
- }, s), ...l.map((a) => u("div", {
116
- class: "rounded-lg border border-fm-color-primary text-fm-color-primary flex items-center justify-center fm-typo-en-body-sm-600 px-8"
117
- }, a))]);
118
- }
119
- }, {
120
- accessorKey: "options",
121
- header: () => n("menu.variant.columns.options"),
122
- size: 560,
123
- enableSorting: !1,
124
- cell: (o) => {
125
- const e = o.getValue() ?? [], s = e.some((l) => Object.keys(l.name_locale ?? {}).length > 0), b = Array.from(new Set(e.flatMap((l) => Object.keys(l.name_locale ?? {})))).map((l) => F(l));
126
- return u("div", {
127
- class: "flex items-center gap-8"
128
- }, [u("span", {
129
- class: "break-all"
130
- }, e == null ? void 0 : e.map((l) => l.name).join(", ")), ...s ? b.map((l) => u("div", {
131
- class: "rounded-lg border border-fm-color-primary text-fm-color-primary flex items-center justify-center fm-typo-en-body-sm-600 px-8"
132
- }, l)) : []]);
133
- }
134
- }, {
135
- accessorKey: "usedBy",
136
- header: () => n("menu.variant.columns.applied_products"),
137
- enableSorting: !1,
138
- size: 180,
139
- cell: (o) => n("menu.common.labels.items_linked", {
140
- count: o.getValue().length
141
- })
142
- }, {
143
- id: "action",
144
- size: 52,
145
- meta: {
146
- cellClass: "pl-16",
147
- headerContentClass: "-mx-16"
148
- },
149
- cell: (o) => u("div", {
150
- class: "w-full flex justify-end items-center"
151
- }, [u(q.FmButton, {
152
- prependIcon: "delete",
153
- variant: j.Tertiary,
154
- textColor: "neutral-gray-400",
155
- onClick: (e) => {
156
- e.stopPropagation(), f.deleteVariant(o.row.original);
157
- }
158
- })])
159
- }]), C = H(), h = x(() => C.breakpoints.value.xs);
160
- return (o, e) => {
161
- const s = w("fm-search"), b = w("fm-table"), l = w("fm-button");
162
- return p(), L(ae, {
163
- heading: t(n)("menu.variant.title")
164
- }, {
165
- "append-heading": _(() => [m.value.length ? (p(), L(t(E), {
166
- key: 0
167
- }, {
168
- default: _(({
169
- trigger: a
170
- }) => [c(Q, {
171
- class: "ml-auto",
172
- label: t(n)("menu.variant.add"),
173
- "prepend-icon": "add",
174
- onClick: B(a, ["stop"])
175
- }, null, 8, ["label", "onClick"])]),
176
- _: 1
177
- })) : G("", !0)]),
178
- default: _(() => [m.value.length ? (p(), y(M, {
179
- key: 0
180
- }, [h.value ? (p(), y(M, {
181
- key: 1
182
- }, [i("div", ce, [c(s, {
183
- autofocus: "",
184
- modelValue: t(d),
185
- "onUpdate:modelValue": e[2] || (e[2] = (a) => z(d) ? d.value = a : null),
186
- placeholder: t(n)("menu.common.labels.search_placeholder", {
187
- type: "variants"
188
- })
189
- }, null, 8, ["modelValue", "placeholder"])]), i("div", me, [(p(!0), y(M, null, Y(v.value, (a) => (p(), y("div", {
190
- key: a._id,
191
- class: O(["py-12 px-16", "flex space-x-8", "items-center", "cursor-pointer"]),
192
- onClick: () => t(f).updateVariant(a)
193
- }, [i("div", ue, [i("p", pe, S(a.name), 1), i("div", null, [i("p", fe, S(t(n)("menu.common.labels.items_linked", {
194
- count: a.usedBy.length
195
- })), 1), i("p", _e, S(t(n)("menu.variant.mobile.value", {
196
- values: a.options.map((T) => T.name).join(", ")
197
- })), 1)])]), c(l, {
198
- variant: t(j).Tertiary,
199
- "prepend-icon": "delete",
200
- "text-color": "neutral-gray-400",
201
- onClick: B(() => t(f).deleteVariant(a), ["stop"])
202
- }, null, 8, ["variant", "onClick"])], 8, de))), 128))])], 64)) : (p(), y("div", se, [i("div", re, [i("div", ie, [c(s, {
203
- autofocus: "",
204
- modelValue: t(d),
205
- "onUpdate:modelValue": e[0] || (e[0] = (a) => z(d) ? d.value = a : null),
206
- placeholder: t(n)("menu.common.labels.search_placeholder", {
207
- type: "variants"
208
- })
209
- }, null, 8, ["modelValue", "placeholder"])])]), c(W, null, {
210
- default: _(() => [c(b, {
211
- "column-defs": r.value,
212
- loading: t(k).checkMenuIsLoading(),
213
- "page-size": v.value.length,
214
- "row-data": v.value,
215
- "shrink-at": !1,
216
- class: "flex-1 overflow-hidden",
217
- "hide-footer": "",
218
- "pin-header-row": "",
219
- onRowClick: e[1] || (e[1] = (a) => {
220
- t(f).updateVariant(a.original);
221
- })
222
- }, null, 8, ["column-defs", "loading", "page-size", "row-data"])]),
223
- _: 1
224
- })]))], 64)) : (p(), y("div", ye, [c(ee, {
225
- subtitle: t(n)("menu.variant.empty.subtitle"),
226
- title: t(n)("menu.variant.empty.title")
227
- }, {
228
- action: _(() => [c(t(E), null, {
229
- default: _(({
230
- trigger: a
231
- }) => [c(l, {
232
- "prepend-icon": "add",
233
- label: t(n)("menu.variant.add"),
234
- onClick: B(a, ["stop"])
235
- }, null, 8, ["label", "onClick"])]),
236
- _: 1
237
- })]),
238
- _: 1
239
- }, 8, ["subtitle", "title"])]))]),
240
- _: 1
241
- }, 8, ["heading"]);
242
- };
243
- }
244
- });
245
- export {
246
- je as default
247
- };