@feedmepos/mf-miniprogram-v2 0.2.11-dev.2 → 0.2.11-dev.4
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/{ControlPlaneView-CPGMj9dc.js → ControlPlaneView-fqkfezTv.js} +1903 -1904
- package/dist/MobileProjectDialog-CgAIDCT8.js +343 -0
- package/dist/{MobileProjectsView-DVjw5R18.js → MobileProjectsView--u1GnKXK.js} +1 -1
- package/dist/{TemplateCenterView-Bd5haOtu.js → TemplateCenterView-D8AHHZWs.js} +39 -39
- package/dist/app.js +3 -3
- package/dist/package.json +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/MobileProjectDialog-QfVNJfyE.js +0 -446
|
@@ -6,7 +6,7 @@ import { a as O } from "./routes-W8KfuhWL.js";
|
|
|
6
6
|
import { c as U, e as Y } from "./controlPlane-Bn-uDXG_.js";
|
|
7
7
|
import { u as G } from "./portalContext-FZ8_SePb.js";
|
|
8
8
|
import { w as d } from "./portalNavigation-DLcC7Koh.js";
|
|
9
|
-
import { p as H, M as J } from "./MobileProjectDialog-
|
|
9
|
+
import { p as H, M as J } from "./MobileProjectDialog-CgAIDCT8.js";
|
|
10
10
|
import { _ as x } from "./StatusBadge.vue_vue_type_script_setup_true_lang-DMm_s9ua.js";
|
|
11
11
|
import { _ as K } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
const Q = { class: "portal-page" }, W = { class: "portal-page-inner" }, X = { class: "portal-page-heading" }, Z = {
|
|
@@ -1,4 +1,4 @@
|
|
|
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
|
|
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 c, 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
2
|
import "./index-DB33ug2V.js";
|
|
3
3
|
import { a as T } from "./routes-W8KfuhWL.js";
|
|
4
4
|
import { useDialog as ee } from "@feedmepos/ui-library";
|
|
@@ -22,38 +22,38 @@ const le = {
|
|
|
22
22
|
async function m() {
|
|
23
23
|
h.value = !0, k.value = "";
|
|
24
24
|
try {
|
|
25
|
-
const f = b.value.split(",").map((C) => C.trim()).filter((C) => C.length > 0),
|
|
25
|
+
const f = b.value.split(",").map((C) => C.trim()).filter((C) => C.length > 0), p = await F(
|
|
26
26
|
T.updateAppTemplateIndustries(v.appTemplateId),
|
|
27
27
|
{ method: "POST", body: JSON.stringify({ industries: f }) }
|
|
28
28
|
);
|
|
29
|
-
d("updated", [...
|
|
29
|
+
d("updated", [...p.industries]), d("close");
|
|
30
30
|
} catch (f) {
|
|
31
31
|
k.value = I(f);
|
|
32
32
|
} finally {
|
|
33
33
|
h.value = !1;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
return (f,
|
|
36
|
+
return (f, p) => {
|
|
37
37
|
const C = A("FmTextField"), g = A("FmButton"), R = A("FmCard");
|
|
38
38
|
return s(), S(R, { class: "edit-template-industries-dialog" }, {
|
|
39
39
|
default: J(() => [
|
|
40
|
-
a("h2", null, "Reclassify " +
|
|
41
|
-
|
|
40
|
+
a("h2", null, "Reclassify " + c(O.appTemplateId), 1),
|
|
41
|
+
p[2] || (p[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)),
|
|
42
42
|
u(C, {
|
|
43
43
|
modelValue: b.value,
|
|
44
|
-
"onUpdate:modelValue":
|
|
44
|
+
"onUpdate:modelValue": p[0] || (p[0] = (P) => b.value = P),
|
|
45
45
|
label: "Industries",
|
|
46
46
|
placeholder: "e.g. Food & beverage",
|
|
47
47
|
"helper-text": "Comma-separated. Leave blank for general-purpose (Explore).",
|
|
48
48
|
disabled: h.value
|
|
49
49
|
}, null, 8, ["modelValue", "disabled"]),
|
|
50
|
-
k.value ? (s(), o("p", le,
|
|
50
|
+
k.value ? (s(), o("p", le, c(k.value), 1)) : y("", !0),
|
|
51
51
|
a("footer", null, [
|
|
52
52
|
u(g, {
|
|
53
53
|
label: "Cancel",
|
|
54
54
|
variant: "tertiary",
|
|
55
55
|
disabled: h.value,
|
|
56
|
-
onClick:
|
|
56
|
+
onClick: p[1] || (p[1] = (P) => d("close"))
|
|
57
57
|
}, null, 8, ["disabled"]),
|
|
58
58
|
u(g, {
|
|
59
59
|
label: "Save",
|
|
@@ -71,11 +71,11 @@ const le = {
|
|
|
71
71
|
key: 0,
|
|
72
72
|
class: "portal-error",
|
|
73
73
|
role: "alert"
|
|
74
|
-
}, re = "miniprogram-vue-
|
|
74
|
+
}, re = "miniprogram-vue-v3", ue = /* @__PURE__ */ B({
|
|
75
75
|
__name: "ForkTemplateDialog",
|
|
76
76
|
emits: ["close", "created"],
|
|
77
77
|
setup(O, { emit: q }) {
|
|
78
|
-
const v = q, d = n(""), b = n(""), h = n(""), k = n(""), m = n(!1), f = n(""),
|
|
78
|
+
const v = q, d = n(""), b = n(""), h = n(""), k = n(""), m = n(!1), f = n(""), p = n(""), C = n(0), g = /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/, R = X(
|
|
79
79
|
() => !m.value && g.test(d.value.trim()) && b.value.trim().length > 0 && h.value.trim().length > 0
|
|
80
80
|
);
|
|
81
81
|
async function P() {
|
|
@@ -92,7 +92,7 @@ const le = {
|
|
|
92
92
|
industries: k.value.split(",").map((i) => i.trim()).filter((i) => i.length > 0)
|
|
93
93
|
})
|
|
94
94
|
});
|
|
95
|
-
|
|
95
|
+
p.value = $.pullRequestUrl, C.value = $.fileCount, v("created");
|
|
96
96
|
} catch ($) {
|
|
97
97
|
f.value = I($);
|
|
98
98
|
} finally {
|
|
@@ -105,16 +105,16 @@ const le = {
|
|
|
105
105
|
return s(), S(M, { class: "fork-template-dialog" }, {
|
|
106
106
|
default: J(() => [
|
|
107
107
|
i[8] || (i[8] = a("h2", null, "Create template", -1)),
|
|
108
|
-
|
|
108
|
+
p.value ? (s(), o(D, { key: 0 }, [
|
|
109
109
|
a("p", null, [
|
|
110
|
-
x(" Opened a pull request copying " +
|
|
111
|
-
a("code", null, "templates/" +
|
|
110
|
+
x(" Opened a pull request copying " + c(C.value) + " file(s) into a brand-new ", 1),
|
|
111
|
+
a("code", null, "templates/" + c(d.value) + "/", 1),
|
|
112
112
|
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))
|
|
113
113
|
]),
|
|
114
114
|
a("footer", null, [
|
|
115
115
|
a("a", {
|
|
116
116
|
class: "fork-template-dialog__review-link",
|
|
117
|
-
href:
|
|
117
|
+
href: p.value,
|
|
118
118
|
target: "_blank",
|
|
119
119
|
rel: "noopener"
|
|
120
120
|
}, "Review PR", 8, ne),
|
|
@@ -124,15 +124,15 @@ const le = {
|
|
|
124
124
|
})
|
|
125
125
|
])
|
|
126
126
|
], 64)) : (s(), o(D, { key: 1 }, [
|
|
127
|
-
i[7] || (i[7] = a("p", { class: "fork-template-dialog__note" }, " Copies the
|
|
127
|
+
i[7] || (i[7] = a("p", { class: "fork-template-dialog__note" }, " Copies the default FeedMe app template's whole directory into a brand-new, independent one — editing the new one can never affect the default or any other template. Use this to start a new restaurant style rather than editing a style that other merchants already share. ", -1)),
|
|
128
128
|
u(E, {
|
|
129
129
|
modelValue: d.value,
|
|
130
130
|
"onUpdate:modelValue": i[1] || (i[1] = (_) => d.value = _),
|
|
131
131
|
label: "New template id",
|
|
132
|
-
placeholder: "e.g. miniprogram-vue-
|
|
132
|
+
placeholder: "e.g. miniprogram-vue-v3-noodle-bar",
|
|
133
133
|
"helper-text": "Lowercase, kebab-case. Also becomes the directory name and GitHub repository name.",
|
|
134
134
|
disabled: m.value,
|
|
135
|
-
rules: [(_) => g.test(_.trim()) || "Lowercase kebab-case, e.g. miniprogram-vue-
|
|
135
|
+
rules: [(_) => g.test(_.trim()) || "Lowercase kebab-case, e.g. miniprogram-vue-v3-noodle-bar"]
|
|
136
136
|
}, null, 8, ["modelValue", "disabled", "rules"]),
|
|
137
137
|
u(E, {
|
|
138
138
|
modelValue: b.value,
|
|
@@ -156,7 +156,7 @@ const le = {
|
|
|
156
156
|
"helper-text": "Comma-separated. Groups this template under a sidebar tab in the merchant picker; leave blank for general-purpose (Explore).",
|
|
157
157
|
disabled: m.value
|
|
158
158
|
}, null, 8, ["modelValue", "disabled"]),
|
|
159
|
-
f.value ? (s(), o("p", oe,
|
|
159
|
+
f.value ? (s(), o("p", oe, c(f.value), 1)) : y("", !0),
|
|
160
160
|
a("footer", null, [
|
|
161
161
|
u(w, {
|
|
162
162
|
label: "Cancel",
|
|
@@ -177,7 +177,7 @@ const le = {
|
|
|
177
177
|
});
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
|
-
}), de = /* @__PURE__ */ L(ue, [["__scopeId", "data-v-
|
|
180
|
+
}), de = /* @__PURE__ */ L(ue, [["__scopeId", "data-v-4b1a6e79"]]), pe = { class: "portal-page" }, ce = { class: "portal-page-inner" }, me = { class: "portal-page-heading" }, ve = { class: "portal-page-heading__actions" }, he = {
|
|
181
181
|
key: 0,
|
|
182
182
|
class: "portal-error",
|
|
183
183
|
role: "alert"
|
|
@@ -217,12 +217,12 @@ const le = {
|
|
|
217
217
|
k.value = !1;
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
|
-
const
|
|
220
|
+
const p = n([]), C = n(!1), g = n("");
|
|
221
221
|
async function R() {
|
|
222
222
|
C.value = !0, g.value = "";
|
|
223
223
|
try {
|
|
224
224
|
const e = await F(T.pendingTemplateChanges());
|
|
225
|
-
|
|
225
|
+
p.value = e.changes;
|
|
226
226
|
} catch (e) {
|
|
227
227
|
g.value = I(e);
|
|
228
228
|
} finally {
|
|
@@ -352,8 +352,8 @@ const le = {
|
|
|
352
352
|
}
|
|
353
353
|
return (e, l) => {
|
|
354
354
|
const r = A("FmButton");
|
|
355
|
-
return s(), o("div",
|
|
356
|
-
a("div",
|
|
355
|
+
return s(), o("div", pe, [
|
|
356
|
+
a("div", ce, [
|
|
357
357
|
a("header", me, [
|
|
358
358
|
l[1] || (l[1] = a("div", null, [
|
|
359
359
|
a("p", { class: "portal-eyebrow" }, "Internal"),
|
|
@@ -367,8 +367,8 @@ const le = {
|
|
|
367
367
|
})
|
|
368
368
|
])
|
|
369
369
|
]),
|
|
370
|
-
d.value ? (s(), o("p", he,
|
|
371
|
-
g.value ||
|
|
370
|
+
d.value ? (s(), o("p", he, c(d.value), 1)) : y("", !0),
|
|
371
|
+
g.value || p.value.length > 0 ? (s(), o("section", ge, [
|
|
372
372
|
a("div", be, [
|
|
373
373
|
l[2] || (l[2] = a("h2", { class: "template-section-title" }, "In review", -1)),
|
|
374
374
|
u(r, {
|
|
@@ -381,24 +381,24 @@ const le = {
|
|
|
381
381
|
]),
|
|
382
382
|
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)),
|
|
383
383
|
g.value ? (s(), o("p", fe, [
|
|
384
|
-
x(
|
|
384
|
+
x(c(g.value) + " ", 1),
|
|
385
385
|
u(r, {
|
|
386
386
|
label: "Retry",
|
|
387
387
|
variant: "tertiary",
|
|
388
388
|
onClick: R
|
|
389
389
|
})
|
|
390
390
|
])) : y("", !0),
|
|
391
|
-
|
|
392
|
-
(s(!0), o(D, null, G(
|
|
391
|
+
p.value.length > 0 ? (s(), o("section", _e, [
|
|
392
|
+
(s(!0), o(D, null, G(p.value, (t) => (s(), o("article", {
|
|
393
393
|
key: t.pullRequestNumber,
|
|
394
394
|
class: "template-choices__row"
|
|
395
395
|
}, [
|
|
396
396
|
a("div", ye, [
|
|
397
397
|
a("span", ke, [
|
|
398
|
-
x(
|
|
398
|
+
x(c(t.appTemplateId), 1),
|
|
399
399
|
t.kind === "delete" ? (s(), o("span", Ce, " · Delete")) : y("", !0)
|
|
400
400
|
]),
|
|
401
|
-
a("span", we, "Awaiting review — PR #" +
|
|
401
|
+
a("span", we, "Awaiting review — PR #" + c(t.pullRequestNumber), 1)
|
|
402
402
|
]),
|
|
403
403
|
a("div", Te, [
|
|
404
404
|
a("a", {
|
|
@@ -436,7 +436,7 @@ const le = {
|
|
|
436
436
|
]),
|
|
437
437
|
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)),
|
|
438
438
|
m.value ? (s(), o("p", Fe, [
|
|
439
|
-
x(
|
|
439
|
+
x(c(m.value) + " ", 1),
|
|
440
440
|
u(r, {
|
|
441
441
|
label: "Retry",
|
|
442
442
|
variant: "tertiary",
|
|
@@ -450,21 +450,21 @@ const le = {
|
|
|
450
450
|
}, [
|
|
451
451
|
a("div", xe, [
|
|
452
452
|
a("span", Ae, [
|
|
453
|
-
x(
|
|
453
|
+
x(c(t.label), 1),
|
|
454
454
|
t.default ? (s(), o("span", $e, " · Default")) : y("", !0)
|
|
455
455
|
]),
|
|
456
|
-
a("span", qe,
|
|
456
|
+
a("span", qe, c(t.id), 1),
|
|
457
457
|
a("span", Ne, [
|
|
458
458
|
t.restaurantStyle ? (s(), o(D, { key: 0 }, [
|
|
459
|
-
x(
|
|
459
|
+
x(c(t.restaurantStyle) + " · ", 1)
|
|
460
460
|
], 64)) : y("", !0),
|
|
461
|
-
x(
|
|
461
|
+
x(c(t.industries.join(", ") || "General-purpose") + " · " + c(t.environments.join(", ")), 1)
|
|
462
462
|
])
|
|
463
463
|
]),
|
|
464
|
-
t.pullRequestNumber ? (s(), o("span", Ve, " Awaiting merge — PR #" +
|
|
464
|
+
t.pullRequestNumber ? (s(), o("span", Ve, " Awaiting merge — PR #" + c(t.pullRequestNumber), 1)) : (s(), o("span", {
|
|
465
465
|
key: 1,
|
|
466
466
|
class: Z(["template-status-badge", `template-status-badge--${t.status}`])
|
|
467
|
-
},
|
|
467
|
+
}, c(t.status === "published" ? "Published" : "Draft"), 3)),
|
|
468
468
|
a("div", De, [
|
|
469
469
|
t.pullRequestNumber ? y("", !0) : (s(), o(D, { key: 0 }, [
|
|
470
470
|
t.status === "draft" ? (s(), S(r, {
|
package/dist/app.js
CHANGED
|
@@ -4,7 +4,7 @@ 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--u1GnKXK.js")
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
path: "/",
|
|
@@ -21,7 +21,7 @@ const o = [
|
|
|
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-fqkfezTv.js")
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
path: "/brand-kit",
|
|
@@ -72,7 +72,7 @@ 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-D8AHHZWs.js")
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
path: "/:pathMatch(.*)*",
|