@feedmepos/mf-miniprogram-v2 0.2.2-dev.22 → 0.2.2-dev.24
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-Ifw6j-OX.js → App-BVQ9oPjV.js} +2 -2
- package/dist/{ControlPlaneView-DsXDkx9a.js → ControlPlaneView-BPaHROu_.js} +3 -3
- package/dist/{EcosystemView-CBEL5PT2.js → EcosystemView-Drggj4cB.js} +2 -2
- package/dist/{MobileProjectsView-C5wIOuCu.js → MobileProjectsView-DaFYj3UE.js} +2 -2
- package/dist/{ModuleCenterView-DI6Pakkr.js → ModuleCenterView-BI0Vbkcu.js} +1 -1
- package/dist/{ModuleDetailView-DteTTb-3.js → ModuleDetailView-DKmc4Hp2.js} +1 -1
- package/dist/{PagesView-BYzldeqE.js → PagesView-B9YEpCbi.js} +1 -1
- package/dist/{PortalSettingsView-Bl4z9cFG.js → PortalSettingsView-C3uVMGH5.js} +1 -1
- package/dist/TemplateCenterView-DZ3jjV_i.js +402 -0
- package/dist/{WorkspaceEntryView-BIumdrty.js → WorkspaceEntryView-C5SWhNI5.js} +1 -1
- package/dist/{adminAccess-NgYNNa6s.js → adminAccess-D8Cx7BcO.js} +1 -1
- package/dist/app.js +10 -10
- package/dist/package.json +1 -1
- package/dist/{portalContext-BFTX5VVx.js → portalContext-Bhp7NA0c.js} +1 -1
- package/dist/routes-DPGrYgQQ.js +85 -0
- package/dist/style.css +1 -1
- package/dist/{useModuleCatalog-Bk-gRmBb.js → useModuleCatalog-CnFFvrBk.js} +1 -1
- package/package.json +1 -1
- package/dist/TemplateCenterView-DNjVytwE.js +0 -364
- package/dist/routes-D6BQSP4i.js +0 -81
|
@@ -2,8 +2,8 @@ import { defineComponent as N, computed as y, ref as q, onMounted as V, onBefore
|
|
|
2
2
|
import { useCoreStore as $ } from "@feedmepos/mf-common";
|
|
3
3
|
import { useRoute as D, RouterView as G } from "vue-router";
|
|
4
4
|
import { P as c } from "./PortalIcon-DO0VrIoY.js";
|
|
5
|
-
import { r as I, u as Q, w as L } from "./adminAccess-
|
|
6
|
-
import { p as U } from "./portalContext-
|
|
5
|
+
import { r as I, u as Q, w as L } from "./adminAccess-D8Cx7BcO.js";
|
|
6
|
+
import { p as U } from "./portalContext-Bhp7NA0c.js";
|
|
7
7
|
import { p as d } from "./portalNavigation-DKCfwTH8.js";
|
|
8
8
|
import { t as H } from "./templatePickerFlag-CosY_15R.js";
|
|
9
9
|
import { _ as J } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -10,10 +10,10 @@ import { r as Ul, a as eu, b as tu, s as Ua, c as qa, p as nu, A as ru, d as au,
|
|
|
10
10
|
import { _ as ql, B as iu } from "./BrandFontPicker-kQKWf1hL.js";
|
|
11
11
|
import { g as lu, C as Ss, F as Ts, u as Es, i as Fl, a as ou, t as cu } from "./useBrandKit-CkdPQRE-.js";
|
|
12
12
|
import { _ as Bt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
|
-
import { r as uu, w as du, a as pu, u as fu, b as ii } from "./adminAccess-
|
|
14
|
-
import { a as Ve } from "./routes-
|
|
13
|
+
import { r as uu, w as du, a as pu, u as fu, b as ii } from "./adminAccess-D8Cx7BcO.js";
|
|
14
|
+
import { a as Ve } from "./routes-DPGrYgQQ.js";
|
|
15
15
|
import { _ as vn } from "./StatusBadge.vue_vue_type_script_setup_true_lang-CMgQ0bd_.js";
|
|
16
|
-
import { u as hu } from "./portalContext-
|
|
16
|
+
import { u as hu } from "./portalContext-Bhp7NA0c.js";
|
|
17
17
|
import { a as mu, w as gu } from "./portalNavigation-DKCfwTH8.js";
|
|
18
18
|
import { t as Fa } from "./templatePickerFlag-CosY_15R.js";
|
|
19
19
|
import { useRoute as li, useRouter as yu } from "vue-router";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as b, computed as p, ref as w, onMounted as D, onScopeDispose as A, resolveComponent as B, openBlock as c, createElementBlock as a, createElementVNode as C, toDisplayString as l, unref as r, Fragment as Z, renderList as E, normalizeStyle as U, createVNode as d, withCtx as H, createTextVNode as g, createCommentVNode as G } from "vue";
|
|
2
2
|
import { useRoute as S } from "vue-router";
|
|
3
|
-
import { a as O } from "./routes-
|
|
3
|
+
import { a as O } from "./routes-DPGrYgQQ.js";
|
|
4
4
|
import { b as j, c as N, e as q } from "./controlPlane-sXaC6pAh.js";
|
|
5
|
-
import { u as I } from "./portalContext-
|
|
5
|
+
import { u as I } from "./portalContext-Bhp7NA0c.js";
|
|
6
6
|
import { p as u } from "./portalNavigation-DKCfwTH8.js";
|
|
7
7
|
import { i as R, u as T } from "./useBrandKit-CkdPQRE-.js";
|
|
8
8
|
import { _ as K } from "./StatusBadge.vue_vue_type_script_setup_true_lang-CMgQ0bd_.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as $, ref as f, onMounted as q, resolveComponent as w, openBlock as l, createBlock as R, withCtx as L, createVNode as g, createElementVNode as c, toDisplayString as N, unref as h, createElementBlock as b, Fragment as O, createCommentVNode as S, computed as E, h as a, withModifiers as T, onScopeDispose as Y, createTextVNode as z } from "vue";
|
|
2
2
|
import { useRoute as H, useRouter as J } from "vue-router";
|
|
3
3
|
import { components as G, useDialog as K } from "@feedmepos/ui-library";
|
|
4
|
-
import { a as P } from "./routes-
|
|
4
|
+
import { a as P } from "./routes-DPGrYgQQ.js";
|
|
5
5
|
import { c as M, e as B, a as Q } from "./controlPlane-sXaC6pAh.js";
|
|
6
|
-
import { u as W } from "./portalContext-
|
|
6
|
+
import { u as W } from "./portalContext-Bhp7NA0c.js";
|
|
7
7
|
import { w as F } from "./portalNavigation-DKCfwTH8.js";
|
|
8
8
|
import { A as X, p as Z } from "./AppTemplatePicker-CNJ6kIJk.js";
|
|
9
9
|
import { m as ee } from "./index-CIJWcl_6.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
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 h, t as O } from "./useModuleCatalog-
|
|
4
|
+
import { u as D, c as G, f as K, _ as h, t as O } from "./useModuleCatalog-CnFFvrBk.js";
|
|
5
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"
|
|
@@ -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-
|
|
3
|
+
import { m as q, i as A, u as F, _ as w } from "./useModuleCatalog-CnFFvrBk.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,6 +1,6 @@
|
|
|
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-
|
|
3
|
+
import { u as g } from "./portalContext-Bhp7NA0c.js";
|
|
4
4
|
import { w as f } from "./portalNavigation-DKCfwTH8.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({
|
|
@@ -3,7 +3,7 @@ import { useRoute as N } from "vue-router";
|
|
|
3
3
|
import { e as _, a as $ } from "./index-CIJWcl_6.js";
|
|
4
4
|
import { l as B, e as E } from "./controlPlane-sXaC6pAh.js";
|
|
5
5
|
import { useCoreStore as F } from "@feedmepos/mf-common";
|
|
6
|
-
import { u as U } from "./portalContext-
|
|
6
|
+
import { u as U } from "./portalContext-Bhp7NA0c.js";
|
|
7
7
|
import { l as V } from "./portalNavigation-DKCfwTH8.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 = {
|
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
import { defineComponent as S, ref as r, computed as B, resolveComponent as R, openBlock as o, createBlock as E, withCtx as L, createElementVNode as t, createElementBlock as i, Fragment as A, createTextVNode as w, toDisplayString as c, createVNode as p, createCommentVNode as b, onMounted as U, renderList as j, unref as z } from "vue";
|
|
2
|
+
import { a as C } from "./routes-DPGrYgQQ.js";
|
|
3
|
+
import { useDialog as G } from "@feedmepos/ui-library";
|
|
4
|
+
import { useRouter as H } from "vue-router";
|
|
5
|
+
import { c as T, e as P } from "./controlPlane-sXaC6pAh.js";
|
|
6
|
+
import { _ as O } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
+
const J = [
|
|
8
|
+
// `label` and `description` are MERCHANT-FACING: the portal's picker renders
|
|
9
|
+
// them, and they are the only thing a merchant chooses on. Say what the app does
|
|
10
|
+
// for their customers, never which package it is built from — the SDK is real and
|
|
11
|
+
// load-bearing and means nothing to the person making this decision. These are
|
|
12
|
+
// the exact texts merchants were already seeing via the old choice layer's own
|
|
13
|
+
// label/description (kept verbatim across its removal — a refactor is not the
|
|
14
|
+
// moment to also silently change picker copy).
|
|
15
|
+
{
|
|
16
|
+
id: "miniprogram-vue",
|
|
17
|
+
label: "V1 · Phone ordering",
|
|
18
|
+
description: "The established phone ordering experience with menu, checkout, membership, rewards and order history.",
|
|
19
|
+
industries: [],
|
|
20
|
+
environments: ["dev", "prod"],
|
|
21
|
+
default: !0
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: "miniprogram-vue-v2",
|
|
25
|
+
label: "V2 · Baseline",
|
|
26
|
+
description: "The FeedMe v1 customer app's interface, on the v2 kernel: order medallions, the order-history rail, a category rail beside a continuous menu, and the round reviewed in a sheet. The baseline every other v2 style departs from.",
|
|
27
|
+
industries: ["Food & beverage"],
|
|
28
|
+
// Dev only, deliberately. It has never been provisioned end-to-end: the
|
|
29
|
+
// preview proxy, the component-library unpack and the release build have
|
|
30
|
+
// only been exercised locally. Add 'prod' after a real merchant has run
|
|
31
|
+
// through all three.
|
|
32
|
+
environments: ["dev"],
|
|
33
|
+
restaurantStyle: "qsr"
|
|
34
|
+
},
|
|
35
|
+
// Forked from miniprogram-vue-v2 (2026-09): the coffee and tea styles used
|
|
36
|
+
// to be a `restaurantStyle` sharing that one directory, which meant editing
|
|
37
|
+
// one style's components risked changing what the other two rendered. Each
|
|
38
|
+
// now has its own independent directory; only `templates/block-library/` is
|
|
39
|
+
// still shared across all three.
|
|
40
|
+
{
|
|
41
|
+
id: "miniprogram-vue-v2-coffee",
|
|
42
|
+
label: "V2 · Coffee house",
|
|
43
|
+
description: "A calm, image-led experience for habitual pickup, premium drinks and considered customisation.",
|
|
44
|
+
industries: ["Food & beverage"],
|
|
45
|
+
environments: ["dev"],
|
|
46
|
+
restaurantStyle: "coffee"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
id: "miniprogram-vue-v2-tea",
|
|
50
|
+
label: "V2 · Tea & beverage",
|
|
51
|
+
description: "A light, compact and option-forward experience for repeat beverage orders with many customisations.",
|
|
52
|
+
industries: ["Food & beverage"],
|
|
53
|
+
environments: ["dev"],
|
|
54
|
+
restaurantStyle: "tea"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: "dingzheng-test",
|
|
58
|
+
label: "dingzheng test",
|
|
59
|
+
description: "dingzheng test",
|
|
60
|
+
industries: [],
|
|
61
|
+
environments: ["dev"]
|
|
62
|
+
}
|
|
63
|
+
], W = ["href"], K = {
|
|
64
|
+
key: 0,
|
|
65
|
+
class: "portal-error",
|
|
66
|
+
role: "alert"
|
|
67
|
+
}, Q = "miniprogram-vue-v2", X = /* @__PURE__ */ S({
|
|
68
|
+
__name: "ForkTemplateDialog",
|
|
69
|
+
emits: ["close", "created"],
|
|
70
|
+
setup(M, { emit: V }) {
|
|
71
|
+
const g = V, d = r(""), v = r(""), _ = r(""), u = r(!1), s = r(""), m = r(""), x = r(0), h = /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/, F = B(
|
|
72
|
+
() => !u.value && h.test(d.value.trim()) && v.value.trim().length > 0 && _.value.trim().length > 0
|
|
73
|
+
);
|
|
74
|
+
async function $() {
|
|
75
|
+
if (F.value) {
|
|
76
|
+
u.value = !0, s.value = "";
|
|
77
|
+
try {
|
|
78
|
+
const y = await T(C.forkAppTemplate(), {
|
|
79
|
+
method: "POST",
|
|
80
|
+
body: JSON.stringify({
|
|
81
|
+
sourceAppTemplateId: Q,
|
|
82
|
+
newAppTemplateId: d.value.trim(),
|
|
83
|
+
label: v.value.trim(),
|
|
84
|
+
description: _.value.trim()
|
|
85
|
+
})
|
|
86
|
+
});
|
|
87
|
+
m.value = y.pullRequestUrl, x.value = y.fileCount, g("created");
|
|
88
|
+
} catch (y) {
|
|
89
|
+
s.value = P(y);
|
|
90
|
+
} finally {
|
|
91
|
+
u.value = !1;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return (y, n) => {
|
|
96
|
+
const f = R("FmButton"), q = R("FmTextField"), D = R("FmTextarea"), I = R("FmCard");
|
|
97
|
+
return o(), E(I, { class: "fork-template-dialog" }, {
|
|
98
|
+
default: L(() => [
|
|
99
|
+
n[7] || (n[7] = t("h2", null, "Create template", -1)),
|
|
100
|
+
m.value ? (o(), i(A, { key: 0 }, [
|
|
101
|
+
t("p", null, [
|
|
102
|
+
w(" Opened a pull request copying " + c(x.value) + " file(s) into a brand-new ", 1),
|
|
103
|
+
t("code", null, "templates/" + c(d.value) + "/", 1),
|
|
104
|
+
n[5] || (n[5] = w(" directory, and registering it in the template catalog. It needs human review and merge — once merged and deployed, it appears here and in the merchant picker automatically; there is no separate step to enable it. ", -1))
|
|
105
|
+
]),
|
|
106
|
+
t("footer", null, [
|
|
107
|
+
t("a", {
|
|
108
|
+
class: "fork-template-dialog__review-link",
|
|
109
|
+
href: m.value,
|
|
110
|
+
target: "_blank",
|
|
111
|
+
rel: "noopener"
|
|
112
|
+
}, "Review PR", 8, W),
|
|
113
|
+
p(f, {
|
|
114
|
+
label: "Done",
|
|
115
|
+
onClick: n[0] || (n[0] = (e) => g("close"))
|
|
116
|
+
})
|
|
117
|
+
])
|
|
118
|
+
], 64)) : (o(), i(A, { key: 1 }, [
|
|
119
|
+
n[6] || (n[6] = t("p", { class: "fork-template-dialog__note" }, " Copies the v2 baseline template's whole directory into a brand-new, independent one — editing the new one can never affect the baseline or any other template. Use this to start a new restaurant style rather than editing a style that other merchants already share. ", -1)),
|
|
120
|
+
p(q, {
|
|
121
|
+
modelValue: d.value,
|
|
122
|
+
"onUpdate:modelValue": n[1] || (n[1] = (e) => d.value = e),
|
|
123
|
+
label: "New template id",
|
|
124
|
+
placeholder: "e.g. miniprogram-vue-v2-bakery",
|
|
125
|
+
"helper-text": "Lowercase, kebab-case. Also becomes the directory name and GitHub repository name.",
|
|
126
|
+
disabled: u.value,
|
|
127
|
+
rules: [(e) => h.test(e.trim()) || "Lowercase kebab-case, e.g. miniprogram-vue-v2-bakery"]
|
|
128
|
+
}, null, 8, ["modelValue", "disabled", "rules"]),
|
|
129
|
+
p(q, {
|
|
130
|
+
modelValue: v.value,
|
|
131
|
+
"onUpdate:modelValue": n[2] || (n[2] = (e) => v.value = e),
|
|
132
|
+
label: "Label",
|
|
133
|
+
placeholder: "Shown to merchants in the picker",
|
|
134
|
+
disabled: u.value
|
|
135
|
+
}, null, 8, ["modelValue", "disabled"]),
|
|
136
|
+
p(D, {
|
|
137
|
+
modelValue: _.value,
|
|
138
|
+
"onUpdate:modelValue": n[3] || (n[3] = (e) => _.value = e),
|
|
139
|
+
label: "Description",
|
|
140
|
+
placeholder: "One or two sentences on what the merchant gets",
|
|
141
|
+
disabled: u.value
|
|
142
|
+
}, null, 8, ["modelValue", "disabled"]),
|
|
143
|
+
s.value ? (o(), i("p", K, c(s.value), 1)) : b("", !0),
|
|
144
|
+
t("footer", null, [
|
|
145
|
+
p(f, {
|
|
146
|
+
label: "Cancel",
|
|
147
|
+
variant: "tertiary",
|
|
148
|
+
disabled: u.value,
|
|
149
|
+
onClick: n[4] || (n[4] = (e) => g("close"))
|
|
150
|
+
}, null, 8, ["disabled"]),
|
|
151
|
+
p(f, {
|
|
152
|
+
label: "Open pull request",
|
|
153
|
+
loading: u.value,
|
|
154
|
+
disabled: !F.value,
|
|
155
|
+
onClick: $
|
|
156
|
+
}, null, 8, ["loading", "disabled"])
|
|
157
|
+
])
|
|
158
|
+
], 64))
|
|
159
|
+
]),
|
|
160
|
+
_: 1
|
|
161
|
+
});
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
}), Y = /* @__PURE__ */ O(X, [["__scopeId", "data-v-5a38928f"]]), Z = { class: "portal-page" }, ee = { class: "portal-page-inner" }, te = { class: "portal-page-heading" }, ae = { class: "portal-page-heading__actions" }, le = {
|
|
165
|
+
key: 0,
|
|
166
|
+
class: "portal-error",
|
|
167
|
+
role: "alert"
|
|
168
|
+
}, ne = {
|
|
169
|
+
key: 1,
|
|
170
|
+
"aria-label": "Templates in review"
|
|
171
|
+
}, oe = { class: "template-section-heading" }, ie = {
|
|
172
|
+
key: 0,
|
|
173
|
+
class: "portal-error",
|
|
174
|
+
role: "alert"
|
|
175
|
+
}, se = {
|
|
176
|
+
key: 1,
|
|
177
|
+
class: "template-choices__list",
|
|
178
|
+
"aria-label": "Templates in review"
|
|
179
|
+
}, re = { class: "template-choices__name" }, de = { class: "template-choices__label" }, ue = { key: 0 }, ce = { class: "template-choices__id" }, pe = { class: "template-choices__actions" }, me = ["href"], ve = {
|
|
180
|
+
class: "template-choices__list",
|
|
181
|
+
"aria-label": "Physical templates"
|
|
182
|
+
}, he = { class: "template-choices__name" }, ge = { class: "template-choices__label" }, _e = { key: 0 }, be = { class: "template-choices__id" }, fe = { class: "template-choices__meta" }, ye = { class: "template-choices__actions" }, ke = /* @__PURE__ */ S({
|
|
183
|
+
__name: "TemplateCenterView",
|
|
184
|
+
setup(M) {
|
|
185
|
+
const V = H(), g = G(), d = r(""), v = r(null), _ = r([]), u = r(!1), s = r("");
|
|
186
|
+
async function m() {
|
|
187
|
+
u.value = !0, s.value = "";
|
|
188
|
+
try {
|
|
189
|
+
const e = await T(C.pendingTemplateChanges());
|
|
190
|
+
_.value = e.changes;
|
|
191
|
+
} catch (e) {
|
|
192
|
+
s.value = P(e);
|
|
193
|
+
} finally {
|
|
194
|
+
u.value = !1;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
function x() {
|
|
198
|
+
g.open({
|
|
199
|
+
title: "Create template",
|
|
200
|
+
dialogComponent: Y,
|
|
201
|
+
dialogComponentProps: { onClose: () => g.close(), onCreated: () => void m() }
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
const h = r(null);
|
|
205
|
+
async function F(e) {
|
|
206
|
+
h.value = e.pullRequestNumber, s.value = "";
|
|
207
|
+
try {
|
|
208
|
+
await T(C.mergePendingTemplateChange(e.pullRequestNumber), { method: "POST" }), await m();
|
|
209
|
+
} catch (a) {
|
|
210
|
+
s.value = P(a);
|
|
211
|
+
} finally {
|
|
212
|
+
h.value = null;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
async function $(e) {
|
|
216
|
+
h.value = e.pullRequestNumber, s.value = "";
|
|
217
|
+
try {
|
|
218
|
+
await T(C.rejectPendingTemplateChange(e.pullRequestNumber), { method: "POST" }), await m();
|
|
219
|
+
} catch (a) {
|
|
220
|
+
s.value = P(a);
|
|
221
|
+
} finally {
|
|
222
|
+
h.value = null;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
function y(e) {
|
|
226
|
+
const a = e.kind === "delete" ? "delete" : "create";
|
|
227
|
+
g.open({
|
|
228
|
+
title: `Merge — ${a} ${e.appTemplateId}?`,
|
|
229
|
+
message: e.kind === "delete" ? `Merges the pull request into main as-is, without a code review step here. templates/${e.appTemplateId}/ is gone from this repo once this lands and the next control-plane deploy picks up the updated catalog.` : "Merges the pull request into main as-is, without a code review step here. The new template takes effect on the next control-plane deploy.",
|
|
230
|
+
primaryActions: { text: "Merge", close: !0, variant: "primary" },
|
|
231
|
+
secondaryActions: { text: "Cancel", close: !0, variant: "tertiary" }
|
|
232
|
+
}).onPrimary(() => void F(e));
|
|
233
|
+
}
|
|
234
|
+
function n(e) {
|
|
235
|
+
g.open({
|
|
236
|
+
title: `Reject — ${e.kind === "delete" ? "delete" : "create"} ${e.appTemplateId}?`,
|
|
237
|
+
message: "Closes the pull request without merging and deletes its branch. Nothing of this change is kept.",
|
|
238
|
+
primaryActions: { text: "Reject", close: !0, variant: "destructive" },
|
|
239
|
+
secondaryActions: { text: "Cancel", close: !0, variant: "tertiary" }
|
|
240
|
+
}).onPrimary(() => void $(e));
|
|
241
|
+
}
|
|
242
|
+
const f = r(null);
|
|
243
|
+
async function q(e) {
|
|
244
|
+
f.value = e, d.value = "";
|
|
245
|
+
try {
|
|
246
|
+
await T(C.deleteAppTemplate(e), { method: "POST" }), await m();
|
|
247
|
+
} catch (a) {
|
|
248
|
+
d.value = P(a);
|
|
249
|
+
} finally {
|
|
250
|
+
f.value = null;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
function D(e) {
|
|
254
|
+
g.open({
|
|
255
|
+
title: `Delete ${e}?`,
|
|
256
|
+
message: `Opens a pull request removing templates/${e}/ and its catalog entry. Nothing is deleted until that PR is reviewed and merged — refused outright if any project still uses this template.`,
|
|
257
|
+
primaryActions: { text: "Delete", close: !0, variant: "destructive" },
|
|
258
|
+
secondaryActions: { text: "Cancel", close: !0, variant: "tertiary" }
|
|
259
|
+
}).onPrimary(() => void q(e));
|
|
260
|
+
}
|
|
261
|
+
U(() => void m());
|
|
262
|
+
async function I(e) {
|
|
263
|
+
if (!v.value) {
|
|
264
|
+
v.value = e, d.value = "";
|
|
265
|
+
try {
|
|
266
|
+
const a = await T(
|
|
267
|
+
C.appTemplateEditingProject(e),
|
|
268
|
+
{ method: "POST" }
|
|
269
|
+
);
|
|
270
|
+
await V.push({
|
|
271
|
+
name: "miniprogram-v2-project",
|
|
272
|
+
params: { projectId: a.projectId, view: "workspace" },
|
|
273
|
+
query: { tpl: "1" }
|
|
274
|
+
});
|
|
275
|
+
} catch (a) {
|
|
276
|
+
d.value = P(a);
|
|
277
|
+
} finally {
|
|
278
|
+
v.value = null;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
return (e, a) => {
|
|
283
|
+
const k = R("FmButton");
|
|
284
|
+
return o(), i("div", Z, [
|
|
285
|
+
t("div", ee, [
|
|
286
|
+
t("header", te, [
|
|
287
|
+
a[1] || (a[1] = t("div", null, [
|
|
288
|
+
t("p", { class: "portal-eyebrow" }, "Internal"),
|
|
289
|
+
t("h1", null, "Template library")
|
|
290
|
+
], -1)),
|
|
291
|
+
t("div", ae, [
|
|
292
|
+
p(k, {
|
|
293
|
+
label: "Create template",
|
|
294
|
+
variant: "primary",
|
|
295
|
+
onClick: a[0] || (a[0] = (l) => x())
|
|
296
|
+
})
|
|
297
|
+
])
|
|
298
|
+
]),
|
|
299
|
+
d.value ? (o(), i("p", le, c(d.value), 1)) : b("", !0),
|
|
300
|
+
s.value || _.value.length > 0 ? (o(), i("section", ne, [
|
|
301
|
+
t("div", oe, [
|
|
302
|
+
a[2] || (a[2] = t("h2", { class: "template-section-title" }, "In review", -1)),
|
|
303
|
+
p(k, {
|
|
304
|
+
label: "Refresh",
|
|
305
|
+
variant: "tertiary",
|
|
306
|
+
size: "md",
|
|
307
|
+
loading: u.value,
|
|
308
|
+
onClick: m
|
|
309
|
+
}, null, 8, ["loading"])
|
|
310
|
+
]),
|
|
311
|
+
a[3] || (a[3] = t("p", { class: "template-section-note" }, " Waiting on PR review and merge. A row disappears on its own once its pull request merges or is closed — click Refresh to check. ", -1)),
|
|
312
|
+
s.value ? (o(), i("p", ie, [
|
|
313
|
+
w(c(s.value) + " ", 1),
|
|
314
|
+
p(k, {
|
|
315
|
+
label: "Retry",
|
|
316
|
+
variant: "tertiary",
|
|
317
|
+
onClick: m
|
|
318
|
+
})
|
|
319
|
+
])) : b("", !0),
|
|
320
|
+
_.value.length > 0 ? (o(), i("section", se, [
|
|
321
|
+
(o(!0), i(A, null, j(_.value, (l) => (o(), i("article", {
|
|
322
|
+
key: l.pullRequestNumber,
|
|
323
|
+
class: "template-choices__row"
|
|
324
|
+
}, [
|
|
325
|
+
t("div", re, [
|
|
326
|
+
t("span", de, [
|
|
327
|
+
w(c(l.appTemplateId), 1),
|
|
328
|
+
l.kind === "delete" ? (o(), i("span", ue, " · Delete")) : b("", !0)
|
|
329
|
+
]),
|
|
330
|
+
t("span", ce, "Awaiting review — PR #" + c(l.pullRequestNumber), 1)
|
|
331
|
+
]),
|
|
332
|
+
t("div", pe, [
|
|
333
|
+
t("a", {
|
|
334
|
+
class: "template-review-link",
|
|
335
|
+
href: l.pullRequestUrl,
|
|
336
|
+
target: "_blank",
|
|
337
|
+
rel: "noopener"
|
|
338
|
+
}, "Review PR", 8, me),
|
|
339
|
+
p(k, {
|
|
340
|
+
label: "Merge",
|
|
341
|
+
variant: "primary",
|
|
342
|
+
loading: h.value === l.pullRequestNumber,
|
|
343
|
+
disabled: h.value !== null,
|
|
344
|
+
onClick: (N) => y(l)
|
|
345
|
+
}, null, 8, ["loading", "disabled", "onClick"]),
|
|
346
|
+
p(k, {
|
|
347
|
+
label: "Reject",
|
|
348
|
+
variant: "destructive",
|
|
349
|
+
disabled: h.value !== null,
|
|
350
|
+
onClick: (N) => n(l)
|
|
351
|
+
}, null, 8, ["disabled", "onClick"])
|
|
352
|
+
])
|
|
353
|
+
]))), 128))
|
|
354
|
+
])) : b("", !0)
|
|
355
|
+
])) : b("", !0),
|
|
356
|
+
a[4] || (a[4] = t("h2", { class: "template-section-title" }, "Physical templates", -1)),
|
|
357
|
+
a[5] || (a[5] = t("p", { class: "template-section-note" }, ' "Edit code" opens the physical template directly — the same chat + live preview a merchant project gets, saving straight to a pull request against this repo instead of a merchant repo. "Delete" opens a PR removing it instead — refused outright for the default template or one any project still uses. ', -1)),
|
|
358
|
+
t("section", ve, [
|
|
359
|
+
(o(!0), i(A, null, j(z(J), (l) => (o(), i("article", {
|
|
360
|
+
key: l.id,
|
|
361
|
+
class: "template-choices__row"
|
|
362
|
+
}, [
|
|
363
|
+
t("div", he, [
|
|
364
|
+
t("span", ge, [
|
|
365
|
+
w(c(l.label), 1),
|
|
366
|
+
l.default ? (o(), i("span", _e, " · Default")) : b("", !0)
|
|
367
|
+
]),
|
|
368
|
+
t("span", be, c(l.id), 1),
|
|
369
|
+
t("span", fe, [
|
|
370
|
+
l.restaurantStyle ? (o(), i(A, { key: 0 }, [
|
|
371
|
+
w(c(l.restaurantStyle) + " · ", 1)
|
|
372
|
+
], 64)) : b("", !0),
|
|
373
|
+
w(c(l.industries.join(", ") || "General-purpose") + " · " + c(l.environments.join(", ")), 1)
|
|
374
|
+
])
|
|
375
|
+
]),
|
|
376
|
+
t("div", ye, [
|
|
377
|
+
p(k, {
|
|
378
|
+
label: "Edit code",
|
|
379
|
+
variant: "secondary",
|
|
380
|
+
loading: v.value === l.id,
|
|
381
|
+
disabled: v.value !== null,
|
|
382
|
+
onClick: (N) => I(l.id)
|
|
383
|
+
}, null, 8, ["loading", "disabled", "onClick"]),
|
|
384
|
+
l.default ? b("", !0) : (o(), E(k, {
|
|
385
|
+
key: 0,
|
|
386
|
+
label: "Delete",
|
|
387
|
+
variant: "destructive",
|
|
388
|
+
loading: f.value === l.id,
|
|
389
|
+
disabled: f.value !== null,
|
|
390
|
+
onClick: (N) => D(l.id)
|
|
391
|
+
}, null, 8, ["loading", "disabled", "onClick"]))
|
|
392
|
+
])
|
|
393
|
+
]))), 128))
|
|
394
|
+
])
|
|
395
|
+
])
|
|
396
|
+
]);
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
}), xe = /* @__PURE__ */ O(ke, [["__scopeId", "data-v-556dfe7b"]]);
|
|
400
|
+
export {
|
|
401
|
+
xe as default
|
|
402
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as s, watchEffect as a, openBlock as n, createElementBlock as p } from "vue";
|
|
2
2
|
import { useRoute as u, useRouter as i } from "vue-router";
|
|
3
|
-
import { u as l } from "./portalContext-
|
|
3
|
+
import { u as l } from "./portalContext-Bhp7NA0c.js";
|
|
4
4
|
import { w as m, a as f } from "./portalNavigation-DKCfwTH8.js";
|
|
5
5
|
const _ = {
|
|
6
6
|
class: "portal-loading",
|
package/dist/app.js
CHANGED
|
@@ -4,24 +4,24 @@ const o = [
|
|
|
4
4
|
path: "/platforms/mobile",
|
|
5
5
|
name: "miniprogram-v2-mobile-projects",
|
|
6
6
|
meta: { title: "Mobile" },
|
|
7
|
-
component: () => import("./MobileProjectsView-
|
|
7
|
+
component: () => import("./MobileProjectsView-DaFYj3UE.js")
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
path: "/",
|
|
11
11
|
name: "miniprogram-v2-ecosystem",
|
|
12
12
|
meta: { title: "Ecosystem" },
|
|
13
13
|
beforeEnter: (e) => ["workspace", "releases", "sessions"].includes(String(e.query.view)) ? { name: "miniprogram-v2-control", query: e.query } : !0,
|
|
14
|
-
component: () => import("./EcosystemView-
|
|
14
|
+
component: () => import("./EcosystemView-Drggj4cB.js")
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
path: "/workspace",
|
|
18
18
|
name: "miniprogram-v2-control",
|
|
19
|
-
component: () => import("./WorkspaceEntryView-
|
|
19
|
+
component: () => import("./WorkspaceEntryView-C5SWhNI5.js")
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
path: "/p/:projectId/:view(workspace|releases|sessions)?",
|
|
23
23
|
name: "miniprogram-v2-project",
|
|
24
|
-
component: () => import("./ControlPlaneView-
|
|
24
|
+
component: () => import("./ControlPlaneView-BPaHROu_.js")
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
path: "/brand-kit",
|
|
@@ -33,13 +33,13 @@ const o = [
|
|
|
33
33
|
path: "/pages",
|
|
34
34
|
name: "miniprogram-v2-pages",
|
|
35
35
|
meta: { title: "Pages" },
|
|
36
|
-
component: () => import("./PagesView-
|
|
36
|
+
component: () => import("./PagesView-B9YEpCbi.js")
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
path: "/settings",
|
|
40
40
|
name: "miniprogram-v2-settings",
|
|
41
41
|
meta: { title: "Settings" },
|
|
42
|
-
component: () => import("./PortalSettingsView-
|
|
42
|
+
component: () => import("./PortalSettingsView-C3uVMGH5.js")
|
|
43
43
|
},
|
|
44
44
|
...["tablet", "kiosk"].map((e) => ({
|
|
45
45
|
path: `/platforms/${e}`,
|
|
@@ -53,7 +53,7 @@ const o = [
|
|
|
53
53
|
path: "/modules",
|
|
54
54
|
name: "miniprogram-v2-module-center",
|
|
55
55
|
meta: { title: "Module library" },
|
|
56
|
-
component: () => import("./ModuleCenterView-
|
|
56
|
+
component: () => import("./ModuleCenterView-BI0Vbkcu.js")
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
// Keyed by the module's directory name, which is what the catalog, the
|
|
@@ -61,7 +61,7 @@ const o = [
|
|
|
61
61
|
path: "/modules/:name",
|
|
62
62
|
name: "miniprogram-v2-module-detail",
|
|
63
63
|
meta: { title: "Module library" },
|
|
64
|
-
component: () => import("./ModuleDetailView-
|
|
64
|
+
component: () => import("./ModuleDetailView-DKmc4Hp2.js")
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
// Internal-only: linked from the main nav (App.vue), but only once
|
|
@@ -72,13 +72,13 @@ const o = [
|
|
|
72
72
|
path: "/internal/template-center",
|
|
73
73
|
name: "miniprogram-v2-template-center",
|
|
74
74
|
meta: { title: "Template library", requiresAdmin: !0 },
|
|
75
|
-
component: () => import("./TemplateCenterView-
|
|
75
|
+
component: () => import("./TemplateCenterView-DZ3jjV_i.js")
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
path: "/:pathMatch(.*)*",
|
|
79
79
|
redirect: (e) => ({ name: "miniprogram-v2-ecosystem", query: e.query, params: {} })
|
|
80
80
|
}
|
|
81
|
-
], r = {}, a = t(() => import("./App-
|
|
81
|
+
], r = {}, a = t(() => import("./App-BVQ9oPjV.js")), i = t(() => import("./LegacyWorkspaceEntry-lEMtmdIe.js"));
|
|
82
82
|
export {
|
|
83
83
|
a as FmApp,
|
|
84
84
|
i as MiniprogramWorkspace,
|
package/dist/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as b } from "./routes-
|
|
1
|
+
import { a as b } from "./routes-DPGrYgQQ.js";
|
|
2
2
|
import { useCoreStore as d } from "@feedmepos/mf-common";
|
|
3
3
|
import { c as g, e as h } from "./controlPlane-sXaC6pAh.js";
|
|
4
4
|
import { provide as y, computed as f, ref as c, watch as C, onScopeDispose as w, inject as x } from "vue";
|