@feedmepos/mf-miniprogram-v2 0.2.2-dev.1 → 0.2.2-dev.3
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-C-7evg9W.js → App-D7vZDj-a.js} +35 -38
- package/dist/{ControlPlaneView-DmhLvgWt.js → ControlPlaneView-jmtP3sml.js} +6711 -6608
- package/dist/{PagesView-CrVOYOT9.js → PagesView-BHo_fnWa.js} +1 -1
- package/dist/{PlatformUnavailableView-Cdy-1zpi.js → PlatformUnavailableView-C1RltAIw.js} +1 -1
- package/dist/PortalIcon-DO0VrIoY.js +28 -0
- package/dist/app.js +4 -4
- package/dist/package.json +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/PortalIcon-D1RqQMzD.js +0 -19
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as F, computed as v, ref as T, onMounted as R, onBeforeUnmount as
|
|
1
|
+
import { defineComponent as F, computed as v, ref as T, onMounted as R, onBeforeUnmount as E, resolveComponent as f, openBlock as s, createElementBlock as i, Fragment as S, createElementVNode as a, normalizeClass as x, createVNode as l, renderList as w, unref as t, withCtx as c, toDisplayString as b, createCommentVNode as N, createTextVNode as V, createBlock as z } from "vue";
|
|
2
2
|
import { useRoute as K, RouterView as O } from "vue-router";
|
|
3
3
|
import { useCoreStore as A } from "@feedmepos/mf-common";
|
|
4
|
-
import { P as
|
|
4
|
+
import { P as g } from "./PortalIcon-DO0VrIoY.js";
|
|
5
5
|
import { p as $ } from "./portalContext-CTVzkJV7.js";
|
|
6
6
|
import { w as D, p as k } from "./portalNavigation-DKCfwTH8.js";
|
|
7
7
|
import { r as G, w as Q } from "./localPreference-DneUpUrQ.js";
|
|
@@ -37,44 +37,44 @@ const H = {
|
|
|
37
37
|
}, ne = /* @__PURE__ */ F({
|
|
38
38
|
__name: "App",
|
|
39
39
|
setup(se) {
|
|
40
|
-
const r = K(), _ = A(), n = $(), p = v(() => r.name === "miniprogram-v2-project"),
|
|
40
|
+
const r = K(), _ = A(), n = $(), p = v(() => r.name === "miniprogram-v2-project"), u = T(
|
|
41
41
|
G(
|
|
42
42
|
"mpv2:portal-collapsed",
|
|
43
43
|
p.value || typeof window < "u" && window.matchMedia("(max-width: 1000px)").matches
|
|
44
44
|
)
|
|
45
|
-
),
|
|
46
|
-
var
|
|
47
|
-
return (
|
|
48
|
-
}),
|
|
45
|
+
), y = v(() => {
|
|
46
|
+
var m;
|
|
47
|
+
return (m = n.context.value) == null ? void 0 : m.projectId;
|
|
48
|
+
}), M = v(() => p.value && r.params.projectId !== y.value), q = v(
|
|
49
49
|
() => {
|
|
50
|
-
var
|
|
51
|
-
return p.value ? (
|
|
50
|
+
var m;
|
|
51
|
+
return p.value ? (m = n.context.value) == null ? void 0 : m.project.name : String(r.meta.title ?? "Ecosystem");
|
|
52
52
|
}
|
|
53
|
-
),
|
|
53
|
+
), B = [
|
|
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
57
|
], C = v(
|
|
58
|
-
() =>
|
|
58
|
+
() => y.value ? D(y.value, "workspace", r.query) : { name: "miniprogram-v2-control", query: r.query }
|
|
59
59
|
);
|
|
60
60
|
let P = !1;
|
|
61
61
|
R(() => {
|
|
62
62
|
P = _.hideSidebar.value, _.hideSidebar.value = !0;
|
|
63
|
-
}),
|
|
63
|
+
}), E(() => {
|
|
64
64
|
_.hideSidebar.value = P;
|
|
65
65
|
});
|
|
66
|
-
function
|
|
67
|
-
|
|
66
|
+
function I() {
|
|
67
|
+
u.value = !u.value, Q("mpv2:portal-collapsed", u.value);
|
|
68
68
|
}
|
|
69
|
-
return (
|
|
70
|
-
const d =
|
|
69
|
+
return (m, e) => {
|
|
70
|
+
const d = f("RouterLink"), h = f("FmIcon"), j = f("FmCircularProgress"), L = f("FmButton");
|
|
71
71
|
return s(), i(S, 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: x(["mpv2-app portal-shell", { "portal-shell--collapsed":
|
|
77
|
+
class: x(["mpv2-app portal-shell", { "portal-shell--collapsed": u.value }])
|
|
78
78
|
}, [
|
|
79
79
|
e[13] || (e[13] = a("a", {
|
|
80
80
|
class: "portal-skip",
|
|
@@ -84,16 +84,16 @@ const H = {
|
|
|
84
84
|
a("button", {
|
|
85
85
|
class: "portal-sidebar-toggle",
|
|
86
86
|
type: "button",
|
|
87
|
-
"aria-expanded": !
|
|
87
|
+
"aria-expanded": !u.value,
|
|
88
88
|
"aria-controls": "miniprogram-navigation",
|
|
89
|
-
"aria-label":
|
|
90
|
-
onClick:
|
|
89
|
+
"aria-label": u.value ? "Expand navigation" : "Collapse navigation",
|
|
90
|
+
onClick: I
|
|
91
91
|
}, [
|
|
92
|
-
l(
|
|
92
|
+
l(g, { name: "collapse" }),
|
|
93
93
|
e[0] || (e[0] = a("span", { class: "portal-nav-label" }, "Mini Program", -1))
|
|
94
94
|
], 8, J),
|
|
95
95
|
a("nav", W, [
|
|
96
|
-
(s(), i(S, null,
|
|
96
|
+
(s(), i(S, null, w(B, (o) => l(d, {
|
|
97
97
|
key: o.name,
|
|
98
98
|
to: { name: o.name, query: t(k)(t(r).query) },
|
|
99
99
|
class: "portal-nav-item",
|
|
@@ -102,7 +102,7 @@ const H = {
|
|
|
102
102
|
"aria-current": t(r).name === o.name ? "page" : void 0
|
|
103
103
|
}, {
|
|
104
104
|
default: c(() => [
|
|
105
|
-
l(
|
|
105
|
+
l(g, {
|
|
106
106
|
name: o.icon
|
|
107
107
|
}, null, 8, ["name"]),
|
|
108
108
|
a("span", X, b(o.label), 1)
|
|
@@ -118,12 +118,12 @@ const H = {
|
|
|
118
118
|
"aria-current": p.value ? "page" : void 0
|
|
119
119
|
}, {
|
|
120
120
|
default: c(() => [
|
|
121
|
-
l(
|
|
121
|
+
l(g, { 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(S, null,
|
|
126
|
+
(s(), i(S, null, w(["tablet", "kiosk"], (o) => l(d, {
|
|
127
127
|
key: o,
|
|
128
128
|
to: { name: `miniprogram-v2-${o}`, query: t(k)(t(r).query) },
|
|
129
129
|
class: "portal-nav-item",
|
|
@@ -131,7 +131,7 @@ const H = {
|
|
|
131
131
|
"aria-label": o === "tablet" ? "Tablet" : "Kiosk"
|
|
132
132
|
}, {
|
|
133
133
|
default: c(() => [
|
|
134
|
-
l(
|
|
134
|
+
l(g, { name: o }, null, 8, ["name"]),
|
|
135
135
|
a("span", Y, b(o === "tablet" ? "Tablet" : "Kiosk"), 1)
|
|
136
136
|
]),
|
|
137
137
|
_: 2
|
|
@@ -144,7 +144,7 @@ const H = {
|
|
|
144
144
|
"aria-label": "Module library"
|
|
145
145
|
}, {
|
|
146
146
|
default: c(() => [
|
|
147
|
-
l(
|
|
147
|
+
l(h, {
|
|
148
148
|
name: "widgets",
|
|
149
149
|
size: "md"
|
|
150
150
|
}),
|
|
@@ -160,20 +160,17 @@ const H = {
|
|
|
160
160
|
"aria-label": "Settings"
|
|
161
161
|
}, {
|
|
162
162
|
default: c(() => [
|
|
163
|
-
l(
|
|
164
|
-
name: "settings",
|
|
165
|
-
size: "md"
|
|
166
|
-
}),
|
|
163
|
+
l(g, { name: "settings" }),
|
|
167
164
|
e[5] || (e[5] = a("span", { class: "portal-nav-label" }, "Settings", -1))
|
|
168
165
|
]),
|
|
169
166
|
_: 1
|
|
170
167
|
}, 8, ["to"])
|
|
171
168
|
]),
|
|
172
169
|
a("div", Z, [
|
|
173
|
-
p.value ?
|
|
170
|
+
p.value ? N("", !0) : (s(), i("header", ee, [
|
|
174
171
|
a("span", null, b(t(n).businessName.value), 1),
|
|
175
172
|
e[6] || (e[6] = a("span", { "aria-hidden": "true" }, "/", -1)),
|
|
176
|
-
a("span", null, b(
|
|
173
|
+
a("span", null, b(q.value), 1)
|
|
177
174
|
])),
|
|
178
175
|
a("div", ae, [
|
|
179
176
|
t(n).businessId.value ? t(n).loading.value ? (s(), i("div", oe, [
|
|
@@ -186,7 +183,7 @@ const H = {
|
|
|
186
183
|
label: "Try again",
|
|
187
184
|
onClick: t(n).refresh
|
|
188
185
|
}, null, 8, ["onClick"])
|
|
189
|
-
])) :
|
|
186
|
+
])) : M.value ? (s(), i("section", re, [
|
|
190
187
|
e[11] || (e[11] = a("h1", null, "Project unavailable", -1)),
|
|
191
188
|
e[12] || (e[12] = a("p", null, "This link does not point to the selected business’s current mobile project.", -1)),
|
|
192
189
|
l(d, {
|
|
@@ -194,12 +191,12 @@ const H = {
|
|
|
194
191
|
class: "portal-link-button"
|
|
195
192
|
}, {
|
|
196
193
|
default: c(() => [...e[10] || (e[10] = [
|
|
197
|
-
|
|
194
|
+
V("Open current project", -1)
|
|
198
195
|
])]),
|
|
199
196
|
_: 1
|
|
200
197
|
}, 8, ["to"])
|
|
201
|
-
])) : (s(),
|
|
202
|
-
key: `${t(n).businessId.value}:${
|
|
198
|
+
])) : (s(), z(t(O), {
|
|
199
|
+
key: `${t(n).businessId.value}:${y.value}`
|
|
203
200
|
})) : (s(), i("section", te, [...e[7] || (e[7] = [
|
|
204
201
|
a("h1", null, "Select a business", -1),
|
|
205
202
|
a("p", null, "Choose a business in the Portal header to open its Mini Program.", -1)
|
|
@@ -210,7 +207,7 @@ const H = {
|
|
|
210
207
|
], 64);
|
|
211
208
|
};
|
|
212
209
|
}
|
|
213
|
-
}), ge = /* @__PURE__ */ U(ne, [["__scopeId", "data-v-
|
|
210
|
+
}), ge = /* @__PURE__ */ U(ne, [["__scopeId", "data-v-4eab214e"]]);
|
|
214
211
|
export {
|
|
215
212
|
ge as default
|
|
216
213
|
};
|