@feedmepos/mf-miniprogram-v2 0.2.8-dev.8 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/{App-CulUM6bp.js → App-CI4ncIRr.js} +352 -343
  2. package/dist/{BrandFontPicker-VX2LAN2w.js → BrandFontPicker-Ud9cZQm1.js} +1 -1
  3. package/dist/BrandKitView-n5K3qyUW.js +276 -0
  4. package/dist/{ControlPlaneView-BrIrCpIX.js → ControlPlaneView-BPVh5gPy.js} +8940 -8478
  5. package/dist/{EcosystemView-CVunQHEs.js → EcosystemView-j7eC2CsA.js} +115 -93
  6. package/dist/{LegacyWorkspaceEntry-lEMtmdIe.js → LegacyWorkspaceEntry-CADRpDkg.js} +1 -1
  7. package/dist/{MobileProjectDialog-C4wvWZ95.js → MobileProjectDialog-DYlIwjzr.js} +261 -256
  8. package/dist/{MobileProjectsView-CZVTbgqX.js → MobileProjectsView-BFljhsY0.js} +66 -61
  9. package/dist/ModuleCenterView-886eyuBg.js +283 -0
  10. package/dist/ModuleDetailView-B1IXOpig.js +296 -0
  11. package/dist/{PagesView-DgfNxkGp.js → PagesView-D5uGpfrp.js} +2 -2
  12. package/dist/{PlatformUnavailableView-ChSD6P3O.js → PlatformUnavailableView-OHEJAztd.js} +1 -1
  13. package/dist/PortalSettingsView-B7NohuU5.js +123 -0
  14. package/dist/{TemplateCenterView-BPJSWb12.js → TemplateCenterView-BJ3MBEUa.js} +3 -3
  15. package/dist/{WorkspaceEntryView-C4MViyFH.js → WorkspaceEntryView-mpPpAsq4.js} +2 -2
  16. package/dist/app.js +15 -15
  17. package/dist/{controlPlane-DR5ykj4d.js → controlPlane-DuIuUbyk.js} +11 -11
  18. package/dist/{adminAccess-DdZ2qPdx.js → localPreference-C18SIo-s.js} +35 -35
  19. package/dist/package.json +1 -1
  20. package/dist/{portalContext-DuVkhksq.js → portalContext-BkAoYip4.js} +2 -2
  21. package/dist/portalNavigation-DLcC7Koh.js +43 -0
  22. package/dist/{routes-CK4kOaoY.js → routes-B9oMJsaM.js} +2 -4
  23. package/dist/style.css +1 -1
  24. package/dist/{useBrandKit-CKn1fm2o.js → useBrandKit-DDqx19_h.js} +265 -233
  25. package/dist/useModuleCatalog-CLRJw1aG.js +147 -0
  26. package/package.json +1 -1
  27. package/dist/BrandKitView-CB7kcVy2.js +0 -249
  28. package/dist/ModuleCenterView-D0Bv4sKT.js +0 -165
  29. package/dist/ModuleDetailView-Ue3oCNxk.js +0 -189
  30. package/dist/PortalSettingsView-DBrKVWjp.js +0 -233
  31. package/dist/portalNavigation-L5VwKlps.js +0 -42
  32. package/dist/useModuleCatalog-a4dKLnlS.js +0 -124
