@feedmepos/mf-miniprogram-v2 0.2.8-dev.2 → 0.2.8-dev.3

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 (30) hide show
  1. package/dist/{App-C8Vn8LvE.js → App-h0NGA3Bx.js} +267 -277
  2. package/dist/AppTemplatePicker.vue_vue_type_script_setup_true_lang-BeNabALJ.js +270 -0
  3. package/dist/{BrandFontPicker-JHyoGusq.js → BrandFontPicker-sTKNoOX3.js} +1 -1
  4. package/dist/{BrandKitView-Dlt_ifI0.js → BrandKitView-DpeuJ5Mj.js} +2 -2
  5. package/dist/{ControlPlaneView-qDA8RgiR.js → ControlPlaneView-7i6SXbEK.js} +5077 -4831
  6. package/dist/{EcosystemView-XP9IZ9wn.js → EcosystemView-BUG7Dp_e.js} +5 -5
  7. package/dist/MobileProjectsView-DP_MBdDX.js +400 -0
  8. package/dist/ModuleCenterView-DdExY27I.js +165 -0
  9. package/dist/{ModuleDetailView-CSfMF0Uo.js → ModuleDetailView-2ZG2PgWE.js} +1 -1
  10. package/dist/{PagesView-DzDqCd8N.js → PagesView-CNnihrLK.js} +2 -2
  11. package/dist/{PlatformUnavailableView-CdHjkolw.js → PlatformUnavailableView-ChSD6P3O.js} +1 -1
  12. package/dist/{PortalSettingsView-Df5jChmi.js → PortalSettingsView-tEQ8--VB.js} +9 -9
  13. package/dist/TemplateCenterView-BjuZj_3I.js +515 -0
  14. package/dist/{WorkspaceEntryView-DQkYJWdf.js → WorkspaceEntryView-aesHR5VT.js} +2 -2
  15. package/dist/{adminAccess-D2K-L-Vt.js → adminAccess-Bud1ltTs.js} +2 -2
  16. package/dist/app.js +12 -12
  17. package/dist/{controlPlane-sXaC6pAh.js → controlPlane--Q2ulw38.js} +7 -7
  18. package/dist/package.json +1 -1
  19. package/dist/{portalContext-DV-6uUwp.js → portalContext-CzdVaxBH.js} +2 -2
  20. package/dist/portalNavigation-L5VwKlps.js +42 -0
  21. package/dist/{routes-CeuodIgg.js → routes-CJa85dEy.js} +14 -3
  22. package/dist/style.css +1 -1
  23. package/dist/{useBrandKit-CXLIXo5j.js → useBrandKit-Cw3bBugv.js} +1 -1
  24. package/dist/{useModuleCatalog-Cep-pzWO.js → useModuleCatalog-n2zRBLFf.js} +2 -2
  25. package/package.json +1 -1
  26. package/dist/AppTemplatePicker.vue_vue_type_script_setup_true_lang-LE_aKvfg.js +0 -198
  27. package/dist/MobileProjectsView-aAyHV5G-.js +0 -333
  28. package/dist/ModuleCenterView-C6mCPATr.js +0 -147
  29. package/dist/TemplateCenterView-DrWImUYO.js +0 -425
  30. package/dist/portalNavigation-C29ihtq_.js +0 -38
