@feedmepos/mf-menu 0.32.17 → 0.32.18-dev.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 (82) hide show
  1. package/dist/App-Cfl37TTw.js +152661 -0
  2. package/dist/{Catalog-ChlP8Cid.js → Catalog-Yxsb-D33.js} +47 -52
  3. package/dist/{Category-CHs96ibF.js → Category-0vJH8Ct0.js} +86 -92
  4. package/dist/{Category-B1tAJpNd.js → Category-qp0wI14I.js} +25 -26
  5. package/dist/{CookingGuide-mEvca-0v.js → CookingGuide-EpAr5F5U.js} +139 -143
  6. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-Bk26jQI7.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CkyD0sdI.js} +14 -16
  7. package/dist/{Group-Ye2IIY52.js → Group-B3W9iSbO.js} +5 -5
  8. package/dist/{Group-Co2Vf4Lw.js → Group-DLCh0fDU.js} +1 -1
  9. package/dist/{Group.vue_vue_type_script_setup_true_lang-BcxSbvJS.js → Group.vue_vue_type_script_setup_true_lang-Bzy_hXDv.js} +176 -186
  10. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D1f8VG-n.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BFaAXp7r.js} +81 -88
  11. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Jv6iJlg9.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CxP8lDD0.js} +2502 -2508
  12. package/dist/{Ingredient-BgnW8sWo.js → Ingredient-CVLMr_YB.js} +102 -105
  13. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-8ziHcUiK.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CdTC5ykI.js} +1058 -1059
  14. package/dist/{MenuSetting-GEngjeC8.js → MenuSetting-Blpi1vSd.js} +58 -61
  15. package/dist/{PrintRoute-BSlUQT7g.js → PrintRoute-BS7PPPkE.js} +49 -52
  16. package/dist/{Product-DNg_BUuV.js → Product-DDeNKQ7u.js} +1 -1
  17. package/dist/{Product.vue_vue_type_script_setup_true_lang-Cehy2oy-.js → Product.vue_vue_type_script_setup_true_lang-rmv8m4_D.js} +286 -298
  18. package/dist/{ProductInternalTools-B5A67yxH.js → ProductInternalTools-CVuothk9.js} +45 -46
  19. package/dist/{Products-DCsxmTPB.js → Products-BIvsHKEt.js} +111 -116
  20. package/dist/{Publish-Cst0Ll6T.js → Publish-CDADU3Pp.js} +154 -159
  21. package/dist/{Recipe-DupS3SQT.js → Recipe-CMhW7e_z.js} +40 -43
  22. package/dist/{Scheduler-BcThU1M6.js → Scheduler-BpxunKBV.js} +7 -7
  23. package/dist/{ServingSequence-CT3THBH6.js → ServingSequence-BQVuYyAB.js} +54 -58
  24. package/dist/{Setting-Dxh8E3no.js → Setting-Dj0yyP37.js} +63 -66
  25. package/dist/{Subcategory-DhJEzofz.js → Subcategory-BH4DDZM4.js} +72 -76
  26. package/dist/{Takeaway-DSC7U4Jk.js → Takeaway-CGJBZ_sJ.js} +1 -1
  27. package/dist/{Takeaway-B8BSSKNj.js → Takeaway-DifOudVE.js} +20 -21
  28. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BLpiJlk2.js → Takeaway.vue_vue_type_script_setup_true_lang-D-R5_S5G.js} +59 -64
  29. package/dist/{Unit-joU7vZZu.js → Unit-DXDox2Ut.js} +8 -8
  30. package/dist/{Variant-D8YjRJ6N.js → Variant-DbJVwgm5.js} +75 -78
  31. package/dist/{_id_-Bd9uo1WW.js → _id_-RFYwWjbM.js} +34 -38
  32. package/dist/{app-BNrAos5Z.js → app-Z0KWH9-d.js} +74 -335
  33. package/dist/app.js +4 -5
  34. package/dist/apps/mf-menu/src/app.d.ts +1 -2
  35. package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +1 -0
  36. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  37. package/dist/assets/{linked-status-DbjzbFTw.js → linked-status-CkmoJAm-.js} +2 -2
  38. package/dist/assets/{menu-export-D_oNY_wi.js → menu-export-DcINiK28.js} +3 -3
  39. package/dist/assets/{override-menu-CIU7U1_4.js → override-menu-PUKiu-df.js} +2 -2
  40. package/dist/assets/{validate-menu-kuOxuwG9.js → validate-menu-CcqiRhNT.js} +2 -2
  41. package/dist/{catalogSetting-BHgsBDTl.js → catalogSetting-Bf66H-j7.js} +1 -1
  42. package/dist/dayjs.min-DNPTnUFp.js +6 -0
  43. package/dist/{jszip.min-7SsHzD5O.js → jszip.min-CO2_Gf69.js} +545 -545
  44. package/dist/{menu-Cd4NbFVq.js → menu-Brxar171.js} +1 -1
  45. package/dist/mf-menu.css +1 -1
  46. package/dist/{scheduler-B6OokVIA.js → scheduler-CqdIiE8G.js} +56 -60
  47. package/dist/{toExcel-BZkbXlHv.js → toExcel-CRJIU0NC.js} +2 -2
  48. package/dist/{unit-D6QOkMoM.js → unit-wYPYkm33.js} +98 -105
  49. package/package.json +1 -1
  50. package/dist/App-BiSEuDkd.js +0 -13484
  51. package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-C_SjdLpO.js +0 -161
  52. package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +0 -26
  53. package/dist/LinkProductSideSheet-DFDYEUBh.js +0 -687
  54. package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js +0 -69
  55. package/dist/RuleView.vue_vue_type_script_setup_true_lang-BeesK2ym.js +0 -3285
  56. package/dist/TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js +0 -20
  57. package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-C3qXnZlz.js +0 -399
  58. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CMe76XvZ.js +0 -6011
  59. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  60. package/dist/app-5fxKLAzS.js +0 -8163
  61. package/dist/app-nTzkERJW.js +0 -68
  62. package/dist/catalog-BO2nXwe5.js +0 -199
  63. package/dist/category-CuG3DsGL.js +0 -156
  64. package/dist/check-C9mY6LiX.js +0 -9
  65. package/dist/createComponentProgrammatically-Bt2rn1IQ.js +0 -11
  66. package/dist/currency-DxC5zyZB.js +0 -7
  67. package/dist/dayjs.min-BvFUSPWD.js +0 -6
  68. package/dist/discardConfirm-BHni0LNu.js +0 -28
  69. package/dist/index-B0nhvuxR.js +0 -273
  70. package/dist/index-C2zPvt64.js +0 -239
  71. package/dist/index-C36JQix-.js +0 -246
  72. package/dist/index-CisutoS9.js +0 -156
  73. package/dist/index.vue_vue_type_script_setup_true_lang-DCBYExNb.js +0 -109064
  74. package/dist/item-K01xd1Z0.js +0 -6868
  75. package/dist/menuV2-DKE-xanq.js +0 -1052
  76. package/dist/object-DVUNCr7w.js +0 -16
  77. package/dist/priceTier-Beavb91W.js +0 -87
  78. package/dist/search-BAPEUu1R.js +0 -15
  79. package/dist/string-DpfFixWH.js +0 -4
  80. package/dist/subcategory-DnslmmRD.js +0 -148
  81. package/dist/tooltip-B5BiPMx9.js +0 -32
  82. package/dist/vuedraggable-CK8z7qA8.js +0 -1728
