@feedmepos/mf-brand-app-builder 0.5.43-dev.1 → 0.5.45-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.
@@ -0,0 +1,121 @@
1
+ import { defineComponent as g, computed as _, resolveComponent as d, createElementBlock as i, openBlock as a, Fragment as v, renderList as b, createVNode as n, unref as f, withCtx as h, ref as x, onMounted as y, onBeforeMount as B, watch as F, createElementVNode as p, createBlock as k, createCommentVNode as S } from "vue";
2
+ import { useCoreStore as C } from "@feedmepos/mf-common";
3
+ import { V as R } from "./vue-sonner-CBFYmm8_.js";
4
+ import { useRoute as V, useRouter as P, RouterLink as L, RouterView as N } from "vue-router";
5
+ import { u as A, i as E } from "./useBusinessFeatureFlag-BtLpiYy7.js";
6
+ import { g as M } from "./index-D0LOMBBD.js";
7
+ import { u as $ } from "./index-BA2J-Ffh.js";
8
+ const z = { 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" }, O = /* @__PURE__ */ g({
9
+ __name: "NavigationSidebar",
10
+ setup(w) {
11
+ const t = V();
12
+ P();
13
+ const c = A("order_miniprogram_v2"), r = [
14
+ {
15
+ name: "brandkit",
16
+ icon: "style"
17
+ },
18
+ {
19
+ name: "projects",
20
+ icon: "folder"
21
+ },
22
+ {
23
+ name: "builder",
24
+ icon: "build"
25
+ },
26
+ {
27
+ name: "miniprogram-workspace",
28
+ icon: "auto_awesome",
29
+ flag: c
30
+ },
31
+ {
32
+ name: "settings",
33
+ icon: "settings"
34
+ }
35
+ ], u = _(
36
+ () => r.filter((e) => !e.flag || e.flag.value)
37
+ ), o = _(
38
+ () => (e) => t.matched.map((s) => s.name).includes(e)
39
+ );
40
+ return (e, s) => {
41
+ const m = d("FmButton");
42
+ return a(), i("div", z, [
43
+ (a(!0), i(v, null, b(u.value, (l) => (a(), i("div", null, [
44
+ n(f(L), {
45
+ to: { name: l.name }
46
+ }, {
47
+ default: h(() => [
48
+ n(m, {
49
+ class: "w-[44px] !h-[44px]",
50
+ size: "lg",
51
+ icon: l.icon,
52
+ "icon-color": o.value(l.name) ? "primary" : "neutral-gray-400",
53
+ "bg-color": o.value(l.name) ? "system-warning-100" : "neutral-white"
54
+ }, null, 8, ["icon", "icon-color", "bg-color"])
55
+ ]),
56
+ _: 2
57
+ }, 1032, ["to"])
58
+ ]))), 256))
59
+ ]);
60
+ };
61
+ }
62
+ }), j = { class: "relative h-[calc(100vh-56px)] w-screen" }, D = { class: "flex w-full h-full" }, Q = /* @__PURE__ */ g({
63
+ __name: "App",
64
+ setup(w) {
65
+ const t = C(), c = $(), r = x(!0);
66
+ async function u() {
67
+ var o;
68
+ r.value = !0, (o = t.currentBusiness.value) != null && o._id && (await M(), await c.getPremiumStatus(t.currentBusiness.value._id), r.value = !1);
69
+ }
70
+ return y(async () => {
71
+ console.log(
72
+ `Running v0.5.45-dev.1 on ${t.namespace.value}`
73
+ ), t.hideSidebar.value = !0;
74
+ const o = t.namespace.value === "prod" ? "prod" : "dev";
75
+ E(o).catch(
76
+ (e) => console.warn("[FeatureFlag] init failed:", e)
77
+ );
78
+ }), B(() => {
79
+ t.hideSidebar.value = !1;
80
+ }), F(
81
+ () => t.currentBusiness.value,
82
+ () => u(),
83
+ { immediate: !0 }
84
+ ), (o, e) => {
85
+ const s = d("FmCircularProgress"), m = d("FmOverlay");
86
+ return a(), i(v, null, [
87
+ e[0] || (e[0] = p("link", {
88
+ href: "https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0..1,0",
89
+ rel: "stylesheet"
90
+ }, null, -1)),
91
+ p("div", j, [
92
+ n(f(R), {
93
+ position: "top-right",
94
+ "rich-colors": "",
95
+ "close-button": "",
96
+ duration: 3e3
97
+ }),
98
+ r.value ? (a(), k(m, {
99
+ key: 0,
100
+ "dismiss-away": !1,
101
+ "prevent-backdrop-event": !1,
102
+ transparent: !1,
103
+ "center-content": ""
104
+ }, {
105
+ default: h(() => [
106
+ n(s, { size: "xxl" })
107
+ ]),
108
+ _: 1
109
+ })) : S("", !0),
110
+ p("div", D, [
111
+ n(O),
112
+ n(f(N), { class: "flex-1" })
113
+ ])
114
+ ])
115
+ ], 64);
116
+ };
117
+ }
118
+ });
119
+ export {
120
+ Q as default
121
+ };