@feedmepos/mf-miniprogram-v2 0.2.7 → 0.2.8-dev.2
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-qAELeU_7.js → App-C8Vn8LvE.js} +398 -388
- package/dist/{BrandFontPicker-BZyGrK3D.js → BrandFontPicker-JHyoGusq.js} +1 -1
- package/dist/{BrandKitView-CzefaEEN.js → BrandKitView-Dlt_ifI0.js} +2 -2
- package/dist/{ControlPlaneView-8TjwMZNJ.js → ControlPlaneView-qDA8RgiR.js} +6878 -6878
- package/dist/{EcosystemView-C-y5cPOp.js → EcosystemView-XP9IZ9wn.js} +4 -4
- package/dist/{LegacyWorkspaceEntry-CADRpDkg.js → LegacyWorkspaceEntry-lEMtmdIe.js} +1 -1
- package/dist/{MobileProjectsView-QBTJVYB9.js → MobileProjectsView-aAyHV5G-.js} +5 -5
- package/dist/{ModuleCenterView-B08oZqQw.js → ModuleCenterView-C6mCPATr.js} +1 -1
- package/dist/{ModuleDetailView-lROTkaR7.js → ModuleDetailView-CSfMF0Uo.js} +1 -1
- package/dist/{PagesView-DOG8RSen.js → PagesView-DzDqCd8N.js} +2 -2
- package/dist/{PlatformUnavailableView-C1RltAIw.js → PlatformUnavailableView-CdHjkolw.js} +1 -1
- package/dist/{PortalSettingsView-BK6kRgtf.js → PortalSettingsView-Df5jChmi.js} +5 -5
- package/dist/{TemplateCenterView-niXTXw9y.js → TemplateCenterView-DrWImUYO.js} +68 -69
- package/dist/{WorkspaceEntryView-DzR8DQC5.js → WorkspaceEntryView-DQkYJWdf.js} +2 -2
- package/dist/adminAccess-D2K-L-Vt.js +61 -0
- package/dist/app.js +12 -12
- package/dist/{controlPlane-DT3t_ftg.js → controlPlane-sXaC6pAh.js} +11 -11
- package/dist/package.json +1 -1
- package/dist/{portalContext-B2pXdNtB.js → portalContext-DV-6uUwp.js} +1 -1
- package/dist/portalNavigation-C29ihtq_.js +38 -0
- package/dist/style.css +1 -1
- package/dist/{useBrandKit-CQv08nyY.js → useBrandKit-CXLIXo5j.js} +2 -2
- package/dist/{useModuleCatalog-B9HXHA-e.js → useModuleCatalog-Cep-pzWO.js} +1 -1
- package/package.json +1 -1
- package/dist/adminAccess-CDxAuQ-M.js +0 -48
- package/dist/portalNavigation-DKCfwTH8.js +0 -28
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as L, ref as o, computed as K, resolveComponent as F, openBlock as s, createBlock as S, withCtx as Q, createElementVNode as a, createElementBlock as i, Fragment as x, createTextVNode as R, toDisplayString as u, createVNode as c, createCommentVNode as v, onMounted as X, renderList as M, normalizeClass as Y } from "vue";
|
|
2
2
|
import { a as k } from "./routes-CeuodIgg.js";
|
|
3
3
|
import { useDialog as Z } from "@feedmepos/ui-library";
|
|
4
4
|
import { useRouter as ee } from "vue-router";
|
|
5
|
-
import { c as C, e as T } from "./controlPlane-
|
|
6
|
-
import { _ as
|
|
7
|
-
|
|
5
|
+
import { c as C, e as T } from "./controlPlane-sXaC6pAh.js";
|
|
6
|
+
import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
+
import { w as te } from "./portalNavigation-C29ihtq_.js";
|
|
8
|
+
const ae = ["href"], le = {
|
|
8
9
|
key: 0,
|
|
9
10
|
class: "portal-error",
|
|
10
11
|
role: "alert"
|
|
11
|
-
},
|
|
12
|
+
}, se = "miniprogram-vue-v2", ie = /* @__PURE__ */ L({
|
|
12
13
|
__name: "ForkTemplateDialog",
|
|
13
14
|
emits: ["close", "created"],
|
|
14
|
-
setup(z, { emit:
|
|
15
|
-
const b =
|
|
15
|
+
setup(z, { emit: I }) {
|
|
16
|
+
const b = I, d = o(""), _ = o(""), P = o(""), p = o(!1), y = o(""), w = o(""), A = o(0), q = /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/, m = K(
|
|
16
17
|
() => !p.value && q.test(d.value.trim()) && _.value.trim().length > 0 && P.value.trim().length > 0
|
|
17
18
|
);
|
|
18
19
|
async function $() {
|
|
@@ -22,7 +23,7 @@ const te = ["href"], ae = {
|
|
|
22
23
|
const f = await C(k.forkAppTemplate(), {
|
|
23
24
|
method: "POST",
|
|
24
25
|
body: JSON.stringify({
|
|
25
|
-
sourceAppTemplateId:
|
|
26
|
+
sourceAppTemplateId: se,
|
|
26
27
|
newAppTemplateId: d.value.trim(),
|
|
27
28
|
label: _.value.trim(),
|
|
28
29
|
description: P.value.trim()
|
|
@@ -37,8 +38,8 @@ const te = ["href"], ae = {
|
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
return (f, n) => {
|
|
40
|
-
const h = F("FmButton"),
|
|
41
|
-
return s(),
|
|
41
|
+
const h = F("FmButton"), E = F("FmTextField"), j = F("FmTextarea"), O = F("FmCard");
|
|
42
|
+
return s(), S(O, { class: "fork-template-dialog" }, {
|
|
42
43
|
default: Q(() => [
|
|
43
44
|
n[7] || (n[7] = a("h2", null, "Create template", -1)),
|
|
44
45
|
w.value ? (s(), i(x, { key: 0 }, [
|
|
@@ -53,7 +54,7 @@ const te = ["href"], ae = {
|
|
|
53
54
|
href: w.value,
|
|
54
55
|
target: "_blank",
|
|
55
56
|
rel: "noopener"
|
|
56
|
-
}, "Review PR", 8,
|
|
57
|
+
}, "Review PR", 8, ae),
|
|
57
58
|
c(h, {
|
|
58
59
|
label: "Done",
|
|
59
60
|
onClick: n[0] || (n[0] = (g) => b("close"))
|
|
@@ -61,7 +62,7 @@ const te = ["href"], ae = {
|
|
|
61
62
|
])
|
|
62
63
|
], 64)) : (s(), i(x, { key: 1 }, [
|
|
63
64
|
n[6] || (n[6] = 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)),
|
|
64
|
-
c(
|
|
65
|
+
c(E, {
|
|
65
66
|
modelValue: d.value,
|
|
66
67
|
"onUpdate:modelValue": n[1] || (n[1] = (g) => d.value = g),
|
|
67
68
|
label: "New template id",
|
|
@@ -70,21 +71,21 @@ const te = ["href"], ae = {
|
|
|
70
71
|
disabled: p.value,
|
|
71
72
|
rules: [(g) => q.test(g.trim()) || "Lowercase kebab-case, e.g. miniprogram-vue-v2-bakery"]
|
|
72
73
|
}, null, 8, ["modelValue", "disabled", "rules"]),
|
|
73
|
-
c(
|
|
74
|
+
c(E, {
|
|
74
75
|
modelValue: _.value,
|
|
75
76
|
"onUpdate:modelValue": n[2] || (n[2] = (g) => _.value = g),
|
|
76
77
|
label: "Label",
|
|
77
78
|
placeholder: "Shown to merchants in the picker",
|
|
78
79
|
disabled: p.value
|
|
79
80
|
}, null, 8, ["modelValue", "disabled"]),
|
|
80
|
-
c(
|
|
81
|
+
c(j, {
|
|
81
82
|
modelValue: P.value,
|
|
82
83
|
"onUpdate:modelValue": n[3] || (n[3] = (g) => P.value = g),
|
|
83
84
|
label: "Description",
|
|
84
85
|
placeholder: "One or two sentences on what the merchant gets",
|
|
85
86
|
disabled: p.value
|
|
86
87
|
}, null, 8, ["modelValue", "disabled"]),
|
|
87
|
-
y.value ? (s(), i("p",
|
|
88
|
+
y.value ? (s(), i("p", le, u(y.value), 1)) : v("", !0),
|
|
88
89
|
a("footer", null, [
|
|
89
90
|
c(h, {
|
|
90
91
|
label: "Cancel",
|
|
@@ -105,35 +106,35 @@ const te = ["href"], ae = {
|
|
|
105
106
|
});
|
|
106
107
|
};
|
|
107
108
|
}
|
|
108
|
-
}),
|
|
109
|
+
}), ne = /* @__PURE__ */ B(ie, [["__scopeId", "data-v-5a38928f"]]), oe = { class: "portal-page" }, re = { class: "portal-page-inner" }, ue = { class: "portal-page-heading" }, de = { class: "portal-page-heading__actions" }, ce = {
|
|
109
110
|
key: 0,
|
|
110
111
|
class: "portal-error",
|
|
111
112
|
role: "alert"
|
|
112
|
-
},
|
|
113
|
+
}, pe = {
|
|
113
114
|
key: 1,
|
|
114
115
|
"aria-label": "Templates in review"
|
|
115
|
-
},
|
|
116
|
+
}, me = { class: "template-section-heading" }, ve = {
|
|
116
117
|
key: 0,
|
|
117
118
|
class: "portal-error",
|
|
118
119
|
role: "alert"
|
|
119
|
-
},
|
|
120
|
+
}, he = {
|
|
120
121
|
key: 1,
|
|
121
122
|
class: "template-choices__list",
|
|
122
123
|
"aria-label": "Templates in review"
|
|
123
|
-
},
|
|
124
|
+
}, ge = { class: "template-choices__name" }, be = { class: "template-choices__label" }, _e = { key: 0 }, fe = { class: "template-choices__id" }, ye = { class: "template-choices__actions" }, ke = ["href"], we = { class: "template-section-heading" }, Ce = {
|
|
124
125
|
key: 2,
|
|
125
126
|
class: "portal-error",
|
|
126
127
|
role: "alert"
|
|
127
|
-
},
|
|
128
|
+
}, Te = {
|
|
128
129
|
class: "template-choices__list",
|
|
129
130
|
"aria-label": "Physical templates"
|
|
130
|
-
},
|
|
131
|
+
}, Re = { class: "template-choices__name" }, Pe = { class: "template-choices__label" }, Ae = { key: 0 }, qe = { class: "template-choices__id" }, $e = { class: "template-choices__meta" }, Ne = {
|
|
131
132
|
key: 0,
|
|
132
133
|
class: "template-status-badge template-status-badge--draft"
|
|
133
|
-
},
|
|
134
|
+
}, xe = { class: "template-choices__actions" }, De = /* @__PURE__ */ L({
|
|
134
135
|
__name: "TemplateCenterView",
|
|
135
136
|
setup(z) {
|
|
136
|
-
const
|
|
137
|
+
const I = ee(), b = Z(), d = o(""), _ = o(null), P = o([]), p = o(!1), y = o("");
|
|
137
138
|
async function w() {
|
|
138
139
|
p.value = !0, y.value = "";
|
|
139
140
|
try {
|
|
@@ -163,12 +164,12 @@ const te = ["href"], ae = {
|
|
|
163
164
|
function n() {
|
|
164
165
|
b.open({
|
|
165
166
|
title: "Create template",
|
|
166
|
-
dialogComponent:
|
|
167
|
+
dialogComponent: ne,
|
|
167
168
|
dialogComponentProps: { onClose: () => b.close(), onCreated: () => void f() }
|
|
168
169
|
});
|
|
169
170
|
}
|
|
170
171
|
const h = o(null);
|
|
171
|
-
async function
|
|
172
|
+
async function E(e) {
|
|
172
173
|
h.value = e.pullRequestNumber, m.value = "";
|
|
173
174
|
try {
|
|
174
175
|
await C(k.mergePendingTemplateChange(e.pullRequestNumber), { method: "POST" }), await f();
|
|
@@ -178,7 +179,7 @@ const te = ["href"], ae = {
|
|
|
178
179
|
h.value = null;
|
|
179
180
|
}
|
|
180
181
|
}
|
|
181
|
-
async function
|
|
182
|
+
async function j(e) {
|
|
182
183
|
h.value = e.pullRequestNumber, m.value = "";
|
|
183
184
|
try {
|
|
184
185
|
await C(k.rejectPendingTemplateChange(e.pullRequestNumber), { method: "POST" }), await f();
|
|
@@ -195,7 +196,7 @@ const te = ["href"], ae = {
|
|
|
195
196
|
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.',
|
|
196
197
|
primaryActions: { text: "Merge", close: !0, variant: "primary" },
|
|
197
198
|
secondaryActions: { text: "Cancel", close: !0, variant: "tertiary" }
|
|
198
|
-
}).onPrimary(() => void
|
|
199
|
+
}).onPrimary(() => void E(e));
|
|
199
200
|
}
|
|
200
201
|
function g(e) {
|
|
201
202
|
b.open({
|
|
@@ -203,17 +204,17 @@ const te = ["href"], ae = {
|
|
|
203
204
|
message: "Closes the pull request without merging and deletes its branch. Nothing of this change is kept.",
|
|
204
205
|
primaryActions: { text: "Reject", close: !0, variant: "destructive" },
|
|
205
206
|
secondaryActions: { text: "Cancel", close: !0, variant: "tertiary" }
|
|
206
|
-
}).onPrimary(() => void
|
|
207
|
+
}).onPrimary(() => void j(e));
|
|
207
208
|
}
|
|
208
|
-
const
|
|
209
|
+
const V = o(null);
|
|
209
210
|
async function G(e) {
|
|
210
|
-
|
|
211
|
+
V.value = e, d.value = "";
|
|
211
212
|
try {
|
|
212
213
|
await C(k.deleteAppTemplate(e), { method: "POST" }), await $();
|
|
213
214
|
} catch (l) {
|
|
214
215
|
d.value = T(l);
|
|
215
216
|
} finally {
|
|
216
|
-
|
|
217
|
+
V.value = null;
|
|
217
218
|
}
|
|
218
219
|
}
|
|
219
220
|
function H(e) {
|
|
@@ -253,11 +254,9 @@ const te = ["href"], ae = {
|
|
|
253
254
|
k.appTemplateEditingProject(e),
|
|
254
255
|
{ method: "POST" }
|
|
255
256
|
);
|
|
256
|
-
await
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
query: { tpl: "1" }
|
|
260
|
-
});
|
|
257
|
+
await I.push(
|
|
258
|
+
te(l.projectId, "workspace", I.currentRoute.value.query, { templateEditing: !0 })
|
|
259
|
+
);
|
|
261
260
|
} catch (l) {
|
|
262
261
|
d.value = T(l);
|
|
263
262
|
} finally {
|
|
@@ -267,14 +266,14 @@ const te = ["href"], ae = {
|
|
|
267
266
|
}
|
|
268
267
|
return (e, l) => {
|
|
269
268
|
const r = F("FmButton");
|
|
270
|
-
return s(), i("div",
|
|
271
|
-
a("div",
|
|
272
|
-
a("header",
|
|
269
|
+
return s(), i("div", oe, [
|
|
270
|
+
a("div", re, [
|
|
271
|
+
a("header", ue, [
|
|
273
272
|
l[1] || (l[1] = a("div", null, [
|
|
274
273
|
a("p", { class: "portal-eyebrow" }, "Internal"),
|
|
275
274
|
a("h1", null, "Template library")
|
|
276
275
|
], -1)),
|
|
277
|
-
a("div",
|
|
276
|
+
a("div", de, [
|
|
278
277
|
c(r, {
|
|
279
278
|
label: "Create template",
|
|
280
279
|
variant: "primary",
|
|
@@ -282,9 +281,9 @@ const te = ["href"], ae = {
|
|
|
282
281
|
})
|
|
283
282
|
])
|
|
284
283
|
]),
|
|
285
|
-
d.value ? (s(), i("p",
|
|
286
|
-
m.value || A.value.length > 0 ? (s(), i("section",
|
|
287
|
-
a("div",
|
|
284
|
+
d.value ? (s(), i("p", ce, u(d.value), 1)) : v("", !0),
|
|
285
|
+
m.value || A.value.length > 0 ? (s(), i("section", pe, [
|
|
286
|
+
a("div", me, [
|
|
288
287
|
l[2] || (l[2] = a("h2", { class: "template-section-title" }, "In review", -1)),
|
|
289
288
|
c(r, {
|
|
290
289
|
label: "Refresh",
|
|
@@ -295,7 +294,7 @@ const te = ["href"], ae = {
|
|
|
295
294
|
}, null, 8, ["loading"])
|
|
296
295
|
]),
|
|
297
296
|
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)),
|
|
298
|
-
m.value ? (s(), i("p",
|
|
297
|
+
m.value ? (s(), i("p", ve, [
|
|
299
298
|
R(u(m.value) + " ", 1),
|
|
300
299
|
c(r, {
|
|
301
300
|
label: "Retry",
|
|
@@ -303,25 +302,25 @@ const te = ["href"], ae = {
|
|
|
303
302
|
onClick: $
|
|
304
303
|
})
|
|
305
304
|
])) : v("", !0),
|
|
306
|
-
A.value.length > 0 ? (s(), i("section",
|
|
305
|
+
A.value.length > 0 ? (s(), i("section", he, [
|
|
307
306
|
(s(!0), i(x, null, M(A.value, (t) => (s(), i("article", {
|
|
308
307
|
key: t.pullRequestNumber,
|
|
309
308
|
class: "template-choices__row"
|
|
310
309
|
}, [
|
|
311
|
-
a("div",
|
|
312
|
-
a("span",
|
|
310
|
+
a("div", ge, [
|
|
311
|
+
a("span", be, [
|
|
313
312
|
R(u(t.appTemplateId), 1),
|
|
314
|
-
t.kind === "delete" ? (s(), i("span",
|
|
313
|
+
t.kind === "delete" ? (s(), i("span", _e, " · Delete")) : v("", !0)
|
|
315
314
|
]),
|
|
316
|
-
a("span",
|
|
315
|
+
a("span", fe, "Awaiting review — PR #" + u(t.pullRequestNumber), 1)
|
|
317
316
|
]),
|
|
318
|
-
a("div",
|
|
317
|
+
a("div", ye, [
|
|
319
318
|
a("a", {
|
|
320
319
|
class: "template-review-link",
|
|
321
320
|
href: t.pullRequestUrl,
|
|
322
321
|
target: "_blank",
|
|
323
322
|
rel: "noopener"
|
|
324
|
-
}, "Review PR", 8,
|
|
323
|
+
}, "Review PR", 8, ke),
|
|
325
324
|
c(r, {
|
|
326
325
|
label: "Merge",
|
|
327
326
|
variant: "primary",
|
|
@@ -339,7 +338,7 @@ const te = ["href"], ae = {
|
|
|
339
338
|
]))), 128))
|
|
340
339
|
])) : v("", !0)
|
|
341
340
|
])) : v("", !0),
|
|
342
|
-
a("div",
|
|
341
|
+
a("div", we, [
|
|
343
342
|
l[4] || (l[4] = a("h2", { class: "template-section-title" }, "Physical templates", -1)),
|
|
344
343
|
c(r, {
|
|
345
344
|
label: "Refresh",
|
|
@@ -350,7 +349,7 @@ const te = ["href"], ae = {
|
|
|
350
349
|
}, null, 8, ["loading"])
|
|
351
350
|
]),
|
|
352
351
|
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. ', -1)),
|
|
353
|
-
y.value ? (s(), i("p",
|
|
352
|
+
y.value ? (s(), i("p", Ce, [
|
|
354
353
|
R(u(y.value) + " ", 1),
|
|
355
354
|
c(r, {
|
|
356
355
|
label: "Retry",
|
|
@@ -358,38 +357,38 @@ const te = ["href"], ae = {
|
|
|
358
357
|
onClick: w
|
|
359
358
|
})
|
|
360
359
|
])) : v("", !0),
|
|
361
|
-
a("section",
|
|
360
|
+
a("section", Te, [
|
|
362
361
|
(s(!0), i(x, null, M(P.value, (t) => (s(), i("article", {
|
|
363
362
|
key: t.id,
|
|
364
363
|
class: "template-choices__row"
|
|
365
364
|
}, [
|
|
366
|
-
a("div",
|
|
367
|
-
a("span",
|
|
365
|
+
a("div", Re, [
|
|
366
|
+
a("span", Pe, [
|
|
368
367
|
R(u(t.label), 1),
|
|
369
|
-
t.default ? (s(), i("span",
|
|
368
|
+
t.default ? (s(), i("span", Ae, " · Default")) : v("", !0)
|
|
370
369
|
]),
|
|
371
|
-
a("span",
|
|
372
|
-
a("span",
|
|
370
|
+
a("span", qe, u(t.id), 1),
|
|
371
|
+
a("span", $e, [
|
|
373
372
|
t.restaurantStyle ? (s(), i(x, { key: 0 }, [
|
|
374
373
|
R(u(t.restaurantStyle) + " · ", 1)
|
|
375
374
|
], 64)) : v("", !0),
|
|
376
375
|
R(u(t.industries.join(", ") || "General-purpose") + " · " + u(t.environments.join(", ")), 1)
|
|
377
376
|
])
|
|
378
377
|
]),
|
|
379
|
-
t.pullRequestNumber ? (s(), i("span",
|
|
378
|
+
t.pullRequestNumber ? (s(), i("span", Ne, " Awaiting merge — PR #" + u(t.pullRequestNumber), 1)) : (s(), i("span", {
|
|
380
379
|
key: 1,
|
|
381
380
|
class: Y(["template-status-badge", `template-status-badge--${t.status}`])
|
|
382
381
|
}, u(t.status === "published" ? "Published" : "Draft"), 3)),
|
|
383
|
-
a("div",
|
|
382
|
+
a("div", xe, [
|
|
384
383
|
t.pullRequestNumber ? v("", !0) : (s(), i(x, { key: 0 }, [
|
|
385
|
-
t.status === "draft" ? (s(),
|
|
384
|
+
t.status === "draft" ? (s(), S(r, {
|
|
386
385
|
key: 0,
|
|
387
386
|
label: "Publish",
|
|
388
387
|
variant: "primary",
|
|
389
388
|
loading: N.value === t.id,
|
|
390
389
|
disabled: N.value !== null,
|
|
391
390
|
onClick: (D) => U(t.id, !0)
|
|
392
|
-
}, null, 8, ["loading", "disabled", "onClick"])) : t.default ? v("", !0) : (s(),
|
|
391
|
+
}, null, 8, ["loading", "disabled", "onClick"])) : t.default ? v("", !0) : (s(), S(r, {
|
|
393
392
|
key: 1,
|
|
394
393
|
label: "Unpublish",
|
|
395
394
|
variant: "secondary",
|
|
@@ -405,12 +404,12 @@ const te = ["href"], ae = {
|
|
|
405
404
|
onClick: (D) => W(t.id)
|
|
406
405
|
}, null, 8, ["loading", "disabled", "onClick"])
|
|
407
406
|
], 64)),
|
|
408
|
-
!t.default && !t.pullRequestNumber ? (s(),
|
|
407
|
+
!t.default && !t.pullRequestNumber ? (s(), S(r, {
|
|
409
408
|
key: 1,
|
|
410
409
|
label: "Delete",
|
|
411
410
|
variant: "destructive",
|
|
412
|
-
loading:
|
|
413
|
-
disabled:
|
|
411
|
+
loading: V.value === t.id,
|
|
412
|
+
disabled: V.value !== null,
|
|
414
413
|
onClick: (D) => H(t.id)
|
|
415
414
|
}, null, 8, ["loading", "disabled", "onClick"])) : v("", !0)
|
|
416
415
|
])
|
|
@@ -420,7 +419,7 @@ const te = ["href"], ae = {
|
|
|
420
419
|
]);
|
|
421
420
|
};
|
|
422
421
|
}
|
|
423
|
-
}),
|
|
422
|
+
}), Ue = /* @__PURE__ */ B(De, [["__scopeId", "data-v-0206eae6"]]);
|
|
424
423
|
export {
|
|
425
|
-
|
|
424
|
+
Ue as default
|
|
426
425
|
};
|
|
@@ -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-DV-6uUwp.js";
|
|
4
|
+
import { w as m, a as f } from "./portalNavigation-C29ihtq_.js";
|
|
5
5
|
const _ = {
|
|
6
6
|
class: "portal-loading",
|
|
7
7
|
role: "status"
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { a as u } from "./routes-CeuodIgg.js";
|
|
2
|
+
import { ref as o } from "vue";
|
|
3
|
+
import { c as a } from "./controlPlane-sXaC6pAh.js";
|
|
4
|
+
function l(e, t) {
|
|
5
|
+
if (typeof window > "u") return t;
|
|
6
|
+
try {
|
|
7
|
+
const n = window.localStorage.getItem(e);
|
|
8
|
+
return n === null ? t : n === "1";
|
|
9
|
+
} catch {
|
|
10
|
+
return t;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
function w(e, t) {
|
|
14
|
+
if (typeof window > "u") return t;
|
|
15
|
+
try {
|
|
16
|
+
const n = Number(window.localStorage.getItem(e));
|
|
17
|
+
return Number.isFinite(n) ? n : t;
|
|
18
|
+
} catch {
|
|
19
|
+
return t;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function f(e, t) {
|
|
23
|
+
if (!(typeof window > "u"))
|
|
24
|
+
try {
|
|
25
|
+
window.localStorage.setItem(e, t);
|
|
26
|
+
} catch {
|
|
27
|
+
}
|
|
28
|
+
}
|
|
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;
|
|
53
|
+
}
|
|
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
|
|
61
|
+
};
|
package/dist/app.js
CHANGED
|
@@ -4,48 +4,48 @@ 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-aAyHV5G-.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-XP9IZ9wn.js")
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
path: "/workspace",
|
|
18
18
|
name: "miniprogram-v2-control",
|
|
19
|
-
component: () => import("./WorkspaceEntryView-
|
|
19
|
+
component: () => import("./WorkspaceEntryView-DQkYJWdf.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-qDA8RgiR.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-Dlt_ifI0.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-DzDqCd8N.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-Df5jChmi.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-CdHjkolw.js")
|
|
49
49
|
})),
|
|
50
50
|
{
|
|
51
51
|
// The shared component library, not this merchant's workspace — which is
|
|
@@ -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-C6mCPATr.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-CSfMF0Uo.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-DrWImUYO.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-C8Vn8LvE.js")), i = t(() => import("./LegacyWorkspaceEntry-lEMtmdIe.js"));
|
|
82
82
|
export {
|
|
83
83
|
a as FmApp,
|
|
84
84
|
i as MiniprogramWorkspace,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as f, e as d, D as
|
|
2
|
-
import { useCoreStore as a, FeedMeAuth as
|
|
1
|
+
import { a as f, e as d, D as m } from "./index-CIJWcl_6.js";
|
|
2
|
+
import { useCoreStore as a, FeedMeAuth as p } from "@feedmepos/mf-common";
|
|
3
3
|
const h = [
|
|
4
4
|
"AE",
|
|
5
5
|
"AU",
|
|
@@ -42,11 +42,11 @@ function k(e, n, t) {
|
|
|
42
42
|
function B(e) {
|
|
43
43
|
return e.replace(/\/+$/, "");
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
return B("https://miniprogram-v2-api.
|
|
45
|
+
function v() {
|
|
46
|
+
return B("https://miniprogram-v2-api.feedmedev.vip");
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
const n =
|
|
48
|
+
function y(e) {
|
|
49
|
+
const n = v();
|
|
50
50
|
return n ? `${n}${e.startsWith("/") ? e : `/${e}`}` : e;
|
|
51
51
|
}
|
|
52
52
|
function i() {
|
|
@@ -54,7 +54,7 @@ function i() {
|
|
|
54
54
|
}
|
|
55
55
|
function u() {
|
|
56
56
|
var e;
|
|
57
|
-
return ((e = i()) == null ? void 0 : e._id) ??
|
|
57
|
+
return ((e = i()) == null ? void 0 : e._id) ?? m;
|
|
58
58
|
}
|
|
59
59
|
function C() {
|
|
60
60
|
var e;
|
|
@@ -69,7 +69,7 @@ function $() {
|
|
|
69
69
|
}
|
|
70
70
|
function x() {
|
|
71
71
|
var r;
|
|
72
|
-
const e = (r = C()) == null ? void 0 : r.trim().toLowerCase(), n = e && /^[a-z0-9-]+$/.test(e) ? e : u(), t = f(d("fmmf:
|
|
72
|
+
const e = (r = C()) == null ? void 0 : r.trim().toLowerCase(), n = e && /^[a-z0-9-]+$/.test(e) ? e : u(), t = f(d("fmmf:dev")).liveDomain;
|
|
73
73
|
return `https://${n}.${t}`;
|
|
74
74
|
}
|
|
75
75
|
function S(e) {
|
|
@@ -85,7 +85,7 @@ class T extends Error {
|
|
|
85
85
|
}
|
|
86
86
|
function c() {
|
|
87
87
|
var n;
|
|
88
|
-
return ((n = a().sessionUser.value) == null ? void 0 : n.token) ||
|
|
88
|
+
return ((n = a().sessionUser.value) == null ? void 0 : n.token) || p.token || "";
|
|
89
89
|
}
|
|
90
90
|
async function E() {
|
|
91
91
|
let e = c();
|
|
@@ -105,7 +105,7 @@ async function l(e, n = {}) {
|
|
|
105
105
|
n.body && !t.has("Content-Type") && t.set("Content-Type", "application/json");
|
|
106
106
|
const r = new AbortController(), o = window.setTimeout(() => r.abort(), 15e3);
|
|
107
107
|
try {
|
|
108
|
-
const s = await P(
|
|
108
|
+
const s = await P(y(e), {
|
|
109
109
|
...n,
|
|
110
110
|
headers: t,
|
|
111
111
|
signal: n.signal ?? r.signal
|
|
@@ -131,7 +131,7 @@ export {
|
|
|
131
131
|
b as c,
|
|
132
132
|
P as d,
|
|
133
133
|
F as e,
|
|
134
|
-
|
|
134
|
+
y as f,
|
|
135
135
|
E as g,
|
|
136
136
|
u as h,
|
|
137
137
|
C as i,
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as b } from "./routes-CeuodIgg.js";
|
|
2
2
|
import { useCoreStore as d } from "@feedmepos/mf-common";
|
|
3
|
-
import { c as g, e as h } from "./controlPlane-
|
|
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";
|
|
5
5
|
function P() {
|
|
6
6
|
const e = d(), r = f(() => {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
function a(r) {
|
|
2
|
+
return r === "releases" || r === "sessions" ? r : "workspace";
|
|
3
|
+
}
|
|
4
|
+
function o(r) {
|
|
5
|
+
const { view: n, tpl: e, setup: t, ...s } = r;
|
|
6
|
+
return s;
|
|
7
|
+
}
|
|
8
|
+
function i(r, n, e, t = {}) {
|
|
9
|
+
return {
|
|
10
|
+
name: "miniprogram-v2-project",
|
|
11
|
+
params: { projectId: r, view: n === "workspace" ? void 0 : n },
|
|
12
|
+
query: {
|
|
13
|
+
...o(e),
|
|
14
|
+
...t.templateEditing ? { tpl: "1" } : {},
|
|
15
|
+
...t.setup ? { setup: "1" } : {}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function c(r, n, e) {
|
|
20
|
+
if (!n || !e || n === e || r.name !== "miniprogram-v2-project" || r.query.tpl === "1") return null;
|
|
21
|
+
const t = o(r.query);
|
|
22
|
+
return typeof t.businessId == "string" && (t.businessId = e), { name: "miniprogram-v2-mobile-projects", query: t };
|
|
23
|
+
}
|
|
24
|
+
function p(r, n = "settings") {
|
|
25
|
+
const e = new URLSearchParams();
|
|
26
|
+
for (const t of ["businessId", "country", "restaurantId"]) {
|
|
27
|
+
const s = r[t];
|
|
28
|
+
typeof s == "string" && e.set(t, s);
|
|
29
|
+
}
|
|
30
|
+
return `/brand/${n}${e.size ? `?${e}` : ""}`;
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
a,
|
|
34
|
+
c as e,
|
|
35
|
+
p as l,
|
|
36
|
+
o as p,
|
|
37
|
+
i as w
|
|
38
|
+
};
|