@@ -1,16 +1,9 @@
1
- import { defineStore as Q } from "pinia";
2
- import { defineComponent as T, computed as U, ref as h, watch as L, resolveComponent as V, createBlock as W, openBlock as F, withCtx as w, createVNode as m, createElementVNode as f, normalizeClass as H, createElementBlock as A, toDisplayString as M, unref as l, Fragment as q, renderSlot as X, renderList as Z, getCurrentInstance as ee } from "vue";
3
- import { a7 as P, a8 as te, a5 as B, I as k, Q as $, G as I, D as E, a6 as ne, M as C, A as D, J as oe, u as ae } from "./index.vue_vue_type_script_setup_true_lang-DCBYExNb.js";
4
- import { useI18n as N } from "@feedmepos/mf-common";
5
- import { useSnackbar as j, components as le, useDialog as ue, FmButtonVariant as ie } from "@feedmepos/ui-library";
6
- import { u as se } from "./discardConfirm-BHni0LNu.js";
7
- import { c as re } from "./check-C9mY6LiX.js";
8
- import "./vuedraggable-CK8z7qA8.js";
9
- import "./menuV2-DKE-xanq.js";
10
- import "./app-5fxKLAzS.js";
11
- /* empty css */
12
- import { c as me } from "./createComponentProgrammatically-Bt2rn1IQ.js";
13
- const de = ["value", "disabled"], ce = /* @__PURE__ */ T({
1
+ import { defineStore as W } from "pinia";
2
+ import { defineComponent as N, computed as U, ref as h, watch as S, resolveComponent as V, createBlock as H, openBlock as F, withCtx as w, createVNode as m, createElementVNode as f, normalizeClass as J, createElementBlock as A, toDisplayString as M, unref as l, Fragment as P, renderSlot as X, renderList as Z, getCurrentInstance as ee } from "vue";
3
+ import { Q as q, S as ne, N as B, c as k, d as $, a as j, l as E, F as te, b as ae, P as oe, m as C, e as D, n as le, u as ue, h as ie } from "./App-Cfl37TTw.js";
4
+ import { useI18n as T } from "@feedmepos/mf-common";
5
+ import { useSnackbar as I, components as se, useDialog as re, FmButtonVariant as me } from "@feedmepos/ui-library";
6
+ const de = ["value", "disabled"], ce = /* @__PURE__ */ N({
14
7
  __name: "NumberPrecisionInput",
15
8
  props: {
16
9
  modelValue: {},
@@ -22,25 +15,25 @@ const de = ["value", "disabled"], ce = /* @__PURE__ */ T({
22
15
  },
23
16
  emits: ["update:modelValue"],
24
17
  setup(y, { emit: g }) {
25
- const t = y, n = g, c = U(() => P(t.step ?? 1).precision), d = h(t.modelValue.toString());
26
- L([() => d.value], ([e]) => {
27
- e === "-" || e === "." ? n("update:modelValue", 0) : n("update:modelValue", +e);
18
+ const n = y, t = g, c = U(() => q(n.step ?? 1).precision), d = h(n.modelValue.toString());
19
+ S([() => d.value], ([e]) => {
20
+ e === "-" || e === "." ? t("update:modelValue", 0) : t("update:modelValue", +e);
28
21
  });
29
22
  const b = (e) => {
30
23
  if (e.ctrlKey || e.altKey || e.metaKey || ["Backspace", "Tab", "Enter", "ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"].includes(
31
24
  e.key
32
25
  ))
33
26
  return;
34
- const i = e.currentTarget, a = +`${i.value}${e.key}`;
35
- if (isFinite(a)) {
36
- P(a).precision > c.value && e.preventDefault();
27
+ const i = e.currentTarget, o = +`${i.value}${e.key}`;
28
+ if (isFinite(o)) {
29
+ q(o).precision > c.value && e.preventDefault();
37
30
  return;
38
31
  }
39
32
  i.value.length === 0 && (e.key === "-" || e.key === ".") || e.preventDefault();
40
33
  };
41
34
  return (e, i) => {
42
- const a = V("FmField"), o = V("FmFormGroup");
43
- return F(), W(o, {
35
+ const o = V("FmField"), a = V("FmFormGroup");
36
+ return F(), H(a, {
44
37
  disabled: e.disabled,
45
38
  modelValue: e.modelValue,
46
39
  rules: e.rules,
@@ -48,14 +41,14 @@ const de = ["value", "disabled"], ce = /* @__PURE__ */ T({
48
41
  label: e.label
49
42
  }, {
50
43
  default: w(({ invalid: p }) => [
51
- m(a, { invalid: p }, {
44
+ m(o, { invalid: p }, {
52
45
  default: w(() => [
53
46
  f("input", {
54
47
  value: d.value,
55
48
  onInput: i[0] || (i[0] = (_) => d.value = _.target.value),
56
49
  onKeydown: b,
57
50
  inputmode: "numeric",
58
- class: H({
51
+ class: J({
59
52
  "fm-text-field--input fm-typo-en-body-lg-400": !0,
60
53
  "text-fm-color-typo-primary": !e.disabled,
61
54
  "text-fm-color-typo-disabled": e.disabled
@@ -70,7 +63,7 @@ const de = ["value", "disabled"], ce = /* @__PURE__ */ T({
70
63
  }, 8, ["disabled", "modelValue", "rules", "helper-text", "label"]);
71
64
  };
72
65
  }
73
- }), pe = { class: "flex flex-col gap-8" }, ve = { class: "flex justify-between" }, fe = { class: "col q-mb-sm t-body-bold" }, be = { class: "flex flex-row gap-8" }, _e = { class: "q-mt-xs q-pl-sm t-system text-fsecondary" }, Ve = /* @__PURE__ */ T({
66
+ }), pe = { class: "flex flex-col gap-8" }, ve = { class: "flex justify-between" }, fe = { class: "col q-mb-sm t-body-bold" }, be = { class: "flex flex-row gap-8" }, _e = { class: "q-mt-xs q-pl-sm t-system text-fsecondary" }, Ve = /* @__PURE__ */ N({
74
67
  __name: "UnitMeasurement",
75
68
  props: {
76
69
  title: {
@@ -92,23 +85,23 @@ const de = ["value", "disabled"], ce = /* @__PURE__ */ T({
92
85
  },
93
86
  emits: ["update:model-value", "delete"],
94
87
  setup(y, { emit: g }) {
95
- const { t } = N(), n = y, c = U(() => te(n.modelValue.conversion)), d = U(() => t("menu.unit.measurement.preview", {
96
- name: n.modelValue.name,
88
+ const { t: n } = T(), t = y, c = U(() => ne(t.modelValue.conversion)), d = U(() => n("menu.unit.measurement.preview", {
89
+ name: t.modelValue.name,
97
90
  value: c.value,
98
- unit: n.unitName
91
+ unit: t.unitName
99
92
  }));
100
- function b(a) {
101
- e("conversion", B(a, n.precision));
93
+ function b(o) {
94
+ e("conversion", B(o, t.precision));
102
95
  }
103
- function e(a, o) {
104
- const p = k(n.modelValue);
105
- p[a] = o, i("update:model-value", p);
96
+ function e(o, a) {
97
+ const p = k(t.modelValue);
98
+ p[o] = a, i("update:model-value", p);
106
99
  }
107
100
  const i = g;
108
- return L(
109
- () => n.precision,
101
+ return S(
102
+ () => t.precision,
110
103
  () => b(c.value)
111
- ), (a, o) => {
104
+ ), (o, a) => {
112
105
  const p = V("FmButton"), _ = V("FmTextField");
113
106
  return F(), A("div", pe, [
114
107
  f("div", ve, [
@@ -116,56 +109,56 @@ const de = ["value", "disabled"], ce = /* @__PURE__ */ T({
116
109
  m(p, {
117
110
  icon: "delete",
118
111
  variant: "secondary",
119
- onClick: o[0] || (o[0] = (s) => i("delete"))
112
+ onClick: a[0] || (a[0] = (s) => i("delete"))
120
113
  })
121
114
  ]),
122
115
  f("div", be, [
123
116
  m(_, {
124
- "model-value": n.modelValue.name,
117
+ "model-value": t.modelValue.name,
125
118
  rules: [
126
- (s) => s ? !0 : l(t)("menu.common.validation.required", {
127
- field: l(t)("menu.unit.measurement.name").toLowerCase()
119
+ (s) => s ? !0 : l(n)("menu.common.validation.required", {
120
+ field: l(n)("menu.unit.measurement.name").toLowerCase()
128
121
  })
129
122
  ],
130
- label: l(t)("menu.unit.measurement.name"),
131
- "onUpdate:modelValue": o[1] || (o[1] = (s) => e("name", s.trim()))
123
+ label: l(n)("menu.unit.measurement.name"),
124
+ "onUpdate:modelValue": a[1] || (a[1] = (s) => e("name", s.trim()))
132
125
  }, null, 8, ["model-value", "rules", "label"]),
133
126
  m(_, {
134
- "model-value": n.modelValue.abbrev,
127
+ "model-value": t.modelValue.abbrev,
135
128
  rules: [
136
- (s) => s ? !0 : l(t)("menu.common.validation.required", {
137
- field: l(t)("menu.unit.measurement.symbol").toLowerCase()
129
+ (s) => s ? !0 : l(n)("menu.common.validation.required", {
130
+ field: l(n)("menu.unit.measurement.symbol").toLowerCase()
138
131
  })
139
132
  ],
140
- label: l(t)("menu.unit.measurement.symbol"),
141
- "onUpdate:modelValue": o[2] || (o[2] = (s) => e("abbrev", s.trim()))
133
+ label: l(n)("menu.unit.measurement.symbol"),
134
+ "onUpdate:modelValue": a[2] || (a[2] = (s) => e("abbrev", s.trim()))
142
135
  }, null, 8, ["model-value", "rules", "label"])
143
136
  ]),
144
137
  m(ce, {
145
- label: l(t)("menu.unit.measurement.conversion"),
138
+ label: l(n)("menu.unit.measurement.conversion"),
146
139
  "model-value": c.value,
147
140
  "onUpdate:modelValue": b,
148
- step: 1 / Math.pow(10, n.precision)
141
+ step: 1 / Math.pow(10, t.precision)
149
142
  }, null, 8, ["label", "model-value", "step"]),
150
- f("div", _e, M(l(t)("menu.unit.measurement.preview_label")) + ": " + M(d.value), 1)
143
+ f("div", _e, M(l(n)("menu.unit.measurement.preview_label")) + ": " + M(d.value), 1)
151
144
  ]);
152
145
  };
153
146
  }
154
- }), ye = { class: "fm-typo-en-title-md-600" }, ge = { class: "pt-8 space-y-40" }, Fe = { class: "flex flex-row gap-16" }, we = { class: "flex gap-8 items-center justify-start" }, Ue = /* @__PURE__ */ T({
147
+ }), ye = { class: "fm-typo-en-title-md-600" }, ge = { class: "pt-8 space-y-40" }, Fe = { class: "flex flex-row gap-16" }, we = { class: "flex gap-8 items-center justify-start" }, Ue = /* @__PURE__ */ N({
155
148
  __name: "Form",
156
149
  props: {
157
150
  initialValue: {}
158
151
  },
159
152
  setup(y, { expose: g }) {
160
- const { t } = N(), n = y, c = $(I(j())), d = U(() => n.initialValue ? t("menu.unit.update") : t("menu.unit.add")), b = U(
161
- () => n.initialValue ? t("menu.common.actions.update") : t("menu.common.actions.add")
162
- ), e = h(n.initialValue ? k(n.initialValue) : E.generator.initUnit()), i = h(!1), a = h(!1), o = (u) => {
163
- re.isBoolean(u) ? a.value = u : a.value = !a.value;
153
+ const { t: n } = T(), t = y, c = $(j(I())), d = U(() => t.initialValue ? n("menu.unit.update") : n("menu.unit.add")), b = U(
154
+ () => t.initialValue ? n("menu.common.actions.update") : n("menu.common.actions.add")
155
+ ), e = h(t.initialValue ? k(t.initialValue) : E.generator.initUnit()), i = h(!1), o = h(!1), a = (u) => {
156
+ ae.isBoolean(u) ? o.value = u : o.value = !o.value;
164
157
  };
165
158
  function p() {
166
159
  e.value.measurements = e.value.measurements.map((u) => ({
167
160
  ...u,
168
- conversion: ne(u.conversion, e.value.precision)
161
+ conversion: oe(u.conversion, e.value.precision)
169
162
  }));
170
163
  }
171
164
  function _() {
@@ -179,16 +172,16 @@ const de = ["value", "disabled"], ce = /* @__PURE__ */ T({
179
172
  function s(u) {
180
173
  e.value.measurements.splice(u, 1);
181
174
  }
182
- const K = se(
183
- () => !oe.isEqual(e.value, n.initialValue || E.generator.initUnit()),
175
+ const K = te(
176
+ () => !le.isEqual(e.value, t.initialValue || E.generator.initUnit()),
184
177
  () => {
185
- a.value = !1;
178
+ o.value = !1;
186
179
  }
187
180
  ), Y = async () => {
188
181
  try {
189
182
  i.value = !0;
190
183
  const u = k(e.value);
191
- n.initialValue ? await c.updateMenu(
184
+ t.initialValue ? await c.updateMenu(
192
185
  {
193
186
  module: D.F_MENU_MODULE_V4_KEY.enum.unit,
194
187
  operation: C.F_OPERATION_TYPE.update,
@@ -202,28 +195,28 @@ const de = ["value", "disabled"], ce = /* @__PURE__ */ T({
202
195
  data: u
203
196
  },
204
197
  u.name
205
- ), o(!1), e.value = E.generator.initUnit();
198
+ ), a(!1), e.value = E.generator.initUnit();
206
199
  } finally {
207
200
  i.value = !1;
208
201
  }
209
202
  };
210
- return L(
211
- () => a.value,
203
+ return S(
204
+ () => o.value,
212
205
  (u) => {
213
- u && (e.value = n.initialValue ? k(n.initialValue) : E.generator.initUnit());
206
+ u && (e.value = t.initialValue ? k(t.initialValue) : E.generator.initUnit());
214
207
  }
215
208
  ), g({
216
- show: a,
217
- trigger: o
209
+ show: o,
210
+ trigger: a
218
211
  }), (u, v) => {
219
- const O = V("FmTextField"), R = V("FmStepperField"), z = V("FmButton"), S = V("fm-button"), G = V("fm-side-sheet");
220
- return F(), A(q, null, [
221
- X(u.$slots, "default", { trigger: o }),
212
+ const L = V("FmTextField"), R = V("FmStepperField"), z = V("FmButton"), O = V("fm-button"), G = V("fm-side-sheet");
213
+ return F(), A(P, null, [
214
+ X(u.$slots, "default", { trigger: a }),
222
215
  m(G, {
223
216
  id: "unit-form",
224
- modelValue: a.value,
225
- "onUpdate:modelValue": v[4] || (v[4] = (r) => a.value = r),
226
- "is-container": l(le).FmForm,
217
+ modelValue: o.value,
218
+ "onUpdate:modelValue": v[4] || (v[4] = (r) => o.value = r),
219
+ "is-container": l(se).FmForm,
227
220
  "is-container-props": {
228
221
  onValidationSuccess: Y,
229
222
  blameFormChildOnValidationFailed: !0
@@ -236,43 +229,43 @@ const de = ["value", "disabled"], ce = /* @__PURE__ */ T({
236
229
  ]),
237
230
  "side-sheet-footer": w(() => [
238
231
  f("div", we, [
239
- m(S, {
232
+ m(O, {
240
233
  label: b.value,
241
234
  loading: i.value,
242
235
  size: "lg",
243
236
  type: "submit",
244
237
  variant: "primary"
245
238
  }, null, 8, ["label", "loading"]),
246
- m(S, {
247
- label: l(t)("menu.common.actions.cancel"),
239
+ m(O, {
240
+ label: l(n)("menu.common.actions.cancel"),
248
241
  size: "lg",
249
242
  variant: "tertiary",
250
- onClick: v[3] || (v[3] = () => a.value = !1)
243
+ onClick: v[3] || (v[3] = () => o.value = !1)
251
244
  }, null, 8, ["label"])
252
245
  ])
253
246
  ]),
254
247
  default: w(() => [
255
248
  f("div", ge, [
256
249
  f("div", Fe, [
257
- m(O, {
250
+ m(L, {
258
251
  class: "flex-2",
259
- label: l(t)("menu.unit.columns.name"),
252
+ label: l(n)("menu.unit.columns.name"),
260
253
  modelValue: e.value.name,
261
254
  "onUpdate:modelValue": v[0] || (v[0] = (r) => e.value.name = r),
262
255
  rules: [
263
- (r) => r ? !0 : l(t)("menu.common.validation.required", {
264
- field: l(t)("menu.unit.columns.name").toLowerCase()
256
+ (r) => r ? !0 : l(n)("menu.common.validation.required", {
257
+ field: l(n)("menu.unit.columns.name").toLowerCase()
265
258
  })
266
259
  ]
267
260
  }, null, 8, ["label", "modelValue", "rules"]),
268
- m(O, {
261
+ m(L, {
269
262
  class: "flex-1",
270
- label: l(t)("menu.unit.columns.symbol"),
263
+ label: l(n)("menu.unit.columns.symbol"),
271
264
  modelValue: e.value.abbrev,
272
265
  "onUpdate:modelValue": v[1] || (v[1] = (r) => e.value.abbrev = r),
273
266
  rules: [
274
- (r) => r ? !0 : l(t)("menu.common.validation.required", {
275
- field: l(t)("menu.unit.columns.symbol").toLowerCase()
267
+ (r) => r ? !0 : l(n)("menu.common.validation.required", {
268
+ field: l(n)("menu.unit.columns.symbol").toLowerCase()
276
269
  })
277
270
  ]
278
271
  }, null, 8, ["label", "modelValue", "rules"])
@@ -284,26 +277,26 @@ const de = ["value", "disabled"], ce = /* @__PURE__ */ T({
284
277
  v[2] || (v[2] = (r) => e.value.precision = r),
285
278
  p
286
279
  ],
287
- label: l(t)("menu.unit.precision"),
288
- placeholder: l(t)("menu.unit.precision_placeholder"),
280
+ label: l(n)("menu.unit.precision"),
281
+ placeholder: l(n)("menu.unit.precision_placeholder"),
289
282
  step: 1,
290
283
  min: 0,
291
284
  max: 5
292
285
  }, null, 8, ["modelValue", "label", "placeholder"])
293
286
  ]),
294
287
  m(z, {
295
- label: l(t)("menu.unit.measurement.add"),
288
+ label: l(n)("menu.unit.measurement.add"),
296
289
  variant: "secondary",
297
290
  onClick: _
298
291
  }, null, 8, ["label"]),
299
- (F(!0), A(q, null, Z(e.value.measurements, (r, x) => (F(), A("div", {
292
+ (F(!0), A(P, null, Z(e.value.measurements, (r, x) => (F(), A("div", {
300
293
  key: r.id
301
294
  }, [
302
295
  m(Ve, {
303
296
  modelValue: e.value.measurements[x],
304
- "onUpdate:modelValue": (J) => e.value.measurements[x] = J,
297
+ "onUpdate:modelValue": (Q) => e.value.measurements[x] = Q,
305
298
  "unit-name": e.value.name,
306
- title: l(t)("menu.unit.measurement.title", { number: x + 1 }),
299
+ title: l(n)("menu.unit.measurement.title", { number: x + 1 }),
307
300
  precision: e.value.precision,
308
301
  onDelete: () => s(x)
309
302
  }, null, 8, ["modelValue", "onUpdate:modelValue", "unit-name", "title", "precision", "onDelete"])
@@ -315,58 +308,58 @@ const de = ["value", "disabled"], ce = /* @__PURE__ */ T({
315
308
  ], 64);
316
309
  };
317
310
  }
318
- }), xe = Ue, qe = Q("unit-manager", () => {
319
- const y = ue(), g = j(), t = I(g), n = $(t);
320
- ae();
321
- const c = ee(), { t: d } = N(), b = (o) => {
311
+ }), xe = Ue, Ce = W("unit-manager", () => {
312
+ const y = re(), g = I(), n = j(g), t = $(n);
313
+ ue();
314
+ const c = ee(), { t: d } = T(), b = (a) => {
322
315
  var _, s;
323
- const { vNode: p } = me(
316
+ const { vNode: p } = ie(
324
317
  xe,
325
318
  c,
326
- o
319
+ a
327
320
  );
328
321
  (s = (_ = p.component) == null ? void 0 : _.exposed) == null || s.trigger();
329
322
  };
330
323
  async function e() {
331
324
  b({});
332
325
  }
333
- async function i(o) {
326
+ async function i(a) {
334
327
  b({
335
- initialValue: o
328
+ initialValue: a
336
329
  });
337
330
  }
338
- async function a(o) {
331
+ async function o(a) {
339
332
  y.open({
340
333
  title: d("menu.common.dialog.remove.unit.title"),
341
- message: d("menu.common.dialog.remove.unit.message", { name: o.name }),
334
+ message: d("menu.common.dialog.remove.unit.message", { name: a.name }),
342
335
  primaryActions: {
343
336
  text: d("menu.common.actions.remove"),
344
337
  close: !0,
345
- variant: ie.Destructive
338
+ variant: me.Destructive
346
339
  },
347
340
  secondaryActions: {
348
341
  text: d("menu.common.actions.cancel"),
349
342
  close: !0
350
343
  }
351
344
  }).onPrimary(async () => {
352
- await n.updateMenu(
345
+ await t.updateMenu(
353
346
  {
354
347
  module: D.F_MENU_MODULE_V4_KEY.enum.unit,
355
348
  operation: C.F_OPERATION_TYPE.delete,
356
- data: o._id
349
+ data: a._id
357
350
  },
358
- o.name,
351
+ a.name,
359
352
  !0
360
353
  );
361
354
  });
362
355
  }
363
356
  return {
364
357
  createUnit: e,
365
- deleteUnit: a,
358
+ deleteUnit: o,
366
359
  updateUnit: i
367
360
  };
368
361
  });
369
362
  export {
370
363
  xe as U,
371
- qe as u
364
+ Ce as u
372
365
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-menu",
3
- "version": "0.32.17",
3
+ "version": "0.32.18-dev.1",
4
4
  "files": [
5
5
  "dist"
6
6
  ],