@mx-cartographer/experiences 9.4.14 → 9.4.16
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 +20 -0
- package/dist/core/types/Insights.d.ts +14 -14
- package/dist/core/types/InsightsInstanceSlotData.d.ts +5 -1
- package/dist/core/types/InsightsInstanceSlotData.es.js.map +1 -1
- package/dist/core/types/localization/InsightsFeedCopy.d.ts +21 -0
- package/dist/core/types/localization/index.d.ts +1 -1
- package/dist/insights-v2/CommonUtils.d.ts +2 -0
- package/dist/insights-v2/CommonUtils.es.js +8 -3
- package/dist/insights-v2/CommonUtils.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.d.ts +22 -0
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js +108 -0
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.d.ts +8 -0
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js +89 -0
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.d.ts +68 -0
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js +118 -0
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistory.d.ts +15 -0
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistory.es.js +20 -0
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistory.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.d.ts +64 -0
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.es.js +67 -0
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.es.js.map +1 -0
- package/dist/insights-v2/beatActions.d.ts +30 -0
- package/dist/insights-v2/beatActions.es.js +12 -0
- package/dist/insights-v2/beatActions.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/layout.d.ts +2 -2
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/layout.es.js +2 -2
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/utils.d.ts +14 -3
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/utils.es.js +26 -25
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/utils.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js +3 -3
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js.map +1 -1
- package/dist/insights-v2/components/BaseLayout.d.ts +5 -1
- package/dist/insights-v2/components/BaseLayout.es.js +68 -64
- package/dist/insights-v2/components/BaseLayout.es.js.map +1 -1
- package/dist/insights-v2/components/Header.es.js +23 -33
- package/dist/insights-v2/components/Header.es.js.map +1 -1
- package/dist/insights-v2/components/InsightOptionsMenu.d.ts +10 -0
- package/dist/insights-v2/components/InsightOptionsMenu.es.js +54 -0
- package/dist/insights-v2/components/InsightOptionsMenu.es.js.map +1 -0
- package/dist/insights-v2/components/OverflowMenu.d.ts +32 -0
- package/dist/insights-v2/components/OverflowMenu.es.js +73 -0
- package/dist/insights-v2/components/OverflowMenu.es.js.map +1 -0
- package/dist/insights-v2/index.d.ts +3 -0
- package/dist/insights-v2/index.es.js +51 -45
- package/dist/insights-v2/mappings/blocks.es.js +45 -38
- package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,61 +2,68 @@ import { BarchartBlock as e } from "../blocks/ChartBlocks/BarchartBlock/Barchart
|
|
|
2
2
|
import { DoubleBarChartBlock as a } from "../blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js";
|
|
3
3
|
import c from "../blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
|
|
4
4
|
import l from "../blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import i from "../blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
|
|
6
|
+
import m from "../blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
|
|
7
7
|
import n from "../blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js";
|
|
8
8
|
import { BudgetBlock as k } from "../blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
|
|
9
|
-
import
|
|
10
|
-
import { CategoryTransactionsBlock as
|
|
11
|
-
import
|
|
12
|
-
import { SVGImageBlock as
|
|
13
|
-
import { PlaceholderActionBlock as
|
|
14
|
-
import { getMakeTransferDrawerTitle as
|
|
15
|
-
import { MakeTransferActionBlockLayer as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
import s from "../blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
|
|
10
|
+
import { CategoryTransactionsBlock as p } from "../blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
|
|
11
|
+
import _ from "../blocks/ImageBlocks/ImageBlock.es.js";
|
|
12
|
+
import { SVGImageBlock as B } from "../blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
|
|
13
|
+
import { PlaceholderActionBlock as f } from "../actionBlocks/PlaceholderActionBlock.es.js";
|
|
14
|
+
import { getMakeTransferDrawerTitle as b } from "../actionBlocks/MakeTransferActionBlock/layout.es.js";
|
|
15
|
+
import { MakeTransferActionBlockLayer as u } from "../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js";
|
|
16
|
+
import { getDrawerHeaderTitle as h } from "../actionBlocks/TransactionHistoryBlock/utils.es.js";
|
|
17
|
+
import { TransactionHistoryBlock as g } from "../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js";
|
|
18
|
+
import { TransactionDetailsBlock as d } from "../actionBlocks/TransactionDetailsBlock/TransactionDetailsBlock.es.js";
|
|
19
|
+
import { useTransactionDetailsPrepare as D } from "../actionBlocks/TransactionDetailsBlock/useTransactionDetailsPrepare.es.js";
|
|
20
|
+
var o = (r) => {
|
|
21
|
+
}, C = /* @__PURE__ */ new Set([
|
|
20
22
|
"",
|
|
21
23
|
"null",
|
|
22
24
|
"undefined"
|
|
23
|
-
]),
|
|
24
|
-
const
|
|
25
|
-
return !!
|
|
26
|
-
},
|
|
25
|
+
]), U = (r) => {
|
|
26
|
+
const t = r?.trim().toLowerCase();
|
|
27
|
+
return !!t && !C.has(t);
|
|
28
|
+
}, j = {
|
|
27
29
|
PlaceholderActionBlock: {
|
|
28
|
-
Component:
|
|
29
|
-
usePrepare:
|
|
30
|
+
Component: f,
|
|
31
|
+
usePrepare: o,
|
|
30
32
|
title: () => "Action Block Layer Drilldown"
|
|
31
33
|
},
|
|
32
34
|
make_transfer: {
|
|
33
|
-
Component:
|
|
34
|
-
usePrepare:
|
|
35
|
+
Component: u,
|
|
36
|
+
usePrepare: o,
|
|
37
|
+
title: b
|
|
38
|
+
},
|
|
39
|
+
transaction_history_block: {
|
|
40
|
+
Component: g,
|
|
41
|
+
usePrepare: o,
|
|
35
42
|
title: h
|
|
36
43
|
},
|
|
37
44
|
TransactionDetailsBlock: {
|
|
38
|
-
Component:
|
|
39
|
-
usePrepare:
|
|
45
|
+
Component: d,
|
|
46
|
+
usePrepare: D,
|
|
40
47
|
title: () => "Transaction Details"
|
|
41
48
|
}
|
|
42
|
-
},
|
|
43
|
-
|
|
49
|
+
}, q = {
|
|
50
|
+
account_block: m,
|
|
44
51
|
account_switch_block: n,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
save_extra_block:
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
bar_chart_block: e,
|
|
53
|
+
budget_block: k,
|
|
54
|
+
category_transactions_block: p,
|
|
55
|
+
donut_chart_block: l,
|
|
56
|
+
double_bar_chart_block: a,
|
|
57
|
+
double_progress_bar_block: i,
|
|
58
|
+
image_block: _,
|
|
59
|
+
save_extra_block: s,
|
|
60
|
+
step_chart_block: c,
|
|
61
|
+
svg_image_block: B
|
|
55
62
|
};
|
|
56
63
|
export {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
64
|
+
j as actionBlocks,
|
|
65
|
+
q as blocks,
|
|
66
|
+
U as hasDrawerBlock
|
|
60
67
|
};
|
|
61
68
|
|
|
62
69
|
//# sourceMappingURL=blocks.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blocks.es.js","names":[],"sources":["../../../src/insights-v2/mappings/blocks.ts"],"sourcesContent":["import {\n AccountBlock,\n AccountSwitchBlock,\n BarchartBlock,\n BudgetBlock,\n CategoryTransactionsBlock,\n DonutChartBlock,\n DoubleBarChartBlock,\n DoubleProgressBarBlock,\n SaveExtraBlock,\n SVGImageBlock,\n} from '../blocks'\nimport StepChartBlock from '../blocks/ChartBlocks/StepChartBlock'\nimport ImageBlock from '../blocks/ImageBlocks/ImageBlock'\n\nimport type { Beat, GlobalCopy, InsightsPayload } from '../../core'\nimport { PlaceholderActionBlock } from '../actionBlocks/PlaceholderActionBlock'\nimport { MakeTransferActionBlockLayer } from '../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer'\nimport { getMakeTransferDrawerTitle } from '../actionBlocks/MakeTransferActionBlock/layout'\nimport {\n TransactionDetailsBlock,\n useTransactionDetailsPrepare,\n} from '../actionBlocks/TransactionDetailsBlock'\n\n// Drilldown indexes are not passed down: action blocks read them from\n// InsightsV2Store (useInsightsV2Store().actionDrawer).\nexport interface ActionBlockProps {\n beat: Beat\n}\n\nconst noop = (_: ActionBlockProps) => {}\n\n// A CTA opens a drawer only when it carries a real `block`. The backend may send\n// an empty/absent block (or the literal strings \"null\"/\"undefined\") for CTAs\n// that trigger something else (e.g. a postMessage) instead of a drilldown.\nconst NON_BLOCK_VALUES = new Set(['', 'null', 'undefined'])\nexport const hasDrawerBlock = (block?: string | null): boolean => {\n const normalized = block?.trim().toLowerCase()\n return !!normalized && !NON_BLOCK_VALUES.has(normalized)\n}\n\nexport interface ActionBlockEntry {\n Component: React.ComponentType<ActionBlockProps>\n usePrepare: (props: ActionBlockProps) => void // required; default to noop in each entry\n // Resolves the drawer title from the clicked CTA's variant + copy (e.g.\n // MakeTransfer reads its variant title from layout.ts). Falls back to the CTA label.\n title?: (variant: string | null | undefined, copy: GlobalCopy) => string\n}\n\n// Registry of drawer drilldowns, keyed by the `block` name the backend sends\n// on a beat's CTA. To add one: create a component taking ActionBlockProps,\n// read the clicked indexes from useInsightsV2Store().actionDrawer, and\n// register it here. Add\n// `usePrepare` when the block needs to load data before rendering.\nexport const actionBlocks = {\n PlaceholderActionBlock: {\n Component: PlaceholderActionBlock,\n usePrepare: noop,\n title: () => 'Action Block Layer Drilldown',\n },\n make_transfer: {\n Component: MakeTransferActionBlockLayer,\n usePrepare: noop,\n title: getMakeTransferDrawerTitle,\n },\n TransactionDetailsBlock: {\n Component: TransactionDetailsBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: () => 'Transaction Details',\n },\n} as Record<string, ActionBlockEntry>\n\nexport const blocks = {\n
|
|
1
|
+
{"version":3,"file":"blocks.es.js","names":[],"sources":["../../../src/insights-v2/mappings/blocks.ts"],"sourcesContent":["import {\n AccountBlock,\n AccountSwitchBlock,\n BarchartBlock,\n BudgetBlock,\n CategoryTransactionsBlock,\n DonutChartBlock,\n DoubleBarChartBlock,\n DoubleProgressBarBlock,\n SaveExtraBlock,\n SVGImageBlock,\n} from '../blocks'\nimport StepChartBlock from '../blocks/ChartBlocks/StepChartBlock'\nimport ImageBlock from '../blocks/ImageBlocks/ImageBlock'\n\nimport type { Beat, GlobalCopy, InsightsPayload } from '../../core'\nimport { PlaceholderActionBlock } from '../actionBlocks/PlaceholderActionBlock'\nimport { MakeTransferActionBlockLayer } from '../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer'\nimport { getMakeTransferDrawerTitle } from '../actionBlocks/MakeTransferActionBlock/layout'\nimport { TransactionHistoryBlock } from '../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock'\nimport { getDrawerHeaderTitle } from '../actionBlocks/TransactionHistoryBlock/utils'\nimport {\n TransactionDetailsBlock,\n useTransactionDetailsPrepare,\n} from '../actionBlocks/TransactionDetailsBlock'\n\n// Drilldown indexes are not passed down: action blocks read them from\n// InsightsV2Store (useInsightsV2Store().actionDrawer).\nexport interface ActionBlockProps {\n beat: Beat\n}\n\nconst noop = (_: ActionBlockProps) => {}\n\n// A CTA opens a drawer only when it carries a real `block`. The backend may send\n// an empty/absent block (or the literal strings \"null\"/\"undefined\") for CTAs\n// that trigger something else (e.g. a postMessage) instead of a drilldown.\nconst NON_BLOCK_VALUES = new Set(['', 'null', 'undefined'])\nexport const hasDrawerBlock = (block?: string | null): boolean => {\n const normalized = block?.trim().toLowerCase()\n return !!normalized && !NON_BLOCK_VALUES.has(normalized)\n}\n\nexport interface ActionBlockEntry {\n Component: React.ComponentType<ActionBlockProps>\n usePrepare: (props: ActionBlockProps) => void // required; default to noop in each entry\n // Resolves the drawer title from the clicked CTA's variant + copy (e.g.\n // MakeTransfer reads its variant title from layout.ts). Falls back to the CTA label.\n title?: (variant: string | null | undefined, copy: GlobalCopy) => string\n}\n\n// Registry of drawer drilldowns, keyed by the `block` name the backend sends\n// on a beat's CTA. To add one: create a component taking ActionBlockProps,\n// read the clicked indexes from useInsightsV2Store().actionDrawer, and\n// register it here. Add\n// `usePrepare` when the block needs to load data before rendering.\nexport const actionBlocks = {\n PlaceholderActionBlock: {\n Component: PlaceholderActionBlock,\n usePrepare: noop,\n title: () => 'Action Block Layer Drilldown',\n },\n make_transfer: {\n Component: MakeTransferActionBlockLayer,\n usePrepare: noop,\n title: getMakeTransferDrawerTitle,\n },\n transaction_history_block: {\n Component: TransactionHistoryBlock,\n usePrepare: noop,\n title: getDrawerHeaderTitle,\n },\n TransactionDetailsBlock: {\n Component: TransactionDetailsBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: () => 'Transaction Details',\n },\n} as Record<string, ActionBlockEntry>\n\nexport const blocks = {\n account_block: AccountBlock,\n account_switch_block: AccountSwitchBlock,\n bar_chart_block: BarchartBlock,\n budget_block: BudgetBlock,\n category_transactions_block: CategoryTransactionsBlock,\n donut_chart_block: DonutChartBlock,\n double_bar_chart_block: DoubleBarChartBlock,\n double_progress_bar_block: DoubleProgressBarBlock,\n image_block: ImageBlock,\n save_extra_block: SaveExtraBlock,\n step_chart_block: StepChartBlock,\n svg_image_block: SVGImageBlock,\n} as Record<string, React.ComponentType<{ payload: InsightsPayload; beatGuid?: string }>>\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAgCA,IAAM,IAAA,CAAQ,MAAwB;AAAC,GAKjC,IAAmB,oBAAI,IAAI;AAAA,EAAC;AAAA,EAAI;AAAA,EAAQ;AAAW,CAAC,GAC7C,IAAA,CAAkB,MAAmC;AAChE,QAAM,IAAa,GAAO,KAAK,EAAE,YAAY;AAC7C,SAAO,CAAC,CAAC,KAAc,CAAC,EAAiB,IAAI,CAAU;AACzD,GAea,IAAe;AAAA,EAC1B,wBAAwB;AAAA,IACtB,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA,MAAa;AAAA,EACf;AAAA,EACA,eAAe;AAAA,IACb,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAO;AAAA,EACT;AAAA,EACA,2BAA2B;AAAA,IACzB,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAO;AAAA,EACT;AAAA,EACA,yBAAyB;AAAA,IACvB,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA,MAAa;AAAA,EACf;AACF,GAEa,IAAS;AAAA,EACpB,eAAe;AAAA,EACf,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,6BAA6B;AAAA,EAC7B,mBAAmB;AAAA,EACnB,wBAAwB;AAAA,EACxB,2BAA2B;AAAA,EAC3B,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,iBAAiB;AACnB"}
|