@feedmepos/mf-menu 0.20.2 → 0.20.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.
Files changed (53) hide show
  1. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-Ds2qfY_X.js → ApplyProduct.vue_vue_type_script_setup_true_lang-DwTwUBHZ.js} +2 -2
  2. package/dist/{ApplyProducts.vue_vue_type_script_setup_true_lang-BRepaPR3.js → ApplyProducts.vue_vue_type_script_setup_true_lang-BZG7Ya6Y.js} +2 -2
  3. package/dist/{Catalog-S5KDEWzG.js → Catalog-C5BXrhPP.js} +3 -3
  4. package/dist/{Category-DLaNEtA5.js → Category-CpTm1rg3.js} +6 -6
  5. package/dist/{CookingGuide-DSGZapxz.js → CookingGuide-Dpp9o1JY.js} +4 -4
  6. package/dist/{Group-CBMSkmwQ.js → Group-DJxPCFma.js} +1 -1
  7. package/dist/{Group-B0VQ-64x.js → Group-sr9GoXZa.js} +4 -4
  8. package/dist/{Group.vue_vue_type_script_setup_true_lang-DKzrhXtM.js → Group.vue_vue_type_script_setup_true_lang-B7fTVzh9.js} +43 -43
  9. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BV-FC8tM.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B64yEcae.js} +2 -2
  10. package/dist/{Ingredient-CnPQ0kiR.js → Ingredient-CI1qBsqE.js} +5 -5
  11. package/dist/{LinkProductSideSheet-A26Otbdm.js → LinkProductSideSheet-Drg8cNHU.js} +9 -9
  12. package/dist/{PrintRoute-BlJMdPP0.js → PrintRoute-C3sIwh5a.js} +3 -3
  13. package/dist/{Product-BvD813LL.js → Product-BXH8VQKX.js} +1 -1
  14. package/dist/{Product.vue_vue_type_script_setup_true_lang-D_oKtXbh.js → Product.vue_vue_type_script_setup_true_lang-DYP83xUs.js} +12 -12
  15. package/dist/{Products-B8Ok-bkN.js → Products-BWnHcHPG.js} +8 -8
  16. package/dist/{Publish-qBiJUQ4X.js → Publish-T_vCwIz0.js} +33 -33
  17. package/dist/{Recipe-CJxJJAUV.js → Recipe-DRXR_aqS.js} +34 -34
  18. package/dist/{Scheduler-DfAMwXCu.js → Scheduler-BsDC-IO7.js} +2 -2
  19. package/dist/{SchedulerSelector.vue_vue_type_script_setup_true_lang-CArE_Hua.js → SchedulerSelector.vue_vue_type_script_setup_true_lang-Cnoku5ln.js} +1 -1
  20. package/dist/ServingSequence-Dqx8sEIw.js +4 -0
  21. package/dist/{Setting-BbgJcWsN.js → Setting-voFN_-pX.js} +1 -1
  22. package/dist/{Setting.vue_vue_type_script_setup_true_lang-BbVEzNve.js → Setting.vue_vue_type_script_setup_true_lang-vO7KKEcE.js} +3 -3
  23. package/dist/{Takeaway-CMDFYeUw.js → Takeaway-BS3y1Co9.js} +1 -1
  24. package/dist/{Takeaway-wAXsZQN2.js → Takeaway-BZNKPAIO.js} +4 -4
  25. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-DSphRs_i.js → Takeaway.vue_vue_type_script_setup_true_lang-CGU-A2tn.js} +4 -4
  26. package/dist/{TaxSetting-C1XOTv-9.js → TaxSetting-Bg5GswMY.js} +4 -4
  27. package/dist/{Unit-BW3iqgp8.js → Unit-BIQGUWnn.js} +2 -2
  28. package/dist/{Variant-BJIxp9PJ.js → Variant-BsE3DliN.js} +2 -2
  29. package/dist/{_id_-B25OxuPV.js → _id_-nwzDvUSZ.js} +6 -6
  30. package/dist/{app-BFJlAowN.js → app-DPQYBZQl.js} +83471 -73090
  31. package/dist/app.js +2 -2
  32. package/dist/assets/linked-status-_dZBe-KP.js +24 -0
  33. package/dist/assets/validate-menu-DG5wVtaT.js +24 -0
  34. package/dist/{catalog-Do7RfIKm.js → catalog-CYZ0463N.js} +22549 -22547
  35. package/dist/{catalog-B-Z6lEFK.js → catalog-Ez6mUaCd.js} +1 -1
  36. package/dist/{category-DEWEor3m.js → category-1S2ifJD8.js} +14 -14
  37. package/dist/{currency-33gUke3q.js → currency-D4RRRzjV.js} +1 -1
  38. package/dist/index-AkLsIcs2.js +7392 -0
  39. package/dist/{index-BEdHzZvu.js → index-B4FPNVpj.js} +44 -44
  40. package/dist/{item-BooojPpg.js → item-AtZKXXux.js} +930 -930
  41. package/dist/{lodash-247YxYiQ.js → lodash-C05hYW_e.js} +439 -439
  42. package/dist/{menu-DCnWrgH7.js → menu-DXRd3wdK.js} +1 -1
  43. package/dist/{object-B2cP_UeG.js → object-D-ZNxSWx.js} +19 -19
  44. package/dist/{scheduler-0cChIv2I.js → scheduler-DnjnY3od.js} +4 -4
  45. package/dist/{takeaway-mwqVQ1ij.js → takeaway-yk6LDZ8E.js} +4 -4
  46. package/dist/{toExcel-Dha8Vf3u.js → toExcel-C_5sNbcQ.js} +237 -237
  47. package/dist/{unit-BgfdgXAu.js → unit-CIgHfClT.js} +3 -3
  48. package/dist/{vuedraggable-BEszc36M.js → vuedraggable-WU01qJgi.js} +110 -110
  49. package/package.json +1 -1
  50. package/dist/ServingSequence-DxDMeto7.js +0 -4
  51. package/dist/assets/linked-status-4i88AmvK.js +0 -24
  52. package/dist/assets/validate-menu-CTKwgXfw.js +0 -24
  53. package/dist/index-BXl09ebx.js +0 -21908
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as G, computed as E, ref as x, watch as C, resolveComponent as g, openBlock as V, createElementBlock as F, Fragment as K, renderSlot as j, createVNode as s, unref as n, withCtx as m, createElementVNode as d, toDisplayString as H, normalizeClass as J, createBlock as M, createCommentVNode as U, createSlots as Q } from "vue";
2
- import { i as W, a as X, d as f, m as S, g as Z, b as B, h as D } from "./app-BFJlAowN.js";
3
- import { useSnackbar as ee, components as te } from "@feedmepos/ui-library";
4
- import { d as ae } from "./vuedraggable-BEszc36M.js";
5
- import { _ as ne } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-Ds2qfY_X.js";
2
+ import { i as W, a as X, d as f, m as D, g as Z, b as S, h as B } from "./app-DPQYBZQl.js";
3
+ import { useSnackbar as ee, components as ae } from "@feedmepos/ui-library";
4
+ import { V as te } from "./vuedraggable-WU01qJgi.js";
5
+ import { _ as ne } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-DwTwUBHZ.js";
6
6
  import { _ as oe } from "./FormSection.vue_vue_type_script_setup_true_lang-BWJUD8NZ.js";
