@mx-cartographer/experiences 6.26.3-alpha.sms1 → 6.26.3-alpha.sms2

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/dist/index.es.js CHANGED
@@ -5877,52 +5877,54 @@ const Lh = ({ transaction: e, onClick: n }) => {
5877
5877
  width: c = "100%",
5878
5878
  zeroState: d = /* @__PURE__ */ t(kh, {})
5879
5879
  }) => {
5880
- const { isLoading: _, sortedTransactions: u } = Me(), h = g.useMemo(() => s ? u : u.filter((v) => !v.is_hidden), [u, _, s]), { clearExpandedSplits: m, setShowInsights: p, toggleSplit: C } = Ot(), { onEvent: E } = X(), y = (v) => {
5881
- const w = h.find((N) => N.guid === v);
5882
- if (w?.has_been_split) {
5883
- C(w.guid);
5880
+ const { isLoading: _, sortedTransactions: u, rawTransactions: h } = Me();
5881
+ console.log("exp allTransactions", u), console.log("exp rawTransactions", h);
5882
+ const m = g.useMemo(() => s ? u : u.filter((w) => !w.is_hidden), [u, _, s]), { clearExpandedSplits: p, setShowInsights: C, toggleSplit: E } = Ot(), { onEvent: y } = X(), S = (w) => {
5883
+ const N = m.find((R) => R.guid === w);
5884
+ if (N?.has_been_split) {
5885
+ E(N.guid);
5884
5886
  return;
5885
5887
  }
5886
- E(F.ACCOUNT_DETAILS_CLICK_TRANSACTION, {
5887
- account_guid: w?.account_guid,
5888
- transaction_guid: v
5889
- }), a?.(v);
5890
- }, S = g.useRef(null), I = $s({
5891
- count: h.length,
5892
- getScrollElement: () => S.current,
5893
- estimateSize: (v) => kr + (Mr(v, h) ? Gr : 0),
5888
+ y(F.ACCOUNT_DETAILS_CLICK_TRANSACTION, {
5889
+ account_guid: N?.account_guid,
5890
+ transaction_guid: w
5891
+ }), a?.(w);
5892
+ }, I = g.useRef(null), v = $s({
5893
+ count: m.length,
5894
+ getScrollElement: () => I.current,
5895
+ estimateSize: (w) => kr + (Mr(w, m) ? Gr : 0),
5894
5896
  overscan: 5
5895
5897
  });
5896
- return g.useEffect(() => I.measure(), [h]), g.useEffect(() => p(o), [o]), g.useEffect(() => () => m(), []), console.log("exp transactions", h), /* @__PURE__ */ t(oe, { children: /* @__PURE__ */ t(O, { height: n, overflow: "auto", ref: S, width: c, children: /* @__PURE__ */ l(
5898
+ return g.useEffect(() => v.measure(), [m]), g.useEffect(() => C(o), [o]), g.useEffect(() => () => p(), []), console.log("exp transactions", m), /* @__PURE__ */ t(oe, { children: /* @__PURE__ */ t(O, { height: n, overflow: "auto", ref: I, width: c, children: /* @__PURE__ */ l(
5897
5899
  O,
5898
5900
  {
5899
5901
  height: (
5900
5902
  // set the height to auto when there are no transactions so the zero state isn't set to 0
5901
- I.getVirtualItems().length === 0 ? "auto" : I.getTotalSize()
5903
+ v.getVirtualItems().length === 0 ? "auto" : v.getTotalSize()
5902
5904
  ),
5903
5905
  position: "relative",
5904
5906
  width: "100%",
5905
5907
  children: [
5906
5908
  (_ || r) && i,
5907
- !_ && !r && I.getVirtualItems().length === 0 && d,
5908
- !_ && !r && I.getVirtualItems().length > 0 && I.getVirtualItems().map((v) => {
5909
- const w = h[v.index], N = Mr(v.index, h), R = Gh(v.index, h), M = kr + (N ? Gr : 0);
5909
+ !_ && !r && v.getVirtualItems().length === 0 && d,
5910
+ !_ && !r && v.getVirtualItems().length > 0 && v.getVirtualItems().map((w) => {
5911
+ const N = m[w.index], R = Mr(w.index, m), M = Gh(w.index, m), k = kr + (R ? Gr : 0);
5910
5912
  return /* @__PURE__ */ l(
5911
5913
  O,
5912
5914
  {
5913
5915
  sx: {
5914
- height: M,
5916
+ height: k,
5915
5917
  position: "absolute",
5916
- transform: `translateY(${v.start}px)`,
5918
+ transform: `translateY(${w.start}px)`,
5917
5919
  width: "100%"
5918
5920
  },
5919
5921
  children: [
5920
- N && /* @__PURE__ */ t(Ta, { bgcolor: e, children: ba(w.date) }),
5921
- /* @__PURE__ */ t(Mo, { onClick: y, transaction: w }),
5922
- /* @__PURE__ */ t(P, { sx: { ml: R ? 24 : 0 } })
5922
+ R && /* @__PURE__ */ t(Ta, { bgcolor: e, children: ba(N.date) }),
5923
+ /* @__PURE__ */ t(Mo, { onClick: S, transaction: N }),
5924
+ /* @__PURE__ */ t(P, { sx: { ml: M ? 24 : 0 } })
5923
5925
  ]
5924
5926
  },
5925
- w.guid
5927
+ N.guid
5926
5928
  );
5927
5929
  })
5928
5930
  ]