@feedmepos/mf-menu 0.31.44 → 0.31.45-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 (64) hide show
  1. package/dist/{App-Bx2oHz_2.js → App-Dk_k4HVK.js} +9 -9
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DC53jOxl.js → ApplyProduct.vue_vue_type_script_setup_true_lang-DSrvQozf.js} +3 -3
  3. package/dist/{Catalog-orxlAEbo.js → Catalog-DoeX2gZt.js} +6 -6
  4. package/dist/{Category-DN6-D26x.js → Category-Bdj8nyJX.js} +4 -4
  5. package/dist/{Category-EC-9REG9.js → Category-DYtmrs0d.js} +6 -6
  6. package/dist/{CookingGuide-CeFTfwDB.js → CookingGuide-BoH8324W.js} +4 -4
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-Cpmh3G5W.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-C8L7yQhT.js} +1 -1
  8. package/dist/{Group-cg8h5KLx.js → Group-oBgB4Rip.js} +1 -1
  9. package/dist/{Group-B0TQdnHG.js → Group-rSlBX4PW.js} +3 -3
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-DwkvSn8N.js → Group.vue_vue_type_script_setup_true_lang-BbqYVzXV.js} +7 -7
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Bt5rER7h.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Bp25dogQ.js} +5 -5
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-c4FmNdn4.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DfNllbYR.js} +7 -7
  13. package/dist/{Ingredient-B_1B5u9o.js → Ingredient-B0QEmsUg.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CvrPVG7Q.js → InventoryBinding.vue_vue_type_script_setup_true_lang-C3v4DUZE.js} +1052 -1052
  15. package/dist/{LinkProductSideSheet-DZJY3u1w.js → LinkProductSideSheet-DtDRjTMM.js} +3 -3
  16. package/dist/{MenuSetting-Bguf-YJI.js → MenuSetting-D6ZFB-Qf.js} +5 -5
  17. package/dist/{PrintRoute-CkEOWCgg.js → PrintRoute-Dvy6YKcl.js} +4 -4
  18. package/dist/{Product-DQyZCauS.js → Product-Cxc7kiAq.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-DOsLhx9w.js → Product.vue_vue_type_script_setup_true_lang-Dw5K4Jij.js} +13 -13
  20. package/dist/{ProductInternalTools-BI7b-zg-.js → ProductInternalTools-hKp2e1fc.js} +6 -6
  21. package/dist/{Products-D6u_d8Ey.js → Products-DjDJR2jH.js} +11 -11
  22. package/dist/{Publish-CBbyfrHe.js → Publish-DCD7a33W.js} +3 -3
  23. package/dist/{Recipe-C9QEKfjo.js → Recipe-Dr0P6NlR.js} +4 -4
  24. package/dist/{Scheduler-C6OiFU1O.js → Scheduler-Cw-Ddftq.js} +3 -3
  25. package/dist/{ServingSequence-CdHMuMCB.js → ServingSequence-CTcsTU8R.js} +3 -3
  26. package/dist/{Setting-CkNI0nqs.js → Setting-BSh-A_8a.js} +5 -5
  27. package/dist/{Subcategory-C7RViT1r.js → Subcategory-BXJriD4G.js} +4 -4
  28. package/dist/{Takeaway-D4B2y4nE.js → Takeaway-BJo2d3vL.js} +4 -4
  29. package/dist/{Takeaway-COo_m0x1.js → Takeaway-DKWUpJDp.js} +1 -1
  30. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-C9umCqte.js → Takeaway.vue_vue_type_script_setup_true_lang-B6kGoFDg.js} +5 -5
  31. package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-CPqU17LK.js +411 -0
  32. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CL80TqrT.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BdIozq8u.js} +18 -18
  33. package/dist/{Unit-5FYoPgac.js → Unit-DZ_r81gD.js} +2 -2
  34. package/dist/{Variant-CSDZm3n7.js → Variant-C5V9MFVb.js} +3 -3
  35. package/dist/{_id_-9odGt4jf.js → _id_-BW85oNN8.js} +10 -10
  36. package/dist/{app-DKARBM7u.js → app-D_jTNakc.js} +1 -1
  37. package/dist/{app-2bbd_O98.js → app-ntt4GRm3.js} +25 -25
  38. package/dist/app.js +1 -1
  39. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/catalog.d.ts +1 -1
  40. package/dist/assets/{linked-status-DmIP1URe.js → linked-status-DzqW-dIk.js} +2 -2
  41. package/dist/assets/{override-menu-CjsD2KBQ.js → override-menu-DsppwnGw.js} +2 -2
  42. package/dist/assets/{validate-menu-CC3BocRS.js → validate-menu-CzYoNU7o.js} +2 -2
  43. package/dist/{catalog-DOFgYg6K.js → catalog-CyrRQdAE.js} +1 -1
  44. package/dist/{catalogSetting-B1naZ9jL.js → catalogSetting-BYOaDF2P.js} +1 -1
  45. package/dist/{category-Bz2zsVto.js → category-DSVtFwDD.js} +1 -1
  46. package/dist/{currency-BZV6-QY3.js → currency-Bv61mvXo.js} +1 -1
  47. package/dist/{customAttributes-BInvsXiT.js → customAttributes-CRleIu8c.js} +1 -1
  48. package/dist/{dayjs.min-CnQWW-Z3.js → dayjs.min-BXVEjQmH.js} +1 -1
  49. package/dist/{index-BHCnGQ06.js → index-BPUDGOpG.js} +3 -3
  50. package/dist/{index--1Md4WEj.js → index-CWEcdMBL.js} +1 -1
  51. package/dist/{index-DV7CU53l.js → index-ZL08gfPT.js} +4 -4
  52. package/dist/{index-C7lfKWR2.js → index-eJ8bZn8o.js} +1 -1
  53. package/dist/{item-ChaIX32X.js → item-Baro-Xs_.js} +386 -386
  54. package/dist/{jszip.min-C8gqwhwa.js → jszip.min-C4St6GUn.js} +245 -245
  55. package/dist/{menu-Cp9RL0oR.js → menu-DChbKKEr.js} +1 -1
  56. package/dist/{menu-B52eM23G.js → menu-DQ8YB87t.js} +7 -7
  57. package/dist/{menuV2-D3ExhOoi.js → menuV2-2md8qjF6.js} +63 -63
  58. package/dist/{priceTier-Ccww0TxU.js → priceTier-DbVxTs3S.js} +1 -1
  59. package/dist/{scheduler-B8XcfMpi.js → scheduler-BNI0t9f5.js} +4 -4
  60. package/dist/{subcategory-CbtqvGF5.js → subcategory-gc2qoY5w.js} +2 -2
  61. package/dist/{toExcel-C04qiFny.js → toExcel-TQ5H4xEZ.js} +2 -2
  62. package/dist/{unit-_s_zv_iK.js → unit-Dduk5zqJ.js} +2 -2
  63. package/package.json +1 -1
  64. package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-DHFaag4B.js +0 -436