@@ -1,43 +1,43 @@
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-CK4kOaoY.js";
5
- import { c as O, e as U } from "./controlPlane-DR5ykj4d.js";
6
- import { u as Y } from "./portalContext-DuVkhksq.js";
7
- import { w as d } from "./portalNavigation-L5VwKlps.js";
8
- import { p as G, M as H } from "./MobileProjectDialog-C4wvWZ95.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 = {
1
+ import { defineComponent as L, ref as j, computed as S, h as o, withModifiers as _, onMounted as R, onScopeDispose as V, resolveComponent as I, openBlock as a, createElementBlock as n, createElementVNode as s, createTextVNode as M, toDisplayString as q, createCommentVNode as z, createBlock as D, createVNode as h, unref as k } from "vue";
2
+ import { useRoute as A, useRouter as T } from "vue-router";
3
+ import { components as $, useDialog as E } from "@feedmepos/ui-library";
4
+ import { a as O } from "./routes-B9oMJsaM.js";
5
+ import { c as U, e as Y } from "./controlPlane-DuIuUbyk.js";
6
+ import { u as G } from "./portalContext-BkAoYip4.js";
7
+ import { w as d } from "./portalNavigation-DLcC7Koh.js";
8
+ import { p as H, M as J } from "./MobileProjectDialog-DYlIwjzr.js";
9
+ import { _ as x } from "./StatusBadge.vue_vue_type_script_setup_true_lang-DMm_s9ua.js";
10
+ import { _ as K } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
+ const Q = { class: "portal-page" }, W = { class: "portal-page-inner" }, X = { class: "portal-page-heading" }, Z = {
12
12
  key: 0,
13
13
  class: "mobile-projects__count"
14
- }, Z = {
14
+ }, ee = {
15
15
  key: 0,
16
16
  class: "portal-error",
17
17
  role: "alert"
18
- }, ee = {
18
+ }, te = {
19
19
  key: 1,
20
20
  role: "status"
21
- }, te = {
21
+ }, oe = {
22
22
  key: 2,
23
23
  class: "portal-empty"
24
- }, oe = {
24
+ }, re = {
25
25
  key: 3,
26
26
  class: "rounded-2xl border border-portal-border-default bg-portal-bg-default",
27
27
  "aria-label": "Mobile projects"
28
- }, re = /* @__PURE__ */ L({
28
+ }, ae = /* @__PURE__ */ L({
29
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();
30
+ setup(se) {
31
+ const { FmButton: m } = $, C = G(), r = A(), i = T(), v = E(), l = j([]), p = j(!0), c = j(""), f = new AbortController();
32
32
  async function g() {
33
33
  p.value = !0, c.value = "";
34
34
  try {
35
- const t = await O(E.projects(x.businessId.value), {
35
+ const t = await U(O.projects(C.businessId.value), {
36
36
  signal: f.signal
37
37
  });
38
38
  l.value = t.projects;
39
39
  } catch (t) {
40
- f.signal.aborted || (c.value = U(t));
40
+ f.signal.aborted || (c.value = Y(t));
41
41
  } finally {
42
42
  p.value = !1;
43
43
  }
@@ -46,29 +46,34 @@ const K = { class: "portal-page" }, Q = { class: "portal-page-inner" }, W = { cl
46
46
  v.open({
47
47
  title: t ? "Rename project" : "New Mobile project",
48
48
  // MobileProjectDialog draws its own header (a step title, plus the
49
- // template step's search box) and its own Cancel/Next/Back/Create
49
+ // template step's search box) and its own Cancel/Next/Create
50
50
  // buttons — FmDynamicDialog's default close icon is absolutely
51
51
  // positioned in the dialog's own top-right corner regardless of what
52
52
  // dialogComponent puts there, so left on it sits on top of the search
53
53
  // box instead of a page area with room reserved for it (same fix as
54
54
  // PreviewPanel.vue's openLibraryExpandDialog).
55
55
  closeButton: !1,
56
- dialogComponent: H,
56
+ dialogComponent: J,
57
57
  dialogComponentProps: {
58
- businessId: x.businessId.value,
58
+ businessId: C.businessId.value,
59
59
  projectId: t == null ? void 0 : t.projectId,
60
60
  initialName: t == null ? void 0 : t.name,
61
61
  onClose: () => v.close(),
62
62
  onSaved: (e) => {
63
- v.close(), t ? g() : i.push(d(e.projectId, "workspace", s.query, { setup: !0 }));
63
+ v.close(), t ? g() : i.push(
64
+ d(e.projectId, "workspace", r.query, { setup: !0, ...b() })
65
+ );
64
66
  }
65
67
  }
66
68
  });
67
69
  }
70
+ function b() {
71
+ return typeof r.query.library == "string" ? { library: r.query.library } : {};
72
+ }
68
73
  function N(t) {
69
74
  return new Intl.DateTimeFormat(void 0, { dateStyle: "medium", timeStyle: "short" }).format(new Date(t));
70
75
  }
71
- const P = C(() => [
76
+ const P = S(() => [
72
77
  {
73
78
  id: "project",
74
79
  header: () => "Project",
@@ -90,9 +95,9 @@ const K = { class: "portal-page" }, Q = { class: "portal-page-inner" }, W = { cl
90
95
  size: 130,
91
96
  enableSorting: !1,
92
97
  cell: (t) => o(
93
- k,
98
+ x,
94
99
  { variant: t.row.original.provisioningStatus === "failed" ? "error" : "neutral", size: "sm" },
95
- () => G(t.row.original.provisioningStatus)
100
+ () => H(t.row.original.provisioningStatus)
96
101
  )
97
102
  },
98
103
  {
@@ -116,7 +121,7 @@ const K = { class: "portal-page" }, Q = { class: "portal-page-inner" }, W = { cl
116
121
  // "Live project" in a column headed Live said the word twice, and cost the
117
122
  // width that made the line below it wrap.
118
123
  o(
119
- k,
124
+ x,
120
125
  { variant: e.isLive ? "success" : "neutral", size: "sm" },
121
126
  () => e.isLive ? "Live" : "Not live"
122
127
  ),
@@ -125,7 +130,7 @@ const K = { class: "portal-page" }, Q = { class: "portal-page-inner" }, W = { cl
125
130
  // This endpoint always sends a boolean, so that is a contract-level
126
131
  // possibility rather than one a merchant meets.
127
132
  e.hasUnpublishedRelease === !0 ? o(
128
- k,
133
+ x,
129
134
  { variant: "warning", size: "sm", title: "A release is built and waiting to be published" },
130
135
  () => "Unpublished"
131
136
  ) : null
@@ -151,82 +156,82 @@ const K = { class: "portal-page" }, Q = { class: "portal-page-inner" }, W = { cl
151
156
  icon: "deployed_code",
152
157
  variant: "tertiary",
153
158
  title: "View releases",
154
- onClick: j(
155
- () => i.push(d(e.projectId, "releases", s.query)),
159
+ onClick: _(
160
+ () => i.push(d(e.projectId, "releases", r.query)),
156
161
  ["stop"]
157
162
  )
158
163
  }) : null,
159
164
  o(m, {
160
165
  label: "Rename",
161
166
  variant: "tertiary",
162
- onClick: j(() => u(e), ["stop"])
167
+ onClick: _(() => u(e), ["stop"])
163
168
  }),
164
169
  o(m, {
165
170
  label: e.provisioningStatus === "ready" ? "Open editor" : "Continue setup",
166
171
  variant: "secondary",
167
- onClick: j(
168
- () => i.push(d(e.projectId, "workspace", s.query)),
172
+ onClick: _(
173
+ () => i.push(d(e.projectId, "workspace", r.query, b())),
169
174
  ["stop"]
170
175
  )
171
176
  })
172
177
  ]);
173
178
  }
174
179
  }
175
- ]), B = C(() => !p.value && l.value.length > 0);
180
+ ]), B = S(() => !p.value && l.value.length > 0);
176
181
  return R(() => {
177
- if (g(), s.query.create === "1") {
178
- const { create: t, ...e } = s.query;
182
+ if (g(), r.query.create === "1") {
183
+ const { create: t, ...e } = r.query;
179
184
  i.replace({ query: e }), u();
180
185
  }
181
186
  }), 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))
187
+ const y = I("FmButton"), F = I("FmTable");
188
+ return a(), n("div", Q, [
189
+ s("div", W, [
190
+ s("header", X, [
191
+ s("div", null, [
192
+ e[4] || (e[4] = s("p", { class: "portal-eyebrow" }, "Mobile Ordering", -1)),
193
+ s("h1", null, [
194
+ e[3] || (e[3] = M("Projects ", -1)),
195
+ p.value ? z("", !0) : (a(), n("span", Z, q(l.value.length), 1))
191
196
  ])
192
197
  ]),
193
- B.value ? (r(), q(b, {
198
+ B.value ? (a(), D(y, {
194
199
  key: 0,
195
200
  label: "New project",
196
201
  icon: "add",
197
- onClick: e[0] || (e[0] = (y) => u())
202
+ onClick: e[0] || (e[0] = (w) => u())
198
203
  })) : z("", !0)
199
204
  ]),
200
- c.value ? (r(), n("p", Z, [
201
- I(M(c.value) + " ", 1),
202
- _(b, {
205
+ c.value ? (a(), n("p", ee, [
206
+ M(q(c.value) + " ", 1),
207
+ h(y, {
203
208
  label: "Retry",
204
209
  variant: "tertiary",
205
210
  onClick: g
206
211
  })
207
- ])) : p.value ? (r(), n("p", ee, "Loading projects…")) : l.value.length ? (r(), n("section", oe, [
208
- _(F, {
212
+ ])) : p.value ? (a(), n("p", te, "Loading projects…")) : l.value.length ? (a(), n("section", re, [
213
+ h(F, {
209
214
  "column-defs": P.value,
210
215
  "row-data": l.value,
211
216
  "page-size": l.value.length,
212
217
  "hide-footer": "",
213
218
  "pin-header-row": "",
214
- onRowClick: e[2] || (e[2] = (y) => h(i).push(h(d)(y.original.projectId, "workspace", h(s).query)))
219
+ onRowClick: e[2] || (e[2] = (w) => k(i).push(k(d)(w.original.projectId, "workspace", k(r).query, b())))
215
220
  }, 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, {
221
+ ])) : (a(), n("section", oe, [
222
+ e[5] || (e[5] = s("h2", null, "Your first Mobile project", -1)),
223
+ e[6] || (e[6] = s("p", null, "Create an app from a template to start editing.", -1)),
224
+ h(y, {
220
225
  label: "New project",
221
226
  icon: "add",
222
- onClick: e[1] || (e[1] = (y) => u())
227
+ onClick: e[1] || (e[1] = (w) => u())
223
228
  })
224
229
  ]))
225
230
  ])
226
231
  ]);
227
232
  };
228
233
  }
229
- }), fe = /* @__PURE__ */ J(re, [["__scopeId", "data-v-66c90eec"]]);
234
+ }), ge = /* @__PURE__ */ K(ae, [["__scopeId", "data-v-64493bf8"]]);
230
235
  export {
231
- fe as default
236
+ ge as default
232
237
  };
@@ -0,0 +1,283 @@
1
+ import { defineComponent as H, ref as S, computed as f, onMounted as W, onUnmounted as J, openBlock as s, createElementBlock as l, createElementVNode as o, toDisplayString as a, createCommentVNode as A, Fragment as k, renderList as x, normalizeStyle as X, watch as Z, resolveComponent as O, createVNode as ee, unref as i, normalizeClass as g, createBlock as w, createTextVNode as C } from "vue";
2
+ import { useRouter as j, useRoute as te } from "vue-router";
3
+ import { i as ne, u as oe, f as se, s as z, g as le, _ as M, a as re } from "./useModuleCatalog-CLRJw1aG.js";
4
+ import { _ as K } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
+ const ae = { class: "row" }, ie = { class: "row__head" }, ue = { class: "row__label fm-typo-en-body-md-600 text-portal-text-primary" }, ce = {
6
+ key: 0,
7
+ class: "row__count fm-typo-en-body-sm-400 text-portal-text-muted"
8
+ }, de = {
9
+ key: 0,
10
+ class: "row__note fm-typo-en-body-sm-400 text-portal-text-muted"
11
+ }, _e = {
12
+ key: 1,
13
+ class: "row__cards"
14
+ }, pe = ["title", "srcdoc"], me = 322, ye = 267, ve = /* @__PURE__ */ H({
15
+ __name: "ModuleComponentRow",
16
+ props: {
17
+ component: {},
18
+ previewDocument: {},
19
+ query: {},
20
+ showCount: { type: Boolean, default: !0 }
21
+ },
22
+ setup(h) {
23
+ const y = h, D = j(), d = S([]);
24
+ function b(u) {
25
+ return u.styleLabel || u.description || u.name;
26
+ }
27
+ const N = f(() => {
28
+ const u = y.previewDocument;
29
+ return u ? y.component.styles.map((_) => ({
30
+ name: _.name,
31
+ framed: ne(u, [{ name: _.name, label: b(_) }])
32
+ })) : [];
33
+ });
34
+ function L(u) {
35
+ if (!d.value.some((r) => r && r.contentWindow === u.source)) return;
36
+ const _ = u.data;
37
+ if ((_ == null ? void 0 : _.type) !== "fm-library-preview:select" || !_.module) return;
38
+ const c = y.component.styles.find((r) => r.name === _.module);
39
+ c && D.push({ name: "miniprogram-v2-module-detail", params: { name: c.name }, query: y.query });
40
+ }
41
+ return W(() => window.addEventListener("message", L)), J(() => window.removeEventListener("message", L)), (u, _) => (s(), l("section", ae, [
42
+ o("header", ie, [
43
+ o("h3", ue, a(h.component.label), 1),
44
+ h.showCount ? (s(), l("span", ce, a(h.component.styles.length) + " style" + a(h.component.styles.length === 1 ? "" : "s"), 1)) : A("", !0)
45
+ ]),
46
+ h.previewDocument ? (s(), l("ul", _e, [
47
+ (s(!0), l(k, null, x(N.value, (c) => (s(), l("li", {
48
+ key: c.name
49
+ }, [
50
+ o("iframe", {
51
+ ref_for: !0,
52
+ ref_key: "frameRefs",
53
+ ref: d,
54
+ class: "row__frame",
55
+ style: X({ width: `${me}px`, height: `${ye}px` }),
56
+ title: c.name,
57
+ sandbox: "allow-scripts",
58
+ srcdoc: c.framed
59
+ }, null, 12, pe)
60
+ ]))), 128))
61
+ ])) : (s(), l("p", de, "Loading previews…"))
62
+ ]));
63
+ }
64
+ }), fe = /* @__PURE__ */ K(ve, [["__scopeId", "data-v-691f1a76"]]), he = { class: "shell" }, be = { class: "centre" }, ge = { class: "centre__inner" }, ke = { class: "centre__head" }, we = {
65
+ class: "centre__platforms",
66
+ role: "tablist",
67
+ "aria-label": "Platform"
68
+ }, Ce = ["aria-selected", "onClick"], xe = {
69
+ key: 0,
70
+ class: "centre__filters"
71
+ }, $e = { class: "centre__facet" }, Me = { class: "centre__chips" }, Ae = ["aria-pressed"], Le = { class: "centre__chip-count" }, qe = ["aria-pressed", "onClick"], Ee = { class: "centre__chip-count" }, Pe = ["aria-pressed"], Se = { class: "centre__chip-count" }, De = { class: "centre__facet" }, Ne = { class: "centre__chips" }, Re = ["aria-pressed"], Be = { class: "centre__chip-count" }, Te = ["aria-pressed", "onClick"], Fe = { class: "centre__chip-count" }, Ue = ["aria-pressed"], Ie = { class: "centre__chip-count" }, Ve = {
72
+ key: 1,
73
+ class: "centre__note fm-typo-en-body-md-400"
74
+ }, ze = {
75
+ key: 6,
76
+ class: "centre__sections"
77
+ }, Ge = { class: "centre__section-head" }, He = { class: "centre__section-title fm-typo-en-body-lg-600 text-portal-text-primary" }, We = { class: "centre__section-summary fm-typo-en-body-sm-400 text-portal-text-muted" }, v = "__unset", G = "Ungrouped", je = "Unset", Ke = /* @__PURE__ */ H({
78
+ __name: "ModuleCenterView",
79
+ setup(h) {
80
+ const y = [
81
+ { id: "mobile", label: "Mobile" },
82
+ { id: "tablet", label: "Tablets" },
83
+ { id: "kiosk", label: "Kiosk" }
84
+ ];
85
+ function D(n) {
86
+ return y.some((e) => e.id === n);
87
+ }
88
+ const d = oe(), b = te(), N = j();
89
+ function L(n) {
90
+ return n == null ? [] : (Array.isArray(n) ? n : [n]).filter((e) => e != null);
91
+ }
92
+ function u(n) {
93
+ return L(n)[0];
94
+ }
95
+ const _ = u(b.query.platform), c = S(D(_) ? _ : "mobile"), r = S(u(b.query.group) ?? null), p = S(u(b.query.page) ?? null);
96
+ Z(
97
+ [c, r, p],
98
+ ([n, e, P]) => {
99
+ const m = { ...b.query };
100
+ n !== "mobile" ? m.platform = n : delete m.platform, e ? m.group = e : delete m.group, P ? m.page = P : delete m.page, N.replace({ query: m });
101
+ },
102
+ { deep: !0 }
103
+ );
104
+ const R = f(() => se(d.entries.value ?? [], "")), q = f(() => z(R.value, "group")), E = f(() => z(R.value, "page")), F = f(() => {
105
+ let n = R.value;
106
+ return r.value === v ? n = n.filter((e) => !e.group) : r.value && (n = n.filter((e) => e.group === r.value)), p.value === v ? n = n.filter((e) => !e.page) : p.value && (n = n.filter((e) => e.page === p.value)), n;
107
+ }), Q = f(() => le(F.value)), Y = f(() => r.value !== null || p.value !== null), U = f(() => {
108
+ var n;
109
+ return (((n = d.entries.value) == null ? void 0 : n.length) ?? 0) > 0;
110
+ });
111
+ function I(n) {
112
+ return (e) => {
113
+ n.value = n.value === e ? null : e;
114
+ };
115
+ }
116
+ const B = I(r), T = I(p);
117
+ function V() {
118
+ r.value = null, p.value = null;
119
+ }
120
+ return W(() => d.load()), (n, e) => {
121
+ var m;
122
+ const P = O("FmButton");
123
+ return s(), l("div", he, [
124
+ o("div", be, [
125
+ o("div", ge, [
126
+ o("header", ke, [
127
+ e[7] || (e[7] = o("div", null, [
128
+ o("h2", { class: "centre__title fm-typo-en-title-sm-600 text-portal-text-primary" }, "Component Library"),
129
+ 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. ")
130
+ ], -1)),
131
+ ee(P, {
132
+ size: "md",
133
+ variant: "tertiary",
134
+ icon: "refresh",
135
+ onClick: e[0] || (e[0] = (t) => i(d).load(!0))
136
+ })
137
+ ]),
138
+ o("nav", we, [
139
+ (s(), l(k, null, x(y, (t) => o("button", {
140
+ key: t.id,
141
+ type: "button",
142
+ role: "tab",
143
+ class: g(["centre__platform-tab fm-typo-en-body-md-600", { "centre__platform-tab--on": c.value === t.id }]),
144
+ "aria-selected": c.value === t.id,
145
+ onClick: ($) => c.value = t.id
146
+ }, a(t.label), 11, Ce)), 64))
147
+ ]),
148
+ c.value !== "mobile" ? (s(), w(M, {
149
+ key: 0,
150
+ icon: "devices",
151
+ title: `${(m = y.find((t) => t.id === c.value)) == null ? void 0 : m.label} components are on the way`,
152
+ message: "We're building these for tablet and kiosk. You'll pick their styles here once they're ready.",
153
+ "action-label": "Browse Mobile components",
154
+ onAction: e[1] || (e[1] = (t) => c.value = "mobile")
155
+ }, null, 8, ["title"])) : (s(), l(k, { key: 1 }, [
156
+ U.value ? (s(), l("div", xe, [
157
+ o("div", $e, [
158
+ e[9] || (e[9] = o("span", { class: "centre__facet-label fm-typo-en-body-sm-600 text-portal-text-muted" }, "Category", -1)),
159
+ o("div", Me, [
160
+ o("button", {
161
+ type: "button",
162
+ class: g(["centre__chip centre__chip--pill", { "centre__chip--on": r.value === null }]),
163
+ "aria-pressed": r.value === null,
164
+ onClick: e[2] || (e[2] = (t) => i(B)(null))
165
+ }, [
166
+ e[8] || (e[8] = C(" All ", -1)),
167
+ o("span", Le, a(q.value.total), 1)
168
+ ], 10, Ae),
169
+ (s(!0), l(k, null, x(q.value.chips, (t) => (s(), l("button", {
170
+ key: t.value,
171
+ type: "button",
172
+ class: g(["centre__chip centre__chip--pill", { "centre__chip--on": r.value === t.value }]),
173
+ "aria-pressed": r.value === t.value,
174
+ onClick: ($) => i(B)(t.value)
175
+ }, [
176
+ C(a(t.value) + " ", 1),
177
+ o("span", Ee, a(t.count), 1)
178
+ ], 10, qe))), 128)),
179
+ q.value.unsetCount ? (s(), l("button", {
180
+ key: 0,
181
+ type: "button",
182
+ class: g(["centre__chip centre__chip--pill centre__chip--dashed", { "centre__chip--on": r.value === v }]),
183
+ "aria-pressed": r.value === v,
184
+ onClick: e[3] || (e[3] = (t) => i(B)(v))
185
+ }, [
186
+ C(a(G) + " "),
187
+ o("span", Se, a(q.value.unsetCount), 1)
188
+ ], 10, Pe)) : A("", !0)
189
+ ])
190
+ ]),
191
+ o("div", De, [
192
+ e[11] || (e[11] = o("span", { class: "centre__facet-label fm-typo-en-body-sm-600 text-portal-text-muted" }, "Page", -1)),
193
+ o("div", Ne, [
194
+ o("button", {
195
+ type: "button",
196
+ class: g(["centre__chip centre__chip--pill", { "centre__chip--on": p.value === null }]),
197
+ "aria-pressed": p.value === null,
198
+ onClick: e[4] || (e[4] = (t) => i(T)(null))
199
+ }, [
200
+ e[10] || (e[10] = C(" All pages ", -1)),
201
+ o("span", Be, a(E.value.total), 1)
202
+ ], 10, Re),
203
+ (s(!0), l(k, null, x(E.value.chips, (t) => (s(), l("button", {
204
+ key: t.value,
205
+ type: "button",
206
+ class: g(["centre__chip centre__chip--pill", { "centre__chip--on": p.value === t.value }]),
207
+ "aria-pressed": p.value === t.value,
208
+ onClick: ($) => i(T)(t.value)
209
+ }, [
210
+ C(a(t.value) + " ", 1),
211
+ o("span", Fe, a(t.count), 1)
212
+ ], 10, Te))), 128)),
213
+ E.value.unsetCount ? (s(), l("button", {
214
+ key: 0,
215
+ type: "button",
216
+ class: g(["centre__chip centre__chip--pill centre__chip--dashed", { "centre__chip--on": p.value === v }]),
217
+ "aria-pressed": p.value === v,
218
+ onClick: e[5] || (e[5] = (t) => i(T)(v))
219
+ }, [
220
+ C(a(je) + " "),
221
+ o("span", Ie, a(E.value.unsetCount), 1)
222
+ ], 10, Ue)) : A("", !0)
223
+ ])
224
+ ]),
225
+ Y.value ? (s(), l("button", {
226
+ key: 0,
227
+ type: "button",
228
+ class: "centre__clear fm-typo-en-body-sm-600",
229
+ onClick: V
230
+ }, " Clear filters ")) : A("", !0)
231
+ ])) : A("", !0),
232
+ i(d).entries.value === null ? (s(), l("p", Ve, "Loading…")) : i(d).loadError.value ? (s(), w(M, {
233
+ key: 2,
234
+ icon: "error_outline",
235
+ tone: "error",
236
+ title: "Could not load the component library",
237
+ message: i(d).loadError.value,
238
+ "action-label": "Try again",
239
+ onAction: e[6] || (e[6] = (t) => i(d).load(!0))
240
+ }, null, 8, ["message"])) : i(d).unpublished.value ? (s(), w(M, {
241
+ key: 3,
242
+ icon: "widgets",
243
+ title: "No component library has been published yet",
244
+ 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."
245
+ })) : U.value ? F.value.length ? (s(), l("div", ze, [
246
+ (s(!0), l(k, null, x(Q.value, (t) => (s(), l("section", {
247
+ key: t.group ?? "__ungrouped",
248
+ class: "centre__section"
249
+ }, [
250
+ o("header", Ge, [
251
+ o("h3", He, a(t.group ?? G), 1),
252
+ o("span", We, a(i(re)(t)), 1)
253
+ ]),
254
+ (s(!0), l(k, null, x(t.components, ($) => (s(), w(fe, {
255
+ key: $.key,
256
+ component: $,
257
+ "preview-document": i(d).previewDocument.value,
258
+ query: i(b).query,
259
+ "show-count": t.components.length > 1
260
+ }, null, 8, ["component", "preview-document", "query", "show-count"]))), 128))
261
+ ]))), 128))
262
+ ])) : (s(), w(M, {
263
+ key: 5,
264
+ icon: "search_off",
265
+ title: "No module matches these filters",
266
+ "action-label": "Clear filters",
267
+ onAction: V
268
+ })) : (s(), w(M, {
269
+ key: 4,
270
+ icon: "widgets",
271
+ title: "The component library is empty",
272
+ message: "It has been published, but holds no modules. Nothing here is available to put on a page yet."
273
+ }))
274
+ ], 64))
275
+ ])
276
+ ])
277
+ ]);
278
+ };
279
+ }
280
+ }), Ze = /* @__PURE__ */ K(Ke, [["__scopeId", "data-v-cc7f6ab8"]]);
281
+ export {
282
+ Ze as default
283
+ };