@feedmepos/mf-miniprogram-v2 0.2.8-dev.7 → 0.2.8-dev.9

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 (25) hide show
  1. package/dist/{App-BXXNMcyn.js → App-Ck_p8Anr.js} +256 -253
  2. package/dist/{ControlPlaneView-DzOE4Rp5.js → ControlPlaneView-CqTLqklv.js} +8158 -7868
  3. package/dist/{EcosystemView-CseWybDf.js → EcosystemView-Bt-UdWfQ.js} +3 -3
  4. package/dist/{MobileProjectDialog-CwXuQgpj.js → MobileProjectDialog-DAYQdrCY.js} +247 -236
  5. package/dist/{MobileProjectsView-CmL6GQYo.js → MobileProjectsView-z7GucfWB.js} +63 -60
  6. package/dist/ModuleCenterView-t8rhd419.js +283 -0
  7. package/dist/ModuleDetailView-C2TJToR7.js +296 -0
  8. package/dist/{PagesView-3ETr8RbI.js → PagesView-bXfOrylf.js} +2 -2
  9. package/dist/{PlatformUnavailableView-ChSD6P3O.js → PlatformUnavailableView-CkKpF-bi.js} +1 -1
  10. package/dist/{PortalSettingsView-DAmx9m4y.js → PortalSettingsView-D_2Gd3-Y.js} +2 -2
  11. package/dist/{TemplateCenterView-D0Gn07_x.js → TemplateCenterView-DEN51nfK.js} +2 -2
  12. package/dist/{WorkspaceEntryView-CC1214ig.js → WorkspaceEntryView-SLqO3Mi4.js} +2 -2
  13. package/dist/app.js +14 -14
  14. package/dist/{adminAccess-B4NYKH6x.js → localPreference-Do4VKtxT.js} +34 -34
  15. package/dist/package.json +1 -1
  16. package/dist/{portalContext-RYc53ma3.js → portalContext-BeKN8Bcx.js} +1 -1
  17. package/dist/portalNavigation-DDMi3QTt.js +43 -0
  18. package/dist/{routes-BvzMt5vp.js → routes-B9oMJsaM.js} +2 -0
  19. package/dist/style.css +1 -1
  20. package/dist/useModuleCatalog-Daw8KA--.js +147 -0
  21. package/package.json +1 -1
  22. package/dist/ModuleCenterView-E6ne4DiL.js +0 -165
  23. package/dist/ModuleDetailView-bTcegMeT.js +0 -189
  24. package/dist/portalNavigation-L5VwKlps.js +0 -42
  25. package/dist/useModuleCatalog-D73n52U3.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-BvzMt5vp.js";
5
- import { c as O, e as U } from "./controlPlane-DR5ykj4d.js";
6
- import { u as Y } from "./portalContext-RYc53ma3.js";
7
- import { w as d } from "./portalNavigation-L5VwKlps.js";
8
- import { p as G, M as H } from "./MobileProjectDialog-CwXuQgpj.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-DR5ykj4d.js";
6
+ import { u as G } from "./portalContext-BeKN8Bcx.js";
7
+ import { w as d } from "./portalNavigation-DDMi3QTt.js";
8
+ import { p as H, M as J } from "./MobileProjectDialog-DAYQdrCY.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
  }
@@ -53,22 +53,25 @@ const K = { class: "portal-page" }, Q = { class: "portal-page-inner" }, W = { cl
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(d(e.projectId, "workspace", r.query, { setup: !0, ...b() }));
64
64
  }
65
65
  }
66
66
  });
67
67
  }
68
+ function b() {
69
+ return typeof r.query.library == "string" ? { library: r.query.library } : {};
70
+ }
68
71
  function N(t) {
69
72
  return new Intl.DateTimeFormat(void 0, { dateStyle: "medium", timeStyle: "short" }).format(new Date(t));
70
73
  }