@@ -0,0 +1,411 @@
1
+ import { computed as g, defineComponent as x, ref as P, resolveComponent as k, createElementBlock as b, openBlock as S, normalizeClass as O, createVNode as K, normalizeStyle as $, withCtx as B, createBlock as L, createCommentVNode as j } from "vue";
2
+ import { A as h, J as E, G as R, O as y, ah as A, u as C, c as G } from "./menu-DQ8YB87t.js";
3
+ import { u as v } from "./menuV2-2md8qjF6.js";
4
+ import { C as w, h as J } from "./catalog-CyrRQdAE.js";
5
+ import { useSnackbar as N, useDialog as D } from "@feedmepos/ui-library";
6
+ import { a as U } from "./LinkProductSideSheet-DtDRjTMM.js";
7
+ import { useI18n as q } from "@feedmepos/mf-common";
8
+ function H() {
9
+ const e = v(), o = g(() => e.categorizedRawMenuItems.filter((r) => r.items.length > 0)), c = g(() => {
10
+ const r = e.currentCatalog;
11
+ return r ? w.getItemAvailable(r).map((n) => ({ _id: n })) : [];
12
+ });
13
+ async function l(r) {
14
+ const n = e.currentCatalog;
15
+ if (!n) return;
16
+ const a = new Set(r), s = e.state.menu.modules.item.map((m) => m._id).reduce(
17
+ (m, d) => {
18
+ const f = n.override.items[d];
19
+ return m[d] = Y(
20
+ d,
21
+ f,
22
+ a.has(d),
23
+ e.version === h.F_MENU_VERSION.enum.v3
24
+ ), m;
25
+ },
26
+ {}
27
+ ), u = {
28
+ ...n,
29
+ override: {
30
+ ...n.override,
31
+ items: s
32
+ },
33
+ /**
34
+ * linkItemRules and items under override are two ways to manage linked items under catalog,
35
+ * if we changed items under override, we should clear linkItemRules to avoid conflict.
36
+ */
37
+ linkItemRules: null
38
+ };
39
+ await e.updateMenu({
40
+ module: h.F_MENU_MODULE_V4_KEY.enum.catalog,
41
+ operation: E.F_OPERATION_TYPE.update,
42
+ data: u
43
+ });
44
+ }
45
+ async function i(r) {
46
+ await T(r, !0);
47
+ }
48
+ async function p(r) {
49
+ await T(r, !1);
50
+ }
51
+ async function _(r) {
52
+ const n = e.currentCatalog;
53
+ if (!n) return;
54
+ const a = {
55
+ ...n,
56
+ linkItemRules: r
57
+ };
58
+ await e.updateMenu({
59
+ module: h.F_MENU_MODULE_V4_KEY.enum.catalog,
60
+ operation: E.F_OPERATION_TYPE.update,
61
+ data: a
62
+ });
63
+ }
64
+ return {
65
+ linkableItems: o,
66
+ currentItems: c,
67
+ applyProduct: l,
68
+ addProduct: i,
69
+ removeProduct: p,
70
+ saveLinkItemRules: _
71
+ };
72
+ }
73
+ async function T(e, o) {
74
+ var r;
75
+ const c = v(), l = c.currentCatalog;
76
+ if (!l || e.length === 0) return;
77
+ const i = c.version === h.F_MENU_VERSION.enum.v3, p = e.reduce(
78
+ (n, a) => {
79
+ const t = l.override.items[a];
80
+ return n[a] = Y(a, t, o, i), n;
81
+ },
82
+ {}
83
+ ), _ = {
84
+ ...l,
85
+ override: {
86
+ ...l.override,
87
+ items: {
88
+ ...((r = l.override) == null ? void 0 : r.items) || {},
89
+ ...p
90
+ }
91
+ }
92
+ };
93
+ await c.updateMenu({
94
+ module: h.F_MENU_MODULE_V4_KEY.enum.catalog,
95
+ operation: E.F_OPERATION_TYPE.update,
96
+ data: _
97
+ });
98
+ }
99
+ function Y(e, o, c, l) {
100
+ const i = o == null ? void 0 : o.find((r) => !r.combinationKey), p = c ? null : h.F_ORDER_FROM.enum.NONE, _ = l ? c ? null : "" : i == null ? void 0 : i.category;
101
+ return [
102
+ {
103
+ ...i ?? {},
104
+ orderFrom: p,
105
+ category: _,
106
+ _id: e
107
+ },
108
+ ...(o == null ? void 0 : o.filter((r) => !!r.combinationKey)) ?? []
109
+ ];
110
+ }
111
+ function Q() {
112
+ const e = v(), o = N(), c = D(), l = R(o), i = y(l), p = g(() => {
113
+ const n = e.categorizedRawMenuItems, a = new Set(
114
+ e.currentCatalog ? w.getItemAvailable(e.currentCatalog) : e.state.menu.modules.item.map((t) => t._id)
115
+ );
116
+ return n.map((t) => ({
117
+ ...t,
118
+ items: t.items.filter((s) => a.has(s._id))
119
+ })).filter((t) => t.items.length > 0);
120
+ }), _ = g(() => {
121
+ var s;
122
+ const n = e.currentScheduler;
123
+ if (!n) return [];
124
+ const a = e.currentCatalog, t = a ? ((s = a.override.scheduler[n._id]) == null ? void 0 : s.items) ?? [] : n.items;
125
+ return [
126
+ ...new Set(t.filter((u) => u.orderFrom != h.F_ORDER_FROM.enum.NONE).map((u) => u._id))
127
+ ].map((u) => ({ _id: u }));
128
+ });
129
+ async function r(n) {
130
+ const a = e.currentScheduler;
131
+ if (!a) return;
132
+ const t = e.currentCatalog;
133
+ if (t && e.rules.scheduler.override) {
134
+ const s = new w(
135
+ t,
136
+ e,
137
+ i.updateMenu,
138
+ c
139
+ );
140
+ s.overrideCatalogSchedulerItems(n, a._id), await e.updateMenu({
141
+ module: h.F_MENU_MODULE_V4_KEY.enum.catalog,
142
+ operation: E.F_OPERATION_TYPE.update,
143
+ data: s.getCatalog()
144
+ });
145
+ } else {
146
+ const s = n.reduce(
147
+ (m, d) => {
148
+ const f = a.items.filter((I) => I._id == d) ?? [];
149
+ return m = m.concat(
150
+ A(d, f, (I) => ({
151
+ ...I,
152
+ orderFrom: null
153
+ }))
154
+ ), m;
155
+ },
156
+ []
157
+ ), u = {
158
+ ...a,
159
+ items: s
160
+ };
161
+ await e.updateMenu({
162
+ module: h.F_MENU_MODULE_V4_KEY.enum.scheduler,
163
+ operation: E.F_OPERATION_TYPE.update,
164
+ data: u
165
+ });
166
+ }
167
+ }
168
+ return {
169
+ linkableItems: p,
170
+ currentItems: _,
171
+ applyProduct: r
172
+ };
173
+ }
174
+ const W = () => {
175
+ const e = C(), o = N(), c = R(o), l = y(c), i = g(() => e.categorizedRawMenuItems.filter((n) => n.items.length > 0)), p = g(() => {
176
+ const n = e.currentCatalog;
177
+ return n ? w.getItemAvailable(n).map((a) => ({ _id: a })) : [];
178
+ });
179
+ async function _(n) {
180
+ const a = e.currentCatalog;
181
+ if (!a) return;
182
+ const t = new Set(n), u = e.state.menu.modules.item.map((d) => d._id).reduce(
183
+ (d, f) => {
184
+ const I = a.override.items[f];
185
+ return d[f] = J(
186
+ f,
187
+ I,
188
+ t.has(f),
189
+ e.version === G.F_MENU_VERSION.v3
190
+ ), d;
191
+ },
192
+ {}
193
+ ), m = {
194
+ ...a,
195
+ override: { ...a.override, items: u },
196
+ /**
197
+ * linkItemRules and items under override are two ways to manage linked items under catalog,
198
+ * if we changed items under override, we should clear linkItemRules to avoid conflict.
199
+ */
200
+ linkItemRules: null
201
+ };
202
+ await l.updateMenu(
203
+ {
204
+ module: h.F_MENU_MODULE_V4_KEY.enum.catalog,
205
+ operation: E.F_OPERATION_TYPE.update,
206
+ data: m
207
+ },
208
+ m.name
209
+ );
210
+ }
211
+ async function r(n) {
212
+ const a = e.currentCatalog;
213
+ if (!a) return;
214
+ const t = {
215
+ ...a,
216
+ linkItemRules: n
217
+ };
218
+ await l.updateMenu(
219
+ {
220
+ module: h.F_MENU_MODULE_V4_KEY.enum.catalog,
221
+ operation: E.F_OPERATION_TYPE.update,
222
+ data: t
223
+ },
224
+ t.name
225
+ );
226
+ }
227
+ return {
228
+ linkableItems: i,
229
+ currentItems: p,
230
+ applyProduct: _,
231
+ saveLinkItemRules: r
232
+ };
233
+ }, X = () => {
234
+ const e = C(), o = N(), c = D(), l = R(o), i = y(l), p = g(() => {
235
+ const n = e.categorizedRawMenuItems, a = new Set(
236
+ e.currentCatalog ? w.getItemAvailable(e.currentCatalog) : e.state.menu.modules.item.map((t) => t._id)
237
+ );
238
+ return n.map((t) => ({
239
+ ...t,
240
+ items: t.items.filter((s) => a.has(s._id))
241
+ })).filter((t) => t.items.length > 0);
242
+ }), _ = g(() => {
243
+ var s;
244
+ const n = e.currentScheduler;
245
+ if (!n) return [];
246
+ const a = e.currentCatalog, t = a ? ((s = a.override.scheduler[n._id]) == null ? void 0 : s.items) ?? [] : n.items;
247
+ return [
248
+ ...new Set(t.filter((u) => u.orderFrom != h.F_ORDER_FROM.enum.NONE).map((u) => u._id))
249
+ ].map((u) => ({ _id: u }));
250
+ });
251
+ async function r(n) {
252
+ const a = e.currentScheduler;
253
+ if (!a) return;
254
+ const t = e.currentCatalog;
255
+ if (t && e.rules.scheduler.override) {
256
+ const s = new w(t, e, i.updateMenu, c);
257
+ s.overrideCatalogSchedulerItems(n, a._id), await s.update();
258
+ } else {
259
+ const s = n.reduce(
260
+ (m, d) => {
261
+ const f = a.items.filter((I) => I._id == d) ?? [];
262
+ return m = m.concat(
263
+ A(d, f, (I) => ({
264
+ ...I,
265
+ orderFrom: null
266
+ }))
267
+ ), m;
268
+ },
269
+ []
270
+ ), u = {
271
+ ...a,
272
+ items: s
273
+ };
274
+ await i.updateMenu(
275
+ {
276
+ module: h.F_MENU_MODULE_V4_KEY.enum.scheduler,
277
+ operation: E.F_OPERATION_TYPE.update,
278
+ data: u
279
+ },
280
+ u.name
281
+ );
282
+ }
283
+ }
284
+ return {
285
+ linkableItems: p,
286
+ currentItems: _,
287
+ applyProduct: r
288
+ };
289
+ };
290
+ function ue(e) {
291
+ const o = {
292
+ // Under FdoMenuV4Category _id is string, but here we need null for Addon, so we bypass the type checking
293
+ // @ts-ignore
294
+ _id: null,
295
+ name: "Addon",
296
+ position: 0
297
+ };
298
+ if (!e) {
299
+ const t = C(), s = g(() => t.state.menu.modules.item ?? []), u = g(() => {
300
+ var M;
301
+ return ((M = t.currentCatalog) == null ? void 0 : M.linkItemRules) ?? null;
302
+ }), m = X(), d = W(), f = g(() => !t.state.currentSchedulerId), I = (M) => {
303
+ if (M.mode === U.Rules)
304
+ d.saveLinkItemRules(M.linkItemRules);
305
+ else {
306
+ const F = M.items.map((V) => V._id);
307
+ f.value ? d.applyProduct(F) : m.applyProduct(F);
308
+ }
309
+ }, z = g(() => [o, ...t.state.menu.modules.category ?? []]);
310
+ return {
311
+ menuItems: s,
312
+ categories: z,
313
+ linkItemRules: u,
314
+ catalogManager: d,
315
+ schedulerManager: m,
316
+ noScheduler: f,
317
+ handleSubmit: I
318
+ };
319
+ }
320
+ const c = v(), l = g(() => c.state.menu.modules.item ?? []), i = g(() => {
321
+ var t;
322
+ return ((t = c.currentCatalog) == null ? void 0 : t.linkItemRules) ?? null;
323
+ }), p = Q(), _ = H(), r = g(() => !c.state.currentSchedulerId), n = (t) => {
324
+ if (t.mode === U.Rules)
325
+ _.saveLinkItemRules(t.linkItemRules);
326
+ else {
327
+ const s = t.items.map((u) => u._id);
328
+ r.value ? _.applyProduct(s) : p.applyProduct(s);
329
+ }
330
+ }, a = g(() => [o, ...c.state.menu.modules.category ?? []]);
331
+ return {
332
+ menuItems: l,
333
+ categories: a,
334
+ linkItemRules: i,
335
+ catalogManager: _,
336
+ schedulerManager: p,
337
+ noScheduler: r,
338
+ handleSubmit: n
339
+ };
340
+ }
341
+ const Z = ["alt", "src", "crossorigin"], ce = /* @__PURE__ */ x({
342
+ __name: "Thumbnail",
343
+ props: {
344
+ src: {},
345
+ alt: {},
346
+ className: {},
347
+ size: {},
348
+ crossorigin: { type: Boolean, default: !0 }
349
+ },
350
+ setup(e) {
351
+ const o = e, { t: c } = q(), l = P(!1), i = P(!o.src), p = () => {
352
+ l.value = !1, i.value = !0;
353
+ }, _ = () => {
354
+ l.value = !0, i.value = !0;
355
+ }, r = g(() => o.alt ? c("menu.thumbnail.alt.with_name", { name: o.alt }) : c("menu.thumbnail.alt.default")), n = g(() => typeof o.size == "number" ? {
356
+ width: o.size,
357
+ height: o.size
358
+ } : {
359
+ width: o.size.width,
360
+ height: o.size.height
361
+ }), a = g(() => {
362
+ if (!o.src) return null;
363
+ if (o.crossorigin) {
364
+ const t = o.src.includes("?") ? "&" : "?";
365
+ return `${o.src}${t}_cors=${Date.now()}`;
366
+ }
367
+ return o.src;
368
+ });
369
+ return (t, s) => {
370
+ const u = k("fm-icon"), m = k("fm-card");
371
+ return S(), b("div", {
372
+ class: O([t.className, "flex items-center justify-center"])
373
+ }, [
374
+ K(m, {
375
+ class: O(["flex items-center justify-center", "rounded-md"]),
376
+ style: $({ width: `${n.value.width}px`, height: `${n.value.height}px` }),
377
+ variant: "outlined"
378
+ }, {
379
+ default: B(() => [
380
+ a.value && !l.value ? (S(), b("img", {
381
+ key: 0,
382
+ alt: r.value,
383
+ class: O(["w-full h-full", "object-cover", i.value ? "" : "hidden"]),
384
+ src: a.value,
385
+ crossorigin: o.crossorigin ? "anonymous" : void 0,
386
+ onError: _,
387
+ onLoad: p
388
+ }, null, 42, Z)) : (S(), L(u, {
389
+ key: 1,
390
+ color: "neutral-gray-300",
391
+ name: "image",
392
+ outline: ""
393
+ })),
394
+ i.value ? j("", !0) : (S(), L(u, {
395
+ key: 2,
396
+ class: "animate-spin",
397
+ name: "progress_activity",
398
+ spin: ""
399
+ }))
400
+ ]),
401
+ _: 1
402
+ }, 8, ["style"])
403
+ ], 2);
404
+ };
405
+ }
406
+ });
407
+ export {
408
+ ce as _,
409
+ H as a,
410
+ ue as u
411
+ };
@@ -1,30 +1,30 @@
1
1
  import { computed as D, shallowRef as Wt, ref as H, watch as ye, nextTick as nt, getCurrentInstance as xn, onMounted as Ae, defineComponent as ae, resolveComponent as W, createElementBlock as J, openBlock as $, createBlock as q, normalizeClass as fe, createElementVNode as A, createVNode as C, unref as o, withCtx as B, toDisplayString as ge, mergeModels as Ht, useModel as qt, createCommentVNode as X, resolveDirective as Xt, withDirectives as ft, createTextVNode as Sn, renderSlot as Me, h as ve, Fragment as Oe, renderList as Ne, vShow as Jt, withModifiers as qe, createSlots as Fn, onBeforeUnmount as Ot, watchEffect as On, onUnmounted as Dn, normalizeStyle as ct, mergeProps as Vn, normalizeProps as $n, guardReactiveProps as Pn, Teleport as Un, Transition as Rn, withKeys as Mn } from "vue";
