@feedmepos/mf-miniprogram-v2 0.2.3 → 0.2.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.
@@ -1,14 +1,14 @@
1
- import { defineComponent as w, computed as p, openBlock as a, createElementBlock as s, createStaticVNode as f, createCommentVNode as h, createElementVNode as n, Fragment as g, renderList as b, normalizeClass as x, toDisplayString as y, createVNode as v } from "vue";
2
- function M(t) {
1
+ import { defineComponent as k, computed as x, openBlock as a, createElementBlock as l, createStaticVNode as m, createCommentVNode as p, createElementVNode as e, createVNode as b, toDisplayString as h, Fragment as w, renderList as _, normalizeClass as y } from "vue";
2
+ function K(t) {
3
3
  return t === "active" ? "success" : t === "needs_attention" ? "warning" : "neutral";
4
4
  }
5
- function Q(t) {
5
+ function O(t) {
6
6
  return t === "active" ? "Active" : t === "needs_attention" ? "Needs attention" : "Archived";
7
7
  }
8
- function U(t) {
8
+ function X(t) {
9
9
  return t === "succeeded" ? "success" : t === "failed" ? "error" : t === "queued" || t === "running" ? "info" : "neutral";
10
10
  }
11
- function W(t) {
11
+ function Y(t) {
12
12
  switch (t) {
13
13
  case "queued":
14
14
  return "Queued";
@@ -22,7 +22,7 @@ function W(t) {
22
22
  return "No build yet";
23
23
  }
24
24
  }
25
- function G(t) {
25
+ function Z(t) {
26
26
  switch (t) {
27
27
  case "ready":
28
28
  return "Ready";
@@ -34,66 +34,69 @@ function G(t) {
34
34
  return "Not set up";
35
35
  }
36
36
  }
37
- const S = ["preview", "published", "rolled_back"];
38
- function J(t) {
39
- return S.includes(t.status);
37
+ const C = ["preview", "published", "rolled_back"];
38
+ function tt(t) {
39
+ return C.includes(t.status);
40
40
  }
41
- function K(t) {
41
+ function et(t) {
42
42
  return t.is_live === 1 ? "Live" : t.build_status === "queued" || t.build_status === "running" ? "Building" : t.build_status === "failed" ? "Failed" : t.build_status === "succeeded" ? "Ready" : "Draft";
43
43
  }
44
- function O(t) {
44
+ function rt(t) {
45
45
  return t.is_live === 1 ? "primary" : t.build_status === "succeeded" ? "success" : t.build_status === "queued" || t.build_status === "running" ? "info" : t.build_status === "failed" ? "error" : "neutral";
46
46
  }
47
- const V = {
47
+ const A = {
48
48
  key: 0,
49
49
  viewBox: "0 0 56 96",
50
50
  class: "h-[72px] w-[42px] shrink-0 rounded-[6px] border border-portal-border-default bg-portal-bg-default",
51
51
  "aria-hidden": "true",
52
52
  focusable: "false"
53
- }, C = {
53
+ }, E = {
54
54
  key: 0,
55
55
  fill: "currentColor",
56
56
  class: "text-fm-color-neutral-gray-300"
57
- }, A = {
57
+ }, B = {
58
58
  key: 1,
59
59
  fill: "currentColor",
60
60
  class: "text-fm-color-neutral-gray-300"
61
- }, E = {
61
+ }, L = {
62
62
  key: 2,
63
63
  fill: "currentColor",
64
64
  class: "text-fm-color-neutral-gray-300"
65
- }, B = /* @__PURE__ */ w({
65
+ }, v = /* @__PURE__ */ k({
66
66
  __name: "AppTemplateThumbnail",
67
67
  props: {
68
68
  restaurantStyle: {}
69
69
  },
70
70
  setup(t) {
71
- const u = t, d = p(
72
- () => u.restaurantStyle === "qsr" || u.restaurantStyle === "coffee" || u.restaurantStyle === "tea"
71
+ const d = t, u = x(
72
+ () => d.restaurantStyle === "qsr" || d.restaurantStyle === "coffee" || d.restaurantStyle === "tea"
73
73
  );
74
- return (m, i) => d.value ? (a(), s("svg", V, [
75
- t.restaurantStyle === "qsr" ? (a(), s("g", C, [...i[0] || (i[0] = [
76
- f('<rect x="6" y="7" width="44" height="6" rx="3"></rect><rect x="6" y="18" width="19" height="18" rx="2"></rect><rect x="31" y="18" width="19" height="18" rx="2"></rect><rect x="6" y="40" width="19" height="18" rx="2"></rect><rect x="31" y="40" width="19" height="18" rx="2"></rect><rect x="6" y="62" width="19" height="18" rx="2"></rect><rect x="31" y="62" width="19" height="18" rx="2"></rect><rect x="6" y="85" width="44" height="7" rx="3.5" class="text-fm-color-neutral-gray-400"></rect>', 8)
77
- ])])) : t.restaurantStyle === "coffee" ? (a(), s("g", A, [...i[1] || (i[1] = [
78
- f('<rect x="6" y="7" width="44" height="30" rx="3"></rect><rect x="6" y="43" width="26" height="4" rx="2"></rect><rect x="6" y="53" width="44" height="12" rx="2"></rect><rect x="6" y="69" width="44" height="12" rx="2"></rect><rect x="6" y="87" width="18" height="4" rx="2"></rect>', 5)
79
- ])])) : (a(), s("g", E, [...i[2] || (i[2] = [
80
- f('<rect x="6" y="7" width="44" height="5" rx="2.5"></rect><rect x="6" y="17" width="44" height="9" rx="2"></rect><rect x="6" y="28" width="9" height="4" rx="2" class="text-fm-color-neutral-gray-400"></rect><rect x="18" y="28" width="9" height="4" rx="2" class="text-fm-color-neutral-gray-400"></rect><rect x="30" y="28" width="9" height="4" rx="2" class="text-fm-color-neutral-gray-400"></rect><rect x="6" y="38" width="44" height="9" rx="2"></rect><rect x="6" y="49" width="9" height="4" rx="2" class="text-fm-color-neutral-gray-400"></rect><rect x="18" y="49" width="9" height="4" rx="2" class="text-fm-color-neutral-gray-400"></rect><rect x="6" y="59" width="44" height="9" rx="2"></rect><rect x="6" y="70" width="9" height="4" rx="2" class="text-fm-color-neutral-gray-400"></rect><rect x="18" y="70" width="9" height="4" rx="2" class="text-fm-color-neutral-gray-400"></rect><rect x="30" y="70" width="9" height="4" rx="2" class="text-fm-color-neutral-gray-400"></rect><rect x="6" y="80" width="44" height="9" rx="2"></rect>', 13)
74
+ return (g, o) => u.value ? (a(), l("svg", A, [
75
+ t.restaurantStyle === "qsr" ? (a(), l("g", E, [...o[0] || (o[0] = [
76
+ m('<rect x="6" y="7" width="44" height="6" rx="3"></rect><rect x="6" y="18" width="19" height="18" rx="2"></rect><rect x="31" y="18" width="19" height="18" rx="2"></rect><rect x="6" y="40" width="19" height="18" rx="2"></rect><rect x="31" y="40" width="19" height="18" rx="2"></rect><rect x="6" y="62" width="19" height="18" rx="2"></rect><rect x="31" y="62" width="19" height="18" rx="2"></rect><rect x="6" y="85" width="44" height="7" rx="3.5" class="text-fm-color-neutral-gray-400"></rect>', 8)
77
+ ])])) : t.restaurantStyle === "coffee" ? (a(), l("g", B, [...o[1] || (o[1] = [
78
+ m('<rect x="6" y="7" width="44" height="30" rx="3"></rect><rect x="6" y="43" width="26" height="4" rx="2"></rect><rect x="6" y="53" width="44" height="12" rx="2"></rect><rect x="6" y="69" width="44" height="12" rx="2"></rect><rect x="6" y="87" width="18" height="4" rx="2"></rect>', 5)
79
+ ])])) : (a(), l("g", L, [...o[2] || (o[2] = [
80
+ m('<rect x="6" y="7" width="44" height="5" rx="2.5"></rect><rect x="6" y="17" width="44" height="9" rx="2"></rect><rect x="6" y="28" width="9" height="4" rx="2" class="text-fm-color-neutral-gray-400"></rect><rect x="18" y="28" width="9" height="4" rx="2" class="text-fm-color-neutral-gray-400"></rect><rect x="30" y="28" width="9" height="4" rx="2" class="text-fm-color-neutral-gray-400"></rect><rect x="6" y="38" width="44" height="9" rx="2"></rect><rect x="6" y="49" width="9" height="4" rx="2" class="text-fm-color-neutral-gray-400"></rect><rect x="18" y="49" width="9" height="4" rx="2" class="text-fm-color-neutral-gray-400"></rect><rect x="6" y="59" width="44" height="9" rx="2"></rect><rect x="6" y="70" width="9" height="4" rx="2" class="text-fm-color-neutral-gray-400"></rect><rect x="18" y="70" width="9" height="4" rx="2" class="text-fm-color-neutral-gray-400"></rect><rect x="30" y="70" width="9" height="4" rx="2" class="text-fm-color-neutral-gray-400"></rect><rect x="6" y="80" width="44" height="9" rx="2"></rect>', 13)
81
81
  ])]))
82
- ])) : h("", !0);
82
+ ])) : p("", !0);
83
83
  }
84
- }), L = {
84
+ }), N = {
85
85
  key: 0,
86
86
  class: "rounded-lg border border-portal-border-default bg-portal-bg-default p-16"
87
- }, N = { class: "mt-12 max-w-[640px]" }, q = {
87
+ }, T = { class: "mt-12 flex items-start gap-12" }, q = { class: "min-w-0 max-w-[640px] flex-1" }, $ = { class: "m-0 fm-typo-en-body-md-600 text-portal-text-primary" }, D = { class: "m-0 mt-4 fm-typo-en-body-sm-400 text-portal-text-muted" }, R = {
88
+ key: 1,
89
+ class: "rounded-lg border border-portal-border-default bg-portal-bg-default p-16"
90
+ }, P = { class: "mt-12 max-w-[640px]" }, F = {
88
91
  key: 0,
89
92
  class: "m-0 mb-8 fm-typo-en-body-sm-600 uppercase tracking-wide text-portal-text-muted"
90
- }, T = { class: "flex flex-col gap-8" }, $ = ["aria-checked", "disabled", "onClick"], D = {
93
+ }, I = { class: "flex flex-col gap-8" }, j = ["aria-checked", "disabled", "onClick"], z = {
91
94
  key: 0,
92
95
  class: "h-[6px] w-[6px] rounded-full bg-portal-bg-default"
93
- }, R = { class: "min-w-0 max-w-[640px] flex-1" }, P = { class: "flex flex-wrap items-center gap-8" }, F = { class: "fm-typo-en-body-md-600 text-portal-text-primary" }, I = {
96
+ }, H = { class: "min-w-0 max-w-[640px] flex-1" }, M = { class: "flex flex-wrap items-center gap-8" }, Q = { class: "fm-typo-en-body-md-600 text-portal-text-primary" }, U = {
94
97
  key: 0,
95
98
  class: "rounded-full bg-portal-bg-canvas px-8 py-[2px] fm-typo-en-body-sm-400 text-portal-text-muted"
96
- }, j = { class: "mt-4 block fm-typo-en-body-sm-400 text-portal-text-muted" }, X = /* @__PURE__ */ w({
99
+ }, W = { class: "mt-4 block fm-typo-en-body-sm-400 text-portal-text-muted" }, st = /* @__PURE__ */ k({
97
100
  __name: "AppTemplatePicker",
98
101
  props: {
99
102
  templates: {},
@@ -101,84 +104,95 @@ const V = {
101
104
  disabled: { type: Boolean }
102
105
  },
103
106
  emits: ["update:modelValue"],
104
- setup(t, { emit: u }) {
105
- const d = t, m = u, i = p(() => d.templates.length > 1), _ = p(() => {
106
- const c = [], l = /* @__PURE__ */ new Map();
107
- for (const e of d.templates) {
108
- if (!e.industries.length) {
109
- c.push(e);
107
+ setup(t, { emit: d }) {
108
+ const u = t, g = d, o = x(() => u.templates.length > 1), f = x(() => u.templates.length === 1 ? u.templates[0] : null), S = x(() => {
109
+ const c = [], n = /* @__PURE__ */ new Map();
110
+ for (const r of u.templates) {
111
+ if (!r.industries.length) {
112
+ c.push(r);
110
113
  continue;
111
114
  }
112
- for (const o of e.industries) {
113
- const r = l.get(o) ?? [];
114
- r.push(e), l.set(o, r);
115
+ for (const i of r.industries) {
116
+ const s = n.get(i) ?? [];
117
+ s.push(r), n.set(i, s);
115
118
  }
116
119
  }
117
120
  return [
118
121
  ...c.length ? [{ label: null, templates: c }] : [],
119
- ...[...l.entries()].sort(([e], [o]) => e.localeCompare(o)).map(([e, o]) => ({ label: e, templates: o }))
122
+ ...[...n.entries()].sort(([r], [i]) => r.localeCompare(i)).map(([r, i]) => ({ label: r, templates: i }))
120
123
  ];
121
124
  });
122
- function k(c) {
123
- d.disabled || m("update:modelValue", c);
125
+ function V(c) {
126
+ u.disabled || g("update:modelValue", c);
124
127
  }
125
- return (c, l) => i.value ? (a(), s("section", L, [
126
- l[0] || (l[0] = n("p", { class: "m-0 fm-typo-en-body-md-600 text-portal-text-primary" }, "App template", -1)),
127
- l[1] || (l[1] = n("p", { class: "m-0 mt-4 fm-typo-en-body-sm-400 text-portal-text-muted" }, " Choose how this app looks and works for your customers. This cannot be changed after setup. ", -1)),
128
- n("div", N, [
129
- (a(!0), s(g, null, b(_.value, (e, o) => (a(), s("div", {
130
- key: e.label ?? "__general",
128
+ return (c, n) => f.value ? (a(), l("section", N, [
129
+ n[0] || (n[0] = e("p", { class: "m-0 fm-typo-en-body-md-600 text-portal-text-primary" }, "App template", -1)),
130
+ e("div", T, [
131
+ b(v, {
132
+ "restaurant-style": f.value.restaurantStyle
133
+ }, null, 8, ["restaurant-style"]),
134
+ e("div", q, [
135
+ e("p", $, h(f.value.label), 1),
136
+ e("p", D, h(f.value.description), 1)
137
+ ])
138
+ ])
139
+ ])) : o.value ? (a(), l("section", R, [
140
+ n[1] || (n[1] = e("p", { class: "m-0 fm-typo-en-body-md-600 text-portal-text-primary" }, "App template", -1)),
141
+ n[2] || (n[2] = e("p", { class: "m-0 mt-4 fm-typo-en-body-sm-400 text-portal-text-muted" }, " Choose how this app looks and works for your customers. This cannot be changed after setup. ", -1)),
142
+ e("div", P, [
143
+ (a(!0), l(w, null, _(S.value, (r, i) => (a(), l("div", {
144
+ key: r.label ?? "__general",
131
145
  role: "radiogroup",
132
146
  "aria-label": "App template",
133
- class: x(o === 0 ? "" : "mt-16")
147
+ class: y(i === 0 ? "" : "mt-16")
134
148
  }, [
135
- e.label ? (a(), s("p", q, y(e.label), 1)) : h("", !0),
136
- n("div", T, [
137
- (a(!0), s(g, null, b(e.templates, (r) => (a(), s("button", {
138
- key: r.id,
149
+ r.label ? (a(), l("p", F, h(r.label), 1)) : p("", !0),
150
+ e("div", I, [
151
+ (a(!0), l(w, null, _(r.templates, (s) => (a(), l("button", {
152
+ key: s.id,
139
153
  type: "button",
140
154
  role: "radio",
141
- "aria-checked": t.modelValue === r.id,
155
+ "aria-checked": t.modelValue === s.id,
142
156
  disabled: t.disabled,
143
- class: x([
157
+ class: y([
144
158
  "flex w-full cursor-pointer items-start gap-12 rounded-lg border p-12 text-left transition disabled:cursor-not-allowed disabled:opacity-60",
145
- t.modelValue === r.id ? "border-fm-color-primary bg-fm-color-primary-50" : "border-fm-color-neutral-gray-200 bg-fm-color-neutral-white hover:border-fm-color-neutral-gray-300"
159
+ t.modelValue === s.id ? "border-fm-color-primary bg-fm-color-primary-50" : "border-fm-color-neutral-gray-200 bg-fm-color-neutral-white hover:border-fm-color-neutral-gray-300"
146
160
  ]),
147
- onClick: (z) => k(r.id)
161
+ onClick: (G) => V(s.id)
148
162
  }, [
149
- n("span", {
150
- class: x([
163
+ e("span", {
164
+ class: y([
151
165
  "mt-[2px] flex h-16 w-16 shrink-0 items-center justify-center rounded-full border",
152
- t.modelValue === r.id ? "border-fm-color-primary bg-fm-color-primary" : "border-fm-color-neutral-gray-300 bg-fm-color-neutral-white"
166
+ t.modelValue === s.id ? "border-fm-color-primary bg-fm-color-primary" : "border-fm-color-neutral-gray-300 bg-fm-color-neutral-white"
153
167
  ])
154
168
  }, [
155
- t.modelValue === r.id ? (a(), s("span", D)) : h("", !0)
169
+ t.modelValue === s.id ? (a(), l("span", z)) : p("", !0)
156
170
  ], 2),
157
- v(B, {
158
- "restaurant-style": r.restaurantStyle
171
+ b(v, {
172
+ "restaurant-style": s.restaurantStyle
159
173
  }, null, 8, ["restaurant-style"]),
160
- n("span", R, [
161
- n("span", P, [
162
- n("span", F, y(r.label), 1),
163
- r.default ? (a(), s("span", I, " Default ")) : h("", !0)
174
+ e("span", H, [
175
+ e("span", M, [
176
+ e("span", Q, h(s.label), 1),
177
+ s.default ? (a(), l("span", U, " Default ")) : p("", !0)
164
178
  ]),
165
- n("span", j, y(r.description), 1)
179
+ e("span", W, h(s.description), 1)
166
180
  ])
167
- ], 10, $))), 128))
181
+ ], 10, j))), 128))
168
182
  ])
169
183
  ], 2))), 128))
170
184
  ])
171
- ])) : h("", !0);
185
+ ])) : p("", !0);
172
186
  }
173
187
  });
174
188
  export {
175
- X as _,
176
- O as a,
177
- K as b,
178
- Q as c,
179
- U as d,
180
- W as e,
181
- G as p,
182
- J as r,
183
- M as s
189
+ st as _,
190
+ rt as a,
191
+ et as b,
192
+ O as c,
193
+ X as d,
194
+ Y as e,
195
+ Z as p,
196
+ tt as r,
197
+ K as s
184
198
  };
@@ -6,7 +6,7 @@ import { D as ni, l as Ba, T as ri, e as Wc } from "./index-CIJWcl_6.js";
6
6
  import { useI18n as hr, useCoreStore as Ll } from "@feedmepos/mf-common";
7
7
  import { useDialog as xs, components as Gc, useSnackbar as Kc } from "@feedmepos/ui-library";
8
8
  import { e as Qe, d as ar, f as Gn, c as nt, g as Jc, s as ai, C as fa, h as os, i as ja, a as Bl, j as Zc, n as Yc, k as Xc, b as Qc } from "./controlPlane-DT3t_ftg.js";
9
- import { r as jl, a as eu, b as tu, s as Ua, c as qa, p as nu, _ as ru, d as au, e as su } from "./AppTemplatePicker.vue_vue_type_script_setup_true_lang-CDvGnq6F.js";
9
+ import { r as jl, a as eu, b as tu, s as Ua, c as qa, p as nu, _ as ru, d as au, e as su } from "./AppTemplatePicker.vue_vue_type_script_setup_true_lang-LE_aKvfg.js";
10
10
  import { _ as Ul, B as iu } from "./BrandFontPicker-BZyGrK3D.js";
11
11
  import { g as lu } from "./_commonjsHelpers-DaMA6jEr.js";
12
12
  import { _ as Ft } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -5,7 +5,7 @@ import { a as P } from "./routes-CeuodIgg.js";
5
5
  import { c as $, e as z, a as Q } from "./controlPlane-DT3t_ftg.js";
6
6
  import { u as W } from "./portalContext-B2pXdNtB.js";
7
7
  import { w as F } from "./portalNavigation-DKCfwTH8.js";
8
- import { _ as X, p as Z } from "./AppTemplatePicker.vue_vue_type_script_setup_true_lang-CDvGnq6F.js";
8
+ import { _ as X, p as Z } from "./AppTemplatePicker.vue_vue_type_script_setup_true_lang-LE_aKvfg.js";
9
9
  import { m as ee } from "./index-CIJWcl_6.js";
10
10
  import { _ as U } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
11
  import { _ as R } from "./StatusBadge.vue_vue_type_script_setup_true_lang-CMgQ0bd_.js";
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-obtkXdEv.js")
7
+ component: () => import("./MobileProjectsView-BCXdpVTc.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-CqUxRaS2.js")
24
+ component: () => import("./ControlPlaneView-Bd8w7Yub.js")
25
25
  },
26
26
  {
27
27
  path: "/brand-kit",
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-miniprogram-v2",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-miniprogram-v2",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",