@mx-cartographer/experiences 6.21.0 → 6.21.1

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
+ ## [6.21.1] - 08-05-2025
2
+
3
+ - **FIXED** - `Spending` and `Budgets` now update based on `selectedAccounts`
4
+
1
5
  ## [6.21.0] - 08-04-2025
2
6
 
3
7
  - **UPDATED** - MXUI to 1.3.0
package/dist/index.es.js CHANGED
@@ -1183,7 +1183,7 @@ class tr {
1183
1183
  }
1184
1184
  addCategory = async (n) => this.fetchInstance.post(B.CATEGORIES, n).then((i) => i.category);
1185
1185
  getCategories = async () => this.fetchInstance.get(B.CATEGORIES).then((n) => n.categories);
1186
- getDateRangeCategoryTotals = async (n, i, a) => this.fetchInstance.post(`${B.DATE_RANGE_CATEGORY_TOTALS}/from/${n}/to/${i}`, {
1186
+ getDateRangeCategoryTotals = async (n, i, a) => a.length === 0 ? [] : this.fetchInstance.post(`${B.DATE_RANGE_CATEGORY_TOTALS}/from/${n}/to/${i}`, {
1187
1187
  account_guid: a.map((o) => o.guid)
1188
1188
  }).then((o) => o.date_range_category_totals);
1189
1189
  getMonthlyCategoryTotals = async (n, i, a) => {
@@ -25183,25 +25183,27 @@ const P0 = ({
25183
25183
  /* @__PURE__ */ t(K0, { onRecalculateBudgets: e })
25184
25184
  ] });
25185
25185
  }), z0 = (e) => {
25186
- const n = be(), { onEvent: i } = X(), { accounts: a } = Se(), { budgets: o, isDataLoaded: r, loadBudgetData: s, setTheme: c } = _t(), { budgets: d, common: _ } = x(), { isCopyLoaded: u, isInitialized: h } = se(), { reloadCategoryTotals: m } = Fe(), p = x_(), f = o.length === 0, [E, y] = g.useState(!1), S = () => {
25186
+ const n = be(), { onEvent: i } = X(), { budgets: a, isDataLoaded: o, loadBudgetData: r, setTheme: s } = _t(), { budgets: c, common: d } = x(), { isCopyLoaded: _, isInitialized: u, selectedAccounts: h } = se(), { reloadCategoryTotals: m } = Fe(), p = x_(), f = a.length === 0, [E, y] = g.useState(!1), S = () => {
25187
25187
  y(!0), i(W.BUDGETS_CLICK_ADD);
25188
25188
  }, I = () => {
25189
25189
  y(!1);
25190
25190
  };
25191
25191
  return g.useEffect(() => {
25192
- c(n);
25192
+ s(n);
25193
25193
  }, [n]), g.useEffect(() => {
25194
- h && !r && m(a, tt(/* @__PURE__ */ new Date()), Ye(/* @__PURE__ */ new Date())).then(() => {
25195
- s().finally();
25196
- });
25197
- }, [h, a]), u ? /* @__PURE__ */ l(
25194
+ u && !o && m(h, tt(/* @__PURE__ */ new Date()), Ye(/* @__PURE__ */ new Date())).then(
25195
+ () => {
25196
+ r().finally();
25197
+ }
25198
+ );
25199
+ }, [u, h]), _ ? /* @__PURE__ */ l(
25198
25200
  Mn,
25199
25201
  {
25200
- primaryCtaLabel: f ? d.get_started_cta : d.details_cta,
25201
- title: d.budgets_title,
25202
+ primaryCtaLabel: f ? c.get_started_cta : c.details_cta,
25203
+ title: c.budgets_title,
25202
25204
  ...e,
25203
25205
  children: [
25204
- r ? /* @__PURE__ */ l(b, { height: 450, mt: 32, children: [
25206
+ o ? /* @__PURE__ */ l(b, { height: 450, mt: 32, children: [
25205
25207
  /* @__PURE__ */ t(
25206
25208
  hl,
25207
25209
  {
@@ -25213,16 +25215,16 @@ const P0 = ({
25213
25215
  ),
25214
25216
  !f && /* @__PURE__ */ l(M, { ml: 16, children: [
25215
25217
  /* @__PURE__ */ t(C, { bold: !0, color: p < 0 ? "error.main" : "success.main", children: H(Math.abs(p), "0,0") }),
25216
- /* @__PURE__ */ t(C, { children: p < 0 ? d.overspent_in_budgets : d.left_in_budgets })
25218
+ /* @__PURE__ */ t(C, { children: p < 0 ? c.overspent_in_budgets : c.left_in_budgets })
25217
25219
  ] })
25218
25220
  ] }) : /* @__PURE__ */ t(le, {}),
25219
25221
  /* @__PURE__ */ t(
25220
25222
  ce,
25221
25223
  {
25222
- ariaLabelClose: _.close_aria,
25224
+ ariaLabelClose: d.close_aria,
25223
25225
  isOpen: E,
25224
25226
  onClose: () => y(!1),
25225
- title: d.add_new_title,
25227
+ title: c.add_new_title,
25226
25228
  children: /* @__PURE__ */ t(gl, { onRecalculateBudgets: I })
25227
25229
  }
25228
25230
  )