@feedmepos/mf-menu 0.32.39 → 0.32.40

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 (97) hide show
  1. package/dist/{App-Dg5GweBn.js → App-DqpxV0zp.js} +5 -5
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DliryTNe.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BQM40AWC.js} +3 -3
  3. package/dist/{Catalog-Cb66nkUU.js → Catalog-RdpK3RmL.js} +6 -6
  4. package/dist/{Category-CPFnvBBy.js → Category-DbvCHZU4.js} +5 -5
  5. package/dist/{Category-Cfd8CPSx.js → Category-ar15UpWV.js} +4 -4
  6. package/dist/{CookingGuide-DSHWh9Gt.js → CookingGuide-x2w_WTnE.js} +4 -4
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-DaCFX7KY.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-pRoVDEEM.js} +1 -1
  8. package/dist/{Group-DMmXyHKE.js → Group-D30WEl2L.js} +1 -1
  9. package/dist/{Group-CULwhVe7.js → Group-DevhimQn.js} +3 -3
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-BPXbprJG.js → Group.vue_vue_type_script_setup_true_lang-BY3nr67e.js} +116 -116
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-7y3GRcrl.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CPvumpiM.js} +5 -5
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-BrMdia8X.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-hEPchEwW.js} +1958 -1942
  13. package/dist/{Ingredient-BTeAgBic.js → Ingredient-CiJSeTgO.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-B373qMOc.js → InventoryBinding.vue_vue_type_script_setup_true_lang-Cnq9QAeQ.js} +2 -2
  15. package/dist/{LinkProductSideSheet-BQC5B7VR.js → LinkProductSideSheet-CJxffg6I.js} +3 -3
  16. package/dist/{MenuSetting-QrTjKewy.js → MenuSetting-BMuUIgLN.js} +5 -5
  17. package/dist/{PrintRoute-Cw_fjZuS.js → PrintRoute-Uu2n0dAY.js} +4 -4
  18. package/dist/{Product-TfZZCFxL.js → Product-e81DLAaw.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-Cf02oa8B.js → Product.vue_vue_type_script_setup_true_lang-1axfwskP.js} +13 -13
  20. package/dist/{ProductInternalTools--2ISZa9C.js → ProductInternalTools-BiK5b7KA.js} +5 -5
  21. package/dist/{Products-CU17YbjY.js → Products-DOIcfgzd.js} +65 -65
  22. package/dist/{Publish-C92_8tJc.js → Publish-d_T1ROxG.js} +3 -3
  23. package/dist/{Recipe-rN_AUIzI.js → Recipe-QIACzb3h.js} +4 -4
  24. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-Be33vMlU.js → RuleView.vue_vue_type_script_setup_true_lang-01qpukRE.js} +2 -2
  25. package/dist/{Scheduler-udXY9Nxw.js → Scheduler-VxoCoh9o.js} +3 -3
  26. package/dist/{ServingSequence-lqstj5IH.js → ServingSequence-C7aNpyh4.js} +3 -3
  27. package/dist/{Setting-C8hhG68F.js → Setting-BzoqHU2T.js} +5 -5
  28. package/dist/Subcategory-dyK9h6SV.js +349 -0
  29. package/dist/{Takeaway-_ZUqMNYd.js → Takeaway-C3UnFVOa.js} +1 -1
  30. package/dist/{Takeaway-BNXBkxY3.js → Takeaway-DxLGfrmv.js} +4 -4
  31. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-DpIu-F5W.js → Takeaway.vue_vue_type_script_setup_true_lang-zsgXKNRt.js} +6 -6
  32. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-D7Rx1dQ0.js → Thumbnail.vue_vue_type_script_setup_true_lang-Ba0ZuCdS.js} +4 -4
  33. package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-Xfmvx9wx.js +194 -0
  34. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-blAi_T2i.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang--vNq7F0Z.js} +1907 -1899
  35. package/dist/{Unit-Cb5D0Twk.js → Unit-Clc8AYHy.js} +2 -2
  36. package/dist/{Variant-CFwv2HLG.js → Variant-DOGe2aJK.js} +4 -4
  37. package/dist/{_id_-DfRWmsAf.js → _id_-Bbc2mu9G.js} +9 -9
  38. package/dist/{app-H7J5uHZg.js → app-BSpY6Pgy.js} +26 -26
  39. package/dist/{app-CEN10-4D.js → app-DQD4sPc8.js} +1 -1
  40. package/dist/app.js +1 -1
  41. package/dist/apps/mf-menu/src/components/ProductTranslationDialog.vue.d.ts +4 -0
  42. package/dist/apps/mf-menu/src/components/TranslationFieldSection.vue.d.ts +7 -3
  43. package/dist/apps/mf-menu/src/components/TranslationSideSheet.vue.d.ts +2 -0
  44. package/dist/apps/mf-menu/src/components/feature/ApplyProduct/index.d.ts +6 -0
  45. package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierButton.vue.d.ts +6 -0
  46. package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierForm.vue.d.ts +6 -0
  47. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/item.d.ts +6 -0
  48. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/scheduler.d.ts +3 -0
  49. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/useItemFormManagement.d.ts +3 -0
  50. package/dist/apps/mf-menu/src/components/feature/TreeEditor/item/ItemForm.vue.d.ts +9 -0
  51. package/dist/apps/mf-menu/src/components/feature/TreeEditor/menuUtils.d.ts +3 -0
  52. package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +7 -0
  53. package/dist/apps/mf-menu/src/components/import/PreviewAddonContent.vue.d.ts +6 -0
  54. package/dist/apps/mf-menu/src/composable/linkProducts.d.ts +3 -0
  55. package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +17 -0
  56. package/dist/apps/mf-menu/src/helper/itemCategories.d.ts +3 -0
  57. package/dist/apps/mf-menu/src/helper/menu.d.ts +3 -0
  58. package/dist/apps/mf-menu/src/helper/menuExport.d.ts +2 -2
  59. package/dist/apps/mf-menu/src/helper/menuImport.d.ts +7 -0
  60. package/dist/apps/mf-menu/src/helper/menuSanitizer.d.ts +7 -0
  61. package/dist/apps/mf-menu/src/manager/menu/item.d.ts +7 -0
  62. package/dist/apps/mf-menu/src/stores/manager/item.d.ts +9 -0
  63. package/dist/apps/mf-menu/src/stores/manager/scheduler.d.ts +3 -0
  64. package/dist/apps/mf-menu/src/stores/menu.d.ts +7 -0
  65. package/dist/apps/mf-menu/src/views/Catalog/Edit/AddProductPopup/Form.vue.d.ts +6 -0
  66. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  67. package/dist/assets/linked-status-DojmxFzq.js +13 -0
  68. package/dist/assets/{menu-export-B_zRmLzS.js → menu-export-rmsdV9dK.js} +45 -45
  69. package/dist/assets/override-menu-CVjWw9he.js +13 -0
  70. package/dist/assets/{validate-menu-D4jvSNmz.js → validate-menu-BB1XuZ9d.js} +6 -6
  71. package/dist/{catalog-CTuBk61t.js → catalog-ku3nqGmL.js} +1 -1
  72. package/dist/{catalogSetting-DKVNY3JC.js → catalogSetting-CpgLgy9o.js} +1 -1
  73. package/dist/{currency--QAX2jgM.js → currency-B58wqs-1.js} +1 -1
  74. package/dist/{dayjs.min-Dyhv-966.js → dayjs.min-Dj2ONTtr.js} +1 -1
  75. package/dist/index-BGm9S8Ih.js +545 -0
  76. package/dist/{index-CCM6nQtW.js → index-ByMVMoTu.js} +1 -1
  77. package/dist/{index-IWdfpOvK.js → index-CPY_DjD2.js} +58 -54
  78. package/dist/{index.vue_vue_type_script_setup_true_lang-90aRfAsI.js → index.vue_vue_type_script_setup_true_lang-IHmRgZTC.js} +13190 -13149
  79. package/dist/{item-CKij6BhH.js → item-DotiWZRv.js} +2967 -2925
  80. package/dist/{jszip.min-C-AOVv_w.js → jszip.min-OZZMb1gD.js} +2 -2
  81. package/dist/{menu-CX5qZa4q.js → menu-v_Cm5BNh.js} +1 -1
  82. package/dist/{menuV2-CgfWTiZp.js → menuV2-DsvYmLeh.js} +139 -139
  83. package/dist/mf-menu.css +1 -1
  84. package/dist/{priceTier-CKw6yKzC.js → priceTier-BQeJLJUu.js} +1 -1
  85. package/dist/rules-D3qosTfl.js +216 -0
  86. package/dist/{scheduler-CbytS4GA.js → scheduler-B32ag1lR.js} +4 -4
  87. package/dist/{toExcel-1Ir0pgiS.js → toExcel-CIrCsrWL.js} +2 -2
  88. package/dist/translation-Cdap0IVg.js +79 -0
  89. package/dist/{unit-DQOMjCVi.js → unit-y1on6-W3.js} +2 -2
  90. package/package.json +3 -3
  91. package/dist/Subcategory-BSAn0r8r.js +0 -345
  92. package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-C9byidEd.js +0 -185
  93. package/dist/assets/linked-status-D22Wz7QM.js +0 -13
  94. package/dist/assets/override-menu-96YpbKTz.js +0 -13
  95. package/dist/index-ulGt0shB.js +0 -539
  96. package/dist/rules-CoyaaNMj.js +0 -212
  97. package/dist/translation-BeqjfyEb.js +0 -75
