@feedmepos/mf-brand-app-builder 0.5.12-alpha → 0.5.12

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,14 +1,14 @@
1
1
  import { resolveComponent as Y, TransitionGroup as ko, defineComponent as ie, h as Qt, nextTick as On, isRef as Fo, isReactive as Po, isProxy as $o, toRaw as Ao, ref as q, openBlock as D, createElementBlock as O, Fragment as Te, renderList as ot, unref as $, createElementVNode as k, toDisplayString as Pe, createVNode as S, withCtx as M, createBlock as te, createCommentVNode as ne, computed as re, withDirectives as $t, withModifiers as Zt, vShow as At, normalizeClass as Ke, watch as en, createTextVNode as Mo, onMounted as Un, normalizeProps as Cn, mergeProps as Lo, resolveDynamicComponent as Ro, guardReactiveProps as Oo, normalizeStyle as Uo, renderSlot as dn, provide as Vo, inject as Ho, markRaw as zo } from "vue";
2
- import { T as Yo, B as Vn, u as rt } from "./index-Beoq0KwT.js";
2
+ import { T as Yo, B as Vn, u as rt } from "./index-BMPqWhXR.js";
3
3
  import { defineStore as jo, storeToRefs as Go } from "pinia";
4
4
  import { v as _n } from "./v4-ANoOI1Qw.js";
5
5
  import { _ as ke } from "./Icon.vue_vue_type_style_index_0_lang-CVCHCcWR.js";
6
6
  import { _ as Wo, a as Xo, C as Ko } from "./main-CZCjdYQJ.js";
7
7
  import { useCoreStore as Fe } from "@feedmepos/mf-common";
8
- import { K as se, V as Jo } from "./index-BGC6ep--.js";
8
+ import { K as se, V as Jo } from "./index-T23clKe0.js";
9
9
  import { useDialog as qo, components as Qo } from "@feedmepos/ui-library";
