@feedmepos/mf-miniprogram-v2 0.2.2-dev.0 → 0.2.2-dev.10
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-agMiJ0tU.js +197 -0
- package/dist/AppTemplatePicker-C0lZyhK2.js +184 -0
- package/dist/BrandFontPicker-BFjp8k2W.js +241 -0
- package/dist/BrandKitView-DUbIT3c8.js +249 -0
- package/dist/{ControlPlaneView-krmwG-w_.js → ControlPlaneView-BJ6QP0bK.js} +8181 -7959
- package/dist/EcosystemView-BgjtBJy_.js +186 -0
- package/dist/LegacyWorkspaceEntry-opz_kWz9.js +36 -0
- package/dist/MobileProjectsView-DAWuOiCr.js +279 -0
- package/dist/ModuleCenterView-DyMr3iWV.js +147 -0
- package/dist/{ModuleDetailView-D5P-_5Ms.js → ModuleDetailView-BeXK89Cs.js} +71 -73
- package/dist/PagesView-CegMd6GC.js +43 -0
- package/dist/PlatformUnavailableView-j0_2YBKm.js +40 -0
- package/dist/PortalIcon-DO0VrIoY.js +28 -0
- package/dist/PortalSettingsView-Bqw8tMZb.js +123 -0
- package/dist/StatusBadge.vue_vue_type_script_setup_true_lang-Bh9Eoe_H.js +26 -0
- package/dist/WorkspaceEntryView-e2EUnq9A.js +21 -0
- package/dist/app.js +55 -11
- package/dist/controlPlane-CoEgf9BA.js +144 -0
- package/dist/index-D5qXvcfE.js +55 -0
- package/dist/localPreference-DneUpUrQ.js +34 -0
- package/dist/package.json +2 -1
- package/dist/portalContext-C4HL_0kl.js +47 -0
- package/dist/portalNavigation-DOF4Ah49.js +28 -0
- package/dist/routes-Boz_WlNM.js +54 -0
- package/dist/style.css +1 -1
- package/dist/useBrandKit-BlKlqpo2.js +1020 -0
- package/dist/{useModuleCatalog-CTgQG6Dx.js → useModuleCatalog-DqECds3F.js} +17 -16
- package/package.json +2 -1
- package/dist/App-CaNGbhK8.js +0 -20
- package/dist/AppTabs.vue_vue_type_script_setup_true_lang-BKOXPYIU.js +0 -284
- package/dist/ModuleCenterView-54GneqaO.js +0 -148
|
@@ -1,28 +1,27 @@
|
|
|
1
|
-
import { defineComponent as C, ref as M, computed as u, watch as T, resolveComponent as
|
|
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
2
|
import { useRoute as N, useRouter as P } from "vue-router";
|
|
3
|
-
import { m as
|
|
4
|
-
import {
|
|
5
|
-
import { useDialog as j } from "@feedmepos/ui-library";
|
|
3
|
+
import { m as q, i as A, u as F, _ as w } from "./useModuleCatalog-DqECds3F.js";
|
|
4
|
+
import { useDialog as V } from "@feedmepos/ui-library";
|
|
6
5
|
import { _ as E } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
-
const
|
|
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 = {
|
|
8
7
|
key: 0,
|
|
9
|
-
class: "detail__description fm-typo-en-body-md-400 text-
|
|
10
|
-
},
|
|
8
|
+
class: "detail__description fm-typo-en-body-md-400 text-portal-text-muted"
|
|
9
|
+
}, Y = { class: "detail__columns" }, G = { class: "detail__preview" }, H = {
|
|
11
10
|
key: 0,
|
|
12
11
|
class: "detail__note detail__note--error fm-typo-en-body-md-400"
|
|
13
|
-
},
|
|
12
|
+
}, J = {
|
|
14
13
|
key: 1,
|
|
15
14
|
class: "detail__note fm-typo-en-body-md-400"
|
|
16
|
-
},
|
|
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 = {
|
|
17
16
|
key: 0,
|
|
18
17
|
class: "detail__note fm-typo-en-body-md-400"
|
|
19
|
-
},
|
|
18
|
+
}, ne = {
|
|
20
19
|
key: 1,
|
|
21
20
|
class: "detail__props"
|
|
22
|
-
},
|
|
21
|
+
}, se = {
|
|
23
22
|
key: 0,
|
|
24
23
|
class: "detail__optional fm-typo-en-body-sm-400"
|
|
25
|
-
},
|
|
24
|
+
}, le = { class: "detail__section" }, ae = ["value"], ie = /* @__PURE__ */ C({
|
|
26
25
|
__name: "ModuleDetail",
|
|
27
26
|
props: {
|
|
28
27
|
entry: {},
|
|
@@ -30,10 +29,10 @@ const z = { class: "detail" }, q = { class: "detail__head" }, K = { class: "deta
|
|
|
30
29
|
previewError: {}
|
|
31
30
|
},
|
|
32
31
|
setup(o) {
|
|
33
|
-
const r = o, b =
|
|
34
|
-
let
|
|
35
|
-
const
|
|
36
|
-
() => r.previewDocument ?
|
|
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
|
|
37
36
|
);
|
|
38
37
|
T(
|
|
39
38
|
() => r.entry.name,
|
|
@@ -43,7 +42,7 @@ const z = { class: "detail" }, q = { class: "detail__head" }, K = { class: "deta
|
|
|
43
42
|
);
|
|
44
43
|
async function x() {
|
|
45
44
|
try {
|
|
46
|
-
await navigator.clipboard.writeText(
|
|
45
|
+
await navigator.clipboard.writeText(c.value), s.value = !0, window.clearTimeout(m), m = window.setTimeout(() => {
|
|
47
46
|
s.value = !1;
|
|
48
47
|
}, 2e3);
|
|
49
48
|
} catch (a) {
|
|
@@ -56,30 +55,30 @@ const z = { class: "detail" }, q = { class: "detail__head" }, K = { class: "deta
|
|
|
56
55
|
}
|
|
57
56
|
}
|
|
58
57
|
return (a, t) => {
|
|
59
|
-
var
|
|
60
|
-
const
|
|
61
|
-
return n(), l("div",
|
|
62
|
-
e("header",
|
|
63
|
-
e("h3",
|
|
64
|
-
e("span",
|
|
65
|
-
o.entry.description ? (n(), l("p",
|
|
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)
|
|
66
65
|
]),
|
|
67
|
-
e("div",
|
|
68
|
-
e("section",
|
|
69
|
-
t[0] || (t[0] = e("h4", { class: "detail__label fm-typo-en-body-sm-600 text-
|
|
70
|
-
o.previewError ? (n(), l("p",
|
|
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", {
|
|
71
70
|
key: o.entry.name,
|
|
72
71
|
class: "detail__frame",
|
|
73
72
|
title: "module preview",
|
|
74
73
|
sandbox: "allow-scripts",
|
|
75
|
-
srcdoc:
|
|
76
|
-
}, null, 8,
|
|
77
|
-
t[1] || (t[1] = e("p", { class: "detail__hint fm-typo-en-body-sm-400 text-
|
|
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))
|
|
78
77
|
]),
|
|
79
|
-
e("div",
|
|
80
|
-
e("section",
|
|
81
|
-
t[6] || (t[6] = e("h4", { class: "detail__label fm-typo-en-body-sm-600 text-
|
|
82
|
-
e("dl",
|
|
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, [
|
|
83
82
|
t[2] || (t[2] = e("dt", null, "Id", -1)),
|
|
84
83
|
e("dd", null, i(o.entry.id), 1),
|
|
85
84
|
t[3] || (t[3] = e("dt", null, "Slot", -1)),
|
|
@@ -88,30 +87,30 @@ const z = { class: "detail" }, q = { class: "detail__head" }, K = { class: "deta
|
|
|
88
87
|
e("dd", null, i(o.entry.dataShape ?? "—"), 1),
|
|
89
88
|
t[5] || (t[5] = e("dt", null, "Type", -1)),
|
|
90
89
|
e("dd", null, i(o.entry.category), 1),
|
|
91
|
-
(
|
|
92
|
-
(D = o.entry.labels) != null && D.length ? (n(), l("dd",
|
|
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)
|
|
93
92
|
])
|
|
94
93
|
]),
|
|
95
|
-
e("section",
|
|
96
|
-
t[7] || (t[7] = e("h4", { class: "detail__label fm-typo-en-body-sm-600 text-
|
|
97
|
-
($ = o.entry.props) != null && $.length ? (n(), l("ul",
|
|
98
|
-
(n(!0), l(I, null, S(o.entry.props, (
|
|
99
|
-
key:
|
|
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
|
|
100
99
|
}, [
|
|
101
|
-
e("code", null, i(
|
|
102
|
-
|
|
100
|
+
e("code", null, i(h.name), 1),
|
|
101
|
+
h.required ? _("", !0) : (n(), l("span", se, "optional"))
|
|
103
102
|
]))), 128))
|
|
104
|
-
])) : (n(), l("p",
|
|
103
|
+
])) : (n(), l("p", oe, " This module declares no props interface, so it can only be offered as a like-for-like swap. "))
|
|
105
104
|
]),
|
|
106
|
-
e("section",
|
|
107
|
-
t[8] || (t[8] = e("h4", { class: "detail__label fm-typo-en-body-sm-600 text-
|
|
108
|
-
t[9] || (t[9] = e("p", { class: "detail__hint fm-typo-en-body-sm-400 text-
|
|
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)),
|
|
109
108
|
e("textarea", {
|
|
110
109
|
class: "detail__prompt",
|
|
111
110
|
readonly: "",
|
|
112
|
-
value:
|
|
113
|
-
}, null, 8,
|
|
114
|
-
f
|
|
111
|
+
value: c.value
|
|
112
|
+
}, null, 8, ae),
|
|
113
|
+
k(f, {
|
|
115
114
|
class: "detail__copy",
|
|
116
115
|
size: "md",
|
|
117
116
|
variant: s.value ? "secondary" : "primary",
|
|
@@ -125,26 +124,25 @@ const z = { class: "detail" }, q = { class: "detail__head" }, K = { class: "deta
|
|
|
125
124
|
]);
|
|
126
125
|
};
|
|
127
126
|
}
|
|
128
|
-
}),
|
|
127
|
+
}), re = /* @__PURE__ */ E(ie, [["__scopeId", "data-v-dc44acc5"]]), de = { class: "shell" }, me = { class: "page" }, ce = { class: "page__inner" }, ue = { class: "page__head" }, pe = {
|
|
129
128
|
key: 0,
|
|
130
129
|
class: "page__note fm-typo-en-body-md-400"
|
|
131
|
-
},
|
|
130
|
+
}, ye = /* @__PURE__ */ C({
|
|
132
131
|
__name: "ModuleDetailView",
|
|
133
132
|
setup(o) {
|
|
134
|
-
const r = N(), b = P(), s =
|
|
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);
|
|
135
134
|
return B(() => s.load()), (x, a) => {
|
|
136
|
-
const t =
|
|
137
|
-
return n(), l("div",
|
|
138
|
-
f(R, { active: "modules" }),
|
|
135
|
+
const t = g("FmIcon"), f = g("RouterLink");
|
|
136
|
+
return n(), l("div", de, [
|
|
139
137
|
e("div", me, [
|
|
140
|
-
e("div",
|
|
141
|
-
e("header",
|
|
142
|
-
f
|
|
138
|
+
e("div", ce, [
|
|
139
|
+
e("header", ue, [
|
|
140
|
+
k(f, {
|
|
143
141
|
class: "page__back",
|
|
144
|
-
to: { name: "miniprogram-v2-module-center" }
|
|
142
|
+
to: { name: "miniprogram-v2-module-center", query: d(r).query }
|
|
145
143
|
}, {
|
|
146
144
|
default: L(() => [
|
|
147
|
-
|
|
145
|
+
k(t, {
|
|
148
146
|
name: "arrow_back",
|
|
149
147
|
size: "sm",
|
|
150
148
|
color: "typo-secondary"
|
|
@@ -152,40 +150,40 @@ const z = { class: "detail" }, q = { class: "detail__head" }, K = { class: "deta
|
|
|
152
150
|
a[2] || (a[2] = e("span", { class: "fm-typo-en-body-sm-600" }, "Module library", -1))
|
|
153
151
|
]),
|
|
154
152
|
_: 1
|
|
155
|
-
})
|
|
153
|
+
}, 8, ["to"])
|
|
156
154
|
]),
|
|
157
|
-
|
|
155
|
+
p.value ? (n(), l("p", pe, "Loading…")) : d(s).loadError.value ? (n(), v(w, {
|
|
158
156
|
key: 1,
|
|
159
157
|
icon: "error_outline",
|
|
160
158
|
tone: "error",
|
|
161
159
|
title: "Could not load the module library",
|
|
162
160
|
message: d(s).loadError.value,
|
|
163
161
|
"action-label": "Try again",
|
|
164
|
-
onAction: a[0] || (a[0] = (
|
|
165
|
-
}, null, 8, ["message"])) : d(s).unpublished.value ? (n(), v(
|
|
162
|
+
onAction: a[0] || (a[0] = (y) => d(s).load(!0))
|
|
163
|
+
}, null, 8, ["message"])) : d(s).unpublished.value ? (n(), v(w, {
|
|
166
164
|
key: 2,
|
|
167
165
|
icon: "widgets",
|
|
168
166
|
title: "No module library has been published yet",
|
|
169
167
|
message: "Nothing has been published for this page to show."
|
|
170
|
-
})) :
|
|
168
|
+
})) : c.value ? (n(), v(re, {
|
|
171
169
|
key: 4,
|
|
172
|
-
entry:
|
|
170
|
+
entry: c.value,
|
|
173
171
|
"preview-document": d(s).previewDocument.value,
|
|
174
172
|
"preview-error": d(s).previewError.value
|
|
175
|
-
}, null, 8, ["entry", "preview-document", "preview-error"])) : (n(), v(
|
|
173
|
+
}, null, 8, ["entry", "preview-document", "preview-error"])) : (n(), v(w, {
|
|
176
174
|
key: 3,
|
|
177
175
|
icon: "search_off",
|
|
178
|
-
title: `No module named “${
|
|
176
|
+
title: `No module named “${m.value}”`,
|
|
179
177
|
message: "It is not in the published library. It may have been renamed, withdrawn, or never published.",
|
|
180
178
|
"action-label": "Back to the library",
|
|
181
|
-
onAction: a[1] || (a[1] = (
|
|
179
|
+
onAction: a[1] || (a[1] = (y) => d(b).push({ name: "miniprogram-v2-module-center", query: d(r).query }))
|
|
182
180
|
}, null, 8, ["title"]))
|
|
183
181
|
])
|
|
184
182
|
])
|
|
185
183
|
]);
|
|
186
184
|
};
|
|
187
185
|
}
|
|
188
|
-
}),
|
|
186
|
+
}), we = /* @__PURE__ */ E(ye, [["__scopeId", "data-v-70b1bf30"]]);
|
|
189
187
|
export {
|
|
190
|
-
|
|
188
|
+
we as default
|
|
191
189
|
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineComponent as p, resolveComponent as i, openBlock as l, createElementBlock as m, createElementVNode as o, createVNode as r, unref as t, withCtx as u, createTextVNode as c } from "vue";
|
|
2
|
+
import { useRoute as d } from "vue-router";
|
|
3
|
+
import { u as g } from "./portalContext-C4HL_0kl.js";
|
|
4
|
+
import { w as f } from "./portalNavigation-DOF4Ah49.js";
|
|
5
|
+
import { P as k } from "./PortalIcon-DO0VrIoY.js";
|
|
6
|
+
const w = { class: "portal-page" }, y = { class: "portal-page-inner" }, b = { class: "portal-section portal-empty" }, E = /* @__PURE__ */ p({
|
|
7
|
+
__name: "PagesView",
|
|
8
|
+
setup(v) {
|
|
9
|
+
const a = d(), s = g();
|
|
10
|
+
return (x, e) => {
|
|
11
|
+
const n = i("RouterLink");
|
|
12
|
+
return l(), m("div", w, [
|
|
13
|
+
o("div", y, [
|
|
14
|
+
e[3] || (e[3] = o("header", { class: "portal-page-heading" }, [
|
|
15
|
+
o("div", null, [
|
|
16
|
+
o("p", { class: "portal-eyebrow" }, "Part of your mobile app"),
|
|
17
|
+
o("h1", null, "Pages"),
|
|
18
|
+
o("p", { class: "portal-description" }, "Build campaign pages, product stories and more with your mobile workspace.")
|
|
19
|
+
])
|
|
20
|
+
], -1)),
|
|
21
|
+
o("section", b, [
|
|
22
|
+
r(k, { name: "pages" }),
|
|
23
|
+
e[1] || (e[1] = o("h2", null, "Edit pages in your workspace", -1)),
|
|
24
|
+
e[2] || (e[2] = o("p", null, " The page catalog is not connected yet. Existing pages remain in your app’s repository — this is not an empty-page count. ", -1)),
|
|
25
|
+
r(n, {
|
|
26
|
+
to: t(f)(t(s).context.value.projectId, "workspace", t(a).query),
|
|
27
|
+
class: "portal-link-button portal-link-button--primary"
|
|
28
|
+
}, {
|
|
29
|
+
default: u(() => [...e[0] || (e[0] = [
|
|
30
|
+
c("Open mobile editor", -1)
|
|
31
|
+
])]),
|
|
32
|
+
_: 1
|
|
33
|
+
}, 8, ["to"])
|
|
34
|
+
]),
|
|
35
|
+
e[4] || (e[4] = o("p", { class: "portal-notice" }, " Pages are released together with the mobile app. Build a release, review it, then set it live from Releases. Session preview links are temporary and are not public page links. ", -1))
|
|
36
|
+
])
|
|
37
|
+
]);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
export {
|
|
42
|
+
E as default
|
|
43
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { defineComponent as i, computed as p, resolveComponent as m, openBlock as c, createElementBlock as u, createElementVNode as e, toDisplayString as a, unref as n, createVNode as r, withCtx as d, createTextVNode as _ } from "vue";
|
|
2
|
+
import { useRoute as g } from "vue-router";
|
|
3
|
+
import { P as f } from "./PortalIcon-DO0VrIoY.js";
|
|
4
|
+
import { p as k } from "./portalNavigation-DOF4Ah49.js";
|
|
5
|
+
const y = { class: "portal-page" }, b = { class: "portal-page-inner" }, v = { class: "portal-page-heading" }, h = { class: "portal-section portal-empty" }, P = /* @__PURE__ */ i({
|
|
6
|
+
__name: "PlatformUnavailableView",
|
|
7
|
+
setup(x) {
|
|
8
|
+
const o = g(), s = p(() => o.meta.kind === "tablet" ? "tablet" : "kiosk");
|
|
9
|
+
return (V, t) => {
|
|
10
|
+
const l = m("RouterLink");
|
|
11
|
+
return c(), u("div", y, [
|
|
12
|
+
e("div", b, [
|
|
13
|
+
e("header", v, [
|
|
14
|
+
e("div", null, [
|
|
15
|
+
t[0] || (t[0] = e("p", { class: "portal-eyebrow" }, "In-store ordering", -1)),
|
|
16
|
+
e("h1", null, a(n(o).meta.title), 1)
|
|
17
|
+
])
|
|
18
|
+
]),
|
|
19
|
+
e("section", h, [
|
|
20
|
+
r(f, { name: s.value }, null, 8, ["name"]),
|
|
21
|
+
e("h2", null, a(n(o).meta.title) + " is coming in a later release", 1),
|
|
22
|
+
t[2] || (t[2] = e("p", null, " Separate projects, device assignment and publishing are not enabled yet. This page does not create a project or change your mobile app. ", -1)),
|
|
23
|
+
r(l, {
|
|
24
|
+
to: { name: "miniprogram-v2-ecosystem", query: n(k)(n(o).query) },
|
|
25
|
+
class: "portal-link-button"
|
|
26
|
+
}, {
|
|
27
|
+
default: d(() => [...t[1] || (t[1] = [
|
|
28
|
+
_("Back to ecosystem", -1)
|
|
29
|
+
])]),
|
|
30
|
+
_: 1
|
|
31
|
+
}, 8, ["to"])
|
|
32
|
+
])
|
|
33
|
+
])
|
|
34
|
+
]);
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
export {
|
|
39
|
+
P as default
|
|
40
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineComponent as l, openBlock as o, createElementBlock as t, createElementVNode as i, Fragment as c, renderList as n, normalizeStyle as d, normalizeClass as a } from "vue";
|
|
2
|
+
import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
+
const p = "data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%201197147779'%3e%3cpath%20id='Rectangle%2034624630'%20d='M4.5%200.75H6V17.25H4.5C2.42893%2017.25%200.75%2015.5711%200.75%2013.5V4.5C0.75%202.42893%202.42893%200.75%204.5%200.75Z'%20stroke='%236B6C70'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Rectangle%2034624631'%20d='M13.5%200.75C15.571%200.750015%2017.25%202.42897%2017.25%204.5V13.5C17.25%2015.5711%2015.5711%2017.25%2013.5%2017.25H6V0.75H13.5Z'%20stroke='%236B6C70'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector%20177'%20d='M13.5%206L9.64188%208.8059C9.5101%208.90175%209.5101%209.09825%209.64188%209.1941L13.5%2012'%20stroke='%236B6C70'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e", g = "data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%201197147825'%3e%3cpath%20id='Ellipse%201330'%20d='M9.00195%200.75C12.9283%200.75%2016.216%203.49224%2017.0498%207.16602C17.147%207.59434%2017.209%208.04273%2017.2354%208.49805C17.2893%209.42907%2016.4336%2010.25%2015.2197%2010.25H14.333C11.6195%2010.25%209.58394%2012.7328%2010.1162%2015.3936L10.1416%2015.5205C10.3386%2016.5059%209.72231%2017.25%209.00195%2017.25C4.44436%2017.25%200.75%2013.5562%200.75%209C0.75%204.44384%204.44436%200.750048%209.00195%200.75Z'%20stroke='%236B6C70'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3ccircle%20id='Ellipse%201331'%20cx='5.25'%20cy='12.2495'%20r='1.25'%20fill='%236B6C70'/%3e%3ccircle%20id='Ellipse%201332'%20cx='4.25'%20cy='7.25'%20r='1.25'%20fill='%236B6C70'/%3e%3ccircle%20id='Ellipse%201333'%20cx='8.25'%20cy='4.25'%20r='1.25'%20fill='%236B6C70'/%3e%3ccircle%20id='Ellipse%201334'%20cx='13.25'%20cy='6.24951'%20r='1.25'%20fill='%236B6C70'/%3e%3c/g%3e%3c/svg%3e", k = "data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Format/folder'%3e%3cpath%20id='Vector'%20d='M2%208C2%207.46957%202.21071%206.96086%202.58579%206.58579C2.96086%206.21071%203.46957%206%204%206H9L11%208.5H20C20.5304%208.5%2021.0391%208.71071%2021.4142%209.08579C21.7893%209.46086%2022%209.96957%2022%2010.5V18C22%2018.5304%2021.7893%2019.0391%2021.4142%2019.4142C21.0391%2019.7893%2020.5304%2020%2020%2020H4C3.46957%2020%202.96086%2019.7893%202.58579%2019.4142C2.21071%2019.0391%202%2018.5304%202%2018V8Z'%20stroke='%236B6C70'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e", w = "data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Devices/mobile'%3e%3cpath%20id='Vector'%20d='M14.5%202H9.5C8.11929%202%207%203.11929%207%204.5V19.5C7%2020.8807%208.11929%2022%209.5%2022H14.5C15.8807%2022%2017%2020.8807%2017%2019.5V4.5C17%203.11929%2015.8807%202%2014.5%202Z'%20stroke='%236B6C70'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_2'%20d='M9.75%2019H14.25'%20stroke='%236B6C70'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3c/g%3e%3c/svg%3e", h = "data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Devices/tablet'%3e%3cpath%20id='Vector'%20d='M17%202H7C5.89543%202%205%202.89543%205%204V20C5%2021.1046%205.89543%2022%207%2022H17C18.1046%2022%2019%2021.1046%2019%2020V4C19%202.89543%2018.1046%202%2017%202Z'%20stroke='%236B6C70'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_2'%20d='M11.9996%2020.3996C12.4967%2020.3996%2012.8996%2019.9967%2012.8996%2019.4996C12.8996%2019.0026%2012.4967%2018.5996%2011.9996%2018.5996C11.5026%2018.5996%2011.0996%2019.0026%2011.0996%2019.4996C11.0996%2019.9967%2011.5026%2020.3996%2011.9996%2020.3996Z'%20fill='%236B6C70'/%3e%3c/g%3e%3c/svg%3e", v = "data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Devices/kiosk'%3e%3cpath%20id='Vector'%20d='M16%202H8C6.89543%202%206%202.89543%206%204V15C6%2016.1046%206.89543%2017%208%2017H16C17.1046%2017%2018%2016.1046%2018%2015V4C18%202.89543%2017.1046%202%2016%202Z'%20stroke='%236B6C70'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_2'%20d='M12%2017V21'%20stroke='%236B6C70'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3cpath%20id='Vector_3'%20d='M8%2021H16'%20stroke='%236B6C70'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3c/g%3e%3c/svg%3e", m = "data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='16.25'%20height='15'%20viewBox='0%200%2016.25%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%201197147545'%3e%3cpath%20id='Vector'%20d='M14.9213%209.40635C15.3272%209.30438%2015.6126%208.94183%2015.6152%208.52478L15.625%206.93007C15.6275%206.525%2015.3623%206.16651%2014.9732%206.04892L14.1005%205.7852C13.8798%205.7185%2013.6924%205.57154%2013.5755%205.37352L12.8573%204.15727C12.739%203.95681%2012.7017%203.71897%2012.753%203.4921L12.9621%202.56859C13.0506%202.17784%2012.8737%201.7752%2012.5254%201.57492L11.0869%200.7476C10.7376%200.546665%2010.2975%200.596351%2010.0021%200.870075L9.3115%201.51008C9.13962%201.66936%208.91304%201.75704%208.67829%201.7551L7.2638%201.74343C7.03325%201.74153%206.81184%201.65331%206.64356%201.49631L5.97804%200.875398C5.68116%200.598427%205.23678%200.548947%204.88585%200.753787L3.49363%201.56643C3.13075%201.77825%202.9585%202.20851%203.07698%202.61051C3.1228%202.76597%203.17048%202.92701%203.21292%203.06898C3.28703%203.3169%203.25766%203.58529%203.12806%203.80945L2.42614%205.02358C2.29837%205.24458%202.08426%205.40375%201.83578%205.46516C1.68469%205.5025%201.50914%205.54613%201.34035%205.58818C0.93629%205.68883%200.651389%206.04815%200.645934%206.46301L0.62508%208.04887C0.61974%208.45496%200.883759%208.81595%201.27343%208.93536L2.17309%209.21105C2.39202%209.27813%202.57789%209.42429%202.69423%209.62084L3.41482%2010.8382C3.53378%2011.0392%203.57117%2011.2779%203.51934%2011.5054L3.30791%2012.4336C3.21883%2012.8247%203.39575%2013.2279%203.74437%2013.4284L5.17704%2014.2524C5.52563%2014.4529%205.96465%2014.4039%206.26008%2014.1316L6.96142%2013.4851C7.13328%2013.3267%207.35938%2013.2396%207.59352%2013.2417L9.01023%2013.2545C9.2404%2013.2566%209.4614%2013.3446%209.62948%2013.5013L10.2936%2014.1203C10.591%2014.3976%2011.0363%2014.4465%2011.3872%2014.2406L12.7622%2013.4339C13.1297%2013.2183%2013.3034%2012.778%2013.1882%2012.3689C13.1406%2012.1999%2013.0926%2012.0281%2013.0523%2011.8833C12.9866%2011.6471%2013.0193%2011.3949%2013.1425%2011.1827L13.8525%209.96047C13.9767%209.74663%2014.1824%209.59192%2014.4229%209.53151L14.9213%209.40635Z'%20stroke='%236B6C70'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Ellipse%201274'%20d='M8.19692%204.53055C9.88304%204.53055%2011.2457%205.89191%2011.2457%207.56571C11.2455%209.23933%209.88291%2010.5999%208.19692%2010.5999C6.51095%2010.5999%205.14829%209.23931%205.14809%207.56571C5.14809%205.89193%206.51082%204.53058%208.19692%204.53055Z'%20stroke='%236B6C70'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e", u = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "portal-icon portal-icon-app",
|
|
6
|
+
"aria-hidden": "true"
|
|
7
|
+
}, x = { class: "portal-icon-dots" }, B = /* @__PURE__ */ l({
|
|
8
|
+
__name: "PortalIcon",
|
|
9
|
+
props: {
|
|
10
|
+
name: {}
|
|
11
|
+
},
|
|
12
|
+
setup(e) {
|
|
13
|
+
const s = { collapse: p, brand: g, pages: k, mobile: w, tablet: h, kiosk: v, settings: m };
|
|
14
|
+
return (f, L) => e.name === "ecosystem" ? (o(), t("span", u, [
|
|
15
|
+
i("span", x, [
|
|
16
|
+
(o(), t(c, null, n(9, (r) => i("span", { key: r })), 64))
|
|
17
|
+
])
|
|
18
|
+
])) : (o(), t("span", {
|
|
19
|
+
key: 1,
|
|
20
|
+
class: a(["portal-icon portal-icon-mask", `portal-icon-${e.name}`]),
|
|
21
|
+
style: d({ maskImage: `url(${JSON.stringify(s[e.name])})` }),
|
|
22
|
+
"aria-hidden": "true"
|
|
23
|
+
}, null, 6));
|
|
24
|
+
}
|
|
25
|
+
}), b = /* @__PURE__ */ C(B, [["__scopeId", "data-v-6d17c5ee"]]);
|
|
26
|
+
export {
|
|
27
|
+
b as P
|
|
28
|
+
};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { defineComponent as k, computed as p, ref as l, onMounted as P, onScopeDispose as S, resolveComponent as x, openBlock as o, createElementBlock as n, createElementVNode as s, toDisplayString as d, createCommentVNode as h, Fragment as I, createVNode as A, unref as M } from "vue";
|
|
2
|
+
import { useRoute as N } from "vue-router";
|
|
3
|
+
import { e as _, a as $ } from "./index-D5qXvcfE.js";
|
|
4
|
+
import { l as B, e as E } from "./controlPlane-CoEgf9BA.js";
|
|
5
|
+
import { useCoreStore as F } from "@feedmepos/mf-common";
|
|
6
|
+
import { u as U } from "./portalContext-C4HL_0kl.js";
|
|
7
|
+
import { l as V } from "./portalNavigation-DOF4Ah49.js";
|
|
8
|
+
import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
|
+
const L = { class: "portal-page" }, R = { class: "portal-page-inner settings-page" }, T = { class: "portal-page-heading" }, D = ["href"], H = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "portal-error",
|
|
12
|
+
role: "alert"
|
|
13
|
+
}, O = { class: "portal-section" }, j = { class: "settings-value" }, z = { class: "portal-section" }, K = { class: "settings-icon-row" }, Y = { class: "settings-icon" }, G = ["src"], J = { class: "portal-section" }, Q = { class: "settings-logo" }, W = ["src"], X = /* @__PURE__ */ k({
|
|
14
|
+
__name: "PortalSettingsView",
|
|
15
|
+
setup(Z) {
|
|
16
|
+
const a = U(), y = N(), c = F(), w = p(
|
|
17
|
+
() => {
|
|
18
|
+
var t;
|
|
19
|
+
return new URL(
|
|
20
|
+
V({
|
|
21
|
+
...y.query,
|
|
22
|
+
businessId: a.businessId.value,
|
|
23
|
+
country: c.currentCountry.value ?? null,
|
|
24
|
+
restaurantId: ((t = c.currentRestaurant.value) == null ? void 0 : t._id) ?? null
|
|
25
|
+
}),
|
|
26
|
+
_("fmmf:dev") === "dev" ? "https://portal.feedmedev.cc" : "https://portal.feedme.cc"
|
|
27
|
+
).href;
|
|
28
|
+
}
|
|
29
|
+
), m = l(null), g = l(!0), r = l(null), v = l(!1), f = $(_("fmmf:dev")).apiOrigin, C = p(() => `${f}/metadata/${a.businessId.value}/pwa-512x512.png`), b = p(() => {
|
|
30
|
+
var t;
|
|
31
|
+
return (t = B()) == null ? void 0 : t.thumbnail;
|
|
32
|
+
}), i = new AbortController();
|
|
33
|
+
return P(async () => {
|
|
34
|
+
var t;
|
|
35
|
+
try {
|
|
36
|
+
const e = await fetch(`${f}/metadata/${a.businessId.value}/config`, {
|
|
37
|
+
signal: AbortSignal.any([i.signal, AbortSignal.timeout(15e3)])
|
|
38
|
+
});
|
|
39
|
+
if (e.status === 404) return;
|
|
40
|
+
if (!e.ok) throw new Error(`Could not load app assets (HTTP ${e.status})`);
|
|
41
|
+
const u = await e.json();
|
|
42
|
+
m.value = ((t = u.pwaConfig) == null ? void 0 : t.name) ?? null;
|
|
43
|
+
} catch (e) {
|
|
44
|
+
i.signal.aborted || (r.value = E(e));
|
|
45
|
+
} finally {
|
|
46
|
+
g.value = !1;
|
|
47
|
+
}
|
|
48
|
+
}), S(() => i.abort()), (t, e) => {
|
|
49
|
+
const u = x("FmIcon");
|
|
50
|
+
return o(), n("div", L, [
|
|
51
|
+
s("div", R, [
|
|
52
|
+
s("header", T, [
|
|
53
|
+
e[1] || (e[1] = s("div", null, [
|
|
54
|
+
s("p", { class: "portal-eyebrow" }, "Your app identity"),
|
|
55
|
+
s("h1", null, "Settings")
|
|
56
|
+
], -1)),
|
|
57
|
+
s("a", {
|
|
58
|
+
href: w.value,
|
|
59
|
+
class: "portal-link-button",
|
|
60
|
+
target: "_blank",
|
|
61
|
+
rel: "noopener"
|
|
62
|
+
}, "Manage assets in original Portal ↗", 8, D)
|
|
63
|
+
]),
|
|
64
|
+
e[10] || (e[10] = s("div", { class: "settings-tabs" }, [
|
|
65
|
+
s("span", null, "Assets")
|
|
66
|
+
], -1)),
|
|
67
|
+
e[11] || (e[11] = s("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)),
|
|
68
|
+
r.value ? (o(), n("p", H, d(r.value), 1)) : h("", !0),
|
|
69
|
+
s("section", O, [
|
|
70
|
+
e[2] || (e[2] = s("h2", null, "App name", -1)),
|
|
71
|
+
e[3] || (e[3] = s("p", { class: "portal-description" }, "Shown under the icon on your customer’s home screen.", -1)),
|
|
72
|
+
s("p", j, d(g.value ? "Loading…" : r.value ? "Unavailable" : m.value || "Not configured"), 1),
|
|
73
|
+
e[4] || (e[4] = s("p", { class: "portal-description" }, " The original Portal applies the “FeedMe x” naming rule for non-Premium businesses. ", -1))
|
|
74
|
+
]),
|
|
75
|
+
s("section", z, [
|
|
76
|
+
e[7] || (e[7] = s("div", { class: "portal-section-head" }, [
|
|
77
|
+
s("div", null, [
|
|
78
|
+
s("h2", null, "App icon"),
|
|
79
|
+
s("p", { class: "portal-description" }, "One square image for the home screen.")
|
|
80
|
+
])
|
|
81
|
+
], -1)),
|
|
82
|
+
s("div", K, [
|
|
83
|
+
s("div", Y, [
|
|
84
|
+
v.value ? (o(), n(I, { key: 1 }, [
|
|
85
|
+
A(u, {
|
|
86
|
+
name: "image",
|
|
87
|
+
size: "xl"
|
|
88
|
+
}),
|
|
89
|
+
e[5] || (e[5] = s("span", null, "No icon available", -1))
|
|
90
|
+
], 64)) : (o(), n("img", {
|
|
91
|
+
key: 0,
|
|
92
|
+
src: C.value,
|
|
93
|
+
alt: "Current app icon",
|
|
94
|
+
onError: e[0] || (e[0] = (ee) => v.value = !0)
|
|
95
|
+
}, null, 40, G))
|
|
96
|
+
]),
|
|
97
|
+
e[6] || (e[6] = s("div", null, [
|
|
98
|
+
s("h3", null, "Icon guidelines"),
|
|
99
|
+
s("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. "),
|
|
100
|
+
s("p", { class: "portal-description" }, "Changes to this shared icon are not part of a release build.")
|
|
101
|
+
], -1))
|
|
102
|
+
])
|
|
103
|
+
]),
|
|
104
|
+
s("section", J, [
|
|
105
|
+
e[8] || (e[8] = s("h2", null, "Business branding", -1)),
|
|
106
|
+
s("div", Q, [
|
|
107
|
+
b.value ? (o(), n("img", {
|
|
108
|
+
key: 0,
|
|
109
|
+
src: b.value,
|
|
110
|
+
alt: "Business logo"
|
|
111
|
+
}, null, 8, W)) : h("", !0),
|
|
112
|
+
s("p", null, d(M(a).businessName.value), 1)
|
|
113
|
+
]),
|
|
114
|
+
e[9] || (e[9] = s("p", { class: "portal-description" }, " Cover images and other shared business assets remain available in the original Portal. ", -1))
|
|
115
|
+
])
|
|
116
|
+
])
|
|
117
|
+
]);
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
}), ue = /* @__PURE__ */ q(X, [["__scopeId", "data-v-6c0e4447"]]);
|
|
121
|
+
export {
|
|
122
|
+
ue as default
|
|
123
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { defineComponent as n, computed as l, openBlock as a, createElementBlock as c, normalizeClass as m, renderSlot as p } from "vue";
|
|
2
|
+
const u = /* @__PURE__ */ n({
|
|
3
|
+
__name: "StatusBadge",
|
|
4
|
+
props: {
|
|
5
|
+
variant: { default: "neutral" },
|
|
6
|
+
size: { default: "md" }
|
|
7
|
+
},
|
|
8
|
+
setup(o) {
|
|
9
|
+
const e = o, r = {
|
|
10
|
+
success: "bg-fm-color-system-success-100 text-fm-color-typo-success",
|
|
11
|
+
warning: "bg-fm-color-system-warning-100 text-fm-color-typo-warning",
|
|
12
|
+
error: "bg-fm-color-system-error-100 text-fm-color-typo-error",
|
|
13
|
+
info: "bg-fm-color-system-info-100 text-fm-color-typo-info",
|
|
14
|
+
neutral: "bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary",
|
|
15
|
+
primary: "bg-fm-color-primary text-fm-color-typo-white"
|
|
16
|
+
}, t = l(() => e.size === "sm" ? "rounded-[4px] px-[6px] py-[1px]" : "rounded-full px-8 py-2");
|
|
17
|
+
return (s, f) => (a(), c("span", {
|
|
18
|
+
class: m(["inline-flex shrink-0 items-center gap-4 fm-typo-en-body-xs-600 leading-[16px]", [r[o.variant], t.value]])
|
|
19
|
+
}, [
|
|
20
|
+
p(s.$slots, "default")
|
|
21
|
+
], 2));
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
export {
|
|
25
|
+
u as _
|
|
26
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineComponent as c, watchEffect as a, openBlock as n, createElementBlock as p } from "vue";
|
|
2
|
+
import { useRoute as i, useRouter as u } from "vue-router";
|
|
3
|
+
import { u as l } from "./portalContext-C4HL_0kl.js";
|
|
4
|
+
import { w as m, a as f } from "./portalNavigation-DOF4Ah49.js";
|
|
5
|
+
const _ = {
|
|
6
|
+
class: "portal-loading",
|
|
7
|
+
role: "status"
|
|
8
|
+
}, x = /* @__PURE__ */ c({
|
|
9
|
+
__name: "WorkspaceEntryView",
|
|
10
|
+
setup(w) {
|
|
11
|
+
const r = l(), e = i(), s = u();
|
|
12
|
+
return a(() => {
|
|
13
|
+
var t;
|
|
14
|
+
const o = (t = r.context.value) == null ? void 0 : t.projectId;
|
|
15
|
+
o && s.replace(m(o, e.query.view === "sessions" ? "sessions" : f(e.query.view), e.query));
|
|
16
|
+
}), (o, t) => (n(), p("p", _, "Opening your workspace…"));
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
export {
|
|
20
|
+
x as default
|
|
21
|
+
};
|