@mx-cartographer/experiences 9.7.128 → 9.7.130
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 +8 -0
- package/dist/core/types/localization/InsightsFeedCopy.d.ts +11 -15
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.d.ts +5 -1
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.es.js +78 -30
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListContent.d.ts +26 -13
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListContent.es.js +107 -136
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListContent.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/AccountListBlock/layout.d.ts +21 -7
- package/dist/insights-v2/actionBlocks/AccountListBlock/layout.es.js +34 -17
- package/dist/insights-v2/actionBlocks/AccountListBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/AccountListBlock/useAccountListPrepare.d.ts +3 -1
- package/dist/insights-v2/actionBlocks/AccountListBlock/useAccountListPrepare.es.js +10 -8
- package/dist/insights-v2/actionBlocks/AccountListBlock/useAccountListPrepare.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/layout.es.js +46 -45
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/layout.es.js +23 -22
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js +26 -25
- package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/HelpBlock/layout.d.ts +0 -1
- package/dist/insights-v2/actionBlocks/HelpBlock/layout.es.js +6 -6
- package/dist/insights-v2/actionBlocks/HelpBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/layout.es.js +8 -7
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/OverdraftBlock/layout.es.js +11 -13
- package/dist/insights-v2/actionBlocks/OverdraftBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/RecurringTransactionBlock.d.ts +10 -12
- package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/RecurringTransactionBlock.es.js +20 -19
- package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/RecurringTransactionBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/index.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/useRecurringTransactionBlock.d.ts +3 -12
- package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/useRecurringTransactionBlock.es.js +8 -8
- package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/useRecurringTransactionBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/useRecurringTransactionPrepare.d.ts +9 -0
- package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/useRecurringTransactionPrepare.es.js +27 -10
- package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/useRecurringTransactionPrepare.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.d.ts +1 -7
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js +49 -59
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashContent.es.js +29 -75
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashContent.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/layout.d.ts +12 -0
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/layout.es.js +18 -9
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js +14 -13
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare.es.js +10 -9
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.d.ts +0 -3
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.es.js +30 -33
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.es.js +31 -30
- package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js +14 -14
- package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js +4 -4
- package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js +4 -4
- package/dist/insights-v2/blocks/ComponentBlocks/RepeatingTransactionBlock/RepeatingTransactionBlock.es.js +4 -4
- package/dist/insights-v2/blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js +11 -10
- package/dist/insights-v2/blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.es.js +5 -5
- package/dist/insights-v2/blocks/ComponentBlocks/WeeklySmallPurchasesBlock/WeeklySmallPurchasesBlock.es.js +4 -4
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/EmergencySavingsAccountPicker.es.js +1 -1
- package/dist/insights-v2/blocks/slotReaders.d.ts +5 -0
- package/dist/insights-v2/blocks/slotReaders.es.js +7 -5
- package/dist/insights-v2/blocks/slotReaders.es.js.map +1 -1
- package/dist/insights-v2/components/AmountBreakdownCard.es.js +9 -8
- package/dist/insights-v2/components/AmountBreakdownCard.es.js.map +1 -1
- package/dist/insights-v2/components/InsightListRow.d.ts +31 -0
- package/dist/insights-v2/components/InsightListRow.es.js +111 -0
- package/dist/insights-v2/components/InsightListRow.es.js.map +1 -0
- package/dist/insights-v2/components/SubTabs.d.ts +2 -1
- package/dist/insights-v2/components/SubTabs.es.js +10 -10
- package/dist/insights-v2/components/SubTabs.es.js.map +1 -1
- package/dist/insights-v2/index.es.js +12 -12
- package/dist/insights-v2/mappings/blocks.es.js +21 -21
- package/dist/recurringtransactions/components/RecurringTransactionDetails.d.ts +3 -1
- package/dist/recurringtransactions/components/RecurringTransactionDetails.es.js +169 -120
- package/dist/recurringtransactions/components/RecurringTransactionDetails.es.js.map +1 -1
- package/dist/recurringtransactions/components/RecurringTransactionList.d.ts +3 -1
- package/dist/recurringtransactions/components/RecurringTransactionList.es.js +151 -118
- package/dist/recurringtransactions/components/RecurringTransactionList.es.js.map +1 -1
- package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -6
- package/dist/transactions/components/shared/TransactionDetails.es.js +149 -199
- package/dist/transactions/components/shared/TransactionDetails.es.js.map +1 -1
- package/dist/transactions/components/shared/transactiondetails/Description.d.ts +2 -0
- package/dist/transactions/components/shared/transactiondetails/Description.es.js +59 -50
- package/dist/transactions/components/shared/transactiondetails/Description.es.js.map +1 -1
- package/dist/transactions/components/shared/transactiondetails/TransactionHeaderParts.d.ts +10 -0
- package/dist/transactions/components/shared/transactiondetails/TransactionHeaderParts.es.js +68 -0
- package/dist/transactions/components/shared/transactiondetails/TransactionHeaderParts.es.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,41 +1,50 @@
|
|
|
1
|
-
import { useEvent as
|
|
2
|
-
import { useAriaLive as
|
|
3
|
-
import { ANALYTICS_EVENTS as
|
|
4
|
-
import { ON_CLICK_EVENTS as
|
|
5
|
-
import
|
|
6
|
-
import { observer as
|
|
7
|
-
import
|
|
8
|
-
import { Icon as
|
|
9
|
-
import
|
|
10
|
-
import { jsx as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
var
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}, [
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
import { useEvent as N, useGlobalCopyStore as B, useTransactionStore as L } from "../../../../common/context/hooks.es.js";
|
|
2
|
+
import { useAriaLive as O } from "../../../../common/hooks/useAriaLive.es.js";
|
|
3
|
+
import { ANALYTICS_EVENTS as A } from "../../../../common/constants/Analytics.es.js";
|
|
4
|
+
import { ON_CLICK_EVENTS as D } from "../../../constants/OnClickEvents.es.js";
|
|
5
|
+
import t from "react";
|
|
6
|
+
import { observer as k } from "mobx-react-lite";
|
|
7
|
+
import w from "@mui/material/Stack";
|
|
8
|
+
import { Icon as $, Text as K } from "@mxenabled/mxui";
|
|
9
|
+
import P from "@mui/material/Button";
|
|
10
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
11
|
+
import j from "@mui/material/Box";
|
|
12
|
+
import F from "@mui/material/IconButton";
|
|
13
|
+
import G from "@mui/material/TextField";
|
|
14
|
+
import M from "@mui/material/FormGroup";
|
|
15
|
+
var z = ({ transaction: r, viewOnly: S = !1, displayValue: c, onSave: d, value: u }) => {
|
|
16
|
+
const b = S || !!c, { updateTransaction: h } = L(), { common: m, transactions: e } = B(), { onEvent: p } = N(), { announce: l, ariaLive: v } = O(), [n, f] = t.useState(!1), [o, I] = t.useState(""), [x, g] = t.useState(!1), T = t.useRef(null), _ = t.useId(), C = `${_}-description-input`, E = `${_}-description-edit-button`;
|
|
17
|
+
t.useEffect(() => {
|
|
18
|
+
n && (I(u ?? r.description), T?.current?.focus());
|
|
19
|
+
}, [n]);
|
|
20
|
+
const R = () => {
|
|
21
|
+
f(!0), p(D.ON_TRANSACTION_DESCRIPTION_EDIT_CLICK), setTimeout(() => document.getElementById(C)?.focus(), 0);
|
|
22
|
+
}, y = async () => {
|
|
23
|
+
if (d) {
|
|
24
|
+
g(!0);
|
|
25
|
+
const s = await d(o);
|
|
26
|
+
if (g(!1), !s) {
|
|
27
|
+
l(m.error_message);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
} else
|
|
31
|
+
p(A.TRANSACTION_DETAILS_CLICK_DESCRIPTION, { transaction_guid: r.guid }), await h({
|
|
32
|
+
...r,
|
|
33
|
+
description: o
|
|
34
|
+
});
|
|
35
|
+
f(!1), l(`${e.payee_title}: ${o}`), setTimeout(() => document.getElementById(E)?.focus(), 0);
|
|
27
36
|
};
|
|
28
|
-
return /* @__PURE__ */ a(
|
|
37
|
+
return /* @__PURE__ */ a(j, {
|
|
29
38
|
className: "mx-txn-transaction-description",
|
|
30
|
-
children: [
|
|
39
|
+
children: [v, n ? /* @__PURE__ */ a(M, {
|
|
31
40
|
row: !0,
|
|
32
|
-
children: [/* @__PURE__ */
|
|
33
|
-
"aria-label":
|
|
34
|
-
id:
|
|
35
|
-
label:
|
|
36
|
-
name:
|
|
37
|
-
onChange: (
|
|
38
|
-
ref:
|
|
41
|
+
children: [/* @__PURE__ */ i(G, {
|
|
42
|
+
"aria-label": e.payee_title,
|
|
43
|
+
id: C,
|
|
44
|
+
label: e.payee_title,
|
|
45
|
+
name: e.payee_title,
|
|
46
|
+
onChange: (s) => I(s.target.value),
|
|
47
|
+
ref: T,
|
|
39
48
|
slotProps: { htmlInput: { maxLength: 140 } },
|
|
40
49
|
sx: {
|
|
41
50
|
backgroundColor: "background.paper",
|
|
@@ -46,43 +55,43 @@ var K = ({ transaction: o, viewOnly: p = !1, displayValue: s }) => {
|
|
|
46
55
|
".MuiOutlinedInput-input": { p: 11 },
|
|
47
56
|
width: 250
|
|
48
57
|
},
|
|
49
|
-
value:
|
|
50
|
-
}), /* @__PURE__ */
|
|
51
|
-
disabled: !
|
|
52
|
-
onClick:
|
|
58
|
+
value: o
|
|
59
|
+
}), /* @__PURE__ */ i(P, {
|
|
60
|
+
disabled: !o || x,
|
|
61
|
+
onClick: y,
|
|
53
62
|
sx: {
|
|
54
63
|
borderTopLeftRadius: 0,
|
|
55
64
|
borderBottomLeftRadius: 0
|
|
56
65
|
},
|
|
57
66
|
variant: "outlined",
|
|
58
|
-
children:
|
|
67
|
+
children: m.save_button
|
|
59
68
|
})]
|
|
60
|
-
}) : /* @__PURE__ */ a(
|
|
69
|
+
}) : /* @__PURE__ */ a(w, {
|
|
61
70
|
alignItems: "center",
|
|
62
71
|
direction: "row",
|
|
63
72
|
gap: 4,
|
|
64
73
|
sx: { minHeight: 24 },
|
|
65
|
-
children: [/* @__PURE__ */
|
|
74
|
+
children: [/* @__PURE__ */ i(K, {
|
|
66
75
|
bold: !0,
|
|
67
|
-
children:
|
|
68
|
-
}), !
|
|
69
|
-
"aria-label":
|
|
70
|
-
id:
|
|
71
|
-
onClick:
|
|
76
|
+
children: c ?? u ?? r.description
|
|
77
|
+
}), !b && /* @__PURE__ */ i(F, {
|
|
78
|
+
"aria-label": e.payee_edit,
|
|
79
|
+
id: E,
|
|
80
|
+
onClick: R,
|
|
72
81
|
sx: {
|
|
73
82
|
color: "action.active",
|
|
74
83
|
my: "-10px"
|
|
75
84
|
},
|
|
76
|
-
children: /* @__PURE__ */
|
|
85
|
+
children: /* @__PURE__ */ i($, {
|
|
77
86
|
name: "create",
|
|
78
87
|
size: 22
|
|
79
88
|
})
|
|
80
89
|
})]
|
|
81
90
|
})]
|
|
82
91
|
});
|
|
83
|
-
},
|
|
92
|
+
}, rt = k(z);
|
|
84
93
|
export {
|
|
85
|
-
|
|
94
|
+
rt as default
|
|
86
95
|
};
|
|
87
96
|
|
|
88
97
|
//# sourceMappingURL=Description.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Description.es.js","names":[],"sources":["../../../../../src/transactions/components/shared/transactiondetails/Description.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport FormGroup from '@mui/material/FormGroup'\nimport IconButton from '@mui/material/IconButton'\nimport Stack from '@mui/material/Stack'\nimport TextField from '@mui/material/TextField'\n\nimport { Icon, Text } from '@mxenabled/mxui'\n\nimport type { Transaction } from '../../../../core'\n\nimport {\n ANALYTICS_EVENTS,\n useEvent,\n useGlobalCopyStore,\n useTransactionStore,\n} from '../../../../common'\nimport { useAriaLive } from '../../../../common/hooks/useAriaLive'\nimport { ON_CLICK_EVENTS } from '../../../constants/OnClickEvents'\n\ninterface DescriptionProps {\n transaction: Transaction\n viewOnly?: boolean\n //
|
|
1
|
+
{"version":3,"file":"Description.es.js","names":[],"sources":["../../../../../src/transactions/components/shared/transactiondetails/Description.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport FormGroup from '@mui/material/FormGroup'\nimport IconButton from '@mui/material/IconButton'\nimport Stack from '@mui/material/Stack'\nimport TextField from '@mui/material/TextField'\n\nimport { Icon, Text } from '@mxenabled/mxui'\n\nimport type { Transaction } from '../../../../core'\n\nimport {\n ANALYTICS_EVENTS,\n useEvent,\n useGlobalCopyStore,\n useTransactionStore,\n} from '../../../../common'\nimport { useAriaLive } from '../../../../common/hooks/useAriaLive'\nimport { ON_CLICK_EVENTS } from '../../../constants/OnClickEvents'\n\ninterface DescriptionProps {\n transaction: Transaction\n viewOnly?: boolean\n // Read-only display override (e.g. institution name on transfers); hides the edit affordance.\n displayValue?: string\n // An editable name that isn't the transaction's own (a recurring series' name), saved via `onSave`.\n value?: string\n onSave?: (description: string) => Promise<boolean>\n}\n\nconst Description: React.FC<DescriptionProps> = ({\n transaction,\n viewOnly = false,\n displayValue,\n onSave,\n value,\n}) => {\n const isReadOnly = viewOnly || Boolean(displayValue)\n const { updateTransaction } = useTransactionStore()\n const { common: commonCopy, transactions: copy } = useGlobalCopyStore()\n const { onEvent } = useEvent()\n const { announce, ariaLive } = useAriaLive()\n\n const [isEditing, setIsEditing] = React.useState(false)\n const [description, setDescription] = React.useState('')\n const [isSaving, setIsSaving] = React.useState(false)\n\n const inputRef = React.useRef<HTMLInputElement>(null)\n // Per instance: the insights header and a nested Transaction Details can both mount one.\n const idBase = React.useId()\n const inputId = `${idBase}-description-input`\n const editButtonId = `${idBase}-description-edit-button`\n\n React.useEffect(() => {\n if (isEditing) {\n setDescription(value ?? transaction.description)\n inputRef?.current?.focus()\n }\n }, [isEditing])\n\n const handleEdit = () => {\n setIsEditing(true)\n onEvent(ON_CLICK_EVENTS.ON_TRANSACTION_DESCRIPTION_EDIT_CLICK)\n setTimeout(() => document.getElementById(inputId)?.focus(), 0)\n }\n\n const handleSave = async () => {\n if (onSave) {\n // A series rename is not a transaction-description edit; a failed save keeps the editor open.\n setIsSaving(true)\n const saved = await onSave(description)\n setIsSaving(false)\n if (!saved) {\n announce(commonCopy.error_message)\n return\n }\n } else {\n onEvent(ANALYTICS_EVENTS.TRANSACTION_DETAILS_CLICK_DESCRIPTION, {\n transaction_guid: transaction.guid,\n })\n await updateTransaction({ ...transaction, description })\n }\n setIsEditing(false)\n announce(`${copy.payee_title}: ${description}`)\n setTimeout(() => document.getElementById(editButtonId)?.focus(), 0)\n }\n\n return (\n <Box className=\"mx-txn-transaction-description\">\n {ariaLive}\n {isEditing ? (\n <FormGroup row={true}>\n <TextField\n aria-label={copy.payee_title}\n id={inputId}\n label={copy.payee_title}\n name={copy.payee_title}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) => setDescription(e.target.value)}\n ref={inputRef}\n slotProps={{ htmlInput: { maxLength: 140 } }}\n sx={{\n backgroundColor: 'background.paper',\n '.MuiOutlinedInput-root': { borderTopRightRadius: 0, borderBottomRightRadius: 0 },\n '.MuiOutlinedInput-input': { p: 11 },\n width: 250,\n }}\n value={description}\n />\n <Button\n disabled={!description || isSaving}\n onClick={handleSave}\n sx={{\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n }}\n variant=\"outlined\"\n >\n {commonCopy.save_button}\n </Button>\n </FormGroup>\n ) : (\n <Stack alignItems=\"center\" direction=\"row\" gap={4} sx={{ minHeight: 24 }}>\n <Text bold={true}>{displayValue ?? value ?? transaction.description}</Text>\n {!isReadOnly && (\n <IconButton\n aria-label={copy.payee_edit}\n id={editButtonId}\n onClick={handleEdit}\n // 44px tap target, but only 24px of layout height (Figma's name row).\n sx={{ color: 'action.active', my: '-10px' }}\n >\n <Icon name=\"create\" size={22} />\n </IconButton>\n )}\n </Stack>\n )}\n </Box>\n )\n}\n\nexport default observer(Description)\n"],"mappings":";;;;;;;;;;;;;;AAiCA,IAAM,IAAA,CAA2C,EAC/C,aAAA,GACA,UAAA,IAAW,IACX,cAAA,GACA,QAAA,GACA,OAAA,EAAA,MACI;AACJ,QAAM,IAAa,KAAY,EAAQ,GACjC,EAAE,mBAAA,EAAA,IAAsB,EAAoB,GAC5C,EAAE,QAAQ,GAAY,cAAc,EAAA,IAAS,EAAmB,GAChE,EAAE,SAAA,EAAA,IAAY,EAAS,GACvB,EAAE,UAAA,GAAU,UAAA,EAAA,IAAa,EAAY,GAErC,CAAC,GAAW,CAAA,IAAgB,EAAM,SAAS,EAAK,GAChD,CAAC,GAAa,CAAA,IAAkB,EAAM,SAAS,EAAE,GACjD,CAAC,GAAU,CAAA,IAAe,EAAM,SAAS,EAAK,GAE9C,IAAW,EAAM,OAAyB,IAAI,GAE9C,IAAS,EAAM,MAAM,GACrB,IAAU,GAAG,CAAA,sBACb,IAAe,GAAG,CAAA;AAExB,EAAA,EAAM,UAAA,MAAgB;AACpB,IAAI,MACF,EAAe,KAAS,EAAY,WAAW,GAC/C,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,OAAO;AAAA,QACT;AAAA,QACA,OAAO;AAAA,MACR,CAAA,GACD,gBAAA,EAAC,GAAD;AAAA,QACE,UAAU,CAAC,KAAe;AAAA,QAC1B,SAAS;AAAA,QACT,IAAI;AAAA,UACF,qBAAqB;AAAA,UACrB,wBAAwB;AAAA,QAC1B;AAAA,QACA,SAAQ;AAAA,QAEP,UAAA,EAAW;AAAA,MACN,CAAA,CACC;AAAA,IAEX,CAAA,IAAA,gBAAA,EAAC,GAAD;AAAA,MAAO,YAAW;AAAA,MAAS,WAAU;AAAA,MAAM,KAAK;AAAA,MAAG,IAAI,EAAE,WAAW,GAAG;AAAA,MAAvE,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,QAAM,MAAM;AAAA,QAAO,UAAA,KAAgB,KAAS,EAAY;AAAA,MAAkB,CAAA,GACzE,CAAC,KACA,gBAAA,EAAC,GAAD;AAAA,QACE,cAAY,EAAK;AAAA,QACjB,IAAI;AAAA,QACJ,SAAS;AAAA,QAET,IAAI;AAAA,UAAE,OAAO;AAAA,UAAiB,IAAI;AAAA,QAAQ;AAAA,QAE1C,UAAA,gBAAA,EAAC,GAAD;AAAA,UAAM,MAAK;AAAA,UAAS,MAAM;AAAA,QAAK,CAAA;AAAA,MACrB,CAAA,CAET;AAAA,IAEN,CAAA,CAAA;AAAA;AAET,GAEA,KAAe,EAAS,CAAW"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Transaction } from '../../../../core';
|
|
2
|
+
/** The 64px rounded merchant logo atop the Transaction Details header (also Expense Details'). */
|
|
3
|
+
export declare const TransactionLogoTile: ({ categoryGuid, merchantGuid, }: {
|
|
4
|
+
categoryGuid: string;
|
|
5
|
+
merchantGuid: string;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
/** The grey card under the amount: the account, then the bank's feed line and masked number. */
|
|
8
|
+
export declare const TransactionFeedCard: ({ transaction }: {
|
|
9
|
+
transaction: Transaction;
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import n from "@mui/material/Stack";
|
|
2
|
+
import { MerchantLogo as c, Text as t } from "@mxenabled/mxui";
|
|
3
|
+
import { jsx as r, jsxs as a } from "react/jsx-runtime";
|
|
4
|
+
import { useTheme as s } from "@mui/material/styles";
|
|
5
|
+
import p from "@mui/material/Box";
|
|
6
|
+
var i = 64, u = 8, l = {
|
|
7
|
+
fontWeight: 700,
|
|
8
|
+
letterSpacing: "0.27px",
|
|
9
|
+
textTransform: "uppercase"
|
|
10
|
+
}, v = ({ categoryGuid: e, merchantGuid: o }) => /* @__PURE__ */ r(p, {
|
|
11
|
+
sx: {
|
|
12
|
+
bgcolor: "background.paper",
|
|
13
|
+
borderRadius: `${u}px`,
|
|
14
|
+
height: i,
|
|
15
|
+
overflow: "hidden",
|
|
16
|
+
width: i
|
|
17
|
+
},
|
|
18
|
+
children: /* @__PURE__ */ r(c, {
|
|
19
|
+
categoryGuid: e,
|
|
20
|
+
merchantGuid: o,
|
|
21
|
+
size: i
|
|
22
|
+
})
|
|
23
|
+
}), y = ({ transaction: e }) => {
|
|
24
|
+
const o = s().palette.mode === "dark" ? "grey.800" : "grey.100", m = e.number && e.number.length > 4, d = e.number ? m ? e.number : `••••${e.number}` : void 0;
|
|
25
|
+
return /* @__PURE__ */ a(n, {
|
|
26
|
+
sx: {
|
|
27
|
+
bgcolor: o,
|
|
28
|
+
borderRadius: "4px",
|
|
29
|
+
gap: 4,
|
|
30
|
+
mt: 16,
|
|
31
|
+
p: 8
|
|
32
|
+
},
|
|
33
|
+
children: [/* @__PURE__ */ r(t, {
|
|
34
|
+
bold: !0,
|
|
35
|
+
children: e.account
|
|
36
|
+
}), /* @__PURE__ */ a(n, {
|
|
37
|
+
alignItems: "baseline",
|
|
38
|
+
"data-testid": "account-feed-line",
|
|
39
|
+
direction: "row",
|
|
40
|
+
gap: 4,
|
|
41
|
+
sx: { overflow: "hidden" },
|
|
42
|
+
children: [/* @__PURE__ */ r(t, {
|
|
43
|
+
color: "text.secondary",
|
|
44
|
+
sx: {
|
|
45
|
+
...l,
|
|
46
|
+
minWidth: 0
|
|
47
|
+
},
|
|
48
|
+
truncate: !0,
|
|
49
|
+
variant: "tiny",
|
|
50
|
+
children: e.feed_description
|
|
51
|
+
}), d && /* @__PURE__ */ r(t, {
|
|
52
|
+
color: "text.secondary",
|
|
53
|
+
sx: {
|
|
54
|
+
...l,
|
|
55
|
+
flexShrink: 0
|
|
56
|
+
},
|
|
57
|
+
variant: "tiny",
|
|
58
|
+
children: d
|
|
59
|
+
})]
|
|
60
|
+
})]
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
export {
|
|
64
|
+
y as TransactionFeedCard,
|
|
65
|
+
v as TransactionLogoTile
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
//# sourceMappingURL=TransactionHeaderParts.es.js.map
|
package/dist/transactions/components/shared/transactiondetails/TransactionHeaderParts.es.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransactionHeaderParts.es.js","names":[],"sources":["../../../../../src/transactions/components/shared/transactiondetails/TransactionHeaderParts.tsx"],"sourcesContent":["import Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { useTheme } from '@mui/material/styles'\n\nimport { MerchantLogo, Text } from '@mxenabled/mxui'\n\nimport type { Transaction } from '../../../../core'\n\n// Fixed per Figma; the theme's shape.borderRadius is client-configurable.\nconst LOGO_SIZE = 64\nconst LOGO_RADIUS = 8\n\n// Account feed line per Figma: 9/12 bold 700, uppercase, 0.27px tracking.\nconst FEED_LINE_SX = {\n fontWeight: 700,\n letterSpacing: '0.27px',\n textTransform: 'uppercase',\n} as const\n\n/** The 64px rounded merchant logo atop the Transaction Details header (also Expense Details'). */\nexport const TransactionLogoTile = ({\n categoryGuid,\n merchantGuid,\n}: {\n categoryGuid: string\n merchantGuid: string\n}) => (\n <Box\n sx={{\n bgcolor: 'background.paper',\n borderRadius: `${LOGO_RADIUS}px`,\n height: LOGO_SIZE,\n overflow: 'hidden',\n width: LOGO_SIZE,\n }}\n >\n <MerchantLogo categoryGuid={categoryGuid} merchantGuid={merchantGuid} size={LOGO_SIZE} />\n </Box>\n)\n\n/** The grey card under the amount: the account, then the bank's feed line and masked number. */\nexport const TransactionFeedCard = ({ transaction }: { transaction: Transaction }) => {\n const theme = useTheme()\n const bgColor = theme.palette.mode === 'dark' ? 'grey.800' : 'grey.100'\n const showFullNumber = transaction.number && transaction.number.length > 4\n const maskedNumber = transaction.number\n ? showFullNumber\n ? transaction.number\n : `••••${transaction.number}`\n : undefined\n\n return (\n // 24px below the amount: mt 16 plus the parent's 8px gap.\n <Stack sx={{ bgcolor: bgColor, borderRadius: '4px', gap: 4, mt: 16, p: 8 }}>\n <Text bold={true}>{transaction.account}</Text>\n <Stack\n alignItems=\"baseline\"\n data-testid=\"account-feed-line\"\n direction=\"row\"\n gap={4}\n sx={{ overflow: 'hidden' }}\n >\n <Text\n color=\"text.secondary\"\n sx={{ ...FEED_LINE_SX, minWidth: 0 }}\n truncate={true}\n variant=\"tiny\"\n >\n {transaction.feed_description}\n </Text>\n {maskedNumber && (\n <Text color=\"text.secondary\" sx={{ ...FEED_LINE_SX, flexShrink: 0 }} variant=\"tiny\">\n {maskedNumber}\n </Text>\n )}\n </Stack>\n </Stack>\n )\n}\n"],"mappings":";;;;;AASA,IAAM,IAAY,IACZ,IAAc,GAGd,IAAe;AAAA,EACnB,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,eAAe;AACjB,GAGa,IAAA,CAAuB,EAClC,cAAA,GACA,cAAA,EAAA,MAKA,gBAAA,EAAC,GAAD;AAAA,EACE,IAAI;AAAA,IACF,SAAS;AAAA,IACT,cAAc,GAAG,CAAA;AAAA,IACjB,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,OAAO;AAAA,EACT;AAAA,EAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,IAA4B,cAAA;AAAA,I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