@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,7 +1,29 @@
1
- import { a as u } from "./routes-CK4kOaoY.js";
1
+ import { a as u } from "./routes-B9oMJsaM.js";
2
2
  import { ref as o } from "vue";
3
- import { c as a } from "./controlPlane-DR5ykj4d.js";
4
- function l(e, t) {
3
+ import { c as a } from "./controlPlane-DuIuUbyk.js";
4
+ let r = null;
5
+ function i() {
6
+ return r || (r = a(u.adminWhoami()).catch(() => ({
7
+ isAdmin: !1,
8
+ isFeedMeStaff: !1
9
+ }))), r;
10
+ }
11
+ function f() {
12
+ return i().then((e) => e.isAdmin);
13
+ }
14
+ function l() {
15
+ const e = o(!1);
16
+ return f().then((t) => {
17
+ e.value = t;
18
+ }), e;
19
+ }
20
+ function w() {
21
+ const e = o(!1);
22
+ return i().then((t) => {
23
+ e.value = t.isFeedMeStaff === !0;
24
+ }), e;
25
+ }
26
+ function h(e, t) {
5
27
  if (typeof window > "u") return t;
6
28
  try {
7
29
  const n = window.localStorage.getItem(e);
@@ -10,7 +32,7 @@ function l(e, t) {
10
32
  return t;
11
33
  }
12
34
  }
13
- function w(e, t) {
35
+ function S(e, t) {
14
36
  if (typeof window > "u") return t;
15
37
  try {
16
38
  const n = Number(window.localStorage.getItem(e));
@@ -19,43 +41,21 @@ function w(e, t) {
19
41
  return t;
20
42
  }
21
43
  }
22
- function f(e, t) {
44
+ function d(e, t) {
23
45
  if (!(typeof window > "u"))
24
46
  try {
25
47
  window.localStorage.setItem(e, t);
26
48
  } catch {
27
49
  }
28
50
  }
29
- function h(e, t) {
30
- f(e, t ? "1" : "0");
31
- }
32
- let r = null;
33
- function i() {
34
- return r || (r = a(u.adminWhoami()).catch(() => ({
35
- isAdmin: !1,
36
- isFeedMeStaff: !1
37
- }))), r;
38
- }
39
- function d() {
40
- return i().then((e) => e.isAdmin);
41
- }
42
- function S() {
43
- const e = o(!1);
44
- return d().then((t) => {
45
- e.value = t;
46
- }), e;
47
- }
48
- function p() {
49
- const e = o(!1);
50
- return i().then((t) => {
51
- e.value = t.isFeedMeStaff === !0;
52
- }), e;
51
+ function p(e, t) {
52
+ d(e, t ? "1" : "0");
53
53
  }
54
54
  export {
55
- p as a,
56
- w as b,
57
- f as c,
58
- l as r,
59
- S as u,
60
- h as w
55
+ w as a,
56
+ S as b,
57
+ d as c,
58
+ h as r,
59
+ l as u,
60
+ p as w
61
61
  };
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-miniprogram-v2",
3
- "version": "0.2.8-dev.8",
3
+ "version": "0.2.8",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -1,6 +1,6 @@
1
- import { a as b } from "./routes-CK4kOaoY.js";
1
+ import { a as b } from "./routes-B9oMJsaM.js";
2
2
  import { useCoreStore as d } from "@feedmepos/mf-common";
3
- import { c as g, e as h } from "./controlPlane-DR5ykj4d.js";
3
+ import { c as g, e as h } from "./controlPlane-DuIuUbyk.js";
4
4
  import { provide as y, computed as f, ref as c, watch as C, onScopeDispose as w, inject as x } from "vue";
5
5
  function P() {
6
6
  const e = d(), r = f(() => {
@@ -0,0 +1,43 @@
1
+ function i(r) {
2
+ return r === "releases" || r === "sessions" ? r : "workspace";
3
+ }
4
+ function o(r) {
5
+ const { view: t, tpl: n, setup: e, library: a, returnProjectId: p, ...s } = r;
6
+ return s;
7
+ }
8
+ function c(r, t, n, e = {}) {
9
+ return {
10
+ name: "miniprogram-v2-project",
11
+ params: { projectId: r, view: t === "workspace" ? void 0 : t },
12
+ query: {
13
+ ...o(n),
14
+ ...e.templateEditing ? { tpl: "1" } : {},
15
+ ...e.setup ? { setup: "1" } : {},
16
+ ...e.library ? { library: e.library } : {}
17
+ }
18
+ };
19
+ }
20
+ function u(r, t, n) {
21
+ if (!t || !n || t === n || r.name !== "miniprogram-v2-project" || r.query.tpl === "1") return null;
22
+ const e = o(r.query);
23
+ return typeof e.businessId == "string" && (e.businessId = n), { name: "miniprogram-v2-mobile-projects", query: e };
24
+ }
25
+ function l(r, t) {
26
+ return t ? c(String(r.params.projectId), i(r.params.view), r.query) : { name: "miniprogram-v2-mobile-projects", query: o(r.query) };
27
+ }
28
+ function m(r, t = "settings") {
29
+ const n = new URLSearchParams();
30
+ for (const e of ["businessId", "country", "restaurantId"]) {
31
+ const a = r[e];
32
+ typeof a == "string" && n.set(e, a);
33
+ }
34
+ return `/brand/${t}${n.size ? `?${n}` : ""}`;
35
+ }
36
+ export {
37
+ i as a,
38
+ l as b,
39
+ u as e,
40
+ m as l,
41
+ o as p,
42
+ c as w
43
+ };
@@ -1,10 +1,6 @@
1
1
  const t = (e, s) => `/api/businesses/${e}/projects/${s}`, i = {
2
2
  projects: (e) => `/api/businesses/${e}/projects`,
3
3
  portalContext: (e) => `/api/businesses/${e}/portal-context`,
4
- /** Where this business's table QR scans open ('app' | 'v3' | default). */
5
- qrRouting: (e) => `/api/businesses/${e}/qr-routing`,
6
- /** Public, machine-read list of every business's QR routing, for the feedme.cc redirector. */
7
- qrRoutingList: () => "/api/public/qr-routing",
8
4
  project: (e, s) => t(e, s),
9
5
  provision: (e, s) => `${t(e, s)}/provision`,
10
6
  refreshSlug: (e, s) => `${t(e, s)}/refresh-slug`,
@@ -38,6 +34,8 @@ const t = (e, s) => `/api/businesses/${e}/projects/${s}`, i = {
38
34
  * verified checkpoint and, once confirmed, opens a PR against this repo. */
39
35
  publishAsTemplate: (e, s) => `${t(e, s)}/publish-as-template`,
40
36
  publishRelease: (e, s, a) => `${i.releases(e, s)}/${a}/publish`,
37
+ /** Delivers a release to the project's native apps over the air; the web is untouched. */
38
+ publishReleaseToApp: (e, s, a) => `${i.releases(e, s)}/${a}/publish-app`,
41
39
  releasePreviewUrl: (e, s, a) => `${i.releases(e, s)}/${a}/preview-url`,
42
40
  /** Turns "set this release live once its build succeeds" on or off. */
43
41
  releaseAutoPublish: (e, s, a) => `${i.releases(e, s)}/${a}/auto-publish`,