@feedmepos/mf-miniprogram-v2 0.2.2-dev.9 → 0.2.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.
Files changed (38) hide show
  1. package/dist/App-KzUdmcX4.js +214 -0
  2. package/dist/{AppTemplatePicker-eKlQ0c54.js → AppTemplatePicker-CNJ6kIJk.js} +158 -105
  3. package/dist/BrandFontPicker-Bd30BHsN.js +241 -0
  4. package/dist/BrandKitView-z2Pu8wAQ.js +249 -0
  5. package/dist/{ControlPlaneView-DGDA8EFh.js → ControlPlaneView-Bd_Fl_3b.js} +7751 -7323
  6. package/dist/{EcosystemView-Cx-3k7lB.js → EcosystemView-BDXgMQN_.js} +7 -7
  7. package/dist/{LegacyWorkspaceEntry-opz_kWz9.js → LegacyWorkspaceEntry-CADRpDkg.js} +2 -2
  8. package/dist/MobileProjectsView-CvCPtFAF.js +313 -0
  9. package/dist/{ModuleCenterView-DEShxy_e.js → ModuleCenterView-B08oZqQw.js} +34 -34
  10. package/dist/{ModuleDetailView-BSndm4ov.js → ModuleDetailView-lROTkaR7.js} +49 -49
  11. package/dist/{PagesView-CegMd6GC.js → PagesView-DOG8RSen.js} +2 -2
  12. package/dist/{PlatformUnavailableView-j0_2YBKm.js → PlatformUnavailableView-C1RltAIw.js} +1 -1
  13. package/dist/{PortalSettingsView-DFz6FUd9.js → PortalSettingsView-BK6kRgtf.js} +7 -7
  14. package/dist/StatusBadge.vue_vue_type_script_setup_true_lang-CMgQ0bd_.js +30 -0
  15. package/dist/TemplateCenterView-niXTXw9y.js +426 -0
  16. package/dist/WorkspaceEntryView-DzR8DQC5.js +21 -0
  17. package/dist/adminAccess-CDxAuQ-M.js +48 -0
  18. package/dist/app.js +22 -11
  19. package/dist/{controlPlane-CoEgf9BA.js → controlPlane-DT3t_ftg.js} +11 -11
  20. package/dist/{index-D5qXvcfE.js → index-CIJWcl_6.js} +10 -9
  21. package/dist/package.json +2 -1
  22. package/dist/{portalContext-C4HL_0kl.js → portalContext-B2pXdNtB.js} +2 -2
  23. package/dist/portalNavigation-DKCfwTH8.js +28 -0
  24. package/dist/routes-CeuodIgg.js +95 -0
  25. package/dist/style.css +1 -1
  26. package/dist/templatePickerFlag-CosY_15R.js +13 -0
  27. package/dist/{useBrandKit-BlKlqpo2.js → useBrandKit-CKN2zLC8.js} +3 -3
  28. package/dist/{useModuleCatalog-CkNuZzNM.js → useModuleCatalog-B9HXHA-e.js} +3 -3
  29. package/package.json +2 -1
  30. package/dist/App-BtDqnBq4.js +0 -193
  31. package/dist/BrandFontPicker-CyLbp5nr.js +0 -240
  32. package/dist/BrandKitView-CaxS1T-W.js +0 -217
  33. package/dist/MobileProjectsView-DEQ6q6Si.js +0 -279
  34. package/dist/StatusBadge.vue_vue_type_script_setup_true_lang-Bh9Eoe_H.js +0 -26
  35. package/dist/WorkspaceEntryView-e2EUnq9A.js +0 -21
  36. package/dist/localPreference-DneUpUrQ.js +0 -34
  37. package/dist/portalNavigation-DOF4Ah49.js +0 -28
  38. package/dist/routes-Boz_WlNM.js +0 -54