10
- import { F as Zo, a as er } from "./app-FNifk80d.js";
11
- import { u as tr } from "./index-CHVjBohb.js";
10
+ import { F as Zo, a as er } from "./app-B1o1qlxh.js";
11
+ import { u as tr } from "./index-Dw3CRqw2.js";
12
12
  /**!
13
13
  * Sortable 1.14.0
14
14
  * @author RubaXa <trash@rubaxa.org>
@@ -2650,7 +2650,7 @@ const si = { class: "flex flex-col gap-24 h-full flex-shrink-0 w-[320px] bg-fm-c
2650
2650
  }
2651
2651
  async function g() {
2652
2652
  var w;
2653
- const m = `${"https://{slug}.feedmedev.vip".replace("{slug}", `${r.currentBusiness.value.url ?? ((w = r.currentBusiness.value) == null ? void 0 : w.id)}`)}`;
2653
+ const m = `${"https://{slug}.feedme.vip".replace("{slug}", `${r.currentBusiness.value.url ?? ((w = r.currentBusiness.value) == null ? void 0 : w.id)}`)}`;
2654
2654
  se.promise(
2655
2655
  async () => {
2656
2656
  var v;
@@ -4212,7 +4212,7 @@ lt.toString = yn.bind(null, function(t, e, n) {
4212
4212
  const pa = { class: "flex items-center justify-center" }, ma = { class: "w-full flex gap-8 justify-end items-center" }, ha = /* @__PURE__ */ ie({
4213
4213
  __name: "PreviewQrCode",
4214
4214
  setup(t) {
4215
- const e = q(), n = Fe(), o = rt(), r = q(!1), i = re(() => `${`${"https://{slug}.feedmedev.vip".replace("{slug}", `${n.currentBusiness.value.url}`)}`}/preview/${o.state.selectedTemplate.templateId}`);
4215
+ const e = q(), n = Fe(), o = rt(), r = q(!1), i = re(() => `${`${"https://{slug}.feedme.vip".replace("{slug}", `${n.currentBusiness.value.url}`)}`}/preview/${o.state.selectedTemplate.templateId}`);
4216
4216
  function a() {
4217
4217
  se.promise(navigator.clipboard.writeText(i.value), {
4218
4218
  loading: "Copying...",
@@ -1,5 +1,5 @@
1
- import { defineComponent as y, ref as b, resolveComponent as w, openBlock as r, createElementBlock as s, createVNode as c, Fragment as C, createElementVNode as i, unref as u, createCommentVNode as f } from "vue";
2
- import { r as g, I as h } from "./image-daxMrkQN.js";
1
+ import { defineComponent as y, ref as b, resolveComponent as w, openBlock as r, createElementBlock as s, createVNode as c, Fragment as C, createElementVNode as i, unref as u, createCommentVNode as d } from "vue";
2
+ import { r as g, I as h } from "./image-Dw_jz8xE.js";
3
3
  import { useCoreStore as I } from "@feedmepos/mf-common";
4
4
  import "./main-CZCjdYQJ.js";
5
5
  import { _ as $ } from "./Icon.vue_vue_type_style_index_0_lang-CVCHCcWR.js";
@@ -22,12 +22,12 @@ const B = { class: "w-full h-[210px] relative" }, P = { class: "absolute z-[1] t
22
22
  o
23
23
  ).then((m) => {
24
24
  var p;
25
- const a = `https://image.feedmedev.cc/business/${l.currentBusiness.value._id}/${m.imagePath}`;
25
+ const a = `https://image.feedme.cc/business/${l.currentBusiness.value._id}/${m.imagePath}`;
26
26
  e.context.node.input(a);
27
27
  const n = new Image();
28
28
  (p = e.context.attrs.props) != null && p.ignoreUpdate || (n.onload = () => {
29
- var d;
30
- ((d = e.context.node.at("$root")) == null ? void 0 : d._value).containerStyles.height = `${Math.min(n.height, 400)}px`;
29
+ var f;
30
+ ((f = e.context.node.at("$root")) == null ? void 0 : f._value).containerStyles.height = `${Math.min(n.height, 400)}px`;
31
31
  }), n.src = g(a);
32
32
  }).finally(() => t.value = !1);
33
33
  }
@@ -60,10 +60,10 @@ const B = { class: "w-full h-[210px] relative" }, P = { class: "absolute z-[1] t
60
60
  class: "!text-[16px] text-fm-color-typo-white"
61
61
  })
62
62
  ])
63
- ], 64)) : f("", !0),
63
+ ], 64)) : d("", !0),
64
64
  t.value ? (r(), s("div", z, [
65
65
  c(u(k))
66
- ])) : f("", !0)
66
+ ])) : d("", !0)
67
67
  ]);
68
68
  };
69
69
  }
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as L, ref as f, computed as k, onBeforeMount as P, resolveComponent as c, openBlock as p, createBlock as v, withCtx as m, createElementBlock as x, createElementVNode as o, toDisplayString as I, createVNode as r, withModifiers as R, Fragment as C, renderList as F } from "vue";
2
- import { u as $, B as y } from "./index-Beoq0KwT.js";
2
+ import { u as $, B as y } from "./index-BMPqWhXR.js";
3
3
  import { _ as j } from "./Icon.vue_vue_type_style_index_0_lang-CVCHCcWR.js";
4
4
  import { useCoreStore as z } from "@feedmepos/mf-common";
5
5
  const A = {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as b, resolveComponent as y, openBlock as c, createBlock as s, unref as u, withCtx as i, createElementBlock as m, Fragment as x, renderList as g, createElementVNode as p, createVNode as n, resolveDynamicComponent as F } from "vue";
2
- import { F as f } from "./app-FNifk80d.js";
2
+ import { F as f } from "./app-B1o1qlxh.js";
3
3
  const h = { class: "flex justify-end gap-4 items-center w-full py-16 px-12 border-b" }, z = { class: "flex flex-col gap-4 w-full p-12" }, I = /* @__PURE__ */ b({
4
4
  __name: "ListRepeater",
5
5
  props: {
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as x, ref as b, computed as B, watch as j, resolveComponent as m, openBlock as p, createElementBlock as w, createElementVNode as r, createVNode as c, unref as l, createBlock as z, withCtx as S, toDisplayString as $ } from "vue";
2
2
  import { useCoreStore as F } from "@feedmepos/mf-common";
3
- import { K as P, B as g } from "./index-BGC6ep--.js";
4
- import { r as U, I as V } from "./image-daxMrkQN.js";
3
+ import { K as P, B as g } from "./index-T23clKe0.js";
4
+ import { r as U, I as V } from "./image-Dw_jz8xE.js";
5
5
  const q = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), C = [
6
6
  "brand",
7
7
  "home",
@@ -508,7 +508,7 @@ const q = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), C = [
508
508
  url: "",
509
509
  thumbnail: ""
510
510
  }), y = B(
511
- () => "https://{slug}.feedmedev.vip".replace("https://{slug}", "")
511
+ () => "https://{slug}.feedme.vip".replace("https://{slug}", "")
512
512
  );