71
- const P = C(() => [
74
+ const P = S(() => [
72
75
  {
73
76
  id: "project",
74
77
  header: () => "Project",
@@ -90,9 +93,9 @@ const K = { class: "portal-page" }, Q = { class: "portal-page-inner" }, W = { cl
90
93
  size: 130,
91
94
  enableSorting: !1,
92
95
  cell: (t) => o(
93
- k,
96
+ x,
94
97
  { variant: t.row.original.provisioningStatus === "failed" ? "error" : "neutral", size: "sm" },
95
- () => G(t.row.original.provisioningStatus)
98
+ () => H(t.row.original.provisioningStatus)
96
99
  )
97
100
  },
98
101
  {
@@ -116,7 +119,7 @@ const K = { class: "portal-page" }, Q = { class: "portal-page-inner" }, W = { cl
116
119
  // "Live project" in a column headed Live said the word twice, and cost the
117
120
  // width that made the line below it wrap.
118
121
  o(
119
- k,
122
+ x,
120
123
  { variant: e.isLive ? "success" : "neutral", size: "sm" },
121
124
  () => e.isLive ? "Live" : "Not live"
122
125
  ),
@@ -125,7 +128,7 @@ const K = { class: "portal-page" }, Q = { class: "portal-page-inner" }, W = { cl
125
128
  // This endpoint always sends a boolean, so that is a contract-level
126
129
  // possibility rather than one a merchant meets.
127
130
  e.hasUnpublishedRelease === !0 ? o(
128
- k,
131
+ x,
129
132
  { variant: "warning", size: "sm", title: "A release is built and waiting to be published" },
130
133
  () => "Unpublished"
131
134
  ) : null
@@ -151,82 +154,82 @@ const K = { class: "portal-page" }, Q = { class: "portal-page-inner" }, W = { cl
151
154
  icon: "deployed_code",
152
155
  variant: "tertiary",
153
156
  title: "View releases",
154
- onClick: j(
155
- () => i.push(d(e.projectId, "releases", s.query)),
157
+ onClick: _(
158
+ () => i.push(d(e.projectId, "releases", r.query)),
156
159
  ["stop"]
157
160
  )
158
161
  }) : null,
159
162
  o(m, {
160
163
  label: "Rename",
161
164
  variant: "tertiary",
162
- onClick: j(() => u(e), ["stop"])
165
+ onClick: _(() => u(e), ["stop"])
163
166
  }),
164
167
  o(m, {
165
168
  label: e.provisioningStatus === "ready" ? "Open editor" : "Continue setup",
166
169
  variant: "secondary",
167
- onClick: j(
168
- () => i.push(d(e.projectId, "workspace", s.query)),
170
+ onClick: _(
171
+ () => i.push(d(e.projectId, "workspace", r.query, b())),
169
172
  ["stop"]
170
173
  )
171
174
  })
172
175
  ]);
173
176
  }
174
177
  }
175
- ]), B = C(() => !p.value && l.value.length > 0);
178
+ ]), B = S(() => !p.value && l.value.length > 0);
176
179
  return R(() => {
177
- if (g(), s.query.create === "1") {
178
- const { create: t, ...e } = s.query;
180
+ if (g(), r.query.create === "1") {
181
+ const { create: t, ...e } = r.query;
179
182
  i.replace({ query: e }), u();
180
183
  }
181
184
  }), 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))
185
+ const y = I("FmButton"), F = I("FmTable");
186
+ return a(), n("div", Q, [
187
+ s("div", W, [
188
+ s("header", X, [
189
+ s("div", null, [
190
+ e[4] || (e[4] = s("p", { class: "portal-eyebrow" }, "Mobile Ordering", -1)),
191
+ s("h1", null, [
192
+ e[3] || (e[3] = M("Projects ", -1)),
193
+ p.value ? z("", !0) : (a(), n("span", Z, q(l.value.length), 1))
191
194
  ])
192
195
  ]),
193
- B.value ? (r(), q(b, {
196
+ B.value ? (a(), D(y, {
194
197
  key: 0,
195
198
  label: "New project",
196
199
  icon: "add",
197
- onClick: e[0] || (e[0] = (y) => u())
200
+ onClick: e[0] || (e[0] = (w) => u())
198
201
  })) : z("", !0)
199
202
  ]),
200
- c.value ? (r(), n("p", Z, [
201
- I(M(c.value) + " ", 1),
202
- _(b, {
203
+ c.value ? (a(), n("p", ee, [
204
+ M(q(c.value) + " ", 1),
205
+ h(y, {
203
206
  label: "Retry",
204
207
  variant: "tertiary",
205
208
  onClick: g
206
209
  })
207
- ])) : p.value ? (r(), n("p", ee, "Loading projects…")) : l.value.length ? (r(), n("section", oe, [
208
- _(F, {
210
+ ])) : p.value ? (a(), n("p", te, "Loading projects…")) : l.value.length ? (a(), n("section", re, [
211
+ h(F, {
209
212
  "column-defs": P.value,
210
213
  "row-data": l.value,
211
214
  "page-size": l.value.length,
212
215
  "hide-footer": "",
213
216
  "pin-header-row": "",
214
- onRowClick: e[2] || (e[2] = (y) => h(i).push(h(d)(y.original.projectId, "workspace", h(s).query)))
217
+ onRowClick: e[2] || (e[2] = (w) => k(i).push(k(d)(w.original.projectId, "workspace", k(r).query, b())))
215
218
  }, 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, {
219
+ ])) : (a(), n("section", oe, [
220
+ e[5] || (e[5] = s("h2", null, "Your first Mobile project", -1)),
221
+ e[6] || (e[6] = s("p", null, "Create an app from a template to start editing.", -1)),
222
+ h(y, {
220
223
  label: "New project",
221
224
  icon: "add",
222
- onClick: e[1] || (e[1] = (y) => u())
225
+ onClick: e[1] || (e[1] = (w) => u())
223
226
  })
224
227
  ]))
225
228
  ])
226
229
  ]);
227
230
  };
228
231
  }
229
- }), fe = /* @__PURE__ */ J(re, [["__scopeId", "data-v-66c90eec"]]);
232
+ }), ge = /* @__PURE__ */ K(ae, [["__scopeId", "data-v-cd9bd585"]]);
230
233
  export {
231
- fe as default
234
+ ge as default
232
235
  };
@@ -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-Daw8KA--.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
+ };