@feedmepos/mf-brand-app-builder 0.5.10-alpha → 0.5.11-alpha

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.
@@ -2,7 +2,7 @@ import { defineComponent as d, computed as g, resolveComponent as u, openBlock a
2
2
  import { useCoreStore as C } from "@feedmepos/mf-common";
3
3
  import { V as F } from "./vue-sonner-PX6Req0V.js";
4
4
  import { useRoute as R, RouterLink as S, RouterView as V } from "vue-router";
5
- import { g as L } from "./index-BCW4xCUr.js";
5
+ import { g as L } from "./index-4BDCQhnW.js";
6
6
  const A = { class: "shrink-0 w-64 h-full bg-fm-color-neutral-white border-r border-fm-color-neutral-gray-100 p-[10px] flex flex-col gap-12" }, N = /* @__PURE__ */ d({
7
7
  __name: "NavigationSidebar",
8
8
  setup(h) {
@@ -51,7 +51,7 @@ const A = { class: "shrink-0 w-64 h-full bg-fm-color-neutral-white border-r bord
51
51
  r.value = !0, (t = e.currentBusiness.value) != null && t._id && (r.value = !1);
52
52
  }
53
53
  return b(() => {
54
- console.log("Running v0.5.10-alpha"), e.hideSidebar.value = !0, L();
54
+ console.log("Running v0.5.11-alpha"), e.hideSidebar.value = !0, L();
55
55
  }), w(() => {
56
56
  e.hideSidebar.value = !1;
57
57
  }), y(
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as Z, ref as c, watch as y, resolveComponent as u, openBlock as P, createElementBlock as B, createElementVNode as w, createBlock as h, createCommentVNode as d, createVNode as D, createSlots as b, withCtx as a, Fragment as j, unref as G } from "vue";
2
- import { B as X } from "./index-a8ArtY0N.js";
3
- import { r as Y, I as C } from "./image-CPtcuzIw.js";
2
+ import { B as X } from "./index-CDkBzOOg.js";
3
+ import { r as Y, I as C } from "./image-D7X25pKn.js";
4
4
  import { useCoreStore as m } from "@feedmepos/mf-common";
5
5
  import { C as N, D as F } from "./CircularProgress-h90pbjU3.js";
6
6
  import { K as V } from "./vue-sonner-PX6Req0V.js";
@@ -46,7 +46,7 @@ const i = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAA
46
46
  name: e.currentBusiness.value.name,
47
47
  thumbnail: e.currentBusiness.value.thumbnail,
48
48
  url: e.currentBusiness.value.url,
49
- coverPhoto: `https://image.feedme.cc/business/${e.currentBusiness.value._id}/${A}?t=${Date.now().toString()}`
49
+ coverPhoto: `https://image.feedmedev.cc/business/${e.currentBusiness.value._id}/${A}?t=${Date.now().toString()}`
50
50
  }).then(
51
51
  () => {
52
52
  var M;
@@ -59,7 +59,7 @@ const i = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAA
59
59
  e.currentBusiness.value._id,
60
60
  r.value
61
61
  ).then(
62
- () => g.value = `https://api.feedme.vip/metadata/${e.currentBusiness.value._id}/pwa-512x512.png`
62
+ () => g.value = `https://api.feedmedev.vip/metadata/${e.currentBusiness.value._id}/pwa-512x512.png`
63
63
  );
64
64
  },
65
65
  {
@@ -77,7 +77,7 @@ const i = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAA
77
77
  e.currentBusiness.value._id
78
78
  ).then((A) => A.pwaConfig.name).catch(() => ""), f.value = Y(
79
79
  ((v = e.currentBusiness.value) == null ? void 0 : v.coverPhoto) ?? ""
80
- ), g.value = `https://api.feedme.vip/metadata/${e.currentBusiness.value._id}/pwa-512x512.png`);
80
+ ), g.value = `https://api.feedmedev.vip/metadata/${e.currentBusiness.value._id}/pwa-512x512.png`);
81
81
  },
