@mx-cartographer/experiences 7.0.23-alpha.al3 → 7.0.23-alpha.al4
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/trends/index.es.js +22 -23
- package/package.json +1 -1
package/dist/trends/index.es.js
CHANGED
|
@@ -155,15 +155,15 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
155
155
|
(p) => p.category_guid === t || p.top_level_category_guid === t
|
|
156
156
|
) : r).reduce(
|
|
157
157
|
(p, E) => {
|
|
158
|
-
const { category_guid: w, top_level_category_guid: I, month: k, total: D, year: N } = E,
|
|
159
|
-
p[
|
|
160
|
-
id:
|
|
161
|
-
category:
|
|
158
|
+
const { category_guid: w, top_level_category_guid: I, month: k, total: D, year: N } = E, x = t ? w : I;
|
|
159
|
+
p[x] || (p[x] = {
|
|
160
|
+
id: x,
|
|
161
|
+
category: x,
|
|
162
162
|
category_guid: w,
|
|
163
163
|
top_level_category_guid: I
|
|
164
164
|
});
|
|
165
|
-
const
|
|
166
|
-
return p[
|
|
165
|
+
const L = Z(new Date(N, k - 1), B.MONTH_SHORT);
|
|
166
|
+
return p[x][L] || (p[x][L] = 0), p[x][L] = p[x][L] + Math.abs(D), p;
|
|
167
167
|
},
|
|
168
168
|
{}
|
|
169
169
|
);
|
|
@@ -229,7 +229,7 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
229
229
|
}
|
|
230
230
|
);
|
|
231
231
|
}, Nt = M(Ht), Wt = ({ onBackClick: n, sx: o }) => {
|
|
232
|
-
const { onEvent: t } = H(), { isDesktop: s, isTablet: a, isMobile: h } = K(), { visibleAccounts: d } = ie(), { loadMonthlyCategoryTotals: c, monthlyCategoryTotals: l, getCategoryName: m } = F(), { sortedTransactions: C } = ae(), { selectedDateRange: u, setSelectedDateRange: b } = q(), { isCopyLoaded: r, isInitialized: g, selectedAccounts: T, setSelectedAccounts: p } = P(), { trends: E } = R(), [w, I] = i.useState(!1), [k, D] = i.useState(!1), [N,
|
|
232
|
+
const { onEvent: t } = H(), { isDesktop: s, isTablet: a, isMobile: h } = K(), { visibleAccounts: d } = ie(), { loadMonthlyCategoryTotals: c, monthlyCategoryTotals: l, getCategoryName: m } = F(), { sortedTransactions: C } = ae(), { selectedDateRange: u, setSelectedDateRange: b } = q(), { isCopyLoaded: r, isInitialized: g, selectedAccounts: T, setSelectedAccounts: p } = P(), { trends: E } = R(), [w, I] = i.useState(!1), [k, D] = i.useState(!1), [N, x] = i.useState("Chart"), [L, $] = i.useState(""), [z, ce] = i.useState(window.innerHeight), ee = z - (h ? 315 : 345);
|
|
233
233
|
i.useEffect(() => {
|
|
234
234
|
const S = () => ce(window.innerHeight);
|
|
235
235
|
return window.addEventListener("resize", S), () => window.removeEventListener("resize", S);
|
|
@@ -250,15 +250,15 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
250
250
|
l,
|
|
251
251
|
u.start,
|
|
252
252
|
u.end
|
|
253
|
-
), W =
|
|
254
|
-
(G) => G.top_level_category_guid ===
|
|
253
|
+
), W = L.length ? S.filter(
|
|
254
|
+
(G) => G.top_level_category_guid === L || G.category_guid === L
|
|
255
255
|
) : Xe(S);
|
|
256
256
|
return {
|
|
257
257
|
stackedDatasets: W.filter(Ze),
|
|
258
258
|
unstackedDatasets: W.filter(Qe)
|
|
259
259
|
};
|
|
260
|
-
}, [l,
|
|
261
|
-
|
|
260
|
+
}, [l, L, u]), ne = (S, W) => {
|
|
261
|
+
x(W ?? N), t(y.TRENDS_CLICK_TOGGLE_VIEW);
|
|
262
262
|
}, oe = (S) => {
|
|
263
263
|
const W = Ie(S?.[0], 1), G = S?.[1], ge = Ce(G, W);
|
|
264
264
|
b({ start: W, end: G }), t(y.TRENDS_CLICK_TIME_WINDOW, {
|
|
@@ -307,7 +307,7 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
307
307
|
/* @__PURE__ */ e(
|
|
308
308
|
Oe,
|
|
309
309
|
{
|
|
310
|
-
selectedCategoryGuid:
|
|
310
|
+
selectedCategoryGuid: L,
|
|
311
311
|
selectedDateRange: u
|
|
312
312
|
}
|
|
313
313
|
),
|
|
@@ -316,7 +316,7 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
316
316
|
}
|
|
317
317
|
),
|
|
318
318
|
/* @__PURE__ */ f(_, { alignItems: "center", flexDirection: "row", width: "100%", children: [
|
|
319
|
-
/* @__PURE__ */ e(O, { flexGrow: 1, children:
|
|
319
|
+
/* @__PURE__ */ e(O, { flexGrow: 1, children: L && /* @__PURE__ */ f(pe, { onClick: () => $(""), sx: { p: 0, pr: 5 }, children: [
|
|
320
320
|
/* @__PURE__ */ e(re, { name: "arrow_back" }),
|
|
321
321
|
E.all_categories
|
|
322
322
|
] }) }),
|
|
@@ -340,7 +340,7 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
340
340
|
{
|
|
341
341
|
monthlyCategoryTotals: l,
|
|
342
342
|
onClickRow: se,
|
|
343
|
-
selectedCategory:
|
|
343
|
+
selectedCategory: L,
|
|
344
344
|
selectedDateRange: u
|
|
345
345
|
}
|
|
346
346
|
)
|
|
@@ -351,7 +351,7 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
351
351
|
/* @__PURE__ */ e(
|
|
352
352
|
Nt,
|
|
353
353
|
{
|
|
354
|
-
categoryGuid:
|
|
354
|
+
categoryGuid: L,
|
|
355
355
|
dateRange: u,
|
|
356
356
|
isOpen: k,
|
|
357
357
|
onClose: () => D(!1)
|
|
@@ -866,7 +866,7 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
866
866
|
selectedAccounts: w,
|
|
867
867
|
selectedAccountGuids: I,
|
|
868
868
|
setSelectedAccounts: k
|
|
869
|
-
} = P(), { trends: D } = R(), N = je(),
|
|
869
|
+
} = P(), { trends: D } = R(), N = je(), x = d || h, [L, $] = i.useState(!1), [z, ce] = i.useState("Chart"), [J, ee] = i.useState(""), [te, ne] = i.useState(!1), [oe, le] = i.useState(window.innerHeight), se = oe - 208, de = oe - (N ? 494 : 266);
|
|
870
870
|
i.useEffect(() => {
|
|
871
871
|
const v = () => le(window.innerHeight);
|
|
872
872
|
return window.addEventListener("resize", v), () => window.removeEventListener("resize", v);
|
|
@@ -924,7 +924,7 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
924
924
|
}, ge = () => {
|
|
925
925
|
ee(""), s(y.TRENDS_CLICK_ALL_CATEGORIES, A);
|
|
926
926
|
}, Ge = a.show_connections_widget_in_master ? "buttons" : "no-buttons";
|
|
927
|
-
return /* @__PURE__ */ f(
|
|
927
|
+
return !p || !L ? /* @__PURE__ */ e(Q, {}) : /* @__PURE__ */ f(
|
|
928
928
|
Ae,
|
|
929
929
|
{
|
|
930
930
|
accountOptions: l,
|
|
@@ -936,8 +936,7 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
936
936
|
sx: t,
|
|
937
937
|
title: D.title,
|
|
938
938
|
children: [
|
|
939
|
-
|
|
940
|
-
l && /* @__PURE__ */ f(
|
|
939
|
+
l && L && /* @__PURE__ */ f(
|
|
941
940
|
_,
|
|
942
941
|
{
|
|
943
942
|
sx: {
|
|
@@ -966,9 +965,9 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
966
965
|
/* @__PURE__ */ e(re, { name: "arrow_back" }),
|
|
967
966
|
D.all_categories
|
|
968
967
|
] }) }) }),
|
|
969
|
-
/* @__PURE__ */ f(_, { flexDirection:
|
|
968
|
+
/* @__PURE__ */ f(_, { flexDirection: x ? "row" : "column", gap: x ? 48 : 16, children: [
|
|
970
969
|
z === "Chart" && /* @__PURE__ */ f(ze, { children: [
|
|
971
|
-
/* @__PURE__ */ e(O, { sx: { width:
|
|
970
|
+
/* @__PURE__ */ e(O, { sx: { width: x ? "68%" : "100%" }, children: /* @__PURE__ */ e(
|
|
972
971
|
qt,
|
|
973
972
|
{
|
|
974
973
|
availableHeight: se,
|
|
@@ -977,7 +976,7 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
977
976
|
totals: u
|
|
978
977
|
}
|
|
979
978
|
) }),
|
|
980
|
-
/* @__PURE__ */ f(_, { gap: 16, sx: { width:
|
|
979
|
+
/* @__PURE__ */ f(_, { gap: 16, sx: { width: x ? "32%" : "100%" }, children: [
|
|
981
980
|
N && /* @__PURE__ */ e(jt, { onInsightCardClick: o }),
|
|
982
981
|
/* @__PURE__ */ e(
|
|
983
982
|
Pt,
|
|
@@ -1003,7 +1002,7 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
1003
1002
|
]
|
|
1004
1003
|
}
|
|
1005
1004
|
),
|
|
1006
|
-
|
|
1005
|
+
l === void 0 && /* @__PURE__ */ e(
|
|
1007
1006
|
xt,
|
|
1008
1007
|
{
|
|
1009
1008
|
header: D.zero_state_content_header,
|