@feedmepos/mf-menu 0.23.5-beta.8 → 0.23.6-beta.1

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 (65) hide show
  1. package/dist/{App-uvHjqd2V.js → App-B1iTx9ZS.js} +45 -46
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-xJUQ-lK8.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BmTdJvCi.js} +22 -21
  3. package/dist/{Catalog-Cx0IGzeh.js → Catalog-BxxhBjwA.js} +103 -102
  4. package/dist/{Category-D8iG5pZe.js → Category-BDWKHWrc.js} +72 -73
  5. package/dist/{CookingGuide-B0hXBlAC.js → CookingGuide-CeLNFMyA.js} +26 -25
  6. package/dist/FormSection.vue_vue_type_script_setup_true_lang-BWJUD8NZ.js +50 -0
  7. package/dist/{Group-9LvmIRhA.js → Group-5l9MvMTA.js} +10 -10
  8. package/dist/{Group-0zmQeRkN.js → Group-CcmIo3Qy.js} +1 -1
  9. package/dist/{Group.vue_vue_type_script_setup_true_lang-CNIMLZ64.js → Group.vue_vue_type_script_setup_true_lang-BnO7uaXE.js} +102 -102
  10. package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-vo7zupXU.js +179 -0
  11. package/dist/{catalog-C8TceNKP.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-C_gnFl5X.js} +45189 -45185
  12. package/dist/{Ingredient-Dy0MtMXm.js → Ingredient-Cf-C2Lco.js} +25 -25
  13. package/dist/{index-EZ0aDJ37.js → InventoryBinding.vue_vue_type_script_setup_true_lang-BA_SyDgE.js} +572 -572
  14. package/dist/LinkProductSideSheet-CP9afw36.js +105 -0
  15. package/dist/MenuSetting-Tr8CBF_3.js +140 -0
  16. package/dist/{PrintRoute-C17WMbzg.js → PrintRoute-z3Ijdvjn.js} +25 -24
  17. package/dist/{Product-_0jLLC7N.js → Product-IcPqKMed.js} +1 -1
  18. package/dist/{Product.vue_vue_type_script_setup_true_lang-iBnkqy6S.js → Product.vue_vue_type_script_setup_true_lang-N1YWgwKS.js} +521 -523
  19. package/dist/Products-Br_c2LDW.js +244 -0
  20. package/dist/{Publish-CmQgC3iZ.js → Publish-DAVCXcHJ.js} +132 -133
  21. package/dist/{Recipe-DFRpMzwr.js → Recipe-CiZEBLRM.js} +27 -27
  22. package/dist/{Scheduler-OS_6NWWc.js → Scheduler-CqsJQBSY.js} +16 -16
  23. package/dist/{SchedulerSelector.vue_vue_type_script_setup_true_lang-CEaWek6A.js → SchedulerSelector.vue_vue_type_script_setup_true_lang-Dvr1j7vQ.js} +3 -3
  24. package/dist/{ServingSequence-CEFVeHt0.js → ServingSequence-CfMMKnmc.js} +34 -34
  25. package/dist/{Setting.vue_vue_type_script_setup_true_lang-B4odXI1r.js → Setting-C3Sb92my.js} +21 -20
  26. package/dist/{Takeaway-CAN1bRsN.js → Takeaway-2lSstuv1.js} +16 -16
  27. package/dist/{Takeaway-Dp5kgN1E.js → Takeaway-B9YLtfvo.js} +1 -1
  28. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-D7oqLhIL.js → Takeaway.vue_vue_type_script_setup_true_lang-CaiVoBAL.js} +25 -25
  29. package/dist/{Unit-CgnsNOHw.js → Unit-C3UP87af.js} +13 -13
  30. package/dist/{Variant-3QrDsDAG.js → Variant-CS45Dp23.js} +30 -30
  31. package/dist/_id_-BLh59Ace.js +193 -0
  32. package/dist/{app-DOAI4h8X.js → app-DyDqf1KQ.js} +631 -602
  33. package/dist/{app-_wuEN1-x.js → app-ooK2XpTz.js} +1 -1
  34. package/dist/app.js +1 -1
  35. package/dist/assets/linked-status-D9XN-rDY.js +24 -0
  36. package/dist/assets/override-menu-DAn-TWxj.js +24 -0
  37. package/dist/assets/validate-menu-L5v37c_c.js +24 -0
  38. package/dist/{catalog-CxL6_bCG.js → catalog-DCOt4w_8.js} +1 -1
  39. package/dist/catalogSetting-DnqeK8MW.js +62 -0
  40. package/dist/{currency-Dkzdd-Og.js → currency-B4OalCTG.js} +1 -1
  41. package/dist/{lodash-tRxTymJg.js → discardConfirm-CC9WiO3c.js} +29 -29
  42. package/dist/{takeaway-IA3tfjcd.js → index-DU836Cwj.js} +36 -35
  43. package/dist/{index-Clxf3we7.js → index-FT6doXU6.js} +16 -16
  44. package/dist/{item-BdgTF0x7.js → item-CBEReQbq.js} +2467 -2321
  45. package/dist/{menu-XbNNyrT4.js → menu-Bs27WBwu.js} +1 -1
  46. package/dist/{menu-CifpzXtV.js → menu-CXY-bjUj.js} +93773 -93664
  47. package/dist/{object-BN9wCbKv.js → object-DNBFWMt7.js} +66 -67
  48. package/dist/{remy-veexRrOb.js → remy-QFR2Bo8R.js} +4 -4
  49. package/dist/{scheduler-D7Qwazxp.js → scheduler-BRBnzzOd.js} +27 -26
  50. package/dist/{createComponentProgrammatically-Npr1U60e.js → search-7ZYHUW7s.js} +13 -13
  51. package/dist/style.css +1 -1
  52. package/dist/{dinero-BWSRsm4k.js → toExcel-DOuTsvkj.js} +402 -224
  53. package/dist/{InfoBasic.vue_vue_type_script_setup_true_lang-DxQBDu16.js → tooltip-DpokWKto.js} +13 -13
  54. package/dist/{unit-DQt1OSmy.js → unit-DDLsWAUk.js} +44 -44
  55. package/package.json +2 -2
  56. package/dist/FormSection.vue_vue_type_script_setup_true_lang-DRD96kMo.js +0 -151
  57. package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B9J6_sfI.js +0 -238
  58. package/dist/Products-Cp5UhMxD.js +0 -240
  59. package/dist/Setting-DUMVjq-b.js +0 -4
  60. package/dist/TaxSetting-OUKiFx_5.js +0 -27
  61. package/dist/_id_-BnncSqiw.js +0 -372
  62. package/dist/assets/linked-status-CFHp9qqY.js +0 -24
  63. package/dist/assets/override-menu-IbVZf6p5.js +0 -24
  64. package/dist/assets/validate-menu-zPjVZ7P7.js +0 -24
  65. package/dist/category-D_hC9qYL.js +0 -155
