@feedmepos/mf-brand-app-builder 0.5.28-prod → 0.5.29-dev

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 { defineComponent as y, ref as b, resolveComponent as w, createElementBlock as r, openBlock as s, createVNode as c, createCommentVNode as d, Fragment as C, createElementVNode as i, unref as u } from "vue";
2
- import { r as g, I as h } from "./image-S7-2rbQS.js";
1
+ import { defineComponent as y, ref as b, resolveComponent as w, createElementBlock as r, openBlock as s, createVNode as c, createCommentVNode as f, Fragment as C, createElementVNode as i, unref as u } from "vue";
2
+ import { r as g, I as h } from "./image-D_Djf1PS.js";
3
3
  import { useCoreStore as I } from "@feedmepos/mf-common";
4
- import "./main-TiuQoOa_.js";
4
+ import "./main-CFlu_mRA.js";
5
5
  import { _ as $ } from "./Icon.vue_vue_type_style_index_0_lang-BcRjQndc.js";
6
6
  import { C as k } from "./CircularProgress-DdblYCtV.js";
7
7
  import { v as F } from "./v4-CKwdnpQf.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 l = `https://image.feedme.cc/business/${a.currentBusiness.value._id}/${m.imagePath}`;
25
+ const l = `https://image.feedmedev.cc/business/${a.currentBusiness.value._id}/${m.imagePath}`;
26
26
  e.context.node.input(l);
27
27
  const n = new Image();
28
28
  (p = e.context) != null && p.ignoreUpdate || (n.onload = () => {
29
- var f;
30
- ((f = e.context.node.at("$root")) == null ? void 0 : f._value).containerStyles.height = `${Math.min(n.height, 400)}px`;
29
+ var d;
30
+ ((d = e.context.node.at("$root")) == null ? void 0 : d._value).containerStyles.height = `${Math.min(n.height, 400)}px`;
31
31
  }), n.src = g(l);
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)) : d("", !0),
63
+ ], 64)) : f("", !0),
64
64
  t.value ? (s(), r("div", z, [
65
65
  c(u(k))
66
- ])) : d("", !0)
66
+ ])) : f("", !0)
67
67
  ]);
68
68
  };
69
69
  }
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as I, ref as f, computed as k, onBeforeMount as L, resolveComponent as c, createBlock as v, openBlock as u, withCtx as m, createElementVNode as a, createVNode as r, createElementBlock as x, Fragment as M, renderList as F, toDisplayString as P, withModifiers as R } from "vue";
2
2
  import { B as y } from "./BaDivider-Cp9gfB4r.js";
3
3
  import { _ as W } from "./Icon.vue_vue_type_style_index_0_lang-BcRjQndc.js";
4
- import { u as $ } from "./index-CPs0rWCO.js";
4
+ import { u as $ } from "./index-Bk6TOZrx.js";
5
5
  import "@feedmepos/mf-common";
6
6
  const j = {
7
7
  key: 1,
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as b, resolveComponent as y, createBlock as s, openBlock as c, 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-Bh_S4QSD.js";
2
+ import { F as f } from "./app-Dv1xHBP_.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 C, ref as y, computed as S, watch as $, resolveComponent as d, createElementBlock as k, openBlock as g, createElementVNode as o, createVNode as u, toDisplayString as _, unref as i, createBlock as F, withCtx as U } from "vue";
2
2
  import { useCoreStore as P, useI18n as V } from "@feedmepos/mf-common";
3
- import { B as h } from "./index-BUEKCOG0.js";
3
+ import { B as h } from "./index-C4vwWvn_.js";
4
4
  import { K as q } from "./vue-sonner-CBFYmm8_.js";
5
- import { r as I, I as T } from "./image-S7-2rbQS.js";
5
+ import { r as I, I as T } from "./image-D_Djf1PS.js";
6
6
  import { useSnackbar as A } from "@feedmepos/ui-library";
7
7
  const E = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), N = [
8
8
  "brand",
@@ -510,12 +510,12 @@ const E = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), N = [
510
510
  url: "",
511
511
  thumbnail: ""
512
512
  }), x = S(
513
- () => "https://{slug}.feedme.vip".replace("https://{slug}", "")
513
+ () => "https://{slug}.feedmedev.vip".replace("https://{slug}", "")
514
514
  );
