@feedmepos/mf-common 1.29.23 → 1.29.24

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,10 +1,10 @@
1
- import { ref as S, computed as o, defineComponent as ae, mergeModels as ne, useModel as ue, watch as j, resolveComponent as k, openBlock as i, createElementBlock as b, createElementVNode as C, createVNode as y, withCtx as L, normalizeClass as re, toDisplayString as oe, createCommentVNode as N, createBlock as O, withModifiers as K, unref as g, isRef as se, Fragment as Q, renderList as T, renderSlot as ie, nextTick as ce } from "vue";
2
- import { t as ve, u as de, a as fe, O as E, b as me } from "./app-5956b5d6.js";
1
+ import { ref as w, computed as o, defineComponent as ae, mergeModels as ne, useModel as ue, watch as j, resolveComponent as k, openBlock as i, createElementBlock as b, createElementVNode as C, createVNode as y, withCtx as L, normalizeClass as re, toDisplayString as oe, createCommentVNode as N, createBlock as O, withModifiers as K, unref as g, isRef as se, Fragment as Q, renderList as T, renderSlot as ie, nextTick as ce } from "vue";
2
+ import { t as ve, u as de, a as fe, O as E, b as me } from "./app-9ae28090.js";
3
3
  import "@feedmepos/ui-library";
4
4
  import "pinia";
5
5
  import "vue-router";