@@ -1,10 +1,10 @@
1
1
  import { defineComponent, ref, watchEffect, computed, watch, openBlock, createElementBlock, normalizeStyle, onBeforeUnmount, createBlock, unref, onMounted, resolveComponent, withDirectives, createElementVNode, createVNode, vShow, Fragment, createCommentVNode, normalizeClass } from "vue";
2
+ import { c as commonjsGlobal, g as getDefaultExportFromCjs, u as useMenuStore, a as coreDart, r as registerVersion, L as Logger, b as getExperimentalSetting, i as isMobileCordova, d as isReactNative, _ as _isFirebaseServerApp, e as _registerComponent, C as Component, f as _getProvider, h as getDefaultEmulatorHost, j as getApp, k as isBrowserExtension, S as SDK_VERSION, l as getModularInstance, E as ErrorFactory, m as createSubscribe, n as deepEqual, o as LogLevel, p as getUA, F as FirebaseError, q as base64Decode, s as isIE, t as querystring, v as isEmpty, w as getApps, x as initializeApp, y as getStorage, z as menu } from "./menu-CXY-bjUj.js";
2
3
  import { FeedMeAuth, useCoreStore } from "@feedmepos/mf-common";
3
- import { c as commonjsGlobal, g as getDefaultExportFromCjs, r as registerVersion, L as Logger, a as getExperimentalSetting, i as isMobileCordova, b as isReactNative, _ as _isFirebaseServerApp, d as _registerComponent, C as Component, e as _getProvider, f as getDefaultEmulatorHost, h as getApp, j as isBrowserExtension, S as SDK_VERSION, k as getModularInstance, E as ErrorFactory, l as createSubscribe, m as deepEqual, n as LogLevel, o as getUA, F as FirebaseError, p as base64Decode, q as isIE, s as querystring, t as isEmpty, u as getApps, v as initializeApp, w as getStorage, x as useMenuStore, y as coreDart, z as menu } from "./menu-CifpzXtV.js";
4
- import { R as Remy, i as init } from "./remy-veexRrOb.js";
5
4
  import { FmButtonColorThemeVariant, FmButtonVariant } from "@feedmepos/ui-library";
5
+ import { R as Remy, i as init } from "./remy-QFR2Bo8R.js";
6
6
  import { _ as _export_sfc$1 } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
- import { u as useAppStore } from "./app-_wuEN1-x.js";
7
+ import { u as useAppStore } from "./app-ooK2XpTz.js";
8
8
  const v = "4.8.0", meta = {
9
9
  g: "LottieFiles AE ",
10
10
  a: "",
@@ -18792,7 +18792,48 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
18792
18792
  ]);
18793
18793
  };
18794
18794
  }
