@feedmepos/mf-miniprogram-v2 0.2.2-dev.25 → 0.2.2-dev.27

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 (27) hide show
  1. package/dist/{App-CfZCp6Re.js → App-DHpF0JMk.js} +65 -66
  2. package/dist/AppTemplatePicker.vue_vue_type_script_setup_true_lang-DlQnLlND.js +231 -0
  3. package/dist/{BrandFontPicker-kQKWf1hL.js → BrandFontPicker-BxPN0_Bo.js} +1 -1
  4. package/dist/{BrandKitView-RaUWE69b.js → BrandKitView-CGdw34dr.js} +2 -2
  5. package/dist/{ControlPlaneView-C9PhpGVm.js → ControlPlaneView-Bpj99Skz.js} +7367 -7099
  6. package/dist/{EcosystemView-DgAgcFmd.js → EcosystemView-ChcCixWy.js} +4 -4
  7. package/dist/MobileProjectsView-DU2qBDZy.js +371 -0
  8. package/dist/ModuleCenterView-DLrDO93Q.js +165 -0
  9. package/dist/{ModuleDetailView-CSfMF0Uo.js → ModuleDetailView-Da3qvz_8.js} +1 -1
  10. package/dist/{PagesView-B1uTuHsK.js → PagesView-B_86Haw-.js} +1 -1
  11. package/dist/{PortalSettingsView-CUOL2tdF.js → PortalSettingsView-CiHYX-tw.js} +2 -2
  12. package/dist/{TemplateCenterView-DqZLthqh.js → TemplateCenterView-C2N9ddWj.js} +2 -2
  13. package/dist/{WorkspaceEntryView-BNl0REzn.js → WorkspaceEntryView-BAxGOWe5.js} +1 -1
  14. package/dist/{adminAccess-oXC0xjvK.js → adminAccess-Bzpn1nIn.js} +2 -2
  15. package/dist/app.js +11 -11
  16. package/dist/{controlPlane-sXaC6pAh.js → controlPlane--Q2ulw38.js} +7 -7
  17. package/dist/package.json +1 -1
  18. package/dist/{portalContext-DV-6uUwp.js → portalContext-Bx02hCyg.js} +2 -2
  19. package/dist/{routes-CeuodIgg.js → routes-CTQTYdcO.js} +33 -27
  20. package/dist/style.css +1 -1
  21. package/dist/{useBrandKit-CkdPQRE-.js → useBrandKit-tjDGJeZ6.js} +1 -1
  22. package/dist/{useModuleCatalog-Cep-pzWO.js → useModuleCatalog-DRtQzNvy.js} +2 -2
  23. package/package.json +1 -1
  24. package/dist/AppTemplatePicker-CNJ6kIJk.js +0 -237
  25. package/dist/MobileProjectsView-D-tXKwr7.js +0 -313
  26. package/dist/ModuleCenterView-C6mCPATr.js +0 -147
  27. package/dist/templatePickerFlag-CosY_15R.js +0 -13
@@ -1,46 +1,45 @@
1
- import { defineComponent as N, computed as y, ref as q, onMounted as V, onBeforeUnmount as O, resolveComponent as f, openBlock as n, createElementBlock as i, Fragment as S, createElementVNode as a, normalizeClass as P, createVNode as o, renderList as w, unref as l, withCtx as u, toDisplayString as v, createBlock as B, createCommentVNode as F } from "vue";
2
- import { useCoreStore as $ } from "@feedmepos/mf-common";
3
- import { useRoute as D, RouterView as G } from "vue-router";
1
+ import { defineComponent as K, computed as y, ref as q, onMounted as N, onBeforeUnmount as V, resolveComponent as f, openBlock as n, createElementBlock as i, Fragment as S, createElementVNode as e, normalizeClass as P, createVNode as o, renderList as w, unref as l, withCtx as u, toDisplayString as v, createBlock as B, createCommentVNode as I } from "vue";
2
+ import { useCoreStore as O } from "@feedmepos/mf-common";
3
+ import { useRoute as $, RouterView as D } from "vue-router";
4
4
  import { P as c } from "./PortalIcon-DO0VrIoY.js";
