@feedmepos/mf-brand-app-builder 0.5.47-dev.0 → 0.5.47-dev.1
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-Ck5Q4Z44.js +114 -0
- package/dist/{BrandkitView-DUlf5K3i.js → BrandkitView-BZCLurZL.js} +3366 -3315
- package/dist/{BuilderView-DLcKTOoe.js → BuilderView-BDYSDiXE.js} +2 -2
- package/dist/{ImageUpload-Bm2BY6Y1.js → ImageUpload-XCqd_Lf1.js} +1 -1
- package/dist/{ListRepeater-Cuo0XXKs.js → ListRepeater-BjWvukJ6.js} +1 -1
- package/dist/{ProjectView-DrgxaTFz.js → ProjectView-DO6VUrFS.js} +2 -2
- package/dist/{app-Doep9hzN.js → app-BG4E6k9-.js} +163 -142
- 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-Df-s3E18.js} +1 -1
- package/dist/{main-CiLAou6A.js → main-C91a3jWJ.js} +2 -2
- package/dist/package.json +1 -1
- package/dist/style.css +1 -1
- package/dist/{useBusinessFeatureFlag-CEkj13Xd.js → useBusinessFeatureFlag-CfpvWi12.js} +218 -227
- package/package.json +1 -1
- package/dist/App-CscQqcFq.js +0 -163
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
|
-
};
|