@mx-cartographer/experiences 5.3.1-alpha.mega9 → 5.3.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
+ ## [5.3.1] - 04-23-2025
2
+
3
+ - **UPDATED** - Hidden transactions behavior.
4
+
1
5
  ## [5.3.0] - 04-22-2025
2
6
 
3
7
  - **ADDED** - Account Filtering | Persist filter selections across widgets and logins
package/dist/index.es.js CHANGED
@@ -5162,16 +5162,14 @@ const Pe = () => {
5162
5162
  height: t = "calc(100dvh - 36px)",
5163
5163
  loader: i = /* @__PURE__ */ e(ee, { label: "Loading", size: 40 }),
5164
5164
  onClick: n,
5165
- showClosedAccounts: r = !1,
5166
- showInsights: o = !1,
5167
- showLoader: I = !1,
5165
+ showInsights: r = !1,
5166
+ showLoader: o = !1,
5167
+ showHiddenTransactions: I = !1,
5168
5168
  width: a = "100%",
5169
5169
  zeroState: c = /* @__PURE__ */ e(Df, {})
5170
5170
  }) => {
5171
- const { isLoading: d, sortedTransactions: f } = PA(), E = h.useMemo(() => [...r ? f : f.filter((x) => !x.accountIsClosed)], [f, r]);
5172
- console.log(r, [...E]);
5173
- const { setShowInsights: l, toggleSplit: v } = Pe(), { onEvent: u } = K(), H = (y) => {
5174
- const x = [...E].find((w) => w.guid === y);
5171
+ const { isLoading: d, sortedTransactions: f } = PA(), E = h.useMemo(() => I ? f : f.filter((y) => !y.is_hidden), [f, I]), { setShowInsights: l, toggleSplit: v } = Pe(), { onEvent: u } = K(), H = (y) => {
5172
+ const x = E.find((w) => w.guid === y);
5175
5173
  if (x?.has_been_split) {
5176
5174
  v(x.guid);
5177
5175
  return;
@@ -5181,22 +5179,25 @@ const Pe = () => {
5181
5179
  transaction_guid: y
5182
5180
  }), n?.(y);
5183
5181
  }, b = h.useRef(null), p = mo({
5184
- count: [...E].length,
5182
+ count: E.length,
5185
5183
  getScrollElement: () => b.current,
5186
- estimateSize: (y) => Tr + (Nr(y, [...E]) ? Yr : 0),
5184
+ estimateSize: (y) => Tr + (Nr(y, E) ? Yr : 0),
5187
5185
  overscan: 5
5188
5186
  });
5189
- return h.useEffect(() => p.measure(), [E]), h.useEffect(() => l(o), [o]), /* @__PURE__ */ e(rA, { children: /* @__PURE__ */ e(L, { height: t, overflow: "auto", ref: b, width: a, children: /* @__PURE__ */ s(
5187
+ return h.useEffect(() => p.measure(), [E]), h.useEffect(() => l(r), [r]), /* @__PURE__ */ e(rA, { children: /* @__PURE__ */ e(L, { height: t, overflow: "auto", ref: b, width: a, children: /* @__PURE__ */ s(
5190
5188
  L,
5191
5189
  {
5192
- height: p.getVirtualItems().length === 0 ? "auto" : p.getTotalSize(),
5190
+ height: (
5191
+ // set the height to auto when there are no transactions so the zero state isn't set to 0
5192
+ p.getVirtualItems().length === 0 ? "auto" : p.getTotalSize()
5193
+ ),
5193
5194
  position: "relative",
5194
5195
  width: "100%",
5195
5196
  children: [
5196
- (d || I) && i,
5197
- !d && !I && p.getVirtualItems().length === 0 && c,
5198
- !d && !I && p.getVirtualItems().length > 0 && p.getVirtualItems().map((y) => {
5199
- const x = [...E][y.index], w = Nr(y.index, [...E]), D = jf(y.index, [...E]), j = Tr + (w ? Yr : 0);
5197
+ (d || o) && i,
5198
+ !d && !o && p.getVirtualItems().length === 0 && c,
5199
+ !d && !o && p.getVirtualItems().length > 0 && p.getVirtualItems().map((y) => {
5200
+ const x = E[y.index], w = Nr(y.index, E), D = jf(y.index, E), j = Tr + (w ? Yr : 0);
5200
5201
  return /* @__PURE__ */ s(
5201
5202
  L,
5202
5203
  {
@@ -7284,6 +7285,7 @@ const EI = ({ transaction: A }) => {
7284
7285
  /* Transaction */
7285
7286
  );
7286
7287
  },
7288
+ showHiddenTransactions: !0,
7287
7289
  showInsights: i
7288
7290
  }
7289
7291
  )
@@ -18796,12 +18798,12 @@ const on = ({
18796
18798
  (n) => n.member_guid === i.guid && i.successfully_aggregated_at && n.guid !== t.guid
18797
18799
  );
18798
18800
  }, IR = () => {
18799
- const [A, t] = h.useState(!1), [i, n] = h.useState(!1), [r, o] = h.useState(!1), [I, a] = h.useState({}), { selectedAccount: c } = Xe(), { mergeAccounts: d, updateAccount: f } = CA(), { accounts: E } = X(), l = oR(), { onEvent: v } = K(), { loadTransactions: u } = PA(), H = async (p) => {
18800
- await f({
18801
+ const [A, t] = h.useState(!1), [i, n] = h.useState(!1), [r, o] = h.useState(!1), [I, a] = h.useState({}), { selectedAccount: c } = Xe(), { mergeAccounts: d, updateAccount: f } = CA(), { accounts: E } = X(), l = oR(), { onEvent: v } = K(), u = (b) => {
18802
+ f({
18801
18803
  ...c,
18802
- ...p
18803
- }), await u();
18804
- }, b = () => {
18804
+ ...b
18805
+ });
18806
+ }, H = () => {
18805
18807
  d([c.guid, I.guid]).finally(
18806
18808
  () => n(!1)
18807
18809
  );
@@ -18812,7 +18814,7 @@ const on = ({
18812
18814
  on,
18813
18815
  {
18814
18816
  onClick: () => {
18815
- H({ is_hidden: !c.is_hidden }), v(V.ACCOUNT_DETAILS_CLICK_HIDE, { account_guid: c.guid });
18817
+ u({ is_hidden: !c.is_hidden }), v(V.ACCOUNT_DETAILS_CLICK_HIDE, { account_guid: c.guid });
18816
18818
  },
18817
18819
  primaryText: c.is_hidden ? E.unhide_account : E.hide_Account,
18818
18820
  secondaryText: c.is_hidden ? E.include_this_account : E.exclude_this_account,
@@ -18857,7 +18859,7 @@ const on = ({
18857
18859
  onClose: () => {
18858
18860
  t(!1);
18859
18861
  },
18860
- onPrimaryAction: () => H({ is_closed: !c.is_closed }),
18862
+ onPrimaryAction: () => u({ is_closed: !c.is_closed }),
18861
18863
  children: z(
18862
18864
  c.is_closed ? E.this_will_resume_updating_the_balance : E.this_will_set_the_balance_of_your_account,
18863
18865
  c.name
@@ -18871,20 +18873,20 @@ const on = ({
18871
18873
  isOpen: i,
18872
18874
  onClose: () => n(!1),
18873
18875
  title: E.mark_as_duplicate,
18874
- children: /* @__PURE__ */ e(rA, { children: l.map((p) => {
18875
- const y = l.indexOf(p) === l.length - 1;
18876
+ children: /* @__PURE__ */ e(rA, { children: l.map((b) => {
18877
+ const p = l.indexOf(b) === l.length - 1;
18876
18878
  return /* @__PURE__ */ s(h.Fragment, { children: [
18877
18879
  /* @__PURE__ */ e(
18878
18880
  Ui,
18879
18881
  {
18880
- account: p,
18882
+ account: b,
18881
18883
  onRowClick: () => {
18882
- o(!0), a(p);
18884
+ o(!0), a(b);
18883
18885
  }
18884
18886
  }
18885
18887
  ),
18886
- /* @__PURE__ */ e(rA, { sx: { ml: y ? 0 : 24 } })
18887
- ] }, p.guid);
18888
+ /* @__PURE__ */ e(rA, { sx: { ml: p ? 0 : 24 } })
18889
+ ] }, b.guid);
18888
18890
  }) })
18889
18891
  }
18890
18892
  ),
@@ -18897,7 +18899,7 @@ const on = ({
18897
18899
  },
18898
18900
  isOpen: r,
18899
18901
  onClose: () => o(!1),
18900
- onPrimaryAction: b,
18902
+ onPrimaryAction: H,
18901
18903
  children: [
18902
18904
  z(
18903
18905
  E.this_means_accounts_will_be_merged,
@@ -19338,7 +19340,7 @@ const on = ({
19338
19340
  accounts: [n.guid]
19339
19341
  });
19340
19342
  }, [n]), h.useEffect(() => i(V.ACCOUNT_DETAILS_VIEW_TRANSACTIONS), []), /* @__PURE__ */ s(Z, { children: [
19341
- /* @__PURE__ */ e(Rt, { onClick: t, showClosedAccounts: !0 }),
19343
+ /* @__PURE__ */ e(Rt, { onClick: t }),
19342
19344
  a && /* @__PURE__ */ e(
19343
19345
  IA,
19344
19346
  {