@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,698 +0,0 @@
1
- import { defineComponent as K, resolveComponent as b, openBlock as c, createElementBlock as y, createElementVNode as d, toDisplayString as k, unref as n, createVNode as i, withCtx as u, Fragment as A, renderList as ee, createBlock as C, createCommentVNode as V, computed as g, ref as z, shallowRef as Y, h as v, withModifiers as N, onUnmounted as we } from "vue";
2
- import { useI18n as ae } from "@feedmepos/mf-common";
3
- import { useDialog as Pe, components as S, FmButtonColorThemeVariant as T } from "@feedmepos/ui-library";
4
- import { _ as Ce } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
5
- import { _ as xe } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-C9OSr8ft.js";
6
- import { _ as Fe } from "./OrderPacingFields.vue_vue_type_script_setup_true_lang-NCH-SrZU.js";
7
- import { _ as Se } from "./LinkProductSideSheet.vue_vue_type_script_setup_true_lang-CR99740r.js";
8
- import { _ as Ve } from "./FormSection.vue_vue_type_script_setup_true_lang-pY-_msnM.js";
9
- import { _ as Le } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
10
- import { _ as $e } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-B0j2PNih.js";
11
- import { u as De } from "./useActionFeedback-89GwO41T.js";
12
- import { u as Ue } from "./useEditorValidation-Ctef5Bxt.js";
13
- import { b as ze, u as Z, a as Ie } from "./provide-BJRbSauL.js";
14
- const Ne = {
15
- key: 0,
16
- class: "mt-4"
17
- }, Te = { class: "text-fm-color-typo-secondary mb-2" }, Ee = { class: "fm-typo-en-body-md-400 leading-5 text-fm-color-typo-secondary" }, Be = /* @__PURE__ */ K({
18
- __name: "DeleteOrderPacingConfirmation",
19
- props: {
20
- name: {},
21
- linkedProductNames: {}
22
- },
23
- setup(E) {
24
- const { t: m } = ae();
25
- return (a, B) => {
26
- const O = b("FmIcon"), I = b("FmListItem"), w = b("FmList");
27
- return c(), y("div", null, [
28
- d("p", null, k(n(m)("menu.order_pacing.dialogs.delete.message", { name: a.name })), 1),
29
- a.linkedProductNames.length > 0 ? (c(), y("div", Ne, [
30
- d("p", Te, k(n(m)("menu.order_pacing.dialogs.delete.unlink_warning", {
31
- count: a.linkedProductNames.length
32
- })), 1),
33
- i(w, { class: "mt-8" }, {
34
- default: u(() => [
35
- (c(!0), y(A, null, ee(a.linkedProductNames, (_) => (c(), C(I, {
36
- key: _,
37
- class: "!p-0 !gap-4",
38
- clickable: !1
39
- }, {
40
- prepend: u(() => [
41
- i(O, {
42
- color: "typo-secondary",
43
- name: "fiber_manual_record",
44
- size: "sm"
45
- })
46
- ]),
47
- default: u(() => [
48
- d("span", Ee, k(_), 1)
49
- ]),
50
- _: 2
51
- }, 1024))), 128))
52
- ]),
53
- _: 1
54
- })
55
- ])) : V("", !0)
56
- ]);
57
- };
58
- }
59
- }), Oe = {
60
- key: 0,
61
- class: "flex-1 flex justify-between gap-8 pl-8"
62
- }, Me = { class: "flex items-center" }, je = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Re = { class: "fm-typo-en-body-md-600 font-semibold" }, Ae = {
63
- key: 0,
64
- class: "flex flex-col items-start gap-8"
65
- }, Ke = {
66
- role: "alert",
67
- class: "text-fm-color-typo-secondary"
68
- }, qe = { class: "flex justify-end items-center" }, Qe = { class: "w-[320px]" }, Ge = { class: "fm-typo-en-title-md-600" }, He = { class: "flex flex-col gap-32 h-full min-h-0 py-16" }, Je = { class: "py-12 px-16 space-y-4" }, We = { key: 0 }, Xe = { class: "flex-shrink-0" }, Ye = { class: "flex gap-8 items-center justify-start" }, Ze = { class: "fm-typo-en-title-md-600" }, ea = { class: "flex-shrink-0" }, aa = { class: "flex gap-8 items-center justify-start" }, ta = /* @__PURE__ */ K({
69
- __name: "OrderPacingList",
70
- props: {
71
- sdk: {}
72
- },
73
- setup(E) {
74
- const m = E, { t: a, n: B } = ae(), O = ze(), I = Pe(), { run: w } = De(), _ = Z(m.sdk.orderPacing.list), p = g(
75
- () => _.value.status === "ready" ? _.value.value : null
76
- ), q = g(() => {
77
- var e;
78
- return ((e = p.value) == null ? void 0 : e.query) ?? "";
79
- }), te = g(() => {
80
- var e;
81
- return [...((e = p.value) == null ? void 0 : e.rows) ?? []];
82
- }), x = z(!1), L = z(!1), F = z(!1), M = z(!1);
83
- async function ne() {
84
- M.value = !0;
85
- try {
86
- await w(() => m.sdk.orderPacing.retryRead(), {
87
- showLoading: !1
88
- });
89
- } finally {
90
- M.value = !1;
91
- }
92
- }
93
- const Q = Z(
94
- m.sdk.linkProduct.catalogue
95
- ), oe = g(
96
- () => Q.value.status === "ready" ? Q.value.value : null
97
- ), r = Y(
98
- m.sdk.orderPacing.editor()
99
- ), $ = Y(
100
- r.value.get()
101
- );
102
- let j = r.value.subscribe((e) => {
103
- $.value = e;
104
- });
105
- const l = g(
106
- () => $.value.status === "ready" ? $.value.value : null
107
- ), G = Ue(() => r.value), le = g(() => {
108
- var e;
109
- return [
110
- ...((e = l.value) == null ? void 0 : e.linkedProducts) ?? []
111
- ];
112
- }), re = g(
113
- () => {
114
- var e;
115
- return ((e = l.value) == null ? void 0 : e.linkedProductIds) ?? [];
116
- }
117
- );
118
- function se(e) {
119
- var t, s;
120
- return ((s = (t = l.value) == null ? void 0 : t.supportedLocales.find(
121
- (h) => h.code === e
122
- )) == null ? void 0 : s.name) ?? e;
123
- }
124
- function ie() {
125
- var e;
126
- ((e = l.value) == null ? void 0 : e.translation.state) === "allowed" && (r.value.beginTranslationEdit(), F.value = !0);
127
- }
128
- function de() {
129
- r.value.saveTranslationEdit(), F.value = !1;
130
- }
131
- function H() {
132
- r.value.discardTranslationEdit(), F.value = !1;
133
- }
134
- function R(e) {
135
- j(), r.value.dispose(), r.value = m.sdk.orderPacing.editor(e), $.value = r.value.get(), j = r.value.subscribe((t) => {
136
- $.value = t;
137
- });
138
- }
139
- function J() {
140
- var e;
141
- ((e = p.value) == null ? void 0 : e.create.state) === "allowed" && (R(), F.value = !1, x.value = !0);
142
- }
143
- function ue(e) {
144
- R(e.id), F.value = !1, x.value = !0;
145
- }
146
- async function ce() {
147
- var s;
148
- const e = ((s = l.value) == null ? void 0 : s.name.trim()) ?? "";
149
- (await w(
150
- () => G.submit(() => r.value.submit()),
151
- {
152
- // The inline field rules are decided in the SDK with no round trip, and
153
- // the frozen `create/validation-name` frame shows the sheet with no
154
- // loading indicator — so a rejected submit must not flash one.
155
- showLoading: () => {
156
- var h;
157
- return ((h = l.value) == null ? void 0 : h.status) === "submitting";
158
- },
159
- successMessage: a("menu.order_pacing.form.saved", {
160
- name: e || a("menu.order_pacing.title")
161
- })
162
- }
163
- )).kind === "success" && (x.value = !1);
164
- }
165
- function me(e) {
166
- if (e.remove.state !== "allowed") return;
167
- const t = m.sdk.orderPacing.describeDelete(e.id);
168
- t && I.open({
169
- title: a("menu.order_pacing.dialogs.delete.title"),
170
- // Both sentences come from the SDK's view model: the names of the
171
- // products that will be unlinked are a join over the aggregate, and
172
- // resolving them here would be the per-feature derivation ADR-0002 §3
173
- // forbids. The warning is a warning only — the delete always commits
174
- // and cascades, and there is no referenced-delete guard to migrate.
175
- // A COMPONENT, not a `message` string. The body is three blocks — the
176
- // question, a secondary warning line and a bulleted list of the
177
- // products about to be unlinked — and joining them with '\n' renders
178
- // one collapsed paragraph, because the dialog puts the string into HTML
179
- // where a newline is whitespace. The frozen golden
180
- // `serveDelay/delete/confirm-linked` is 560x244; the collapsed string
181
- // measured 560x200, which is how the visual gate caught it on
182
- // 2026-09-07. Legacy passes a `contentComponent` here too
183
- // (`portal .../manager/menu/order_pacing.ts:111-114`).
184
- contentComponent: v(Be, {
185
- name: e.name,
186
- linkedProductNames: t.linkedProductNames
187
- }),
188
- // `close: false` on purpose: two frozen pending states name `.fm-dialog`
189
- // as this module's delete pending surface, because legacy's manager
190
- // declares the same and calls `dialog.close()` only after the write
191
- // resolves (`portal .../manager/menu/order_pacing.ts:115-118,134`).
192
- // Dismissing on the click would leave the shared loading snackbar as the
193
- // only pending surface — a behaviour difference from the baseline that
194
- // nobody approved.
195
- primaryActions: {
196
- text: a("menu.common.actions.remove"),
197
- close: !1
198
- // NO `variant`, so the library's default Primary applies. Legacy's
199
- // `primaryActions` declares none either
200
- // (`portal .../manager/menu/order_pacing.ts:115-118`), and the frozen
201
- // goldens `serveDelay/delete/confirm` and `.../confirm-linked` show an
202
- // ORANGE Remove. `FmButtonVariant.Destructive` rendered it red — a
203
- // difference nobody approved, caught by the visual gate 2026-09-07.
204
- },
205
- secondaryActions: {
206
- text: a("menu.common.actions.cancel"),
207
- close: !0
208
- }
209
- }).onPrimary(async () => {
210
- await w(() => m.sdk.orderPacing.remove(e.id), {
211
- // 'removed', not 'saved': legacy's manager passes `isDelete` true and
212
- // the shared loader picks the other sentence.
213
- successMessage: a("menu.order_pacing.delete.success", {
214
- name: e.name
215
- })
216
- }), I.close();
217
- });
218
- }
219
- const pe = g(() => {
220
- var e;
221
- return ((e = p.value) == null ? void 0 : e.reorder.state) === "allowed";
222
- });
223
- function ve(e) {
224
- var s;
225
- if (((s = p.value) == null ? void 0 : s.reorder.state) !== "allowed") return;
226
- const t = e.map((h) => h.id);
227
- t.length && w(() => m.sdk.orderPacing.reorder(t), {
228
- // A rearrange carries no single entity, so legacy fed the shared
229
- // `{name} saved` template the MODULE's own title and the toast reads
230
- // "Order pacing saved". Each locale carries the whole sentence rather
231
- // than interpolating a title, because the word order of "{name} saved"
232
- // does not survive translation.
233
- successMessage: a("menu.order_pacing.reorder.success")
234
- });
235
- }
236
- const ge = g(() => [
237
- {
238
- accessorKey: "name",
239
- header: () => a("menu.order_pacing.columns.timing_label"),
240
- enableSorting: !1
241
- },
242
- {
243
- accessorKey: "delay",
244
- header: () => a("menu.order_pacing.columns.delay"),
245
- enableSorting: !1
246
- },
247
- {
248
- accessorKey: "linkedProductCount",
249
- header: () => a("menu.order_pacing.columns.items"),
250
- enableSorting: !1,
251
- // Legacy renders this cell as a dashed-underline affordance that opens the
252
- // apply-product sheet on click, stopping propagation so the row's own
253
- // click does not open the editor (`OrderPacingTable.vue:60-84`).
254
- cell: (e) => v(S.FmButton, {
255
- label: a("menu.common.labels.items_linked", {
256
- count: e.row.original.linkedProductCount
257
- }),
258
- variant: "tertiary",
259
- onClick: N(
260
- () => _e(e.row.original),
261
- ["stop", "prevent"]
262
- )
263
- })
264
- },
265
- {
266
- id: "actions",
267
- size: 52,
268
- meta: { cellClass: "pl-16", headerContentClass: "-mx-16" },
269
- header: "",
270
- cell: (e) => v("div", { class: "w-full flex justify-end items-center" }, [
271
- v(S.FmButton, {
272
- prependIcon: "delete",
273
- variant: "tertiary",
274
- textColor: "neutral-gray-400",
275
- disabled: e.row.original.remove.state !== "allowed",
276
- // The one deliberate addition to legacy's DOM, owned by the new
277
- // app: legacy's control is icon-only and unnamed, so no semantic
278
- // locator resolves against it.
279
- "aria-label": a("menu.common.actions.delete"),
280
- onClick: N(
281
- () => me(e.row.original),
282
- ["stop", "prevent"]
283
- )
284
- })
285
- ])
286
- }
287
- ]), D = z(!1);
288
- function _e(e) {
289
- R(e.id), D.value = !0;
290
- }
291
- async function fe() {
292
- var t;
293
- (await w(() => r.value.submitLinks(), {
294
- showLoading: () => {
295
- var s;
296
- return ((s = l.value) == null ? void 0 : s.status) === "submitting";
297
- },
298
- successMessage: a("menu.order_pacing.form.saved", {
299
- name: ((t = l.value) == null ? void 0 : t.name) ?? a("menu.order_pacing.title")
300
- })
301
- })).kind === "success" && (D.value = !1);
302
- }
303
- const be = g(() => [
304
- {
305
- id: "default",
306
- size: 75,
307
- enableSorting: !1,
308
- header: () => a("menu.order_pacing.link_product.table.column.default"),
309
- cell: (e) => v(S.FmCheckbox, {
310
- modelValue: e.row.original.isDefault,
311
- value: "",
312
- "aria-label": a("menu.common.labels.a11y_labelled_name", {
313
- label: a("menu.order_pacing.link_product.table.column.default"),
314
- name: e.row.original.name
315
- }),
316
- // Bound one-way from the SDK's draft and pushed back through the
317
- // editor, so the control cannot hold a state the model does not have.
318
- // Legacy's does exactly that in create mode — it renders ticked while
319
- // `isDefault: false` goes to the wire — a defect approved for fixing.
320
- "onUpdate:modelValue": (t) => r.value.setProductDefault(
321
- e.row.original.productId,
322
- t
323
- )
324
- })
325
- },
326
- {
327
- accessorKey: "name",
328
- enableSorting: !1,
329
- header: () => a("menu.order_pacing.link_product.table.column.product_name"),
330
- cell: (e) => v("span", { class: "text-wrap" }, e.row.original.name)
331
- },
332
- {
333
- accessorKey: "productCode",
334
- enableSorting: !1,
335
- header: () => a("menu.order_pacing.link_product.table.column.product_code"),
336
- cell: (e) => v("span", { class: "text-wrap" }, e.row.original.productCode ?? "")
337
- },
338
- {
339
- id: "currentDefault",
340
- enableSorting: !1,
341
- header: () => a("menu.order_pacing.link_product.table.column.current_default"),
342
- /**
343
- * RECORDED ADR-0003 §1 GAP: the library has no outlined chip.
344
- *
345
- * Legacy renders this as an OUTLINED chip — transparent ground, primary
346
- * border and primary text for a set default, grey border for "None"
347
- * (`LinkProductTable.vue:96-115`). Every `FmChip` variant is FILLED and
348
- * sets its own background plus white or black text
349
- * (`plain`→`bg-fm-color-neutral-gray-100`, `neutral`→`bg-…-black`,
350
- * `info`→`bg-…-blueberry`, `success`→mint, `critical`→salmon,
351
- * `warning`→mustard), and the union carries no primary at all
352
- * (`FmChipVariant` in the installed d.ts). So no variant can express this
353
- * control, and substituting a filled one would change the frozen goldens
354
- * for `serveDelay/update/form` and
355
- * `serveDelay/create/form-with-linked-products` — a visual difference only
356
- * a human may approve (ADR-0003 §5).
357
- *
358
- * Colours are `fm-*` tokens, not literals, so §2 holds. Replace this
359
- * with `FmChip` if the library ever ships an outlined variant.
360
- */
361
- cell: (e) => {
362
- const t = e.row.original.currentDefault;
363
- return v("div", { class: "pt-1" }, [
364
- t ? v(
365
- "span",
366
- {
367
- class: "text-fm-color-primary border border-fm-color-primary rounded-md px-8"
368
- },
369
- a("menu.order_pacing.columns.mins", { count: t.delay })
370
- ) : v(
371
- "span",
372
- {
373
- class: "text-fm-color-typo-secondary border rounded-md px-8"
374
- },
375
- a("menu.order_pacing.columns.none")
376
- )
377
- ]);
378
- }
379
- },
380
- {
381
- id: "actions",
382
- size: 40,
383
- enableSorting: !1,
384
- header: "",
385
- /**
386
- * `cellClass: ''` is load-bearing, not styling taste.
387
- *
388
- * `FmTable` falls back to `px-16` for every cell (`cellClass ?? "px-16"`
389
- * in the installed build), and this table is `table-layout: auto`, so
390
- * that 32px of padding on a 40px-wide column does not shrink the column —
391
- * it takes 27px away from the three auto-width columns beside it. Legacy
392
- * declares `meta: { cellClass: "" }` on exactly this column
393
- * (`portal .../OrderPacingManager/LinkProductTable.vue`), which is why
394
- * its columns measure 82/144/143/142/41 where ours measured
395
- * 82/134/134/134/68 — and why "Current Default" wrapped onto a second
396
- * line here and onto none in the frozen goldens. The wrap then moved
397
- * every row below it, which is the whole diff on
398
- * `serveDelay/create/link-product-picker`,
399
- * `serveDelay/create/form-with-linked-products` and
400
- * `serveDelay/update/form`.
401
- *
402
- * The button is rendered straight into the cell, as legacy renders it: a
403
- * `flex justify-end` wrapper inside an unpadded 41px column would push
404
- * the icon a pixel off the golden for no gain.
405
- */
406
- meta: { cellClass: "" },
407
- cell: (e) => v("div", {}, [
408
- v(S.FmButton, {
409
- prependIcon: "delete",
410
- variant: "tertiary",
411
- // No `textColor`, unlike the LIST table's own delete at :305.
412
- // Legacy sets none here either, so the icon takes the tertiary
413
- // default; forcing `neutral-gray-400` measured 107 against the
414
- // golden's 29 on the darkest pixel of a 17x18 glyph, and that
415
- // 200-pixel patch is over a third of what
416
- // `serveDelay/create/form-with-linked-products` still had to close.
417
- "aria-label": a("menu.common.actions.delete"),
418
- onClick: N(
419
- () => r.value.unlinkProduct(e.row.original.productId),
420
- ["stop", "prevent"]
421
- )
422
- })
423
- ])
424
- }
425
- ]);
426
- we(() => {
427
- j(), r.value.dispose(), m.sdk.orderPacing.search("");
428
- });
429
- function ye(e) {
430
- r.value.setLinkedProducts(e), L.value = !1;
431
- }
432
- return (e, t) => {
433
- const s = b("FmButton"), h = b("FmCircularProgress"), ke = b("FmSearch"), W = b("FmTable"), he = b("FmTooltip"), X = b("FmSideSheet");
434
- return c(), C(Le, {
435
- "data-visual-root": "serveDelay",
436
- heading: n(a)("menu.order_pacing.title")
437
- }, {
438
- "append-heading": u(() => [
439
- n(_).status === "ready" && p.value ? (c(), y("div", Oe, [
440
- d("div", Me, [
441
- d("div", je, [
442
- d("p", Re, k(n(B)(p.value.totalCount)), 1)
443
- ])
444
- ]),
445
- p.value.totalCount > 0 ? (c(), C(s, {
446
- key: 0,
447
- disabled: p.value.create.state !== "allowed",
448
- label: n(a)("menu.order_pacing.add"),
449
- "prepend-icon": "add",
450
- onClick: J
451
- }, null, 8, ["disabled", "label"])) : V("", !0)
452
- ])) : V("", !0)
453
- ]),
454
- default: u(() => [
455
- n(_).status === "error" ? (c(), y("div", Ae, [
456
- d("p", Ke, k(n(O)(n(_).error.message)), 1),
457
- i(s, {
458
- label: n(a)("menu.common.actions.retry"),
459
- loading: M.value,
460
- variant: "secondary",
461
- onClick: ne
462
- }, null, 8, ["label", "loading"])
463
- ])) : n(_).status === "loading" ? (c(), C(h, { key: 1 })) : p.value && p.value.rows.length === 0 && !q.value ? (c(), C(n(Ce), {
464
- key: 2,
465
- action: { text: n(a)("menu.order_pacing.add"), callback: J },
466
- title: n(a)("menu.order_pacing.empty.title"),
467
- subtitle: n(a)("menu.order_pacing.empty.subtitle")
468
- }, null, 8, ["action", "title", "subtitle"])) : p.value ? (c(), y(A, { key: 3 }, [
469
- d("div", qe, [
470
- d("div", Qe, [
471
- i(ke, {
472
- autofocus: "",
473
- class: "mb-8",
474
- "model-value": q.value,
475
- placeholder: n(a)("menu.common.labels.search_placeholder", {
476
- type: n(a)("menu.order_pacing.title")
477
- }),
478
- "onUpdate:modelValue": m.sdk.orderPacing.search
479
- }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])
480
- ])
481
- ]),
482
- i(W, {
483
- "column-defs": ge.value,
484
- "hide-footer": "",
485
- "page-size": p.value.rows.length,
486
- "pin-header-row": "",
487
- "row-data": te.value,
488
- "shrink-at": !1,
489
- draggable: pe.value,
490
- onRowClick: t[0] || (t[0] = (o) => ue(o.original)),
491
- onDndChanged: ve
492
- }, null, 8, ["column-defs", "page-size", "row-data", "draggable"])
493
- ], 64)) : V("", !0),
494
- i(X, {
495
- modelValue: x.value,
496
- "onUpdate:modelValue": t[4] || (t[4] = (o) => x.value = o),
497
- "is-container": n(S).FmForm,
498
- "is-container-props": {
499
- onValidationSuccess: ce,
500
- blameFormChildOnValidationFailed: !0
501
- },
502
- "max-width": 600
503
- }, {
504
- "side-sheet-header": u(() => {
505
- var o;
506
- return [
507
- d("p", Ge, k(((o = l.value) == null ? void 0 : o.mode) === "update" ? n(a)("menu.order_pacing.manager.dialog.update.title") : n(a)("menu.order_pacing.manager.dialog.add.title")), 1)
508
- ];
509
- }),
510
- "side-sheet-footer": u(() => {
511
- var o, f;
512
- return [
513
- d("div", Ye, [
514
- i(s, {
515
- disabled: ((o = l.value) == null ? void 0 : o.submit.state) !== "allowed",
516
- label: ((f = l.value) == null ? void 0 : f.mode) === "update" ? n(a)("menu.common.actions.update") : n(a)("menu.order_pacing.manager.dialog.add.action"),
517
- size: "lg",
518
- type: "submit",
519
- variant: "primary"
520
- }, null, 8, ["disabled", "label"]),
521
- i(s, {
522
- label: n(a)("menu.common.actions.cancel"),
523
- size: "lg",
524
- variant: "tertiary",
525
- onClick: t[3] || (t[3] = (U) => x.value = !1)
526
- }, null, 8, ["label"])
527
- ])
528
- ];
529
- }),
530
- default: u(() => [
531
- d("div", He, [
532
- i(Fe, {
533
- view: l.value,
534
- session: r.value,
535
- validation: n(G)
536
- }, {
537
- "name-append": u(() => [
538
- i(he, {
539
- variant: "plain",
540
- placement: "top",
541
- "z-index": 999
542
- }, {
543
- content: u(() => {
544
- var o, f;
545
- return [
546
- d("div", Je, [
547
- Object.keys(((o = l.value) == null ? void 0 : o.nameLocale) ?? {}).length === 0 ? (c(), y("div", We, k(n(a)("menu.common.translation.translation_label")), 1)) : V("", !0),
548
- (c(!0), y(A, null, ee((f = l.value) == null ? void 0 : f.nameLocale, (U, P) => (c(), y("div", { key: P }, k(n(a)("menu.order_pacing.translation.tooltip_value", {
549
- value: U,
550
- locale: se(P)
551
- })), 1))), 128))
552
- ])
553
- ];
554
- }),
555
- default: u(() => [
556
- i(s, {
557
- "aria-label": n(a)("menu.common.translation.translation_label"),
558
- icon: "g_translate",
559
- variant: "tertiary",
560
- onClick: ie
561
- }, null, 8, ["aria-label"])
562
- ]),
563
- _: 1
564
- })
565
- ]),
566
- _: 1
567
- }, 8, ["view", "session", "validation"]),
568
- i(Ve, {
569
- title: n(a)("menu.order_pacing.product.title"),
570
- "sub-title": n(a)("menu.order_pacing.product.subtitle")
571
- }, {
572
- "append-title": u(() => [
573
- d("div", Xe, [
574
- i(s, {
575
- "border-color": n(T).ColorPrimary,
576
- label: n(a)("menu.order_pacing.link_product.title"),
577
- "prepend-icon": "link",
578
- "text-color": n(T).ColorPrimary,
579
- variant: "secondary",
580
- type: "button",
581
- onPointerdown: t[1] || (t[1] = N(() => {
582
- }, ["prevent"])),
583
- onClick: t[2] || (t[2] = (o) => L.value = !0)
584
- }, null, 8, ["border-color", "label", "text-color"])
585
- ])
586
- ]),
587
- default: u(() => [
588
- i(W, {
589
- "column-defs": be.value,
590
- "hide-footer": "",
591
- "page-size": 999,
592
- "row-data": le.value,
593
- "shrink-at": !1
594
- }, null, 8, ["column-defs", "row-data"])
595
- ]),
596
- _: 1
597
- }, 8, ["title", "sub-title"])
598
- ])
599
- ]),
600
- _: 1
601
- }, 8, ["modelValue", "is-container", "is-container-props"]),
602
- l.value ? (c(), C($e, {
603
- key: 4,
604
- "model-value": F.value,
605
- "onUpdate:modelValue": t[5] || (t[5] = (o) => o || H()),
606
- dirty: l.value.translationDirty,
607
- name: l.value.name,
608
- "name-locale": l.value.nameLocale,
609
- "name-section-label": n(a)("menu.order_pacing.translation.name_section"),
610
- "supported-locales": l.value.supportedLocales,
611
- title: n(a)("menu.order_pacing.translation.title"),
612
- onDiscard: H,
613
- onSave: de,
614
- "onUpdate:name": r.value.setName,
615
- "onUpdate:nameLocale": r.value.setNameLocale
616
- }, null, 8, ["model-value", "dirty", "name", "name-locale", "name-section-label", "supported-locales", "title", "onUpdate:name", "onUpdate:nameLocale"])) : V("", !0),
617
- i(X, {
618
- modelValue: D.value,
619
- "onUpdate:modelValue": t[10] || (t[10] = (o) => D.value = o),
620
- "is-container": n(S).FmForm,
621
- "is-container-props": { onValidationSuccess: fe },
622
- "max-width": 560
623
- }, {
624
- "side-sheet-header": u(() => [
625
- d("p", Ze, k(n(a)("menu.order_pacing.link_product.title")), 1)
626
- ]),
627
- "side-sheet-footer": u(() => {
628
- var o;
629
- return [
630
- d("div", aa, [
631
- i(s, {
632
- disabled: ((o = l.value) == null ? void 0 : o.submit.state) !== "allowed",
633
- label: n(a)("menu.common.actions.save"),
634
- size: "lg",
635
- type: "submit",
636
- variant: "primary"
637
- }, null, 8, ["disabled", "label"]),
638
- i(s, {
639
- label: n(a)("menu.common.actions.cancel"),
640
- size: "lg",
641
- variant: "tertiary",
642
- onClick: t[9] || (t[9] = (f) => D.value = !1)
643
- }, null, 8, ["label"])
644
- ])
645
- ];
646
- }),
647
- default: u(() => {
648
- var o, f, U;
649
- return [
650
- i(xe, {
651
- "applied-count": ((o = l.value) == null ? void 0 : o.appliedProductCount) ?? 0,
652
- groups: ((f = l.value) == null ? void 0 : f.linkedGroups) ?? [],
653
- query: ((U = l.value) == null ? void 0 : U.linkedProductQuery) ?? "",
654
- title: n(a)("menu.order_pacing.product.title"),
655
- onUnapply: t[7] || (t[7] = (P) => r.value.unlinkProduct(P)),
656
- "onUpdate:query": t[8] || (t[8] = (P) => r.value.setLinkedProductQuery(P))
657
- }, {
658
- "append-title": u(() => [
659
- d("div", ea, [
660
- i(s, {
661
- "border-color": n(T).ColorPrimary,
662
- label: n(a)("menu.common.actions.apply_product"),
663
- "prepend-icon": "link",
664
- "text-color": n(T).ColorPrimary,
665
- variant: "secondary",
666
- onClick: t[6] || (t[6] = (P) => L.value = !0)
667
- }, null, 8, ["border-color", "label", "text-color"])
668
- ])
669
- ]),
670
- _: 1
671
- }, 8, ["applied-count", "groups", "query", "title"])
672
- ];
673
- }),
674
- _: 1
675
- }, 8, ["modelValue", "is-container", "is-container-props"]),
676
- i(Se, {
677
- modelValue: L.value,
678
- "onUpdate:modelValue": t[11] || (t[11] = (o) => L.value = o),
679
- catalogue: oe.value,
680
- "selected-product-ids": re.value,
681
- title: n(a)("menu.order_pacing.link_product.title"),
682
- onSubmit: ye
683
- }, null, 8, ["modelValue", "catalogue", "selected-product-ids", "title"])
684
- ]),
685
- _: 1
686
- }, 8, ["heading"]);
687
- };
688
- }
689
- }), _a = /* @__PURE__ */ K({
690
- __name: "OrderPacing",
691
- setup(E) {
692
- const m = Ie();
693
- return (a, B) => (c(), C(ta, { sdk: n(m) }, null, 8, ["sdk"]));
694
- }
695
- });
696
- export {
697
- _a as default
698
- };