515
515
  function B() {
516
516
  var t, e;
517
517
  navigator.clipboard.writeText(
518
- "https://{slug}.feedme.vip".replace(
518
+ "https://{slug}.feedmedev.vip".replace(
519
519
  "{slug}",
520
520
  ((t = s.currentBusiness.value) == null ? void 0 : t.url) ?? ((e = s.currentBusiness.value) == null ? void 0 : e._id)
521
521
  )
@@ -574,9 +574,9 @@ const E = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), N = [
574
574
  await h.updateBusinessProfile(s.currentBusiness.value._id, {
575
575
  name: a.value.name,
576
576
  url: a.value.url,
577
- thumbnail: `https://image.feedme.cc/business/${s.currentBusiness.value._id}/${c.imagePath}`,
577
+ thumbnail: `https://image.feedmedev.cc/business/${s.currentBusiness.value._id}/${c.imagePath}`,
578
578
  coverPhoto: s.currentBusiness.value.coverPhoto
579
- }), a.value.thumbnail = `https://image.feedme.cc/business/${s.currentBusiness.value._id}/${c.imagePath}`;
579
+ }), a.value.thumbnail = `https://image.feedmedev.cc/business/${s.currentBusiness.value._id}/${c.imagePath}`;
580
580
  });
581
581
  }
582
582
  return $(
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as S, createElementBlock as D, openBlock as I, normalizeClass as m, createElementVNode as E, toDisplayString as C, ref as x, computed as J, watch as K, resolveComponent as l, unref as h, Fragment as v, renderList as W, createVNode as B, createCommentVNode as s, createBlock as r, withCtx as P, h as L } from "vue";
2
- import { u as Z } from "./index-CPs0rWCO.js";
2
+ import { u as Z } from "./index-Bk6TOZrx.js";
3
3
  import { useCoreStore as q, useI18n as X } from "@feedmepos/mf-common";
4
4
  import { p as y } from "./views-BDWw3w14.js";
5
5
  import { useRouter as b } from "vue-router";
@@ -7115,12 +7115,12 @@ const wn = {
7115
7115
  {
7116
7116
  path: "/",
7117
7117
  name: "brandkit",
7118
- component: H(() => import("./BrandkitView-DoW1oGaQ.js"))
7118
+ component: H(() => import("./BrandkitView-DVGcxme0.js"))
7119
7119
  },
7120
7120
  {
7121
7121
  path: "/projects",
7122
7122
  name: "projects",
7123
- component: H(() => import("./ProjectView-DKXRpIC6.js"))
7123
+ component: H(() => import("./ProjectView-ByxaVBFb.js"))
7124
7124
  },
7125
7125
  {
7126
7126
  path: "/builder",
@@ -7130,7 +7130,7 @@ const wn = {
7130
7130
  path: ":templateId(.*)*",
7131
7131
  name: "builder",
7132
7132
  component: H(
7133
- () => import("./BuilderView-CeBhUmEZ.js")
7133
+ () => import("./BuilderView-Dtm0i4NK.js")
7134
7134
  )
7135
7135
  }
7136
7136
  ]
@@ -7145,14 +7145,14 @@ const wn = {
7145
7145
  path: "assets",
7146
7146
  name: "settings-assets",
7147
7147
  component: H(
7148
- () => import("./AssetsSettings-DJOCXmyp.js")
7148
+ () => import("./AssetsSettings-DhprCc4v.js")
7149
7149
  )
7150
7150
  },
7151
7151
  {
7152
7152
  path: "management",
7153
7153
  name: "settings-management",
7154
7154
  component: H(
7155
- () => import("./ManagementSettings-DHh2g_XJ.js")
7155
+ () => import("./ManagementSettings-CueLn4v_.js")
7156
7156
  )
7157
7157
  }
7158
7158
  ]
@@ -11831,7 +11831,7 @@ const Ac = (e) => {
11831
11831
  ),
11832
11832
  BaListRepeater: K(
11833
11833
  H(
11834
- () => import("./ListRepeater-Cwbdyrr4.js")
11834
+ () => import("./ListRepeater-CYEnIU4D.js")
11835
11835
  )
11836
11836
  ),