@@ -1,212 +0,0 @@
1
- import { defineComponent as h, watch as T, ref as v, computed as U, resolveComponent as y, createElementBlock as A, openBlock as F, Fragment as N, createVNode as d, unref as f, withCtx as g, createElementVNode as O, renderList as Y, toDisplayString as P } from "vue";
2
- import { M as b, A as E, u as I } from "./index.vue_vue_type_script_setup_true_lang-90aRfAsI.js";
3
- import { useI18n as S } from "@feedmepos/mf-common";
4
- import { useDialogChild as q } from "@feedmepos/ui-library";
5
- import { u as L } from "./menuV2-CgfWTiZp.js";
6
- import { _ as k } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-C9byidEd.js";
7
- import { g as w } from "./translation-BeqjfyEb.js";
8
- const K = { class: "py-12 px-16 space-y-4" }, D = /* @__PURE__ */ h({
9
- __name: "AddSubcategoryDialogContentComponent",
10
- props: {
11
- initialValue: {}
12
- },
13
- setup(o) {
14
- const r = o, { t: m } = S();
15
- T(
16
- () => r.initialValue,
17
- (n) => {
18
- t.value = n ?? "";
19
- }
20
- );
21
- const t = v(r.initialValue), u = v(!1), s = v(void 0), { emitData: M, emitAction: V } = q(), C = U(() => !!t.value), a = U(() => {
22
- var _;
23
- const n = [], l = "en-US", x = (_ = s.value) == null ? void 0 : _[l];
24
- return t.value && !x && n.push({
25
- locale: l,
26
- name: t.value,
27
- localeDisplay: w(l)
28
- }), s.value && Object.entries(s.value).filter(([p, c]) => c && c.trim()).sort(([p], [c]) => p.localeCompare(c)).forEach(([p, c]) => {
29
- n.push({
30
- locale: p,
31
- name: c,
32
- localeDisplay: w(p)
33
- });
34
- }), n;
35
- });
36
- function e(n) {
37
- s.value = n;
38
- }
39
- return T(
40
- [t, s],
41
- ([n, l]) => {
42
- M({ name: n, name_locale: l });
43
- },
44
- {
45
- immediate: !0
46
- }
47
- ), (n, l) => {
48
- const x = y("fm-button"), _ = y("FmTooltip"), p = y("fm-text-field"), c = y("FmForm");
49
- return F(), A(N, null, [
50
- d(c, {
51
- onValidationSuccess: l[2] || (l[2] = (i) => f(V)("primary"))
52
- }, {
53
- default: g(() => [
54
- d(p, {
55
- modelValue: t.value,
56
- "onUpdate:modelValue": l[1] || (l[1] = (i) => t.value = i),
57
- rules: [(i) => !!i || f(m)("menu.subcategory.dialog.add.name.required")],
58
- autofocus: "",
59
- label: f(m)("menu.subcategory.dialog.add.name.label"),
60
- placeholder: f(m)("menu.subcategory.dialog.add.name.placeholder")
61
- }, {
62
- append: g(() => [
63
- d(_, {
64
- variant: "plain",
65
- placement: "top",
66
- "z-index": 999
67
- }, {
68
- content: g(() => [
69
- O("div", K, [
70
- (F(!0), A(N, null, Y(a.value, (i) => (F(), A("div", {
71
- key: i.locale
72
- }, P(i.name) + " (" + P(i.localeDisplay) + ") ", 1))), 128))
73
- ])
74
- ]),
75
- default: g(() => [
76
- d(x, {
77
- variant: "tertiary",
78
- icon: "g_translate",
79
- onClick: l[0] || (l[0] = (i) => u.value = !0),
80
- disabled: !C.value
81
- }, null, 8, ["disabled"])
82
- ]),
83
- _: 1
84
- })
85
- ]),
86
- _: 1
87
- }, 8, ["modelValue", "rules", "label", "placeholder"])
88
- ]),
89
- _: 1
90
- }),
91
- d(k, {
92
- modelValue: u.value,
93
- "onUpdate:modelValue": l[3] || (l[3] = (i) => u.value = i),
94
- title: f(m)("menu.subcategory.title"),
95
- name: t.value ?? "",
96
- "name-locale": s.value,
97
- "onUpdate:nameLocale": e
98
- }, null, 8, ["modelValue", "title", "name", "name-locale"])
99
- ], 64);
100
- };
101
- }
102
- }), J = ({
103
- dialog: o,
104
- menuLoader: r,
105
- isLocalOnly: m = !1
106
- }) => {
107
- const { t } = S(), u = L().updateMenu;
108
- function s() {
109
- const a = v(!1);
110
- o.open({
111
- title: t("menu.subcategory.manager.dialog.add.title"),
112
- contentComponent: D,
113
- primaryActions: {
114
- text: t("menu.subcategory.manager.dialog.add.action"),
115
- close: !1,
116
- isLoading: a
117
- },
118
- secondaryActions: {
119
- text: t("menu.common.actions.cancel"),
120
- close: !0
121
- }
122
- }).onPrimary(async (e) => {
123
- if (e != null && e.name)
124
- try {
125
- a.value = !0;
126
- const n = {
127
- module: E.F_MENU_MODULE_V4_KEY.enum.subCategory,
128
- operation: b.F_OPERATION_TYPE.create,
129
- data: {
130
- name: e.name,
131
- name_locale: e.name_locale,
132
- position: I().subcategories.length
133
- }
134
- };
135
- m ? await u(n) : await r.updateMenu(n, e.name), o.close();
136
- } finally {
137
- a.value = !1;
138
- }
139
- });
140
- }
141
- function M(a) {
142
- o.open({
143
- title: t("menu.subcategory.manager.dialog.update.title"),
144
- contentComponent: D,
145
- contentComponentProps: {
146
- initialValue: a.name
147
- },
148
- primaryActions: {
149
- text: t("menu.subcategory.manager.dialog.update.action"),
150
- close: !1
151
- },
152
- secondaryActions: {
153
- text: t("menu.common.actions.cancel"),
154
- close: !0
155
- }
156
- }).onPrimary(async (e) => {
157
- if (!(e != null && e.name)) return;
158
- const n = {
159
- module: E.F_MENU_MODULE_V4_KEY.enum.subCategory,
160
- operation: b.F_OPERATION_TYPE.update,
161
- data: {
162
- ...a,
163
- name: e.name,
164
- name_locale: e.name_locale
165
- }
166
- };
167
- m ? await u(n) : await r.updateMenu(n, e.name), o.close();
168
- });
169
- }
170
- function V(a) {
171
- o.open({
172
- title: t("menu.common.dialog.remove.subcategory.title"),
173
- message: t("menu.common.dialog.remove.subcategory.message", { name: a.name }),
174
- primaryActions: {
175
- text: t("menu.common.actions.remove"),
176
- close: !1
177
- },
178
- secondaryActions: {
179
- text: t("menu.common.actions.cancel"),
180
- close: !0
181
- }
182
- }).onPrimary(async () => {
183
- const e = {
184
- module: E.F_MENU_MODULE_V4_KEY.enum.subCategory,
185
- operation: b.F_OPERATION_TYPE.delete,
186
- data: a._id
187
- };
188
- m ? await u(e) : await r.updateMenu(e, a.name, !0), o.close();
189
- });
190
- }
191
- async function C(a) {
192
- const e = {
193
- module: E.F_MENU_MODULE_V4_KEY.enum.subCategory,
194
- operation: b.F_OPERATION_TYPE.rearrange,
195
- data: a
196
- };
197
- m ? await u(e) : await r.updateMenu(e, "Subcategories");
198
- }
199
- return {
200
- create: s,
201
- update: M,
202
- deleteSubcategory: V,
203
- rearrange: C
204
- };
205
- };
206
- function Q(o, r = "This field can't be empty.") {
207
- return o == null || Array.isArray(o) && o.length === 0 || typeof o == "string" && o.trim() === "" ? r : !0;
208
- }
209
- export {
210
- Q as r,
211
- J as u
212
- };
@@ -1,75 +0,0 @@
1
- import { defineComponent as c, createElementBlock as p, openBlock as o, normalizeClass as u, unref as d, toDisplayString as m, resolveComponent as t, createVNode as i, createBlock as s } from "vue";
2
- const f = /* @__PURE__ */ c({
3
- __name: "TranslationBadge",
4
- props: {
5
- label: {},
6
- spacing: { default: "md" }
7
- },
8
- setup(l) {
9
- const a = l.spacing === "sm" ? "mb-4" : "mb-8";
10
- return (n, r) => (o(), p("p", {
11
- class: u([
12
- "fm-typo-en-body-sm-600 text-fm-color-typo-secondary border inline-block rounded-full px-8 py-4",
13
- d(a)
14
- ])
15
- }, m(n.label), 3));
16
- }
17
- }), h = /* @__PURE__ */ c({
18
- __name: "TranslationFieldSection",
19
- props: {
20
- label: {},
21
- modelValue: {},
22
- type: { default: "text" },
23
- readonly: { type: Boolean, default: !0 },
24
- spacing: { default: "md" },
25
- placeholder: {}
26
- },
27
- setup(l) {
28
- return (e, a) => {
29
- const n = t("FmTextField"), r = t("fm-textarea");
30
- return o(), p("div", null, [
31
- i(f, {
32
- label: e.label,
33
- spacing: e.spacing
34
- }, null, 8, ["label", "spacing"]),
35
- e.type === "text" ? (o(), s(n, {
36
- key: 0,
37
- "model-value": e.modelValue,
38
- readonly: e.readonly,
39
- placeholder: e.placeholder
40
- }, null, 8, ["model-value", "readonly", "placeholder"])) : (o(), s(r, {
41
- key: 1,
42
- "model-value": e.modelValue,
43
- readonly: e.readonly,
44
- placeholder: e.placeholder
45
- }, null, 8, ["model-value", "readonly", "placeholder"]))
46
- ]);
47
- };
48
- }
49
- });
50
- function b(l) {
51
- switch (l) {
52
- case "en-US":
53
- return "EN";
54
- case "zh-CN":
55
- return "简";
56
- case "th-TH":
57
- return "TH";
58
- case "ja-JP":
59
- return "JP";
60
- case "zh-Hant":
61
- return "繁";
62
- default:
63
- return "";
64
- }
65
- }
66
- function g(l, e) {
67
- const a = d(e).find((n) => n.code === l);
68
- return (a == null ? void 0 : a.name) || l;
69
- }
70
- export {
71
- h as _,
72
- g as a,
73
- f as b,
74
- b as g
75
- };