@feedmepos/mf-miniprogram-v2 0.2.8-dev.2 → 0.2.8-dev.20
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-C8Vn8LvE.js → App-dgkwfArX.js} +337 -338
- package/dist/{BrandFontPicker-JHyoGusq.js → BrandFontPicker-CF3O3meB.js} +1 -1
- package/dist/BrandKitView-CdLMBZKd.js +276 -0
- package/dist/ControlPlaneView-fc2wIqfk.js +27162 -0
- package/dist/{EcosystemView-XP9IZ9wn.js → EcosystemView-DHtS5IDN.js} +115 -93
- package/dist/MobileProjectDialog-Bt6r-bHC.js +446 -0
- package/dist/MobileProjectsView-Dvj7YKlO.js +237 -0
- package/dist/ModuleCenterView-t8rhd419.js +283 -0
- package/dist/ModuleDetailView-CcqJ4Hfu.js +296 -0
- package/dist/{PagesView-DzDqCd8N.js → PagesView-D0RMTyqw.js} +2 -2
- package/dist/{PlatformUnavailableView-CdHjkolw.js → PlatformUnavailableView-OHEJAztd.js} +1 -1
- package/dist/{PortalSettingsView-Df5jChmi.js → PortalSettingsView-B68s6fiS.js} +3 -3
- package/dist/StatusBadge.vue_vue_type_script_setup_true_lang-DMm_s9ua.js +41 -0
- package/dist/TemplateCenterView-Cpr39Y5S.js +515 -0
- package/dist/{WorkspaceEntryView-DQkYJWdf.js → WorkspaceEntryView-gM7RX5BV.js} +2 -2
- package/dist/app.js +15 -15
- package/dist/{controlPlane-sXaC6pAh.js → controlPlane-DR5ykj4d.js} +8 -8
- package/dist/{adminAccess-D2K-L-Vt.js → localPreference-Do4VKtxT.js} +35 -35
- package/dist/package.json +1 -1
- package/dist/{portalContext-DV-6uUwp.js → portalContext-BeKN8Bcx.js} +2 -2
- package/dist/portalNavigation-DLcC7Koh.js +43 -0
- package/dist/{routes-CeuodIgg.js → routes-B9oMJsaM.js} +45 -27
- package/dist/style.css +1 -1
- package/dist/{useBrandKit-CXLIXo5j.js → useBrandKit-MkgkEuIX.js} +265 -233
- package/dist/useModuleCatalog-Daw8KA--.js +147 -0
- package/package.json +1 -1
- package/dist/AppTemplatePicker.vue_vue_type_script_setup_true_lang-LE_aKvfg.js +0 -198
- package/dist/BrandKitView-Dlt_ifI0.js +0 -249
- package/dist/ControlPlaneView-qDA8RgiR.js +0 -25317
- package/dist/MobileProjectsView-aAyHV5G-.js +0 -333
- package/dist/ModuleCenterView-C6mCPATr.js +0 -147
- package/dist/ModuleDetailView-CSfMF0Uo.js +0 -189
- package/dist/StatusBadge.vue_vue_type_script_setup_true_lang-CMgQ0bd_.js +0 -30
- package/dist/TemplateCenterView-DrWImUYO.js +0 -425
- package/dist/portalNavigation-C29ihtq_.js +0 -38
- package/dist/useModuleCatalog-Cep-pzWO.js +0 -124
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
import { defineComponent as B, ref as n, resolveComponent as A, openBlock as s, createBlock as S, withCtx as J, createElementVNode as a, toDisplayString as p, createVNode as u, createElementBlock as o, createCommentVNode as y, computed as X, Fragment as D, createTextVNode as x, onMounted as Y, renderList as G, normalizeClass as Z } from "vue";
|
|
2
|
+
import { a as T } from "./routes-B9oMJsaM.js";
|
|
3
|
+
import { useDialog as ee } from "@feedmepos/ui-library";
|
|
4
|
+
import { useRouter as te } from "vue-router";
|
|
5
|
+
import { c as F, e as I } from "./controlPlane-DR5ykj4d.js";
|
|
6
|
+
import { _ as L } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
+
import { w as ae } from "./portalNavigation-DLcC7Koh.js";
|
|
8
|
+
const le = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "portal-error",
|
|
11
|
+
role: "alert"
|
|
12
|
+
}, se = /* @__PURE__ */ B({
|
|
13
|
+
__name: "EditTemplateIndustriesDialog",
|
|
14
|
+
props: {
|
|
15
|
+
appTemplateId: {},
|
|
16
|
+
industries: {}
|
|
17
|
+
},
|
|
18
|
+
emits: ["close", "updated"],
|
|
19
|
+
setup(O, { emit: q }) {
|
|
20
|
+
const v = O, d = q, b = n(v.industries.join(", ")), h = n(!1), k = n("");
|
|
21
|
+
async function m() {
|
|
22
|
+
h.value = !0, k.value = "";
|
|
23
|
+
try {
|
|
24
|
+
const f = b.value.split(",").map((C) => C.trim()).filter((C) => C.length > 0), c = await F(
|
|
25
|
+
T.updateAppTemplateIndustries(v.appTemplateId),
|
|
26
|
+
{ method: "POST", body: JSON.stringify({ industries: f }) }
|
|
27
|
+
);
|
|
28
|
+
d("updated", [...c.industries]), d("close");
|
|
29
|
+
} catch (f) {
|
|
30
|
+
k.value = I(f);
|
|
31
|
+
} finally {
|
|
32
|
+
h.value = !1;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return (f, c) => {
|
|
36
|
+
const C = A("FmTextField"), g = A("FmButton"), R = A("FmCard");
|
|
37
|
+
return s(), S(R, { class: "edit-template-industries-dialog" }, {
|
|
38
|
+
default: J(() => [
|
|
39
|
+
a("h2", null, "Reclassify " + p(O.appTemplateId), 1),
|
|
40
|
+
c[2] || (c[2] = a("p", { class: "edit-template-industries-dialog__note" }, " Takes effect immediately — the merchant picker's sidebar grouping reads this the moment you submit. A pull request against the catalog source is still opened for the record, but nothing here waits on it. ", -1)),
|
|
41
|
+
u(C, {
|
|
42
|
+
modelValue: b.value,
|
|
43
|
+
"onUpdate:modelValue": c[0] || (c[0] = (P) => b.value = P),
|
|
44
|
+
label: "Industries",
|
|
45
|
+
placeholder: "e.g. Food & beverage",
|
|
46
|
+
"helper-text": "Comma-separated. Leave blank for general-purpose (Explore).",
|
|
47
|
+
disabled: h.value
|
|
48
|
+
}, null, 8, ["modelValue", "disabled"]),
|
|
49
|
+
k.value ? (s(), o("p", le, p(k.value), 1)) : y("", !0),
|
|
50
|
+
a("footer", null, [
|
|
51
|
+
u(g, {
|
|
52
|
+
label: "Cancel",
|
|
53
|
+
variant: "tertiary",
|
|
54
|
+
disabled: h.value,
|
|
55
|
+
onClick: c[1] || (c[1] = (P) => d("close"))
|
|
56
|
+
}, null, 8, ["disabled"]),
|
|
57
|
+
u(g, {
|
|
58
|
+
label: "Save",
|
|
59
|
+
loading: h.value,
|
|
60
|
+
disabled: h.value,
|
|
61
|
+
onClick: m
|
|
62
|
+
}, null, 8, ["loading", "disabled"])
|
|
63
|
+
])
|
|
64
|
+
]),
|
|
65
|
+
_: 1
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
}), ie = /* @__PURE__ */ L(se, [["__scopeId", "data-v-21521827"]]), ne = ["href"], oe = {
|
|
70
|
+
key: 0,
|
|
71
|
+
class: "portal-error",
|
|
72
|
+
role: "alert"
|
|
73
|
+
}, re = "miniprogram-vue-v2", ue = /* @__PURE__ */ B({
|
|
74
|
+
__name: "ForkTemplateDialog",
|
|
75
|
+
emits: ["close", "created"],
|
|
76
|
+
setup(O, { emit: q }) {
|
|
77
|
+
const v = q, d = n(""), b = n(""), h = n(""), k = n(""), m = n(!1), f = n(""), c = n(""), C = n(0), g = /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/, R = X(
|
|
78
|
+
() => !m.value && g.test(d.value.trim()) && b.value.trim().length > 0 && h.value.trim().length > 0
|
|
79
|
+
);
|
|
80
|
+
async function P() {
|
|
81
|
+
if (R.value) {
|
|
82
|
+
m.value = !0, f.value = "";
|
|
83
|
+
try {
|
|
84
|
+
const $ = await F(T.forkAppTemplate(), {
|
|
85
|
+
method: "POST",
|
|
86
|
+
body: JSON.stringify({
|
|
87
|
+
sourceAppTemplateId: re,
|
|
88
|
+
newAppTemplateId: d.value.trim(),
|
|
89
|
+
label: b.value.trim(),
|
|
90
|
+
description: h.value.trim(),
|
|
91
|
+
industries: k.value.split(",").map((i) => i.trim()).filter((i) => i.length > 0)
|
|
92
|
+
})
|
|
93
|
+
});
|
|
94
|
+
c.value = $.pullRequestUrl, C.value = $.fileCount, v("created");
|
|
95
|
+
} catch ($) {
|
|
96
|
+
f.value = I($);
|
|
97
|
+
} finally {
|
|
98
|
+
m.value = !1;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return ($, i) => {
|
|
103
|
+
const w = A("FmButton"), E = A("FmTextField"), j = A("FmTextarea"), M = A("FmCard");
|
|
104
|
+
return s(), S(M, { class: "fork-template-dialog" }, {
|
|
105
|
+
default: J(() => [
|
|
106
|
+
i[8] || (i[8] = a("h2", null, "Create template", -1)),
|
|
107
|
+
c.value ? (s(), o(D, { key: 0 }, [
|
|
108
|
+
a("p", null, [
|
|
109
|
+
x(" Opened a pull request copying " + p(C.value) + " file(s) into a brand-new ", 1),
|
|
110
|
+
a("code", null, "templates/" + p(d.value) + "/", 1),
|
|
111
|
+
i[6] || (i[6] = x(" 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))
|
|
112
|
+
]),
|
|
113
|
+
a("footer", null, [
|
|
114
|
+
a("a", {
|
|
115
|
+
class: "fork-template-dialog__review-link",
|
|
116
|
+
href: c.value,
|
|
117
|
+
target: "_blank",
|
|
118
|
+
rel: "noopener"
|
|
119
|
+
}, "Review PR", 8, ne),
|
|
120
|
+
u(w, {
|
|
121
|
+
label: "Done",
|
|
122
|
+
onClick: i[0] || (i[0] = (_) => v("close"))
|
|
123
|
+
})
|
|
124
|
+
])
|
|
125
|
+
], 64)) : (s(), o(D, { key: 1 }, [
|
|
126
|
+
i[7] || (i[7] = a("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)),
|
|
127
|
+
u(E, {
|
|
128
|
+
modelValue: d.value,
|
|
129
|
+
"onUpdate:modelValue": i[1] || (i[1] = (_) => d.value = _),
|
|
130
|
+
label: "New template id",
|
|
131
|
+
placeholder: "e.g. miniprogram-vue-v2-bakery",
|
|
132
|
+
"helper-text": "Lowercase, kebab-case. Also becomes the directory name and GitHub repository name.",
|
|
133
|
+
disabled: m.value,
|
|
134
|
+
rules: [(_) => g.test(_.trim()) || "Lowercase kebab-case, e.g. miniprogram-vue-v2-bakery"]
|
|
135
|
+
}, null, 8, ["modelValue", "disabled", "rules"]),
|
|
136
|
+
u(E, {
|
|
137
|
+
modelValue: b.value,
|
|
138
|
+
"onUpdate:modelValue": i[2] || (i[2] = (_) => b.value = _),
|
|
139
|
+
label: "Label",
|
|
140
|
+
placeholder: "Shown to merchants in the picker",
|
|
141
|
+
disabled: m.value
|
|
142
|
+
}, null, 8, ["modelValue", "disabled"]),
|
|
143
|
+
u(j, {
|
|
144
|
+
modelValue: h.value,
|
|
145
|
+
"onUpdate:modelValue": i[3] || (i[3] = (_) => h.value = _),
|
|
146
|
+
label: "Description",
|
|
147
|
+
placeholder: "One or two sentences on what the merchant gets",
|
|
148
|
+
disabled: m.value
|
|
149
|
+
}, null, 8, ["modelValue", "disabled"]),
|
|
150
|
+
u(E, {
|
|
151
|
+
modelValue: k.value,
|
|
152
|
+
"onUpdate:modelValue": i[4] || (i[4] = (_) => k.value = _),
|
|
153
|
+
label: "Industries",
|
|
154
|
+
placeholder: "e.g. Food & beverage",
|
|
155
|
+
"helper-text": "Comma-separated. Groups this template under a sidebar tab in the merchant picker; leave blank for general-purpose (Explore).",
|
|
156
|
+
disabled: m.value
|
|
157
|
+
}, null, 8, ["modelValue", "disabled"]),
|
|
158
|
+
f.value ? (s(), o("p", oe, p(f.value), 1)) : y("", !0),
|
|
159
|
+
a("footer", null, [
|
|
160
|
+
u(w, {
|
|
161
|
+
label: "Cancel",
|
|
162
|
+
variant: "tertiary",
|
|
163
|
+
disabled: m.value,
|
|
164
|
+
onClick: i[5] || (i[5] = (_) => v("close"))
|
|
165
|
+
}, null, 8, ["disabled"]),
|
|
166
|
+
u(w, {
|
|
167
|
+
label: "Open pull request",
|
|
168
|
+
loading: m.value,
|
|
169
|
+
disabled: !R.value,
|
|
170
|
+
onClick: P
|
|
171
|
+
}, null, 8, ["loading", "disabled"])
|
|
172
|
+
])
|
|
173
|
+
], 64))
|
|
174
|
+
]),
|
|
175
|
+
_: 1
|
|
176
|
+
});
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
}), de = /* @__PURE__ */ L(ue, [["__scopeId", "data-v-e921fc6b"]]), ce = { class: "portal-page" }, pe = { class: "portal-page-inner" }, me = { class: "portal-page-heading" }, ve = { class: "portal-page-heading__actions" }, he = {
|
|
180
|
+
key: 0,
|
|
181
|
+
class: "portal-error",
|
|
182
|
+
role: "alert"
|
|
183
|
+
}, ge = {
|
|
184
|
+
key: 1,
|
|
185
|
+
"aria-label": "Templates in review"
|
|
186
|
+
}, be = { class: "template-section-heading" }, fe = {
|
|
187
|
+
key: 0,
|
|
188
|
+
class: "portal-error",
|
|
189
|
+
role: "alert"
|
|
190
|
+
}, _e = {
|
|
191
|
+
key: 1,
|
|
192
|
+
class: "template-choices__list",
|
|
193
|
+
"aria-label": "Templates in review"
|
|
194
|
+
}, ye = { class: "template-choices__name" }, ke = { class: "template-choices__label" }, Ce = { key: 0 }, we = { class: "template-choices__id" }, Te = { class: "template-choices__actions" }, Re = ["href"], Pe = { class: "template-section-heading" }, Fe = {
|
|
195
|
+
key: 2,
|
|
196
|
+
class: "portal-error",
|
|
197
|
+
role: "alert"
|
|
198
|
+
}, Ie = {
|
|
199
|
+
class: "template-choices__list",
|
|
200
|
+
"aria-label": "Physical templates"
|
|
201
|
+
}, xe = { class: "template-choices__name" }, Ae = { class: "template-choices__label" }, $e = { key: 0 }, qe = { class: "template-choices__id" }, Ne = { class: "template-choices__meta" }, Ve = {
|
|
202
|
+
key: 0,
|
|
203
|
+
class: "template-status-badge template-status-badge--draft"
|
|
204
|
+
}, De = { class: "template-choices__actions" }, Ee = /* @__PURE__ */ B({
|
|
205
|
+
__name: "TemplateCenterView",
|
|
206
|
+
setup(O) {
|
|
207
|
+
const q = te(), v = ee(), d = n(""), b = n(null), h = n([]), k = n(!1), m = n("");
|
|
208
|
+
async function f() {
|
|
209
|
+
k.value = !0, m.value = "";
|
|
210
|
+
try {
|
|
211
|
+
const e = await F(T.appTemplateRegistry());
|
|
212
|
+
h.value = e.templates;
|
|
213
|
+
} catch (e) {
|
|
214
|
+
m.value = I(e);
|
|
215
|
+
} finally {
|
|
216
|
+
k.value = !1;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
const c = n([]), C = n(!1), g = n("");
|
|
220
|
+
async function R() {
|
|
221
|
+
C.value = !0, g.value = "";
|
|
222
|
+
try {
|
|
223
|
+
const e = await F(T.pendingTemplateChanges());
|
|
224
|
+
c.value = e.changes;
|
|
225
|
+
} catch (e) {
|
|
226
|
+
g.value = I(e);
|
|
227
|
+
} finally {
|
|
228
|
+
C.value = !1;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
async function P() {
|
|
232
|
+
await Promise.all([f(), R()]);
|
|
233
|
+
}
|
|
234
|
+
function $() {
|
|
235
|
+
v.open({
|
|
236
|
+
title: "Create template",
|
|
237
|
+
dialogComponent: de,
|
|
238
|
+
dialogComponentProps: { onClose: () => v.close(), onCreated: () => void P() }
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
function i(e) {
|
|
242
|
+
v.open({
|
|
243
|
+
title: "Reclassify",
|
|
244
|
+
dialogComponent: ie,
|
|
245
|
+
dialogComponentProps: {
|
|
246
|
+
appTemplateId: e.id,
|
|
247
|
+
industries: e.industries,
|
|
248
|
+
onClose: () => v.close(),
|
|
249
|
+
onUpdated: (l) => {
|
|
250
|
+
const r = h.value.find((t) => t.id === e.id);
|
|
251
|
+
r && (r.industries = l);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
const w = n(null);
|
|
257
|
+
async function E(e) {
|
|
258
|
+
w.value = e.pullRequestNumber, g.value = "";
|
|
259
|
+
try {
|
|
260
|
+
await F(T.mergePendingTemplateChange(e.pullRequestNumber), { method: "POST" }), await P();
|
|
261
|
+
} catch (l) {
|
|
262
|
+
g.value = I(l);
|
|
263
|
+
} finally {
|
|
264
|
+
w.value = null;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
async function j(e) {
|
|
268
|
+
w.value = e.pullRequestNumber, g.value = "";
|
|
269
|
+
try {
|
|
270
|
+
await F(T.rejectPendingTemplateChange(e.pullRequestNumber), { method: "POST" }), await P();
|
|
271
|
+
} catch (l) {
|
|
272
|
+
g.value = I(l);
|
|
273
|
+
} finally {
|
|
274
|
+
w.value = null;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
function M(e) {
|
|
278
|
+
const l = e.kind === "delete" ? "delete" : "create";
|
|
279
|
+
v.open({
|
|
280
|
+
title: `Merge — ${l} ${e.appTemplateId}?`,
|
|
281
|
+
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 and its registry row is removed immediately — no control-plane redeploy involved.` : 'Merges the pull request into main as-is, without a code review step here. "Edit code" becomes available for it right away — it stays a draft, invisible to merchants, until you publish it below.',
|
|
282
|
+
primaryActions: { text: "Merge", close: !0, variant: "primary" },
|
|
283
|
+
secondaryActions: { text: "Cancel", close: !0, variant: "tertiary" }
|
|
284
|
+
}).onPrimary(() => void E(e));
|
|
285
|
+
}
|
|
286
|
+
function _(e) {
|
|
287
|
+
v.open({
|
|
288
|
+
title: `Reject — ${e.kind === "delete" ? "delete" : "create"} ${e.appTemplateId}?`,
|
|
289
|
+
message: "Closes the pull request without merging and deletes its branch. Nothing of this change is kept.",
|
|
290
|
+
primaryActions: { text: "Reject", close: !0, variant: "destructive" },
|
|
291
|
+
secondaryActions: { text: "Cancel", close: !0, variant: "tertiary" }
|
|
292
|
+
}).onPrimary(() => void j(e));
|
|
293
|
+
}
|
|
294
|
+
const U = n(null);
|
|
295
|
+
async function H(e) {
|
|
296
|
+
U.value = e, d.value = "";
|
|
297
|
+
try {
|
|
298
|
+
await F(T.deleteAppTemplate(e), { method: "POST" }), await R();
|
|
299
|
+
} catch (l) {
|
|
300
|
+
d.value = I(l);
|
|
301
|
+
} finally {
|
|
302
|
+
U.value = null;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
function W(e) {
|
|
306
|
+
v.open({
|
|
307
|
+
title: `Delete ${e}?`,
|
|
308
|
+
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.`,
|
|
309
|
+
primaryActions: { text: "Delete", close: !0, variant: "destructive" },
|
|
310
|
+
secondaryActions: { text: "Cancel", close: !0, variant: "tertiary" }
|
|
311
|
+
}).onPrimary(() => void H(e));
|
|
312
|
+
}
|
|
313
|
+
const N = n(null);
|
|
314
|
+
async function z(e, l) {
|
|
315
|
+
N.value = e, d.value = "";
|
|
316
|
+
try {
|
|
317
|
+
const r = l ? T.publishAppTemplate(e) : T.unpublishAppTemplate(e);
|
|
318
|
+
await F(r, { method: "POST" }), await f();
|
|
319
|
+
} catch (r) {
|
|
320
|
+
d.value = I(r);
|
|
321
|
+
} finally {
|
|
322
|
+
N.value = null;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
function K(e) {
|
|
326
|
+
v.open({
|
|
327
|
+
title: `Unpublish ${e.id}?`,
|
|
328
|
+
message: "Stops offering it to new merchants immediately. Merchants already provisioned from it are unaffected.",
|
|
329
|
+
primaryActions: { text: "Unpublish", close: !0, variant: "destructive" },
|
|
330
|
+
secondaryActions: { text: "Cancel", close: !0, variant: "tertiary" }
|
|
331
|
+
}).onPrimary(() => void z(e.id, !1));
|
|
332
|
+
}
|
|
333
|
+
Y(() => void P());
|
|
334
|
+
async function Q(e) {
|
|
335
|
+
if (!b.value) {
|
|
336
|
+
b.value = e, d.value = "";
|
|
337
|
+
try {
|
|
338
|
+
const l = await F(
|
|
339
|
+
T.appTemplateEditingProject(e),
|
|
340
|
+
{ method: "POST" }
|
|
341
|
+
);
|
|
342
|
+
await q.push(
|
|
343
|
+
ae(l.projectId, "workspace", q.currentRoute.value.query, { templateEditing: !0 })
|
|
344
|
+
);
|
|
345
|
+
} catch (l) {
|
|
346
|
+
d.value = I(l);
|
|
347
|
+
} finally {
|
|
348
|
+
b.value = null;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
return (e, l) => {
|
|
353
|
+
const r = A("FmButton");
|
|
354
|
+
return s(), o("div", ce, [
|
|
355
|
+
a("div", pe, [
|
|
356
|
+
a("header", me, [
|
|
357
|
+
l[1] || (l[1] = a("div", null, [
|
|
358
|
+
a("p", { class: "portal-eyebrow" }, "Internal"),
|
|
359
|
+
a("h1", null, "Template library")
|
|
360
|
+
], -1)),
|
|
361
|
+
a("div", ve, [
|
|
362
|
+
u(r, {
|
|
363
|
+
label: "Create template",
|
|
364
|
+
variant: "primary",
|
|
365
|
+
onClick: l[0] || (l[0] = (t) => $())
|
|
366
|
+
})
|
|
367
|
+
])
|
|
368
|
+
]),
|
|
369
|
+
d.value ? (s(), o("p", he, p(d.value), 1)) : y("", !0),
|
|
370
|
+
g.value || c.value.length > 0 ? (s(), o("section", ge, [
|
|
371
|
+
a("div", be, [
|
|
372
|
+
l[2] || (l[2] = a("h2", { class: "template-section-title" }, "In review", -1)),
|
|
373
|
+
u(r, {
|
|
374
|
+
label: "Refresh",
|
|
375
|
+
variant: "tertiary",
|
|
376
|
+
size: "md",
|
|
377
|
+
loading: C.value,
|
|
378
|
+
onClick: R
|
|
379
|
+
}, null, 8, ["loading"])
|
|
380
|
+
]),
|
|
381
|
+
l[3] || (l[3] = a("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)),
|
|
382
|
+
g.value ? (s(), o("p", fe, [
|
|
383
|
+
x(p(g.value) + " ", 1),
|
|
384
|
+
u(r, {
|
|
385
|
+
label: "Retry",
|
|
386
|
+
variant: "tertiary",
|
|
387
|
+
onClick: R
|
|
388
|
+
})
|
|
389
|
+
])) : y("", !0),
|
|
390
|
+
c.value.length > 0 ? (s(), o("section", _e, [
|
|
391
|
+
(s(!0), o(D, null, G(c.value, (t) => (s(), o("article", {
|
|
392
|
+
key: t.pullRequestNumber,
|
|
393
|
+
class: "template-choices__row"
|
|
394
|
+
}, [
|
|
395
|
+
a("div", ye, [
|
|
396
|
+
a("span", ke, [
|
|
397
|
+
x(p(t.appTemplateId), 1),
|
|
398
|
+
t.kind === "delete" ? (s(), o("span", Ce, " · Delete")) : y("", !0)
|
|
399
|
+
]),
|
|
400
|
+
a("span", we, "Awaiting review — PR #" + p(t.pullRequestNumber), 1)
|
|
401
|
+
]),
|
|
402
|
+
a("div", Te, [
|
|
403
|
+
a("a", {
|
|
404
|
+
class: "template-review-link",
|
|
405
|
+
href: t.pullRequestUrl,
|
|
406
|
+
target: "_blank",
|
|
407
|
+
rel: "noopener"
|
|
408
|
+
}, "Review PR", 8, Re),
|
|
409
|
+
u(r, {
|
|
410
|
+
label: "Merge",
|
|
411
|
+
variant: "primary",
|
|
412
|
+
loading: w.value === t.pullRequestNumber,
|
|
413
|
+
disabled: w.value !== null,
|
|
414
|
+
onClick: (V) => M(t)
|
|
415
|
+
}, null, 8, ["loading", "disabled", "onClick"]),
|
|
416
|
+
u(r, {
|
|
417
|
+
label: "Reject",
|
|
418
|
+
variant: "destructive",
|
|
419
|
+
disabled: w.value !== null,
|
|
420
|
+
onClick: (V) => _(t)
|
|
421
|
+
}, null, 8, ["disabled", "onClick"])
|
|
422
|
+
])
|
|
423
|
+
]))), 128))
|
|
424
|
+
])) : y("", !0)
|
|
425
|
+
])) : y("", !0),
|
|
426
|
+
a("div", Pe, [
|
|
427
|
+
l[4] || (l[4] = a("h2", { class: "template-section-title" }, "Physical templates", -1)),
|
|
428
|
+
u(r, {
|
|
429
|
+
label: "Refresh",
|
|
430
|
+
variant: "tertiary",
|
|
431
|
+
size: "md",
|
|
432
|
+
loading: k.value,
|
|
433
|
+
onClick: f
|
|
434
|
+
}, null, 8, ["loading"])
|
|
435
|
+
]),
|
|
436
|
+
l[5] || (l[5] = a("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. A draft is invisible to merchants until Published; "Delete" opens a PR removing it instead — refused outright for the default template or one any project still uses. "Reclassify" changes which sidebar tab this template shows under in the merchant picker — unlike the others, it takes effect immediately rather than waiting on PR merge. ', -1)),
|
|
437
|
+
m.value ? (s(), o("p", Fe, [
|
|
438
|
+
x(p(m.value) + " ", 1),
|
|
439
|
+
u(r, {
|
|
440
|
+
label: "Retry",
|
|
441
|
+
variant: "tertiary",
|
|
442
|
+
onClick: f
|
|
443
|
+
})
|
|
444
|
+
])) : y("", !0),
|
|
445
|
+
a("section", Ie, [
|
|
446
|
+
(s(!0), o(D, null, G(h.value, (t) => (s(), o("article", {
|
|
447
|
+
key: t.id,
|
|
448
|
+
class: "template-choices__row"
|
|
449
|
+
}, [
|
|
450
|
+
a("div", xe, [
|
|
451
|
+
a("span", Ae, [
|
|
452
|
+
x(p(t.label), 1),
|
|
453
|
+
t.default ? (s(), o("span", $e, " · Default")) : y("", !0)
|
|
454
|
+
]),
|
|
455
|
+
a("span", qe, p(t.id), 1),
|
|
456
|
+
a("span", Ne, [
|
|
457
|
+
t.restaurantStyle ? (s(), o(D, { key: 0 }, [
|
|
458
|
+
x(p(t.restaurantStyle) + " · ", 1)
|
|
459
|
+
], 64)) : y("", !0),
|
|
460
|
+
x(p(t.industries.join(", ") || "General-purpose") + " · " + p(t.environments.join(", ")), 1)
|
|
461
|
+
])
|
|
462
|
+
]),
|
|
463
|
+
t.pullRequestNumber ? (s(), o("span", Ve, " Awaiting merge — PR #" + p(t.pullRequestNumber), 1)) : (s(), o("span", {
|
|
464
|
+
key: 1,
|
|
465
|
+
class: Z(["template-status-badge", `template-status-badge--${t.status}`])
|
|
466
|
+
}, p(t.status === "published" ? "Published" : "Draft"), 3)),
|
|
467
|
+
a("div", De, [
|
|
468
|
+
t.pullRequestNumber ? y("", !0) : (s(), o(D, { key: 0 }, [
|
|
469
|
+
t.status === "draft" ? (s(), S(r, {
|
|
470
|
+
key: 0,
|
|
471
|
+
label: "Publish",
|
|
472
|
+
variant: "primary",
|
|
473
|
+
loading: N.value === t.id,
|
|
474
|
+
disabled: N.value !== null,
|
|
475
|
+
onClick: (V) => z(t.id, !0)
|
|
476
|
+
}, null, 8, ["loading", "disabled", "onClick"])) : t.default ? y("", !0) : (s(), S(r, {
|
|
477
|
+
key: 1,
|
|
478
|
+
label: "Unpublish",
|
|
479
|
+
variant: "secondary",
|
|
480
|
+
loading: N.value === t.id,
|
|
481
|
+
disabled: N.value !== null,
|
|
482
|
+
onClick: (V) => K(t)
|
|
483
|
+
}, null, 8, ["loading", "disabled", "onClick"])),
|
|
484
|
+
u(r, {
|
|
485
|
+
label: "Edit code",
|
|
486
|
+
variant: "secondary",
|
|
487
|
+
loading: b.value === t.id,
|
|
488
|
+
disabled: b.value !== null,
|
|
489
|
+
onClick: (V) => Q(t.id)
|
|
490
|
+
}, null, 8, ["loading", "disabled", "onClick"]),
|
|
491
|
+
u(r, {
|
|
492
|
+
label: "Reclassify",
|
|
493
|
+
variant: "tertiary",
|
|
494
|
+
onClick: (V) => i(t)
|
|
495
|
+
}, null, 8, ["onClick"])
|
|
496
|
+
], 64)),
|
|
497
|
+
!t.default && !t.pullRequestNumber ? (s(), S(r, {
|
|
498
|
+
key: 1,
|
|
499
|
+
label: "Delete",
|
|
500
|
+
variant: "destructive",
|
|
501
|
+
loading: U.value === t.id,
|
|
502
|
+
disabled: U.value !== null,
|
|
503
|
+
onClick: (V) => W(t.id)
|
|
504
|
+
}, null, 8, ["loading", "disabled", "onClick"])) : y("", !0)
|
|
505
|
+
])
|
|
506
|
+
]))), 128))
|
|
507
|
+
])
|
|
508
|
+
])
|
|
509
|
+
]);
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
}), ze = /* @__PURE__ */ L(Ee, [["__scopeId", "data-v-cccaa200"]]);
|
|
513
|
+
export {
|
|
514
|
+
ze as default
|
|
515
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
4
|
-
import { w as m, a as f } from "./portalNavigation-
|
|
3
|
+
import { u as l } from "./portalContext-BeKN8Bcx.js";
|
|
4
|
+
import { w as m, a as f } from "./portalNavigation-DLcC7Koh.js";
|
|
5
5
|
const _ = {
|
|
6
6
|
class: "portal-loading",
|
|
7
7
|
role: "status"
|
package/dist/app.js
CHANGED
|
@@ -4,64 +4,64 @@ 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-Dvj7YKlO.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-DHtS5IDN.js")
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
path: "/workspace",
|
|
18
18
|
name: "miniprogram-v2-control",
|
|
19
|
-
component: () => import("./WorkspaceEntryView-
|
|
19
|
+
component: () => import("./WorkspaceEntryView-gM7RX5BV.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-fc2wIqfk.js")
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
path: "/brand-kit",
|
|
28
28
|
name: "miniprogram-v2-brand-kit",
|
|
29
29
|
meta: { title: "Brand Kit" },
|
|
30
|
-
component: () => import("./BrandKitView-
|
|
30
|
+
component: () => import("./BrandKitView-CdLMBZKd.js")
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
path: "/pages",
|
|
34
34
|
name: "miniprogram-v2-pages",
|
|
35
35
|
meta: { title: "Pages" },
|
|
36
|
-
component: () => import("./PagesView-
|
|
36
|
+
component: () => import("./PagesView-D0RMTyqw.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-B68s6fiS.js")
|
|
43
43
|
},
|
|
44
44
|
...["tablet", "kiosk"].map((e) => ({
|
|
45
45
|
path: `/platforms/${e}`,
|
|
46
46
|
name: `miniprogram-v2-${e}`,
|
|
47
47
|
meta: { title: e === "tablet" ? "Tablet" : "Kiosk", kind: e },
|
|
48
|
-
component: () => import("./PlatformUnavailableView-
|
|
48
|
+
component: () => import("./PlatformUnavailableView-OHEJAztd.js")
|
|
49
49
|
})),
|
|
50
50
|
{
|
|
51
51
|
// The shared component library, not this merchant's workspace — which is
|
|
52
52
|
// why it sits beside the control view rather than inside it.
|
|
53
53
|
path: "/modules",
|
|
54
54
|
name: "miniprogram-v2-module-center",
|
|
55
|
-
meta: { title: "
|
|
56
|
-
component: () => import("./ModuleCenterView-
|
|
55
|
+
meta: { title: "Component Library" },
|
|
56
|
+
component: () => import("./ModuleCenterView-t8rhd419.js")
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
// Keyed by the module's directory name, which is what the catalog, the
|
|
60
60
|
// delivered library directory and the block-swap skill all already use.
|
|
61
61
|
path: "/modules/:name",
|
|
62
62
|
name: "miniprogram-v2-module-detail",
|
|
63
|
-
meta: { title: "
|
|
64
|
-
component: () => import("./ModuleDetailView-
|
|
63
|
+
meta: { title: "Component Library" },
|
|
64
|
+
component: () => import("./ModuleDetailView-CcqJ4Hfu.js")
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
// Internal-only: linked from the main nav (App.vue), but only once
|
|
@@ -72,16 +72,16 @@ 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-Cpr39Y5S.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-dgkwfArX.js")), n = t(() => import("./LegacyWorkspaceEntry-lEMtmdIe.js"));
|
|
82
82
|
export {
|
|
83
83
|
a as FmApp,
|
|
84
|
-
|
|
84
|
+
n as MiniprogramWorkspace,
|
|
85
85
|
r as i18nMessages,
|
|
86
86
|
o as routes
|
|
87
87
|
};
|
|
@@ -126,19 +126,19 @@ async function I(e, n = {}) {
|
|
|
126
126
|
}
|
|
127
127
|
export {
|
|
128
128
|
T as C,
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
x as a,
|
|
130
|
+
P as b,
|
|
131
131
|
b as c,
|
|
132
|
-
|
|
132
|
+
y as d,
|
|
133
133
|
F as e,
|
|
134
|
-
|
|
134
|
+
I as f,
|
|
135
135
|
E as g,
|
|
136
136
|
u as h,
|
|
137
137
|
C as i,
|
|
138
|
-
|
|
139
|
-
k,
|
|
140
|
-
|
|
141
|
-
|
|
138
|
+
$ as j,
|
|
139
|
+
D as k,
|
|
140
|
+
k as l,
|
|
141
|
+
i as m,
|
|
142
142
|
g as n,
|
|
143
143
|
S as s
|
|
144
144
|
};
|