11837
11837
  BaTextStyleList: K(
@@ -11851,13 +11851,13 @@ const Ac = (e) => {
11851
11851
  ),
11852
11852
  BaImageUpload: K(
11853
11853
  H(
11854
- () => import("./ImageUpload-odamvjyc.js")
11854
+ () => import("./ImageUpload-Bzo-UenE.js")
11855
11855
  ),
11856
11856
  { props: ["ignoreUpdate"] }
11857
11857
  ),
11858
11858
  BaLinkButton: K(
11859
11859
  H(
11860
- () => import("./LinkButton-DNXBKGCn.js")
11860
+ () => import("./LinkButton-De-YNclu.js")
11861
11861
  )
11862
11862
  ),
11863
11863
  BaSwitch: K(
@@ -11879,7 +11879,7 @@ const Ac = (e) => {
11879
11879
  "th-TH": { ...Dn, ...yr },
11880
11880
  "ko-KR": { ...Bn, ...wr },
11881
11881
  "vi-VN": { ...zn, ...Mr }
11882
- }, Pc = H(() => import("./App-BjzhfhpF.js"));
11882
+ }, Pc = H(() => import("./App-CqQBBVF-.js"));
11883
11883
  export {
11884
11884
  hn as F,
11885
11885
  pn as a,
package/dist/app.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "vue";
2
- import { c as i, d as o, i as e, r as m } from "./app-Bh_S4QSD.js";
2
+ import { c as i, d as o, i as e, r as m } from "./app-Dv1xHBP_.js";
3
3
  export {
4
4
  i as FmApp,
5
5
  o as FormKitPlugin,
@@ -95,11 +95,12 @@ export type ApplyBrandKitOptions = {
95
95
  export type FdoMetadata = {
96
96
  type: 'BUSINESS' | 'RESTAURANT';
97
97
  country: string;
98
- pwaConfig: {
98
+ businessId?: string;
99
+ pwaConfig?: {
99
100
  short_name: string;
100
101
  name: string;
101
102
  background_color: string;
102
103
  theme_color: string;
103
104
  };
104
- brandkit: BrandKit | null;
105
+ brandkit?: BrandKit | null;
105
106
  };
@@ -1,2 +1,3 @@
1
+ import '@feedmepos/mf-remy-panel/style.css';
1
2
  declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
3
  export default _default;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Composable that listens for the `apply-brand-template` client event
3
+ * dispatched by the Remy chat panel's ApplyTemplateActionCard.
4
+ *
5
+ * When the AI agent generates a template and the user clicks "Apply Template",
6
+ * the action card fires a CustomEvent with the schema array as `detail`.
7
+ * This composable picks it up via `useClientEvent` and replaces the
8
+ * current template in the editor canvas.
9
+ *
10
+ * Must be called inside a component's setup (e.g. BuilderView.vue)
11
+ * so the listener is properly mounted/unmounted with the component lifecycle.
12
+ */
13
+ export declare function useEditorBridge(): void;
@@ -1,9 +1,9 @@
1
- import { H as r, a as p } from "./index-C6_vWPi0.js";
1
+ import { H as r, a as p } from "./index-D0LOMBBD.js";
2
2
  const i = () => p().PWA_ICON_SERVICE_BACKEND;
3
- async function s(e, t, a) {
3
+ async function d(e, t, a) {
4
4
  const n = new FormData();
5
5
  return n.append("file", a), (await r.Put(
6
- "https://api.feedme.vip",
6
+ "https://api.feedmedev.vip",
7
7
  `/image/${e}/${t}`,
8
8
  {
9
9
  headers: {
@@ -13,9 +13,9 @@ async function s(e, t, a) {
13
13
  }
14
14
  )).data;
15
15
  }
16
- async function d(e, t) {
16
+ async function s(e, t) {
17
17
  return (await r.Delete(
18
- "https://api.feedme.vip",
18
+ "https://api.feedmedev.vip",
19
19
  `/image/${e}/${t}`
20
20
  )).data;
21
21
  }
@@ -29,8 +29,8 @@ async function o(e, t) {
29
29
  })).data;
30
30
  }
31
31
  const f = {
32
- uploadImage: s,
33
- deleteImage: d,
32
+ uploadImage: d,
33
+ deleteImage: s,
34
34
  uploadAppIcon: o
35
35
  };
36
36
  function u(e) {
@@ -1,22 +1,22 @@
1
- import { H as d } from "./index-C6_vWPi0.js";
1
+ import { H as d } from "./index-D0LOMBBD.js";
2
2
  import { defineStore as w } from "pinia";
3
3
  import { ref as y } from "vue";
4
4
  import { v as I } from "./v4-CKwdnpQf.js";
5
5
  async function g(e) {
6
6
  return (await d.Get(
7
- "https://api.feedme.vip",
7
+ "https://api.feedmedev.vip",
8
8
  `/template/${e}`
9
9
  )).data;
10
10
  }
11
11
  async function A(e, l, p) {
12
12
  return (await d.Get(
13
- "https://api.feedme.vip",
13
+ "https://api.feedmedev.vip",
14
14
  `/template/${e}/${l}/${p}`
15
15
  )).data;
16
16
  }
17
17
  async function P(e, l, p, m) {
18
18
  return (await d.Put(
19
- "https://api.feedme.vip",
19
+ "https://api.feedmedev.vip",
20
20
  `/template/${e}/${l}/${p.templateId}`,
21
21
  {
22
22
  data: {
@@ -29,7 +29,7 @@ async function P(e, l, p, m) {
29
29
  }
30
30
  async function M(e, l, p) {
31
31
  return (await d.Put(
32
- "https://api.feedme.vip",
32
+ "https://api.feedmedev.vip",
33
33
  `/template/${e}/active${p ? `/${p}` : ""}`,
34
34
  {
35
35
  data: {
@@ -40,19 +40,19 @@ async function M(e, l, p) {
40
40
  }
41
41
  async function b(e, l) {
42
42
  return (await d.Get(
43
- "https://api.feedme.vip",
43
+ "https://api.feedmedev.vip",
44
44
  `/template/${e}/active${l ? `/${l}` : ""}`
45
45
  )).data;
46
46
  }
47
47
  async function U(e, l, p) {
48
48
  return await d.Head(
49
- "https://api.feedme.vip",
49
+ "https://api.feedmedev.vip",
50
50
  `/template/${e}/${l}/${p}`
51
51
  ).then((c) => c.status === 200).catch(() => !1);
52
52
  }
53
53
  async function B(e, l, p) {
54
54
  return (await d.Post(
55
- "https://api.feedme.vip",
55
+ "https://api.feedmedev.vip",
56
56
  `/template/${e}/${l}/rename`,
57
57
  {
58
58
  data: {
@@ -63,7 +63,7 @@ async function B(e, l, p) {
63
63
  }
64
64
  async function x(e, l, p) {
65
65
  return (await d.Delete(
66
- "https://api.feedme.vip",
66
+ "https://api.feedmedev.vip",
67
67
  `/template/${e}/${l}/${p}`
68
68
  )).data;
69
69
  }
@@ -120,7 +120,7 @@ const i = {
120
120
  t
121
121
  );
122
122
  }
123
- async function o(a, t) {
123
+ async function v(a, t) {
124
124
  i.setMainPageTemplateId(
125
125
  a,
126
126
  e.value.selectedTemplate.templateId,
@@ -129,7 +129,7 @@ const i = {
129
129
  e.value.activeTemplateId = e.value.selectedTemplate.templateId;
130
130
  });
131
131
  }
132
- function f(a = {}) {
132
+ function o(a = {}) {
133
133
  let t = "Untitled", s = 2;
134
134
  e.value.allTemplates.forEach((r) => {
135
135
  if (!r.templateAlias.startsWith("Untitled")) return;
@@ -145,7 +145,7 @@ const i = {
145
145
  };
146
146
  e.value.allTemplates.push(n), e.value.selectedTemplate = n;
147
147
  }
148
- async function v(a, t, s) {
148
+ async function f(a, t, s) {
149
149
  await i.renameTemplate(a, t, s).then(() => {
150
150
  var n;
151
151
  e.value.allTemplates = e.value.allTemplates.map((r) => r.templateId === t ? {
@@ -185,9 +185,9 @@ const i = {
185
185
  getMainTemplateId: m,
186
186
  setSelectedTemplate: c,
187
187
  saveTemplate: T,
188
- setMainPageTemplate: o,
189
- addNewTemplate: f,
190
- renameTemplate: v,
188
+ setMainPageTemplate: v,
189
+ addNewTemplate: o,
190
+ renameTemplate: f,
191
191
  deleteTemplate: h,
192
192
  unpublishTemplate: $
193
193
  };
@@ -1,4 +1,4 @@
1
- import { B as u } from "./index-BUEKCOG0.js";
1
+ import { B as u } from "./index-C4vwWvn_.js";
2
2
  import { defineStore as a } from "pinia";
3
3
  import { ref as r } from "vue";
4
4
  const c = a("business", () => {
@@ -0,0 +1,112 @@
1
+ import { H as a, a as i } from "./index-D0LOMBBD.js";
2
+ const o = () => i().PORTAL_V2_BACKEND, d = () => i().LICENSE_BACKEND;
3
+ async function p(t) {
4
+ return (await a.Get(
5
+ "https://api.feedmedev.vip",
6
+ `/short-url/${t}`
7
+ )).data;
8
+ }
9
+ async function c(t, e, s) {
10
+ return await a.Post(
11
+ "https://api.feedmedev.vip",
12
+ "/short-url",
13
+ {
14
+ data: {
15
+ slug: t,
16
+ oldSlug: e,
17
+ type: "BUSINESS",
18
+ businessId: s
19
+ }
20
+ }
21
+ ).then((n) => n.data).catch((n) => {
22
+ var r;
23
+ throw (r = n.response) == null ? void 0 : r.data;
24
+ });
25
+ }
26
+ async function u(t) {
27
+ return (await a.Get(
28
+ "https://api.feedmedev.vip",
29
+ `/metadata/${t}/config`
30
+ )).data;
31
+ }
32
+ async function f(t, e, s) {
33
+ return (await a.Post(
34
+ "https://api.feedmedev.vip",
35
+ `/metadata/${t}/config`,
36
+ {
37
+ data: {
38
+ name: e,
39
+ backgroundColor: "#ffffff",
40
+ country: s
41
+ }
42
+ }
43
+ )).data;
44
+ }
45
+ async function m(t) {
46
+ return (await a.Get(
47
+ "https://api.feedmedev.vip",
48
+ `/metadata/${t}/brandkit`
49
+ )).data;
50
+ }
51
+ async function h(t, e) {
52
+ return (await a.Post(
53
+ "https://api.feedmedev.vip",
54
+ `/metadata/${t}/brandkit`,
55
+ {
56
+ data: e
57
+ }
58
+ )).data;
59
+ }
60
+ async function l(t, e) {
61
+ return (await a.Get(
62
+ "https://api.feedmedev.vip",
63
+ `/metadata/${t}/brandkit/template-history/${e}`
64
+ )).data;
65
+ }
66
+ async function v(t, e, s) {
67
+ return (await a.Post(
68
+ "https://api.feedmedev.vip",
69
+ `/metadata/${t}/brandkit/template-restore/${e}/${s}`,
70
+ {}
71
+ )).data;
72
+ }
73
+ async function y(t, e) {
74
+ return (await a.Delete(
75
+ "https://api.feedmedev.vip",
76
+ `/metadata/${t}/brandkit/template-history/${e}`
77
+ )).data;
78
+ }
79
+ async function $(t, e) {
80
+ return await a.Put(
81
+ o(),
82
+ `businesses/${t}/profile`,
83
+ {
84
+ data: e
85
+ }
86
+ ).catch((n) => {
87
+ var r;
88
+ throw (r = n.response) == null ? void 0 : r.data;
89
+ });
90
+ }
91
+ async function w(t) {
92
+ return await a.Get(
93
+ d(),
94
+ `api/business/${t}/feature/miniprogram`
95
+ ).then((e) => e.data).catch(() => !1);
96
+ }
97
+ const g = {
98
+ getGlobalSlug: p,
99
+ setShortUrl: c,
100
+ getBusinessMetadata: u,
101
+ setBusinessMetadata: f,
102
+ getBusinessBrandkit: m,
103
+ setBusinessBrandkit: h,
104
+ getTemplateHistory: l,
105
+ restoreTemplateVersion: v,
106
+ clearTemplateHistory: y,
107
+ updateBusinessProfile: $,
108
+ getBusinessPremiumStatus: w
109
+ };
110
+ export {
111
+ g as B
112
+ };