@mx-cartographer/experiences 7.0.49 → 7.0.50-alpha.bb1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [7.0.50] - 10-09-2025
2
+
3
+ - **ADDED** - Add style font name to the client config
4
+
1
5
  ## [7.0.49] - 10-09-2025
2
6
 
3
7
  - **FIXED** - MiniWidget CTA Button Breaking UI fix.
@@ -1,6 +1,6 @@
1
1
  import { G as k } from "../useCombineEvents-BUDIR1ba.mjs";
2
2
  import { A as ss, a as rs, u as os, b as as } from "../useCombineEvents-BUDIR1ba.mjs";
3
- import { F as y, A as u } from "../Fetch-87LIQbEA.mjs";
3
+ import { F as S, A as h } from "../Fetch-87LIQbEA.mjs";
4
4
  import { B as is } from "../BeatApi-DhJpgCLz.mjs";
5
5
  import { C as et } from "../CategoryStore-BCcpI3oJ.mjs";
6
6
  import { a as ds } from "../CategoryStore-BCcpI3oJ.mjs";
@@ -33,10 +33,10 @@ import { L as Cr } from "../ListItemAction-DSrYDGAP.mjs";
33
33
  import { T as ct } from "../TrendsStore-BKBnNQba.mjs";
34
34
  import { L as Dr, S as Ar } from "../TrendsStore-BKBnNQba.mjs";
35
35
  import { A as Tr, B as Br, I as Ir, N as Nr, T as Mr, a as kr } from "../ToggleListItem-r0Kx56wF.mjs";
36
- import { jsxs as f, jsx as n } from "react/jsx-runtime";
36
+ import { jsxs as y, jsx as n } from "react/jsx-runtime";
37
37
  import dt, { useRef as lt, useEffect as ut } from "react";
38
- import { css as w, keyframes as ht } from "@mxenabled/cssinjs";
39
- import { useTokens as x, Text as B } from "@mxenabled/mxui";
38
+ import { css as x, keyframes as ht } from "@mxenabled/cssinjs";
39
+ import { useTokens as C, Text as B } from "@mxenabled/mxui";
40
40
  import { D as Rr } from "../Donut-1UMNcG67.mjs";
41
41
  import { L as Or } from "../LineChart-B2Y7zwMu.mjs";
42
42
  import { S as Lr } from "../StatusBar-BK_uYHAB.mjs";
