@feedmepos/mf-brand-app-builder 0.5.47-dev.0 → 0.5.47-prod
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.
- package/README.md +5 -3
- package/dist/App-BH-HEj-A.js +114 -0
- package/dist/{AssetsSettings-DtZ6goQl.js → AssetsSettings-Do8rt2sU.js} +22 -22
- package/dist/{BrandkitView-DUlf5K3i.js → BrandkitView-DBHBRqJd.js} +3366 -3315
- package/dist/{BuilderView-DLcKTOoe.js → BuilderView-C-9L9DYj.js} +7 -7
- package/dist/{CredentialSettings-3eVBw1x8.js → CredentialSettings-BB_Yroul.js} +1 -1
- package/dist/{ImageUpload-Bm2BY6Y1.js → ImageUpload-B_Cwb7uG.js} +8 -8
- package/dist/{LinkButton-De-YNclu.js → LinkButton-DNXBKGCn.js} +1 -1
- package/dist/{ListRepeater-Cuo0XXKs.js → ListRepeater-BUwnFzc4.js} +1 -1
- package/dist/{ManagementSettings-CWAKkmbz.js → ManagementSettings-CjsGetkI.js} +6 -6
- package/dist/{ProjectView-DrgxaTFz.js → ProjectView-B_MXOUPV.js} +3 -3
- package/dist/{app-Doep9hzN.js → app-CSlr7y4L.js} +167 -146
- package/dist/app.js +1 -1
- package/dist/client/components/src/components/atoms/CircularProgress.vue.d.ts +1 -1
- package/dist/client/merchant/src/app.d.ts +21 -0
- package/dist/{dayjs.min-CKlJsMOX.js → dayjs.min-DGxqbGsh.js} +1 -1
- package/dist/{image-D_Djf1PS.js → image-S7-2rbQS.js} +7 -7
- package/dist/{index-BA2J-Ffh.js → index-BpYD24Jn.js} +1 -1
- package/dist/{index-D0LOMBBD.js → index-C6_vWPi0.js} +27 -27
- package/dist/index-CP6_oC8N.js +134 -0
- package/dist/{index-Bk6TOZrx.js → index-CPs0rWCO.js} +15 -15
- package/dist/{main-CiLAou6A.js → main-Cn1Sp_j-.js} +2 -2
- package/dist/package.json +1 -1
- package/dist/style.css +1 -1
- package/dist/{useBusinessFeatureFlag-CEkj13Xd.js → useBusinessFeatureFlag-C_l1nFQm.js} +218 -227
- package/package.json +1 -1
- package/dist/App-CscQqcFq.js +0 -163
- package/dist/index-CVVQJJYY.js +0 -134
package/package.json
CHANGED
package/dist/App-CscQqcFq.js
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import { defineComponent as w, computed as v, resolveComponent as h, createElementBlock as p, openBlock as l, Fragment as b, renderList as F, createBlock as k, unref as f, createVNode as c, withCtx as x, ref as P, onMounted as R, onBeforeMount as S, watch as C, createElementVNode as _, createCommentVNode as N } from "vue";
|
|
2
|
-
import { useCoreStore as B } from "@feedmepos/mf-common";
|
|
3
|
-
import { V as M } from "./vue-sonner-CBFYmm8_.js";
|
|
4
|
-
import { useRoute as $, useRouter as V, RouterLink as E, RouterView as L } from "vue-router";
|
|
5
|
-
import { u as I, i as q } from "./useBusinessFeatureFlag-CEkj13Xd.js";
|
|
6
|
-
import { g as z } from "./index-D0LOMBBD.js";
|
|
7
|
-
import { u as A } from "./index-BA2J-Ffh.js";
|
|
8
|
-
function O(g, e, u) {
|
|
9
|
-
const r = {};
|
|
10
|
-
for (const o of ["businessId", "country", "restaurantId"]) {
|
|
11
|
-
const i = e[o] ?? g[o];
|
|
12
|
-
typeof i == "string" && i && (r[o] = i);
|
|
13
|
-
}
|
|
14
|
-
const a = u === "prod" ? "https://portal.feedme.cc" : "https://portal.feedmedev.cc", t = new URLSearchParams(r).toString();
|
|
15
|
-
return {
|
|
16
|
-
name: "miniprogram-v2-ecosystem",
|
|
17
|
-
query: r,
|
|
18
|
-
href: `${a}/miniprogram-v2${t ? `?${t}` : ""}`
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
const U = { 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" }, j = ["href"], D = /* @__PURE__ */ w({
|
|
22
|
-
__name: "NavigationSidebar",
|
|
23
|
-
setup(g) {
|
|
24
|
-
const e = $(), u = V(), r = B(), a = v(
|
|
25
|
-
() => {
|
|
26
|
-
var s, m;
|
|
27
|
-
return O(
|
|
28
|
-
e.query,
|
|
29
|
-
{
|
|
30
|
-
businessId: (s = r.currentBusiness.value) == null ? void 0 : s._id,
|
|
31
|
-
country: r.currentCountry.value,
|
|
32
|
-
restaurantId: (m = r.currentRestaurant.value) == null ? void 0 : m._id
|
|
33
|
-
},
|
|
34
|
-
r.namespace.value
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
), t = I(
|
|
38
|
-
"order_miniprogram_v2"
|
|
39
|
-
), o = [
|
|
40
|
-
{
|
|
41
|
-
name: "brandkit",
|
|
42
|
-
icon: "style"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
name: "projects",
|
|
46
|
-
icon: "folder"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
name: "builder",
|
|
50
|
-
icon: "build"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
name: "miniprogram-workspace",
|
|
54
|
-
icon: "open_in_new",
|
|
55
|
-
flag: t
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
name: "settings",
|
|
59
|
-
icon: "settings"
|
|
60
|
-
}
|
|
61
|
-
], i = v(
|
|
62
|
-
() => o.filter((s) => !s.flag || s.flag.value)
|
|
63
|
-
), d = v(
|
|
64
|
-
() => (s) => e.matched.map((m) => m.name).includes(s)
|
|
65
|
-
);
|
|
66
|
-
return (s, m) => {
|
|
67
|
-
const y = h("FmButton");
|
|
68
|
-
return l(), p("div", U, [
|
|
69
|
-
(l(!0), p(b, null, F(i.value, (n) => (l(), p("div", {
|
|
70
|
-
key: n.name
|
|
71
|
-
}, [
|
|
72
|
-
n.name === "miniprogram-workspace" && !f(u).hasRoute(a.value.name) ? (l(), p("a", {
|
|
73
|
-
key: 0,
|
|
74
|
-
href: a.value.href,
|
|
75
|
-
title: "New Mini Program ↗",
|
|
76
|
-
"aria-label": "New Mini Program"
|
|
77
|
-
}, [
|
|
78
|
-
c(y, {
|
|
79
|
-
class: "w-[44px] !h-[44px]",
|
|
80
|
-
size: "lg",
|
|
81
|
-
icon: n.icon
|
|
82
|
-
}, null, 8, ["icon"])
|
|
83
|
-
], 8, j)) : (l(), k(f(E), {
|
|
84
|
-
key: 1,
|
|
85
|
-
to: n.name === "miniprogram-workspace" ? { name: a.value.name, query: a.value.query } : { name: n.name },
|
|
86
|
-
title: n.name === "miniprogram-workspace" ? "New Mini Program ↗" : void 0,
|
|
87
|
-
"aria-label": n.name === "miniprogram-workspace" ? "New Mini Program" : void 0
|
|
88
|
-
}, {
|
|
89
|
-
default: x(() => [
|
|
90
|
-
c(y, {
|
|
91
|
-
class: "w-[44px] !h-[44px]",
|
|
92
|
-
size: "lg",
|
|
93
|
-
icon: n.icon,
|
|
94
|
-
"icon-color": d.value(n.name) ? "primary" : "neutral-gray-400",
|
|
95
|
-
"bg-color": d.value(n.name) ? "system-warning-100" : "neutral-white"
|
|
96
|
-
}, null, 8, ["icon", "icon-color", "bg-color"])
|
|
97
|
-
]),
|
|
98
|
-
_: 2
|
|
99
|
-
}, 1032, ["to", "title", "aria-label"]))
|
|
100
|
-
]))), 128))
|
|
101
|
-
]);
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
}), G = { class: "relative h-[calc(100vh-56px)] w-screen" }, H = { class: "flex w-full h-full" }, Z = /* @__PURE__ */ w({
|
|
105
|
-
__name: "App",
|
|
106
|
-
setup(g) {
|
|
107
|
-
const e = B(), u = A(), r = P(!0);
|
|
108
|
-
async function a() {
|
|
109
|
-
var t;
|
|
110
|
-
r.value = !0, (t = e.currentBusiness.value) != null && t._id && (await z(), await u.getPremiumStatus(e.currentBusiness.value._id), r.value = !1);
|
|
111
|
-
}
|
|
112
|
-
return R(async () => {
|
|
113
|
-
console.log(
|
|
114
|
-
`Running v0.5.47-dev.0 on ${e.namespace.value}`
|
|
115
|
-
), e.hideSidebar.value = !0;
|
|
116
|
-
const t = e.namespace.value === "prod" ? "prod" : "dev";
|
|
117
|
-
q(t).catch(
|
|
118
|
-
(o) => console.warn("[FeatureFlag] init failed:", o)
|
|
119
|
-
);
|
|
120
|
-
}), S(() => {
|
|
121
|
-
e.hideSidebar.value = !1;
|
|
122
|
-
}), C(
|
|
123
|
-
() => e.currentBusiness.value,
|
|
124
|
-
() => a(),
|
|
125
|
-
{ immediate: !0 }
|
|
126
|
-
), (t, o) => {
|
|
127
|
-
const i = h("FmCircularProgress"), d = h("FmOverlay");
|
|
128
|
-
return l(), p(b, null, [
|
|
129
|
-
o[0] || (o[0] = _("link", {
|
|
130
|
-
href: "https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0..1,0",
|
|
131
|
-
rel: "stylesheet"
|
|
132
|
-
}, null, -1)),
|
|
133
|
-
_("div", G, [
|
|
134
|
-
c(f(M), {
|
|
135
|
-
position: "top-right",
|
|
136
|
-
"rich-colors": "",
|
|
137
|
-
"close-button": "",
|
|
138
|
-
duration: 3e3
|
|
139
|
-
}),
|
|
140
|
-
r.value ? (l(), k(d, {
|
|
141
|
-
key: 0,
|
|
142
|
-
"dismiss-away": !1,
|
|
143
|
-
"prevent-backdrop-event": !1,
|
|
144
|
-
transparent: !1,
|
|
145
|
-
"center-content": ""
|
|
146
|
-
}, {
|
|
147
|
-
default: x(() => [
|
|
148
|
-
c(i, { size: "xxl" })
|
|
149
|
-
]),
|
|
150
|
-
_: 1
|
|
151
|
-
})) : N("", !0),
|
|
152
|
-
_("div", H, [
|
|
153
|
-
c(D),
|
|
154
|
-
c(f(L), { class: "flex-1" })
|
|
155
|
-
])
|
|
156
|
-
])
|
|
157
|
-
], 64);
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
export {
|
|
162
|
-
Z as default
|
|
163
|
-
};
|
package/dist/index-CVVQJJYY.js
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { H as a, a as d } from "./index-D0LOMBBD.js";
|
|
2
|
-
const o = () => d().PORTAL_V2_BACKEND, c = () => d().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 u(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 f(t) {
|
|
27
|
-
return (await a.Get(
|
|
28
|
-
"https://api.feedmedev.vip",
|
|
29
|
-
`/metadata/${t}/config`
|
|
30
|
-
)).data;
|
|
31
|
-
}
|
|
32
|
-
async function m(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 l(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 v(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 y(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 $(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 w(t, e) {
|
|
80
|
-
const s = {
|
|
81
|
-
...e,
|
|
82
|
-
url: e.url || t
|
|
83
|
-
};
|
|
84
|
-
return await a.Put(
|
|
85
|
-
o(),
|
|
86
|
-
`businesses/${t}/profile`,
|
|
87
|
-
{
|
|
88
|
-
data: s
|
|
89
|
-
}
|
|
90
|
-
).catch((r) => {
|
|
91
|
-
var i;
|
|
92
|
-
throw (i = r.response) == null ? void 0 : i.data;
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
async function g(t) {
|
|
96
|
-
return await a.Get(
|
|
97
|
-
c(),
|
|
98
|
-
`api/business/${t}/feature/miniprogram`
|
|
99
|
-
).then((e) => e.data).catch(() => !1);
|
|
100
|
-
}
|
|
101
|
-
async function B(t) {
|
|
102
|
-
return (await a.Get(
|
|
103
|
-
"https://api.feedmedev.vip",
|
|
104
|
-
`/metadata/${t}/credentials`,
|
|
105
|
-
{}
|
|
106
|
-
)).data;
|
|
107
|
-
}
|
|
108
|
-
async function P(t, e) {
|
|
109
|
-
return (await a.Post(
|
|
110
|
-
"https://api.feedmedev.vip",
|
|
111
|
-
`/metadata/${t}/credentials`,
|
|
112
|
-
{
|
|
113
|
-
data: e
|
|
114
|
-
}
|
|
115
|
-
)).data;
|
|
116
|
-
}
|
|
117
|
-
const k = {
|
|
118
|
-
getGlobalSlug: p,
|
|
119
|
-
setShortUrl: u,
|
|
120
|
-
getBusinessMetadata: f,
|
|
121
|
-
setBusinessMetadata: m,
|
|
122
|
-
getBusinessBrandkit: l,
|
|
123
|
-
setBusinessBrandkit: h,
|
|
124
|
-
getTemplateHistory: v,
|
|
125
|
-
restoreTemplateVersion: y,
|
|
126
|
-
clearTemplateHistory: $,
|
|
127
|
-
updateBusinessProfile: w,
|
|
128
|
-
getBusinessPremiumStatus: g,
|
|
129
|
-
getCredentials: B,
|
|
130
|
-
updateCredentials: P
|
|
131
|
-
};
|
|
132
|
-
export {
|
|
133
|
-
k as B
|
|
134
|
-
};
|