@feedmepos/mf-miniprogram-v2 0.2.2-dev.4 → 0.2.2-dev.6
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/dist/{App-D7vZDj-a.js → App-D1sOfLBT.js} +92 -92
- package/dist/{ControlPlaneView-jmtP3sml.js → ControlPlaneView-CuyJXUfw.js} +6818 -6583
- package/dist/EcosystemView-BbTNXyIZ.js +232 -0
- package/dist/app.js +3 -3
- package/dist/mobile-illustration-ByFKNJha.js +27 -0
- package/dist/package.json +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/EcosystemView--S4hk_t4.js +0 -232
- package/dist/StatusBadge.vue_vue_type_script_setup_true_lang-Bh9Eoe_H.js +0 -26
|
@@ -1,150 +1,150 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRoute as
|
|
3
|
-
import { useCoreStore as
|
|
4
|
-
import { P as
|
|
5
|
-
import { p as
|
|
6
|
-
import { w as
|
|
7
|
-
import { r as
|
|
8
|
-
import { _ as
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as V, computed as d, ref as q, onMounted as z, onBeforeUnmount as K, resolveComponent as k, openBlock as s, createElementBlock as i, Fragment as x, createElementVNode as a, normalizeClass as P, createVNode as l, renderList as B, unref as t, withCtx as v, toDisplayString as c, createCommentVNode as O, createTextVNode as A, createBlock as $ } from "vue";
|
|
2
|
+
import { useRoute as D, RouterView as G } from "vue-router";
|
|
3
|
+
import { useCoreStore as Q } from "@feedmepos/mf-common";
|
|
4
|
+
import { P as b } from "./PortalIcon-DO0VrIoY.js";
|
|
5
|
+
import { p as U } from "./portalContext-CTVzkJV7.js";
|
|
6
|
+
import { w as H, p as _ } from "./portalNavigation-DKCfwTH8.js";
|
|
7
|
+
import { r as I, w as h } from "./localPreference-DneUpUrQ.js";
|
|
8
|
+
import { _ as J } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
|
+
const W = {
|
|
10
10
|
class: "portal-sidebar",
|
|
11
11
|
"aria-label": "Mini Program navigation"
|
|
12
|
-
},
|
|
12
|
+
}, X = ["aria-expanded", "aria-label"], Y = {
|
|
13
13
|
id: "miniprogram-navigation",
|
|
14
14
|
class: "portal-nav"
|
|
15
|
-
},
|
|
15
|
+
}, Z = { class: "portal-nav-label" }, ee = { class: "portal-nav-label" }, ae = { class: "portal-main" }, te = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "portal-breadcrumb",
|
|
18
18
|
"aria-label": "Breadcrumb"
|
|
19
|
-
},
|
|
19
|
+
}, oe = {
|
|
20
20
|
id: "miniprogram-content",
|
|
21
21
|
class: "portal-content",
|
|
22
22
|
tabindex: "-1"
|
|
23
|
-
},
|
|
23
|
+
}, le = {
|
|
24
24
|
key: 0,
|
|
25
25
|
class: "portal-empty"
|
|
26
|
-
},
|
|
26
|
+
}, re = {
|
|
27
27
|
key: 1,
|
|
28
28
|
class: "portal-loading",
|
|
29
29
|
role: "status"
|
|
30
|
-
},
|
|
30
|
+
}, ne = {
|
|
31
31
|
key: 2,
|
|
32
32
|
class: "portal-empty",
|
|
33
33
|
role: "alert"
|
|
34
|
-
},
|
|
34
|
+
}, se = {
|
|
35
35
|
key: 3,
|
|
36
36
|
class: "portal-empty"
|
|
37
|
-
},
|
|
37
|
+
}, ie = /* @__PURE__ */ V({
|
|
38
38
|
__name: "App",
|
|
39
|
-
setup(
|
|
40
|
-
const r =
|
|
41
|
-
|
|
39
|
+
setup(pe) {
|
|
40
|
+
const r = D(), C = Q(), n = U(), p = d(() => r.name === "miniprogram-v2-project"), g = q(
|
|
41
|
+
I(
|
|
42
42
|
"mpv2:portal-collapsed",
|
|
43
|
-
|
|
43
|
+
typeof window < "u" && window.matchMedia("(max-width: 1000px)").matches
|
|
44
44
|
)
|
|
45
|
-
), y =
|
|
46
|
-
var
|
|
47
|
-
return (
|
|
48
|
-
}),
|
|
45
|
+
), y = q(I("mpv2:editor-collapsed", !0)), S = d(() => p.value ? y.value : g.value), f = d(() => {
|
|
46
|
+
var u;
|
|
47
|
+
return (u = n.context.value) == null ? void 0 : u.projectId;
|
|
48
|
+
}), j = d(() => p.value && r.params.projectId !== f.value), L = d(
|
|
49
49
|
() => {
|
|
50
|
-
var
|
|
51
|
-
return p.value ? (
|
|
50
|
+
var u;
|
|
51
|
+
return p.value ? (u = n.context.value) == null ? void 0 : u.project.name : String(r.meta.title ?? "Ecosystem");
|
|
52
52
|
}
|
|
53
|
-
),
|
|
53
|
+
), F = [
|
|
54
54
|
{ name: "miniprogram-v2-ecosystem", label: "Ecosystem", icon: "ecosystem" },
|
|
55
55
|
{ name: "miniprogram-v2-brand-kit", label: "Brand Kit", icon: "brand" },
|
|
56
56
|
{ name: "miniprogram-v2-pages", label: "Pages", icon: "pages" }
|
|
57
|
-
],
|
|
58
|
-
() =>
|
|
57
|
+
], w = d(
|
|
58
|
+
() => f.value ? H(f.value, "workspace", r.query) : { name: "miniprogram-v2-control", query: r.query }
|
|
59
59
|
);
|
|
60
|
-
let
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}),
|
|
64
|
-
|
|
60
|
+
let M = !1;
|
|
61
|
+
z(() => {
|
|
62
|
+
M = C.hideSidebar.value, C.hideSidebar.value = !0;
|
|
63
|
+
}), K(() => {
|
|
64
|
+
C.hideSidebar.value = M;
|
|
65
65
|
});
|
|
66
|
-
function
|
|
67
|
-
|
|
66
|
+
function T() {
|
|
67
|
+
p.value ? (y.value = !y.value, h("mpv2:editor-collapsed", y.value)) : (g.value = !g.value, h("mpv2:portal-collapsed", g.value));
|
|
68
68
|
}
|
|
69
|
-
return (
|
|
70
|
-
const
|
|
71
|
-
return s(), i(
|
|
69
|
+
return (u, e) => {
|
|
70
|
+
const m = k("RouterLink"), R = k("FmIcon"), E = k("FmCircularProgress"), N = k("FmButton");
|
|
71
|
+
return s(), i(x, null, [
|
|
72
72
|
e[14] || (e[14] = a("link", {
|
|
73
73
|
href: "https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0..1,0",
|
|
74
74
|
rel: "stylesheet"
|
|
75
75
|
}, null, -1)),
|
|
76
76
|
a("div", {
|
|
77
|
-
class:
|
|
77
|
+
class: P(["mpv2-app portal-shell", { "portal-shell--collapsed": S.value }])
|
|
78
78
|
}, [
|
|
79
79
|
e[13] || (e[13] = a("a", {
|
|
80
80
|
class: "portal-skip",
|
|
81
81
|
href: "#miniprogram-content"
|
|
82
82
|
}, "Skip to content", -1)),
|
|
83
|
-
a("aside",
|
|
83
|
+
a("aside", W, [
|
|
84
84
|
a("button", {
|
|
85
85
|
class: "portal-sidebar-toggle",
|
|
86
86
|
type: "button",
|
|
87
|
-
"aria-expanded": !
|
|
87
|
+
"aria-expanded": !S.value,
|
|
88
88
|
"aria-controls": "miniprogram-navigation",
|
|
89
|
-
"aria-label":
|
|
90
|
-
onClick:
|
|
89
|
+
"aria-label": S.value ? "Expand navigation" : "Collapse navigation",
|
|
90
|
+
onClick: T
|
|
91
91
|
}, [
|
|
92
|
-
l(
|
|
92
|
+
l(b, { name: "collapse" }),
|
|
93
93
|
e[0] || (e[0] = a("span", { class: "portal-nav-label" }, "Mini Program", -1))
|
|
94
|
-
], 8,
|
|
95
|
-
a("nav",
|
|
96
|
-
(s(), i(
|
|
94
|
+
], 8, X),
|
|
95
|
+
a("nav", Y, [
|
|
96
|
+
(s(), i(x, null, B(F, (o) => l(m, {
|
|
97
97
|
key: o.name,
|
|
98
|
-
to: { name: o.name, query: t(
|
|
98
|
+
to: { name: o.name, query: t(_)(t(r).query) },
|
|
99
99
|
class: "portal-nav-item",
|
|
100
100
|
title: o.label,
|
|
101
101
|
"aria-label": o.label,
|
|
102
102
|
"aria-current": t(r).name === o.name ? "page" : void 0
|
|
103
103
|
}, {
|
|
104
|
-
default:
|
|
105
|
-
l(
|
|
104
|
+
default: v(() => [
|
|
105
|
+
l(b, {
|
|
106
106
|
name: o.icon
|
|
107
107
|
}, null, 8, ["name"]),
|
|
108
|
-
a("span",
|
|
108
|
+
a("span", Z, c(o.label), 1)
|
|
109
109
|
]),
|
|
110
110
|
_: 2
|
|
111
111
|
}, 1032, ["to", "title", "aria-label", "aria-current"])), 64)),
|
|
112
112
|
e[3] || (e[3] = a("p", { class: "portal-nav-caption" }, "Platforms", -1)),
|
|
113
|
-
l(
|
|
114
|
-
to:
|
|
115
|
-
class:
|
|
113
|
+
l(m, {
|
|
114
|
+
to: w.value,
|
|
115
|
+
class: P(["portal-nav-item", { "router-link-active": p.value }]),
|
|
116
116
|
title: "Mobile Ordering",
|
|
117
117
|
"aria-label": "Mobile Ordering",
|
|
118
118
|
"aria-current": p.value ? "page" : void 0
|
|
119
119
|
}, {
|
|
120
|
-
default:
|
|
121
|
-
l(
|
|
120
|
+
default: v(() => [
|
|
121
|
+
l(b, { name: "mobile" }),
|
|
122
122
|
e[1] || (e[1] = a("span", { class: "portal-nav-label" }, "Mobile Ordering", -1))
|
|
123
123
|
]),
|
|
124
124
|
_: 1
|
|
125
125
|
}, 8, ["to", "class", "aria-current"]),
|
|
126
|
-
(s(), i(
|
|
126
|
+
(s(), i(x, null, B(["tablet", "kiosk"], (o) => l(m, {
|
|
127
127
|
key: o,
|
|
128
|
-
to: { name: `miniprogram-v2-${o}`, query: t(
|
|
128
|
+
to: { name: `miniprogram-v2-${o}`, query: t(_)(t(r).query) },
|
|
129
129
|
class: "portal-nav-item",
|
|
130
130
|
title: o === "tablet" ? "Tablet" : "Kiosk",
|
|
131
131
|
"aria-label": o === "tablet" ? "Tablet" : "Kiosk"
|
|
132
132
|
}, {
|
|
133
|
-
default:
|
|
134
|
-
l(
|
|
135
|
-
a("span",
|
|
133
|
+
default: v(() => [
|
|
134
|
+
l(b, { name: o }, null, 8, ["name"]),
|
|
135
|
+
a("span", ee, c(o === "tablet" ? "Tablet" : "Kiosk"), 1)
|
|
136
136
|
]),
|
|
137
137
|
_: 2
|
|
138
138
|
}, 1032, ["to", "title", "aria-label"])), 64)),
|
|
139
139
|
e[4] || (e[4] = a("div", { class: "portal-nav-divider" }, null, -1)),
|
|
140
|
-
l(
|
|
141
|
-
to: { name: "miniprogram-v2-module-center", query: t(
|
|
142
|
-
class:
|
|
140
|
+
l(m, {
|
|
141
|
+
to: { name: "miniprogram-v2-module-center", query: t(_)(t(r).query) },
|
|
142
|
+
class: P(["portal-nav-item", { "router-link-active": t(r).name === "miniprogram-v2-module-detail" }]),
|
|
143
143
|
title: "Module library",
|
|
144
144
|
"aria-label": "Module library"
|
|
145
145
|
}, {
|
|
146
|
-
default:
|
|
147
|
-
l(
|
|
146
|
+
default: v(() => [
|
|
147
|
+
l(R, {
|
|
148
148
|
name: "widgets",
|
|
149
149
|
size: "md"
|
|
150
150
|
}),
|
|
@@ -153,51 +153,51 @@ const H = {
|
|
|
153
153
|
_: 1
|
|
154
154
|
}, 8, ["to", "class"])
|
|
155
155
|
]),
|
|
156
|
-
l(
|
|
157
|
-
to: { name: "miniprogram-v2-settings", query: t(
|
|
156
|
+
l(m, {
|
|
157
|
+
to: { name: "miniprogram-v2-settings", query: t(_)(t(r).query) },
|
|
158
158
|
class: "portal-nav-item portal-settings-link",
|
|
159
159
|
title: "Settings",
|
|
160
160
|
"aria-label": "Settings"
|
|
161
161
|
}, {
|
|
162
|
-
default:
|
|
163
|
-
l(
|
|
162
|
+
default: v(() => [
|
|
163
|
+
l(b, { name: "settings" }),
|
|
164
164
|
e[5] || (e[5] = a("span", { class: "portal-nav-label" }, "Settings", -1))
|
|
165
165
|
]),
|
|
166
166
|
_: 1
|
|
167
167
|
}, 8, ["to"])
|
|
168
168
|
]),
|
|
169
|
-
a("div",
|
|
170
|
-
p.value ?
|
|
171
|
-
a("span", null,
|
|
169
|
+
a("div", ae, [
|
|
170
|
+
p.value ? O("", !0) : (s(), i("header", te, [
|
|
171
|
+
a("span", null, c(t(n).businessName.value), 1),
|
|
172
172
|
e[6] || (e[6] = a("span", { "aria-hidden": "true" }, "/", -1)),
|
|
173
|
-
a("span", null,
|
|
173
|
+
a("span", null, c(L.value), 1)
|
|
174
174
|
])),
|
|
175
|
-
a("div",
|
|
176
|
-
t(n).businessId.value ? t(n).loading.value ? (s(), i("div",
|
|
177
|
-
l(
|
|
175
|
+
a("div", oe, [
|
|
176
|
+
t(n).businessId.value ? t(n).loading.value ? (s(), i("div", re, [
|
|
177
|
+
l(E, { size: "xl" }),
|
|
178
178
|
e[8] || (e[8] = a("span", null, "Loading your Mini Program…", -1))
|
|
179
|
-
])) : t(n).error.value ? (s(), i("section",
|
|
179
|
+
])) : t(n).error.value ? (s(), i("section", ne, [
|
|
180
180
|
e[9] || (e[9] = a("h1", null, "Could not open this Mini Program", -1)),
|
|
181
|
-
a("p", null,
|
|
182
|
-
l(
|
|
181
|
+
a("p", null, c(t(n).error.value), 1),
|
|
182
|
+
l(N, {
|
|
183
183
|
label: "Try again",
|
|
184
184
|
onClick: t(n).refresh
|
|
185
185
|
}, null, 8, ["onClick"])
|
|
186
|
-
])) :
|
|
186
|
+
])) : j.value ? (s(), i("section", se, [
|
|
187
187
|
e[11] || (e[11] = a("h1", null, "Project unavailable", -1)),
|
|
188
188
|
e[12] || (e[12] = a("p", null, "This link does not point to the selected business’s current mobile project.", -1)),
|
|
189
|
-
l(
|
|
190
|
-
to:
|
|
189
|
+
l(m, {
|
|
190
|
+
to: w.value,
|
|
191
191
|
class: "portal-link-button"
|
|
192
192
|
}, {
|
|
193
|
-
default:
|
|
194
|
-
|
|
193
|
+
default: v(() => [...e[10] || (e[10] = [
|
|
194
|
+
A("Open current project", -1)
|
|
195
195
|
])]),
|
|
196
196
|
_: 1
|
|
197
197
|
}, 8, ["to"])
|
|
198
|
-
])) : (s(),
|
|
199
|
-
key: `${t(n).businessId.value}:${
|
|
200
|
-
})) : (s(), i("section",
|
|
198
|
+
])) : (s(), $(t(G), {
|
|
199
|
+
key: `${t(n).businessId.value}:${f.value}`
|
|
200
|
+
})) : (s(), i("section", le, [...e[7] || (e[7] = [
|
|
201
201
|
a("h1", null, "Select a business", -1),
|
|
202
202
|
a("p", null, "Choose a business in the Portal header to open its Mini Program.", -1)
|
|
203
203
|
])]))
|
|
@@ -207,7 +207,7 @@ const H = {
|
|
|
207
207
|
], 64);
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
|
-
}),
|
|
210
|
+
}), fe = /* @__PURE__ */ J(ie, [["__scopeId", "data-v-5b6aacb4"]]);
|
|
211
211
|
export {
|
|
212
|
-
|
|
212
|
+
fe as default
|
|
213
213
|
};
|