@mx-cartographer/experiences 9.1.1 → 9.1.3-alpha.al0
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 +4 -0
- package/dist/{AccountDetailsDrawer-C1hhmlmI.mjs → AccountDetailsDrawer-Cq4kiiKD.mjs} +4 -4
- package/dist/{AccountDetailsDrawer-C1hhmlmI.mjs.map → AccountDetailsDrawer-Cq4kiiKD.mjs.map} +1 -1
- package/dist/{Analytics-WeZYytR0.mjs → Analytics-D-jdcL72.mjs} +3 -3
- package/dist/Analytics-D-jdcL72.mjs.map +1 -0
- package/dist/{EmbeddedCard-DH8vQ3qN.mjs → EmbeddedCard-DCOQnTz-.mjs} +2 -2
- package/dist/{EmbeddedCard-DH8vQ3qN.mjs.map → EmbeddedCard-DCOQnTz-.mjs.map} +1 -1
- package/dist/{ExportCsvAction-C9KWH3Az.mjs → ExportCsvAction-C-IisDcv.mjs} +2 -2
- package/dist/{ExportCsvAction-C9KWH3Az.mjs.map → ExportCsvAction-C-IisDcv.mjs.map} +1 -1
- package/dist/{Help-aERwhajy.mjs → Help-zVZdcmlk.mjs} +2 -2
- package/dist/{Help-aERwhajy.mjs.map → Help-zVZdcmlk.mjs.map} +1 -1
- package/dist/{ManageIncome-Be9WHv-s.mjs → ManageIncome-B_8i71mE.mjs} +5 -5
- package/dist/{ManageIncome-Be9WHv-s.mjs.map → ManageIncome-B_8i71mE.mjs.map} +1 -1
- package/dist/{RecurringSettings-kRqAViNn.mjs → RecurringSettings-hs0YUp83.mjs} +3 -3
- package/dist/{RecurringSettings-kRqAViNn.mjs.map → RecurringSettings-hs0YUp83.mjs.map} +1 -1
- package/dist/{TransactionDetails-roZ5xLq8.mjs → TransactionDetails-DT-MQqOB.mjs} +3 -3
- package/dist/{TransactionDetails-roZ5xLq8.mjs.map → TransactionDetails-DT-MQqOB.mjs.map} +1 -1
- package/dist/{WidgetContainer-DJnp6t6c.mjs → WidgetContainer-CjdCY4sj.mjs} +21 -21
- package/dist/WidgetContainer-CjdCY4sj.mjs.map +1 -0
- package/dist/accounts/index.es.js +4 -4
- package/dist/budgets/index.es.js +5 -5
- package/dist/cashflow/index.es.js +6 -6
- package/dist/common/components/daterangeselector/DateRangeSelector.d.ts +5 -0
- package/dist/common/index.es.js +2 -2
- package/dist/dashboard/index.es.js +93 -71
- package/dist/dashboard/index.es.js.map +1 -1
- package/dist/debts/index.es.js +2 -2
- package/dist/finstrong/index.es.js +4 -4
- package/dist/goals/index.es.js +2 -2
- package/dist/help/index.es.js +2 -2
- package/dist/insights/index.es.js +2 -2
- package/dist/investments/index.es.js +2 -2
- package/dist/networth/index.es.js +78 -76
- package/dist/networth/index.es.js.map +1 -1
- package/dist/recurringtransactions/index.es.js +6 -6
- package/dist/settings/index.es.js +2 -2
- package/dist/spending/index.es.js +4 -4
- package/dist/transactions/index.es.js +7 -7
- package/dist/trends/index.es.js +5 -5
- package/package.json +1 -1
- package/dist/Analytics-WeZYytR0.mjs.map +0 -1
- package/dist/WidgetContainer-DJnp6t6c.mjs.map +0 -1
|
@@ -16,8 +16,8 @@ import { a as se, u as le, f as Re, i as Ce, W as xe } from "./hooks-97sNJ_lf.mj
|
|
|
16
16
|
import { addMonths as ee } from "date-fns/addMonths";
|
|
17
17
|
import { addDays as De } from "date-fns/addDays";
|
|
18
18
|
import { addYears as te } from "date-fns/addYears";
|
|
19
|
-
import { differenceInCalendarDays as
|
|
20
|
-
import { endOfDay as
|
|
19
|
+
import { differenceInCalendarDays as ke } from "date-fns/differenceInCalendarDays";
|
|
20
|
+
import { endOfDay as ye } from "date-fns/endOfDay";
|
|
21
21
|
import { endOfMonth as W } from "date-fns/endOfMonth";
|
|
22
22
|
import { endOfToday as ae } from "date-fns/endOfToday";
|
|
23
23
|
import { endOfYear as Te } from "date-fns/endOfYear";
|
|
@@ -41,7 +41,7 @@ import { u as de } from "./useScreenSize-mWpmnh5w.mjs";
|
|
|
41
41
|
import { f as M, D as P } from "./DateFormats-HudZ3Bjs.mjs";
|
|
42
42
|
import { L as Ge } from "./Loader-CxeBwuPG.mjs";
|
|
43
43
|
import He from "@mui/material/useMediaQuery";
|
|
44
|
-
import { A as ne } from "./Analytics-
|
|
44
|
+
import { A as ne } from "./Analytics-D-jdcL72.mjs";
|
|
45
45
|
const We = (n) => {
|
|
46
46
|
const { isDesktop: d, isMobile: a, isSmallTablet: m, isTablet: r } = de(n), s = He("(min-width:900px)"), _ = 24;
|
|
47
47
|
let l = 48, D = 32, g = 0, c = "h1", R = !1;
|
|
@@ -79,7 +79,7 @@ const We = (n) => {
|
|
|
79
79
|
shouldShrinkToIcon: r = !0,
|
|
80
80
|
variant: s = "outlined"
|
|
81
81
|
}) => {
|
|
82
|
-
const _ = Be(), { isMobile: l } = de(), { announce: D, ariaLive: g } = Ne(), [c, R] = p.useState(m), [o, S] = p.useState(a.dateRangePickerCopy.dateRangeThisMonth), [C, L] = p.useState(c), [E,
|
|
82
|
+
const _ = Be(), { isMobile: l } = de(), { announce: D, ariaLive: g } = Ne(), [c, R] = p.useState(m), [o, S] = p.useState(a.dateRangePickerCopy.dateRangeThisMonth), [C, L] = p.useState(c), [E, k] = p.useState(!1), [j, A] = p.useState(!0), [y, w] = p.useState(6), B = {
|
|
83
83
|
buttons: [
|
|
84
84
|
{ ariaLabel: "3 Months", label: "3M", value: 3 },
|
|
85
85
|
{ ariaLabel: "6 Months", label: "6M", value: 6 },
|
|
@@ -97,10 +97,10 @@ const We = (n) => {
|
|
|
97
97
|
R(m), L(m);
|
|
98
98
|
}, [m]), p.useEffect(() => {
|
|
99
99
|
(s === "timeframebuttons" || s === "timeframetabs") && n.onRangeChanged(V());
|
|
100
|
-
}, [
|
|
100
|
+
}, [y]);
|
|
101
101
|
const V = () => {
|
|
102
102
|
const t = W(ae());
|
|
103
|
-
return [W(K(t,
|
|
103
|
+
return [W(K(t, y)), t];
|
|
104
104
|
}, N = (t) => {
|
|
105
105
|
const [i, u] = c, f = t === "previous";
|
|
106
106
|
let b;
|
|
@@ -116,7 +116,7 @@ const We = (n) => {
|
|
|
116
116
|
f ? re(v, 1) : te(v, 1)
|
|
117
117
|
];
|
|
118
118
|
} else {
|
|
119
|
-
const T =
|
|
119
|
+
const T = ke(u, i), v = f ? Se : De;
|
|
120
120
|
b = [v(i, T), v(u, T)];
|
|
121
121
|
}
|
|
122
122
|
R(b), n.onRangeChanged(b);
|
|
@@ -126,10 +126,10 @@ const We = (n) => {
|
|
|
126
126
|
), n.onRangeChanged(C);
|
|
127
127
|
}, I = (t, i) => {
|
|
128
128
|
t[1] = t[1] ?? t[0];
|
|
129
|
-
const u = [t[0], t[1] ?
|
|
129
|
+
const u = [t[0], t[1] ? ye(t[1]) : t[1]], f = M(u[0], P.MONTH_DAY_YEAR), b = M(u[1], P.MONTH_DAY_YEAR);
|
|
130
130
|
L(u), S(i), D(`${a.dateRangeEditTitle}: ${f} - ${b}`);
|
|
131
131
|
}, G = (t) => {
|
|
132
|
-
w(t);
|
|
132
|
+
w(t), n.onTimeframeClick?.(t);
|
|
133
133
|
};
|
|
134
134
|
return /* @__PURE__ */ h(oe, { className: "mx-cmn-date-range-selector", m: 4, children: [
|
|
135
135
|
/* @__PURE__ */ h(
|
|
@@ -179,7 +179,7 @@ const We = (n) => {
|
|
|
179
179
|
{
|
|
180
180
|
"aria-disabled": n.shouldDisablePicker,
|
|
181
181
|
color: d,
|
|
182
|
-
onClick: () => n.shouldDisablePicker ? null :
|
|
182
|
+
onClick: () => n.shouldDisablePicker ? null : k(!0),
|
|
183
183
|
startIcon: /* @__PURE__ */ e(x, { name: "calendar_month", size: 20 }),
|
|
184
184
|
sx: {
|
|
185
185
|
p: l ? 0 : 8
|
|
@@ -212,7 +212,7 @@ const We = (n) => {
|
|
|
212
212
|
color: d,
|
|
213
213
|
exclusive: !0,
|
|
214
214
|
orientation: "horizontal",
|
|
215
|
-
value:
|
|
215
|
+
value: y,
|
|
216
216
|
children: B.buttons.map((t) => /* @__PURE__ */ e(
|
|
217
217
|
Ae,
|
|
218
218
|
{
|
|
@@ -232,7 +232,7 @@ const We = (n) => {
|
|
|
232
232
|
indicatorColor: "primary",
|
|
233
233
|
onChange: (t, i) => G(i),
|
|
234
234
|
textColor: "primary",
|
|
235
|
-
value:
|
|
235
|
+
value: y,
|
|
236
236
|
variant: "fullWidth",
|
|
237
237
|
children: B.tabs.map((t) => /* @__PURE__ */ e(
|
|
238
238
|
Ye,
|
|
@@ -253,9 +253,9 @@ const We = (n) => {
|
|
|
253
253
|
{
|
|
254
254
|
ariaLabelClose: a.dateRangeCloseAria,
|
|
255
255
|
isOpen: E,
|
|
256
|
-
onClose: () =>
|
|
256
|
+
onClose: () => k(!1),
|
|
257
257
|
onPrimaryAction: () => {
|
|
258
|
-
O(),
|
|
258
|
+
O(), k(!1);
|
|
259
259
|
},
|
|
260
260
|
primaryText: a.dateRangeEditApply,
|
|
261
261
|
title: a.dateRangeEditTitle,
|
|
@@ -279,7 +279,7 @@ const We = (n) => {
|
|
|
279
279
|
{
|
|
280
280
|
copy: { title: a.dateRangeEditTitle },
|
|
281
281
|
isOpen: !0,
|
|
282
|
-
onClose: () =>
|
|
282
|
+
onClose: () => k(!1),
|
|
283
283
|
onPrimaryAction: () => O(),
|
|
284
284
|
primaryText: a.dateRangeEditApply,
|
|
285
285
|
sx: {
|
|
@@ -358,7 +358,7 @@ const We = (n) => {
|
|
|
358
358
|
sx: S = {},
|
|
359
359
|
title: C = ""
|
|
360
360
|
}) => {
|
|
361
|
-
const [L, { height: E, width:
|
|
361
|
+
const [L, { height: E, width: k }] = J(), [j, { height: A, width: y }] = J(), { onEvent: w } = Re(), {
|
|
362
362
|
actionsFlex: B,
|
|
363
363
|
containerSquareCorners: V,
|
|
364
364
|
headerHeadingLevel: N,
|
|
@@ -370,7 +370,7 @@ const We = (n) => {
|
|
|
370
370
|
isDesktop: u,
|
|
371
371
|
isViewportAbove900: f,
|
|
372
372
|
slotSx: b
|
|
373
|
-
} = We(
|
|
373
|
+
} = We(k), { isCopyLoaded: T } = se(), { common: v } = le(), {
|
|
374
374
|
config: { display_widget_headings: me }
|
|
375
375
|
} = Ce(), ce = () => {
|
|
376
376
|
g && (g(), w(ne.WIDGET_BACK_CLICK));
|
|
@@ -378,9 +378,9 @@ const We = (n) => {
|
|
|
378
378
|
if (p.useEffect(() => {
|
|
379
379
|
w(ne.WIDGET_SIZE_CHANGED, {
|
|
380
380
|
height: A,
|
|
381
|
-
width:
|
|
381
|
+
width: y
|
|
382
382
|
});
|
|
383
|
-
}, [A,
|
|
383
|
+
}, [A, y]), !T)
|
|
384
384
|
return /* @__PURE__ */ e(Ge, {});
|
|
385
385
|
const ue = () => c && i && !f ? /* @__PURE__ */ e($, { color: "primary", onClick: c, sx: { p: 10 }, children: /* @__PURE__ */ e(x, { name: "menu_open", size: t, sx: { transform: "rotate(180deg)" } }) }) : g ? /* @__PURE__ */ e(
|
|
386
386
|
$,
|
|
@@ -469,7 +469,7 @@ const We = (n) => {
|
|
|
469
469
|
),
|
|
470
470
|
i && (o || X),
|
|
471
471
|
i && l && /* @__PURE__ */ e(ge, {}),
|
|
472
|
-
/* @__PURE__ */ e(he, { ref: j, sx: { p: 0 }, children: /* @__PURE__ */ e(xe, { availableHeight: E, availableWidth:
|
|
472
|
+
/* @__PURE__ */ e(he, { ref: j, sx: { p: 0 }, children: /* @__PURE__ */ e(xe, { availableHeight: E, availableWidth: k, children: m }) })
|
|
473
473
|
] })
|
|
474
474
|
}
|
|
475
475
|
);
|
|
@@ -480,4 +480,4 @@ export {
|
|
|
480
480
|
wt as W,
|
|
481
481
|
We as u
|
|
482
482
|
};
|
|
483
|
-
//# sourceMappingURL=WidgetContainer-
|
|
483
|
+
//# sourceMappingURL=WidgetContainer-CjdCY4sj.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetContainer-CjdCY4sj.mjs","sources":["../src/common/hooks/useWidgetHeaderStyles.ts","../src/common/components/daterangeselector/DateRangeSelector.tsx","../src/common/components/WidgetDateRangeSelector.tsx","../src/common/components/WidgetContainer.tsx"],"sourcesContent":["import useMediaQuery from '@mui/material/useMediaQuery'\n\nimport { useScreenSize } from './useScreenSize'\n\nexport const useWidgetHeaderStyles = (availableWidth?: number) => {\n const { isDesktop, isMobile, isSmallTablet, isTablet } = useScreenSize(availableWidth)\n const isViewportAbove900 = useMediaQuery('(min-width:900px)')\n\n const iconSize = 24\n\n // large variant\n // L & XL breakpoints\n let headerPaddingX = 48\n let headerPaddingTop = 32\n let headerPaddingBottom = 0\n let headerHeadingLevel: 'h1' | 'h2' | 'h3' = 'h1'\n let containerSquareCorners = false\n\n const isCompact = isMobile || isSmallTablet\n\n if (isTablet && !isSmallTablet) {\n // M breakpoint\n headerPaddingX = 24\n headerPaddingTop = 24\n headerHeadingLevel = 'h2'\n } else if (isCompact) {\n // small variant\n // S, XS, XXS breakpoints\n headerPaddingX = 8\n headerPaddingTop = 10\n headerPaddingBottom = 10\n headerHeadingLevel = 'h3'\n\n containerSquareCorners = true\n }\n\n const slotSx = {\n pb: isCompact ? 12 : 0,\n ...(isCompact && {\n px: headerPaddingX,\n '& .mx-cmn-date-range-selector': { m: 0, width: '100%' },\n '& .mx-cmn-date-range-selector > .MuiBox-root': { display: 'flex', justifyContent: 'center' },\n '& .MuiButtonGroup-root': { width: '100%' },\n '& .MuiButtonGroup-middleButton': { flex: 1 },\n '& .MuiToggleButtonGroup-root': { width: '100%', justifyContent: 'center' },\n }),\n }\n\n return {\n actionsFlex: isCompact ? 0 : 1,\n containerSquareCorners,\n headerHeadingLevel,\n headerPaddingBottom,\n headerPaddingTop,\n headerPaddingX,\n iconSize,\n isCompact,\n isDesktop,\n isViewportAbove900,\n slotSx,\n }\n}\n","import React from 'react'\nimport { addMonths } from 'date-fns/addMonths'\nimport { addDays } from 'date-fns/addDays'\nimport { addYears } from 'date-fns/addYears'\nimport { differenceInCalendarDays } from 'date-fns/differenceInCalendarDays'\nimport { endOfDay } from 'date-fns/endOfDay'\nimport { endOfMonth } from 'date-fns/endOfMonth'\nimport { endOfToday } from 'date-fns/endOfToday'\nimport { endOfYear } from 'date-fns/endOfYear'\nimport { startOfMonth } from 'date-fns/startOfMonth'\nimport { startOfToday } from 'date-fns/startOfToday'\nimport { startOfYear } from 'date-fns/startOfYear'\nimport { subMonths } from 'date-fns/subMonths'\nimport { subDays } from 'date-fns/subDays'\nimport { subYears } from 'date-fns/subYears'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport ButtonGroup from '@mui/material/ButtonGroup'\nimport Stack from '@mui/material/Stack'\nimport Tab from '@mui/material/Tab'\nimport Tabs from '@mui/material/Tabs'\nimport ToggleButton from '@mui/material/ToggleButton'\nimport ToggleButtonGroup from '@mui/material/ToggleButtonGroup'\nimport { useTheme } from '@mui/material/styles'\n\nimport { DateRange } from '@mui/x-date-pickers-pro'\n\nimport { DateRangePicker, DateRangePickerCopy, Icon, Text } from '@mxenabled/mxui'\n\nimport { DATE_FORMATS_INTL, formatDate } from '../../../core/constants'\nimport { useScreenSize } from '../../hooks'\nimport { useAriaLive } from '../../hooks/useAriaLive'\nimport Dialog from '../dialog/Dialog'\nimport Drawer from '../drawer/Drawer'\n\nexport type DateRangeSelectorCopy = {\n dateRangePickerCopy: DateRangePickerCopy\n dateRangeEditApply: string\n dateRangeEditTitle: string\n dateRangeNextAria: string\n dateRangePreviousAria: string\n dateRangeCloseAria: string\n}\n\nexport type CalendarActions = {\n shouldDisableNext?: boolean\n shouldDisablePrevious?: boolean\n shouldDisablePicker?: boolean\n onRangeChanged: (dateRange: DateRange<Date>) => void\n /**\n * Fires only when the user actively selects a timeframe button/tab (3M/6M/9M/1Y).\n * Unlike onRangeChanged, this does NOT fire on mount, so it's safe for click analytics.\n */\n onTimeframeClick?: (timeframe: number) => void\n}\n\nexport interface DateRangeSelectorProps {\n calendarActions: CalendarActions\n color?: 'primary' | 'secondary'\n copy: DateRangeSelectorCopy\n range?: DateRange<Date>\n shouldShrinkToIcon?: boolean\n variant?: 'outlined' | 'text' | 'readonly' | 'timeframebuttons' | 'timeframetabs'\n}\n\nexport type Timeframe = {\n ariaLabel?: string\n label: string\n value: number\n}\n\nconst DateRangeSelector: React.FC<DateRangeSelectorProps> = ({\n calendarActions,\n color = 'primary',\n copy,\n range = [startOfMonth(startOfToday()), endOfMonth(endOfToday())],\n shouldShrinkToIcon = true,\n variant = 'outlined',\n}) => {\n const theme = useTheme()\n const { isMobile } = useScreenSize()\n const { announce, ariaLive } = useAriaLive()\n\n const [dateRange, setDateRange] = React.useState<DateRange<Date>>(range)\n const [shortcut, setShortcut] = React.useState(copy.dateRangePickerCopy.dateRangeThisMonth)\n const [pickerDateRange, setPickerDateRange] = React.useState(dateRange)\n const [isPickerOpen, setIsPickerOpen] = React.useState(false)\n const [isMonthFormat, setIsMonthFormat] = React.useState(true)\n const [timeframe, setTimeframe] = React.useState(6)\n\n // TODO: put labels in mrs content and use as copy\n const timeframes = {\n buttons: [\n { ariaLabel: '3 Months', label: '3M', value: 3 },\n { ariaLabel: '6 Months', label: '6M', value: 6 },\n { ariaLabel: '9 Months', label: '9M', value: 9 },\n { ariaLabel: '1 Year', label: '1Y', value: 12 },\n ],\n tabs: [\n { label: '3 Months', value: 3 },\n { label: '6 Months', value: 6 },\n { label: '9 Months', value: 9 },\n { label: '1 Year', value: 12 },\n ],\n }\n\n React.useEffect(() => {\n setDateRange(range)\n setPickerDateRange(range)\n }, [range])\n\n // dates for timeframe buttons\n // using today's date as the end date, looks back 3, 6, 9, or 12 months\n React.useEffect(() => {\n if (variant === 'timeframebuttons' || variant === 'timeframetabs') {\n calendarActions.onRangeChanged(getTimeFrameDates())\n }\n }, [timeframe])\n\n const getTimeFrameDates = () => {\n const timeframeEndDate = endOfMonth(endOfToday()) as Date\n const timeframeBeginDate = endOfMonth(subMonths(timeframeEndDate, timeframe))\n return [timeframeBeginDate, timeframeEndDate] as DateRange<Date>\n }\n\n const handlePrevNextClick = (direction: 'previous' | 'next') => {\n const [beginDate, endDate] = dateRange as [Date, Date]\n const isPrev = direction === 'previous'\n\n let newRange: DateRange<Date>\n\n // Month-based shortcuts\n if (\n shortcut === copy.dateRangePickerCopy.dateRangeThisMonth ||\n shortcut === copy.dateRangePickerCopy.dateRangeLastMonth\n ) {\n newRange = [\n isPrev ? subMonths(beginDate, 1) : addMonths(beginDate, 1),\n endOfMonth(isPrev ? subMonths(endDate, 1) : addMonths(endDate, 1)),\n ]\n }\n // Year-based shortcuts\n else if (\n shortcut === copy.dateRangePickerCopy.dateRangeYTD ||\n shortcut === copy.dateRangePickerCopy.dateRangeLastYear\n ) {\n const startYear = startOfYear(beginDate)\n const endYear = endOfYear(beginDate)\n newRange = [\n isPrev ? subYears(startYear, 1) : addYears(startYear, 1),\n isPrev ? subYears(endYear, 1) : addYears(endYear, 1),\n ]\n }\n // Custom date range - shift by the current range duration\n else {\n const dayOffset = differenceInCalendarDays(endDate, beginDate)\n const dateModifier = isPrev ? subDays : addDays\n newRange = [dateModifier(beginDate, dayOffset), dateModifier(endDate, dayOffset)]\n }\n\n setDateRange(newRange)\n calendarActions.onRangeChanged(newRange)\n }\n\n const handleRangeChanged = () => {\n setDateRange(pickerDateRange)\n setIsMonthFormat(\n shortcut === copy.dateRangePickerCopy.dateRangeThisMonth ||\n shortcut === copy.dateRangePickerCopy.dateRangeLastMonth,\n )\n calendarActions.onRangeChanged(pickerDateRange)\n }\n\n const handleDataRangePickerChange = (range: DateRange<Date>, shortcut: string) => {\n range[1] = range[1] ?? range[0]\n\n const adjustedRange: DateRange<Date> = [range[0], range[1] ? endOfDay(range[1]) : range[1]]\n const startFormatted = formatDate(adjustedRange[0] as Date, DATE_FORMATS_INTL.MONTH_DAY_YEAR)\n const endFormatted = formatDate(adjustedRange[1] as Date, DATE_FORMATS_INTL.MONTH_DAY_YEAR)\n\n setPickerDateRange(adjustedRange)\n setShortcut(shortcut)\n announce(`${copy.dateRangeEditTitle}: ${startFormatted} - ${endFormatted}`)\n }\n\n const handleTimeframeChanged = (timeframe: number) => {\n setTimeframe(timeframe)\n calendarActions.onTimeframeClick?.(timeframe)\n }\n\n return (\n <Box className=\"mx-cmn-date-range-selector\" m={4}>\n <Box\n sx={{\n [theme.breakpoints.down('sm')]: {\n display: shouldShrinkToIcon ? 'none' : 'flex',\n justifyContent: 'center',\n },\n [theme.breakpoints.up('sm')]: { display: 'inline-flex' },\n }}\n >\n {variant === 'readonly' && (\n <Stack alignItems=\"center\" direction=\"row\" gap={8}>\n <Icon name=\"calendar_month\" size={24} />\n <Text bold={true}>\n {formatDate(pickerDateRange[0] as Date, DATE_FORMATS_INTL.MONTH_DAY)}\n </Text>\n <Icon name=\"remove\" />\n <Text bold={true}>\n {formatDate(pickerDateRange[1] as Date, DATE_FORMATS_INTL.MONTH_DAY_YEAR)}\n </Text>\n </Stack>\n )}\n\n {variant !== 'readonly' &&\n variant !== 'timeframebuttons' &&\n variant !== 'timeframetabs' && (\n <ButtonGroup\n color={color}\n sx={{\n '& .MuiButtonGroup-grouped': {\n padding: isMobile ? 0 : 12,\n },\n '& .MuiButtonGroup-middleButton': {\n px: 24,\n },\n height: 44,\n }}\n variant={variant}\n >\n <Button\n aria-disabled={calendarActions.shouldDisablePrevious}\n aria-label={copy.dateRangePreviousAria}\n color={calendarActions.shouldDisablePrevious ? 'secondary' : 'primary'}\n onClick={() =>\n calendarActions.shouldDisablePrevious ? null : handlePrevNextClick('previous')\n }\n >\n <Icon name=\"chevron_left\" size={20} />\n </Button>\n <Button\n aria-disabled={calendarActions.shouldDisablePicker}\n color={color}\n onClick={() => (calendarActions.shouldDisablePicker ? null : setIsPickerOpen(true))}\n startIcon={<Icon name=\"calendar_month\" size={20} />}\n sx={{\n p: isMobile ? 0 : 8,\n }}\n >\n {isMonthFormat ? (\n formatDate(dateRange[0] as Date, DATE_FORMATS_INTL.MONTH_YEAR)\n ) : (\n <span>\n {formatDate(dateRange[0] as Date, DATE_FORMATS_INTL.MONTH_DAY_YEAR)} -{' '}\n {formatDate(dateRange[1] as Date, DATE_FORMATS_INTL.MONTH_DAY_YEAR)}\n </span>\n )}\n </Button>\n <Button\n aria-disabled={calendarActions.shouldDisableNext}\n aria-label={copy.dateRangeNextAria}\n color={calendarActions.shouldDisableNext ? 'secondary' : 'primary'}\n onClick={() =>\n calendarActions.shouldDisableNext ? null : handlePrevNextClick('next')\n }\n >\n <Icon name=\"chevron_right\" size={20} />\n </Button>\n </ButtonGroup>\n )}\n\n {variant === 'timeframebuttons' && (\n <ToggleButtonGroup\n aria-label={copy.dateRangeEditTitle}\n color={color}\n exclusive={true}\n orientation=\"horizontal\"\n value={timeframe}\n >\n {timeframes.buttons.map((timeframe: Timeframe) => (\n <ToggleButton\n aria-label={timeframe.ariaLabel}\n key={timeframe.label}\n onClick={() => handleTimeframeChanged(timeframe.value)}\n sx={{ width: 56 }}\n value={timeframe.value}\n >\n {timeframe.label}\n </ToggleButton>\n ))}\n </ToggleButtonGroup>\n )}\n\n {variant === 'timeframetabs' && (\n <Tabs\n indicatorColor=\"primary\"\n onChange={(_, newValue) => handleTimeframeChanged(newValue)}\n textColor=\"primary\"\n value={timeframe}\n variant=\"fullWidth\"\n >\n {timeframes.tabs.map((timeframe: Timeframe) => (\n <Tab\n key={timeframe.label}\n label={\n <Text bold={true} variant=\"body1\">\n {timeframe.label}\n </Text>\n }\n sx={{ minWidth: 80 }}\n value={timeframe.value}\n />\n ))}\n </Tabs>\n )}\n </Box>\n\n {isPickerOpen && isMobile && (\n <Drawer\n ariaLabelClose={copy.dateRangeCloseAria}\n isOpen={isPickerOpen}\n onClose={() => setIsPickerOpen(false)}\n onPrimaryAction={() => {\n handleRangeChanged()\n setIsPickerOpen(false)\n }}\n primaryText={copy.dateRangeEditApply}\n title={copy.dateRangeEditTitle}\n >\n {ariaLive}\n <DateRangePicker\n copy={copy.dateRangePickerCopy}\n dateRange={pickerDateRange}\n onRangeChanged={handleDataRangePickerChange}\n selectedShortcut={shortcut}\n sx={{ p: 0 }}\n />\n </Drawer>\n )}\n\n {isPickerOpen && !isMobile && (\n <Dialog\n copy={{ title: copy.dateRangeEditTitle }}\n isOpen={true}\n onClose={() => setIsPickerOpen(false)}\n onPrimaryAction={() => handleRangeChanged()}\n primaryText={copy.dateRangeEditApply}\n sx={{\n '& .MuiDialogContent-root': {\n padding: 0,\n },\n }}\n >\n {ariaLive}\n <DateRangePicker\n copy={copy.dateRangePickerCopy}\n dateRange={pickerDateRange}\n onRangeChanged={handleDataRangePickerChange}\n selectedShortcut={shortcut}\n sx={{\n pt: 0,\n '& .MuiPickersLayout-toolbar': {\n gridColumn: '1/4',\n },\n }}\n />\n </Dialog>\n )}\n </Box>\n )\n}\n\nexport default DateRangeSelector\n","import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport { useGlobalCopyStore, useGlobalUiStore } from '../context'\n\nimport { DateRangeSelector } from './daterangeselector'\nimport { CalendarActions, DateRangeSelectorCopy } from './daterangeselector/DateRangeSelector'\n\ninterface WidgetDateRangeSelectorProps {\n calendarActions: CalendarActions\n dateRange?: { start: Date; end: Date }\n dateRangeVariant?: 'outlined' | 'text' | 'readonly' | 'timeframebuttons' | 'timeframetabs'\n}\n\nexport const WidgetDateRangeSelector: React.FC<WidgetDateRangeSelectorProps> = observer(\n ({ calendarActions, dateRange, dateRangeVariant }) => {\n const { displayedDateRange } = useGlobalUiStore()\n const { common: commonCopy } = useGlobalCopyStore()\n\n const dateRangeSelectorCopy = {\n dateRangePickerCopy: {\n dateRangeFrom: commonCopy.date_range_picker.from,\n dateRangeTo: commonCopy.date_range_picker.to,\n dateRangeCustom: commonCopy.date_range_picker.custom,\n dateRangeSelectARange: commonCopy.date_range_picker.select_range,\n dateRangeThisMonth: commonCopy.date_range_picker.this_month,\n dateRangeLastMonth: commonCopy.date_range_picker.last_month,\n dateRangeLast30Days: commonCopy.date_range_picker.last_30_days,\n dateRangeLast90Days: commonCopy.date_range_picker.last_90_days,\n dateRangeYTD: commonCopy.date_range_picker.ytd,\n dateRangeLastYear: commonCopy.date_range_picker.last_year,\n dateRangeSelect: commonCopy.date_range_picker.select,\n },\n dateRangeEditApply: commonCopy.date_range_picker.edit_apply,\n dateRangeEditTitle: commonCopy.date_range_picker.edit_title,\n dateRangeNextAria: commonCopy.date_range_picker.next_aria,\n dateRangePreviousAria: commonCopy.date_range_picker.previous_aria,\n } as DateRangeSelectorCopy\n\n const startDate = dateRange ? dateRange.start : displayedDateRange.start\n const endDate = dateRange ? dateRange.end : displayedDateRange.end\n\n return (\n <DateRangeSelector\n calendarActions={calendarActions}\n copy={dateRangeSelectorCopy}\n range={[startDate, endDate]}\n shouldShrinkToIcon={false}\n variant={dateRangeVariant}\n />\n )\n },\n)\n","import React, { PropsWithChildren } from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Button from '@mui/material/Button'\nimport Card from '@mui/material/Card'\nimport CardContent from '@mui/material/CardContent'\nimport Divider from '@mui/material/Divider'\nimport IconButton from '@mui/material/IconButton'\nimport Paper from '@mui/material/Paper'\nimport Stack from '@mui/material/Stack'\nimport type { SxProps } from '@mui/material/styles'\n\nimport { ChevronLeft } from '@mxenabled/mx-icons'\nimport { Icon, Text } from '@mxenabled/mxui'\n\nimport { ANALYTICS_EVENTS, useEvent } from '../../common'\nimport { AccountType } from '../../core'\nimport {\n useAppConfig,\n useGlobalCopyStore,\n useGlobalUiStore,\n WidgetContainerProvider,\n} from '../context'\nimport { useWidgetHeaderStyles } from '../hooks'\nimport { useDimensions } from '../hooks/useDimensions'\n\nimport { CalendarActions } from './daterangeselector/DateRangeSelector'\nimport { GlobalAccountFilter } from './GlobalAccountFilter'\nimport { WidgetDateRangeSelector } from './WidgetDateRangeSelector'\nimport Loader from './Loader'\n\ntype Action = {\n label: string\n iconName: string\n onClick: () => void\n}\n\ninterface WidgetContainerProps {\n allowedAccountTypes?: AccountType[] | undefined\n actions?: (Action | React.JSX.Element)[]\n calendarActions?: CalendarActions\n className?: string\n dateRange?: { start: Date; end: Date }\n dateRangeVariant?: 'outlined' | 'text' | 'readonly' | 'timeframebuttons' | 'timeframetabs'\n hasDivider?: boolean\n onBackClick?: () => void\n onMenuClick?: () => void\n onAccountsFilterClick?: () => void\n showAccountFilter?: boolean\n slotComponent?: React.ReactElement\n sx?: SxProps\n title?: string\n}\n\nexport const WidgetContainer: React.FC<PropsWithChildren<WidgetContainerProps>> = observer(\n ({\n actions,\n allowedAccountTypes,\n calendarActions,\n children,\n className = 'mx-cmn-widget',\n dateRange,\n dateRangeVariant,\n hasDivider = false,\n onAccountsFilterClick,\n onBackClick,\n onMenuClick,\n showAccountFilter = true,\n slotComponent,\n sx = {},\n title = '',\n }) => {\n const [containerRef, { height, width }] = useDimensions()\n const [contentRef, { height: contentHeight, width: contentWidth }] = useDimensions()\n const { onEvent } = useEvent()\n\n const {\n actionsFlex,\n containerSquareCorners,\n headerHeadingLevel,\n headerPaddingBottom,\n headerPaddingTop,\n headerPaddingX,\n iconSize,\n isCompact,\n isDesktop,\n isViewportAbove900,\n slotSx,\n } = useWidgetHeaderStyles(width)\n const { isCopyLoaded } = useGlobalUiStore()\n const { common: commonCopy } = useGlobalCopyStore()\n const {\n config: { display_widget_headings: showTitle },\n } = useAppConfig()\n\n const handleBackClick = () => {\n if (onBackClick) {\n onBackClick()\n onEvent(ANALYTICS_EVENTS.WIDGET_BACK_CLICK)\n }\n }\n\n React.useEffect(() => {\n onEvent(ANALYTICS_EVENTS.WIDGET_SIZE_CHANGED, {\n height: contentHeight,\n width: contentWidth,\n })\n }, [contentHeight, contentWidth])\n\n if (!isCopyLoaded) {\n return <Loader />\n }\n\n const getNavButton = () => {\n if (onMenuClick && isCompact && !isViewportAbove900) {\n return (\n <IconButton color=\"primary\" onClick={onMenuClick} sx={{ p: 10 }}>\n <Icon name=\"menu_open\" size={iconSize} sx={{ transform: 'rotate(180deg)' }} />\n </IconButton>\n )\n }\n\n if (onBackClick) {\n return (\n <IconButton\n aria-label={commonCopy.back_to_dashboard}\n color=\"primary\"\n onClick={handleBackClick}\n sx={{ p: 10 }}\n >\n <ChevronLeft size={24} />\n </IconButton>\n )\n }\n\n return null\n }\n\n const defaultSlotComponent = calendarActions && (\n <Stack alignItems=\"center\" sx={slotSx}>\n <WidgetDateRangeSelector\n calendarActions={calendarActions}\n dateRange={dateRange}\n dateRangeVariant={dateRangeVariant}\n />\n </Stack>\n )\n\n return (\n <Paper\n className={className}\n elevation={1}\n ref={containerRef}\n square={containerSquareCorners}\n sx={{\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0,\n margin: 0,\n overflowY: 'auto',\n height: '100%',\n ...sx,\n }}\n >\n <Card>\n <Stack\n alignItems=\"center\"\n alignSelf=\"stretch\"\n direction=\"row\"\n justifyContent=\"space-between\"\n sx={{\n pb: headerPaddingBottom,\n pt: headerPaddingTop,\n px: headerPaddingX,\n }}\n >\n {getNavButton()}\n <Stack alignItems=\"flex-start\" minWidth={0} sx={{ flex: 1 }}>\n {showTitle && (\n <Text sx={{ width: '100%' }} truncate={true} variant={headerHeadingLevel}>\n {title}\n </Text>\n )}\n </Stack>\n {!isCompact && (slotComponent ? slotComponent : defaultSlotComponent)}\n <Stack\n alignItems=\"center\"\n direction=\"row\"\n justifyContent=\"flex-end\"\n sx={{ flex: actionsFlex, flexShrink: 0 }}\n >\n {showAccountFilter && (\n <GlobalAccountFilter\n allowedAccountTypes={allowedAccountTypes}\n isDesktop={isDesktop}\n onAccountFilterClick={onAccountsFilterClick}\n />\n )}\n {actions?.map((action) => {\n if (React.isValidElement(action))\n return React.cloneElement(action, { isDesktop } as Partial<unknown>)\n const { iconName, onClick, label } = action as Action\n return isDesktop ? (\n <Button\n key={iconName}\n onClick={onClick}\n startIcon={<Icon name={iconName} size={iconSize} />}\n >\n {label}\n </Button>\n ) : (\n <IconButton aria-label={label} color=\"primary\" key={iconName} onClick={onClick}>\n <Icon name={iconName} size={iconSize} />\n </IconButton>\n )\n })}\n </Stack>\n </Stack>\n {isCompact && (slotComponent ? slotComponent : defaultSlotComponent)}\n {isCompact && hasDivider && <Divider />}\n <CardContent ref={contentRef} sx={{ p: 0 }}>\n <WidgetContainerProvider availableHeight={height} availableWidth={width}>\n {children}\n </WidgetContainerProvider>\n </CardContent>\n </Card>\n </Paper>\n )\n },\n)\n"],"names":["useWidgetHeaderStyles","availableWidth","isDesktop","isMobile","isSmallTablet","isTablet","useScreenSize","isViewportAbove900","useMediaQuery","iconSize","headerPaddingX","headerPaddingTop","headerPaddingBottom","headerHeadingLevel","containerSquareCorners","isCompact","slotSx","DateRangeSelector","calendarActions","color","copy","range","startOfMonth","startOfToday","endOfMonth","endOfToday","shouldShrinkToIcon","variant","theme","useTheme","announce","ariaLive","useAriaLive","dateRange","setDateRange","React","shortcut","setShortcut","pickerDateRange","setPickerDateRange","isPickerOpen","setIsPickerOpen","isMonthFormat","setIsMonthFormat","timeframe","setTimeframe","timeframes","getTimeFrameDates","timeframeEndDate","subMonths","handlePrevNextClick","direction","beginDate","endDate","isPrev","newRange","addMonths","startYear","startOfYear","endYear","endOfYear","subYears","addYears","dayOffset","differenceInCalendarDays","dateModifier","subDays","addDays","handleRangeChanged","handleDataRangePickerChange","adjustedRange","endOfDay","startFormatted","formatDate","DATE_FORMATS_INTL","endFormatted","handleTimeframeChanged","jsxs","Box","Stack","jsx","Icon","Text","ButtonGroup","Button","ToggleButtonGroup","ToggleButton","Tabs","_","newValue","Tab","Drawer","DateRangePicker","Dialog","WidgetDateRangeSelector","observer","dateRangeVariant","displayedDateRange","useGlobalUiStore","commonCopy","useGlobalCopyStore","dateRangeSelectorCopy","startDate","WidgetContainer","actions","allowedAccountTypes","children","className","hasDivider","onAccountsFilterClick","onBackClick","onMenuClick","showAccountFilter","slotComponent","sx","title","containerRef","height","width","useDimensions","contentRef","contentHeight","contentWidth","onEvent","useEvent","actionsFlex","isCopyLoaded","showTitle","useAppConfig","handleBackClick","ANALYTICS_EVENTS","Loader","getNavButton","IconButton","ChevronLeft","defaultSlotComponent","Paper","Card","GlobalAccountFilter","action","iconName","onClick","label","Divider","CardContent","WidgetContainerProvider"],"mappings":";;;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U,KADYmI,CAEpD;AAAA,sBAEJ,CAAC;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACH;AAAA,YAAA;AAAA,UAAA;AAAA,UAED7H,MAAckG,KAAgCsB;AAAA,UAC9CxH,KAAa6F,KAAc,gBAAA5B,EAAC+D,IAAA,CAAA,CAAQ;AAAA,4BACpCC,IAAA,EAAY,KAAKxB,GAAY,IAAI,EAAE,GAAG,EAAA,GACrC,UAAA,gBAAAxC,EAACiE,MAAwB,iBAAiB5B,GAAQ,gBAAgBC,GAC/D,UAAAZ,GACH,EAAA,CACF;AAAA,QAAA,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
|
|
@@ -12,15 +12,15 @@ import Z from "@mui/system/Stack";
|
|
|
12
12
|
import { f as U } from "../NumberFormatting--XMeeBfr.mjs";
|
|
13
13
|
import { u as X, g as e1 } from "../AccountDetailsHeader-BliEZhz7.mjs";
|
|
14
14
|
import { A as K1, a as z1, b as $1 } from "../AccountDetailsHeader-BliEZhz7.mjs";
|
|
15
|
-
import { A as E, a as t1 } from "../AccountDetailsDrawer-
|
|
16
|
-
import { b as q1, u as J1 } from "../AccountDetailsDrawer-
|
|
15
|
+
import { A as E, a as t1 } from "../AccountDetailsDrawer-Cq4kiiKD.mjs";
|
|
16
|
+
import { b as q1, u as J1 } from "../AccountDetailsDrawer-Cq4kiiKD.mjs";
|
|
17
17
|
import { i as z, u as R, a as x, c as N, f as $ } from "../hooks-97sNJ_lf.mjs";
|
|
18
|
-
import { A } from "../Analytics-
|
|
18
|
+
import { A } from "../Analytics-D-jdcL72.mjs";
|
|
19
19
|
import { C as l1 } from "../ConnectionsDrawer-CZU9ku-k.mjs";
|
|
20
20
|
import { u as Y } from "../useScreenSize-mWpmnh5w.mjs";
|
|
21
21
|
import { u as T } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
|
|
22
22
|
import { L as B } from "../Loader-CxeBwuPG.mjs";
|
|
23
|
-
import { W as n1 } from "../WidgetContainer-
|
|
23
|
+
import { W as n1 } from "../WidgetContainer-CjdCY4sj.mjs";
|
|
24
24
|
import { C as q } from "../ConnectDrawer-CW4LA3H3.mjs";
|
|
25
25
|
import i1 from "@mui/material/ListItem";
|
|
26
26
|
import { c as W } from "../Account-DR7Plrqy.mjs";
|
package/dist/budgets/index.es.js
CHANGED
|
@@ -31,12 +31,12 @@ import Je from "@mui/material/Tooltip";
|
|
|
31
31
|
import { u as ge } from "../useScreenSize-mWpmnh5w.mjs";
|
|
32
32
|
import { L as pe } from "../Loader-CxeBwuPG.mjs";
|
|
33
33
|
import { E as _e } from "../EmptyState-CJUDc3kD.mjs";
|
|
34
|
-
import { A as P } from "../Analytics-
|
|
34
|
+
import { A as P } from "../Analytics-D-jdcL72.mjs";
|
|
35
35
|
import Ee from "@mui/material/Tab";
|
|
36
36
|
import Qe from "@mui/material/Tabs";
|
|
37
37
|
import { e as et, g as we } from "../TransactionUtils-BphBJBbU.mjs";
|
|
38
|
-
import { T as ve } from "../EmbeddedCard-
|
|
39
|
-
import { T as tt, c as ot } from "../TransactionDetails-
|
|
38
|
+
import { T as ve } from "../EmbeddedCard-DCOQnTz-.mjs";
|
|
39
|
+
import { T as tt, c as ot } from "../TransactionDetails-DT-MQqOB.mjs";
|
|
40
40
|
import Te from "@mui/material/Card";
|
|
41
41
|
import De from "@mui/material/CardContent";
|
|
42
42
|
import { S as Se } from "../StatusBar-CPfSXe80.mjs";
|
|
@@ -45,9 +45,9 @@ import { u as nt, C as at } from "../CategorySelectorDrawer-NJsFsKP1.mjs";
|
|
|
45
45
|
import Pe from "@mui/material/CardHeader";
|
|
46
46
|
import { subDays as rt } from "date-fns/subDays";
|
|
47
47
|
import st from "@mui/material/IconButton";
|
|
48
|
-
import { M as it } from "../ManageIncome-
|
|
48
|
+
import { M as it } from "../ManageIncome-B_8i71mE.mjs";
|
|
49
49
|
import { u as je } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
|
|
50
|
-
import { W as ct } from "../WidgetContainer-
|
|
50
|
+
import { W as ct } from "../WidgetContainer-CjdCY4sj.mjs";
|
|
51
51
|
import { g as lt, a as dt } from "../BudgetUtil-Bg2AQJpQ.mjs";
|
|
52
52
|
import { M as ut } from "../MiniWidgetContainer-Bmv_WeUd.mjs";
|
|
53
53
|
import { b as mt } from "../CurrencyDialog-DumQCTPO.mjs";
|
|
@@ -15,13 +15,13 @@ import { I as ue } from "../InformationTooltip-4su8bn1e.mjs";
|
|
|
15
15
|
import { u as Ne } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
|
|
16
16
|
import { M as Qe } from "../MiniWidgetContainer-Bmv_WeUd.mjs";
|
|
17
17
|
import { E as Ze } from "../EmptyState-CJUDc3kD.mjs";
|
|
18
|
-
import { R as et } from "../RecurringSettings-
|
|
18
|
+
import { R as et } from "../RecurringSettings-hs0YUp83.mjs";
|
|
19
19
|
import tt from "@mui/material/Tabs";
|
|
20
20
|
import _e from "@mui/material/Tab";
|
|
21
21
|
import { getUnixTime as ce } from "date-fns/getUnixTime";
|
|
22
22
|
import K from "@mui/material/List";
|
|
23
23
|
import X from "@mui/material/ListItem";
|
|
24
|
-
import { A as nt } from "../AccountDetailsDrawer-
|
|
24
|
+
import { A as nt } from "../AccountDetailsDrawer-Cq4kiiKD.mjs";
|
|
25
25
|
import { f as $, D as P } from "../DateFormats-HudZ3Bjs.mjs";
|
|
26
26
|
import ot from "@mui/material/ListSubheader";
|
|
27
27
|
import { f as q } from "../NumberFormatting--XMeeBfr.mjs";
|
|
@@ -32,18 +32,18 @@ import { g as He } from "../AccountUtils-Cbh8r9cP.mjs";
|
|
|
32
32
|
import { DataGridPro as it } from "@mui/x-data-grid-pro";
|
|
33
33
|
import { T as Ce } from "../TabContentContainer-B0eYJP5p.mjs";
|
|
34
34
|
import F from "@mui/material/Button";
|
|
35
|
-
import { M as at, S as rt, i as ct, b as we, c as st } from "../ManageIncome-
|
|
35
|
+
import { M as at, S as rt, i as ct, b as we, c as st } from "../ManageIncome-B_8i71mE.mjs";
|
|
36
36
|
import { D as We } from "../Drawer-DsnW2o0v.mjs";
|
|
37
37
|
import { subDays as Me } from "date-fns/subDays";
|
|
38
38
|
import { startOfToday as se } from "date-fns/startOfToday";
|
|
39
39
|
import { endOfToday as lt } from "date-fns/endOfToday";
|
|
40
|
-
import { W as dt } from "../WidgetContainer-
|
|
40
|
+
import { W as dt } from "../WidgetContainer-CjdCY4sj.mjs";
|
|
41
41
|
import { c as Y } from "../Account-DR7Plrqy.mjs";
|
|
42
|
-
import { A as Se } from "../Analytics-
|
|
42
|
+
import { A as Se } from "../Analytics-D-jdcL72.mjs";
|
|
43
43
|
import { formatISO as mt } from "date-fns/formatISO";
|
|
44
44
|
import { fromUnixTime as De } from "date-fns/fromUnixTime";
|
|
45
45
|
import { startOfMonth as pt } from "date-fns/startOfMonth";
|
|
46
|
-
import { S as ut, a as ht } from "../EmbeddedCard-
|
|
46
|
+
import { S as ut, a as ht } from "../EmbeddedCard-DCOQnTz-.mjs";
|
|
47
47
|
import { F as ft, R as Ie, d as ve } from "../RecurringTransactionsUtil-CHWmqvW5.mjs";
|
|
48
48
|
import { k as gt } from "../DateUtil-CzBmbjmA.mjs";
|
|
49
49
|
const z = () => {
|
|
@@ -14,6 +14,11 @@ export type CalendarActions = {
|
|
|
14
14
|
shouldDisablePrevious?: boolean;
|
|
15
15
|
shouldDisablePicker?: boolean;
|
|
16
16
|
onRangeChanged: (dateRange: DateRange<Date>) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Fires only when the user actively selects a timeframe button/tab (3M/6M/9M/1Y).
|
|
19
|
+
* Unlike onRangeChanged, this does NOT fire on mount, so it's safe for click analytics.
|
|
20
|
+
*/
|
|
21
|
+
onTimeframeClick?: (timeframe: number) => void;
|
|
17
22
|
};
|
|
18
23
|
export interface DateRangeSelectorProps {
|
|
19
24
|
calendarActions: CalendarActions;
|
package/dist/common/index.es.js
CHANGED
|
@@ -4,7 +4,7 @@ import { f as j, b as V, a as K, c as Z, g as J, d as X } from "../NumberFormatt
|
|
|
4
4
|
import { C as rr, a as er, b as or } from "../CurrencyDialog-DumQCTPO.mjs";
|
|
5
5
|
import { C as ar } from "../CurrencyInput-DaGEQaLW.mjs";
|
|
6
6
|
import { D as nr, S as ir } from "../Select-CSpkK5cR.mjs";
|
|
7
|
-
import { D as lr, W as mr, u as dr } from "../WidgetContainer-
|
|
7
|
+
import { D as lr, W as mr, u as dr } from "../WidgetContainer-CjdCY4sj.mjs";
|
|
8
8
|
import { D as fr } from "../Dialog-Bvd2n8hz.mjs";
|
|
9
9
|
import { D as yr } from "../Donut-SzzfZDHF.mjs";
|
|
10
10
|
import { D as xr } from "../Drawer-DsnW2o0v.mjs";
|
|
@@ -22,7 +22,7 @@ import { R as wr } from "../ResponsiveButton-CC9F_Ezk.mjs";
|
|
|
22
22
|
import { S as Lr } from "../SelectionBox-B4xELRgp.mjs";
|
|
23
23
|
import { S as Ur } from "../StatusBar-CPfSXe80.mjs";
|
|
24
24
|
import { I as Br, P as Rr, S as qr, T as Yr } from "../TabContentContainer-B0eYJP5p.mjs";
|
|
25
|
-
import { A as $r } from "../Analytics-
|
|
25
|
+
import { A as $r } from "../Analytics-D-jdcL72.mjs";
|
|
26
26
|
import { C as Qr } from "../ConnectCard-D7uxoH5Y.mjs";
|
|
27
27
|
import { C as Vr } from "../ConnectDrawer-CW4LA3H3.mjs";
|
|
28
28
|
import { C as Zr } from "../CurrencyText-CCbE6MmF.mjs";
|
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { observer as
|
|
1
|
+
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import n from "react";
|
|
3
|
+
import { observer as h } from "mobx-react-lite";
|
|
4
4
|
import u from "@mui/material/Grid";
|
|
5
5
|
import m from "@mui/material/Skeleton";
|
|
6
6
|
import s from "@mui/material/Stack";
|
|
7
|
-
import { useTheme as
|
|
8
|
-
import { e as w, u as
|
|
9
|
-
import
|
|
10
|
-
import { Icon as
|
|
11
|
-
import { useMediaQuery as
|
|
7
|
+
import { useTheme as C } from "@mui/material/styles";
|
|
8
|
+
import { e as w, u as _, i as S } from "../hooks-97sNJ_lf.mjs";
|
|
9
|
+
import v from "@mui/material/Paper";
|
|
10
|
+
import { Icon as b, H2 as M, P as k } from "@mxenabled/mxui";
|
|
11
|
+
import { useMediaQuery as D } from "@mui/system";
|
|
12
|
+
import { usePostHog as G } from "posthog-js/react";
|
|
12
13
|
import z from "@mui/material/Box";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
14
|
+
import E from "@mui/material/Button";
|
|
15
|
+
import W from "@mui/material/IconButton";
|
|
15
16
|
import A from "@mui/material/Tooltip";
|
|
16
17
|
import I from "@mui/material/useMediaQuery";
|
|
17
|
-
import { G as
|
|
18
|
+
import { G as R } from "../GlobalAccountFilter-BhzR5Vb1.mjs";
|
|
18
19
|
import { u as y } from "../useScreenSize-mWpmnh5w.mjs";
|
|
19
|
-
import { C as
|
|
20
|
-
import { u as
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
appDataStore: { banner:
|
|
20
|
+
import { C as T } from "../ConnectDrawer-CW4LA3H3.mjs";
|
|
21
|
+
import { u as B } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
|
|
22
|
+
const F = h(() => {
|
|
23
|
+
const r = C(), {
|
|
24
|
+
appDataStore: { banner: t, loadBanner: i, user: c }
|
|
24
25
|
} = w();
|
|
25
|
-
return
|
|
26
|
+
return n.useEffect(() => {
|
|
26
27
|
i().finally();
|
|
27
|
-
}, [
|
|
28
|
+
}, [c]), t?.image_url ? /* @__PURE__ */ e(
|
|
28
29
|
s,
|
|
29
30
|
{
|
|
30
31
|
sx: {
|
|
@@ -35,7 +36,7 @@ const T = p(() => {
|
|
|
35
36
|
children: /* @__PURE__ */ e(
|
|
36
37
|
"a",
|
|
37
38
|
{
|
|
38
|
-
href:
|
|
39
|
+
href: t?.redirect_url,
|
|
39
40
|
rel: "noreferrer",
|
|
40
41
|
style: {
|
|
41
42
|
width: "100%"
|
|
@@ -45,11 +46,11 @@ const T = p(() => {
|
|
|
45
46
|
"img",
|
|
46
47
|
{
|
|
47
48
|
alt: "",
|
|
48
|
-
src:
|
|
49
|
+
src: t.image_url,
|
|
49
50
|
style: {
|
|
50
51
|
width: "100%",
|
|
51
52
|
height: "auto",
|
|
52
|
-
border: `1px solid ${
|
|
53
|
+
border: `1px solid ${r.palette.grey[300]}`
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
56
|
)
|
|
@@ -57,99 +58,120 @@ const T = p(() => {
|
|
|
57
58
|
)
|
|
58
59
|
}
|
|
59
60
|
) : null;
|
|
60
|
-
}),
|
|
61
|
-
const { common:
|
|
62
|
-
return /* @__PURE__ */ e(z, { children: i ? /* @__PURE__ */ e(A, { id: "add-accounts", placement: "bottom", title:
|
|
63
|
-
|
|
61
|
+
}), H = ({ handleConnectClick: r }) => {
|
|
62
|
+
const { common: t } = _(), i = I("(max-width: 700px)");
|
|
63
|
+
return /* @__PURE__ */ e(z, { children: i ? /* @__PURE__ */ e(A, { id: "add-accounts", placement: "bottom", title: t.add_accounts, children: /* @__PURE__ */ e(
|
|
64
|
+
W,
|
|
64
65
|
{
|
|
65
66
|
"aria-controls": "add_accounts",
|
|
66
67
|
"aria-describedby": "add-accounts",
|
|
67
68
|
"aria-haspopup": !0,
|
|
68
|
-
"aria-label":
|
|
69
|
+
"aria-label": t.add_accounts,
|
|
69
70
|
color: "primary",
|
|
70
|
-
onClick:
|
|
71
|
-
children: /* @__PURE__ */ e(
|
|
71
|
+
onClick: r,
|
|
72
|
+
children: /* @__PURE__ */ e(b, { name: "add", size: 24 })
|
|
72
73
|
}
|
|
73
74
|
) }) : /* @__PURE__ */ e(
|
|
74
|
-
|
|
75
|
+
E,
|
|
75
76
|
{
|
|
76
77
|
"aria-controls": "add_accounts",
|
|
77
78
|
"aria-haspopup": !0,
|
|
78
|
-
"aria-label":
|
|
79
|
-
onClick:
|
|
80
|
-
startIcon: /* @__PURE__ */ e(
|
|
79
|
+
"aria-label": t.add_accounts,
|
|
80
|
+
onClick: r,
|
|
81
|
+
startIcon: /* @__PURE__ */ e(b, { name: "add", size: 24 }),
|
|
81
82
|
sx: {
|
|
82
83
|
p: 12,
|
|
83
84
|
whiteSpace: "nowrap",
|
|
84
85
|
minWidth: "max-content"
|
|
85
86
|
},
|
|
86
87
|
variant: "text",
|
|
87
|
-
children:
|
|
88
|
+
children: t.add_accounts
|
|
88
89
|
}
|
|
89
90
|
) });
|
|
90
|
-
},
|
|
91
|
-
const
|
|
91
|
+
}, P = h(H), $ = () => {
|
|
92
|
+
const r = G();
|
|
93
|
+
return /* @__PURE__ */ e(
|
|
94
|
+
"button",
|
|
95
|
+
{
|
|
96
|
+
onClick: () => {
|
|
97
|
+
r.captureException(new Error("PostHog experiences source maps test"));
|
|
98
|
+
},
|
|
99
|
+
style: {
|
|
100
|
+
backgroundColor: "red",
|
|
101
|
+
color: "white",
|
|
102
|
+
border: "none",
|
|
103
|
+
padding: "8px 16px",
|
|
104
|
+
borderRadius: 4,
|
|
105
|
+
cursor: "pointer",
|
|
106
|
+
marginRight: 8
|
|
107
|
+
},
|
|
108
|
+
children: "Test Experiences Error"
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
}, j = () => {
|
|
112
|
+
const [r, t] = n.useState(!1), i = D("(max-width:320px)"), { common: c, connect: g } = _(), { config: d } = S(), { isMobile: f } = y(), x = () => {
|
|
92
113
|
const l = (/* @__PURE__ */ new Date()).getHours();
|
|
93
|
-
return l > 1 && l < 12 ?
|
|
114
|
+
return l > 1 && l < 12 ? c.good_morning : l >= 12 && l < 18 ? c.good_afternoon : c.good_evening;
|
|
94
115
|
};
|
|
95
|
-
return /* @__PURE__ */
|
|
96
|
-
/* @__PURE__ */ e(
|
|
97
|
-
/* @__PURE__ */
|
|
116
|
+
return /* @__PURE__ */ a(n.Fragment, { children: [
|
|
117
|
+
/* @__PURE__ */ e(v, { sx: { gap: 12, mb: f ? 24 : 0, p: 24 }, children: /* @__PURE__ */ a(s, { alignItems: "center", flexDirection: "row", justifyContent: "space-between", children: [
|
|
118
|
+
/* @__PURE__ */ a(s, { children: [
|
|
98
119
|
/* @__PURE__ */ e(M, { variant: i ? "h2" : "h1", children: x() }),
|
|
99
|
-
/* @__PURE__ */ e(
|
|
120
|
+
/* @__PURE__ */ e(k, { color: "text.secondary", children: c.heres_your_spending_overview })
|
|
100
121
|
] }),
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
d.show_connections_widget_in_master && /* @__PURE__ */ e(
|
|
103
|
-
/* @__PURE__ */ e(
|
|
122
|
+
/* @__PURE__ */ a(s, { flexDirection: "row", children: [
|
|
123
|
+
d.show_connections_widget_in_master && /* @__PURE__ */ e(P, { handleConnectClick: () => t(!0) }),
|
|
124
|
+
/* @__PURE__ */ e($, {}),
|
|
125
|
+
/* @__PURE__ */ e(R, {})
|
|
104
126
|
] })
|
|
105
127
|
] }) }),
|
|
106
|
-
|
|
107
|
-
|
|
128
|
+
r && /* @__PURE__ */ e(
|
|
129
|
+
T,
|
|
108
130
|
{
|
|
109
|
-
onClose: () =>
|
|
110
|
-
showConnectWidget:
|
|
131
|
+
onClose: () => t(!1),
|
|
132
|
+
showConnectWidget: r,
|
|
111
133
|
title: g.mini_title
|
|
112
134
|
}
|
|
113
135
|
)
|
|
114
136
|
] });
|
|
115
|
-
},
|
|
116
|
-
var
|
|
117
|
-
const
|
|
118
|
-
const { isDesktop: i, isMobile:
|
|
119
|
-
|
|
137
|
+
}, Q = h(j);
|
|
138
|
+
var p = /* @__PURE__ */ ((r) => (r[r.Main = 0] = "Main", r[r.RightSide = 1] = "RightSide", r[r.Disabled = 2] = "Disabled", r))(p || {});
|
|
139
|
+
const N = ({ widgets: r, isLoading: t }) => {
|
|
140
|
+
const { isDesktop: i, isMobile: c } = y(), { copyStore: g } = w();
|
|
141
|
+
B({
|
|
120
142
|
widgetName: "Dashboard",
|
|
121
|
-
isLoaded: !
|
|
143
|
+
isLoaded: !t
|
|
122
144
|
});
|
|
123
|
-
const d =
|
|
124
|
-
() =>
|
|
125
|
-
[
|
|
126
|
-
), f =
|
|
127
|
-
() => d.filter((
|
|
145
|
+
const d = n.useMemo(
|
|
146
|
+
() => r.filter((o) => o.location !== p.Disabled).sort((o, l) => o.index - l.index),
|
|
147
|
+
[r]
|
|
148
|
+
), f = n.useMemo(
|
|
149
|
+
() => d.filter((o) => o.location === p.Main),
|
|
128
150
|
[d]
|
|
129
|
-
), x =
|
|
130
|
-
() => d.filter((
|
|
151
|
+
), x = n.useMemo(
|
|
152
|
+
() => d.filter((o) => o.location === p.RightSide),
|
|
131
153
|
[d]
|
|
132
154
|
);
|
|
133
|
-
return /* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */ e(u, { size: 12, sx: { pt: 16 }, children: g.isInitialized && /* @__PURE__ */ e(
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
/* @__PURE__ */ e(
|
|
137
|
-
|
|
155
|
+
return /* @__PURE__ */ a(u, { container: !0, spacing: c ? 0 : 24, children: [
|
|
156
|
+
/* @__PURE__ */ e(u, { size: 12, sx: { pt: 16 }, children: g.isInitialized && /* @__PURE__ */ e(Q, {}) }),
|
|
157
|
+
/* @__PURE__ */ a(u, { size: { xs: 12, lg: 8 }, children: [
|
|
158
|
+
/* @__PURE__ */ e(F, {}),
|
|
159
|
+
t && /* @__PURE__ */ a(s, { direction: "column", spacing: 24, children: [
|
|
138
160
|
/* @__PURE__ */ e(m, { height: 100, variant: "rounded", width: "100%" }),
|
|
139
161
|
/* @__PURE__ */ e(m, { height: 300, variant: "rounded", width: "100%" }),
|
|
140
162
|
/* @__PURE__ */ e(m, { height: 300, variant: "rounded", width: "100%" })
|
|
141
163
|
] }),
|
|
142
|
-
!
|
|
164
|
+
!t && /* @__PURE__ */ e(s, { direction: "column", spacing: 24, children: i ? f.map((o) => /* @__PURE__ */ e(n.Fragment, { children: o.component }, o.index)) : d.map((o) => /* @__PURE__ */ e(n.Fragment, { children: o.component }, o.index)) })
|
|
143
165
|
] }),
|
|
144
|
-
i && /* @__PURE__ */ e(u, { size: { lg: 4 }, children:
|
|
166
|
+
i && /* @__PURE__ */ e(u, { size: { lg: 4 }, children: t ? /* @__PURE__ */ a(s, { direction: "column", spacing: 24, children: [
|
|
145
167
|
/* @__PURE__ */ e(m, { height: 200, variant: "rounded", width: "100%" }),
|
|
146
168
|
/* @__PURE__ */ e(m, { height: 100, variant: "rounded", width: "100%" }),
|
|
147
169
|
/* @__PURE__ */ e(m, { height: 300, variant: "rounded", width: "100%" })
|
|
148
|
-
] }) : /* @__PURE__ */ e(s, { direction: "column", spacing: 24, children: x.map((
|
|
170
|
+
] }) : /* @__PURE__ */ e(s, { direction: "column", spacing: 24, children: x.map((o) => /* @__PURE__ */ e(n.Fragment, { children: o.component }, o.index)) }) })
|
|
149
171
|
] });
|
|
150
|
-
},
|
|
172
|
+
}, me = h(N);
|
|
151
173
|
export {
|
|
152
|
-
|
|
153
|
-
|
|
174
|
+
me as Dashboard,
|
|
175
|
+
p as DashboardLocation
|
|
154
176
|
};
|
|
155
177
|
//# sourceMappingURL=index.es.js.map
|