@feedmepos/mf-miniprogram-v2 0.2.8-dev.8 → 0.2.8
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-CulUM6bp.js → App-CI4ncIRr.js} +352 -343
- package/dist/{BrandFontPicker-VX2LAN2w.js → BrandFontPicker-Ud9cZQm1.js} +1 -1
- package/dist/BrandKitView-n5K3qyUW.js +276 -0
- package/dist/{ControlPlaneView-BrIrCpIX.js → ControlPlaneView-BPVh5gPy.js} +8940 -8478
- package/dist/{EcosystemView-CVunQHEs.js → EcosystemView-j7eC2CsA.js} +115 -93
- package/dist/{LegacyWorkspaceEntry-lEMtmdIe.js → LegacyWorkspaceEntry-CADRpDkg.js} +1 -1
- package/dist/{MobileProjectDialog-C4wvWZ95.js → MobileProjectDialog-DYlIwjzr.js} +261 -256
- package/dist/{MobileProjectsView-CZVTbgqX.js → MobileProjectsView-BFljhsY0.js} +66 -61
- package/dist/ModuleCenterView-886eyuBg.js +283 -0
- package/dist/ModuleDetailView-B1IXOpig.js +296 -0
- package/dist/{PagesView-DgfNxkGp.js → PagesView-D5uGpfrp.js} +2 -2
- package/dist/{PlatformUnavailableView-ChSD6P3O.js → PlatformUnavailableView-OHEJAztd.js} +1 -1
- package/dist/PortalSettingsView-B7NohuU5.js +123 -0
- package/dist/{TemplateCenterView-BPJSWb12.js → TemplateCenterView-BJ3MBEUa.js} +3 -3
- package/dist/{WorkspaceEntryView-C4MViyFH.js → WorkspaceEntryView-mpPpAsq4.js} +2 -2
- package/dist/app.js +15 -15
- package/dist/{controlPlane-DR5ykj4d.js → controlPlane-DuIuUbyk.js} +11 -11
- package/dist/{adminAccess-DdZ2qPdx.js → localPreference-C18SIo-s.js} +35 -35
- package/dist/package.json +1 -1
- package/dist/{portalContext-DuVkhksq.js → portalContext-BkAoYip4.js} +2 -2
- package/dist/portalNavigation-DLcC7Koh.js +43 -0
- package/dist/{routes-CK4kOaoY.js → routes-B9oMJsaM.js} +2 -4
- package/dist/style.css +1 -1
- package/dist/{useBrandKit-CKn1fm2o.js → useBrandKit-DDqx19_h.js} +265 -233
- package/dist/useModuleCatalog-CLRJw1aG.js +147 -0
- package/package.json +1 -1
- package/dist/BrandKitView-CB7kcVy2.js +0 -249
- package/dist/ModuleCenterView-D0Bv4sKT.js +0 -165
- package/dist/ModuleDetailView-Ue3oCNxk.js +0 -189
- package/dist/PortalSettingsView-DBrKVWjp.js +0 -233
- package/dist/portalNavigation-L5VwKlps.js +0 -42
- package/dist/useModuleCatalog-a4dKLnlS.js +0 -124
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import { defineComponent as C, ref as M, computed as u, watch as T, resolveComponent as g, openBlock as n, createElementBlock as l, createElementVNode as e, toDisplayString as i, createCommentVNode as _, Fragment as I, renderList as S, createVNode as k, onMounted as B, unref as d, withCtx as L, createBlock as v } from "vue";
|
|
2
|
-
import { useRoute as N, useRouter as P } from "vue-router";
|
|
3
|
-
import { m as q, i as A, u as F, _ as w } from "./useModuleCatalog-a4dKLnlS.js";
|
|
4
|
-
import { useDialog as V } from "@feedmepos/ui-library";
|
|
5
|
-
import { _ as E } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
-
const R = { class: "detail" }, j = { class: "detail__head" }, z = { class: "detail__name fm-typo-en-title-sm-600 text-portal-text-primary" }, K = { class: "detail__version fm-typo-en-body-md-400 text-portal-text-muted" }, O = {
|
|
7
|
-
key: 0,
|
|
8
|
-
class: "detail__description fm-typo-en-body-md-400 text-portal-text-muted"
|
|
9
|
-
}, Y = { class: "detail__columns" }, G = { class: "detail__preview" }, H = {
|
|
10
|
-
key: 0,
|
|
11
|
-
class: "detail__note detail__note--error fm-typo-en-body-md-400"
|
|
12
|
-
}, J = {
|
|
13
|
-
key: 1,
|
|
14
|
-
class: "detail__note fm-typo-en-body-md-400"
|
|
15
|
-
}, Q = ["srcdoc"], U = { class: "detail__facts" }, W = { class: "detail__section" }, X = { class: "detail__list fm-typo-en-body-md-400" }, Z = { key: 0 }, ee = { key: 1 }, te = { class: "detail__section" }, oe = {
|
|
16
|
-
key: 0,
|
|
17
|
-
class: "detail__note fm-typo-en-body-md-400"
|
|
18
|
-
}, ne = {
|
|
19
|
-
key: 1,
|
|
20
|
-
class: "detail__props"
|
|
21
|
-
}, se = {
|
|
22
|
-
key: 0,
|
|
23
|
-
class: "detail__optional fm-typo-en-body-sm-400"
|
|
24
|
-
}, le = { class: "detail__section" }, ae = ["value"], ie = /* @__PURE__ */ C({
|
|
25
|
-
__name: "ModuleDetail",
|
|
26
|
-
props: {
|
|
27
|
-
entry: {},
|
|
28
|
-
previewDocument: {},
|
|
29
|
-
previewError: {}
|
|
30
|
-
},
|
|
31
|
-
setup(o) {
|
|
32
|
-
const r = o, b = V(), s = M(!1);
|
|
33
|
-
let m;
|
|
34
|
-
const c = u(() => q(r.entry)), p = u(
|
|
35
|
-
() => r.previewDocument ? A(r.previewDocument, r.entry.name) : null
|
|
36
|
-
);
|
|
37
|
-
T(
|
|
38
|
-
() => r.entry.name,
|
|
39
|
-
() => {
|
|
40
|
-
s.value = !1;
|
|
41
|
-
}
|
|
42
|
-
);
|
|
43
|
-
async function x() {
|
|
44
|
-
try {
|
|
45
|
-
await navigator.clipboard.writeText(c.value), s.value = !0, window.clearTimeout(m), m = window.setTimeout(() => {
|
|
46
|
-
s.value = !1;
|
|
47
|
-
}, 2e3);
|
|
48
|
-
} catch (a) {
|
|
49
|
-
b.open({
|
|
50
|
-
title: "Could not copy",
|
|
51
|
-
message: `${a instanceof Error ? a.message : String(a)}. Select the text below and copy it manually.`,
|
|
52
|
-
dismissAway: !0,
|
|
53
|
-
primaryActions: { close: !0, text: "OK" }
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return (a, t) => {
|
|
58
|
-
var y, D, $;
|
|
59
|
-
const f = g("FmButton");
|
|
60
|
-
return n(), l("div", R, [
|
|
61
|
-
e("header", j, [
|
|
62
|
-
e("h3", z, i(o.entry.name), 1),
|
|
63
|
-
e("span", K, i(o.entry.version), 1),
|
|
64
|
-
o.entry.description ? (n(), l("p", O, i(o.entry.description), 1)) : _("", !0)
|
|
65
|
-
]),
|
|
66
|
-
e("div", Y, [
|
|
67
|
-
e("section", G, [
|
|
68
|
-
t[0] || (t[0] = e("h4", { class: "detail__label fm-typo-en-body-sm-600 text-portal-text-muted" }, "Preview", -1)),
|
|
69
|
-
o.previewError ? (n(), l("p", H, i(o.previewError), 1)) : p.value ? (n(), l("iframe", {
|
|
70
|
-
key: o.entry.name,
|
|
71
|
-
class: "detail__frame",
|
|
72
|
-
title: "module preview",
|
|
73
|
-
sandbox: "allow-scripts",
|
|
74
|
-
srcdoc: p.value
|
|
75
|
-
}, null, 8, Q)) : (n(), l("p", J, "Loading preview…")),
|
|
76
|
-
t[1] || (t[1] = e("p", { class: "detail__hint fm-typo-en-body-sm-400 text-portal-text-muted" }, " Stand-in brand colours. Your business's own palette applies in the workspace preview. ", -1))
|
|
77
|
-
]),
|
|
78
|
-
e("div", U, [
|
|
79
|
-
e("section", W, [
|
|
80
|
-
t[6] || (t[6] = e("h4", { class: "detail__label fm-typo-en-body-sm-600 text-portal-text-muted" }, "Details", -1)),
|
|
81
|
-
e("dl", X, [
|
|
82
|
-
t[2] || (t[2] = e("dt", null, "Id", -1)),
|
|
83
|
-
e("dd", null, i(o.entry.id), 1),
|
|
84
|
-
t[3] || (t[3] = e("dt", null, "Slot", -1)),
|
|
85
|
-
e("dd", null, i(o.entry.slot ?? "—"), 1),
|
|
86
|
-
t[4] || (t[4] = e("dt", null, "Data shape", -1)),
|
|
87
|
-
e("dd", null, i(o.entry.dataShape ?? "—"), 1),
|
|
88
|
-
t[5] || (t[5] = e("dt", null, "Type", -1)),
|
|
89
|
-
e("dd", null, i(o.entry.category), 1),
|
|
90
|
-
(y = o.entry.labels) != null && y.length ? (n(), l("dt", Z, "Labels")) : _("", !0),
|
|
91
|
-
(D = o.entry.labels) != null && D.length ? (n(), l("dd", ee, i(o.entry.labels.join(", ")), 1)) : _("", !0)
|
|
92
|
-
])
|
|
93
|
-
]),
|
|
94
|
-
e("section", te, [
|
|
95
|
-
t[7] || (t[7] = e("h4", { class: "detail__label fm-typo-en-body-sm-600 text-portal-text-muted" }, "Props", -1)),
|
|
96
|
-
($ = o.entry.props) != null && $.length ? (n(), l("ul", ne, [
|
|
97
|
-
(n(!0), l(I, null, S(o.entry.props, (h) => (n(), l("li", {
|
|
98
|
-
key: h.name
|
|
99
|
-
}, [
|
|
100
|
-
e("code", null, i(h.name), 1),
|
|
101
|
-
h.required ? _("", !0) : (n(), l("span", se, "optional"))
|
|
102
|
-
]))), 128))
|
|
103
|
-
])) : (n(), l("p", oe, " This module declares no props interface, so it can only be offered as a like-for-like swap. "))
|
|
104
|
-
]),
|
|
105
|
-
e("section", le, [
|
|
106
|
-
t[8] || (t[8] = e("h4", { class: "detail__label fm-typo-en-body-sm-600 text-portal-text-muted" }, "Ask the agent for it", -1)),
|
|
107
|
-
t[9] || (t[9] = e("p", { class: "detail__hint fm-typo-en-body-sm-400 text-portal-text-muted" }, " Paste this into a workspace chat. The agent copies the module into your app's own code. ", -1)),
|
|
108
|
-
e("textarea", {
|
|
109
|
-
class: "detail__prompt",
|
|
110
|
-
readonly: "",
|
|
111
|
-
value: c.value
|
|
112
|
-
}, null, 8, ae),
|
|
113
|
-
k(f, {
|
|
114
|
-
class: "detail__copy",
|
|
115
|
-
size: "md",
|
|
116
|
-
variant: s.value ? "secondary" : "primary",
|
|
117
|
-
icon: s.value ? "check" : "content_copy",
|
|
118
|
-
label: s.value ? "Copied" : "Copy prompt",
|
|
119
|
-
onClick: x
|
|
120
|
-
}, null, 8, ["variant", "icon", "label"])
|
|
121
|
-
])
|
|
122
|
-
])
|
|
123
|
-
])
|
|
124
|
-
]);
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
}), re = /* @__PURE__ */ E(ie, [["__scopeId", "data-v-dc44acc5"]]), de = { class: "shell" }, me = { class: "page" }, ce = { class: "page__inner" }, ue = { class: "page__head" }, pe = {
|
|
128
|
-
key: 0,
|
|
129
|
-
class: "page__note fm-typo-en-body-md-400"
|
|
130
|
-
}, ye = /* @__PURE__ */ C({
|
|
131
|
-
__name: "ModuleDetailView",
|
|
132
|
-
setup(o) {
|
|
133
|
-
const r = N(), b = P(), s = F(), m = u(() => String(r.params.name ?? "")), c = u(() => s.find(m.value)), p = u(() => s.entries.value === null);
|
|
134
|
-
return B(() => s.load()), (x, a) => {
|
|
135
|
-
const t = g("FmIcon"), f = g("RouterLink");
|
|
136
|
-
return n(), l("div", de, [
|
|
137
|
-
e("div", me, [
|
|
138
|
-
e("div", ce, [
|
|
139
|
-
e("header", ue, [
|
|
140
|
-
k(f, {
|
|
141
|
-
class: "page__back",
|
|
142
|
-
to: { name: "miniprogram-v2-module-center", query: d(r).query }
|
|
143
|
-
}, {
|
|
144
|
-
default: L(() => [
|
|
145
|
-
k(t, {
|
|
146
|
-
name: "arrow_back",
|
|
147
|
-
size: "sm",
|
|
148
|
-
color: "typo-secondary"
|
|
149
|
-
}),
|
|
150
|
-
a[2] || (a[2] = e("span", { class: "fm-typo-en-body-sm-600" }, "Module library", -1))
|
|
151
|
-
]),
|
|
152
|
-
_: 1
|
|
153
|
-
}, 8, ["to"])
|
|
154
|
-
]),
|
|
155
|
-
p.value ? (n(), l("p", pe, "Loading…")) : d(s).loadError.value ? (n(), v(w, {
|
|
156
|
-
key: 1,
|
|
157
|
-
icon: "error_outline",
|
|
158
|
-
tone: "error",
|
|
159
|
-
title: "Could not load the module library",
|
|
160
|
-
message: d(s).loadError.value,
|
|
161
|
-
"action-label": "Try again",
|
|
162
|
-
onAction: a[0] || (a[0] = (y) => d(s).load(!0))
|
|
163
|
-
}, null, 8, ["message"])) : d(s).unpublished.value ? (n(), v(w, {
|
|
164
|
-
key: 2,
|
|
165
|
-
icon: "widgets",
|
|
166
|
-
title: "No module library has been published yet",
|
|
167
|
-
message: "Nothing has been published for this page to show."
|
|
168
|
-
})) : c.value ? (n(), v(re, {
|
|
169
|
-
key: 4,
|
|
170
|
-
entry: c.value,
|
|
171
|
-
"preview-document": d(s).previewDocument.value,
|
|
172
|
-
"preview-error": d(s).previewError.value
|
|
173
|
-
}, null, 8, ["entry", "preview-document", "preview-error"])) : (n(), v(w, {
|
|
174
|
-
key: 3,
|
|
175
|
-
icon: "search_off",
|
|
176
|
-
title: `No module named “${m.value}”`,
|
|
177
|
-
message: "It is not in the published library. It may have been renamed, withdrawn, or never published.",
|
|
178
|
-
"action-label": "Back to the library",
|
|
179
|
-
onAction: a[1] || (a[1] = (y) => d(b).push({ name: "miniprogram-v2-module-center", query: d(r).query }))
|
|
180
|
-
}, null, 8, ["title"]))
|
|
181
|
-
])
|
|
182
|
-
])
|
|
183
|
-
]);
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
}), we = /* @__PURE__ */ E(ye, [["__scopeId", "data-v-70b1bf30"]]);
|
|
187
|
-
export {
|
|
188
|
-
we as default
|
|
189
|
-
};
|
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
import { defineComponent as P, ref as l, onMounted as x, resolveComponent as F, openBlock as o, createElementBlock as r, createElementVNode as e, Fragment as M, renderList as B, withDirectives as A, vModelRadio as N, toDisplayString as f, createCommentVNode as b, createBlock as R, computed as w, onScopeDispose as U, createVNode as V, unref as k } from "vue";
|
|
2
|
-
import { useRoute as E } from "vue-router";
|
|
3
|
-
import { e as T, a as L } from "./index-CIJWcl_6.js";
|
|
4
|
-
import { c as $, e as C, m as D } from "./controlPlane-DR5ykj4d.js";
|
|
5
|
-
import { useCoreStore as O } from "@feedmepos/mf-common";
|
|
6
|
-
import { u as H } from "./portalContext-DuVkhksq.js";
|
|
7
|
-
import { b as j } from "./portalNavigation-L5VwKlps.js";
|
|
8
|
-
import { a as q } from "./routes-CK4kOaoY.js";
|
|
9
|
-
import { _ as Q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
|
-
const z = { class: "portal-section qr-routing" }, J = {
|
|
11
|
-
key: 0,
|
|
12
|
-
role: "status"
|
|
13
|
-
}, K = ["disabled"], Y = ["value"], G = { class: "portal-description" }, W = {
|
|
14
|
-
key: 2,
|
|
15
|
-
class: "portal-error",
|
|
16
|
-
role: "alert"
|
|
17
|
-
}, X = {
|
|
18
|
-
key: 3,
|
|
19
|
-
class: "portal-notice",
|
|
20
|
-
role: "status"
|
|
21
|
-
}, Z = { class: "qr-routing__actions" }, ee = /* @__PURE__ */ P({
|
|
22
|
-
__name: "QrRoutingSetting",
|
|
23
|
-
props: {
|
|
24
|
-
businessId: {}
|
|
25
|
-
},
|
|
26
|
-
setup(I) {
|
|
27
|
-
const u = I, i = l("default"), v = l("default"), g = l(!0), d = l(!1), c = l(!1), n = l(""), m = l(""), h = [
|
|
28
|
-
{
|
|
29
|
-
value: "default",
|
|
30
|
-
label: "Follow FeedMe’s rollout",
|
|
31
|
-
description: "Table QR codes move to this app when FeedMe switches your region over."
|
|
32
|
-
},
|
|
33
|
-
{ value: "app", label: "This app", description: "Table QR codes open this app at your business link." },
|
|
34
|
-
{
|
|
35
|
-
value: "v3",
|
|
36
|
-
label: "The current ordering page",
|
|
37
|
-
description: "Table QR codes keep opening the ordering page customers use today."
|
|
38
|
-
}
|
|
39
|
-
];
|
|
40
|
-
async function _() {
|
|
41
|
-
g.value = !0, n.value = "";
|
|
42
|
-
try {
|
|
43
|
-
const a = await $(q.qrRouting(u.businessId));
|
|
44
|
-
i.value = v.value = a.qrTarget ?? "default", d.value = !0;
|
|
45
|
-
} catch (a) {
|
|
46
|
-
n.value = C(a);
|
|
47
|
-
} finally {
|
|
48
|
-
g.value = !1;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
async function y() {
|
|
52
|
-
if (!(!d.value || c.value || i.value === v.value)) {
|
|
53
|
-
c.value = !0, n.value = "", m.value = "";
|
|
54
|
-
try {
|
|
55
|
-
const a = await $(q.qrRouting(u.businessId), {
|
|
56
|
-
method: "PUT",
|
|
57
|
-
body: JSON.stringify({ qrTarget: i.value === "default" ? null : i.value })
|
|
58
|
-
});
|
|
59
|
-
i.value = v.value = a.qrTarget ?? "default", m.value = "Saved. Table QR codes follow the new setting within about five minutes.";
|
|
60
|
-
} catch (a) {
|
|
61
|
-
n.value = C(a);
|
|
62
|
-
} finally {
|
|
63
|
-
c.value = !1;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return x(() => void _()), (a, t) => {
|
|
68
|
-
const s = F("FmButton");
|
|
69
|
-
return o(), r("section", z, [
|
|
70
|
-
t[2] || (t[2] = e("h2", null, "Table QR codes", -1)),
|
|
71
|
-
t[3] || (t[3] = e("p", { class: "portal-description" }, "Choose where customers land when they scan a table QR code.", -1)),
|
|
72
|
-
g.value ? (o(), r("p", J, "Loading…")) : d.value ? (o(), r("fieldset", {
|
|
73
|
-
key: 1,
|
|
74
|
-
class: "qr-routing__options",
|
|
75
|
-
disabled: c.value
|
|
76
|
-
}, [
|
|
77
|
-
t[1] || (t[1] = e("legend", { class: "qr-routing__legend" }, "Table QR codes open", -1)),
|
|
78
|
-
(o(), r(M, null, B(h, (p) => e("label", {
|
|
79
|
-
key: p.value,
|
|
80
|
-
class: "qr-routing__option"
|
|
81
|
-
}, [
|
|
82
|
-
A(e("input", {
|
|
83
|
-
"onUpdate:modelValue": t[0] || (t[0] = (S) => i.value = S),
|
|
84
|
-
type: "radio",
|
|
85
|
-
name: "qr-routing",
|
|
86
|
-
value: p.value
|
|
87
|
-
}, null, 8, Y), [
|
|
88
|
-
[N, i.value]
|
|
89
|
-
]),
|
|
90
|
-
e("span", null, [
|
|
91
|
-
e("strong", null, f(p.label), 1),
|
|
92
|
-
e("span", G, f(p.description), 1)
|
|
93
|
-
])
|
|
94
|
-
])), 64))
|
|
95
|
-
], 8, K)) : b("", !0),
|
|
96
|
-
n.value ? (o(), r("p", W, f(n.value), 1)) : b("", !0),
|
|
97
|
-
m.value ? (o(), r("p", X, f(m.value), 1)) : b("", !0),
|
|
98
|
-
e("footer", Z, [
|
|
99
|
-
!d.value && !g.value ? (o(), R(s, {
|
|
100
|
-
key: 0,
|
|
101
|
-
label: "Retry",
|
|
102
|
-
variant: "secondary",
|
|
103
|
-
onClick: _
|
|
104
|
-
})) : (o(), R(s, {
|
|
105
|
-
key: 1,
|
|
106
|
-
label: "Save",
|
|
107
|
-
loading: c.value,
|
|
108
|
-
disabled: g.value || !d.value || i.value === v.value,
|
|
109
|
-
onClick: y
|
|
110
|
-
}, null, 8, ["loading", "disabled"]))
|
|
111
|
-
])
|
|
112
|
-
]);
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
}), se = /* @__PURE__ */ Q(ee, [["__scopeId", "data-v-5fbd8580"]]), te = { class: "portal-page" }, oe = { class: "portal-page-inner settings-page" }, ae = { class: "portal-page-heading" }, ne = ["href"], le = {
|
|
116
|
-
key: 0,
|
|
117
|
-
class: "portal-error",
|
|
118
|
-
role: "alert"
|
|
119
|
-
}, re = { class: "portal-section" }, ie = { class: "settings-value" }, ue = { class: "portal-section" }, de = { class: "settings-icon-row" }, ce = { class: "settings-icon" }, pe = ["src"], ve = { class: "portal-section" }, ge = { class: "settings-logo" }, me = ["src"], fe = /* @__PURE__ */ P({
|
|
120
|
-
__name: "PortalSettingsView",
|
|
121
|
-
setup(I) {
|
|
122
|
-
const u = H(), i = E(), v = O(), g = w(
|
|
123
|
-
() => {
|
|
124
|
-
var t;
|
|
125
|
-
return new URL(
|
|
126
|
-
j({
|
|
127
|
-
...i.query,
|
|
128
|
-
businessId: u.businessId.value,
|
|
129
|
-
country: v.currentCountry.value ?? null,
|
|
130
|
-
restaurantId: ((t = v.currentRestaurant.value) == null ? void 0 : t._id) ?? null
|
|
131
|
-
}),
|
|
132
|
-
T("fmmf:dev") === "dev" ? "https://portal.feedmedev.cc" : "https://portal.feedme.cc"
|
|
133
|
-
).href;
|
|
134
|
-
}
|
|
135
|
-
), d = l(null), c = l(!0), n = l(null), m = l(!1), h = L(T("fmmf:dev")).apiOrigin, _ = w(() => `${h}/metadata/${u.businessId.value}/pwa-512x512.png`), y = w(() => {
|
|
136
|
-
var t;
|
|
137
|
-
return (t = D()) == null ? void 0 : t.thumbnail;
|
|
138
|
-
}), a = new AbortController();
|
|
139
|
-
return x(async () => {
|
|
140
|
-
var t;
|
|
141
|
-
try {
|
|
142
|
-
const s = await fetch(`${h}/metadata/${u.businessId.value}/config`, {
|
|
143
|
-
signal: AbortSignal.any([a.signal, AbortSignal.timeout(15e3)])
|
|
144
|
-
});
|
|
145
|
-
if (s.status === 404) return;
|
|
146
|
-
if (!s.ok) throw new Error(`Could not load app assets (HTTP ${s.status})`);
|
|
147
|
-
const p = await s.json();
|
|
148
|
-
d.value = ((t = p.pwaConfig) == null ? void 0 : t.name) ?? null;
|
|
149
|
-
} catch (s) {
|
|
150
|
-
a.signal.aborted || (n.value = C(s));
|
|
151
|
-
} finally {
|
|
152
|
-
c.value = !1;
|
|
153
|
-
}
|
|
154
|
-
}), U(() => a.abort()), (t, s) => {
|
|
155
|
-
const p = F("FmIcon");
|
|
156
|
-
return o(), r("div", te, [
|
|
157
|
-
e("div", oe, [
|
|
158
|
-
e("header", ae, [
|
|
159
|
-
s[1] || (s[1] = e("div", null, [
|
|
160
|
-
e("p", { class: "portal-eyebrow" }, "Your app identity"),
|
|
161
|
-
e("h1", null, "Settings")
|
|
162
|
-
], -1)),
|
|
163
|
-
e("a", {
|
|
164
|
-
href: g.value,
|
|
165
|
-
class: "portal-link-button",
|
|
166
|
-
target: "_blank",
|
|
167
|
-
rel: "noopener"
|
|
168
|
-
}, "Manage assets in original Portal ↗", 8, ne)
|
|
169
|
-
]),
|
|
170
|
-
s[10] || (s[10] = e("div", { class: "settings-tabs" }, [
|
|
171
|
-
e("span", null, "Assets")
|
|
172
|
-
], -1)),
|
|
173
|
-
s[11] || (s[11] = e("p", { class: "portal-notice" }, " App assets are still managed by the original Mini Program. Edit them there to preserve existing subscription rules and shared business settings. ", -1)),
|
|
174
|
-
n.value ? (o(), r("p", le, f(n.value), 1)) : b("", !0),
|
|
175
|
-
e("section", re, [
|
|
176
|
-
s[2] || (s[2] = e("h2", null, "App name", -1)),
|
|
177
|
-
s[3] || (s[3] = e("p", { class: "portal-description" }, "Shown under the icon on your customer’s home screen.", -1)),
|
|
178
|
-
e("p", ie, f(c.value ? "Loading…" : n.value ? "Unavailable" : d.value || "Not configured"), 1),
|
|
179
|
-
s[4] || (s[4] = e("p", { class: "portal-description" }, " The original Portal applies the “FeedMe x” naming rule for non-Premium businesses. ", -1))
|
|
180
|
-
]),
|
|
181
|
-
e("section", ue, [
|
|
182
|
-
s[7] || (s[7] = e("div", { class: "portal-section-head" }, [
|
|
183
|
-
e("div", null, [
|
|
184
|
-
e("h2", null, "App icon"),
|
|
185
|
-
e("p", { class: "portal-description" }, "One square image for the home screen.")
|
|
186
|
-
])
|
|
187
|
-
], -1)),
|
|
188
|
-
e("div", de, [
|
|
189
|
-
e("div", ce, [
|
|
190
|
-
m.value ? (o(), r(M, { key: 1 }, [
|
|
191
|
-
V(p, {
|
|
192
|
-
name: "image",
|
|
193
|
-
size: "xl"
|
|
194
|
-
}),
|
|
195
|
-
s[5] || (s[5] = e("span", null, "No icon available", -1))
|
|
196
|
-
], 64)) : (o(), r("img", {
|
|
197
|
-
key: 0,
|
|
198
|
-
src: _.value,
|
|
199
|
-
alt: "Current app icon",
|
|
200
|
-
onError: s[0] || (s[0] = (S) => m.value = !0)
|
|
201
|
-
}, null, 40, pe))
|
|
202
|
-
]),
|
|
203
|
-
s[6] || (s[6] = e("div", null, [
|
|
204
|
-
e("h3", null, "Icon guidelines"),
|
|
205
|
-
e("p", { class: "portal-description" }, " Use a square image, ideally at least 1024 × 1024 pixels. Keep the important artwork inside the central 4/5 safe area. "),
|
|
206
|
-
e("p", { class: "portal-description" }, "Changes to this shared icon are not part of a release build.")
|
|
207
|
-
], -1))
|
|
208
|
-
])
|
|
209
|
-
]),
|
|
210
|
-
e("section", ve, [
|
|
211
|
-
s[8] || (s[8] = e("h2", null, "Business branding", -1)),
|
|
212
|
-
e("div", ge, [
|
|
213
|
-
y.value ? (o(), r("img", {
|
|
214
|
-
key: 0,
|
|
215
|
-
src: y.value,
|
|
216
|
-
alt: "Business logo"
|
|
217
|
-
}, null, 8, me)) : b("", !0),
|
|
218
|
-
e("p", null, f(k(u).businessName.value), 1)
|
|
219
|
-
]),
|
|
220
|
-
s[9] || (s[9] = e("p", { class: "portal-description" }, " Cover images and other shared business assets remain available in the original Portal. ", -1))
|
|
221
|
-
]),
|
|
222
|
-
k(u).businessId.value ? (o(), R(se, {
|
|
223
|
-
key: 1,
|
|
224
|
-
"business-id": k(u).businessId.value
|
|
225
|
-
}, null, 8, ["business-id"])) : b("", !0)
|
|
226
|
-
])
|
|
227
|
-
]);
|
|
228
|
-
};
|
|
229
|
-
}
|
|
230
|
-
}), Se = /* @__PURE__ */ Q(fe, [["__scopeId", "data-v-8ba9debf"]]);
|
|
231
|
-
export {
|
|
232
|
-
Se as default
|
|
233
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
function a(r) {
|
|
2
|
-
return r === "releases" || r === "sessions" ? r : "workspace";
|
|
3
|
-
}
|
|
4
|
-
function o(r) {
|
|
5
|
-
const { view: e, tpl: t, setup: n, ...s } = r;
|
|
6
|
-
return s;
|
|
7
|
-
}
|
|
8
|
-
function i(r, e, t, n = {}) {
|
|
9
|
-
return {
|
|
10
|
-
name: "miniprogram-v2-project",
|
|
11
|
-
params: { projectId: r, view: e === "workspace" ? void 0 : e },
|
|
12
|
-
query: {
|
|
13
|
-
...o(t),
|
|
14
|
-
...n.templateEditing ? { tpl: "1" } : {},
|
|
15
|
-
...n.setup ? { setup: "1" } : {}
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
function c(r, e, t) {
|
|
20
|
-
if (!e || !t || e === t || r.name !== "miniprogram-v2-project" || r.query.tpl === "1") return null;
|
|
21
|
-
const n = o(r.query);
|
|
22
|
-
return typeof n.businessId == "string" && (n.businessId = t), { name: "miniprogram-v2-mobile-projects", query: n };
|
|
23
|
-
}
|
|
24
|
-
function p(r, e) {
|
|
25
|
-
return e ? i(String(r.params.projectId), a(r.params.view), r.query) : { name: "miniprogram-v2-mobile-projects", query: o(r.query) };
|
|
26
|
-
}
|
|
27
|
-
function u(r, e = "settings") {
|
|
28
|
-
const t = new URLSearchParams();
|
|
29
|
-
for (const n of ["businessId", "country", "restaurantId"]) {
|
|
30
|
-
const s = r[n];
|
|
31
|
-
typeof s == "string" && t.set(n, s);
|
|
32
|
-
}
|
|
33
|
-
return `/brand/${e}${t.size ? `?${t}` : ""}`;
|
|
34
|
-
}
|
|
35
|
-
export {
|
|
36
|
-
a,
|
|
37
|
-
u as b,
|
|
38
|
-
c as e,
|
|
39
|
-
p as l,
|
|
40
|
-
o as p,
|
|
41
|
-
i as w
|
|
42
|
-
};
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { defineComponent as x, resolveComponent as p, openBlock as u, createElementBlock as h, createVNode as E, createElementVNode as P, normalizeClass as F, toDisplayString as v, createCommentVNode as g, createBlock as L, shallowReadonly as r, ref as s } from "vue";
|
|
2
|
-
import { a as w } from "./routes-CK4kOaoY.js";
|
|
3
|
-
import { c as M, e as y, f as $ } from "./controlPlane-DR5ykj4d.js";
|
|
4
|
-
const I = { class: "flex min-h-0 flex-1 flex-col items-center justify-center gap-8 p-24 text-center" }, T = {
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "m-0 max-w-[46ch] fm-typo-en-body-sm-400 text-portal-text-muted"
|
|
7
|
-
}, j = /* @__PURE__ */ x({
|
|
8
|
-
__name: "ModuleEmptyState",
|
|
9
|
-
props: {
|
|
10
|
-
icon: {},
|
|
11
|
-
title: {},
|
|
12
|
-
message: {},
|
|
13
|
-
actionLabel: {},
|
|
14
|
-
tone: {}
|
|
15
|
-
},
|
|
16
|
-
emits: ["action"],
|
|
17
|
-
setup(e) {
|
|
18
|
-
return (t, o) => {
|
|
19
|
-
const n = p("FmIcon"), l = p("FmButton");
|
|
20
|
-
return u(), h("div", I, [
|
|
21
|
-
E(n, {
|
|
22
|
-
name: e.icon,
|
|
23
|
-
size: "xl",
|
|
24
|
-
color: e.tone === "error" ? "typo-warning" : "neutral-gray-300"
|
|
25
|
-
}, null, 8, ["name", "color"]),
|
|
26
|
-
P("p", {
|
|
27
|
-
class: F(["m-0 fm-typo-en-body-md-600", e.tone === "error" ? "text-fm-color-typo-warning" : "text-fm-color-typo-secondary"])
|
|
28
|
-
}, v(e.title), 3),
|
|
29
|
-
e.message ? (u(), h("p", T, v(e.message), 1)) : g("", !0),
|
|
30
|
-
e.actionLabel ? (u(), L(l, {
|
|
31
|
-
key: 1,
|
|
32
|
-
size: "md",
|
|
33
|
-
variant: "secondary",
|
|
34
|
-
label: e.actionLabel,
|
|
35
|
-
onClick: o[0] || (o[0] = (c) => t.$emit("action"))
|
|
36
|
-
}, null, 8, ["label"])) : g("", !0)
|
|
37
|
-
]);
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
}), b = ["tier", "slot"];
|
|
41
|
-
function C(e, t) {
|
|
42
|
-
return t === "tier" ? [e.category] : e.slot ? [e.slot] : [];
|
|
43
|
-
}
|
|
44
|
-
function z(e) {
|
|
45
|
-
return b.map((t) => ({
|
|
46
|
-
kind: t,
|
|
47
|
-
values: [...new Set(e.flatMap((o) => C(o, t)))].sort((o, n) => o.localeCompare(n))
|
|
48
|
-
})).filter((t) => t.values.length > 0);
|
|
49
|
-
}
|
|
50
|
-
function R(e, t) {
|
|
51
|
-
const o = e.filter((n) => !(n.kind === t.kind && n.value === t.value));
|
|
52
|
-
return o.length === e.length ? [...e, t] : o;
|
|
53
|
-
}
|
|
54
|
-
function B(e, t) {
|
|
55
|
-
return b.every((o) => {
|
|
56
|
-
const n = t.filter((c) => c.kind === o);
|
|
57
|
-
if (!n.length) return !0;
|
|
58
|
-
const l = C(e, o);
|
|
59
|
-
return n.some((c) => l.includes(c.value));
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
function G(e, t, o = []) {
|
|
63
|
-
const n = t.trim().toLowerCase();
|
|
64
|
-
return e.filter((l) => B(l, o) ? n ? [l.name, l.description ?? "", l.slot ?? "", ...l.labels ?? []].join(" ").toLowerCase().includes(n) : !0 : !1);
|
|
65
|
-
}
|
|
66
|
-
function O(e) {
|
|
67
|
-
const t = e.slot ? ` It is published to fill the ${e.slot} slot.` : "";
|
|
68
|
-
return `Use the block-swap skill. Put the library module ${e.id} on the page, replacing whatever currently fills its slot.${t} Its source is already in this workspace at src/components/library/${e.name}/. Copy that directory to src/components/blocks/${e.name}/ and point the view there — the library directory is delivered per workspace and is not committed, so a view importing from it builds in the workspace and fails the release build. Tell me which page you changed.`;
|
|
69
|
-
}
|
|
70
|
-
function U(e, t) {
|
|
71
|
-
if (!e.includes("</head>")) return e;
|
|
72
|
-
const o = JSON.stringify(t).replace(/</g, "\\u003c");
|
|
73
|
-
return e.replace("</head>", `<script>window.__FM_PREVIEW_MODULE__=${o}<\/script></head>`);
|
|
74
|
-
}
|
|
75
|
-
const i = s(null), m = s(null), d = s(!1), k = s(null), f = s(null);
|
|
76
|
-
let a = null;
|
|
77
|
-
async function D() {
|
|
78
|
-
m.value = null, d.value = !1;
|
|
79
|
-
try {
|
|
80
|
-
const e = await M(w.componentLibraryCatalog());
|
|
81
|
-
i.value = e.components ?? [];
|
|
82
|
-
} catch (e) {
|
|
83
|
-
const t = y(e);
|
|
84
|
-
i.value = [], t.includes("no component library has been published") ? d.value = !0 : m.value = t || "Could not load the module library.";
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
async function N() {
|
|
88
|
-
f.value = null;
|
|
89
|
-
try {
|
|
90
|
-
k.value = await $(w.componentLibraryPreview());
|
|
91
|
-
} catch (e) {
|
|
92
|
-
f.value = y(e) || "Could not load the preview document.";
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
function A() {
|
|
96
|
-
function e(o = !1) {
|
|
97
|
-
return !o && (i.value !== null || a) ? a ?? Promise.resolve() : (a = Promise.all([D(), N()]).then(() => {
|
|
98
|
-
}).finally(() => {
|
|
99
|
-
a = null;
|
|
100
|
-
}), a);
|
|
101
|
-
}
|
|
102
|
-
function t(o) {
|
|
103
|
-
var n;
|
|
104
|
-
return ((n = i.value) == null ? void 0 : n.find((l) => l.name === o)) ?? null;
|
|
105
|
-
}
|
|
106
|
-
return {
|
|
107
|
-
entries: r(i),
|
|
108
|
-
loadError: r(m),
|
|
109
|
-
unpublished: r(d),
|
|
110
|
-
previewDocument: r(k),
|
|
111
|
-
previewError: r(f),
|
|
112
|
-
load: e,
|
|
113
|
-
find: t
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
export {
|
|
117
|
-
j as _,
|
|
118
|
-
z as c,
|
|
119
|
-
G as f,
|
|
120
|
-
U as i,
|
|
121
|
-
O as m,
|
|
122
|
-
R as t,
|
|
123
|
-
A as u
|
|
124
|
-
};
|