@mx-cartographer/experiences 9.7.196 → 9.7.198

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.
Files changed (24) hide show
  1. package/CHANGELOG.md +10 -1
  2. package/dist/core/types/localization/InsightsFeedCopy.d.ts +4 -0
  3. package/dist/insights/components/shared/Charts/BarChart/CustomBarPlotV2.d.ts +3 -1
  4. package/dist/insights/components/shared/Charts/BarChart/CustomBarPlotV2.es.js +29 -21
  5. package/dist/insights/components/shared/Charts/BarChart/CustomBarPlotV2.es.js.map +1 -1
  6. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.d.ts +3 -1
  7. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js +68 -63
  8. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js.map +1 -1
  9. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js +94 -91
  10. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js.map +1 -1
  11. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.d.ts +3 -0
  12. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js +218 -185
  13. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js.map +1 -1
  14. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js +59 -56
  15. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js.map +1 -1
  16. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.d.ts +1 -1
  17. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.es.js +22 -11
  18. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.es.js.map +1 -1
  19. package/dist/insights-v2/components/LogoClusterCard.es.js +9 -8
  20. package/dist/insights-v2/components/LogoClusterCard.es.js.map +1 -1
  21. package/dist/insights-v2/components/chartblocks/BarchartV2.d.ts +9 -1
  22. package/dist/insights-v2/components/chartblocks/BarchartV2.es.js +109 -85
  23. package/dist/insights-v2/components/chartblocks/BarchartV2.es.js.map +1 -1
  24. package/package.json +1 -1
@@ -1,18 +1,19 @@
1
- import { buildDynamicCopy as g } from "../../../core/utils/Localization.es.js";
2
- import { DATE_FORMATS_INTL as y, formatDate as T } from "../../../core/constants/DateFormats.es.js";
3
- import { TransactionStatus as F } from "../../../core/types/Transaction.es.js";
4
- import { fromUnixUTC as L } from "../../../core/utils/DateUtil.es.js";
5
- import { CURRENCY_FORMAT as x } from "../../../core/utils/NumberFormatting.es.js";
6
- import { getCategoryColor as V } from "../../../core/utils/CategoryUtil.es.js";
7
- import { buildDataSeries as H } from "../../blocks/ChartBlocks/BarchartBlock/utils.es.js";
8
- import { asGuidList as A, asNonEmptyText as c, asNumber as m } from "../../blocks/slotReaders.es.js";
1
+ import { CategoryGuids as w } from "../../../core/constants/Category.es.js";
2
+ import { buildDynamicCopy as d } from "../../../core/utils/Localization.es.js";
3
+ import { DATE_FORMATS_INTL as v, formatDate as T } from "../../../core/constants/DateFormats.es.js";
4
+ import { TransactionStatus as x } from "../../../core/types/Transaction.es.js";
5
+ import { fromUnixUTC as U } from "../../../core/utils/DateUtil.es.js";
6
+ import { CURRENCY_FORMAT as z } from "../../../core/utils/NumberFormatting.es.js";
7
+ import { getCategoryColor as W } from "../../../core/utils/CategoryUtil.es.js";
8
+ import { buildDataSeries as D } from "../../blocks/ChartBlocks/BarchartBlock/utils.es.js";
9
+ import { asGuidList as E, asNonEmptyText as _, asNumber as l } from "../../blocks/slotReaders.es.js";
9
10
  import { getLayoutConfig as O } from "../../blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js";
