@feedmepos/mf-miniprogram-v2 0.2.8-dev.2 → 0.2.8-dev.4
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-C8Vn8LvE.js → App-CFKKclWT.js} +267 -277
- package/dist/{BrandFontPicker-JHyoGusq.js → BrandFontPicker-VX2LAN2w.js} +1 -1
- package/dist/{BrandKitView-Dlt_ifI0.js → BrandKitView-CB7kcVy2.js} +2 -2
- package/dist/ControlPlaneView-DhAZbPoA.js +26578 -0
- package/dist/{EcosystemView-XP9IZ9wn.js → EcosystemView-hqiZRHIC.js} +6 -6
- package/dist/MobileProjectDialog-CZWx6IYl.js +430 -0
- package/dist/MobileProjectsView-BlQQvHCc.js +232 -0
- package/dist/ModuleCenterView-CY8o1GJG.js +165 -0
- package/dist/{ModuleDetailView-CSfMF0Uo.js → ModuleDetailView-BuZgg6e0.js} +1 -1
- package/dist/{PagesView-DzDqCd8N.js → PagesView-3KDcHMIh.js} +2 -2
- package/dist/{PlatformUnavailableView-CdHjkolw.js → PlatformUnavailableView-ChSD6P3O.js} +1 -1
- package/dist/{PortalSettingsView-Df5jChmi.js → PortalSettingsView-BVgkeXpL.js} +9 -9
- package/dist/StatusBadge.vue_vue_type_script_setup_true_lang-DMm_s9ua.js +41 -0
- package/dist/TemplateCenterView-UQ03rcwn.js +515 -0
- package/dist/{WorkspaceEntryView-DQkYJWdf.js → WorkspaceEntryView-BMrZWby1.js} +2 -2
- package/dist/{adminAccess-D2K-L-Vt.js → adminAccess-B8pYZwW9.js} +2 -2
- package/dist/app.js +12 -12
- package/dist/{controlPlane-sXaC6pAh.js → controlPlane-DR5ykj4d.js} +8 -8
- package/dist/package.json +1 -1
- package/dist/{portalContext-DV-6uUwp.js → portalContext-BKjPuVfn.js} +2 -2
- package/dist/portalNavigation-L5VwKlps.js +42 -0
- package/dist/{routes-CeuodIgg.js → routes-i1Lpq1LK.js} +42 -27
- package/dist/style.css +1 -1
- package/dist/{useBrandKit-CXLIXo5j.js → useBrandKit-CKn1fm2o.js} +1 -1
- package/dist/{useModuleCatalog-Cep-pzWO.js → useModuleCatalog-u7EWW11V.js} +2 -2
- package/package.json +1 -1
- package/dist/AppTemplatePicker.vue_vue_type_script_setup_true_lang-LE_aKvfg.js +0 -198
- package/dist/ControlPlaneView-qDA8RgiR.js +0 -25317
- package/dist/MobileProjectsView-aAyHV5G-.js +0 -333
- package/dist/ModuleCenterView-C6mCPATr.js +0 -147
- package/dist/StatusBadge.vue_vue_type_script_setup_true_lang-CMgQ0bd_.js +0 -30
- package/dist/TemplateCenterView-DrWImUYO.js +0 -425
- package/dist/portalNavigation-C29ihtq_.js +0 -38
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { defineComponent as L, ref as w, computed as C, h as o, withModifiers as j, onMounted as R, onScopeDispose as V, resolveComponent as S, openBlock as r, createElementBlock as n, createElementVNode as a, createTextVNode as I, toDisplayString as M, createCommentVNode as z, createBlock as q, createVNode as _, unref as h } from "vue";
|
|
2
|
+
import { useRoute as D, useRouter as A } from "vue-router";
|
|
3
|
+
import { components as T, useDialog as $ } from "@feedmepos/ui-library";
|
|
4
|
+
import { a as E } from "./routes-i1Lpq1LK.js";
|
|
5
|
+
import { c as O, e as U } from "./controlPlane-DR5ykj4d.js";
|
|
6
|
+
import { u as Y } from "./portalContext-BKjPuVfn.js";
|
|
7
|
+
import { w as d } from "./portalNavigation-L5VwKlps.js";
|
|
8
|
+
import { p as G, M as H } from "./MobileProjectDialog-CZWx6IYl.js";
|
|
9
|
+
import { _ as k } from "./StatusBadge.vue_vue_type_script_setup_true_lang-DMm_s9ua.js";
|
|
10
|
+
import { _ as J } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
|
+
const K = { class: "portal-page" }, Q = { class: "portal-page-inner" }, W = { class: "portal-page-heading" }, X = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "mobile-projects__count"
|
|
14
|
+
}, Z = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "portal-error",
|
|
17
|
+
role: "alert"
|
|
18
|
+
}, ee = {
|
|
19
|
+
key: 1,
|
|
20
|
+
role: "status"
|
|
21
|
+
}, te = {
|
|
22
|
+
key: 2,
|
|
23
|
+
class: "portal-empty"
|
|
24
|
+
}, oe = {
|
|
25
|
+
key: 3,
|
|
26
|
+
class: "rounded-2xl border border-portal-border-default bg-portal-bg-default",
|
|
27
|
+
"aria-label": "Mobile projects"
|
|
28
|
+
}, re = /* @__PURE__ */ L({
|
|
29
|
+
__name: "MobileProjectsView",
|
|
30
|
+
setup(ae) {
|
|
31
|
+
const { FmButton: m } = T, x = Y(), s = D(), i = A(), v = $(), l = w([]), p = w(!0), c = w(""), f = new AbortController();
|
|
32
|
+
async function g() {
|
|
33
|
+
p.value = !0, c.value = "";
|
|
34
|
+
try {
|
|
35
|
+
const t = await O(E.projects(x.businessId.value), {
|
|
36
|
+
signal: f.signal
|
|
37
|
+
});
|
|
38
|
+
l.value = t.projects;
|
|
39
|
+
} catch (t) {
|
|
40
|
+
f.signal.aborted || (c.value = U(t));
|
|
41
|
+
} finally {
|
|
42
|
+
p.value = !1;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function u(t) {
|
|
46
|
+
v.open({
|
|
47
|
+
title: t ? "Rename project" : "New Mobile project",
|
|
48
|
+
// MobileProjectDialog draws its own header (a step title, plus the
|
|
49
|
+
// template step's search box) and its own Cancel/Next/Back/Create
|
|
50
|
+
// buttons — FmDynamicDialog's default close icon is absolutely
|
|
51
|
+
// positioned in the dialog's own top-right corner regardless of what
|
|
52
|
+
// dialogComponent puts there, so left on it sits on top of the search
|
|
53
|
+
// box instead of a page area with room reserved for it (same fix as
|
|
54
|
+
// PreviewPanel.vue's openLibraryExpandDialog).
|
|
55
|
+
closeButton: !1,
|
|
56
|
+
dialogComponent: H,
|
|
57
|
+
dialogComponentProps: {
|
|
58
|
+
businessId: x.businessId.value,
|
|
59
|
+
projectId: t == null ? void 0 : t.projectId,
|
|
60
|
+
initialName: t == null ? void 0 : t.name,
|
|
61
|
+
onClose: () => v.close(),
|
|
62
|
+
onSaved: (e) => {
|
|
63
|
+
v.close(), t ? g() : i.push(d(e.projectId, "workspace", s.query, { setup: !0 }));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function N(t) {
|
|
69
|
+
return new Intl.DateTimeFormat(void 0, { dateStyle: "medium", timeStyle: "short" }).format(new Date(t));
|
|
70
|
+
}
|
|
71
|
+
const P = C(() => [
|
|
72
|
+
{
|
|
73
|
+
id: "project",
|
|
74
|
+
header: () => "Project",
|
|
75
|
+
cell: (t) => {
|
|
76
|
+
const e = t.row.original;
|
|
77
|
+
return o("div", { class: "flex min-w-0 flex-col gap-2" }, [
|
|
78
|
+
o("span", { class: "truncate fm-typo-en-body-md-600 text-portal-text-primary" }, e.name),
|
|
79
|
+
o(
|
|
80
|
+
"span",
|
|
81
|
+
{ class: "fm-typo-en-body-sm-400 text-portal-text-muted", title: e.projectId },
|
|
82
|
+
`…${e.projectId.slice(-6)}`
|
|
83
|
+
)
|
|
84
|
+
]);
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: "setup",
|
|
89
|
+
header: () => "Setup",
|
|
90
|
+
size: 130,
|
|
91
|
+
enableSorting: !1,
|
|
92
|
+
cell: (t) => o(
|
|
93
|
+
k,
|
|
94
|
+
{ variant: t.row.original.provisioningStatus === "failed" ? "error" : "neutral", size: "sm" },
|
|
95
|
+
() => G(t.row.original.provisioningStatus)
|
|
96
|
+
)
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: "live",
|
|
100
|
+
header: () => "Live",
|
|
101
|
+
size: 200,
|
|
102
|
+
enableSorting: !1,
|
|
103
|
+
// Badges only. The muted sentence this replaces ("Unpublished release
|
|
104
|
+
// available") was the one thing in the row set in prose, and prose in a 200px
|
|
105
|
+
// column wraps — which is what made the cell look crowded. The state it
|
|
106
|
+
// carried is worth keeping, so it becomes a second tag rather than going away:
|
|
107
|
+
// it is the only place in this list that shows a merchant they have work built
|
|
108
|
+
// and waiting to go live.
|
|
109
|
+
//
|
|
110
|
+
// Nothing is rendered for a project with no pending release. That is the
|
|
111
|
+
// resting state of most rows, and a tag saying so would be back to filling the
|
|
112
|
+
// column with "nothing happened".
|
|
113
|
+
cell: (t) => {
|
|
114
|
+
const e = t.row.original;
|
|
115
|
+
return o("div", { class: "flex flex-wrap items-center gap-4" }, [
|
|
116
|
+
// "Live project" in a column headed Live said the word twice, and cost the
|
|
117
|
+
// width that made the line below it wrap.
|
|
118
|
+
o(
|
|
119
|
+
k,
|
|
120
|
+
{ variant: e.isLive ? "success" : "neutral", size: "sm" },
|
|
121
|
+
() => e.isLive ? "Live" : "Not live"
|
|
122
|
+
),
|
|
123
|
+
// `=== true` rather than truthiness: the field is optional in the contract,
|
|
124
|
+
// and an absent value means the state is unknown, not that it is false.
|
|
125
|
+
// This endpoint always sends a boolean, so that is a contract-level
|
|
126
|
+
// possibility rather than one a merchant meets.
|
|
127
|
+
e.hasUnpublishedRelease === !0 ? o(
|
|
128
|
+
k,
|
|
129
|
+
{ variant: "warning", size: "sm", title: "A release is built and waiting to be published" },
|
|
130
|
+
() => "Unpublished"
|
|
131
|
+
) : null
|
|
132
|
+
]);
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
id: "updatedAt",
|
|
137
|
+
header: () => "Last edited",
|
|
138
|
+
size: 170,
|
|
139
|
+
enableSorting: !1,
|
|
140
|
+
cell: (t) => o("span", { class: "fm-typo-en-body-sm-400 text-portal-text-muted" }, N(t.row.original.updatedAt))
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
id: "actions",
|
|
144
|
+
header: () => "",
|
|
145
|
+
size: 340,
|
|
146
|
+
enableSorting: !1,
|
|
147
|
+
cell: (t) => {
|
|
148
|
+
const e = t.row.original;
|
|
149
|
+
return o("div", { class: "flex flex-wrap items-center justify-end gap-4" }, [
|
|
150
|
+
e.provisioningStatus === "ready" ? o(m, {
|
|
151
|
+
icon: "deployed_code",
|
|
152
|
+
variant: "tertiary",
|
|
153
|
+
title: "View releases",
|
|
154
|
+
onClick: j(
|
|
155
|
+
() => i.push(d(e.projectId, "releases", s.query)),
|
|
156
|
+
["stop"]
|
|
157
|
+
)
|
|
158
|
+
}) : null,
|
|
159
|
+
o(m, {
|
|
160
|
+
label: "Rename",
|
|
161
|
+
variant: "tertiary",
|
|
162
|
+
onClick: j(() => u(e), ["stop"])
|
|
163
|
+
}),
|
|
164
|
+
o(m, {
|
|
165
|
+
label: e.provisioningStatus === "ready" ? "Open editor" : "Continue setup",
|
|
166
|
+
variant: "secondary",
|
|
167
|
+
onClick: j(
|
|
168
|
+
() => i.push(d(e.projectId, "workspace", s.query)),
|
|
169
|
+
["stop"]
|
|
170
|
+
)
|
|
171
|
+
})
|
|
172
|
+
]);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
]), B = C(() => !p.value && l.value.length > 0);
|
|
176
|
+
return R(() => {
|
|
177
|
+
if (g(), s.query.create === "1") {
|
|
178
|
+
const { create: t, ...e } = s.query;
|
|
179
|
+
i.replace({ query: e }), u();
|
|
180
|
+
}
|
|
181
|
+
}), V(() => f.abort()), (t, e) => {
|
|
182
|
+
const b = S("FmButton"), F = S("FmTable");
|
|
183
|
+
return r(), n("div", K, [
|
|
184
|
+
a("div", Q, [
|
|
185
|
+
a("header", W, [
|
|
186
|
+
a("div", null, [
|
|
187
|
+
e[4] || (e[4] = a("p", { class: "portal-eyebrow" }, "Mobile Ordering", -1)),
|
|
188
|
+
a("h1", null, [
|
|
189
|
+
e[3] || (e[3] = I("Projects ", -1)),
|
|
190
|
+
p.value ? z("", !0) : (r(), n("span", X, M(l.value.length), 1))
|
|
191
|
+
])
|
|
192
|
+
]),
|
|
193
|
+
B.value ? (r(), q(b, {
|
|
194
|
+
key: 0,
|
|
195
|
+
label: "New project",
|
|
196
|
+
icon: "add",
|
|
197
|
+
onClick: e[0] || (e[0] = (y) => u())
|
|
198
|
+
})) : z("", !0)
|
|
199
|
+
]),
|
|
200
|
+
c.value ? (r(), n("p", Z, [
|
|
201
|
+
I(M(c.value) + " ", 1),
|
|
202
|
+
_(b, {
|
|
203
|
+
label: "Retry",
|
|
204
|
+
variant: "tertiary",
|
|
205
|
+
onClick: g
|
|
206
|
+
})
|
|
207
|
+
])) : p.value ? (r(), n("p", ee, "Loading projects…")) : l.value.length ? (r(), n("section", oe, [
|
|
208
|
+
_(F, {
|
|
209
|
+
"column-defs": P.value,
|
|
210
|
+
"row-data": l.value,
|
|
211
|
+
"page-size": l.value.length,
|
|
212
|
+
"hide-footer": "",
|
|
213
|
+
"pin-header-row": "",
|
|
214
|
+
onRowClick: e[2] || (e[2] = (y) => h(i).push(h(d)(y.original.projectId, "workspace", h(s).query)))
|
|
215
|
+
}, null, 8, ["column-defs", "row-data", "page-size"])
|
|
216
|
+
])) : (r(), n("section", te, [
|
|
217
|
+
e[5] || (e[5] = a("h2", null, "Your first Mobile project", -1)),
|
|
218
|
+
e[6] || (e[6] = a("p", null, "Create an app from a template to start editing.", -1)),
|
|
219
|
+
_(b, {
|
|
220
|
+
label: "New project",
|
|
221
|
+
icon: "add",
|
|
222
|
+
onClick: e[1] || (e[1] = (y) => u())
|
|
223
|
+
})
|
|
224
|
+
]))
|
|
225
|
+
])
|
|
226
|
+
]);
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
}), fe = /* @__PURE__ */ J(re, [["__scopeId", "data-v-66c90eec"]]);
|
|
230
|
+
export {
|
|
231
|
+
fe as default
|
|
232
|
+
};
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { defineComponent as N, openBlock as o, createElementBlock as l, createElementVNode as s, toDisplayString as u, createCommentVNode as q, ref as V, watch as R, computed as h, onMounted as z, resolveComponent as x, createVNode as v, unref as c, Fragment as C, renderList as $, normalizeClass as D, createBlock as k, withCtx as G } from "vue";
|
|
2
|
+
import { useRoute as K, useRouter as O } from "vue-router";
|
|
3
|
+
import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import { u as P, c as U, f as j, _ as b, t as H } from "./useModuleCatalog-u7EWW11V.js";
|
|
5
|
+
const J = { class: "card" }, Q = { class: "card__head" }, W = { class: "card__name fm-typo-en-body-md-600 text-portal-text-primary" }, X = { class: "card__version fm-typo-en-body-sm-400 text-portal-text-muted" }, Y = { class: "card__description fm-typo-en-body-sm-400 text-portal-text-muted" }, Z = { class: "card__tags" }, ee = { class: "card__tag card__tag--tier fm-typo-en-body-sm-600" }, te = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "card__tag card__tag--slot fm-typo-en-body-sm-400"
|
|
8
|
+
}, oe = /* @__PURE__ */ N({
|
|
9
|
+
__name: "ModuleCard",
|
|
10
|
+
props: {
|
|
11
|
+
entry: {}
|
|
12
|
+
},
|
|
13
|
+
setup(i) {
|
|
14
|
+
return (r, m) => (o(), l("article", J, [
|
|
15
|
+
s("header", Q, [
|
|
16
|
+
s("h3", W, u(i.entry.name), 1),
|
|
17
|
+
s("span", X, u(i.entry.version), 1)
|
|
18
|
+
]),
|
|
19
|
+
s("p", Y, u(i.entry.description || i.entry.id), 1),
|
|
20
|
+
s("footer", Z, [
|
|
21
|
+
s("span", ee, u(i.entry.category), 1),
|
|
22
|
+
i.entry.slot ? (o(), l("span", te, u(i.entry.slot), 1)) : q("", !0)
|
|
23
|
+
])
|
|
24
|
+
]));
|
|
25
|
+
}
|
|
26
|
+
}), ne = /* @__PURE__ */ B(oe, [["__scopeId", "data-v-2fbfd7b3"]]), se = { class: "shell" }, le = { class: "centre" }, re = { class: "centre__inner" }, ae = { class: "centre__head" }, ie = {
|
|
27
|
+
key: 0,
|
|
28
|
+
class: "centre__filters"
|
|
29
|
+
}, de = { class: "centre__facet-label fm-typo-en-body-sm-600 text-portal-text-muted" }, ce = { class: "centre__chips" }, ue = ["aria-pressed", "onClick"], me = {
|
|
30
|
+
key: 1,
|
|
31
|
+
class: "centre__note fm-typo-en-body-md-400"
|
|
32
|
+
}, _e = {
|
|
33
|
+
key: 6,
|
|
34
|
+
class: "centre__grid"
|
|
35
|
+
}, pe = /* @__PURE__ */ N({
|
|
36
|
+
__name: "ModuleCenterView",
|
|
37
|
+
setup(i) {
|
|
38
|
+
const r = P(), m = K(), L = O();
|
|
39
|
+
function g(t) {
|
|
40
|
+
return t == null ? [] : (Array.isArray(t) ? t : [t]).filter((n) => n != null);
|
|
41
|
+
}
|
|
42
|
+
const _ = V(g(m.query.q)[0] ?? ""), d = V([
|
|
43
|
+
...g(m.query.tier).map((t) => ({ kind: "tier", value: t })),
|
|
44
|
+
...g(m.query.slot).map((t) => ({ kind: "slot", value: t }))
|
|
45
|
+
]);
|
|
46
|
+
R(
|
|
47
|
+
[_, d],
|
|
48
|
+
([t, n]) => {
|
|
49
|
+
const a = { ...m.query };
|
|
50
|
+
t.trim() ? a.q = t : delete a.q;
|
|
51
|
+
const y = n.filter((e) => e.kind === "tier").map((e) => e.value), f = n.filter((e) => e.kind === "slot").map((e) => e.value);
|
|
52
|
+
y.length ? a.tier = y : delete a.tier, f.length ? a.slot = f : delete a.slot, L.replace({ query: a });
|
|
53
|
+
},
|
|
54
|
+
{ deep: !0 }
|
|
55
|
+
);
|
|
56
|
+
const S = h(() => U(r.entries.value ?? [])), M = h(() => j(r.entries.value ?? [], _.value, d.value)), A = h(() => _.value.trim().length > 0 || d.value.length > 0), w = h(() => {
|
|
57
|
+
var t;
|
|
58
|
+
return (((t = r.entries.value) == null ? void 0 : t.length) ?? 0) > 0;
|
|
59
|
+
}), E = {
|
|
60
|
+
tier: "Type",
|
|
61
|
+
slot: "Slot"
|
|
62
|
+
};
|
|
63
|
+
function F(t) {
|
|
64
|
+
return d.value.some((n) => n.kind === t.kind && n.value === t.value);
|
|
65
|
+
}
|
|
66
|
+
function I(t) {
|
|
67
|
+
d.value = H(d.value, t);
|
|
68
|
+
}
|
|
69
|
+
function T() {
|
|
70
|
+
_.value = "", d.value = [];
|
|
71
|
+
}
|
|
72
|
+
return z(() => r.load()), (t, n) => {
|
|
73
|
+
const a = x("FmButton"), y = x("FmTextField"), f = x("RouterLink");
|
|
74
|
+
return o(), l("div", se, [
|
|
75
|
+
s("div", le, [
|
|
76
|
+
s("div", re, [
|
|
77
|
+
s("header", ae, [
|
|
78
|
+
n[3] || (n[3] = s("div", null, [
|
|
79
|
+
s("h2", { class: "centre__title fm-typo-en-title-sm-600 text-portal-text-primary" }, "Module library"),
|
|
80
|
+
s("p", { class: "centre__subtitle fm-typo-en-body-md-400 text-portal-text-muted" }, " Modules the agent can put on a page. Published from the platform, not from your app. ")
|
|
81
|
+
], -1)),
|
|
82
|
+
v(a, {
|
|
83
|
+
size: "md",
|
|
84
|
+
variant: "tertiary",
|
|
85
|
+
icon: "refresh",
|
|
86
|
+
onClick: n[0] || (n[0] = (e) => c(r).load(!0))
|
|
87
|
+
})
|
|
88
|
+
]),
|
|
89
|
+
w.value ? (o(), l("div", ie, [
|
|
90
|
+
v(y, {
|
|
91
|
+
modelValue: _.value,
|
|
92
|
+
"onUpdate:modelValue": n[1] || (n[1] = (e) => _.value = e),
|
|
93
|
+
label: "Search",
|
|
94
|
+
placeholder: "name, slot, or label"
|
|
95
|
+
}, null, 8, ["modelValue"]),
|
|
96
|
+
(o(!0), l(C, null, $(S.value, (e) => (o(), l("div", {
|
|
97
|
+
key: e.kind,
|
|
98
|
+
class: "centre__facet"
|
|
99
|
+
}, [
|
|
100
|
+
s("span", de, u(E[e.kind]), 1),
|
|
101
|
+
s("div", ce, [
|
|
102
|
+
(o(!0), l(C, null, $(e.values, (p) => (o(), l("button", {
|
|
103
|
+
key: p,
|
|
104
|
+
type: "button",
|
|
105
|
+
class: D(["centre__chip fm-typo-en-body-sm-400", { "centre__chip--on": F({ kind: e.kind, value: p }) }]),
|
|
106
|
+
"aria-pressed": F({ kind: e.kind, value: p }),
|
|
107
|
+
onClick: (ye) => I({ kind: e.kind, value: p })
|
|
108
|
+
}, u(p), 11, ue))), 128))
|
|
109
|
+
])
|
|
110
|
+
]))), 128)),
|
|
111
|
+
A.value ? (o(), l("button", {
|
|
112
|
+
key: 0,
|
|
113
|
+
type: "button",
|
|
114
|
+
class: "centre__clear fm-typo-en-body-sm-600",
|
|
115
|
+
onClick: T
|
|
116
|
+
}, " Clear filters ")) : q("", !0)
|
|
117
|
+
])) : q("", !0),
|
|
118
|
+
c(r).entries.value === null ? (o(), l("p", me, "Loading…")) : c(r).loadError.value ? (o(), k(b, {
|
|
119
|
+
key: 2,
|
|
120
|
+
icon: "error_outline",
|
|
121
|
+
tone: "error",
|
|
122
|
+
title: "Could not load the module library",
|
|
123
|
+
message: c(r).loadError.value,
|
|
124
|
+
"action-label": "Try again",
|
|
125
|
+
onAction: n[2] || (n[2] = (e) => c(r).load(!0))
|
|
126
|
+
}, null, 8, ["message"])) : c(r).unpublished.value ? (o(), k(b, {
|
|
127
|
+
key: 3,
|
|
128
|
+
icon: "widgets",
|
|
129
|
+
title: "No module library has been published yet",
|
|
130
|
+
message: "Modules are published from the platform, separately from merging them. Once one is published it appears here, and every workspace started afterwards receives it."
|
|
131
|
+
})) : w.value ? M.value.length ? (o(), l("ul", _e, [
|
|
132
|
+
(o(!0), l(C, null, $(M.value, (e) => (o(), l("li", {
|
|
133
|
+
key: e.id
|
|
134
|
+
}, [
|
|
135
|
+
v(f, {
|
|
136
|
+
class: "centre__link",
|
|
137
|
+
to: { name: "miniprogram-v2-module-detail", params: { name: e.name }, query: c(m).query }
|
|
138
|
+
}, {
|
|
139
|
+
default: G(() => [
|
|
140
|
+
v(ne, { entry: e }, null, 8, ["entry"])
|
|
141
|
+
]),
|
|
142
|
+
_: 2
|
|
143
|
+
}, 1032, ["to"])
|
|
144
|
+
]))), 128))
|
|
145
|
+
])) : (o(), k(b, {
|
|
146
|
+
key: 5,
|
|
147
|
+
icon: "search_off",
|
|
148
|
+
title: "No module matches these filters",
|
|
149
|
+
"action-label": "Clear filters",
|
|
150
|
+
onAction: T
|
|
151
|
+
})) : (o(), k(b, {
|
|
152
|
+
key: 4,
|
|
153
|
+
icon: "widgets",
|
|
154
|
+
title: "The module library is empty",
|
|
155
|
+
message: "It has been published, but holds no modules. Nothing here is available to put on a page yet."
|
|
156
|
+
}))
|
|
157
|
+
])
|
|
158
|
+
])
|
|
159
|
+
]);
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
}), be = /* @__PURE__ */ B(pe, [["__scopeId", "data-v-c2239a32"]]);
|
|
163
|
+
export {
|
|
164
|
+
be as default
|
|
165
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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 q, i as A, u as F, _ as w } from "./useModuleCatalog-
|
|
3
|
+
import { m as q, i as A, u as F, _ as w } from "./useModuleCatalog-u7EWW11V.js";
|
|
4
4
|
import { useDialog as V } from "@feedmepos/ui-library";
|
|
5
5
|
import { _ as E } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
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 = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
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
2
|
import { useRoute as d } from "vue-router";
|
|
3
|
-
import { u as g } from "./portalContext-
|
|
4
|
-
import { w as f } from "./portalNavigation-
|
|
3
|
+
import { u as g } from "./portalContext-BKjPuVfn.js";
|
|
4
|
+
import { w as f } from "./portalNavigation-L5VwKlps.js";
|
|
5
5
|
import { P as k } from "./PortalIcon-DO0VrIoY.js";
|
|
6
6
|
const w = { class: "portal-page" }, y = { class: "portal-page-inner" }, b = { class: "portal-section portal-empty" }, E = /* @__PURE__ */ p({
|
|
7
7
|
__name: "PagesView",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
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
2
|
import { useRoute as g } from "vue-router";
|
|
3
3
|
import { P as f } from "./PortalIcon-DO0VrIoY.js";
|
|
4
|
-
import { p as k } from "./portalNavigation-
|
|
4
|
+
import { p as k } from "./portalNavigation-L5VwKlps.js";
|
|
5
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
6
|
__name: "PlatformUnavailableView",
|
|
7
7
|
setup(x) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as k, computed as p, ref as
|
|
1
|
+
import { defineComponent as k, computed as p, ref as i, 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
2
|
import { useRoute as N } from "vue-router";
|
|
3
3
|
import { e as _, a as $ } from "./index-CIJWcl_6.js";
|
|
4
|
-
import {
|
|
4
|
+
import { m as B, e as E } from "./controlPlane-DR5ykj4d.js";
|
|
5
5
|
import { useCoreStore as F } from "@feedmepos/mf-common";
|
|
6
|
-
import { u as U } from "./portalContext-
|
|
7
|
-
import {
|
|
6
|
+
import { u as U } from "./portalContext-BKjPuVfn.js";
|
|
7
|
+
import { b as V } from "./portalNavigation-L5VwKlps.js";
|
|
8
8
|
import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
9
|
const L = { class: "portal-page" }, R = { class: "portal-page-inner settings-page" }, T = { class: "portal-page-heading" }, D = ["href"], H = {
|
|
10
10
|
key: 0,
|
|
@@ -26,26 +26,26 @@ const L = { class: "portal-page" }, R = { class: "portal-page-inner settings-pag
|
|
|
26
26
|
_("fmmf:dev") === "dev" ? "https://portal.feedmedev.cc" : "https://portal.feedme.cc"
|
|
27
27
|
).href;
|
|
28
28
|
}
|
|
29
|
-
), m =
|
|
29
|
+
), m = i(null), g = i(!0), r = i(null), v = i(!1), f = $(_("fmmf:dev")).apiOrigin, C = p(() => `${f}/metadata/${a.businessId.value}/pwa-512x512.png`), b = p(() => {
|
|
30
30
|
var t;
|
|
31
31
|
return (t = B()) == null ? void 0 : t.thumbnail;
|
|
32
|
-
}),
|
|
32
|
+
}), l = new AbortController();
|
|
33
33
|
return P(async () => {
|
|
34
34
|
var t;
|
|
35
35
|
try {
|
|
36
36
|
const e = await fetch(`${f}/metadata/${a.businessId.value}/config`, {
|
|
37
|
-
signal: AbortSignal.any([
|
|
37
|
+
signal: AbortSignal.any([l.signal, AbortSignal.timeout(15e3)])
|
|
38
38
|
});
|
|
39
39
|
if (e.status === 404) return;
|
|
40
40
|
if (!e.ok) throw new Error(`Could not load app assets (HTTP ${e.status})`);
|
|
41
41
|
const u = await e.json();
|
|
42
42
|
m.value = ((t = u.pwaConfig) == null ? void 0 : t.name) ?? null;
|
|
43
43
|
} catch (e) {
|
|
44
|
-
|
|
44
|
+
l.signal.aborted || (r.value = E(e));
|
|
45
45
|
} finally {
|
|
46
46
|
g.value = !1;
|
|
47
47
|
}
|
|
48
|
-
}), S(() =>
|
|
48
|
+
}), S(() => l.abort()), (t, e) => {
|
|
49
49
|
const u = x("FmIcon");
|
|
50
50
|
return o(), n("div", L, [
|
|
51
51
|
s("div", R, [
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { defineComponent as c, computed as m, openBlock as o, createElementBlock as r, normalizeClass as i, createElementVNode as x, createCommentVNode as d, renderSlot as f } from "vue";
|
|
2
|
+
const u = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "flex h-[14px] w-[14px] shrink-0 items-center justify-center",
|
|
5
|
+
"aria-hidden": "true"
|
|
6
|
+
}, y = /* @__PURE__ */ c({
|
|
7
|
+
__name: "StatusBadge",
|
|
8
|
+
props: {
|
|
9
|
+
variant: { default: "neutral" },
|
|
10
|
+
size: { default: "md" },
|
|
11
|
+
dot: { type: Boolean }
|
|
12
|
+
},
|
|
13
|
+
setup(e) {
|
|
14
|
+
const n = e, s = {
|
|
15
|
+
success: "bg-fm-color-system-success-100 text-fm-color-typo-success",
|
|
16
|
+
warning: "bg-fm-color-system-warning-100 text-fm-color-typo-warning",
|
|
17
|
+
error: "bg-fm-color-system-error-100 text-fm-color-typo-error",
|
|
18
|
+
info: "bg-fm-color-system-info-100 text-fm-color-typo-info",
|
|
19
|
+
neutral: "bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary",
|
|
20
|
+
// Figma `badge/bg/stone` on `badge/text/on-stone`: a resting state, cooler and
|
|
21
|
+
// lighter than neutral grey, so it recedes beside an Active row.
|
|
22
|
+
stone: "bg-portal-badge-stone-bg text-portal-badge-stone-text",
|
|
23
|
+
primary: "bg-fm-color-primary text-fm-color-typo-white"
|
|
24
|
+
}, a = {
|
|
25
|
+
xs: "rounded-[4px] px-[4px] py-[2px] text-[10px] leading-[14px] font-medium tracking-[0.2px]",
|
|
26
|
+
sm: "rounded-[4px] px-[6px] py-[4px] text-[12px] leading-[16px] font-medium tracking-[0.24px]",
|
|
27
|
+
md: "rounded-full px-8 py-2 leading-[16px]"
|
|
28
|
+
}, l = m(() => a[n.size]);
|
|
29
|
+
return (p, t) => (o(), r("span", {
|
|
30
|
+
class: i(["inline-flex shrink-0 items-center", [s[e.variant], l.value, e.dot ? "gap-[2px]" : "gap-4"]])
|
|
31
|
+
}, [
|
|
32
|
+
e.dot ? (o(), r("span", u, [...t[0] || (t[0] = [
|
|
33
|
+
x("span", { class: "h-[5.25px] w-[5.25px] rounded-full bg-current" }, null, -1)
|
|
34
|
+
])])) : d("", !0),
|
|
35
|
+
f(p.$slots, "default")
|
|
36
|
+
], 2));
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
export {
|
|
40
|
+
y as _
|
|
41
|
+
};
|