7
7
  import { _ as le } from "./FormItem.vue_vue_type_script_setup_true_lang-DKsxEK-8.js";
8
- import { u as ie, l as se } from "./lodash-247YxYiQ.js";
8
+ import { u as ie, l as se } from "./lodash-C05hYW_e.js";
9
9
  import { useI18n as re } from "@feedmepos/mf-common";
10
10
  const ue = { class: "fm-typo-en-title-md-600" }, me = { class: "py-16 space-y-32" }, de = ["data-not-allow-sort"], ce = {
11
11
  key: 1,
@@ -26,20 +26,20 @@ const ue = { class: "fm-typo-en-title-md-600" }, me = { class: "py-16 space-y-32
26
26
  name: ""
27
27
  }), e;
28
28
  } else
29
- return { ...S.generator.initMenuV4VariantGroup(), usedBy: [] };
30
- }, t = x(O()), y = x(!1), i = x(!1), b = (e) => {
29
+ return { ...D.generator.initMenuV4VariantGroup(), usedBy: [] };
30
+ }, a = x(O()), y = x(!1), i = x(!1), b = (e) => {
31
31
  Z.isBoolean(e) ? i.value = e : i.value = !i.value;
32
32
  };
33
33
  function $(e) {
34
- t.value.options = e;
34
+ a.value.options = e;
35
35
  }
