@feedmepos/mf-menu-portal 1.0.4-dev.2 → 1.0.4-dev.4

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-DtX4DyDA.js → App-CrpoLCjA.js} +3 -3
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-C9OSr8ft.js → ApplyProduct.vue_vue_type_script_setup_true_lang-Hdsnu29V.js} +1 -1
  3. package/dist/{BindingTable.vue_vue_type_script_setup_true_lang-BJN8ajuD.js → BindingTable.vue_vue_type_script_setup_true_lang-D3CmOOPY.js} +1 -1
  4. package/dist/{Catalog-Dly_r1yA.js → Catalog-VU3HhNro.js} +4 -4
  5. package/dist/{CatalogBinding-CNG4YcVq.js → CatalogBinding-BNATtZEY.js} +3 -3
  6. package/dist/{CatalogEditTabs.vue_vue_type_script_setup_true_lang-Cy2culdR.js → CatalogEditTabs.vue_vue_type_script_setup_true_lang-BmG-xpW4.js} +3 -3
  7. package/dist/CatalogEditor.vue_vue_type_script_setup_true_lang-BFsRDFpj.js +784 -0
  8. package/dist/{CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-4EZ4yM_N.js → CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-Bk4FqVmx.js} +14 -14
  9. package/dist/{Category-Dz1yFYyY.js → Category-DMoXTsfG.js} +5 -5
  10. package/dist/{Category-BS-vFDYy.js → Category-DxjdQ-NN.js} +2 -2
  11. package/dist/CategoryList.vue_vue_type_script_setup_true_lang-B3Ts1O-9.js +847 -0
  12. package/dist/{CookingGuide-CmbvWFgp.js → CookingGuide-DiZZDYD-.js} +5 -5
  13. package/dist/{Group-B7s-vPXb.js → Group-DFR8q-tt.js} +5 -5
  14. package/dist/{Group-BRmWZnHh.js → Group-rzfh_o6r.js} +2 -2
  15. package/dist/GroupList.vue_vue_type_script_setup_true_lang-DiN-wQXX.js +1807 -0
  16. package/dist/Ingredient-DpjGIuH9.js +505 -0
  17. package/dist/LinkProductSideSheet.vue_vue_type_script_setup_true_lang-CnI80Ojd.js +782 -0
  18. package/dist/{MenuSetting-Ci7V_Jxn.js → MenuSetting-DR-pDSF_.js} +4 -4
  19. package/dist/OrderPacing-JcTuweqF.js +769 -0
  20. package/dist/{OrderPacingFields.vue_vue_type_script_setup_true_lang-NCH-SrZU.js → OrderPacingFields.vue_vue_type_script_setup_true_lang-HwwJ2mGv.js} +2 -2
  21. package/dist/{Preview-BBGNaj1F.js → Preview-BZyun5lZ.js} +1 -1
  22. package/dist/{PriceTierNotice.vue_vue_type_script_setup_true_lang-BXJDpDCm.js → PriceTierNotice.vue_vue_type_script_setup_true_lang-DquqNbE1.js} +1 -1
  23. package/dist/PrintRoute-CzEx2dCt.js +518 -0
  24. package/dist/{Product-DqN0NFUU.js → Product-CQb0n06E.js} +4 -4
  25. package/dist/ProductAttributeFilter.vue_vue_type_script_setup_true_lang-B2KdolJS.js +7931 -0
  26. package/dist/{ProductEditorHost.vue_vue_type_script_setup_true_lang-Fkiw4lZp.js → ProductEditorHost.vue_vue_type_script_setup_true_lang-CBlDEjqF.js} +9 -9
  27. package/dist/ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-D8NQTCLx.js +2011 -0
  28. package/dist/{ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-CNWCT1OB.js → ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-cG47Pu-6.js} +1 -1
  29. package/dist/{ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-BoQ9mVPY.js → ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-0UwUcA2L.js} +800 -749
  30. package/dist/{ProductInternalTools-CC3SWSlT.js → ProductInternalTools-QrBR1nFp.js} +2 -2
  31. package/dist/{ProductInventoryDialog-SAhsVekx.js → ProductInventoryDialog-fV38GO1a.js} +1 -1
  32. package/dist/{ProductInventoryDialog.vue_vue_type_script_setup_true_lang-BB8UIIsW.js → ProductInventoryDialog.vue_vue_type_script_setup_true_lang-Bzb3RrMg.js} +1 -1
  33. package/dist/ProductList.vue_vue_type_script_setup_true_lang-BwKQESr3.js +2765 -0
  34. package/dist/{ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-BMDSkfcn.js → ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-CDYcHXo1.js} +1 -1
  35. package/dist/{Products-Cn6j1DOQ.js → Products-B8tysOAL.js} +3 -3
  36. package/dist/Publish-DTvOvFNa.js +1337 -0
  37. package/dist/Recipe-Ddx31csF.js +388 -0
  38. package/dist/{Scheduler-DlaSVACJ.js → Scheduler-CST5L_cw.js} +314 -254
  39. package/dist/ServingSequence-DYyEZI2S.js +374 -0
  40. package/dist/{Setting-CyCp2uw4.js → Setting-Ip0pGjks.js} +6 -6
  41. package/dist/Subcategory-BIgjzVta.js +459 -0
  42. package/dist/{Takeaway-sVVykWDg.js → Takeaway-CekhGM-m.js} +2 -2
  43. package/dist/{Takeaway-tYHCAXYU.js → Takeaway-aXsPg4JT.js} +5 -5
  44. package/dist/{TakeawayList.vue_vue_type_script_setup_true_lang-CV24v8Zg.js → TakeawayList.vue_vue_type_script_setup_true_lang-CaRR4_j3.js} +4 -4
  45. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CshqYpc9.js +1291 -0
  46. package/dist/Unit-BMW8u0Us.js +424 -0
  47. package/dist/{Variant-BNnR5rLv.js → Variant-CZsrYRMU.js} +5 -5
  48. package/dist/{_id_-a9ZtdjtT.js → _id_-D4swrvNa.js} +3 -3
  49. package/dist/{app-CmElp8cO.js → app-BWwwHsWi.js} +337 -337
  50. package/dist/app.js +1 -1
  51. package/dist/apps/mf-menu/src/app.d.ts +80 -0
  52. package/dist/apps/mf-menu/src/components/PriceTier/LinkPriceTierSection.vue.d.ts +9 -0
  53. package/dist/apps/mf-menu/src/components/Product/BulkCategorySelect.vue.d.ts +37 -0
  54. package/dist/apps/mf-menu/src/components/Product/ProductAttributeFilter.vue.d.ts +11 -1
  55. package/dist/apps/mf-menu/src/components/ProductList.vue.d.ts +2 -2
  56. package/dist/apps/mf-menu/src/components/feature/NestedGroupManager/NestedGroupOverrideSheets.vue.d.ts +27 -0
  57. package/dist/apps/mf-menu/src/components/feature/RestaurantAttributesFilter.vue.d.ts +20 -0
  58. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  59. package/dist/assets/{menu-compute-B_wpWLAj.js → menu-compute-D7TdiHt4.js} +4 -4
  60. package/dist/assets/{validate-menu-DjxNxUxH.js → validate-menu-DXppWUVq.js} +2 -2
  61. package/dist/mf-menu-portal.css +1 -1
  62. package/dist/{provide-BJRbSauL.js → provide-CDmXzkhz.js} +67539 -65978
  63. package/dist/{useActionFeedback-89GwO41T.js → useActionFeedback-Dm2HDa_2.js} +1 -1
  64. package/dist/{FormSection.vue_vue_type_script_setup_true_lang-pY-_msnM.js → vuedraggable-CBtQLb_S.js} +140 -139
  65. package/package.json +2 -2
  66. package/dist/CatalogEditor.vue_vue_type_script_setup_true_lang-Byp1db9_.js +0 -484
  67. package/dist/CategoryList.vue_vue_type_script_setup_true_lang-CrHYjrTn.js +0 -797
  68. package/dist/GroupList.vue_vue_type_script_setup_true_lang-CWr52_a-.js +0 -2183
  69. package/dist/Ingredient-BMAlctE4.js +0 -463
  70. package/dist/LinkProductSideSheet.vue_vue_type_script_setup_true_lang-CR99740r.js +0 -709
  71. package/dist/OrderPacing-Bz5kn6DY.js +0 -698
  72. package/dist/PrintRoute-BnARWdR2.js +0 -473
  73. package/dist/ProductChipSummary.vue_vue_type_script_setup_true_lang-D8DygCBl.js +0 -110
  74. package/dist/ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-DryxrG-x.js +0 -1257
  75. package/dist/ProductList.vue_vue_type_script_setup_true_lang-BDnTs366.js +0 -10353
  76. package/dist/Publish-BPJhG39B.js +0 -1261
  77. package/dist/Recipe-mt1vec5-.js +0 -350
  78. package/dist/ServingSequence-Cr1REWZP.js +0 -336
  79. package/dist/Subcategory-kuB7gYvc.js +0 -412
  80. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Dz-Chgek.js +0 -1213
  81. package/dist/Unit-BSOvZxRy.js +0 -385
  82. package/dist/apps/mf-menu/src/views/MenuManagementEditor/RestaurantAttributesFilter.vue.d.ts +0 -2