@@ -54,7 +54,7 @@ import { G as fo, B as yo, C as So, W as bo, d as wo, a as xo, i as Co, t as vo,
54
54
  import { u as zo } from "../useAccountDisplayName-Dwa7UkEU.mjs";
55
55
  import { u as jo } from "../useInsightsEnabled-DSnpkUq0.mjs";
56
56
  import { u as Vo } from "../useScreenSize-B6JyS_Lj.mjs";
57
- import { makeAutoObservable as _, runInAction as m, reaction as _t } from "mobx";
57
+ import { makeAutoObservable as f, runInAction as p, reaction as _t } from "mobx";
58
58
  import { a as ft } from "../AccountStore-XZqHTKm3.mjs";
59
59
  import yt from "posthog-js";
60
60
  import { B as St } from "../BeatStore-IBnXd4YK.mjs";
@@ -119,78 +119,78 @@ const Pt = [
119
119
  { key: "warning", light: "warning_color", dark: "warning_color_dark" },
120
120
  { key: "info", light: "info_color", dark: "info_color_dark" },
121
121
  { key: "success", light: "success_color", dark: "success_color_dark" }
122
- ], ze = (s, t) => {
123
- const e = s.palette.mode === "dark", r = t?.system_font ?? s.typography.fontFamily, o = (d, g) => d ? {
124
- lighter: G(d, 0.5),
125
- light: G(d, 0.25),
126
- main: d,
127
- dark: H(d, 0.25),
128
- darker: H(d, 0.5)
129
- } : g, a = Object.fromEntries(
130
- Ot.map(({ key: d, light: g, dark: S }) => [
131
- d,
132
- o(
133
- t?.[e ? S : g],
134
- s.palette[d]
122
+ ], ze = (s, t, e) => {
123
+ const r = s.palette.mode === "dark", o = (e?.master?.style?.font_name || t?.system_font) ?? s.typography.fontFamily, a = (i, _) => i ? {
124
+ lighter: G(i, 0.5),
125
+ light: G(i, 0.25),
126
+ main: i,
127
+ dark: H(i, 0.25),
128
+ darker: H(i, 0.5)
129
+ } : _, c = Object.fromEntries(
130
+ Ot.map(({ key: i, light: _, dark: b }) => [
131
+ i,
132
+ a(
133
+ t?.[r ? b : _],
134
+ s.palette[i]
135
135
  )
136
136
  ])
137
- ), l = Object.fromEntries(
138
- Pt.map((d) => [
139
- d,
140
- d === "fontFamily" ? r : { fontFamily: r }
137
+ ), d = Object.fromEntries(
138
+ Pt.map((i) => [
139
+ i,
140
+ i === "fontFamily" ? o : { fontFamily: o }
141
141
  ])
142
- ), c = {
142
+ ), u = {
143
143
  MuiTabs: {
144
144
  styleOverrides: {
145
- indicator: { backgroundColor: a.primary.light }
145
+ indicator: { backgroundColor: c.primary.light }
146
146
  }
147
147
  },
148
148
  MuiPickersCalendarHeader: {
149
149
  styleOverrides: {
150
150
  switchViewButton: {
151
- color: a.primary.lighter,
152
- "&:hover": { backgroundColor: Mt(a.primary.light, 0.1) }
151
+ color: c.primary.lighter,
152
+ "&:hover": { backgroundColor: Mt(c.primary.light, 0.1) }
153
153
  }
154
154
  }
155
155
  }
156
- }, i = t?.button_corner_radius, h = t?.card_corner_radius, p = {
157
- ...c,
158
- ...i && {
156
+ }, l = t?.button_corner_radius, g = t?.card_corner_radius, m = {
157
+ ...u,
158
+ ...l && {
159
159
  MuiButton: {
160
160
  styleOverrides: {
161
- root: { borderRadius: `${i}px`, textTransform: "none" }
161
+ root: { borderRadius: `${l}px`, textTransform: "none" }
162
162
  }
163
163
  },
164
164
  MuiIconButton: {
165
165
  styleOverrides: {
166
166
  root: {
167
- borderRadius: `${i}px`,
168
- minWidth: i,
169
- minHeight: i
167
+ borderRadius: `${l}px`,
168
+ minWidth: l,
169
+ minHeight: l
170
170
  }
171
171
  }
172
172
  },
173
173
  MuiToggleButton: {
174
174
  styleOverrides: {
175
- root: { borderRadius: `${i}px`, textTransform: "none" }
175
+ root: { borderRadius: `${l}px`, textTransform: "none" }
176
176
  }
177
177
  }
178
178
  },
179
- ...h && {
179
+ ...g && {
180
180
  MuiCard: {
181
- styleOverrides: { root: { borderRadius: `${h}px` } }
181
+ styleOverrides: { root: { borderRadius: `${g}px` } }
182
182
  },
183
183
  MuiPaper: {
184
- styleOverrides: { root: { borderRadius: `${h}px` } }
184
+ styleOverrides: { root: { borderRadius: `${g}px` } }
185
185
  }
186
186
  }
187
187
  };
188
- return { typography: l, palette: a, components: p };
188
+ return { typography: d, palette: c, components: m };
189
189
  };
190
190
  class F {
191
191
  fetchInstance;
192
192
  constructor(t) {
193
- this.fetchInstance = new y(t, "", {
193
+ this.fetchInstance = new S(t, "", {
194
194
  Accept: "application/json",
195
195
  "Content-Type": "application/json"
196
196
  });
@@ -207,40 +207,40 @@ class F {
207
207
  class Xe {
208
208
  fetchInstance;
209
209
  constructor(t, e, r) {
210
- this.fetchInstance = new y(t, e, void 0, r);
210
+ this.fetchInstance = new S(t, e, void 0, r);
211
211
  }
212
- getLocalizedCopy = async (t) => this.fetchInstance.post(u.LOCALIZED_COPY, t).then((e) => e);
213
- getLocalizedContent = async (t) => this.fetchInstance.post(`${u.LOCALIZED_CONTENT}/${t}`).then((e) => e);
212
+ getLocalizedCopy = async (t) => this.fetchInstance.post(h.LOCALIZED_COPY, t).then((e) => e);
213
+ getLocalizedContent = async (t) => this.fetchInstance.post(`${h.LOCALIZED_CONTENT}/${t}`).then((e) => e);
214
214
  }
215
215
  class je {
216
216
  fetchInstance;
217
217
  constructor(t, e, r) {
218
- this.fetchInstance = new y(t, e, void 0, r);
218
+ this.fetchInstance = new S(t, e, void 0, r);
219
219
  }
220
- addScheduledPayment = async (t) => this.fetchInstance.post(u.SCHEDULED_PAYMENTS, {
220
+ addScheduledPayment = async (t) => this.fetchInstance.post(h.SCHEDULED_PAYMENTS, {
221
221
  ...t,
222
222
  is_recurring: "true",
223
223
  transaction_type: rt.DEBIT
224
224
  }).then((e) => e.scheduled_payment);
225
- getScheduledPayments = async () => this.fetchInstance.get(u.SCHEDULED_PAYMENTS).then((t) => t.scheduled_payments);
226
- updateScheduledPayment = async (t) => this.fetchInstance.put(`${u.SCHEDULED_PAYMENTS}/${t.guid}`, t).then((e) => e.scheduled_payment);
227
- deleteScheduledPayment = async (t) => this.fetchInstance.delete(`${u.SCHEDULED_PAYMENTS}/${t}`).then((e) => e);
225
+ getScheduledPayments = async () => this.fetchInstance.get(h.SCHEDULED_PAYMENTS).then((t) => t.scheduled_payments);
226
+ updateScheduledPayment = async (t) => this.fetchInstance.put(`${h.SCHEDULED_PAYMENTS}/${t.guid}`, t).then((e) => e.scheduled_payment);
227
+ deleteScheduledPayment = async (t) => this.fetchInstance.delete(`${h.SCHEDULED_PAYMENTS}/${t}`).then((e) => e);
228
228
  }
229
229
  class $ {
230
230
  fetchInstance;
231
231
  constructor(t, e, r) {
232
- this.fetchInstance = new y(t, e, void 0, r);
232
+ this.fetchInstance = new S(t, e, void 0, r);
233
233
  }
234
- getUserFeatures = async () => this.fetchInstance.get(u.USER_FEATURES).then((t) => t.user_features).catch((t) => t);
235
- updateUser = async (t) => this.fetchInstance.put(u.USER, t).then((e) => e.user);
236
- updateUserProfile = async (t) => this.fetchInstance.put(`${u.USER_PROFILES}/${t.guid}`, t).then((e) => e.user_profile);
234
+ getUserFeatures = async () => this.fetchInstance.get(h.USER_FEATURES).then((t) => t.user_features).catch((t) => t);
235
+ updateUser = async (t) => this.fetchInstance.put(h.USER, t).then((e) => e.user);
236
+ updateUserProfile = async (t) => this.fetchInstance.put(`${h.USER_PROFILES}/${t.guid}`, t).then((e) => e.user_profile);
237
237
  }
238
238
  class W {
239
239
  fetchInstance;
240
240
  constructor(t, e) {
241
- this.fetchInstance = new y(t, e);
241
+ this.fetchInstance = new S(t, e);
242
242
  }
243
- requestWidgetUrl = async (t) => this.fetchInstance.post(u.WIDGET_URLS, t).then((e) => e.widget_url);
243
+ requestWidgetUrl = async (t) => this.fetchInstance.post(h.WIDGET_URLS, t).then((e) => e.widget_url);
244
244
  }
245
245
  var Ut = /* @__PURE__ */ ((s) => (s[s.UNKNOWN = 0] = "UNKNOWN", s[s.CORRECT = 1] = "CORRECT", s[s.INCORRECT = 2] = "INCORRECT", s))(Ut || {}), Lt = /* @__PURE__ */ ((s) => (s.Missed = "Missed", s.Paid = "Paid", s.Upcoming = "Upcoming expense", s.Income = "Income", s))(Lt || {}), Gt = /* @__PURE__ */ ((s) => (s[s.Unknown = 0] = "Unknown", s[s.Subscription = 1] = "Subscription", s[s.Bill = 2] = "Bill", s))(Gt || {}), Ht = /* @__PURE__ */ ((s) => (s.Desktop = "Desktop", s.Mobile = "Mobile", s))(Ht || {});
246
246
  const Ke = (s) => {
@@ -249,18 +249,18 @@ const Ke = (s) => {
249
249
  t.current = s;
250
250
  }, [s]), t.current;
251
251
  }, Ft = ({ color: s, labelAverage: t, labelMain: e }) => {
252
- const r = x(), o = Wt(r, s);
253
- return /* @__PURE__ */ f("div", { className: `mx-cmn-bar-chart-legend ${o}`, children: [
252
+ const r = C(), o = Wt(r, s);
253
+ return /* @__PURE__ */ y("div", { className: `mx-cmn-bar-chart-legend ${o}`, children: [
254
254
  /* @__PURE__ */ n("div", { "aria-label": e, className: "mx-cmn-color-square", role: "img" }),
255
255
  /* @__PURE__ */ n(B, { variant: "XSmall", children: e }),
256
- /* @__PURE__ */ f("div", { "aria-label": t, className: "mx-cmn-triple-dot", role: "img", children: [
256
+ /* @__PURE__ */ y("div", { "aria-label": t, className: "mx-cmn-triple-dot", role: "img", children: [
257
257
  /* @__PURE__ */ n("div", { className: "mx-cmn-dot" }),
258
258
  /* @__PURE__ */ n("div", { className: "mx-cmn-dot" }),
259
259
  /* @__PURE__ */ n("div", { className: "mx-cmn-dot" })
260
260
  ] }),
261
261
  /* @__PURE__ */ n(B, { variant: "XSmall", children: t })
262
262
  ] });
263
- }, Wt = (s, t) => w({
263
+ }, Wt = (s, t) => x({
264
264
  alignItems: "center",
265
265
  display: "flex",
266
266
  gap: s.Spacing.XSmall,
@@ -293,41 +293,41 @@ const Ke = (s) => {
293
293
  index: r,
294
294
  label: o,
295
295
  onClick: a,
296
- selectedIndex: l,
297
- value: c
296
+ selectedIndex: c,
297
+ value: d
298
298
  }) => {
299
- const i = x(), h = qt(i, t, e), p = (S) => {
300
- a && (S.key === " " || S.key === "Enter") && a(r);
301
- }, d = l === void 0 || l === r ? "primary" : "secondary", g = () => /* @__PURE__ */ n(
299
+ const u = C(), l = qt(u, t, e), g = (_) => {
300
+ a && (_.key === " " || _.key === "Enter") && a(r);
301
+ }, m = c === void 0 || c === r ? "primary" : "secondary", i = () => /* @__PURE__ */ n(
302
302
  B,
303
303
  {
304
304
  "aria-hidden": !0,
305
- bold: l === r,
305
+ bold: c === r,
306
306
  className: "mx-cmn-bar-text",
307
- color: d,
307
+ color: m,
308
308
  component: "div",
309
309
  variant: "Small",
310
310
  children: o
311
311
  }
312
312
  );
313
- return /* @__PURE__ */ f("div", { className: `mx-cmn-bar-container ${h} ${c < 0 ? "mx-cmn-negative" : ""}`, children: [
314
- c >= 0 && /* @__PURE__ */ n(g, {}),
313
+ return /* @__PURE__ */ y("div", { className: `mx-cmn-bar-container ${l} ${d < 0 ? "mx-cmn-negative" : ""}`, children: [
314
+ d >= 0 && /* @__PURE__ */ n(i, {}),
315
315
  /* @__PURE__ */ n(
316
316
  "div",
317
317
  {
318
318
  "aria-label": s,
319
- className: `mx-cmn-bar ${a ? "mx-cmn-clickable" : ""} ${c < 0 ? "mx-cmn-bar-negative" : ""}`,
319
+ className: `mx-cmn-bar ${a ? "mx-cmn-clickable" : ""} ${d < 0 ? "mx-cmn-bar-negative" : ""}`,
320
320
  onClick: a ? () => a?.(r) : void 0,
321
- onKeyDown: p,
321
+ onKeyDown: g,
322
322
  role: s ? "button" : void 0,
323
323
  tabIndex: s ? 0 : void 0
324
324
  }
325
325
  ),
326
- c < 0 && /* @__PURE__ */ n(g, {})
326
+ d < 0 && /* @__PURE__ */ n(i, {})
327
327
  ] });
328
328
  }, qt = (s, t, e) => {
329
329
  const r = `expandBar-${Math.round(e)}`, o = ht(r, { from: { height: 0 }, to: { height: e } });
330
- return w({
330
+ return x({
331
331
  display: "flex",
332
332
  flexDirection: "column",
333
333
  justifyContent: "flex-end",
@@ -365,41 +365,41 @@ const Ke = (s) => {
365
365
  color: r,
366
366
  index: o = -1,
367
367
  onClick: a,
368
- range: l,
369
- selectedIndex: c,
370
- topHeight: i,
371
- value: h,
372
- valueLabel: p = "",
373
- width: d,
374
- xAxisLabel: g = ""
368
+ range: c,
369
+ selectedIndex: d,
370
+ topHeight: u,
371
+ value: l,
372
+ valueLabel: g = "",
373
+ width: m,
374
+ xAxisLabel: i = ""
375
375
  }) => {
376
- const S = x(), C = Yt(S, d), v = h / l * i, D = Math.abs(h) / l * e, A = c === void 0 || c === o ? "primary" : "secondary";
377
- return /* @__PURE__ */ f("div", { className: `mx-cmn-barchart-bar-column ${C}`, children: [
378
- /* @__PURE__ */ n("div", { style: { height: i }, children: h >= 0 && /* @__PURE__ */ n(
376
+ const _ = C(), b = Yt(_, m), v = l / c * u, D = Math.abs(l) / c * e, A = d === void 0 || d === o ? "primary" : "secondary";
377
+ return /* @__PURE__ */ y("div", { className: `mx-cmn-barchart-bar-column ${b}`, children: [
378
+ /* @__PURE__ */ n("div", { style: { height: u }, children: l >= 0 && /* @__PURE__ */ n(
379
379
  q,
380
380
  {
381
381
  ariaLabel: s,
382
382
  color: r,
383
383
  height: v,
384
384
  index: o,
385
- label: p,
385
+ label: g,
386
386
  onClick: a,
387
- selectedIndex: c,
388
- value: h
387
+ selectedIndex: d,
388
+ value: l
389
389
  }
390
390
  ) }),
391
391
  /* @__PURE__ */ n("div", { className: "mx-cmn-zero-line" }),
392
392
  t !== 0 && /* @__PURE__ */ n("div", { className: "mx-cmn-chart-average", style: { bottom: t } }),
393
- /* @__PURE__ */ n("div", { style: { height: e }, children: h < 0 && /* @__PURE__ */ n(
393
+ /* @__PURE__ */ n("div", { style: { height: e }, children: l < 0 && /* @__PURE__ */ n(
394
394
  q,
395
395
  {
396
396
  ariaLabel: s,
397
397
  color: r,
398
398
  height: D,
399
399
  index: o,
400
- label: p,
400
+ label: g,
401
401
  onClick: a,
402
- value: h
402
+ value: l
403
403
  }
404
404
  ) }),
405
405
  /* @__PURE__ */ n(
@@ -407,11 +407,11 @@ const Ke = (s) => {
407
407
  {
408
408
  className: `mx-cmn-bar-label ${a ? "mx-cmn-clickable" : ""}`,
409
409
  onClick: a ? () => a(o) : void 0,
410
- children: /* @__PURE__ */ n(B, { bold: c === o, color: A, variant: "Small", children: g })
410
+ children: /* @__PURE__ */ n(B, { bold: d === o, color: A, variant: "Small", children: i })
411
411
  }
412
412
  )
413
413
  ] });
414
- }, Yt = (s, t) => w({
414
+ }, Yt = (s, t) => x({
415
415
  display: "flex",
416
416
  flexDirection: "column",
417
417
  flexGrow: t === void 0 ? 1 : 0,
@@ -446,12 +446,12 @@ const Ke = (s) => {
446
446
  data: r,
447
447
  height: o,
448
448
  legendLabelAverage: a,
449
- legendLabelMain: l,
450
- onBarClick: c,
451
- selectedIndex: i,
452
- valueFormatter: h = (p) => `${p}`
449
+ legendLabelMain: c,
450
+ onBarClick: d,
451
+ selectedIndex: u,
452
+ valueFormatter: l = (g) => `${g}`
453
453
  }) => {
454
- const p = x(), d = Vt(p), g = r.reduce(Xt, []), S = s !== void 0 ? s : g.reduce(Qt, 0) / g.length, C = Math.max(...g), v = Math.min(...g), D = g.reduce(zt, 0), A = C >= 0, R = v < 0, I = Q(A, R, o), N = Q(R, A, o), P = jt(S, C, v, I || N), tt = (b) => i === void 0 || b === i ? e : `${e}80`, O = () => /* @__PURE__ */ n(
454
+ const g = C(), m = Vt(g), i = r.reduce(Xt, []), _ = s !== void 0 ? s : i.reduce(Qt, 0) / i.length, b = Math.max(...i), v = Math.min(...i), D = i.reduce(zt, 0), A = b >= 0, R = v < 0, I = Q(A, R, o), N = Q(R, A, o), P = jt(_, b, v, I || N), tt = (w) => u === void 0 || w === u ? e : `${e}80`, O = () => /* @__PURE__ */ n(
455
455
  Y,
456
456
  {
457
457
  averageLineHeight: P,
@@ -463,34 +463,34 @@ const Ke = (s) => {
463
463
  width: void 0
464
464
  }
465
465
  );
466
- return /* @__PURE__ */ f("div", { className: `mx-cmn-bar-chart ${d}`, children: [
467
- /* @__PURE__ */ f("div", { className: "mx-cmn-chart-container", children: [
466
+ return /* @__PURE__ */ y("div", { className: `mx-cmn-bar-chart ${m}`, children: [
467
+ /* @__PURE__ */ y("div", { className: "mx-cmn-chart-container", children: [
468
468
  /* @__PURE__ */ n(O, {}),
469
- r.map((b, M) => /* @__PURE__ */ f(dt.Fragment, { children: [
469
+ r.map((w, M) => /* @__PURE__ */ y(dt.Fragment, { children: [
470
470
  /* @__PURE__ */ n(
471
471
  Y,
472
472
  {
473
- ariaLabel: b.ariaLabel,
473
+ ariaLabel: w.ariaLabel,
474
474
  averageLineHeight: P,
475
475
  bottomHeight: N,
476
476
  color: tt(M),
477
477
  index: M,
478
- onClick: c,
478
+ onClick: d,
479
479
  range: D,
480
- selectedIndex: i,
480
+ selectedIndex: u,
481
481
  topHeight: I,
482
- value: b.value,
483
- valueLabel: h(b.value),
482
+ value: w.value,
483
+ valueLabel: l(w.value),
484
484
  width: t,
485
- xAxisLabel: b.label
485
+ xAxisLabel: w.label
486
486
  }
487
487
  ),
488
488
  /* @__PURE__ */ n(O, {})
489
489
  ] }, `column-${M}`))
490
490
  ] }),
491
- /* @__PURE__ */ n(Ft, { color: e, labelAverage: a, labelMain: l })
491
+ /* @__PURE__ */ n(Ft, { color: e, labelAverage: a, labelMain: c })
492
492
  ] });
493
- }, Vt = (s) => w({
493
+ }, Vt = (s) => x({
494
494
  "& .mx-cmn-chart-container": {
495
495
  alignItems: "flex-end",
496
496
  display: "flex",
@@ -505,40 +505,40 @@ const Ke = (s) => {
505
505
  strokeWidth: r = pt,
506
506
  children: o
507
507
  }) => {
508
- const a = x(), l = Jt(a, e), c = (e - r) / 2, i = e / 2;
509
- let h = -90 - (s ? 1 : 0), p = 0;
510
- return /* @__PURE__ */ f("div", { className: `mx-cmn-multi-segment-donut ${l}`, children: [
511
- /* @__PURE__ */ f("svg", { height: e, width: e, children: [
508
+ const a = C(), c = Jt(a, e), d = (e - r) / 2, u = e / 2;
509
+ let l = -90 - (s ? 1 : 0), g = 0;
510
+ return /* @__PURE__ */ y("div", { className: `mx-cmn-multi-segment-donut ${c}`, children: [
511
+ /* @__PURE__ */ y("svg", { height: e, width: e, children: [
512
512
  /* @__PURE__ */ n(
513
513
  "circle",
514
514
  {
515
- cx: i,
516
- cy: i,
515
+ cx: u,
516
+ cy: u,
517
517
  fill: "none",
518
- r: c,
518
+ r: d,
519
519
  stroke: a.Color.Neutral300,
520
520
  strokeWidth: r
521
521
  }
522
522
  ),
523
- t.map((d, g) => (h += 360 * p + (s ? 1 : 0), p = (d.percent - (s ? 0.3 : 0)) / 100, /* @__PURE__ */ n(
523
+ t.map((m, i) => (l += 360 * g + (s ? 1 : 0), g = (m.percent - (s ? 0.3 : 0)) / 100, /* @__PURE__ */ n(
524
524
  "circle",
525
525
  {
526
- cx: i,
527
- cy: i,
526
+ cx: u,
527
+ cy: u,
528
528
  fill: "none",
529
- r: c,
530
- stroke: d.color,
531
- strokeDasharray: 2 * Math.PI * c,
532
- strokeDashoffset: 2 * Math.PI * c * (1 - p),
529
+ r: d,
530
+ stroke: m.color,
531
+ strokeDasharray: 2 * Math.PI * d,
532
+ strokeDashoffset: 2 * Math.PI * d * (1 - g),
533
533
  strokeWidth: r,
534
- transform: `rotate(${h}, ${i}, ${i})`
534
+ transform: `rotate(${l}, ${u}, ${u})`
535
535
  },
536
- g
536
+ i
537
537
  )))
538
538
  ] }),
539
539
  /* @__PURE__ */ n("div", { className: "mx-cmn-multi-segment-donut-children", children: o })
540
540
  ] });
541
- }, Jt = (s, t) => w({
541
+ }, Jt = (s, t) => x({
542
542
  height: t,
543
543
  marginTop: `-${s.Spacing.XSmall}px`,
544
544
  position: "relative",
@@ -562,7 +562,7 @@ class te {
562
562
  t.endpoint,
563
563
  t.sessionToken,
564
564
  t.onError
565
- ), _(this);
565
+ ), f(this);
566
566
  }
567
567
  // DEPRECATED: Initialize api in constructor and use loadCopy instead
568
568
  // TODO: Remove this function
@@ -570,14 +570,14 @@ class te {
570
570
  this.api = new k(t, e), await this.loadCopy();
571
571
  };
572
572
  loadCopy = async () => {
573
- await this.getCopy(this.featureNamespace), m(() => {
573
+ await this.getCopy(this.featureNamespace), p(() => {
574
574
  this.isInitialized = !0;
575
575
  });
576
576
  };
577
577
  getCopy = async (t, e = "") => {
578
578
  try {
579
579
  const r = await this.api.getGlobalCopy(t, e);
580
- m(() => {
580
+ p(() => {
581
581
  this.copy = r[t];
582
582
  });
583
583
  } catch (r) {
@@ -593,7 +593,7 @@ class ee {
593
593
  response = null;
594
594
  responses = {};
595
595
  constructor(t) {
596
- this.globalStore = t, _(this);
596
+ this.globalStore = t, f(this);
597
597
  }
598
598
  get isLastQuestion() {
599
599
  return this.currentQuestionIndex === this.surveyQuestions.length - 1;
@@ -616,7 +616,7 @@ class ee {
616
616
  }
617
617
  loadSurvey = (t = !1) => {
618
618
  yt.getActiveMatchingSurveys((e) => {
619
- m(() => {
619
+ p(() => {
620
620
  if (e.length > 0) {
621
621
  const r = e.find((o) => o.id === this.surveyId);
622
622
  r && (this.survey = r, this.currentQuestionIndex = 0, this.question = r.questions[0], this.response = null, this.responses = {});
@@ -637,9 +637,9 @@ class ee {
637
637
  class z {
638
638
  fetchInstance;
639
639
  constructor(t, e, r) {
640
- this.fetchInstance = new y(t, e, void 0, r);
640
+ this.fetchInstance = new S(t, e, void 0, r);
641
641
  }
642
- addBudget = async (t, e, r = null) => this.fetchInstance.post(u.BUDGETS, {
642
+ addBudget = async (t, e, r = null) => this.fetchInstance.post(h.BUDGETS, {
643
643
  amount: e,
644
644
  category_guid: t.guid,
645
645
  category_name: t.name,
@@ -647,11 +647,11 @@ class z {
647
647
  }).then((o) => o.budget).catch((o) => {
648
648
  throw o;
649
649
  });
650
- deleteBudget = async (t) => this.fetchInstance.delete(`${u.BUDGETS}/${t}`).then((e) => e).catch((e) => {
650
+ deleteBudget = async (t) => this.fetchInstance.delete(`${h.BUDGETS}/${t}`).then((e) => e).catch((e) => {
651
651
  throw e;
652
652
  });
653
- getBudgets = async () => this.fetchInstance.get(u.BUDGETS).then((t) => t.budgets).catch((t) => t);
654
- updateBudget = async (t) => this.fetchInstance.put(`${u.BUDGETS}/${t.guid}`, t).then((e) => e.budget).catch((e) => {
653
+ getBudgets = async () => this.fetchInstance.get(h.BUDGETS).then((t) => t.budgets).catch((t) => t);
654
+ updateBudget = async (t) => this.fetchInstance.put(`${h.BUDGETS}/${t.guid}`, t).then((e) => e.budget).catch((e) => {
655
655
  throw e;
656
656
  });
657
657
  }
@@ -666,7 +666,7 @@ class se {
666
666
  isDataLoaded = !1;
667
667
  theme = {};
668
668
  constructor(t) {
669
- this.globalStore = t, this.api = new z(t.endpoint, t.sessionToken, t.onError), _(this);
669
+ this.globalStore = t, this.api = new z(t.endpoint, t.sessionToken, t.onError), f(this);
670
670
  }
671
671
  loadBudgetData = async () => {
672
672
  await this.loadBudgets(), _t(
@@ -717,7 +717,7 @@ class se {
717
717
  addBudget = async (t, e, r = null) => {
718
718
  try {
719
719
  const o = await this.api.addBudget(t, e, r);
720
- m(() => {
720
+ p(() => {
721
721
  this.budgets.push(o);
722
722
  });
723
723
  } catch (o) {
@@ -726,7 +726,7 @@ class se {
726
726
  };
727
727
  deleteBudget = async (t) => {
728
728
  try {
729
- await this.api.deleteBudget(t), m(() => {
729
+ await this.api.deleteBudget(t), p(() => {
730
730
  const e = this.budgets.findIndex((r) => r.guid === t);
731
731
  e >= 0 && this.budgets.splice(e, 1);
732
732
  });
@@ -737,7 +737,7 @@ class se {
737
737
  loadBudgets = async () => {
738
738
  try {
739
739
  const t = await this.api.getBudgets();
740
- m(() => {
740
+ p(() => {
741
741
  this.budgets = t, this.isDataLoaded = !0;
742
742
  });
743
743
  } catch (t) {
@@ -775,7 +775,7 @@ class se {
775
775
  updateBudget = async (t) => {
776
776
  try {
777
777
  const e = await this.api.updateBudget(t);
778
- m(() => {
778
+ p(() => {
779
779
  const r = this.budgets.findIndex((o) => o.guid === t.guid);
780
780
  r >= 0 && (this.budgets[r] = e);
781
781
  });
@@ -787,9 +787,9 @@ class se {
787
787
  class X {
788
788
  fetchInstance;
789
789
  constructor(t, e, r) {
790
- this.fetchInstance = new y(t, e, void 0, r);
790
+ this.fetchInstance = new S(t, e, void 0, r);
791
791
  }
792
- createSupportTicket = async (t) => this.fetchInstance.post(u.SUPPORT_TICKETS, t).then((e) => e);
792
+ createSupportTicket = async (t) => this.fetchInstance.post(h.SUPPORT_TICKETS, t).then((e) => e);
793
793
  }
794
794
  const re = (s, t) => s.guid === "general" || s.guid === "insights" ? !0 : s.flags ? s.flags.every((e) => t[e]) : !1, oe = (s, t) => {
795
795
  const e = [];
@@ -799,9 +799,9 @@ const re = (s, t) => s.guid === "general" || s.guid === "insights" ? !0 : s.flag
799
799
  const a = {
800
800
  ...r,
801
801
  title: o.label,
802
- topics: r.topics.map(({ topicKey: l }, c) => ({
803
- topicKey: l,
804
- label: o.topics[c]
802
+ topics: r.topics.map(({ topicKey: c }, d) => ({
803
+ topicKey: c,
804
+ label: o.topics[d]
805
805
  }))
806
806
  };
807
807
  re(a, s) && e.push(a);
@@ -815,7 +815,7 @@ class ae {
815
815
  globalStore;
816
816
  isLoading = !1;
817
817
  constructor(t) {
818
- this.globalStore = t, this.api = new X(t.endpoint, t.sessionToken, t.onError), _(this);
818
+ this.globalStore = t, this.api = new X(t.endpoint, t.sessionToken, t.onError), f(this);
819
819
  }
820
820
  createSupportTicket = async (t) => {
821
821
  try {
@@ -847,10 +847,10 @@ class ae {
847
847
  class j {
848
848
  fetchInstance;
849
849
  constructor(t, e, r) {
850
- this.fetchInstance = new y(t, e, void 0, r);
850
+ this.fetchInstance = new S(t, e, void 0, r);
851
851
  }
852
- getHoldings = async () => this.fetchInstance.get(u.HOLDINGS).then((t) => t.holdings);
853
- updateHoldings = async (t) => this.fetchInstance.put(`${u.HOLDINGS}/${t.guid}`, t).then((e) => e.holding);
852
+ getHoldings = async () => this.fetchInstance.get(h.HOLDINGS).then((t) => t.holdings);
853
+ updateHoldings = async (t) => this.fetchInstance.put(`${h.HOLDINGS}/${t.guid}`, t).then((e) => e.holding);
854
854
  }
855
855
  class ne {
856
856
  analysisType = vt.Stocks;
@@ -860,7 +860,7 @@ class ne {
860
860
  globalStore;
861
861
  showConnectionsWidget = !1;
862
862
  constructor(t) {
863
- this.globalStore = t, this.api = new j(t.endpoint, t.sessionToken, t.onError), _(this);
863
+ this.globalStore = t, this.api = new j(t.endpoint, t.sessionToken, t.onError), f(this);
864
864
  }
865
865
  get analysisChartData() {
866
866
  return Dt(At(this.visibleHoldings), this.analysisType);
@@ -879,7 +879,7 @@ class ne {
879
879
  loadHoldings = async () => {
880
880
  try {
881
881
  const t = await this.api.getHoldings();
882
- m(() => {
882
+ p(() => {
883
883
  this.holdings = [...t], this.holdingsLoaded = !0;
884
884
  });
885
885
  } catch (t) {
@@ -895,7 +895,7 @@ class ne {
895
895
  const e = await this.api.updateHoldings(t), r = this.holdings.findIndex(({ guid: o }) => o === t.guid);
896
896
  if (r >= 0) {
897
897
  const o = [...this.holdings];
898
- o[r] = e, m(() => {
898
+ o[r] = e, p(() => {
899
899
  this.holdings = o, this.holdingsLoaded = !0;
900
900
  });
901
901
  }
@@ -1011,9 +1011,9 @@ const K = {
1011
1011
  class V {
1012
1012
  fetchInstance;
1013
1013
  constructor(t, e, r) {
1014
- this.fetchInstance = new y(t, e, void 0, r);
1014
+ this.fetchInstance = new S(t, e, void 0, r);
1015
1015
  }
1016
- getAppData = async () => this.fetchInstance.get(u.APP_DATA).then((t) => t);
1016
+ getAppData = async () => this.fetchInstance.get(h.APP_DATA).then((t) => t);
1017
1017
  }
1018
1018
  class ie {
1019
1019
  globalStore;
@@ -1022,7 +1022,7 @@ class ie {
1022
1022
  appData = {};
1023
1023
  banner = {};
1024
1024
  constructor(t) {
1025
- this.globalStore = t, this.api = new V(t.endpoint, t.sessionToken, t.onError), _(this);
1025
+ this.globalStore = t, this.api = new V(t.endpoint, t.sessionToken, t.onError), f(this);
1026
1026
  }
1027
1027
  get appConfig() {
1028
1028
  return this.globalStore.appConfig;
@@ -1045,7 +1045,7 @@ class ie {
1045
1045
  loadAppData = async (t) => {
1046
1046
  try {
1047
1047
  const e = t || await this.api.getAppData();
1048
- m(() => {
1048
+ p(() => {
1049
1049
  this.appData = e, this.bannerApi = new F(e.address?.bullseye || "/");
1050
1050
  });
1051
1051
  } catch (e) {
@@ -1055,7 +1055,7 @@ class ie {
1055
1055
  loadBanner = async () => {
1056
1056
  try {
1057
1057
  const t = this.user?.guid ?? null, e = t ? await this.bannerApi.getBanner(t) : {};
1058
- m(() => {
1058
+ p(() => {
1059
1059
  this.banner = e;
1060
1060
  });
1061
1061
  } catch (t) {
@@ -1070,7 +1070,7 @@ class ce {
1070
1070
  globalStore;
1071
1071
  widgetApi = new W("/", "");
1072
1072
  constructor(t) {
1073
- this.globalStore = t, this.widgetApi = new W(t.endpoint, t.sessionToken), _(this);
1073
+ this.globalStore = t, this.widgetApi = new W(t.endpoint, t.sessionToken), f(this);
1074
1074
  }
1075
1075
  loadWidget = async ({ widget: t = "connect_widget", mode: e = "light", ...r }) => await this.widgetApi.requestWidgetUrl({
1076
1076
  widget_url: { widget_type: t, color_scheme: e, ...r }
@@ -1087,7 +1087,7 @@ class de {
1087
1087
  end: Z(this.displayedDate)
1088
1088
  };
1089
1089
  constructor(t) {
1090
- _(this), this.globalStore = t;
1090
+ f(this), this.globalStore = t;
1091
1091
  }
1092
1092
  get isCopyLoaded() {
1093
1093
  return this.globalStore.copyStore.isInitialized;
@@ -1104,7 +1104,7 @@ class de {
1104
1104
  };
1105
1105
  // Sets an array of selected account guids for the AccountFilter component
1106
1106
  setSelectedAccountGuids = async (t) => {
1107
- const e = new Set(this.selectedAccountGuids), r = new Set(t), o = [...r].filter((l) => !e.has(l)), a = [...e].filter((l) => !r.has(l));
1107
+ const e = new Set(this.selectedAccountGuids), r = new Set(t), o = [...r].filter((c) => !e.has(c)), a = [...e].filter((c) => !r.has(c));
1108
1108
  o.length > 0 && this.globalStore.accountStore.updateAccountFiltering(o, !1), a.length > 0 && this.globalStore.accountStore.updateAccountFiltering(a, !0), this.selectedAccountGuids = t;
1109
1109
  };
1110
1110
  setDisplayedDate = (t, e) => {
@@ -1127,7 +1127,7 @@ class le {
1127
1127
  api = new $("/", "");
1128
1128
  userFeatures = [];
1129
1129
  constructor(t) {
1130
- this.globalStore = t, this.api = new $(t.endpoint, t.sessionToken, t.onError), _(this);
1130
+ this.globalStore = t, this.api = new $(t.endpoint, t.sessionToken, t.onError), f(this);
1131
1131
  }
1132
1132
  // DEPRECATED: Initialize api in constructor and use loadUserFeatures instead
1133
1133
  // TODO: Remove this function
@@ -1143,7 +1143,7 @@ class le {
1143
1143
  loadUserFeatures = async (t) => {
1144
1144
  try {
1145
1145
  const e = t || await this.api.getUserFeatures();
1146
- m(() => {
1146
+ p(() => {
1147
1147
  this.userFeatures = e;
1148
1148
  });
1149
1149
  } catch (e) {
@@ -1199,7 +1199,7 @@ class Je {
1199
1199
  // UI Stores
1200
1200
  globalUiStore;
1201
1201
  constructor(t = K, e = "/", r) {
1202
- this.appConfig = t, this.endpoint = e, this.sessionToken = t.options.session_token ?? "", this.onError = r, this.accountStore = new ft(this), this.appDataStore = new ie(this), this.analyticsStore = new ee(this), this.beatStore = new St(this), this.budgetsStore = new se(this), this.cashflowStore = new nt(this), this.categoryStore = new et(this), this.connectStore = new ce(this), this.copyStore = new te(this), this.debtsStore = new xt(this), this.finstrongStore = new Ct(this), this.goalStore = new it(this), this.helpStore = new ae(this), this.holdingStore = new ne(this), this.merchantStore = new Tt(this), this.netWorthStore = new Bt(this), this.notificationStore = new st(this), this.recurringTransactionsStore = new mt(this), this.settingsStore = new It(this), this.transactionStore = new at(this), this.trendsStore = new ct(this), this.userStore = new le(this), this.globalUiStore = new de(this), _(this);
1202
+ this.appConfig = t, this.endpoint = e, this.sessionToken = t.options.session_token ?? "", this.onError = r, this.accountStore = new ft(this), this.appDataStore = new ie(this), this.analyticsStore = new ee(this), this.beatStore = new St(this), this.budgetsStore = new se(this), this.cashflowStore = new nt(this), this.categoryStore = new et(this), this.connectStore = new ce(this), this.copyStore = new te(this), this.debtsStore = new xt(this), this.finstrongStore = new Ct(this), this.goalStore = new it(this), this.helpStore = new ae(this), this.holdingStore = new ne(this), this.merchantStore = new Tt(this), this.netWorthStore = new Bt(this), this.notificationStore = new st(this), this.recurringTransactionsStore = new mt(this), this.settingsStore = new It(this), this.transactionStore = new at(this), this.trendsStore = new ct(this), this.userStore = new le(this), this.globalUiStore = new de(this), f(this);
1203
1203
  }
1204
1204
  get isInitialized() {
1205
1205
  return this.globalUiStore.isInitialized;
@@ -1210,22 +1210,22 @@ class Je {
1210
1210
  associatedBeats: r,
1211
1211
  categories: o,
1212
1212
  institutions: a,
1213
- transactionRules: l,
1214
- transactions: c,
1215
- userFeatures: i
1213
+ transactionRules: c,
1214
+ transactions: d,
1215
+ userFeatures: u
1216
1216
  } = {}) => {
1217
1217
  await Promise.all([
1218
1218
  // Load copy, config and quser data
1219
1219
  this.copyStore.loadCopy(),
1220
1220
  this.appDataStore.loadAppData(e),
1221
- this.userStore.loadUserFeatures(i)
1221
+ this.userStore.loadUserFeatures(u)
1222
1222
  ]), await Promise.all([
1223
1223
  this.accountStore.loadAccountData({ accounts: t, institutions: a }),
1224
1224
  this.categoryStore.loadCategories(o),
1225
1225
  this.transactionStore.loadTransactionData({
1226
1226
  associatedBeats: r,
1227
- transactionRules: l,
1228
- transactions: c
1227
+ transactionRules: c,
1228
+ transactions: d
1229
1229
  })
1230
1230
  ]), this.globalUiStore.setInitialized(!0);
1231
1231
  };
@@ -1240,7 +1240,7 @@ export {
1240
1240
  Ms as AccountType,
1241
1241
  ks as AccountTypeName,
1242
1242
  ss as AnalyticsApi,
1243
- u as ApiEndpoints,
1243
+ h as ApiEndpoints,
1244
1244
  F as BannerApi,
1245
1245
  Ve as BarChart,
1246
1246
  is as BeatApi,
@@ -1271,7 +1271,7 @@ export {
1271
1271
  ys as ErrorBoundary,
1272
1272
  Os as ErrorStatuses,
1273
1273
  Lt as ExpenseStatus,
1274
- y as Fetch,
1274
+ S as Fetch,
1275
1275
  nr as Frequency,
1276
1276
  k as GlobalCopyApi,
1277
1277
  te as GlobalCopyStore,
@@ -39,10 +39,14 @@ export interface ClientConfig {
39
39
  }
40
40
  export interface MasterConfig {
41
41
  deep_link_params?: DeepLinkParams;
42
+ style?: StyleConfig;
42
43
  ui_message_protocol?: string;
43
44
  ui_message_version?: number;
44
45
  ui_message_webview_url_scheme?: string;
45
46
  }
47
+ export interface StyleConfig {
48
+ font_name?: string;
49
+ }
46
50
  export interface DeepLinkParams {
47
51
  account_guids?: string[];
48
52
  date_range?: [Date, Date];
@@ -1,6 +1,7 @@
1
1
  import { PaletteColor, Theme } from '@mui/material';
2
2
  import { ClientStyleProfile } from '../types';
3
- export declare const getClientTheme: (theme: Theme, clientStyleProfile: ClientStyleProfile) => {
3
+ import { ClientConfig } from '../types/AppData';
4
+ export declare const getClientTheme: (theme: Theme, clientStyleProfile: ClientStyleProfile, clientConfig?: ClientConfig) => {
4
5
  typography: {
5
6
  [k: string]: string | {
6
7
  fontFamily: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "7.0.49",
3
+ "version": "7.0.50-alpha.bb1",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",