@feedmepos/mf-common 1.26.7 → 1.26.8

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,5 +1,5 @@
1
1
  import { defineComponent as _, computed as m, resolveComponent as v, openBlock as c, createElementBlock as p, createVNode as k, toDisplayString as A, unref as N, h as V } from "vue";
2
- import { t as S, u as C } from "./app-e015b82b.js";
2
+ import { t as S, u as C } from "./app-2d272ee9.js";
3
3
  import { components as O } from "@feedmepos/ui-library";
4
4
  import { c as w } from "./object-27ce045b.js";
5
5
  import "pinia";
@@ -1,6 +1,6 @@
1
1
  import { ref as ct, computed as Le, defineComponent as si, onMounted as li, watch as Dn, resolveComponent as er, openBlock as Ve, createElementBlock as Xe, createElementVNode as Ge, toDisplayString as Pn, unref as Re, createVNode as Ye, isRef as $i, createCommentVNode as Ot, Fragment as nn, renderList as an, createBlock as tr, withCtx as on, normalizeClass as En, Transition as Mn } from "vue";
2
2
  import { _ as Un, h as ci } from "./app-9575c6c7.js";
3
- import { c as un, l as fe, e as Bt, a as ve, d as tt, b as He, f as di, u as Fn, g as pi, t as hi } from "./app-e015b82b.js";
3
+ import { c as un, l as fe, e as Bt, a as ve, d as tt, b as He, f as di, u as Fn, g as pi, t as hi } from "./app-2d272ee9.js";
4
4
  import { FmButtonVariant as zt } from "@feedmepos/ui-library";
5
5
  import { defineStore as fi } from "pinia";
6
6
  import { c as At } from "./object-27ce045b.js";
@@ -1,26 +1,26 @@
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 { storeToRefs as ne } from "pinia";
3
- import { _ as L, h as re } from "./app-9575c6c7.js";
4
- import { t as ue, u as oe } from "./app-e015b82b.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 f, 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 "pinia";
3
+ import { _ as L, h as ne } from "./app-9575c6c7.js";
4
+ import { t as re, u as ue } from "./app-2d272ee9.js";
5
5
  import "@feedmepos/ui-library";
6
6
  import "vue-router";
