@feedmepos/mf-menu 1.0.1-dev.1 → 1.0.1-dev.2

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 (62) hide show
  1. package/dist/{App-CXamBqwS.js → App-CdIN4s5n.js} +5 -4
  2. package/dist/{BindingTable.vue_vue_type_script_setup_true_lang-DzNuoUmQ.js → BindingTable.vue_vue_type_script_setup_true_lang-CoHlJwpz.js} +1 -1
  3. package/dist/{Catalog-BHb5ZB6_.js → Catalog-DjAubC9s.js} +4 -4
  4. package/dist/{CatalogBinding-X-AHRvcJ.js → CatalogBinding-5JNRTbyZ.js} +3 -3
  5. package/dist/{CatalogEditTabs.vue_vue_type_script_setup_true_lang-NFeJpXLh.js → CatalogEditTabs.vue_vue_type_script_setup_true_lang-BorOjk1k.js} +3 -3
  6. package/dist/{CatalogEditor.vue_vue_type_script_setup_true_lang-CrrkUkfD.js → CatalogEditor.vue_vue_type_script_setup_true_lang-CkF7O_V-.js} +6 -6
  7. package/dist/{CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-C43Ettr2.js → CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-3fL43MuR.js} +3 -3
  8. package/dist/{Category-DsTyhvYK.js → Category-BbiN4hd7.js} +5 -5
  9. package/dist/{Category-MXhBgKnb.js → Category-COug7fz8.js} +2 -2
  10. package/dist/{CategoryList.vue_vue_type_script_setup_true_lang-BJTKjE25.js → CategoryList.vue_vue_type_script_setup_true_lang-B_9aPMIN.js} +4 -4
  11. package/dist/{CookingGuide-yBqMRWrs.js → CookingGuide-Dg7kuF6l.js} +4 -4
  12. package/dist/{Group-CMKmmN3C.js → Group-BRpmTqyT.js} +5 -5
  13. package/dist/{Group-DINfX6Wn.js → Group-C-hwlkgJ.js} +2 -2
  14. package/dist/{GroupList.vue_vue_type_script_setup_true_lang-BEBZmPdu.js → GroupList.vue_vue_type_script_setup_true_lang-DowoJ3WM.js} +5 -5
  15. package/dist/{Ingredient-BNQ2LIqN.js → Ingredient-BQYnARdC.js} +3 -3
  16. package/dist/LinkProductSideSheet.vue_vue_type_script_setup_true_lang-CgTDkHle.js +707 -0
  17. package/dist/{MenuSetting-DARGZW4u.js → MenuSetting-DsdM2_OW.js} +546 -513
  18. package/dist/{OrderPacing-DuGDpSLN.js → OrderPacing-5x2YH-_l.js} +4 -4
  19. package/dist/{OrderPacingFields.vue_vue_type_script_setup_true_lang-2V1SiXyH.js → OrderPacingFields.vue_vue_type_script_setup_true_lang-DVGJjpiM.js} +1 -1
  20. package/dist/Preview-AdgGTYlQ.js +321 -0
  21. package/dist/{PriceTierNotice.vue_vue_type_script_setup_true_lang-hbG9eqTr.js → PriceTierNotice.vue_vue_type_script_setup_true_lang-vmxVZ2ya.js} +1 -1
  22. package/dist/{PrintRoute-N0gXx2Wx.js → PrintRoute-COkCv4gf.js} +3 -3
  23. package/dist/{Product-Cp2dYxav.js → Product-BJFb_J4h.js} +4 -4
  24. package/dist/{ProductEditorHost.vue_vue_type_script_setup_true_lang-imCNnKvi.js → ProductEditorHost.vue_vue_type_script_setup_true_lang-Tpp8MBYS.js} +2 -2
  25. package/dist/{ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-BqZ2jz39.js → ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-C25Pwqme.js} +3 -3
  26. package/dist/{ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-KrQJLxU2.js → ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-BMAtAK9D.js} +1 -1
  27. package/dist/{ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-i0smKuFw.js → ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-Dl4Zr5tx.js} +10 -10
  28. package/dist/{ProductInternalTools-CJG8TsE4.js → ProductInternalTools-thlSvqbA.js} +2 -2
  29. package/dist/{ProductInventoryDialog-DmN4sXP_.js → ProductInventoryDialog-C3ruRWU5.js} +1 -1
  30. package/dist/{ProductInventoryDialog.vue_vue_type_script_setup_true_lang-UOIkIylV.js → ProductInventoryDialog.vue_vue_type_script_setup_true_lang-MpdIixqI.js} +1 -1
  31. package/dist/{ProductList.vue_vue_type_script_setup_true_lang-C262_Dsq.js → ProductList.vue_vue_type_script_setup_true_lang-9_ohgfqE.js} +8 -8
  32. package/dist/{ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-wTwunTLr.js → ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-Ctbz-8cd.js} +1 -1
  33. package/dist/{Products-BSthFwvC.js → Products-DMrjQFfu.js} +3 -3
  34. package/dist/{Publish-BcUXfV7Z.js → Publish-f6g0dIao.js} +3 -3
  35. package/dist/{Recipe-Nhmop5G3.js → Recipe-p-wxadSN.js} +3 -3
  36. package/dist/{Scheduler-DEMpmXNY.js → Scheduler-CtebRafn.js} +3 -3
  37. package/dist/{ServingSequence-Dkd70bsy.js → ServingSequence-CEd4ywOQ.js} +2 -2
  38. package/dist/{Setting-LWEFUdQK.js → Setting-bPKadRu-.js} +6 -6
  39. package/dist/{Subcategory-YvAbjlgi.js → Subcategory-DBCnIP0b.js} +2 -2
  40. package/dist/{Takeaway-CoK-aka9.js → Takeaway-GNRHR5kN.js} +2 -2
  41. package/dist/{Takeaway-DUoXWAQT.js → Takeaway-VBkdW1DM.js} +5 -5
  42. package/dist/{TakeawayList.vue_vue_type_script_setup_true_lang-D4xu-gHa.js → TakeawayList.vue_vue_type_script_setup_true_lang-DvX3k0Jg.js} +3 -3
  43. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-1iGMM-Xt.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D1qaEVUu.js} +6 -6
  44. package/dist/{Unit-BIoPBeiP.js → Unit-DbGKIprZ.js} +2 -2
  45. package/dist/{Variant-X4llcQO6.js → Variant-_edSAKif.js} +3 -3
  46. package/dist/{_id_-gKOWPBVp.js → _id_-BNVtBV3q.js} +3 -3
  47. package/dist/{app-DUyvBFfY.js → app-BlTv5xag.js} +137 -114
  48. package/dist/app.js +1 -1
  49. package/dist/apps/mf-menu/src/app.d.ts +360 -0
  50. package/dist/apps/mf-menu/src/components/preview/MenuPreview.vue.d.ts +13 -0
  51. package/dist/apps/mf-menu/src/components/preview/simulatorPort.d.ts +23 -0
  52. package/dist/apps/mf-menu/src/router/shared.d.ts +1 -0
  53. package/dist/apps/mf-menu/src/utils/ruleValueKey.d.ts +12 -0
  54. package/dist/apps/mf-menu/src/views/Preview/Preview.vue.d.ts +2 -0
  55. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  56. package/dist/assets/{menu-compute--bTrGqr1.js → menu-compute-BzchkTYh.js} +36 -36
  57. package/dist/assets/{validate-menu-mv20U_e_.js → validate-menu-CTV_cJNG.js} +4 -4
  58. package/dist/{provide-CxmHxIEV.js → provide-dbE6Qt1z.js} +35458 -34831
  59. package/dist/ruleValueKey-BF52PuHb.js +10 -0
  60. package/dist/{useActionFeedback-Di6FGqLG.js → useActionFeedback-CdY_C_HX.js} +1 -1
  61. package/package.json +1 -1
  62. package/dist/LinkProductSideSheet.vue_vue_type_script_setup_true_lang-B8n517dM.js +0 -671
