@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.
@@ -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-BCW4xCUr.js";
3
+ import { H as m } from "./index-4BDCQhnW.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.feedme.vip",
8
+ "https://api.feedmedev.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.feedme.vip",
14
+ "https://api.feedmedev.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.feedme.vip",
20
+ "https://api.feedmedev.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.feedme.vip",
32
+ "https://api.feedmedev.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.feedme.vip",
43
+ "https://api.feedmedev.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.feedme.vip",
49
+ "https://api.feedmedev.vip",
50
50
  `/template/${e}/${l}/${s}`
51
- ).then((d) => d.status === 200).catch(() => !1);
51
+ ).then((r) => r.status === 200).catch(() => !1);
52
52
  }
53
53
  async function M(e, l, s) {
54
54
  return (await m.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 M(e, l, s) {
63
63
  }
64
64
  async function N(e, l, s) {
65
65
  return (await m.Delete(
66
- "https://api.feedme.vip",
66
+ "https://api.feedmedev.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 d(t) {
106
+ function r(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((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}`);
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}`);
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 r;
143
+ var d;
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), ((r = e.value.selectedTemplate) == null ? void 0 : r.templateId) === a && (e.value.selectedTemplate.templateAlias = i);
148
+ } : n), ((d = e.value.selectedTemplate) == null ? void 0 : d.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: d,
175
+ setSelectedTemplate: r,
176
176
  saveTemplate: u,
177
177
  setMainPageTemplate: o,
178
178
  addNewTemplate: T,
@@ -1,14 +1,14 @@
1
- import { H as n, a as o } from "./index-BCW4xCUr.js";
1
+ import { H as n, a as o } from "./index-4BDCQhnW.js";
2
2
  const i = () => o().PORTAL_V2_BACKEND;
3
3
  async function c(t) {
4
4
  return (await n.Get(
5
- "https://api.feedme.vip",
5
+ "https://api.feedmedev.vip",
6
6
  `/short-url/${t}`
7
7
  )).data;
8
8
  }
9
- async function p(t, a, r) {
9
+ async function d(t, a, r) {
10
10
  return await n.Post(
11
- "https://api.feedme.vip",
11
+ "https://api.feedmedev.vip",
12
12
  "/short-url",
13
13
  {
14
14
  data: {
@@ -23,15 +23,15 @@ async function p(t, a, r) {
23
23
  throw (s = e.response) == null ? void 0 : s.data;
24
24
  });
25
25
  }
26
- async function u(t) {
26
+ async function p(t) {
27
27
  return (await n.Get(
28
- "https://api.feedme.vip",
28
+ "https://api.feedmedev.vip",
29
29
  `/metadata/${t}/config`
30
30
  )).data;
31
31
  }
32
- async function f(t, a, r) {
32
+ async function u(t, a, r) {
33
33
  return (await n.Post(
34
- "https://api.feedme.vip",
34
+ "https://api.feedmedev.vip",
35
35
  `/metadata/${t}/config`,
36
36
  {
37
37
  data: {
@@ -42,7 +42,7 @@ async function f(t, a, r) {
42
42
  }
43
43
  )).data;
44
44
  }
45
- async function d(t, a) {
45
+ async function f(t, a) {
46
46
  return await n.Put(
47
47
  i(),
48
48
  `businesses/${t}/profile`,
@@ -56,10 +56,10 @@ async function d(t, a) {
56
56
  }
57
57
  const m = {
58
58
  getGlobalSlug: c,
59
- setShortUrl: p,
60
- getBusinessMetadata: u,
61
- setBusinessMetadata: f,
62
- updateBusinessProfile: d
59
+ setShortUrl: d,
60
+ getBusinessMetadata: p,
61
+ setBusinessMetadata: u,
62
+ updateBusinessProfile: f
63
63
  };
64
64
  export {
65
65
  m as B
@@ -5640,7 +5640,7 @@ const Ks = ["src"], Qs = {
5640
5640
  n.imageUrl ? (F(), Y("img", {
5641
5641
  key: 0,
5642
5642
  src: Te(Xe)(n.imageUrl),
5643
- class: "w-24 h-24 object-contain"
5643
+ class: "w-32 h-32 object-contain"
5644
5644
  }, null, 8, Ks)) : (F(), Y("div", Qs, [
5645
5645
  W(U, {
5646
5646
  name: "add_photo_alternate",
@@ -5671,7 +5671,7 @@ const Ks = ["src"], Qs = {
5671
5671
  n.imageUrl ? (F(), Y("img", {
5672
5672
  key: 0,
5673
5673
  src: Te(Xe)(n.imageUrl),
5674
- class: "w-24 h-24 object-contain"
5674
+ class: "w-32 h-32 object-contain"
5675
5675
  }, null, 8, Js)) : (F(), Y("div", er, [
5676
5676
  W(U, {
5677
5677
  name: "add_photo_alternate",
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-brand-app-builder",
3
- "version": "0.5.10-alpha",
3
+ "version": "0.5.11-alpha",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -69,4 +69,4 @@
69
69
  "vite-plugin-vue-devtools": "^7.0.25",
70
70
  "vue-tsc": "^2.0.11"
71
71
  }
72
- }
72
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-brand-app-builder",
3
- "version": "0.5.10-alpha",
3
+ "version": "0.5.11-alpha",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -1,72 +0,0 @@
1
- import { defineComponent as x, ref as y, resolveComponent as b, openBlock as r, createElementBlock as s, createVNode as c, Fragment as w, createElementVNode as i, unref as u, createCommentVNode as f } from "vue";
2
- import { r as d, I as h } from "./image-CPtcuzIw.js";
3
- import { useCoreStore as C } from "@feedmepos/mf-common";
4
- import "./main-BUI2Mmvv.js";
5
- import { _ as I } from "./Icon.vue_vue_type_style_index_0_lang-CVCHCcWR.js";
6
- import { C as $ } from "./CircularProgress-h90pbjU3.js";
7
- import { v as k } from "./v4-ANoOI1Qw.js";
8
- const F = { class: "w-full h-[210px] relative" }, B = { 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" }, P = ["src"], j = {
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
- }, A = /* @__PURE__ */ x({
12
- __name: "ImageUpload",
13
- props: {
14
- context: {}
15
- },
16
- setup(_) {
17
- const e = _, a = C(), t = y(!1);
18
- async function g(o) {
19
- t.value = !0, await h.uploadImage(
20
- a.currentBusiness.value._id,
21
- `${k()}.${o.name.split(".").pop()}`,
22
- o
23
- ).then((m) => {
24
- const l = `https://image.feedme.cc/business/${a.currentBusiness.value._id}/${m.imagePath}`;
25
- e.context.node.input(l);
26
- const n = new Image();
27
- n.onload = () => {
28
- var p;
29
- ((p = e.context.node.at("$root")) == null ? void 0 : p._value).containerStyles.height = `${Math.min(n.height, 400)}px`;
30
- }, n.src = d(l);
31
- }).finally(() => t.value = !1);
32
- }
33
- async function v() {
34
- t.value = !0;
35
- const o = e.context._value.split("/").pop();
36
- await h.deleteImage(a.currentBusiness.value._id, o).then(() => e.context.node.input("")).finally(() => t.value = !1);
37
- }
38
- return (o, m) => {
39
- const l = b("FmDropField");
40
- return r(), s("div", F, [
41
- c(l, {
42
- class: "w-full h-full",
43
- onFileUpload: g
44
- }),
45
- e.context._value && !t.value ? (r(), s(w, { key: 0 }, [
46
- i("div", B, [
47
- i("img", {
48
- class: "w-full h-full object-contain",
49
- src: u(d)(e.context._value)
50
- }, null, 8, P)
51
- ]),
52
- i("button", {
53
- type: "button",
54
- 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",
55
- onClick: v
56
- }, [
57
- c(u(I), {
58
- name: "close",
59
- class: "!text-[16px] text-fm-color-typo-white"
60
- })
61
- ])
62
- ], 64)) : f("", !0),
63
- t.value ? (r(), s("div", j, [
64
- c(u($))
65
- ])) : f("", !0)
66
- ]);
67
- };
68
- }
69
- });
70
- export {
71
- A as default
72
- };