18795
- }), RemyDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["__scopeId", "data-v-cd495024"]]);
18795
+ }), RemyDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["__scopeId", "data-v-9adba964"]]), PUBLISH_NOTIFIER = "publish-notifier", MENU_VERSION_NOTIFIER = "menu-version-notifier";
18796
+ function useMenuNotifier() {
18797
+ const e = useMenuStore(), t = computed(() => {
18798
+ var r, i;
18799
+ return (i = (r = e == null ? void 0 : e.state) == null ? void 0 : r.restaurants) != null && i.length ? e.state.restaurants.filter((s) => s.updatedAt !== e.state.menu.updatedAt).length : 0;
18800
+ }), A = computed(() => ({
18801
+ "$menu-publish": {
18802
+ badge: t.value > 0 ? t.value : void 0
18803
+ }
18804
+ }));
18805
+ watch(
18806
+ A,
18807
+ (r) => {
18808
+ window.postMessage(
18809
+ {
18810
+ type: PUBLISH_NOTIFIER,
18811
+ data: r
18812
+ },
18813
+ "*"
18814
+ );
18815
+ },
18816
+ {
18817
+ immediate: !0
18818
+ }
18819
+ ), watch(
18820
+ () => e.version,
18821
+ (r) => {
18822
+ window.postMessage(
18823
+ {
18824
+ type: MENU_VERSION_NOTIFIER,
18825
+ data: {
18826
+ isV4: r === coreDart.F_MENU_VERSION.v4
18827
+ }
18828
+ },
18829
+ "*"
18830
+ );
18831
+ },
18832
+ {
18833
+ immediate: !0
18834
+ }
18835
+ );
18836
+ }
18796
18837
  var name$1 = "firebase", version$1 = "10.13.1";
18797
18838
  /**
18798
18839
  * @license
@@ -23217,48 +23258,6 @@ async function initFirebase() {
23217
23258
  const e = initializeApp(define_appEndpoint_default.firebase), t = await FeedMeAuth.getCustomToken(), A = getAuth();
23218
23259
  await signInWithCustomToken(A, t), getStorage(e);
23219
23260
  }
23220
- const PUBLISH_NOTIFIER = "publish-notifier", MENU_VERSION_NOTIFIER = "menu-version-notifier";
23221
- function useMenuNotifier() {
23222
- const e = useMenuStore(), t = computed(() => {
23223
- var r, i;
23224
- return (i = (r = e == null ? void 0 : e.state) == null ? void 0 : r.restaurants) != null && i.length ? e.state.restaurants.filter((s) => s.updatedAt !== e.state.menu.updatedAt).length : 0;
23225
- }), A = computed(() => ({
23226
- "$menu-publish": {
23227
- badge: t.value > 0 ? t.value : void 0
23228
- }
23229
- }));
23230
- watch(
23231
- A,
23232
- (r) => {
23233
- window.postMessage(
23234
- {
23235
- type: PUBLISH_NOTIFIER,
23236
- data: r
23237
- },
23238
- "*"
23239
- );
23240
- },
23241
- {
23242
- immediate: !0
23243
- }
23244
- ), watch(
23245
- () => e.version,
23246
- (r) => {
23247
- window.postMessage(
23248
- {
23249
- type: MENU_VERSION_NOTIFIER,
23250
- data: {
23251
- isV4: r === coreDart.F_MENU_VERSION.v4
23252
- }
23253
- },
23254
- "*"
23255
- );
23256
- },
23257
- {
23258
- immediate: !0
23259
- }
23260
- );
23261
- }
23262
23261
  const _hoisted_1 = {
23263
23262
  key: 0,
23264
23263
  class: /* @__PURE__ */ normalizeClass(["w-screen h-dvh fixed top-0 left-0 flex items-center justify-center bg-white"]),
@@ -1,13 +1,14 @@
1
- import { defineComponent as K, computed as i, h as u, ref as U, resolveComponent as b, openBlock as d, createElementBlock as p, createVNode as v, withCtx as g, createElementVNode as V, createBlock as j, unref as n, createCommentVNode as C, toDisplayString as A, isRef as D, Fragment as G, renderList as H } from "vue";
2
- import { x as M, ab as O } from "./menu-CifpzXtV.js";
3
- import { u as $ } from "./createComponentProgrammatically-Npr1U60e.js";
1
+ import { defineComponent as K, computed as i, h as u, ref as U, resolveComponent as b, openBlock as d, createElementBlock as p, createVNode as f, withCtx as g, createElementVNode as V, createBlock as j, unref as n, createCommentVNode as C, toDisplayString as A, isRef as D, Fragment as G, renderList as H } from "vue";
2
+ import { useI18n as M } from "@feedmepos/mf-common";
4
3
  import { components as B, FmButtonVariant as I, FmButtonColorThemeVariant as h } from "@feedmepos/ui-library";