2
- import { g as An, o as Nn, f as Ln, a as Gn, n as Qt, _ as Zt, I as Kn, S as Bn, b as Dt, C as zn, R as We, c as en, d as Et, e as tn, h as Yn, m as jn, F as Wn, M as nn, j as Hn, r as qn, k as on, l as Nt, p as rn, q as Xn, P as Jn, s as Qn, t as an, u as Zn, T as Be } from "./item-ChaIX32X.js";
3
- import { _ as eo, T as to } from "./app-2bbd_O98.js";
4
- import { B as be, J as _e, A as te, G as ot, K as no, M as oo, N as ro, O as Vt, P as ao, D as Le, Q as lo, H as me, R as io, T as $t, I as ke, U as vt, V as so, W as uo, X as bt, Y as Lt, Z as co, u as ln, $ as mo } from "./menu-B52eM23G.js";
2
+ import { g as An, o as Nn, f as Ln, a as Gn, n as Qt, _ as Zt, I as Kn, S as Bn, b as Dt, C as zn, R as We, c as en, d as Et, e as tn, h as Yn, m as jn, F as Wn, M as nn, j as Hn, r as qn, k as on, l as Nt, p as rn, q as Xn, P as Jn, s as Qn, t as an, u as Zn, T as Be } from "./item-Baro-Xs_.js";
3
+ import { _ as eo, T as to } from "./app-ntt4GRm3.js";
4
+ import { B as be, J as _e, A as te, G as ot, K as no, M as oo, N as ro, O as Vt, P as ao, D as Le, Q as lo, H as me, R as io, T as $t, I as ke, U as vt, V as so, W as uo, X as bt, Y as Lt, Z as co, u as ln, $ as mo } from "./menu-DQ8YB87t.js";
5
5
  import { useI18n as ce, useCoreStore as rt, CustomAttributesForm as sn } from "@feedmepos/mf-common";