@@ -1,217 +0,0 @@
1
- import { defineComponent as P, ref as U, computed as N, onMounted as C, onScopeDispose as R, resolveComponent as x, openBlock as l, createElementBlock as r, createElementVNode as t, unref as a, toDisplayString as c, createCommentVNode as d, createVNode as v, createTextVNode as K, createBlock as w, Fragment as h, renderList as g, withDirectives as F, vModelText as V } from "vue";
2
- import { useRouter as H, onBeforeRouteLeave as M } from "vue-router";
3
- import { useDialog as O } from "@feedmepos/ui-library";
4
- import { a as Y, C as S, t as A, F as z, u as G, i as j } from "./useBrandKit-BlKlqpo2.js";
5
- import { B as q } from "./BrandFontPicker-CyLbp5nr.js";
6
- import { _ as J } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
- const Q = { class: "portal-page" }, W = { class: "portal-page-inner brand-page" }, X = { class: "portal-page-heading" }, Z = { class: "brand-actions" }, ee = {
8
- key: 0,
9
- class: "brand-unsaved"
10
- }, te = {
11
- key: 0,
12
- class: "portal-notice"
13
- }, ae = {
14
- key: 1,
15
- class: "portal-loading",
16
- role: "status"
17
- }, se = {
18
- key: 2,
19
- role: "alert",
20
- class: "portal-section portal-error"
21
- }, oe = {
22
- key: 3,
23
- role: "status"
24
- }, ne = { class: "portal-section" }, le = { class: "portal-section-head" }, re = { class: "brand-color-grid" }, ie = ["value", "aria-label", "disabled", "onInput"], de = { class: "brand-field-label" }, ue = ["onUpdate:modelValue", "aria-label", "aria-invalid", "disabled"], ce = {
25
- key: 0,
26
- class: "portal-error"
27
- }, pe = { class: "brand-advanced" }, ve = { class: "brand-role-grid" }, he = ["value", "aria-label", "disabled", "onInput"], be = ["onUpdate:modelValue", "aria-label", "aria-invalid", "disabled"], me = { class: "portal-section" }, ge = { class: "portal-section-head" }, ye = { class: "brand-font-grid" }, _e = /* @__PURE__ */ P({
28
- __name: "BrandKitView",
29
- setup(ke) {
30
- const e = G(), b = Y(), y = O(), D = H(), u = U(!1), _ = ["primary", "secondary", "accent", "background.base", "text.primary"], E = _.map((n) => S.find((o) => o.path === n)), I = S.filter((n) => !_.includes(n.path)), L = N(
31
- () => !b.value || !e.state.loaded || e.state.loading || e.state.saving || e.hasInvalidColor.value || e.dirtyCount.value === 0
32
- ), m = (n) => !!(e.state.colors[n] && !j(e.state.colors[n]));
33
- function k(n, o) {
34
- e.state.colors[n] = o.target.value, u.value = !1;
35
- }
36
- function f(n) {
37
- n === "colors" ? e.state.colors = { ...e.state.savedColors } : e.state.fonts = { ...e.state.savedFonts }, u.value = !1;
38
- }
39
- function T() {
40
- y.open({
41
- title: "Save the live Brand Kit?",
42
- message: "Colors and fonts are shared business settings. Apps using this kit pick up the change immediately. This does not build or publish application code.",
43
- dismissAway: !0,
44
- primaryActions: { text: "Save Brand Kit", close: !0 },
45
- secondaryActions: { text: "Cancel", close: !0 }
46
- }).onPrimary(() => {
47
- e.save().then(() => {
48
- u.value = !0;
49
- }).catch(() => {
50
- u.value = !1;
51
- });
52
- });
53
- }
54
- C(() => {
55
- e.load();
56
- });
57
- function B(n) {
58
- !e.dirtyCount.value && !e.state.saving || (n.preventDefault(), n.returnValue = "");
59
- }
60
- return C(() => window.addEventListener("beforeunload", B)), R(() => window.removeEventListener("beforeunload", B)), M((n) => e.state.saving ? !1 : e.dirtyCount.value ? (y.open({
61
- title: "Discard unsaved Brand Kit changes?",
62
- message: "Your live Brand Kit has not changed. Leave this page and discard the changes you have not saved?",
63
- dismissAway: !0,
64
- primaryActions: { text: "Discard and leave", close: !0 },
65
- secondaryActions: { text: "Keep editing", close: !0 }
66
- }).onPrimary(() => {
67
- e.discardEdits(), D.push(n);
68
- }), !1) : !0), (n, o) => {
69
- const p = x("FmButton"), $ = x("FmCircularProgress");
70
- return l(), r("div", Q, [
71
- t("div", W, [
72
- t("header", X, [
73
- o[4] || (o[4] = t("div", null, [
74
- t("p", { class: "portal-eyebrow" }, "Shared across your business"),
75
- t("h1", null, "Your business identity"),
76
- t("p", { class: "portal-description" }, "Colors and typography for every app that uses your Brand Kit.")
77
- ], -1)),
78
- t("div", Z, [
79
- a(e).dirtyCount.value ? (l(), r("span", ee, c(a(e).dirtyCount.value) + " unsaved", 1)) : d("", !0),
80
- v(p, {
81
- label: "Save Brand Kit",
82
- icon: "save",
83
- disabled: L.value,
84
- loading: a(e).state.saving,
85
- onClick: T
86
- }, null, 8, ["disabled", "loading"])
87
- ])
88
- ]),
89
- o[11] || (o[11] = t("p", { class: "portal-notice" }, " Saves update the live Brand Kit immediately. Application code still uses the separate Build release → Set live workflow. ", -1)),
90
- a(b) ? d("", !0) : (l(), r("p", te, " You can view this Brand Kit, but need Brand Kit management permission to save changes. ")),
91
- a(e).state.loading ? (l(), r("div", ae, [
92
- v($, { size: "xl" }),
93
- o[5] || (o[5] = K("Loading Brand Kit… ", -1))
94
- ])) : d("", !0),
95
- a(e).state.error ? (l(), r("div", se, [
96
- t("p", null, c(a(e).state.error), 1),
97
- a(e).state.loaded ? d("", !0) : (l(), w(p, {
98
- key: 0,
99
- label: "Try again",
100
- variant: "secondary",
101
- onClick: o[0] || (o[0] = (s) => a(e).load(!0))
102
- }))
103
- ])) : d("", !0),
104
- u.value && !a(e).dirtyCount.value && !a(e).state.error ? (l(), r("p", oe, " Brand Kit saved. Apps using this kit can now pick up the changes. ")) : d("", !0),
105
- a(e).state.loaded && !a(e).state.loading ? (l(), r(h, { key: 4 }, [
106
- t("section", ne, [
107
- t("div", le, [
108
- o[6] || (o[6] = t("div", null, [
109
- t("h2", null, "Colors"),
110
- t("p", { class: "portal-description" }, "The colors that represent your brand identity.")
111
- ], -1)),
112
- v(p, {
113
- label: "Reset unsaved colors",
114
- variant: "tertiary",
115
- disabled: a(e).state.saving,
116
- onClick: o[1] || (o[1] = (s) => f("colors"))
117
- }, null, 8, ["disabled"])
118
- ]),
119
- t("div", re, [
120
- (l(!0), r(h, null, g(a(E), (s) => (l(), r("label", {
121
- key: s.path,
122
- class: "brand-color-card"
123
- }, [
124
- t("input", {
125
- type: "color",
126
- value: a(A)(a(e).state.colors[s.path] ?? ""),
127
- "aria-label": `${s.label} color picker`,
128
- disabled: a(e).state.saving,
129
- onInput: (i) => k(s.path, i)
130
- }, null, 40, ie),
131
- t("span", de, c(s.path === "background.base" ? "Background" : s.path === "text.primary" ? "Text" : s.label), 1),
132
- F(t("input", {
133
- "onUpdate:modelValue": (i) => a(e).state.colors[s.path] = i,
134
- class: "brand-value",
135
- "aria-label": `${s.path} hex color`,
136
- "aria-invalid": m(s.path),
137
- disabled: a(e).state.saving,
138
- placeholder: "App default",
139
- spellcheck: "false"
140
- }, null, 8, ue), [
141
- [V, a(e).state.colors[s.path]]
142
- ]),
143
- m(s.path) ? (l(), r("small", ce, "Enter a hex color")) : d("", !0)
144
- ]))), 128))
145
- ]),
146
- t("details", pe, [
147
- o[7] || (o[7] = t("summary", null, [
148
- K("More color roles "),
149
- t("span", null, "Keep control of text, surfaces and status colors")
150
- ], -1)),
151
- o[8] || (o[8] = t("p", { class: "portal-description" }, " Each role is saved independently. Changing a brand color does not automatically replace text or status colors. ", -1)),
152
- t("div", ve, [
153
- (l(!0), r(h, null, g(a(I), (s) => (l(), r("label", {
154
- key: s.path
155
- }, [
156
- t("span", null, c(s.group) + " · " + c(s.label), 1),
157
- t("div", null, [
158
- t("input", {
159
- type: "color",
160
- value: a(A)(a(e).state.colors[s.path] ?? ""),
161
- "aria-label": `${s.path} color picker`,
162
- disabled: a(e).state.saving,
163
- onInput: (i) => k(s.path, i)
164
- }, null, 40, he),
165
- F(t("input", {
166
- "onUpdate:modelValue": (i) => a(e).state.colors[s.path] = i,
167
- "aria-label": `${s.path} hex color`,
168
- "aria-invalid": m(s.path),
169
- disabled: a(e).state.saving,
170
- class: "brand-value",
171
- placeholder: "App default",
172
- spellcheck: "false"
173
- }, null, 8, be), [
174
- [V, a(e).state.colors[s.path]]
175
- ])
176
- ]),
177
- t("small", null, c(s.hint), 1)
178
- ]))), 128))
179
- ])
180
- ])
181
- ]),
182
- t("section", me, [
183
- t("div", ge, [
184
- o[9] || (o[9] = t("div", null, [
185
- t("h2", null, "Typeface"),
186
- t("p", { class: "portal-description" }, "Fonts used in your interfaces.")
187
- ], -1)),
188
- v(p, {
189
- label: "Reset unsaved fonts",
190
- variant: "tertiary",
191
- disabled: a(e).state.saving,
192
- onClick: o[2] || (o[2] = (s) => f("fonts"))
193
- }, null, 8, ["disabled"])
194
- ]),
195
- t("div", ye, [
196
- (l(!0), r(h, null, g(a(z), (s) => (l(), w(q, {
197
- key: s.path,
198
- modelValue: a(e).state.fonts[s.path],
199
- "onUpdate:modelValue": [
200
- (i) => a(e).state.fonts[s.path] = i,
201
- o[3] || (o[3] = (i) => u.value = !1)
202
- ],
203
- label: s.label === "Heading" ? "Headings" : s.label,
204
- disabled: !a(b) || a(e).state.saving
205
- }, null, 8, ["modelValue", "onUpdate:modelValue", "label", "disabled"]))), 128))
206
- ]),
207
- o[10] || (o[10] = t("p", { class: "portal-description brand-font-help" }, "Supported by Google Fonts", -1))
208
- ])
209
- ], 64)) : d("", !0)
210
- ])
211
- ]);
212
- };
213
- }
214
- }), Fe = /* @__PURE__ */ J(_e, [["__scopeId", "data-v-346c9cdb"]]);
215
- export {
216
- Fe as default
217
- };
@@ -1,279 +0,0 @@
1
- import { defineComponent as D, ref as f, onMounted as L, resolveComponent as I, openBlock as r, createBlock as N, withCtx as h, createVNode as s, createElementVNode as n, toDisplayString as g, createElementBlock as d, Fragment as B, createCommentVNode as F, onScopeDispose as A, createTextVNode as M, renderList as U, unref as y } from "vue";
2
- import { useRoute as O, useRouter as E } from "vue-router";
3
- import { useDialog as Y } from "@feedmepos/ui-library";
4
- import { a as $ } from "./routes-Boz_WlNM.js";
5
- import { c as R, e as T, a as z } from "./controlPlane-CoEgf9BA.js";
6
- import { u as H } from "./portalContext-C4HL_0kl.js";
7
- import { w as P } from "./portalNavigation-DOF4Ah49.js";
8
- import { m as J } from "./index-D5qXvcfE.js";
9
- import { A as G } from "./AppTemplatePicker-eKlQ0c54.js";
10
- import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
- import { _ as K } from "./StatusBadge.vue_vue_type_script_setup_true_lang-Bh9Eoe_H.js";
12
- const Q = {
13
- key: 0,
14
- role: "status"
15
- }, W = {
16
- key: 1,
17
- class: "portal-error",
18
- role: "alert"
19
- }, X = /* @__PURE__ */ D({
20
- __name: "MobileProjectDialog",
21
- props: {
22
- businessId: {},
23
- projectId: {},
24
- initialName: {}
25
- },
26
- emits: ["saved", "close"],
27
- setup(k, { emit: S }) {
28
- const a = k, C = S, i = f(a.initialName ?? ""), u = f(null), j = f([]), p = f(!a.projectId), c = f(!1), m = f(""), w = J();
29
- async function V() {
30
- var e, l;
31
- p.value = !0, m.value = "";
32
- try {
33
- const _ = await R($.appTemplates());
34
- j.value = _.templates, u.value = ((e = _.templates.find((b) => b.default)) == null ? void 0 : e.id) ?? ((l = _.templates[0]) == null ? void 0 : l.id) ?? null;
35
- } catch (_) {
36
- m.value = T(_);
37
- } finally {
38
- p.value = !1;
39
- }
40
- }
41
- async function o() {
42
- if (!(c.value || !i.value.trim() || i.value.trim().length > 120 || !a.projectId && !u.value)) {
43
- c.value = !0, m.value = "";
44
- try {
45
- const e = await R(a.projectId ? $.project(a.businessId, a.projectId) : $.projects(a.businessId), {
46
- method: a.projectId ? "PATCH" : "POST",
47
- body: JSON.stringify({ name: i.value.trim(), ...a.projectId ? {} : {
48
- projectId: w,
49
- kind: "mobile",
50
- appTemplate: u.value,
51
- country: z()
52
- } })
53
- });
54
- C("saved", e);
55
- } catch (e) {
56
- m.value = T(e);
57
- } finally {
58
- c.value = !1;
59
- }
60
- }
61
- }
62
- return L(() => {
63
- a.projectId || V();
64
- }), (e, l) => {
65
- const _ = I("FmTextField"), b = I("FmButton"), x = I("FmCard"), t = I("FmForm");
66
- return r(), N(t, { onValidationSuccess: o }, {
67
- default: h(() => [
68
- s(x, { class: "project-dialog" }, {
69
- default: h(() => [
70
- n("h2", null, g(k.projectId ? "Rename project" : "New Mobile project"), 1),
71
- s(_, {
72
- modelValue: i.value,
73
- "onUpdate:modelValue": l[0] || (l[0] = (v) => i.value = v),
74
- label: "Project name",
75
- placeholder: "e.g. Summer ordering",
76
- disabled: c.value,
77
- rules: [(v) => v.trim().length > 0 && v.trim().length <= 120 || "Enter a name up to 120 characters"]
78
- }, null, 8, ["modelValue", "disabled", "rules"]),
79
- k.projectId ? F("", !0) : (r(), d(B, { key: 0 }, [
80
- p.value ? (r(), d("p", Q, "Loading templates…")) : (r(), N(G, {
81
- key: 1,
82
- templates: j.value,
83
- modelValue: u.value,
84
- "onUpdate:modelValue": l[1] || (l[1] = (v) => u.value = v),
85
- disabled: c.value
86
- }, null, 8, ["templates", "modelValue", "disabled"])),
87
- l[3] || (l[3] = n("p", { class: "project-dialog__note" }, "Start a separate app from a template. Your live app stays as it is.", -1))
88
- ], 64)),
89
- m.value ? (r(), d("p", W, g(m.value), 1)) : F("", !0),
90
- !k.projectId && !j.value.length && !p.value ? (r(), N(b, {
91
- key: 2,
92
- label: "Retry loading templates",
93
- variant: "secondary",
94
- onClick: V
95
- })) : F("", !0),
96
- n("footer", null, [
97
- s(b, {
98
- label: "Cancel",
99
- variant: "tertiary",
100
- disabled: c.value,
101
- onClick: l[2] || (l[2] = (v) => C("close"))
102
- }, null, 8, ["disabled"]),
103
- s(b, {
104
- label: k.projectId ? "Save" : "Create project",
105
- type: "submit",
106
- loading: c.value,
107
- disabled: p.value || !i.value.trim() || i.value.trim().length > 120 || !k.projectId && !u.value
108
- }, null, 8, ["label", "loading", "disabled"])
109
- ])
110
- ]),
111
- _: 1
112
- })
113
- ]),
114
- _: 1
115
- });
116
- };
117
- }
118
- }), Z = /* @__PURE__ */ q(X, [["__scopeId", "data-v-bc4e70c1"]]), ee = { class: "portal-page" }, te = { class: "portal-page-inner" }, oe = { class: "portal-page-heading" }, ae = {
119
- key: 0,
120
- class: "mobile-projects__count"
121
- }, le = {
122
- key: 0,
123
- class: "portal-error",
124
- role: "alert"
125
- }, ne = {
126
- key: 1,
127
- role: "status"
128
- }, re = {
129
- key: 2,
130
- class: "portal-empty"
131
- }, se = {
132
- key: 3,
133
- class: "mobile-projects__list",
134
- "aria-label": "Mobile projects"
135
- }, ie = { class: "mobile-projects__name" }, ue = ["title"], ce = ["datetime"], de = { class: "mobile-projects__actions" }, pe = { class: "w-[200px] py-4" }, me = /* @__PURE__ */ D({
136
- __name: "MobileProjectsView",
137
- setup(k) {
138
- const S = H(), a = O(), C = E(), i = Y(), u = f([]), j = f(!0), p = f(""), c = new AbortController();
139
- async function m() {
140
- j.value = !0, p.value = "";
141
- try {
142
- const o = await R($.projects(S.businessId.value), { signal: c.signal });
143
- u.value = o.projects;
144
- } catch (o) {
145
- c.signal.aborted || (p.value = T(o));
146
- } finally {
147
- j.value = !1;
148
- }
149
- }
150
- function w(o) {
151
- i.open({
152
- title: o ? "Rename project" : "New Mobile project",
153
- dialogComponent: Z,
154
- dialogComponentProps: {
155
- businessId: S.businessId.value,
156
- projectId: o == null ? void 0 : o.projectId,
157
- initialName: o == null ? void 0 : o.name,
158
- onClose: () => i.close(),
159
- onSaved: (e) => {
160
- i.close(), o ? m() : C.push(P(e.projectId, "workspace", { ...a.query, setup: "1" }));
161
- }
162
- }
163
- });
164
- }
165
- function V(o) {
166
- return new Intl.DateTimeFormat(void 0, { dateStyle: "medium", timeStyle: "short" }).format(new Date(o));
167
- }
168
- return L(() => {
169
- if (m(), a.query.create === "1") {
170
- const { create: o, ...e } = a.query;
171
- C.replace({ query: e }), w();
172
- }
173
- }), A(() => c.abort()), (o, e) => {
174
- const l = I("FmButton"), _ = I("RouterLink"), b = I("FmMenuItem"), x = I("FmMenu");
175
- return r(), d("div", ee, [
176
- n("div", te, [
177
- n("header", oe, [
178
- n("div", null, [
179
- e[3] || (e[3] = n("p", { class: "portal-eyebrow" }, "Mobile Ordering", -1)),
180
- n("h1", null, [
181
- e[2] || (e[2] = M("Projects ", -1)),
182
- j.value ? F("", !0) : (r(), d("span", ae, g(u.value.length), 1))
183
- ])
184
- ]),
185
- s(l, {
186
- label: "New project",
187
- icon: "add",
188
- onClick: e[0] || (e[0] = (t) => w())
189
- })
190
- ]),
191
- p.value ? (r(), d("p", le, [
192
- M(g(p.value) + " ", 1),
193
- s(l, {
194
- label: "Retry",
195
- variant: "tertiary",
196
- onClick: m
197
- })
198
- ])) : j.value ? (r(), d("p", ne, "Loading projects…")) : u.value.length ? (r(), d("section", se, [
199
- (r(!0), d(B, null, U(u.value, (t) => (r(), d("article", {
200
- key: t.projectId,
201
- class: "mobile-projects__row"
202
- }, [
203
- n("div", ie, [
204
- s(_, {
205
- to: y(P)(t.projectId, "workspace", y(a).query)
206
- }, {
207
- default: h(() => [
208
- M(g(t.name), 1)
209
- ]),
210
- _: 2
211
- }, 1032, ["to"]),
212
- n("span", {
213
- title: t.projectId
214
- }, "…" + g(t.projectId.slice(-6)), 9, ue)
215
- ]),
216
- s(K, {
217
- variant: t.isLive ? "success" : t.provisioningStatus === "failed" ? "error" : "neutral"
218
- }, {
219
- default: h(() => [
220
- M(g(t.isLive ? "Live" : t.provisioningStatus === "ready" ? "Draft" : t.provisioningStatus === "failed" ? "Setup failed" : t.provisioningStatus === "provisioning" ? "Setting up" : "Not set up"), 1)
221
- ]),
222
- _: 2
223
- }, 1032, ["variant"]),
224
- n("time", {
225
- datetime: t.updatedAt
226
- }, g(V(t.updatedAt)), 9, ce),
227
- n("div", de, [
228
- s(l, {
229
- label: t.provisioningStatus === "ready" ? "Open editor" : "Continue setup",
230
- variant: "secondary",
231
- onClick: (v) => y(C).push(y(P)(t.projectId, "workspace", y(a).query))
232
- }, null, 8, ["label", "onClick"]),
233
- s(x, {
234
- placement: "bottom-end",
235
- "close-on-click": ""
236
- }, {
237
- "menu-button": h(() => [
238
- s(l, {
239
- icon: "more_horiz",
240
- variant: "tertiary",
241
- "aria-label": `Actions for ${t.name}`
242
- }, null, 8, ["aria-label"])
243
- ]),
244
- default: h(() => [
245
- n("div", pe, [
246
- s(b, {
247
- label: "Rename project",
248
- icon: "edit",
249
- "onUpdate:modelValue": (v) => w(t)
250
- }, null, 8, ["onUpdate:modelValue"]),
251
- t.provisioningStatus === "ready" ? (r(), N(b, {
252
- key: 0,
253
- label: "View releases",
254
- icon: "deployed_code",
255
- "onUpdate:modelValue": (v) => y(C).push(y(P)(t.projectId, "releases", y(a).query))
256
- }, null, 8, ["onUpdate:modelValue"])) : F("", !0)
257
- ])
258
- ]),
259
- _: 2
260
- }, 1024)
261
- ])
262
- ]))), 128))
263
- ])) : (r(), d("section", re, [
264
- e[4] || (e[4] = n("h2", null, "Your first Mobile project", -1)),
265
- e[5] || (e[5] = n("p", null, "Create an app from a template to start editing.", -1)),
266
- s(l, {
267
- label: "New project",
268
- icon: "add",
269
- onClick: e[1] || (e[1] = (t) => w())
270
- })
271
- ]))
272
- ])
273
- ]);
274
- };
275
- }
276
- }), he = /* @__PURE__ */ q(me, [["__scopeId", "data-v-9cfcd2af"]]);
277
- export {
278
- he as default
279
- };
@@ -1,26 +0,0 @@
1
- import { defineComponent as n, computed as l, openBlock as a, createElementBlock as c, normalizeClass as m, renderSlot as p } from "vue";
2
- const u = /* @__PURE__ */ n({
3
- __name: "StatusBadge",
4
- props: {
5
- variant: { default: "neutral" },
6
- size: { default: "md" }
7
- },
8
- setup(o) {
9
- const e = o, r = {
10
- success: "bg-fm-color-system-success-100 text-fm-color-typo-success",
11
- warning: "bg-fm-color-system-warning-100 text-fm-color-typo-warning",
12
- error: "bg-fm-color-system-error-100 text-fm-color-typo-error",
13
- info: "bg-fm-color-system-info-100 text-fm-color-typo-info",
14
- neutral: "bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary",
15
- primary: "bg-fm-color-primary text-fm-color-typo-white"
16
- }, t = l(() => e.size === "sm" ? "rounded-[4px] px-[6px] py-[1px]" : "rounded-full px-8 py-2");
17
- return (s, f) => (a(), c("span", {
18
- class: m(["inline-flex shrink-0 items-center gap-4 fm-typo-en-body-xs-600 leading-[16px]", [r[o.variant], t.value]])
19
- }, [
20
- p(s.$slots, "default")
21
- ], 2));
22
- }
23
- });
24
- export {
25
- u as _
26
- };
@@ -1,21 +0,0 @@
1
- import { defineComponent as c, watchEffect as a, openBlock as n, createElementBlock as p } from "vue";
2
- import { useRoute as i, useRouter as u } from "vue-router";
3
- import { u as l } from "./portalContext-C4HL_0kl.js";
4
- import { w as m, a as f } from "./portalNavigation-DOF4Ah49.js";
5
- const _ = {
6
- class: "portal-loading",
7
- role: "status"
8
- }, x = /* @__PURE__ */ c({
9
- __name: "WorkspaceEntryView",
10
- setup(w) {
11
- const r = l(), e = i(), s = u();
12
- return a(() => {
13
- var t;
14
- const o = (t = r.context.value) == null ? void 0 : t.projectId;
15
- o && s.replace(m(o, e.query.view === "sessions" ? "sessions" : f(e.query.view), e.query));
16
- }), (o, t) => (n(), p("p", _, "Opening your workspace…"));
17
- }
18
- });
19
- export {
20
- x as default
21
- };
@@ -1,34 +0,0 @@
1
- function o(t, e) {
2
- if (typeof window > "u") return e;
3
- try {
4
- const r = window.localStorage.getItem(t);
5
- return r === null ? e : r === "1";
6
- } catch {
7
- return e;
8
- }
9
- }
10
- function i(t, e) {
11
- if (typeof window > "u") return e;
12
- try {
13
- const r = Number(window.localStorage.getItem(t));
14
- return Number.isFinite(r) ? r : e;
15
- } catch {
16
- return e;
17
- }
18
- }
19
- function n(t, e) {
20
- if (!(typeof window > "u"))
21
- try {
22
- window.localStorage.setItem(t, e);
23
- } catch {
24
- }
25
- }
26
- function u(t, e) {
27
- n(t, e ? "1" : "0");
28
- }
29
- export {
30
- i as a,
31
- n as b,
32
- o as r,
33
- u as w
34
- };
@@ -1,28 +0,0 @@
1
- function o(e) {
2
- return e === "releases" ? "releases" : "workspace";
3
- }
4
- function t(e) {
5
- const { view: s, ...r } = e;
6
- return r;
7
- }
8
- function c(e, s, r) {
9
- return {
10
- name: "miniprogram-v2-project",
11
- params: { projectId: e, view: s === "workspace" ? void 0 : s },
12
- query: t(r)
13
- };
14
- }
15
- function i(e, s = "settings") {
16
- const r = new URLSearchParams();
17
- for (const a of ["businessId", "country", "restaurantId"]) {
18
- const n = e[a];
19
- typeof n == "string" && r.set(a, n);
20
- }
21
- return `/brand/${s}${r.size ? `?${r}` : ""}`;
22
- }
23
- export {
24
- o as a,
25
- i as l,
26
- t as p,
27
- c as w
28
- };
@@ -1,54 +0,0 @@
1
- const t = (e, s) => `/api/businesses/${e}/projects/${s}`, i = {
2
- projects: (e) => `/api/businesses/${e}/projects`,
3
- portalContext: (e) => `/api/businesses/${e}/portal-context`,
4
- project: (e, s) => t(e, s),
5
- provision: (e, s) => `${t(e, s)}/provision`,
6
- refreshSlug: (e, s) => `${t(e, s)}/refresh-slug`,
7
- sessions: (e, s) => `${t(e, s)}/sessions`,
8
- session: (e, s, r) => `${t(e, s)}/sessions/${r}`,
9
- messages: (e, s, r) => `${i.session(e, s, r)}/messages`,
10
- startStatus: (e, s, r) => `${i.session(e, s, r)}/start-status`,
11
- changes: (e, s, r, o = !1) => `${i.session(e, s, r)}/changes${o ? "?refresh=1" : ""}`,
12
- checkpoints: (e, s, r) => `${i.session(e, s, r)}/checkpoints`,
13
- aiBillingPreflight: (e, s, r) => `${i.session(e, s, r)}/ai-billing/preflight`,
14
- restoreCheckpoint: (e, s, r, o) => `${i.checkpoints(e, s, r)}/${o}/restore`,
15
- previewBridgeTicket: (e, s, r) => `${i.session(e, s, r)}/preview-bridge/ticket`,
16
- previewBridgeSocket: (e, s, r) => `${i.session(e, s, r)}/preview-bridge/socket`,
17
- uploads: (e, s, r, o = "") => `${i.session(e, s, r)}/uploads${o ? `?${o}` : ""}`,
18
- archive: (e, s, r) => `${i.session(e, s, r)}/archive`,
19
- commit: (e, s, r) => `${i.session(e, s, r)}/commit`,
20
- resume: (e, s, r) => `${i.session(e, s, r)}/resume`,
21
- restartPreview: (e, s, r) => `${i.session(e, s, r)}/restart-preview`,
22
- fork: (e, s, r) => `${i.session(e, s, r)}/fork`,
23
- flushEvents: (e, s, r) => `${i.session(e, s, r)}/events/flush`,
24
- revertTurn: (e, s, r) => `${i.session(e, s, r)}/turns/revert`,
25
- unrevertTurn: (e, s, r) => `${i.session(e, s, r)}/turns/unrevert`,
26
- releases: (e, s) => `${t(e, s)}/releases`,
27
- publishRelease: (e, s, r) => `${i.releases(e, s)}/${r}/publish`,
28
- releasePreviewUrl: (e, s, r) => `${i.releases(e, s)}/${r}/preview-url`,
29
- rollbackToRelease: (e, s, r) => `${t(e, s)}/rollback-to-release/${r}`,
30
- rollbackToV1: (e, s) => `${t(e, s)}/rollback-to-v1`,
31
- start: (e, s, r) => {
32
- const o = new URLSearchParams();
33
- e && o.set("businessId", e), s && o.set("projectId", s), r && o.set("sessionId", r);
34
- const a = o.toString();
35
- return `/api/start${a ? `?${a}` : ""}`;
36
- },
37
- opencode: (e = "") => `/api/opencode${e ? `/${e.replace(/^\/+/, "")}` : ""}`,
38
- /** The shared component library's catalog. Deliberately not under a
39
- * business/project path: the library belongs to no business, and the
40
- * module centre is not inside a workspace. */
41
- componentLibraryCatalog: () => "/api/component-library/catalog",
42
- /** The self-contained preview document the module centre frames. Fetched with
43
- * the portal's bearer and assigned to an iframe's `srcdoc`, never used as an
44
- * `<iframe src>` — a navigation request carries no Authorization header,
45
- * which is what a signed URL would otherwise exist to work around. */
46
- componentLibraryPreview: () => "/api/component-library/preview",
47
- /** The application templates this environment can provision, for the portal's
48
- * picker. Not under a business/project path: the answer is a property of
49
- * the environment, and it is needed BEFORE a project exists. */
50
- appTemplates: () => "/api/app-templates"
51
- };
52
- export {
53
- i as a
54
- };