@feedmepos/mf-menu 0.32.53 → 0.32.55-dev

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 (77) hide show
  1. package/dist/{App-opl8VW_R.js → App-CIgIsEM9.js} +7 -7
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-CI685o_y.js → ApplyProduct.vue_vue_type_script_setup_true_lang-DmEIlfYP.js} +3 -3
  3. package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-BE37wS9F.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-BbC3lOOV.js} +2 -2
  4. package/dist/{Catalog-CFgFi7F4.js → Catalog-9ib95UId.js} +6 -6
  5. package/dist/{Category-C-QIBnv4.js → Category-BYu100IJ.js} +4 -4
  6. package/dist/{Category-C9D0g8il.js → Category-Bl7SYTgm.js} +4 -4
  7. package/dist/{CookingGuide-miSijISx.js → CookingGuide-D-cUq1Ol.js} +4 -4
  8. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CNXLlPC4.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-BPy_R1gJ.js} +1 -1
  9. package/dist/{Group-DetasO-_.js → Group-CQliZiFG.js} +1 -1
  10. package/dist/{Group-C1sw05Nm.js → Group-micF-DFs.js} +3 -3
  11. package/dist/{Group.vue_vue_type_script_setup_true_lang-DiKZMMau.js → Group.vue_vue_type_script_setup_true_lang-DjOSKedT.js} +7 -7
  12. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BY1jcgZ2.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Bn0-7ZV5.js} +5 -5
  13. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Bjk8zzYz.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-D1BTnmYq.js} +212 -212
  14. package/dist/{Ingredient-CyZHvNUy.js → Ingredient-MOpWS1c4.js} +3 -3
  15. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-5YtnqTmW.js → InventoryBinding.vue_vue_type_script_setup_true_lang-B5zF8O3I.js} +2 -2
  16. package/dist/{LinkProductSideSheet-CwW76B20.js → LinkProductSideSheet-BvEaDUll.js} +3 -3
  17. package/dist/{MenuSetting-DAchuXJ6.js → MenuSetting-CCAQiJEV.js} +6 -6
  18. package/dist/{OrderPacing-BVIQnDTl.js → OrderPacing-Nr7kci_s.js} +5 -5
  19. package/dist/{PrintRoute-70IyWjgJ.js → PrintRoute-BFLrZZD9.js} +4 -4
  20. package/dist/{Product-DctvRQlQ.js → Product-C8qaWDkl.js} +1 -1
  21. package/dist/Product.vue_vue_type_script_setup_true_lang-Bn0VVijn.js +1640 -0
  22. package/dist/{ProductInternalTools-D_iKLDbw.js → ProductInternalTools-B2mzlBZM.js} +6 -6
  23. package/dist/{Products-B0DlF5sy.js → Products-ZLqxuf4C.js} +40 -40
  24. package/dist/{Publish-DGsHCtxz.js → Publish-CAT-NC6s.js} +263 -265
  25. package/dist/{Recipe-Cu8NbZR7.js → Recipe-wKIa_jHj.js} +4 -4
  26. package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-DO8Z3QJ3.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-BCqZUUqp.js} +1 -1
  27. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-avzZyXl2.js → RuleView.vue_vue_type_script_setup_true_lang-DVxhfBXq.js} +302 -302
  28. package/dist/{Scheduler-CY8eSvsu.js → Scheduler-Br1FOJt_.js} +3 -3
  29. package/dist/{ServingSequence-C4gh5jvR.js → ServingSequence-DAUy_tYS.js} +3 -3
  30. package/dist/{Setting-CwCP1uIf.js → Setting-BeR46X9Q.js} +5 -5
  31. package/dist/{Subcategory-Chcr9PWi.js → Subcategory-lvNu6y02.js} +5 -5
  32. package/dist/{Takeaway-C8ohkkYR.js → Takeaway-BdsE7Mz4.js} +1 -1
  33. package/dist/{Takeaway-C6vyEwBR.js → Takeaway-C3V6m7Re.js} +4 -4
  34. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BqKRwZNT.js → Takeaway.vue_vue_type_script_setup_true_lang-Cw389Ag5.js} +5 -5
  35. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-_dnxm97U.js → Thumbnail.vue_vue_type_script_setup_true_lang-D3IsLPEJ.js} +4 -4
  36. package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-Bm4W6NHD.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-BHxvkbIp.js} +1 -1
  37. package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-DD-vqSBo.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-1ArcDuET.js} +2 -2
  38. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-ClDIRf6q.js +5940 -0
  39. package/dist/{Unit-BJOTS840.js → Unit-DmZVN6Yw.js} +2 -2
  40. package/dist/{Variant-1yx-tba5.js → Variant-hdGTER6L.js} +3 -3
  41. package/dist/{_id_-Bli_eaaw.js → _id_-CvgEr6jN.js} +9 -9
  42. package/dist/{app-CEjAGMYK.js → app-CYewE37N.js} +1 -1
  43. package/dist/{app-Df2OaMeW.js → app-DN7ekh5C.js} +139 -139
  44. package/dist/app.js +1 -1
  45. package/dist/apps/mf-menu/src/app.d.ts +34 -0
  46. package/dist/apps/mf-menu/src/components/feature/Fields/currencySymbol.d.ts +7 -0
  47. package/dist/apps/mf-menu/src/components/feature/SubcategoryManager/SubcategorySelector.vue.d.ts +5 -0
  48. package/dist/apps/mf-menu/src/helper/item.d.ts +1 -0
  49. package/dist/apps/mf-menu/src/manager/menu/item.d.ts +1 -0
  50. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  51. package/dist/assets/{linked-status-gnRlCKBX.js → linked-status-D5nQiLUb.js} +12 -12
  52. package/dist/assets/{menu-export-DVgG2q3T.js → menu-export-Ize1yB7x.js} +2 -2
  53. package/dist/assets/{override-menu-B5Xlrlwf.js → override-menu-C0fDYDhe.js} +2 -2
  54. package/dist/assets/{validate-menu-Ce8h_1g0.js → validate-menu-BbSXAJqf.js} +2 -2
  55. package/dist/{catalog-CKUQEphe.js → catalog-DHONNzCf.js} +1 -1
  56. package/dist/{catalogSetting-D1cRj-bD.js → catalogSetting-BUuDLox3.js} +1 -1
  57. package/dist/{currency-BVe0-Ftm.js → currency-DIJaJQl4.js} +1 -1
  58. package/dist/{dayjs.min-Cky8XfOQ.js → dayjs.min-CPdSdRMO.js} +2 -2
  59. package/dist/index-DDmBlrVX.js +357 -0
  60. package/dist/{index-CGHFswp3.js → index-DSpPcqqG.js} +4 -4
  61. package/dist/{index.vue_vue_type_script_setup_true_lang-D8icZ01s.js → index.vue_vue_type_script_setup_true_lang-BK6N1N8S.js} +679 -672
  62. package/dist/{item-C2zRGcji.js → item-CfLgj9r6.js} +2266 -2249
  63. package/dist/{jszip.min-Cw0XEEly.js → jszip.min-DOv1a5aI.js} +175 -175
  64. package/dist/{memberPricing-vGotpgxh.js → memberPricing-BEWayGJA.js} +1 -1
  65. package/dist/{menu-33fQZyJt.js → menu-D1qDAKyx.js} +1 -1
  66. package/dist/{menuV2-BolaQLav.js → menuV2-lmrkMCMz.js} +63 -63
  67. package/dist/mf-menu.css +1 -1
  68. package/dist/{order_pacing-By6jv8HG.js → order_pacing-CBCsrQbk.js} +5 -5
  69. package/dist/{priceTier-DhA6Ve0R.js → priceTier-B18WkSDB.js} +1 -1
  70. package/dist/{rules-glZCxFHS.js → rules-Mf98YSaj.js} +3 -3
  71. package/dist/{scheduler-Cnzgnk6d.js → scheduler-Dqh2rR00.js} +4 -4
  72. package/dist/{toExcel-Bym1fMDm.js → toExcel-Bm8l24mb.js} +2 -2
  73. package/dist/{unit-BWwoKT39.js → unit-Dw-sx8I6.js} +2 -2
  74. package/package.json +1 -1
  75. package/dist/Product.vue_vue_type_script_setup_true_lang-mJYcstbm.js +0 -1606
  76. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DXhITV7s.js +0 -5926
  77. package/dist/index-DLC-j2RG.js +0 -340