6
6
  import { useDialog as Ge, useDialogChild as Pt, useSnackbar as Re, FmButtonColorThemeVariant as Fe, components as Ie, FmButtonVariant as He, useBreakpoints as po } from "@feedmepos/ui-library";
7
7
  import { u as Ut } from "./discardConfirm-BHni0LNu.js";
8
8
  import { defineStore as fo } from "pinia";
9
- import { _ as De, a as Ue, b as go } from "./customAttributes-BInvsXiT.js";
10
- import { u as se, g as un, m as vo } from "./menuV2-D3ExhOoi.js";
11
- import { s as Tt, _ as bo } from "./index--1Md4WEj.js";
12
- import { _ as Gt } from "./category-Bz2zsVto.js";
13
- import { _ as _o, a as yo, u as ho } from "./Thumbnail.vue_vue_type_script_setup_true_lang-DHFaag4B.js";
14
- import { _ as Ze, L as xt } from "./LinkProductSideSheet-DZJY3u1w.js";
9
+ import { _ as De, a as Ue, b as go } from "./customAttributes-CRleIu8c.js";
10
+ import { u as se, g as un, m as vo } from "./menuV2-2md8qjF6.js";
11
+ import { s as Tt, _ as bo } from "./index-CWEcdMBL.js";
12
+ import { _ as Gt } from "./category-DSVtFwDD.js";
13
+ import { _ as _o, a as yo, u as ho } from "./Thumbnail.vue_vue_type_script_setup_true_lang-CPqU17LK.js";
14
+ import { _ as Ze, L as xt } from "./LinkProductSideSheet-DtDRjTMM.js";
15
15
  import { _ as dn } from "./tooltip-B5BiPMx9.js";
