@feedmepos/mf-menu 0.32.37-dev.1 → 0.32.38-dev.1

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 (129) hide show
  1. package/dist/{App-Bb-3_ZSx.js → App-DGdS9nht.js} +5 -5
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BARmH5Kv.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CBy3XScH.js} +3 -3
  3. package/dist/{Catalog-yRIPAnDC.js → Catalog-BuI0IVpf.js} +6 -6
  4. package/dist/{Category-Ca9K5MhL.js → Category-DSTt-Sl6.js} +9 -9
  5. package/dist/Category-DbL3CS-5.js +224 -0
  6. package/dist/{CookingGuide-B8BEcGEe.js → CookingGuide-Baw7iMDl.js} +4 -4
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-DIpsCALu.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-BDZDojOt.js} +1 -1
  8. package/dist/{Group-BT99kxFT.js → Group-BnzmEllK.js} +1 -1
  9. package/dist/{Group-th2sIKMq.js → Group-D158_Fr0.js} +7 -7
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-BBucri8m.js → Group.vue_vue_type_script_setup_true_lang-C3H6xvlY.js} +227 -216
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-RBYXZiHI.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D2G40Yc6.js} +5 -5
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DrPwZuUE.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-D-JOSWUn.js} +6 -6
  13. package/dist/{Ingredient-BEcfdvoj.js → Ingredient-C-gP75uQ.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CXWw_gWA.js → InventoryBinding.vue_vue_type_script_setup_true_lang-BpuYVaKl.js} +2 -2
  15. package/dist/{LinkProductSideSheet-5r07FaSs.js → LinkProductSideSheet-DN5fbJVw.js} +3 -3
  16. package/dist/{MenuSetting-HhVipfSP.js → MenuSetting-CjQ6_Ti_.js} +5 -5
  17. package/dist/{PrintRoute-xkZf95vB.js → PrintRoute-DK25vS8X.js} +4 -4
  18. package/dist/{Product-Bn_h8_wa.js → Product-DCEMAuw3.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-3mmMzUVq.js → Product.vue_vue_type_script_setup_true_lang-DCutU0Ny.js} +348 -337
  20. package/dist/{ProductInternalTools-BRsD97bC.js → ProductInternalTools-CiDa1V3D.js} +22 -22
  21. package/dist/{Products-CpDyGrq_.js → Products-DUxtMLiy.js} +50 -50
  22. package/dist/{Publish-Ce67sfIi.js → Publish-Bs5zVwDw.js} +3 -3
  23. package/dist/{Recipe-6pn-8XJc.js → Recipe-_WCpFOU6.js} +4 -4
  24. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-o8JUN34b.js → RuleView.vue_vue_type_script_setup_true_lang-3AVOVYpW.js} +2 -2
  25. package/dist/{Scheduler-DVIqTWNo.js → Scheduler-BqFwfRlm.js} +3 -3
  26. package/dist/{ServingSequence-yaPOAqwr.js → ServingSequence-ByNsE8ha.js} +3 -3
  27. package/dist/{Setting-DCpmd6aM.js → Setting-widqJGfT.js} +5 -5
  28. package/dist/Subcategory-DXaz2g4-.js +345 -0
  29. package/dist/{Takeaway-B8yW3jnm.js → Takeaway-Ce_y1_UW.js} +1 -1
  30. package/dist/{Takeaway-fjsxTI9x.js → Takeaway-DVBJn6re.js} +4 -4
  31. package/dist/Takeaway.vue_vue_type_script_setup_true_lang-DK2Cp2Dg.js +316 -0
  32. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-c0N8J2_E.js → Thumbnail.vue_vue_type_script_setup_true_lang-CAiNaQMP.js} +4 -4
  33. package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-BPs9D7Pq.js +185 -0
  34. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-nFLEeipN.js +6120 -0
  35. package/dist/{Unit-CB7huz6v.js → Unit-XJLHLSYf.js} +2 -2
  36. package/dist/Variant-BA1AQl9-.js +247 -0
  37. package/dist/{_id_-C6pbjMX7.js → _id_-CA2rV7Eb.js} +9 -9
  38. package/dist/app-C9zsFCoJ.js +363 -0
  39. package/dist/{app-C2AxZIV0.js → app-D2Sxejos.js} +1 -1
  40. package/dist/app.js +1 -1
  41. package/dist/apps/mf-menu/src/app.d.ts +264 -0
  42. package/dist/apps/mf-menu/src/components/ProductTranslationDialog.vue.d.ts +41 -0
  43. package/dist/apps/mf-menu/src/components/TranslationBadge.vue.d.ts +29 -0
  44. package/dist/apps/mf-menu/src/components/TranslationFieldSection.vue.d.ts +39 -0
  45. package/dist/apps/mf-menu/src/components/TranslationSideSheet.vue.d.ts +23 -0
  46. package/dist/apps/mf-menu/src/components/feature/ApplyProduct/ApplyProduct.vue.d.ts +12 -0
  47. package/dist/apps/mf-menu/src/components/feature/ApplyProduct/ApplyProductDialog.vue.d.ts +6 -0
  48. package/dist/apps/mf-menu/src/components/feature/ApplyProduct/index.d.ts +54 -0
  49. package/dist/apps/mf-menu/src/components/feature/CategoryManager/Form.vue.d.ts +1 -0
  50. package/dist/apps/mf-menu/src/components/feature/Fields/ImageDropField.vue.d.ts +1 -0
  51. package/dist/apps/mf-menu/src/components/feature/GroupManager/OptionTable.vue.d.ts +16 -0
  52. package/dist/apps/mf-menu/src/components/feature/GroupManager/ProductOverrideTranslation.vue.d.ts +22 -0
  53. package/dist/apps/mf-menu/src/components/feature/GroupManager/UpdateForm.vue.d.ts +6 -0
  54. package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierButton.vue.d.ts +20 -0
  55. package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierForm.vue.d.ts +20 -0
  56. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/category.d.ts +8 -2
  57. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/item.d.ts +24 -1
  58. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/scheduler.d.ts +16 -0
  59. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/useItemFormManagement.d.ts +10 -0
  60. package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/OptionTable.vue.d.ts +16 -0
  61. package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/UpdateForm.vue.d.ts +6 -0
  62. package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/index.d.ts +24 -0
  63. package/dist/apps/mf-menu/src/components/feature/TreeEditor/item/ItemForm.vue.d.ts +30 -0
  64. package/dist/apps/mf-menu/src/components/feature/TreeEditor/menuUtils.d.ts +10 -0
  65. package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +125 -1
  66. package/dist/apps/mf-menu/src/components/feature/VariantManager/ProductVariantTranslation.vue.d.ts +37 -0
  67. package/dist/apps/mf-menu/src/components/import/PreviewAddonContent.vue.d.ts +20 -0
  68. package/dist/apps/mf-menu/src/composable/linkProducts.d.ts +16 -0
  69. package/dist/apps/mf-menu/src/helper/item.d.ts +1 -0
  70. package/dist/apps/mf-menu/src/helper/itemCategories.d.ts +10 -0
  71. package/dist/apps/mf-menu/src/helper/menu.d.ts +11 -0
  72. package/dist/apps/mf-menu/src/helper/menuImport.d.ts +125 -1
  73. package/dist/apps/mf-menu/src/helper/menuSanitizer.d.ts +125 -1
  74. package/dist/apps/mf-menu/src/manager/menu/category.d.ts +8 -2
  75. package/dist/apps/mf-menu/src/manager/menu/group.d.ts +1 -0
  76. package/dist/apps/mf-menu/src/manager/menu/item.d.ts +125 -1
  77. package/dist/apps/mf-menu/src/manager/menu/subcategory.d.ts +6 -0
  78. package/dist/apps/mf-menu/src/stores/manager/item.d.ts +31 -1
  79. package/dist/apps/mf-menu/src/stores/manager/scheduler.d.ts +16 -0
  80. package/dist/apps/mf-menu/src/stores/manager/takeaway.d.ts +9 -0
  81. package/dist/apps/mf-menu/src/stores/menu.d.ts +125 -1
  82. package/dist/apps/mf-menu/src/utils/translation.d.ts +2 -0
  83. package/dist/apps/mf-menu/src/views/Catalog/Edit/AddCategoryDialogContentComponent.vue.d.ts +1 -0
  84. package/dist/apps/mf-menu/src/views/Catalog/Edit/AddProductPopup/Form.vue.d.ts +20 -0
  85. package/dist/apps/mf-menu/src/views/Publish/UpdateCatalogDialog.vue.d.ts +46 -0
  86. package/dist/apps/mf-menu/src/views/Scheduler/FilterForm.vue.d.ts +10 -0
  87. package/dist/apps/mf-menu/src/views/Scheduler/SchedulerDialog.vue.d.ts +10 -0
  88. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  89. package/dist/assets/linked-status-BrleJSCp.js +13 -0
  90. package/dist/assets/menu-export-Da3-wtnw.js +107 -0
  91. package/dist/assets/override-menu-ChjeVe4O.js +13 -0
  92. package/dist/assets/validate-menu-YVTxOfeq.js +13 -0
  93. package/dist/{catalog-CExooVeT.js → catalog-YvUT-JIh.js} +1 -1
  94. package/dist/{catalogSetting-DdEejp3Q.js → catalogSetting-CXOYJZO3.js} +1 -1
  95. package/dist/{currency-Prr2X-1u.js → currency-np4zdWW1.js} +1 -1
  96. package/dist/dayjs.min-CSuLNurY.js +6 -0
  97. package/dist/{index-D3Vh13iX.js → index-3wQe-6lg.js} +1 -1
  98. package/dist/index-CFbB7bM3.js +335 -0
  99. package/dist/index-Cek4Z9eM.js +539 -0
  100. package/dist/{index.vue_vue_type_script_setup_true_lang-BF1UnZ5l.js → index.vue_vue_type_script_setup_true_lang-HZXySVXs.js} +18035 -17833
  101. package/dist/item-DR9qrNf6.js +8117 -0
  102. package/dist/{jszip.min-BQ_xBh4o.js → jszip.min-Bz8ZTO2s.js} +2 -2
  103. package/dist/{menu-B0qJanmj.js → menu-BWsDRctK.js} +1 -1
  104. package/dist/{menuV2-DdCaRGqL.js → menuV2-CfsbyMis.js} +74 -74
  105. package/dist/mf-menu.css +1 -1
  106. package/dist/{priceTier-B-XJVQDe.js → priceTier-BNCJtFVM.js} +1 -1
  107. package/dist/rules-DU-MRKWH.js +212 -0
  108. package/dist/{scheduler-DyVdWsn7.js → scheduler-BizSj8q8.js} +4 -4
  109. package/dist/{toExcel-D0rRKbjh.js → toExcel-DhRigI9c.js} +2 -2
  110. package/dist/translation-BeqjfyEb.js +75 -0
  111. package/dist/{unit-DcHsbLOz.js → unit-CaOym7HP.js} +2 -2
  112. package/package.json +3 -3
  113. package/dist/Category-DJriqKNV.js +0 -392
  114. package/dist/Subcategory-Dsf5NLIa.js +0 -280
  115. package/dist/Takeaway.vue_vue_type_script_setup_true_lang-Bk2edy2M.js +0 -305
  116. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CgF9dq-t.js +0 -6024
  117. package/dist/Variant-DSOF9uPl.js +0 -230
  118. package/dist/app-DPNctjt-.js +0 -363
  119. package/dist/assets/linked-status-DVG3fmWg.js +0 -13
  120. package/dist/assets/menu-export-CVc1O3S8.js +0 -107
  121. package/dist/assets/override-menu-ClMYkz3D.js +0 -13
  122. package/dist/assets/validate-menu-CWDyO0w0.js +0 -13
  123. package/dist/category-3SQRILcp.js +0 -156
  124. package/dist/dayjs.min-BOYFHQRS.js +0 -6
  125. package/dist/index-DBRFZboy.js +0 -273
  126. package/dist/index-TgR8MNiA.js +0 -239
  127. package/dist/item-C2wRl41j.js +0 -6950
  128. package/dist/rules-CIWTZQfh.js +0 -6
  129. package/dist/subcategory-DMfXewrZ.js +0 -148