@@ -0,0 +1,165 @@
1
+ import { defineComponent as N, openBlock as o, createElementBlock as l, createElementVNode as s, toDisplayString as u, createCommentVNode as q, ref as V, watch as R, computed as h, onMounted as z, resolveComponent as x, createVNode as v, unref as c, Fragment as C, renderList as $, normalizeClass as D, createBlock as k, withCtx as G } from "vue";
2
+ import { useRoute as K, useRouter as O } from "vue-router";
3
+ import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ import { u as P, c as U, f as j, _ as b, t as H } from "./useModuleCatalog-n2zRBLFf.js";
5
+ const J = { class: "card" }, Q = { class: "card__head" }, W = { class: "card__name fm-typo-en-body-md-600 text-portal-text-primary" }, X = { class: "card__version fm-typo-en-body-sm-400 text-portal-text-muted" }, Y = { class: "card__description fm-typo-en-body-sm-400 text-portal-text-muted" }, Z = { class: "card__tags" }, ee = { class: "card__tag card__tag--tier fm-typo-en-body-sm-600" }, te = {
6
+ key: 0,
7
+ class: "card__tag card__tag--slot fm-typo-en-body-sm-400"
8
+ }, oe = /* @__PURE__ */ N({
9
+ __name: "ModuleCard",
10
+ props: {
11
+ entry: {}
12
+ },
13
+ setup(i) {
14
+ return (r, m) => (o(), l("article", J, [
15
+ s("header", Q, [
16
+ s("h3", W, u(i.entry.name), 1),
17
+ s("span", X, u(i.entry.version), 1)
18
+ ]),
19
+ s("p", Y, u(i.entry.description || i.entry.id), 1),
20
+ s("footer", Z, [
21
+ s("span", ee, u(i.entry.category), 1),
22
+ i.entry.slot ? (o(), l("span", te, u(i.entry.slot), 1)) : q("", !0)
23
+ ])
24
+ ]));
25
+ }
26
+ }), ne = /* @__PURE__ */ B(oe, [["__scopeId", "data-v-2fbfd7b3"]]), se = { class: "shell" }, le = { class: "centre" }, re = { class: "centre__inner" }, ae = { class: "centre__head" }, ie = {
27
+ key: 0,
28
+ class: "centre__filters"
29
+ }, de = { class: "centre__facet-label fm-typo-en-body-sm-600 text-portal-text-muted" }, ce = { class: "centre__chips" }, ue = ["aria-pressed", "onClick"], me = {
30
+ key: 1,
31
+ class: "centre__note fm-typo-en-body-md-400"
32
+ }, _e = {
33
+ key: 6,
34
+ class: "centre__grid"
35
+ }, pe = /* @__PURE__ */ N({
36
+ __name: "ModuleCenterView",
37
+ setup(i) {
38
+ const r = P(), m = K(), L = O();
39
+ function g(t) {
40
+ return t == null ? [] : (Array.isArray(t) ? t : [t]).filter((n) => n != null);
41
+ }
42
+ const _ = V(g(m.query.q)[0] ?? ""), d = V([
43
+ ...g(m.query.tier).map((t) => ({ kind: "tier", value: t })),
44
+ ...g(m.query.slot).map((t) => ({ kind: "slot", value: t }))
45
+ ]);
46
+ R(
47
+ [_, d],
48
+ ([t, n]) => {
49
+ const a = { ...m.query };
50
+ t.trim() ? a.q = t : delete a.q;
51
+ const y = n.filter((e) => e.kind === "tier").map((e) => e.value), f = n.filter((e) => e.kind === "slot").map((e) => e.value);
52
+ y.length ? a.tier = y : delete a.tier, f.length ? a.slot = f : delete a.slot, L.replace({ query: a });
53
+ },
54
+ { deep: !0 }
55
+ );
56
+ const S = h(() => U(r.entries.value ?? [])), M = h(() => j(r.entries.value ?? [], _.value, d.value)), A = h(() => _.value.trim().length > 0 || d.value.length > 0), w = h(() => {
57
+ var t;
58
+ return (((t = r.entries.value) == null ? void 0 : t.length) ?? 0) > 0;
59
+ }), E = {
60
+ tier: "Type",
61
+ slot: "Slot"
62
+ };
63
+ function F(t) {
64
+ return d.value.some((n) => n.kind === t.kind && n.value === t.value);
65
+ }
66
+ function I(t) {
67
+ d.value = H(d.value, t);
68
+ }
69
+ function T() {
70
+ _.value = "", d.value = [];
71
+ }
72
+ return z(() => r.load()), (t, n) => {
73
+ const a = x("FmButton"), y = x("FmTextField"), f = x("RouterLink");
74
+ return o(), l("div", se, [
75
+ s("div", le, [
76
+ s("div", re, [
77
+ s("header", ae, [
78
+ n[3] || (n[3] = s("div", null, [
79
+ s("h2", { class: "centre__title fm-typo-en-title-sm-600 text-portal-text-primary" }, "Module library"),
80
+ s("p", { class: "centre__subtitle fm-typo-en-body-md-400 text-portal-text-muted" }, " Modules the agent can put on a page. Published from the platform, not from your app. ")
81
+ ], -1)),
82
+ v(a, {
83
+ size: "md",
84
+ variant: "tertiary",
85
+ icon: "refresh",
86
+ onClick: n[0] || (n[0] = (e) => c(r).load(!0))
87
+ })
88
+ ]),
89
+ w.value ? (o(), l("div", ie, [
90
+ v(y, {
91
+ modelValue: _.value,
92
+ "onUpdate:modelValue": n[1] || (n[1] = (e) => _.value = e),
93
+ label: "Search",
94
+ placeholder: "name, slot, or label"
95
+ }, null, 8, ["modelValue"]),
96
+ (o(!0), l(C, null, $(S.value, (e) => (o(), l("div", {
97
+ key: e.kind,
98
+ class: "centre__facet"
99
+ }, [
100
+ s("span", de, u(E[e.kind]), 1),
101
+ s("div", ce, [
102
+ (o(!0), l(C, null, $(e.values, (p) => (o(), l("button", {
103
+ key: p,
104
+ type: "button",
105
+ class: D(["centre__chip fm-typo-en-body-sm-400", { "centre__chip--on": F({ kind: e.kind, value: p }) }]),
106
+ "aria-pressed": F({ kind: e.kind, value: p }),
107
+ onClick: (ye) => I({ kind: e.kind, value: p })
108
+ }, u(p), 11, ue))), 128))
109
+ ])
110
+ ]))), 128)),
111
+ A.value ? (o(), l("button", {
112
+ key: 0,
113
+ type: "button",
114
+ class: "centre__clear fm-typo-en-body-sm-600",
115
+ onClick: T
116
+ }, " Clear filters ")) : q("", !0)
117
+ ])) : q("", !0),
118
+ c(r).entries.value === null ? (o(), l("p", me, "Loading…")) : c(r).loadError.value ? (o(), k(b, {
119
+ key: 2,
120
+ icon: "error_outline",
121
+ tone: "error",
122
+ title: "Could not load the module library",
123
+ message: c(r).loadError.value,
124
+ "action-label": "Try again",
125
+ onAction: n[2] || (n[2] = (e) => c(r).load(!0))
126
+ }, null, 8, ["message"])) : c(r).unpublished.value ? (o(), k(b, {
127
+ key: 3,
128
+ icon: "widgets",
129
+ title: "No module library has been published yet",
130
+ message: "Modules are published from the platform, separately from merging them. Once one is published it appears here, and every workspace started afterwards receives it."
131
+ })) : w.value ? M.value.length ? (o(), l("ul", _e, [
132
+ (o(!0), l(C, null, $(M.value, (e) => (o(), l("li", {
133
+ key: e.id
134
+ }, [
135
+ v(f, {
136
+ class: "centre__link",
137
+ to: { name: "miniprogram-v2-module-detail", params: { name: e.name }, query: c(m).query }
138
+ }, {
139
+ default: G(() => [
140
+ v(ne, { entry: e }, null, 8, ["entry"])
141
+ ]),
142
+ _: 2
143
+ }, 1032, ["to"])
144
+ ]))), 128))
145
+ ])) : (o(), k(b, {
146
+ key: 5,
147
+ icon: "search_off",
148
+ title: "No module matches these filters",
149
+ "action-label": "Clear filters",
150
+ onAction: T
151
+ })) : (o(), k(b, {
152
+ key: 4,
153
+ icon: "widgets",
154
+ title: "The module library is empty",
155
+ message: "It has been published, but holds no modules. Nothing here is available to put on a page yet."
156
+ }))
157
+ ])
158
+ ])
159
+ ]);
160
+ };
161
+ }
162
+ }), be = /* @__PURE__ */ B(pe, [["__scopeId", "data-v-c2239a32"]]);
163
+ export {
164
+ be as default
165
+ };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as C, ref as M, computed as u, watch as T, resolveComponent as g, openBlock as n, createElementBlock as l, createElementVNode as e, toDisplayString as i, createCommentVNode as _, Fragment as I, renderList as S, createVNode as k, onMounted as B, unref as d, withCtx as L, createBlock as v } from "vue";
2
2
  import { useRoute as N, useRouter as P } from "vue-router";
