@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 CHANGED
@@ -4,9 +4,11 @@ This project is a Vue 3-based application for merchants to manage their business
4
4
 
5
5
  ## Independent Mini Program v2 entry
6
6
 
7
- The `order_miniprogram_v2` environment flag still controls visibility of the
8
- Mini Program v2 menu item. It opens the independent `/miniprogram-v2` ecosystem
9
- in the same tab, preserving the selected business, country and restaurant.
7
+ The `order_miniprogram_v2` business flag controls visibility of the "Try new
8
+ version of Miniprogram" banner at the top of the Brandkit page, and can be
9
+ toggled per business via its Flagsmith identity (`business-{id}`). Its action
10
+ opens the independent `/miniprogram-v2` ecosystem in the same tab, preserving
11
+ the selected business, country and restaurant.
10
12
  Standalone merchant development falls back to the matching environment's
11
13
  Portal URL when the host route is absent.
12
14
 
@@ -0,0 +1,114 @@
1
+ import { defineComponent as d, computed as h, resolveComponent as u, createElementBlock as m, openBlock as i, Fragment as f, renderList as w, createElementVNode as l, createVNode as a, unref as p, withCtx as _, ref as y, onMounted as b, onBeforeMount as x, watch as B, createBlock as F, createCommentVNode as k } from "vue";
2
+ import { useCoreStore as S } from "@feedmepos/mf-common";
3
+ import { V as C } from "./vue-sonner-CBFYmm8_.js";
4
+ import { useRoute as R, RouterLink as V, RouterView as L } from "vue-router";
5
+ import { g as P } from "./index-D0LOMBBD.js";
6
+ import { u as A } from "./index-BA2J-Ffh.js";
7
+ import { i as N } from "./useBusinessFeatureFlag-CfpvWi12.js";
8
+ const $ = { 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" }, z = /* @__PURE__ */ d({
9
+ __name: "NavigationSidebar",
10
+ setup(g) {
11
+ const e = R(), c = [
12
+ {
13
+ name: "brandkit",
14
+ icon: "style"
15
+ },
16
+ {
17
+ name: "projects",
18
+ icon: "folder"
19
+ },
20
+ {
21
+ name: "builder",
22
+ icon: "build"
23
+ },
24
+ {
25
+ name: "settings",
26
+ icon: "settings"
27
+ }
28
+ ], n = h(
29
+ () => (s) => e.matched.map((t) => t.name).includes(s)
30
+ );
31
+ return (s, t) => {
32
+ const r = u("FmButton");
33
+ return i(), m("div", $, [
34
+ (i(), m(f, null, w(c, (o) => l("div", {
35
+ key: o.name
36
+ }, [
37
+ a(p(V), {
38
+ to: { name: o.name }
39
+ }, {
40
+ default: _(() => [
41
+ a(r, {
42
+ class: "w-[44px] !h-[44px]",
43
+ size: "lg",
44
+ icon: o.icon,
45
+ "icon-color": n.value(o.name) ? "primary" : "neutral-gray-400",
46
+ "bg-color": n.value(o.name) ? "system-warning-100" : "neutral-white"
47
+ }, null, 8, ["icon", "icon-color", "bg-color"])
48
+ ]),
49
+ _: 2
50
+ }, 1032, ["to"])
51
+ ])), 64))
52
+ ]);
53
+ };
54
+ }
55
+ }), M = { class: "relative h-[calc(100vh-56px)] w-screen" }, E = { class: "flex w-full h-full" }, H = /* @__PURE__ */ d({
56
+ __name: "App",
57
+ setup(g) {
58
+ const e = S(), c = A(), n = y(!0);
59
+ async function s() {
60
+ var t;
61
+ n.value = !0, (t = e.currentBusiness.value) != null && t._id && (await P(), await c.getPremiumStatus(e.currentBusiness.value._id), n.value = !1);
62
+ }
63
+ return b(async () => {
64
+ console.log(
65
+ `Running v0.5.47-dev.1 on ${e.namespace.value}`
66
+ ), e.hideSidebar.value = !0;
67
+ const t = e.namespace.value === "prod" ? "prod" : "dev";
68
+ N(t).catch(
69
+ (r) => console.warn("[FeatureFlag] init failed:", r)
70
+ );
71
+ }), x(() => {
72
+ e.hideSidebar.value = !1;
73
+ }), B(
74
+ () => e.currentBusiness.value,
75
+ () => s(),
76
+ { immediate: !0 }
77
+ ), (t, r) => {
78
+ const o = u("FmCircularProgress"), v = u("FmOverlay");
79
+ return i(), m(f, null, [
80
+ r[0] || (r[0] = l("link", {
81
+ href: "https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0..1,0",
82
+ rel: "stylesheet"
83
+ }, null, -1)),
84
+ l("div", M, [
85
+ a(p(C), {
86
+ position: "top-right",
87
+ "rich-colors": "",
88
+ "close-button": "",
89
+ duration: 3e3
90
+ }),
91
+ n.value ? (i(), F(v, {
92
+ key: 0,
93
+ "dismiss-away": !1,
94
+ "prevent-backdrop-event": !1,
95
+ transparent: !1,
96
+ "center-content": ""
97
+ }, {
98
+ default: _(() => [
99
+ a(o, { size: "xxl" })
100
+ ]),
101
+ _: 1
102
+ })) : k("", !0),
103
+ l("div", E, [
104
+ a(z),
105
+ a(p(L), { class: "flex-1" })
106
+ ])
107
+ ])
108
+ ], 64);
109
+ };
110
+ }
111
+ });
112
+ export {
113
+ H as default
114
+ };