@feedmepos/mf-menu 0.31.32-prod → 0.31.33-beta.10

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 (101) hide show
  1. package/dist/{App-NHdXEdrJ.js → App-DLoBsgTh.js} +79 -33
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DoTx23iL.js → ApplyProduct.vue_vue_type_script_setup_true_lang-AdxIn_cb.js} +20 -20
  3. package/dist/{Catalog-B0fV6Yje.js → Catalog-CEvqDKD0.js} +80 -80
  4. package/dist/{Category-CJZs9I7F.js → Category-CPrXxkVI.js} +41 -41
  5. package/dist/{Category-CUKZ10xq.js → Category-CnsBFgvu.js} +37 -33
  6. package/dist/{CookingGuide-kVclP--T.js → CookingGuide-Day6eG7h.js} +66 -66
  7. package/dist/CustomAttributeChip.vue_vue_type_script_setup_true_lang-CzrjTv0X.js +113 -0
  8. package/dist/{Group-Bgkye2LL.js → Group-HAAm8its.js} +1 -1
  9. package/dist/{Group-CAS6o4Fo.js → Group-_G2GnGz-.js} +3 -3
  10. package/dist/Group.vue_vue_type_script_setup_true_lang-CTDR_kMg.js +686 -0
  11. package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-KuT-w6bF.js +367 -0
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-RsDAGQ3o.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DwXWiz77.js} +4982 -5081
  13. package/dist/{Ingredient-DpAPMsPZ.js → Ingredient-BerGQ0W3.js} +23 -23
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-MoApzjt6.js → InventoryBinding.vue_vue_type_script_setup_true_lang-Bf9GYRjF.js} +2 -2
  15. package/dist/LinkProductSideSheet-32r2l60j.js +297 -0
  16. package/dist/LinkProductSideSheet.vue_vue_type_style_index_0_scoped_97fa9d58_lang-DvG3mOom.js +8024 -0
  17. package/dist/{MenuSetting-CoqMT8Vh.js → MenuSetting-DmyEGemp.js} +20 -20
  18. package/dist/{PrintRoute-DyJil1Hl.js → PrintRoute-8gipiFdT.js} +99 -98
  19. package/dist/{Product-BPIUTn0_.js → Product-Cqvq9DAA.js} +1 -1
  20. package/dist/Product.vue_vue_type_script_setup_true_lang-DcMr8wkh.js +1578 -0
  21. package/dist/{ProductInternalTools-DXgWE6JU.js → ProductInternalTools--w7YOgx2.js} +17 -17
  22. package/dist/Products-BIRGYu47.js +283 -0
  23. package/dist/{Publish-DDzpmm72.js → Publish-BcbzhAa5.js} +3 -3
  24. package/dist/{Recipe-DHYzO0IS.js → Recipe-z1zhmblA.js} +13 -13
  25. package/dist/{Scheduler-DBad2mO3.js → Scheduler-Cv9Y5M6i.js} +7 -7
  26. package/dist/{ServingSequence-DC7raAtF.js → ServingSequence-DWFJD-1y.js} +24 -24
  27. package/dist/Setting-BgCssMcE.js +259 -0
  28. package/dist/{Subcategory-DHjc7WeF.js → Subcategory-D4BYtWMN.js} +10 -10
  29. package/dist/{Takeaway-CJRTaygj.js → Takeaway-126rJXs4.js} +9 -9
  30. package/dist/{Takeaway-CAIAHpA-.js → Takeaway-D-UZAzfn.js} +1 -1
  31. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BNu9JjwH.js → Takeaway.vue_vue_type_script_setup_true_lang-CVsyWrTL.js} +12 -12
  32. package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-szHjE_UD.js +431 -0
  33. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CLNlU4BJ.js +5990 -0
  34. package/dist/{Unit-DSMSKE6_.js → Unit-7APP9HLD.js} +13 -13
  35. package/dist/{Variant-DMXxUWnj.js → Variant-lJW6pFqT.js} +14 -14
  36. package/dist/_id_-R-pHc7HA.js +202 -0
  37. package/dist/{app-D23N7tJ0.js → app-CAhJXoa3.js} +390 -377
  38. package/dist/{app-BTgdGTYz.js → app-DoJgznLl.js} +1 -1
  39. package/dist/app.js +1 -1
  40. package/dist/apps/mf-menu/src/app.d.ts +60 -1
  41. package/dist/apps/mf-menu/src/components/feature/PriceTier/LinkPriceTierSection.vue.d.ts +24 -0
  42. package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierRuleEditor.vue.d.ts +30 -0
  43. package/dist/apps/mf-menu/src/components/feature/RestaurantAttributesSelector.vue.d.ts +33 -0
  44. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/catalog.d.ts +2 -0
  45. package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +80 -1
  46. package/dist/apps/mf-menu/src/composable/linkProducts.d.ts +1276 -0
  47. package/dist/apps/mf-menu/src/helper/import-export.d.ts +77 -0
  48. package/dist/apps/mf-menu/src/helper/menu.d.ts +77 -0
  49. package/dist/apps/mf-menu/src/helper/setting/catalogSetting.d.ts +11 -2
  50. package/dist/apps/mf-menu/src/manager/menu/item.d.ts +77 -0
  51. package/dist/apps/mf-menu/src/router/shared.d.ts +2 -1
  52. package/dist/apps/mf-menu/src/stores/manager/catalog.d.ts +2 -0
  53. package/dist/apps/mf-menu/src/stores/menu.d.ts +79 -0
  54. package/dist/apps/mf-menu/src/types/linkProducts.d.ts +21 -0
  55. package/dist/apps/mf-menu/src/views/PrintRoute/PrintDepartmentDialog.vue.d.ts +5 -3
  56. package/dist/apps/mf-menu/src/views/Publish/UpdateCatalogDialog.vue.d.ts +82 -0
  57. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  58. package/dist/assets/linked-status-BbJj0WW0.js +24 -0
  59. package/dist/assets/override-menu-CRaqJDr8.js +24 -0
  60. package/dist/assets/validate-menu-BQ2BFUmD.js +24 -0
  61. package/dist/{catalog-DcciqmWK.js → catalog-C1fna-Yk.js} +1 -1
  62. package/dist/catalogSetting-BKP36lej.js +71 -0
  63. package/dist/{category-bhqVqDzJ.js → category-DK_MXlvY.js} +5 -5
  64. package/dist/{currency-Clgvy00I.js → currency-D2fl1Bk0.js} +1 -1
  65. package/dist/{dayjs.min-DeSv8lfJ.js → dayjs.min-Bk9ZYtg9.js} +1 -1
  66. package/dist/{index-BHbYu_OM.js → index-BJ3_8aUL.js} +14 -14
  67. package/dist/{index-CTUaJyIh.js → index-CSuF-4Sa.js} +14 -14
  68. package/dist/{index-DZZJjEOs.js → index-Cc2J6T0N.js} +28 -28
  69. package/dist/index-D7yR1j9C.js +215 -0
  70. package/dist/{item-DH1xf2Sa.js → item-DX44khy2.js} +201 -199
  71. package/dist/{jszip.min-CMM2HN8J.js → jszip.min-Dbu7MIcI.js} +427 -427
  72. package/dist/{menu-Dx39P1vR.js → menu-DT5c-FqY.js} +4 -4
  73. package/dist/menu-D_Cckz_p.js +133287 -0
  74. package/dist/menuV2-DTBH_-tm.js +707 -0
  75. package/dist/mf-menu.css +1 -1
  76. package/dist/{priceTier-3M5cxSYX.js → priceTier-wLQ8p4bJ.js} +1 -1
  77. package/dist/{scheduler-BT3EJBK6.js → scheduler-D6UbXLXR.js} +36 -37
  78. package/dist/subcategory-DjN3X1BI.js +148 -0
  79. package/dist/{toExcel-BLoj4Wqb.js → toExcel-CWyoDcRd.js} +15 -15
  80. package/dist/{unit-BsNOQHvZ.js → unit-CLa8caCJ.js} +11 -10
  81. package/package.json +5 -5
  82. package/dist/CustomAttributeChip.vue_vue_type_script_setup_true_lang-RI_d10bz.js +0 -7949
  83. package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +0 -26
  84. package/dist/Group.vue_vue_type_script_setup_true_lang-Bij0tGMP.js +0 -698
  85. package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CUa_0qzX.js +0 -206
  86. package/dist/LinkProductSideSheet-CEClo07H.js +0 -112
  87. package/dist/Product.vue_vue_type_script_setup_true_lang-fjFGg49e.js +0 -1560
  88. package/dist/Products-dWmgQ_di.js +0 -270
  89. package/dist/Setting-CPjvUYU9.js +0 -258
  90. package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-DzQ8_6Bi.js +0 -71
  91. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-ZRv8Dg6x.js +0 -6149
  92. package/dist/_id_-CTq4qK7z.js +0 -200
  93. package/dist/apps/mf-menu/src/components/feature/LinkProduct/LinkProductSideSheet.vue.d.ts +0 -70
  94. package/dist/assets/linked-status-Cfc9wZst.js +0 -24
  95. package/dist/assets/override-menu-BNZggtO_.js +0 -24
  96. package/dist/assets/validate-menu-CPwUvy9F.js +0 -24
  97. package/dist/catalogSetting-D4iwoJLb.js +0 -65
  98. package/dist/index-Ce4v8o7D.js +0 -106
  99. package/dist/menu-DcGo3sn5.js +0 -108039
  100. package/dist/subcategory-B5atmACN.js +0 -817
  101. /package/dist/{apps/mf-menu/src/components → packages/shared/src/components/info}/CustomAttributeChip.vue.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- import { u as h, G as l, J as d, V as _ } from "./menu-DcGo3sn5.js";
