@mx-cartographer/experiences 9.4.57 → 9.4.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 +5 -0
- package/dist/cashflow/CashflowOnboarding.es.js +6 -6
- package/dist/cashflow/CashflowOnboarding.es.js.map +1 -1
- package/dist/core/types/localization/InsightsFeedCopy.d.ts +4 -0
- package/dist/insights-v2/components/BaseLayout.d.ts +5 -1
- package/dist/insights-v2/components/BaseLayout.es.js +56 -52
- package/dist/insights-v2/components/BaseLayout.es.js.map +1 -1
- package/dist/insights-v2/components/ErrorCard.d.ts +15 -0
- package/dist/insights-v2/components/ErrorCard.es.js +85 -0
- package/dist/insights-v2/components/ErrorCard.es.js.map +1 -0
- package/dist/insights-v2/components/LoadingCard.d.ts +11 -0
- package/dist/insights-v2/components/LoadingCard.es.js +25 -0
- package/dist/insights-v2/components/LoadingCard.es.js.map +1 -0
- package/dist/insights-v2/components/shared/images/ErrorViewCibc.es.js +57 -0
- package/dist/insights-v2/components/shared/images/ErrorViewCibc.es.js.map +1 -0
- package/dist/insights-v2/index.d.ts +2 -0
- package/dist/insights-v2/index.es.js +44 -40
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
## [9.4.58] - 10-07-2026
|
|
2
|
+
|
|
3
|
+
- **ADDED** - Insights V2 `ErrorCard` and `LoadingCard` components, plus `isError`/`isLoading` props on `BaseLayout`: `isError` replaces the entire card with the `ErrorCard` (heading, message, and a "Try Again" retry button that reloads by default), while `isLoading` swaps only the block slot for the `LoadingCard`. `ErrorCard` derives the CIBC illustration variant from the app's `custom_copy_namespace`. Added `error_heading`, `error_message`, `loading`, and `try_again` copy keys under `insights_feed.general`, with stories for all three states (WEC-1854)
|
|
4
|
+
- **CHANGED** - `LoadingCard` now uses the hosted `MD_Assets` `loading.gif` and the bundled `Loading.gif` asset was removed from the package (WEC-1854)
|
|
5
|
+
|
|
1
6
|
## [9.4.57] - 10-06-2026
|
|
2
7
|
|
|
3
8
|
- **FIXED** - Spending transaction list puts a transaction in the same month as the chart when the bank dates it at midnight UTC MEW-4191
|
|
@@ -78,7 +78,7 @@ var ve = Te`
|
|
|
78
78
|
},
|
|
79
79
|
children: [
|
|
80
80
|
f === 1 && /* @__PURE__ */ e(p, {
|
|
81
|
-
sx:
|
|
81
|
+
sx: c ? {
|
|
82
82
|
display: "flex",
|
|
83
83
|
flexDirection: "column",
|
|
84
84
|
maxWidth: "100%",
|
|
@@ -87,11 +87,11 @@ var ve = Te`
|
|
|
87
87
|
maxWidth: 590,
|
|
88
88
|
ml: "40%",
|
|
89
89
|
mr: 90
|
|
90
|
-
}
|
|
90
|
+
},
|
|
91
91
|
children: /* @__PURE__ */ e(ye, { handleNextStep: I })
|
|
92
92
|
}),
|
|
93
93
|
f === 2 && /* @__PURE__ */ e(p, {
|
|
94
|
-
sx:
|
|
94
|
+
sx: c ? {
|
|
95
95
|
display: "flex",
|
|
96
96
|
flexDirection: "column",
|
|
97
97
|
maxWidth: "100%",
|
|
@@ -100,11 +100,11 @@ var ve = Te`
|
|
|
100
100
|
maxWidth: 590,
|
|
101
101
|
ml: "40%",
|
|
102
102
|
mr: 90
|
|
103
|
-
}
|
|
103
|
+
},
|
|
104
104
|
children: /* @__PURE__ */ e(_e, {})
|
|
105
105
|
}),
|
|
106
106
|
f === 3 && /* @__PURE__ */ i(p, {
|
|
107
|
-
sx:
|
|
107
|
+
sx: c ? {
|
|
108
108
|
display: "flex",
|
|
109
109
|
flexDirection: "column",
|
|
110
110
|
maxWidth: "100%",
|
|
@@ -113,7 +113,7 @@ var ve = Te`
|
|
|
113
113
|
maxWidth: 590,
|
|
114
114
|
ml: "40%",
|
|
115
115
|
mr: 90
|
|
116
|
-
}
|
|
116
|
+
},
|
|
117
117
|
children: [
|
|
118
118
|
/* @__PURE__ */ e(be, {
|
|
119
119
|
pb: 12,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CashflowOnboarding.es.js","names":[],"sources":["../../src/cashflow/CashflowOnboarding.tsx"],"sourcesContent":["import React, { useState } from 'react'\nimport { observer } from 'mobx-react-lite'\nimport { formatISO } from 'date-fns/formatISO'\nimport { fromUnixTime } from 'date-fns/fromUnixTime'\nimport { getUnixTime } from 'date-fns/getUnixTime'\nimport { startOfMonth } from 'date-fns/startOfMonth'\nimport { startOfToday } from 'date-fns/startOfToday'\nimport { subDays } from 'date-fns/subDays'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport Divider from '@mui/material/Divider'\nimport List from '@mui/material/List'\nimport Stack from '@mui/material/Stack'\nimport { keyframes } from '@mui/material/styles'\nimport { useTheme } from '@mui/material/styles'\n\nimport { H2, Icon, P } from '@mxenabled/mxui'\n\nimport StepOne from './components/onboarding/StepOne'\nimport StepTwo from './components/onboarding/StepTwo'\n\nimport {\n Loader,\n useCashflowStore,\n useGlobalCopyStore,\n useGlobalUiStore,\n useRecurringTransactionsStore,\n useScreenSize,\n useTransactionStore,\n useUserStore,\n} from '../common'\nimport { type RepeatingTransaction, type Transaction, RepeatingType, Frequency } from '../core'\nimport SubheaderRow from '../common/components/SubheaderRow'\n\nimport { useCashflowUiStore } from './context/hooks'\n\nimport { TransactionRow } from '../transactions'\nimport { incomeFilter, incomeFilterSearch } from '../transactions/utils/Filters'\n\nimport { AddRecurringTransactionDetails } from '../recurringtransactions'\nimport { SelectTransaction } from '../recurringtransactions'\nimport { getNextPaymentDate } from '../core/utils/RecurringTransactionsUtil'\n\nimport { fromUnixToDayOfWeekAndDate } from '../core/utils/DateUtil'\nimport { CASHFLOW_IMAGES } from './constants/CashflowImages'\n\ninterface UpcomingTransactions extends Transaction {\n nextDate: Date | null\n frequency: Frequency\n}\n\nconst spin = keyframes`\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n`\n\nconst CashflowOnboarding: React.FC = () => {\n const { addRepeatingTransaction, repeatingTransactions } = useRecurringTransactionsStore()\n const { cashflow: customCopy, common: commonCopy } = useGlobalCopyStore()\n const { user } = useUserStore()\n const { completeOnboarding } = useCashflowStore()\n const { isDirty } = useCashflowUiStore()\n const { isMobile } = useScreenSize()\n const { isCopyLoaded, setDisplayedDate } = useGlobalUiStore()\n const { filter, setFilter, transactions } = useTransactionStore()\n const theme = useTheme()\n\n const [addIncome, setAddIncome] = useState(true)\n const [frequency, setFrequency] = React.useState(Frequency.EveryMonth)\n const [firstDay, setFirstDay] = React.useState(1)\n const [secondDay, setSecondDay] = React.useState(15)\n const [isSubmitting, setIsSubmitting] = useState(false)\n // const [nextDate, setNextDate] = React.useState<Date | null>(null)\n const [step, setStep] = useState(1)\n const [selectedTransactions, setSelectedTransactions] = useState<UpcomingTransactions[] | []>([])\n const [transactionGuid, setTransactionGuid] = useState('')\n\n const transaction = React.useMemo(\n () => transactions.find((t) => t.guid === transactionGuid),\n [transactionGuid, transactions],\n )\n\n const canSubmit = !!repeatingTransactions.filter(\n (r) => r.repeating_transaction_type === RepeatingType.Income,\n ).length\n\n const handleGetTransactions = async () => {\n setStep(2)\n // set transaction date range and filter by income\n setDisplayedDate(\n // Beginning of the month, 90 days before today\n startOfMonth(subDays(startOfToday(), 90)),\n startOfToday(),\n )\n\n setFilter({ ...filter, custom: incomeFilter })\n\n setStep(3)\n }\n\n const handleAddIncome = async () => {\n if (selectedTransactions.length < 1) {\n return\n }\n setIsSubmitting(true)\n\n // Create Repeating Transactions\n for (let i = 0; i < selectedTransactions.length; i++) {\n const upcomingTransaction = selectedTransactions[i]\n\n const nextDate = getNextPaymentDate(frequency, fromUnixTime(upcomingTransaction.date))\n\n const repeatingTransaction = {\n account_guid: upcomingTransaction.account_guid,\n amount: upcomingTransaction.amount,\n created_by: 0, //user\n merchant_guid: upcomingTransaction.merchant_guid,\n description: upcomingTransaction.feed_description || upcomingTransaction.description,\n predicted_occurs_on: formatISO(nextDate, { representation: 'date' }),\n recurrence_day: nextDate.getDay(),\n recurrence_type: frequency,\n repeating_transaction_type: RepeatingType.Income,\n second_recurrence_day: secondDay,\n transaction_type: upcomingTransaction.transaction_type,\n user_guid: user.guid,\n } as RepeatingTransaction\n\n await addRepeatingTransaction(repeatingTransaction, upcomingTransaction)\n }\n await completeOnboarding()\n }\n\n const showSelectIncome =\n (!transaction && addIncome) || (!transaction && selectedTransactions.length < 1)\n\n if (!isCopyLoaded) {\n return <Loader />\n }\n\n return (\n <Box\n sx={{\n display: 'flex',\n alignItems: !isMobile ? 'center' : 'flex-start',\n backgroundColor: theme.palette.background.paper,\n backgroundImage: !isMobile ? `url(${CASHFLOW_IMAGES.CASHFLOW_ONBOARDING})` : null,\n backgroundRepeat: 'no-repeat',\n backgroundPosition: 'left 100px',\n backgroundSize: '35%',\n py: 24,\n }}\n >\n {step === 1 && (\n <Box\n sx={{\n ...(isMobile\n ? { display: 'flex', flexDirection: 'column', maxWidth: '100%', padding: '0 16px' }\n : { maxWidth: 590, ml: '40%', mr: 90 }),\n }}\n >\n <StepOne handleNextStep={handleGetTransactions} />\n </Box>\n )}\n {step === 2 && (\n <Box\n sx={{\n ...(isMobile\n ? { display: 'flex', flexDirection: 'column', maxWidth: '100%', padding: '0 16px' }\n : { maxWidth: 590, ml: '40%', mr: 90 }),\n }}\n >\n <StepTwo />\n </Box>\n )}\n {step === 3 && (\n <Box\n sx={{\n ...(isMobile\n ? { display: 'flex', flexDirection: 'column', maxWidth: '100%', padding: '0 16px' }\n : { maxWidth: 590, ml: '40%', mr: 90 }),\n }}\n >\n <H2 pb={12} variant=\"h1\">\n {customCopy.add_income_title}\n </H2>\n <P mb={24}>{customCopy.add_income_description}</P>\n\n {selectedTransactions.length > 0 && !transaction && (\n <>\n <List>\n {selectedTransactions.map((transaction, index) => {\n return (\n <React.Fragment key={transaction.guid}>\n <SubheaderRow bgcolor=\"background.paper\">\n {fromUnixToDayOfWeekAndDate(\n getUnixTime(transaction.nextDate || transaction.date),\n )}\n </SubheaderRow>\n <TransactionRow transaction={transaction} />\n {index !== selectedTransactions.length - 1 && <Divider />}\n </React.Fragment>\n )\n })}\n </List>\n <Stack alignItems=\"center\" direction=\"row\">\n <Divider sx={{ flexGrow: 1 }} />\n <Button\n onClick={() => setAddIncome(true)}\n startIcon={<Icon name=\"add\" size={20} />}\n >\n {customCopy.add_income}\n </Button>\n </Stack>\n </>\n )}\n\n {showSelectIncome && (\n <SelectTransaction\n bgcolor=\"background.paper\"\n onSearch={(searchValue) =>\n setFilter({\n ...filter,\n custom: (transaction: Transaction) =>\n searchValue\n ? incomeFilterSearch(transaction, searchValue)\n : incomeFilter(transaction),\n })\n }\n onSelected={(guid) => {\n setTransactionGuid(guid)\n setAddIncome(false)\n }}\n />\n )}\n\n {!canSubmit && isDirty && (\n <P color=\"error\" mt={16}>\n {customCopy.confirm_error}\n </P>\n )}\n\n {transaction && (\n <>\n <AddRecurringTransactionDetails\n bgcolor=\"background.paper\"\n firstDay={firstDay}\n frequency={frequency}\n onFirstDayChange={setFirstDay}\n onFrequencyChange={setFrequency}\n onSecondDayChange={setSecondDay}\n secondDay={secondDay}\n transaction={transaction}\n />\n <Stack direction=\"row\" gap={16} ml={24} mt={32}>\n <Button\n aria-disabled={!transaction}\n onClick={() => {\n const updatedTransactions = [...selectedTransactions]\n updatedTransactions.push({\n ...transaction,\n nextDate: getNextPaymentDate(frequency, fromUnixTime(transaction.date)),\n frequency,\n })\n\n setSelectedTransactions(updatedTransactions)\n setTransactionGuid('')\n }}\n variant=\"contained\"\n >\n {commonCopy.confirm_button}\n </Button>\n <Button\n onClick={() => {\n setTransactionGuid('')\n setAddIncome(true)\n handleGetTransactions().finally()\n }}\n variant=\"text\"\n >\n {commonCopy.cancel_button}\n </Button>\n </Stack>\n </>\n )}\n\n {selectedTransactions.length > 0 && !transaction && (\n <Stack direction=\"row\" gap={16} ml={24} mt={32}>\n <Button\n aria-disabled={selectedTransactions.length < 1 || isSubmitting}\n onClick={handleAddIncome}\n startIcon={\n isSubmitting ? (\n <Icon\n name=\"progress_activity\"\n sx={{\n animation: `${spin} 2s linear infinite`,\n }}\n />\n ) : null\n }\n variant=\"contained\"\n >\n {customCopy.confirm_income_button}\n </Button>\n <Button onClick={completeOnboarding} variant=\"text\">\n {customCopy.skip_button}\n </Button>\n </Stack>\n )}\n </Box>\n )}\n </Box>\n )\n}\n\nexport default observer(CashflowOnboarding)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,IAAM,KAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASP,KAAA,MAAqC;AACzC,QAAM,EAAE,yBAAA,GAAyB,uBAAA,EAAA,IAA0B,GAA8B,GACnF,EAAE,UAAU,GAAY,QAAQ,EAAA,IAAe,GAAmB,GAClE,EAAE,MAAA,EAAA,IAAS,GAAa,GACxB,EAAE,oBAAA,EAAA,IAAuB,GAAiB,GAC1C,EAAE,SAAA,EAAA,IAAY,GAAmB,GACjC,EAAE,UAAA,EAAA,IAAa,GAAc,GAC7B,EAAE,cAAA,GAAc,kBAAA,EAAA,IAAqB,GAAiB,GACtD,EAAE,QAAA,GAAQ,WAAA,GAAW,cAAA,EAAA,IAAiB,GAAoB,GAC1D,IAAQ,GAAS,GAEjB,CAAC,GAAW,CAAA,IAAgB,EAAS,EAAI,GACzC,CAAC,GAAW,CAAA,IAAgB,EAAM,SAAS,GAAU,UAAU,GAC/D,CAAC,GAAU,CAAA,IAAe,EAAM,SAAS,CAAC,GAC1C,CAAC,GAAW,CAAA,IAAgB,EAAM,SAAS,EAAE,GAC7C,CAAC,GAAc,CAAA,IAAmB,EAAS,EAAK,GAEhD,CAAC,GAAM,CAAA,IAAW,EAAS,CAAC,GAC5B,CAAC,GAAsB,CAAA,IAA2B,EAAsC,CAAC,CAAC,GAC1F,CAAC,GAAiB,CAAA,IAAsB,EAAS,EAAE,GAEnD,IAAc,EAAM,QAAA,MAClB,EAAa,KAAA,CAAM,MAAM,EAAE,SAAS,CAAe,GACzD,CAAC,GAAiB,CAAY,CAChC,GAEM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AAK;AAAA,gBACL,IAAI,EACF,WAAW,GAAG,EAAA,sBAChB;AAAA,cACD,CAAA,IACC;AAAA,cAEN,SAAQ;AAAA,cAEP,UAAA,EAAW;AAAA,YACN,CAAA,GACR,gBAAA,EAAC,GAAD;AAAA,cAAQ,SAAS;AAAA,cAAoB,SAAQ;AAAA,cAC1C,UAAA,EAAW;AAAA,YACN,CAAA,CACH;AAAA;QAEN;AAAA;IAEJ;AAAA,OA/KE,gBAAA,EAAC,IAAD,CAAS,CAAA;AAiLpB,GAEA,KAAe,GAAS,EAAkB"}
|
|
1
|
+
{"version":3,"file":"CashflowOnboarding.es.js","names":[],"sources":["../../src/cashflow/CashflowOnboarding.tsx"],"sourcesContent":["import React, { useState } from 'react'\nimport { observer } from 'mobx-react-lite'\nimport { formatISO } from 'date-fns/formatISO'\nimport { fromUnixTime } from 'date-fns/fromUnixTime'\nimport { getUnixTime } from 'date-fns/getUnixTime'\nimport { startOfMonth } from 'date-fns/startOfMonth'\nimport { startOfToday } from 'date-fns/startOfToday'\nimport { subDays } from 'date-fns/subDays'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport Divider from '@mui/material/Divider'\nimport List from '@mui/material/List'\nimport Stack from '@mui/material/Stack'\nimport { keyframes } from '@mui/material/styles'\nimport { useTheme } from '@mui/material/styles'\n\nimport { H2, Icon, P } from '@mxenabled/mxui'\n\nimport StepOne from './components/onboarding/StepOne'\nimport StepTwo from './components/onboarding/StepTwo'\n\nimport {\n Loader,\n useCashflowStore,\n useGlobalCopyStore,\n useGlobalUiStore,\n useRecurringTransactionsStore,\n useScreenSize,\n useTransactionStore,\n useUserStore,\n} from '../common'\nimport { type RepeatingTransaction, type Transaction, RepeatingType, Frequency } from '../core'\nimport SubheaderRow from '../common/components/SubheaderRow'\n\nimport { useCashflowUiStore } from './context/hooks'\n\nimport { TransactionRow } from '../transactions'\nimport { incomeFilter, incomeFilterSearch } from '../transactions/utils/Filters'\n\nimport { AddRecurringTransactionDetails } from '../recurringtransactions'\nimport { SelectTransaction } from '../recurringtransactions'\nimport { getNextPaymentDate } from '../core/utils/RecurringTransactionsUtil'\n\nimport { fromUnixToDayOfWeekAndDate } from '../core/utils/DateUtil'\nimport { CASHFLOW_IMAGES } from './constants/CashflowImages'\n\ninterface UpcomingTransactions extends Transaction {\n nextDate: Date | null\n frequency: Frequency\n}\n\nconst spin = keyframes`\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n`\n\nconst CashflowOnboarding: React.FC = () => {\n const { addRepeatingTransaction, repeatingTransactions } = useRecurringTransactionsStore()\n const { cashflow: customCopy, common: commonCopy } = useGlobalCopyStore()\n const { user } = useUserStore()\n const { completeOnboarding } = useCashflowStore()\n const { isDirty } = useCashflowUiStore()\n const { isMobile } = useScreenSize()\n const { isCopyLoaded, setDisplayedDate } = useGlobalUiStore()\n const { filter, setFilter, transactions } = useTransactionStore()\n const theme = useTheme()\n\n const [addIncome, setAddIncome] = useState(true)\n const [frequency, setFrequency] = React.useState(Frequency.EveryMonth)\n const [firstDay, setFirstDay] = React.useState(1)\n const [secondDay, setSecondDay] = React.useState(15)\n const [isSubmitting, setIsSubmitting] = useState(false)\n // const [nextDate, setNextDate] = React.useState<Date | null>(null)\n const [step, setStep] = useState(1)\n const [selectedTransactions, setSelectedTransactions] = useState<UpcomingTransactions[] | []>([])\n const [transactionGuid, setTransactionGuid] = useState('')\n\n const transaction = React.useMemo(\n () => transactions.find((t) => t.guid === transactionGuid),\n [transactionGuid, transactions],\n )\n\n const canSubmit = !!repeatingTransactions.filter(\n (r) => r.repeating_transaction_type === RepeatingType.Income,\n ).length\n\n const handleGetTransactions = async () => {\n setStep(2)\n // set transaction date range and filter by income\n setDisplayedDate(\n // Beginning of the month, 90 days before today\n startOfMonth(subDays(startOfToday(), 90)),\n startOfToday(),\n )\n\n setFilter({ ...filter, custom: incomeFilter })\n\n setStep(3)\n }\n\n const handleAddIncome = async () => {\n if (selectedTransactions.length < 1) {\n return\n }\n setIsSubmitting(true)\n\n // Create Repeating Transactions\n for (let i = 0; i < selectedTransactions.length; i++) {\n const upcomingTransaction = selectedTransactions[i]\n\n const nextDate = getNextPaymentDate(frequency, fromUnixTime(upcomingTransaction.date))\n\n const repeatingTransaction = {\n account_guid: upcomingTransaction.account_guid,\n amount: upcomingTransaction.amount,\n created_by: 0, //user\n merchant_guid: upcomingTransaction.merchant_guid,\n description: upcomingTransaction.feed_description || upcomingTransaction.description,\n predicted_occurs_on: formatISO(nextDate, { representation: 'date' }),\n recurrence_day: nextDate.getDay(),\n recurrence_type: frequency,\n repeating_transaction_type: RepeatingType.Income,\n second_recurrence_day: secondDay,\n transaction_type: upcomingTransaction.transaction_type,\n user_guid: user.guid,\n } as RepeatingTransaction\n\n await addRepeatingTransaction(repeatingTransaction, upcomingTransaction)\n }\n await completeOnboarding()\n }\n\n const showSelectIncome =\n (!transaction && addIncome) || (!transaction && selectedTransactions.length < 1)\n\n if (!isCopyLoaded) {\n return <Loader />\n }\n\n return (\n <Box\n sx={{\n display: 'flex',\n alignItems: !isMobile ? 'center' : 'flex-start',\n backgroundColor: theme.palette.background.paper,\n backgroundImage: !isMobile ? `url(${CASHFLOW_IMAGES.CASHFLOW_ONBOARDING})` : null,\n backgroundRepeat: 'no-repeat',\n backgroundPosition: 'left 100px',\n backgroundSize: '35%',\n py: 24,\n }}\n >\n {step === 1 && (\n <Box\n sx={(isMobile\n ? { display: 'flex', flexDirection: 'column', maxWidth: '100%', padding: '0 16px' }\n : { maxWidth: 590, ml: '40%', mr: 90 })}\n >\n <StepOne handleNextStep={handleGetTransactions} />\n </Box>\n )}\n {step === 2 && (\n <Box\n sx={(isMobile\n ? { display: 'flex', flexDirection: 'column', maxWidth: '100%', padding: '0 16px' }\n : { maxWidth: 590, ml: '40%', mr: 90 })}\n >\n <StepTwo />\n </Box>\n )}\n {step === 3 && (\n <Box\n sx={(isMobile\n ? { display: 'flex', flexDirection: 'column', maxWidth: '100%', padding: '0 16px' }\n : { maxWidth: 590, ml: '40%', mr: 90 })}\n >\n <H2 pb={12} variant=\"h1\">\n {customCopy.add_income_title}\n </H2>\n <P mb={24}>{customCopy.add_income_description}</P>\n\n {selectedTransactions.length > 0 && !transaction && (\n <>\n <List>\n {selectedTransactions.map((transaction, index) => {\n return (\n <React.Fragment key={transaction.guid}>\n <SubheaderRow bgcolor=\"background.paper\">\n {fromUnixToDayOfWeekAndDate(\n getUnixTime(transaction.nextDate || transaction.date),\n )}\n </SubheaderRow>\n <TransactionRow transaction={transaction} />\n {index !== selectedTransactions.length - 1 && <Divider />}\n </React.Fragment>\n )\n })}\n </List>\n <Stack alignItems=\"center\" direction=\"row\">\n <Divider sx={{ flexGrow: 1 }} />\n <Button\n onClick={() => setAddIncome(true)}\n startIcon={<Icon name=\"add\" size={20} />}\n >\n {customCopy.add_income}\n </Button>\n </Stack>\n </>\n )}\n\n {showSelectIncome && (\n <SelectTransaction\n bgcolor=\"background.paper\"\n onSearch={(searchValue) =>\n setFilter({\n ...filter,\n custom: (transaction: Transaction) =>\n searchValue\n ? incomeFilterSearch(transaction, searchValue)\n : incomeFilter(transaction),\n })\n }\n onSelected={(guid) => {\n setTransactionGuid(guid)\n setAddIncome(false)\n }}\n />\n )}\n\n {!canSubmit && isDirty && (\n <P color=\"error\" mt={16}>\n {customCopy.confirm_error}\n </P>\n )}\n\n {transaction && (\n <>\n <AddRecurringTransactionDetails\n bgcolor=\"background.paper\"\n firstDay={firstDay}\n frequency={frequency}\n onFirstDayChange={setFirstDay}\n onFrequencyChange={setFrequency}\n onSecondDayChange={setSecondDay}\n secondDay={secondDay}\n transaction={transaction}\n />\n <Stack direction=\"row\" gap={16} ml={24} mt={32}>\n <Button\n aria-disabled={!transaction}\n onClick={() => {\n const updatedTransactions = [...selectedTransactions]\n updatedTransactions.push({\n ...transaction,\n nextDate: getNextPaymentDate(frequency, fromUnixTime(transaction.date)),\n frequency,\n })\n\n setSelectedTransactions(updatedTransactions)\n setTransactionGuid('')\n }}\n variant=\"contained\"\n >\n {commonCopy.confirm_button}\n </Button>\n <Button\n onClick={() => {\n setTransactionGuid('')\n setAddIncome(true)\n handleGetTransactions().finally()\n }}\n variant=\"text\"\n >\n {commonCopy.cancel_button}\n </Button>\n </Stack>\n </>\n )}\n\n {selectedTransactions.length > 0 && !transaction && (\n <Stack direction=\"row\" gap={16} ml={24} mt={32}>\n <Button\n aria-disabled={selectedTransactions.length < 1 || isSubmitting}\n onClick={handleAddIncome}\n startIcon={\n isSubmitting ? (\n <Icon\n name=\"progress_activity\"\n sx={{\n animation: `${spin} 2s linear infinite`,\n }}\n />\n ) : null\n }\n variant=\"contained\"\n >\n {customCopy.confirm_income_button}\n </Button>\n <Button onClick={completeOnboarding} variant=\"text\">\n {customCopy.skip_button}\n </Button>\n </Stack>\n )}\n </Box>\n )}\n </Box>\n )\n}\n\nexport default observer(CashflowOnboarding)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,IAAM,KAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASP,KAAA,MAAqC;AACzC,QAAM,EAAE,yBAAA,GAAyB,uBAAA,EAAA,IAA0B,GAA8B,GACnF,EAAE,UAAU,GAAY,QAAQ,EAAA,IAAe,GAAmB,GAClE,EAAE,MAAA,EAAA,IAAS,GAAa,GACxB,EAAE,oBAAA,EAAA,IAAuB,GAAiB,GAC1C,EAAE,SAAA,EAAA,IAAY,GAAmB,GACjC,EAAE,UAAA,EAAA,IAAa,GAAc,GAC7B,EAAE,cAAA,GAAc,kBAAA,EAAA,IAAqB,GAAiB,GACtD,EAAE,QAAA,GAAQ,WAAA,GAAW,cAAA,EAAA,IAAiB,GAAoB,GAC1D,IAAQ,GAAS,GAEjB,CAAC,GAAW,CAAA,IAAgB,EAAS,EAAI,GACzC,CAAC,GAAW,CAAA,IAAgB,EAAM,SAAS,GAAU,UAAU,GAC/D,CAAC,GAAU,CAAA,IAAe,EAAM,SAAS,CAAC,GAC1C,CAAC,GAA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AA,UAGH,EAAqB,SAAS,KAAK,CAAC,KACnC,gBAAA,EAAC,GAAD;AAAA,YAAO,WAAU;AAAA,YAAM,KAAK;AAAA,YAAI,IAAI;AAAA,YAAI,IAAI;AAAA,YAA5C,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,cACE,iBAAe,EAAqB,SAAS,KAAK;AAAA,cAClD,SAAS;AAAA,cACT,WACE,IACE,gBAAA,EAAC,GAAD;AAAA,gBACE,MAAK;AAAA,gBACL,IAAI,EACF,WAAW,GAAG,EAAA,sBAChB;AAAA,cACD,CAAA,IACC;AAAA,cAEN,SAAQ;AAAA,cAEP,UAAA,EAAW;AAAA,YACN,CAAA,GACR,gBAAA,EAAC,GAAD;AAAA,cAAQ,SAAS;AAAA,cAAoB,SAAQ;AAAA,cAC1C,UAAA,EAAW;AAAA,YACN,CAAA,CACH;AAAA;QAEN;AAAA;IAEJ;AAAA,OAzKE,gBAAA,EAAC,IAAD,CAAS,CAAA;AA2KpB,GAEA,KAAe,GAAS,EAAkB"}
|
|
@@ -6,9 +6,12 @@ interface GeneralInsightsFeedCopy {
|
|
|
6
6
|
decreased_text: string;
|
|
7
7
|
dismiss: string;
|
|
8
8
|
embedded_description: string;
|
|
9
|
+
error_heading: string;
|
|
10
|
+
error_message: string;
|
|
9
11
|
increased_text: string;
|
|
10
12
|
insight_no_longer_applicable: string;
|
|
11
13
|
insight_updated: string;
|
|
14
|
+
loading: string;
|
|
12
15
|
monthly_amount: string;
|
|
13
16
|
new_information_available: string;
|
|
14
17
|
tip_section_message: string;
|
|
@@ -16,6 +19,7 @@ interface GeneralInsightsFeedCopy {
|
|
|
16
19
|
transaction_history_title: string;
|
|
17
20
|
transaction_details_title: string;
|
|
18
21
|
trend: string;
|
|
22
|
+
try_again: string;
|
|
19
23
|
update: string;
|
|
20
24
|
updating: string;
|
|
21
25
|
}
|
|
@@ -10,8 +10,12 @@ interface BaseLayoutProps {
|
|
|
10
10
|
beat: Beat;
|
|
11
11
|
beatActions?: BeatActions;
|
|
12
12
|
obsolete?: ObsoleteState;
|
|
13
|
+
/** Swap only the block slot for a LoadingCard (e.g. while a sampled beat loads). */
|
|
14
|
+
isLoading?: boolean;
|
|
15
|
+
/** Replace the entire card with an ErrorCard (e.g. when the sample fails to load). */
|
|
16
|
+
isError?: boolean;
|
|
13
17
|
}
|
|
14
|
-
declare const BaseLayout: (({ beat, beatActions, obsolete }: BaseLayoutProps) => import("react/jsx-runtime").JSX.Element | null) & {
|
|
18
|
+
declare const BaseLayout: (({ beat, beatActions, obsolete, isLoading, isError, }: BaseLayoutProps) => import("react/jsx-runtime").JSX.Element | null) & {
|
|
15
19
|
displayName: string;
|
|
16
20
|
};
|
|
17
21
|
export default BaseLayout;
|
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
import { useAppConfig as
|
|
2
|
-
import { sendBeatCta as
|
|
3
|
-
import { blocks as
|
|
4
|
-
import
|
|
5
|
-
import { BeatActionsProvider as
|
|
6
|
-
import
|
|
7
|
-
import { FeedbackBar as
|
|
8
|
-
import
|
|
9
|
-
import { DismissInsightDialog as
|
|
10
|
-
import { HiddenConfirmationCard as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
1
|
+
import { useAppConfig as A, useGlobalCopyStore as I, useInsightsV2Store as E } from "../../common/context/hooks.es.js";
|
|
2
|
+
import { sendBeatCta as H } from "../../common/utils/PostMessage.es.js";
|
|
3
|
+
import { blocks as M, hasDrawerBlock as G } from "../mappings/blocks.es.js";
|
|
4
|
+
import R from "./Footer.es.js";
|
|
5
|
+
import { BeatActionsProvider as j } from "../beatActions.es.js";
|
|
6
|
+
import z from "./Header.es.js";
|
|
7
|
+
import { FeedbackBar as N } from "./FeedbackBar.es.js";
|
|
8
|
+
import P from "./FeedbackDialog.es.js";
|
|
9
|
+
import { DismissInsightDialog as U } from "./DismissInsightDialog.es.js";
|
|
10
|
+
import { HiddenConfirmationCard as V } from "./HiddenConfirmationCard.es.js";
|
|
11
|
+
import { ErrorCard as W } from "./ErrorCard.es.js";
|
|
12
|
+
import { LoadingCard as X } from "./LoadingCard.es.js";
|
|
13
|
+
import { ObsolesceBanner as Y } from "./ObsolesceBanner.es.js";
|
|
14
|
+
import { ActionBlockLayer as q } from "../actionBlocks/ActionBlockLayer.es.js";
|
|
15
|
+
import { useBeatFeedbackFlow as J } from "../hooks/useBeatFeedbackFlow.es.js";
|
|
16
|
+
import { observer as K } from "mobx-react-lite";
|
|
15
17
|
import m from "@mui/material/Stack";
|
|
16
|
-
import { P as
|
|
18
|
+
import { P as Q } from "@mxenabled/mxui";
|
|
17
19
|
import p from "@mui/material/Button";
|
|
18
|
-
import { ChevronRight as
|
|
19
|
-
import { Fragment as
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
var
|
|
20
|
+
import { ChevronRight as Z } from "@mxenabled/mx-icons";
|
|
21
|
+
import { Fragment as $, jsx as o, jsxs as t } from "react/jsx-runtime";
|
|
22
|
+
import ee from "@mui/material/Box";
|
|
23
|
+
import oe from "@mui/material/Card";
|
|
24
|
+
var ie = {}, re = {
|
|
23
25
|
position: "absolute",
|
|
24
26
|
top: 0,
|
|
25
27
|
left: 0,
|
|
@@ -28,29 +30,31 @@ var Z = {}, $ = {
|
|
|
28
30
|
backgroundColor: "background.default",
|
|
29
31
|
opacity: 0.7,
|
|
30
32
|
zIndex: 1
|
|
31
|
-
},
|
|
32
|
-
const { openCtaDrawer:
|
|
33
|
-
if (
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
}, De = K(({ beat: i, beatActions: h = ie, obsolete: s, isLoading: y = !1, isError: g = !1 }) => {
|
|
34
|
+
const { openCtaDrawer: C } = E(), k = I(), { is_mobile_webview: v, clientConfig: _ } = A(), e = J(i, h);
|
|
35
|
+
if (g) return /* @__PURE__ */ o(W, {});
|
|
36
|
+
const r = i.insights_payload;
|
|
37
|
+
if (!r || e.cardState === "dismissed") return null;
|
|
38
|
+
const { instance_slot: x, primary_cta: n, secondary_cta: a, sub_title: S, title: w, widget_type: B, guid: d, user_guid: D, dismissed_at: L } = r, { block: O } = x, u = (T, F) => {
|
|
39
|
+
G(T) ? C(d, F) : H(i, {
|
|
40
|
+
isMobileWebview: v,
|
|
41
|
+
webviewScheme: _?.master?.ui_message_webview_url_scheme,
|
|
42
|
+
userGuid: D
|
|
39
43
|
});
|
|
40
|
-
},
|
|
41
|
-
return /* @__PURE__ */ o(
|
|
44
|
+
}, f = M[O], b = B === "mini", l = k.insights_feed?.general, c = s?.state === "not_refreshable" && !L && !!l;
|
|
45
|
+
return /* @__PURE__ */ o(j, {
|
|
42
46
|
value: e.wrappedActions,
|
|
43
|
-
children: /* @__PURE__ */
|
|
47
|
+
children: /* @__PURE__ */ t(m, {
|
|
44
48
|
sx: { mb: 16 },
|
|
45
49
|
children: [
|
|
46
|
-
e.cardState === "confirming" ? /* @__PURE__ */ o(
|
|
50
|
+
e.cardState === "confirming" ? /* @__PURE__ */ o(V, {
|
|
47
51
|
onClose: e.collapseConfirmation,
|
|
48
52
|
onLeaveFeedback: e.openHideSurvey,
|
|
49
53
|
onUndo: e.undoDismiss
|
|
50
|
-
}) : /* @__PURE__ */
|
|
54
|
+
}) : /* @__PURE__ */ t($, { children: [s && l && /* @__PURE__ */ o(Y, {
|
|
51
55
|
...s,
|
|
52
56
|
copy: l
|
|
53
|
-
}), /* @__PURE__ */
|
|
57
|
+
}), /* @__PURE__ */ t(oe, {
|
|
54
58
|
inert: c,
|
|
55
59
|
sx: { ...c && {
|
|
56
60
|
position: "relative",
|
|
@@ -58,17 +62,17 @@ var Z = {}, $ = {
|
|
|
58
62
|
pointerEvents: "none"
|
|
59
63
|
} },
|
|
60
64
|
children: [
|
|
61
|
-
c && /* @__PURE__ */ o(
|
|
62
|
-
/* @__PURE__ */ o(
|
|
63
|
-
isMini:
|
|
64
|
-
subtitle:
|
|
65
|
-
title:
|
|
65
|
+
c && /* @__PURE__ */ o(ee, { sx: re }),
|
|
66
|
+
/* @__PURE__ */ o(z, {
|
|
67
|
+
isMini: b,
|
|
68
|
+
subtitle: S,
|
|
69
|
+
title: w ?? ""
|
|
66
70
|
}),
|
|
67
|
-
|
|
71
|
+
y ? /* @__PURE__ */ o(X, {}) : f && /* @__PURE__ */ o(f, {
|
|
68
72
|
beatGuid: d,
|
|
69
|
-
payload:
|
|
73
|
+
payload: r
|
|
70
74
|
}),
|
|
71
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ t(m, {
|
|
72
76
|
sx: {
|
|
73
77
|
gap: 6,
|
|
74
78
|
pb: 16,
|
|
@@ -76,11 +80,11 @@ var Z = {}, $ = {
|
|
|
76
80
|
pr: 16,
|
|
77
81
|
pt: 12
|
|
78
82
|
},
|
|
79
|
-
children: [/* @__PURE__ */ o(
|
|
80
|
-
dangerouslySetInnerHTML: { __html:
|
|
83
|
+
children: [/* @__PURE__ */ o(Q, {
|
|
84
|
+
dangerouslySetInnerHTML: { __html: r.description.html_text },
|
|
81
85
|
variant: "subtitle2"
|
|
82
86
|
}), i?.in_description_cta && /* @__PURE__ */ o(p, {
|
|
83
|
-
endIcon: /* @__PURE__ */ o(
|
|
87
|
+
endIcon: /* @__PURE__ */ o(Z, {}),
|
|
84
88
|
onClick: () => {
|
|
85
89
|
},
|
|
86
90
|
sx: {
|
|
@@ -91,7 +95,7 @@ var Z = {}, $ = {
|
|
|
91
95
|
children: i.in_description_cta
|
|
92
96
|
})]
|
|
93
97
|
}),
|
|
94
|
-
!
|
|
98
|
+
!b && n?.label && /* @__PURE__ */ t(m, {
|
|
95
99
|
sx: {
|
|
96
100
|
gap: 8,
|
|
97
101
|
pb: 16,
|
|
@@ -107,19 +111,19 @@ var Z = {}, $ = {
|
|
|
107
111
|
children: a.label
|
|
108
112
|
})]
|
|
109
113
|
}),
|
|
110
|
-
/* @__PURE__ */ o(
|
|
114
|
+
/* @__PURE__ */ o(N, {
|
|
111
115
|
onTellUsMore: e.openRatingSurvey,
|
|
112
116
|
show: e.isFeedbackBarShown
|
|
113
117
|
})
|
|
114
118
|
]
|
|
115
119
|
})] }),
|
|
116
|
-
/* @__PURE__ */ o(
|
|
117
|
-
/* @__PURE__ */ o(
|
|
120
|
+
/* @__PURE__ */ o(q, { beat: i }),
|
|
121
|
+
/* @__PURE__ */ o(U, {
|
|
118
122
|
isOpen: e.isDismissOpen,
|
|
119
123
|
onClose: e.closeDismissDialog,
|
|
120
124
|
onDismiss: e.confirmDismiss
|
|
121
125
|
}),
|
|
122
|
-
e.isSurveyOpen && /* @__PURE__ */ o(
|
|
126
|
+
e.isSurveyOpen && /* @__PURE__ */ o(P, {
|
|
123
127
|
characterLimitLabel: e.survey.characterLimitLabel,
|
|
124
128
|
closeAriaLabel: e.survey.closeAriaLabel,
|
|
125
129
|
isOpen: !0,
|
|
@@ -132,13 +136,13 @@ var Z = {}, $ = {
|
|
|
132
136
|
secondaryText: e.survey.backText,
|
|
133
137
|
title: e.survey.title
|
|
134
138
|
}),
|
|
135
|
-
e.cardState === "visible" &&
|
|
139
|
+
e.cardState === "visible" && r.footer && /* @__PURE__ */ o(R, { footer: r.footer })
|
|
136
140
|
]
|
|
137
141
|
})
|
|
138
142
|
});
|
|
139
143
|
});
|
|
140
144
|
export {
|
|
141
|
-
|
|
145
|
+
De as default
|
|
142
146
|
};
|
|
143
147
|
|
|
144
148
|
//# sourceMappingURL=BaseLayout.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseLayout.es.js","names":[],"sources":["../../../src/insights-v2/components/BaseLayout.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport Card from '@mui/material/Card'\nimport Stack from '@mui/material/Stack'\n\nimport { ChevronRight } from '@mxenabled/mx-icons'\nimport { P } from '@mxenabled/mxui'\n\nimport { blocks, hasDrawerBlock } from '../mappings/blocks'\n\nimport Footer from './Footer'\nimport Header from './Header'\nimport FeedbackBar from './FeedbackBar'\nimport FeedbackDialog from './FeedbackDialog'\nimport DismissInsightDialog from './DismissInsightDialog'\nimport HiddenConfirmationCard from './HiddenConfirmationCard'\nimport { ObsolesceBanner, type ObsolesceBannerState } from './ObsolesceBanner'\nimport { useAppConfig, useGlobalCopyStore, useInsightsV2Store } from '../../common'\nimport { sendBeatCta } from '../../common/utils/PostMessage'\nimport type { Beat } from '../../core'\nimport { BeatActionsProvider, type BeatActions } from '../beatActions'\nimport { ActionBlockLayer } from '../actionBlocks/ActionBlockLayer'\nimport { useBeatFeedbackFlow } from '../hooks/useBeatFeedbackFlow'\n\nexport interface ObsoleteState {\n state: ObsolesceBannerState\n onRefresh: () => void\n onDismiss: () => void\n}\n\ninterface BaseLayoutProps {\n beat: Beat\n beatActions?: BeatActions\n obsolete?: ObsoleteState\n}\n\nconst NO_BEAT_ACTIONS: BeatActions = {}\n\nconst OBSOLETE_OVERLAY_SX = {\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n backgroundColor: 'background.default',\n opacity: 0.7,\n zIndex: 1,\n} as const\n\nconst BaseLayout = observer(\n ({ beat, beatActions = NO_BEAT_ACTIONS, obsolete }: BaseLayoutProps) => {\n const { openCtaDrawer } = useInsightsV2Store()\n const copy = useGlobalCopyStore()\n const { is_mobile_webview, clientConfig } = useAppConfig()\n const flow = useBeatFeedbackFlow(beat, beatActions)\n\n const insights_payload = beat.insights_payload\n\n if (!insights_payload) return null\n if (flow.cardState === 'dismissed') return null\n\n const {\n instance_slot,\n primary_cta,\n secondary_cta,\n sub_title,\n title,\n widget_type,\n guid,\n user_guid,\n dismissed_at,\n } = insights_payload\n const { block } = instance_slot\n\n // A CTA with a real drilldown `block` opens a drawer; otherwise it notifies\n // the host app via a beat/cta post message (the \"Make a Transfer\" CTA on the\n // Save an extra $100 beat). Mirrors Pulse's SaveAnExtra100Dollars beat.\n const handleCtaClick = (\n ctaBlock: string | null | undefined,\n source: 'primaryCta' | 'secondaryCta',\n ) => {\n if (hasDrawerBlock(ctaBlock)) {\n openCtaDrawer(guid, source)\n } else {\n sendBeatCta(beat, {\n isMobileWebview: is_mobile_webview,\n webviewScheme: clientConfig?.master?.ui_message_webview_url_scheme,\n userGuid: user_guid,\n })\n }\n }\n\n const Block = blocks[block as keyof typeof blocks]\n\n const isMini = widget_type === 'mini'\n const obsoleteCopy = copy.insights_feed?.general\n const isObsoleteDimmed =\n obsolete?.state === 'not_refreshable' && !dismissed_at && !!obsoleteCopy\n\n return (\n <BeatActionsProvider value={flow.wrappedActions}>\n <Stack sx={{ mb: 16 }}>\n {flow.cardState === 'confirming' ? (\n <HiddenConfirmationCard\n onClose={flow.collapseConfirmation}\n onLeaveFeedback={flow.openHideSurvey}\n onUndo={flow.undoDismiss}\n />\n ) : (\n <>\n {obsolete && obsoleteCopy && <ObsolesceBanner {...obsolete} copy={obsoleteCopy} />}\n <Card\n inert={isObsoleteDimmed}\n sx={{\n ...(isObsoleteDimmed && {\n position: 'relative',\n zIndex: 2,\n pointerEvents: 'none',\n }),\n }}\n >\n {isObsoleteDimmed && <Box sx={OBSOLETE_OVERLAY_SX} />}\n <Header isMini={isMini} subtitle={sub_title} title={title ?? ''} />\n {Block && <Block beatGuid={guid} payload={insights_payload} />}\n\n <Stack sx={{ gap: 6, pb: 16, pl: 12, pr: 16, pt: 12 }}>\n <P\n dangerouslySetInnerHTML={{\n __html: insights_payload.description.html_text,\n }}\n variant=\"subtitle2\"\n />\n {/* TODO: Migrate to insights_payload.in_description_cta once backend provides it */}\n {beat?.in_description_cta && (\n <Button\n endIcon={<ChevronRight />}\n onClick={() => {}}\n sx={{ height: 24, p: 4, width: 'max-content' }}\n >\n {beat.in_description_cta}\n </Button>\n )}\n </Stack>\n\n {!isMini && primary_cta?.label && (\n <Stack sx={{ gap: 8, pb: 16, px: 16 }}>\n <Button\n onClick={() => handleCtaClick(primary_cta.block, 'primaryCta')}\n variant=\"outlined\"\n >\n {primary_cta.label}\n </Button>\n {secondary_cta?.label && (\n <Button\n color=\"secondary\"\n onClick={() => handleCtaClick(secondary_cta.block, 'secondaryCta')}\n >\n {secondary_cta.label}\n </Button>\n )}\n </Stack>\n )}\n\n <FeedbackBar onTellUsMore={flow.openRatingSurvey} show={flow.isFeedbackBarShown} />\n </Card>\n </>\n )}\n\n <ActionBlockLayer beat={beat} />\n\n <DismissInsightDialog\n isOpen={flow.isDismissOpen}\n onClose={flow.closeDismissDialog}\n onDismiss={flow.confirmDismiss}\n />\n\n {flow.isSurveyOpen && (\n <FeedbackDialog\n characterLimitLabel={flow.survey.characterLimitLabel}\n closeAriaLabel={flow.survey.closeAriaLabel}\n isOpen={true}\n onBackClick={flow.feedbackDialogCallbacks.onBackClick}\n onClose={flow.closeSurvey}\n onSubmit={flow.submitSurvey}\n onTextInputFocus={flow.feedbackDialogCallbacks.onTextInputFocus}\n options={flow.survey.options}\n primaryText={flow.survey.submitText}\n secondaryText={flow.survey.backText}\n title={flow.survey.title}\n />\n )}\n\n {flow.cardState === 'visible' && insights_payload.footer && (\n <Footer footer={insights_payload.footer} />\n )}\n </Stack>\n </BeatActionsProvider>\n )\n },\n)\n\nexport default BaseLayout\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsCA,IAAM,IAA+B,CAAC,GAEhC,IAAsB;AAAA,EAC1B,UAAU;AAAA,EACV,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,iBAAiB;AAAA,EACjB,SAAS;AAAA,EACT,QAAQ;AACV,GAEM,KAAa,EAAA,CAChB,EAAE,MAAA,GAAM,aAAA,IAAc,GAAiB,UAAA,EAAA,MAAgC;AACtE,QAAM,EAAE,eAAA,EAAA,IAAkB,EAAmB,GACvC,IAAO,EAAmB,GAC1B,EAAE,mBAAA,GAAmB,cAAA,EAAA,IAAiB,EAAa,GACnD,IAAO,EAAoB,GAAM,CAAW,GAE5C,IAAmB,EAAK;AAG9B,MADI,CAAC,KACD,EAAK,cAAc,Y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A,CAAA,EAAA,CAAA;AAAA,QAGJ,gBAAA,EAAC,GAAD,EAAwB,MAAA,EAAO,CAAA;AAAA,QAE/B,gBAAA,EAAC,GAAD;AAAA,UACE,QAAQ,EAAK;AAAA,UACb,SAAS,EAAK;AAAA,UACd,WAAW,EAAK;AAAA,QACjB,CAAA;AAAA,QAEA,EAAK,gBACJ,gBAAA,EAAC,GAAD;AAAA,UACE,qBAAqB,EAAK,OAAO;AAAA,UACjC,gBAAgB,EAAK,OAAO;AAAA,UAC5B,QAAQ;AAAA,UACR,aAAa,EAAK,wBAAwB;AAAA,UAC1C,SAAS,EAAK;AAAA,UACd,UAAU,EAAK;AAAA,UACf,kBAAkB,EAAK,wBAAwB;AAAA,UAC/C,SAAS,EAAK,OAAO;AAAA,UACrB,aAAa,EAAK,OAAO;AAAA,UACzB,eAAe,EAAK,OAAO;AAAA,UAC3B,OAAO,EAAK,OAAO;AAAA,QACpB,CAAA;AAAA,QAGF,EAAK,cAAc,aAAa,EAAiB,UAChD,gBAAA,EAAC,GAAD,EAAQ,QAAQ,EAAiB,OAAS,CAAA;AAAA,MAEvC;AAAA;EACY,CAAA;AAEzB,CACF"}
|
|
1
|
+
{"version":3,"file":"BaseLayout.es.js","names":[],"sources":["../../../src/insights-v2/components/BaseLayout.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport Card from '@mui/material/Card'\nimport Stack from '@mui/material/Stack'\n\nimport { ChevronRight } from '@mxenabled/mx-icons'\nimport { P } from '@mxenabled/mxui'\n\nimport { blocks, hasDrawerBlock } from '../mappings/blocks'\n\nimport Footer from './Footer'\nimport Header from './Header'\nimport FeedbackBar from './FeedbackBar'\nimport FeedbackDialog from './FeedbackDialog'\nimport DismissInsightDialog from './DismissInsightDialog'\nimport HiddenConfirmationCard from './HiddenConfirmationCard'\nimport ErrorCard from './ErrorCard'\nimport LoadingCard from './LoadingCard'\nimport { ObsolesceBanner, type ObsolesceBannerState } from './ObsolesceBanner'\nimport { useAppConfig, useGlobalCopyStore, useInsightsV2Store } from '../../common'\nimport { sendBeatCta } from '../../common/utils/PostMessage'\nimport type { Beat } from '../../core'\nimport { BeatActionsProvider, type BeatActions } from '../beatActions'\nimport { ActionBlockLayer } from '../actionBlocks/ActionBlockLayer'\nimport { useBeatFeedbackFlow } from '../hooks/useBeatFeedbackFlow'\n\nexport interface ObsoleteState {\n state: ObsolesceBannerState\n onRefresh: () => void\n onDismiss: () => void\n}\n\ninterface BaseLayoutProps {\n beat: Beat\n beatActions?: BeatActions\n obsolete?: ObsoleteState\n /** Swap only the block slot for a LoadingCard (e.g. while a sampled beat loads). */\n isLoading?: boolean\n /** Replace the entire card with an ErrorCard (e.g. when the sample fails to load). */\n isError?: boolean\n}\n\nconst NO_BEAT_ACTIONS: BeatActions = {}\n\nconst OBSOLETE_OVERLAY_SX = {\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n backgroundColor: 'background.default',\n opacity: 0.7,\n zIndex: 1,\n} as const\n\nconst BaseLayout = observer(\n ({\n beat,\n beatActions = NO_BEAT_ACTIONS,\n obsolete,\n isLoading = false,\n isError = false,\n }: BaseLayoutProps) => {\n const { openCtaDrawer } = useInsightsV2Store()\n const copy = useGlobalCopyStore()\n const { is_mobile_webview, clientConfig } = useAppConfig()\n const flow = useBeatFeedbackFlow(beat, beatActions)\n\n // Error replaces the entire card; loading only swaps the block slot (below).\n if (isError) return <ErrorCard />\n\n const insights_payload = beat.insights_payload\n\n if (!insights_payload) return null\n if (flow.cardState === 'dismissed') return null\n\n const {\n instance_slot,\n primary_cta,\n secondary_cta,\n sub_title,\n title,\n widget_type,\n guid,\n user_guid,\n dismissed_at,\n } = insights_payload\n const { block } = instance_slot\n\n // A CTA with a real drilldown `block` opens a drawer; otherwise it notifies\n // the host app via a beat/cta post message (the \"Make a Transfer\" CTA on the\n // Save an extra $100 beat). Mirrors Pulse's SaveAnExtra100Dollars beat.\n const handleCtaClick = (\n ctaBlock: string | null | undefined,\n source: 'primaryCta' | 'secondaryCta',\n ) => {\n if (hasDrawerBlock(ctaBlock)) {\n openCtaDrawer(guid, source)\n } else {\n sendBeatCta(beat, {\n isMobileWebview: is_mobile_webview,\n webviewScheme: clientConfig?.master?.ui_message_webview_url_scheme,\n userGuid: user_guid,\n })\n }\n }\n\n const Block = blocks[block as keyof typeof blocks]\n\n const isMini = widget_type === 'mini'\n const obsoleteCopy = copy.insights_feed?.general\n const isObsoleteDimmed =\n obsolete?.state === 'not_refreshable' && !dismissed_at && !!obsoleteCopy\n\n return (\n <BeatActionsProvider value={flow.wrappedActions}>\n <Stack sx={{ mb: 16 }}>\n {flow.cardState === 'confirming' ? (\n <HiddenConfirmationCard\n onClose={flow.collapseConfirmation}\n onLeaveFeedback={flow.openHideSurvey}\n onUndo={flow.undoDismiss}\n />\n ) : (\n <>\n {obsolete && obsoleteCopy && <ObsolesceBanner {...obsolete} copy={obsoleteCopy} />}\n <Card\n inert={isObsoleteDimmed}\n sx={{\n ...(isObsoleteDimmed && {\n position: 'relative',\n zIndex: 2,\n pointerEvents: 'none',\n }),\n }}\n >\n {isObsoleteDimmed && <Box sx={OBSOLETE_OVERLAY_SX} />}\n <Header isMini={isMini} subtitle={sub_title} title={title ?? ''} />\n {isLoading ? (\n <LoadingCard />\n ) : (\n Block && <Block beatGuid={guid} payload={insights_payload} />\n )}\n\n <Stack sx={{ gap: 6, pb: 16, pl: 12, pr: 16, pt: 12 }}>\n <P\n dangerouslySetInnerHTML={{\n __html: insights_payload.description.html_text,\n }}\n variant=\"subtitle2\"\n />\n {/* TODO: Migrate to insights_payload.in_description_cta once backend provides it */}\n {beat?.in_description_cta && (\n <Button\n endIcon={<ChevronRight />}\n onClick={() => {}}\n sx={{ height: 24, p: 4, width: 'max-content' }}\n >\n {beat.in_description_cta}\n </Button>\n )}\n </Stack>\n\n {!isMini && primary_cta?.label && (\n <Stack sx={{ gap: 8, pb: 16, px: 16 }}>\n <Button\n onClick={() => handleCtaClick(primary_cta.block, 'primaryCta')}\n variant=\"outlined\"\n >\n {primary_cta.label}\n </Button>\n {secondary_cta?.label && (\n <Button\n color=\"secondary\"\n onClick={() => handleCtaClick(secondary_cta.block, 'secondaryCta')}\n >\n {secondary_cta.label}\n </Button>\n )}\n </Stack>\n )}\n\n <FeedbackBar onTellUsMore={flow.openRatingSurvey} show={flow.isFeedbackBarShown} />\n </Card>\n </>\n )}\n\n <ActionBlockLayer beat={beat} />\n\n <DismissInsightDialog\n isOpen={flow.isDismissOpen}\n onClose={flow.closeDismissDialog}\n onDismiss={flow.confirmDismiss}\n />\n\n {flow.isSurveyOpen && (\n <FeedbackDialog\n characterLimitLabel={flow.survey.characterLimitLabel}\n closeAriaLabel={flow.survey.closeAriaLabel}\n isOpen={true}\n onBackClick={flow.feedbackDialogCallbacks.onBackClick}\n onClose={flow.closeSurvey}\n onSubmit={flow.submitSurvey}\n onTextInputFocus={flow.feedbackDialogCallbacks.onTextInputFocus}\n options={flow.survey.options}\n primaryText={flow.survey.submitText}\n secondaryText={flow.survey.backText}\n title={flow.survey.title}\n />\n )}\n\n {flow.cardState === 'visible' && insights_payload.footer && (\n <Footer footer={insights_payload.footer} />\n )}\n </Stack>\n </BeatActionsProvider>\n )\n },\n)\n\nexport default BaseLayout\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA4CA,IAAM,KAA+B,CAAC,GAEhC,KAAsB;AAAA,EAC1B,UAAU;AAAA,EACV,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,iBAAiB;AAAA,EACjB,SAAS;AAAA,EACT,QAAQ;AACV,GAEM,KAAa,EAAA,CAChB,EACC,MAAA,GACA,aAAA,IAAc,IACd,UAAA,GACA,WAAA,IAAY,IACZ,SAAA,IAAU,GAAA,MACW;AACrB,QAAM,EAAE,eAAA,EAAA,IAAkB,EAAmB,GACvC,IAAO,EAAmB,GAC1B,EAAE,mBAAA,GAAmB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gBACN,SAAA,MAAe,EAAe,EAAc,OAAO,cAAc;AAAA,gBAEhE,UAAA,EAAc;AAAA,cACT,CAAA,CAEL;AAAA;YAGT,gBAAA,EAAC,GAAD;AAAA,cAAa,cAAc,EAAK;AAAA,cAAkB,MAAM,EAAK;AAAA,YAAqB,CAAA;AAAA,UAC9E;AAAA,QACN,CAAA,CAAA,EAAA,CAAA;AAAA,QAGJ,gBAAA,EAAC,GAAD,EAAwB,MAAA,EAAO,CAAA;AAAA,QAE/B,gBAAA,EAAC,GAAD;AAAA,UACE,QAAQ,EAAK;AAAA,UACb,SAAS,EAAK;AAAA,UACd,WAAW,EAAK;AAAA,QACjB,CAAA;AAAA,QAEA,EAAK,gBACJ,gBAAA,EAAC,GAAD;AAAA,UACE,qBAAqB,EAAK,OAAO;AAAA,UACjC,gBAAgB,EAAK,OAAO;AAAA,UAC5B,QAAQ;AAAA,UACR,aAAa,EAAK,wBAAwB;AAAA,UAC1C,SAAS,EAAK;AAAA,UACd,UAAU,EAAK;AAAA,UACf,kBAAkB,EAAK,wBAAwB;AAAA,UAC/C,SAAS,EAAK,OAAO;AAAA,UACrB,aAAa,EAAK,OAAO;AAAA,UACzB,eAAe,EAAK,OAAO;AAAA,UAC3B,OAAO,EAAK,OAAO;AAAA,QACpB,CAAA;AAAA,QAGF,EAAK,cAAc,aAAa,EAAiB,UAChD,gBAAA,EAAC,GAAD,EAAQ,QAAQ,EAAiB,OAAS,CAAA;AAAA,MAEvC;AAAA;EACY,CAAA;AAEzB,CACF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface ErrorCardProps {
|
|
2
|
+
/** Force the CIBC illustration. When omitted, derived from the app's copy namespace. */
|
|
3
|
+
isCibc?: boolean;
|
|
4
|
+
onRetry?: () => void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Card-framed error state for the InsightsV2 feed.
|
|
8
|
+
*
|
|
9
|
+
* Reads its copy from the experiences copy store and derives the CIBC variant from
|
|
10
|
+
* the app config, so the host only has to signal that an error occurred.
|
|
11
|
+
*/
|
|
12
|
+
export declare const ErrorCard: (({ isCibc, onRetry }: ErrorCardProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
export default ErrorCard;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { useAppConfig as m, useGlobalCopyStore as p } from "../../common/context/hooks.es.js";
|
|
2
|
+
import { BlobSVG as d } from "../../common/components/Error.es.js";
|
|
3
|
+
import { ThemedSVGImage as i } from "./chartblocks/ThemedSVGImage.es.js";
|
|
4
|
+
import { ReactComponent as x } from "./shared/images/ErrorViewCibc.es.js";
|
|
5
|
+
import { observer as g } from "mobx-react-lite";
|
|
6
|
+
import { Icon as h, P as f, Text as y } from "@mxenabled/mxui";
|
|
7
|
+
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
8
|
+
import { Button as u, Card as C, Stack as r } from "@mui/material";
|
|
9
|
+
var b = "cibc_custom_copy", v = () => window.location.reload(), B = g(({ isCibc: n, onRetry: a = v }) => {
|
|
10
|
+
const s = p(), { options: c } = m(), t = s.insights_feed?.general, l = n ?? c?.custom_copy_namespace === b;
|
|
11
|
+
return /* @__PURE__ */ e(C, {
|
|
12
|
+
sx: { pt: 32 },
|
|
13
|
+
children: /* @__PURE__ */ o(r, {
|
|
14
|
+
sx: { gap: 32 },
|
|
15
|
+
children: [/* @__PURE__ */ o(r, {
|
|
16
|
+
sx: {
|
|
17
|
+
alignItems: "center",
|
|
18
|
+
gap: 16,
|
|
19
|
+
px: 16
|
|
20
|
+
},
|
|
21
|
+
children: [l ? /* @__PURE__ */ e(i, {
|
|
22
|
+
divProps: { style: {
|
|
23
|
+
maxWidth: 150,
|
|
24
|
+
width: "100%"
|
|
25
|
+
} },
|
|
26
|
+
image: x
|
|
27
|
+
}) : /* @__PURE__ */ o(r, {
|
|
28
|
+
sx: {
|
|
29
|
+
position: "relative",
|
|
30
|
+
display: "inline-flex",
|
|
31
|
+
alignItems: "center",
|
|
32
|
+
justifyContent: "center"
|
|
33
|
+
},
|
|
34
|
+
children: [/* @__PURE__ */ e(i, {
|
|
35
|
+
divProps: { style: {
|
|
36
|
+
position: "absolute",
|
|
37
|
+
zIndex: 0
|
|
38
|
+
} },
|
|
39
|
+
image: d
|
|
40
|
+
}), /* @__PURE__ */ e(h, {
|
|
41
|
+
color: "primary",
|
|
42
|
+
name: "error",
|
|
43
|
+
size: 48,
|
|
44
|
+
sx: { zIndex: 1 }
|
|
45
|
+
})]
|
|
46
|
+
}), /* @__PURE__ */ o(r, {
|
|
47
|
+
sx: {
|
|
48
|
+
alignItems: "center",
|
|
49
|
+
gap: 2
|
|
50
|
+
},
|
|
51
|
+
children: [/* @__PURE__ */ e(y, {
|
|
52
|
+
bold: !0,
|
|
53
|
+
variant: "body1",
|
|
54
|
+
children: t?.error_heading
|
|
55
|
+
}), /* @__PURE__ */ e(f, {
|
|
56
|
+
color: "text.secondary",
|
|
57
|
+
sx: {
|
|
58
|
+
fontWeight: 400,
|
|
59
|
+
textAlign: "center"
|
|
60
|
+
},
|
|
61
|
+
variant: "subtitle2",
|
|
62
|
+
children: t?.error_message
|
|
63
|
+
})]
|
|
64
|
+
})]
|
|
65
|
+
}), /* @__PURE__ */ e(r, {
|
|
66
|
+
sx: {
|
|
67
|
+
pb: 16,
|
|
68
|
+
px: 16
|
|
69
|
+
},
|
|
70
|
+
children: /* @__PURE__ */ e(u, {
|
|
71
|
+
color: "primary",
|
|
72
|
+
onClick: a,
|
|
73
|
+
variant: "outlined",
|
|
74
|
+
children: t?.try_again
|
|
75
|
+
})
|
|
76
|
+
})]
|
|
77
|
+
})
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
export {
|
|
81
|
+
B as ErrorCard,
|
|
82
|
+
B as default
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
//# sourceMappingURL=ErrorCard.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorCard.es.js","names":[],"sources":["../../../src/insights-v2/components/ErrorCard.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport { Icon, P, Text } from '@mxenabled/mxui'\n\nimport { Button, Card, Stack } from '@mui/material'\n\nimport { BlobSVG } from '../../common/components/Error'\nimport { useAppConfig, useGlobalCopyStore } from '../../common'\nimport { ThemedSVGImage } from './chartblocks/ThemedSVGImage'\nimport { ReactComponent as ErrorViewCibc } from './shared/images/ErrorViewCibc.svg'\n\nconst CIBC_COPY_NAMESPACE = 'cibc_custom_copy'\n\nconst reloadPage = () => window.location.reload()\n\nexport interface ErrorCardProps {\n /** Force the CIBC illustration. When omitted, derived from the app's copy namespace. */\n isCibc?: boolean\n onRetry?: () => void\n}\n\n/**\n * Card-framed error state for the InsightsV2 feed.\n *\n * Reads its copy from the experiences copy store and derives the CIBC variant from\n * the app config, so the host only has to signal that an error occurred.\n */\nexport const ErrorCard = observer(({ isCibc, onRetry = reloadPage }: ErrorCardProps) => {\n const copy = useGlobalCopyStore()\n const { options } = useAppConfig()\n const general = copy.insights_feed?.general\n const showCibc = isCibc ?? options?.custom_copy_namespace === CIBC_COPY_NAMESPACE\n\n return (\n <Card sx={{ pt: 32 }}>\n {/* Figma 502:6630 — 32px gap between content and button section */}\n <Stack sx={{ gap: 32 }}>\n <Stack sx={{ alignItems: 'center', gap: 16, px: 16 }}>\n {showCibc ? (\n <ThemedSVGImage\n divProps={{ style: { maxWidth: 150, width: '100%' } }}\n image={ErrorViewCibc}\n />\n ) : (\n <Stack\n sx={{\n position: 'relative',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n }}\n >\n <ThemedSVGImage\n divProps={{ style: { position: 'absolute', zIndex: 0 } }}\n image={BlobSVG}\n />\n <Icon color=\"primary\" name={'error'} size={48} sx={{ zIndex: 1 }} />\n </Stack>\n )}\n\n <Stack sx={{ alignItems: 'center', gap: 2 }}>\n <Text bold={true} variant=\"body1\">\n {general?.error_heading}\n </Text>\n <P\n color=\"text.secondary\"\n sx={{ fontWeight: 400, textAlign: 'center' }}\n variant=\"subtitle2\"\n >\n {general?.error_message}\n </P>\n </Stack>\n </Stack>\n\n <Stack sx={{ pb: 16, px: 16 }}>\n <Button color=\"primary\" onClick={onRetry} variant=\"outlined\">\n {general?.try_again}\n </Button>\n </Stack>\n </Stack>\n </Card>\n )\n})\n\nexport default ErrorCard\n"],"mappings":";;;;;;;;AAWA,IAAM,IAAsB,oBAEtB,IAAA,MAAmB,OAAO,SAAS,OAAO,GAcnC,IAAY,EAAA,CAAU,EAAE,QAAA,GAAQ,SAAA,IAAU,EAAA,MAAiC;AACtF,QAAM,IAAO,EAAmB,GAC1B,EAAE,SAAA,EAAA,IAAY,EAAa,GAC3B,IAAU,EAAK,eAAe,SAC9B,IAAW,KAAU,GAAS,0BAA0B;AAE9D,SACE,gBAAA,EAAC,GAAD;AAAA,IAAM,IAAI,EAAE,IAAI,GAAG;AAAA,IAEjB,UAAA,gBAAA,EAAC,GAAD;AAAA,MAAO,IAAI,EAAE,KAAK,GAAG;AAAA,MAArB,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,QAAO,IAAI;AAAA,UAAE,YAAY;AAAA,UAAU,KAAK;AAAA,UAAI,IAAI;AAAA,QAAG;AAAA,QAAnD,UAAA,CACG,IACC,gBAAA,EAAC,GAAD;AAAA,UACE,UAAU,EAAE,OAAO;AAAA,YAAE,UAAU;AAAA,YAAK,OAAO;AAAA,UAAO,EAAE;AAAA,UACpD,OAAO;AAAA,QACR,CAAA,IAED,gBAAA,EAAC,GAAD;AAAA,UACE,IAAI;AAAA,YACF,UAAU;AAAA,YACV,SAAS;AAAA,YACT,YAAY;AAAA,YACZ,gBAAgB;AAAA,UAClB;AAAA,UANF,UAAA,CAQE,gBAAA,EAAC,GAAD;AAAA,YACE,UAAU,EAAE,OAAO;AAAA,cAAE,UAAU;AAAA,cAAY,QAAQ;AAAA,YAAE,EAAE;AAAA,YACvD,OAAO;AAAA,UACR,CAAA,GACD,gBAAA,EAAC,GAAD;AAAA,YAAM,OAAM;AAAA,YAAU,MAAM;AAAA,YAAS,MAAM;AAAA,YAAI,IAAI,EAAE,QAAQ,EAAE;AAAA,UAAI,CAAA,CAC9D;AAAA,QAGT,CAAA,GAAA,gBAAA,EAAC,GAAD;AAAA,UAAO,IAAI;AAAA,YAAE,YAAY;AAAA,YAAU,KAAK;AAAA,UAAE;AAAA,UAA1C,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,YAAM,MAAM;AAAA,YAAM,SAAQ;AAAA,YACvB,UAAA,GAAS;AAAA,UACN,CAAA,GACN,gBAAA,EAAC,GAAD;AAAA,YACE,OAAM;AAAA,YACN,IAAI;AAAA,cAAE,YAAY;AAAA,cAAK,WAAW;AAAA,YAAS;AAAA,YAC3C,SAAQ;AAAA,YAEP,UAAA,GAAS;AAAA,UACT,CAAA,CACE;AAAA,QACF,CAAA,CAAA;AAAA,MAEP,CAAA,GAAA,gBAAA,EAAC,GAAD;AAAA,QAAO,IAAI;AAAA,UAAE,IAAI;AAAA,UAAI,IAAI;AAAA,QAAG;AAAA,QAC1B,UAAA,gBAAA,EAAC,GAAD;AAAA,UAAQ,OAAM;AAAA,UAAU,SAAS;AAAA,UAAS,SAAQ;AAAA,UAC/C,UAAA,GAAS;AAAA,QACJ,CAAA;AAAA,MACH,CAAA,CACF;AAAA;EACH,CAAA;AAEV,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loading/placeholder state for the InsightsV2 feed.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors the existing `insights/.../CardLoading` design: a centered loading
|
|
5
|
+
* animation (gif). The accessible alt text is read from the experiences copy
|
|
6
|
+
* store so it stays localized — the host only has to signal that it is loading.
|
|
7
|
+
*/
|
|
8
|
+
export declare const LoadingCard: (() => import("react/jsx-runtime").JSX.Element) & {
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
export default LoadingCard;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useGlobalCopyStore as e } from "../../common/context/hooks.es.js";
|
|
2
|
+
import { observer as r } from "mobx-react-lite";
|
|
3
|
+
import a from "@mui/material/Stack";
|
|
4
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
5
|
+
var i = "https://content.moneydesktop.com/storage/MD_Assets/md/common/loading.gif", d = r(() => {
|
|
6
|
+
const o = e().insights_feed?.general?.loading;
|
|
7
|
+
return /* @__PURE__ */ t(a, {
|
|
8
|
+
sx: { alignItems: "center" },
|
|
9
|
+
children: /* @__PURE__ */ t("img", {
|
|
10
|
+
alt: o,
|
|
11
|
+
src: i,
|
|
12
|
+
style: {
|
|
13
|
+
marginBottom: 25,
|
|
14
|
+
height: 64,
|
|
15
|
+
width: 64
|
|
16
|
+
}
|
|
17
|
+
})
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
export {
|
|
21
|
+
d as LoadingCard,
|
|
22
|
+
d as default
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=LoadingCard.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingCard.es.js","names":[],"sources":["../../../src/insights-v2/components/LoadingCard.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Stack from '@mui/material/Stack'\n\nimport { useGlobalCopyStore } from '../../common'\n\nconst LOADING_GIF_URL = 'https://content.moneydesktop.com/storage/MD_Assets/md/common/loading.gif'\n\n/**\n * Loading/placeholder state for the InsightsV2 feed.\n *\n * Mirrors the existing `insights/.../CardLoading` design: a centered loading\n * animation (gif). The accessible alt text is read from the experiences copy\n * store so it stays localized — the host only has to signal that it is loading.\n */\nexport const LoadingCard = observer(() => {\n const copy = useGlobalCopyStore()\n const altLoadingText = copy.insights_feed?.general?.loading\n\n return (\n <Stack sx={{ alignItems: 'center' }}>\n <img\n alt={altLoadingText}\n src={LOADING_GIF_URL}\n style={{\n marginBottom: 25,\n height: 64,\n width: 64,\n }}\n />\n </Stack>\n )\n})\n\nexport default LoadingCard\n"],"mappings":";;;;AAMA,IAAM,IAAkB,4EASX,IAAc,EAAA,MAAe;AAExC,QAAM,IADO,EACU,EAAK,eAAe,SAAS;AAEpD,SACE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI,EAAE,YAAY,SAAS;AAAA,IAChC,UAAA,gBAAA,EAAC,OAAD;AAAA,MACE,KAAK;AAAA,MACL,KAAK;AAAA,MACL,OAAO;AAAA,QACL,cAAc;AAAA,QACd,QAAQ;AAAA,QACR,OAAO;AAAA,MACT;AAAA,IACD,CAAA;AAAA,EACI,CAAA;AAEX,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { forwardRef as e } from "react";
|
|
2
|
+
import { jsx as L, jsxs as C } from "react/jsx-runtime";
|
|
3
|
+
var r = (i, l) => /* @__PURE__ */ C("svg", {
|
|
4
|
+
alt: "",
|
|
5
|
+
width: "147px",
|
|
6
|
+
height: "104px",
|
|
7
|
+
viewBox: "0 0 256 256",
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
10
|
+
ref: l,
|
|
11
|
+
...i,
|
|
12
|
+
children: [/* @__PURE__ */ L("title", { children: "Icons/Illustrative/Gears1" }), /* @__PURE__ */ C("g", {
|
|
13
|
+
id: "Icons/Illustrative/Gears1",
|
|
14
|
+
stroke: "none",
|
|
15
|
+
strokeWidth: 1,
|
|
16
|
+
fill: "none",
|
|
17
|
+
fillRule: "evenodd",
|
|
18
|
+
children: [/* @__PURE__ */ L("circle", {
|
|
19
|
+
id: "Oval",
|
|
20
|
+
fill: "#F2F3F2",
|
|
21
|
+
cx: 128,
|
|
22
|
+
cy: 128,
|
|
23
|
+
r: 128
|
|
24
|
+
}), /* @__PURE__ */ C("g", {
|
|
25
|
+
id: "Group",
|
|
26
|
+
transform: "translate(42.000000, 38.000000)",
|
|
27
|
+
fillRule: "nonzero",
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ L("path", {
|
|
30
|
+
d: "M106.11,-0.000218413865 C107.642968,-0.0133183256 109.118435,0.582907809 110.211785,1.65750358 C111.305134,2.73209936 111.926796,4.19703062 111.94,5.73000001 L111.94,5.73000001 L111.94,14.26 C116.057784,15.2957977 120.000229,16.9334286 123.64,19.12 L123.64,19.12 L129.64,13.07 C131.902451,10.8198774 135.55755,10.8198774 137.82,13.07 L137.82,13.07 L144.82,20.07 C147.074462,22.3267544 147.074462,25.9832456 144.82,28.24 L144.82,28.24 L138.76,34.3 C140.939324,37.9422419 142.573338,41.8840905 143.61,46 L143.61,46 L152.18,46 C153.721605,45.9893289 155.203593,46.5949522 156.296512,47.6822371 C157.38943,48.7695221 158.002704,50.2483606 158.000009,51.79 L158.000009,51.79 L158.000009,61.69 C157.989428,63.2229629 157.370303,64.6889356 156.278833,65.7654023 C155.187364,66.841869 153.712962,67.4406455 152.18,67.43 L152.18,67.43 L143.61,67.43 C142.571461,71.5421335 140.937529,75.4804158 138.76,79.12 L138.76,79.12 L144.87,85.22 C147.124462,87.4767544 147.124462,91.1332457 144.87,93.3900001 L144.87,93.3900001 L137.87,100.39 C135.60755,102.640123 131.952451,102.640123 129.69,100.39 L129.69,100.39 L123.63,94.3200001 C119.984367,96.4949311 116.043674,98.131834 111.93,99.1800001 L111.93,99.1800001 L111.93,107.74 C111.93,110.932206 109.342206,113.52 106.15,113.52 L106.15,113.52 L96.2600001,113.52 C93.0677942,113.52 90.4800001,110.932206 90.4800001,107.74 L90.4800001,107.74 L90.4800001,99.1800001 C86.3651225,98.1354485 82.4239217,96.4983343 78.78,94.3200001 L78.78,94.3200001 L72.72,100.39 C70.4575496,102.640123 66.8024505,102.640123 64.54,100.39 L64.54,100.39 L57.54,93.3900001 C56.4523907,92.3088247 55.8408343,90.8385692 55.8408343,89.305 C55.8408343,87.7714309 56.4523907,86.3011754 57.54,85.22 L57.54,85.22 L63.54,79.12 C61.3721395,75.4897739 59.7482054,71.5613358 58.72,67.46 L58.72,67.46 L50.15,67.46 C46.9577942,67.46 44.37,64.8722059 44.37,61.68 L44.37,61.68 L44.37,51.78 C44.37,48.5877942 46.9577942,46 50.15,46 L50.15,46 L58.69,46 C59.7312635,41.9013872 61.3651501,37.9766906 63.54,34.35 L63.54,34.35 L57.54,28.35 C56.4523907,27.2688246 55.8408343,25.7985692 55.8408343,24.265 C55.8408343,22.7314309 56.4523907,21.2611754 57.54,20.18 L57.54,20.18 L64.54,13.18 C66.7999116,10.9616363 70.4200885,10.9616363 72.68,13.18 L72.68,13.18 L78.74,19.18 C82.3805971,16.9997464 86.3230896,15.368835 90.4400001,14.34 L90.4400001,14.34 L90.4400001,5.78000001 C90.4400001,2.58779416 93.0277942,-0.000218413865 96.2200001,-0.000218413865 L96.2200001,-0.000218413865 Z M101.16,33.85 C88.5402935,33.85 78.31,44.0982021 78.31,56.74 C78.31,69.381798 88.5402935,79.63 101.16,79.63 C113.779707,79.63 124.01,69.381798 124.01,56.74 C124.01,44.0982021 113.779707,33.85 101.16,33.85 Z",
|
|
31
|
+
id: "Combined-Shape",
|
|
32
|
+
fill: "#C41F3E"
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ L("path", {
|
|
35
|
+
d: "M125.31,101.68 C126.663009,101.190465 128.156991,101.888254 128.65,103.24 L128.65,103.24 L129.98,106.88 C131.881968,106.682983 133.802585,106.767221 135.68,107.13 L135.68,107.13 L137.36,103.65 C137.974114,102.348051 139.523599,101.785414 140.83,102.39 L140.83,102.39 L144.83,104.28 C145.45764,104.570893 145.943478,105.099917 146.18,105.75 C146.410536,106.403106 146.378265,107.12024 146.09,107.75 L146.09,107.75 L144.45,111.25 C145.938487,112.457816 147.239344,113.879997 148.31,115.47 L148.31,115.47 L151.95,114.15 C152.60106,113.9061 153.323478,113.938609 153.95,114.24 C154.57764,114.530893 155.063478,115.059917 155.3,115.71 L155.3,115.71 L156.82,119.9 L156.8,119.9 C157.042025,120.555947 157.008571,121.281881 156.707242,121.912787 C156.405914,122.543694 155.86231,123.025975 155.2,123.25 L155.2,123.25 L151.57,124.58 C151.762006,126.482114 151.6778,128.402001 151.32,130.28 L151.32,130.28 L154.82,131.92 C155.44764,132.210893 155.933478,132.739917 156.17,133.39 C156.400536,134.043106 156.368265,134.76024 156.08,135.39 L156.08,135.39 L154.19,139.39 C153.899107,140.01764 153.370083,140.503478 152.72,140.74 C152.067374,140.973748 151.348994,140.941421 150.72,140.65 L150.72,140.65 L147.21,139.01 C146.00577,140.498247 144.586919,141.799141 143,142.87 L143,142.87 L144.35,146.52 C144.839535,147.873009 144.141747,149.366991 142.79,149.86 L142.79,149.86 L138.59,151.38 C137.940627,151.623555 137.220542,151.595411 136.59216,151.301915 C135.963777,151.008419 135.48002,150.47429 135.25,149.82 L135.25,149.82 L133.93,146.19 C132.024565,146.382273 130.10134,146.298069 128.22,145.94 L128.22,145.94 L126.59,149.44 C126.297704,150.070291 125.764434,150.55672 125.11,150.79 C124.457374,151.023748 123.738994,150.991421 123.11,150.7 L123.11,150.7 L119.11,148.81 C118.483388,148.51904 117.998342,147.990654 117.761941,147.34149 C117.52554,146.692325 117.557225,145.975766 117.85,145.35 L117.85,145.35 L119.48,141.84 C117.99911,140.627965 116.699271,139.210265 115.62,137.63 L115.62,137.63 L111.99,138.95 C110.636992,139.439535 109.143009,138.741746 108.65,137.39 L108.65,137.39 L107.12,133.19 C106.630465,131.836992 107.328254,130.343009 108.68,129.85 L108.68,129.85 L112.32,128.53 C112.122724,126.62471 112.20696,124.700758 112.57,122.82 L112.57,122.82 L109.06,121.19 C107.762385,120.571943 107.201268,119.026645 107.8,117.72 L107.8,117.72 L109.69,113.67 C110.303837,112.367488 111.856552,111.808152 113.16,112.42 L113.16,112.42 L116.66,114.05 C117.873171,112.566569 119.294557,111.266438 120.88,110.19 L120.88,110.19 L119.56,106.56 C119.317574,105.90955 119.346396,105.189009 119.64,104.56 C119.935033,103.931721 120.467319,103.44619 121.12,103.21 L121.12,103.21 Z M128.447599,116.83953 C123.095918,118.78421 120.337056,124.707495 122.285508,130.069558 C124.233961,135.43162 130.151888,138.201956 135.503569,136.257276 C140.85525,134.312597 143.614112,128.389311 141.66566,123.027249 C139.717208,117.665186 133.79928,114.89485 128.447599,116.83953 Z",
|
|
36
|
+
id: "Combined-Shape",
|
|
37
|
+
fill: "#C41F3E"
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ L("path", {
|
|
40
|
+
d: "M49.0033734,120.673794 L107.724759,161.167841 C110.229937,162.882581 111.95088,165.522716 112.508555,168.506883 C113.044781,171.376274 112.463214,174.337468 110.891371,176.786789 L110.698005,177.078212 C107.111197,182.279527 99.9870169,183.588344 94.785702,180.001537 L36.0313869,139.484783 L49.0033734,120.673794 Z M100.36,162.71 C96.3504128,162.71 93.1000001,165.960413 93.1000001,169.97 C93.1000001,173.979587 96.3504128,177.23 100.36,177.23 C104.369587,177.23 107.62,173.979587 107.62,169.97 C107.62,165.960413 104.369587,162.71 100.36,162.71 Z",
|
|
41
|
+
id: "Combined-Shape",
|
|
42
|
+
fill: "#8B1D41"
|
|
43
|
+
}),
|
|
44
|
+
/* @__PURE__ */ L("path", {
|
|
45
|
+
d: "M14.15,96.5100001 L35.84,111.51 L36.41,120.37 L31.47,127.54 L22.75,130.48 L1.06000001,115.49 C-1.8576625,129.410687 5.44846092,143.45713 18.5213637,149.060478 C31.5942664,154.663825 46.8049178,150.26859 54.8742555,138.556029 C62.9435933,126.843469 61.6315736,111.064983 51.7385773,100.846035 C41.845581,90.627086 26.1178984,88.8044491 14.15,96.4900001 L14.15,96.5100001 Z",
|
|
46
|
+
id: "Path",
|
|
47
|
+
fill: "#8B1D41"
|
|
48
|
+
})
|
|
49
|
+
]
|
|
50
|
+
})]
|
|
51
|
+
})]
|
|
52
|
+
}), d = e(r);
|
|
53
|
+
export {
|
|
54
|
+
d as ReactComponent
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
//# sourceMappingURL=ErrorViewCibc.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorViewCibc.es.js","names":[],"sources":["../../../../../src/insights-v2/components/shared/images/ErrorViewCibc.svg"],"sourcesContent":["import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst SvgErrorViewCibc = (props, ref) => /* @__PURE__ */ _jsxs(\"svg\", {\n\talt: \"\",\n\twidth: \"147px\",\n\theight: \"104px\",\n\tviewBox: \"0 0 256 256\",\n\txmlns: \"http://www.w3.org/2000/svg\",\n\txmlnsXlink: \"http://www.w3.org/1999/xlink\",\n\tref,\n\t...props,\n\tchildren: [/* @__PURE__ */ _jsx(\"title\", { children: \"Icons/Illustrative/Gears1\" }), /* @__PURE__ */ _jsxs(\"g\", {\n\t\tid: \"Icons/Illustrative/Gears1\",\n\t\tstroke: \"none\",\n\t\tstrokeWidth: 1,\n\t\tfill: \"none\",\n\t\tfillRule: \"evenodd\",\n\t\tchildren: [/* @__PURE__ */ _jsx(\"circle\", {\n\t\t\tid: \"Oval\",\n\t\t\tfill: \"#F2F3F2\",\n\t\t\tcx: 128,\n\t\t\tcy: 128,\n\t\t\tr: 128\n\t\t}), /* @__PURE__ */ _jsxs(\"g\", {\n\t\t\tid: \"Group\",\n\t\t\ttransform: \"translate(42.000000, 38.000000)\",\n\t\t\tfillRule: \"nonzero\",\n\t\t\tchildren: [\n\t\t\t\t/* @__PURE__ */ _jsx(\"path\", {\n\t\t\t\t\td: \"M106.11,-0.000218413865 C107.642968,-0.0133183256 109.118435,0.582907809 110.211785,1.65750358 C111.305134,2.73209936 111.926796,4.19703062 111.94,5.73000001 L111.94,5.73000001 L111.94,14.26 C116.057784,15.2957977 120.000229,16.9334286 123.64,19.12 L123.64,19.12 L129.64,13.07 C131.902451,10.8198774 135.55755,10.8198774 137.82,13.07 L137.82,13.07 L144.82,20.07 C147.074462,22.3267544 147.074462,25.9832456 144.82,28.24 L144.82,28.24 L138.76,34.3 C140.939324,37.9422419 142.573338,41.8840905 143.61,46 L143.61,46 L152.18,46 C153.721605,45.9893289 155.203593,46.5949522 156.296512,47.6822371 C157.38943,48.7695221 158.002704,50.2483606 158.000009,51.79 L158.000009,51.79 L158.000009,61.69 C157.989428,63.2229629 157.370303,64.6889356 156.278833,65.7654023 C155.187364,66.841869 153.712962,67.4406455 152.18,67.43 L152.18,67.43 L143.61,67.43 C142.571461,71.5421335 140.937529,75.4804158 138.76,79.12 L138.76,79.12 L144.87,85.22 C147.124462,87.4767544 147.124462,91.1332457 144.87,93.3900001 L144.87,93.3900001 L137.87,100.39 C135.60755,102.640123 131.952451,102.640123 129.69,100.39 L129.69,100.39 L123.63,94.3200001 C119.984367,96.4949311 116.043674,98.131834 111.93,99.1800001 L111.93,99.1800001 L111.93,107.74 C111.93,110.932206 109.342206,113.52 106.15,113.52 L106.15,113.52 L96.2600001,113.52 C93.0677942,113.52 90.4800001,110.932206 90.4800001,107.74 L90.4800001,107.74 L90.4800001,99.1800001 C86.3651225,98.1354485 82.4239217,96.4983343 78.78,94.3200001 L78.78,94.3200001 L72.72,100.39 C70.4575496,102.640123 66.8024505,102.640123 64.54,100.39 L64.54,100.39 L57.54,93.3900001 C56.4523907,92.3088247 55.8408343,90.8385692 55.8408343,89.305 C55.8408343,87.7714309 56.4523907,86.3011754 57.54,85.22 L57.54,85.22 L63.54,79.12 C61.3721395,75.4897739 59.7482054,71.5613358 58.72,67.46 L58.72,67.46 L50.15,67.46 C46.9577942,67.46 44.37,64.8722059 44.37,61.68 L44.37,61.68 L44.37,51.78 C44.37,48.5877942 46.9577942,46 50.15,46 L50.15,46 L58.69,46 C59.7312635,41.9013872 61.3651501,37.9766906 63.54,34.35 L63.54,34.35 L57.54,28.35 C56.4523907,27.2688246 55.8408343,25.7985692 55.8408343,24.265 C55.8408343,22.7314309 56.4523907,21.2611754 57.54,20.18 L57.54,20.18 L64.54,13.18 C66.7999116,10.9616363 70.4200885,10.9616363 72.68,13.18 L72.68,13.18 L78.74,19.18 C82.3805971,16.9997464 86.3230896,15.368835 90.4400001,14.34 L90.4400001,14.34 L90.4400001,5.78000001 C90.4400001,2.58779416 93.0277942,-0.000218413865 96.2200001,-0.000218413865 L96.2200001,-0.000218413865 Z M101.16,33.85 C88.5402935,33.85 78.31,44.0982021 78.31,56.74 C78.31,69.381798 88.5402935,79.63 101.16,79.63 C113.779707,79.63 124.01,69.381798 124.01,56.74 C124.01,44.0982021 113.779707,33.85 101.16,33.85 Z\",\n\t\t\t\t\tid: \"Combined-Shape\",\n\t\t\t\t\tfill: \"#C41F3E\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ _jsx(\"path\", {\n\t\t\t\t\td: \"M125.31,101.68 C126.663009,101.190465 128.156991,101.888254 128.65,103.24 L128.65,103.24 L129.98,106.88 C131.881968,106.682983 133.802585,106.767221 135.68,107.13 L135.68,107.13 L137.36,103.65 C137.974114,102.348051 139.523599,101.785414 140.83,102.39 L140.83,102.39 L144.83,104.28 C145.45764,104.570893 145.943478,105.099917 146.18,105.75 C146.410536,106.403106 146.378265,107.12024 146.09,107.75 L146.09,107.75 L144.45,111.25 C145.938487,112.457816 147.239344,113.879997 148.31,115.47 L148.31,115.47 L151.95,114.15 C152.60106,113.9061 153.323478,113.938609 153.95,114.24 C154.57764,114.530893 155.063478,115.059917 155.3,115.71 L155.3,115.71 L156.82,119.9 L156.8,119.9 C157.042025,120.555947 157.008571,121.281881 156.707242,121.912787 C156.405914,122.543694 155.86231,123.025975 155.2,123.25 L155.2,123.25 L151.57,124.58 C151.762006,126.482114 151.6778,128.402001 151.32,130.28 L151.32,130.28 L154.82,131.92 C155.44764,132.210893 155.933478,132.739917 156.17,133.39 C156.400536,134.043106 156.368265,134.76024 156.08,135.39 L156.08,135.39 L154.19,139.39 C153.899107,140.01764 153.370083,140.503478 152.72,140.74 C152.067374,140.973748 151.348994,140.941421 150.72,140.65 L150.72,140.65 L147.21,139.01 C146.00577,140.498247 144.586919,141.799141 143,142.87 L143,142.87 L144.35,146.52 C144.839535,147.873009 144.141747,149.366991 142.79,149.86 L142.79,149.86 L138.59,151.38 C137.940627,151.623555 137.220542,151.595411 136.59216,151.301915 C135.963777,151.008419 135.48002,150.47429 135.25,149.82 L135.25,149.82 L133.93,146.19 C132.024565,146.382273 130.10134,146.298069 128.22,145.94 L128.22,145.94 L126.59,149.44 C126.297704,150.070291 125.764434,150.55672 125.11,150.79 C124.457374,151.023748 123.738994,150.991421 123.11,150.7 L123.11,150.7 L119.11,148.81 C118.483388,148.51904 117.998342,147.990654 117.761941,147.34149 C117.52554,146.692325 117.557225,145.975766 117.85,145.35 L117.85,145.35 L119.48,141.84 C117.99911,140.627965 116.699271,139.210265 115.62,137.63 L115.62,137.63 L111.99,138.95 C110.636992,139.439535 109.143009,138.741746 108.65,137.39 L108.65,137.39 L107.12,133.19 C106.630465,131.836992 107.328254,130.343009 108.68,129.85 L108.68,129.85 L112.32,128.53 C112.122724,126.62471 112.20696,124.700758 112.57,122.82 L112.57,122.82 L109.06,121.19 C107.762385,120.571943 107.201268,119.026645 107.8,117.72 L107.8,117.72 L109.69,113.67 C110.303837,112.367488 111.856552,111.808152 113.16,112.42 L113.16,112.42 L116.66,114.05 C117.873171,112.566569 119.294557,111.266438 120.88,110.19 L120.88,110.19 L119.56,106.56 C119.317574,105.90955 119.346396,105.189009 119.64,104.56 C119.935033,103.931721 120.467319,103.44619 121.12,103.21 L121.12,103.21 Z M128.447599,116.83953 C123.095918,118.78421 120.337056,124.707495 122.285508,130.069558 C124.233961,135.43162 130.151888,138.201956 135.503569,136.257276 C140.85525,134.312597 143.614112,128.389311 141.66566,123.027249 C139.717208,117.665186 133.79928,114.89485 128.447599,116.83953 Z\",\n\t\t\t\t\tid: \"Combined-Shape\",\n\t\t\t\t\tfill: \"#C41F3E\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ _jsx(\"path\", {\n\t\t\t\t\td: \"M49.0033734,120.673794 L107.724759,161.167841 C110.229937,162.882581 111.95088,165.522716 112.508555,168.506883 C113.044781,171.376274 112.463214,174.337468 110.891371,176.786789 L110.698005,177.078212 C107.111197,182.279527 99.9870169,183.588344 94.785702,180.001537 L36.0313869,139.484783 L49.0033734,120.673794 Z M100.36,162.71 C96.3504128,162.71 93.1000001,165.960413 93.1000001,169.97 C93.1000001,173.979587 96.3504128,177.23 100.36,177.23 C104.369587,177.23 107.62,173.979587 107.62,169.97 C107.62,165.960413 104.369587,162.71 100.36,162.71 Z\",\n\t\t\t\t\tid: \"Combined-Shape\",\n\t\t\t\t\tfill: \"#8B1D41\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ _jsx(\"path\", {\n\t\t\t\t\td: \"M14.15,96.5100001 L35.84,111.51 L36.41,120.37 L31.47,127.54 L22.75,130.48 L1.06000001,115.49 C-1.8576625,129.410687 5.44846092,143.45713 18.5213637,149.060478 C31.5942664,154.663825 46.8049178,150.26859 54.8742555,138.556029 C62.9435933,126.843469 61.6315736,111.064983 51.7385773,100.846035 C41.845581,90.627086 26.1178984,88.8044491 14.15,96.4900001 L14.15,96.5100001 Z\",\n\t\t\t\t\tid: \"Path\",\n\t\t\t\t\tfill: \"#8B1D41\"\n\t\t\t\t})\n\t\t\t]\n\t\t})]\n\t})]\n});\nconst ForwardRef = forwardRef(SvgErrorViewCibc);\nexport { ForwardRef as ReactComponent };\n"],"mappings":";;AAGA,IAAM,IAAA,CAAoB,GAAO,MAAwB,gBAAA,EAAM,OAAO;AAAA,EACrE,KAAK;AAAA,EACL,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,KAAA;AAAA,EACA,GAAG;AAAA,EACH,UAAU,CAAiB,gBAAA,EAAK,SAAS,EAAE,UAAU,4BAA4B,CAAC,GAAmB,gBAAA,EAAM,KAAK;AAAA,IAC/G,IAAI;AAAA,IACJ,QAAQ;AAAA,IACR,aAAa;AAAA,IACb,MAAM;AAAA,IACN,UAAU;AAAA,IACV,UAAU,CAAiB,gBAAA,EAAK,UAAU;AAAA,MACzC,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,GAAG;AAAA,IACJ,CAAC,GAAmB,gBAAA,EAAM,KAAK;AAAA,MAC9B,IAAI;AAAA,MACJ,WAAW;AAAA,MACX,UAAU;AAAA,MACV,UAAU;AAAA,QACO,gBAAA,EAAK,QAAQ;AAAA,UAC5B,GAAG;AAAA,UACH,IAAI;AAAA,UACJ,MAAM;AAAA,QACP,CAAC;AAAA,QACe,gBAAA,EAAK,QAAQ;AAAA,UAC5B,GAAG;AAAA,UACH,IAAI;AAAA,UACJ,MAAM;AAAA,QACP,CAAC;AAAA,QACe,gBAAA,EAAK,QAAQ;AAAA,UAC5B,GAAG;AAAA,UACH,IAAI;AAAA,UACJ,MAAM;AAAA,QACP,CAAC;AAAA,QACe,gBAAA,EAAK,QAAQ;AAAA,UAC5B,GAAG;AAAA,UACH,IAAI;AAAA,UACJ,MAAM;AAAA,QACP,CAAC;AAAA,MACF;AAAA,IACD,CAAC,CAAC;AAAA,EACH,CAAC,CAAC;AACH,CAAC,GACK,IAAa,EAAW,CAAgB"}
|
|
@@ -3,6 +3,8 @@ export { default as AccountHeroCard } from './components/AccountHeroCard';
|
|
|
3
3
|
export { default as AmountPill } from './components/AmountPill';
|
|
4
4
|
export { default as DesignateEmergencySavingsCard, type DesignateEmergencySavingsOption, } from './components/DesignateEmergencySavingsCard';
|
|
5
5
|
export { default as BaseLayout } from './components/BaseLayout';
|
|
6
|
+
export { default as ErrorCard, type ErrorCardProps } from './components/ErrorCard';
|
|
7
|
+
export { default as LoadingCard } from './components/LoadingCard';
|
|
6
8
|
export { default as StatusMessageCard } from './components/StatusMessageCard';
|
|
7
9
|
export { default as TransactionListCard, type FooterRow } from './components/TransactionListCard';
|
|
8
10
|
export { default as InsightTransactionRow, type InsightTransactionRowProps, } from './components/InsightTransactionRow';
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { BAR_CHART_VARIANTS as
|
|
1
|
+
import { BAR_CHART_VARIANTS as o, barChartVariant as m, buildChartData as t, buildDataSeries as i } from "./blocks/ChartBlocks/BarchartBlock/utils.es.js";
|
|
2
2
|
import { BarchartBlock as p } from "./blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js";
|
|
3
3
|
import { DoubleBarChartBlock as e } from "./blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js";
|
|
4
4
|
import c from "./blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
|
|
5
5
|
import l from "./blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import d from "./blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
|
|
7
|
+
import B from "./blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
|
|
8
8
|
import k from "./components/TransferLogoCard.es.js";
|
|
9
9
|
import S from "./blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js";
|
|
10
10
|
import { BudgetBlock as b } from "./blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
|
|
11
|
-
import
|
|
11
|
+
import L from "./components/SaveAnExtraCard.es.js";
|
|
12
12
|
import v from "./blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
|
|
13
13
|
import I from "./components/InsightTransactionRow.es.js";
|
|
14
14
|
import y from "./components/TransactionListCard.es.js";
|
|
15
|
-
import { CategoryTransactionsBlock as
|
|
16
|
-
import { SVGImageBlock as
|
|
17
|
-
import
|
|
15
|
+
import { CategoryTransactionsBlock as M } from "./blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
|
|
16
|
+
import { SVGImageBlock as R } from "./blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
|
|
17
|
+
import x from "./components/AccountHeroCard.es.js";
|
|
18
18
|
import F from "./components/AmountPill.es.js";
|
|
19
19
|
import G from "./components/DesignateEmergencySavingsCard.es.js";
|
|
20
20
|
import { useBeatActions as U } from "./beatActions.es.js";
|
|
@@ -23,57 +23,61 @@ import { InsightOptionsMenu as J } from "./components/InsightOptionsMenu.es.js";
|
|
|
23
23
|
import { FeedbackBar as Q } from "./components/FeedbackBar.es.js";
|
|
24
24
|
import X from "./components/FeedbackDialog.es.js";
|
|
25
25
|
import { DismissInsightDialog as Z } from "./components/DismissInsightDialog.es.js";
|
|
26
|
-
import { HiddenConfirmationCard as
|
|
27
|
-
import {
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
26
|
+
import { HiddenConfirmationCard as rr } from "./components/HiddenConfirmationCard.es.js";
|
|
27
|
+
import { ErrorCard as mr } from "./components/ErrorCard.es.js";
|
|
28
|
+
import { LoadingCard as ir } from "./components/LoadingCard.es.js";
|
|
29
|
+
import { ObsolesceBanner as pr } from "./components/ObsolesceBanner.es.js";
|
|
30
|
+
import er from "./components/BaseLayout.es.js";
|
|
31
|
+
import cr from "./components/StatusMessageCard.es.js";
|
|
32
|
+
import lr from "./components/LogoTile.es.js";
|
|
33
|
+
import dr from "./components/LogoClusterCard.es.js";
|
|
34
|
+
import Br from "./components/MerchantHighlightCard.es.js";
|
|
35
|
+
import kr from "./components/P2PLogoStack.es.js";
|
|
36
|
+
import Sr from "./components/SavingsOpportunityCard.es.js";
|
|
37
|
+
import br from "./components/StatusPill.es.js";
|
|
38
|
+
import Lr from "./components/SubscriptionHeroCard.es.js";
|
|
39
|
+
import vr from "./components/UpcomingBillCard.es.js";
|
|
38
40
|
export {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
B as AccountBlock,
|
|
42
|
+
x as AccountHeroCard,
|
|
41
43
|
S as AccountSwitchBlock,
|
|
42
44
|
F as AmountPill,
|
|
43
|
-
|
|
45
|
+
o as BAR_CHART_VARIANTS,
|
|
44
46
|
p as BarchartBlock,
|
|
45
|
-
|
|
47
|
+
er as BaseLayout,
|
|
46
48
|
b as BudgetBlock,
|
|
47
|
-
|
|
49
|
+
M as CategoryTransactionsBlock,
|
|
48
50
|
G as DesignateEmergencySavingsCard,
|
|
49
51
|
Z as DismissInsightDialog,
|
|
50
52
|
l as DonutChartBlock,
|
|
51
53
|
e as DoubleBarChartBlock,
|
|
52
|
-
|
|
54
|
+
d as DoubleProgressBarBlock,
|
|
55
|
+
mr as ErrorCard,
|
|
53
56
|
Q as FeedbackBar,
|
|
54
57
|
X as FeedbackDialog,
|
|
55
|
-
|
|
58
|
+
rr as HiddenConfirmationCard,
|
|
56
59
|
J as InsightOptionsMenu,
|
|
57
60
|
I as InsightTransactionRow,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
ir as LoadingCard,
|
|
62
|
+
dr as LogoClusterCard,
|
|
63
|
+
lr as LogoTile,
|
|
64
|
+
Br as MerchantHighlightCard,
|
|
65
|
+
pr as ObsolesceBanner,
|
|
62
66
|
q as OverflowMenu,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
67
|
+
kr as P2PLogoStack,
|
|
68
|
+
R as SVGImageBlock,
|
|
69
|
+
L as SaveAnExtraCard,
|
|
66
70
|
v as SaveExtraBlock,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
71
|
+
Sr as SavingsOpportunityCard,
|
|
72
|
+
cr as StatusMessageCard,
|
|
73
|
+
br as StatusPill,
|
|
70
74
|
c as StepChartBlock,
|
|
71
|
-
|
|
75
|
+
Lr as SubscriptionHeroCard,
|
|
72
76
|
y as TransactionListCard,
|
|
73
77
|
k as TransferLogoCard,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
78
|
+
vr as UpcomingBillCard,
|
|
79
|
+
m as barChartVariant,
|
|
80
|
+
t as buildChartData,
|
|
77
81
|
i as buildDataSeries,
|
|
78
82
|
U as useBeatActions
|
|
79
83
|
};
|