@feedmepos/mf-menu 0.31.40-beta.2 → 0.31.40-prod

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 (91) hide show
  1. package/dist/{App-CoKv0BFp.js → App-aWEH-ZEk.js} +9 -9
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-B14Q0hS_.js → ApplyProduct.vue_vue_type_script_setup_true_lang-jJyinQZl.js} +3 -3
  3. package/dist/{Catalog-BRovMtuI.js → Catalog-BoFfFdn8.js} +9 -8
  4. package/dist/{Category-DytZqgIt.js → Category-CWYbb3Jn.js} +4 -4
  5. package/dist/{Category-CT8-B4zh.js → Category-DZ45uikR.js} +6 -6
  6. package/dist/{CookingGuide-Ct5qRLG0.js → CookingGuide-BU0PRWIQ.js} +4 -4
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-D3R3TCba.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-Z5xsKDIE.js} +1 -1
  8. package/dist/FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js +50 -0
  9. package/dist/{Group-Dk1yQTTt.js → Group-BMQDeqiS.js} +1 -1
  10. package/dist/{Group-G_H8i5_8.js → Group-C0T_uknK.js} +3 -3
  11. package/dist/{Group.vue_vue_type_script_setup_true_lang-CoTdB2d5.js → Group.vue_vue_type_script_setup_true_lang-DyfmY6F1.js} +8 -8
  12. package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D6qro5w_.js +367 -0
  13. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-BKx7uQtR.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-Dl-Wvt3D.js} +14 -13
  14. package/dist/{Ingredient-ChynYQq6.js → Ingredient-3lwDUQx_.js} +3 -3
  15. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-DyaUxnMx.js → InventoryBinding.vue_vue_type_script_setup_true_lang-VLrrTkSC.js} +2 -2
  16. package/dist/LinkProductSideSheet-LDZjKX95.js +297 -0
  17. package/dist/{app-CiBqmBzO.js → LinkProductSideSheet.vue_vue_type_style_index_0_scoped_97fa9d58_lang-DvG3mOom.js} +2084 -2120
  18. package/dist/MenuSetting-AhutsCVy.js +185 -0
  19. package/dist/{PrintRoute-DwAZHUrQ.js → PrintRoute-DfJ-vUAb.js} +4 -4
  20. package/dist/{Product-Bx2NPQvC.js → Product-F4PoLm9v.js} +1 -1
  21. package/dist/{Product.vue_vue_type_script_setup_true_lang-od_O6x7E.js → Product.vue_vue_type_script_setup_true_lang-DT5gffpA.js} +465 -468
  22. package/dist/{ProductInternalTools-BOguHh06.js → ProductInternalTools-DSGU-OqU.js} +6 -6
  23. package/dist/{Products-DA2hOsxr.js → Products-COzW2Z4g.js} +85 -88
  24. package/dist/{Publish-WATQWkjh.js → Publish-CDXVWCk2.js} +3 -3
  25. package/dist/{Recipe-WPwGgur3.js → Recipe-BZx4wrcP.js} +4 -4
  26. package/dist/{Scheduler-Djjggrh2.js → Scheduler-wHCWSeU2.js} +3 -3
  27. package/dist/{ServingSequence-CryZJTWA.js → ServingSequence-BbYEhDYh.js} +3 -3
  28. package/dist/{Setting-BtLsmoqY.js → Setting-C9Tlw1Iy.js} +45 -44
  29. package/dist/{Subcategory-BvlYDquD.js → Subcategory-C8AwfrKb.js} +4 -4
  30. package/dist/{Takeaway-8khxlcKQ.js → Takeaway-DaEUn-yM.js} +4 -4
  31. package/dist/{Takeaway-BBvFxAlx.js → Takeaway-t1053wg2.js} +1 -1
  32. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-B8blN-yJ.js → Takeaway.vue_vue_type_script_setup_true_lang-7XycP5fU.js} +5 -5
  33. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-CA9RlNkt.js → Thumbnail.vue_vue_type_script_setup_true_lang-B7oLH9cP.js} +95 -97
  34. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Ci6iqOry.js +5998 -0
  35. package/dist/{Unit-Diu00sM2.js → Unit-CnqptGCz.js} +2 -2
  36. package/dist/{Variant-CO15W0wb.js → Variant-DiOYOwJs.js} +3 -3
  37. package/dist/{_id_-CxA_FzSG.js → _id_-BSfU16VO.js} +75 -78
  38. package/dist/{app-Blbof2Ga.js → app-Cou6qPF2.js} +1 -1
  39. package/dist/{app-5ESai6-B.js → app-Ddb81PNo.js} +278 -278
  40. package/dist/app.js +1 -1
  41. package/dist/apps/mf-menu/src/api/menu.d.ts +1 -2
  42. package/dist/apps/mf-menu/src/app.d.ts +0 -144
  43. package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierRuleEditor.vue.d.ts +0 -36
  44. package/dist/apps/mf-menu/src/components/feature/RestaurantAttributesSelector.vue.d.ts +3 -9
  45. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/useItemFormManagement.d.ts +9 -2
  46. package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +4 -294
  47. package/dist/apps/mf-menu/src/composable/linkProducts.d.ts +0 -40
  48. package/dist/apps/mf-menu/src/helper/import-export.d.ts +0 -285
  49. package/dist/apps/mf-menu/src/helper/menu.d.ts +0 -285
  50. package/dist/apps/mf-menu/src/manager/menu/item.d.ts +0 -285
  51. package/dist/apps/mf-menu/src/stores/menu.d.ts +3 -293
  52. package/dist/apps/mf-menu/src/views/Publish/UpdateCatalogDialog.vue.d.ts +0 -166
  53. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  54. package/dist/assets/linked-status-B_crHhZH.js +24 -0
  55. package/dist/assets/override-menu-BmlCEpHH.js +24 -0
  56. package/dist/assets/validate-menu-CF-psoB-.js +24 -0
  57. package/dist/{catalog-CXjEQ80k.js → catalog-DSuJhsUb.js} +1 -1
  58. package/dist/{catalogSetting-aJSUDY_z.js → catalogSetting-C3gEw9ov.js} +1 -1
  59. package/dist/{category-TqQULuHq.js → category-CwWq3KCE.js} +1 -1
  60. package/dist/{currency-CRjh8ne7.js → currency-g45Sh-t6.js} +1 -1
  61. package/dist/{dayjs.min-MBmYgyRY.js → dayjs.min-g3eN5z-V.js} +1 -1
  62. package/dist/index-0Q5T9VZV.js +214 -0
  63. package/dist/{index-dkHuztwB.js → index-0yRUi7LL.js} +1 -1
  64. package/dist/{index-CzjFGFvP.js → index-BLQCYEc6.js} +8 -7
  65. package/dist/{index-B1NS2hBa.js → index-QsLFbxyG.js} +4 -4
  66. package/dist/{item-Dj14On9a.js → item-BvvQ9urP.js} +386 -386
  67. package/dist/{jszip.min-Be1afVon.js → jszip.min-DzdUiaR4.js} +353 -353
  68. package/dist/{menu-C0Xu-iTb.js → menu-DFNvhoNQ.js} +31149 -31298
  69. package/dist/{menu-kRDoPBjm.js → menu-QrVg2Ph7.js} +7 -7
  70. package/dist/{menuV2-D6Gmxd9X.js → menuV2-Ezf_jW40.js} +137 -142
  71. package/dist/mf-menu.css +1 -1
  72. package/dist/{priceTier-CJlFGOpm.js → priceTier-zENsn3P_.js} +1 -1
  73. package/dist/{scheduler-B11d6fJr.js → scheduler-BuwGSv6A.js} +8 -8
  74. package/dist/{subcategory-D6hTbHP-.js → subcategory-O3L_zCJA.js} +2 -2
  75. package/dist/{toExcel-BedErXvS.js → toExcel-CpRy_4nG.js} +2 -2
  76. package/dist/{unit-D5jDzsM2.js → unit-Ct_7Hfa2.js} +41 -42
  77. package/package.json +3 -3
  78. package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B_Yv8Thl.js +0 -399
  79. package/dist/LinkProductSideSheet-DsoPo7Q_.js +0 -361
  80. package/dist/MenuSetting-CDSc-56P.js +0 -618
  81. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-LVWB5CIa.js +0 -5994
  82. package/dist/apps/mf-menu/src/composable/attributes.d.ts +0 -26
  83. package/dist/apps/mf-menu/src/utils/array.d.ts +0 -1
  84. package/dist/apps/mf-menu/src/utils/customAttributes.d.ts +0 -12
  85. package/dist/apps/mf-menu/src/views/MenuSetting/LinkProductRuleGroups.vue.d.ts +0 -2
  86. package/dist/apps/mf-menu/src/views/MenuSetting/RuleGroupSideSheet.vue.d.ts +0 -176
  87. package/dist/assets/linked-status-x1efKEih.js +0 -13
  88. package/dist/assets/override-menu-D8d9BWzy.js +0 -13
  89. package/dist/assets/validate-menu-DUJ20GHx.js +0 -13
  90. package/dist/customAttributes-32VmzFKZ.js +0 -177
  91. package/dist/index-FzHOAFSW.js +0 -246