10
- import B from "../../components/LogoMark.es.js";
11
- import { calendarDateOf as z, toDrillDownSlotData as W } from "./utils.es.js";
12
- import { Icon as R } from "@mxenabled/mx-icons";
13
- import { jsx as i } from "react/jsx-runtime";
14
- import { endOfMonth as C, fromUnixTime as j, isValid as E, parseISO as h, startOfMonth as D } from "date-fns";
15
- var n = {
11
+ import H from "../../components/LogoMark.es.js";
12
+ import { calendarDateOf as j, toDrillDownSlotData as M } from "./utils.es.js";
13
+ import { Icon as P } from "@mxenabled/mx-icons";
14
+ import { jsx as c } from "react/jsx-runtime";
15
+ import { endOfMonth as I, fromUnixTime as q, isValid as L, parseISO as S, startOfMonth as R } from "date-fns";
16
+ var i = {
16
17
  TRANSACTION: "not_standard_amount",
17
18
  CATEGORY_SPEND: "category_spend",
18
19
  MONTHLY_SPEND: "monthly_spend_comparison",
@@ -28,176 +29,196 @@ var n = {
28
29
  SUBSCRIPTION_AGGREGATE: "monthly_subscription_aggregate",
29
30
  MERCHANT_BUDGET: "merchant_budget",
30
31
  TOP_MERCHANT: "top_merchant"
31
- }, G = (t) => t.insights_feed?.general?.transaction_history_title ?? "", d = (t, e) => e && V(e, t) || t.palette.primary.main, p = (t) => typeof t == "string" ? h(t) : new Date(t ?? NaN), v = (t) => ({
32
- start: D(p(t)),
33
- end: C(p(t))
34
- }), P = (t) => t?.length ? { accounts: t } : {}, K = ({ beat: t }) => {
32
+ }, k = (t) => t.insights_feed?.general?.transaction_history_title ?? "", B = { [w.GAS]: {
33
+ parent: w.AUTO_AND_TRANSPORT,
34
+ headingKey: "gas_month_heading",
35
+ tipKey: "gas_tip_message"
36
+ } }, u = (t, e) => e && W(e, t) || t.palette.primary.main, J = (t, e) => u(t, e && B[e]?.parent || e), h = (t) => typeof t == "string" ? S(t) : new Date(t ?? NaN), b = (t) => ({
37
+ start: R(h(t)),
38
+ end: I(h(t))
39
+ }), F = (t) => t?.length ? { accounts: t } : {}, Q = ({ beat: t }) => {
35
40
  const { account_guid: e, from_date: a, to_date: r } = t.insights_payload?.drilldown_data ?? {};
36
41
  return typeof e != "string" || typeof a != "number" || typeof r != "number" || !Number.isFinite(a) || !Number.isFinite(r) || r <= a ? {
37
42
  accounts: [],
38
43
  custom: () => !1
39
44
  } : {
40
45
  accounts: [e],
41
- custom: (o) => !o.is_hidden && o.feed_status !== F.PENDING,
46
+ custom: (o) => !o.is_hidden && o.feed_status !== x.PENDING,
42
47
  showSplits: !0,
43
48
  dateRange: {
44
- start: L(a),
45
- end: L(r - 1)
49
+ start: U(a),
50
+ end: U(r - 1)
46
51
  }
47
52
  };
48
- }, q = (t) => {
53
+ }, X = (t) => {
49
54
  const e = t?.drilldown_data ?? {};
50
55
  return {
51
- transaction_guids: A(e.transaction_guids),
52
- date: z(e.due_date),
53
- category_guid: c(e.category_guid),
54
- average_amount: m(e.average_amount),
55
- merchant_name: c(e.merchant_name)
56
+ transaction_guids: E(e.transaction_guids),
57
+ date: j(e.due_date),
58
+ category_guid: _(e.category_guid),
59
+ average_amount: l(e.average_amount),
60
+ merchant_name: _(e.merchant_name)
56
61
  };
57
- }, l = (t) => {
62
+ }, g = (t) => {
58
63
  const e = t;
59
64
  return Array.isArray(e?.names) && Array.isArray(e?.data) ? e : void 0;
60
- }, J = (t) => {
65
+ }, Z = (t) => {
61
66
  const e = t?.drilldown_data ?? {};
62
67
  return {
63
- account_guids: A(e.account_guids),
64
- data_series: l(e.data_series),
65
- average_amount: m(e.average_amount)
68
+ account_guids: E(e.account_guids),
69
+ data_series: g(e.data_series),
70
+ average_amount: l(e.average_amount)
66
71
  };
67
- }, Q = (t) => {
72
+ }, $ = (t) => {
68
73
  const e = t?.drilldown_data ?? {}, a = t?.instance_slot?.data, r = t?.instance_slot_data;
69
74
  return {
70
- data_series: l(e.data_series),
71
- average_amount: m(e.average_amount),
72
- merchant_guid: c(a?.merchant_guid) ?? c(r?.merchant_guid),
73
- merchant_name: c(a?.merchant_name) ?? c(r?.merchant_name)
75
+ data_series: g(e.data_series),
76
+ average_amount: l(e.average_amount),
77
+ merchant_guid: _(a?.merchant_guid) ?? _(r?.merchant_guid),
78
+ merchant_name: _(a?.merchant_name) ?? _(r?.merchant_name)
74
79
  };
75
- }, X = (t, e) => {
80
+ }, tt = (t, e) => {
76
81
  const a = e ?? {};
77
82
  return {
78
- data_series: l(a.data_series),
79
- average_amount: m(a.average_amount),
80
- category_guid: c(a.category_guid),
81
- described_month: c(a.described_month),
82
- merchant_guid: c(a.merchant_guid),
83
- merchant_name: c(a.merchant_name),
84
- rank: m(a.rank)
83
+ data_series: g(a.data_series),
84
+ average_amount: l(a.average_amount),
85
+ category_guid: _(a.category_guid),
86
+ described_month: _(a.described_month),
87
+ merchant_guid: _(a.merchant_guid),
88
+ merchant_name: _(a.merchant_name),
89
+ rank: l(a.rank)
85
90
  };
86
- }, k = ["income", "other"], Z = (t) => {
91
+ }, K = ["income", "other"], et = (t) => {
87
92
  const e = t?.drilldown_data ?? {}, a = t?.instance_slot?.data?.legends?.map(({ label: r }) => r);
88
93
  return {
89
- data_series: l(e.data_series),
90
- average_amount: m(e.average_amount),
91
- income_transaction_guids: A(e.income_transaction_guids),
92
- sub_tab_labels: a?.length === k.length ? a : void 0
94
+ data_series: g(e.data_series),
95
+ average_amount: l(e.average_amount),
96
+ income_transaction_guids: E(e.income_transaction_guids),
97
+ sub_tab_labels: a?.length === K.length ? a : void 0
93
98
  };
94
- }, $ = 2, Y = (t, e) => {
95
- const a = e ?? {}, r = l(a.series), o = Array.isArray(a.labels) ? a.labels.map(c) : [];
96
- return !r || o.length !== $ || !o.every((s) => !!s) ? {} : {
99
+ }, at = (t, e) => {
100
+ const a = e ?? {}, r = g(a.series);
101
+ if (!r) return M(t?.instance_slot?.data ?? {});
102
+ const o = D(r).map((s) => l(s.amount)).filter((s) => s !== void 0), n = o.length ? o.reduce((s, m) => s + m, 0) / o.length : void 0;
103
+ return M({
104
+ category_guid: _(a.category_guid),
105
+ series: r,
106
+ average_amount: l(a.average_amount) ?? n
107
+ });
108
+ }, rt = (t, e, a, r) => {
109
+ const o = r?.category_guid ? B[r.category_guid]?.tipKey : void 0, n = o ? e.transaction_history_block?.[o] : void 0;
110
+ if (n)
111
+ return {
112
+ message: d(n, /* @__PURE__ */ c("strong", { children: e.general.tip_section_title })),
113
+ onDismiss: () => t(!0)
114
+ };
115
+ }, ot = 2, V = (t, e) => {
116
+ const a = e ?? {}, r = g(a.series), o = Array.isArray(a.labels) ? a.labels.map(_) : [];
117
+ return !r || o.length !== ot || !o.every((n) => !!n) ? {} : {
97
118
  data_series: r,
98
- legends: o.map((s) => ({
99
- label: s,
119
+ legends: o.map((n) => ({
120
+ label: n,
100
121
  value: 0
101
122
  }))
102
123
  };
103
- }, w = (t, e) => H(l(e?.series)).flatMap((a) => a.aggregated_guids ?? []), tt = (t, e) => {
124
+ }, A = (t, e) => D(g(e?.series)).flatMap((a) => a.aggregated_guids ?? []), nt = (t, e) => {
104
125
  const a = e.transaction_history_block?.monthly_debt_to_income_tip_message, r = e.transaction_history_block?.monthly_debt_to_income_tip_limit;
105
126
  if (!(!a || !r))
106
127
  return {
107
- message: g(a, /* @__PURE__ */ i("strong", { children: e.general.tip_section_title }), /* @__PURE__ */ i("strong", { children: r })),
128
+ message: d(a, /* @__PURE__ */ c("strong", { children: e.general.tip_section_title }), /* @__PURE__ */ c("strong", { children: r })),
108
129
  onDismiss: () => t(!0)
109
130
  };
110
- }, et = (t, e) => {
111
- const a = Y(t, e);
112
- return a.data_series ? a : W(t?.instance_slot?.data ?? {});
113
- }, at = (t, e) => {
131
+ }, st = (t, e) => {
132
+ const a = V(t, e);
133
+ return a.data_series ? a : M(t?.instance_slot?.data ?? {});
134
+ }, it = (t, e) => {
114
135
  const a = e.transaction_history_block?.savings_to_income_tip_message, r = e.transaction_history_block?.savings_to_income_tip_percentage;
115
136
  if (!(!a || !r))
116
- return { message: g(a, /* @__PURE__ */ i("strong", { children: e.general.tip_section_title }), /* @__PURE__ */ i("strong", { children: r })) };
117
- }, rt = (t) => H(l(t.insights_payload?.drilldown_data?.data_series)).flatMap((e) => e.aggregated_guids ?? []), ot = (t, e, a, r) => {
118
- const o = r?.merchant_name, s = r?.date;
119
- if (!o || !s) return;
120
- const _ = e.transaction_history_block?.upcoming_bill_tip_message;
121
- if (_)
122
- return { message: g(_, /* @__PURE__ */ i("strong", { children: e.general.tip_section_title }), o, T(h(s), y.FULL_MONTH_DAY)) };
123
- }, M = ({ beatTransactions: t, dataSeries: e, selectedIndex: a }) => {
124
- const r = e[a], o = r?.guid, s = t.find((_) => _.guid === o)?.has_been_split;
137
+ return { message: d(a, /* @__PURE__ */ c("strong", { children: e.general.tip_section_title }), /* @__PURE__ */ c("strong", { children: r })) };
138
+ }, ct = (t) => D(g(t.insights_payload?.drilldown_data?.data_series)).flatMap((e) => e.aggregated_guids ?? []), _t = (t, e, a, r) => {
139
+ const o = r?.merchant_name, n = r?.date;
140
+ if (!o || !n) return;
141
+ const s = e.transaction_history_block?.upcoming_bill_tip_message;
142
+ if (s)
143
+ return { message: d(s, /* @__PURE__ */ c("strong", { children: e.general.tip_section_title }), o, T(S(n), v.FULL_MONTH_DAY)) };
144
+ }, C = ({ beatTransactions: t, dataSeries: e, selectedIndex: a }) => {
145
+ const r = e[a], o = r?.guid, n = t.find((s) => s.guid === o)?.has_been_split;
125
146
  return {
126
- custom: (_) => _.guid === o,
127
- dateRange: v(r?.date),
128
- showSplits: !s
147
+ custom: (s) => s.guid === o,
148
+ dateRange: b(r?.date),
149
+ showSplits: !n
129
150
  };
130
- }, st = ({ dataSeries: t, selectedIndex: e, instanceSlotData: a }) => {
151
+ }, dt = ({ dataSeries: t, selectedIndex: e, instanceSlotData: a }) => {
131
152
  const r = t[e], o = a.category_guid ?? r?.guid;
132
153
  return {
133
- custom: (s) => s.category_guid === o || s.top_level_category_guid === o,
134
- dateRange: v(r?.date)
154
+ custom: (n) => n.category_guid === o || n.top_level_category_guid === o,
155
+ dateRange: b(r?.date)
135
156
  };
136
- }, nt = ({ dataSeries: t, selectedIndex: e, spendCategoryGuids: a, instanceSlotData: r }) => {
157
+ }, lt = ({ dataSeries: t, selectedIndex: e, spendCategoryGuids: a, instanceSlotData: r }) => {
137
158
  const o = t[e];
138
159
  return {
139
- custom: (s) => !!s.top_level_category_guid && a.includes(s.top_level_category_guid),
140
- dateRange: v(o?.date),
141
- ...P(r.account_guids)
160
+ custom: (n) => !!n.top_level_category_guid && a.includes(n.top_level_category_guid),
161
+ dateRange: b(o?.date),
162
+ ...F(r.account_guids)
142
163
  };
143
- }, U = ({ dataSeries: t, selectedIndex: e, instanceSlotData: a }) => {
144
- const r = a.merchant_guid, o = h(t[e]?.date ?? "");
145
- return !r || !E(o) ? {
164
+ }, Y = ({ dataSeries: t, selectedIndex: e, instanceSlotData: a }) => {
165
+ const r = a.merchant_guid, o = S(t[e]?.date ?? "");
166
+ return !r || !L(o) ? {
146
167
  accounts: [],
147
168
  custom: () => !1
148
169
  } : {
149
- custom: (s) => s.merchant_guid === r && !s.is_hidden,
170
+ custom: (n) => n.merchant_guid === r && !n.is_hidden,
150
171
  dateRange: {
151
- start: D(o),
152
- end: C(o)
172
+ start: R(o),
173
+ end: I(o)
153
174
  }
154
175
  };
155
- }, it = (t) => typeof t == "number" ? j(t) : h(t ?? ""), ct = ({ beat: t, dataSeries: e, selectedIndex: a, isLastTab: r, instanceSlotData: o }) => {
156
- const s = e[a], { start: _, end: S } = v(s?.date), u = it(t.created_at), f = o.account_guids, I = {
157
- start: _,
158
- end: r && E(u) && u < S ? u : S
176
+ }, gt = (t) => typeof t == "number" ? q(t) : S(t ?? ""), mt = ({ beat: t, dataSeries: e, selectedIndex: a, isLastTab: r, instanceSlotData: o }) => {
177
+ const n = e[a], { start: s, end: m } = b(n?.date), p = gt(t.created_at), y = o.account_guids, G = {
178
+ start: s,
179
+ end: r && L(p) && p < m ? p : m
159
180
  };
160
- return f?.length ? {
161
- dateRange: I,
162
- accounts: f
181
+ return y?.length ? {
182
+ dateRange: G,
183
+ accounts: y
163
184
  } : {
164
- dateRange: I,
185
+ dateRange: G,
165
186
  accounts: [],
166
187
  custom: () => !1
167
188
  };
168
189
  }, N = (t, e, a) => {
169
- const r = new Set(t), o = h(e ?? "");
170
- return !r.size || !E(o) ? {
190
+ const r = new Set(t), o = S(e ?? "");
191
+ return !r.size || !L(o) ? {
171
192
  accounts: [],
172
193
  custom: () => !1
173
194
  } : {
174
- custom: (s) => r.has(s.guid),
195
+ custom: (n) => r.has(n.guid),
175
196
  dateRange: {
176
- start: D(o),
177
- end: C(o)
197
+ start: R(o),
198
+ end: I(o)
178
199
  },
179
- ...P(a)
200
+ ...F(a)
180
201
  };
181
- }, _t = ({ beat: t, dataSeries: e, selectedIndex: a }) => N(e[a]?.aggregated_guids, e[a]?.date, t.account_guids), b = ({ beat: t, comparisonBars: e, selectedIndex: a, subIndex: r }) => {
202
+ }, ut = ({ beat: t, dataSeries: e, selectedIndex: a }) => N(e[a]?.aggregated_guids, e[a]?.date, t.account_guids), f = ({ beat: t, comparisonBars: e, selectedIndex: a, subIndex: r }) => {
182
203
  const o = e[a];
183
204
  return N(r === 1 ? o?.comparisonGuids : o?.mainGuids, o?.date, t.account_guids);
184
- }, lt = ({ beat: t, dataSeries: e, subIndex: a }) => N(e[a]?.aggregated_guids, e[a]?.date, t.account_guids), dt = (t) => {
185
- const { dataSeries: e, selectedIndex: a, subIndex: r, instanceSlotData: o } = t, s = e[a], _ = new Set(o.income_transaction_guids), S = k[r] === "income", u = o.sub_tab_labels ? s?.aggregated_guids?.filter((f) => _.has(f) === S) : s?.aggregated_guids;
186
- return N(u, s?.date);
187
- }, At = {
188
- [n.TRANSACTION]: {
189
- title: G,
205
+ }, pt = ({ beat: t, dataSeries: e, subIndex: a }) => N(e[a]?.aggregated_guids, e[a]?.date, t.account_guids), ht = (t) => {
206
+ const { dataSeries: e, selectedIndex: a, subIndex: r, instanceSlotData: o } = t, n = e[a], s = new Set(o.income_transaction_guids), m = K[r] === "income", p = o.sub_tab_labels ? n?.aggregated_guids?.filter((y) => s.has(y) === m) : n?.aggregated_guids;
207
+ return N(p, n?.date);
208
+ }, Rt = {
209
+ [i.TRANSACTION]: {
210
+ title: k,
190
211
  top: "singleBar",
191
212
  scope: "store",
192
213
  filterMode: "store",
193
- filterStrategy: M,
194
- colors: (t, e) => [d(t, e)],
214
+ filterStrategy: C,
215
+ colors: (t, e) => [u(t, e)],
195
216
  header: (t) => {
196
217
  const { title: e, subHeader: a } = t;
197
218
  return {
198
219
  heading: e,
199
220
  subHeadingText: a?.text || void 0,
200
- icon: /* @__PURE__ */ i(B, {
221
+ icon: /* @__PURE__ */ c(H, {
201
222
  logo: {
202
223
  ...a?.logo,
203
224
  merchant_name: a?.text ?? a?.logo?.merchant_name
@@ -207,109 +228,120 @@ var n = {
207
228
  };
208
229
  },
209
230
  tipSection: (t, e, a = "") => ({
210
- message: g(e.general.tip_section_message, /* @__PURE__ */ i("strong", { children: e.general.tip_section_title }), /* @__PURE__ */ i("strong", { children: a })),
231
+ message: d(e.general.tip_section_message, /* @__PURE__ */ c("strong", { children: e.general.tip_section_title }), /* @__PURE__ */ c("strong", { children: a })),
211
232
  onDismiss: () => t(!0)
212
233
  })
213
234
  },
214
- [n.CATEGORY_SPEND]: {
235
+ [i.CATEGORY_SPEND]: {
215
236
  top: "singleBar",
216
- averageFormat: x.whole,
217
- filterStrategy: st,
237
+ averageFormat: z.whole,
238
+ slotData: at,
239
+ fetchMissingTransactions: A,
240
+ tipSection: rt,
241
+ filterStrategy: dt,
218
242
  scope: "store",
219
243
  filterMode: "store",
220
- colors: (t, e) => [d(t, e)],
221
- header: (t) => ({
222
- heading: t.categoryName,
223
- subHeadingText: t.selectedDate && T(p(t.selectedDate), y.MONTH_LONG) || "",
224
- icon: /* @__PURE__ */ i(R, {
225
- color: "primary",
226
- name: "calendar_month",
227
- size: 16
228
- })
229
- })
244
+ colors: (t, e) => [J(t, e)],
245
+ header: (t) => {
246
+ const e = t.selectedDate && T(h(t.selectedDate), v.MONTH_LONG) || "", a = t.slotData?.category_guid, r = a ? B[a]?.headingKey : void 0, o = r && t.copy?.transaction_history_block?.[r];
247
+ return o && e ? {
248
+ heading: d(o, e),
249
+ subHeadingText: ""
250
+ } : {
251
+ heading: t.categoryName,
252
+ subHeadingText: e,
253
+ icon: /* @__PURE__ */ c(P, {
254
+ color: "primary",
255
+ name: "calendar_month",
256
+ size: 16
257
+ })
258
+ };
259
+ }
230
260
  },
231
- [n.MONTHLY_SPEND]: {
261
+ [i.MONTHLY_SPEND]: {
232
262
  top: "singleBar",
233
- filterStrategy: nt,
263
+ filterStrategy: lt,
234
264
  scope: "store",
235
265
  filterMode: "store",
236
266
  colors: (t) => [t.palette.chart.chart2 ?? t.palette.primary.main]
237
267
  },
238
- [n.ACCOUNT_BALANCE]: {
268
+ [i.ACCOUNT_BALANCE]: {
239
269
  title: (t, e) => e?.insights_payload?.title || void 0,
240
270
  top: "singleBar",
241
- filterStrategy: ct,
242
- slotData: J,
271
+ filterStrategy: mt,
272
+ slotData: Z,
243
273
  scope: "store",
244
274
  filterMode: "store",
245
275
  colors: (t) => [t.palette.success.main]
246
276
  },
247
- [n.UPCOMING_BILL]: {
277
+ [i.UPCOMING_BILL]: {
248
278
  top: "upcomingBill",
249
- filterStrategy: M,
279
+ filterStrategy: C,
250
280
  scope: "beat",
251
281
  filterMode: "local",
252
- colors: (t, e) => [d(t, e)],
253
- slotData: q,
282
+ colors: (t, e) => [u(t, e)],
283
+ slotData: X,
254
284
  fetchMissingTransactions: (t) => t.insights_payload?.drilldown_data?.transaction_guids,
255
- tipSection: ot
285
+ tipSection: _t
256
286
  },
257
- [n.DEPOSIT_SUMMARY]: {
287
+ [i.DEPOSIT_SUMMARY]: {
258
288
  top: "singleBar",
259
- filterStrategy: dt,
289
+ filterStrategy: ht,
260
290
  scope: "store",
261
291
  filterMode: "store",
262
292
  colors: (t) => [t.palette.success.main],
263
- slotData: Z,
264
- fetchMissingTransactions: rt,
293
+ slotData: et,
294
+ fetchMissingTransactions: ct,
265
295
  subTabs: ({ instanceSlotData: t }) => t.sub_tab_labels ?? [],
266
296
  barLegendLabel: (t) => t.general.deposit,
267
297
  showMonthlyAmount: !1
268
298
  },
269
- [n.LOW_BALANCE]: {
299
+ [i.LOW_BALANCE]: {
270
300
  top: "list",
271
- filterStrategy: K,
301
+ filterStrategy: Q,
272
302
  scope: "store",
273
303
  filterMode: "store",
274
304
  colors: (t) => [t.palette.primary.main]
275
305
  },
276
- [n.SUBSCRIPTION_AGGREGATE]: {
306
+ [i.SUBSCRIPTION_AGGREGATE]: {
277
307
  top: "monthTabs",
278
- filterStrategy: _t,
308
+ filterStrategy: ut,
279
309
  scope: "store",
280
310
  filterMode: "store",
281
311
  colors: (t) => [t.palette.primary.main]
282
312
  },
283
- [n.MERCHANT_BUDGET]: {
313
+ [i.MERCHANT_BUDGET]: {
284
314
  top: "singleBar",
285
- filterStrategy: U,
286
- slotData: Q,
315
+ filterStrategy: Y,
316
+ slotData: $,
287
317
  scope: "store",
288
318
  filterMode: "store",
289
319
  colors: (t) => [t.palette.chart.chart1 ?? t.palette.primary.main],
290
320
  header: (t) => ({
291
321
  heading: t.slotData?.merchant_name ?? t.title,
292
- subHeadingText: t.selectedDate && T(p(t.selectedDate), y.MONTH_LONG) || "",
293
- icon: /* @__PURE__ */ i(R, {
322
+ subHeadingText: t.selectedDate && T(h(t.selectedDate), v.MONTH_LONG) || "",
323
+ icon: /* @__PURE__ */ c(P, {
294
324
  color: "primary",
295
325
  name: "calendar_month",
296
326
  size: 16
297
327
  })
298
328
  })
299
329
  },
300
- [n.TOP_MERCHANT]: {
330
+ [i.TOP_MERCHANT]: {
301
331
  top: "singleBar",
302
- filterStrategy: U,
303
- slotData: X,
332
+ showMonthTabs: !1,
333
+ showTransactionsHeader: !1,
334
+ filterStrategy: Y,
335
+ slotData: tt,
304
336
  scope: "store",
305
337
  filterMode: "store",
306
- colors: (t, e) => [d(t, e)],
338
+ colors: (t, e) => [u(t, e)],
307
339
  header: ({ copy: t, slotData: e, title: a }) => {
308
- const r = e?.merchant_name, o = t?.top_merchants, s = e?.described_month && T(p(e.described_month), y.MONTH_SHORT_YEAR) || "";
340
+ const r = e?.merchant_name, o = t?.top_merchants, n = e?.described_month && T(h(e.described_month), v.MONTH_SHORT_YEAR) || "";
309
341
  return {
310
- heading: r && o?.merchant_spending ? g(o.merchant_spending, r) : r ?? a,
311
- subHeadingText: e?.rank && o?.most_visited_merchant ? g(o.most_visited_merchant, String(e.rank), s) : s,
312
- logo: e?.merchant_guid ? /* @__PURE__ */ i(B, {
342
+ heading: r && o?.merchant_spending ? d(o.merchant_spending, r) : r ?? a,
343
+ subHeadingText: e?.rank && o?.most_visited_merchant ? d(o.most_visited_merchant, String(e.rank), n) : n,
344
+ logo: e?.merchant_guid ? /* @__PURE__ */ c(H, {
313
345
  logo: {
314
346
  category_guid: e.category_guid,
315
347
  merchant_guid: e.merchant_guid,
@@ -320,72 +352,73 @@ var n = {
320
352
  };
321
353
  }
322
354
  },
323
- [n.SPEND_TO_INCOME]: {
355
+ [i.SPEND_TO_INCOME]: {
324
356
  top: "doubleBar",
325
- filterStrategy: b,
357
+ filterStrategy: f,
326
358
  scope: "store",
327
359
  filterMode: "store",
328
360
  colors: (t) => O(t, "spend_to_income")?.color ?? [],
329
361
  boldLabel: !0,
330
362
  subTabAriaLabels: (t) => [t.general.spend_transactions, t.general.income_transactions]
331
363
  },
332
- [n.COST_OF_LIVING]: {
364
+ [i.COST_OF_LIVING]: {
333
365
  top: "doubleBar",
334
- filterStrategy: b,
366
+ filterStrategy: f,
335
367
  scope: "store",
336
368
  filterMode: "store",
337
- colors: (t, e) => [d(t, e), t.palette.chart.chart4 ?? t.palette.primary.main],
369
+ colors: (t, e) => [u(t, e), t.palette.chart.chart4 ?? t.palette.primary.main],
338
370
  subTabAriaLabels: (t) => [void 0, t.general.income_transactions]
339
371
  },
340
- [n.DEBT_TO_INCOME]: {
341
- title: (t) => t.insights_feed?.transaction_history_block?.monthly_debt_to_income_drawer_title ?? G(t),
372
+ [i.DEBT_TO_INCOME]: {
373
+ title: (t) => t.insights_feed?.transaction_history_block?.monthly_debt_to_income_drawer_title ?? k(t),
342
374
  top: "doubleBar",
343
- filterStrategy: b,
375
+ filterStrategy: f,
344
376
  scope: "store",
345
377
  filterMode: "store",
346
378
  colors: (t) => O(t, "debt_to_income")?.color ?? [],
347
379
  boldLabel: !0,
348
380
  subTabAriaLabels: (t) => [void 0, t.general.income_transactions],
349
- slotData: Y,
350
- fetchMissingTransactions: w,
351
- tipSection: tt
381
+ slotData: V,
382
+ fetchMissingTransactions: A,
383
+ tipSection: nt
352
384
  },
353
- [n.SAVINGS_TO_INCOME]: {
385
+ [i.SAVINGS_TO_INCOME]: {
354
386
  top: "doubleBar",
355
- filterStrategy: b,
387
+ filterStrategy: f,
356
388
  scope: "store",
357
389
  filterMode: "store",
358
390
  colors: (t) => O(t, "savings_to_income")?.color ?? [],
359
391
  boldLabel: !0,
360
392
  subTabAriaLabels: (t) => [t.general.savings_transactions, t.general.income_transactions],
361
- slotData: et,
362
- fetchMissingTransactions: w,
363
- tipSection: at
393
+ slotData: st,
394
+ fetchMissingTransactions: A,
395
+ tipSection: it
364
396
  },
365
- [n.NON_ESSENTIAL_CATEGORY]: {
397
+ [i.NON_ESSENTIAL_CATEGORY]: {
366
398
  top: "tabsOnly",
367
- filterStrategy: lt,
399
+ filterStrategy: pt,
368
400
  scope: "store",
369
401
  filterMode: "store",
370
402
  colors: (t) => [t.palette.primary.main]
371
403
  }
372
- }, Ct = {
404
+ }, Bt = {
373
405
  top: "singleBar",
374
- filterStrategy: M,
406
+ filterStrategy: C,
375
407
  scope: "store",
376
408
  filterMode: "store",
377
- colors: (t, e) => [d(t, e)]
409
+ colors: (t, e) => [u(t, e)]
378
410
  };
379
411
  export {
380
- n as DRILLDOWN_VARIANTS,
381
- Ct as FALLBACK,
382
- At as layout,
383
- Y as resolveDebtToIncomeSlotData,
384
- Z as resolveDepositSummarySlotData,
385
- Q as resolveMerchantBudgetSlotData,
386
- J as resolveSavingsContributionsSlotData,
387
- X as resolveTopMerchantSlotData,
388
- q as resolveUpcomingBillSlotData
412
+ i as DRILLDOWN_VARIANTS,
413
+ Bt as FALLBACK,
414
+ Rt as layout,
415
+ at as resolveCategorySpendSlotData,
416
+ V as resolveDebtToIncomeSlotData,
417
+ et as resolveDepositSummarySlotData,
418
+ $ as resolveMerchantBudgetSlotData,
419
+ Z as resolveSavingsContributionsSlotData,
420
+ tt as resolveTopMerchantSlotData,
421
+ X as resolveUpcomingBillSlotData
389
422
  };
390
423
 
391
424
  //# sourceMappingURL=layout.es.js.map