5
- import { r as I, u as Q, w as L } from "./adminAccess-oXC0xjvK.js";
6
- import { p as U } from "./portalContext-DV-6uUwp.js";
5
+ import { r as h, u as G, w as F } from "./adminAccess-Bzpn1nIn.js";
6
+ import { p as Q } from "./portalContext-Bx02hCyg.js";
7
7
  import { p as d } from "./portalNavigation-DKCfwTH8.js";
8
- import { t as H } from "./templatePickerFlag-CosY_15R.js";
9
- import { _ as J } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
- const W = {
8
+ import { _ as U } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
+ const H = {
11
10
  class: "portal-sidebar",
12
11
  "aria-label": "Mini Program navigation"
13
- }, X = ["aria-expanded", "aria-label"], Y = {
12
+ }, J = ["aria-expanded", "aria-label"], W = {
14
13
  id: "miniprogram-navigation",
15
14
  class: "portal-nav"
16
- }, Z = { class: "portal-nav-label" }, ee = { class: "portal-nav-label" }, ae = { class: "portal-main" }, le = {
15
+ }, X = { class: "portal-nav-label" }, Y = { class: "portal-nav-label" }, Z = { class: "portal-main" }, aa = {
17
16
  key: 0,
18
17
  class: "portal-breadcrumb",
19
18
  "aria-label": "Breadcrumb"
20
- }, te = {
19
+ }, ea = {
21
20
  id: "miniprogram-content",
22
21
  class: "portal-content",
23
22
  tabindex: "-1"
24
- }, oe = {
23
+ }, la = {
25
24
  key: 0,
26
25
  class: "portal-empty"
27
- }, re = {
26
+ }, ta = {
28
27
  key: 1,
29
28
  class: "portal-loading",
30
29
  role: "status"
31
- }, ne = {
30
+ }, oa = {
32
31
  key: 2,
33
32
  class: "portal-empty",
34
33
  role: "alert"
35
- }, se = /* @__PURE__ */ N({
34
+ }, ra = /* @__PURE__ */ K({
36
35
  __name: "App",
37
- setup(ie) {
38
- const r = D(), k = $(), s = U(), p = y(() => r.name === "miniprogram-v2-project"), b = q(
39
- I(
36
+ setup(na) {
37
+ const r = $(), k = O(), s = Q(), p = y(() => r.name === "miniprogram-v2-project"), b = q(
38
+ h(
40
39
  "mpv2:portal-collapsed",
41
40
  typeof window < "u" && window.matchMedia("(max-width: 1000px)").matches
42
41
  )
43
- ), g = q(I("mpv2:editor-collapsed", !0)), _ = y(() => p.value ? g.value : b.value), h = y(
42
+ ), g = q(h("mpv2:editor-collapsed", !0)), _ = y(() => p.value ? g.value : b.value), L = y(
44
43
  () => {
45
44
  var C;
46
45
  return p.value ? (C = s.context.value) == null ? void 0 : C.project.name : String(r.meta.title ?? "Ecosystem");
@@ -49,43 +48,43 @@ const W = {
49
48
  { name: "miniprogram-v2-ecosystem", label: "Ecosystem", icon: "ecosystem" },
50
49
  { name: "miniprogram-v2-brand-kit", label: "Brand Kit", icon: "brand" },
51
50
  { name: "miniprogram-v2-pages", label: "Pages", icon: "pages" }
52
- ], R = y(() => ({ name: "miniprogram-v2-mobile-projects", query: d(r.query) })), z = Q(), A = H();
51
+ ], z = y(() => ({ name: "miniprogram-v2-mobile-projects", query: d(r.query) })), R = G();
53
52
  let M = !1;
54
- V(() => {
53
+ N(() => {
55
54
  M = k.hideSidebar.value, k.hideSidebar.value = !0;
56
- }), O(() => {
55
+ }), V(() => {
57
56
  k.hideSidebar.value = M;
58
57
  });
59
- function E() {
60
- p.value ? (g.value = !g.value, L("mpv2:editor-collapsed", g.value)) : (b.value = !b.value, L("mpv2:portal-collapsed", b.value));
58
+ function A() {
59
+ p.value ? (g.value = !g.value, F("mpv2:editor-collapsed", g.value)) : (b.value = !b.value, F("mpv2:portal-collapsed", b.value));
61
60
  }
62
- return (C, e) => {
63
- const m = f("RouterLink"), x = f("FmIcon"), j = f("FmCircularProgress"), K = f("FmButton");
61
+ return (C, a) => {
62
+ const m = f("RouterLink"), x = f("FmIcon"), E = f("FmCircularProgress"), j = f("FmButton");
64
63
  return n(), i(S, null, [
65
- e[13] || (e[13] = a("link", {
64
+ a[13] || (a[13] = e("link", {
66
65
  href: "https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0..1,0",
67
66
  rel: "stylesheet"
68
67
  }, null, -1)),
69
- a("div", {
68
+ e("div", {
70
69
  class: P(["mpv2-app portal-shell", { "portal-shell--collapsed": _.value }])
71
70
  }, [
72
- e[12] || (e[12] = a("a", {
71
+ a[12] || (a[12] = e("a", {
73
72
  class: "portal-skip",
74
73
  href: "#miniprogram-content"
75
74
  }, "Skip to content", -1)),
76
- a("aside", W, [
77
- a("button", {
75
+ e("aside", H, [
76
+ e("button", {
78
77
  class: "portal-sidebar-toggle",
79
78
  type: "button",
80
79
  "aria-expanded": !_.value,
81
80
  "aria-controls": "miniprogram-navigation",
82
81
  "aria-label": _.value ? "Expand navigation" : "Collapse navigation",
83
- onClick: E
82
+ onClick: A
84
83
  }, [
85
84
  o(c, { name: "collapse" }),
86
- e[0] || (e[0] = a("span", { class: "portal-nav-label" }, "Mini Program", -1))
87
- ], 8, X),
88
- a("nav", Y, [
85
+ a[0] || (a[0] = e("span", { class: "portal-nav-label" }, "Mini Program", -1))
86
+ ], 8, J),
87
+ e("nav", W, [
89
88
  (n(), i(S, null, w(T, (t) => o(m, {
90
89
  key: t.name,
91
90
  to: { name: t.name, query: l(d)(l(r).query) },
@@ -98,13 +97,13 @@ const W = {
98
97
  o(c, {
99
98
  name: t.icon
100
99
  }, null, 8, ["name"]),
101
- a("span", Z, v(t.label), 1)
100
+ e("span", X, v(t.label), 1)
102
101
  ]),
103
102
  _: 2
104
103
  }, 1032, ["to", "title", "aria-label", "aria-current"])), 64)),
105
- e[4] || (e[4] = a("p", { class: "portal-nav-caption" }, "Platforms", -1)),
104
+ a[4] || (a[4] = e("p", { class: "portal-nav-caption" }, "Platforms", -1)),
106
105
  o(m, {
107
- to: R.value,
106
+ to: z.value,
108
107
  class: P(["portal-nav-item", { "router-link-active": p.value }]),
109
108
  title: "Mobile Ordering",
110
109
  "aria-label": "Mobile Ordering",
@@ -112,7 +111,7 @@ const W = {
112
111
  }, {
113
112
  default: u(() => [
114
113
  o(c, { name: "mobile" }),
115
- e[1] || (e[1] = a("span", { class: "portal-nav-label" }, "Mobile Ordering", -1))
114
+ a[1] || (a[1] = e("span", { class: "portal-nav-label" }, "Mobile Ordering", -1))
116
115
  ]),
117
116
  _: 1
118
117
  }, 8, ["to", "class", "aria-current"]),
@@ -125,11 +124,11 @@ const W = {
125
124
  }, {
126
125
  default: u(() => [
127
126
  o(c, { name: t }, null, 8, ["name"]),
128
- a("span", ee, v(t === "tablet" ? "Tablet" : "Kiosk"), 1)
127
+ e("span", Y, v(t === "tablet" ? "Tablet" : "Kiosk"), 1)
129
128
  ]),
130
129
  _: 2
131
130
  }, 1032, ["to", "title", "aria-label"])), 64)),
132
- e[5] || (e[5] = a("div", { class: "portal-nav-divider" }, null, -1)),
131
+ a[5] || (a[5] = e("div", { class: "portal-nav-divider" }, null, -1)),
133
132
  o(m, {
134
133
  to: { name: "miniprogram-v2-module-center", query: l(d)(l(r).query) },
135
134
  class: P(["portal-nav-item", { "router-link-active": l(r).name === "miniprogram-v2-module-detail" }]),
@@ -141,11 +140,11 @@ const W = {
141
140
  name: "widgets",
142
141
  size: "md"
143
142
  }),
144
- e[2] || (e[2] = a("span", { class: "portal-nav-label" }, "Module library", -1))
143
+ a[2] || (a[2] = e("span", { class: "portal-nav-label" }, "Module library", -1))
145
144
  ]),
146
145
  _: 1
147
146
  }, 8, ["to", "class"]),
148
- l(z) && l(A) ? (n(), B(m, {
147
+ l(R) ? (n(), B(m, {
149
148
  key: 0,
150
149
  to: { name: "miniprogram-v2-template-center", query: l(d)(l(r).query) },
151
150
  class: "portal-nav-item",
@@ -157,10 +156,10 @@ const W = {
157
156
  name: "dashboard_customize",
158
157
  size: "md"
159
158
  }),
160
- e[3] || (e[3] = a("span", { class: "portal-nav-label" }, "Template library", -1))
159
+ a[3] || (a[3] = e("span", { class: "portal-nav-label" }, "Template library", -1))
161
160
  ]),
162
161
  _: 1
163
- }, 8, ["to"])) : F("", !0)
162
+ }, 8, ["to"])) : I("", !0)
164
163
  ]),
165
164
  o(m, {
166
165
  to: { name: "miniprogram-v2-settings", query: l(d)(l(r).query) },
@@ -170,37 +169,37 @@ const W = {
170
169
  }, {
171
170
  default: u(() => [
172
171
  o(c, { name: "settings" }),
173
- e[6] || (e[6] = a("span", { class: "portal-nav-label" }, "Settings", -1))
172
+ a[6] || (a[6] = e("span", { class: "portal-nav-label" }, "Settings", -1))
174
173
  ]),
175
174
  _: 1
176
175
  }, 8, ["to"])
177
176
  ]),
178
- a("div", ae, [
179
- p.value ? F("", !0) : (n(), i("header", le, [
180
- a("span", null, v(l(s).businessName.value), 1),
181
- e[7] || (e[7] = a("span", { "aria-hidden": "true" }, "/", -1)),
182
- a("span", null, v(h.value), 1),
183
- e[8] || (e[8] = a("div", {
177
+ e("div", Z, [
178
+ p.value ? I("", !0) : (n(), i("header", aa, [
179
+ e("span", null, v(l(s).businessName.value), 1),
180
+ a[7] || (a[7] = e("span", { "aria-hidden": "true" }, "/", -1)),
181
+ e("span", null, v(L.value), 1),
182
+ a[8] || (a[8] = e("div", {
184
183
  id: "portal-page-actions",
185
184
  class: "portal-page-actions"
186
185
  }, null, -1))
187
186
  ])),
188
- a("div", te, [
189
- l(s).businessId.value ? l(s).loading.value ? (n(), i("div", re, [
190
- o(j, { size: "xl" }),
191
- e[10] || (e[10] = a("span", null, "Loading your Mini Program…", -1))
192
- ])) : l(s).error.value ? (n(), i("section", ne, [
193
- e[11] || (e[11] = a("h1", null, "Could not open this Mini Program", -1)),
194
- a("p", null, v(l(s).error.value), 1),
195
- o(K, {
187
+ e("div", ea, [
188
+ l(s).businessId.value ? l(s).loading.value ? (n(), i("div", ta, [
189
+ o(E, { size: "xl" }),
190
+ a[10] || (a[10] = e("span", null, "Loading your Mini Program…", -1))
191
+ ])) : l(s).error.value ? (n(), i("section", oa, [
192
+ a[11] || (a[11] = e("h1", null, "Could not open this Mini Program", -1)),
193
+ e("p", null, v(l(s).error.value), 1),
194
+ o(j, {
196
195
  label: "Try again",
197
196
  onClick: l(s).refresh
198
197
  }, null, 8, ["onClick"])
199
- ])) : (n(), B(l(G), {
198
+ ])) : (n(), B(l(D), {
200
199
  key: `${l(s).businessId.value}:${l(r).params.projectId ?? String(l(r).name)}`
201
- })) : (n(), i("section", oe, [...e[9] || (e[9] = [
202
- a("h1", null, "Select a business", -1),
203
- a("p", null, "Choose a business in the Portal header to open its Mini Program.", -1)
200
+ })) : (n(), i("section", la, [...a[9] || (a[9] = [
201
+ e("h1", null, "Select a business", -1),
202
+ e("p", null, "Choose a business in the Portal header to open its Mini Program.", -1)
204
203
  ])]))
205
204
  ])
206
205
  ])
@@ -208,7 +207,7 @@ const W = {
208
207
  ], 64);
209
208
  };
210
209
  }
211
- }), fe = /* @__PURE__ */ J(se, [["__scopeId", "data-v-782c3640"]]);
210
+ }), ba = /* @__PURE__ */ U(ra, [["__scopeId", "data-v-7820ec7a"]]);
212
211
  export {
213
- fe as default
212
+ ba as default
214
213
  };
@@ -0,0 +1,231 @@
1
+ import { defineComponent as V, computed as f, openBlock as a, createElementBlock as l, normalizeClass as y, createStaticVNode as w, createCommentVNode as h, ref as A, watch as T, resolveComponent as $, createElementVNode as c, Fragment as k, renderList as S, toDisplayString as x, createBlock as C } from "vue";
2
+ function ee(e) {
3
+ return e === "active" ? "success" : e === "needs_attention" ? "warning" : "neutral";
4
+ }
5
+ function te(e) {
6
+ return e === "active" ? "Active" : e === "needs_attention" ? "Needs attention" : "Archived";
7
+ }
8
+ function re(e) {
9
+ return e === "succeeded" ? "success" : e === "failed" ? "error" : e === "queued" || e === "running" ? "info" : "neutral";
10
+ }
11
+ function se(e) {
12
+ switch (e) {
13
+ case "queued":
14
+ return "Queued";
15
+ case "running":
16
+ return "Running";
17
+ case "succeeded":
18
+ return "Built";
19
+ case "failed":
20
+ return "Build failed";
21
+ default:
22
+ return "No build yet";
23
+ }
24
+ }
25
+ function ae(e) {
26
+ switch (e) {
27
+ case "ready":
28
+ return "Ready";
29
+ case "provisioning":
30
+ return "Setting up";
31
+ case "failed":
32
+ return "Setup failed";
33
+ default:
34
+ return "Not set up";
35
+ }
36
+ }
37
+ const q = ["preview", "published", "rolled_back"];
38
+ function ne(e) {
39
+ return q.includes(e.status);
40
+ }
41
+ function le(e) {
42
+ return e.is_live === 1 ? "Live" : e.build_status === "queued" || e.build_status === "running" ? "Building" : e.build_status === "failed" ? "Failed" : e.build_status === "succeeded" ? "Ready" : "Draft";
43
+ }
44
+ function ie(e) {
45
+ return e.is_live === 1 ? "primary" : e.build_status === "succeeded" ? "success" : e.build_status === "queued" || e.build_status === "running" ? "info" : e.build_status === "failed" ? "error" : "neutral";
46
+ }
47
+ const z = {
48
+ key: 0,
49
+ fill: "currentColor",
50
+ class: "text-fm-color-neutral-gray-300"
51
+ }, R = {
52
+ key: 1,
53
+ fill: "currentColor",
54
+ class: "text-fm-color-neutral-gray-300"
55
+ }, D = {
56
+ key: 2,
57
+ fill: "currentColor",
58
+ class: "text-fm-color-neutral-gray-300"
59
+ }, F = /* @__PURE__ */ V({
60
+ __name: "AppTemplateThumbnail",
61
+ props: {
62
+ restaurantStyle: {},
63
+ size: { default: "sm" }
64
+ },
65
+ setup(e) {
66
+ const d = e, u = f(
67
+ () => d.restaurantStyle === "qsr" || d.restaurantStyle === "coffee" || d.restaurantStyle === "tea"
68
+ ), m = f(() => d.size === "lg" ? "h-[124px] w-[72px]" : "h-[72px] w-[42px]");
69
+ return (v, i) => u.value ? (a(), l("svg", {
70
+ key: 0,
71
+ viewBox: "0 0 56 96",
72
+ class: y([m.value, "shrink-0 rounded-[6px] border border-portal-border-default bg-portal-bg-default"]),
73
+ "aria-hidden": "true",
74
+ focusable: "false"
75
+ }, [
76
+ e.restaurantStyle === "qsr" ? (a(), l("g", z, [...i[0] || (i[0] = [
77
+ w('<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)
78
+ ])])) : e.restaurantStyle === "coffee" ? (a(), l("g", R, [...i[1] || (i[1] = [
79
+ w('<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)
80
+ ])])) : (a(), l("g", D, [...i[2] || (i[2] = [
81
+ w('<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)
82
+ ])]))
83
+ ], 2)) : h("", !0);
84
+ }
85
+ }), I = { key: 0 }, P = { class: "flex items-start gap-16" }, j = {
86
+ key: 0,
87
+ class: "flex w-[160px] shrink-0 flex-col gap-24"
88
+ }, W = ["onClick"], G = { class: "min-w-0 flex-1" }, H = {
89
+ role: "radiogroup",
90
+ "aria-label": "App template",
91
+ class: "grid grid-cols-2 gap-8"
92
+ }, K = ["aria-checked", "disabled", "onClick"], M = {
93
+ key: 1,
94
+ class: "flex h-[124px] w-[72px] shrink-0 items-center justify-center rounded-[6px] border border-portal-border-default bg-portal-bg-canvas fm-typo-en-title-sm-600 text-portal-text-muted",
95
+ "aria-hidden": "true"
96
+ }, O = { class: "flex flex-wrap items-center gap-6" }, Q = { class: "fm-typo-en-body-md-600 text-portal-text-primary" }, U = {
97
+ key: 0,
98
+ class: "rounded-full bg-portal-bg-canvas px-8 py-[2px] fm-typo-en-body-sm-400 text-portal-text-muted"
99
+ }, Y = { class: "mt-4 line-clamp-2 fm-typo-en-body-sm-400 text-portal-text-muted" }, J = {
100
+ key: 0,
101
+ class: "m-0 fm-typo-en-body-sm-400 text-portal-text-muted"
102
+ }, oe = /* @__PURE__ */ V({
103
+ __name: "AppTemplatePicker",
104
+ props: {
105
+ templates: {},
106
+ modelValue: {},
107
+ search: { default: "" },
108
+ disabled: { type: Boolean }
109
+ },
110
+ emits: ["update:modelValue"],
111
+ setup(e, { emit: d }) {
112
+ const u = e, m = d, v = f(() => u.templates.length > 1), i = f(() => {
113
+ const r = [], n = /* @__PURE__ */ new Map();
114
+ for (const s of u.templates) {
115
+ if (!s.industries.length) {
116
+ r.push(s);
117
+ continue;
118
+ }
119
+ for (const t of s.industries) {
120
+ const o = n.get(t) ?? [];
121
+ o.push(s), n.set(t, o);
122
+ }
123
+ }
124
+ return [
125
+ ...r.length ? [{ label: "Explore", templates: r }] : [],
126
+ ...[...n.entries()].sort(([s], [t]) => s.localeCompare(t)).map(([s, t]) => ({ label: s, templates: t }))
127
+ ];
128
+ }), p = A(null);
129
+ T(
130
+ i,
131
+ (r) => {
132
+ var n, s;
133
+ r.some((t) => t.label === p.value) || (p.value = ((n = r.find((t) => t.templates.some((o) => o.id === u.modelValue))) == null ? void 0 : n.label) ?? ((s = r[0]) == null ? void 0 : s.label) ?? null);
134
+ },
135
+ { immediate: !0 }
136
+ );
137
+ const _ = f(() => i.value.find((r) => r.label === p.value) ?? i.value[0] ?? null), g = f(() => {
138
+ var s;
139
+ const r = ((s = _.value) == null ? void 0 : s.templates) ?? [], n = u.search.trim().toLowerCase();
140
+ return n ? r.filter((t) => `${t.label} ${t.description}`.toLowerCase().includes(n)) : r;
141
+ });
142
+ function L(r) {
143
+ u.disabled || m("update:modelValue", r);
144
+ }
145
+ function b(r) {
146
+ const n = g.value;
147
+ return n.length % 2 === 1 && n[n.length - 1] === r;
148
+ }
149
+ function E(r) {
150
+ return b(r) ? "col-span-2 flex-row items-center" : "flex-col items-start";
151
+ }
152
+ const B = /* @__PURE__ */ new Set(["qsr", "coffee", "tea"]);
153
+ function N(r) {
154
+ return !!r.restaurantStyle && B.has(r.restaurantStyle);
155
+ }
156
+ return (r, n) => {
157
+ const s = $("FmIcon");
158
+ return v.value ? (a(), l("section", I, [
159
+ c("div", P, [
160
+ i.value.length > 1 ? (a(), l("div", j, [
161
+ (a(!0), l(k, null, S(i.value, (t) => {
162
+ var o;
163
+ return a(), l("button", {
164
+ key: t.label,
165
+ type: "button",
166
+ class: y([
167
+ "rounded-lg px-12 py-8 text-left fm-typo-en-body-sm-600 transition",
168
+ t.label === ((o = _.value) == null ? void 0 : o.label) ? "bg-fm-color-primary-50 text-fm-color-primary" : "text-portal-text-muted hover:bg-portal-bg-canvas"
169
+ ]),
170
+ onClick: (X) => p.value = t.label
171
+ }, x(t.label), 11, W);
172
+ }), 128))
173
+ ])) : h("", !0),
174
+ c("div", G, [
175
+ c("div", H, [
176
+ (a(!0), l(k, null, S(g.value, (t) => (a(), l("button", {
177
+ key: t.id,
178
+ type: "button",
179
+ role: "radio",
180
+ "aria-checked": e.modelValue === t.id,
181
+ disabled: e.disabled,
182
+ class: y(["relative flex w-full cursor-pointer gap-8 rounded-lg border p-12 text-left transition disabled:cursor-not-allowed disabled:opacity-60", [
183
+ E(t),
184
+ e.modelValue === t.id ? "border-fm-color-primary bg-fm-color-primary-50" : "border-transparent hover:bg-portal-bg-canvas"
185
+ ]]),
186
+ onClick: (o) => L(t.id)
187
+ }, [
188
+ e.modelValue === t.id ? (a(), C(s, {
189
+ key: 0,
190
+ name: "check_circle",
191
+ size: "sm",
192
+ class: "absolute right-8 top-8 text-fm-color-primary"
193
+ })) : h("", !0),
194
+ c("span", {
195
+ class: y(b(t) ? "flex shrink-0" : "flex w-full justify-center")
196
+ }, [
197
+ N(t) ? (a(), C(F, {
198
+ key: 0,
199
+ size: "lg",
200
+ "restaurant-style": t.restaurantStyle
201
+ }, null, 8, ["restaurant-style"])) : (a(), l("span", M, x(t.label.slice(0, 1)), 1))
202
+ ], 2),
203
+ c("span", {
204
+ class: y(b(t) ? "min-w-0 flex-1" : "min-w-0")
205
+ }, [
206
+ c("span", O, [
207
+ c("span", Q, x(t.label), 1),
208
+ t.default ? (a(), l("span", U, " Default ")) : h("", !0)
209
+ ]),
210
+ c("span", Y, x(t.description), 1)
211
+ ], 2)
212
+ ], 10, K))), 128))
213
+ ]),
214
+ g.value.length ? h("", !0) : (a(), l("p", J, ' No template matches "' + x(e.search) + '" ', 1))
215
+ ])
216
+ ])
217
+ ])) : h("", !0);
218
+ };
219
+ }
220
+ });
221
+ export {
222
+ oe as _,
223
+ ie as a,
224
+ le as b,
225
+ te as c,
226
+ re as d,
227
+ se as e,
228
+ ae as p,
229
+ ne as r,
230
+ ee as s
231
+ };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as te, ref as n, computed as F, watch as G, resolveComponent as I, openBlock as s, createElementBlock as u, withKeys as L, withModifiers as N, createElementVNode as a, toDisplayString as k, createVNode as P, withCtx as J, normalizeStyle as E, withDirectives as K, vModelText as q, Fragment as S, renderList as oe, createCommentVNode as v, unref as T, createBlock as ae, createTextVNode as W, nextTick as le } from "vue";
2
- import { G as V, f as ne, b as p, l as se } from "./useBrandKit-CkdPQRE-.js";
2
+ import { G as V, f as ne, b as p, l as se } from "./useBrandKit-tjDGJeZ6.js";
3
3
  import { _ as re } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  const xe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAADbZJREFUeAHtW2lsXNUV/t4yi5cZO4mdxUlsEmiBkI2dCkJBAloQSEBaCUoKkahUCYLUqjRFbVVVqlS6qAKVlqpIVBRRlqjwg1KKQNCUJIWELEBQQkgIcZzEThzimfF4PDNv63fufTNeMuN4TSXgSMd3ljfvve9+55577nefjVwuH+BzZCY+Z/YF4M+62fg/W8Y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e/mszxq5qMtF0ZPyvtaVnCIaGAH335TEmhuTVfeIxmvGVPxXyycsgTd0GnibYbypU0R04inIlgmUPCMSqyzzfF7aZysrnwZm/JsWWVh1eQxXLpr8rdiSGafj33h2M2F1ZAK1PdOTF52K7HJXUuZgFlJYOsdA6/TJZbKaGV/839Jn3L4A/Fm3/wGRTH3CBVOXMAAAAABJRU5ErkJggg==", ue = ["onKeydown"], ie = { class: "font-picker__label" }, de = ["disabled", "aria-label", "aria-expanded"], ce = ["onKeydown", "aria-label"], ve = {
5
5
  key: 0,
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as H, ref as K, computed as z, onMounted as S, onScopeDispose as M, resolveComponent as y, openBlock as l, createElementBlock as r, createElementVNode as t, unref as a, createTextVNode as m, createBlock as _, Teleport as O, toDisplayString as p, createCommentVNode as d, createVNode as c, withCtx as Y, normalizeClass as G, normalizeStyle as j, Fragment as b, renderList as f, withDirectives as A, vModelText as I } from "vue";
2
- import { _ as q, B as J } from "./BrandFontPicker-kQKWf1hL.js";
2
+ import { _ as q, B as J } from "./BrandFontPicker-BxPN0_Bo.js";
3
3
  import { useRouter as Q, onBeforeRouteLeave as W } from "vue-router";
4
4
  import { useDialog as X, useSnackbar as Z } from "@feedmepos/ui-library";
5
- import { a as ee, C as D, t as E, F as te, u as ae, i as se } from "./useBrandKit-CkdPQRE-.js";
5
+ import { a as ee, C as D, t as E, F as te, u as ae, i as se } from "./useBrandKit-tjDGJeZ6.js";
6
6
  import { _ as oe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
7
  const ne = { class: "portal-page bg-portal-bg-canvas text-portal-text-primary" }, le = { class: "portal-page-inner brand-page" }, re = { class: "portal-page-heading" }, ie = { class: "brand-help" }, de = { class: "brand-actions" }, ue = {
8
8
  key: 0,