@mx-cartographer/experiences 9.7.56 → 9.7.58
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 +13 -0
- package/dist/core/stores/TransactionStore.d.ts +6 -0
- package/dist/core/stores/TransactionStore.es.js +45 -33
- package/dist/core/stores/TransactionStore.es.js.map +1 -1
- package/dist/core/types/InsightsInstanceSlotData.d.ts +2 -1
- package/dist/core/types/InsightsInstanceSlotData.es.js.map +1 -1
- package/dist/core/types/localization/InsightsFeedCopy.d.ts +8 -0
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.d.ts +5 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js +63 -58
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js +115 -107
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.d.ts +7 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js +88 -59
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistory.d.ts +7 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistory.es.js +13 -13
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistory.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare.es.js +10 -7
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.d.ts +46 -15
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.es.js +87 -59
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js +93 -53
- package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.d.ts +20 -20
- package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.es.js +48 -39
- package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/components/LogoClusterCard.d.ts +7 -1
- package/dist/insights-v2/components/LogoClusterCard.es.js +54 -48
- package/dist/insights-v2/components/LogoClusterCard.es.js.map +1 -1
- package/dist/insights-v2/components/LogoTile.d.ts +6 -4
- package/dist/insights-v2/components/LogoTile.es.js +21 -19
- package/dist/insights-v2/components/LogoTile.es.js.map +1 -1
- package/dist/insights-v2/components/MerchantHighlightCard.d.ts +8 -3
- package/dist/insights-v2/components/MerchantHighlightCard.es.js +24 -21
- package/dist/insights-v2/components/MerchantHighlightCard.es.js.map +1 -1
- package/dist/insights-v2/components/P2PLogoStack.d.ts +7 -1
- package/dist/insights-v2/components/P2PLogoStack.es.js +34 -26
- package/dist/insights-v2/components/P2PLogoStack.es.js.map +1 -1
- package/dist/insights-v2/components/celebrationGradients.d.ts +6 -3
- package/dist/insights-v2/components/celebrationGradients.es.js +8 -7
- package/dist/insights-v2/components/celebrationGradients.es.js.map +1 -1
- package/dist/insights-v2/components/statusTokens.d.ts +0 -5
- package/dist/insights-v2/components/statusTokens.es.js +0 -5
- package/dist/insights-v2/components/statusTokens.es.js.map +1 -1
- package/dist/insights-v2/index.es.js +75 -75
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
## [9.7.58] - 10-28-2026
|
|
2
|
+
|
|
3
|
+
- **CHANGED** - `merchant_block` adds the `highlight`, `single_subscription`, `multiple_subscription` and `multiple_badged` variants, matches the rest to Figma, and removes `single_large`, `single_error` and `multiple_error` (MEW2-3372)
|
|
4
|
+
|
|
5
|
+
## [9.7.57] - 10-28-2026
|
|
6
|
+
|
|
7
|
+
- **CHANGED** - The Upcoming Bill "View Details" drawer (`transaction_history_block` / `upcoming_bill`) reads its facts from the envelope's `drilldown_data` instead of `instance_slot.data`, which fixes its empty chart: `transaction_guids` select the paid bills, `due_date` (YYYY-MM-DD) and `amount` add the projected bar last, `category_guid` colours the bars and `average_amount` is the Trend legend. The source is the registry entry's new optional `slotData` resolver (`resolveUpcomingBillSlotData`); every other drilldown variant still reads `instance_slot.data`. Each fact is narrowed and fails closed: a missing or mistyped due date, amount or `transaction_guids` draws no chart and lists no rows, while a missing average or category only drops the Trend figure or the category colour (WEC-1962)
|
|
8
|
+
- **ADDED** - Tip in the Upcoming Bill drawer, "Tip: Your projected {merchant} bill is due {date}.", from `drilldown_data.merchant_name` and `due_date`, dismissible; no tip when either is missing or the merchant is blank. Copy is the new optional `insights_feed.transaction_history_block.upcoming_bill_tip_message` (`_1{tip}`, `_2{merchant}`, `_3{date}`), no tip until the copy service carries it, so no English is hard-coded (WEC-1962)
|
|
9
|
+
- **CHANGED** - The Upcoming Bill drawer works like legacy pulse's: one bar per paid bill (de-duplicated by date, as `magicTransactions`) plus the projected bill, named by month (`Aug`), or by day (`Oct 2`) when two bars share a month. A bar's tab lists that bill alone (`transactionGuidStrategy`, filtered locally), and the projected tab lists one row for the projected bill, headed by the copy service's `insights_feed.general.projected_amount` (mrs_content ships "PROJECTED AMOUNT" and its translations; no row without it). The projected tab is selected on open, including when the paid bills reach the transaction store after the drawer opens (WEC-1962)
|
|
10
|
+
- **FIXED** - The Upcoming Bill drawer draws a bar for each paid bill even when it is older than the transaction store's 90-day window: the block's open-time prepare hook fetches the paid bills the store lacks by guid (new `TransactionStore.loadTransactionsByGuids`, over `TransactionApi.getTransactionsByGuids`), as pulse's `BeatShell` loads a legacy beat's transactions. A drilldown registry entry opts in with the new `fetchMissingTransactions(beat)` function, which returns the guids from wherever its beat keeps them (`upcoming_bill`: `drilldown_data.transaction_guids`, narrowed with `guidListOf`), and the fetch runs after the 90-day window load so that load cannot replace the older bills. A bar's date is the bill's UTC calendar day, so it no longer names the day before the row's date west of UTC (WEC-1962)
|
|
11
|
+
- **ADDED** - Drilldown registry entries take an optional `beatTransactions` resolver, alongside `slotData`, that builds the drawer's transactions from the beat's own. Upcoming Bill's (`resolveUpcomingBillTransactions`) appends the projected bill (`buildProjectedBillTransaction`, on `PROJECTED_BILL_GUID`) last, so the bars (`buildUpcomingBillSeries`) and the projected tab's row read one list; the block (`splitProjectedTransaction`) keeps it out of the list and the CSV export and hands it to `TransactionDrillDown` as the projected row only when the selected tab's filter matches it (WEC-1962)
|
|
12
|
+
- **ADDED** - Upcoming Bill fixture (`UpcomingBillPayload.json`, the full envelope in tupac's shape; `miniBeats` derives the mini with its own guid) and the `InsightsV2/Insights/UpcomingBill` story: full and mini cards and the open "View Details" drawer (WEC-1962)
|
|
13
|
+
|
|
1
14
|
## [9.7.56] - 10-27-2026
|
|
2
15
|
|
|
3
16
|
- **ADDED** - Monthly Non-Essential Category Summary's "View more" drawer on Insights 2.0 (MEW2-3375): the `transaction_history_block` `non_essential_category_summary` row, a tabs-only drawer (no chart, no month tabs) with one side tab per `series` row (Non-essential / Essential) that lists that side's `aggregated_guids` within its month. Fixtures (`mock/BlockBeatsData/NonEssentialCategorySummary*.ts`), drawer stories, contract test and the block doc
|
|
@@ -73,6 +73,12 @@ export declare class TransactionStore {
|
|
|
73
73
|
updateTag: (tag: Tag) => Promise<void>;
|
|
74
74
|
/** Resolves `true` when the transaction was saved, `false` when the API call failed. */
|
|
75
75
|
updateTransaction: (transaction: Transaction) => Promise<boolean>;
|
|
76
|
+
/**
|
|
77
|
+
* Adds the given transactions by guid, fetching only those the store lacks: an insight drawer's
|
|
78
|
+
* own transactions can be older than the date-range cache (pulse's BeatShell loads a legacy beat's
|
|
79
|
+
* the same way). Leaves `cachedStartDate` alone, since the range itself is not loaded.
|
|
80
|
+
*/
|
|
81
|
+
loadTransactionsByGuids: (guids: string[]) => Promise<void>;
|
|
76
82
|
loadEmbeddedInstanceTransactions: (fromDate: Date) => Promise<void>;
|
|
77
83
|
private captureError;
|
|
78
84
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { TransactionType as
|
|
1
|
+
import { TransactionType as f } from "../types/Transaction.es.js";
|
|
2
2
|
import { endOfUtcDay as g, startOfUtcDay as h } from "../utils/DateUtil.es.js";
|
|
3
3
|
import { BeatApi as l } from "../api/BeatApi.es.js";
|
|
4
4
|
import { TransactionApi as u } from "../api/TransactionApi.es.js";
|
|
5
|
-
import { upsertByGuid as
|
|
5
|
+
import { upsertByGuid as p } from "../utils/upsertByGuid.es.js";
|
|
6
6
|
import { TABLE_CONST as S } from "../constants/Table.es.js";
|
|
7
7
|
import { COLUMN_NAMES as y, DEFAULT_TRANSACTION as m } from "../constants/Transaction.es.js";
|
|
8
8
|
import { buildDetailedTransactions as L, flattenTransactionsWithSplits as w, sortAndFilterTransactions as D } from "../utils/TransactionUtils.es.js";
|
|
@@ -11,8 +11,8 @@ import { isBefore as R } from "date-fns/isBefore";
|
|
|
11
11
|
import { startOfMonth as d } from "date-fns/startOfMonth";
|
|
12
12
|
import { startOfToday as c } from "date-fns/startOfToday";
|
|
13
13
|
import { subDays as E } from "date-fns/subDays";
|
|
14
|
-
import { formatISO as
|
|
15
|
-
import { makeAutoObservable as
|
|
14
|
+
import { formatISO as B } from "date-fns/formatISO";
|
|
15
|
+
import { makeAutoObservable as T, runInAction as r } from "mobx";
|
|
16
16
|
var z = class {
|
|
17
17
|
globalStore;
|
|
18
18
|
uiStore;
|
|
@@ -41,7 +41,7 @@ var z = class {
|
|
|
41
41
|
sortColumn = y.DATE;
|
|
42
42
|
sortDirection = S.DESC;
|
|
43
43
|
constructor(t) {
|
|
44
|
-
this.globalStore = t, this.uiStore = new
|
|
44
|
+
this.globalStore = t, this.uiStore = new b(), this.api = new u(t.endpoint, t.sessionToken, t.onError), this.beatApi = new l(t.endpoint, t.sessionToken, t.onError), T(this);
|
|
45
45
|
}
|
|
46
46
|
loadTransactionData = async () => {
|
|
47
47
|
this.globalStore.accountStore.isAccountDataLoaded || await this.globalStore.accountStore.loadAccountData(), this.globalStore.categoryStore.categoriesLoaded || await this.globalStore.categoryStore.loadCategories(), await Promise.all([
|
|
@@ -110,7 +110,7 @@ var z = class {
|
|
|
110
110
|
};
|
|
111
111
|
addOrUpdateTransactionRule = async (t, a) => {
|
|
112
112
|
try {
|
|
113
|
-
const s = this.transactionRules.find((
|
|
113
|
+
const s = this.transactionRules.find((i) => i.guid === a.user_transaction_rule_guid);
|
|
114
114
|
return s ? await this.api.updateTransactionRule({
|
|
115
115
|
...s,
|
|
116
116
|
category_guid: t,
|
|
@@ -128,8 +128,8 @@ var z = class {
|
|
|
128
128
|
try {
|
|
129
129
|
const a = await this.api.addTransaction(t);
|
|
130
130
|
a && r(() => {
|
|
131
|
-
this.setTransactions(
|
|
132
|
-
const s = a.transaction_type ===
|
|
131
|
+
this.setTransactions(p(this.transactions, a, !0));
|
|
132
|
+
const s = a.transaction_type === f.CREDIT ? a.amount : -a.amount;
|
|
133
133
|
this.globalStore.accountStore.updateAccountBalance(a.account_guid, s);
|
|
134
134
|
});
|
|
135
135
|
} catch (a) {
|
|
@@ -139,7 +139,7 @@ var z = class {
|
|
|
139
139
|
loadAssociatedBeats = async (t) => {
|
|
140
140
|
if (this.associatedBeatsLoading) return;
|
|
141
141
|
this.associatedBeatsLoading = !0;
|
|
142
|
-
const a = t ?
|
|
142
|
+
const a = t ? B(t, { representation: "date" }) : void 0;
|
|
143
143
|
try {
|
|
144
144
|
const s = await this.beatApi.getBeatsWithAssociatedTransaction(a);
|
|
145
145
|
this.setAssociatedBeats(s);
|
|
@@ -253,19 +253,19 @@ var z = class {
|
|
|
253
253
|
if (!this.transactionSplitting) {
|
|
254
254
|
this.transactionSplitting = !0;
|
|
255
255
|
try {
|
|
256
|
-
const s = await this.api.updateTransaction(t),
|
|
257
|
-
for (let
|
|
258
|
-
const o = await this.api.addTransaction(a[
|
|
259
|
-
|
|
256
|
+
const s = await this.api.updateTransaction(t), i = [];
|
|
257
|
+
for (let e = 0; e < a.length; e++) {
|
|
258
|
+
const o = await this.api.addTransaction(a[e]);
|
|
259
|
+
i.push(o);
|
|
260
260
|
}
|
|
261
|
-
const n = this.transactions.findIndex((
|
|
261
|
+
const n = this.transactions.findIndex((e) => e.guid === t.guid);
|
|
262
262
|
if (n >= 0) {
|
|
263
|
-
const
|
|
263
|
+
const e = this.transactions.filter((o) => o.guid !== t.guid && o.parent_guid !== t.guid);
|
|
264
264
|
this.setTransactions([
|
|
265
|
-
...
|
|
265
|
+
...e.slice(0, n),
|
|
266
266
|
s,
|
|
267
|
-
...
|
|
268
|
-
...
|
|
267
|
+
...i,
|
|
268
|
+
...e.slice(n)
|
|
269
269
|
]);
|
|
270
270
|
}
|
|
271
271
|
} catch (s) {
|
|
@@ -281,16 +281,16 @@ var z = class {
|
|
|
281
281
|
await this.api.removeTransactionSplit(t);
|
|
282
282
|
const s = [...this.transactions];
|
|
283
283
|
a.forEach((n) => {
|
|
284
|
-
const
|
|
285
|
-
|
|
284
|
+
const e = s.findIndex((o) => o.guid === n.guid);
|
|
285
|
+
e >= 0 && s.splice(e, 1);
|
|
286
286
|
});
|
|
287
|
-
const
|
|
287
|
+
const i = s.findIndex((n) => n.guid === t);
|
|
288
288
|
r(() => {
|
|
289
|
-
const n = s[
|
|
290
|
-
n && (n.has_been_split = !1),
|
|
291
|
-
...s.slice(0,
|
|
289
|
+
const n = s[i];
|
|
290
|
+
n && (n.has_been_split = !1), i >= 0 && this.setTransactions([
|
|
291
|
+
...s.slice(0, i),
|
|
292
292
|
n,
|
|
293
|
-
...s.slice(
|
|
293
|
+
...s.slice(i + 1)
|
|
294
294
|
]);
|
|
295
295
|
});
|
|
296
296
|
} catch (a) {
|
|
@@ -299,9 +299,9 @@ var z = class {
|
|
|
299
299
|
};
|
|
300
300
|
updateTaggings = async (t, a) => {
|
|
301
301
|
try {
|
|
302
|
-
const s = this.taggings.filter((
|
|
303
|
-
for (const
|
|
304
|
-
for (const
|
|
302
|
+
const s = this.taggings.filter((e) => e.transaction_guid === a), i = new Set(s.map((e) => e.tag_guid)), n = new Set(t);
|
|
303
|
+
for (const e of t) i.has(e) || await this.addTagging(e, a);
|
|
304
|
+
for (const e of s) n.has(e.tag_guid) || await this.removeTagging(e.guid);
|
|
305
305
|
await this.loadTaggings();
|
|
306
306
|
} catch (s) {
|
|
307
307
|
this.captureError("updateTaggings", s);
|
|
@@ -316,7 +316,7 @@ var z = class {
|
|
|
316
316
|
};
|
|
317
317
|
updateTransaction = async (t) => {
|
|
318
318
|
try {
|
|
319
|
-
const a = await this.api.updateTransaction(t), s = this.transactions.findIndex((
|
|
319
|
+
const a = await this.api.updateTransaction(t), s = this.transactions.findIndex((i) => i.guid === t.guid);
|
|
320
320
|
return s >= 0 && this.setTransactions([
|
|
321
321
|
...this.transactions.slice(0, s),
|
|
322
322
|
a,
|
|
@@ -326,6 +326,18 @@ var z = class {
|
|
|
326
326
|
return this.captureError("updateTransaction", a), !1;
|
|
327
327
|
}
|
|
328
328
|
};
|
|
329
|
+
loadTransactionsByGuids = async (t) => {
|
|
330
|
+
const a = new Set(this.transactions.map((i) => i.guid)), s = t.filter((i) => !a.has(i));
|
|
331
|
+
if (s.length)
|
|
332
|
+
try {
|
|
333
|
+
const i = await this.api.getTransactionsByGuids(s);
|
|
334
|
+
r(() => {
|
|
335
|
+
this.transactions = i.reduce((n, e) => p(n, e), this.transactions);
|
|
336
|
+
});
|
|
337
|
+
} catch (i) {
|
|
338
|
+
this.captureError("loadTransactionsByGuids", i);
|
|
339
|
+
}
|
|
340
|
+
};
|
|
329
341
|
loadEmbeddedInstanceTransactions = async (t) => {
|
|
330
342
|
try {
|
|
331
343
|
const a = await this.api.getTransactionsByDateRange(h(t), g(c()));
|
|
@@ -338,7 +350,7 @@ var z = class {
|
|
|
338
350
|
store: "TransactionStore",
|
|
339
351
|
action: t
|
|
340
352
|
});
|
|
341
|
-
},
|
|
353
|
+
}, b = class {
|
|
342
354
|
beginDate = d(/* @__PURE__ */ new Date());
|
|
343
355
|
endDate = A(/* @__PURE__ */ new Date());
|
|
344
356
|
expandedSplits = [];
|
|
@@ -351,7 +363,7 @@ var z = class {
|
|
|
351
363
|
isAmountValid = !1;
|
|
352
364
|
showInsights = !1;
|
|
353
365
|
constructor() {
|
|
354
|
-
|
|
366
|
+
T(this);
|
|
355
367
|
}
|
|
356
368
|
setDateRange = (t, a) => {
|
|
357
369
|
this.beginDate = t, this.endDate = a;
|
|
@@ -367,7 +379,7 @@ var z = class {
|
|
|
367
379
|
this.height = t, this.width = a;
|
|
368
380
|
};
|
|
369
381
|
toggleSplit = (t) => {
|
|
370
|
-
const a = [...this.expandedSplits], s = this.expandedSplits.findIndex((
|
|
382
|
+
const a = [...this.expandedSplits], s = this.expandedSplits.findIndex((i) => i === t);
|
|
371
383
|
s >= 0 ? a.splice(s, 1) : a.push(t), this.expandedSplits = a;
|
|
372
384
|
};
|
|
373
385
|
clearExpandedSplits = () => {
|
|
@@ -379,7 +391,7 @@ var z = class {
|
|
|
379
391
|
};
|
|
380
392
|
export {
|
|
381
393
|
z as TransactionStore,
|
|
382
|
-
|
|
394
|
+
b as UiStore
|
|
383
395
|
};
|
|
384
396
|
|
|
385
397
|
//# sourceMappingURL=TransactionStore.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionStore.es.js","names":[],"sources":["../../../src/core/stores/TransactionStore.ts"],"sourcesContent":["import { makeAutoObservable, runInAction } from 'mobx'\nimport { endOfMonth } from 'date-fns/endOfMonth'\nimport { formatISO } from 'date-fns/formatISO'\nimport { isBefore } from 'date-fns/isBefore'\nimport { startOfMonth } from 'date-fns/startOfMonth'\nimport { startOfToday } from 'date-fns/startOfToday'\nimport { subDays } from 'date-fns/subDays'\n\nimport { endOfUtcDay, startOfUtcDay } from '../utils/DateUtil'\n\nimport { BeatApi, TransactionApi } from '../api'\nimport { TABLE_CONST } from '../constants/Table'\nimport { COLUMN_NAMES, DEFAULT_TRANSACTION } from '../constants/Transaction'\nimport { TransactionType } from '../types'\nimport type { Beat, Tag, Tagging, Transaction, TransactionRule } from '../types'\nimport {\n buildDetailedTransactions,\n flattenTransactionsWithSplits,\n sortAndFilterTransactions,\n} from '../utils/TransactionUtils'\n\nimport { GlobalStore } from './GlobalStore'\nimport { upsertByGuid } from '../utils/upsertByGuid'\n\nexport type TransactionFilter = {\n accounts?: string[]\n dateRange?: { start: Date; end: Date }\n custom?: (value: Transaction) => boolean\n searchTerm?: string\n showSplits?: boolean\n}\n\nexport class TransactionStore {\n globalStore: GlobalStore\n uiStore: UiStore\n api = new TransactionApi('/', '')\n beatApi = new BeatApi('/', '')\n\n associatedBeats: Beat[] = []\n associatedBeatsLoaded: boolean = false\n associatedBeatsLoading: boolean = false\n transactions: Transaction[] = []\n transactionsLoaded: boolean = false\n transactionsLoading: boolean = false\n taggings: Tagging[] = []\n taggingsLoaded: boolean = false\n taggingsLoading: boolean = false\n tags: Tag[] = []\n tagsLoaded: boolean = false\n tagsLoading: boolean = false\n transactionRules: TransactionRule[] = []\n transactionRulesLoaded: boolean = false\n transactionRulesLoading: boolean = false\n transactionSplitting: boolean = false\n\n cachedStartDate: Date = subDays(startOfToday(), 90)\n filter: TransactionFilter = {}\n isLoading = true\n\n alert = ''\n\n sortColumn = COLUMN_NAMES.DATE\n sortDirection = TABLE_CONST.DESC\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n this.uiStore = new UiStore()\n this.api = new TransactionApi(\n globalStore.endpoint,\n globalStore.sessionToken,\n globalStore.onError,\n )\n this.beatApi = new BeatApi(globalStore.endpoint, globalStore.sessionToken, globalStore.onError)\n\n makeAutoObservable(this)\n }\n\n loadTransactionData = async () => {\n if (!this.globalStore.accountStore.isAccountDataLoaded) {\n await this.globalStore.accountStore.loadAccountData()\n }\n if (!this.globalStore.categoryStore.categoriesLoaded) {\n await this.globalStore.categoryStore.loadCategories()\n }\n await Promise.all([\n this.loadAssociatedBeats(startOfMonth(new Date())),\n this.loadTags(),\n this.loadTaggings(),\n this.loadTransactionRules(),\n // By default loads 90 days of transactions\n this.loadTransactions(this.cachedStartDate),\n ])\n }\n\n // Fills in whatever `isTransactionDataLoaded` still waits for and leaves every list a host already\n // seeded (`GlobalStore.loadData`) as it is.\n loadMissingTransactionData = async () => {\n if (!this.globalStore.accountStore.isAccountDataLoaded) {\n await this.globalStore.accountStore.loadAccountData()\n }\n if (!this.globalStore.categoryStore.categoriesLoaded) {\n await this.globalStore.categoryStore.loadCategories()\n }\n await Promise.all([\n this.associatedBeatsLoaded || this.loadAssociatedBeats(startOfMonth(new Date())),\n this.tagsLoaded || this.loadTags(),\n this.taggingsLoaded || this.loadTaggings(),\n this.transactionRulesLoaded || this.loadTransactionRules(),\n this.transactionsLoaded || this.loadTransactions(this.cachedStartDate),\n ])\n }\n\n get isTransactionDataLoaded(): boolean {\n return (\n this.associatedBeatsLoaded &&\n this.tagsLoaded &&\n this.taggingsLoaded &&\n this.transactionRulesLoaded &&\n this.transactionsLoaded\n )\n }\n\n get detailedTransactions(): Transaction[] {\n return this.isTransactionDataLoaded\n ? buildDetailedTransactions(\n this.transactions,\n this.globalStore.accountStore.visibleAccounts,\n this.globalStore.categoryStore.categories,\n this.taggings,\n this.globalStore.copyStore.copy.categories,\n )\n : []\n }\n\n get sortedTransactions(): Transaction[] {\n return sortAndFilterTransactions(\n this.filter,\n this.uiStore.expandedSplits,\n this.sortColumn,\n this.sortDirection,\n this.tags,\n this.detailedTransactions,\n )\n }\n\n get sortedTransactionsWithSplits(): Transaction[] {\n return flattenTransactionsWithSplits(this.sortedTransactions, this.detailedTransactions)\n }\n\n setAssociatedBeats = (beats: Beat[]) => {\n this.associatedBeats = beats\n this.associatedBeatsLoading = false\n this.associatedBeatsLoaded = true\n }\n\n setTaggings = (taggings: Tagging[]) => {\n this.taggings = taggings\n this.taggingsLoading = false\n this.taggingsLoaded = true\n }\n\n setTags = (tags: Tag[]) => {\n this.tags = tags\n this.tagsLoading = false\n this.tagsLoaded = true\n }\n\n setTransactionRules = (transactionRules: TransactionRule[]) => {\n this.transactionRules = transactionRules\n this.transactionRulesLoading = false\n this.transactionRulesLoaded = true\n }\n\n setTransactions = (transactions: Transaction[]) => {\n this.transactions = transactions\n this.transactionsLoading = false\n this.transactionsLoaded = true\n }\n\n setAlert = (alert: string) => {\n this.alert = alert\n }\n\n addTag = async (name: string) => {\n try {\n await this.api.addTag({ name } as Tag)\n await this.loadTags()\n } catch (error) {\n this.captureError('addTag', error)\n }\n }\n\n addTagging = async (tagGuid: string, transactionGuid: string) => {\n try {\n await this.api.addTagging({\n tag_guid: tagGuid,\n transaction_guid: transactionGuid,\n } as Tagging)\n } catch (error) {\n this.captureError('addTagging', error)\n }\n }\n\n /** Resolves `true` when the rule was saved, `false` when an API call failed. */\n addOrUpdateTransactionRule = async (\n categoryGuid: string,\n transaction: Transaction,\n ): Promise<boolean> => {\n try {\n const existingRule = this.transactionRules.find(\n (rule: TransactionRule) => rule.guid === transaction.user_transaction_rule_guid,\n ) as TransactionRule | undefined\n\n if (existingRule) {\n await this.api.updateTransactionRule({\n ...existingRule,\n category_guid: categoryGuid,\n description: transaction.description,\n } as TransactionRule)\n } else {\n await this.api.addTransactionRule({\n category_guid: categoryGuid,\n description: transaction.description,\n match_description: transaction.description,\n } as TransactionRule)\n }\n await this.loadTransactionRules()\n return true\n } catch (error) {\n this.captureError('addOrUpdateTransactionRule', error)\n return false\n }\n }\n\n addTransaction = async (transaction: Transaction) => {\n try {\n const newTransaction = await this.api.addTransaction(transaction)\n\n if (newTransaction) {\n runInAction(() => {\n this.setTransactions(upsertByGuid(this.transactions, newTransaction, true))\n\n // Brokaw may insert the transaction via WebSocket, but it never\n // updates the account balance — that only happens here.\n // See: money-dashboard/src/util/BrokawClient.ts::handleTransactionEvents (search \"setTransactions\")\n // If that handler ever calls updateAccountBalance, remove this call or guard on !existing.\n const balanceChange =\n newTransaction.transaction_type === TransactionType.CREDIT\n ? newTransaction.amount\n : -newTransaction.amount\n\n this.globalStore.accountStore.updateAccountBalance(\n newTransaction.account_guid,\n balanceChange,\n )\n })\n }\n } catch (error) {\n this.captureError('addTransaction', error)\n }\n }\n\n loadAssociatedBeats = async (fromDate?: Date) => {\n if (this.associatedBeatsLoading) return\n\n this.associatedBeatsLoading = true\n const fromDateISO = fromDate ? formatISO(fromDate, { representation: 'date' }) : undefined\n try {\n const beats = await this.beatApi.getBeatsWithAssociatedTransaction(fromDateISO)\n this.setAssociatedBeats(beats)\n } catch (error) {\n this.captureError('loadAssociatedBeats', error)\n this.setAssociatedBeats([])\n } finally {\n // Clear the in-flight flag even on failure so a later load (e.g. a widget\n // remount) can retry instead of being no-oped by the guard above, which would\n // leave isTransactionDataLoaded false and the list empty until a hard refresh.\n runInAction(() => {\n this.associatedBeatsLoading = false\n })\n }\n }\n\n loadTags = async () => {\n if (this.tagsLoading) return\n\n this.tagsLoading = true\n try {\n const tags = await this.api.getTags()\n this.setTags(tags)\n } catch (error) {\n this.captureError('loadTags', error)\n } finally {\n runInAction(() => {\n this.tagsLoading = false\n })\n }\n }\n\n loadTaggings = async () => {\n if (this.taggingsLoading) return\n\n this.taggingsLoading = true\n try {\n const taggings = await this.api.getTaggings()\n this.setTaggings(taggings)\n } catch (error) {\n this.captureError('loadTaggings', error)\n this.setTaggings([])\n } finally {\n runInAction(() => {\n this.taggingsLoading = false\n })\n }\n }\n\n loadTransactionRules = async () => {\n if (this.transactionRulesLoading) return\n\n this.transactionRulesLoading = true\n try {\n const transactionRules = await this.api.getTransactionRules()\n this.setTransactionRules(transactionRules)\n } catch (error) {\n // Catch so a rejection can't abort the Promise.all in loadTransactionData.\n this.captureError('loadTransactionRules', error)\n this.setTransactionRules([])\n } finally {\n runInAction(() => {\n this.transactionRulesLoading = false\n })\n }\n }\n\n loadTransactions = async (startDate: Date = this.cachedStartDate) => {\n if (this.transactionsLoading) return\n\n this.setIsLoading(true)\n this.transactionsLoading = true\n\n try {\n const transactions = await this.api.getTransactionsByDateRange(\n startOfUtcDay(startDate),\n endOfUtcDay(startOfToday()),\n )\n this.setTransactions(transactions)\n // Advance the cache only after the range is actually loaded, so the invariant\n // \"we hold transactions back to cachedStartDate\" always holds.\n runInAction(() => {\n this.cachedStartDate = startDate\n })\n } catch (error) {\n this.captureError('loadTransactions', error)\n } finally {\n // See loadAssociatedBeats: clear the flag on failure so retries aren't no-oped.\n runInAction(() => {\n this.transactionsLoading = false\n })\n this.setIsLoading(false)\n }\n }\n\n modifyTransactionByAccountGuid = (guid: string, updates: Partial<Transaction>) => {\n this.transactions = this.transactions.map((txn) =>\n txn.account_guid === guid ? { ...txn, ...updates } : txn,\n )\n }\n\n removeTag = async (tagGuid: string) => {\n try {\n await this.api.removeTag(tagGuid)\n await this.loadTags()\n } catch (error) {\n this.captureError('removeTag', error)\n }\n }\n\n removeTagging = async (taggingGuid: string) => {\n try {\n await this.api.removeTagging(taggingGuid)\n } catch (error) {\n this.captureError('removeTagging', error)\n }\n }\n\n removeTransaction = async (transactionGuid: string) => {\n try {\n await this.api.removeTransaction(transactionGuid)\n\n const index = this.transactions.findIndex((t: Transaction) => t.guid === transactionGuid)\n\n if (index >= 0) {\n const updatedTransactions = [...this.transactions]\n updatedTransactions.splice(index, 1)\n this.setTransactions(updatedTransactions)\n }\n } catch (error) {\n this.captureError('removeTransaction', error)\n }\n }\n\n setFilter = (filter: TransactionFilter) => {\n this.filter = filter\n\n // Only reload if the new start date is prior to the cached start date; end date\n // is always today. loadTransactions advances cachedStartDate on success, so we\n // must not advance it here (a skipped/failed load would leave the list empty).\n if (filter.dateRange && isBefore(filter.dateRange.start, this.cachedStartDate)) {\n this.loadTransactions(filter.dateRange.start)\n }\n }\n\n setIsLoading = (isLoading: boolean) => (this.isLoading = isLoading)\n\n splitTransaction = async (transaction: Transaction, splits: Transaction[]) => {\n if (this.transactionSplitting) return\n this.transactionSplitting = true\n\n try {\n const updatedTransaction = await this.api.updateTransaction(transaction)\n const children = [] as Transaction[]\n\n for (let i = 0; i < splits.length; i++) {\n const child = await this.api.addTransaction(splits[i])\n children.push(child)\n }\n\n const index = this.transactions.findIndex((t: Transaction) => t.guid === transaction.guid)\n\n if (index >= 0) {\n // Remove old parent and any existing children\n const filtered = this.transactions.filter(\n (t) => t.guid !== transaction.guid && t.parent_guid !== transaction.guid,\n )\n\n // Insert updated parent + new children at original position\n this.setTransactions([\n ...filtered.slice(0, index),\n updatedTransaction,\n ...children,\n ...filtered.slice(index),\n ])\n }\n } catch (error) {\n this.captureError('splitTransaction', error)\n throw error\n } finally {\n this.transactionSplitting = false\n }\n }\n\n unSplitTransaction = async (guid: string) => {\n try {\n const children = this.transactions.filter((t) => t.parent_guid === guid)\n\n await this.api.removeTransactionSplit(guid)\n\n // Remove children\n const transactions = [...this.transactions]\n children.forEach((child) => {\n const index = transactions.findIndex((t) => t.guid === child.guid)\n\n if (index >= 0) {\n transactions.splice(index, 1)\n }\n })\n\n // Update parent\n const index = transactions.findIndex((t) => t.guid === guid)\n\n runInAction(() => {\n const transaction = transactions[index]\n if (transaction) {\n transaction.has_been_split = false\n }\n\n if (index >= 0) {\n this.setTransactions([\n ...transactions.slice(0, index),\n transaction,\n ...transactions.slice(index + 1),\n ])\n }\n })\n } catch (error) {\n this.captureError('unSplitTransaction', error)\n }\n }\n\n updateTaggings = async (tagGuids: string[], transactionGuid: string) => {\n try {\n const currentTaggings = this.taggings.filter((t) => t.transaction_guid === transactionGuid)\n\n const currentTagGuids = new Set(currentTaggings.map((t) => t.tag_guid))\n const incomingTagGuids = new Set(tagGuids)\n\n // Add new taggings that don't already exist\n for (const tagGuid of tagGuids) {\n if (!currentTagGuids.has(tagGuid)) {\n await this.addTagging(tagGuid, transactionGuid)\n }\n }\n\n // Remove taggings that are no longer needed\n for (const tagging of currentTaggings) {\n if (!incomingTagGuids.has(tagging.tag_guid)) {\n await this.removeTagging(tagging.guid)\n }\n }\n\n await this.loadTaggings()\n } catch (error) {\n this.captureError('updateTaggings', error)\n }\n }\n\n updateTag = async (tag: Tag) => {\n try {\n await this.api.updateTag(tag)\n await this.loadTags()\n } catch (error) {\n this.captureError('updateTag', error)\n }\n }\n\n /** Resolves `true` when the transaction was saved, `false` when the API call failed. */\n updateTransaction = async (transaction: Transaction): Promise<boolean> => {\n try {\n const updatedTransaction = await this.api.updateTransaction(transaction)\n\n const index = this.transactions.findIndex((t: Transaction) => t.guid === transaction.guid)\n\n if (index >= 0) {\n this.setTransactions([\n ...this.transactions.slice(0, index),\n updatedTransaction,\n ...this.transactions.slice(index + 1),\n ])\n }\n return true\n } catch (error) {\n this.captureError('updateTransaction', error)\n return false\n }\n }\n\n // This is used for loading the transactions list on demand, on clicking the different transactions of the insightful beats.\n loadEmbeddedInstanceTransactions = async (fromDate: Date) => {\n try {\n const transactions = await this.api.getTransactionsByDateRange(\n startOfUtcDay(fromDate),\n endOfUtcDay(startOfToday()),\n )\n this.cachedStartDate = fromDate\n this.transactions = transactions\n } catch (error) {\n this.captureError('loadEmbeddedInstanceTransactions', error)\n }\n }\n\n private captureError = (action: string, error: unknown) =>\n this.globalStore.captureException(error, { store: 'TransactionStore', action })\n}\n\nexport class UiStore {\n beginDate = startOfMonth(new Date())\n endDate = endOfMonth(new Date())\n\n expandedSplits = [] as string[]\n height = 550\n width = 1000\n shouldDisableDrawerScroll = false\n\n searchValue = ''\n selectedAccountGuids = [] as string[]\n\n manualTransaction: Transaction = DEFAULT_TRANSACTION\n isAmountValid = false\n\n showInsights = false\n\n constructor() {\n makeAutoObservable(this)\n }\n\n setDateRange = (beginDate: Date, endDate: Date) => {\n this.beginDate = beginDate\n this.endDate = endDate\n }\n\n setIsAmountValid = (valid: boolean) => (this.isAmountValid = valid)\n\n setSearchValue = (searchValue: string) => (this.searchValue = searchValue)\n\n setSelectedAccountGuids = (accountGuids: string[]) => (this.selectedAccountGuids = accountGuids)\n\n setShouldDisableDrawerScroll = (shouldDisable: boolean) =>\n (this.shouldDisableDrawerScroll = shouldDisable)\n\n setShowInsights = (showInsights: boolean) => {\n this.showInsights = showInsights\n }\n\n setSize = (height: number, width: number) => {\n this.height = height\n this.width = width\n }\n\n toggleSplit = (guid: string) => {\n const expandedSplits = [...this.expandedSplits]\n const index = this.expandedSplits.findIndex((splitGuid) => splitGuid === guid)\n\n if (index >= 0) {\n expandedSplits.splice(index, 1)\n } else {\n expandedSplits.push(guid)\n }\n\n this.expandedSplits = expandedSplits\n }\n\n clearExpandedSplits = () => {\n if (this.expandedSplits.length === 0) return\n this.expandedSplits = []\n }\n\n updateManualTransaction = (manualTransaction: Transaction) => {\n this.manualTransaction = manualTransaction\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAgCA,IAAa,IAAb,MAA8B;AAAA,EAC5B;AAAA,EACA;AAAA,EACA,MAAM,IAAI,EAAe,KAAK,EAAE;AAAA,EAChC,UAAU,IAAI,EAAQ,KAAK,EAAE;AAAA,EAE7B,kBAA0B,CAAC;AAAA,EAC3B,wBAAiC;AAAA,EACjC,yBAAkC;AAAA,EAClC,eAA8B,CAAC;AAAA,EAC/B,qBAA8B;AAAA,EAC9B,sBAA+B;AAAA,EAC/B,WAAsB,CAAC;AAAA,EACvB,iBAA0B;AAAA,EAC1B,kBAA2B;AAAA,EAC3B,OAAc,CAAC;AAAA,EACf,aAAsB;AAAA,EACtB,cAAuB;AAAA,EACvB,mBAAsC,CAAC;AAAA,EACvC,yBAAkC;AAAA,EAClC,0BAAmC;AAAA,EACnC,uBAAgC;AAAA,EAEhC,kBAAwB,EAAQ,EAAa,GAAG,EAAE;AAAA,EAClD,SAA4B,CAAC;AAAA,EAC7B,YAAY;AAAA,EAEZ,QAAQ;AAAA,EAER,aAAa,EAAa;AAAA,EA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AA,EAEhB,eAAe;AAAA,EAEf,cAAc;AACZ,IAAA,EAAmB,IAAI;AAAA,EACzB;AAAA,EAEA,eAAA,CAAgB,GAAiB,MAAkB;AACjD,SAAK,YAAY,GACjB,KAAK,UAAU;AAAA,EACjB;AAAA,EAEA,mBAAA,CAAoB,MAAoB,KAAK,gBAAgB;AAAA,EAE7D,iBAAA,CAAkB,MAAyB,KAAK,cAAc;AAAA,EAE9D,0BAAA,CAA2B,MAA4B,KAAK,uBAAuB;AAAA,EAEnF,+BAAA,CAAgC,MAC7B,KAAK,4BAA4B;AAAA,EAEpC,kBAAA,CAAmB,MAA0B;AAC3C,SAAK,eAAe;AAAA,EACtB;AAAA,EAEA,UAAA,CAAW,GAAgB,MAAkB;AAC3C,SAAK,SAAS,GACd,KAAK,QAAQ;AAAA,EACf;AAAA,EAEA,cAAA,CAAe,MAAiB;AAC9B,UAAM,IAAiB,CAAC,GAAG,KAAK,cAAc,GACxC,IAAQ,KAAK,eAAe,UAAA,CAAW,MAAc,MAAc,CAAI;AAE7E,IAAI,KAAS,IACX,EAAe,OAAO,GAAO,CAAC,IAE9B,EAAe,KAAK,CAAI,GAG1B,KAAK,iBAAiB;AAAA,EACxB;AAAA,EAEA,sBAAA,MAA4B;AAC1B,IAAI,KAAK,eAAe,WAAW,MACnC,KAAK,iBAAiB,CAAC;AAAA,EACzB;AAAA,EAEA,0BAAA,CAA2B,MAAmC;AAC5D,SAAK,oBAAoB;AAAA,EAC3B;AACF"}
|
|
1
|
+
{"version":3,"file":"TransactionStore.es.js","names":[],"sources":["../../../src/core/stores/TransactionStore.ts"],"sourcesContent":["import { makeAutoObservable, runInAction } from 'mobx'\nimport { endOfMonth } from 'date-fns/endOfMonth'\nimport { formatISO } from 'date-fns/formatISO'\nimport { isBefore } from 'date-fns/isBefore'\nimport { startOfMonth } from 'date-fns/startOfMonth'\nimport { startOfToday } from 'date-fns/startOfToday'\nimport { subDays } from 'date-fns/subDays'\n\nimport { endOfUtcDay, startOfUtcDay } from '../utils/DateUtil'\n\nimport { BeatApi, TransactionApi } from '../api'\nimport { TABLE_CONST } from '../constants/Table'\nimport { COLUMN_NAMES, DEFAULT_TRANSACTION } from '../constants/Transaction'\nimport { TransactionType } from '../types'\nimport type { Beat, Tag, Tagging, Transaction, TransactionRule } from '../types'\nimport {\n buildDetailedTransactions,\n flattenTransactionsWithSplits,\n sortAndFilterTransactions,\n} from '../utils/TransactionUtils'\n\nimport { GlobalStore } from './GlobalStore'\nimport { upsertByGuid } from '../utils/upsertByGuid'\n\nexport type TransactionFilter = {\n accounts?: string[]\n dateRange?: { start: Date; end: Date }\n custom?: (value: Transaction) => boolean\n searchTerm?: string\n showSplits?: boolean\n}\n\nexport class TransactionStore {\n globalStore: GlobalStore\n uiStore: UiStore\n api = new TransactionApi('/', '')\n beatApi = new BeatApi('/', '')\n\n associatedBeats: Beat[] = []\n associatedBeatsLoaded: boolean = false\n associatedBeatsLoading: boolean = false\n transactions: Transaction[] = []\n transactionsLoaded: boolean = false\n transactionsLoading: boolean = false\n taggings: Tagging[] = []\n taggingsLoaded: boolean = false\n taggingsLoading: boolean = false\n tags: Tag[] = []\n tagsLoaded: boolean = false\n tagsLoading: boolean = false\n transactionRules: TransactionRule[] = []\n transactionRulesLoaded: boolean = false\n transactionRulesLoading: boolean = false\n transactionSplitting: boolean = false\n\n cachedStartDate: Date = subDays(startOfToday(), 90)\n filter: TransactionFilter = {}\n isLoading = true\n\n alert = ''\n\n sortColumn = COLUMN_NAMES.DATE\n sortDirection = TABLE_CONST.DESC\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n this.uiStore = new UiStore()\n this.api = new TransactionApi(\n globalStore.endpoint,\n globalStore.sessionToken,\n globalStore.onError,\n )\n this.beatApi = new BeatApi(globalStore.endpoint, globalStore.sessionToken, globalStore.onError)\n\n makeAutoObservable(this)\n }\n\n loadTransactionData = async () => {\n if (!this.globalStore.accountStore.isAccountDataLoaded) {\n await this.globalStore.accountStore.loadAccountData()\n }\n if (!this.globalStore.categoryStore.categoriesLoaded) {\n await this.globalStore.categoryStore.loadCategories()\n }\n await Promise.all([\n this.loadAssociatedBeats(startOfMonth(new Date())),\n this.loadTags(),\n this.loadTaggings(),\n this.loadTransactionRules(),\n // By default loads 90 days of transactions\n this.loadTransactions(this.cachedStartDate),\n ])\n }\n\n // Fills in whatever `isTransactionDataLoaded` still waits for and leaves every list a host already\n // seeded (`GlobalStore.loadData`) as it is.\n loadMissingTransactionData = async () => {\n if (!this.globalStore.accountStore.isAccountDataLoaded) {\n await this.globalStore.accountStore.loadAccountData()\n }\n if (!this.globalStore.categoryStore.categoriesLoaded) {\n await this.globalStore.categoryStore.loadCategories()\n }\n await Promise.all([\n this.associatedBeatsLoaded || this.loadAssociatedBeats(startOfMonth(new Date())),\n this.tagsLoaded || this.loadTags(),\n this.taggingsLoaded || this.loadTaggings(),\n this.transactionRulesLoaded || this.loadTransactionRules(),\n this.transactionsLoaded || this.loadTransactions(this.cachedStartDate),\n ])\n }\n\n get isTransactionDataLoaded(): boolean {\n return (\n this.associatedBeatsLoaded &&\n this.tagsLoaded &&\n this.taggingsLoaded &&\n this.transactionRulesLoaded &&\n this.transactionsLoaded\n )\n }\n\n get detailedTransactions(): Transaction[] {\n return this.isTransactionDataLoaded\n ? buildDetailedTransactions(\n this.transactions,\n this.globalStore.accountStore.visibleAccounts,\n this.globalStore.categoryStore.categories,\n this.taggings,\n this.globalStore.copyStore.copy.categories,\n )\n : []\n }\n\n get sortedTransactions(): Transaction[] {\n return sortAndFilterTransactions(\n this.filter,\n this.uiStore.expandedSplits,\n this.sortColumn,\n this.sortDirection,\n this.tags,\n this.detailedTransactions,\n )\n }\n\n get sortedTransactionsWithSplits(): Transaction[] {\n return flattenTransactionsWithSplits(this.sortedTransactions, this.detailedTransactions)\n }\n\n setAssociatedBeats = (beats: Beat[]) => {\n this.associatedBeats = beats\n this.associatedBeatsLoading = false\n this.associatedBeatsLoaded = true\n }\n\n setTaggings = (taggings: Tagging[]) => {\n this.taggings = taggings\n this.taggingsLoading = false\n this.taggingsLoaded = true\n }\n\n setTags = (tags: Tag[]) => {\n this.tags = tags\n this.tagsLoading = false\n this.tagsLoaded = true\n }\n\n setTransactionRules = (transactionRules: TransactionRule[]) => {\n this.transactionRules = transactionRules\n this.transactionRulesLoading = false\n this.transactionRulesLoaded = true\n }\n\n setTransactions = (transactions: Transaction[]) => {\n this.transactions = transactions\n this.transactionsLoading = false\n this.transactionsLoaded = true\n }\n\n setAlert = (alert: string) => {\n this.alert = alert\n }\n\n addTag = async (name: string) => {\n try {\n await this.api.addTag({ name } as Tag)\n await this.loadTags()\n } catch (error) {\n this.captureError('addTag', error)\n }\n }\n\n addTagging = async (tagGuid: string, transactionGuid: string) => {\n try {\n await this.api.addTagging({\n tag_guid: tagGuid,\n transaction_guid: transactionGuid,\n } as Tagging)\n } catch (error) {\n this.captureError('addTagging', error)\n }\n }\n\n /** Resolves `true` when the rule was saved, `false` when an API call failed. */\n addOrUpdateTransactionRule = async (\n categoryGuid: string,\n transaction: Transaction,\n ): Promise<boolean> => {\n try {\n const existingRule = this.transactionRules.find(\n (rule: TransactionRule) => rule.guid === transaction.user_transaction_rule_guid,\n ) as TransactionRule | undefined\n\n if (existingRule) {\n await this.api.updateTransactionRule({\n ...existingRule,\n category_guid: categoryGuid,\n description: transaction.description,\n } as TransactionRule)\n } else {\n await this.api.addTransactionRule({\n category_guid: categoryGuid,\n description: transaction.description,\n match_description: transaction.description,\n } as TransactionRule)\n }\n await this.loadTransactionRules()\n return true\n } catch (error) {\n this.captureError('addOrUpdateTransactionRule', error)\n return false\n }\n }\n\n addTransaction = async (transaction: Transaction) => {\n try {\n const newTransaction = await this.api.addTransaction(transaction)\n\n if (newTransaction) {\n runInAction(() => {\n this.setTransactions(upsertByGuid(this.transactions, newTransaction, true))\n\n // Brokaw may insert the transaction via WebSocket, but it never\n // updates the account balance — that only happens here.\n // See: money-dashboard/src/util/BrokawClient.ts::handleTransactionEvents (search \"setTransactions\")\n // If that handler ever calls updateAccountBalance, remove this call or guard on !existing.\n const balanceChange =\n newTransaction.transaction_type === TransactionType.CREDIT\n ? newTransaction.amount\n : -newTransaction.amount\n\n this.globalStore.accountStore.updateAccountBalance(\n newTransaction.account_guid,\n balanceChange,\n )\n })\n }\n } catch (error) {\n this.captureError('addTransaction', error)\n }\n }\n\n loadAssociatedBeats = async (fromDate?: Date) => {\n if (this.associatedBeatsLoading) return\n\n this.associatedBeatsLoading = true\n const fromDateISO = fromDate ? formatISO(fromDate, { representation: 'date' }) : undefined\n try {\n const beats = await this.beatApi.getBeatsWithAssociatedTransaction(fromDateISO)\n this.setAssociatedBeats(beats)\n } catch (error) {\n this.captureError('loadAssociatedBeats', error)\n this.setAssociatedBeats([])\n } finally {\n // Clear the in-flight flag even on failure so a later load (e.g. a widget\n // remount) can retry instead of being no-oped by the guard above, which would\n // leave isTransactionDataLoaded false and the list empty until a hard refresh.\n runInAction(() => {\n this.associatedBeatsLoading = false\n })\n }\n }\n\n loadTags = async () => {\n if (this.tagsLoading) return\n\n this.tagsLoading = true\n try {\n const tags = await this.api.getTags()\n this.setTags(tags)\n } catch (error) {\n this.captureError('loadTags', error)\n } finally {\n runInAction(() => {\n this.tagsLoading = false\n })\n }\n }\n\n loadTaggings = async () => {\n if (this.taggingsLoading) return\n\n this.taggingsLoading = true\n try {\n const taggings = await this.api.getTaggings()\n this.setTaggings(taggings)\n } catch (error) {\n this.captureError('loadTaggings', error)\n this.setTaggings([])\n } finally {\n runInAction(() => {\n this.taggingsLoading = false\n })\n }\n }\n\n loadTransactionRules = async () => {\n if (this.transactionRulesLoading) return\n\n this.transactionRulesLoading = true\n try {\n const transactionRules = await this.api.getTransactionRules()\n this.setTransactionRules(transactionRules)\n } catch (error) {\n // Catch so a rejection can't abort the Promise.all in loadTransactionData.\n this.captureError('loadTransactionRules', error)\n this.setTransactionRules([])\n } finally {\n runInAction(() => {\n this.transactionRulesLoading = false\n })\n }\n }\n\n loadTransactions = async (startDate: Date = this.cachedStartDate) => {\n if (this.transactionsLoading) return\n\n this.setIsLoading(true)\n this.transactionsLoading = true\n\n try {\n const transactions = await this.api.getTransactionsByDateRange(\n startOfUtcDay(startDate),\n endOfUtcDay(startOfToday()),\n )\n this.setTransactions(transactions)\n // Advance the cache only after the range is actually loaded, so the invariant\n // \"we hold transactions back to cachedStartDate\" always holds.\n runInAction(() => {\n this.cachedStartDate = startDate\n })\n } catch (error) {\n this.captureError('loadTransactions', error)\n } finally {\n // See loadAssociatedBeats: clear the flag on failure so retries aren't no-oped.\n runInAction(() => {\n this.transactionsLoading = false\n })\n this.setIsLoading(false)\n }\n }\n\n modifyTransactionByAccountGuid = (guid: string, updates: Partial<Transaction>) => {\n this.transactions = this.transactions.map((txn) =>\n txn.account_guid === guid ? { ...txn, ...updates } : txn,\n )\n }\n\n removeTag = async (tagGuid: string) => {\n try {\n await this.api.removeTag(tagGuid)\n await this.loadTags()\n } catch (error) {\n this.captureError('removeTag', error)\n }\n }\n\n removeTagging = async (taggingGuid: string) => {\n try {\n await this.api.removeTagging(taggingGuid)\n } catch (error) {\n this.captureError('removeTagging', error)\n }\n }\n\n removeTransaction = async (transactionGuid: string) => {\n try {\n await this.api.removeTransaction(transactionGuid)\n\n const index = this.transactions.findIndex((t: Transaction) => t.guid === transactionGuid)\n\n if (index >= 0) {\n const updatedTransactions = [...this.transactions]\n updatedTransactions.splice(index, 1)\n this.setTransactions(updatedTransactions)\n }\n } catch (error) {\n this.captureError('removeTransaction', error)\n }\n }\n\n setFilter = (filter: TransactionFilter) => {\n this.filter = filter\n\n // Only reload if the new start date is prior to the cached start date; end date\n // is always today. loadTransactions advances cachedStartDate on success, so we\n // must not advance it here (a skipped/failed load would leave the list empty).\n if (filter.dateRange && isBefore(filter.dateRange.start, this.cachedStartDate)) {\n this.loadTransactions(filter.dateRange.start)\n }\n }\n\n setIsLoading = (isLoading: boolean) => (this.isLoading = isLoading)\n\n splitTransaction = async (transaction: Transaction, splits: Transaction[]) => {\n if (this.transactionSplitting) return\n this.transactionSplitting = true\n\n try {\n const updatedTransaction = await this.api.updateTransaction(transaction)\n const children = [] as Transaction[]\n\n for (let i = 0; i < splits.length; i++) {\n const child = await this.api.addTransaction(splits[i])\n children.push(child)\n }\n\n const index = this.transactions.findIndex((t: Transaction) => t.guid === transaction.guid)\n\n if (index >= 0) {\n // Remove old parent and any existing children\n const filtered = this.transactions.filter(\n (t) => t.guid !== transaction.guid && t.parent_guid !== transaction.guid,\n )\n\n // Insert updated parent + new children at original position\n this.setTransactions([\n ...filtered.slice(0, index),\n updatedTransaction,\n ...children,\n ...filtered.slice(index),\n ])\n }\n } catch (error) {\n this.captureError('splitTransaction', error)\n throw error\n } finally {\n this.transactionSplitting = false\n }\n }\n\n unSplitTransaction = async (guid: string) => {\n try {\n const children = this.transactions.filter((t) => t.parent_guid === guid)\n\n await this.api.removeTransactionSplit(guid)\n\n // Remove children\n const transactions = [...this.transactions]\n children.forEach((child) => {\n const index = transactions.findIndex((t) => t.guid === child.guid)\n\n if (index >= 0) {\n transactions.splice(index, 1)\n }\n })\n\n // Update parent\n const index = transactions.findIndex((t) => t.guid === guid)\n\n runInAction(() => {\n const transaction = transactions[index]\n if (transaction) {\n transaction.has_been_split = false\n }\n\n if (index >= 0) {\n this.setTransactions([\n ...transactions.slice(0, index),\n transaction,\n ...transactions.slice(index + 1),\n ])\n }\n })\n } catch (error) {\n this.captureError('unSplitTransaction', error)\n }\n }\n\n updateTaggings = async (tagGuids: string[], transactionGuid: string) => {\n try {\n const currentTaggings = this.taggings.filter((t) => t.transaction_guid === transactionGuid)\n\n const currentTagGuids = new Set(currentTaggings.map((t) => t.tag_guid))\n const incomingTagGuids = new Set(tagGuids)\n\n // Add new taggings that don't already exist\n for (const tagGuid of tagGuids) {\n if (!currentTagGuids.has(tagGuid)) {\n await this.addTagging(tagGuid, transactionGuid)\n }\n }\n\n // Remove taggings that are no longer needed\n for (const tagging of currentTaggings) {\n if (!incomingTagGuids.has(tagging.tag_guid)) {\n await this.removeTagging(tagging.guid)\n }\n }\n\n await this.loadTaggings()\n } catch (error) {\n this.captureError('updateTaggings', error)\n }\n }\n\n updateTag = async (tag: Tag) => {\n try {\n await this.api.updateTag(tag)\n await this.loadTags()\n } catch (error) {\n this.captureError('updateTag', error)\n }\n }\n\n /** Resolves `true` when the transaction was saved, `false` when the API call failed. */\n updateTransaction = async (transaction: Transaction): Promise<boolean> => {\n try {\n const updatedTransaction = await this.api.updateTransaction(transaction)\n\n const index = this.transactions.findIndex((t: Transaction) => t.guid === transaction.guid)\n\n if (index >= 0) {\n this.setTransactions([\n ...this.transactions.slice(0, index),\n updatedTransaction,\n ...this.transactions.slice(index + 1),\n ])\n }\n return true\n } catch (error) {\n this.captureError('updateTransaction', error)\n return false\n }\n }\n\n /**\n * Adds the given transactions by guid, fetching only those the store lacks: an insight drawer's\n * own transactions can be older than the date-range cache (pulse's BeatShell loads a legacy beat's\n * the same way). Leaves `cachedStartDate` alone, since the range itself is not loaded.\n */\n loadTransactionsByGuids = async (guids: string[]) => {\n const held = new Set(this.transactions.map((transaction) => transaction.guid))\n const missing = guids.filter((guid) => !held.has(guid))\n if (!missing.length) return\n\n try {\n const loaded: Transaction[] = await this.api.getTransactionsByGuids(missing)\n runInAction(() => {\n this.transactions = loaded.reduce(\n (transactions, transaction) => upsertByGuid(transactions, transaction),\n this.transactions,\n )\n })\n } catch (error) {\n this.captureError('loadTransactionsByGuids', error)\n }\n }\n\n // This is used for loading the transactions list on demand, on clicking the different transactions of the insightful beats.\n loadEmbeddedInstanceTransactions = async (fromDate: Date) => {\n try {\n const transactions = await this.api.getTransactionsByDateRange(\n startOfUtcDay(fromDate),\n endOfUtcDay(startOfToday()),\n )\n this.cachedStartDate = fromDate\n this.transactions = transactions\n } catch (error) {\n this.captureError('loadEmbeddedInstanceTransactions', error)\n }\n }\n\n private captureError = (action: string, error: unknown) =>\n this.globalStore.captureException(error, { store: 'TransactionStore', action })\n}\n\nexport class UiStore {\n beginDate = startOfMonth(new Date())\n endDate = endOfMonth(new Date())\n\n expandedSplits = [] as string[]\n height = 550\n width = 1000\n shouldDisableDrawerScroll = false\n\n searchValue = ''\n selectedAccountGuids = [] as string[]\n\n manualTransaction: Transaction = DEFAULT_TRANSACTION\n isAmountValid = false\n\n showInsights = false\n\n constructor() {\n makeAutoObservable(this)\n }\n\n setDateRange = (beginDate: Date, endDate: Date) => {\n this.beginDate = beginDate\n this.endDate = endDate\n }\n\n setIsAmountValid = (valid: boolean) => (this.isAmountValid = valid)\n\n setSearchValue = (searchValue: string) => (this.searchValue = searchValue)\n\n setSelectedAccountGuids = (accountGuids: string[]) => (this.selectedAccountGuids = accountGuids)\n\n setShouldDisableDrawerScroll = (shouldDisable: boolean) =>\n (this.shouldDisableDrawerScroll = shouldDisable)\n\n setShowInsights = (showInsights: boolean) => {\n this.showInsights = showInsights\n }\n\n setSize = (height: number, width: number) => {\n this.height = height\n this.width = width\n }\n\n toggleSplit = (guid: string) => {\n const expandedSplits = [...this.expandedSplits]\n const index = this.expandedSplits.findIndex((splitGuid) => splitGuid === guid)\n\n if (index >= 0) {\n expandedSplits.splice(index, 1)\n } else {\n expandedSplits.push(guid)\n }\n\n this.expandedSplits = expandedSplits\n }\n\n clearExpandedSplits = () => {\n if (this.expandedSplits.length === 0) return\n this.expandedSplits = []\n }\n\n updateManualTransaction = (manualTransaction: Transaction) => {\n this.manualTransaction = manualTransaction\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAgCA,IAAa,IAAb,MAA8B;AAAA,EAC5B;AAAA,EACA;AAAA,EACA,MAAM,IAAI,EAAe,KAAK,EAAE;AAAA,EAChC,UAAU,IAAI,EAAQ,KAAK,EAAE;AAAA,EAE7B,kBAA0B,CAAC;AAAA,EAC3B,wBAAiC;AAAA,EACjC,yBAAkC;AAAA,EAClC,eAA8B,CAAC;AAAA,EAC/B,qBAA8B;AAAA,EAC9B,sBAA+B;AAAA,EAC/B,WAAsB,CAAC;AAAA,EACvB,iBAA0B;AAAA,EAC1B,kBA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AAK,SAAS,GACd,KAAK,QAAQ;AAAA,EACf;AAAA,EAEA,cAAA,CAAe,MAAiB;AAC9B,UAAM,IAAiB,CAAC,GAAG,KAAK,cAAc,GACxC,IAAQ,KAAK,eAAe,UAAA,CAAW,MAAc,MAAc,CAAI;AAE7E,IAAI,KAAS,IACX,EAAe,OAAO,GAAO,CAAC,IAE9B,EAAe,KAAK,CAAI,GAG1B,KAAK,iBAAiB;AAAA,EACxB;AAAA,EAEA,sBAAA,MAA4B;AAC1B,IAAI,KAAK,eAAe,WAAW,MACnC,KAAK,iBAAiB,CAAC;AAAA,EACzB;AAAA,EAEA,0BAAA,CAA2B,MAAmC;AAC5D,SAAK,oBAAoB;AAAA,EAC3B;AACF"}
|
|
@@ -135,8 +135,9 @@ export interface MerchantBlockData {
|
|
|
135
135
|
merchant_name?: string;
|
|
136
136
|
logo?: LogoRef;
|
|
137
137
|
amount?: number;
|
|
138
|
-
/** Pre-localized eyebrow
|
|
138
|
+
/** Pre-localized eyebrow; ditto sends `header_text`. */
|
|
139
139
|
date?: string;
|
|
140
|
+
header_text?: string;
|
|
140
141
|
status_text?: string;
|
|
141
142
|
logos?: LogoRef[];
|
|
142
143
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsightsInstanceSlotData.es.js","names":[],"sources":["../../../src/core/types/InsightsInstanceSlotData.ts"],"sourcesContent":["import type { DataSeries, Legends, LogoRef } from '../../core'\n\nexport interface InsightsInstanceSlotData\n extends\n Partial<BudgetBlockData>,\n Partial<DonutChartBlockData>,\n Partial<ImageBlockData>,\n Partial<AccountBlockData>,\n Partial<SaveExtraBlockData>,\n Partial<StepChartBlockData>,\n Partial<SVGImageBlockData>,\n Partial<AccountSwitchBlockData>,\n Partial<TransactionDetailsBlockData>,\n Partial<CreditUtilizationBlockData>,\n Partial<MerchantBlockData>,\n Partial<CommonProps> {}\n\n//when any of the type is used more than one times, we can use the common props\ninterface CommonProps {\n amount?: number\n ariaLabel?: string\n date?: string\n legends?: Legends[]\n category_guid?: string\n data_series?: DataSeries | DataSet[]\n transaction_guids?: string[]\n account_guids?: string[]\n primary_transaction_guid?: string\n}\n\n//BarChart Block: `instance_slot.data` (Insights 2.0)\nexport interface BarChartBlockData {\n series?: DataSeries\n category_guid?: string\n average_amount?: number\n /** [0] monthly amount, [1] trend. */\n additional_data?: Legends[]\n}\n\n//DonutChart Block\ninterface Main {\n value: string\n value_type: string\n label: string\n}\nexport interface DonutChartBlockData {\n main: Main\n}\n\n//DoubleBarChart Block\n// TODO : This has to be revisited again to update the below types based on API response once we have the final shape of the data_series for double bar chart from BE\nexport interface LegendProps extends Legends {\n amount: number\n formattedAmount: string\n label: string\n color?: string\n}\n\nexport interface DataSet extends DataSeries {\n ariaLabelComparison: string\n ariaLabelMain: string\n comparison: number\n // The comparison bar's transaction guids (data_series aggregated_guids), for the drawer filter.\n comparisonGuids?: string[]\n // The month's 'yyyy-MM-dd' date (the main row's).\n date?: string\n formattedComparison: string\n formattedMain: string\n label: string\n main: number\n // The main bar's transaction guids (data_series aggregated_guids), for the drawer filter.\n mainGuids?: string[]\n}\n\n//DoubleProgressBar Block\n\n//Image Block\nexport interface ImageBlockData {\n image: string\n}\n\n//Account Block\nexport interface AccountBlockData {\n sub_text: string\n institution_guid?: string\n institution_name?: string\n icon_name?: string\n /** Header bar text (standard card), or the colored category strip label (deposit cards). */\n header_text?: string\n // Deposit variants (Unified Deposit, Unified Deposit Emergency Fund, Savings Account Deposit)\n /** Merchant guid — renders a real merchant logo in the deposit card when present. */\n merchant_guid?: string\n /** Merchant display name — logo alt text and the payer line under the amount. */\n merchant_name?: string\n /** Secondary label beside the amount, e.g. `On {date}, you saved` or `Balance as of MM/DD/YY`. */\n label?: string\n}\n\nexport interface SaveExtraBlockData {\n /** Styled segments `[lead-in, amount digits, trailing copy]`, e.g. `['Save an extra', '100', 'to help your funds grow']`. */\n primary_text?: string[]\n /** Styled segments `[projected balance, caption]`, e.g. `['$8,313.87', 'After payday & projected expenses']`. */\n secondary_text?: string[]\n /** MakeTransfer drilldown: available balance (both variants). */\n available_balance?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: average monthly spend. */\n avg_monthly_spend?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: how long the balance lasts, overlaid on the timeline SVG (e.g. \"2 months, 11 days\"). */\n time_period?: string\n /** SAVE_AN_EXTRA_100: upcoming expenses (the \"Expenses\" figure). */\n upcoming_expenses?: number\n /** SAVE_AN_EXTRA_100: total remaining after expenses. */\n total_remaining?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: date for the \"Your available balances as of {date}\" line. */\n date?: string\n}\n\n// AccountSwitch Block. State comes from `instance_slot.variant`, not a data flag.\nexport interface AccountSwitchBlockData {\n discovered_institution_guid: string\n discovered_institution_name: string\n held_institution_guid: string\n held_institution_name: string\n}\n\n// AccountSwitch Block: `instance_slot.data` (Insights 2.0, Discovered Accounts V2). Each slot is\n// optional: tupac omits `to_logo` when the user holds no FI-managed account. `logo` is the compact\n// card's (micro, notification) discovered institution.\nexport interface AccountSwitchBlockV2Data {\n from_logo?: LogoRef\n to_logo?: LogoRef\n logo?: LogoRef\n}\n\n// StepChart Block\nexport interface StepChartBlockData {\n completed_steps: number\n label_1: string\n label_2?: string\n}\n\n//Budgets Blocks\nexport enum BudgetTierType {\n LOW_BUDGET_TIER = 'LOW',\n MEDIUM_BUDGET_TIER = 'MEDIUM',\n OFF_TRACK_BUDGET_TIER = 'OFF_TRACK',\n}\n\nexport type BudgetTierValue = `${BudgetTierType}`\n\nexport interface BudgetLocalizedPayload {\n primary_text?: string\n amount_left_label?: string\n spent_label?: string\n budgeted_label?: string\n}\n\nexport interface BudgetBlockData {\n budget_percent: number\n budget_tier: BudgetTierValue\n category_guid?: string\n merchant_guid?: string\n spent_amount: number\n budgeted_amount: number\n localized_payload: BudgetLocalizedPayload\n}\n\nexport interface SVGImageBlockData {\n isCIBC?: boolean\n}\n\n// TransactionDetails Action Block\n// The drawer's subject is `InsightsPayload.primary_transaction_guid`; only action configuration\n// lives here.\nexport interface TransactionDetailsBlockData {\n /** `TopActions` member names, e.g. `['Category', 'Date', 'Memo']`. Omit for the defaults. */\n top_actions?: string[]\n /** `BottomActions` member names, e.g. `['MerchantBudget', 'HideTransaction']`. Omit for defaults. */\n bottom_actions?: string[]\n}\n\n// Credit Utilization action block. The per-card rows are the beat's `data_series` table\n// (`guid`, `label`, `amount`, `total_amount`, `percentage`), carried on `CommonProps.data_series`.\nexport interface CreditUtilizationBlockData {\n accounts_balance_sum?: number\n accounts_credit_limit_sum?: number\n credit_utilization_percentage?: number\n}\n\n// Merchant block
|
|
1
|
+
{"version":3,"file":"InsightsInstanceSlotData.es.js","names":[],"sources":["../../../src/core/types/InsightsInstanceSlotData.ts"],"sourcesContent":["import type { DataSeries, Legends, LogoRef } from '../../core'\n\nexport interface InsightsInstanceSlotData\n extends\n Partial<BudgetBlockData>,\n Partial<DonutChartBlockData>,\n Partial<ImageBlockData>,\n Partial<AccountBlockData>,\n Partial<SaveExtraBlockData>,\n Partial<StepChartBlockData>,\n Partial<SVGImageBlockData>,\n Partial<AccountSwitchBlockData>,\n Partial<TransactionDetailsBlockData>,\n Partial<CreditUtilizationBlockData>,\n Partial<MerchantBlockData>,\n Partial<CommonProps> {}\n\n//when any of the type is used more than one times, we can use the common props\ninterface CommonProps {\n amount?: number\n ariaLabel?: string\n date?: string\n legends?: Legends[]\n category_guid?: string\n data_series?: DataSeries | DataSet[]\n transaction_guids?: string[]\n account_guids?: string[]\n primary_transaction_guid?: string\n}\n\n//BarChart Block: `instance_slot.data` (Insights 2.0)\nexport interface BarChartBlockData {\n series?: DataSeries\n category_guid?: string\n average_amount?: number\n /** [0] monthly amount, [1] trend. */\n additional_data?: Legends[]\n}\n\n//DonutChart Block\ninterface Main {\n value: string\n value_type: string\n label: string\n}\nexport interface DonutChartBlockData {\n main: Main\n}\n\n//DoubleBarChart Block\n// TODO : This has to be revisited again to update the below types based on API response once we have the final shape of the data_series for double bar chart from BE\nexport interface LegendProps extends Legends {\n amount: number\n formattedAmount: string\n label: string\n color?: string\n}\n\nexport interface DataSet extends DataSeries {\n ariaLabelComparison: string\n ariaLabelMain: string\n comparison: number\n // The comparison bar's transaction guids (data_series aggregated_guids), for the drawer filter.\n comparisonGuids?: string[]\n // The month's 'yyyy-MM-dd' date (the main row's).\n date?: string\n formattedComparison: string\n formattedMain: string\n label: string\n main: number\n // The main bar's transaction guids (data_series aggregated_guids), for the drawer filter.\n mainGuids?: string[]\n}\n\n//DoubleProgressBar Block\n\n//Image Block\nexport interface ImageBlockData {\n image: string\n}\n\n//Account Block\nexport interface AccountBlockData {\n sub_text: string\n institution_guid?: string\n institution_name?: string\n icon_name?: string\n /** Header bar text (standard card), or the colored category strip label (deposit cards). */\n header_text?: string\n // Deposit variants (Unified Deposit, Unified Deposit Emergency Fund, Savings Account Deposit)\n /** Merchant guid — renders a real merchant logo in the deposit card when present. */\n merchant_guid?: string\n /** Merchant display name — logo alt text and the payer line under the amount. */\n merchant_name?: string\n /** Secondary label beside the amount, e.g. `On {date}, you saved` or `Balance as of MM/DD/YY`. */\n label?: string\n}\n\nexport interface SaveExtraBlockData {\n /** Styled segments `[lead-in, amount digits, trailing copy]`, e.g. `['Save an extra', '100', 'to help your funds grow']`. */\n primary_text?: string[]\n /** Styled segments `[projected balance, caption]`, e.g. `['$8,313.87', 'After payday & projected expenses']`. */\n secondary_text?: string[]\n /** MakeTransfer drilldown: available balance (both variants). */\n available_balance?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: average monthly spend. */\n avg_monthly_spend?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: how long the balance lasts, overlaid on the timeline SVG (e.g. \"2 months, 11 days\"). */\n time_period?: string\n /** SAVE_AN_EXTRA_100: upcoming expenses (the \"Expenses\" figure). */\n upcoming_expenses?: number\n /** SAVE_AN_EXTRA_100: total remaining after expenses. */\n total_remaining?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: date for the \"Your available balances as of {date}\" line. */\n date?: string\n}\n\n// AccountSwitch Block. State comes from `instance_slot.variant`, not a data flag.\nexport interface AccountSwitchBlockData {\n discovered_institution_guid: string\n discovered_institution_name: string\n held_institution_guid: string\n held_institution_name: string\n}\n\n// AccountSwitch Block: `instance_slot.data` (Insights 2.0, Discovered Accounts V2). Each slot is\n// optional: tupac omits `to_logo` when the user holds no FI-managed account. `logo` is the compact\n// card's (micro, notification) discovered institution.\nexport interface AccountSwitchBlockV2Data {\n from_logo?: LogoRef\n to_logo?: LogoRef\n logo?: LogoRef\n}\n\n// StepChart Block\nexport interface StepChartBlockData {\n completed_steps: number\n label_1: string\n label_2?: string\n}\n\n//Budgets Blocks\nexport enum BudgetTierType {\n LOW_BUDGET_TIER = 'LOW',\n MEDIUM_BUDGET_TIER = 'MEDIUM',\n OFF_TRACK_BUDGET_TIER = 'OFF_TRACK',\n}\n\nexport type BudgetTierValue = `${BudgetTierType}`\n\nexport interface BudgetLocalizedPayload {\n primary_text?: string\n amount_left_label?: string\n spent_label?: string\n budgeted_label?: string\n}\n\nexport interface BudgetBlockData {\n budget_percent: number\n budget_tier: BudgetTierValue\n category_guid?: string\n merchant_guid?: string\n spent_amount: number\n budgeted_amount: number\n localized_payload: BudgetLocalizedPayload\n}\n\nexport interface SVGImageBlockData {\n isCIBC?: boolean\n}\n\n// TransactionDetails Action Block\n// The drawer's subject is `InsightsPayload.primary_transaction_guid`; only action configuration\n// lives here.\nexport interface TransactionDetailsBlockData {\n /** `TopActions` member names, e.g. `['Category', 'Date', 'Memo']`. Omit for the defaults. */\n top_actions?: string[]\n /** `BottomActions` member names, e.g. `['MerchantBudget', 'HideTransaction']`. Omit for defaults. */\n bottom_actions?: string[]\n}\n\n// Credit Utilization action block. The per-card rows are the beat's `data_series` table\n// (`guid`, `label`, `amount`, `total_amount`, `percentage`), carried on `CommonProps.data_series`.\nexport interface CreditUtilizationBlockData {\n accounts_balance_sum?: number\n accounts_credit_limit_sum?: number\n credit_utilization_percentage?: number\n}\n\n// Merchant block `instance_slot.data`; `primary_text` is ditto's name.\nexport interface MerchantBlockData {\n merchant_name?: string\n logo?: LogoRef\n amount?: number\n /** Pre-localized eyebrow; ditto sends `header_text`. */\n date?: string\n header_text?: string\n status_text?: string\n logos?: LogoRef[]\n}\n"],"mappings":"AA8IA,IAAY,IAAL,0BAAA,GAAA;AACL,SAAA,EAAA,kBAAA,OACA,EAAA,qBAAA,UACA,EAAA,wBAAA;AACF,GAAA,CAAA,CAAA"}
|
|
@@ -16,6 +16,8 @@ interface GeneralInsightsFeedCopy {
|
|
|
16
16
|
new_information_available: string;
|
|
17
17
|
tip_section_message: string;
|
|
18
18
|
tip_section_title: string;
|
|
19
|
+
/** Heads Upcoming Bill's projected-bill row in its drawer (legacy pulse's "PROJECTED AMOUNT"). */
|
|
20
|
+
projected_amount?: string;
|
|
19
21
|
transaction_history_title: string;
|
|
20
22
|
transaction_details_title: string;
|
|
21
23
|
/**
|
|
@@ -108,6 +110,12 @@ export interface TransactionHistoryBlock {
|
|
|
108
110
|
cost_living_to_income_drawer_title: string;
|
|
109
111
|
non_essential_category_summary_drawer_title: string;
|
|
110
112
|
monthly_deposit_summary_drawer_title: string;
|
|
113
|
+
/**
|
|
114
|
+
* The Upcoming Bill drawer's tip: `_1{tip}` the bold tip title, `_2{merchant}` the merchant and
|
|
115
|
+
* `_3{date}` the due date. Optional: until the localized-content service ships it (mrs_content
|
|
116
|
+
* 5.7.29), the drawer shows no tip.
|
|
117
|
+
*/
|
|
118
|
+
upcoming_bill_tip_message?: string;
|
|
111
119
|
}
|
|
112
120
|
export interface HiddenConfirmationCopy {
|
|
113
121
|
title: string;
|
|
@@ -20,8 +20,12 @@ interface TransactionDrillDownProps {
|
|
|
20
20
|
transactionFilter?: (selectedIndex: number) => (transaction: Transaction) => boolean;
|
|
21
21
|
baseTransactions?: Transaction[];
|
|
22
22
|
subTabs?: Omit<SubTabsProps, 'id'>;
|
|
23
|
+
projectedRow?: {
|
|
24
|
+
heading: string;
|
|
25
|
+
transaction: Transaction;
|
|
26
|
+
};
|
|
23
27
|
}
|
|
24
|
-
export declare const TransactionDrillDown: (({ ariaLabel, heading, subHeadingText, icon, tabs, selectedIndex, top, onSelectionChange, transactionFilter, tipSection, onEachRowClick, baseTransactions, subTabs, }: TransactionDrillDownProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
28
|
+
export declare const TransactionDrillDown: (({ ariaLabel, heading, subHeadingText, icon, tabs, selectedIndex, top, onSelectionChange, transactionFilter, tipSection, onEachRowClick, baseTransactions, subTabs, projectedRow, }: TransactionDrillDownProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
25
29
|
displayName: string;
|
|
26
30
|
};
|
|
27
31
|
export default TransactionDrillDown;
|