@mx-cartographer/experiences 5.2.6 → 5.2.8-alpha.JB

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
+ ## [5.2.7] - 04-02-2025
2
+
3
+ - **FIXED** - Transaction Rules | Incorrect alert when category changed
4
+
1
5
  ## [5.2.6] - 04-02-2025
2
6
 
3
7
  - **ADDED** - Insights and Recurring transaction flags to AppConfig
@@ -21,6 +21,7 @@ export declare const ApiEndpoints: {
21
21
  MERCHANTS: string;
22
22
  MONTHLY_CASH_FLOW_PROFILE: string;
23
23
  MONTHLY_CATEGORY_TOTALS: string;
24
+ OFFERS: string;
24
25
  NOTIFICATION_PROFILES: string;
25
26
  NOTIFICATIONS: string;
26
27
  PHONE_VERIFICATIONS: string;
package/dist/index.es.js CHANGED
@@ -202,6 +202,7 @@ const qs = async (A, t, i = "1.0.0", n = "Experiences") => {
202
202
  MERCHANTS: "merchants",
203
203
  MONTHLY_CASH_FLOW_PROFILE: "monthly_cash_flow_profile",
204
204
  MONTHLY_CATEGORY_TOTALS: "monthly_category_totals",
205
+ OFFERS: "offers",
205
206
  NOTIFICATION_PROFILES: "notification_profiles",
206
207
  NOTIFICATIONS: "notifications",
207
208
  PHONE_VERIFICATIONS: "sms_verification",
@@ -998,7 +999,10 @@ class Ot {
998
999
  let i = "has_associated_transaction_guid=true";
999
1000
  return i += t ? `&from_date=${t}` : "", this.fetchInstance.get(`${L.BEATS}?${i}`).then((n) => n.beats);
1000
1001
  };
1001
- updateBeat = async (t) => this.fetchInstance.put(`${L.BEATS}/${t.guid}`, t).then((i) => i.beat);
1002
+ updateBeat = async (t) => {
1003
+ const i = t.guid.startsWith("OFR") ? L.BEATS : L.OFFERS;
1004
+ return this.fetchInstance.put(`${i}/${t.guid}`, t).then((n) => n.beat);
1005
+ };
1002
1006
  }
1003
1007
  class ui {
1004
1008
  fetchInstance;
@@ -13990,7 +13994,12 @@ class al {
13990
13994
  console.error(`Error updating notification profile: ${i}`);
13991
13995
  }
13992
13996
  };
13993
- updateTransactionRule = async (t) => {
13997
+ updateRuleCategory = async (t) => {
13998
+ this.transactionApi.updateTransactionRule(t).then(() => {
13999
+ this.loadTransactionRules();
14000
+ });
14001
+ };
14002
+ updateRulePayee = async (t) => {
13994
14003
  this.transactionApi.updateTransactionRule(t).then(() => {
13995
14004
  this.setAlert(this.copy.edit_payee_success, "success"), this.loadTransactionRules();
13996
14005
  }).catch(() => {
@@ -17870,7 +17879,7 @@ const qv = ({
17870
17879
  ] }) });
17871
17880
  }
17872
17881
  ), Yv = g(() => {
17873
- const { settings: A } = X(), { categories: t } = qA(), { selectedRule: i, updateTransactionRule: n } = ze(), [r, o] = h.useState(!1), I = () => {
17882
+ const { settings: A } = X(), { categories: t } = qA(), { selectedRule: i, updateRuleCategory: n } = ze(), [r, o] = h.useState(!1), I = () => {
17874
17883
  o(!1);
17875
17884
  }, a = () => {
17876
17885
  o(!0);
@@ -17898,19 +17907,17 @@ const qv = ({
17898
17907
  )
17899
17908
  ] });
17900
17909
  }), Vv = g(() => {
17901
- const { common: A, settings: t } = X(), { selectedRule: i, updateTransactionRule: n } = ze(), r = uA(), [o, I] = h.useState(
17902
- i?.match_description ? i.match_description : ""
17903
- ), [a, c] = h.useState(!1), f = h.useRef(o), E = () => {
17904
- c(!0);
17910
+ const { common: A, settings: t } = X(), { selectedRule: i, updateRulePayee: n } = ze(), r = uA(), [o, I] = h.useState(!1), a = i?.description ? i.description : i?.match_description, [c, f] = h.useState(a || ""), E = () => {
17911
+ I(!0);
17905
17912
  }, d = async () => {
17906
- o !== f.current && i && (i.description = o, await n(i), c(!1));
17913
+ c !== a && i && (i.description = c, await n(i), I(!1));
17907
17914
  };
17908
17915
  return /* @__PURE__ */ s(h.Fragment, { children: [
17909
17916
  /* @__PURE__ */ e(
17910
17917
  Ar,
17911
17918
  {
17912
17919
  onClick: E,
17913
- primaryText: o,
17920
+ primaryText: a,
17914
17921
  secondaryText: t.payee
17915
17922
  }
17916
17923
  ),
@@ -17918,10 +17925,10 @@ const qv = ({
17918
17925
  XA,
17919
17926
  {
17920
17927
  copy: { title: t.edit_payee },
17921
- isOpen: a,
17922
- onClose: () => c(!1),
17928
+ isOpen: o,
17929
+ onClose: () => I(!1),
17923
17930
  onPrimaryAction: d,
17924
- onSecondaryAction: () => c(!1),
17931
+ onSecondaryAction: () => I(!1),
17925
17932
  primaryText: A.save_button,
17926
17933
  secondaryText: A.cancel_button,
17927
17934
  sx: {
@@ -17931,9 +17938,9 @@ const qv = ({
17931
17938
  children: /* @__PURE__ */ e(
17932
17939
  JA,
17933
17940
  {
17934
- onChange: (l) => I(l.target.value),
17941
+ onChange: (l) => f(l.target.value),
17935
17942
  sx: { width: 352 },
17936
- value: o
17943
+ value: c
17937
17944
  }
17938
17945
  )
17939
17946
  }