@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
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { defineComponent as D, ref as b, onMounted as L, resolveComponent as I, openBlock as r, createBlock as N, withCtx as h, createVNode as s, createElementVNode as n, toDisplayString as g, createElementBlock as d, Fragment as B, createCommentVNode as F, onScopeDispose as A, createTextVNode as M, renderList as U, unref as y } from "vue";
|
|
2
|
+
import { useRoute as O, useRouter as E } from "vue-router";
|
|
3
|
+
import { useDialog as Y } from "@feedmepos/ui-library";
|
|
4
|
+
import { a as $ } from "./routes-Boz_WlNM.js";
|
|
5
|
+
import { c as R, e as T, a as z } from "./controlPlane-CoEgf9BA.js";
|
|
6
|
+
import { u as H } from "./portalContext-C4HL_0kl.js";
|
|
7
|
+
import { w as P } from "./portalNavigation-DOF4Ah49.js";
|
|
8
|
+
import { m as J } from "./index-D5qXvcfE.js";
|
|
9
|
+
import { A as G } from "./AppTemplatePicker-C0lZyhK2.js";
|
|
10
|
+
import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
|
+
import { _ as K } from "./StatusBadge.vue_vue_type_script_setup_true_lang-Bh9Eoe_H.js";
|
|
12
|
+
const Q = {
|
|
13
|
+
key: 0,
|
|
14
|
+
role: "status"
|
|
15
|
+
}, W = {
|
|
16
|
+
key: 1,
|
|
17
|
+
class: "portal-error",
|
|
18
|
+
role: "alert"
|
|
19
|
+
}, X = /* @__PURE__ */ D({
|
|
20
|
+
__name: "MobileProjectDialog",
|
|
21
|
+
props: {
|
|
22
|
+
businessId: {},
|
|
23
|
+
projectId: {},
|
|
24
|
+
initialName: {}
|
|
25
|
+
},
|
|
26
|
+
emits: ["saved", "close"],
|
|
27
|
+
setup(k, { emit: S }) {
|
|
28
|
+
const a = k, C = S, i = b(a.initialName ?? ""), u = b(null), f = b([]), p = b(!a.projectId), c = b(!1), m = b(""), w = J();
|
|
29
|
+
async function V() {
|
|
30
|
+
var e, l;
|
|
31
|
+
p.value = !0, m.value = "";
|
|
32
|
+
try {
|
|
33
|
+
const _ = await R($.appTemplates());
|
|
34
|
+
f.value = _.templates, u.value = ((e = _.templates.find((j) => j.default)) == null ? void 0 : e.id) ?? ((l = _.templates[0]) == null ? void 0 : l.id) ?? null;
|
|
35
|
+
} catch (_) {
|
|
36
|
+
m.value = T(_);
|
|
37
|
+
} finally {
|
|
38
|
+
p.value = !1;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
async function o() {
|
|
42
|
+
if (!(c.value || !i.value.trim() || i.value.trim().length > 120 || !a.projectId && !u.value)) {
|
|
43
|
+
c.value = !0, m.value = "";
|
|
44
|
+
try {
|
|
45
|
+
const e = await R(a.projectId ? $.project(a.businessId, a.projectId) : $.projects(a.businessId), {
|
|
46
|
+
method: a.projectId ? "PATCH" : "POST",
|
|
47
|
+
body: JSON.stringify({ name: i.value.trim(), ...a.projectId ? {} : {
|
|
48
|
+
projectId: w,
|
|
49
|
+
kind: "mobile",
|
|
50
|
+
appTemplate: u.value,
|
|
51
|
+
country: z()
|
|
52
|
+
} })
|
|
53
|
+
});
|
|
54
|
+
C("saved", e);
|
|
55
|
+
} catch (e) {
|
|
56
|
+
m.value = T(e);
|
|
57
|
+
} finally {
|
|
58
|
+
c.value = !1;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return L(() => {
|
|
63
|
+
a.projectId || V();
|
|
64
|
+
}), (e, l) => {
|
|
65
|
+
const _ = I("FmTextField"), j = I("FmButton"), x = I("FmCard"), t = I("FmForm");
|
|
66
|
+
return r(), N(t, { onValidationSuccess: o }, {
|
|
67
|
+
default: h(() => [
|
|
68
|
+
s(x, { class: "project-dialog" }, {
|
|
69
|
+
default: h(() => [
|
|
70
|
+
n("h2", null, g(k.projectId ? "Rename project" : "New Mobile project"), 1),
|
|
71
|
+
s(_, {
|
|
72
|
+
modelValue: i.value,
|
|
73
|
+
"onUpdate:modelValue": l[0] || (l[0] = (v) => i.value = v),
|
|
74
|
+
label: "Project name",
|
|
75
|
+
placeholder: "e.g. Summer ordering",
|
|
76
|
+
disabled: c.value,
|
|
77
|
+
rules: [(v) => v.trim().length > 0 && v.trim().length <= 120 || "Enter a name up to 120 characters"]
|
|
78
|
+
}, null, 8, ["modelValue", "disabled", "rules"]),
|
|
79
|
+
k.projectId ? F("", !0) : (r(), d(B, { key: 0 }, [
|
|
80
|
+
p.value ? (r(), d("p", Q, "Loading templates…")) : (r(), N(G, {
|
|
81
|
+
key: 1,
|
|
82
|
+
templates: f.value,
|
|
83
|
+
modelValue: u.value,
|
|
84
|
+
"onUpdate:modelValue": l[1] || (l[1] = (v) => u.value = v),
|
|
85
|
+
disabled: c.value
|
|
86
|
+
}, null, 8, ["templates", "modelValue", "disabled"])),
|
|
87
|
+
l[3] || (l[3] = n("p", { class: "project-dialog__note" }, "Start a separate app from a template. Your live app stays as it is.", -1))
|
|
88
|
+
], 64)),
|
|
89
|
+
m.value ? (r(), d("p", W, g(m.value), 1)) : F("", !0),
|
|
90
|
+
!k.projectId && !f.value.length && !p.value ? (r(), N(j, {
|
|
91
|
+
key: 2,
|
|
92
|
+
label: "Retry loading templates",
|
|
93
|
+
variant: "secondary",
|
|
94
|
+
onClick: V
|
|
95
|
+
})) : F("", !0),
|
|
96
|
+
n("footer", null, [
|
|
97
|
+
s(j, {
|
|
98
|
+
label: "Cancel",
|
|
99
|
+
variant: "tertiary",
|
|
100
|
+
disabled: c.value,
|
|
101
|
+
onClick: l[2] || (l[2] = (v) => C("close"))
|
|
102
|
+
}, null, 8, ["disabled"]),
|
|
103
|
+
s(j, {
|
|
104
|
+
label: k.projectId ? "Save" : "Create project",
|
|
105
|
+
type: "submit",
|
|
106
|
+
loading: c.value,
|
|
107
|
+
disabled: p.value || !i.value.trim() || i.value.trim().length > 120 || !k.projectId && !u.value
|
|
108
|
+
}, null, 8, ["label", "loading", "disabled"])
|
|
109
|
+
])
|
|
110
|
+
]),
|
|
111
|
+
_: 1
|
|
112
|
+
})
|
|
113
|
+
]),
|
|
114
|
+
_: 1
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
}), Z = /* @__PURE__ */ q(X, [["__scopeId", "data-v-c903cb52"]]), ee = { class: "portal-page" }, te = { class: "portal-page-inner" }, oe = { class: "portal-page-heading" }, ae = {
|
|
119
|
+
key: 0,
|
|
120
|
+
class: "mobile-projects__count"
|
|
121
|
+
}, le = {
|
|
122
|
+
key: 0,
|
|
123
|
+
class: "portal-error",
|
|
124
|
+
role: "alert"
|
|
125
|
+
}, ne = {
|
|
126
|
+
key: 1,
|
|
127
|
+
role: "status"
|
|
128
|
+
}, re = {
|
|
129
|
+
key: 2,
|
|
130
|
+
class: "portal-empty"
|
|
131
|
+
}, se = {
|
|
132
|
+
key: 3,
|
|
133
|
+
class: "mobile-projects__list",
|
|
134
|
+
"aria-label": "Mobile projects"
|
|
135
|
+
}, ie = { class: "mobile-projects__name" }, ue = ["title"], ce = ["datetime"], de = { class: "mobile-projects__actions" }, pe = { class: "w-[200px] py-4" }, me = /* @__PURE__ */ D({
|
|
136
|
+
__name: "MobileProjectsView",
|
|
137
|
+
setup(k) {
|
|
138
|
+
const S = H(), a = O(), C = E(), i = Y(), u = b([]), f = b(!0), p = b(""), c = new AbortController();
|
|
139
|
+
async function m() {
|
|
140
|
+
f.value = !0, p.value = "";
|
|
141
|
+
try {
|
|
142
|
+
const o = await R($.projects(S.businessId.value), { signal: c.signal });
|
|
143
|
+
u.value = o.projects;
|
|
144
|
+
} catch (o) {
|
|
145
|
+
c.signal.aborted || (p.value = T(o));
|
|
146
|
+
} finally {
|
|
147
|
+
f.value = !1;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
function w(o) {
|
|
151
|
+
i.open({
|
|
152
|
+
title: o ? "Rename project" : "New Mobile project",
|
|
153
|
+
dialogComponent: Z,
|
|
154
|
+
dialogComponentProps: {
|
|
155
|
+
businessId: S.businessId.value,
|
|
156
|
+
projectId: o == null ? void 0 : o.projectId,
|
|
157
|
+
initialName: o == null ? void 0 : o.name,
|
|
158
|
+
onClose: () => i.close(),
|
|
159
|
+
onSaved: (e) => {
|
|
160
|
+
i.close(), o ? m() : C.push(P(e.projectId, "workspace", { ...a.query, setup: "1" }));
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
function V(o) {
|
|
166
|
+
return new Intl.DateTimeFormat(void 0, { dateStyle: "medium", timeStyle: "short" }).format(new Date(o));
|
|
167
|
+
}
|
|
168
|
+
return L(() => {
|
|
169
|
+
if (m(), a.query.create === "1") {
|
|
170
|
+
const { create: o, ...e } = a.query;
|
|
171
|
+
C.replace({ query: e }), w();
|
|
172
|
+
}
|
|
173
|
+
}), A(() => c.abort()), (o, e) => {
|
|
174
|
+
const l = I("FmButton"), _ = I("RouterLink"), j = I("FmMenuItem"), x = I("FmMenu");
|
|
175
|
+
return r(), d("div", ee, [
|
|
176
|
+
n("div", te, [
|
|
177
|
+
n("header", oe, [
|
|
178
|
+
n("div", null, [
|
|
179
|
+
e[3] || (e[3] = n("p", { class: "portal-eyebrow" }, "Mobile Ordering", -1)),
|
|
180
|
+
n("h1", null, [
|
|
181
|
+
e[2] || (e[2] = M("Projects ", -1)),
|
|
182
|
+
f.value ? F("", !0) : (r(), d("span", ae, g(u.value.length), 1))
|
|
183
|
+
])
|
|
184
|
+
]),
|
|
185
|
+
s(l, {
|
|
186
|
+
label: "New project",
|
|
187
|
+
icon: "add",
|
|
188
|
+
onClick: e[0] || (e[0] = (t) => w())
|
|
189
|
+
})
|
|
190
|
+
]),
|
|
191
|
+
p.value ? (r(), d("p", le, [
|
|
192
|
+
M(g(p.value) + " ", 1),
|
|
193
|
+
s(l, {
|
|
194
|
+
label: "Retry",
|
|
195
|
+
variant: "tertiary",
|
|
196
|
+
onClick: m
|
|
197
|
+
})
|
|
198
|
+
])) : f.value ? (r(), d("p", ne, "Loading projects…")) : u.value.length ? (r(), d("section", se, [
|
|
199
|
+
(r(!0), d(B, null, U(u.value, (t) => (r(), d("article", {
|
|
200
|
+
key: t.projectId,
|
|
201
|
+
class: "mobile-projects__row"
|
|
202
|
+
}, [
|
|
203
|
+
n("div", ie, [
|
|
204
|
+
s(_, {
|
|
205
|
+
to: y(P)(t.projectId, "workspace", y(a).query)
|
|
206
|
+
}, {
|
|
207
|
+
default: h(() => [
|
|
208
|
+
M(g(t.name), 1)
|
|
209
|
+
]),
|
|
210
|
+
_: 2
|
|
211
|
+
}, 1032, ["to"]),
|
|
212
|
+
n("span", {
|
|
213
|
+
title: t.projectId
|
|
214
|
+
}, "…" + g(t.projectId.slice(-6)), 9, ue)
|
|
215
|
+
]),
|
|
216
|
+
s(K, {
|
|
217
|
+
variant: t.isLive ? "success" : t.provisioningStatus === "failed" ? "error" : "neutral"
|
|
218
|
+
}, {
|
|
219
|
+
default: h(() => [
|
|
220
|
+
M(g(t.isLive ? "Live" : t.provisioningStatus === "ready" ? "Draft" : t.provisioningStatus === "failed" ? "Setup failed" : t.provisioningStatus === "provisioning" ? "Setting up" : "Not set up"), 1)
|
|
221
|
+
]),
|
|
222
|
+
_: 2
|
|
223
|
+
}, 1032, ["variant"]),
|
|
224
|
+
n("time", {
|
|
225
|
+
datetime: t.updatedAt
|
|
226
|
+
}, g(V(t.updatedAt)), 9, ce),
|
|
227
|
+
n("div", de, [
|
|
228
|
+
s(l, {
|
|
229
|
+
label: t.provisioningStatus === "ready" ? "Open editor" : "Continue setup",
|
|
230
|
+
variant: "secondary",
|
|
231
|
+
onClick: (v) => y(C).push(y(P)(t.projectId, "workspace", y(a).query))
|
|
232
|
+
}, null, 8, ["label", "onClick"]),
|
|
233
|
+
s(x, {
|
|
234
|
+
placement: "bottom-end",
|
|
235
|
+
"close-on-click": ""
|
|
236
|
+
}, {
|
|
237
|
+
"menu-button": h(() => [
|
|
238
|
+
s(l, {
|
|
239
|
+
icon: "more_horiz",
|
|
240
|
+
variant: "tertiary",
|
|
241
|
+
"aria-label": `Actions for ${t.name}`
|
|
242
|
+
}, null, 8, ["aria-label"])
|
|
243
|
+
]),
|
|
244
|
+
default: h(() => [
|
|
245
|
+
n("div", pe, [
|
|
246
|
+
s(j, {
|
|
247
|
+
label: "Rename project",
|
|
248
|
+
icon: "edit",
|
|
249
|
+
"onUpdate:modelValue": (v) => w(t)
|
|
250
|
+
}, null, 8, ["onUpdate:modelValue"]),
|
|
251
|
+
t.provisioningStatus === "ready" ? (r(), N(j, {
|
|
252
|
+
key: 0,
|
|
253
|
+
label: "View releases",
|
|
254
|
+
icon: "deployed_code",
|
|
255
|
+
"onUpdate:modelValue": (v) => y(C).push(y(P)(t.projectId, "releases", y(a).query))
|
|
256
|
+
}, null, 8, ["onUpdate:modelValue"])) : F("", !0)
|
|
257
|
+
])
|
|
258
|
+
]),
|
|
259
|
+
_: 2
|
|
260
|
+
}, 1024)
|
|
261
|
+
])
|
|
262
|
+
]))), 128))
|
|
263
|
+
])) : (r(), d("section", re, [
|
|
264
|
+
e[4] || (e[4] = n("h2", null, "Your first Mobile project", -1)),
|
|
265
|
+
e[5] || (e[5] = n("p", null, "Create an app from a template to start editing.", -1)),
|
|
266
|
+
s(l, {
|
|
267
|
+
label: "New project",
|
|
268
|
+
icon: "add",
|
|
269
|
+
onClick: e[1] || (e[1] = (t) => w())
|
|
270
|
+
})
|
|
271
|
+
]))
|
|
272
|
+
])
|
|
273
|
+
]);
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
}), he = /* @__PURE__ */ q(me, [["__scopeId", "data-v-7f9be5bc"]]);
|
|
277
|
+
export {
|
|
278
|
+
he as default
|
|
279
|
+
};
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { defineComponent as F, openBlock as e, createElementBlock as n, createElementVNode as o, toDisplayString as d, createCommentVNode as k, ref as w, computed as m, onMounted as q, resolveComponent as f, createVNode as p, unref as i, Fragment as v, renderList as b, normalizeClass as A, createBlock as y, withCtx as R } from "vue";
|
|
2
|
+
import { useRoute as z } from "vue-router";
|
|
3
|
+
import { _ as T } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import { u as D, c as G, f as K, _ as h, t as O } from "./useModuleCatalog-DqECds3F.js";
|
|
5
|
+
const P = { class: "card" }, U = { class: "card__head" }, j = { class: "card__name fm-typo-en-body-md-600 text-portal-text-primary" }, H = { class: "card__version fm-typo-en-body-sm-400 text-portal-text-muted" }, J = { class: "card__description fm-typo-en-body-sm-400 text-portal-text-muted" }, Q = { class: "card__tags" }, W = { class: "card__tag card__tag--tier fm-typo-en-body-sm-600" }, X = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "card__tag card__tag--slot fm-typo-en-body-sm-400"
|
|
8
|
+
}, Y = /* @__PURE__ */ F({
|
|
9
|
+
__name: "ModuleCard",
|
|
10
|
+
props: {
|
|
11
|
+
entry: {}
|
|
12
|
+
},
|
|
13
|
+
setup(l) {
|
|
14
|
+
return (s, g) => (e(), n("article", P, [
|
|
15
|
+
o("header", U, [
|
|
16
|
+
o("h3", j, d(l.entry.name), 1),
|
|
17
|
+
o("span", H, d(l.entry.version), 1)
|
|
18
|
+
]),
|
|
19
|
+
o("p", J, d(l.entry.description || l.entry.id), 1),
|
|
20
|
+
o("footer", Q, [
|
|
21
|
+
o("span", W, d(l.entry.category), 1),
|
|
22
|
+
l.entry.slot ? (e(), n("span", X, d(l.entry.slot), 1)) : k("", !0)
|
|
23
|
+
])
|
|
24
|
+
]));
|
|
25
|
+
}
|
|
26
|
+
}), Z = /* @__PURE__ */ T(Y, [["__scopeId", "data-v-2fbfd7b3"]]), ee = { class: "shell" }, te = { class: "centre" }, oe = { class: "centre__inner" }, ne = { class: "centre__head" }, se = {
|
|
27
|
+
key: 0,
|
|
28
|
+
class: "centre__filters"
|
|
29
|
+
}, ae = { class: "centre__facet-label fm-typo-en-body-sm-600 text-portal-text-muted" }, le = { class: "centre__chips" }, re = ["aria-pressed", "onClick"], ie = {
|
|
30
|
+
key: 1,
|
|
31
|
+
class: "centre__note fm-typo-en-body-md-400"
|
|
32
|
+
}, de = {
|
|
33
|
+
key: 6,
|
|
34
|
+
class: "centre__grid"
|
|
35
|
+
}, ce = /* @__PURE__ */ F({
|
|
36
|
+
__name: "ModuleCenterView",
|
|
37
|
+
setup(l) {
|
|
38
|
+
const s = D(), g = z(), u = w(""), c = w([]), V = m(() => G(s.entries.value ?? [])), x = m(() => K(s.entries.value ?? [], u.value, c.value)), N = m(() => u.value.trim().length > 0 || c.value.length > 0), C = m(() => {
|
|
39
|
+
var r;
|
|
40
|
+
return (((r = s.entries.value) == null ? void 0 : r.length) ?? 0) > 0;
|
|
41
|
+
}), B = {
|
|
42
|
+
tier: "Type",
|
|
43
|
+
slot: "Slot"
|
|
44
|
+
};
|
|
45
|
+
function $(r) {
|
|
46
|
+
return c.value.some((a) => a.kind === r.kind && a.value === r.value);
|
|
47
|
+
}
|
|
48
|
+
function L(r) {
|
|
49
|
+
c.value = O(c.value, r);
|
|
50
|
+
}
|
|
51
|
+
function M() {
|
|
52
|
+
u.value = "", c.value = [];
|
|
53
|
+
}
|
|
54
|
+
return q(() => s.load()), (r, a) => {
|
|
55
|
+
const E = f("FmButton"), S = f("FmTextField"), I = f("RouterLink");
|
|
56
|
+
return e(), n("div", ee, [
|
|
57
|
+
o("div", te, [
|
|
58
|
+
o("div", oe, [
|
|
59
|
+
o("header", ne, [
|
|
60
|
+
a[3] || (a[3] = o("div", null, [
|
|
61
|
+
o("h2", { class: "centre__title fm-typo-en-title-sm-600 text-portal-text-primary" }, "Module library"),
|
|
62
|
+
o("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. ")
|
|
63
|
+
], -1)),
|
|
64
|
+
p(E, {
|
|
65
|
+
size: "md",
|
|
66
|
+
variant: "tertiary",
|
|
67
|
+
icon: "refresh",
|
|
68
|
+
onClick: a[0] || (a[0] = (t) => i(s).load(!0))
|
|
69
|
+
})
|
|
70
|
+
]),
|
|
71
|
+
C.value ? (e(), n("div", se, [
|
|
72
|
+
p(S, {
|
|
73
|
+
modelValue: u.value,
|
|
74
|
+
"onUpdate:modelValue": a[1] || (a[1] = (t) => u.value = t),
|
|
75
|
+
label: "Search",
|
|
76
|
+
placeholder: "name, slot, or label"
|
|
77
|
+
}, null, 8, ["modelValue"]),
|
|
78
|
+
(e(!0), n(v, null, b(V.value, (t) => (e(), n("div", {
|
|
79
|
+
key: t.kind,
|
|
80
|
+
class: "centre__facet"
|
|
81
|
+
}, [
|
|
82
|
+
o("span", ae, d(B[t.kind]), 1),
|
|
83
|
+
o("div", le, [
|
|
84
|
+
(e(!0), n(v, null, b(t.values, (_) => (e(), n("button", {
|
|
85
|
+
key: _,
|
|
86
|
+
type: "button",
|
|
87
|
+
class: A(["centre__chip fm-typo-en-body-sm-400", { "centre__chip--on": $({ kind: t.kind, value: _ }) }]),
|
|
88
|
+
"aria-pressed": $({ kind: t.kind, value: _ }),
|
|
89
|
+
onClick: (ue) => L({ kind: t.kind, value: _ })
|
|
90
|
+
}, d(_), 11, re))), 128))
|
|
91
|
+
])
|
|
92
|
+
]))), 128)),
|
|
93
|
+
N.value ? (e(), n("button", {
|
|
94
|
+
key: 0,
|
|
95
|
+
type: "button",
|
|
96
|
+
class: "centre__clear fm-typo-en-body-sm-600",
|
|
97
|
+
onClick: M
|
|
98
|
+
}, " Clear filters ")) : k("", !0)
|
|
99
|
+
])) : k("", !0),
|
|
100
|
+
i(s).entries.value === null ? (e(), n("p", ie, "Loading…")) : i(s).loadError.value ? (e(), y(h, {
|
|
101
|
+
key: 2,
|
|
102
|
+
icon: "error_outline",
|
|
103
|
+
tone: "error",
|
|
104
|
+
title: "Could not load the module library",
|
|
105
|
+
message: i(s).loadError.value,
|
|
106
|
+
"action-label": "Try again",
|
|
107
|
+
onAction: a[2] || (a[2] = (t) => i(s).load(!0))
|
|
108
|
+
}, null, 8, ["message"])) : i(s).unpublished.value ? (e(), y(h, {
|
|
109
|
+
key: 3,
|
|
110
|
+
icon: "widgets",
|
|
111
|
+
title: "No module library has been published yet",
|
|
112
|
+
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."
|
|
113
|
+
})) : C.value ? x.value.length ? (e(), n("ul", de, [
|
|
114
|
+
(e(!0), n(v, null, b(x.value, (t) => (e(), n("li", {
|
|
115
|
+
key: t.id
|
|
116
|
+
}, [
|
|
117
|
+
p(I, {
|
|
118
|
+
class: "centre__link",
|
|
119
|
+
to: { name: "miniprogram-v2-module-detail", params: { name: t.name }, query: i(g).query }
|
|
120
|
+
}, {
|
|
121
|
+
default: R(() => [
|
|
122
|
+
p(Z, { entry: t }, null, 8, ["entry"])
|
|
123
|
+
]),
|
|
124
|
+
_: 2
|
|
125
|
+
}, 1032, ["to"])
|
|
126
|
+
]))), 128))
|
|
127
|
+
])) : (e(), y(h, {
|
|
128
|
+
key: 5,
|
|
129
|
+
icon: "search_off",
|
|
130
|
+
title: "No module matches these filters",
|
|
131
|
+
"action-label": "Clear filters",
|
|
132
|
+
onAction: M
|
|
133
|
+
})) : (e(), y(h, {
|
|
134
|
+
key: 4,
|
|
135
|
+
icon: "widgets",
|
|
136
|
+
title: "The module library is empty",
|
|
137
|
+
message: "It has been published, but holds no modules. Nothing here is available to put on a page yet."
|
|
138
|
+
}))
|
|
139
|
+
])
|
|
140
|
+
])
|
|
141
|
+
]);
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
}), he = /* @__PURE__ */ T(ce, [["__scopeId", "data-v-644d1ae5"]]);
|
|
145
|
+
export {
|
|
146
|
+
he as default
|
|
147
|
+
};
|