513
513
  function k() {
514
514
  P.promise(
@@ -547,9 +547,9 @@ const q = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), C = [
547
547
  await g.updateBusinessProfile(s.currentBusiness.value._id, {
548
548
  name: a.value.name,
549
549
  url: a.value.url,
550
- thumbnail: `https://image.feedmedev.cc/business/${s.currentBusiness.value._id}/${u.imagePath}`,
550
+ thumbnail: `https://image.feedme.cc/business/${s.currentBusiness.value._id}/${u.imagePath}`,
551
551
  coverPhoto: s.currentBusiness.value.coverPhoto
552
- }), a.value.thumbnail = `https://image.feedmedev.cc/business/${s.currentBusiness.value._id}/${u.imagePath}`;
552
+ }), a.value.thumbnail = `https://image.feedme.cc/business/${s.currentBusiness.value._id}/${u.imagePath}`;
553
553
  });
554
554
  }
555
555
  return j(
@@ -8,7 +8,7 @@ const vo = [
8
8
  {
9
9
  path: "/builder",
10
10
  name: "builder",
11
- component: L(() => import("./BuilderView-B2rfEzWq.js"))
11
+ component: L(() => import("./BuilderView-DPoES6BN.js"))
12
12
  },
13
13
  {
14
14
  path: "/settings",
@@ -19,12 +19,12 @@ const vo = [
19
19
  {
20
20
  path: "assets",
21
21
  name: "settings-assets",
22
- component: L(() => import("./AssetsSettings-1acU0aQ0.js"))
22
+ component: L(() => import("./AssetsSettings-BRmUNWzU.js"))
23
23
  },
24
24
  {
25
25
  path: "management",
26
26
  name: "settings-management",
27
- component: L(() => import("./ManagementSettings-C5gq0pe_.js"))
27
+ component: L(() => import("./ManagementSettings-BM5Ln-Sx.js"))
28
28
  }
29
29
  ]
30
30
  },
@@ -4669,18 +4669,18 @@ const go = (e) => {
4669
4669
  BaStepperField: B(L(() => import("./StepperField-DrHM9EDn.js")), { props: ["suffix", "disabled"] }),
4670
4670
  BaColorPicker: B(L(() => import("./ColorPicker-DAysa9fA.js"))),
4671
4671
  BaSelect: B(L(() => import("./Select-CbQFoAzb.js")), { props: ["selectItems"] }),
4672
- BaListRepeater: B(L(() => import("./ListRepeater-Chf5N0BL.js"))),
4672
+ BaListRepeater: B(L(() => import("./ListRepeater-DLracrtI.js"))),
4673
4673
  BaTextStyleList: B(L(() => import("./TextStyleList-CuPE80Py.js"))),
4674
4674
  BaTextAlign: B(L(() => import("./TextAlign-BOC8ekaH.js"))),
4675
4675
  BaTextDecorators: B(L(() => import("./TextDecorators-BJC4umDR.js"))),
4676
- BaImageUpload: B(L(() => import("./ImageUpload-CzRcR1KB.js"))),
4677
- BaLinkButton: B(L(() => import("./LinkButton-XDkn23G6.js"))),
4676
+ BaImageUpload: B(L(() => import("./ImageUpload-EpMFyZdg.js"))),
4677
+ BaLinkButton: B(L(() => import("./LinkButton-DENsxaU5.js"))),
4678
4678
  BaSwitch: B(L(() => import("./Switch-8mmNQUDo.js"))),
4679
4679
  BaButtonGroup: B(L(() => import("./ButtonGroup-B3ba45VA.js")), { props: ["groupItems"] })
4680
4680
  }
4681
4681
  })
