@feedmepos/mf-miniprogram-v2 0.2.2-dev.2 → 0.2.2-dev.21
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-BdvPLQMC.js +213 -0
- package/dist/AppTemplatePicker-CNJ6kIJk.js +237 -0
- package/dist/BrandFontPicker-kQKWf1hL.js +241 -0
- package/dist/BrandKitView-RaUWE69b.js +249 -0
- package/dist/{ControlPlaneView-DmhLvgWt.js → ControlPlaneView-l_gDDBtb.js} +8854 -8140
- package/dist/EcosystemView-CBEL5PT2.js +186 -0
- package/dist/{LegacyWorkspaceEntry-7DvIosoj.js → LegacyWorkspaceEntry-lEMtmdIe.js} +1 -1
- package/dist/MobileProjectsView-BruZHfdq.js +312 -0
- package/dist/{ModuleCenterView-Dqp-2hbL.js → ModuleCenterView-DI6Pakkr.js} +34 -34
- package/dist/{ModuleDetailView-cpQ_UfS9.js → ModuleDetailView-DteTTb-3.js} +49 -49
- package/dist/{PagesView-BHo_fnWa.js → PagesView-BYzldeqE.js} +1 -1
- package/dist/{PortalSettingsView-CkW-avwg.js → PortalSettingsView-Bl4z9cFG.js} +4 -4
- package/dist/StatusBadge.vue_vue_type_script_setup_true_lang-CMgQ0bd_.js +30 -0
- package/dist/TemplateCenterView-DNjVytwE.js +364 -0
- package/dist/{WorkspaceEntryView-ZdXuMQoJ.js → WorkspaceEntryView-BIumdrty.js} +1 -1
- package/dist/app.js +27 -10
- package/dist/{controlPlane-wUT1G_Gr.js → controlPlane-sXaC6pAh.js} +9 -9
- package/dist/{index-BDHUHtRw.js → index-CIJWcl_6.js} +25 -15
- package/dist/package.json +2 -1
- package/dist/{portalContext-CTVzkJV7.js → portalContext-BFTX5VVx.js} +2 -2
- package/dist/routes-D6BQSP4i.js +81 -0
- package/dist/style.css +1 -1
- package/dist/templatePickerFlag-BIYWgnaS.js +59 -0
- package/dist/useBrandKit-CkdPQRE-.js +1020 -0
- package/dist/{useModuleCatalog-CD5N246F.js → useModuleCatalog-Bk-gRmBb.js} +3 -3
- package/package.json +2 -1
- package/dist/App-D7vZDj-a.js +0 -213
- package/dist/BrandKitView-B8t8RkHr.js +0 -221
- package/dist/EcosystemView--S4hk_t4.js +0 -232
- package/dist/StatusBadge.vue_vue_type_script_setup_true_lang-Bh9Eoe_H.js +0 -26
- package/dist/localPreference-DneUpUrQ.js +0 -34
- package/dist/routes-L0ady_Wy.js +0 -53
- package/dist/useBrandKit-CpyR2j6m.js +0 -924
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import { defineComponent as $, ref as f, onMounted as q, resolveComponent as I, openBlock as s, createBlock as V, withCtx as L, createVNode as g, createElementVNode as d, toDisplayString as S, createElementBlock as b, Fragment as U, createCommentVNode as x, computed as O, h as r, withModifiers as M, onScopeDispose as E, createTextVNode as z, unref as R } from "vue";
|
|
2
|
+
import { useRoute as Y, useRouter as H } from "vue-router";
|
|
3
|
+
import { components as J, useDialog as G } from "@feedmepos/ui-library";
|
|
4
|
+
import { a as F } from "./routes-D6BQSP4i.js";
|
|
5
|
+
import { c as T, e as B, a as K } from "./controlPlane-sXaC6pAh.js";
|
|
6
|
+
import { u as Q } from "./portalContext-BFTX5VVx.js";
|
|
7
|
+
import { w as C } from "./portalNavigation-DKCfwTH8.js";
|
|
8
|
+
import { A as W, p as X } from "./AppTemplatePicker-CNJ6kIJk.js";
|
|
9
|
+
import { m as Z } from "./index-CIJWcl_6.js";
|
|
10
|
+
import { _ as A } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
|
+
import { _ as D } from "./StatusBadge.vue_vue_type_script_setup_true_lang-CMgQ0bd_.js";
|
|
12
|
+
const ee = {
|
|
13
|
+
key: 0,
|
|
14
|
+
role: "status"
|
|
15
|
+
}, te = {
|
|
16
|
+
key: 1,
|
|
17
|
+
class: "portal-error",
|
|
18
|
+
role: "alert"
|
|
19
|
+
}, oe = /* @__PURE__ */ $({
|
|
20
|
+
__name: "MobileProjectDialog",
|
|
21
|
+
props: {
|
|
22
|
+
businessId: {},
|
|
23
|
+
projectId: {},
|
|
24
|
+
initialName: {}
|
|
25
|
+
},
|
|
26
|
+
emits: ["saved", "close"],
|
|
27
|
+
setup(y, { emit: _ }) {
|
|
28
|
+
const o = y, c = _, a = f(o.initialName ?? ""), n = f(null), p = f([]), i = f(!o.projectId), l = f(!1), u = f(""), h = Z();
|
|
29
|
+
async function j() {
|
|
30
|
+
var m, t;
|
|
31
|
+
i.value = !0, u.value = "";
|
|
32
|
+
try {
|
|
33
|
+
const e = await T(F.appTemplates());
|
|
34
|
+
p.value = e.templates, n.value = ((m = e.templates.find((v) => v.default)) == null ? void 0 : m.id) ?? ((t = e.templates[0]) == null ? void 0 : t.id) ?? null;
|
|
35
|
+
} catch (e) {
|
|
36
|
+
u.value = B(e);
|
|
37
|
+
} finally {
|
|
38
|
+
i.value = !1;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
async function P() {
|
|
42
|
+
if (!(l.value || !a.value.trim() || a.value.trim().length > 120 || !o.projectId && !n.value)) {
|
|
43
|
+
l.value = !0, u.value = "";
|
|
44
|
+
try {
|
|
45
|
+
const m = await T(o.projectId ? F.project(o.businessId, o.projectId) : F.projects(o.businessId), {
|
|
46
|
+
method: o.projectId ? "PATCH" : "POST",
|
|
47
|
+
body: JSON.stringify({ name: a.value.trim(), ...o.projectId ? {} : {
|
|
48
|
+
projectId: h,
|
|
49
|
+
kind: "mobile",
|
|
50
|
+
appTemplate: n.value,
|
|
51
|
+
country: K()
|
|
52
|
+
} })
|
|
53
|
+
});
|
|
54
|
+
c("saved", m);
|
|
55
|
+
} catch (m) {
|
|
56
|
+
u.value = B(m);
|
|
57
|
+
} finally {
|
|
58
|
+
l.value = !1;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return q(() => {
|
|
63
|
+
o.projectId || j();
|
|
64
|
+
}), (m, t) => {
|
|
65
|
+
const e = I("FmTextField"), v = I("FmButton"), N = I("FmCard"), k = I("FmForm");
|
|
66
|
+
return s(), V(k, { onValidationSuccess: P }, {
|
|
67
|
+
default: L(() => [
|
|
68
|
+
g(N, { class: "project-dialog" }, {
|
|
69
|
+
default: L(() => [
|
|
70
|
+
d("h2", null, S(y.projectId ? "Rename project" : "New Mobile project"), 1),
|
|
71
|
+
g(e, {
|
|
72
|
+
modelValue: a.value,
|
|
73
|
+
"onUpdate:modelValue": t[0] || (t[0] = (w) => a.value = w),
|
|
74
|
+
label: "Project name",
|
|
75
|
+
placeholder: "e.g. Summer ordering",
|
|
76
|
+
disabled: l.value,
|
|
77
|
+
rules: [(w) => w.trim().length > 0 && w.trim().length <= 120 || "Enter a name up to 120 characters"]
|
|
78
|
+
}, null, 8, ["modelValue", "disabled", "rules"]),
|
|
79
|
+
y.projectId ? x("", !0) : (s(), b(U, { key: 0 }, [
|
|
80
|
+
i.value ? (s(), b("p", ee, "Loading templates…")) : (s(), V(W, {
|
|
81
|
+
key: 1,
|
|
82
|
+
templates: p.value,
|
|
83
|
+
modelValue: n.value,
|
|
84
|
+
"onUpdate:modelValue": t[1] || (t[1] = (w) => n.value = w),
|
|
85
|
+
disabled: l.value
|
|
86
|
+
}, null, 8, ["templates", "modelValue", "disabled"])),
|
|
87
|
+
t[3] || (t[3] = d("p", { class: "project-dialog__note" }, "Start a separate app from a template. Your live app stays as it is.", -1))
|
|
88
|
+
], 64)),
|
|
89
|
+
u.value ? (s(), b("p", te, S(u.value), 1)) : x("", !0),
|
|
90
|
+
!y.projectId && !p.value.length && !i.value ? (s(), V(v, {
|
|
91
|
+
key: 2,
|
|
92
|
+
label: "Retry loading templates",
|
|
93
|
+
variant: "secondary",
|
|
94
|
+
onClick: j
|
|
95
|
+
})) : x("", !0),
|
|
96
|
+
d("footer", null, [
|
|
97
|
+
g(v, {
|
|
98
|
+
label: "Cancel",
|
|
99
|
+
variant: "tertiary",
|
|
100
|
+
disabled: l.value,
|
|
101
|
+
onClick: t[2] || (t[2] = (w) => c("close"))
|
|
102
|
+
}, null, 8, ["disabled"]),
|
|
103
|
+
g(v, {
|
|
104
|
+
label: y.projectId ? "Save" : "Create project",
|
|
105
|
+
type: "submit",
|
|
106
|
+
loading: l.value,
|
|
107
|
+
disabled: i.value || !a.value.trim() || a.value.trim().length > 120 || !y.projectId && !n.value
|
|
108
|
+
}, null, 8, ["label", "loading", "disabled"])
|
|
109
|
+
])
|
|
110
|
+
]),
|
|
111
|
+
_: 1
|
|
112
|
+
})
|
|
113
|
+
]),
|
|
114
|
+
_: 1
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
}), ae = /* @__PURE__ */ A(oe, [["__scopeId", "data-v-c903cb52"]]), le = { class: "portal-page" }, re = { class: "portal-page-inner" }, se = { class: "portal-page-heading" }, ne = {
|
|
119
|
+
key: 0,
|
|
120
|
+
class: "mobile-projects__count"
|
|
121
|
+
}, ie = {
|
|
122
|
+
key: 0,
|
|
123
|
+
class: "portal-error",
|
|
124
|
+
role: "alert"
|
|
125
|
+
}, ue = {
|
|
126
|
+
key: 1,
|
|
127
|
+
role: "status"
|
|
128
|
+
}, de = {
|
|
129
|
+
key: 2,
|
|
130
|
+
class: "portal-empty"
|
|
131
|
+
}, ce = {
|
|
132
|
+
key: 3,
|
|
133
|
+
class: "rounded-2xl border border-portal-border-default bg-portal-bg-default",
|
|
134
|
+
"aria-label": "Mobile projects"
|
|
135
|
+
}, pe = /* @__PURE__ */ $({
|
|
136
|
+
__name: "MobileProjectsView",
|
|
137
|
+
setup(y) {
|
|
138
|
+
const { FmButton: _ } = J, o = Q(), c = Y(), a = H(), n = G(), p = f([]), i = f(!0), l = f(""), u = new AbortController();
|
|
139
|
+
async function h() {
|
|
140
|
+
i.value = !0, l.value = "";
|
|
141
|
+
try {
|
|
142
|
+
const t = await T(F.projects(o.businessId.value), { signal: u.signal });
|
|
143
|
+
p.value = t.projects;
|
|
144
|
+
} catch (t) {
|
|
145
|
+
u.signal.aborted || (l.value = B(t));
|
|
146
|
+
} finally {
|
|
147
|
+
i.value = !1;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
function j(t) {
|
|
151
|
+
n.open({
|
|
152
|
+
title: t ? "Rename project" : "New Mobile project",
|
|
153
|
+
dialogComponent: ae,
|
|
154
|
+
dialogComponentProps: {
|
|
155
|
+
businessId: o.businessId.value,
|
|
156
|
+
projectId: t == null ? void 0 : t.projectId,
|
|
157
|
+
initialName: t == null ? void 0 : t.name,
|
|
158
|
+
onClose: () => n.close(),
|
|
159
|
+
onSaved: (e) => {
|
|
160
|
+
n.close(), t ? h() : a.push(C(e.projectId, "workspace", { ...c.query, setup: "1" }));
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
function P(t) {
|
|
166
|
+
return new Intl.DateTimeFormat(void 0, { dateStyle: "medium", timeStyle: "short" }).format(new Date(t));
|
|
167
|
+
}
|
|
168
|
+
const m = O(() => [
|
|
169
|
+
{
|
|
170
|
+
id: "project",
|
|
171
|
+
header: () => "Project",
|
|
172
|
+
cell: (t) => {
|
|
173
|
+
const e = t.row.original;
|
|
174
|
+
return r("div", { class: "flex min-w-0 flex-col gap-2" }, [
|
|
175
|
+
r("span", { class: "truncate fm-typo-en-body-md-600 text-portal-text-primary" }, e.name),
|
|
176
|
+
r(
|
|
177
|
+
"span",
|
|
178
|
+
{ class: "fm-typo-en-body-sm-400 text-portal-text-muted", title: e.projectId },
|
|
179
|
+
`…${e.projectId.slice(-6)}`
|
|
180
|
+
)
|
|
181
|
+
]);
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
id: "setup",
|
|
186
|
+
header: () => "Setup",
|
|
187
|
+
size: 130,
|
|
188
|
+
enableSorting: !1,
|
|
189
|
+
cell: (t) => r(
|
|
190
|
+
D,
|
|
191
|
+
{ variant: t.row.original.provisioningStatus === "failed" ? "error" : "neutral", size: "sm" },
|
|
192
|
+
() => X(t.row.original.provisioningStatus)
|
|
193
|
+
)
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
id: "live",
|
|
197
|
+
header: () => "Live",
|
|
198
|
+
size: 200,
|
|
199
|
+
enableSorting: !1,
|
|
200
|
+
cell: (t) => {
|
|
201
|
+
const e = t.row.original;
|
|
202
|
+
return r("div", { class: "flex flex-col items-start gap-2" }, [
|
|
203
|
+
r(
|
|
204
|
+
D,
|
|
205
|
+
{ variant: e.isLive ? "success" : "neutral", size: "sm" },
|
|
206
|
+
() => e.isLive ? "Live project" : "Not live"
|
|
207
|
+
),
|
|
208
|
+
r(
|
|
209
|
+
"span",
|
|
210
|
+
{ class: "fm-typo-en-body-sm-400 text-portal-text-muted" },
|
|
211
|
+
e.hasUnpublishedRelease === void 0 ? "Release status unavailable" : e.hasUnpublishedRelease ? "Unpublished release available" : "No unpublished release"
|
|
212
|
+
)
|
|
213
|
+
]);
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
id: "updatedAt",
|
|
218
|
+
header: () => "Last edited",
|
|
219
|
+
size: 170,
|
|
220
|
+
enableSorting: !1,
|
|
221
|
+
cell: (t) => r("span", { class: "fm-typo-en-body-sm-400 text-portal-text-muted" }, P(t.row.original.updatedAt))
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
id: "actions",
|
|
225
|
+
header: () => "",
|
|
226
|
+
size: 340,
|
|
227
|
+
enableSorting: !1,
|
|
228
|
+
cell: (t) => {
|
|
229
|
+
const e = t.row.original;
|
|
230
|
+
return r("div", { class: "flex flex-wrap items-center justify-end gap-4" }, [
|
|
231
|
+
e.provisioningStatus === "ready" ? r(_, {
|
|
232
|
+
icon: "deployed_code",
|
|
233
|
+
variant: "tertiary",
|
|
234
|
+
title: "View releases",
|
|
235
|
+
onClick: M(
|
|
236
|
+
() => a.push(C(e.projectId, "releases", c.query)),
|
|
237
|
+
["stop"]
|
|
238
|
+
)
|
|
239
|
+
}) : null,
|
|
240
|
+
r(_, {
|
|
241
|
+
label: "Rename",
|
|
242
|
+
variant: "tertiary",
|
|
243
|
+
onClick: M(() => j(e), ["stop"])
|
|
244
|
+
}),
|
|
245
|
+
r(_, {
|
|
246
|
+
label: e.provisioningStatus === "ready" ? "Open editor" : "Continue setup",
|
|
247
|
+
variant: "secondary",
|
|
248
|
+
onClick: M(
|
|
249
|
+
() => a.push(C(e.projectId, "workspace", c.query)),
|
|
250
|
+
["stop"]
|
|
251
|
+
)
|
|
252
|
+
})
|
|
253
|
+
]);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
]);
|
|
257
|
+
return q(() => {
|
|
258
|
+
if (h(), c.query.create === "1") {
|
|
259
|
+
const { create: t, ...e } = c.query;
|
|
260
|
+
a.replace({ query: e }), j();
|
|
261
|
+
}
|
|
262
|
+
}), E(() => u.abort()), (t, e) => {
|
|
263
|
+
const v = I("FmButton"), N = I("FmTable");
|
|
264
|
+
return s(), b("div", le, [
|
|
265
|
+
d("div", re, [
|
|
266
|
+
d("header", se, [
|
|
267
|
+
d("div", null, [
|
|
268
|
+
e[4] || (e[4] = d("p", { class: "portal-eyebrow" }, "Mobile Ordering", -1)),
|
|
269
|
+
d("h1", null, [
|
|
270
|
+
e[3] || (e[3] = z("Projects ", -1)),
|
|
271
|
+
i.value ? x("", !0) : (s(), b("span", ne, S(p.value.length), 1))
|
|
272
|
+
])
|
|
273
|
+
]),
|
|
274
|
+
g(v, {
|
|
275
|
+
label: "New project",
|
|
276
|
+
icon: "add",
|
|
277
|
+
onClick: e[0] || (e[0] = (k) => j())
|
|
278
|
+
})
|
|
279
|
+
]),
|
|
280
|
+
l.value ? (s(), b("p", ie, [
|
|
281
|
+
z(S(l.value) + " ", 1),
|
|
282
|
+
g(v, {
|
|
283
|
+
label: "Retry",
|
|
284
|
+
variant: "tertiary",
|
|
285
|
+
onClick: h
|
|
286
|
+
})
|
|
287
|
+
])) : i.value ? (s(), b("p", ue, "Loading projects…")) : p.value.length ? (s(), b("section", ce, [
|
|
288
|
+
g(N, {
|
|
289
|
+
"column-defs": m.value,
|
|
290
|
+
"row-data": p.value,
|
|
291
|
+
"page-size": p.value.length,
|
|
292
|
+
"hide-footer": "",
|
|
293
|
+
"pin-header-row": "",
|
|
294
|
+
onRowClick: e[2] || (e[2] = (k) => R(a).push(R(C)(k.original.projectId, "workspace", R(c).query)))
|
|
295
|
+
}, null, 8, ["column-defs", "row-data", "page-size"])
|
|
296
|
+
])) : (s(), b("section", de, [
|
|
297
|
+
e[5] || (e[5] = d("h2", null, "Your first Mobile project", -1)),
|
|
298
|
+
e[6] || (e[6] = d("p", null, "Create an app from a template to start editing.", -1)),
|
|
299
|
+
g(v, {
|
|
300
|
+
label: "New project",
|
|
301
|
+
icon: "add",
|
|
302
|
+
onClick: e[1] || (e[1] = (k) => j())
|
|
303
|
+
})
|
|
304
|
+
]))
|
|
305
|
+
])
|
|
306
|
+
]);
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
}), ke = /* @__PURE__ */ A(pe, [["__scopeId", "data-v-654073ab"]]);
|
|
310
|
+
export {
|
|
311
|
+
ke as default
|
|
312
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as F, openBlock as e, createElementBlock as n, createElementVNode as o, toDisplayString as
|
|
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
2
|
import { useRoute as z } from "vue-router";
|
|
3
3
|
import { _ as T } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
-
import { u as D, c as G, f as K, _ as
|
|
5
|
-
const P = { class: "card" }, U = { class: "card__head" }, j = { class: "card__name fm-typo-en-body-md-600 text-
|
|
4
|
+
import { u as D, c as G, f as K, _ as h, t as O } from "./useModuleCatalog-Bk-gRmBb.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
6
|
key: 0,
|
|
7
7
|
class: "card__tag card__tag--slot fm-typo-en-body-sm-400"
|
|
8
8
|
}, Y = /* @__PURE__ */ F({
|
|
@@ -13,29 +13,29 @@ const P = { class: "card" }, U = { class: "card__head" }, j = { class: "card__na
|
|
|
13
13
|
setup(l) {
|
|
14
14
|
return (s, g) => (e(), n("article", P, [
|
|
15
15
|
o("header", U, [
|
|
16
|
-
o("h3", j,
|
|
17
|
-
o("span", H,
|
|
16
|
+
o("h3", j, d(l.entry.name), 1),
|
|
17
|
+
o("span", H, d(l.entry.version), 1)
|
|
18
18
|
]),
|
|
19
|
-
o("p", J,
|
|
19
|
+
o("p", J, d(l.entry.description || l.entry.id), 1),
|
|
20
20
|
o("footer", Q, [
|
|
21
|
-
o("span", W,
|
|
22
|
-
l.entry.slot ? (e(), n("span", X,
|
|
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
23
|
])
|
|
24
24
|
]));
|
|
25
25
|
}
|
|
26
|
-
}), Z = /* @__PURE__ */ T(Y, [["__scopeId", "data-v-
|
|
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
27
|
key: 0,
|
|
28
28
|
class: "centre__filters"
|
|
29
|
-
}, ae = { class: "centre__facet-label fm-typo-en-body-sm-600 text-
|
|
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
30
|
key: 1,
|
|
31
31
|
class: "centre__note fm-typo-en-body-md-400"
|
|
32
|
-
},
|
|
32
|
+
}, de = {
|
|
33
33
|
key: 6,
|
|
34
34
|
class: "centre__grid"
|
|
35
|
-
},
|
|
35
|
+
}, ce = /* @__PURE__ */ F({
|
|
36
36
|
__name: "ModuleCenterView",
|
|
37
37
|
setup(l) {
|
|
38
|
-
const s = D(), g = z(), u = w(""),
|
|
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
39
|
var r;
|
|
40
40
|
return (((r = s.entries.value) == null ? void 0 : r.length) ?? 0) > 0;
|
|
41
41
|
}), B = {
|
|
@@ -43,33 +43,33 @@ const P = { class: "card" }, U = { class: "card__head" }, j = { class: "card__na
|
|
|
43
43
|
slot: "Slot"
|
|
44
44
|
};
|
|
45
45
|
function $(r) {
|
|
46
|
-
return
|
|
46
|
+
return c.value.some((a) => a.kind === r.kind && a.value === r.value);
|
|
47
47
|
}
|
|
48
48
|
function L(r) {
|
|
49
|
-
|
|
49
|
+
c.value = O(c.value, r);
|
|
50
50
|
}
|
|
51
51
|
function M() {
|
|
52
|
-
u.value = "",
|
|
52
|
+
u.value = "", c.value = [];
|
|
53
53
|
}
|
|
54
54
|
return q(() => s.load()), (r, a) => {
|
|
55
|
-
const E =
|
|
55
|
+
const E = f("FmButton"), S = f("FmTextField"), I = f("RouterLink");
|
|
56
56
|
return e(), n("div", ee, [
|
|
57
57
|
o("div", te, [
|
|
58
58
|
o("div", oe, [
|
|
59
59
|
o("header", ne, [
|
|
60
60
|
a[3] || (a[3] = o("div", null, [
|
|
61
|
-
o("h2", { class: "centre__title fm-typo-en-title-sm-600 text-
|
|
62
|
-
o("p", { class: "centre__subtitle fm-typo-en-body-md-400 text-
|
|
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
63
|
], -1)),
|
|
64
|
-
|
|
64
|
+
p(E, {
|
|
65
65
|
size: "md",
|
|
66
66
|
variant: "tertiary",
|
|
67
67
|
icon: "refresh",
|
|
68
68
|
onClick: a[0] || (a[0] = (t) => i(s).load(!0))
|
|
69
69
|
})
|
|
70
70
|
]),
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
C.value ? (e(), n("div", se, [
|
|
72
|
+
p(S, {
|
|
73
73
|
modelValue: u.value,
|
|
74
74
|
"onUpdate:modelValue": a[1] || (a[1] = (t) => u.value = t),
|
|
75
75
|
label: "Search",
|
|
@@ -79,7 +79,7 @@ const P = { class: "card" }, U = { class: "card__head" }, j = { class: "card__na
|
|
|
79
79
|
key: t.kind,
|
|
80
80
|
class: "centre__facet"
|
|
81
81
|
}, [
|
|
82
|
-
o("span", ae,
|
|
82
|
+
o("span", ae, d(B[t.kind]), 1),
|
|
83
83
|
o("div", le, [
|
|
84
84
|
(e(!0), n(v, null, b(t.values, (_) => (e(), n("button", {
|
|
85
85
|
key: _,
|
|
@@ -87,7 +87,7 @@ const P = { class: "card" }, U = { class: "card__head" }, j = { class: "card__na
|
|
|
87
87
|
class: A(["centre__chip fm-typo-en-body-sm-400", { "centre__chip--on": $({ kind: t.kind, value: _ }) }]),
|
|
88
88
|
"aria-pressed": $({ kind: t.kind, value: _ }),
|
|
89
89
|
onClick: (ue) => L({ kind: t.kind, value: _ })
|
|
90
|
-
},
|
|
90
|
+
}, d(_), 11, re))), 128))
|
|
91
91
|
])
|
|
92
92
|
]))), 128)),
|
|
93
93
|
N.value ? (e(), n("button", {
|
|
@@ -97,7 +97,7 @@ const P = { class: "card" }, U = { class: "card__head" }, j = { class: "card__na
|
|
|
97
97
|
onClick: M
|
|
98
98
|
}, " Clear filters ")) : k("", !0)
|
|
99
99
|
])) : k("", !0),
|
|
100
|
-
i(s).entries.value === null ? (e(), n("p", ie, "Loading…")) : i(s).loadError.value ? (e(),
|
|
100
|
+
i(s).entries.value === null ? (e(), n("p", ie, "Loading…")) : i(s).loadError.value ? (e(), y(h, {
|
|
101
101
|
key: 2,
|
|
102
102
|
icon: "error_outline",
|
|
103
103
|
tone: "error",
|
|
@@ -105,32 +105,32 @@ const P = { class: "card" }, U = { class: "card__head" }, j = { class: "card__na
|
|
|
105
105
|
message: i(s).loadError.value,
|
|
106
106
|
"action-label": "Try again",
|
|
107
107
|
onAction: a[2] || (a[2] = (t) => i(s).load(!0))
|
|
108
|
-
}, null, 8, ["message"])) : i(s).unpublished.value ? (e(),
|
|
108
|
+
}, null, 8, ["message"])) : i(s).unpublished.value ? (e(), y(h, {
|
|
109
109
|
key: 3,
|
|
110
110
|
icon: "widgets",
|
|
111
111
|
title: "No module library has been published yet",
|
|
112
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
|
-
})) :
|
|
114
|
-
(e(!0), n(v, null, b(
|
|
113
|
+
})) : C.value ? x.value.length ? (e(), n("ul", de, [
|
|
114
|
+
(e(!0), n(v, null, b(x.value, (t) => (e(), n("li", {
|
|
115
115
|
key: t.id
|
|
116
116
|
}, [
|
|
117
|
-
|
|
117
|
+
p(I, {
|
|
118
118
|
class: "centre__link",
|
|
119
119
|
to: { name: "miniprogram-v2-module-detail", params: { name: t.name }, query: i(g).query }
|
|
120
120
|
}, {
|
|
121
121
|
default: R(() => [
|
|
122
|
-
|
|
122
|
+
p(Z, { entry: t }, null, 8, ["entry"])
|
|
123
123
|
]),
|
|
124
124
|
_: 2
|
|
125
125
|
}, 1032, ["to"])
|
|
126
126
|
]))), 128))
|
|
127
|
-
])) : (e(),
|
|
127
|
+
])) : (e(), y(h, {
|
|
128
128
|
key: 5,
|
|
129
129
|
icon: "search_off",
|
|
130
130
|
title: "No module matches these filters",
|
|
131
131
|
"action-label": "Clear filters",
|
|
132
132
|
onAction: M
|
|
133
|
-
})) : (e(),
|
|
133
|
+
})) : (e(), y(h, {
|
|
134
134
|
key: 4,
|
|
135
135
|
icon: "widgets",
|
|
136
136
|
title: "The module library is empty",
|
|
@@ -141,7 +141,7 @@ const P = { class: "card" }, U = { class: "card__head" }, j = { class: "card__na
|
|
|
141
141
|
]);
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
|
-
}),
|
|
144
|
+
}), he = /* @__PURE__ */ T(ce, [["__scopeId", "data-v-644d1ae5"]]);
|
|
145
145
|
export {
|
|
146
|
-
|
|
146
|
+
he as default
|
|
147
147
|
};
|