@@ -1,67 +1,68 @@
1
- import { defineComponent as N, onUnmounted as be, computed as M, resolveComponent as x, openBlock as r, createElementBlock as k, createVNode as i, unref as t, withCtx as b, createElementVNode as a, Fragment as z, renderList as K, createBlock as F, createCommentVNode as L, ref as I, watch as ze, h as D, withModifiers as R, toDisplayString as h, shallowRef as ge } from "vue";
2
- import { useI18n as E } from "@feedmepos/mf-common";
3
- import { _ as De } from "./FormItem.vue_vue_type_script_setup_true_lang-C2S6QCyR.js";
4
- import { _ as ee, d as Ne } from "./FormSection.vue_vue_type_script_setup_true_lang-pY-_msnM.js";
5
- import { u as le } from "./useActionFeedback-Di6FGqLG.js";
6
- import { b as fe, u as W, a as Ee } from "./provide-CxmHxIEV.js";
7
- import { useDialogChild as Oe, useDialog as ie, components as te, useBreakpoints as qe } from "@feedmepos/ui-library";
8
- import { _ as ye } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
9
- import { _ as he } from "./app-DUyvBFfY.js";
10
- import { _ as ke } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
11
- import { _ as Ke } from "./AddPriceGroupDialog.vue_vue_type_script_setup_true_lang-DhKyG3gY.js";
12
- const We = {
1
+ import { defineComponent as E, onUnmounted as ye, computed as U, resolveComponent as C, openBlock as i, createElementBlock as y, createVNode as u, unref as t, withCtx as v, createElementVNode as n, Fragment as O, renderList as W, createBlock as S, createCommentVNode as A, ref as P, watch as Ee, h as N, withModifiers as T, toDisplayString as w, shallowRef as be, withDirectives as qe } from "vue";
2
+ import { useI18n as q } from "@feedmepos/mf-common";
3
+ import { _ as Ke } from "./FormItem.vue_vue_type_script_setup_true_lang-C2S6QCyR.js";
4
+ import { _ as ee, d as We } from "./FormSection.vue_vue_type_script_setup_true_lang-pY-_msnM.js";
5
+ import { u as le } from "./useActionFeedback-CdY_C_HX.js";
6
+ import { b as he, u as H, r as ie, a as He } from "./provide-dbE6Qt1z.js";
7
+ import { useDialogChild as Je, useDialog as re, components as te, useBreakpoints as Qe } from "@feedmepos/ui-library";
8
+ import { _ as ke } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
9
+ import { _ as xe } from "./app-BlTv5xag.js";
10
+ import { _ as we } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
11
+ import { _ as Xe } from "./AddPriceGroupDialog.vue_vue_type_script_setup_true_lang-DhKyG3gY.js";
12
+ import { r as Ye, a as fe } from "./ruleValueKey-BF52PuHb.js";
13
+ const Ze = {
13
14
  key: 0,
14
15
  class: "space-y-32 max-w-[750px] xs:p-16"
15
- }, He = {
16
+ }, et = {
16
17
  key: 0,
17
18
  class: "pl-32 space-x-8"
18
- }, Je = { class: "space-y-16" }, Qe = /* @__PURE__ */ N({
19
+ }, tt = { class: "space-y-16" }, lt = /* @__PURE__ */ E({
19
20
  __name: "ConfigurationTab",
20
21
  props: {
21
22
  sdk: {}
22
23
  },
23
- setup(B) {
24
- const _ = B, { t: e } = E(), v = fe(), { run: S } = le(), f = _.sdk.menuSetting.configuration();
25
- be(() => f.dispose());
26
- const c = W(f), d = M(
24
+ setup(L) {
25
+ const p = L, { t: e } = q(), b = he(), { run: F } = le(), g = p.sdk.menuSetting.configuration();
26
+ ye(() => g.dispose());
27
+ const c = H(g), m = U(
27
28
  () => c.value.status === "ready" ? c.value.value : null
28
- ), A = M(() => {
29
- var m;
30
- const T = ((m = d.value) == null ? void 0 : m.lowStockThreshold) ?? "";
31
- if (T.trim() === "") return null;
32
- const u = Number(T);
33
- return Number.isNaN(u) ? null : u;
29
+ ), I = U(() => {
30
+ var $;
31
+ const h = (($ = m.value) == null ? void 0 : $.lowStockThreshold) ?? "";
32
+ if (h.trim() === "") return null;
33
+ const r = Number(h);
34
+ return Number.isNaN(r) ? null : r;
34
35
  });
35
- async function V() {
36
- await S(() => f.submit(), {
36
+ async function B() {
37
+ await F(() => g.submit(), {
37
38
  successMessage: e("menu.menu_setting.fields.low_stock.updated"),
38
39
  // A non-integer threshold is decided locally and never reaches the wire,
39
40
  // so a loading toast here would show an indicator legacy never had.
40
41
  showLoading: () => {
41
- var T;
42
- return ((T = d.value) == null ? void 0 : T.status) === "submitting";
42
+ var h;
43
+ return ((h = m.value) == null ? void 0 : h.status) === "submitting";
43
44
  }
44
45
  });
45
46
  }
46
- return (T, u) => {
47
- const m = x("FmRadio"), p = x("FmRadioGroup"), w = x("FmCheckbox"), O = x("FmSwitch"), j = x("FmStepperField"), oe = x("FmButton");
48
- return d.value ? (r(), k("div", We, [
49
- i(ee, {
47
+ return (h, r) => {
48
+ const $ = C("FmRadio"), k = C("FmRadioGroup"), d = C("FmCheckbox"), z = C("FmSwitch"), K = C("FmStepperField"), j = C("FmButton");
49
+ return m.value ? (i(), y("div", Ze, [
50
+ u(ee, {
50
51
  title: t(e)("menu.tax_setting.title")
51
52
  }, {
52
- default: b(() => [
53
- a("div", null, [
54
- i(p, {
55
- "model-value": d.value.taxMode,
56
- "onUpdate:modelValue": u[0] || (u[0] = (g) => t(f).setTaxMode(g))
53
+ default: v(() => [
54
+ n("div", null, [
55
+ u(k, {
56
+ "model-value": m.value.taxMode,
57
+ "onUpdate:modelValue": r[0] || (r[0] = (V) => t(g).setTaxMode(V))
57
58
  }, {
58
- default: b(() => [
59
- i(m, {
59
+ default: v(() => [
60
+ u($, {
60
61
  value: "automatic",
61
62
  label: t(e)("menu.setting.tax.modes.auto.label"),
62
63
  sublabel: t(e)("menu.setting.tax.modes.auto.sublabel")
63
64
  }, null, 8, ["label", "sublabel"]),
64
- i(m, {
65
+ u($, {
65
66
  value: "manual",
66
67
  label: t(e)("menu.setting.tax.modes.manual.label"),
67
68
  sublabel: t(e)("menu.setting.tax.modes.manual.sublabel")
@@ -69,100 +70,100 @@ const We = {
69
70
  ]),
70
71
  _: 1
71
72
  }, 8, ["model-value"]),
72
- d.value.taxMode === "manual" ? (r(), k("div", He, [
73
- (r(!0), k(z, null, K(d.value.taxSystems, (g) => (r(), F(w, {
74
- key: g.systemCode,
75
- "model-value": g.inclusive,
73
+ m.value.taxMode === "manual" ? (i(), y("div", et, [
74
+ (i(!0), y(O, null, W(m.value.taxSystems, (V) => (i(), S(d, {
75
+ key: V.systemCode,
76
+ "model-value": V.inclusive,
76
77
  value: !0,
77
- label: t(e)("menu.setting.tax.inclusive", { code: g.systemCode }),
78
- "onUpdate:modelValue": (G) => t(f).setTaxInclusive(g.systemCode, !!G)
78
+ label: t(e)("menu.setting.tax.inclusive", { code: V.systemCode }),
79
+ "onUpdate:modelValue": (M) => t(g).setTaxInclusive(V.systemCode, !!M)
79
80
  }, null, 8, ["model-value", "label", "onUpdate:modelValue"]))), 128))
80
- ])) : L("", !0)
81
+ ])) : A("", !0)
81
82
  ]),
82
- d.value.statutoryChargeWaivers.length > 0 ? (r(), F(De, {
83
+ m.value.statutoryChargeWaivers.length > 0 ? (i(), S(Ke, {
83
84
  key: 0,
84
85
  label: t(e)("menu.catalog.form.statutory_charges.title")
85
86
  }, {
86
- default: b(() => [
87
- a("div", Je, [
88
- (r(!0), k(z, null, K(d.value.statutoryChargeWaivers, (g) => (r(), F(O, {
89
- key: g.code,
90
- "model-value": g.waived,
87
+ default: v(() => [
88
+ n("div", tt, [
89
+ (i(!0), y(O, null, W(m.value.statutoryChargeWaivers, (V) => (i(), S(z, {
90
+ key: V.code,
91
+ "model-value": V.waived,
91
92
  label: t(e)("menu.catalog.form.statutory_charges.waive", {
92
- name: g.name
93
+ name: V.name
93
94
  }),
94
95
  sublabel: t(e)("menu.menu_setting.statutory_charges.sublabel"),
95
96
  "label-placement": "right",
96
- "onUpdate:modelValue": (G) => t(f).setStatutoryChargeWaived(g.code, G)
97
+ "onUpdate:modelValue": (M) => t(g).setStatutoryChargeWaived(V.code, M)
97
98
  }, null, 8, ["model-value", "label", "sublabel", "onUpdate:modelValue"]))), 128))
98
99
  ])
99
100
  ]),
100
101
  _: 1
101
- }, 8, ["label"])) : L("", !0)
102
+ }, 8, ["label"])) : A("", !0)
102
103
  ]),
103
104
  _: 1
104
105
  }, 8, ["title"]),
105
- i(ee, {
106
+ u(ee, {
106
107
  title: t(e)("menu.menu_setting.fields.low_stock.title"),
107
108
  "sub-title": t(e)("menu.menu_setting.fields.low_stock.subtitle")
108
109
  }, {
109
- default: b(() => [
110
- i(j, {
111
- "model-value": A.value,
110
+ default: v(() => [
111
+ u(K, {
112
+ "model-value": I.value,
112
113
  min: 0,
113
114
  max: 1e3,
114
115
  step: 1,
115
116
  placeholder: t(e)("menu.menu_setting.fields.low_stock.not_set"),
116
- "helper-state": d.value.lowStockIssue ? "error" : "none",
117
- "helper-text": d.value.lowStockIssue ? t(v)(d.value.lowStockIssue) : t(e)("menu.menu_setting.fields.low_stock.helper_text"),
118
- "onUpdate:modelValue": u[1] || (u[1] = (g) => t(f).setLowStockThreshold(
119
- g == null ? "" : String(g)
117
+ "helper-state": m.value.lowStockIssue ? "error" : "none",
118
+ "helper-text": m.value.lowStockIssue ? t(b)(m.value.lowStockIssue) : t(e)("menu.menu_setting.fields.low_stock.helper_text"),
119
+ "onUpdate:modelValue": r[1] || (r[1] = (V) => t(g).setLowStockThreshold(
120
+ V == null ? "" : String(V)
120
121
  ))
121
122
  }, null, 8, ["model-value", "placeholder", "helper-state", "helper-text"])
122
123
  ]),
123
124
  _: 1
124
125
  }, 8, ["title", "sub-title"]),
125
- i(oe, {
126
+ u(j, {
126
127
  label: t(e)("menu.common.actions.save"),
127
- disabled: d.value.submit.state !== "allowed",
128
- loading: d.value.status === "submitting",
129
- onClick: V
128
+ disabled: m.value.submit.state !== "allowed",
129
+ loading: m.value.status === "submitting",
130
+ onClick: B
130
131
  }, null, 8, ["label", "disabled", "loading"])
131
- ])) : L("", !0);
132
+ ])) : A("", !0);
132
133
  };
133
134
  }
134
- }), Xe = /* @__PURE__ */ N({
135
+ }), at = /* @__PURE__ */ E({
135
136
  __name: "AddMemberTierDialog",
136
- setup(B) {
137
- const { t: _ } = E(), { emitData: e } = Oe(), v = I("");
138
- return ze(v, (S) => e(S)), (S, f) => {
139
- const c = x("FmTextField");
140
- return r(), F(c, {
141
- modelValue: v.value,
142
- "onUpdate:modelValue": f[0] || (f[0] = (d) => v.value = d),
143
- label: t(_)("menu.member_pricing.name_title")
137
+ setup(L) {
138
+ const { t: p } = q(), { emitData: e } = Je(), b = P("");
139
+ return Ee(b, (F) => e(F)), (F, g) => {
140
+ const c = C("FmTextField");
141
+ return i(), S(c, {
142
+ modelValue: b.value,
143
+ "onUpdate:modelValue": g[0] || (g[0] = (m) => b.value = m),
144
+ label: t(p)("menu.member_pricing.name_title")
144
145
  }, null, 8, ["modelValue", "label"]);
145
146
  };
146
147
  }
147
- }), Ye = /* @__PURE__ */ N({
148
+ }), ot = /* @__PURE__ */ E({
148
149
  __name: "MemberPricingTab",
149
150
  props: {
150
151
  sdk: {}
151
152
  },
152
- setup(B) {
153
- const _ = B, { t: e } = E(), v = ie(), { run: S } = le(), f = W(_.sdk.memberPricing.list), c = M(
154
- () => f.value.status === "ready" ? f.value.value : null
155
- ), d = M(() => {
156
- var u;
157
- return [...((u = c.value) == null ? void 0 : u.rows) ?? []];
153
+ setup(L) {
154
+ const p = L, { t: e } = q(), b = re(), { run: F } = le(), g = H(p.sdk.memberPricing.list), c = U(
155
+ () => g.value.status === "ready" ? g.value.value : null
156
+ ), m = U(() => {
157
+ var r;
158
+ return [...((r = c.value) == null ? void 0 : r.rows) ?? []];
158
159
  });
159
- function A() {
160
- var u;
161
- ((u = c.value) == null ? void 0 : u.create.state) === "allowed" && v.open({
160
+ function I() {
161
+ var r;
162
+ ((r = c.value) == null ? void 0 : r.create.state) === "allowed" && b.open({
162
163
  // The dialog wears the TAB's title, not an "Add…" phrasing — unlike
163
164
  // the Price group tab beside it (`member-pricing/create/dialog-open`).
164
165
  title: e("menu.member_pricing.title"),
165
- contentComponent: Xe,
166
+ contentComponent: at,
166
167
  primaryActions: {
167
168
  text: e("menu.category.manager.dialog.add.action"),
168
169
  close: !1
@@ -171,19 +172,19 @@ const We = {
171
172
  text: e("menu.common.actions.cancel"),
172
173
  close: !0
173
174
  }
174
- }).onPrimary(async (m) => {
175
- (await S(
175
+ }).onPrimary(async ($) => {
176
+ (await F(
176
177
  // An untouched field never emits, so it arrives as `undefined`. It is
177
178
  // forwarded as the empty string rather than defended against here:
178
179
  // whether an empty name is submittable is the SDK's rule.
179
- () => _.sdk.memberPricing.create(String(m ?? "")),
180
+ () => p.sdk.memberPricing.create(String($ ?? "")),
180
181
  {
181
182
  // The success copy INTERPOLATES the tier name, unlike the Price
182
183
  // group tab's generic line. The name comes back from the outcome
183
184
  // rather than from the typed input, so the message can only ever
184
185
  // describe the tier the write actually established.
185
- successMessage: (w) => e("menu.member_pricing.add_member_tier_success", {
186
- name: w.key
186
+ successMessage: (d) => e("menu.member_pricing.add_member_tier_success", {
187
+ name: d.key
187
188
  }),
188
189
  // Two rejections settle here without a round trip and legacy shows
189
190
  // no pending pill for either: the empty name is silent altogether
@@ -201,21 +202,21 @@ const We = {
201
202
  // SDK's own answer, and it keeps answering correctly if either
202
203
  // guard ever moves.
203
204
  showLoading: () => {
204
- var w;
205
- return ((w = c.value) == null ? void 0 : w.create.state) !== "allowed";
205
+ var d;
206
+ return ((d = c.value) == null ? void 0 : d.create.state) !== "allowed";
206
207
  }
207
208
  }
208
- )).kind === "success" && v.close();
209
+ )).kind === "success" && b.close();
209
210
  });
210
211
  }
211
- function V(u) {
212
- u.remove.state === "allowed" && v.open({
212
+ function B(r) {
213
+ r.remove.state === "allowed" && b.open({
213
214
  title: e("menu.member_pricing.delete_dialog.title"),
214
215
  // Names the tier and says nothing about which products are priced
215
216
  // against it, because legacy runs no reference check
216
217
  // (`member-pricing/delete/confirmation`).
217
218
  message: e("menu.member_pricing.delete_dialog.message", {
218
- name: u.key
219
+ name: r.key
219
220
  }),
220
221
  primaryActions: {
221
222
  text: e("menu.common.actions.remove"),
@@ -226,17 +227,17 @@ const We = {
226
227
  close: !0
227
228
  }
228
229
  }).onPrimary(async () => {
229
- (await S(
230
- () => _.sdk.memberPricing.remove(u.key),
230
+ (await F(
231
+ () => p.sdk.memberPricing.remove(r.key),
231
232
  {
232
233
  // Generic, where create interpolates. That inconsistency is
233
234
  // internal to this unit and is reproduced, not tidied.
234
235
  successMessage: e("menu.member_pricing.delete_dialog.success")
235
236
  }
236
- )).kind === "success" && v.close();
237
+ )).kind === "success" && b.close();
237
238
  });
238
239
  }
239
- const T = M(() => [
240
+ const h = U(() => [
240
241
  {
241
242
  accessorKey: "key",
242
243
  enableSorting: !1,
@@ -251,52 +252,52 @@ const We = {
251
252
  // addition the new app owns. It is the screen-reader name, not a
252
253
  // locator: "Remove member tier" contains no "delete", unlike the Price
253
254
  // group tab's label, and must not be renamed toward one.
254
- cell: (u) => D("div", { class: "flex justify-end px-4" }, [
255
- D(te.FmButton, {
255
+ cell: (r) => N("div", { class: "flex justify-end px-4" }, [
256
+ N(te.FmButton, {
256
257
  icon: "delete",
257
258
  variant: "tertiary",
258
259
  textColor: "neutral-gray-400",
259
260
  "aria-label": e("menu.member_pricing.table.actions.delete"),
260
- disabled: u.row.original.remove.state !== "allowed",
261
- onClick: R(
262
- () => V(u.row.original),
261
+ disabled: r.row.original.remove.state !== "allowed",
262
+ onClick: T(
263
+ () => B(r.row.original),
263
264
  ["stop", "prevent"]
264
265
  )
265
266
  })
266
267
  ])
267
268
  }
268
269
  ]);
269
- return (u, m) => {
270
- const p = x("FmButton"), w = x("FmTable");
271
- return c.value ? (r(), F(ke, {
270
+ return (r, $) => {
271
+ const k = C("FmButton"), d = C("FmTable");
272
+ return c.value ? (i(), S(we, {
272
273
  key: 0,
273
274
  heading: t(e)("menu.member_pricing.title"),
274
275
  subheading: t(e)("menu.member_pricing.description")
275
276
  }, {
276
- "append-heading": b(() => [
277
- c.value.rows.length > 0 ? (r(), F(p, {
277
+ "append-heading": v(() => [
278
+ c.value.rows.length > 0 ? (i(), S(k, {
278
279
  key: 0,
279
280
  label: t(e)("menu.member_pricing.add_member_tier"),
280
281
  disabled: c.value.create.state !== "allowed",
281
282
  "prepend-icon": "add",
282
- onClick: A
283
- }, null, 8, ["label", "disabled"])) : L("", !0)
283
+ onClick: I
284
+ }, null, 8, ["label", "disabled"])) : A("", !0)
284
285
  ]),
285
- default: b(() => [
286
- c.value.rows.length === 0 ? (r(), F(t(ye), {
286
+ default: v(() => [
287
+ c.value.rows.length === 0 ? (i(), S(t(ke), {
287
288
  key: 0,
288
289
  action: {
289
290
  text: t(e)("menu.member_pricing.add_member_tier"),
290
- callback: A
291
+ callback: I
291
292
  },
292
293
  subtitle: t(e)("menu.member_pricing.empty.subtitle"),
293
294
  title: t(e)("menu.member_pricing.empty.title")
294
- }, null, 8, ["action", "subtitle", "title"])) : (r(), F(he, { key: 1 }, {
295
- default: b(() => [
296
- i(w, {
297
- "column-defs": T.value,
295
+ }, null, 8, ["action", "subtitle", "title"])) : (i(), S(xe, { key: 1 }, {
296
+ default: v(() => [
297
+ u(d, {
298
+ "column-defs": h.value,
298
299
  "page-size": c.value.rows.length,
299
- "row-data": d.value,
300
+ "row-data": m.value,
300
301
  "shrink-at": !1,
301
302
  "hide-footer": "",
302
303
  "pin-header-row": ""
@@ -306,29 +307,29 @@ const We = {
306
307
  }))
307
308
  ]),
308
309
  _: 1
309
- }, 8, ["heading", "subheading"])) : L("", !0);
310
+ }, 8, ["heading", "subheading"])) : A("", !0);
310
311
  };
311
312
  }
312
- }), Ze = {
313
+ }), nt = {
313
314
  key: 0,
314
315
  class: "flex flex-col gap-16"
315
- }, et = { class: "flex items-center justify-between gap-16" }, tt = { class: "fm-typo-en-title-md-600" }, lt = { class: "text-fm-color-typo-secondary" }, ot = /* @__PURE__ */ N({
316
+ }, st = { class: "flex items-center justify-between gap-16" }, ut = { class: "fm-typo-en-title-md-600" }, it = { class: "text-fm-color-typo-secondary" }, rt = /* @__PURE__ */ E({
316
317
  __name: "PriceGroupTab",
317
318
  props: {
318
319
  sdk: {}
319
320
  },
320
- setup(B) {
321
- const _ = B, { t: e } = E(), v = ie(), { run: S } = le(), f = W(_.sdk.priceTier.list), c = M(
322
- () => f.value.status === "ready" ? f.value.value : null
323
- ), d = M(() => {
324
- var u;
325
- return [...((u = c.value) == null ? void 0 : u.rows) ?? []];
321
+ setup(L) {
322
+ const p = L, { t: e } = q(), b = re(), { run: F } = le(), g = H(p.sdk.priceTier.list), c = U(
323
+ () => g.value.status === "ready" ? g.value.value : null
324
+ ), m = U(() => {
325
+ var r;
326
+ return [...((r = c.value) == null ? void 0 : r.rows) ?? []];
326
327
  });
327
- function A() {
328
- var u;
329
- ((u = c.value) == null ? void 0 : u.create.state) === "allowed" && v.open({
328
+ function I() {
329
+ var r;
330
+ ((r = c.value) == null ? void 0 : r.create.state) === "allowed" && b.open({
330
331
  title: e("menu.price_tier.add_price_group"),
331
- contentComponent: Ke,
332
+ contentComponent: Xe,
332
333
  primaryActions: {
333
334
  text: e("menu.category.manager.dialog.add.action"),
334
335
  close: !1
@@ -337,12 +338,12 @@ const We = {
337
338
  text: e("menu.common.actions.cancel"),
338
339
  close: !0
339
340
  }
340
- }).onPrimary(async (m) => {
341
- (await S(
341
+ }).onPrimary(async ($) => {
342
+ (await F(
342
343
  // An untouched field never emits, so it arrives as `undefined`. It is
343
344
  // forwarded as the empty string rather than defended against here:
344
345
  // whether an empty title is submittable is the SDK's rule.
345
- () => _.sdk.priceTier.create(String(m ?? "")),
346
+ () => p.sdk.priceTier.create(String($ ?? "")),
346
347
  {
347
348
  successMessage: e("menu.price_tier.add_price_group_success"),
348
349
  // The empty title is refused locally with no request, and legacy
@@ -360,17 +361,17 @@ const We = {
360
361
  // SDK's own answer, and it keeps answering correctly if the
361
362
  // submittability rule ever moves.
362
363
  showLoading: () => {
363
- var w;
364
- return ((w = c.value) == null ? void 0 : w.create.state) !== "allowed";
364
+ var d;
365
+ return ((d = c.value) == null ? void 0 : d.create.state) !== "allowed";
365
366
  }
366
367
  }
367
- )).kind === "success" && v.close();
368
+ )).kind === "success" && b.close();
368
369
  });
369
370
  }
370
- function V(u) {
371
- u.remove.state === "allowed" && v.open({
371
+ function B(r) {
372
+ r.remove.state === "allowed" && b.open({
372
373
  title: e("menu.price_tier.delete_dialog.title"),
373
- message: e("menu.price_tier.delete_dialog.message", { name: u.key }),
374
+ message: e("menu.price_tier.delete_dialog.message", { name: r.key }),
374
375
  primaryActions: {
375
376
  text: e("menu.common.actions.remove"),
376
377
  close: !1
@@ -380,13 +381,13 @@ const We = {
380
381
  close: !0
381
382
  }
382
383
  }).onPrimary(async () => {
383
- (await S(
384
- () => _.sdk.priceTier.remove(u.key),
384
+ (await F(
385
+ () => p.sdk.priceTier.remove(r.key),
385
386
  { successMessage: e("menu.price_tier.delete_dialog.success") }
386
- )).kind === "success" && v.close();
387
+ )).kind === "success" && b.close();
387
388
  });
388
389
  }
389
- const T = M(() => [
390
+ const h = U(() => [
390
391
  {
391
392
  accessorKey: "key",
392
393
  enableSorting: !1,
@@ -399,95 +400,107 @@ const We = {
399
400
  header: "",
400
401
  // Legacy's control is icon-only with NO accessible name; the name is an
401
402
  // addition the new app owns, naming the control for a screen reader.
402
- cell: (u) => D("div", { class: "flex justify-end px-4" }, [
403
- D(te.FmButton, {
403
+ cell: (r) => N("div", { class: "flex justify-end px-4" }, [
404
+ N(te.FmButton, {
404
405
  icon: "delete",
405
406
  variant: "tertiary",
406
407
  textColor: "neutral-gray-400",
407
408
  "aria-label": e("menu.price_tier.settings_table.actions.delete"),
408
- disabled: u.row.original.remove.state !== "allowed",
409
- onClick: R(
410
- () => V(u.row.original),
409
+ disabled: r.row.original.remove.state !== "allowed",
410
+ onClick: T(
411
+ () => B(r.row.original),
411
412
  ["stop", "prevent"]
412
413
  )
413
414
  })
414
415
  ])
415
416
  }
416
417
  ]);
417
- return (u, m) => {
418
- const p = x("FmButton"), w = x("FmTable");
419
- return c.value ? (r(), k("div", Ze, [
420
- a("div", et, [
421
- a("div", null, [
422
- a("h1", tt, h(t(e)("menu.price_tier.price_group")), 1),
423
- a("p", lt, h(t(e)("menu.price_tier.description")), 1)
418
+ return (r, $) => {
419
+ const k = C("FmButton"), d = C("FmTable");
420
+ return c.value ? (i(), y("div", nt, [
421
+ n("div", st, [
422
+ n("div", null, [
423
+ n("h1", ut, w(t(e)("menu.price_tier.price_group")), 1),
424
+ n("p", it, w(t(e)("menu.price_tier.description")), 1)
424
425
  ]),
425
- i(p, {
426
+ u(k, {
426
427
  label: t(e)("menu.price_tier.add_price_group"),
427
428
  disabled: c.value.create.state !== "allowed",
428
429
  "prepend-icon": "add",
429
- onClick: A
430
+ onClick: I
430
431
  }, null, 8, ["label", "disabled"])
431
432
  ]),
432
- i(w, {
433
- "column-defs": T.value,
433
+ u(d, {
434
+ "column-defs": h.value,
434
435
  "page-size": Math.max(c.value.rows.length, 1),
435
- "row-data": d.value,
436
+ "row-data": m.value,
436
437
  "shrink-at": !1,
437
438
  "hide-footer": "",
438
439
  "pin-header-row": ""
439
440
  }, null, 8, ["column-defs", "page-size", "row-data"])
440
- ])) : L("", !0);
441
+ ])) : A("", !0);
441
442
  };
442
443
  }
443
- }), at = { key: 0 }, nt = {
444
+ }), ct = { key: 0 }, dt = {
444
445
  key: 0,
445
446
  class: "space-y-8"
446
- }, st = { class: "flex items-center justify-between" }, it = { class: "fm-typo-en-title-md-600" }, ut = { class: "text-fm-color-typo-secondary" }, rt = { class: "flex justify-end items-center" }, ct = { class: "w-[320px]" }, dt = {
447
+ }, mt = { class: "flex items-center justify-between" }, pt = { class: "fm-typo-en-title-md-600" }, _t = { class: "text-fm-color-typo-secondary" }, vt = { class: "flex justify-end items-center" }, gt = { class: "w-[320px]" }, bt = {
447
448
  key: 1,
448
449
  class: "flex-1 flex flex-col min-h-0"
449
- }, mt = { class: "flex items-center justify-between p-8" }, pt = { class: "flex-1 mr-8" }, _t = { class: "flex flex-1 flex-col min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64" }, vt = ["onClick"], gt = { class: "flex-1 space-y-4" }, bt = { class: "fm-typo-en-body-lg-600" }, ft = {
450
+ }, ft = { class: "flex items-center justify-between p-8" }, yt = { class: "flex-1 mr-8" }, ht = { class: "flex flex-1 flex-col min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64" }, kt = ["onClick"], xt = { class: "flex-1 space-y-4" }, wt = { class: "fm-typo-en-body-lg-600" }, Ct = {
450
451
  key: 0,
451
452
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
452
- }, yt = { class: "fm-typo-en-title-md-600 mr-auto" }, ht = { class: "py-8 px-8 overflow-y-auto space-y-24" }, kt = { class: "space-y-16" }, xt = { class: "rule-item" }, wt = { class: "flex items-center space-x-16" }, Ct = { class: "flex flex-col min-w-0 w-full" }, Ft = { class: "flex-1 relative border border-fm-color-neutral-gray-200 rounded-md p-16" }, St = { class: "flex items-center justify-between pb-8" }, $t = { class: "text-fm-color-neutral-gray-300" }, Rt = { class: "flex gap-8" }, Vt = { class: "flex flex-col space-y-8" }, Tt = { class: "fm-typo-en-body-lg-600" }, Ut = { class: "w-24" }, Mt = { class: "flex w-full fm-typo-en-body-lg-400 space-x-8 overflow-hidden" }, At = { class: "whitespace-nowrap" }, Lt = { class: "fm-typo-en-body-lg-600 whitespace-nowrap" }, Bt = ["onClick"], It = {
453
+ }, Ft = { class: "fm-typo-en-title-md-600 mr-auto" }, St = { class: "py-8 px-8 overflow-y-auto space-y-24" }, $t = { class: "space-y-16" }, Vt = { class: "rule-item" }, Rt = { class: "flex items-center space-x-16" }, Tt = { class: "flex flex-col min-w-0 w-full" }, Ut = { class: "flex-1 relative border border-fm-color-neutral-gray-200 rounded-md p-16" }, Mt = { class: "flex items-center justify-between pb-8" }, At = { class: "text-fm-color-neutral-gray-300" }, It = { class: "flex gap-8" }, Lt = { class: "flex flex-col space-y-8" }, Bt = { class: "fm-typo-en-body-lg-600" }, Pt = { class: "w-24" }, jt = { class: "flex w-full fm-typo-en-body-lg-400 space-x-8 overflow-hidden" }, Gt = { class: "whitespace-nowrap" }, Dt = { class: "fm-typo-en-body-lg-600 whitespace-nowrap" }, zt = ["onClick"], Ot = {
453
454
  key: 0,
454
455
  class: "flex items-center select-none ml-16"
455
- }, jt = { class: "fm-typo-en-body-lg-400 text-fm-color-neutral-gray-300" }, Pt = { class: "flex gap-8 items-center justify-start" }, Gt = { class: "flex items-center gap-24" }, zt = { class: "fm-typo-en-headline-lg-600" }, Dt = { class: "p-16 flex flex-col gap-16" }, Nt = { class: "fm-typo-en-body-lg-600" }, Et = { class: "flex flex-col gap-16" }, Ot = { class: "flex w-full justify-between gap-16" }, qt = { class: "break-all fm-typo-en-body-lg-400 line-clamp-1" }, Kt = { class: "flex gap-16 items-center" }, Z = "__null__", Wt = /* @__PURE__ */ N({
456
+ }, Nt = { class: "fm-typo-en-body-lg-400 text-fm-color-neutral-gray-300" }, Et = { class: "flex gap-8 items-center justify-start" }, qt = { class: "flex items-center gap-24" }, Kt = { class: "fm-typo-en-headline-lg-600" }, Wt = { class: "p-16 flex flex-col gap-16" }, Ht = { class: "fm-typo-en-body-lg-600" }, Jt = { class: "flex flex-col gap-16" }, Qt = { class: "flex w-full justify-between gap-16" }, Xt = {
457
+ key: 0,
458
+ class: "flex w-full [&>*]:w-full"
459
+ }, Yt = { class: "break-all fm-typo-en-body-lg-400 line-clamp-1" }, Zt = { class: "flex gap-16 items-center" }, el = /* @__PURE__ */ E({
456
460
  __name: "RuleGroupsTab",
457
461
  props: {
458
462
  sdk: {}
459
463
  },
460
- setup(B) {
461
- const _ = B, { t: e } = E(), v = fe(), S = ie(), { run: f } = le(), { breakpoints: c } = qe(), d = M(() => c.value.xs), A = W(
462
- _.sdk.menuSetting.ruleGroupList
463
- ), V = M(
464
- () => A.value.status === "ready" ? A.value.value : null
465
- ), T = M(() => {
466
- var o;
467
- return [...((o = V.value) == null ? void 0 : o.rows) ?? []];
468
- }), u = I(!1), m = ge(null), p = ge(null);
469
- let w = null;
470
- function O(o) {
464
+ setup(L) {
465
+ const p = L, { t: e } = q(), b = {
466
+ mounted: (l, a) => {
467
+ var o;
468
+ (o = l.querySelector("input")) == null || o.setAttribute("aria-label", a.value);
469
+ },
470
+ updated: (l, a) => {
471
+ var o;
472
+ (o = l.querySelector("input")) == null || o.setAttribute("aria-label", a.value);
473
+ }
474
+ }, F = he(), g = re(), { run: c } = le(), { breakpoints: m } = Qe(), I = U(() => m.value.xs), B = H(
475
+ p.sdk.menuSetting.ruleGroupList
476
+ ), h = U(
477
+ () => B.value.status === "ready" ? B.value.value : null
478
+ ), r = U(() => {
479
+ var l;
480
+ return [...((l = h.value) == null ? void 0 : l.rows) ?? []];
481
+ }), $ = P(!1), k = be(null), d = be(null);
482
+ let z = null;
483
+ function K(l) {
471
484
  j();
472
- const l = _.sdk.menuSetting.ruleGroupEditor(o);
473
- m.value = l, w = l.subscribe(
474
- (n) => {
475
- p.value = n.status === "ready" ? n.value : null;
485
+ const a = p.sdk.menuSetting.ruleGroupEditor(l);
486
+ k.value = a, z = a.subscribe(
487
+ (o) => {
488
+ d.value = o.status === "ready" ? o.value : null;
476
489
  }
477
- ), u.value = !0;
490
+ ), $.value = !0;
478
491
  }
479
492
  function j() {
480
- var o;
481
- g.value = !1, w == null || w(), w = null, (o = m.value) == null || o.dispose(), m.value = null, p.value = null, u.value = !1;
493
+ var l;
494
+ M.value = !1, z == null || z(), z = null, (l = k.value) == null || l.dispose(), k.value = null, d.value = null, $.value = !1;
482
495
  }
483
- be(() => j());
484
- function oe() {
485
- var o;
486
- if (!((o = p.value) != null && o.dirty)) {
496
+ ye(() => j());
497
+ function V() {
498
+ var l;
499
+ if (!((l = d.value) != null && l.dirty)) {
487
500
  j();
488
501
  return;
489
502
  }
490
- S.open({
503
+ g.open({
491
504
  title: e("menu.common.dialog.dismiss.title"),
492
505
  message: e("menu.common.dialog.dismiss.message"),
493
506
  primaryActions: {
@@ -500,17 +513,17 @@ const We = {
500
513
  }
501
514
  }).onPrimary(() => j());
502
515
  }
503
- const g = I(!1), G = I(null), ue = I(!1), P = I([]), ae = I([]), H = I(""), J = I("");
504
- let re = 0;
505
- function Q() {
506
- return re += 1, {
507
- key: `condition-${re}`,
516
+ const M = P(!1), ae = P(null), ce = P(!1), D = P([]), oe = P([]), J = P(""), Q = P("");
517
+ let de = 0;
518
+ function X() {
519
+ return de += 1, {
520
+ key: `condition-${de}`,
508
521
  attribute: null,
509
522
  operator: null,
510
523
  values: []
511
524
  };
512
525
  }
513
- const ce = [
526
+ const me = [
514
527
  { value: "in", label: "menu.rule_groups.condition_view.operator.in" },
515
528
  {
516
529
  value: "notIn",
@@ -520,133 +533,136 @@ const We = {
520
533
  value: "startsWith",
521
534
  label: "menu.rule_groups.condition_view.operator.starts_with"
522
535
  }
523
- ], xe = M(
524
- () => ce.map((o) => ({ label: e(o.label), value: o.value }))
536
+ ], Ce = U(
537
+ () => me.map((l) => ({ label: e(l.label), value: l.value }))
525
538
  );
526
- function we(o) {
527
- var n;
528
- const l = (n = ce.find((y) => y.value === o)) == null ? void 0 : n.label;
529
- return l ? e(l) : "";
539
+ function Fe(l) {
540
+ var o;
541
+ const a = (o = me.find((f) => f.value === l)) == null ? void 0 : o.label;
542
+ return a ? e(a) : "";
530
543
  }
531
- function de(o) {
532
- var l;
533
- return (((l = p.value) == null ? void 0 : l.attributeOptions) ?? []).find(
534
- (n) => n.key === o
544
+ function pe(l) {
545
+ var a;
546
+ return (((a = d.value) == null ? void 0 : a.attributeOptions) ?? []).find(
547
+ (o) => o.key === l
535
548
  ) ?? null;
536
549
  }
537
- function Ce(o) {
538
- var y;
539
- const l = P.value.filter((U) => U.key !== o.key).map((U) => U.attribute), n = H.value.trim().toLowerCase();
540
- return (((y = p.value) == null ? void 0 : y.attributeOptions) ?? []).filter((U) => !l.includes(U.key)).map((U) => ({
541
- label: e(U.label),
542
- value: U.key
543
- })).filter((U) => !n || U.label.toLowerCase().includes(n));
550
+ function Se(l) {
551
+ var f;
552
+ const a = D.value.filter((R) => R.key !== l.key).map((R) => R.attribute), o = J.value.trim().toLowerCase();
553
+ return (((f = d.value) == null ? void 0 : f.attributeOptions) ?? []).filter((R) => !a.includes(R.key)).map((R) => ({
554
+ label: e(R.label, R.labelParams ?? {}),
555
+ value: R.key
556
+ })).filter((R) => !o || R.label.toLowerCase().includes(o));
544
557
  }
545
- function Fe(o) {
546
- var n;
547
- const l = J.value.trim().toLowerCase();
548
- return (((n = de(o.attribute)) == null ? void 0 : n.values) ?? []).map((y) => ({
558
+ function $e(l) {
559
+ var o;
560
+ const a = Q.value.trim().toLowerCase();
561
+ return (((o = pe(l.attribute)) == null ? void 0 : o.values) ?? []).map((f) => ({
549
562
  // Display text, not a code: a value is business data shown verbatim.
550
- label: y.label,
551
- // FmSelect needs a primitive; `null` is a real stored value, so it is
552
- // carried as a sentinel here and mapped back on save.
553
- value: y.value === null ? Z : y.value
563
+ label: f.label,
564
+ // FmSelect needs a primitive; a value travels as its key.
565
+ value: fe(f.value),
566
+ selected: l.values.includes(f.value)
554
567
  })).filter(
555
- (y) => !l || y.label.toLowerCase().includes(l) || // A chosen value stays listed while filtering, so FmSelect keeps it.
556
- o.values.includes(y.value)
557
- );
568
+ (f) => !a || f.label.toLowerCase().includes(a) || // A chosen value stays listed while filtering, so FmSelect keeps it.
569
+ f.selected
570
+ ).map(({ label: f, value: R }) => ({ label: f, value: R }));
558
571
  }
559
- function Se(o) {
560
- const l = de(o.attribute);
561
- return o.values.map(
562
- (n) => {
563
- var y;
564
- return ((y = l == null ? void 0 : l.values.find(
565
- (U) => (U.value === null ? Z : U.value) === n
566
- )) == null ? void 0 : y.label) ?? String(n);
572
+ function Ve(l) {
573
+ const a = pe(l.attribute);
574
+ return l.values.map(
575
+ (o) => {
576
+ var f;
577
+ return ((f = a == null ? void 0 : a.values.find((R) => R.value === o)) == null ? void 0 : f.label) ?? String(o);
567
578
  }
568
579
  ).join(", ");
569
580
  }
570
- function q(o, l) {
571
- return ae.value.find(
572
- (n) => n.field === `conditions.${o}.${l}`
581
+ function G(l, a) {
582
+ return oe.value.find(
583
+ (o) => o.field === `conditions.${l}.${a}`
573
584
  ) ?? null;
574
585
  }
575
- function X(o) {
576
- G.value = (o == null ? void 0 : o.id) ?? null, ue.value = !!o && o.conditions.length > 0, P.value = o != null && o.conditions.length ? o.conditions.map((l) => ({
577
- ...Q(),
578
- attribute: l.attribute,
579
- operator: l.operator,
580
- values: l.values.map(
581
- (n) => n === null ? Z : n
582
- )
583
- })) : [Q()], ae.value = [], H.value = "", J.value = "", g.value = !0;
586
+ function Y(l) {
587
+ ae.value = (l == null ? void 0 : l.id) ?? null, ce.value = !!l && l.conditions.length > 0, D.value = l != null && l.conditions.length ? l.conditions.map((a) => ({
588
+ ...X(),
589
+ attribute: a.attribute,
590
+ operator: a.operator,
591
+ values: [...a.values]
592
+ })) : [X()], oe.value = [], J.value = "", Q.value = "", M.value = !0;
593
+ }
594
+ function Re() {
595
+ D.value = [...D.value, X()];
596
+ }
597
+ function Te(l) {
598
+ const a = D.value.filter((o) => o.key !== l);
599
+ D.value = a.length > 0 ? a : [X()];
584
600
  }
585
- function $e() {
586
- P.value = [...P.value, Q()];
601
+ function Ue(l, a) {
602
+ l.attribute = a, l.values = [];
587
603
  }
588
- function Re(o) {
589
- const l = P.value.filter((n) => n.key !== o);
590
- P.value = l.length > 0 ? l : [Q()];
604
+ function Me(l) {
605
+ return ie(l.operator) === "text";
591
606
  }
592
- function Ve(o, l) {
593
- o.attribute = l, o.values = [];
607
+ function Ae(l, a) {
608
+ const o = ie(l.operator);
609
+ l.operator = a, ie(l.operator) !== o && (l.values = []);
594
610
  }
595
- function Te() {
596
- if (!m.value) return;
597
- const o = P.value.map((n) => ({
598
- attribute: n.attribute,
599
- operator: n.operator,
600
- values: n.values.map((y) => y === Z ? null : y)
601
- })), l = G.value ? m.value.updateRule(G.value, o) : m.value.addRule(o);
602
- if (l.kind === "rejected") {
603
- ae.value = l.issues;
611
+ function Ie() {
612
+ if (!k.value) return;
613
+ const l = D.value.map((o) => ({
614
+ attribute: o.attribute,
615
+ operator: o.operator,
616
+ values: [...o.values]
617
+ })), a = ae.value ? k.value.updateRule(ae.value, l) : k.value.addRule(l);
618
+ if (a.kind === "rejected") {
619
+ oe.value = a.issues;
604
620
  return;
605
621
  }
606
- g.value = !1;
622
+ M.value = !1;
607
623
  }
608
- function Ue(o) {
609
- return `${e("menu.rule_groups.condition_view.rule")} ${o + 1}`;
624
+ function Le(l) {
625
+ return `${e("menu.rule_groups.condition_view.rule")} ${l + 1}`;
610
626
  }
611
- const Y = M(
627
+ const Z = U(
612
628
  () => {
613
- var o;
614
- return (((o = p.value) == null ? void 0 : o.rules) ?? []).map((l) => ({ id: l.id, rule: l }));
629
+ var l;
630
+ return (((l = d.value) == null ? void 0 : l.rules) ?? []).map((a) => ({ id: a.id, rule: a }));
615
631
  }
616
632
  );
617
- function Me(o) {
618
- var l;
619
- (l = m.value) == null || l.reorderRules(o.map((n) => n.id));
633
+ function Be(l) {
634
+ var a;
635
+ (a = k.value) == null || a.reorderRules(l.map((o) => o.id));
620
636
  }
621
- function Ae(o) {
622
- var l;
623
- (l = m.value) == null || l.duplicateRule(o);
637
+ function Pe(l) {
638
+ var a;
639
+ (a = k.value) == null || a.duplicateRule(l);
624
640
  }
625
- function Le(o) {
626
- var l;
627
- (l = m.value) == null || l.removeRule(o);
641
+ function je(l) {
642
+ var a;
643
+ (a = k.value) == null || a.removeRule(l);
628
644
  }
629
- async function Be() {
630
- const o = m.value;
631
- if (!o) return;
632
- (await f(() => o.submit(), {
645
+ async function Ge() {
646
+ const l = k.value;
647
+ if (!l) return;
648
+ (await c(() => l.submit(), {
633
649
  successMessage: e("menu.rule_groups.saved_successfully"),
634
650
  showLoading: () => {
635
- var n;
636
- return ((n = p.value) == null ? void 0 : n.status) === "submitting";
651
+ var o;
652
+ return ((o = d.value) == null ? void 0 : o.status) === "submitting";
637
653
  }
638
654
  })).kind === "success" && j();
639
655
  }
640
- async function Ie(o) {
641
- await f(() => _.sdk.menuSetting.copyRuleGroup(o.id), {
656
+ async function De(l) {
657
+ await c(() => p.sdk.menuSetting.copyRuleGroup(l.id), {
642
658
  successMessage: e("menu.rule_groups.saved_successfully")
643
659
  });
644
660
  }
645
- function me(o) {
646
- S.open({
661
+ function _e(l) {
662
+ g.open({
647
663
  title: e("menu.rule_groups.delete_dialog.title"),
648
664
  message: e("menu.rule_groups.delete_dialog.message", {
649
- name: o.name
665
+ name: l.name
650
666
  }),
651
667
  // Destructive, as legacy renders it (`LinkProductRuleGroups.vue:123`).
652
668
  primaryActions: {
@@ -659,12 +675,12 @@ const We = {
659
675
  close: !0
660
676
  }
661
677
  }).onPrimary(async () => {
662
- await f(() => _.sdk.menuSetting.removeRuleGroup(o.id), {
678
+ await c(() => p.sdk.menuSetting.removeRuleGroup(l.id), {
663
679
  successMessage: e("menu.rule_groups.saved_successfully")
664
- }), S.close();
680
+ }), g.close();
665
681
  });
666
682
  }
667
- const je = M(() => [
683
+ const ze = U(() => [
668
684
  {
669
685
  accessorKey: "name",
670
686
  enableSorting: !0,
@@ -683,138 +699,138 @@ const We = {
683
699
  // Both actions are icon-only in legacy and carry NO accessible name.
684
700
  // The new app gives them one here; without it neither a locator nor a
685
701
  // screen reader can tell them apart.
686
- cell: (o) => D("div", { class: "px-4 flex justify-end" }, [
687
- D(te.FmButton, {
702
+ cell: (l) => N("div", { class: "px-4 flex justify-end" }, [
703
+ N(te.FmButton, {
688
704
  icon: "file_copy",
689
705
  variant: "tertiary",
690
706
  textColor: "neutral-gray-400",
691
707
  "aria-label": e("menu.menu_setting.rule_groups.copy_action"),
692
- disabled: o.row.original.copy.state !== "allowed",
693
- onClick: R(
694
- () => Ie(o.row.original),
708
+ disabled: l.row.original.copy.state !== "allowed",
709
+ onClick: T(
710
+ () => De(l.row.original),
695
711
  ["stop", "prevent"]
696
712
  )
697
713
  }),
698
- D(te.FmButton, {
714
+ N(te.FmButton, {
699
715
  icon: "delete",
700
716
  variant: "tertiary",
701
717
  textColor: "neutral-gray-400",
702
718
  "aria-label": e("menu.menu_setting.rule_groups.delete_action"),
703
- disabled: o.row.original.remove.state !== "allowed",
704
- onClick: R(
705
- () => me(o.row.original),
719
+ disabled: l.row.original.remove.state !== "allowed",
720
+ onClick: T(
721
+ () => _e(l.row.original),
706
722
  ["stop", "prevent"]
707
723
  )
708
724
  })
709
725
  ])
710
726
  }
711
727
  ]);
712
- return (o, l) => {
713
- const n = x("FmButton"), y = x("FmSearch"), U = x("FmTable"), pe = x("FmTextField"), Pe = x("FmMenu"), Ge = x("FmHelperText"), _e = x("FmSideSheet"), ne = x("FmSelect");
714
- return V.value ? (r(), k("div", at, [
715
- d.value ? (r(), k("div", dt, [
716
- a("div", mt, [
717
- a("div", pt, [
718
- i(y, {
719
- "model-value": V.value.query,
728
+ return (l, a) => {
729
+ const o = C("FmButton"), f = C("FmSearch"), R = C("FmTable"), ne = C("FmTextField"), Oe = C("FmMenu"), Ne = C("FmHelperText"), ve = C("FmSideSheet"), se = C("FmSelect");
730
+ return h.value ? (i(), y("div", ct, [
731
+ I.value ? (i(), y("div", bt, [
732
+ n("div", ft, [
733
+ n("div", yt, [
734
+ u(f, {
735
+ "model-value": h.value.query,
720
736
  autofocus: "",
721
737
  class: "w-full",
722
738
  placeholder: t(e)("menu.rule_groups.search_placeholder"),
723
- "onUpdate:modelValue": l[3] || (l[3] = (s) => o.sdk.menuSetting.searchRuleGroups(String(s ?? "")))
739
+ "onUpdate:modelValue": a[3] || (a[3] = (s) => l.sdk.menuSetting.searchRuleGroups(String(s ?? "")))
724
740
  }, null, 8, ["model-value", "placeholder"])
725
741
  ]),
726
- i(n, {
742
+ u(o, {
727
743
  icon: "add",
728
744
  variant: "secondary",
729
745
  "aria-label": t(e)("menu.rule_groups.create_group"),
730
- disabled: V.value.create.state !== "allowed",
731
- onClick: l[4] || (l[4] = (s) => O())
746
+ disabled: h.value.create.state !== "allowed",
747
+ onClick: a[4] || (a[4] = (s) => K())
732
748
  }, null, 8, ["aria-label", "disabled"])
733
749
  ]),
734
- a("div", _t, [
735
- (r(!0), k(z, null, K(V.value.rows, (s) => (r(), k("div", {
750
+ n("div", ht, [
751
+ (i(!0), y(O, null, W(h.value.rows, (s) => (i(), y("div", {
736
752
  key: s.id,
737
753
  class: "flex flex-row py-12 px-16 cursor-pointer",
738
- onClick: ($) => O(s.id)
754
+ onClick: (x) => K(s.id)
739
755
  }, [
740
- a("div", gt, [
741
- a("p", bt, h(s.name), 1),
742
- s.description ? (r(), k("p", ft, h(s.description), 1)) : L("", !0)
756
+ n("div", xt, [
757
+ n("p", wt, w(s.name), 1),
758
+ s.description ? (i(), y("p", Ct, w(s.description), 1)) : A("", !0)
743
759
  ]),
744
- i(n, {
760
+ u(o, {
745
761
  "text-color": "neutral-gray-400",
746
762
  variant: "tertiary",
747
763
  icon: "delete",
748
764
  "aria-label": t(e)("menu.menu_setting.rule_groups.delete_action"),
749
765
  disabled: s.remove.state !== "allowed",
750
- onClick: R(($) => me(s), ["stop"])
766
+ onClick: T((x) => _e(s), ["stop"])
751
767
  }, null, 8, ["aria-label", "disabled", "onClick"])
752
- ], 8, vt))), 128))
768
+ ], 8, kt))), 128))
753
769
  ])
754
- ])) : (r(), k("div", nt, [
755
- a("div", st, [
756
- a("div", null, [
757
- a("h1", it, h(t(e)("menu.rule_groups.title")), 1),
758
- a("p", ut, h(t(e)("menu.rule_groups.description")), 1)
770
+ ])) : (i(), y("div", dt, [
771
+ n("div", mt, [
772
+ n("div", null, [
773
+ n("h1", pt, w(t(e)("menu.rule_groups.title")), 1),
774
+ n("p", _t, w(t(e)("menu.rule_groups.description")), 1)
759
775
  ]),
760
- i(n, {
776
+ u(o, {
761
777
  label: t(e)("menu.rule_groups.create_group"),
762
778
  "prepend-icon": "add",
763
- disabled: V.value.create.state !== "allowed",
764
- onClick: l[0] || (l[0] = (s) => O())
779
+ disabled: h.value.create.state !== "allowed",
780
+ onClick: a[0] || (a[0] = (s) => K())
765
781
  }, null, 8, ["label", "disabled"])
766
782
  ]),
767
- a("div", rt, [
768
- a("div", ct, [
769
- i(y, {
770
- "model-value": V.value.query,
783
+ n("div", vt, [
784
+ n("div", gt, [
785
+ u(f, {
786
+ "model-value": h.value.query,
771
787
  autofocus: "",
772
788
  class: "mb-8",
773
789
  placeholder: t(e)("menu.rule_groups.search_placeholder"),
774
- "onUpdate:modelValue": l[1] || (l[1] = (s) => o.sdk.menuSetting.searchRuleGroups(String(s ?? "")))
790
+ "onUpdate:modelValue": a[1] || (a[1] = (s) => l.sdk.menuSetting.searchRuleGroups(String(s ?? "")))
775
791
  }, null, 8, ["model-value", "placeholder"])
776
792
  ])
777
793
  ]),
778
- i(he, null, {
779
- default: b(() => [
780
- i(U, {
781
- "column-defs": je.value,
782
- "row-data": T.value,
783
- "page-size": Math.max(T.value.length, 1),
794
+ u(xe, null, {
795
+ default: v(() => [
796
+ u(R, {
797
+ "column-defs": ze.value,
798
+ "row-data": r.value,
799
+ "page-size": Math.max(r.value.length, 1),
784
800
  "hide-footer": "",
785
- onRowClick: l[2] || (l[2] = (s) => O(s.original.id))
801
+ onRowClick: a[2] || (a[2] = (s) => K(s.original.id))
786
802
  }, null, 8, ["column-defs", "row-data", "page-size"])
787
803
  ]),
788
804
  _: 1
789
805
  })
790
806
  ])),
791
- u.value && p.value ? (r(), F(_e, {
807
+ $.value && d.value ? (i(), S(ve, {
792
808
  key: 2,
793
- "model-value": u.value,
809
+ "model-value": $.value,
794
810
  "max-width": 760,
795
- "onOn:clickedAway": oe
811
+ "onOn:clickedAway": V
796
812
  }, {
797
- "side-sheet-header": b(() => [
798
- i(n, {
813
+ "side-sheet-header": v(() => [
814
+ u(o, {
799
815
  variant: "tertiary",
800
816
  class: "cursor-pointer mr-4",
801
817
  "prepend-icon": "arrow_back",
802
818
  "aria-label": t(e)("menu.common.actions.back"),
803
819
  onClick: j
804
820
  }, null, 8, ["aria-label"]),
805
- a("p", yt, h(p.value.mode === "create" ? t(e)("menu.rule_groups.create_group") : t(e)("menu.rule_groups.edit_group")), 1)
821
+ n("p", Ft, w(d.value.mode === "create" ? t(e)("menu.rule_groups.create_group") : t(e)("menu.rule_groups.edit_group")), 1)
806
822
  ]),
807
- "side-sheet-footer": b(() => [
808
- a("div", Pt, [
809
- i(n, {
823
+ "side-sheet-footer": v(() => [
824
+ n("div", Et, [
825
+ u(o, {
810
826
  label: t(e)("menu.common.actions.save"),
811
827
  size: "lg",
812
828
  variant: "primary",
813
- disabled: p.value.submit.state !== "allowed",
814
- loading: p.value.status === "submitting",
815
- onClick: Be
829
+ disabled: d.value.submit.state !== "allowed",
830
+ loading: d.value.status === "submitting",
831
+ onClick: Ge
816
832
  }, null, 8, ["label", "disabled", "loading"]),
817
- i(n, {
833
+ u(o, {
818
834
  label: t(e)("menu.common.actions.cancel"),
819
835
  size: "lg",
820
836
  variant: "tertiary",
@@ -822,117 +838,120 @@ const We = {
822
838
  }, null, 8, ["label"])
823
839
  ])
824
840
  ]),
825
- default: b(() => [
826
- a("div", ht, [
827
- i(ee, {
841
+ default: v(() => [
842
+ n("div", St, [
843
+ u(ee, {
828
844
  title: t(e)("menu.rule_groups.form.basic_info")
829
845
  }, {
830
- default: b(() => [
831
- a("div", kt, [
832
- i(pe, {
833
- "model-value": p.value.name,
846
+ default: v(() => [
847
+ n("div", $t, [
848
+ u(ne, {
849
+ "model-value": d.value.name,
834
850
  label: t(e)("menu.rule_groups.form.name"),
835
851
  "label-mark": "required",
836
852
  placeholder: t(e)("menu.rule_groups.form.name_placeholder"),
837
- "helper-state": p.value.nameIssue ? "error" : "none",
838
- "helper-text": p.value.nameIssue ? t(v)(p.value.nameIssue) : "",
839
- "onUpdate:modelValue": l[5] || (l[5] = (s) => {
840
- var $;
841
- return ($ = m.value) == null ? void 0 : $.setName(String(s ?? ""));
853
+ "helper-state": d.value.nameIssue ? "error" : "none",
854
+ "helper-text": d.value.nameIssue ? t(F)(d.value.nameIssue) : "",
855
+ "onUpdate:modelValue": a[5] || (a[5] = (s) => {
856
+ var x;
857
+ return (x = k.value) == null ? void 0 : x.setName(String(s ?? ""));
842
858
  })
843
859
  }, null, 8, ["model-value", "label", "placeholder", "helper-state", "helper-text"]),
844
- i(pe, {
845
- "model-value": p.value.description,
860
+ u(ne, {
861
+ "model-value": d.value.description,
846
862
  label: t(e)("menu.rule_groups.form.description"),
847
863
  "label-mark": "optional",
848
864
  placeholder: t(e)("menu.rule_groups.form.description_placeholder"),
849
- "onUpdate:modelValue": l[6] || (l[6] = (s) => {
850
- var $;
851
- return ($ = m.value) == null ? void 0 : $.setDescription(String(s ?? ""));
865
+ "onUpdate:modelValue": a[6] || (a[6] = (s) => {
866
+ var x;
867
+ return (x = k.value) == null ? void 0 : x.setDescription(String(s ?? ""));
852
868
  })
853
869
  }, null, 8, ["model-value", "label", "placeholder"])
854
870
  ])
855
871
  ]),
856
872
  _: 1
857
873
  }, 8, ["title"]),
858
- i(ee, {
874
+ u(ee, {
859
875
  title: t(e)("menu.rule_groups.form.rules"),
860
876
  "sub-title": t(e)("menu.rule_groups.form.rules_description")
861
877
  }, {
862
- default: b(() => [
863
- Y.value.length > 0 ? (r(), k(z, { key: 0 }, [
864
- i(t(Ne), {
865
- "model-value": Y.value,
878
+ default: v(() => [
879
+ Z.value.length > 0 ? (i(), y(O, { key: 0 }, [
880
+ u(t(We), {
881
+ "model-value": Z.value,
866
882
  "item-key": "id",
867
883
  handle: ".rule-drag-handle",
868
- "onUpdate:modelValue": Me
884
+ "onUpdate:modelValue": Be
869
885
  }, {
870
- item: b(({ element: s, index: $ }) => [
871
- a("div", xt, [
872
- a("div", wt, [
873
- i(n, {
886
+ item: v(({ element: s, index: x }) => [
887
+ n("div", Vt, [
888
+ n("div", Rt, [
889
+ u(o, {
874
890
  class: "rule-drag-handle cursor-grab",
875
891
  variant: "tertiary",
876
892
  "prepend-icon": "drag_indicator",
877
893
  "aria-label": t(e)("menu.menu_setting.rule_groups.reorder_rule")
878
894
  }, null, 8, ["aria-label"]),
879
- a("div", Ct, [
880
- a("div", Ft, [
881
- a("div", St, [
882
- a("p", $t, h(Ue($)), 1),
883
- a("div", Rt, [
884
- i(n, {
895
+ n("div", Tt, [
896
+ n("div", Ut, [
897
+ n("div", Mt, [
898
+ n("p", At, w(Le(x)), 1),
899
+ n("div", It, [
900
+ u(o, {
885
901
  variant: "tertiary",
886
902
  class: "cursor-pointer",
887
903
  "prepend-icon": "edit",
888
904
  "text-color": "primary",
889
905
  "aria-label": t(e)("menu.link_product.rules.edit_rule"),
890
- onClick: R((C) => X(s.rule), ["stop"])
906
+ onClick: T((_) => Y(s.rule), ["stop"])
891
907
  }, null, 8, ["aria-label", "onClick"]),
892
- i(n, {
908
+ u(o, {
893
909
  variant: "tertiary",
894
910
  class: "cursor-pointer",
895
911
  "prepend-icon": "file_copy",
896
912
  "text-color": "primary",
897
913
  "aria-label": t(e)("menu.menu_setting.rule_groups.copy_rule"),
898
- onClick: R((C) => Ae(s.id), ["stop"])
914
+ onClick: T((_) => Pe(s.id), ["stop"])
899
915
  }, null, 8, ["aria-label", "onClick"]),
900
- i(n, {
916
+ u(o, {
901
917
  variant: "tertiary",
902
918
  class: "cursor-pointer",
903
919
  "prepend-icon": "delete",
904
920
  "text-color": "typo-error",
905
921
  "aria-label": t(e)("menu.menu_setting.rule_groups.remove_rule"),
906
- onClick: R((C) => Le(s.id), ["stop"])
922
+ onClick: T((_) => je(s.id), ["stop"])
907
923
  }, null, 8, ["aria-label", "onClick"])
908
924
  ])
909
925
  ]),
910
- a("div", Vt, [
911
- a("p", Tt, h(t(e)("menu.rule_groups.condition_view.when")), 1),
912
- (r(!0), k(z, null, K(s.rule.conditions, (C, ve) => (r(), k("div", {
913
- key: ve,
926
+ n("div", Lt, [
927
+ n("p", Bt, w(t(e)("menu.rule_groups.condition_view.when")), 1),
928
+ (i(!0), y(O, null, W(s.rule.conditions, (_, ge) => (i(), y("div", {
929
+ key: ge,
914
930
  class: "flex w-full items-center space-x-8"
915
931
  }, [
916
- a("p", Ut, h(ve + 1) + ".", 1),
917
- a("div", Mt, [
918
- a("p", At, h(t(e)(C.attributeLabel)), 1),
919
- a("p", Lt, h(we(C.operator)), 1),
920
- i(Pe, {
932
+ n("p", Pt, w(ge + 1) + ".", 1),
933
+ n("div", jt, [
934
+ n("p", Gt, w(t(e)(
935
+ _.attributeLabel,
936
+ _.attributeLabelParams ?? {}
937
+ )), 1),
938
+ n("p", Dt, w(Fe(_.operator)), 1),
939
+ u(Oe, {
921
940
  trigger: "hover",
922
941
  "close-on-mouse-leave": ""
923
942
  }, {
924
- "menu-button": b(() => [
925
- a("p", {
943
+ "menu-button": v(() => [
944
+ n("p", {
926
945
  class: "text-fm-color-primary underline underline-offset-2 cursor-pointer truncate",
927
- onClick: R((se) => X(s.rule), ["stop"])
928
- }, h(C.valueLabels.join(", ")), 9, Bt)
946
+ onClick: T((ue) => Y(s.rule), ["stop"])
947
+ }, w(_.valueLabels.join(", ")), 9, zt)
929
948
  ]),
930
- default: b(() => [
931
- (r(!0), k(z, null, K(C.valueLabels, (se) => (r(), k("div", {
932
- key: se,
949
+ default: v(() => [
950
+ (i(!0), y(O, null, W(_.valueLabels, (ue) => (i(), y("div", {
951
+ key: ue,
933
952
  class: "flex flex-col px-8 space-y-8"
934
953
  }, [
935
- a("p", null, h(se), 1)
954
+ n("p", null, w(ue), 1)
936
955
  ]))), 128))
937
956
  ]),
938
957
  _: 2
@@ -943,99 +962,99 @@ const We = {
943
962
  ])
944
963
  ])
945
964
  ]),
946
- Y.value.length > 1 && $ < Y.value.length - 1 ? (r(), k("div", It, [
947
- a("span", jt, h(t(e)("menu.rule_groups.condition_view.or")), 1)
948
- ])) : L("", !0)
965
+ Z.value.length > 1 && x < Z.value.length - 1 ? (i(), y("div", Ot, [
966
+ n("span", Nt, w(t(e)("menu.rule_groups.condition_view.or")), 1)
967
+ ])) : A("", !0)
949
968
  ])
950
969
  ]),
951
970
  _: 1
952
971
  }, 8, ["model-value"]),
953
- a("div", null, [
954
- i(n, {
972
+ n("div", null, [
973
+ u(o, {
955
974
  variant: "primary",
956
975
  label: t(e)("menu.link_product.rules.add_rule"),
957
976
  "prepend-icon": "add",
958
- onClick: l[7] || (l[7] = R((s) => X(), ["stop"]))
977
+ onClick: a[7] || (a[7] = T((s) => Y(), ["stop"]))
959
978
  }, null, 8, ["label"])
960
979
  ])
961
- ], 64)) : (r(), F(t(ye), {
980
+ ], 64)) : (i(), S(t(ke), {
962
981
  key: 1,
963
982
  title: "",
964
983
  subtitle: t(e)("menu.rule_groups.condition_view.empty_data.no_rule_available"),
965
984
  action: {
966
985
  text: t(e)("menu.link_product.rules.add_rule"),
967
- callback: () => X()
986
+ callback: () => Y()
968
987
  }
969
988
  }, null, 8, ["subtitle", "action"])),
970
- p.value.rulesIssue ? (r(), F(Ge, {
989
+ d.value.rulesIssue ? (i(), S(Ne, {
971
990
  key: 2,
972
991
  state: "error",
973
- text: t(v)(p.value.rulesIssue)
974
- }, null, 8, ["text"])) : L("", !0)
992
+ text: t(F)(d.value.rulesIssue)
993
+ }, null, 8, ["text"])) : A("", !0)
975
994
  ]),
976
995
  _: 1
977
996
  }, 8, ["title", "sub-title"])
978
997
  ])
979
998
  ]),
980
999
  _: 1
981
- }, 8, ["model-value"])) : L("", !0),
982
- g.value ? (r(), F(_e, {
1000
+ }, 8, ["model-value"])) : A("", !0),
1001
+ M.value ? (i(), S(ve, {
983
1002
  key: 3,
984
- "model-value": g.value,
1003
+ "model-value": M.value,
985
1004
  "max-width": 760,
986
1005
  "close-button": !1,
987
- "onOn:clickedAway": l[15] || (l[15] = (s) => g.value = !1)
1006
+ "onOn:clickedAway": a[15] || (a[15] = (s) => M.value = !1)
988
1007
  }, {
989
- "side-sheet-header": b(() => [
990
- a("div", Gt, [
991
- i(n, {
1008
+ "side-sheet-header": v(() => [
1009
+ n("div", qt, [
1010
+ u(o, {
992
1011
  variant: "tertiary",
993
1012
  "prepend-icon": "arrow_back",
994
1013
  "aria-label": t(e)("menu.common.actions.back"),
995
- onClick: l[8] || (l[8] = R((s) => g.value = !1, ["stop"]))
1014
+ onClick: a[8] || (a[8] = T((s) => M.value = !1, ["stop"]))
996
1015
  }, null, 8, ["aria-label"]),
997
- a("div", zt, h(ue.value ? t(e)("menu.rule_groups.condition_view.edit_condition") : t(e)("menu.rule_groups.condition_view.add_condition")), 1)
1016
+ n("div", Kt, w(ce.value ? t(e)("menu.rule_groups.condition_view.edit_condition") : t(e)("menu.rule_groups.condition_view.add_condition")), 1)
998
1017
  ])
999
1018
  ]),
1000
- "side-sheet-footer": b(() => [
1001
- a("div", Kt, [
1002
- i(n, {
1019
+ "side-sheet-footer": v(() => [
1020
+ n("div", Zt, [
1021
+ u(o, {
1003
1022
  variant: "primary",
1004
1023
  label: t(e)("menu.common.actions.save"),
1005
- onClick: Te
1024
+ onClick: Ie
1006
1025
  }, null, 8, ["label"]),
1007
- i(n, {
1026
+ u(o, {
1008
1027
  variant: "secondary",
1009
1028
  label: t(e)("menu.common.actions.cancel"),
1010
- onClick: l[14] || (l[14] = R((s) => g.value = !1, ["stop"]))
1029
+ onClick: a[14] || (a[14] = T((s) => M.value = !1, ["stop"]))
1011
1030
  }, null, 8, ["label"])
1012
1031
  ])
1013
1032
  ]),
1014
- default: b(() => [
1015
- a("div", Dt, [
1016
- a("p", Nt, h(t(e)("menu.rule_groups.condition_view.condition")), 1),
1017
- a("div", Et, [
1018
- (r(!0), k(z, null, K(P.value, (s, $) => (r(), k("div", {
1033
+ default: v(() => [
1034
+ n("div", Wt, [
1035
+ n("p", Ht, w(t(e)("menu.rule_groups.condition_view.condition")), 1),
1036
+ n("div", Jt, [
1037
+ (i(!0), y(O, null, W(D.value, (s, x) => (i(), y("div", {
1019
1038
  key: s.key,
1020
1039
  class: "flex justify-between gap-8"
1021
1040
  }, [
1022
- a("div", Ot, [
1023
- i(ne, {
1041
+ n("div", Qt, [
1042
+ u(se, {
1024
1043
  class: "flex w-full",
1025
1044
  "model-value": s.attribute,
1026
- items: Ce(s),
1045
+ items: Se(s),
1027
1046
  placeholder: t(e)("menu.rule_groups.condition_view.select_item"),
1028
1047
  "aria-label": t(e)("menu.menu_setting.rule_groups.condition.attribute"),
1029
- "onUpdate:modelValue": (C) => Ve(s, C)
1048
+ "onUpdate:modelValue": (_) => Ue(s, _)
1030
1049
  }, {
1031
- "prepend-menu": b(() => [
1032
- a("div", {
1033
- onClick: l[10] || (l[10] = R(() => {
1050
+ "prepend-menu": v(() => [
1051
+ n("div", {
1052
+ onClick: a[10] || (a[10] = T(() => {
1034
1053
  }, ["stop"]))
1035
1054
  }, [
1036
- i(y, {
1037
- modelValue: H.value,
1038
- "onUpdate:modelValue": l[9] || (l[9] = (C) => H.value = C),
1055
+ u(f, {
1056
+ modelValue: J.value,
1057
+ "onUpdate:modelValue": a[9] || (a[9] = (_) => J.value = _),
1039
1058
  class: "px-8",
1040
1059
  placeholder: t(e)("menu.menu_setting.rule_groups.filter_options")
1041
1060
  }, null, 8, ["modelValue", "placeholder"])
@@ -1043,122 +1062,136 @@ const We = {
1043
1062
  ]),
1044
1063
  _: 2
1045
1064
  }, 1032, ["model-value", "items", "placeholder", "aria-label", "onUpdate:modelValue"]),
1046
- i(ne, {
1065
+ u(se, {
1047
1066
  class: "flex w-full",
1048
1067
  "model-value": s.operator,
1049
- items: xe.value,
1068
+ items: Ce.value,
1050
1069
  placeholder: t(e)("menu.rule_groups.condition_view.select_item"),
1051
1070
  "aria-label": t(e)("menu.menu_setting.rule_groups.condition.operator"),
1052
- "helper-state": q($, "operator") ? "error" : "none",
1053
- "helper-text": q($, "operator") ? t(v)(q($, "operator")) : "",
1054
- "onUpdate:modelValue": (C) => s.operator = C
1071
+ "helper-state": G(x, "operator") ? "error" : "none",
1072
+ "helper-text": G(x, "operator") ? t(F)(G(x, "operator")) : "",
1073
+ "onUpdate:modelValue": (_) => Ae(s, _)
1055
1074
  }, null, 8, ["model-value", "items", "placeholder", "aria-label", "helper-state", "helper-text", "onUpdate:modelValue"]),
1056
- i(ne, {
1075
+ Me(s) ? qe((i(), y("div", Xt, [
1076
+ u(ne, {
1077
+ "model-value": String(s.values[0] ?? ""),
1078
+ placeholder: t(e)("menu.menu_setting.rule_groups.condition.value"),
1079
+ "helper-state": G(x, "values") ? "error" : "none",
1080
+ "helper-text": G(x, "values") ? t(F)(G(x, "values")) : "",
1081
+ "onUpdate:modelValue": (_) => s.values = _ === "" || _ == null ? [] : [String(_)]
1082
+ }, null, 8, ["model-value", "placeholder", "helper-state", "helper-text", "onUpdate:modelValue"])
1083
+ ])), [
1084
+ [
1085
+ b,
1086
+ t(e)("menu.menu_setting.rule_groups.condition.value")
1087
+ ]
1088
+ ]) : (i(), S(se, {
1089
+ key: 1,
1057
1090
  class: "flex w-full",
1058
- "model-value": s.values,
1059
- items: Fe(s),
1091
+ "model-value": s.values.map(t(fe)),
1092
+ items: $e(s),
1060
1093
  multiselect: "",
1061
1094
  "hide-chips": "",
1062
1095
  placeholder: t(e)("menu.rule_groups.condition_view.select_item"),
1063
1096
  "aria-label": t(e)("menu.menu_setting.rule_groups.condition.value"),
1064
- "helper-state": q($, "values") ? "error" : "none",
1065
- "helper-text": q($, "values") ? t(v)(q($, "values")) : "",
1066
- "onUpdate:modelValue": (C) => s.values = [...C]
1097
+ "helper-state": G(x, "values") ? "error" : "none",
1098
+ "helper-text": G(x, "values") ? t(F)(G(x, "values")) : "",
1099
+ "onUpdate:modelValue": (_) => s.values = _.map(t(Ye))
1067
1100
  }, {
1068
- default: b(() => [
1069
- a("div", qt, h(Se(s)), 1)
1101
+ default: v(() => [
1102
+ n("div", Yt, w(Ve(s)), 1)
1070
1103
  ]),
1071
- "prepend-menu": b(() => [
1072
- a("div", {
1104
+ "prepend-menu": v(() => [
1105
+ n("div", {
1073
1106
  class: "flex",
1074
- onClick: l[12] || (l[12] = R(() => {
1107
+ onClick: a[12] || (a[12] = T(() => {
1075
1108
  }, ["stop"]))
1076
1109
  }, [
1077
- i(y, {
1078
- modelValue: J.value,
1079
- "onUpdate:modelValue": l[11] || (l[11] = (C) => J.value = C),
1110
+ u(f, {
1111
+ modelValue: Q.value,
1112
+ "onUpdate:modelValue": a[11] || (a[11] = (_) => Q.value = _),
1080
1113
  class: "px-8",
1081
1114
  placeholder: t(e)("menu.menu_setting.rule_groups.filter_options")
1082
1115
  }, null, 8, ["modelValue", "placeholder"])
1083
1116
  ])
1084
1117
  ]),
1085
1118
  _: 2
1086
- }, 1032, ["model-value", "items", "placeholder", "aria-label", "helper-state", "helper-text", "onUpdate:modelValue"])
1119
+ }, 1032, ["model-value", "items", "placeholder", "aria-label", "helper-state", "helper-text", "onUpdate:modelValue"]))
1087
1120
  ]),
1088
- i(n, {
1121
+ u(o, {
1089
1122
  variant: "tertiary",
1090
1123
  "prepend-icon": "close",
1091
1124
  "aria-label": t(e)("menu.menu_setting.rule_groups.remove_condition"),
1092
- onClick: R((C) => Re(s.key), ["stop"])
1125
+ onClick: T((_) => Te(s.key), ["stop"])
1093
1126
  }, null, 8, ["aria-label", "onClick"])
1094
1127
  ]))), 128)),
1095
- i(n, {
1128
+ u(o, {
1096
1129
  variant: "plain",
1097
1130
  "prepend-icon": "add",
1098
1131
  label: t(e)("menu.rule_groups.condition_view.add_condition"),
1099
- onClick: l[13] || (l[13] = R((s) => $e(), ["stop"]))
1132
+ onClick: a[13] || (a[13] = T((s) => Re(), ["stop"]))
1100
1133
  }, null, 8, ["label"])
1101
1134
  ])
1102
1135
  ])
1103
1136
  ]),
1104
1137
  _: 1
1105
- }, 8, ["model-value"])) : L("", !0)
1106
- ])) : L("", !0);
1138
+ }, 8, ["model-value"])) : A("", !0)
1139
+ ])) : A("", !0);
1107
1140
  };
1108
1141
  }
1109
- }), Ht = { class: "flex h-full min-h-[240px] flex-col items-center justify-center gap-8 p-24 text-center" }, Jt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Qt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xt = /* @__PURE__ */ N({
1142
+ }), tl = { class: "flex h-full min-h-[240px] flex-col items-center justify-center gap-8 p-24 text-center" }, ll = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, al = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ol = /* @__PURE__ */ E({
1110
1143
  __name: "PlaceholderView",
1111
1144
  props: {
1112
1145
  module: {}
1113
1146
  },
1114
- setup(B) {
1115
- const { t: _ } = E();
1116
- return (e, v) => (r(), k("div", Ht, [
1117
- a("p", Jt, h(e.module), 1),
1118
- a("p", Qt, h(t(_)("menu.common.placeholder.not_migrated")), 1)
1147
+ setup(L) {
1148
+ const { t: p } = q();
1149
+ return (e, b) => (i(), y("div", tl, [
1150
+ n("p", ll, w(e.module), 1),
1151
+ n("p", al, w(t(p)("menu.common.placeholder.not_migrated")), 1)
1119
1152
  ]));
1120
1153
  }
1121
- }), Yt = { class: "py-16" }, cl = /* @__PURE__ */ N({
1154
+ }), nl = { class: "py-16" }, fl = /* @__PURE__ */ E({
1122
1155
  __name: "MenuSetting",
1123
- setup(B) {
1124
- const _ = Ee(), { t: e } = E(), v = W(_.menuSetting.tabs), S = {
1156
+ setup(L) {
1157
+ const p = He(), { t: e } = q(), b = H(p.menuSetting.tabs), F = {
1125
1158
  configuration: "menu.menu_setting.tabs.menu_configuration",
1126
1159
  priceGroup: "menu.menu_setting.tabs.price_group",
1127
1160
  memberPricing: "menu.menu_setting.tabs.member_pricing",
1128
1161
  ruleGroups: "menu.menu_setting.tabs.link_product_rule_groups"
1129
- }, f = M(
1130
- () => (v.value.status === "ready" ? v.value.value.tabs : []).filter((d) => d.capability.state !== "hidden").map((d) => ({
1131
- label: e(S[d.key]),
1132
- value: d.key
1162
+ }, g = U(
1163
+ () => (b.value.status === "ready" ? b.value.value.tabs : []).filter((m) => m.capability.state !== "hidden").map((m) => ({
1164
+ label: e(F[m.key]),
1165
+ value: m.key
1133
1166
  }))
1134
- ), c = I("configuration");
1135
- return (d, A) => {
1136
- const V = x("FmTabs");
1137
- return r(), F(ke, {
1167
+ ), c = P("configuration");
1168
+ return (m, I) => {
1169
+ const B = C("FmTabs");
1170
+ return i(), S(we, {
1138
1171
  heading: t(e)("menu.menu_setting.title")
1139
1172
  }, {
1140
- default: b(() => [
1141
- i(V, {
1173
+ default: v(() => [
1174
+ u(B, {
1142
1175
  "model-value": c.value,
1143
- items: f.value,
1144
- "onUpdate:modelValue": A[0] || (A[0] = (T) => c.value = T)
1176
+ items: g.value,
1177
+ "onUpdate:modelValue": I[0] || (I[0] = (h) => c.value = h)
1145
1178
  }, null, 8, ["model-value", "items"]),
1146
- a("div", Yt, [
1147
- c.value === "configuration" ? (r(), F(Qe, {
1179
+ n("div", nl, [
1180
+ c.value === "configuration" ? (i(), S(lt, {
1148
1181
  key: 0,
1149
- sdk: t(_)
1150
- }, null, 8, ["sdk"])) : c.value === "priceGroup" ? (r(), F(ot, {
1182
+ sdk: t(p)
1183
+ }, null, 8, ["sdk"])) : c.value === "priceGroup" ? (i(), S(rt, {
1151
1184
  key: 1,
1152
- sdk: t(_)
1153
- }, null, 8, ["sdk"])) : c.value === "memberPricing" ? (r(), F(Ye, {
1185
+ sdk: t(p)
1186
+ }, null, 8, ["sdk"])) : c.value === "memberPricing" ? (i(), S(ot, {
1154
1187
  key: 2,
1155
- sdk: t(_)
1156
- }, null, 8, ["sdk"])) : c.value === "ruleGroups" ? (r(), F(Wt, {
1188
+ sdk: t(p)
1189
+ }, null, 8, ["sdk"])) : c.value === "ruleGroups" ? (i(), S(el, {
1157
1190
  key: 3,
1158
- sdk: t(_)
1159
- }, null, 8, ["sdk"])) : (r(), F(Xt, {
1191
+ sdk: t(p)
1192
+ }, null, 8, ["sdk"])) : (i(), S(ol, {
1160
1193
  key: 4,
1161
- module: t(e)(S[c.value])
1194
+ module: t(e)(F[c.value])
1162
1195
  }, null, 8, ["module"]))
1163
1196
  ])
1164
1197
  ]),
@@ -1168,5 +1201,5 @@ const We = {
1168
1201
  }
1169
1202
  });
1170
1203
  export {
1171
- cl as default
1204
+ fl as default
1172
1205
  };