@feedmepos/mf-brand-app-builder 0.5.46-prod → 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.
Files changed (28) hide show
  1. package/README.md +16 -0
  2. package/dist/App-Ck5Q4Z44.js +114 -0
  3. package/dist/{AssetsSettings-Do8rt2sU.js → AssetsSettings-DtZ6goQl.js} +22 -22
  4. package/dist/{BrandkitView-nfDiG0HS.js → BrandkitView-BZCLurZL.js} +3366 -3315
  5. package/dist/{BuilderView-D6aesdSu.js → BuilderView-BDYSDiXE.js} +7 -7
  6. package/dist/{CredentialSettings-BB_Yroul.js → CredentialSettings-3eVBw1x8.js} +1 -1
  7. package/dist/{ImageUpload-BZj85a8g.js → ImageUpload-XCqd_Lf1.js} +8 -8
  8. package/dist/{LinkButton-DNXBKGCn.js → LinkButton-De-YNclu.js} +1 -1
  9. package/dist/{ListRepeater-tz5QcoGP.js → ListRepeater-BjWvukJ6.js} +1 -1
  10. package/dist/{ManagementSettings-CjsGetkI.js → ManagementSettings-CWAKkmbz.js} +6 -6
  11. package/dist/{ProjectView-Dc-furGA.js → ProjectView-DO6VUrFS.js} +3 -3
  12. package/dist/{app-MFB1wiue.js → app-BG4E6k9-.js} +183 -151
  13. package/dist/app.js +1 -1
  14. package/dist/client/merchant/src/app.d.ts +32 -0
  15. package/dist/client/merchant/src/composables/miniprogramPortalEntry.d.ts +12 -0
  16. package/dist/{dayjs.min-Ctmrwhx3.js → dayjs.min-Df-s3E18.js} +1 -1
  17. package/dist/{image-S7-2rbQS.js → image-D_Djf1PS.js} +7 -7
  18. package/dist/{index-BpYD24Jn.js → index-BA2J-Ffh.js} +1 -1
  19. package/dist/{index-CPs0rWCO.js → index-Bk6TOZrx.js} +15 -15
  20. package/dist/index-CVVQJJYY.js +134 -0
  21. package/dist/{index-C6_vWPi0.js → index-D0LOMBBD.js} +27 -27
  22. package/dist/{main-LDiBfnFA.js → main-C91a3jWJ.js} +4 -4
  23. package/dist/package.json +1 -1
  24. package/dist/style.css +1 -1
  25. package/dist/{useBusinessFeatureFlag-Dw4hpcYo.js → useBusinessFeatureFlag-CfpvWi12.js} +218 -227
  26. package/package.json +1 -1
  27. package/dist/App-DD3xAvwR.js +0 -121
  28. package/dist/index-CP6_oC8N.js +0 -134
package/README.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  This project is a Vue 3-based application for merchants to manage their business mini-programs.
4
4
 
5
+ ## Independent Mini Program v2 entry
6
+
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.
12
+ Standalone merchant development falls back to the matching environment's
13
+ Portal URL when the host route is absent.
14
+
15
+ Keep `/brand/miniprogram-workspace` as a permission-gated compatibility route:
16
+ the runtime `MiniprogramWorkspace` export redirects historical links to the new
17
+ workspace. The v2 microfrontend owns this redirect and its own sidebar, while
18
+ the Portal host continues to own authentication, merchant selection and the
19
+ top bar. Brand Kit, v1 Builder and legacy settings remain available here.
20
+
5
21
  ## Recommended IDE Setup
6
22
 
7
23
  [VSCode](https://code.visualstudio.com/) + [Vue - Official](https://marketplace.visualstudio.com/items?itemName=Vue.volar) + [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
@@ -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
+ };