1
+ import { u as h, A as l, J as d, ah as _ } from "./menu-D_Cckz_p.js";
2
2
  import "@feedmepos/ui-library";
3
3
  class u {
4
4
  constructor(t, e, a, r) {
@@ -0,0 +1,71 @@
1
+ import { A as u, H as i } from "./menu-D_Cckz_p.js";
2
+ var a = /* @__PURE__ */ ((e) => (e.AUTO = "auto", e.MANUAL = "manual", e))(a || {}), m = /* @__PURE__ */ ((e) => (e[e.Normal = 0] = "Normal", e[e.Rules = 1] = "Rules", e))(m || {});
3
+ class s {
4
+ static fromCatalog(r, n) {
5
+ const t = n ? u.F_ORDER_FROM.enum.ALL : u.F_ORDER_FROM.enum.NONE;
6
+ return {
7
+ ...i(r),
8
+ taxSetting: this.transformTax(r.inclusiveTaxes),
9
+ orderFrom: r.defaultOrderFrom || t,
10
+ markupOptions: r.markupOptions || null,
11
+ usePriceTiers: r.usePriceTiers || null,
12
+ priceTierRules: r.priceTierRules || null
13
+ };
14
+ }
15
+ static fromMainCatalog(r) {
16
+ return {
17
+ _id: "",
18
+ name: "Main",
19
+ taxSetting: s.transformTax(r == null ? void 0 : r.inclusiveTaxes),
20
+ orderFrom: u.F_ORDER_FROM.enum.ALL,
21
+ markupOptions: null,
22
+ usePriceTiers: null,
23
+ priceTierRules: null
24
+ };
25
+ }
26
+ static toCatalog(r) {
27
+ return {
28
+ _id: r._id,
29
+ name: r.name,
30
+ inclusiveTaxes: r.taxSetting.mode === "auto" ? null : i(r.taxSetting.inclusive),
31
+ markupOptions: r.markupOptions,
32
+ defaultOrderFrom: r.orderFrom,
33
+ usePriceTiers: r.usePriceTiers,
34
+ priceTierRules: r.priceTierRules
35
+ };
36
+ }
37
+ static initCatalogSetting() {
38
+ return {
39
+ _id: "",
40
+ name: "",
41
+ orderFrom: u.F_ORDER_FROM.enum.ALL,
42
+ taxSetting: this.autoTax(),
43
+ markupOptions: null,
44
+ usePriceTiers: null,
45
+ priceTierRules: null
46
+ };
47
+ }
48
+ static transformTax(r) {
49
+ return r ? {
50
+ mode: "manual",
51
+ inclusive: i(r)
52
+ } : {
53
+ mode: "auto"
54
+ /* AUTO */
55
+ };
56
+ }
57
+ static autoTax() {
58
+ return {
59
+ mode: "auto"
60
+ /* AUTO */
61
+ };
62
+ }
63
+ static manualTax(r) {
64
+ return { mode: "manual", inclusive: i(r) };
65
+ }
66
+ }
67
+ export {
68
+ s as C,
69
+ m as L,
70
+ a
71
+ };
@@ -1,5 +1,5 @@
1
- import { defineComponent as M, watch as _, ref as f, resolveComponent as g, createBlock as x, openBlock as C, unref as l, withCtx as V, createVNode as A } from "vue";
2
- import { J as s, G as u, u as F } from "./menu-DcGo3sn5.js";
1
+ import { defineComponent as M, watch as _, ref as f, resolveComponent as g, createBlock as x, openBlock as A, unref as l, withCtx as C, createVNode as V } from "vue";
2
+ import { J as s, A as u, u as F } from "./menu-D_Cckz_p.js";
3
3
  import { useI18n as E } from "@feedmepos/mf-common";
4
4
  import { useDialogChild as O } from "@feedmepos/ui-library";
5
5
  const y = /* @__PURE__ */ M({
@@ -26,11 +26,11 @@ const y = /* @__PURE__ */ M({
26
26
  }
27
27
  ), (m, e) => {
28
28
  const o = g("fm-text-field"), a = g("FmForm");
29
- return C(), x(a, {
29
+ return A(), x(a, {
30
30
  onValidationSuccess: e[1] || (e[1] = (c) => l(p)("primary"))
31
31
  }, {
32
- default: V(() => [
33
- A(o, {
32
+ default: C(() => [
33
+ V(o, {
34
34
  modelValue: i.value,
35
35
  "onUpdate:modelValue": e[0] || (e[0] = (c) => i.value = c),
36
36
  rules: [(c) => !!c || l(t)("menu.category.dialog.add.name.required")],
@@ -1,4 +1,4 @@
1
- import { A as e } from "./menu-DcGo3sn5.js";
1
+ import { B as e } from "./menu-D_Cckz_p.js";
2
2
  function n(r, o = !0) {
3
3
  return e.Dinero.fromFdoDinero(r).toFormat(o).replaceAll(" ", "");
4
4
  }
@@ -1,4 +1,4 @@
1
- import { g as a, ai as r } from "./menu-DcGo3sn5.js";
1
+ import { g as a, ai as r } from "./menu-D_Cckz_p.js";
2
2
  var s = r();
3
3
  const t = /* @__PURE__ */ a(s);
4
4
  export {
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as R, computed as w, ref as E, watch as C, resolveComponent as g, createElementBlock as F, openBlock as V, Fragment as K, renderSlot as j, createVNode as s, unref as n, withCtx as m, createElementVNode as d, createBlock as M, createCommentVNode as U, normalizeClass as H, createSlots as J, toDisplayString as Q } from "vue";
2
- import { O as W, D as X, I as Z, H as f, B, J as D, G as I } from "./menu-DcGo3sn5.js";
2
+ import { O as W, G as X, H as f, D, J as I, A as S, I as Z } from "./menu-D_Cckz_p.js";
3
3
  import { d as ee } from "./vuedraggable-CK8z7qA8.js";
4
4
  import { useI18n as te } from "@feedmepos/mf-common";
5
5
  import { useSnackbar as ae, components as ne } from "@feedmepos/ui-library";
6
- import { _ as oe } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
6
+ import { a as oe } from "./LinkProductSideSheet-32r2l60j.js";
7
7
  import { _ as le } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
8
8
  import { u as ie } from "./discardConfirm-BHni0LNu.js";
9
- import { _ as se } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-DoTx23iL.js";
9
+ import { _ as se } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-AdxIn_cb.js";
10
10
  import { c as re } from "./check-C9mY6LiX.js";
11
11
  const ue = { class: "fm-typo-en-title-md-600" }, me = { class: "py-16 space-y-32" }, de = ["data-not-allow-sort"], ce = {
12
12
  key: 1,
@@ -16,10 +16,10 @@ const ue = { class: "fm-typo-en-title-md-600" }, me = { class: "py-16 space-y-32
16
16
  props: {
17
17
  initialValue: {}
18
18
  },
19
- setup(S, { expose: N }) {
20
- const r = S, b = W(X(ae())), { t: o } = te(), L = w(
19
+ setup(B, { expose: N }) {
20
+ const r = B, b = W(X(ae())), { t: o } = te(), A = w(
21
21
  () => r.initialValue ? o("menu.variant.form.title.edit") : o("menu.variant.form.title.add")
22
- ), A = w(() => r.initialValue ? "Update" : "Add"), O = () => {
22
+ ), L = w(() => r.initialValue ? "Update" : "Add"), O = () => {
23
23
  if (r.initialValue) {
24
24
  const e = f(r.initialValue);
25
25
  return e.options.push({
@@ -27,7 +27,7 @@ const ue = { class: "fm-typo-en-title-md-600" }, me = { class: "py-16 space-y-32
27
27
  name: ""
28
28
  }), e;
29
29
  } else
30
- return { ...B.generator.initMenuV4VariantGroup(), usedBy: [] };
30
+ return { ...D.generator.initMenuV4VariantGroup(), usedBy: [] };
31
31
  }, t = E(O()), y = E(!1), i = E(!1), x = (e) => {
32
32
  re.isBoolean(e) ? i.value = e : i.value = !i.value;
33
33
  };
@@ -82,19 +82,19 @@ const ue = { class: "fm-typo-en-title-md-600" }, me = { class: "py-16 space-y-32
82
82
  const e = f(t.value);
83
83
  e.options = e.options.filter((a) => !!a.name.trim()), r.initialValue ? await b.updateMenu(
84
84
  {
85
- module: I.F_MENU_MODULE_V4_KEY.enum.variant,
86
- operation: D.F_OPERATION_TYPE.update,
85
+ module: S.F_MENU_MODULE_V4_KEY.enum.variant,
86
+ operation: I.F_OPERATION_TYPE.update,
87
87
  data: e
88
88
  },
89
89
  e.name
90
90
  ) : await b.updateMenu(
91
91
  {
92
- module: I.F_MENU_MODULE_V4_KEY.enum.variant,
93
- operation: D.F_OPERATION_TYPE.create,
92
+ module: S.F_MENU_MODULE_V4_KEY.enum.variant,
93
+ operation: I.F_OPERATION_TYPE.create,
94
94
  data: e
95
95
  },
96
96
  e.name
97
- ), x(!1), t.value = { ...B.generator.initMenuV4VariantGroup(), usedBy: [] };
97
+ ), x(!1), t.value = { ...D.generator.initMenuV4VariantGroup(), usedBy: [] };
98
98
  } finally {
99
99
  y.value = !1;
100
100
  }
@@ -124,12 +124,12 @@ const ue = { class: "fm-typo-en-title-md-600" }, me = { class: "py-16 space-y-32
124
124
  "onOn:clickedAway": n(Y)
125
125
  }, {
126
126
  "side-sheet-header": m(() => [
127
- d("p", ue, Q(L.value), 1)
127
+ d("p", ue, Q(A.value), 1)
128
128
  ]),
129
129
  "side-sheet-footer": m(() => [
130
130
  d("div", fe, [
131
131
  s(v, {
132
- label: A.value,
132
+ label: L.value,
133
133
  loading: y.value,
134
134
  size: "lg",
135
135
  type: "submit",
@@ -1,12 +1,12 @@
1
- import { A as S, G as A, u as K, H as O, B as q, I as R } from "./menu-DcGo3sn5.js";
2
- import { defineComponent as T, ref as f, computed as B, watch as L, onMounted as z, onBeforeUnmount as H, resolveComponent as F, createBlock as N, openBlock as M, withModifiers as C, withCtx as g, renderSlot as U, createElementBlock as P, Fragment as W, createVNode as c, unref as i, createElementVNode as D, createCommentVNode as j, toDisplayString as G } from "vue";
1
+ import { B as S, A, u as K, H as O, D as q, I as R } from "./menu-D_Cckz_p.js";
2
+ import { defineComponent as T, ref as f, computed as B, watch as L, onMounted as z, onBeforeUnmount as H, resolveComponent as F, createBlock as N, openBlock as M, withModifiers as D, withCtx as g, renderSlot as U, createElementBlock as P, Fragment as W, createVNode as c, unref as i, createElementVNode as C, createCommentVNode as j, toDisplayString as Y } from "vue";
3
3
  import { useI18n as I } from "@feedmepos/mf-common";
4
- import { components as Y } from "@feedmepos/ui-library";
5
- import { _ as Z } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
4
+ import { components as Z } from "@feedmepos/ui-library";
5
+ import { _ as G } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
6
6
  import { u as J } from "./discardConfirm-BHni0LNu.js";
7
- import { _ as Q } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-DoTx23iL.js";
7
+ import { _ as Q } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-AdxIn_cb.js";
8
8
  import { c as X } from "./check-C9mY6LiX.js";
9
- import { f as ee } from "./currency-Clgvy00I.js";
9
+ import { f as ee } from "./currency-D2fl1Bk0.js";
10
10
  import { c as ae } from "./string-DpfFixWH.js";
11
11
  const te = /* @__PURE__ */ T({
12
12
  __name: "CurrencyInput",
@@ -111,11 +111,11 @@ const te = /* @__PURE__ */ T({
111
111
  rules: b,
112
112
  inputmode: "decimal",
113
113
  onFocusChanged: t[0] || (t[0] = (o) => v.value = o),
114
- onWheel: t[1] || (t[1] = C(() => {
114
+ onWheel: t[1] || (t[1] = D(() => {
115
115
  }, ["prevent"])),
116
- onTouchmove: t[2] || (t[2] = C(() => {
116
+ onTouchmove: t[2] || (t[2] = D(() => {
117
117
  }, ["prevent"])),
118
- onScroll: t[3] || (t[3] = C(() => {
118
+ onScroll: t[3] || (t[3] = D(() => {
119
119
  }, ["prevent"]))
120
120
  }, {
121
121
  append: g(() => [
@@ -186,7 +186,7 @@ const le = { class: "fm-typo-en-title-md-600" }, oe = { class: "space-y-32" }, n
186
186
  id: "group-form",
187
187
  modelValue: u.value,
188
188
  "onUpdate:modelValue": o[4] || (o[4] = (p) => u.value = p),
189
- "is-container": i(Y).FmForm,
189
+ "is-container": i(Z).FmForm,
190
190
  "is-container-props": {
191
191
  onValidationSuccess: t,
192
192
  blameFormChildOnValidationFailed: !0
@@ -195,10 +195,10 @@ const le = { class: "fm-typo-en-title-md-600" }, oe = { class: "space-y-32" }, n
195
195
  "onOn:clickedAway": i(e)
196
196
  }, {
197
197
  "side-sheet-header": g(() => [
198
- D("p", le, G(_.value), 1)
198
+ C("p", le, Y(_.value), 1)
199
199
  ]),
200
200
  "side-sheet-footer": g(() => [
201
- D("div", ne, [
201
+ C("div", ne, [
202
202
  c(w, {
203
203
  label: i(ae)(i(n)(`menu.common.actions.${l.action}`)),
204
204
  loading: V.value,
@@ -215,8 +215,8 @@ const le = { class: "fm-typo-en-title-md-600" }, oe = { class: "space-y-32" }, n
215
215
  ])
216
216
  ]),
217
217
  default: g(() => [
218
- D("div", oe, [
219
- c(Z, null, {
218
+ C("div", oe, [
219
+ c(G, null, {
220
220
  default: g(() => {
221
221
  var p;
222
222
  return [
@@ -1,5 +1,5 @@
1
- import { defineComponent as y, resolveComponent as p, createBlock as f, openBlock as i, Teleport as E, createVNode as _, Transition as w, withCtx as h, createCommentVNode as L, withKeys as g, normalizeStyle as F, normalizeClass as d, createElementVNode as m, renderSlot as x, createElementBlock as T, toDisplayString as A, Fragment as R, renderList as v, computed as C, unref as I } from "vue";
2
- import { _ as k } from "./LinkProductSideSheet-CEClo07H.js";
1
+ import { defineComponent as y, resolveComponent as p, createBlock as f, openBlock as i, Teleport as E, createVNode as _, Transition as g, withCtx as h, createCommentVNode as L, withKeys as w, normalizeStyle as F, normalizeClass as d, createElementVNode as m, renderSlot as x, createElementBlock as T, toDisplayString as R, Fragment as A, renderList as v, computed as C, unref as I } from "vue";
2
+ import { _ as k } from "./LinkProductSideSheet-32r2l60j.js";
3
3
  import { useI18n as U } from "@feedmepos/mf-common";
4
4
  const N = {
5
5
  class: /* @__PURE__ */ d([
@@ -26,30 +26,30 @@ const N = {
26
26
  }, c = () => {
27
27
  n("onCancel");
28
28
  };
29
- return (r, s) => {
30
- const o = p("fm-button"), a = p("fm-form");
29
+ return (r, o) => {
30
+ const a = p("fm-button"), s = p("fm-form");
31
31
  return i(), f(E, { to: "body" }, [
32
- _(w, { name: "fade" }, {
32
+ _(g, { name: "fade" }, {
33
33
  default: h(() => [
34
- r.show ? (i(), f(a, {
34
+ r.show ? (i(), f(s, {
35
35
  key: 0,
36
36
  "blame-form-child-on-validation-failed": "",
37
37
  class: d(["fixed inset-0", "flex flex-col", "w-screen h-dvh", "bg-fm-color-neutral-white"]),
38
38
  style: F({ zIndex: r.zIndex }),
39
39
  tabindex: "-1",
40
40
  onValidationSuccess: l,
41
- onKeyup: g(c, ["esc"])
41
+ onKeyup: w(c, ["esc"])
42
42
  }, {
43
43
  default: h(() => [
44
44
  m("div", N, [
45
- m("p", $, A(r.title), 1),
45
+ m("p", $, R(r.title), 1),
46
46
  x(r.$slots, "append-title", {}, void 0, !0),
47
- (i(!0), T(R, null, v(r.secondaryActions, (u) => (i(), f(o, {
47
+ (i(!0), T(A, null, v(r.secondaryActions, (u) => (i(), f(a, {
48
48
  label: u.label,
49
49
  variant: "tertiary",
50
50
  onClick: u.click
51
51
  }, null, 8, ["label", "onClick"]))), 256)),
52
- _(o, {
52
+ _(a, {
53
53
  label: r.primaryAction.label,
54
54
  type: "submit",
55
55
  variant: "primary"
@@ -74,20 +74,20 @@ const N = {
74
74
  },
75
75
  setup(t) {
76
76
  const e = t, n = C(() => {
77
- var r;
78
- return ((r = e.menuStore.currentCatalog) == null ? void 0 : r.usePriceTiers) ?? [];
77
+ var r, o;
78
+ return ((r = e.menuStore.currentCatalog) == null ? void 0 : r.priceTierRules) ?? ((o = e.menuStore.currentCatalog) == null ? void 0 : o.usePriceTiers) ?? [];
79
79
  }), l = C(() => {
80
80
  var r;
81
81
  return e.menuStore.isV4 && e.menuStore.currentCatalog && !e.menuStore.currentScheduler && ((r = n.value) == null ? void 0 : r.length) > 0;
82
82
  }), { t: c } = U();
83
- return (r, s) => {
84
- var a;
85
- const o = p("FmSnackbar");
86
- return l.value ? (i(), f(o, {
83
+ return (r, o) => {
84
+ var s;
85
+ const a = p("FmSnackbar");
86
+ return l.value ? (i(), f(a, {
87
87
  key: 0,
88
88
  "z-index": 0,
89
89
  class: "!max-w-full",
90
- title: I(c)("menu.price_tier.price_group_description", { group: (a = n.value) == null ? void 0 : a.join(", ") })
90
+ title: I(c)("menu.price_tier.price_group_description", { group: (s = n.value) == null ? void 0 : s.join(", ") })
91
91
  }, null, 8, ["title"])) : L("", !0);
92
92
  };
93
93
  }
@@ -116,8 +116,8 @@ function K(t) {
116
116
  return e;
117
117
  }
118
118
  function Z(t, e) {
119
- const [n, l, c] = O(t, e), r = G(e == null ? void 0 : e.locale), s = H(e == null ? void 0 : e.locale), o = M(r, s);
120
- return n + l.map((a, u) => u === 0 ? o(a) : r(a)).join((e == null ? void 0 : e.delimiter) ?? " ") + c;
119
+ const [n, l, c] = O(t, e), r = G(e == null ? void 0 : e.locale), o = H(e == null ? void 0 : e.locale), a = M(r, o);
120
+ return n + l.map((s, u) => u === 0 ? a(s) : r(s)).join((e == null ? void 0 : e.delimiter) ?? " ") + c;
121
121
  }
122
122
  function G(t) {
123
123
  return t === !1 ? (e) => e.toLowerCase() : (e) => e.toLocaleLowerCase(t);
@@ -130,23 +130,23 @@ function M(t, e) {
130
130
  }
131
131
  function O(t, e = {}) {
132
132
  const n = e.split ?? (e.separateNumbers ? K : P), l = e.prefixCharacters ?? b, c = e.suffixCharacters ?? b;
133
- let r = 0, s = t.length;
133
+ let r = 0, o = t.length;
134
134
  for (; r < t.length; ) {
135
- const o = t.charAt(r);
136
- if (!l.includes(o))
135
+ const a = t.charAt(r);
136
+ if (!l.includes(a))
137
137
  break;
138
138
  r++;
139
139
  }
140
- for (; s > r; ) {
141
- const o = s - 1, a = t.charAt(o);
142
- if (!c.includes(a))
140
+ for (; o > r; ) {
141
+ const a = o - 1, s = t.charAt(a);
142
+ if (!c.includes(s))
143
143
  break;
144
- s = o;
144
+ o = a;
145
145
  }
146
146
  return [
147
147
  t.slice(0, r),
148
- n(t.slice(r, s)),
149
- t.slice(s)
148
+ n(t.slice(r, o)),
149
+ t.slice(o)
150
150
  ];
151
151
  }
152
152
  export {
@@ -0,0 +1,215 @@
1
+ import { defineComponent as z, computed as P, ref as w, resolveComponent as d, createElementBlock as I, openBlock as R, Fragment as B, createElementVNode as g, createVNode as f, normalizeClass as A, withCtx as _, toDisplayString as C, unref as h, h as E, watch as D, onMounted as G, nextTick as K, readonly as M, getCurrentInstance as N, getCurrentScope as U, onScopeDispose as L } from "vue";
2
+ import { useI18n as q, useCustomAttributes as H, useCoreStore as J } from "@feedmepos/mf-common";
3
+ import { components as Q } from "@feedmepos/ui-library";
4
+ const X = {
5
+ class: /* @__PURE__ */ A(["fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap", "text-fm-color-neutral-gray-400"])
6
+ }, Y = {
7
+ class: "fm-typo-en-title-sm-600"
8
+ }, Z = {
9
+ class: "max-h-[60vh] flex-1 overflow-y-auto min-h-0"
10
+ }, ue = /* @__PURE__ */ z({
11
+ __name: "RestaurantAttributesSelector",
12
+ props: {
13
+ fullWidth: {
14
+ type: Boolean,
15
+ default: !1
16
+ },
17
+ currentRestaurantCustomAttributes: {}
18
+ },
19
+ emits: ["confirm"],
20
+ setup(e, {
21
+ emit: n
22
+ }) {
23
+ const o = e, {
24
+ t
25
+ } = q(), {
26
+ attributes: l
27
+ } = H({
28
+ valueSource: J().restaurants,
29
+ entity: "restaurant"
30
+ }), a = P(() => l.value), v = [{
31
+ header: () => t("portalshell.customAttributes.form.key"),
32
+ accessorKey: "key",
33
+ enableSorting: !1
34
+ }, {
35
+ header: () => t("portalshell.customAttributes.form.value"),
36
+ accessorKey: "values",
37
+ enableSorting: !1,
38
+ cell: (c) => {
39
+ const r = c.row.original, m = r.values;
40
+ return E(Q.FmSelect, {
41
+ modelValue: r.value,
42
+ placeholder: t("portalshell.customAttributes.form.valuePlaceholder"),
43
+ items: m.map((i) => ({
44
+ label: i,
45
+ value: i
46
+ })),
47
+ clearable: !0,
48
+ "onUpdate:modelValue": (i) => r.value = i
49
+ });
50
+ }
51
+ }], u = n, p = () => {
52
+ const c = l.value.filter((m) => m.value != null), r = c.length ? c.reduce((m, i) => (m[i.key] = i.value, m), {}) : {};
53
+ u("confirm", r), y();
54
+ }, s = w(!1);
55
+ function b() {
56
+ s.value = !0;
57
+ const c = o.currentRestaurantCustomAttributes ?? {};
58
+ a.value.forEach((r) => {
59
+ r.value = c[r.key] ?? void 0;
60
+ });
61
+ }
62
+ function y() {
63
+ s.value = !1;
64
+ }
65
+ return (c, r) => {
66
+ const m = d("FmIcon"), i = d("FmChip"), O = d("FmTable"), V = d("FmSpacer"), F = d("fm-button"), j = d("FmDialog");
67
+ return R(), I(B, null, [g("div", {
68
+ class: "cursor-pointer",
69
+ onClick: b
70
+ }, [f(i, {
71
+ class: A([c.fullWidth ? "w-full justify-between" : ""])
72
+ }, {
73
+ default: _(() => [g("div", X, C(h(t)("menu.catalog.form.restaurant_attributes_title")), 1), f(m, {
74
+ color: "neutral-gray-400",
75
+ name: "launch",
76
+ size: "sm"
77
+ })]),
78
+ _: 1
79
+ }, 8, ["class"])]), f(j, {
80
+ modelValue: s.value,
81
+ "onUpdate:modelValue": r[0] || (r[0] = (W) => s.value = W),
82
+ overlay: !0,
83
+ "min-width": "min(calc(100% - 48px), 560px)"
84
+ }, {
85
+ "dialog-header": _(() => [g("div", Y, C(h(t)("menu.catalog.form.restaurant_attributes_title")), 1)]),
86
+ "dialog-footer": _(() => [f(V), f(F, {
87
+ label: h(t)("menu.common.actions.confirm"),
88
+ size: "lg",
89
+ type: "submit",
90
+ variant: "primary",
91
+ onClick: p
92
+ }, null, 8, ["label"]), f(F, {
93
+ label: h(t)("menu.common.actions.cancel"),
94
+ size: "lg",
95
+ variant: "tertiary",
96
+ onClick: y
97
+ }, null, 8, ["label"])]),
98
+ default: _(() => [g("div", Z, [f(O, {
99
+ "column-defs": v,
100
+ "row-data": a.value,
101
+ "shrink-at": !1,
102
+ "page-size": a.value.length,
103
+ "hide-footer": ""
104
+ }, null, 8, ["row-data", "page-size"])])]),
105
+ _: 1
106
+ }, 8, ["modelValue"])], 64);
107
+ };
108
+ }
109
+ });
110
+ function ie(e) {
111
+ return U() ? (L(e), !0) : !1;
112
+ }
113
+ function S(e) {
114
+ return typeof e == "function" ? e() : h(e);
115
+ }
116
+ const ce = typeof window < "u" && typeof document < "u";
117
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
118
+ const $ = Object.prototype.toString, me = (e) => $.call(e) === "[object Object]", x = () => {
119
+ };
120
+ function k(e, n) {
121
+ function o(...t) {
122
+ return new Promise((l, a) => {
123
+ Promise.resolve(e(() => n.apply(this, t), { fn: n, thisArg: this, args: t })).then(l).catch(a);
124
+ });
125
+ }
126
+ return o;
127
+ }
128
+ const T = (e) => e();
129
+ function ee(e, n = {}) {
130
+ let o, t, l = x;
131
+ const a = (u) => {
132
+ clearTimeout(u), l(), l = x;
133
+ };
134
+ return (u) => {
135
+ const p = S(e), s = S(n.maxWait);
136
+ return o && a(o), p <= 0 || s !== void 0 && s <= 0 ? (t && (a(t), t = null), Promise.resolve(u())) : new Promise((b, y) => {
137
+ l = n.rejectOnCancel ? y : b, s && !t && (t = setTimeout(() => {
138
+ o && a(o), t = null, b(u());
139
+ }, s)), o = setTimeout(() => {
140
+ t && a(t), t = null, b(u());
141
+ }, p);
142
+ });
143
+ };
144
+ }
145
+ function te(e = T) {
146
+ const n = w(!0);
147
+ function o() {
148
+ n.value = !1;
149
+ }
150
+ function t() {
151
+ n.value = !0;
152
+ }
153
+ const l = (...a) => {
154
+ n.value && e(...a);
155
+ };
156
+ return { isActive: M(n), pause: o, resume: t, eventFilter: l };
157
+ }
158
+ function ne(e) {
159
+ return N();
160
+ }
161
+ function oe(e, n = 200, o = {}) {
162
+ return k(
163
+ ee(n, o),
164
+ e
165
+ );
166
+ }
167
+ function fe(e, n = 200, o = {}) {
168
+ const t = w(e.value), l = oe(() => {
169
+ t.value = e.value;
170
+ }, n, o);
171
+ return D(e, () => l()), t;
172
+ }
173
+ function le(e, n, o = {}) {
174
+ const {
175
+ eventFilter: t = T,
176
+ ...l
177
+ } = o;
178
+ return D(
179
+ e,
180
+ k(
181
+ t,
182
+ n
183
+ ),
184
+ l
185
+ );
186
+ }
187
+ function pe(e, n, o = {}) {
188
+ const {
189
+ eventFilter: t,
190
+ ...l
191
+ } = o, { eventFilter: a, pause: v, resume: u, isActive: p } = te(t);
192
+ return { stop: le(
193
+ e,
194
+ n,
195
+ {
196
+ ...l,
197
+ eventFilter: a
198
+ }
199
+ ), pause: v, resume: u, isActive: p };
200
+ }
201
+ function de(e, n = !0, o) {
202
+ ne() ? G(e, o) : n ? e() : K(e);
203
+ }
204
+ export {
205
+ ue as _,
206
+ de as a,
207
+ ie as b,
208
+ me as c,
209
+ ce as i,
210
+ x as n,
211
+ fe as r,
212
+ S as t,
213
+ oe as u,
214
+ pe as w
215
+ };