3
- import { m as q, i as A, u as F, _ as w } from "./useModuleCatalog-Cep-pzWO.js";
3
+ import { m as q, i as A, u as F, _ as w } from "./useModuleCatalog-n2zRBLFf.js";
4
4
  import { useDialog as V } from "@feedmepos/ui-library";
5
5
  import { _ as E } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
6
  const R = { class: "detail" }, j = { class: "detail__head" }, z = { class: "detail__name fm-typo-en-title-sm-600 text-portal-text-primary" }, K = { class: "detail__version fm-typo-en-body-md-400 text-portal-text-muted" }, O = {
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as p, resolveComponent as i, openBlock as l, createElementBlock as m, createElementVNode as o, createVNode as r, unref as t, withCtx as u, createTextVNode as c } from "vue";
2
2
  import { useRoute as d } from "vue-router";
3
- import { u as g } from "./portalContext-DV-6uUwp.js";
4
- import { w as f } from "./portalNavigation-C29ihtq_.js";
3
+ import { u as g } from "./portalContext-CzdVaxBH.js";
4
+ import { w as f } from "./portalNavigation-L5VwKlps.js";
5
5
  import { P as k } from "./PortalIcon-DO0VrIoY.js";
6
6
  const w = { class: "portal-page" }, y = { class: "portal-page-inner" }, b = { class: "portal-section portal-empty" }, E = /* @__PURE__ */ p({
7
7
  __name: "PagesView",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as i, computed as p, resolveComponent as m, openBlock as c, createElementBlock as u, createElementVNode as e, toDisplayString as a, unref as n, createVNode as r, withCtx as d, createTextVNode as _ } from "vue";
2
2
  import { useRoute as g } from "vue-router";
3
3
  import { P as f } from "./PortalIcon-DO0VrIoY.js";
4
- import { p as k } from "./portalNavigation-C29ihtq_.js";
4
+ import { p as k } from "./portalNavigation-L5VwKlps.js";
5
5
  const y = { class: "portal-page" }, b = { class: "portal-page-inner" }, v = { class: "portal-page-heading" }, h = { class: "portal-section portal-empty" }, P = /* @__PURE__ */ i({
6
6
  __name: "PlatformUnavailableView",
7
7
  setup(x) {
@@ -1,10 +1,10 @@
1
- import { defineComponent as k, computed as p, ref as l, onMounted as P, onScopeDispose as S, resolveComponent as x, openBlock as o, createElementBlock as n, createElementVNode as s, toDisplayString as d, createCommentVNode as h, Fragment as I, createVNode as A, unref as M } from "vue";
1
+ import { defineComponent as k, computed as p, ref as i, onMounted as P, onScopeDispose as S, resolveComponent as x, openBlock as o, createElementBlock as n, createElementVNode as s, toDisplayString as d, createCommentVNode as h, Fragment as I, createVNode as A, unref as M } from "vue";
2
2
  import { useRoute as N } from "vue-router";
3
3
  import { e as _, a as $ } from "./index-CIJWcl_6.js";
4
- import { l as B, e as E } from "./controlPlane-sXaC6pAh.js";
4
+ import { m as B, e as E } from "./controlPlane--Q2ulw38.js";
5
5
  import { useCoreStore as F } from "@feedmepos/mf-common";
6
- import { u as U } from "./portalContext-DV-6uUwp.js";
7
- import { l as V } from "./portalNavigation-C29ihtq_.js";
6
+ import { u as U } from "./portalContext-CzdVaxBH.js";
7
+ import { b as V } from "./portalNavigation-L5VwKlps.js";
8
8
  import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
9
  const L = { class: "portal-page" }, R = { class: "portal-page-inner settings-page" }, T = { class: "portal-page-heading" }, D = ["href"], H = {
10
10
  key: 0,
@@ -26,26 +26,26 @@ const L = { class: "portal-page" }, R = { class: "portal-page-inner settings-pag
26
26
  _("fmmf:dev") === "dev" ? "https://portal.feedmedev.cc" : "https://portal.feedme.cc"
27
27
  ).href;
28
28
  }
29
- ), m = l(null), g = l(!0), r = l(null), v = l(!1), f = $(_("fmmf:dev")).apiOrigin, C = p(() => `${f}/metadata/${a.businessId.value}/pwa-512x512.png`), b = p(() => {
29
+ ), m = i(null), g = i(!0), r = i(null), v = i(!1), f = $(_("fmmf:dev")).apiOrigin, C = p(() => `${f}/metadata/${a.businessId.value}/pwa-512x512.png`), b = p(() => {
30
30
  var t;
31
31
  return (t = B()) == null ? void 0 : t.thumbnail;
32
- }), i = new AbortController();
32
+ }), l = new AbortController();
33
33
  return P(async () => {
34
34
  var t;
35
35
  try {
36
36
  const e = await fetch(`${f}/metadata/${a.businessId.value}/config`, {
37
- signal: AbortSignal.any([i.signal, AbortSignal.timeout(15e3)])
37
+ signal: AbortSignal.any([l.signal, AbortSignal.timeout(15e3)])
38
38
  });
39
39
  if (e.status === 404) return;
40
40
  if (!e.ok) throw new Error(`Could not load app assets (HTTP ${e.status})`);
41
41
  const u = await e.json();
42
42
  m.value = ((t = u.pwaConfig) == null ? void 0 : t.name) ?? null;
43
43
  } catch (e) {
44
- i.signal.aborted || (r.value = E(e));
44
+ l.signal.aborted || (r.value = E(e));
45
45
  } finally {
46
46
  g.value = !1;
47
47
  }
48
- }), S(() => i.abort()), (t, e) => {
48
+ }), S(() => l.abort()), (t, e) => {
49
49
  const u = x("FmIcon");
50
50
  return o(), n("div", L, [
51
51
  s("div", R, [