@feedmepos/mf-menu 0.32.39-dev.1 → 0.32.40-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 (98) hide show
  1. package/dist/{App-DRncp_Ei.js → App-_MLzeklD.js} +5 -5
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-CkxXD8WW.js → ApplyProduct.vue_vue_type_script_setup_true_lang-UstB0HCf.js} +3 -3
  3. package/dist/{Catalog-DUiSF-WF.js → Catalog-CmM9e7VE.js} +6 -6
  4. package/dist/{Category-DE197NW1.js → Category-C72bnp32.js} +5 -5
  5. package/dist/{Category-DVPD4xrP.js → Category-ab7o-IpT.js} +4 -4
  6. package/dist/{CookingGuide-CHoGojcW.js → CookingGuide-CcW7ludO.js} +4 -4
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-dLiFrsWf.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CfBX_YEE.js} +1 -1
  8. package/dist/{Group-BXV1pM34.js → Group-BSoAjpHp.js} +3 -3
  9. package/dist/{Group-DMegQbpX.js → Group-DD1lzsQY.js} +1 -1
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-C_fcE1nx.js → Group.vue_vue_type_script_setup_true_lang-BUeaIf4N.js} +116 -116
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-wPIx9YCb.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CFeyZvxS.js} +5 -5
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CPMD7DRL.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-C8nNRSHM.js} +1958 -1942
  13. package/dist/{Ingredient-Dfibdd-o.js → Ingredient-824DB4pP.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-BN4dh1LS.js → InventoryBinding.vue_vue_type_script_setup_true_lang-NpqmWdGE.js} +2 -2
  15. package/dist/{LinkProductSideSheet-D6Mqf5Hl.js → LinkProductSideSheet-DdyUWMWm.js} +3 -3
  16. package/dist/{MenuSetting-BESOJBlx.js → MenuSetting-DUX-xalJ.js} +5 -5
  17. package/dist/{PrintRoute-TPhGObk9.js → PrintRoute-CdTJK7Pp.js} +4 -4
  18. package/dist/{Product-Dp6HbElI.js → Product-Cbto_NJg.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-PDIUXdAC.js → Product.vue_vue_type_script_setup_true_lang-CP2VvoZ6.js} +13 -13
  20. package/dist/{ProductInternalTools-LWUFfPxo.js → ProductInternalTools-C_314g2l.js} +5 -5
  21. package/dist/{Products-Do5CagOW.js → Products-BEKsOtCj.js} +19 -19
  22. package/dist/{Publish-BD-AclFq.js → Publish-CN9S-t8t.js} +3 -3
  23. package/dist/{Recipe-Hzo2Izmw.js → Recipe-BCSIDC6j.js} +4 -4
  24. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DhSvT1fH.js → RuleView.vue_vue_type_script_setup_true_lang-DlW4Zx5S.js} +2 -2
  25. package/dist/{Scheduler-pTJ_CkJq.js → Scheduler-ZG2xvJvE.js} +3 -3
  26. package/dist/{ServingSequence-CvwLzA7G.js → ServingSequence-D8moUhOq.js} +3 -3
  27. package/dist/{Setting-BiUPxIvh.js → Setting-BKq7u_IL.js} +5 -5
  28. package/dist/Subcategory-BgTadpyj.js +349 -0
  29. package/dist/{Takeaway-CWNo49PD.js → Takeaway-C9bpWn4s.js} +4 -4
  30. package/dist/{Takeaway-C9dqWzrT.js → Takeaway-DyJrzpN-.js} +1 -1
  31. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CpUGSiIF.js → Takeaway.vue_vue_type_script_setup_true_lang-aFnWB49Z.js} +6 -6
  32. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-D8oVVt5f.js → Thumbnail.vue_vue_type_script_setup_true_lang-MKl8NdrG.js} +4 -4
  33. package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-wnFIuSpr.js +194 -0
  34. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Bye20Huu.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B556mEdE.js} +1907 -1899
  35. package/dist/{Unit-DKV2cfnv.js → Unit-CG_GyiVH.js} +2 -2
  36. package/dist/{Variant-CBr8tub8.js → Variant-D_ZlWQ43.js} +4 -4
  37. package/dist/{_id_-Ce6NN5vT.js → _id_-CSInNRCp.js} +9 -9
  38. package/dist/{app-CImDLyt0.js → app-b4ZmiMK2.js} +26 -26
  39. package/dist/{app-B7B_bbMc.js → app-vIXTx6c7.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-J1LJXkYU.js +13 -0
  68. package/dist/assets/{menu-export-C2ctrNOt.js → menu-export-C4zy8Etx.js} +45 -45
  69. package/dist/assets/override-menu-CwpHJJ36.js +13 -0
  70. package/dist/assets/validate-menu-WYp7xh5-.js +13 -0
  71. package/dist/{catalog-RXap_5ft.js → catalog-Ce7o_N7a.js} +1 -1
  72. package/dist/{catalogSetting-D10sgkdu.js → catalogSetting-CeTOf9lJ.js} +1 -1
  73. package/dist/{currency-CPC6-Naj.js → currency-hq_koFDw.js} +1 -1
  74. package/dist/{dayjs.min-BgxdFykA.js → dayjs.min-UytF3izD.js} +1 -1
  75. package/dist/index-BydcrqXX.js +545 -0
  76. package/dist/{index-D35XBgVx.js → index-DYh6XlbG.js} +1 -1
  77. package/dist/{index-BWlfJ1Hv.js → index-WFUD7oh5.js} +58 -54
  78. package/dist/{index.vue_vue_type_script_setup_true_lang-CbdGF_YP.js → index.vue_vue_type_script_setup_true_lang-DOhr-m71.js} +14226 -14185
  79. package/dist/{item-Chx3oZ7b.js → item-BBqfgtk1.js} +2968 -2926
  80. package/dist/{jszip.min-DH0CoV5k.js → jszip.min-C4UMTEuA.js} +2 -2
  81. package/dist/{menu-DZhJl6lE.js → menu-CGK50Gwb.js} +1 -1
  82. package/dist/{menuV2-B1fegOdA.js → menuV2-DiyUO2p3.js} +50 -50
  83. package/dist/mf-menu.css +1 -1
  84. package/dist/{priceTier-C-ocPg-3.js → priceTier-eEeeQpw0.js} +1 -1
  85. package/dist/rules-BDtO9_2x.js +216 -0
  86. package/dist/{scheduler-J-XrlyVY.js → scheduler-C-UR0pvC.js} +4 -4
  87. package/dist/{toExcel-C9btsoRs.js → toExcel-Dr3CybYc.js} +2 -2
  88. package/dist/translation-Cdap0IVg.js +79 -0
  89. package/dist/{unit-Gtkb_1WB.js → unit-DMQom_GI.js} +2 -2
  90. package/package.json +3 -3
  91. package/dist/Subcategory-BpWPnu4s.js +0 -345
  92. package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-BSfPHkEr.js +0 -185
  93. package/dist/assets/linked-status-uqBsZwlR.js +0 -13
  94. package/dist/assets/override-menu-C-S-pdcA.js +0 -13
  95. package/dist/assets/validate-menu-D4bw2s4G.js +0 -13
  96. package/dist/index-B6yzhB_O.js +0 -539
  97. package/dist/rules-BBgzPaJ8.js +0 -212
  98. 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-CbdGF_YP.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-B1fegOdA.js";
6
- import { _ as k } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-BSfPHkEr.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
- };