@@ -1,230 +0,0 @@
1
- import { getCurrentInstance as U, defineComponent as $, computed as g, onMounted as O, h as z, resolveComponent as k, createBlock as F, openBlock as u, unref as t, withCtx as p, createElementBlock as f, Fragment as V, createElementVNode as r, createVNode as i, isRef as I, normalizeClass as L, renderList as R, toDisplayString as C, withModifiers as w, createCommentVNode as G } from "vue";
2
- import { useI18n as N } from "@feedmepos/mf-common";
3
- import { useDialog as Y, useSnackbar as D, FmButtonVariant as M, components as Q, useBreakpoints as q } from "@feedmepos/ui-library";
4
- import { _ as H } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
5
- import { _ as J } from "./app-DPNctjt-.js";
6
- import { G as K, u as P, Q as j, M as W, A as X, a5 as Z } from "./index.vue_vue_type_script_setup_true_lang-BF1UnZ5l.js";
7
- import { V as S } from "./index-TgR8MNiA.js";
8
- import { _ as ee } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
9
- import { u as te } from "./search-BAPEUu1R.js";
10
- import { defineStore as ne } from "pinia";
11
- import { c as oe } from "./createComponentProgrammatically-Bt2rn1IQ.js";
12
- const ae = ne("variant-manager", () => {
13
- const B = Y(), o = D(), _ = K(o), h = j(_);
14
- P();
15
- const d = U(), { t: c } = N(), x = (l) => {
16
- var y, a;
17
- const { vNode: b } = oe(
18
- S,
19
- d,
20
- l
21
- );
22
- (a = (y = b.component) == null ? void 0 : y.exposed) == null || a.trigger();
23
- };
24
- async function m(l) {
25
- x({
26
- initialValue: l
27
- });
28
- }
29
- async function v(l) {
30
- B.open({
31
- title: c("menu.common.dialog.remove.variant.title"),
32
- message: c("menu.common.dialog.remove.variant.message", { name: l.name }),
33
- primaryActions: {
34
- text: c("menu.common.actions.remove"),
35
- close: !0,
36
- variant: M.Destructive
37
- },
38
- secondaryActions: {
39
- text: c("menu.common.actions.cancel"),
40
- close: !0
41
- }
42
- }).onPrimary(async () => {
43
- await h.updateMenu(
44
- {
45
- module: X.F_MENU_MODULE_V4_KEY.enum.variant,
46
- operation: W.F_OPERATION_TYPE.delete,
47
- data: l._id
48
- },
49
- l.name,
50
- !0
51
- );
52
- });
53
- }
54
- return {
55
- deleteVariant: v,
56
- updateVariant: m
57
- };
58
- }), le = {
59
- key: 0,
60
- class: "flex-1 flex flex-col overflow-hidden max-h-[calc(100vh-56px)] gap-8"
61
- }, se = {
62
- class: "flex justify-end"
63
- }, re = {
64
- class: "w-[320px]"
65
- }, ie = {
66
- class: "px-16 py-8"
67
- }, ce = {
68
- class: /* @__PURE__ */ L(["flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100", "pb-64"])
69
- }, me = ["onClick"], ue = {
70
- class: "flex-1 space-y-4"
71
- }, de = {
72
- class: "fm-typo-en-body-lg-600"
73
- }, pe = {
74
- class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
75
- }, fe = {
76
- class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
77
- }, _e = {
78
- key: 1,
79
- class: "xs:pt-16"
80
- }, Se = /* @__PURE__ */ $({
81
- __name: "Variant",
82
- setup(B) {
83
- const {
84
- t: o
85
- } = N(), _ = P(), h = j(K(D())), d = ae(), c = g(() => _.variants.map((a) => ({
86
- ...a,
87
- usedBy: _.items.filter((e) => {
88
- var s;
89
- return (s = e.variant) == null ? void 0 : s.variantGroupIds.includes(a._id);
90
- }).map(({
91
- _id: e
92
- }) => ({
93
- _id: e
94
- }))
95
- }))), {
96
- filter: x,
97
- searchKey: m
98
- } = te(), v = g(() => c.value.filter((a) => {
99
- var e;
100
- return x([a.name, ...((e = a.options) == null ? void 0 : e.map((s) => s.name)) ?? []]);
101
- }));
102
- O(() => _.selectCatalog(null));
103
- const l = g(() => [{
104
- accessorKey: "name",
105
- header: () => o("menu.variant.columns.name"),
106
- size: 360,
107
- enableSorting: !1
108
- }, {
109
- accessorKey: "options",
110
- header: () => o("menu.variant.columns.options"),
111
- size: 560,
112
- enableSorting: !1,
113
- cell: (a) => {
114
- var e;
115
- return (e = a.getValue()) == null ? void 0 : e.map((s) => s.name).join(", ");
116
- }
117
- }, {
118
- accessorKey: "usedBy",
119
- header: () => o("menu.variant.columns.applied_products"),
120
- enableSorting: !1,
121
- size: 180,
122
- cell: (a) => o("menu.common.labels.items_linked", {
123
- count: a.getValue().length
124
- })
125
- }, {
126
- id: "action",
127
- size: 52,
128
- meta: {
129
- cellClass: "pl-16",
130
- headerContentClass: "-mx-16"
131
- },
132
- cell: (a) => z("div", {
133
- class: "w-full flex justify-end items-center"
134
- }, [z(Q.FmButton, {
135
- prependIcon: "delete",
136
- variant: M.Tertiary,
137
- textColor: "neutral-gray-400",
138
- onClick: (e) => {
139
- e.stopPropagation(), d.deleteVariant(a.row.original);
140
- }
141
- })])
142
- }]), b = q(), y = g(() => b.breakpoints.value.xs);
143
- return (a, e) => {
144
- const s = k("fm-search"), A = k("fm-table"), E = k("fm-button");
145
- return u(), F(ee, {
146
- heading: t(o)("menu.variant.title")
147
- }, {
148
- "append-heading": p(() => [c.value.length ? (u(), F(t(S), {
149
- key: 0
150
- }, {
151
- default: p(({
152
- trigger: n
153
- }) => [i(H, {
154
- class: "ml-auto",
155
- label: t(o)("menu.variant.add"),
156
- "prepend-icon": "add",
157
- onClick: w(n, ["stop"])
158
- }, null, 8, ["label", "onClick"])]),
159
- _: 1
160
- })) : G("", !0)]),
161
- default: p(() => [c.value.length ? (u(), f(V, {
162
- key: 0
163
- }, [y.value ? (u(), f(V, {
164
- key: 1
165
- }, [r("div", ie, [i(s, {
166
- autofocus: "",
167
- modelValue: t(m),
168
- "onUpdate:modelValue": e[2] || (e[2] = (n) => I(m) ? m.value = n : null),
169
- placeholder: t(o)("menu.common.labels.search_placeholder", {
170
- type: "variants"
171
- })
172
- }, null, 8, ["modelValue", "placeholder"])]), r("div", ce, [(u(!0), f(V, null, R(v.value, (n) => (u(), f("div", {
173
- key: n._id,
174
- class: L(["py-12 px-16", "flex space-x-8", "items-center", "cursor-pointer"]),
175
- onClick: () => t(d).updateVariant(n)
176
- }, [r("div", ue, [r("p", de, C(n.name), 1), r("div", null, [r("p", pe, C(t(o)("menu.common.labels.items_linked", {
177
- count: n.usedBy.length
178
- })), 1), r("p", fe, C(t(o)("menu.variant.mobile.value", {
179
- values: n.options.map((T) => T.name).join(", ")
180
- })), 1)])]), i(E, {
181
- variant: t(M).Tertiary,
182
- "prepend-icon": "delete",
183
- "text-color": "neutral-gray-400",
184
- onClick: w(() => t(d).deleteVariant(n), ["stop"])
185
- }, null, 8, ["variant", "onClick"])], 8, me))), 128))])], 64)) : (u(), f("div", le, [r("div", se, [r("div", re, [i(s, {
186
- autofocus: "",
187
- modelValue: t(m),
188
- "onUpdate:modelValue": e[0] || (e[0] = (n) => I(m) ? m.value = n : null),
189
- placeholder: t(o)("menu.common.labels.search_placeholder", {
190
- type: "variants"
191
- })
192
- }, null, 8, ["modelValue", "placeholder"])])]), i(J, null, {
193
- default: p(() => [i(A, {
194
- "column-defs": l.value,
195
- loading: t(h).checkMenuIsLoading(),
196
- "page-size": v.value.length,
197
- "row-data": v.value,
198
- "shrink-at": !1,
199
- class: "flex-1 overflow-hidden",
200
- "hide-footer": "",
201
- "pin-header-row": "",
202
- onRowClick: e[1] || (e[1] = (n) => {
203
- t(d).updateVariant(n.original);
204
- })
205
- }, null, 8, ["column-defs", "loading", "page-size", "row-data"])]),
206
- _: 1
207
- })]))], 64)) : (u(), f("div", _e, [i(Z, {
208
- subtitle: t(o)("menu.variant.empty.subtitle"),
209
- title: t(o)("menu.variant.empty.title")
210
- }, {
211
- action: p(() => [i(t(S), null, {
212
- default: p(({
213
- trigger: n
214
- }) => [i(E, {
215
- "prepend-icon": "add",
216
- label: t(o)("menu.variant.add"),
217
- onClick: w(n, ["stop"])
218
- }, null, 8, ["label", "onClick"])]),
219
- _: 1
220
- })]),
221
- _: 1
222
- }, 8, ["subtitle", "title"])]))]),
223
- _: 1
224
- }, 8, ["heading"]);
225
- };
226
- }
227
- });
228
- export {
229
- Se as default
230
- };