36
- function q(e, a) {
37
- const l = f(t.value.options), c = l.findIndex((v) => v._id == e);
38
- l[c].name = a, t.value.options = l, c === t.value.options.length - 1 && w();
36
+ function q(e, t) {
37
+ const l = f(a.value.options), c = l.findIndex((v) => v._id == e);
38
+ l[c].name = t, a.value.options = l, c === a.value.options.length - 1 && w();
39
39
  }
40
40
  function w() {
41
- const e = f(t.value.options);
42
- t.value.options = [
41
+ const e = f(a.value.options);
42
+ a.value.options = [
43
43
  ...e,
44
44
  {
45
45
  _id: (/* @__PURE__ */ new Date()).toISOString(),
@@ -48,11 +48,11 @@ const ue = { class: "fm-typo-en-title-md-600" }, me = { class: "py-16 space-y-32
48
48
  ];
49
49
  }
50
50
  function z(e) {
51
- const a = f(t.value.options);
52
- t.value.options = a.filter((l) => l._id !== e);
51
+ const t = f(a.value.options);
52
+ a.value.options = t.filter((l) => l._id !== e);
53
53
  }
54
54
  C(
55
- () => t.value.options,
55
+ () => a.value.options,
56
56
  (e) => {
57
57
  e.length <= 0 && w();
58
58
  },
@@ -61,16 +61,16 @@ const ue = { class: "fm-typo-en-title-md-600" }, me = { class: "py-16 space-y-32
61
61
  }
62
62
  );
63
63
  function P(e) {
64
- const a = e.draggedContext.futureIndex, l = e.relatedContext.list;
65
- return a !== l.length - 1;
64
+ const t = e.draggedContext.futureIndex, l = e.relatedContext.list;
65
+ return t !== l.length - 1;
66
66
  }
67
67
  const T = ie(
68
68
  () => {
69
69
  if (r.initialValue) {
70
- const e = t.value.options.filter((a) => !!a.name.trim());
71
- return !se.isEqual({ ...t.value, options: e }, r.initialValue);
70
+ const e = a.value.options.filter((t) => !!t.name.trim());
71
+ return !se.isEqual({ ...a.value, options: e }, r.initialValue);
72
72
  } else
73
- return !!(t.value.options.length > 1 || t.value.name.trim());
73
+ return !!(a.value.options.length > 1 || a.value.name.trim());
74
74
  },
75
75
  () => {
76
76
  i.value = !1;
@@ -78,22 +78,22 @@ const ue = { class: "fm-typo-en-title-md-600" }, me = { class: "py-16 space-y-32
78
78
  ), Y = async () => {
79
79
  try {
80
80
  y.value = !0;
81
- const e = f(t.value);
82
- e.options = e.options.filter((a) => !!a.name.trim()), r.initialValue ? await k.updateMenu(
81
+ const e = f(a.value);
82
+ e.options = e.options.filter((t) => !!t.name.trim()), r.initialValue ? await k.updateMenu(
83
83
  {
84
- module: B.F_MENU_MODULE_V4_KEY.enum.variant,
85
- operation: D.F_OPERATION_TYPE.update,
84
+ module: S.F_MENU_MODULE_V4_KEY.enum.variant,
85
+ operation: B.F_OPERATION_TYPE.update,
86
86
  data: e
87
87
  },
88
88
  e.name
89
89
  ) : await k.updateMenu(
90
90
  {
91
- module: B.F_MENU_MODULE_V4_KEY.enum.variant,
92
- operation: D.F_OPERATION_TYPE.create,
91
+ module: S.F_MENU_MODULE_V4_KEY.enum.variant,
92
+ operation: B.F_OPERATION_TYPE.create,
93
93
  data: e
94
94
  },
95
95
  e.name
96
- ), b(!1), t.value = { ...S.generator.initMenuV4VariantGroup(), usedBy: [] };
96
+ ), b(!1), a.value = { ...D.generator.initMenuV4VariantGroup(), usedBy: [] };
97
97
  } finally {
98
98
  y.value = !1;
99
99
  }
@@ -101,20 +101,20 @@ const ue = { class: "fm-typo-en-title-md-600" }, me = { class: "py-16 space-y-32
101
101
  return C(
102
102
  () => i.value,
103
103
  (e) => {
104
- e && (t.value = O());
104
+ e && (a.value = O());
105
105
  }
106
106
  ), N({
107
107
  show: i,
108
108
  trigger: b
109
- }), (e, a) => {
109
+ }), (e, t) => {
110
110
  const l = g("fm-text-field"), c = g("fm-icon"), v = g("fm-button"), R = g("fm-side-sheet");
111
111
  return V(), F(K, null, [
112
112
  j(e.$slots, "default", { trigger: b }),
113
113
  s(R, {
114
114
  id: "variant-form",
115
115
  modelValue: i.value,
116
- "onUpdate:modelValue": a[2] || (a[2] = (_) => i.value = _),
117
- "is-container": n(te).FmForm,
116
+ "onUpdate:modelValue": t[2] || (t[2] = (_) => i.value = _),
117
+ "is-container": n(ae).FmForm,
118
118
  "is-container-props": {
119
119
  onValidationSuccess: Y,
120
120
  blameFormChildOnValidationFailed: !0
@@ -139,7 +139,7 @@ const ue = { class: "fm-typo-en-title-md-600" }, me = { class: "py-16 space-y-32
139
139
  label: n(o)("menu.common.actions.cancel"),
140
140
  size: "lg",
141
141
  variant: "tertiary",
142
- onClick: a[1] || (a[1] = () => i.value = !1)
142
+ onClick: t[1] || (t[1] = () => i.value = !1)
143
143
  }, null, 8, ["label"])
144
144
  ])
145
145
  ]),
@@ -155,8 +155,8 @@ const ue = { class: "fm-typo-en-title-md-600" }, me = { class: "py-16 space-y-32
155
155
  autofocus: "",
156
156
  label: n(o)("menu.variant.form.name.label"),
157
157
  "helper-text": n(o)("menu.variant.form.name.helper"),
158
- modelValue: t.value.name,
159
- "onUpdate:modelValue": a[0] || (a[0] = (u) => t.value.name = u),
158
+ modelValue: a.value.name,
159
+ "onUpdate:modelValue": t[0] || (t[0] = (u) => a.value.name = u),
160
160
  rules: [(u) => !!u || n(o)("menu.variant.form.name.required")],
161
161
  placeholder: n(o)("menu.variant.form.name.placeholder")
162
162
  }, null, 8, ["label", "helper-text", "modelValue", "rules", "placeholder"]),
@@ -165,8 +165,8 @@ const ue = { class: "fm-typo-en-title-md-600" }, me = { class: "py-16 space-y-32
165
165
  }, {
166
166
  default: m(() => [
167
167
  d("div", null, [
168
- s(n(ae), {
169
- "model-value": t.value.options,
168
+ s(n(te), {
169
+ "model-value": a.value.options,
170
170
  move: P,
171
171
  class: "space-y-16",
172
172
  group: "categories",
@@ -177,9 +177,9 @@ const ue = { class: "fm-typo-en-title-md-600" }, me = { class: "py-16 space-y-32
177
177
  item: m(({ element: u, index: p }) => [
178
178
  d("div", {
179
179
  class: J(["flex items-center", "space-x-8"]),
180
- "data-not-allow-sort": p === t.value.options.length - 1
180
+ "data-not-allow-sort": p === a.value.options.length - 1
181
181
  }, [
182
- p !== t.value.options.length - 1 ? (V(), M(c, {
182
+ p !== a.value.options.length - 1 ? (V(), M(c, {
183
183
  key: 0,
184
184
  class: "handle",
185
185
  name: "drag_handle"
@@ -188,14 +188,14 @@ const ue = { class: "fm-typo-en-title-md-600" }, me = { class: "py-16 space-y-32
188
188
  s(l, {
189
189
  "model-value": u.name,
190
190
  rules: [
191
- () => !!t.value.options.length || n(o)("menu.variant.form.options.min_required"),
192
- (h) => p === t.value.options.length - 1 || h ? !0 : n(o)("menu.variant.form.options.name_required")
191
+ () => !!a.value.options.length || n(o)("menu.variant.form.options.min_required"),
192
+ (h) => p === a.value.options.length - 1 || h ? !0 : n(o)("menu.variant.form.options.name_required")
193
193
  ],
194
194
  class: "flex-1",
195
195
  placeholder: n(o)("menu.variant.form.options.placeholder"),
196
196
  "onUpdate:modelValue": (h) => q(u._id, h)
197
197
  }, Q({ _: 2 }, [
198
- p !== t.value.options.length - 1 ? {
198
+ p !== a.value.options.length - 1 ? {
199
199
  name: "append",
200
200
  fn: m(() => [
201
201
  s(c, {
@@ -218,10 +218,10 @@ const ue = { class: "fm-typo-en-title-md-600" }, me = { class: "py-16 space-y-32
218
218
  ]),
219
219
  _: 1
220
220
  }, 8, ["title"]),
221
- (_ = t.value.usedBy) != null && _.length ? (V(), M(ne, {
221
+ (_ = a.value.usedBy) != null && _.length ? (V(), M(ne, {
222
222
  key: 0,
223
223
  editable: !1,
224
- overrides: t.value.usedBy || [],
224
+ overrides: a.value.usedBy || [],
225
225
  "select-variant": !1,
226
226
  title: n(o)("menu.variant.form.applied_product")
227
227
  }, null, 8, ["overrides", "title"])) : U("", !0)