16
- import { _ as Xe, T as wo, l as Co } from "./index-DV7CU53l.js";
16
+ import { _ as Xe, T as wo, l as Co } from "./index-ZL08gfPT.js";
17
17
  import { u as Io } from "./search-BAPEUu1R.js";
18
18
  import { c as Rt } from "./check-C9mY6LiX.js";
19
- import { f as tt } from "./currency-BZV6-QY3.js";
19
+ import { f as tt } from "./currency-Bv61mvXo.js";
20
20
  import { c as ko } from "./string-DpfFixWH.js";
21
21
  import { useInventoryStore as Eo, InventoryBindingSummary as To } from "@feedmepos/mf-inventory-portal";
22
- import { u as xo } from "./priceTier-Ccww0TxU.js";
22
+ import { u as xo } from "./priceTier-DbVxTs3S.js";
23
23
  import { d as Mt } from "./vuedraggable-CK8z7qA8.js";
24
- import { _ as So } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-DC53jOxl.js";
24
+ import { _ as So } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-DSrvQozf.js";
25
25
  import "./app-CiBqmBzO.js";
26
26
  /* empty css */
27
- import { i as Fo, t as At, w as Oo, a as cn, b as mn, n as Do, c as Vo, r as $o, _ as Po } from "./index-C7lfKWR2.js";
27
+ import { i as Fo, t as At, w as Oo, a as cn, b as mn, n as Do, c as Vo, r as $o, _ as Po } from "./index-eJ8bZn8o.js";
28
28
  import { c as mt } from "./object-DVUNCr7w.js";
