@feedmepos/mf-common 1.18.0-beta.4 → 1.18.0-beta.5

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.
@@ -1,7 +1,7 @@
1
- import { ref as C, computed as i, defineComponent as J, mergeModels as X, useModel as Y, watch as Z, resolveComponent as x, openBlock as v, createElementBlock as h, createElementVNode as k, createVNode as m, withCtx as O, normalizeClass as ee, toDisplayString as le, createCommentVNode as B, withModifiers as E, unref as y, Fragment as z, renderList as $, createBlock as D, renderSlot as te, nextTick as ae } from "vue";
2
- import { x as L, v as ne } from "./app-f61631fd.js";
1
+ import { ref as C, computed as i, defineComponent as J, mergeModels as X, useModel as Y, watch as Z, resolveComponent as S, openBlock as v, createElementBlock as b, createElementVNode as k, createVNode as m, withCtx as O, normalizeClass as ee, toDisplayString as le, createCommentVNode as B, withModifiers as E, unref as y, Fragment as z, renderList as $, createBlock as D, renderSlot as te, nextTick as ae } from "vue";
2
+ import { _ as L, h as ne } from "./app-9575c6c7.js";
3
3
  import { storeToRefs as re } from "pinia";
4
- import { n as ue, u as oe } from "./app-0c1cef77.js";
4
+ import { n as ue, u as oe } from "./app-4a06b8a0.js";
5
5
  import "@feedmepos/ui-library";
6
6
  import "vue-router";
7
7
  function se(p, t) {
@@ -9,15 +9,15 @@ function se(p, t) {
9
9
  var u, a;
10
10
  return !r.value && (!t.value || ((u = t.value) == null ? void 0 : u.length) === ((a = p.value) == null ? void 0 : a.length));
11
11
  }), g = i(() => {
12
- var u, a, f, b;
13
- return !!((u = t.value) != null && u.length && ((a = t.value) == null ? void 0 : a.length) > 0 && ((f = t.value) == null ? void 0 : f.length) < ((b = p.value) == null ? void 0 : b.length));
12
+ var u, a, f, h;
13
+ return !!((u = t.value) != null && u.length && ((a = t.value) == null ? void 0 : a.length) > 0 && ((f = t.value) == null ? void 0 : f.length) < ((h = p.value) == null ? void 0 : h.length));
14
14
  });
15
15
  return { allCleared: r, allSelected: n, indeterminate: g, toggleAll: () => {
16
16
  t.value = void 0, r.value = !r.value;
17
17
  }, toggleOption: (u) => {
18
- var f, b, w;
18
+ var f, h, w;
19
19
  let a;
20
- t.value === void 0 && r.value ? a = [u] : t.value === void 0 && !r.value ? a = (f = p.value.map((c) => c.value)) == null ? void 0 : f.filter((c) => c !== u) : (b = t.value) != null && b.includes(u) ? a = (w = t.value) == null ? void 0 : w.filter((c) => c !== u) : a = [...t.value || [], u], a.length === 0 ? (t.value = void 0, r.value = !0) : a.length === p.value.length ? (t.value = void 0, r.value = !1) : t.value = a;
20
+ t.value === void 0 && r.value ? a = [u] : t.value === void 0 && !r.value ? a = (f = p.value.map((c) => c.value)) == null ? void 0 : f.filter((c) => c !== u) : (h = t.value) != null && h.includes(u) ? a = (w = t.value) == null ? void 0 : w.filter((c) => c !== u) : a = [...t.value || [], u], a.length === 0 ? (t.value = void 0, r.value = !0) : a.length === p.value.length ? (t.value = void 0, r.value = !1) : t.value = a;
21
21
  } };
22
22
  }
