@feedmepos/mf-miniprogram-v2 0.2.8-dev.11 → 0.2.8-dev.12

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,4 +1,4 @@
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";
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, normalizeStyle as G, normalizeClass as j, Fragment as b, renderList as k, withDirectives as A, vModelText as I } from "vue";
2
2
  import { _ as q, B as J } from "./BrandFontPicker-VX2LAN2w.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";
@@ -21,13 +21,13 @@ const ne = { class: "portal-page bg-portal-bg-canvas text-portal-text-primary" }
21
21
  }, me = {
22
22
  key: 4,
23
23
  role: "status"
24
- }, be = { class: "portal-section" }, he = { class: "portal-section-head" }, ge = { class: "brand-color-grid" }, ye = ["value", "aria-label", "disabled", "onInput"], _e = { class: "brand-field-label" }, fe = ["onUpdate:modelValue", "aria-label", "aria-invalid", "disabled"], ke = {
24
+ }, be = { class: "portal-section" }, he = { class: "portal-section-head" }, ge = { class: "brand-color-grid" }, ye = ["value", "aria-label", "disabled", "onInput"], _e = { class: "brand-field-label" }, ke = ["onUpdate:modelValue", "aria-label", "aria-invalid", "disabled"], fe = {
25
25
  key: 0,
26
26
  class: "portal-error"
27
27
  }, xe = { class: "brand-advanced" }, Ce = { class: "brand-role-grid" }, Be = ["value", "aria-label", "disabled", "onInput"], we = ["onUpdate:modelValue", "aria-label", "aria-invalid", "disabled"], Fe = { class: "portal-section" }, Ve = { class: "portal-section-head" }, Ke = { class: "brand-font-grid" }, Se = /* @__PURE__ */ H({
28
28
  __name: "BrandKitView",
29
29
  setup(Ae) {
30
- const e = ae(), h = ee(), k = X(), L = Z(), x = K(!1), T = Q(), u = K(!1), C = ["primary", "secondary", "accent", "background.base", "text.primary"], $ = C.map((n) => D.find((s) => s.path === n)), P = D.filter((n) => !C.includes(n.path)), B = z(
30
+ const e = ae(), h = ee(), f = X(), L = Z(), x = K(!1), T = Q(), u = K(!1), C = ["primary", "secondary", "accent", "background.base", "text.primary"], $ = C.map((n) => D.find((s) => s.path === n)), P = D.filter((n) => !C.includes(n.path)), B = z(
31
31
  () => !h.value || !e.state.loaded || e.state.loading || e.state.saving || e.hasInvalidColor.value || e.dirtyCount.value === 0
32
32
  ), g = (n) => !!(e.state.colors[n] && !se(e.state.colors[n]));
33
33
  function w(n, s) {
@@ -37,7 +37,7 @@ const ne = { class: "portal-page bg-portal-bg-canvas text-portal-text-primary" }
37
37
  n === "colors" ? e.state.colors = { ...e.state.savedColors } : e.state.fonts = { ...e.state.savedFonts }, u.value = !1;
38
38
  }
39
39
  function U() {
40
- k.open({
40
+ f.open({
41
41
  title: "Save the live Brand Kit?",
42
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
43
  dismissAway: !0,
@@ -57,7 +57,7 @@ const ne = { class: "portal-page bg-portal-bg-canvas text-portal-text-primary" }
57
57
  function V(n) {
58
58
  !e.dirtyCount.value && !e.state.saving || (n.preventDefault(), n.returnValue = "");
59
59
  }
60
- return S(() => window.addEventListener("beforeunload", V)), M(() => window.removeEventListener("beforeunload", V)), W((n) => e.state.saving ? !1 : e.dirtyCount.value ? (k.open({
60
+ return S(() => window.addEventListener("beforeunload", V)), M(() => window.removeEventListener("beforeunload", V)), W((n) => e.state.saving ? !1 : e.dirtyCount.value ? (f.open({
61
61
  title: "Discard unsaved Brand Kit changes?",
62
62
  message: "Your live Brand Kit has not changed. Leave this page and discard the changes you have not saved?",
63
63
  dismissAway: !0,
@@ -105,15 +105,16 @@ const ne = { class: "portal-page bg-portal-bg-canvas text-portal-text-primary" }
105
105
  }, {
106
106
  default: Y(() => [
107
107
  t("span", {
108
- class: G(["brand-save-content fm-typo-en-body-lg-600", { invisible: a(e).state.saving }])
108
+ class: j(["brand-save-content fm-typo-en-body-lg-600", { invisible: a(e).state.saving }]),
109
+ style: G({ color: B.value ? "var(--fm-color-neutral-gray-200)" : "var(--fm-color-neutral-white)" })
109
110
  }, [
110
111
  c(N, {
111
112
  name: "save",
112
113
  "aria-hidden": "true",
113
- style: j({ color: B.value ? "#c7c7cc" : "#ffffff", fontSize: "20px", width: "20px", height: "20px", lineHeight: "20px", flex: "0 0 20px" })
114
- }, null, 8, ["style"]),
114
+ style: { color: "inherit", fontSize: "20px", width: "20px", height: "20px", lineHeight: "20px", flex: "0 0 20px" }
115
+ }),
115
116
  s[8] || (s[8] = m(" Save ", -1))
116
- ], 2)
117
+ ], 6)
117
118
  ]),
118
119
  _: 1
119
120
  }, 8, ["disabled", "loading"])
@@ -149,7 +150,7 @@ const ne = { class: "portal-page bg-portal-bg-canvas text-portal-text-primary" }
149
150
  }, null, 8, ["disabled"])
150
151
  ]),
151
152
  t("div", ge, [
152
- (l(!0), r(b, null, f(a($), (o) => (l(), r("label", {
153
+ (l(!0), r(b, null, k(a($), (o) => (l(), r("label", {
153
154
  key: o.path,
154
155
  class: "brand-color-card"
155
156
  }, [
@@ -169,10 +170,10 @@ const ne = { class: "portal-page bg-portal-bg-canvas text-portal-text-primary" }
169
170
  disabled: a(e).state.saving,
170
171
  placeholder: "App default",
171
172
  spellcheck: "false"
172
- }, null, 8, fe), [
173
+ }, null, 8, ke), [
173
174
  [I, a(e).state.colors[o.path]]
174
175
  ]),
175
- g(o.path) ? (l(), r("small", ke, "Enter a hex color")) : d("", !0)
176
+ g(o.path) ? (l(), r("small", fe, "Enter a hex color")) : d("", !0)
176
177
  ]))), 128))
177
178
  ]),
178
179
  t("details", xe, [
@@ -182,7 +183,7 @@ const ne = { class: "portal-page bg-portal-bg-canvas text-portal-text-primary" }
182
183
  ], -1)),
183
184
  s[12] || (s[12] = t("p", { class: "portal-description" }, " Each role is saved independently. Changing a brand color does not automatically replace text or status colors. ", -1)),
184
185
  t("div", Ce, [
185
- (l(!0), r(b, null, f(a(P), (o) => (l(), r("label", {
186
+ (l(!0), r(b, null, k(a(P), (o) => (l(), r("label", {
186
187
  key: o.path
187
188
  }, [
188
189
  t("span", null, p(o.group) + " · " + p(o.label), 1),
@@ -225,7 +226,7 @@ const ne = { class: "portal-page bg-portal-bg-canvas text-portal-text-primary" }
225
226
  }, null, 8, ["disabled"])
226
227
  ]),
227
228
  t("div", Ke, [
228
- (l(!0), r(b, null, f(a(te), (o) => (l(), _(J, {
229
+ (l(!0), r(b, null, k(a(te), (o) => (l(), _(J, {
229
230
  key: o.path,
230
231
  modelValue: a(e).state.fonts[o.path],
231
232
  "onUpdate:modelValue": [
@@ -243,7 +244,7 @@ const ne = { class: "portal-page bg-portal-bg-canvas text-portal-text-primary" }
243
244
  ]);
244
245
  };
245
246
  }
246
- }), Pe = /* @__PURE__ */ oe(Se, [["__scopeId", "data-v-69311627"]]);
247
+ }), Pe = /* @__PURE__ */ oe(Se, [["__scopeId", "data-v-d5419d4a"]]);
247
248
  export {
248
249
  Pe as default
249
250
  };