29
29
  import { _ as Uo } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
30
30
  import { _ as Kt } from "./MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js";
@@ -819,7 +819,7 @@ const gt = () => {
819
819
  };
820
820
  }
821
821
  });
822
- var fr = { firebase: { storageBucket: "image.feedmedev.cc" } };
822
+ var fr = { firebase: { storageBucket: "image.feedme.cc" } };
823
823
  const gr = {
824
824
  key: 0,
825
825
  class: "absolute inset-0 flex items-center justify-center image-action-overlay"
@@ -4767,7 +4767,7 @@ function fl() {
4767
4767
  tooltip: n("menu.tree_editor.actions.link_category_to_catalog"),
4768
4768
  onClick: () => {
4769
4769
  const N = r.state.menu.modules.item.filter((L) => Lt(L).some(({ _id: z }) => z === c._id));
4770
- p.applyProduct(N.map((L) => L._id));
4770
+ p.addProduct(N.map((L) => L._id));
4771
4771
  }
4772
4772
  }), {
4773
4773
  id: u(c._id),
@@ -4809,7 +4809,7 @@ function fl() {
4809
4809
  tooltip: n("menu.tree_editor.actions.link_category_to_catalog"),
4810
4810
  onClick: () => {
4811
4811
  const c = r.state.menu.modules.item.filter((V) => !V.category);
4812
- p.applyProduct(c.map((V) => V._id));
4812
+ p.addProduct(c.map((V) => V._id));
4813
4813
  }
4814
4814
  }), l.push(x));