23
23
  const ie = { class: "w-full flex flex-col gap-8" }, ce = { class: "flex items-center gap-8" }, de = { class: "inline-flex items-center" }, ve = { class: "flex flex-col w-[360px] min-h-0 gap-8" }, fe = { class: "flex gap-4 px-[6px]" }, me = { class: "flex-1" }, pe = { class: "flex-1 overflow-y-auto min-h-0" }, ge = { key: 0 }, Fe = /* @__PURE__ */ J({
@@ -48,7 +48,7 @@ const ie = { class: "w-full flex flex-col gap-8" }, ce = { class: "flex items-ce
48
48
  values: l
49
49
  };
50
50
  })), a = C(""), f = C(null);
51
- function b(e) {
51
+ function h(e) {
52
52
  var l;
53
53
  if (t.multiple)
54
54
  throw new Error("Single selection is not supported for multiple selection");
@@ -76,12 +76,12 @@ const ie = { class: "w-full flex flex-col gap-8" }, ce = { class: "flex items-ce
76
76
  }), U = i(() => {
77
77
  var e;
78
78
  return n.value ? ((e = w.value.find((l) => l.value === n.value)) == null ? void 0 : e.label) || r("portalshell.components.restaurantSelector.unknownRestaurant") : r("portalshell.components.restaurantSelector.selectRestaurant");
79
- }), N = i(() => t.multiple ? T.value : U.value), { allCleared: be, allSelected: Q, toggleAll: j, toggleOption: K, indeterminate: P } = se(
79
+ }), N = i(() => t.multiple ? T.value : U.value), { allCleared: he, allSelected: Q, toggleAll: j, toggleOption: K, indeterminate: P } = se(
80
80
  c,
81
81
  n
82
- ), S = C(!1), W = i(() => A.value.length > 0), V = C(null);
82
+ ), x = C(!1), W = i(() => A.value.length > 0), V = C(null);
83
83
  async function q() {
84
- t.disabled || (S.value ? S.value = !1 : (S.value = !0, await ae(), V.value && V.value.toggleProperty(!0)));
84
+ t.disabled || (x.value ? x.value = !1 : (x.value = !0, await ae(), V.value && V.value.toggleProperty(!0)));
85
85
  }
