@mx-cartographer/experiences 9.4.12-alpha.al1 → 9.4.13
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 +7 -1
- package/dist/common/context/hooks.d.ts +1 -0
- package/dist/common/context/hooks.es.js +18 -17
- package/dist/common/context/hooks.es.js.map +1 -1
- package/dist/common/context/index.d.ts +1 -1
- package/dist/common/index.es.js +130 -129
- package/dist/core/stores/InsightsV2Store.d.ts +24 -7
- package/dist/core/stores/InsightsV2Store.es.js +18 -23
- package/dist/core/stores/InsightsV2Store.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlock.d.ts +4 -27
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlock.es.js +253 -206
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.d.ts +5 -4
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js +12 -20
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/index.d.ts +2 -0
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/layout.d.ts +9 -43
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/layout.es.js +12 -79
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/PlaceholderActionBlock.es.js +35 -13
- package/dist/insights-v2/actionBlocks/PlaceholderActionBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js +17 -13
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/utils.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.es.js +7 -7
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js +17 -13
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/index.d.ts +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js +19 -25
- package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/createVariantBlock.d.ts +29 -0
- package/dist/insights-v2/blocks/createVariantBlock.es.js +13 -0
- package/dist/insights-v2/blocks/createVariantBlock.es.js.map +1 -0
- package/dist/insights-v2/components/chartblocks/BarchartV2.es.js +24 -25
- package/dist/insights-v2/components/chartblocks/BarchartV2.es.js.map +1 -1
- package/dist/insights-v2/components/chartblocks/DoubleBarChart.es.js +18 -19
- package/dist/insights-v2/components/chartblocks/DoubleBarChart.es.js.map +1 -1
- package/dist/insights-v2/index.es.js +52 -50
- package/dist/insights-v2/mappings/blocks.es.js +20 -20
- package/package.json +1 -1
|
@@ -1,228 +1,275 @@
|
|
|
1
|
-
import { buildDynamicCopy as
|
|
2
|
-
import { formatCurrency as
|
|
3
|
-
import { BalanceStepper as
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import { Text as
|
|
8
|
-
import { Icon as
|
|
9
|
-
import { Fragment as
|
|
10
|
-
import { Card as
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
|
|
1
|
+
import { buildDynamicCopy as y } from "../../../core/utils/Localization.es.js";
|
|
2
|
+
import { formatCurrency as d } from "../../../core/utils/NumberFormatting.es.js";
|
|
3
|
+
import { BalanceStepper as S } from "./BalanceStepper.es.js";
|
|
4
|
+
import w from "./SaveEnoughToLiveOnBottomSection.es.js";
|
|
5
|
+
import { toNumber as p, variants as C } from "./layout.es.js";
|
|
6
|
+
import v from "react";
|
|
7
|
+
import { Text as i } from "@mxenabled/mxui";
|
|
8
|
+
import { Icon as E } from "@mxenabled/mx-icons";
|
|
9
|
+
import { Fragment as f, jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
10
|
+
import { Card as I, Divider as A, List as T, ListItem as H, Stack as l } from "@mui/material";
|
|
11
|
+
var N = [
|
|
12
|
+
{
|
|
13
|
+
label: "3 months",
|
|
14
|
+
value: 3
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
label: "6 months",
|
|
18
|
+
value: 6
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: "9 months",
|
|
22
|
+
value: 9
|
|
23
|
+
}
|
|
24
|
+
], O = [
|
|
25
|
+
{
|
|
26
|
+
label: "1 month",
|
|
27
|
+
value: 1
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
label: "3 months",
|
|
31
|
+
value: 3
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
label: "6 months",
|
|
35
|
+
value: 6
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
label: "9 months",
|
|
39
|
+
value: 9
|
|
40
|
+
}
|
|
41
|
+
], W = ({ copy: o, leading: r }) => /* @__PURE__ */ a(l, {
|
|
42
|
+
sx: {
|
|
43
|
+
bgcolor: "background.paper",
|
|
44
|
+
p: 24,
|
|
45
|
+
borderBottom: "1px solid",
|
|
46
|
+
borderColor: "divider"
|
|
47
|
+
},
|
|
48
|
+
children: [r, /* @__PURE__ */ a(l, {
|
|
49
|
+
sx: { gap: 8 },
|
|
50
|
+
children: [/* @__PURE__ */ e(i, {
|
|
51
|
+
variant: "h3",
|
|
52
|
+
children: o.header_content
|
|
53
|
+
}), /* @__PURE__ */ e(i, {
|
|
54
|
+
sx: { lineHeight: "24px" },
|
|
55
|
+
truncate: !1,
|
|
56
|
+
variant: "body1",
|
|
57
|
+
children: o.description
|
|
58
|
+
})]
|
|
59
|
+
})]
|
|
60
|
+
}), j = ({ availableBalances: o, expenses: r, totalRemaining: t, copy: n }) => /* @__PURE__ */ e(l, {
|
|
61
|
+
sx: {
|
|
62
|
+
pt: 24,
|
|
63
|
+
px: 24
|
|
64
|
+
},
|
|
65
|
+
children: /* @__PURE__ */ a(I, {
|
|
66
|
+
sx: {
|
|
67
|
+
px: 16,
|
|
68
|
+
pt: 16,
|
|
69
|
+
pb: 12
|
|
70
|
+
},
|
|
71
|
+
children: [/* @__PURE__ */ a(l, {
|
|
17
72
|
sx: {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
73
|
+
border: 1,
|
|
74
|
+
borderColor: "divider",
|
|
75
|
+
borderRadius: "4px",
|
|
76
|
+
gap: 12,
|
|
77
|
+
flexDirection: "row",
|
|
78
|
+
justifyContent: "space-between",
|
|
79
|
+
alignItems: "center",
|
|
80
|
+
p: 8,
|
|
81
|
+
mb: 12
|
|
22
82
|
},
|
|
23
|
-
children: [
|
|
24
|
-
|
|
25
|
-
leftLabel: i.available_balances_text,
|
|
26
|
-
leftValue: l(c, "0,0.00"),
|
|
27
|
-
rightLabel: i.average_monthly_spend_text,
|
|
28
|
-
rightValue: l(o, "0,0.00"),
|
|
29
|
-
sx: {
|
|
30
|
-
width: "100%",
|
|
31
|
-
mb: 24
|
|
32
|
-
}
|
|
33
|
-
}), /* @__PURE__ */ r(n, {
|
|
34
|
-
sx: { gap: 8 },
|
|
35
|
-
children: [/* @__PURE__ */ t(e, {
|
|
36
|
-
variant: "h3",
|
|
37
|
-
children: i.header_content
|
|
38
|
-
}), /* @__PURE__ */ t(e, {
|
|
39
|
-
sx: { lineHeight: "24px" },
|
|
40
|
-
truncate: !1,
|
|
41
|
-
variant: "body1",
|
|
42
|
-
children: i.description
|
|
43
|
-
})]
|
|
44
|
-
})]
|
|
45
|
-
}),
|
|
46
|
-
a.showRemainingCard && c != null && o != null && /* @__PURE__ */ t(n, {
|
|
47
|
-
sx: {
|
|
48
|
-
pt: 24,
|
|
49
|
-
px: 24
|
|
50
|
-
},
|
|
51
|
-
children: /* @__PURE__ */ r(W, {
|
|
52
|
-
sx: {
|
|
53
|
-
px: 16,
|
|
54
|
-
pt: 16,
|
|
55
|
-
pb: 12
|
|
56
|
-
},
|
|
57
|
-
children: [/* @__PURE__ */ r(n, {
|
|
83
|
+
children: [
|
|
84
|
+
/* @__PURE__ */ a(l, {
|
|
58
85
|
sx: {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
borderRadius: "4px",
|
|
62
|
-
gap: 12,
|
|
63
|
-
flexDirection: "row",
|
|
64
|
-
justifyContent: "space-between",
|
|
65
|
-
alignItems: "center",
|
|
66
|
-
p: 8,
|
|
67
|
-
mb: 12
|
|
86
|
+
width: 155,
|
|
87
|
+
textAlign: "center"
|
|
68
88
|
},
|
|
69
|
-
children: [
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}),
|
|
85
|
-
/* @__PURE__ */ t(L, {
|
|
86
|
-
name: "remove",
|
|
87
|
-
size: 20
|
|
88
|
-
}),
|
|
89
|
-
/* @__PURE__ */ r(n, {
|
|
90
|
-
sx: {
|
|
91
|
-
width: 155,
|
|
92
|
-
textAlign: "center"
|
|
93
|
-
},
|
|
94
|
-
children: [/* @__PURE__ */ t(e, {
|
|
95
|
-
sx: { fontWeight: 600 },
|
|
96
|
-
variant: "body1",
|
|
97
|
-
children: l(o, "0,0.00")
|
|
98
|
-
}), /* @__PURE__ */ t(e, {
|
|
99
|
-
sx: { color: "text.secondary" },
|
|
100
|
-
variant: "caption",
|
|
101
|
-
children: i.expenses_text
|
|
102
|
-
})]
|
|
103
|
-
})
|
|
104
|
-
]
|
|
105
|
-
}), /* @__PURE__ */ r(n, {
|
|
89
|
+
children: [/* @__PURE__ */ e(i, {
|
|
90
|
+
sx: { fontWeight: 600 },
|
|
91
|
+
variant: "body1",
|
|
92
|
+
children: d(o, "0,0.00")
|
|
93
|
+
}), /* @__PURE__ */ e(i, {
|
|
94
|
+
sx: { color: "text.secondary" },
|
|
95
|
+
variant: "caption",
|
|
96
|
+
children: n.available_text
|
|
97
|
+
})]
|
|
98
|
+
}),
|
|
99
|
+
/* @__PURE__ */ e(E, {
|
|
100
|
+
name: "remove",
|
|
101
|
+
size: 20
|
|
102
|
+
}),
|
|
103
|
+
/* @__PURE__ */ a(l, {
|
|
106
104
|
sx: {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
justifyContent: "center",
|
|
110
|
-
alignItems: "center",
|
|
111
|
-
gap: 4
|
|
105
|
+
width: 155,
|
|
106
|
+
textAlign: "center"
|
|
112
107
|
},
|
|
113
|
-
children: [/* @__PURE__ */
|
|
114
|
-
sx: { color: "text.secondary" },
|
|
115
|
-
variant: "body2",
|
|
116
|
-
children: [i.total_remaining_text, ":"]
|
|
117
|
-
}), /* @__PURE__ */ t(e, {
|
|
108
|
+
children: [/* @__PURE__ */ e(i, {
|
|
118
109
|
sx: { fontWeight: 600 },
|
|
119
|
-
variant: "
|
|
120
|
-
children:
|
|
110
|
+
variant: "body1",
|
|
111
|
+
children: d(r, "0,0.00")
|
|
112
|
+
}), /* @__PURE__ */ e(i, {
|
|
113
|
+
sx: { color: "text.secondary" },
|
|
114
|
+
variant: "caption",
|
|
115
|
+
children: n.expenses_text
|
|
121
116
|
})]
|
|
122
|
-
})
|
|
123
|
-
|
|
124
|
-
}),
|
|
125
|
-
/* @__PURE__ */ r(n, {
|
|
117
|
+
})
|
|
118
|
+
]
|
|
119
|
+
}), /* @__PURE__ */ a(l, {
|
|
126
120
|
sx: {
|
|
127
|
-
|
|
128
|
-
|
|
121
|
+
textAlign: "center",
|
|
122
|
+
flexDirection: "row",
|
|
123
|
+
justifyContent: "center",
|
|
124
|
+
alignItems: "center",
|
|
125
|
+
gap: 4
|
|
129
126
|
},
|
|
130
|
-
children: [/* @__PURE__ */
|
|
127
|
+
children: [/* @__PURE__ */ a(i, {
|
|
128
|
+
sx: { color: "text.secondary" },
|
|
129
|
+
variant: "body2",
|
|
130
|
+
children: [n.total_remaining_text, ":"]
|
|
131
|
+
}), /* @__PURE__ */ e(i, {
|
|
131
132
|
sx: { fontWeight: 600 },
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
children: i.body_content
|
|
135
|
-
}), /* @__PURE__ */ t(C, {
|
|
136
|
-
amount: l(f, "0,0.00"),
|
|
137
|
-
copy: i,
|
|
138
|
-
onDecrement: () => d((s) => Math.max(0, s - u)),
|
|
139
|
-
onIncrement: () => d((s) => s + u)
|
|
133
|
+
variant: "body2",
|
|
134
|
+
children: d(t, "0,0.00")
|
|
140
135
|
})]
|
|
141
|
-
})
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
136
|
+
})]
|
|
137
|
+
})
|
|
138
|
+
}), k = ({ availableBalances: o, date: r, copy: t }) => /* @__PURE__ */ a(l, {
|
|
139
|
+
sx: {
|
|
140
|
+
pt: 6,
|
|
141
|
+
pb: 14,
|
|
142
|
+
px: 24,
|
|
143
|
+
textAlign: "right",
|
|
144
|
+
gap: 4
|
|
145
|
+
},
|
|
146
|
+
children: [/* @__PURE__ */ e(i, {
|
|
147
|
+
truncate: !1,
|
|
148
|
+
variant: "h3",
|
|
149
|
+
children: d(o, "0,0.00")
|
|
150
|
+
}), r && /* @__PURE__ */ e(i, {
|
|
151
|
+
sx: {
|
|
152
|
+
color: "text.secondary",
|
|
153
|
+
fontWeight: 400
|
|
154
|
+
},
|
|
155
|
+
truncate: !1,
|
|
156
|
+
variant: "subtitle2",
|
|
157
|
+
children: y(t.your_available_balances_text, r)
|
|
158
|
+
})]
|
|
159
|
+
}), L = ({ bodyContent: o, bodyDescription: r, monthsTable: t, deltaAmount: n, initialAmount: s, seedAmount: c, copy: m }) => {
|
|
160
|
+
const [b, h] = v.useState(s ?? c ?? 0);
|
|
161
|
+
v.useEffect(() => {
|
|
162
|
+
s == null && c != null && h(c);
|
|
163
|
+
}, [s, c]);
|
|
164
|
+
const g = t.length - 1;
|
|
165
|
+
return /* @__PURE__ */ a(f, { children: [/* @__PURE__ */ a(l, {
|
|
166
|
+
sx: {
|
|
167
|
+
p: 24,
|
|
168
|
+
gap: 8
|
|
169
|
+
},
|
|
170
|
+
children: [/* @__PURE__ */ e(i, {
|
|
171
|
+
sx: { fontWeight: 600 },
|
|
172
|
+
truncate: !1,
|
|
173
|
+
variant: "body1",
|
|
174
|
+
children: o
|
|
175
|
+
}), /* @__PURE__ */ e(S, {
|
|
176
|
+
amount: d(b, "0,0.00"),
|
|
177
|
+
copy: m,
|
|
178
|
+
onDecrement: () => h((x) => Math.max(0, x - n)),
|
|
179
|
+
onIncrement: () => h((x) => x + n)
|
|
180
|
+
})]
|
|
181
|
+
}), /* @__PURE__ */ a(l, {
|
|
182
|
+
sx: { gap: 8 },
|
|
183
|
+
children: [/* @__PURE__ */ e(i, {
|
|
184
|
+
sx: {
|
|
185
|
+
fontWeight: 600,
|
|
186
|
+
mx: 24
|
|
187
|
+
},
|
|
188
|
+
truncate: !1,
|
|
189
|
+
variant: "body1",
|
|
190
|
+
children: r
|
|
191
|
+
}), /* @__PURE__ */ e(T, {
|
|
192
|
+
sx: {
|
|
193
|
+
bgcolor: "background.paper",
|
|
194
|
+
width: "100%"
|
|
195
|
+
},
|
|
196
|
+
children: t.map(({ label: x, value: u }, _) => /* @__PURE__ */ a(v.Fragment, { children: [/* @__PURE__ */ e(H, {
|
|
197
|
+
disableGutters: !0,
|
|
198
|
+
disablePadding: !0,
|
|
199
|
+
sx: {
|
|
200
|
+
minHeight: 52,
|
|
201
|
+
bgcolor: "background.paper"
|
|
202
|
+
},
|
|
203
|
+
children: /* @__PURE__ */ e(l, {
|
|
204
|
+
sx: { width: "100%" },
|
|
205
|
+
children: /* @__PURE__ */ a(l, {
|
|
210
206
|
sx: {
|
|
211
|
-
|
|
212
|
-
|
|
207
|
+
flexDirection: "row",
|
|
208
|
+
justifyContent: "space-between",
|
|
209
|
+
alignItems: "center",
|
|
210
|
+
width: "100%",
|
|
211
|
+
px: 24,
|
|
212
|
+
py: 8
|
|
213
213
|
},
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
214
|
+
children: [/* @__PURE__ */ e(i, {
|
|
215
|
+
truncate: !1,
|
|
216
|
+
variant: "body1",
|
|
217
|
+
children: x
|
|
218
|
+
}), /* @__PURE__ */ e(i, {
|
|
219
|
+
sx: { fontWeight: 600 },
|
|
220
|
+
truncate: !1,
|
|
221
|
+
variant: "body1",
|
|
222
|
+
children: d(u * b, "0,0")
|
|
223
|
+
})]
|
|
224
|
+
})
|
|
218
225
|
})
|
|
219
|
-
|
|
226
|
+
}), /* @__PURE__ */ e(A, {
|
|
227
|
+
component: "li",
|
|
228
|
+
sx: { ml: _ === g ? 0 : 24 }
|
|
229
|
+
})] }, u))
|
|
230
|
+
})]
|
|
231
|
+
})] });
|
|
232
|
+
}, z = ({ variant: o, slotData: r, copy: t }) => {
|
|
233
|
+
const n = o === C.SAVE_ENOUGH_TO_LIVE_ON, s = r?.available_balance, c = p(r?.avg_monthly_spend), m = p(r?.upcoming_expenses), b = p(r?.total_remaining), h = r?.time_period, g = r?.date;
|
|
234
|
+
return /* @__PURE__ */ a(f, { children: [
|
|
235
|
+
/* @__PURE__ */ e(W, {
|
|
236
|
+
copy: t,
|
|
237
|
+
leading: n && s != null && c != null && h ? /* @__PURE__ */ e(w, {
|
|
238
|
+
content: h,
|
|
239
|
+
leftLabel: t.available_balances_text,
|
|
240
|
+
leftValue: d(s, "0,0.00"),
|
|
241
|
+
rightLabel: t.average_monthly_spend_text,
|
|
242
|
+
rightValue: d(c, "0,0.00"),
|
|
243
|
+
sx: {
|
|
244
|
+
width: "100%",
|
|
245
|
+
mb: 24
|
|
246
|
+
}
|
|
247
|
+
}) : null
|
|
248
|
+
}),
|
|
249
|
+
!n && s != null && m != null && /* @__PURE__ */ e(j, {
|
|
250
|
+
availableBalances: s,
|
|
251
|
+
copy: t,
|
|
252
|
+
expenses: m,
|
|
253
|
+
totalRemaining: b
|
|
254
|
+
}),
|
|
255
|
+
/* @__PURE__ */ e(L, {
|
|
256
|
+
bodyContent: n ? t.body_spending_content : t.body_saving_content,
|
|
257
|
+
bodyDescription: n ? t.body_spending_description : t.body_saving_description,
|
|
258
|
+
copy: t,
|
|
259
|
+
deltaAmount: n ? 50 : 5,
|
|
260
|
+
initialAmount: n ? null : 100,
|
|
261
|
+
monthsTable: n ? O : N,
|
|
262
|
+
seedAmount: n ? c : void 0
|
|
263
|
+
}),
|
|
264
|
+
n && s != null && /* @__PURE__ */ e(k, {
|
|
265
|
+
availableBalances: s,
|
|
266
|
+
copy: t,
|
|
267
|
+
date: g
|
|
220
268
|
})
|
|
221
269
|
] });
|
|
222
270
|
};
|
|
223
271
|
export {
|
|
224
|
-
|
|
225
|
-
T as variants
|
|
272
|
+
z as MakeTransferActionBlock
|
|
226
273
|
};
|
|
227
274
|
|
|
228
275
|
//# sourceMappingURL=MakeTransferActionBlock.es.js.map
|
package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlock.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MakeTransferActionBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlock.tsx"],"sourcesContent":["import React from 'react'\nimport { Card, Divider, List, ListItem, Stack } from '@mui/material'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { Text } from '@mxenabled/mxui'\nimport { BalanceStepper } from './BalanceStepper'\nimport { formatCurrency } from '../../../common'\nimport { buildDynamicCopy } from '../../../core'\nimport SaveEnoughToLiveOnBottomSection from './SaveEnoughToLiveOnBottomSection'\nimport { getMakeTransferLayout, variants } from './layout'\n\n// Re-exported for existing importers (adapter, tests) that pull `variants` from\n// the component module. The source of truth is ./layout.\nexport { variants }\n\ninterface CopyContent {\n header_content?: string\n description?: string\n body_content?: string\n body_description?: string\n available_text?: string\n total_remaining_text?: string\n increment_aria_label?: string\n decrement_aria_label?: string\n expenses_text?: string\n available_balances_text?: string\n average_monthly_spend_text?: string\n your_available_balances_text?: string\n}\n\ninterface MakeTransferActionBlockProps {\n date?: string\n variant: (typeof variants)[keyof typeof variants]\n svgDateContent?: string\n availableBalances?: number\n copy: CopyContent\n averageMonthlySpend?: number\n /** SAVE_AN_EXTRA_100: total remaining from the payload; falls back to available − expenses. */\n totalRemaining?: number\n}\n\n// Content-only: the surrounding Drawer (open/close/title) is owned by\n// ActionBlockLayer, which renders this inside the shared action-drawer shell.\nexport const MakeTransferActionBlock = ({\n variant = variants.SAVE_ENOUGH_TO_LIVE_ON,\n svgDateContent,\n date,\n copy,\n availableBalances,\n averageMonthlySpend,\n totalRemaining,\n}: MakeTransferActionBlockProps) => {\n // All per-variant layout decisions live in ./layout.ts (Beat Blocks pattern).\n const layout = getMakeTransferLayout(variant)\n const { monthsTable, deltaAmount } = layout\n\n const [amountToCalculate, setAmountToCalculate] = React.useState(\n layout.initialAmount ?? averageMonthlySpend ?? 0,\n )\n\n // Variants without a fixed initialAmount (e.g. SAVE_ENOUGH_TO_LIVE_ON) seed the\n // stepper from averageMonthlySpend. useState only captures its initializer once,\n // so sync once the spend resolves after mount.\n React.useEffect(() => {\n if (layout.initialAmount == null && averageMonthlySpend != null) {\n setAmountToCalculate(averageMonthlySpend)\n }\n }, [averageMonthlySpend, layout.initialAmount])\n\n return (\n <>\n <Stack\n sx={{\n bgcolor: 'background.paper',\n p: 24,\n borderBottom: '1px solid',\n borderColor: 'divider',\n }}\n >\n {layout.showBalancesSection &&\n availableBalances != null &&\n averageMonthlySpend != null &&\n svgDateContent && (\n <SaveEnoughToLiveOnBottomSection\n content={svgDateContent || ''}\n leftLabel={copy.available_balances_text!}\n leftValue={formatCurrency(availableBalances, '0,0.00')}\n rightLabel={copy.average_monthly_spend_text!}\n rightValue={formatCurrency(averageMonthlySpend, '0,0.00')}\n sx={{ width: '100%', mb: 24 }}\n />\n )}\n <Stack\n sx={{\n gap: 8,\n }}\n >\n <Text variant=\"h3\">{copy.header_content}</Text>\n <Text sx={{ lineHeight: '24px' }} truncate={false} variant=\"body1\">\n {copy.description}\n </Text>\n </Stack>\n </Stack>\n {layout.showRemainingCard && availableBalances != null && averageMonthlySpend != null && (\n <Stack sx={{ pt: 24, px: 24 }}>\n <Card sx={{ px: 16, pt: 16, pb: 12 }}>\n <Stack\n sx={{\n border: 1,\n borderColor: 'divider',\n borderRadius: '4px',\n gap: 12,\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n p: 8,\n mb: 12,\n }}\n >\n <Stack sx={{ width: 155, textAlign: 'center' }}>\n <Text sx={{ fontWeight: 600 }} variant=\"body1\">\n {formatCurrency(availableBalances, '0,0.00')}\n </Text>\n <Text sx={{ color: 'text.secondary' }} variant=\"caption\">\n {copy.available_text}\n </Text>\n </Stack>\n <Icon name=\"remove\" size={20} />\n <Stack sx={{ width: 155, textAlign: 'center' }}>\n <Text sx={{ fontWeight: 600 }} variant=\"body1\">\n {formatCurrency(averageMonthlySpend, '0,0.00')}\n </Text>\n <Text sx={{ color: 'text.secondary' }} variant=\"caption\">\n {copy.expenses_text}\n </Text>\n </Stack>\n </Stack>\n <Stack\n sx={{\n textAlign: 'center',\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n gap: 4,\n }}\n >\n <Text sx={{ color: 'text.secondary' }} variant=\"body2\">\n {copy.total_remaining_text}:\n </Text>\n <Text sx={{ fontWeight: 600 }} variant=\"body2\">\n {formatCurrency(totalRemaining, '0,0.00')}\n </Text>\n </Stack>\n </Card>\n </Stack>\n )}\n\n <Stack sx={{ p: 24, gap: 8 }}>\n <Text sx={{ fontWeight: 600 }} truncate={false} variant=\"body1\">\n {copy.body_content}\n </Text>\n <BalanceStepper\n amount={formatCurrency(amountToCalculate, '0,0.00')}\n copy={copy}\n onDecrement={() => setAmountToCalculate((prev) => Math.max(0, prev - deltaAmount))}\n onIncrement={() => setAmountToCalculate((prev) => prev + deltaAmount)}\n />\n </Stack>\n <Stack sx={{ gap: 8 }}>\n <Text sx={{ fontWeight: 600, mx: 24 }} truncate={false} variant=\"body1\">\n {copy.body_description}\n </Text>\n <List sx={{ bgcolor: 'background.paper', width: '100%' }}>\n {monthsTable.map(({ label, value }, index) => {\n const isLastIndex = layout.lastRowIndex\n return (\n <React.Fragment key={value}>\n <ListItem\n disableGutters={true}\n disablePadding={true}\n sx={{\n minHeight: 52,\n bgcolor: 'background.paper',\n }}\n >\n <Stack sx={{ width: '100%' }}>\n <Stack\n sx={{\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n width: '100%',\n px: 24,\n py: 8,\n }}\n >\n <Text truncate={false} variant=\"body1\">\n {label}\n </Text>\n <Text sx={{ fontWeight: 600 }} truncate={false} variant=\"body1\">\n {formatCurrency(value * amountToCalculate, '0,0')}\n </Text>\n </Stack>\n </Stack>\n </ListItem>\n <Divider component=\"li\" sx={{ ml: index === isLastIndex ? 0 : 24 }} />\n </React.Fragment>\n )\n })}\n </List>\n {layout.showTotalBalances && availableBalances != null && (\n <Stack sx={{ pt: 6, pb: 14, px: 24, textAlign: 'right', gap: 4 }}>\n <Text truncate={false} variant=\"h3\">\n {formatCurrency(availableBalances, '0,0.00')}\n </Text>\n {date && (\n <Text\n sx={{ color: 'text.secondary', fontWeight: 400 }}\n truncate={false}\n variant=\"subtitle2\"\n >\n {buildDynamicCopy(copy.your_available_balances_text!, date) as string}\n </Text>\n )}\n </Stack>\n )}\n </Stack>\n </>\n )\n}\n"],"mappings":";;;;;;;;;;AA2CA,IAAa,IAAA,CAA2B,EACtC,SAAA,IAAU,EAAS,wBACnB,gBAAA,GACA,MAAA,GACA,MAAA,GACA,mBAAA,GACA,qBAAA,GACA,gBAAA,EAAA,MACkC;AAElC,QAAM,IAAS,EAAsB,CAAO,GACtC,EAAE,aAAA,GAAa,aAAA,EAAA,IAAgB,GAE/B,CAAC,GAAmB,CAAA,IAAwB,EAAM,SACtD,EAAO,iBAAiB,KAAuB,CACjD;AAKA,SAAA,EAAM,UAAA,MAAgB;AACpB,IAAI,EAAO,iBAAiB,QAAQ,KAAuB,QACzD,EAAqB,CAAmB;AAAA,EAE5C,GAAG,CAAC,GAAqB,EAAO,aAAa,CAAC,GAG5C,gBAAA,EAAA,GAAA,EAAA,UAAA;AAAA,IACE,gBAA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AO;AAAA,cAAkB,YAAY;AAAA,YAAI;AAAA,YAC/C,UAAU;AAAA,YACV,SAAQ;AAAA,YAEP,UAAA,EAAiB,EAAK,8BAA+B,CAAI;AAAA,UACtD,CAAA,CAEH;AAAA;MAEJ;AAAA;EACP,EAAA,CAAA;AAEN"}
|
|
1
|
+
{"version":3,"file":"MakeTransferActionBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlock.tsx"],"sourcesContent":["import React, { type ReactNode } from 'react'\nimport { Card, Divider, List, ListItem, Stack } from '@mui/material'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { formatCurrency } from '../../../common'\nimport { buildDynamicCopy, type MakeTransferCopy } from '../../../core'\n\nimport { BalanceStepper } from './BalanceStepper'\nimport SaveEnoughToLiveOnBottomSection from './SaveEnoughToLiveOnBottomSection'\nimport {\n toNumber,\n variants,\n type MakeTransferVariant,\n type MakeTransferVariantProps,\n} from './layout'\n\n// ============================================================================\n// Section building blocks (block-local)\n// ============================================================================\n\ninterface MonthRow {\n label: string\n value: number\n}\n\nconst SAVE_AN_EXTRA_MONTHS: readonly MonthRow[] = [\n { label: '3 months', value: 3 },\n { label: '6 months', value: 6 },\n { label: '9 months', value: 9 },\n]\n\nconst SAVE_ENOUGH_MONTHS: readonly MonthRow[] = [\n { label: '1 month', value: 1 },\n { label: '3 months', value: 3 },\n { label: '6 months', value: 6 },\n { label: '9 months', value: 9 },\n]\n\n/** Bordered title + description, with an optional `leading` slot. */\nconst Header = ({ copy, leading }: { copy: MakeTransferCopy; leading?: ReactNode }) => (\n <Stack\n sx={{ bgcolor: 'background.paper', p: 24, borderBottom: '1px solid', borderColor: 'divider' }}\n >\n {leading}\n <Stack sx={{ gap: 8 }}>\n <Text variant=\"h3\">{copy.header_content}</Text>\n <Text sx={{ lineHeight: '24px' }} truncate={false} variant=\"body1\">\n {copy.description}\n </Text>\n </Stack>\n </Stack>\n)\n\n/** Save-extra only: available − expenses = total remaining. */\nconst RemainingCard = ({\n availableBalances,\n expenses,\n totalRemaining,\n copy,\n}: {\n availableBalances: number\n expenses: number\n totalRemaining?: number\n copy: MakeTransferCopy\n}) => (\n <Stack sx={{ pt: 24, px: 24 }}>\n <Card sx={{ px: 16, pt: 16, pb: 12 }}>\n <Stack\n sx={{\n border: 1,\n borderColor: 'divider',\n borderRadius: '4px',\n gap: 12,\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n p: 8,\n mb: 12,\n }}\n >\n <Stack sx={{ width: 155, textAlign: 'center' }}>\n <Text sx={{ fontWeight: 600 }} variant=\"body1\">\n {formatCurrency(availableBalances, '0,0.00')}\n </Text>\n <Text sx={{ color: 'text.secondary' }} variant=\"caption\">\n {copy.available_text}\n </Text>\n </Stack>\n <Icon name=\"remove\" size={20} />\n <Stack sx={{ width: 155, textAlign: 'center' }}>\n <Text sx={{ fontWeight: 600 }} variant=\"body1\">\n {formatCurrency(expenses, '0,0.00')}\n </Text>\n <Text sx={{ color: 'text.secondary' }} variant=\"caption\">\n {copy.expenses_text}\n </Text>\n </Stack>\n </Stack>\n <Stack\n sx={{\n textAlign: 'center',\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n gap: 4,\n }}\n >\n <Text sx={{ color: 'text.secondary' }} variant=\"body2\">\n {copy.total_remaining_text}:\n </Text>\n <Text sx={{ fontWeight: 600 }} variant=\"body2\">\n {formatCurrency(totalRemaining, '0,0.00')}\n </Text>\n </Stack>\n </Card>\n </Stack>\n)\n\n/** Save-enough only: total available balances as of a date. */\nconst TotalsFooter = ({\n availableBalances,\n date,\n copy,\n}: {\n availableBalances: number\n date?: string\n copy: MakeTransferCopy\n}) => (\n <Stack sx={{ pt: 6, pb: 14, px: 24, textAlign: 'right', gap: 4 }}>\n <Text truncate={false} variant=\"h3\">\n {formatCurrency(availableBalances, '0,0.00')}\n </Text>\n {date && (\n <Text sx={{ color: 'text.secondary', fontWeight: 400 }} truncate={false} variant=\"subtitle2\">\n {buildDynamicCopy(copy.your_available_balances_text, date) as string}\n </Text>\n )}\n </Stack>\n)\n\n/** Stepper + projected-savings table. Owns the amount state so both stay in sync. */\nconst SavingsProjection = ({\n bodyContent,\n bodyDescription,\n monthsTable,\n deltaAmount,\n initialAmount,\n seedAmount,\n copy,\n}: {\n bodyContent: string\n bodyDescription: string\n monthsTable: readonly MonthRow[]\n deltaAmount: number\n /** Fixed starting amount; when null, seeds from `seedAmount` once it resolves. */\n initialAmount: number | null\n seedAmount?: number\n copy: MakeTransferCopy\n}) => {\n const [amount, setAmount] = React.useState(initialAmount ?? seedAmount ?? 0)\n\n React.useEffect(() => {\n if (initialAmount == null && seedAmount != null) {\n setAmount(seedAmount)\n }\n }, [initialAmount, seedAmount])\n\n const lastRowIndex = monthsTable.length - 1\n\n return (\n <>\n <Stack sx={{ p: 24, gap: 8 }}>\n <Text sx={{ fontWeight: 600 }} truncate={false} variant=\"body1\">\n {bodyContent}\n </Text>\n <BalanceStepper\n amount={formatCurrency(amount, '0,0.00')}\n copy={copy}\n onDecrement={() => setAmount((prev) => Math.max(0, prev - deltaAmount))}\n onIncrement={() => setAmount((prev) => prev + deltaAmount)}\n />\n </Stack>\n <Stack sx={{ gap: 8 }}>\n <Text sx={{ fontWeight: 600, mx: 24 }} truncate={false} variant=\"body1\">\n {bodyDescription}\n </Text>\n <List sx={{ bgcolor: 'background.paper', width: '100%' }}>\n {monthsTable.map(({ label, value }, index) => (\n <React.Fragment key={value}>\n <ListItem\n disableGutters={true}\n disablePadding={true}\n sx={{ minHeight: 52, bgcolor: 'background.paper' }}\n >\n <Stack sx={{ width: '100%' }}>\n <Stack\n sx={{\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n width: '100%',\n px: 24,\n py: 8,\n }}\n >\n <Text truncate={false} variant=\"body1\">\n {label}\n </Text>\n <Text sx={{ fontWeight: 600 }} truncate={false} variant=\"body1\">\n {formatCurrency(value * amount, '0,0')}\n </Text>\n </Stack>\n </Stack>\n </ListItem>\n <Divider component=\"li\" sx={{ ml: index === lastRowIndex ? 0 : 24 }} />\n </React.Fragment>\n ))}\n </List>\n </Stack>\n </>\n )\n}\n\n// ============================================================================\n// Block — one component handles both variants (they share the header + the\n// stepper/table skeleton; the top/middle/bottom sections differ). Branching is\n// on `variant` since the two are structurally close. If a third structurally\n// distinct variant appears, split into per-variant components + a registry.\n// ============================================================================\n\nexport const MakeTransferActionBlock = ({\n variant,\n slotData,\n copy,\n}: MakeTransferVariantProps & { variant: MakeTransferVariant }) => {\n const isSaveEnough = variant === variants.SAVE_ENOUGH_TO_LIVE_ON\n\n const availableBalances = slotData?.available_balance\n const averageMonthlySpend = toNumber(slotData?.avg_monthly_spend)\n const expenses = toNumber(slotData?.upcoming_expenses)\n const totalRemaining = toNumber(slotData?.total_remaining)\n const svgDateContent = slotData?.time_period\n const date = slotData?.date\n\n return (\n <>\n <Header\n copy={copy}\n leading={\n isSaveEnough &&\n availableBalances != null &&\n averageMonthlySpend != null &&\n svgDateContent ? (\n <SaveEnoughToLiveOnBottomSection\n content={svgDateContent}\n leftLabel={copy.available_balances_text}\n leftValue={formatCurrency(availableBalances, '0,0.00')}\n rightLabel={copy.average_monthly_spend_text}\n rightValue={formatCurrency(averageMonthlySpend, '0,0.00')}\n sx={{ width: '100%', mb: 24 }}\n />\n ) : null\n }\n />\n\n {!isSaveEnough && availableBalances != null && expenses != null && (\n <RemainingCard\n availableBalances={availableBalances}\n copy={copy}\n expenses={expenses}\n totalRemaining={totalRemaining}\n />\n )}\n\n <SavingsProjection\n bodyContent={isSaveEnough ? copy.body_spending_content : copy.body_saving_content}\n bodyDescription={\n isSaveEnough ? copy.body_spending_description : copy.body_saving_description\n }\n copy={copy}\n deltaAmount={isSaveEnough ? 50 : 5}\n initialAmount={isSaveEnough ? null : 100}\n monthsTable={isSaveEnough ? SAVE_ENOUGH_MONTHS : SAVE_AN_EXTRA_MONTHS}\n seedAmount={isSaveEnough ? averageMonthlySpend : undefined}\n />\n\n {isSaveEnough && availableBalances != null && (\n <TotalsFooter availableBalances={availableBalances} copy={copy} date={date} />\n )}\n </>\n )\n}\n"],"mappings":";;;;;;;;;;AA2BA,IAAM,IAA4C;AAAA,EAChD;AAAA,IAAE,OAAO;AAAA,IAAY,OAAO;AAAA,EAAE;AAAA,EAC9B;AAAA,IAAE,OAAO;AAAA,IAAY,OAAO;AAAA,EAAE;AAAA,EAC9B;AAAA,IAAE,OAAO;AAAA,IAAY,OAAO;AAAA,EAAE;AAChC,GAEM,IAA0C;AAAA,EAC9C;AAAA,IAAE,OAAO;AAAA,IAAW,OAAO;AAAA,EAAE;AAAA,EAC7B;AAAA,IAAE,OAAO;AAAA,IAAY,OAAO;AAAA,EAAE;AAAA,EAC9B;AAAA,IAAE,OAAO;AAAA,IAAY,OAAO;AAAA,EAAE;AAAA,EAC9B;AAAA,IAAE,OAAO;AAAA,IAAY,OAAO;AAAA,EAAE;AAChC,GAGM,IAAA,CAAU,EAAE,MAAA,GAAM,SAAA,EAAA,MACtB,gBAAA,EAAC,GAAD;AAAA,EACE,IAAI;AAAA,IAAE,SAAS;AAAA,IAAoB,GAAG;AAAA,IAAI,cAAc;AAAA,IAAa,aAAa;AAAA,EAAU;AAAA,EAD9F,UAAA,CAGG,GACD,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI,EAAE,KAAK,EAAE;AAAA,IAApB,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,MAAM,SAAQ;AAAA,MAAM,UAAA,EAAK;AAAA,IAAqB,CAAA,GAC9C,gBAAA,EAAC,GAAD;AAAA,MAAM,IAAI,EAAE,YAAY,OAAO;AAAA,MAAG,UAAU;AAAA,MAAO,SAAQ;AAAA,MACxD,UAAA,EAAK;AAAA,IACF,CAAA,CACD;AAAA,EACF,CAAA,CAAA;IAIH,IAAA,CAAiB,EACrB,mBAAA,GACA,UAAA,GACA,gBAAA,GACA,MAAA,EAAA,MAOA,gBAAA,EAAC,GAA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ACN,SACE,KACA,KAAqB,QACrB,KAAuB,QACvB,IACE,gBAAA,EAAC,GAAD;AAAA,QACE,SAAS;AAAA,QACT,WAAW,EAAK;AAAA,QAChB,WAAW,EAAe,GAAmB,QAAQ;AAAA,QACrD,YAAY,EAAK;AAAA,QACjB,YAAY,EAAe,GAAqB,QAAQ;AAAA,QACxD,IAAI;AAAA,UAAE,OAAO;AAAA,UAAQ,IAAI;AAAA,QAAG;AAAA,MAC7B,CAAA,IACC;AAAA,IAEP,CAAA;AAAA,IAEA,CAAC,KAAgB,KAAqB,QAAQ,KAAY,QACzD,gBAAA,EAAC,GAAD;AAAA,MACqB,mBAAA;AAAA,MACb,MAAA;AAAA,MACI,UAAA;AAAA,MACM,gBAAA;AAAA,IACjB,CAAA;AAAA,IAGH,gBAAA,EAAC,GAAD;AAAA,MACE,aAAa,IAAe,EAAK,wBAAwB,EAAK;AAAA,MAC9D,iBACE,IAAe,EAAK,4BAA4B,EAAK;AAAA,MAEjD,MAAA;AAAA,MACN,aAAa,IAAe,KAAK;AAAA,MACjC,eAAe,IAAe,OAAO;AAAA,MACrC,aAAa,IAAe,IAAqB;AAAA,MACjD,YAAY,IAAe,IAAsB;AAAA,IAClD,CAAA;AAAA,IAEA,KAAgB,KAAqB,QACpC,gBAAA,EAAC,GAAD;AAAA,MAAiC,mBAAA;AAAA,MAAyB,MAAA;AAAA,MAAY,MAAA;AAAA,IAAO,CAAA;AAAA,EAE/E,EAAA,CAAA;AAEN"}
|
package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Beat } from '../../../core';
|
|
2
2
|
/**
|
|
3
|
-
* Adapter that plugs
|
|
3
|
+
* Adapter that plugs MakeTransfer into the ActionBlock registry.
|
|
4
4
|
*
|
|
5
|
-
* The
|
|
6
|
-
* (open/close/title). This adapter derives the variant from the clicked CTA,
|
|
7
|
-
*
|
|
5
|
+
* The variants are content-only — ActionBlockLayer owns the surrounding Drawer
|
|
6
|
+
* (open/close/title). This adapter derives the variant from the clicked CTA, the
|
|
7
|
+
* copy from GlobalCopyStore, and passes the slot data through; each variant reads
|
|
8
|
+
* the fields it needs.
|
|
8
9
|
*/
|
|
9
10
|
export declare const MakeTransferActionBlockLayer: (({ beat, }: {
|
|
10
11
|
beat: Beat;
|
package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js
CHANGED
|
@@ -1,26 +1,18 @@
|
|
|
1
|
-
import { useGlobalCopyStore as
|
|
2
|
-
import {
|
|
3
|
-
import { MakeTransferActionBlock as
|
|
4
|
-
import { observer as
|
|
5
|
-
import { jsx as
|
|
6
|
-
var
|
|
7
|
-
const { actionDrawer:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return /* @__PURE__ */ _(v, {
|
|
13
|
-
availableBalances: o?.available_balance,
|
|
14
|
-
averageMonthlySpend: s(o?.[t.averageMonthlySpend]),
|
|
15
|
-
copy: m,
|
|
16
|
-
date: o?.date,
|
|
17
|
-
svgDateContent: t.timePeriod ? o?.[t.timePeriod] : void 0,
|
|
18
|
-
totalRemaining: t.totalRemaining ? s(o?.[t.totalRemaining]) : void 0,
|
|
19
|
-
variant: r
|
|
1
|
+
import { useGlobalCopyStore as n, useInsightsV2Store as s } from "../../../common/context/hooks.es.js";
|
|
2
|
+
import { resolveMakeTransferVariant as i } from "./layout.es.js";
|
|
3
|
+
import { MakeTransferActionBlock as c } from "./MakeTransferActionBlock.es.js";
|
|
4
|
+
import { observer as f } from "mobx-react-lite";
|
|
5
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
6
|
+
var g = f(function({ beat: a }) {
|
|
7
|
+
const { actionDrawer: o } = s(), { insights_feed: t } = n(), r = a.insights_payload, e = o.trigger === "secondaryCta" ? r?.secondary_cta : r?.primary_cta;
|
|
8
|
+
return /* @__PURE__ */ m(c, {
|
|
9
|
+
copy: t.make_transfer,
|
|
10
|
+
slotData: r?.instance_slot_data,
|
|
11
|
+
variant: i(e?.variant)
|
|
20
12
|
});
|
|
21
13
|
});
|
|
22
14
|
export {
|
|
23
|
-
|
|
15
|
+
g as MakeTransferActionBlockLayer
|
|
24
16
|
};
|
|
25
17
|
|
|
26
18
|
//# sourceMappingURL=MakeTransferActionBlockLayer.es.js.map
|
package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MakeTransferActionBlockLayer.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport { useGlobalCopyStore, useInsightsV2Store } from '../../../common'\n\nimport type { Beat } from '../../../core'\nimport type { SaveExtraBlockData } from '../../../core/types/InsightsInstanceSlotData'\n\nimport { MakeTransferActionBlock } from './MakeTransferActionBlock'\nimport {
|
|
1
|
+
{"version":3,"file":"MakeTransferActionBlockLayer.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport { useGlobalCopyStore, useInsightsV2Store } from '../../../common'\n\nimport type { Beat } from '../../../core'\nimport type { SaveExtraBlockData } from '../../../core/types/InsightsInstanceSlotData'\n\nimport { MakeTransferActionBlock } from './MakeTransferActionBlock'\nimport { resolveMakeTransferVariant } from './layout'\n\n/**\n * Adapter that plugs MakeTransfer into the ActionBlock registry.\n *\n * The variants are content-only — ActionBlockLayer owns the surrounding Drawer\n * (open/close/title). This adapter derives the variant from the clicked CTA, the\n * copy from GlobalCopyStore, and passes the slot data through; each variant reads\n * the fields it needs.\n */\nexport const MakeTransferActionBlockLayer = observer(function MakeTransferActionBlockLayer({\n beat,\n}: {\n beat: Beat\n}) {\n const { actionDrawer } = useInsightsV2Store()\n const { insights_feed: insightsFeedCopy } = useGlobalCopyStore()\n\n const payload = beat.insights_payload\n const cta =\n actionDrawer.trigger === 'secondaryCta' ? payload?.secondary_cta : payload?.primary_cta\n\n return (\n <MakeTransferActionBlock\n copy={insightsFeedCopy.make_transfer}\n slotData={payload?.instance_slot_data as SaveExtraBlockData | undefined}\n variant={resolveMakeTransferVariant(cta?.variant)}\n />\n )\n})\n"],"mappings":";;;;;AAkBA,IAAa,IAA+B,EAAS,SAAsC,EACzF,MAAA,EAAA,GAGC;AACD,QAAM,EAAE,cAAA,EAAA,IAAiB,EAAmB,GACtC,EAAE,eAAe,EAAA,IAAqB,EAAmB,GAEzD,IAAU,EAAK,kBACf,IACJ,EAAa,YAAY,iBAAiB,GAAS,gBAAgB,GAAS;AAE9E,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,MAAM,EAAiB;AAAA,IACvB,UAAU,GAAS;AAAA,IACnB,SAAS,EAA2B,GAAK,OAAO;AAAA,EACjD,CAAA;AAEL,CAAC"}
|