5
- import { _ as q, L as J } from "./FormSection.vue_vue_type_script_setup_true_lang-DRD96kMo.js";
6
- import { useI18n as Q } from "@feedmepos/mf-common";
4
+ import { _ as O } from "./FormSection.vue_vue_type_script_setup_true_lang-BWJUD8NZ.js";
5
+ import { L as $ } from "./LinkProductSideSheet-CP9afw36.js";
6
+ import { u as q } from "./search-7ZYHUW7s.js";
7
+ import { u as J, ab as Q } from "./menu-CXY-bjUj.js";
7
8
  const W = { class: "space-y-16" }, X = { class: "flex items-center space-x-24" }, Y = {
8
9
  key: 0,
9
10
  class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
10
- }, ne = /* @__PURE__ */ K({
11
+ }, le = /* @__PURE__ */ K({
11
12
  __name: "ApplyProduct",
12
13
  props: {
13
14
  title: {},
@@ -22,18 +23,18 @@ const W = { class: "space-y-16" }, X = { class: "flex items-center space-x-24" }
22
23
  },
23
24
  emits: ["update:overrides", "row-click"],
24
25
  setup(z, { emit: F }) {
25
- const s = z, _ = F, L = M(), { searchKey: m, filter: w } = $(), y = i(() => s.categorizedItems || L.categorizedItems), k = i(() => O(y.value, s.overrides)), P = i(() => k.value.reduce((t, e) => {
26
+ const s = z, _ = F, L = J(), { searchKey: m, filter: w } = q(), y = i(() => s.categorizedItems || L.categorizedItems), k = i(() => Q(y.value, s.overrides)), P = i(() => k.value.reduce((t, e) => {
26
27
  if (w([e.name]))
27
28
  return t.push(e), t;
28
29
  const r = e.items.filter((a) => w([a.label]));
29
30
  return r.length && t.push({ ...e, items: r }), t;
30
31
  }, [])), R = i(() => s.showVariant || s.selectVariant);
31
- function x(t, e) {
32
+ function S(t, e) {
32
33
  var a, l;
33
34
  const r = e ? (a = s.overrides) == null ? void 0 : a.filter((o) => !(o._id === t && o.combinationKey === e)) : (l = s.overrides) == null ? void 0 : l.filter((o) => o._id !== t);
34
35
  _("update:overrides", r ?? []);
35
36
  }
36
- const { t: c } = Q(), E = i(
37
+ const { t: c } = M(), E = i(
37
38
  () => (t) => [
38
39
  {
39
40
  accessorKey: "label",
@@ -82,24 +83,24 @@ const W = { class: "space-y-16" }, X = { class: "flex items-center space-x-24" }
82
83
  onClick: () => {
83
84
  var o;
84
85
  if (a > 0) {
85
- const f = (o = e.row.getParentRow()) == null ? void 0 : o.original;
86
- x(f.value, r.value);
86
+ const v = (o = e.row.getParentRow()) == null ? void 0 : o.original;
87
+ S(v.value, r.value);
87
88
  } else
88
- x(r.value);
89
+ S(r.value);
89
90
  }
90
91
  })
91
92
  ) : null;
92
93
  }
93
94
  }
94
95
  ]
95
- ), S = U({}), N = (t) => t.variant, T = i(() => k.value.reduce((t, e) => t + e.items.length, 0));
96
+ ), x = U({}), N = (t) => t.variant, T = i(() => k.value.reduce((t, e) => t + e.items.length, 0));
96
97
  return (t, e) => {
97
98
  const r = b("fm-button"), a = b("fm-search"), l = b("fm-table");
98
99
  return d(), p("div", W, [
99
- v(q, { title: t.title }, {
100
+ f(O, { title: t.title }, {
100
101
  "append-title": g(() => [
101
102
  V("div", null, [
102
- t.editable ? (d(), j(J, {
103
+ t.editable ? (d(), j($, {
103
104
  key: 0,
104
105
  "categorized-items": y.value,
105
106
  "initial-value": t.overrides,
@@ -109,7 +110,7 @@ const W = { class: "space-y-16" }, X = { class: "flex items-center space-x-24" }
109
110
  onSubmit: e[0] || (e[0] = (o) => _("update:overrides", o))
110
111
  }, {
111
112
  default: g(({ trigger: o }) => [
112
- v(r, {
113
+ f(r, {
113
114
  "text-color": n(h).ColorPrimary,
114
115
  "border-color": n(h).ColorPrimary,
115
116
  variant: n(I).Secondary,
@@ -125,7 +126,7 @@ const W = { class: "space-y-16" }, X = { class: "flex items-center space-x-24" }
125
126
  default: g(() => [
126
127
  V("div", X, [
127
128
  t.editable ? (d(), p("p", Y, A(n(c)("menu.common.labels.product_count", { count: T.value })), 1)) : C("", !0),
128
- v(a, {
129
+ f(a, {
129
130
  modelValue: n(m),
130
131
  "onUpdate:modelValue": e[1] || (e[1] = (o) => D(m) ? m.value = o : null),
131
132
  placeholder: n(c)("menu.common.labels.search_product"),
@@ -139,16 +140,16 @@ const W = { class: "space-y-16" }, X = { class: "flex items-center space-x-24" }
139
140
  key: o.id || "",
140
141
  class: "xs:overflow-x-scroll"
141
142
  }, [
142
- v(l, {
143
+ f(l, {
143
144
  "column-defs": E.value(o),
144
- "expanded-state": S.value,
145
+ "expanded-state": x.value,
145
146
  "get-sub-row": N,
146
147
  "page-size": 9999,
147
148
  "row-data": o.items,
148
149
  "search-value": n(m),
149
150
  "shrink-at": !1,
150
151
  "hide-footer": "",
151
- "onUpdate:expandedState": e[2] || (e[2] = (f) => S.value = f)
152
+ "onUpdate:expandedState": e[2] || (e[2] = (v) => x.value = v)
152
153
  }, null, 8, ["column-defs", "expanded-state", "row-data", "search-value"])
153
154
  ]))), 128))
154
155
  ]);
@@ -156,5 +157,5 @@ const W = { class: "space-y-16" }, X = { class: "flex items-center space-x-24" }
156
157
  }
157
158
  });
158
159
  export {
159
- ne as _
160
+ le as _
160
161
  };
@@ -1,21 +1,86 @@
1
- import { defineComponent as oe, ref as B, computed as T, resolveComponent as v, openBlock as d, createElementBlock as S, Fragment as P, renderSlot as ye, createVNode as n, unref as e, withCtx as p, createElementVNode as _, renderList as W, createBlock as h, createCommentVNode as z, createTextVNode as be, toDisplayString as R, h as J, withModifiers as q, normalizeClass as xe } from "vue";
2
- import { useCoreStore as de, useI18n as ne } from "@feedmepos/mf-common";
3
- import { G as F, x as pe, K as ge, A as fe, z as re, B as ke, H as ee, J as ve, T as ue } from "./menu-CifpzXtV.js";
4
- import { C as Ce } from "./catalog-CxL6_bCG.js";
5
- import { useRouter as he } from "vue-router";
6
- import { _ as Oe, R as ie } from "./app-DOAI4h8X.js";
7
- import { _ as Fe } from "./PageLayout.vue_vue_type_script_setup_true_lang-BJCuL4EK.js";
8
- import { useSnackbar as _e, components as te, FmButtonColorThemeVariant as Q, FmButtonVariant as K, useDialog as Me, useBreakpoints as De } from "@feedmepos/ui-library";
9
- import { c as Se } from "./check-C9mY6LiX.js";
10
- import { C as L, a as I, _ as ce } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B9J6_sfI.js";
11
- import { _ as Te } from "./FormSection.vue_vue_type_script_setup_true_lang-DRD96kMo.js";
1
+ import { defineComponent as oe, computed as T, resolveComponent as v, openBlock as d, createBlock as h, createVNode as n, ref as B, createElementBlock as S, Fragment as P, renderSlot as ye, unref as e, withCtx as p, createElementVNode as _, renderList as W, createCommentVNode as z, createTextVNode as be, toDisplayString as R, h as J, withModifiers as q, normalizeClass as xe } from "vue";
2
+ import { useRouter as ke } from "vue-router";
3
+ import { G as F, u as de, K as pe, A as ge, z as re, B as Ce, H as ee, J as fe, T as ue } from "./menu-CXY-bjUj.js";
4
+ import { useI18n as ne, useCoreStore as ve } from "@feedmepos/mf-common";
5
+ import { useSnackbar as _e, components as te, FmButtonColorThemeVariant as Q, FmButtonVariant as K, useDialog as he, useBreakpoints as Oe } from "@feedmepos/ui-library";
6
+ import { _ as Fe, R as ie } from "./app-DyDqf1KQ.js";
7
+ import { _ as Me } from "./TextChip.vue_vue_type_script_setup_true_lang-DoCbhCON.js";
12
8
  import { _ as ae } from "./FormItem.vue_vue_type_script_setup_true_lang-DKsxEK-8.js";
13
- import { _ as Ve } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
14
- import { _ as Ae } from "./TextChip.vue_vue_type_script_setup_true_lang-DoCbhCON.js";
15
- const Ue = { class: "space-y-32" }, Ne = {
9
+ import { _ as De } from "./FormSection.vue_vue_type_script_setup_true_lang-BWJUD8NZ.js";
10
+ import { c as Se } from "./check-C9mY6LiX.js";
11
+ import { C as L, a as I } from "./catalogSetting-DnqeK8MW.js";
12
+ import { _ as ce } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-vo7zupXU.js";
13
+ import { _ as Te } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
14
+ import { _ as Ve } from "./PageLayout.vue_vue_type_script_setup_true_lang-BJCuL4EK.js";
15
+ import { C as Ae } from "./catalog-DCOt4w_8.js";
16
+ const Ue = /* @__PURE__ */ oe({
17
+ __name: "CatalogUsageTable",
18
+ props: {
19
+ catalog: {}
20
+ },
21
+ setup(X) {
22
+ const M = X, {
23
+ t: m
24
+ } = ne(), D = T(() => M.catalog.restaurants.length === 0 ? [{
25
+ name: "--",
26
+ usage: []
27
+ }] : M.catalog.restaurants), $ = [{
28
+ accessorKey: "name",
29
+ header: () => n("div", {
30
+ class: "flex flex-col"
31
+ }, [n("p", null, [M.catalog.name]), n("p", {
32
+ class: "text-fm-color-typo-secondary fm-typo-en-body-md-400"
33
+ }, [m("menu.catalog.usage.tax_calculation") + `: ${M.catalog.taxMode}`])]),
34
+ cell: ({
35
+ row: y
36
+ }) => n("div", {
37
+ class: "space-y-4"
38
+ }, [n("p", null, [y.original.name]), n("p", {
39
+ class: "text-fm-color-typo-secondary"
40
+ }, [y.original.id])]),
41
+ enableSorting: !1,
42
+ meta: {
43
+ headerClass: "px-16 py-4"
44
+ }
45
+ }, {
46
+ header: () => n("div", {
47
+ class: "w-full flex justify-between"
48
+ }, [n("p", null, [m("menu.catalog.usage.usage")]), n(Me, {
49
+ label: `${m("menu.catalog.usage.products", {
50
+ count: M.catalog.totalProducts
51
+ })}`,
52
+ variant: "info",
53
+ class: "px-8 py-4"
54
+ }, null)]),
55
+ accessorKey: "usage",
56
+ cell: ({
57
+ row: y
58
+ }) => {
59
+ const k = y.original.usage.join(", ") || "--";
60
+ return n("p", {
61
+ class: "flex py-8"
62
+ }, [k]);
63
+ },
64
+ enableSorting: !1,
65
+ meta: {
66
+ headerClass: "px-16 py-4"
67
+ }
68
+ }];
69
+ return (y, k) => {
70
+ const V = v("FmTable");
71
+ return d(), h(V, {
72
+ "column-defs": $,
73
+ "row-data": D.value,
74
+ "page-size": D.value.length,
75
+ "hide-footer": !0,
76
+ "shrink-at": !1
77
+ }, null, 8, ["row-data", "page-size"]);
78
+ };
79
+ }
80
+ }), Ne = { class: "space-y-32" }, Ee = {
16
81
  key: 0,
17
82
  class: "pl-32 space-x-8"
18
- }, Ee = { class: "pl-[60px] space-y-16" }, Re = { class: "space-x-16 flex items-center" }, $e = { class: "flex-1 space-y-4" }, we = { class: "fm-typo-en-body-lg-400" }, Le = { class: "fm-typo-en-body-md-400" }, Ie = { class: "flex gap-8 items-center justify-start" }, Be = /* @__PURE__ */ oe({
83
+ }, Re = { class: "pl-[60px] space-y-16" }, $e = { class: "space-x-16 flex items-center" }, we = { class: "flex-1 space-y-4" }, Le = { class: "fm-typo-en-body-lg-400" }, Ie = { class: "fm-typo-en-body-md-400" }, Be = { class: "flex gap-8 items-center justify-start" }, Pe = /* @__PURE__ */ oe({
19
84
  __name: "Form",
20
85
  setup(X, { expose: M }) {
21
86
  const m = B(!1), D = B(!1), $ = (i, s) => {
@@ -23,7 +88,7 @@ const Ue = { class: "space-y-32" }, Ne = {
23
88
  s ?? re.generator.initMenuV4Catalog(),
24
89
  y.value
25
90
  ));
26
- }, y = T(() => k.version === F.F_MENU_VERSION.enum.v4), k = pe(), V = de(), g = ge(fe(_e())), r = B(
91
+ }, y = T(() => k.version === F.F_MENU_VERSION.enum.v4), k = de(), V = ve(), g = pe(ge(_e())), r = B(
27
92
  L.fromCatalog(re.generator.initMenuV4Catalog(), y.value)
28
93
  ), Z = T(() => k.catalogs.map((i) => i.name)), A = T({
29
94
  get: () => r.value.taxSetting,
@@ -34,7 +99,7 @@ const Ue = { class: "space-y-32" }, Ne = {
34
99
  var f, o;
35
100
  if (!V.currentCountry.value) return [];
36
101
  const i = ((f = r.value.taxSetting) == null ? void 0 : f.mode) === I.MANUAL ? ((o = r.value.taxSetting) == null ? void 0 : o.inclusive) ?? [] : [];
37
- return ke.Country.getCountry(V.currentCountry.value).taxSystems.map((l) => {
102
+ return Ce.Country.getCountry(V.currentCountry.value).taxSystems.map((l) => {
38
103
  const a = i.find((b) => b.systemCode === l.code);
39
104
  return {
40
105
  inclusive: (a == null ? void 0 : a.inclusive) || !1,
@@ -66,7 +131,7 @@ const Ue = { class: "space-y-32" }, Ne = {
66
131
  await g.updateMenu(
67
132
  {
68
133
  module: F.F_MENU_MODULE_V4_KEY.enum.catalog,
69
- operation: ve.F_OPERATION_TYPE.create,
134
+ operation: fe.F_OPERATION_TYPE.create,
70
135
  data: i
71
136
  },
72
137
  i.name
@@ -91,7 +156,7 @@ const Ue = { class: "space-y-32" }, Ne = {
91
156
  "max-width": 560
92
157
  }, {
93
158
  "side-sheet-footer": p(() => [
94
- _("div", Ie, [
159
+ _("div", Be, [
95
160
  n(x, {
96
161
  loading: D.value,
97
162
  label: e(u)("menu.common.actions.add"),
@@ -108,8 +173,8 @@ const Ue = { class: "space-y-32" }, Ne = {
108
173
  ])
109
174
  ]),
110
175
  default: p(() => [
111
- _("div", Ue, [
112
- n(Te, {
176
+ _("div", Ne, [
177
+ n(De, {
113
178
  title: e(u)("menu.catalog.detail")
114
179
  }, {
115
180
  default: p(() => [
@@ -150,7 +215,7 @@ const Ue = { class: "space-y-32" }, Ne = {
150
215
  ]),
151
216
  _: 1
152
217
  }, 8, ["model-value"]),
153
- ((E = r.value.taxSetting) == null ? void 0 : E.mode) === e(I).MANUAL ? (d(), S("div", Ne, [
218
+ ((E = r.value.taxSetting) == null ? void 0 : E.mode) === e(I).MANUAL ? (d(), S("div", Ee, [
154
219
  (d(!0), S(P, null, W(w.value, (C) => (d(), h(a, {
155
220
  key: C.systemCode,
156
221
  "model-value": C.inclusive,
@@ -214,7 +279,7 @@ const Ue = { class: "space-y-32" }, Ne = {
214
279
  sublabel: e(u)("menu.catalog.form.markup.auto.sublabel"),
215
280
  "onUpdate:modelValue": s[4] || (s[4] = (t) => r.value.markupOptions = t ? [] : null)
216
281
  }, null, 8, ["model-value", "label", "sublabel"]),
217
- _("div", Ee, [
282
+ _("div", Re, [
218
283
  n(ce, {
219
284
  categories: e(k).categories,
220
285
  items: e(k).items,
@@ -249,16 +314,16 @@ const Ue = { class: "space-y-32" }, Ne = {
249
314
  onClick: C
250
315
  }, {
251
316
  default: p(() => [
252
- _("div", Re, [
253
- _("div", $e, [
317
+ _("div", $e, [
318
+ _("div", we, [
254
319
  n(c, { class: "text-fm-color-typo-info bg-fm-color-system-info-100 font-semibold" }, {
255
320
  default: p(() => [
256
321
  be(R(e(u)("menu.catalog.form.markup.percentage", { value: t.percentage })), 1)
257
322
  ]),
258
323
  _: 2
259
324
  }, 1024),
260
- _("p", we, R(e(u)("menu.catalog.form.markup.config", { number: E + 1 })), 1),
261
- _("p", Le, R(t.includeItems ? e(u)("menu.catalog.form.markup.products", {
325
+ _("p", Le, R(e(u)("menu.catalog.form.markup.config", { number: E + 1 })), 1),
326
+ _("p", Ie, R(t.includeItems ? e(u)("menu.catalog.form.markup.products", {
262
327
  count: t.includeItems.length
263
328
  }) : e(u)("menu.catalog.form.markup.all_items")), 1)
264
329
  ]),
@@ -285,71 +350,7 @@ const Ue = { class: "space-y-32" }, Ne = {
285
350
  ], 64);
286
351
  };
287
352
  }
288
- }), me = Be, Pe = /* @__PURE__ */ oe({
289
- __name: "CatalogUsageTable",
290
- props: {
291
- catalog: {}
292
- },
293
- setup(X) {
294
- const M = X, {
295
- t: m
296
- } = ne(), D = T(() => M.catalog.restaurants.length === 0 ? [{
297
- name: "--",
298
- usage: []
299
- }] : M.catalog.restaurants), $ = [{
300
- accessorKey: "name",
301
- header: () => n("div", {
302
- class: "flex flex-col"
303
- }, [n("p", null, [M.catalog.name]), n("p", {
304
- class: "text-fm-color-typo-secondary fm-typo-en-body-md-400"
305
- }, [m("menu.catalog.usage.tax_calculation") + `: ${M.catalog.taxMode}`])]),
306
- cell: ({
307
- row: y
308
- }) => n("div", {
309
- class: "space-y-4"
310
- }, [n("p", null, [y.original.name]), n("p", {
311
- class: "text-fm-color-typo-secondary"
312
- }, [y.original.id])]),
313
- enableSorting: !1,
314
- meta: {
315
- headerClass: "px-16 py-4"
316
- }
317
- }, {
318
- header: () => n("div", {
319
- class: "w-full flex justify-between"
320
- }, [n("p", null, [m("menu.catalog.usage.usage")]), n(Ae, {
321
- label: `${m("menu.catalog.usage.products", {
322
- count: M.catalog.totalProducts
323
- })}`,
324
- variant: "info",
325
- class: "px-8 py-4"
326
- }, null)]),
327
- accessorKey: "usage",
328
- cell: ({
329
- row: y
330
- }) => {
331
- const k = y.original.usage.join(", ") || "--";
332
- return n("p", {
333
- class: "flex py-8"
334
- }, [k]);
335
- },
336
- enableSorting: !1,
337
- meta: {
338
- headerClass: "px-16 py-4"
339
- }
340
- }];
341
- return (y, k) => {
342
- const V = v("FmTable");
343
- return d(), h(V, {
344
- "column-defs": $,
345
- "row-data": D.value,
346
- "page-size": D.value.length,
347
- "hide-footer": !0,
348
- "shrink-at": !1
349
- }, null, 8, ["row-data", "page-size"]);
350
- };
351
- }
352
- }), ze = {
353
+ }), me = Pe, ze = {
353
354
  key: 1,
354
355
  class: "flex flex-col overflow-scroll divide-y divide-fm-color-neutral-gray-100"
355
356
  }, Ke = ["onClick"], Ge = {
@@ -366,10 +367,10 @@ const Ue = { class: "space-y-32" }, Ne = {
366
367
  class: "fm-typo-en-title-md-600"
367
368
  }, We = {
368
369
  class: "space-y-24"
369
- }, le = "main", ma = /* @__PURE__ */ oe({
370
+ }, le = "main", da = /* @__PURE__ */ oe({
370
371
  __name: "Catalog",
371
372
  setup(X) {
372
- const M = de(), m = pe(), D = _e(), $ = fe(D), y = Me(), k = ge($), V = he(), {
373
+ const M = ve(), m = de(), D = _e(), $ = ge(D), y = he(), k = pe($), V = ke(), {
373
374
  t: g
374
375
  } = ne();
375
376
  function r(o, l) {
@@ -436,7 +437,7 @@ const Ue = { class: "space-y-32" }, Ne = {
436
437
  defaultOrderFrom: a.defaultOrderFrom
437
438
  }))].map((a) => {
438
439
  var x;
439
- const b = Z(((x = a.doc) == null ? void 0 : x._id) || null), N = a.doc ? Ce.getSellingItem(a.doc, m.state.menu) : m.state.menu.modules.item;
440
+ const b = Z(((x = a.doc) == null ? void 0 : x._id) || null), N = a.doc ? Ae.getSellingItem(a.doc, m.state.menu) : m.state.menu.modules.item;
440
441
  return {
441
442
  ...a,
442
443
  taxMode: a.taxes ? "Manual" : "Automatic",
@@ -487,7 +488,7 @@ const Ue = { class: "space-y-32" }, Ne = {
487
488
  }).onPrimary(async () => {
488
489
  await k.updateMenu({
489
490
  module: F.F_MENU_MODULE_V4_KEY.enum.catalog,
490
- operation: ve.F_OPERATION_TYPE.delete,
491
+ operation: fe.F_OPERATION_TYPE.delete,
491
492
  data: o.id
492
493
  }, o.name, !0), m.selectCatalog(null), await V.push({
493
494
  name: ie.CATALOG
@@ -542,10 +543,10 @@ const Ue = { class: "space-y-32" }, Ne = {
542
543
  }, ["stop", "prevent"])
543
544
  })]);
544
545
  }
545
- }]), s = De(), f = T(() => s.breakpoints.value.xs);
546
+ }]), s = Oe(), f = T(() => s.breakpoints.value.xs);
546
547
  return (o, l) => {
547
548
  const a = v("fm-button"), b = v("FmTable"), N = v("FmButton"), x = v("fm-side-sheet");
548
- return d(), h(Fe, {
549
+ return d(), h(Ve, {
549
550
  heading: e(g)("menu.catalog.title")
550
551
  }, {
551
552
  "append-heading": p(() => [U.value.length > 0 ? (d(), h(e(me), {
@@ -568,7 +569,7 @@ const Ue = { class: "space-y-32" }, Ne = {
568
569
  }, null, 8, ["label", "onClick"])])]),
569
570
  _: 1
570
571
  }, 512)) : z("", !0)]),
571
- default: p(() => [U.value.length === 0 ? (d(), h(e(Ve), {
572
+ default: p(() => [U.value.length === 0 ? (d(), h(e(Te), {
572
573
  key: 0,
573
574
  subtitle: e(g)("menu.catalog.empty.subtitle"),
574
575
  title: e(g)("menu.catalog.empty.title")
@@ -600,7 +601,7 @@ const Ue = { class: "space-y-32" }, Ne = {
600
601
  variant: e(K).Tertiary,
601
602
  "prepend-icon": "delete",
602
603
  onClick: q((O) => u(c), ["stop"])
603
- }, null, 8, ["text-color", "variant", "onClick"])])], 8, Ke))), 128))])) : (d(), h(Oe, {
604
+ }, null, 8, ["text-color", "variant", "onClick"])])], 8, Ke))), 128))])) : (d(), h(Fe, {
604
605
  key: 0
605
606
  }, {
606
607
  default: p(() => [n(b, {
@@ -619,7 +620,7 @@ const Ue = { class: "space-y-32" }, Ne = {
619
620
  "dismiss-away": ""
620
621
  }, {
621
622
  "side-sheet-header": p(() => [_("p", qe, R(e(g)("menu.catalog.usage.title")), 1)]),
622
- default: p(() => [_("div", We, [(d(!0), S(P, null, W(w.value, (c, O) => (d(), h(Pe, {
623
+ default: p(() => [_("div", We, [(d(!0), S(P, null, W(w.value, (c, O) => (d(), h(Ue, {
623
624
  key: O,
624
625
  catalog: c
625
626
  }, null, 8, ["catalog"]))), 128))])]),
@@ -631,5 +632,5 @@ const Ue = { class: "space-y-32" }, Ne = {
631
632
  }
632
633
  });
633
634
  export {
634
- ma as default
635
+ da as default
635
636
  };