4815
4815
  const y = (c, V) => `item-${V ?? "addon"}-${c}`;
@@ -4845,7 +4845,7 @@ function fl() {
4845
4845
  showOnHover: !0,
4846
4846
  tooltip: n("menu.tree_editor.actions.link_product_to_catalog"),
4847
4847
  onClick: () => {
4848
- p.applyProduct([c._id]);
4848
+ p.addProduct([c._id]);
4849
4849
  }
4850
4850
  }) : ie.push({
4851
4851
  id: `remove-from-catalog-${c._id}`,
@@ -2,10 +2,10 @@ import { defineComponent as L, computed as d, ref as g, h as k, withModifiers as
2
2
  import { useI18n as E } from "@feedmepos/mf-common";
3
3
  import { useSnackbar as K, components as R, useBreakpoints as D, FmButtonVariant as G } from "@feedmepos/ui-library";
4
4
  import { _ as I } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
5
- import { G as q, u as A } from "./menu-B52eM23G.js";
5
+ import { G as q, u as A } from "./menu-DQ8YB87t.js";
6
6
  import { _ as H } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
7
7
  import { _ as J } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
8
- import { u as O, U as P } from "./unit-_s_zv_iK.js";
8
+ import { u as O, U as P } from "./unit-Dduk5zqJ.js";
9
9
  const Q = {
10
10
  key: 0,
11
11
  class: "h-[600px]"
@@ -2,10 +2,10 @@ import { getCurrentInstance as T, defineComponent as U, computed as g, onMounted
2
2
  import { useI18n as N } from "@feedmepos/mf-common";
3
3
  import { useDialog as Y, useSnackbar as D, FmButtonVariant as M, components as J, useBreakpoints as q } from "@feedmepos/ui-library";
4
4
  import { _ as H } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
5
- import { _ as Q } from "./app-2bbd_O98.js";
6
- import { G as K, u as P, O as j, J as W, A as X } from "./menu-B52eM23G.js";
5
+ import { _ as Q } from "./app-ntt4GRm3.js";
6
+ import { G as K, u as P, O as j, J as W, A as X } from "./menu-DQ8YB87t.js";
7
7
  import { _ as Z } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
8
- import { V as S } from "./index-BHCnGQ06.js";
8
+ import { V as S } from "./index-BPUDGOpG.js";
9
9
  import { _ as ee } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
10
10
  import { u as te } from "./search-BAPEUu1R.js";
11
11
  import { defineStore as ae } from "pinia";
@@ -1,19 +1,19 @@
1
1
  import { defineComponent as H, computed as d, ref as p, watch as A, onMounted as F, resolveComponent as m, createElementBlock as K, openBlock as b, Fragment as W, createVNode as n, withCtx as u, createElementVNode as i, toDisplayString as M, unref as e, createBlock as D } from "vue";
2
- import { D as j } from "./dayjs.min-CnQWW-Z3.js";
2
+ import { D as j } from "./dayjs.min-BXVEjQmH.js";
3
3
  import { useRoute as J, useRouter as Q } from "vue-router";
4
- import { _ as X, w as Z } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-c4FmNdn4.js";
5
- import { G as ee, u as te, D as ae, H as oe, O as ne } from "./menu-B52eM23G.js";
4
+ import { _ as X, w as Z } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-DfNllbYR.js";
5
+ import { G as ee, u as te, D as ae, H as oe, O as ne } from "./menu-DQ8YB87t.js";
6
6
  import { useI18n as le } from "@feedmepos/mf-common";
7
7
  import { useSnackbar as se } from "@feedmepos/ui-library";
8
8
  import { _ as R } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
9
- import { L as V } from "./LinkProductSideSheet-DZJY3u1w.js";
10
- import { _ as ue } from "./index--1Md4WEj.js";
9
+ import { L as V } from "./LinkProductSideSheet-DtDRjTMM.js";
10
+ import { _ as ue } from "./index-CWEcdMBL.js";
11
11
  import { _ as re } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
12
- import { u as ie } from "./Thumbnail.vue_vue_type_script_setup_true_lang-DHFaag4B.js";
13
- import { a as me } from "./menu-Cp9RL0oR.js";
14
- import { m as ce } from "./toExcel-C04qiFny.js";
15
- import { _ as de, u as pe, c as _e } from "./scheduler-B8XcfMpi.js";
16
- import { R as r } from "./app-2bbd_O98.js";
12
+ import { u as ie } from "./Thumbnail.vue_vue_type_script_setup_true_lang-CPqU17LK.js";
13
+ import { a as me } from "./menu-DChbKKEr.js";
14
+ import { m as ce } from "./toExcel-TQ5H4xEZ.js";
15
+ import { _ as de, u as pe, c as _e } from "./scheduler-BNI0t9f5.js";
16
+ import { R as r } from "./app-ntt4GRm3.js";
17
17
  const fe = { class: "px-12 py-8" }, ve = { class: "px-12 py-8" }, ge = { class: "flex ml-auto space-x-8" }, be = { class: "flex-1 flex flex-col overflow-hidden" }, Ge = /* @__PURE__ */ H({
18
18
  __name: "[id]",
19
19
  setup(ke) {
@@ -1,5 +1,5 @@
1
1
  import { defineStore as r } from "pinia";
2
- import { ak as a, al as s, am as l } from "./menu-B52eM23G.js";
2
+ import { ak as a, al as s, am as l } from "./menu-DQ8YB87t.js";
3
3
  const u = {
4
4
  async read() {
5
5
  return a(await s().get("/public-setting"));