6
6
  function pe(f, t, c = f) {
7
- const a = S(!0), v = o(() => {
7
+ const a = w(!0), v = o(() => {
8
8
  if (!a.value && !t.value)
9
9
  return !0;
10
10
  if (t.value && t.value.length > 0) {
@@ -24,12 +24,12 @@ function pe(f, t, c = f) {
24
24
  const u = c.value.map((n) => n.value);
25
25
  u.length === f.value.length ? (t.value = void 0, a.value = !1) : (t.value = u, a.value = !1);
26
26
  }, toggleOption: (u) => {
27
- var h, m, w;
27
+ var h, m, S;
28
28
  let n;
29
- t.value === void 0 && a.value ? n = [u] : t.value === void 0 && !a.value ? n = (h = f.value.map((p) => p.value)) == null ? void 0 : h.filter((p) => p !== u) : (m = t.value) != null && m.includes(u) ? n = (w = t.value) == null ? void 0 : w.filter((p) => p !== u) : n = [...t.value || [], u], n.length === 0 ? (t.value = void 0, a.value = !0) : n.length === f.value.length ? (t.value = void 0, a.value = !1) : t.value = n;
29
+ t.value === void 0 && a.value ? n = [u] : t.value === void 0 && !a.value ? n = (h = f.value.map((p) => p.value)) == null ? void 0 : h.filter((p) => p !== u) : (m = t.value) != null && m.includes(u) ? n = (S = t.value) == null ? void 0 : S.filter((p) => p !== u) : n = [...t.value || [], u], n.length === 0 ? (t.value = void 0, a.value = !0) : n.length === f.value.length ? (t.value = void 0, a.value = !1) : t.value = n;
30
30
  } };
31
31
  }
32
- const ge = { class: "w-full flex flex-col gap-8" }, he = { class: "flex items-center gap-8" }, be = { class: "inline-flex items-center" }, ye = { class: "flex flex-col w-[360px] min-h-0 gap-8" }, _e = { class: "flex gap-4 px-[6px]" }, ke = { class: "flex-1" }, Ce = { class: "flex-1 overflow-y-auto min-h-0" }, Se = { key: 0 }, Me = /* @__PURE__ */ ae({
32
+ const ge = { class: "w-full flex flex-col gap-8" }, he = { class: "flex items-center gap-8 min-w-0" }, be = { class: "inline-flex items-center max-w-full" }, ye = { class: "flex flex-col w-[360px] min-h-0 gap-8" }, _e = { class: "flex gap-4 px-[6px]" }, ke = { class: "flex-1" }, Ce = { class: "flex-1 overflow-y-auto min-h-0" }, we = { key: 0 }, Me = /* @__PURE__ */ ae({
33
33
  __name: "RestaurantSelector",
34
34
  props: /* @__PURE__ */ ne({
35
35
  multiple: { type: Boolean, default: !1 },
@@ -58,8 +58,8 @@ const ge = { class: "w-full flex flex-col gap-8" }, he = { class: "flex items-ce
58
58
  ...e,
59
59
  values: l
60
60
  };
61
- })), { searchKey: n, filter: h } = fe(), m = S(null);
62
- function w(e) {
61
+ })), { searchKey: n, filter: h } = fe(), m = w(null);
62
+ function S(e) {
63
63
  var l;
64
64
  if (t.multiple)
65
65
  throw new Error("Single selection is not supported for multiple selection");
@@ -91,11 +91,11 @@ const ge = { class: "w-full flex flex-col gap-8" }, he = { class: "flex items-ce
91
91
  M,
92
92
  a,
93
93
  F
94
- ), V = S(!1), Y = o(() => x.value.length > 0), z = S(null);
94
+ ), V = w(!1), Y = o(() => x.value.length > 0), z = w(null);
95
95
  async function Z() {
96
96
  t.disabled || (V.value ? V.value = !1 : (V.value = !0, await ce(), z.value && z.value.toggleProperty(!0)));
97
97
  }
98
- const d = S((() => ({
98
+ const d = w((() => ({
99
99
  logic: "AND",
100
100
  rules: []
101
101
  }))()), ee = o(() => {
@@ -132,6 +132,7 @@ const ge = { class: "w-full flex flex-col gap-8" }, he = { class: "flex items-ce
132
132
  return i(), b("div", ge, [
133
133
  C("div", he, [
134
134
  y(te, {
135
+ class: "min-w-0",
135
136
  "close-on-click": !1,
136
137
  disabled: e.disabled || R.value,
137
138
  ref_key: "menuRef",
@@ -141,7 +142,10 @@ const ge = { class: "w-full flex flex-col gap-8" }, he = { class: "flex items-ce
141
142
  }, {
142
143
  "menu-button": L(() => [
143
144
  C("div", be, [
144
- y(A, { disabled: e.disabled }, {
145
+ y(A, {
146
+ disabled: e.disabled,
147
+ class: "max-w-full overflow-hidden"
148
+ }, {
145
149
  default: L(() => [
146
150
  y(r, {
147
151
  color: B.value,
@@ -211,13 +215,13 @@ const ge = { class: "w-full flex flex-col gap-8" }, he = { class: "flex items-ce
211
215
  label: s.label,
212
216
  "has-checkbox": "",
213
217
  "model-value": g(U) || ((I = a.value) == null ? void 0 : I.includes(s.value)),
214
- onClick: (we) => g(J)(s.value)
218
+ onClick: (Se) => g(J)(s.value)
215
219
  }, null, 8, ["label", "model-value", "onClick"]);
216
220
  }), 128))
217
221
  ], 64)) : (i(!0), b(Q, { key: 1 }, T(F.value, (s) => (i(), O($, {
218
222
  key: s.value,
219
223
  label: s.label,
220
- onClick: (I) => w(s.value)
224
+ onClick: (I) => S(s.value)
221
225
  }, null, 8, ["label", "onClick"]))), 128))
222
226
  ])
223
227
  ])
@@ -226,7 +230,7 @@ const ge = { class: "w-full flex flex-col gap-8" }, he = { class: "flex items-ce
226
230
  }, 8, ["disabled"]),
227
231
  ie(e.$slots, "append-right")
228
232
  ]),
229
- V.value ? (i(), b("div", Se, [
233
+ V.value ? (i(), b("div", we, [
230
234
  y(g(me), {
231
235
  ref_key: "filterRef",
232
236
  ref: z,
@@ -1,5 +1,5 @@
1
1
  import { type AxiosInstance, type AxiosResponse } from "axios";
2
- import { FdoBusiness, FdoPermissionRule, FdoRestaurant, FdoRestaurantSetting, type FdoUser, type FdoPublicSetting } from "@feedmepos/core/entity";
2
+ import { F_COUNTRY, FdoBusiness, FdoPermissionRule, FdoRestaurant, FdoRestaurantSetting, type FdoUser, type FdoPublicSetting } from "@feedmepos/core/entity";
3
3
  export interface PaginatedBusinessesResponse {
4
4
  meta: {
5
5
  skip: number;
@@ -25,6 +25,14 @@ export declare function readIsAgent(): Promise<{
25
25
  }>;
26
26
  export declare function debugUser(phoneNumber: string): Promise<string>;
27
27
  export declare function stopDebugUser(): Promise<string>;
28
+ /**
29
+ * Supported countries for user registration/login, served by the account
30
+ * backend at `/login/supported-countries` — the same source of truth the login
31
+ * page uses. Goes through `accountClientInstance` for consistency with the
32
+ * other account calls (shared base URL + auth header + error interceptor); the
33
+ * debug-user dialog only invokes this from an authenticated context.
34
+ */
35
+ export declare function readSupportedCountries(): Promise<F_COUNTRY[]>;
28
36
  export type PublicSettingApi = FdoPublicSetting & {
29
37
  aiSettings: {
30
38
  remy: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAc,EAAc,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAA;AAGjF,OAAO,EAEL,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,KAAK,OAAO,EACZ,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAA;AAI/B,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM,CAAA;QACZ,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,EAAE,MAAM,CA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