@mx-cartographer/experiences 9.7.104 → 9.7.105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## [9.7.105] - 11-04-2026
|
|
2
|
+
|
|
3
|
+
- **REMOVED** - Unused dead code from the account filter utilities (MEW-4188)
|
|
4
|
+
|
|
1
5
|
## [9.7.104] - 11-04-2026
|
|
2
6
|
|
|
3
7
|
- **ADDED** - `weekly_small_purchases_block` for the Weekly Small Purchases Summary beat on Insights 2.0 (MEW2-3412): the total and up to 6 merchant logo tiles, the last one a "+N" when there are more
|
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
import { GlobalStore } from '../../core/stores/GlobalStore';
|
|
2
1
|
import { Account } from '../../core';
|
|
3
|
-
export interface MappedAccounts {
|
|
4
|
-
[key: string]: MappedAccount[];
|
|
5
|
-
}
|
|
6
|
-
export interface MappedAccount {
|
|
7
|
-
accountNumber: string;
|
|
8
|
-
name: string;
|
|
9
|
-
guid: string;
|
|
10
|
-
}
|
|
11
|
-
export interface MappedOptions {
|
|
12
|
-
[key: string]: boolean;
|
|
13
|
-
}
|
|
14
|
-
export declare const setupMappedSelectedOptions: (accounts: Account[], selectedAccountGuids: string[]) => MappedOptions;
|
|
15
|
-
export declare const setupMappedAccounts: (accounts: Account[], closeContentCopy: string, globalStore?: GlobalStore) => MappedAccounts;
|
|
16
2
|
export declare function categorizeAccounts(accounts: Account[]): {
|
|
17
3
|
heldAccounts: Account[];
|
|
18
4
|
externalAccounts: Account[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountFilter.es.js","names":[],"sources":["../../../src/common/utils/AccountFilter.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"AccountFilter.es.js","names":[],"sources":["../../../src/common/utils/AccountFilter.ts"],"sourcesContent":["import type { Account } from '../../core'\nimport { AccountType } from '../../core'\n\nexport function categorizeAccounts(accounts: Account[]): {\n heldAccounts: Account[]\n externalAccounts: Account[]\n} {\n const { heldAccounts, externalAccounts } = accounts.reduce(\n (acc, account) => {\n if (account.member_is_managed_by_user) acc.externalAccounts.push(account)\n else acc.heldAccounts.push(account)\n return acc\n },\n { heldAccounts: [] as Account[], externalAccounts: [] as Account[] },\n )\n\n return {\n heldAccounts: sortByTypePriority(heldAccounts),\n externalAccounts: sortByTypePriority(externalAccounts),\n }\n}\n\nexport function getDisplayAccounts(accounts: Account[], maxAccounts: number): Account[] {\n const { heldAccounts, externalAccounts } = categorizeAccounts(accounts)\n\n const result = heldAccounts.slice(0, maxAccounts)\n\n if (result.length < maxAccounts) {\n result.push(...externalAccounts.slice(0, maxAccounts - result.length))\n }\n\n return result\n}\n\nconst priorityMap: { [key in AccountType]?: number } = {\n [AccountType.CHECKING]: 1,\n [AccountType.SAVINGS]: 2,\n [AccountType.CREDIT_CARD]: 3,\n}\n\nconst getPriority = (accountType: AccountType) => {\n return priorityMap[accountType] ?? accountType + 100\n}\n\nconst sortByTypePriority = (list: Account[]) => {\n return list.sort((a, b) => {\n const aPriority = getPriority(a.account_type)\n const bPriority = getPriority(b.account_type)\n const priorityDiff = aPriority - bPriority\n\n if (priorityDiff !== 0) return priorityDiff\n\n const aName = a.name ?? a.feed_name ?? ''\n const bName = b.name ?? b.feed_name ?? ''\n return aName.localeCompare(bName)\n })\n}\n"],"mappings":";AAGA,SAAgB,EAAmB,GAGjC;AACA,QAAM,EAAE,cAAA,GAAc,kBAAA,EAAA,IAAqB,EAAS,OAAA,CACjD,GAAK,OACA,EAAQ,4BAA2B,EAAI,iBAAiB,KAAK,CAAO,IACnE,EAAI,aAAa,KAAK,CAAO,GAC3B,IAET;AAAA,IAAE,cAAc,CAAC;AAAA,IAAgB,kBAAkB,CAAC;AAAA,EAAe,CACrE;AAEA,SAAO;AAAA,IACL,cAAc,EAAmB,CAAY;AAAA,IAC7C,kBAAkB,EAAmB,CAAgB;AAAA,EACvD;AACF;AAEA,SAAgB,EAAmB,GAAqB,GAAgC;AACtF,QAAM,EAAE,cAAA,GAAc,kBAAA,EAAA,IAAqB,EAAmB,CAAQ,GAEhE,IAAS,EAAa,MAAM,GAAG,CAAW;AAEhD,SAAI,EAAO,SAAS,KAClB,EAAO,KAAK,GAAG,EAAiB,MAAM,GAAG,IAAc,EAAO,MAAM,CAAC,GAGhE;AACT;AAEA,IAAM,IAAiD;AAAA,EACpD,CAAA,EAAY,QAAA,GAAW;AAAA,EACvB,CAAA,EAAY,OAAA,GAAU;AAAA,EACtB,CAAA,EAAY,WAAA,GAAc;AAC7B,GAEM,IAAA,CAAe,MACZ,EAAY,CAAA,KAAgB,IAAc,KAG7C,IAAA,CAAsB,MACnB,EAAK,KAAA,CAAM,GAAG,MAAM;AAGzB,QAAM,IAFY,EAAY,EAAE,YAEX,IADH,EAAY,EAAE,YACC;AAEjC,MAAI,MAAiB,EAAG,QAAO;AAE/B,QAAM,IAAQ,EAAE,QAAQ,EAAE,aAAa,IACjC,IAAQ,EAAE,QAAQ,EAAE,aAAa;AACvC,SAAO,EAAM,cAAc,CAAK;AAClC,CAAC"}
|