@@ -1,340 +0,0 @@
1
- import { z as $, K as Y, u as Z, G as Q, A as z, H as X } from "./index.vue_vue_type_script_setup_true_lang-D8icZ01s.js";
2
- import { defineComponent as j, ref as h, computed as _, watch as R, onMounted as ee, onBeforeUnmount as ae, resolveComponent as L, createBlock as H, openBlock as x, withModifiers as q, withCtx as k, renderSlot as P, createElementBlock as O, Fragment as K, createVNode as v, unref as i, createElementVNode as M, createCommentVNode as te, renderList as le, toDisplayString as I } from "vue";
3
- import { useI18n as W } from "@feedmepos/mf-common";
4
- import { components as ne } from "@feedmepos/ui-library";
5
- import { _ as oe } from "./RuleView.vue_vue_type_script_setup_true_lang-avzZyXl2.js";
6
- import { u as ie } from "./discardConfirm-BHni0LNu.js";
7
- import { _ as re } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-CI685o_y.js";
8
- import { _ as ue } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-DD-vqSBo.js";
9
- import { c as se } from "./check-C9mY6LiX.js";
10
- import { f as me } from "./currency-BVe0-Ftm.js";
11
- import { c as de } from "./string-DpfFixWH.js";
12
- import { g as A } from "./translation-fNx6yEpy.js";
13
- const pe = /* @__PURE__ */ j({
14
- __name: "CurrencyInput",
15
- props: {
16
- modelValue: {},
17
- label: {},
18
- placeholder: {},
19
- nullable: { type: Boolean },
20
- showCurrency: { type: Boolean },
21
- min: {},
22
- max: {},
23
- required: { type: [Boolean, String] },
24
- rules: {},
25
- disable: { type: Boolean },
26
- minLength: {},
27
- maxLength: {},
28
- inputmode: {},
29
- type: {},
30
- readonly: { type: Boolean },
31
- labelMark: {},
32
- prependIcon: {},
33
- appendIcon: {},
34
- showValidBorder: { type: Boolean },
35
- labelInfo: {},
36
- showWordCount: { type: Boolean },
37
- invalid: { type: Boolean },
38
- autofocus: { type: Boolean },
39
- formatter: { type: Function },
40
- decimal: {},
41
- datalist: {},
42
- shiftDatalist: { type: Boolean },
43
- datalistMaxHeight: {},
44
- datalistMinHeight: {},
45
- offsetDatalist: {},
46
- datalistPlacement: {},
47
- datalistZIndex: {},
48
- datalistWidth: {},
49
- disabled: { type: Boolean },
50
- focused: { type: Boolean },
51
- helperText: {},
52
- helperState: {}
53
- },
54
- emits: ["update:model-value"],
55
- setup(B, { emit: g }) {
56
- const l = B, { t: o } = W(), m = h(!1), E = h(!1), r = h(), N = _(() => l.modelValue ? (E.value && !m.value && (m.value = !0), $.Dinero.fromFdoDinero(l.modelValue).toUnit().toFixed(2)) : "");
57
- R(
58
- () => E.value,
59
- (e) => {
60
- var n, c, f, T, U;
61
- e ? (c = (n = r.value) == null ? void 0 : n.inputEl) == null || c.select() : (m.value = !1, (f = r.value) != null && f.inputEl && s((U = (T = r.value) == null ? void 0 : T.inputEl) == null ? void 0 : U.value));
62
- }
63
- );
64
- const S = g, u = _(() => typeof l.required == "string" ? l.required : o("menu.common.validation.field_required", {
65
- field: l.label ?? o("menu.currency.input.field")
66
- })), C = [
67
- (e) => l.required ? !!e || u.value : !0,
68
- (e) => l.min !== void 0 && e && parseFloat(e.toString()) < l.min ? o("menu.common.validation.min_value", { value: l.min }) : !0,
69
- (e) => l.max !== void 0 && e && parseFloat(e.toString()) > l.max ? o("menu.common.validation.max_value", { value: l.max }) : !0,
70
- ...l.rules ?? []
71
- ];
72
- function s(e) {
73
- if (typeof e != "number" && !e && l.nullable)
74
- S("update:model-value", void 0);
75
- else {
76
- if (typeof e == "string" && e === "-")
77
- return;
78
- let n = parseFloat((e || "").toString());
79
- n = Number.isNaN(n) ? 0 : n, S("update:model-value", $.Dinero.fromNumber({ number: n }).toObject());
80
- }
81
- }
82
- const D = _(() => typeof l.min == "number" && l.min >= 0), F = (e) => {
83
- var n, c, f;
84
- if (!(e.ctrlKey || e.metaKey)) {
85
- if (e.key === "Enter") {
86
- (n = r.value) != null && n.inputEl && s((f = (c = r.value) == null ? void 0 : c.inputEl) == null ? void 0 : f.value);
87
- return;
88
- }
89
- if (e.key === "-" && D.value) {
90
- e.preventDefault();
91
- return;
92
- }
93
- e.key >= "0" && e.key <= "9" || e.key === "." || e.key === "," || e.key === "-" || e.key === "Backspace" || e.key === "ArrowLeft" || e.key === "ArrowRight" || e.key === "Tab" || e.preventDefault();
94
- }
95
- };
96
- return ee(() => {
97
- var e;
98
- r.value && ((e = r.value.inputEl) == null || e.addEventListener("keydown", F));
99
- }), ae(() => {
100
- var e;
101
- r.value && ((e = r.value.inputEl) == null || e.removeEventListener("keydown", F));
102
- }), (e, n) => {
103
- const c = L("fm-text-field");
104
- return x(), H(c, {
105
- ref_key: "inputRef",
106
- ref: r,
107
- autofocus: l.autofocus,
108
- disabled: l.disable,
109
- label: e.label,
110
- "model-value": N.value,
111
- placeholder: l.placeholder,
112
- "prepend-icon": e.showCurrency ? "attach_money" : void 0,
113
- rules: C,
114
- inputmode: "decimal",
115
- onFocusChanged: n[0] || (n[0] = (f) => E.value = f),
116
- onWheel: n[1] || (n[1] = q(() => {
117
- }, ["prevent"])),
118
- onTouchmove: n[2] || (n[2] = q(() => {
119
- }, ["prevent"])),
120
- onScroll: n[3] || (n[3] = q(() => {
121
- }, ["prevent"]))
122
- }, {
123
- append: k(() => [
124
- P(e.$slots, "append")
125
- ]),
126
- _: 3
127
- }, 8, ["autofocus", "disabled", "label", "model-value", "placeholder", "prepend-icon"]);
128
- };
129
- }
130
- });
131
- function xe(B) {
132
- return B.map((g) => ({
133
- module: Y.enum.item,
134
- id: g._id,
135
- discriminator: g.combinationKey,
136
- data: void 0
137
- }));
138
- }
139
- const ce = { class: "fm-typo-en-title-md-600" }, fe = { class: "space-y-32" }, ve = { class: "py-12 px-16 space-y-4" }, ye = { class: "flex gap-8 items-center justify-start" }, be = /* @__PURE__ */ j({
140
- __name: "Form",
141
- props: {
142
- action: {},
143
- initialValue: {},
144
- fallback: {},
145
- applyProduct: { type: Boolean },
146
- bindToVariant: { type: Boolean }
147
- },
148
- emits: ["update:takeaway"],
149
- setup(B, { expose: g, emit: l }) {
150
- const { t: o } = W(), m = B, E = l, r = Z(), N = _(() => r.rules.takeaway), S = h(!1), u = h(!1), C = h(!1), s = h(void 0), D = (a) => {
151
- se.isBoolean(a) ? u.value = a : u.value = !u.value;
152
- };
153
- function F() {
154
- var t;
155
- const a = {
156
- ...z.generator.initMenuV4Takeaway(),
157
- usedBy: [],
158
- ...Q(m.initialValue ?? {})
159
- };
160
- return (t = m.fallback) != null && t.price && (a.price = $.Dinero.zero().toObject()), a;
161
- }
162
- const e = h(F()), n = _(() => m.action === "add" ? o("menu.takeaway.add") : o("menu.takeaway.update")), c = _(() => !!e.value.name), f = _(() => {
163
- var V;
164
- const a = [], t = "en-US", w = (V = s.value) == null ? void 0 : V[t];
165
- return e.value.name && !w && a.push({
166
- locale: t,
167
- name: e.value.name,
168
- localeDisplay: A(t)
169
- }), s.value && Object.entries(s.value).filter(([d, y]) => y && y.trim()).sort(([d], [y]) => d.localeCompare(y)).forEach(([d, y]) => {
170
- a.push({
171
- locale: d,
172
- name: y,
173
- localeDisplay: A(d)
174
- });
175
- }), a;
176
- });
177
- function T(a) {
178
- s.value = a;
179
- }
180
- function U(a) {
181
- e.value.name = a;
182
- }
183
- const J = ie(
184
- () => {
185
- var d;
186
- const a = !X.isEqual(
187
- e.value,
188
- m.initialValue || {
189
- ...z.generator.initMenuV4Takeaway(),
190
- usedBy: []
191
- }
192
- ), t = ((d = m.initialValue) == null ? void 0 : d.name_locale) || {}, w = s.value || {}, V = JSON.stringify(t) !== JSON.stringify(w);
193
- return a || V;
194
- },
195
- () => u.value = !1
196
- );
197
- function G() {
198
- const a = s.value;
199
- E("update:takeaway", {
200
- ...e.value,
201
- name_locale: a
202
- }), D(!1);
203
- }
204
- return R(
205
- () => u.value,
206
- () => {
207
- var a;
208
- u.value && (e.value = F(), s.value = (a = m.initialValue) == null ? void 0 : a.name_locale);
209
- }
210
- ), g({
211
- trigger: D,
212
- show: u
213
- }), (a, t) => {
214
- const w = L("fm-button"), V = L("FmTooltip"), d = L("fm-text-field"), y = L("fm-side-sheet");
215
- return x(), O(K, null, [
216
- P(a.$slots, "default", { trigger: D }),
217
- v(y, {
218
- id: "group-form",
219
- modelValue: u.value,
220
- "onUpdate:modelValue": t[5] || (t[5] = (b) => u.value = b),
221
- "is-container": i(ne).FmForm,
222
- "is-container-props": {
223
- onValidationSuccess: G,
224
- blameFormChildOnValidationFailed: !0
225
- },
226
- "max-width": 560,
227
- "onOn:clickedAway": i(J)
228
- }, {
229
- "side-sheet-header": k(() => [
230
- M("p", ce, I(n.value), 1)
231
- ]),
232
- "side-sheet-footer": k(() => [
233
- M("div", ye, [
234
- v(w, {
235
- label: i(de)(i(o)(`menu.common.actions.${a.action}`)),
236
- loading: S.value,
237
- size: "lg",
238
- type: "submit",
239
- variant: "primary"
240
- }, null, 8, ["label", "loading"]),
241
- v(w, {
242
- label: i(o)("menu.common.actions.cancel"),
243
- size: "lg",
244
- variant: "tertiary",
245
- onClick: t[4] || (t[4] = () => u.value = !1)
246
- }, null, 8, ["label"])
247
- ])
248
- ]),
249
- default: k(() => [
250
- M("div", fe, [
251
- v(oe, null, {
252
- default: k(() => {
253
- var b;
254
- return [
255
- v(d, {
256
- modelValue: e.value.name,
257
- "onUpdate:modelValue": t[1] || (t[1] = (p) => e.value.name = p),
258
- disabled: !N.value.name,
259
- rules: [
260
- (p) => !!p || i(o)("menu.common.validation.required", {
261
- field: i(o)("menu.takeaway.columns.title").toLowerCase()
262
- })
263
- ],
264
- autofocus: "",
265
- label: i(o)("menu.takeaway.columns.title"),
266
- placeholder: i(o)("menu.takeaway.placeholders.title"),
267
- required: "",
268
- title: i(o)("menu.takeaway.columns.title")
269
- }, {
270
- append: k(() => [
271
- v(V, {
272
- variant: "plain",
273
- placement: "top",
274
- "z-index": 999
275
- }, {
276
- content: k(() => [
277
- M("div", ve, [
278
- (x(!0), O(K, null, le(f.value, (p) => (x(), O("div", {
279
- key: p.locale
280
- }, I(p.name) + " (" + I(p.localeDisplay) + ") ", 1))), 128))
281
- ])
282
- ]),
283
- default: k(() => [
284
- v(w, {
285
- variant: "tertiary",
286
- icon: "g_translate",
287
- onClick: t[0] || (t[0] = (p) => C.value = !0),
288
- disabled: !c.value || !N.value.name
289
- }, null, 8, ["disabled"])
290
- ]),
291
- _: 1
292
- })
293
- ]),
294
- _: 1
295
- }, 8, ["modelValue", "disabled", "rules", "label", "placeholder", "title"]),
296
- v(pe, {
297
- modelValue: e.value.price,
298
- "onUpdate:modelValue": t[2] || (t[2] = (p) => e.value.price = p),
299
- min: 0,
300
- nullable: !!a.fallback,
301
- placeholder: (b = a.fallback) != null && b.price ? i(me)(a.fallback.price, !1) : void 0,
302
- label: i(o)("menu.takeaway.columns.price"),
303
- "show-currency": "",
304
- title: i(o)("menu.takeaway.columns.price")
305
- }, null, 8, ["modelValue", "nullable", "placeholder", "label", "title"])
306
- ];
307
- }),
308
- _: 1
309
- }),
310
- a.applyProduct ? (x(), H(re, {
311
- key: 0,
312
- overrides: e.value.usedBy,
313
- "onUpdate:overrides": t[3] || (t[3] = (b) => e.value.usedBy = b),
314
- "select-variant": a.bindToVariant,
315
- editable: "",
316
- title: i(o)("menu.common.labels.product")
317
- }, null, 8, ["overrides", "select-variant", "title"])) : te("", !0)
318
- ])
319
- ]),
320
- _: 1
321
- }, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"]),
322
- v(ue, {
323
- modelValue: C.value,
324
- "onUpdate:modelValue": t[6] || (t[6] = (b) => C.value = b),
325
- title: i(o)("menu.takeaway.title"),
326
- name: e.value.name,
327
- "name-locale": s.value,
328
- "onUpdate:name": U,
329
- "onUpdate:nameLocale": T
330
- }, null, 8, ["modelValue", "title", "name", "name-locale"])
331
- ], 64);
332
- };
333
- }
334
- }), Ne = be;
335
- export {
336
- Ne as T,
337
- pe as _,
338
- be as a,
339
- xe as l
340
- };