82
82
  {
83
83
  immediate: !0
@@ -1,14 +1,14 @@
1
1
  import { resolveComponent as Y, TransitionGroup as Fo, defineComponent as ie, h as Qt, nextTick as On, isRef as Po, isReactive as Ao, isProxy as $o, toRaw as Mo, ref as J, openBlock as D, createElementBlock as O, Fragment as Te, renderList as ot, unref as A, createElementVNode as k, toDisplayString as Pe, createVNode as S, withCtx as M, createBlock as te, createCommentVNode as ne, computed as re, withDirectives as At, withModifiers as Zt, vShow as $t, normalizeClass as Ke, watch as en, createTextVNode as Lo, onMounted as Un, normalizeProps as Cn, mergeProps as Ro, resolveDynamicComponent as Oo, guardReactiveProps as Uo, normalizeStyle as Vo, renderSlot as dn, provide as Ho, inject as zo, markRaw as Yo } from "vue";
2
- import { T as jo, B as Vn, u as rt } from "./index-DMyyyPZ5.js";
2
+ import { T as jo, B as Vn, u as rt } from "./index-B1VIIc4c.js";
3
3
  import { defineStore as Hn, 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
- import { _ as Wo, a as Xo, C as Ko } from "./main-BUI2Mmvv.js";
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
8
  import { K as se, V as Jo } from "./vue-sonner-PX6Req0V.js";
9
9
  import { useDialog as qo, components as Qo } from "@feedmepos/ui-library";
10
- import { F as Zo, a as er } from "./app-BSHlK7o2.js";
11
- import { B as tr } from "./index-a8ArtY0N.js";
10
+ import { F as Zo, a as er } from "./app-Dk2q-I0Y.js";
11
+ import { B as tr } from "./index-CDkBzOOg.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}.feedme.vip".replace("{slug}", `${r.currentBusiness.value.url ?? ((w = r.currentBusiness.value) == null ? void 0 : w.id)}`)}`;
2653
+ const m = `${"https://{slug}.feedmedev.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 = J(), n = Fe(), o = rt(), r = J(!1), i = re(() => `${`${"https://{slug}.feedme.vip".replace("{slug}", `${n.currentBusiness.value.url}`)}`}/preview/${o.state.selectedTemplate.templateId}`);
4215
+ const e = J(), n = Fe(), o = rt(), r = J(!1), i = re(() => `${`${"https://{slug}.feedmedev.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...",
@@ -4758,7 +4758,10 @@ const pa = { class: "flex items-center justify-center" }, ma = { class: "w-full
4758
4758
  },
4759
4759
  {
4760
4760
  $formkit: "BaImageUpload",
4761
- name: "imageUrl"
4761
+ name: "imageUrl",
4762
+ props: {
4763
+ ignoreUpdate: !0
4764
+ }
4762
4765
  },
4763
4766
  {
4764
4767
  $formkit: "BaLinkButton",
@@ -0,0 +1,73 @@
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-D7X25pKn.js";
3
+ import { useCoreStore as I } from "@feedmepos/mf-common";
4
+ import "./main-CZCjdYQJ.js";
5
+ import { _ as $ } from "./Icon.vue_vue_type_style_index_0_lang-CVCHCcWR.js";
6
+ import { C as k } from "./CircularProgress-h90pbjU3.js";
7
+ import { v as F } from "./v4-ANoOI1Qw.js";
8
+ const B = { class: "w-full h-[210px] relative" }, P = { class: "absolute z-[1] top-0 left-0 h-full w-full bg-fm-color-neutral-white border border-dashed border-fm-color-neutral-gray-200" }, j = ["src"], z = {
9
+ key: 1,
10
+ class: "absolute z-[3] top-0 left-0 rounded-md bg-fm-color-neutral-gray-100 bg-opacity-80 w-full h-full flex justify-center items-center"
11
+ }, L = /* @__PURE__ */ y({
12
+ __name: "ImageUpload",
13
+ props: {
14
+ context: {}
15
+ },
16
+ setup(_) {
17
+ const e = _, l = I(), t = b(!1);
18
+ async function v(o) {
19
+ t.value = !0, await h.uploadImage(
20
+ l.currentBusiness.value._id,
21
+ `${F()}.${o.name.split(".").pop()}`,
22
+ o
23
+ ).then((m) => {
24
+ var p;
25
+ const a = `https://image.feedmedev.cc/business/${l.currentBusiness.value._id}/${m.imagePath}`;
26
+ e.context.node.input(a);
27
+ const n = new Image();
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`;
31
+ }), n.src = g(a);
32
+ }).finally(() => t.value = !1);
33
+ }
34
+ async function x() {
35
+ t.value = !0;
36
+ const o = e.context._value.split("/").pop();
37
+ await h.deleteImage(l.currentBusiness.value._id, o).then(() => e.context.node.input("")).finally(() => t.value = !1);
38
+ }
39
+ return (o, m) => {
40
+ const a = w("FmDropField");
41
+ return r(), s("div", B, [
42
+ c(a, {
43
+ class: "w-full h-full",
44
+ onFileUpload: v
45
+ }),
46
+ e.context._value && !t.value ? (r(), s(C, { key: 0 }, [
47
+ i("div", P, [
48
+ i("img", {
49
+ class: "w-full h-full object-contain",
50
+ src: u(g)(e.context._value)
51
+ }, null, 8, j)
52
+ ]),
53
+ i("button", {
54
+ type: "button",
55
+ class: "absolute z-[2] -right-8 -top-8 w-24 h-24 bg-fm-color-system-error-300 rounded-full flex items-center justify-center",
56
+ onClick: x
57
+ }, [
58
+ c(u($), {
59
+ name: "close",
60
+ class: "!text-[16px] text-fm-color-typo-white"
61
+ })
62
+ ])
63
+ ], 64)) : f("", !0),
64
+ t.value ? (r(), s("div", z, [
65
+ c(u(k))
66
+ ])) : f("", !0)
67
+ ]);
68
+ };
69
+ }
70
+ });
71
+ export {
72
+ L as default
73
+ };
@@ -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-DMyyyPZ5.js";
2
+ import { u as $, B as y } from "./index-B1VIIc4c.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-BSHlK7o2.js";
2
+ import { F as f } from "./app-Dk2q-I0Y.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,8 +1,8 @@
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 { B as g } from "./index-a8ArtY0N.js";
3
+ import { B as g } from "./index-CDkBzOOg.js";
4
4
  import { K as P } from "./vue-sonner-PX6Req0V.js";
5
- import { r as U, I as V } from "./image-CPtcuzIw.js";
5
+ import { r as U, I as V } from "./image-D7X25pKn.js";
6
6
  const q = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), C = [
7
7
  "brand",
8
8
  "home",
@@ -509,7 +509,7 @@ const q = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), C = [
509
509
  url: "",
510
510
  thumbnail: ""
511
511
  }), y = B(
512
- () => "https://{slug}.feedme.vip".replace("https://{slug}", "")
512
+ () => "https://{slug}.feedmedev.vip".replace("https://{slug}", "")
513
513
  );
514
514
  function k() {
515
515
  P.promise(
@@ -548,9 +548,9 @@ const q = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), C = [
548
548
  await g.updateBusinessProfile(s.currentBusiness.value._id, {
549
549
  name: a.value.name,
550
550
  url: a.value.url,
551
- thumbnail: `https://image.feedme.cc/business/${s.currentBusiness.value._id}/${u.imagePath}`,
551
+ thumbnail: `https://image.feedmedev.cc/business/${s.currentBusiness.value._id}/${u.imagePath}`,
552
552
  coverPhoto: s.currentBusiness.value.coverPhoto
553
- }), a.value.thumbnail = `https://image.feedme.cc/business/${s.currentBusiness.value._id}/${u.imagePath}`;
553
+ }), a.value.thumbnail = `https://image.feedmedev.cc/business/${s.currentBusiness.value._id}/${u.imagePath}`;
554
554
  });
555
555
  }
556
556
  return j(
@@ -8,7 +8,7 @@ const vo = [
8
8
  {
9
9
  path: "/builder",
10
10
  name: "builder",
11
- component: L(() => import("./BuilderView-C7aUxRn_.js"))
11
+ component: L(() => import("./BuilderView-DWl3h2k9.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-B3YZrxpH.js"))
22
+ component: L(() => import("./AssetsSettings-CEE324yJ.js"))
23
23
  },
24
24
  {
25
25
  path: "management",
26
26
  name: "settings-management",
27
- component: L(() => import("./ManagementSettings-_d82ePt4.js"))
27
+ component: L(() => import("./ManagementSettings-B7bOKxr_.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-CvYZeJ3Y.js"))),
4672
+ BaListRepeater: B(L(() => import("./ListRepeater-eX5bRq3G.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-c_kO3iHP.js"))),
4677
- BaLinkButton: B(L(() => import("./LinkButton-DA6Cy32J.js"))),
4676
+ BaImageUpload: B(L(() => import("./ImageUpload-DKnCHOIX.js"))),
4677
+ BaLinkButton: B(L(() => import("./LinkButton-DqPM-ILu.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-BTp13JKK.js"));
4683
+ }, ho = L(() => import("./App-HmTl4UNG.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-BSHlK7o2.js";
2
+ import { b as p, c as s, r as t } from "./app-Dk2q-I0Y.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-BCW4xCUr.js";
1
+ import { H as r } from "./index-4BDCQhnW.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.feedme.vip",
5
+ "https://api.feedmedev.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 i(e, t) {
15
+ async function d(e, t) {
16
16
  return (await r.Delete(
17
- "https://api.feedme.vip",
17
+ "https://api.feedmedev.vip",
18
18
  `/image/${e}/${t}`
19
19
  )).data;
20
20
  }
21
- async function s(e, t) {
21
+ async function i(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.feedmeapi.com", "", {
23
+ return a.append("file", t), a.append("businessId", e), (await r.Put("https://pwa-icon-service.feedmeapidev.com", "", {
24
24
  headers: {
25
25
  "Content-Type": "multipart/form-data"
26
26
  },
@@ -29,8 +29,8 @@ async function s(e, t) {
29
29
  }
30
30
  const o = {
31
31
  uploadImage: p,
32
- deleteImage: i,
33
- uploadAppIcon: s
32
+ deleteImage: d,
33
+ uploadAppIcon: i
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");