4682
4682
  );
4683
- }, ho = L(() => import("./App-CxjSiBPH.js"));
4683
+ }, ho = L(() => import("./App-D-sh0my5.js"));
4684
4684
  export {
4685
4685
  dn as F,
4686
4686
  pn as a,
package/dist/app.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "vue";
2
- import { b as p, c as s, r as t } from "./app-FNifk80d.js";
2
+ import { b as p, c as s, r as t } from "./app-B1o1qlxh.js";
3
3
  export {
4
4
  p as FmApp,
5
5
  s as FormKitPlugin,
@@ -1,8 +1,8 @@
1
- import { H as r } from "./index-D_zWpFpJ.js";
1
+ import { H as r } from "./index-BxQr98LR.js";
2
2
  async function p(e, t, a) {
3
3
  const n = new FormData();
4
4
  return n.append("file", a), (await r.Put(
5
- "https://api.feedmedev.vip",
5
+ "https://api.feedme.vip",
6
6
  `/image/${e}/${t}`,
7
7
  {
8
8
  headers: {
@@ -12,15 +12,15 @@ async function p(e, t, a) {
12
12
  }
13
13
  )).data;
14
14
  }
15
- async function d(e, t) {
15
+ async function i(e, t) {
16
16
  return (await r.Delete(
17
- "https://api.feedmedev.vip",
17
+ "https://api.feedme.vip",
18
18
  `/image/${e}/${t}`
19
19
  )).data;
20
20
  }
21
- async function i(e, t) {
21
+ async function s(e, t) {
22
22
  const a = new FormData();
23
- return a.append("file", t), a.append("businessId", e), (await r.Put("https://pwa-icon-service.feedmeapidev.com", "", {
23
+ return a.append("file", t), a.append("businessId", e), (await r.Put("https://pwa-icon-service.feedmeapi.com", "", {
24
24
  headers: {
25
25
  "Content-Type": "multipart/form-data"
26
26
  },
@@ -29,8 +29,8 @@ async function i(e, t) {
29
29
  }
30
30
  const o = {
31
31
  uploadImage: p,
32
- deleteImage: d,
33
- uploadAppIcon: i
32
+ deleteImage: i,
33
+ uploadAppIcon: s
34
34
  };
35
35
  function c(e) {
36
36
  return e.replace("images.feedme-dev.workers.dev", "image.feedmedev.vip").replace("image.feedmedev.cc", "image.feedmedev.vip");
@@ -1,23 +1,23 @@
1
1
  import { openBlock as y, createElementBlock as w, ref as $ } from "vue";
2
2
  import { _ as I } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
- import { H as m } from "./index-D_zWpFpJ.js";
3
+ import { H as m } from "./index-BxQr98LR.js";
4
4
  import { defineStore as g } from "pinia";
5
5
  import { v as A } from "./v4-ANoOI1Qw.js";
6
6
  async function _(e) {
7
7
  return (await m.Get(
8
- "https://api.feedmedev.vip",
8
+ "https://api.feedme.vip",
9
9
  `/template/${e}`
10
10
  )).data;
11
11
  }
12
12
  async function B(e, l, s) {
13
13
  return (await m.Get(
14
- "https://api.feedmedev.vip",
14
+ "https://api.feedme.vip",
15
15
  `/template/${e}/${l}/${s}`
16
16
  )).data;
17
17
  }
18
18
  async function P(e, l, s, c) {
19
19
  return (await m.Put(
20
- "https://api.feedmedev.vip",
20
+ "https://api.feedme.vip",
21
21
  `/template/${e}/${l}/${s.templateId}`,
22
22
  {
23
23
  data: {
@@ -29,7 +29,7 @@ async function P(e, l, s, c) {
29
29
  }
30
30
  async function b(e, l) {
31
31
  return (await m.Put(
32
- "https://api.feedmedev.vip",
32
+ "https://api.feedme.vip",
33
33
  `/template/${e}/active`,
34
34
  {
35
35
  data: {
@@ -40,19 +40,19 @@ async function b(e, l) {
40
40
  }
41
41
  async function U(e) {
42
42
  return (await m.Get(
43
- "https://api.feedmedev.vip",
43
+ "https://api.feedme.vip",
44
44
  `/template/${e}/active`
45
45
  )).data;
46
46
  }
47
47
  async function x(e, l, s) {
48
48
  return await m.Head(
49
- "https://api.feedmedev.vip",
49
+ "https://api.feedme.vip",
50
50
  `/template/${e}/${l}/${s}`
51
- ).then((r) => r.status === 200).catch(() => !1);
51
+ ).then((d) => d.status === 200).catch(() => !1);
52
52
  }
53
53
  async function M(e, l, s) {
54
54
  return (await m.Post(
55
- "https://api.feedmedev.vip",
55
+ "https://api.feedme.vip",
56
56
  `/template/${e}/${l}/rename`,
57
57
  {
58
58
  data: {
@@ -63,7 +63,7 @@ async function M(e, l, s) {
63
63
  }
64
64
  async function N(e, l, s) {
65
65
  return (await m.Delete(
66
- "https://api.feedmedev.vip",
66
+ "https://api.feedme.vip",
67
67
  `/template/${e}/${l}/${s}`
68
68
  )).data;
69
69
  }
@@ -103,7 +103,7 @@ const q = /* @__PURE__ */ I(S, [["render", H]]), z = g("template", () => {
103
103
  async function c(t) {
104
104
  e.value.activeTemplateId = await p.getMainTemplateId(t);
105
105
  }
106
- function r(t) {
106
+ function d(t) {
107
107
  e.value.selectedTemplate = e.value.allTemplates.find(
108
108
  (a) => a.templateId === t
109
109
  ) ?? null;
@@ -126,10 +126,10 @@ const q = /* @__PURE__ */ I(S, [["render", H]]), z = g("template", () => {
126
126
  }
127
127
  function T() {
128
128
  let t = "Untitled", a = 2;
129
- e.value.allTemplates.forEach((d) => {
130
- if (!d.templateAlias.startsWith("Untitled")) return;
131
- const n = d.templateAlias.split(" ");
132
- n.length === 1 && n[0] === "Untitled" ? t = "Untitled 2" : n.length === 2 && n[0] === "Untitled" && !isNaN(+n[1]) && (d.templateAlias.startsWith(`Untitled ${a}`) && (a += 1), t = `Untitled ${a}`);
129
+ e.value.allTemplates.forEach((r) => {
130
+ if (!r.templateAlias.startsWith("Untitled")) return;
131
+ const n = r.templateAlias.split(" ");
132
+ n.length === 1 && n[0] === "Untitled" ? t = "Untitled 2" : n.length === 2 && n[0] === "Untitled" && !isNaN(+n[1]) && (r.templateAlias.startsWith(`Untitled ${a}`) && (a += 1), t = `Untitled ${a}`);
133
133
  });
134
134
  const i = {
135
135
  templateAlias: t,
@@ -140,12 +140,12 @@ const q = /* @__PURE__ */ I(S, [["render", H]]), z = g("template", () => {
140
140
  }
141
141
  async function f(t, a, i) {
142
142
  await p.renameTemplate(t, a, i).then(() => {
143
- var d;
143
+ var r;
144
144
  e.value.allTemplates = e.value.allTemplates.map((n) => n.templateId === a ? {
145
145
  ...n,
146
146
  templateAlias: i,
147
147
  templateId: a
148
- } : n), ((d = e.value.selectedTemplate) == null ? void 0 : d.templateId) === a && (e.value.selectedTemplate.templateAlias = i);
148
+ } : n), ((r = e.value.selectedTemplate) == null ? void 0 : r.templateId) === a && (e.value.selectedTemplate.templateAlias = i);
149
149
  });
150
150
  }
151
151
  async function v(t, a) {
@@ -172,7 +172,7 @@ const q = /* @__PURE__ */ I(S, [["render", H]]), z = g("template", () => {
172
172
  getAllTemplates: l,
173
173
  publishTemplate: s,
174
174
  getMainTemplateId: c,
175
- setSelectedTemplate: r,
175
+ setSelectedTemplate: d,
176
176
  saveTemplate: u,
177
177
  setMainPageTemplate: o,
178
178
  addNewTemplate: T,