@@ -1,12 +1,12 @@
1
1
  import { computed as i, defineComponent as A, ref as y, resolveComponent as P, createElementBlock as k, openBlock as v, normalizeClass as w, createVNode as z, normalizeStyle as D, withCtx as V, createBlock as b, createCommentVNode as K } from "vue";
2
- import { A as p, J as M, G as R, O as S, ah as U, u as N, c as x } from "./menu-C0Xu-iTb.js";
3
- import { u as C } from "./menuV2-D6Gmxd9X.js";
4
- import { C as I, h as $ } from "./catalog-CXjEQ80k.js";
2
+ import { A as p, J as M, G as R, O as S, ah as U, u as N, c as x } from "./menu-DFNvhoNQ.js";
3
+ import { u as C } from "./menuV2-Ezf_jW40.js";
4
+ import { C as I, h as $ } from "./catalog-DSuJhsUb.js";
5
5
  import { useSnackbar as F, useDialog as T } from "@feedmepos/ui-library";
6
- import { a as L } from "./LinkProductSideSheet-DsoPo7Q_.js";
6
+ import { b as L } from "./LinkProductSideSheet-LDZjKX95.js";
7
7
  import { useI18n as B } from "@feedmepos/mf-common";
8
8
  function j() {
9
- const t = C(), o = i(() => t.categorizedRawMenuItems.filter((u) => u.items.length > 0)), g = i(() => {
9
+ const t = C(), s = i(() => t.categorizedRawMenuItems.filter((u) => u.items.length > 0)), d = i(() => {
10
10
  const u = t.currentCatalog;
11
11
  return u ? I.getItemAvailable(u).map((e) => ({ _id: e })) : [];
12
12
  });
@@ -14,12 +14,12 @@ function j() {
14
14
  const e = t.currentCatalog;
15
15
  if (!e) return;
16
16
  const n = u.reduce(
17
- (s, r) => (s[r] = O(
17
+ (o, r) => (o[r] = O(
18
18
  r,
19
19
  e.override.items[r],
20
20
  u.includes(r),
21
21
  t.version === p.F_MENU_VERSION.enum.v3
22
- ), s),
22
+ ), o),
23
23
  {}
24
24
  ), a = {
25
25
  ...e,
@@ -37,15 +37,15 @@ function j() {
37
37
  });
38
38
  }
39
39
  async function l(u) {
40
- var s;
40
+ var o;
41
41
  const e = t.currentCatalog;
42
42
  if (!e) return;
43
43
  const n = u.reduce(
44
44
  (r, c) => {
45
- const d = e.override.items[c];
45
+ const _ = e.override.items[c];
46
46
  return r[c] = O(
47
47
  c,
48
- d,
48
+ _,
49
49
  !0,
50
50
  t.version === p.F_MENU_VERSION.enum.v3
51
51
  ), r;
@@ -56,7 +56,7 @@ function j() {
56
56
  override: {
57
57
  ...e.override,
58
58
  items: {
59
- ...((s = e.override) == null ? void 0 : s.items) || {},
59
+ ...((o = e.override) == null ? void 0 : o.items) || {},
60
60
  ...n
61
61
  }
62
62
  },
@@ -72,16 +72,16 @@ function j() {
72
72
  data: a
73
73
  });
74
74
  }
75
- async function _(u) {
76
- var s;
75
+ async function g(u) {
76
+ var o;
77
77
  const e = t.currentCatalog;
78
78
  if (!e) return;
79
79
  const n = u.reduce(
80
80
  (r, c) => {
81
- const d = e.override.items[c];
81
+ const _ = e.override.items[c];
82
82
  return r[c] = O(
83
83
  c,
84
- d,
84
+ _,
85
85
  !1,
86
86
  t.version === p.F_MENU_VERSION.enum.v3
87
87
  ), r;
@@ -92,7 +92,7 @@ function j() {
92
92
  override: {
93
93
  ...e.override,
94
94
  items: {
95
- ...((s = e.override) == null ? void 0 : s.items) || {},
95
+ ...((o = e.override) == null ? void 0 : o.items) || {},
96
96
  ...n
97
97
  }
98
98
  }
@@ -117,40 +117,40 @@ function j() {
117
117
  });
118
118
  }
119
119
  return {
120
- linkableItems: o,
121
- currentItems: g,
120
+ linkableItems: s,
121
+ currentItems: d,
122
122
  setProduct: m,
123
123
  applyProduct: l,
124
- removeProduct: _,
124
+ removeProduct: g,
125
125
  saveLinkItemRules: f
126
126
  };
127
127
  }
128
- function O(t, o, g, m) {
129
- const l = o == null ? void 0 : o.find((u) => !u.combinationKey), _ = g ? null : p.F_ORDER_FROM.enum.NONE, f = m ? g ? null : "" : l == null ? void 0 : l.category;
128
+ function O(t, s, d, m) {
129
+ const l = s == null ? void 0 : s.find((u) => !u.combinationKey), g = d ? null : p.F_ORDER_FROM.enum.NONE, f = m ? d ? null : "" : l == null ? void 0 : l.category;
130
130
  return [
131
131
  {
132
132
  ...l ?? {},
133
- orderFrom: _,
133
+ orderFrom: g,
134
134
  category: f,
135
135
  _id: t
136
136
  },
137
- ...(o == null ? void 0 : o.filter((u) => !!u.combinationKey)) ?? []
137
+ ...(s == null ? void 0 : s.filter((u) => !!u.combinationKey)) ?? []
138
138
  ];
139
139
  }
140
140
  function G() {
141
- const t = C(), o = F(), g = T(), m = R(o), l = S(m), _ = i(() => {
141
+ const t = C(), s = F(), d = T(), m = R(s), l = S(m), g = i(() => {
142
142
  const e = t.categorizedRawMenuItems, n = new Set(
143
143
  t.currentCatalog ? I.getItemAvailable(t.currentCatalog) : t.state.menu.modules.item.map((a) => a._id)
144
144
  );
145
145
  return e.map((a) => ({
146
146
  ...a,
147
- items: a.items.filter((s) => n.has(s._id))
147
+ items: a.items.filter((o) => n.has(o._id))
148
148
  })).filter((a) => a.items.length > 0);
149
149
  }), f = i(() => {
150
- var s;
150
+ var o;
151
151
  const e = t.currentScheduler;
152
152
  if (!e) return [];
153
- const n = t.currentCatalog, a = n ? ((s = n.override.scheduler[e._id]) == null ? void 0 : s.items) ?? [] : e.items;
153
+ const n = t.currentCatalog, a = n ? ((o = n.override.scheduler[e._id]) == null ? void 0 : o.items) ?? [] : e.items;
154
154
  return [
155
155
  ...new Set(a.filter((r) => r.orderFrom != p.F_ORDER_FROM.enum.NONE).map((r) => r._id))
156
156
  ].map((r) => ({ _id: r }));
@@ -160,23 +160,23 @@ function G() {
160
160
  if (!n) return;
161
161
  const a = t.currentCatalog;
162
162
  if (a && t.rules.scheduler.override) {
163
- const s = new I(
163
+ const o = new I(
164
164
  a,
165
165
  t,
166
166
  l.updateMenu,
167
- g
167
+ d
168
168
  );
169
- s.overrideCatalogSchedulerItems(e, n._id), await t.updateMenu({
169
+ o.overrideCatalogSchedulerItems(e, n._id), await t.updateMenu({
170
170
  module: p.F_MENU_MODULE_V4_KEY.enum.catalog,
171
171
  operation: M.F_OPERATION_TYPE.update,
172
- data: s.getCatalog()
172
+ data: o.getCatalog()
173
173
  });
174
174
  } else {
175
- const s = e.reduce(
176
- (c, d) => {
177
- const h = n.items.filter((E) => E._id == d) ?? [];
175
+ const o = e.reduce(
176
+ (c, _) => {
177
+ const h = n.items.filter((E) => E._id == _) ?? [];
178
178
  return c = c.concat(
179
- U(d, h, (E) => ({
179
+ U(_, h, (E) => ({
180
180
  ...E,
181
181
  orderFrom: null
182
182
  }))
@@ -185,7 +185,7 @@ function G() {
185
185
  []
186
186
  ), r = {
187
187
  ...n,
188
- items: s
188
+ items: o
189
189
  };
190
190
  await t.updateMenu({
191
191
  module: p.F_MENU_MODULE_V4_KEY.enum.scheduler,
@@ -195,33 +195,33 @@ function G() {
195
195
  }
196
196
  }
197
197
  return {
198
- linkableItems: _,
198
+ linkableItems: g,
199
199
  currentItems: f,
200
200
  applyProduct: u
201
201
  };
202
202
  }
203
203
  const J = () => {
204
- const t = N(), o = F(), g = R(o), m = S(g), l = i(() => t.categorizedRawMenuItems.filter((e) => e.items.length > 0)), _ = i(() => {
204
+ const t = N(), s = F(), d = R(s), m = S(d), l = i(() => t.categorizedRawMenuItems.filter((e) => e.items.length > 0)), g = i(() => {
205
205
  const e = t.currentCatalog;
206
206
  return e ? I.getItemAvailable(e).map((n) => ({ _id: n })) : [];
207
207
  });
208
208
  async function f(e) {
209
209
  const n = t.currentCatalog;
210
210
  if (!n) return;
211
- const s = t.state.menu.modules.item.map((c) => c._id).reduce(
212
- (c, d) => {
213
- const h = n.override.items[d];
214
- return c[d] = $(
215
- d,
211
+ const o = t.state.menu.modules.item.map((c) => c._id).reduce(
212
+ (c, _) => {
213
+ const h = n.override.items[_];
214
+ return c[_] = $(
215
+ _,
216
216
  h,
217
- e.includes(d),
217
+ e.includes(_),
218
218
  t.version === x.F_MENU_VERSION.v3
219
219
  ), c;
220
220
  },
221
221
  {}
222
222
  ), r = {
223
223
  ...n,
224
- override: { ...n.override, items: s },
224
+ override: { ...n.override, items: o },
225
225
  /**
226
226
  * linkItemRules and items under override are two ways to manage linked items under catalog,
227
227
  * if we changed items under override, we should clear linkItemRules to avoid conflict.
@@ -255,24 +255,24 @@ const J = () => {
255
255
  }
256
256
  return {
257
257
  linkableItems: l,
258
- currentItems: _,
258
+ currentItems: g,
259
259
  applyProduct: f,
260
260
  saveLinkItemRules: u
261
261
  };
262
262
  }, q = () => {
263
- const t = N(), o = F(), g = T(), m = R(o), l = S(m), _ = i(() => {
263
+ const t = N(), s = F(), d = T(), m = R(s), l = S(m), g = i(() => {
264
264
  const e = t.categorizedRawMenuItems, n = new Set(
265
265
  t.currentCatalog ? I.getItemAvailable(t.currentCatalog) : t.state.menu.modules.item.map((a) => a._id)
266
266
  );
267
267
  return e.map((a) => ({
268
268
  ...a,
269
- items: a.items.filter((s) => n.has(s._id))
269
+ items: a.items.filter((o) => n.has(o._id))
270
270
  })).filter((a) => a.items.length > 0);
271
271
  }), f = i(() => {
272
- var s;
272
+ var o;
273
273
  const e = t.currentScheduler;
274
274
  if (!e) return [];
275
- const n = t.currentCatalog, a = n ? ((s = n.override.scheduler[e._id]) == null ? void 0 : s.items) ?? [] : e.items;
275
+ const n = t.currentCatalog, a = n ? ((o = n.override.scheduler[e._id]) == null ? void 0 : o.items) ?? [] : e.items;
276
276
  return [
277
277
  ...new Set(a.filter((r) => r.orderFrom != p.F_ORDER_FROM.enum.NONE).map((r) => r._id))
278
278
  ].map((r) => ({ _id: r }));
@@ -282,14 +282,14 @@ const J = () => {
282
282
  if (!n) return;
283
283
  const a = t.currentCatalog;
284
284
  if (a && t.rules.scheduler.override) {
285
- const s = new I(a, t, l.updateMenu, g);
286
- s.overrideCatalogSchedulerItems(e, n._id), await s.update();
285
+ const o = new I(a, t, l.updateMenu, d);
286
+ o.overrideCatalogSchedulerItems(e, n._id), await o.update();
287
287
  } else {
288
- const s = e.reduce(
289
- (c, d) => {
290
- const h = n.items.filter((E) => E._id == d) ?? [];
288
+ const o = e.reduce(
289
+ (c, _) => {
290
+ const h = n.items.filter((E) => E._id == _) ?? [];
291
291
  return c = c.concat(
292
- U(d, h, (E) => ({
292
+ U(_, h, (E) => ({
293
293
  ...E,
294
294
  orderFrom: null
295
295
  }))
@@ -298,7 +298,7 @@ const J = () => {
298
298
  []
299
299
  ), r = {
300
300
  ...n,
301
- items: s
301
+ items: o
302
302
  };
303
303
  await l.updateMenu(
304
304
  {
@@ -311,7 +311,7 @@ const J = () => {
311
311
  }
312
312
  }
313
313
  return {
314
- linkableItems: _,
314
+ linkableItems: g,
315
315
  currentItems: f,
316
316
  applyProduct: u
317
317
  };
@@ -321,43 +321,41 @@ function ae(t) {
321
321
  const e = N(), n = i(() => e.state.menu.modules.item ?? []), a = i(() => {
322
322
  var h;
323
323
  return ((h = e.currentCatalog) == null ? void 0 : h.linkItemRules) ?? null;
324
- }), s = q(), r = J(), c = i(() => !e.state.currentSchedulerId), d = (h) => {
325
- if (h.mode === L.Rules)
326
- r.saveLinkItemRules(h.linkItemRules);
327
- else {
328
- const E = h.items.map((Y) => Y._id);
329
- c.value ? r.applyProduct(E) : s.applyProduct(E);
330
- }
331
- };
324
+ }), o = q(), r = J(), c = i(() => !e.state.currentSchedulerId);
332
325
  return {
333
326
  menuItems: n,
334
- categories: e.categories,
335
327
  linkItemRules: a,
336
328
  catalogManager: r,
337
- schedulerManager: s,
329
+ schedulerManager: o,
338
330
  noScheduler: c,
339
- handleSubmit: d
331
+ handleSubmit: (h) => {
332
+ if (h.mode === L.Rules)
333
+ r.saveLinkItemRules(h.linkItemRules);
334
+ else {
335
+ const E = h.items.map((Y) => Y._id);
336
+ c.value ? r.applyProduct(E) : o.applyProduct(E);
337
+ }
338
+ }
340
339
  };
341
340
  }
342
- const o = C(), g = i(() => o.state.menu.modules.item ?? []), m = i(() => {
341
+ const s = C(), d = i(() => s.state.menu.modules.item ?? []), m = i(() => {
343
342
  var e;
344
- return ((e = o.currentCatalog) == null ? void 0 : e.linkItemRules) ?? null;
345
- }), l = G(), _ = j(), f = i(() => !o.state.currentSchedulerId), u = (e) => {
346
- if (e.mode === L.Rules)
347
- _.saveLinkItemRules(e.linkItemRules);
348
- else {
349
- const n = e.items.map((a) => a._id);
350
- f.value ? _.applyProduct(n) : l.applyProduct(n);
351
- }
352
- };
343
+ return ((e = s.currentCatalog) == null ? void 0 : e.linkItemRules) ?? null;
344
+ }), l = G(), g = j(), f = i(() => !s.state.currentSchedulerId);
353
345
  return {
354
- menuItems: g,
355
- categories: o.categories,
346
+ menuItems: d,
356
347
  linkItemRules: m,
357
- catalogManager: _,
348
+ catalogManager: g,
358
349
  schedulerManager: l,
359
350
  noScheduler: f,
360
- handleSubmit: u
351
+ handleSubmit: (e) => {
352
+ if (e.mode === L.Rules)
353
+ g.saveLinkItemRules(e.linkItemRules);
354
+ else {
355
+ const n = e.items.map((a) => a._id);
356
+ f.value ? g.applyProduct(n) : l.applyProduct(n);
357
+ }
358
+ }
361
359
  };
362
360
  }
363
361
  const H = ["alt", "src", "crossorigin"], re = /* @__PURE__ */ A({
@@ -370,25 +368,25 @@ const H = ["alt", "src", "crossorigin"], re = /* @__PURE__ */ A({
370
368
  crossorigin: { type: Boolean, default: !0 }
371
369
  },
372
370
  setup(t) {
373
- const o = t, { t: g } = B(), m = y(!1), l = y(!o.src), _ = () => {
371
+ const s = t, { t: d } = B(), m = y(!1), l = y(!s.src), g = () => {
374
372
  m.value = !1, l.value = !0;
375
373
  }, f = () => {
376
374
  m.value = !0, l.value = !0;
377
- }, u = i(() => o.alt ? g("menu.thumbnail.alt.with_name", { name: o.alt }) : g("menu.thumbnail.alt.default")), e = i(() => typeof o.size == "number" ? {
378
- width: o.size,
379
- height: o.size
375
+ }, u = i(() => s.alt ? d("menu.thumbnail.alt.with_name", { name: s.alt }) : d("menu.thumbnail.alt.default")), e = i(() => typeof s.size == "number" ? {
376
+ width: s.size,
377
+ height: s.size
380
378
  } : {
381
- width: o.size.width,
382
- height: o.size.height
379
+ width: s.size.width,
380
+ height: s.size.height
383
381
  }), n = i(() => {
384
- if (!o.src) return null;
385
- if (o.crossorigin) {
386
- const a = o.src.includes("?") ? "&" : "?";
387
- return `${o.src}${a}_cors=${Date.now()}`;
382
+ if (!s.src) return null;
383
+ if (s.crossorigin) {
384
+ const a = s.src.includes("?") ? "&" : "?";
385
+ return `${s.src}${a}_cors=${Date.now()}`;
388
386
  }
389
- return o.src;
387
+ return s.src;
390
388
  });
391
- return (a, s) => {
389
+ return (a, o) => {
392
390
  const r = P("fm-icon"), c = P("fm-card");
393
391
  return v(), k("div", {
394
392
  class: w([a.className, "flex items-center justify-center"])
@@ -404,9 +402,9 @@ const H = ["alt", "src", "crossorigin"], re = /* @__PURE__ */ A({
404
402
  alt: u.value,
405
403
  class: w(["w-full h-full", "object-cover", l.value ? "" : "hidden"]),
406
404
  src: n.value,
407
- crossorigin: o.crossorigin ? "anonymous" : void 0,
405
+ crossorigin: s.crossorigin ? "anonymous" : void 0,
408
406
  onError: f,
409
- onLoad: _
407
+ onLoad: g
410
408
  }, null, 42, H)) : (v(), b(r, {
411
409
  key: 1,
412
410
  color: "neutral-gray-300",