@@ -1,473 +0,0 @@
1
- import { defineComponent as B, resolveComponent as _, openBlock as u, createElementBlock as y, createVNode as n, withCtx as m, createElementVNode as i, toDisplayString as b, createBlock as k, Fragment as I, renderList as W, createCommentVNode as A, computed as p, ref as $, shallowRef as O, onUnmounted as ve, h as F, withModifiers as G, unref as a, mergeProps as fe } from "vue";
2
- import { useI18n as ge } from "@feedmepos/mf-common";
3
- import { useDialog as ye, components as z } from "@feedmepos/ui-library";
4
- import { _ as q } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
5
- import { _ as ke } from "./LinkProductSideSheet.vue_vue_type_script_setup_true_lang-CR99740r.js";
6
- import { _ as H } from "./FormSection.vue_vue_type_script_setup_true_lang-pY-_msnM.js";
7
- import { _ as be } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
8
- import { u as he } from "./useActionFeedback-89GwO41T.js";
9
- import { u as we } from "./useEditorValidation-Ctef5Bxt.js";
10
- import { b as Ce, u as J, a as Fe } from "./provide-BJRbSauL.js";
11
- const xe = { class: "fm-typo-en-body-lg-600" }, Pe = { class: "fm-typo-en-body-lg-600" }, Se = { class: "fm-typo-en-body-md-400" }, Ve = /* @__PURE__ */ B({
12
- __name: "RemoveRouteConfirmation",
13
- props: {
14
- row: {}
15
- },
16
- setup(V) {
17
- return (l, t) => {
18
- const h = _("i18n-t"), x = _("FmIcon"), w = _("FmListItem"), v = _("FmList");
19
- return u(), y("div", null, [
20
- n(h, {
21
- keypath: l.row.linkedProductCount > 0 ? "menu.print_route.dialogs.remove.message.with_products" : "menu.print_route.dialogs.remove.message.confirm",
22
- scope: "global",
23
- tag: "p"
24
- }, {
25
- count: m(() => [
26
- i("span", xe, b(l.row.linkedProductCount), 1)
27
- ]),
28
- name: m(() => [
29
- i("span", Pe, b(l.row.name), 1)
30
- ]),
31
- _: 1
32
- }, 8, ["keypath"]),
33
- l.row.linkedProductCount > 0 ? (u(), k(v, {
34
- key: 0,
35
- class: "mt-8"
36
- }, {
37
- default: m(() => [
38
- (u(!0), y(I, null, W(l.row.linkedProductNames, (s) => (u(), k(w, {
39
- key: s,
40
- class: "!p-0 !gap-4 mt-4",
41
- clickable: !1
42
- }, {
43
- prepend: m(() => [
44
- n(x, {
45
- color: "neutral-gray-900",
46
- name: "fiber_manual_record",
47
- size: "sm"
48
- })
49
- ]),
50
- default: m(() => [
51
- i("span", Se, b(s), 1)
52
- ]),
53
- _: 2
54
- }, 1024))), 128))
55
- ]),
56
- _: 1
57
- })) : A("", !0)
58
- ]);
59
- };
60
- }
61
- }), Le = { class: "flex flex-1 justify-end" }, De = {
62
- key: 0,
63
- class: "flex flex-col gap-16 items-start"
64
- }, Re = {
65
- class: "text-fm-color-typo-secondary",
66
- role: "alert"
67
- }, $e = {
68
- key: 1,
69
- "data-menu-state": "unavailable"
70
- }, ze = { class: "flex justify-end items-center" }, Ie = { class: "w-[320px]" }, Ae = { class: "fm-typo-en-title-md-600" }, Be = { class: "flex flex-col gap-32 pb-16" }, Ee = { class: "space-y-16" }, Ue = { class: "flex items-center gap-8" }, Me = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ne = { class: "flex gap-8 items-center justify-start" }, je = /* @__PURE__ */ B({
71
- __name: "PrintRouteList",
72
- props: {
73
- sdk: {}
74
- },
75
- setup(V) {
76
- const l = V, { t } = ge(), h = Ce(), x = ye(), { run: w } = he(), v = J(
77
- l.sdk.printDepartment.list
78
- ), s = p(
79
- () => v.value.status === "ready" ? v.value.value : null
80
- ), X = p(() => {
81
- var e;
82
- return ((e = s.value) == null ? void 0 : e.query) ?? "";
83
- }), Y = p(() => {
84
- var e;
85
- return [...((e = s.value) == null ? void 0 : e.rows) ?? []];
86
- }), g = $(!1), P = $(!1), L = $(!1);
87
- async function Z() {
88
- L.value = !0;
89
- try {
90
- await w(() => l.sdk.printDepartment.retryRead(), {
91
- showLoading: !1
92
- });
93
- } finally {
94
- L.value = !1;
95
- }
96
- }
97
- const E = J(
98
- l.sdk.linkProduct.catalogue
99
- ), ee = p(
100
- () => E.value.status === "ready" ? E.value.value : null
101
- ), te = p(
102
- () => {
103
- var e;
104
- return ((e = c.value) == null ? void 0 : e.linkedProductIds) ?? [];
105
- }
106
- ), ae = p(() => {
107
- var e;
108
- return ((e = c.value) == null ? void 0 : e.linkedGroups) ?? [];
109
- }), oe = p(
110
- () => {
111
- var e;
112
- return ((e = c.value) == null ? void 0 : e.linkedProductQuery) ?? "";
113
- }
114
- ), ne = p(
115
- () => {
116
- var e;
117
- return ((e = c.value) == null ? void 0 : e.linkedProductCount) ?? 0;
118
- }
119
- );
120
- function le(e) {
121
- return [
122
- {
123
- accessorKey: "name",
124
- enableSorting: !1,
125
- header: () => e.isSynthetic ? t("menu.tree_editor.labels.addon") : e.name
126
- },
127
- {
128
- id: "actions",
129
- enableSorting: !1,
130
- header: "",
131
- cell: (r) => F("div", { class: "flex justify-end" }, [
132
- F(z.FmButton, {
133
- icon: "delete",
134
- variant: "tertiary",
135
- textColor: "neutral-gray-400",
136
- "aria-label": t("menu.common.actions.remove"),
137
- onClick: G(
138
- () => d.value.unlinkProduct(r.row.original.id),
139
- ["stop", "prevent"]
140
- )
141
- })
142
- ])
143
- }
144
- ];
145
- }
146
- const d = O(
147
- l.sdk.printDepartment.editor()
148
- ), C = O(
149
- d.value.get()
150
- );
151
- let D = d.value.subscribe(
152
- (e) => C.value = e
153
- );
154
- const c = p(
155
- () => C.value.status === "ready" ? C.value.value : null
156
- ), R = we(() => d.value), U = p(
157
- () => c.value ? R.issue(c.value.fieldIssues, "name") : null
158
- );
159
- function M(e) {
160
- D(), d.value.dispose(), d.value = l.sdk.printDepartment.editor(e), C.value = d.value.get(), D = d.value.subscribe(
161
- (r) => C.value = r
162
- );
163
- }
164
- ve(() => {
165
- l.sdk.printDepartment.search(""), D(), d.value.dispose();
166
- });
167
- function N() {
168
- !s.value || s.value.create.state !== "allowed" || (M(), g.value = !0);
169
- }
170
- function se(e) {
171
- M(e.id), g.value = !0;
172
- }
173
- function j() {
174
- g.value = !1;
175
- }
176
- function re() {
177
- var e;
178
- if (!((e = c.value) != null && e.dirty)) {
179
- g.value = !1;
180
- return;
181
- }
182
- x.open({
183
- title: t("menu.common.dialog.dismiss.title"),
184
- message: t("menu.common.dialog.dismiss.message"),
185
- primaryActions: {
186
- text: t("menu.common.dialog.dismiss.discard"),
187
- close: !0
188
- },
189
- secondaryActions: {
190
- text: t("menu.common.actions.cancel"),
191
- close: !0
192
- }
193
- }).onPrimary(() => {
194
- g.value = !1;
195
- });
196
- }
197
- async function ie() {
198
- var f;
199
- const e = ((f = c.value) == null ? void 0 : f.name.trim()) ?? "";
200
- (await w(
201
- () => R.submit(() => d.value.submit()),
202
- {
203
- // Legacy's success copy is "<name> saved" for both create and update; the
204
- // frozen baseline asserts that text, so it is not restyled here.
205
- successMessage: t("menu.print_route.manager.action.saved", {
206
- name: e
207
- }),
208
- // `submit()` publishes `submitting` synchronously only when it will
209
- // actually issue a request; a required-field, duplicate-name or
210
- // not-found refusal is decided locally and sends nothing. The frozen
211
- // `printDepartment/{create,update}/empty-name` groups record the inline
212
- // "Required" message and no snackbar at all, so the spinner must not
213
- // flash for them.
214
- showLoading: () => {
215
- var S;
216
- return ((S = c.value) == null ? void 0 : S.status) === "submitting";
217
- }
218
- }
219
- )).kind === "success" && j();
220
- }
221
- function ue(e) {
222
- x.open({
223
- title: t("menu.print_route.dialogs.remove.title"),
224
- contentComponent: F(Ve, { row: e }),
225
- primaryActions: {
226
- text: t("menu.print_route.actions.remove"),
227
- close: !0,
228
- variant: "destructive"
229
- },
230
- secondaryActions: {
231
- text: t("menu.print_route.actions.cancel"),
232
- close: !0
233
- }
234
- }).onPrimary(async () => {
235
- await w(() => l.sdk.printDepartment.remove(e.id), {
236
- successMessage: t("menu.print_route.manager.action.removed", {
237
- name: e.name
238
- })
239
- });
240
- });
241
- }
242
- const de = p(() => [
243
- {
244
- accessorKey: "name",
245
- header: () => t("menu.print_route.table.columns.name"),
246
- cell: (e) => e.getValue(),
247
- enableSorting: !1
248
- },
249
- {
250
- accessorKey: "linkedProductCount",
251
- header: () => t("menu.print_route.table.columns.products"),
252
- cell: (e) => t("menu.print_route.table.columns.products_count", {
253
- count: e.getValue()
254
- }),
255
- enableSorting: !1
256
- },
257
- {
258
- accessorKey: "id",
259
- header: () => "",
260
- size: 52,
261
- meta: { cellClass: "pl-16", headerContentClass: "-mx-16" },
262
- enableSorting: !1,
263
- cell: (e) => F("div", { class: "flex justify-end" }, [
264
- F(z.FmButton, {
265
- icon: "delete",
266
- textColor: "neutral-gray-400",
267
- variant: "tertiary",
268
- disabled: e.row.original.remove.state !== "allowed",
269
- "aria-label": t("menu.print_route.actions.remove"),
270
- onClick: G(
271
- () => ue(e.row.original),
272
- ["stop", "prevent"]
273
- )
274
- })
275
- ])
276
- }
277
- ]);
278
- function ce(e) {
279
- d.value.setLinkedProducts(e), P.value = !1;
280
- }
281
- return (e, r) => {
282
- const f = _("FmButton"), S = _("FmCircularProgress"), K = _("FmSearch"), Q = _("FmTable"), me = _("FmTextField"), pe = _("FmSpacer"), _e = _("FmSideSheet");
283
- return u(), k(be, {
284
- heading: a(t)("menu.print_route.title")
285
- }, {
286
- "append-heading": m(() => [
287
- i("div", Le, [
288
- s.value && s.value.totalCount > 0 ? (u(), k(f, {
289
- key: 0,
290
- disabled: s.value.create.state !== "allowed",
291
- label: a(t)("menu.print_route.actions.add"),
292
- "prepend-icon": "add",
293
- variant: "primary",
294
- onClick: N
295
- }, null, 8, ["disabled", "label"])) : A("", !0)
296
- ])
297
- ]),
298
- default: m(() => [
299
- a(v).status === "error" ? (u(), y("div", De, [
300
- i("p", Re, b(a(h)(a(v).error.message)), 1),
301
- n(f, {
302
- label: a(t)("menu.common.actions.retry"),
303
- loading: L.value,
304
- "prepend-icon": "refresh",
305
- size: "md",
306
- variant: "secondary",
307
- onClick: Z
308
- }, null, 8, ["label", "loading"])
309
- ])) : a(v).status === "unavailable" ? (u(), y("div", $e, [
310
- n(a(q), {
311
- subtitle: a(t)("menu.print_route.empty.subtitle"),
312
- title: a(t)("menu.print_route.empty.title")
313
- }, null, 8, ["subtitle", "title"])
314
- ])) : a(v).status === "loading" ? (u(), k(S, { key: 2 })) : s.value && s.value.totalCount === 0 ? (u(), k(a(q), {
315
- key: 3,
316
- action: s.value.create.state === "allowed" ? { text: a(t)("menu.print_route.empty.action"), callback: N } : void 0,
317
- subtitle: a(t)("menu.print_route.empty.subtitle"),
318
- title: a(t)("menu.print_route.empty.title")
319
- }, null, 8, ["action", "subtitle", "title"])) : s.value ? (u(), y(I, { key: 4 }, [
320
- i("div", ze, [
321
- i("div", Ie, [
322
- n(K, {
323
- autofocus: "",
324
- class: "my-8",
325
- "model-value": X.value,
326
- placeholder: a(t)("menu.print_route.table.search.placeholder"),
327
- "onUpdate:modelValue": l.sdk.printDepartment.search
328
- }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])
329
- ])
330
- ]),
331
- n(Q, {
332
- "column-defs": de.value,
333
- "page-size": s.value.rows.length,
334
- "row-data": Y.value,
335
- "shrink-at": !1,
336
- "hide-footer": "",
337
- "pin-header-row": "",
338
- onRowClick: r[0] || (r[0] = (o) => se(o.original))
339
- }, null, 8, ["column-defs", "page-size", "row-data"])
340
- ], 64)) : A("", !0),
341
- n(_e, {
342
- modelValue: g.value,
343
- "onUpdate:modelValue": r[3] || (r[3] = (o) => g.value = o),
344
- "is-container": a(z).FmForm,
345
- "is-container-props": { onValidationSuccess: ie },
346
- "max-width": 560,
347
- "onOn:clickedAway": re
348
- }, {
349
- "side-sheet-header": m(() => {
350
- var o;
351
- return [
352
- i("p", Ae, b(((o = c.value) == null ? void 0 : o.mode) === "update" ? a(t)("menu.print_route.department_dialog.update.title") : a(t)("menu.print_route.department_dialog.add.title")), 1)
353
- ];
354
- }),
355
- "side-sheet-footer": m(() => {
356
- var o, T;
357
- return [
358
- i("div", Ne, [
359
- n(f, {
360
- disabled: ((o = c.value) == null ? void 0 : o.submit.state) !== "allowed",
361
- label: ((T = c.value) == null ? void 0 : T.mode) === "update" ? a(t)("menu.print_route.department_dialog.update.action") : a(t)("menu.print_route.department_dialog.add.action"),
362
- size: "lg",
363
- type: "submit",
364
- variant: "primary"
365
- }, null, 8, ["disabled", "label"]),
366
- n(f, {
367
- label: a(t)("menu.print_route.department_dialog.actions.cancel"),
368
- size: "lg",
369
- variant: "tertiary",
370
- onClick: j
371
- }, null, 8, ["label"])
372
- ])
373
- ];
374
- }),
375
- default: m(() => [
376
- i("div", Be, [
377
- n(H, {
378
- title: a(t)("menu.print_route.department_dialog.sections.route_detail.title")
379
- }, {
380
- default: m(() => {
381
- var o;
382
- return [
383
- n(me, fe({
384
- autofocus: "",
385
- "error-messages": U.value ? [a(h)(U.value)] : [],
386
- label: a(t)(
387
- "menu.print_route.department_dialog.sections.route_detail.name.label"
388
- ),
389
- "model-value": ((o = c.value) == null ? void 0 : o.name) ?? "",
390
- placeholder: a(t)(
391
- "menu.print_route.department_dialog.sections.route_detail.name.placeholder"
392
- )
393
- }, a(R).field("name", d.value.setName)), null, 16, ["error-messages", "label", "model-value", "placeholder"])
394
- ];
395
- }),
396
- _: 1
397
- }, 8, ["title"]),
398
- n(H, {
399
- title: a(t)("menu.print_route.department_dialog.sections.link_product.title")
400
- }, {
401
- "append-title": m(() => [
402
- n(pe),
403
- n(f, {
404
- label: a(t)(
405
- "menu.print_route.department_dialog.sections.link_product.link"
406
- ),
407
- "border-color": "primary",
408
- "prepend-icon": "link",
409
- "text-color": "primary",
410
- variant: "secondary",
411
- onClick: r[1] || (r[1] = (o) => P.value = !0)
412
- }, null, 8, ["label"])
413
- ]),
414
- default: m(() => [
415
- i("div", Ee, [
416
- i("div", Ue, [
417
- i("p", Me, b(a(t)(
418
- "menu.print_route.department_dialog.sections.link_product.products_linked",
419
- { count: ne.value }
420
- )), 1),
421
- n(K, {
422
- class: "flex-1",
423
- "model-value": oe.value,
424
- placeholder: a(t)(
425
- "menu.print_route.department_dialog.sections.link_product.search"
426
- ),
427
- "onUpdate:modelValue": r[2] || (r[2] = (o) => d.value.setLinkedProductQuery(String(o ?? "")))
428
- }, null, 8, ["model-value", "placeholder"])
429
- ]),
430
- i("div", null, [
431
- (u(!0), y(I, null, W(ae.value, (o) => (u(), y("div", {
432
- key: o.id ?? ""
433
- }, [
434
- n(Q, {
435
- "column-defs": le(o),
436
- "hide-footer": "",
437
- "page-size": o.products.length,
438
- "row-data": [...o.products],
439
- "shrink-at": !1
440
- }, null, 8, ["column-defs", "page-size", "row-data"])
441
- ]))), 128))
442
- ])
443
- ])
444
- ]),
445
- _: 1
446
- }, 8, ["title"])
447
- ])
448
- ]),
449
- _: 1
450
- }, 8, ["modelValue", "is-container", "is-container-props"]),
451
- n(ke, {
452
- modelValue: P.value,
453
- "onUpdate:modelValue": r[4] || (r[4] = (o) => P.value = o),
454
- catalogue: ee.value,
455
- "selected-product-ids": te.value,
456
- title: a(t)("menu.print_route.department_dialog.sections.link_product.title"),
457
- onSubmit: ce
458
- }, null, 8, ["modelValue", "catalogue", "selected-product-ids", "title"])
459
- ]),
460
- _: 1
461
- }, 8, ["heading"]);
462
- };
463
- }
464
- }), Ye = /* @__PURE__ */ B({
465
- __name: "PrintRoute",
466
- setup(V) {
467
- const l = Fe();
468
- return (t, h) => (u(), k(je, { sdk: a(l) }, null, 8, ["sdk"]));
469
- }
470
- });
471
- export {
472
- Ye as default
473
- };
@@ -1,110 +0,0 @@
1
- import { defineComponent as V, computed as p, ref as j, resolveComponent as f, openBlock as a, createBlock as u, withCtx as r, createElementVNode as o, createElementBlock as i, Fragment as x, renderList as h, toDisplayString as d, createTextVNode as E, unref as k, createCommentVNode as _, withModifiers as L } from "vue";
2
- import { useI18n as S } from "@feedmepos/mf-common";
3
- import { useBreakpoints as z } from "@feedmepos/ui-library";
4
- const D = { class: "flex flex-wrap gap-8 min-w-0 max-w-full" }, I = { class: "fm-typo-en-body-md-600 truncate" }, M = { class: "py-12 px-16 space-y-12" }, P = { class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-600" }, $ = { class: "flex flex-wrap gap-8" }, q = { class: "fm-typo-en-body-md-600 break-words min-w-0" }, A = {
5
- key: 1,
6
- class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
7
- }, G = { key: 0 }, H = {
8
- key: 1,
9
- class: "inline-block w-8"
10
- }, Q = /* @__PURE__ */ V({
11
- __name: "ProductChipSummary",
12
- props: {
13
- kind: {},
14
- chips: {}
15
- },
16
- setup(w) {
17
- const b = w, { t: l } = S(), c = p(
18
- () => b.kind === "category" ? {
19
- column: l("menu.product.table.columns.category"),
20
- all: l("menu.product.table.category.all"),
21
- expand: (e) => l("menu.product.table.category.expand", { count: e }),
22
- collapse: l("menu.product.table.category.collapse")
23
- } : {
24
- column: l("menu.product.table.columns.tagging"),
25
- all: l("menu.product.table.tagging.all"),
26
- expand: (e) => l("menu.product.table.tagging.expand", { count: e }),
27
- collapse: l("menu.product.table.tagging.collapse")
28
- }
29
- ), C = (e) => b.kind === "tagging" ? l("menu.common.labels.a11y_labelled_name", {
30
- label: e.key,
31
- name: e.label
32
- }) : e.label, F = z(), g = p(() => F.breakpoints.value.xs), m = j(!0), y = p(() => g.value ? 1 : 2), v = p(() => b.chips.slice(0, y.value)), B = p(() => {
33
- const e = l("menu.catalog.list_separator");
34
- if (!m.value)
35
- return b.chips.map((t) => t.label).join(e);
36
- const n = v.value.map((t) => t.label).join(e);
37
- return n.length > 20 ? n.slice(0, 20) + l("menu.common.labels.truncation_suffix") : n;
38
- });
39
- return (e, n) => {
40
- const t = f("FmChip"), N = f("FmTooltip"), T = f("FmButton");
41
- return g.value ? e.chips.length ? (a(), i("p", A, [
42
- o("span", null, d(k(l)("menu.common.labels.a11y_labelled_name", {
43
- label: c.value.column,
44
- name: B.value
45
- })), 1),
46
- m.value ? (a(), i("span", H)) : (a(), i("br", G)),
47
- e.chips.length > y.value ? (a(), u(T, {
48
- key: 2,
49
- variant: "plain",
50
- class: "!p-0 fm-typo-en-body-md-400 text-fm-color-primary",
51
- label: m.value ? c.value.expand(e.chips.length - y.value) : c.value.collapse,
52
- onClick: n[0] || (n[0] = L((s) => m.value = !m.value, ["stop", "prevent"]))
53
- }, null, 8, ["label"])) : _("", !0)
54
- ])) : _("", !0) : (a(), u(N, {
55
- key: 0,
56
- class: "flex min-w-0 max-w-full",
57
- variant: "rich",
58
- placement: "top",
59
- "z-index": 50
60
- }, {
61
- content: r(() => [
62
- o("div", M, [
63
- o("p", P, d(c.value.all), 1),
64
- o("div", $, [
65
- (a(!0), i(x, null, h(e.chips, (s) => (a(), u(t, {
66
- key: s.key,
67
- compact: "",
68
- class: "max-w-full !h-auto min-h-[22px] !px-4 py-2"
69
- }, {
70
- default: r(() => [
71
- o("span", q, d(C(s)), 1)
72
- ]),
73
- _: 2
74
- }, 1024))), 128))
75
- ])
76
- ])
77
- ]),
78
- default: r(() => [
79
- o("div", D, [
80
- (a(!0), i(x, null, h(v.value, (s) => (a(), u(t, {
81
- key: s.key,
82
- compact: "",
83
- class: "max-w-full !px-4"
84
- }, {
85
- default: r(() => [
86
- o("span", I, d(s.label), 1)
87
- ]),
88
- _: 2
89
- }, 1024))), 128)),
90
- e.chips.length > y.value ? (a(), u(t, {
91
- key: 0,
92
- compact: "",
93
- class: "fm-typo-en-body-md-600 !px-4",
94
- "aria-label": c.value.all
95
- }, {
96
- default: r(() => [
97
- E(d(k(l)("menu.common.labels.truncation_suffix")), 1)
98
- ]),
99
- _: 1
100
- }, 8, ["aria-label"])) : _("", !0)
101
- ])
102
- ]),
103
- _: 1
104
- }));
105
- };
106
- }
107
- });
108
- export {
109
- Q as _
110
- };