86
86
  const d = C((() => ({
87
87
  logic: "AND",
@@ -104,8 +104,8 @@ const ie = { class: "w-full flex flex-col gap-8" }, ce = { class: "flex items-ce
104
104
  l.length === 0 ? n.value = null : n.value = (e = l[0]) == null ? void 0 : e._id;
105
105
  }
106
106
  }), (e, l) => {
107
- const o = x("FmIcon"), _ = x("FmChip"), F = x("FmSearch"), R = x("FmMenuItem"), H = x("FmMenu");
108
- return v(), h("div", ie, [
107
+ const o = S("FmIcon"), _ = S("FmChip"), F = S("FmSearch"), R = S("FmMenuItem"), H = S("FmMenu");
108
+ return v(), b("div", ie, [
109
109
  k("div", ce, [
110
110
  m(H, {
111
111
  "close-on-click": !1,
@@ -127,7 +127,7 @@ const ie = { class: "w-full flex flex-col gap-8" }, ce = { class: "flex items-ce
127
127
  outline: "",
128
128
  size: "sm"
129
129
  }, null, 8, ["color"]),
130
- N.value ? (v(), h("div", {
130
+ N.value ? (v(), b("div", {
131
131
  key: 0,
132
132
  class: ee([
133
133
  "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap",
@@ -139,7 +139,7 @@ const ie = { class: "w-full flex flex-col gap-8" }, ce = { class: "flex items-ce
139
139
  name: "keyboard_arrow_down",
140
140
  size: "sm"
141
141
  }, null, 8, ["color"]),
142
- W.value ? (v(), h("div", {
142
+ W.value ? (v(), b("div", {
143
143
  key: 1,
144
144
  class: "pl-8 flex items-center justify-center border-l border-fm-color-neutral-gray-200",
145
145
  onClick: E(q, ["stop"])
@@ -170,7 +170,7 @@ const ie = { class: "w-full flex flex-col gap-8" }, ce = { class: "flex items-ce
170
170
  ])
171
171
  ]),
172
172
  k("div", pe, [
173
- e.multiple ? (v(), h(z, { key: 0 }, [
173
+ e.multiple ? (v(), b(z, { key: 0 }, [
174
174
  m(R, {
175
175
  label: "All",
176
176
  "has-checkbox": "",
@@ -178,7 +178,7 @@ const ie = { class: "w-full flex flex-col gap-8" }, ce = { class: "flex items-ce
178
178
  indeterminate: y(P),
179
179
  onClick: y(j)
180
180
  }, null, 8, ["model-value", "indeterminate", "onClick"]),
181
- (v(!0), h(z, null, $(c.value, (s) => {
181
+ (v(!0), b(z, null, $(c.value, (s) => {
182
182
  var M;
183
183
  return v(), D(R, {
184
184
  key: s.value,
@@ -188,10 +188,10 @@ const ie = { class: "w-full flex flex-col gap-8" }, ce = { class: "flex items-ce
188
188
  onClick: (ye) => y(K)(s.value)
189
189
  }, null, 8, ["label", "model-value", "onClick"]);
190
190
  }), 128))
191
- ], 64)) : (v(!0), h(z, { key: 1 }, $(c.value, (s) => (v(), D(R, {
191
+ ], 64)) : (v(!0), b(z, { key: 1 }, $(c.value, (s) => (v(), D(R, {
192
192
  key: s.value,
193
193
  label: s.label,
194
- onClick: (M) => b(s.value)
194
+ onClick: (M) => h(s.value)
195
195
  }, null, 8, ["label", "onClick"]))), 128))
196
196
  ])
197
197
  ])
@@ -200,7 +200,7 @@ const ie = { class: "w-full flex flex-col gap-8" }, ce = { class: "flex items-ce
200
200
  }, 8, ["disabled"]),
201
201
  te(e.$slots, "append-right")
202
202
  ]),
203
- S.value ? (v(), h("div", ge, [
203
+ x.value ? (v(), b("div", ge, [
204
204
  m(y(ne), {
205
205
  ref_key: "filterRef",
206
206
  ref: V,
@@ -35237,7 +35237,8 @@ const lW = HR("portal-core", () => {
35237
35237
  itemSelector: {
35238
35238
  productsSelected: "{count} product(s) selected",
35239
35239
  expandAll: "Expand all",
35240
- collapseAll: "Collapse all"
35240
+ collapseAll: "Collapse all",
35241
+ selectAll: "Select all"
35241
35242
  }
35242
35243
  }
35243
35244
  }, iW = {
@@ -35402,7 +35403,8 @@ const lW = HR("portal-core", () => {
35402
35403
  itemSelector: {
35403
35404
  productsSelected: "{count} 个产品已选择",
35404
35405
  expandAll: "展开所有",
35405
- collapseAll: "折叠所有"
35406
+ collapseAll: "折叠所有",
35407
+ selectAll: "全选"
35406
35408
  }
35407
35409
  }
35408
35410
  }, cW = {
@@ -38535,10 +38537,10 @@ function AM() {
38535
38537
  return localStorage.getItem("locale") !== i && localStorage.setItem("locale", i), i;
38536
38538
  }
38537
38539
  const PM = Vo(
38538
- () => import("./CustomAttributesForm-bf6dfb87.js")
38540
+ () => import("./CustomAttributesForm-6e7cfdb3.js")
38539
38541
  ), _M = Vo(
38540
- () => import("./RestaurantSelector-87f48f4d.js")
38541
- ), KM = Vo(() => import("./ItemSelector-bf8fda26.js"));
38542
+ () => import("./RestaurantSelector-8687e464.js")
38543
+ ), KM = Vo(() => import("./ItemSelector-90e1b8ca.js"));
38542
38544
  export {
38543
38545
  XM as A,
38544
38546
  xM as B,