7
- function se(p, t) {
7
+ function oe(p, t) {
8
8
  const r = C(!0), n = i(() => {
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, 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));
12
+ var u, a, m, h;
13
+ return !!((u = t.value) != null && u.length && ((a = t.value) == null ? void 0 : a.length) > 0 && ((m = t.value) == null ? void 0 : m.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, h, w;
18
+ var m, 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) : (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;
20
+ t.value === void 0 && r.value ? a = [u] : t.value === void 0 && !r.value ? a = (m = p.value.map((c) => c.value)) == null ? void 0 : m.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
- 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({
23
+ const se = { class: "w-full flex flex-col gap-8" }, ie = { class: "flex items-center gap-8" }, ce = { class: "inline-flex items-center" }, de = { class: "flex flex-col w-[360px] min-h-0 gap-8" }, ve = { class: "flex gap-4 px-[6px]" }, me = { class: "flex-1" }, fe = { class: "flex-1 overflow-y-auto min-h-0" }, pe = { key: 0 }, xe = /* @__PURE__ */ J({
24
24
  __name: "RestaurantSelector",
25
25
  props: /* @__PURE__ */ X({
26
26
  multiple: { type: Boolean, default: !1 },
@@ -33,7 +33,7 @@ const ie = { class: "w-full flex flex-col gap-8" }, ce = { class: "flex items-ce
33
33
  }),
34
34
  emits: ["update:modelValue"],
35
35
  setup(p) {
36
- const t = p, { t: r } = ue(), n = Y(p, "modelValue"), { restaurants: g, restaurantAttributeSettings: A } = ne(oe());
36
+ const t = p, { t: r } = re(), n = Y(p, "modelValue"), { restaurants: g, restaurantAttributeSettings: A } = ue();
37
37
  function I(e) {
38
38
  const l = g.value.map((_) => {
39
39
  var F;
@@ -47,12 +47,12 @@ const ie = { class: "w-full flex flex-col gap-8" }, ce = { class: "flex items-ce
47
47
  ...e,
48
48
  values: l
49
49
  };
50
- })), a = C(""), f = C(null);
50
+ })), a = C(""), m = C(null);
51
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");
55
- n.value = e, (l = f.value) == null || l.toggleMenu(!1);
55
+ n.value = e, (l = m.value) == null || l.toggleMenu(!1);
56
56
  }
57
57
  const w = i(() => g.value.map((e) => ({
58
58
  label: e.profile.name,
@@ -65,7 +65,7 @@ const ie = { class: "w-full flex flex-col gap-8" }, ce = { class: "flex items-ce
65
65
  var l;
66
66
  return !((l = t.excludeRestaurants) != null && l.includes(e.value));
67
67
  })
68
- ), T = i(() => {
68
+ ), U = i(() => {
69
69
  var e;
70
70
  return n.value ? n.value.length === 1 ? (e = w.value.find((l) => {
71
71
  var o;
@@ -73,10 +73,10 @@ const ie = { class: "w-full flex flex-col gap-8" }, ce = { class: "flex items-ce
73
73
  })) == null ? void 0 : e.label : r("portalshell.components.restaurantSelector.restaurantCount", {
74
74
  count: n.value.length
75
75
  }) : r("portalshell.components.restaurantSelector.allRestaurants");
76
- }), U = i(() => {
76
+ }), j = 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: he, allSelected: Q, toggleAll: j, toggleOption: K, indeterminate: P } = se(
79
+ }), N = i(() => t.multiple ? U.value : j.value), { allCleared: ge, allSelected: Q, toggleAll: K, toggleOption: P, indeterminate: T } = oe(
80
80
  c,
81
81
  n
82
82
  ), x = C(!1), W = i(() => A.value.length > 0), V = C(null);
@@ -105,23 +105,23 @@ const ie = { class: "w-full flex flex-col gap-8" }, ce = { class: "flex items-ce
105
105
  }
106
106
  }), (e, l) => {
107
107
  const o = S("FmIcon"), _ = S("FmChip"), F = S("FmSearch"), R = S("FmMenuItem"), H = S("FmMenu");
108
- return v(), b("div", ie, [
109
- k("div", ce, [
110
- m(H, {
108
+ return v(), b("div", se, [
109
+ k("div", ie, [
110
+ f(H, {
111
111
  "close-on-click": !1,
112
112
  disabled: t.disabled,
113
113
  ref_key: "menuRef",
114
- ref: f,
114
+ ref: m,
115
115
  "z-index": 50,
116
116
  "selector-for-dismiss-away-event-exclusion": ".fm-dialog, .fm-select__menu__wrapper"
117
117
  }, {
118
118
  "menu-button": O(() => [
119
- k("div", de, [
120
- m(_, {
119
+ k("div", ce, [
120
+ f(_, {
121
121
  disabled: t.disabled
122
122
  }, {
123
123
  default: O(() => [
124
- m(o, {
124
+ f(o, {
125
125
  color: e.disabled ? "neutral-gray-200" : "neutral-gray-400",
126
126
  name: "storefront",
127
127
  outline: "",
@@ -134,7 +134,7 @@ const ie = { class: "w-full flex flex-col gap-8" }, ce = { class: "flex items-ce
134
134
  e.disabled ? "text-fm-color-neutral-gray-200" : "text-fm-color-neutral-gray-400"
135
135
  ])
136
136
  }, le(N.value), 3)) : B("", !0),
137
- m(o, {
137
+ f(o, {
138
138
  color: e.disabled ? "neutral-gray-200" : "neutral-gray-400",
139
139
  name: "keyboard_arrow_down",
140
140
  size: "sm"
@@ -144,7 +144,7 @@ const ie = { class: "w-full flex flex-col gap-8" }, ce = { class: "flex items-ce
144
144
  class: "pl-8 flex items-center justify-center border-l border-fm-color-neutral-gray-200",
145
145
  onClick: E(q, ["stop"])
146
146
  }, [
147
- m(o, {
147
+ f(o, {
148
148
  name: "filter_alt",
149
149
  size: "sm",
150
150
  outline: G.value === 0,
@@ -159,24 +159,24 @@ const ie = { class: "w-full flex flex-col gap-8" }, ce = { class: "flex items-ce
159
159
  ])
160
160
  ]),
161
161
  default: O(() => [
162
- k("div", ve, [
163
- k("div", fe, [
162
+ k("div", de, [
163
+ k("div", ve, [
164
164
  k("div", me, [
165
- m(F, {
165
+ f(F, {
166
166
  modelValue: a.value,
167
167
  "onUpdate:modelValue": l[1] || (l[1] = (s) => a.value = s),
168
168
  placeholder: y(r)("common.search")
169
169
  }, null, 8, ["modelValue", "placeholder"])
170
170
  ])
171
171
  ]),
172
- k("div", pe, [
172
+ k("div", fe, [
173
173
  e.multiple ? (v(), b(z, { key: 0 }, [
174
- m(R, {
174
+ f(R, {
175
175
  label: "All",
176
176
  "has-checkbox": "",
177
177
  "model-value": y(Q),
178
- indeterminate: y(P),
179
- onClick: y(j)
178
+ indeterminate: y(T),
179
+ onClick: y(K)
180
180
  }, null, 8, ["model-value", "indeterminate", "onClick"]),
181
181
  (v(!0), b(z, null, $(c.value, (s) => {
182
182
  var M;
@@ -185,7 +185,7 @@ const ie = { class: "w-full flex flex-col gap-8" }, ce = { class: "flex items-ce
185
185
  label: s.label,
186
186
  "has-checkbox": "",
187
187
  "model-value": y(Q) || ((M = n.value) == null ? void 0 : M.includes(s.value)),
188
- onClick: (ye) => y(K)(s.value)
188
+ onClick: (be) => y(P)(s.value)
189
189
  }, null, 8, ["label", "model-value", "onClick"]);
190
190
  }), 128))
191
191
  ], 64)) : (v(!0), b(z, { key: 1 }, $(c.value, (s) => (v(), D(R, {
@@ -200,8 +200,8 @@ 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
- x.value ? (v(), b("div", ge, [
204
- m(y(re), {
203
+ x.value ? (v(), b("div", pe, [
204
+ f(y(ne), {
205
205
  ref_key: "filterRef",
206
206
  ref: V,
207
207
  attributes: u.value,
@@ -214,5 +214,5 @@ const ie = { class: "w-full flex flex-col gap-8" }, ce = { class: "flex items-ce
214
214
  }
215
215
  });
216
216
  export {
217
- Fe as default
217
+ xe as default
218
218
  };