@mx-cartographer/experiences 9.4.51 → 9.4.52-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 +7 -0
- package/dist/common/components/calendar/Calendar.d.ts +1 -0
- package/dist/common/components/calendar/Calendar.es.js.map +1 -1
- package/dist/common/components/drawer/Drawer.es.js +9 -9
- package/dist/common/components/drawer/Drawer.es.js.map +1 -1
- package/dist/common/components/drawer/Footer.es.js +6 -6
- package/dist/common/components/drawer/Footer.es.js.map +1 -1
- package/dist/finstrong/components/ManageDOB.es.js +16 -16
- package/dist/goals/components/actions/BirthdayAction.es.js +11 -11
- package/dist/recurringtransactions/components/PaymentSchedule.es.js +11 -11
- package/dist/settings/components/profile/ProfileTab.es.js +28 -28
- package/dist/transactions/components/shared/transactiondetails/actions/DateAction.es.js +59 -53
- package/dist/transactions/components/shared/transactiondetails/actions/DateAction.es.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [9.4.52] - 10-02-2026
|
|
2
|
+
|
|
3
|
+
- **FIXED** - Transaction Details date drawer now uses the MUI X date picker, styled by the MXUI theme MEW-4123
|
|
4
|
+
- **CHANGED** - `Drawer` footer secondary buttons now use the text variant, and the default `secondaryColor` is `primary` MEW-4123
|
|
5
|
+
- **CHANGED** - Deprecated the `Calendar` export from `./common` MEW-4123
|
|
6
|
+
- **CHANGED** - Bumped `@mxenabled/mxui` to `^2.10.1` for date range picker contrast fixes MEW-4123
|
|
7
|
+
|
|
1
8
|
## [9.4.51] - 10-01-2026
|
|
2
9
|
|
|
3
10
|
- **FIXED** - Certain text elements which didn't have enough color contrast (MEW-4120)
|
|
@@ -19,5 +19,6 @@ export interface CalendarProps {
|
|
|
19
19
|
onRangeSelected?: (beginDate: Date, endDate: Date) => void;
|
|
20
20
|
selectionType?: CalendarSelectionTypes;
|
|
21
21
|
}
|
|
22
|
+
/** @deprecated Use `DateCalendar` or `StaticDatePicker` from `@mui/x-date-pickers`. */
|
|
22
23
|
declare const Calendar: React.FC<CalendarProps>;
|
|
23
24
|
export default Calendar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.es.js","names":[],"sources":["../../../../src/common/components/calendar/Calendar.tsx"],"sourcesContent":["import React from 'react'\nimport { css } from '@mxenabled/cssinjs'\nimport { addDays } from 'date-fns/addDays'\nimport { addMonths } from 'date-fns/addMonths'\nimport { eachDayOfInterval } from 'date-fns/eachDayOfInterval'\nimport { eachWeekOfInterval } from 'date-fns/eachWeekOfInterval'\nimport { endOfMonth } from 'date-fns/endOfMonth'\nimport { format } from 'date-fns/format'\nimport { isBefore } from 'date-fns/isBefore'\nimport { isSameMonth } from 'date-fns/isSameMonth'\nimport { startOfMonth } from 'date-fns/startOfMonth'\nimport { startOfToday } from 'date-fns/startOfToday'\nimport { subMonths } from 'date-fns/subMonths'\n\nimport Button from '@mui/material/Button'\nimport Paper from '@mui/material/Paper'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport Header from './Header'\nimport Day from './Day'\n\nexport const CALENDAR_WIDTH = 340\nexport const DATE_SIZE = 44\nexport const enum CalendarSelectionTypes {\n None = 'None',\n Single = 'Single',\n Range = 'Range',\n}\n\nexport type CalendarCopy = {\n nextAria: string\n prevAria: string\n today: string\n}\n\nexport interface CalendarProps {\n copy: CalendarCopy\n beginDate?: Date\n endDate?: Date\n onDateSelected?: (date: Date) => void\n onRangeSelected?: (beginDate: Date, endDate: Date) => void\n selectionType?: CalendarSelectionTypes\n}\n\nconst Calendar: React.FC<CalendarProps> = ({\n copy,\n beginDate: beginDateProp = undefined,\n endDate: endDateProp = undefined,\n onDateSelected,\n onRangeSelected,\n selectionType = CalendarSelectionTypes.Single,\n}) => {\n const styles = getStyles()\n\n const [date, setDate] = React.useState(startOfToday)\n\n const [beginDate, setBeginDate] = React.useState<Date | undefined>(beginDateProp)\n const [endDate, setEndDate] = React.useState<Date | undefined>(endDateProp)\n\n React.useEffect(() => {\n setBeginDate(beginDateProp)\n setEndDate(endDateProp)\n if (beginDateProp) {\n setDate(beginDateProp)\n }\n }, [beginDateProp, endDateProp])\n\n const weeks = React.useMemo(() => {\n const weeksInInterval = eachWeekOfInterval({ start: startOfMonth(date), end: endOfMonth(date) })\n\n const weeks = [] as Date[][]\n for (let i = 0; i < weeksInInterval.length; i++) {\n const weekStart = weeksInInterval[i]\n const days = eachDayOfInterval({ start: weekStart, end: addDays(weekStart, 6) })\n\n const week = [] as Date[]\n for (let j = 0; j < days.length; j++) {\n week.push(days[j])\n }\n weeks.push(week)\n }\n\n return weeks\n }, [date])\n\n const handleSelection = (date: Date) => {\n if (selectionType === CalendarSelectionTypes.None) return\n\n if (selectionType === CalendarSelectionTypes.Single) {\n setBeginDate(date)\n onDateSelected?.(date)\n return\n }\n\n if (!beginDate || endDate) {\n setBeginDate(date)\n setEndDate(undefined)\n } else if (isBefore(date, beginDate)) {\n setEndDate(beginDate)\n setBeginDate(date)\n onRangeSelected?.(date, beginDate)\n } else {\n setEndDate(date)\n onRangeSelected?.(beginDate, date)\n }\n }\n\n const handleTodayClick = () => {\n const today = startOfToday()\n setDate(today)\n\n if (selectionType === CalendarSelectionTypes.None) return\n\n setBeginDate(today)\n\n if (selectionType === CalendarSelectionTypes.Single) {\n onDateSelected?.(today)\n } else {\n setEndDate(today)\n onRangeSelected?.(today, today)\n }\n }\n\n const handleNextMonthClick = () => {\n setDate(addMonths(date, 1))\n }\n\n const handlePreviousMonthClick = () => {\n setDate(subMonths(date, 1))\n }\n\n return (\n <div className={`mx-cmn-calendar ${styles}`}>\n <Paper sx={{ boxShadow: 'none' }}>\n <Header\n copy={copy}\n date={date}\n onNextClick={handleNextMonthClick}\n onPreviousClick={handlePreviousMonthClick}\n />\n\n <div className=\"mx-cmn-calendar-header-row\">\n {weeks[0].map((day, index) => (\n <div className=\"mx-cmn-calendar-header-cell\" key={index}>\n <Text bold={true} variant=\"body2\">\n {format(day, 'EEEEE')}\n </Text>\n </div>\n ))}\n </div>\n\n {weeks.map((week, index) => (\n <div className=\"mx-cmn-calendar-week\" key={`w-${index}`}>\n {week.map((day, index) => (\n <Day\n beginDate={beginDate}\n date={day}\n endDate={endDate}\n isInMonth={isSameMonth(day, date)}\n key={index}\n onClick={handleSelection}\n />\n ))}\n </div>\n ))}\n\n <div className=\"mx-cmn-calendar-today-container\">\n <Button onClick={handleTodayClick} size=\"small\" variant=\"text\">\n {copy.today}\n </Button>\n </div>\n </Paper>\n </div>\n )\n}\n\nconst getStyles = () =>\n css({\n width: CALENDAR_WIDTH,\n '& .MuiPaper-root': {\n paddingLeft: 24,\n paddingRight: 24,\n paddingTop: 4,\n paddingBottom: 4,\n },\n '& .mx-cmn-calendar-header-row': {\n display: 'flex',\n justifyContent: 'center',\n textAlign: 'center',\n '& .mx-cmn-calendar-header-cell': {\n height: DATE_SIZE,\n width: DATE_SIZE,\n minWidth: DATE_SIZE,\n '& .kmui-text': {\n alignItems: 'center',\n display: 'flex',\n height: '100%',\n justifyContent: 'center',\n width: '100%',\n },\n },\n },\n '& .mx-cmn-calendar-week': {\n display: 'flex',\n justifyContent: 'center',\n textAlign: 'center',\n },\n '& .mx-cmn-calendar-today-container': {\n display: 'block',\n marginTop: 16,\n textAlign: 'center',\n width: '100%',\n '& > .MuiButton-root': {\n display: 'inline-block',\n marginLeft: 'auto',\n marginRight: 'auto',\n },\n },\n })\n\nexport default Calendar\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAwBA,IAAkB,KAAX,0BAAA,GAAA;AACL,SAAA,EAAA,OAAA,QACA,EAAA,SAAA,UACA,EAAA,QAAA;AACF,GAAA,CAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"Calendar.es.js","names":[],"sources":["../../../../src/common/components/calendar/Calendar.tsx"],"sourcesContent":["import React from 'react'\nimport { css } from '@mxenabled/cssinjs'\nimport { addDays } from 'date-fns/addDays'\nimport { addMonths } from 'date-fns/addMonths'\nimport { eachDayOfInterval } from 'date-fns/eachDayOfInterval'\nimport { eachWeekOfInterval } from 'date-fns/eachWeekOfInterval'\nimport { endOfMonth } from 'date-fns/endOfMonth'\nimport { format } from 'date-fns/format'\nimport { isBefore } from 'date-fns/isBefore'\nimport { isSameMonth } from 'date-fns/isSameMonth'\nimport { startOfMonth } from 'date-fns/startOfMonth'\nimport { startOfToday } from 'date-fns/startOfToday'\nimport { subMonths } from 'date-fns/subMonths'\n\nimport Button from '@mui/material/Button'\nimport Paper from '@mui/material/Paper'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport Header from './Header'\nimport Day from './Day'\n\nexport const CALENDAR_WIDTH = 340\nexport const DATE_SIZE = 44\nexport const enum CalendarSelectionTypes {\n None = 'None',\n Single = 'Single',\n Range = 'Range',\n}\n\nexport type CalendarCopy = {\n nextAria: string\n prevAria: string\n today: string\n}\n\nexport interface CalendarProps {\n copy: CalendarCopy\n beginDate?: Date\n endDate?: Date\n onDateSelected?: (date: Date) => void\n onRangeSelected?: (beginDate: Date, endDate: Date) => void\n selectionType?: CalendarSelectionTypes\n}\n\n/** @deprecated Use `DateCalendar` or `StaticDatePicker` from `@mui/x-date-pickers`. */\nconst Calendar: React.FC<CalendarProps> = ({\n copy,\n beginDate: beginDateProp = undefined,\n endDate: endDateProp = undefined,\n onDateSelected,\n onRangeSelected,\n selectionType = CalendarSelectionTypes.Single,\n}) => {\n const styles = getStyles()\n\n const [date, setDate] = React.useState(startOfToday)\n\n const [beginDate, setBeginDate] = React.useState<Date | undefined>(beginDateProp)\n const [endDate, setEndDate] = React.useState<Date | undefined>(endDateProp)\n\n React.useEffect(() => {\n setBeginDate(beginDateProp)\n setEndDate(endDateProp)\n if (beginDateProp) {\n setDate(beginDateProp)\n }\n }, [beginDateProp, endDateProp])\n\n const weeks = React.useMemo(() => {\n const weeksInInterval = eachWeekOfInterval({ start: startOfMonth(date), end: endOfMonth(date) })\n\n const weeks = [] as Date[][]\n for (let i = 0; i < weeksInInterval.length; i++) {\n const weekStart = weeksInInterval[i]\n const days = eachDayOfInterval({ start: weekStart, end: addDays(weekStart, 6) })\n\n const week = [] as Date[]\n for (let j = 0; j < days.length; j++) {\n week.push(days[j])\n }\n weeks.push(week)\n }\n\n return weeks\n }, [date])\n\n const handleSelection = (date: Date) => {\n if (selectionType === CalendarSelectionTypes.None) return\n\n if (selectionType === CalendarSelectionTypes.Single) {\n setBeginDate(date)\n onDateSelected?.(date)\n return\n }\n\n if (!beginDate || endDate) {\n setBeginDate(date)\n setEndDate(undefined)\n } else if (isBefore(date, beginDate)) {\n setEndDate(beginDate)\n setBeginDate(date)\n onRangeSelected?.(date, beginDate)\n } else {\n setEndDate(date)\n onRangeSelected?.(beginDate, date)\n }\n }\n\n const handleTodayClick = () => {\n const today = startOfToday()\n setDate(today)\n\n if (selectionType === CalendarSelectionTypes.None) return\n\n setBeginDate(today)\n\n if (selectionType === CalendarSelectionTypes.Single) {\n onDateSelected?.(today)\n } else {\n setEndDate(today)\n onRangeSelected?.(today, today)\n }\n }\n\n const handleNextMonthClick = () => {\n setDate(addMonths(date, 1))\n }\n\n const handlePreviousMonthClick = () => {\n setDate(subMonths(date, 1))\n }\n\n return (\n <div className={`mx-cmn-calendar ${styles}`}>\n <Paper sx={{ boxShadow: 'none' }}>\n <Header\n copy={copy}\n date={date}\n onNextClick={handleNextMonthClick}\n onPreviousClick={handlePreviousMonthClick}\n />\n\n <div className=\"mx-cmn-calendar-header-row\">\n {weeks[0].map((day, index) => (\n <div className=\"mx-cmn-calendar-header-cell\" key={index}>\n <Text bold={true} variant=\"body2\">\n {format(day, 'EEEEE')}\n </Text>\n </div>\n ))}\n </div>\n\n {weeks.map((week, index) => (\n <div className=\"mx-cmn-calendar-week\" key={`w-${index}`}>\n {week.map((day, index) => (\n <Day\n beginDate={beginDate}\n date={day}\n endDate={endDate}\n isInMonth={isSameMonth(day, date)}\n key={index}\n onClick={handleSelection}\n />\n ))}\n </div>\n ))}\n\n <div className=\"mx-cmn-calendar-today-container\">\n <Button onClick={handleTodayClick} size=\"small\" variant=\"text\">\n {copy.today}\n </Button>\n </div>\n </Paper>\n </div>\n )\n}\n\nconst getStyles = () =>\n css({\n width: CALENDAR_WIDTH,\n '& .MuiPaper-root': {\n paddingLeft: 24,\n paddingRight: 24,\n paddingTop: 4,\n paddingBottom: 4,\n },\n '& .mx-cmn-calendar-header-row': {\n display: 'flex',\n justifyContent: 'center',\n textAlign: 'center',\n '& .mx-cmn-calendar-header-cell': {\n height: DATE_SIZE,\n width: DATE_SIZE,\n minWidth: DATE_SIZE,\n '& .kmui-text': {\n alignItems: 'center',\n display: 'flex',\n height: '100%',\n justifyContent: 'center',\n width: '100%',\n },\n },\n },\n '& .mx-cmn-calendar-week': {\n display: 'flex',\n justifyContent: 'center',\n textAlign: 'center',\n },\n '& .mx-cmn-calendar-today-container': {\n display: 'block',\n marginTop: 16,\n textAlign: 'center',\n width: '100%',\n '& > .MuiButton-root': {\n display: 'inline-block',\n marginLeft: 'auto',\n marginRight: 'auto',\n },\n },\n })\n\nexport default Calendar\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAwBA,IAAkB,KAAX,0BAAA,GAAA;AACL,SAAA,EAAA,OAAA,QACA,EAAA,SAAA,UACA,EAAA,QAAA;AACF,GAAA,CAAA,CAAA,GAkBM,KAAA,CAAqC,EACzC,MAAA,GACA,WAAW,IAAgB,QAC3B,SAAS,IAAc,QACvB,gBAAA,GACA,iBAAA,GACA,eAAA,IAAA,SAAA,MACI;AACJ,QAAM,IAAS,EAAU,GAEnB,CAAC,GAAM,CAAA,IAAW,EAAM,SAAS,CAAY,GAE7C,CAAC,GAAW,CAAA,IAAgB,EAAM,SAA2B,CAAa,GAC1E,CAAC,GAAS,CAAA,IAAc,EAAM,SAA2B,CAAW;AAE1E,EAAA,EAAM,UAAA,MAAgB;AACpB,IAAA,EAAa,CAAa,GAC1B,EAAW,CAAW,GAClB,KACF,EAAQ,CAAa;AAAA,EAEzB,GAAG,CAAC,GAAe,CAAW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cAAc;AAAA,IACd,YAAY;AAAA,IACZ,eAAe;AAAA,EACjB;AAAA,EACA,iCAAiC;AAAA,IAC/B,SAAS;AAAA,IACT,gBAAgB;AAAA,IAChB,WAAW;AAAA,IACX,kCAAkC;AAAA,MAChC,QAAA;AAAA,MACA,OAAA;AAAA,MACA,UAAA;AAAA,MACA,gBAAgB;AAAA,QACd,YAAY;AAAA,QACZ,SAAS;AAAA,QACT,QAAQ;AAAA,QACR,gBAAgB;AAAA,QAChB,OAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AAAA,EACA,2BAA2B;AAAA,IACzB,SAAS;AAAA,IACT,gBAAgB;AAAA,IAChB,WAAW;AAAA,EACb;AAAA,EACA,sCAAsC;AAAA,IACpC,SAAS;AAAA,IACT,WAAW;AAAA,IACX,WAAW;AAAA,IACX,OAAO;AAAA,IACP,uBAAuB;AAAA,MACrB,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,aAAa;AAAA,IACf;AAAA,EACF;AACF,CAAC"}
|
|
@@ -6,7 +6,7 @@ import j from "@mui/material/Stack";
|
|
|
6
6
|
import { Drawer as C } from "@mxenabled/mxui";
|
|
7
7
|
import { jsx as r, jsxs as v } from "react/jsx-runtime";
|
|
8
8
|
import B from "@mui/material/Box";
|
|
9
|
-
var G = ({ ariaLabelClose:
|
|
9
|
+
var G = ({ ariaLabelClose: i = "Close", children: s, footerStyles: u = {}, hasSecondaryAction: d = !0, id: p, isOpen: e, isPrimaryDisabled: m, onClose: o, onPrimaryAction: t, onSecondaryAction: l, primaryButtonProps: c, primaryColor: f = "primary", primaryText: h, secondaryColor: n = "primary", secondaryText: b, shouldShowHeaderBorders: w = !0, shouldShowHeaderShadow: g = !1, title: a, ...x }) => {
|
|
10
10
|
const { onExited: k, onFocus: R, rootRef: S } = y(e);
|
|
11
11
|
return /* @__PURE__ */ r(C, {
|
|
12
12
|
id: p,
|
|
@@ -33,7 +33,7 @@ var G = ({ ariaLabelClose: s = "Close", children: u, footerStyles: d = {}, hasSe
|
|
|
33
33
|
justifyContent: "space-between",
|
|
34
34
|
children: [
|
|
35
35
|
/* @__PURE__ */ r(F, {
|
|
36
|
-
ariaLabelClose:
|
|
36
|
+
ariaLabelClose: i,
|
|
37
37
|
onClose: o,
|
|
38
38
|
shouldShowBorders: w,
|
|
39
39
|
shouldShowShadow: g,
|
|
@@ -42,18 +42,18 @@ var G = ({ ariaLabelClose: s = "Close", children: u, footerStyles: d = {}, hasSe
|
|
|
42
42
|
/* @__PURE__ */ r(B, {
|
|
43
43
|
height: "100%",
|
|
44
44
|
overflow: "auto",
|
|
45
|
-
children:
|
|
45
|
+
children: s
|
|
46
46
|
}),
|
|
47
47
|
t && /* @__PURE__ */ r(D, {
|
|
48
|
-
footerStyles:
|
|
49
|
-
hasSecondaryAction:
|
|
50
|
-
isPrimaryDisabled:
|
|
48
|
+
footerStyles: u,
|
|
49
|
+
hasSecondaryAction: d,
|
|
50
|
+
isPrimaryDisabled: m,
|
|
51
51
|
onPrimaryAction: t,
|
|
52
52
|
onSecondaryAction: l ?? o,
|
|
53
|
-
primaryButtonProps:
|
|
53
|
+
primaryButtonProps: c,
|
|
54
54
|
primaryColor: f,
|
|
55
|
-
primaryText:
|
|
56
|
-
secondaryColor:
|
|
55
|
+
primaryText: h,
|
|
56
|
+
secondaryColor: n,
|
|
57
57
|
secondaryText: b
|
|
58
58
|
})
|
|
59
59
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.es.js","names":[],"sources":["../../../../src/common/components/drawer/Drawer.tsx"],"sourcesContent":["import React from 'react'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\nimport type { SxProps } from '@mui/material/styles'\n\nimport { Drawer as KMuiDrawer } from '@mxenabled/mxui'\n\nimport { useFocusReturn } from '../../hooks/useFocusReturn'\n\nimport Footer from './Footer'\nimport Header from './Header'\n\nexport type CopyObject = {\n close_drawer_aria: string\n}\n\ninterface DrawerProps {\n ariaLabelClose?: string\n className?: string\n footerStyles?: SxProps\n hasSecondaryAction?: boolean\n id?: string\n isOpen: boolean\n isPrimaryDisabled?: boolean\n onClose: () => void\n onPrimaryAction?: () => void\n onSecondaryAction?: () => void\n primaryButtonProps?: React.ComponentProps<typeof Button>\n primaryColor?: 'primary' | 'inherit' | 'secondary' | 'success' | 'error' | 'info' | 'warning'\n primaryText?: string\n secondaryColor?: 'primary' | 'inherit' | 'secondary' | 'success' | 'error' | 'info' | 'warning'\n secondaryText?: string\n shouldShowHeaderBorders?: boolean\n shouldShowHeaderShadow?: boolean\n sx?: SxProps\n title: string\n}\n\nconst Drawer: React.FC<React.PropsWithChildren<DrawerProps>> = ({\n ariaLabelClose = 'Close',\n children,\n footerStyles = {},\n hasSecondaryAction = true,\n id,\n isOpen,\n isPrimaryDisabled,\n onClose,\n onPrimaryAction,\n onSecondaryAction,\n primaryButtonProps,\n primaryColor = 'primary',\n primaryText,\n secondaryColor = '
|
|
1
|
+
{"version":3,"file":"Drawer.es.js","names":[],"sources":["../../../../src/common/components/drawer/Drawer.tsx"],"sourcesContent":["import React from 'react'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\nimport type { SxProps } from '@mui/material/styles'\n\nimport { Drawer as KMuiDrawer } from '@mxenabled/mxui'\n\nimport { useFocusReturn } from '../../hooks/useFocusReturn'\n\nimport Footer from './Footer'\nimport Header from './Header'\n\nexport type CopyObject = {\n close_drawer_aria: string\n}\n\ninterface DrawerProps {\n ariaLabelClose?: string\n className?: string\n footerStyles?: SxProps\n hasSecondaryAction?: boolean\n id?: string\n isOpen: boolean\n isPrimaryDisabled?: boolean\n onClose: () => void\n onPrimaryAction?: () => void\n onSecondaryAction?: () => void\n primaryButtonProps?: React.ComponentProps<typeof Button>\n primaryColor?: 'primary' | 'inherit' | 'secondary' | 'success' | 'error' | 'info' | 'warning'\n primaryText?: string\n secondaryColor?: 'primary' | 'inherit' | 'secondary' | 'success' | 'error' | 'info' | 'warning'\n secondaryText?: string\n shouldShowHeaderBorders?: boolean\n shouldShowHeaderShadow?: boolean\n sx?: SxProps\n title: string\n}\n\nconst Drawer: React.FC<React.PropsWithChildren<DrawerProps>> = ({\n ariaLabelClose = 'Close',\n children,\n footerStyles = {},\n hasSecondaryAction = true,\n id,\n isOpen,\n isPrimaryDisabled,\n onClose,\n onPrimaryAction,\n onSecondaryAction,\n primaryButtonProps,\n primaryColor = 'primary',\n primaryText,\n secondaryColor = 'primary',\n secondaryText,\n shouldShowHeaderBorders = true,\n shouldShowHeaderShadow = false,\n title,\n ...rest\n}) => {\n const { onExited, onFocus, rootRef } = useFocusReturn(isOpen)\n\n return (\n <KMuiDrawer\n id={id}\n isOpen={isOpen}\n onClose={onClose}\n sx={{\n '& .MuiDrawer-paper': {\n backgroundColor: 'background.default',\n borderRadius: 0,\n },\n height: '100%',\n '& .MuiToolbar-root': {\n backgroundColor: 'background.paper',\n },\n }}\n {...rest}\n disableRestoreFocus={true}\n onFocus={onFocus}\n ref={rootRef}\n slotProps={{\n paper: {\n 'aria-labelledby': `${title?.replace(/\\s+/g, '-').toLowerCase()}-header-title`,\n },\n transition: { onExited },\n }}\n >\n <Stack height=\"100%\" justifyContent=\"space-between\">\n <Header\n ariaLabelClose={ariaLabelClose}\n onClose={onClose}\n shouldShowBorders={shouldShowHeaderBorders}\n shouldShowShadow={shouldShowHeaderShadow}\n title={title}\n />\n\n <Box height=\"100%\" overflow=\"auto\">\n {children}\n </Box>\n\n {onPrimaryAction && (\n <Footer\n footerStyles={footerStyles}\n hasSecondaryAction={hasSecondaryAction}\n isPrimaryDisabled={isPrimaryDisabled}\n onPrimaryAction={onPrimaryAction}\n onSecondaryAction={onSecondaryAction ?? onClose}\n primaryButtonProps={primaryButtonProps}\n primaryColor={primaryColor}\n primaryText={primaryText}\n secondaryColor={secondaryColor}\n secondaryText={secondaryText}\n />\n )}\n </Stack>\n </KMuiDrawer>\n )\n}\n\nexport default Drawer\n"],"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GAAD;AAAA,UACgB,cAAA;AAAA,UACM,oBAAA;AAAA,UACD,mBAAA;AAAA,UACF,iBAAA;AAAA,UACjB,mBAAmB,KAAqB;AAAA,UACpB,oBAAA;AAAA,UACN,cAAA;AAAA,UACD,aAAA;AAAA,UACG,gBAAA;AAAA,UACD,eAAA;AAAA,QAChB,CAAA;AAAA,MAEE;AAAA;EACG,CAAA;AAEhB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import s from "@mui/material/Stack";
|
|
2
|
-
import
|
|
3
|
-
import { jsx as
|
|
4
|
-
var v = ({ footerStyles: t = {}, hasSecondaryAction: a = !0, isPrimaryDisabled: n, onPrimaryAction: r, onSecondaryAction: i, primaryButtonProps: l = {}, primaryColor: c = "primary", primaryText: d = "Save", secondaryColor: p = "primary", secondaryText: f = "Cancel" }) => /* @__PURE__ */
|
|
2
|
+
import e from "@mui/material/Button";
|
|
3
|
+
import { jsx as o, jsxs as x } from "react/jsx-runtime";
|
|
4
|
+
var v = ({ footerStyles: t = {}, hasSecondaryAction: a = !0, isPrimaryDisabled: n, onPrimaryAction: r, onSecondaryAction: i, primaryButtonProps: l = {}, primaryColor: c = "primary", primaryText: d = "Save", secondaryColor: p = "primary", secondaryText: f = "Cancel" }) => /* @__PURE__ */ x(s, {
|
|
5
5
|
sx: {
|
|
6
6
|
bgcolor: "background.paper",
|
|
7
7
|
flexDirection: "row",
|
|
@@ -10,12 +10,12 @@ var v = ({ footerStyles: t = {}, hasSecondaryAction: a = !0, isPrimaryDisabled:
|
|
|
10
10
|
p: 24,
|
|
11
11
|
...t
|
|
12
12
|
},
|
|
13
|
-
children: [a && /* @__PURE__ */ e
|
|
13
|
+
children: [a && /* @__PURE__ */ o(e, {
|
|
14
14
|
color: p,
|
|
15
15
|
onClick: i,
|
|
16
|
-
variant: r ? "
|
|
16
|
+
variant: r ? "text" : "contained",
|
|
17
17
|
children: f
|
|
18
|
-
}), r && /* @__PURE__ */ e
|
|
18
|
+
}), r && /* @__PURE__ */ o(e, {
|
|
19
19
|
...l,
|
|
20
20
|
color: c,
|
|
21
21
|
disabled: n,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Footer.es.js","names":[],"sources":["../../../../src/common/components/drawer/Footer.tsx"],"sourcesContent":["import Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\nimport { type SxProps } from '@mui/material/styles'\n\ntype Color = 'primary' | 'inherit' | 'secondary' | 'success' | 'error' | 'info' | 'warning'\n\ntype FooterProps = {\n footerStyles?: SxProps\n hasSecondaryAction?: boolean\n isPrimaryDisabled?: boolean\n onPrimaryAction?: () => void\n onSecondaryAction?: () => void\n primaryButtonProps?: React.ComponentProps<typeof Button>\n primaryColor?: Color\n primaryText?: string\n secondaryColor?: Color\n secondaryText?: string\n}\n\nconst Footer = ({\n footerStyles = {},\n hasSecondaryAction = true,\n isPrimaryDisabled,\n onPrimaryAction,\n onSecondaryAction,\n primaryButtonProps = {},\n primaryColor = 'primary',\n primaryText = 'Save',\n secondaryColor = 'primary',\n secondaryText = 'Cancel',\n}: FooterProps) => {\n return (\n <Stack\n sx={{\n bgcolor: 'background.paper',\n flexDirection: 'row',\n gap: 16,\n justifyContent: 'flex-end',\n p: 24,\n ...footerStyles,\n }}\n >\n {hasSecondaryAction && (\n <Button\n color={secondaryColor}\n onClick={onSecondaryAction}\n variant={onPrimaryAction ? '
|
|
1
|
+
{"version":3,"file":"Footer.es.js","names":[],"sources":["../../../../src/common/components/drawer/Footer.tsx"],"sourcesContent":["import Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\nimport { type SxProps } from '@mui/material/styles'\n\ntype Color = 'primary' | 'inherit' | 'secondary' | 'success' | 'error' | 'info' | 'warning'\n\ntype FooterProps = {\n footerStyles?: SxProps\n hasSecondaryAction?: boolean\n isPrimaryDisabled?: boolean\n onPrimaryAction?: () => void\n onSecondaryAction?: () => void\n primaryButtonProps?: React.ComponentProps<typeof Button>\n primaryColor?: Color\n primaryText?: string\n secondaryColor?: Color\n secondaryText?: string\n}\n\nconst Footer = ({\n footerStyles = {},\n hasSecondaryAction = true,\n isPrimaryDisabled,\n onPrimaryAction,\n onSecondaryAction,\n primaryButtonProps = {},\n primaryColor = 'primary',\n primaryText = 'Save',\n secondaryColor = 'primary',\n secondaryText = 'Cancel',\n}: FooterProps) => {\n return (\n <Stack\n sx={{\n bgcolor: 'background.paper',\n flexDirection: 'row',\n gap: 16,\n justifyContent: 'flex-end',\n p: 24,\n ...footerStyles,\n }}\n >\n {hasSecondaryAction && (\n <Button\n color={secondaryColor}\n onClick={onSecondaryAction}\n variant={onPrimaryAction ? 'text' : 'contained'}\n >\n {secondaryText}\n </Button>\n )}\n\n {onPrimaryAction && (\n <Button\n {...primaryButtonProps}\n color={primaryColor}\n disabled={isPrimaryDisabled}\n onClick={onPrimaryAction}\n variant=\"contained\"\n >\n {primaryText}\n </Button>\n )}\n </Stack>\n )\n}\n\nexport default Footer\n"],"mappings":";;;AAmBA,IAAM,IAAA,CAAU,EACd,cAAA,IAAe,CAAC,GAChB,oBAAA,IAAqB,IACrB,mBAAA,GACA,iBAAA,GACA,mBAAA,GACA,oBAAA,IAAqB,CAAC,GACtB,cAAA,IAAe,WACf,aAAA,IAAc,QACd,gBAAA,IAAiB,WACjB,eAAA,IAAgB,SAAA,MAGd,gBAAA,EAAC,GAAD;AAAA,EACE,IAAI;AAAA,IACF,SAAS;AAAA,IACT,eAAe;AAAA,IACf,KAAK;AAAA,IACL,gBAAgB;AAAA,IAChB,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AAAA,EARF,UAAA,CAUG,KACC,gBAAA,EAAC,GAAD;AAAA,IACE,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS,IAAkB,SAAS;AAAA,IAEnC,UAAA;AAAA,EACK,CAAA,GAGT,KACC,gBAAA,EAAC,GAAD;AAAA,IACE,GAAI;AAAA,IACJ,OAAO;AAAA,IACP,UAAU;AAAA,IACV,SAAS;AAAA,IACT,SAAQ;AAAA,IAEP,UAAA;AAAA,EACK,CAAA,CAEL"}
|
|
@@ -3,16 +3,16 @@ import g from "../../common/components/drawer/Drawer.es.js";
|
|
|
3
3
|
import y from "react";
|
|
4
4
|
import { observer as b } from "mobx-react-lite";
|
|
5
5
|
import v from "@mui/material/Stack";
|
|
6
|
-
import { jsx as
|
|
7
|
-
import { alpha as
|
|
6
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
7
|
+
import { alpha as o, useTheme as D } from "@mui/material/styles";
|
|
8
8
|
import { AdapterDateFns as S } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
var
|
|
12
|
-
const { finstrong: l } = u(),
|
|
9
|
+
import { LocalizationProvider as x } from "@mui/x-date-pickers/LocalizationProvider";
|
|
10
|
+
import { StaticDatePicker as w } from "@mui/x-date-pickers";
|
|
11
|
+
var B = ({ isOpen: n, onClose: a }) => {
|
|
12
|
+
const { finstrong: l } = u(), t = D(), { updateUser: c, user: i } = f(), { loadPeerScore: m } = h(), [r, s] = y.useState(i.birthday), p = (d) => {
|
|
13
13
|
s(Math.floor(new Date(d).getTime() / 1e3));
|
|
14
14
|
};
|
|
15
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ e(g, {
|
|
16
16
|
footerStyles: {
|
|
17
17
|
borderTop: 1,
|
|
18
18
|
borderColor: "divider",
|
|
@@ -31,28 +31,28 @@ var w = ({ isOpen: n, onClose: a }) => {
|
|
|
31
31
|
},
|
|
32
32
|
onSecondaryAction: a,
|
|
33
33
|
title: l.date_of_birth,
|
|
34
|
-
children: /* @__PURE__ */
|
|
34
|
+
children: /* @__PURE__ */ e(v, {
|
|
35
35
|
sx: {
|
|
36
36
|
bgcolor: "background.default",
|
|
37
37
|
height: "100%"
|
|
38
38
|
},
|
|
39
|
-
children: /* @__PURE__ */
|
|
39
|
+
children: /* @__PURE__ */ e(x, {
|
|
40
40
|
dateAdapter: S,
|
|
41
|
-
children: /* @__PURE__ */
|
|
41
|
+
children: /* @__PURE__ */ e(w, {
|
|
42
42
|
disableFuture: !0,
|
|
43
43
|
onChange: p,
|
|
44
44
|
slotProps: {
|
|
45
45
|
nextIconButton: { sx: {
|
|
46
46
|
color: "primary.main",
|
|
47
|
-
"&:hover": { bgcolor:
|
|
47
|
+
"&:hover": { bgcolor: o(t.palette.primary.light, 0.1) }
|
|
48
48
|
} },
|
|
49
49
|
previousIconButton: { sx: {
|
|
50
50
|
color: "primary.main",
|
|
51
|
-
"&:hover": { bgcolor:
|
|
51
|
+
"&:hover": { bgcolor: o(t.palette.primary.light, 0.1) }
|
|
52
52
|
} },
|
|
53
53
|
switchViewButton: { sx: {
|
|
54
54
|
color: "primary.main",
|
|
55
|
-
"&:hover": { bgcolor:
|
|
55
|
+
"&:hover": { bgcolor: o(t.palette.primary.light, 0.1) }
|
|
56
56
|
} }
|
|
57
57
|
},
|
|
58
58
|
slots: {
|
|
@@ -63,7 +63,7 @@ var w = ({ isOpen: n, onClose: a }) => {
|
|
|
63
63
|
width: "100%",
|
|
64
64
|
"& .MuiIconButton-edgeEnd": {
|
|
65
65
|
color: "primary.main",
|
|
66
|
-
"&:hover": { bgcolor:
|
|
66
|
+
"&:hover": { bgcolor: o(t.palette.primary.light, 0.1) }
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
value: r ? /* @__PURE__ */ new Date(r * 1e3) : /* @__PURE__ */ new Date()
|
|
@@ -71,9 +71,9 @@ var w = ({ isOpen: n, onClose: a }) => {
|
|
|
71
71
|
})
|
|
72
72
|
})
|
|
73
73
|
});
|
|
74
|
-
},
|
|
74
|
+
}, j = b(B);
|
|
75
75
|
export {
|
|
76
|
-
|
|
76
|
+
j as default
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
//# sourceMappingURL=ManageDOB.es.js.map
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { DATE_FORMATS_INTL as b, formatDate as f } from "../../../core/constants/DateFormats.es.js";
|
|
2
2
|
import { useGlobalCopyStore as u, useGoalStore as _, useUserStore as S } from "../../../common/context/hooks.es.js";
|
|
3
|
-
import { ListItemAction as
|
|
3
|
+
import { ListItemAction as A } from "../../../common/components/ListItemAction.es.js";
|
|
4
4
|
import i from "react";
|
|
5
|
-
import { observer as
|
|
5
|
+
import { observer as T } from "mobx-react-lite";
|
|
6
6
|
import { jsx as o } from "react/jsx-runtime";
|
|
7
7
|
import { fromUnixTime as s } from "date-fns/fromUnixTime";
|
|
8
|
-
import { getUnixTime as
|
|
8
|
+
import { getUnixTime as v } from "date-fns/getUnixTime";
|
|
9
9
|
import { AdapterDateFns as x } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { LocalizationProvider as D } from "@mui/x-date-pickers/LocalizationProvider";
|
|
11
|
+
import { DatePicker as g } from "@mui/x-date-pickers";
|
|
12
12
|
import { isValid as E } from "date-fns/isValid";
|
|
13
|
-
var
|
|
13
|
+
var O = T(({ goal: a }) => {
|
|
14
14
|
const { goals: r } = u(), { user: t, updateUser: d } = S(), { setAlert: m } = _(), [e, l] = i.useState(s(t.birthday ?? 0)), [n, p] = i.useState(null), c = a.is_complete, h = async () => {
|
|
15
15
|
e && E(e) && (await d({
|
|
16
16
|
...t,
|
|
17
|
-
birthday:
|
|
17
|
+
birthday: v(e)
|
|
18
18
|
}), m(r.alert_goal_updated_birthday));
|
|
19
19
|
};
|
|
20
|
-
return /* @__PURE__ */ o(
|
|
20
|
+
return /* @__PURE__ */ o(A, {
|
|
21
21
|
isDisabled: c,
|
|
22
22
|
isSaveDisabled: !!n,
|
|
23
23
|
label: r.details_birthday,
|
|
@@ -25,9 +25,9 @@ var N = A(({ goal: a }) => {
|
|
|
25
25
|
primaryText: r.details_birthday,
|
|
26
26
|
secondaryText: `${f(s(t.birthday ?? 0), b.MONTH_DAY_YEAR)}`,
|
|
27
27
|
zeroStateText: !a.guid && !t.birthday ? r.add_birthday : void 0,
|
|
28
|
-
children: /* @__PURE__ */ o(
|
|
28
|
+
children: /* @__PURE__ */ o(D, {
|
|
29
29
|
dateAdapter: x,
|
|
30
|
-
children: /* @__PURE__ */ o(
|
|
30
|
+
children: /* @__PURE__ */ o(g, {
|
|
31
31
|
label: r.details_birthday,
|
|
32
32
|
onChange: l,
|
|
33
33
|
onError: (y) => p(y),
|
|
@@ -38,7 +38,7 @@ var N = A(({ goal: a }) => {
|
|
|
38
38
|
});
|
|
39
39
|
});
|
|
40
40
|
export {
|
|
41
|
-
|
|
41
|
+
O as BirthdayAction
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
//# sourceMappingURL=BirthdayAction.es.js.map
|
|
@@ -4,16 +4,16 @@ import { formatOrdinal as M } from "../../core/utils/NumberFormatting.es.js";
|
|
|
4
4
|
import { Select as n } from "../../common/components/Select.es.js";
|
|
5
5
|
import g from "react";
|
|
6
6
|
import A from "@mui/material/Stack";
|
|
7
|
-
import { startOfToday as
|
|
7
|
+
import { startOfToday as y } from "date-fns/startOfToday";
|
|
8
8
|
import { jsx as t, jsxs as T } from "react/jsx-runtime";
|
|
9
9
|
import { addYears as _ } from "date-fns/addYears";
|
|
10
10
|
import { subDays as Y } from "date-fns/subDays";
|
|
11
11
|
import { setDayOfYear as x } from "date-fns/setDayOfYear";
|
|
12
12
|
import { AdapterDateFns as D } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
13
|
-
import {
|
|
13
|
+
import { LocalizationProvider as C } from "@mui/x-date-pickers/LocalizationProvider";
|
|
14
|
+
import { getDayOfYear as W } from "date-fns/getDayOfYear";
|
|
14
15
|
import { DatePicker as P } from "@mui/x-date-pickers";
|
|
15
|
-
|
|
16
|
-
var N = ({ frequency: a, firstDay: y, secondDay: h, onFrequencyChange: s, onFirstDayChange: d, onSecondDayChange: c }) => {
|
|
16
|
+
var N = ({ frequency: a, firstDay: i, secondDay: h, onFrequencyChange: s, onFirstDayChange: d, onSecondDayChange: c }) => {
|
|
17
17
|
const { recurring: e } = E(), f = g.useMemo(() => [
|
|
18
18
|
{
|
|
19
19
|
id: r.EveryWeek,
|
|
@@ -81,8 +81,8 @@ var N = ({ frequency: a, firstDay: y, secondDay: h, onFrequencyChange: s, onFirs
|
|
|
81
81
|
label: M(o + 1)
|
|
82
82
|
}));
|
|
83
83
|
l[30].label += ` (${e.last_day_of_month})`;
|
|
84
|
-
const v = l.slice(0, 15), b = l.slice(14), u = a === r.EveryWeek || a === r.EveryOtherWeek, k = a === r.TwiceAMonth || a === r.EveryMonth || a === r.EveryOtherMonth || a === r.EveryQuarter || a === r.EveryOtherQuarter, m = x(
|
|
85
|
-
o && d(
|
|
84
|
+
const v = l.slice(0, 15), b = l.slice(14), u = a === r.EveryWeek || a === r.EveryOtherWeek, k = a === r.TwiceAMonth || a === r.EveryMonth || a === r.EveryOtherMonth || a === r.EveryQuarter || a === r.EveryOtherQuarter, m = x(y(), i), w = m < y() ? _(m, 1) : m, O = (o) => {
|
|
85
|
+
o && d(W(o));
|
|
86
86
|
};
|
|
87
87
|
return /* @__PURE__ */ T(A, {
|
|
88
88
|
gap: 24,
|
|
@@ -98,13 +98,13 @@ var N = ({ frequency: a, firstDay: y, secondDay: h, onFrequencyChange: s, onFirs
|
|
|
98
98
|
label: e.day_of_the_week,
|
|
99
99
|
onChange: d,
|
|
100
100
|
options: p,
|
|
101
|
-
value:
|
|
101
|
+
value: i
|
|
102
102
|
}),
|
|
103
103
|
k && /* @__PURE__ */ t(n, {
|
|
104
104
|
label: a === r.TwiceAMonth ? e.first_day_of_the_month : e.day_of_the_month,
|
|
105
105
|
onChange: d,
|
|
106
106
|
options: a === r.TwiceAMonth ? v : l,
|
|
107
|
-
value:
|
|
107
|
+
value: i
|
|
108
108
|
}),
|
|
109
109
|
a === r.TwiceAMonth && /* @__PURE__ */ t(n, {
|
|
110
110
|
label: e.second_day_of_the_month,
|
|
@@ -112,13 +112,13 @@ var N = ({ frequency: a, firstDay: y, secondDay: h, onFrequencyChange: s, onFirs
|
|
|
112
112
|
options: b,
|
|
113
113
|
value: h ?? ""
|
|
114
114
|
}),
|
|
115
|
-
a === r.EveryYear && /* @__PURE__ */ t(
|
|
115
|
+
a === r.EveryYear && /* @__PURE__ */ t(C, {
|
|
116
116
|
dateAdapter: D,
|
|
117
117
|
children: /* @__PURE__ */ t(P, {
|
|
118
118
|
disablePast: !0,
|
|
119
119
|
label: e.next_payment_date,
|
|
120
|
-
maxDate: Y(_(
|
|
121
|
-
minDate:
|
|
120
|
+
maxDate: Y(_(y(), 1), 1),
|
|
121
|
+
minDate: y(),
|
|
122
122
|
onChange: O,
|
|
123
123
|
value: w
|
|
124
124
|
})
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { useAppConfig as F, useGlobalCopyStore as B, useSettingsStore as
|
|
2
|
-
import { useScreenSize as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { useAppConfig as F, useGlobalCopyStore as B, useSettingsStore as M, useUserStore as R } from "../../../common/context/hooks.es.js";
|
|
2
|
+
import { useScreenSize as I } from "../../../common/hooks/useScreenSize.es.js";
|
|
3
|
+
import L from "../../../common/components/dialog/Dialog.es.js";
|
|
4
|
+
import z from "./actions/ResetPasswordAction.es.js";
|
|
5
5
|
import N from "./actions/VerifyEmailAction.es.js";
|
|
6
|
-
import
|
|
6
|
+
import j from "./actions/VerifyPhoneAction.es.js";
|
|
7
7
|
import p from "react";
|
|
8
|
-
import { observer as
|
|
8
|
+
import { observer as H } from "mobx-react-lite";
|
|
9
9
|
import l from "@mui/material/Stack";
|
|
10
|
-
import { H3 as
|
|
11
|
-
import
|
|
10
|
+
import { H3 as J, P as O } from "@mxenabled/mxui";
|
|
11
|
+
import $ from "@mui/material/Button";
|
|
12
12
|
import { Fragment as G, jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
13
13
|
import { alpha as b, useTheme as K } from "@mui/material/styles";
|
|
14
14
|
import Y from "@mui/material/Box";
|
|
15
15
|
import { getUnixTime as q } from "date-fns/getUnixTime";
|
|
16
16
|
import d from "@mui/material/TextField";
|
|
17
17
|
import { AdapterDateFns as Q } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
18
|
+
import { LocalizationProvider as W } from "@mui/x-date-pickers/LocalizationProvider";
|
|
19
|
+
import { DatePicker as X } from "@mui/x-date-pickers";
|
|
20
20
|
var Z = ({ availableWidth: C, handleOnLeaveClick: f }) => {
|
|
21
|
-
const u = K(), { common: w, settings: o } = B(), { isMobile: m } =
|
|
21
|
+
const u = K(), { common: w, settings: o } = B(), { isMobile: m } = I(C), { config: h } = F(), { updateUser: S } = M(), { user: r } = R(), [a, U] = p.useState({
|
|
22
22
|
first_name: r.first_name,
|
|
23
23
|
last_name: r.last_name,
|
|
24
24
|
email: r.email,
|
|
@@ -26,7 +26,7 @@ var Z = ({ availableWidth: C, handleOnLeaveClick: f }) => {
|
|
|
26
26
|
birthday: r.birthday,
|
|
27
27
|
postal_code: r.postal_code,
|
|
28
28
|
credit_score: r.credit_score
|
|
29
|
-
}), [c, y] = p.useState(!1), [
|
|
29
|
+
}), [c, y] = p.useState(!1), [T, g] = p.useState(!1), _ = p.useRef(null), v = a.email && !r.email_is_verified && !c, x = a.phone && !r.phone_is_verified && !c;
|
|
30
30
|
p.useEffect(() => {
|
|
31
31
|
if (f) {
|
|
32
32
|
const e = (s) => {
|
|
@@ -37,17 +37,17 @@ var Z = ({ availableWidth: C, handleOnLeaveClick: f }) => {
|
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
}, [c]);
|
|
40
|
-
const
|
|
40
|
+
const V = () => {
|
|
41
41
|
if (a.birthday) {
|
|
42
42
|
const e = /* @__PURE__ */ new Date(a.birthday * 1e3), s = e.getUTCFullYear(), A = e.getUTCMonth(), E = e.getUTCDate();
|
|
43
43
|
return new Date(s, A, E);
|
|
44
44
|
}
|
|
45
|
-
},
|
|
45
|
+
}, D = async () => {
|
|
46
46
|
await S({
|
|
47
47
|
...r,
|
|
48
48
|
...a
|
|
49
49
|
}), y(!1);
|
|
50
|
-
},
|
|
50
|
+
}, P = () => {
|
|
51
51
|
g(!1), f && f();
|
|
52
52
|
}, k = () => {
|
|
53
53
|
g(!1);
|
|
@@ -70,8 +70,8 @@ var Z = ({ availableWidth: C, handleOnLeaveClick: f }) => {
|
|
|
70
70
|
"& .MuiTextField-root": { flex: 1 }
|
|
71
71
|
},
|
|
72
72
|
children: [
|
|
73
|
-
/* @__PURE__ */ t(
|
|
74
|
-
/* @__PURE__ */ t(
|
|
73
|
+
/* @__PURE__ */ t(J, { children: o.personal_details }),
|
|
74
|
+
/* @__PURE__ */ t(O, {
|
|
75
75
|
variant: "body1",
|
|
76
76
|
children: o.update_information
|
|
77
77
|
}),
|
|
@@ -115,16 +115,16 @@ var Z = ({ availableWidth: C, handleOnLeaveClick: f }) => {
|
|
|
115
115
|
label: o.mobile_number,
|
|
116
116
|
onChange: (e) => n({ phone: e.target.value }),
|
|
117
117
|
type: "tel"
|
|
118
|
-
}), x && /* @__PURE__ */ t(
|
|
118
|
+
}), x && /* @__PURE__ */ t(j, {})]
|
|
119
119
|
})]
|
|
120
120
|
}),
|
|
121
121
|
/* @__PURE__ */ i(l, {
|
|
122
122
|
direction: m ? "column" : "row",
|
|
123
123
|
spacing: 24,
|
|
124
124
|
sx: { mb: 24 },
|
|
125
|
-
children: [/* @__PURE__ */ t(
|
|
125
|
+
children: [/* @__PURE__ */ t(W, {
|
|
126
126
|
dateAdapter: Q,
|
|
127
|
-
children: /* @__PURE__ */ t(
|
|
127
|
+
children: /* @__PURE__ */ t(X, {
|
|
128
128
|
label: o.birthdate,
|
|
129
129
|
onChange: (e) => n({ birthday: q(e) }),
|
|
130
130
|
slotProps: {
|
|
@@ -144,7 +144,7 @@ var Z = ({ availableWidth: C, handleOnLeaveClick: f }) => {
|
|
|
144
144
|
"&:hover": { backgroundColor: b(u.palette.primary.light, 0.1) }
|
|
145
145
|
}
|
|
146
146
|
},
|
|
147
|
-
value:
|
|
147
|
+
value: V()
|
|
148
148
|
})
|
|
149
149
|
}), /* @__PURE__ */ t(d, {
|
|
150
150
|
defaultValue: a.postal_code,
|
|
@@ -158,26 +158,26 @@ var Z = ({ availableWidth: C, handleOnLeaveClick: f }) => {
|
|
|
158
158
|
label: o.credit_score,
|
|
159
159
|
onChange: (e) => n({ credit_score: Number(e.target.value) })
|
|
160
160
|
}),
|
|
161
|
-
h.display_password_options_in_settings && /* @__PURE__ */ t(
|
|
162
|
-
/* @__PURE__ */ t(
|
|
161
|
+
h.display_password_options_in_settings && /* @__PURE__ */ t(z, {}),
|
|
162
|
+
/* @__PURE__ */ t($, {
|
|
163
163
|
disabled: !c,
|
|
164
|
-
onClick:
|
|
164
|
+
onClick: D,
|
|
165
165
|
sx: { width: m ? "100%" : 124 },
|
|
166
166
|
variant: "contained",
|
|
167
167
|
children: w.save_button
|
|
168
168
|
})
|
|
169
169
|
] })
|
|
170
170
|
]
|
|
171
|
-
}), /* @__PURE__ */ t(
|
|
171
|
+
}), /* @__PURE__ */ t(L, {
|
|
172
172
|
copy: { title: o.discard_changes },
|
|
173
|
-
isOpen:
|
|
173
|
+
isOpen: T,
|
|
174
174
|
onClose: k,
|
|
175
|
-
onSecondaryAction:
|
|
175
|
+
onSecondaryAction: P,
|
|
176
176
|
primaryText: o.keep_editing,
|
|
177
177
|
secondaryText: o.leave,
|
|
178
178
|
children: o.discard_changes_message
|
|
179
179
|
})] });
|
|
180
|
-
}, ye =
|
|
180
|
+
}, ye = H(Z);
|
|
181
181
|
export {
|
|
182
182
|
ye as default
|
|
183
183
|
};
|
|
@@ -1,64 +1,65 @@
|
|
|
1
|
-
import { DATE_FORMATS_INTL as
|
|
2
|
-
import I,
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import { fromUnixUTC as m } from "../../../../../core/utils/DateUtil.es.js";
|
|
1
|
+
import { DATE_FORMATS_INTL as A, formatDate as C } from "../../../../../core/constants/DateFormats.es.js";
|
|
2
|
+
import { useEvent as S, useGlobalCopyStore as I, useTransactionStore as v } from "../../../../../common/context/hooks.es.js";
|
|
3
|
+
import L from "../../../../../common/components/drawer/Drawer.es.js";
|
|
4
|
+
import { ANALYTICS_EVENTS as g } from "../../../../../common/constants/Analytics.es.js";
|
|
5
|
+
import { fromUnixUTC as s, toUnixUTC as N } from "../../../../../core/utils/DateUtil.es.js";
|
|
7
6
|
import { useTransactionsUiStore as b } from "../../../../context/hooks.es.js";
|
|
8
|
-
import { ON_CLICK_EVENTS as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { Text as
|
|
12
|
-
import { Icon as
|
|
7
|
+
import { ON_CLICK_EVENTS as D } from "../../../../constants/OnClickEvents.es.js";
|
|
8
|
+
import c from "react";
|
|
9
|
+
import E from "@mui/material/Stack";
|
|
10
|
+
import { Text as O } from "@mxenabled/mxui";
|
|
11
|
+
import { Icon as d } from "@mxenabled/mx-icons";
|
|
13
12
|
import { jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
14
|
-
import { useTheme as
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import M from "@mui/material/
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
import { useTheme as k } from "@mui/material/styles";
|
|
14
|
+
import P from "@mui/material/ListItem";
|
|
15
|
+
import U from "@mui/material/Avatar";
|
|
16
|
+
import M from "@mui/material/ListItemAvatar";
|
|
17
|
+
import R from "@mui/material/ListItemButton";
|
|
18
|
+
import w from "@mui/material/ListItemIcon";
|
|
19
|
+
import B from "@mui/material/ListItemText";
|
|
20
|
+
import { AdapterDateFns as F } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
21
|
+
import { LocalizationProvider as K } from "@mui/x-date-pickers/LocalizationProvider";
|
|
22
|
+
import { StaticDatePicker as Y } from "@mui/x-date-pickers/StaticDatePicker";
|
|
23
|
+
var dt = ({ transaction: e }) => {
|
|
24
|
+
const { onEvent: n } = S(), { updateTransaction: p } = v(), { updateManualTransaction: f } = b(), { common: o, transactions: r } = I(), _ = k(), [u, a] = c.useState(!1), [i, T] = c.useState(e.date), x = (m) => {
|
|
25
|
+
m && T(N(m));
|
|
25
26
|
}, y = async () => {
|
|
26
27
|
if (e.is_manual && !e.guid) {
|
|
27
|
-
|
|
28
|
+
f({
|
|
28
29
|
...e,
|
|
29
30
|
date: i
|
|
30
31
|
}), a(!1);
|
|
31
32
|
return;
|
|
32
33
|
}
|
|
33
|
-
await
|
|
34
|
+
await p({
|
|
34
35
|
...e,
|
|
35
36
|
date: i
|
|
36
|
-
}), n(
|
|
37
|
-
},
|
|
38
|
-
return /* @__PURE__ */ l(
|
|
37
|
+
}), n(g.TRANSACTION_DETAILS_CLICK_DATE, { transaction_guid: e.guid }), a(!1);
|
|
38
|
+
}, h = _.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
39
|
+
return /* @__PURE__ */ l(P, {
|
|
39
40
|
className: "mx-txn-date-action",
|
|
40
41
|
disableGutters: !0,
|
|
41
42
|
disablePadding: !0,
|
|
42
|
-
children: [/* @__PURE__ */ l(
|
|
43
|
+
children: [/* @__PURE__ */ l(R, {
|
|
43
44
|
onClick: () => {
|
|
44
|
-
n(
|
|
45
|
+
n(D.ON_TRANSACTION_DATE_CLICK), a(!0);
|
|
45
46
|
},
|
|
46
47
|
children: [
|
|
47
|
-
/* @__PURE__ */ t(
|
|
48
|
-
sx: { bgcolor:
|
|
48
|
+
/* @__PURE__ */ t(M, { children: /* @__PURE__ */ t(U, {
|
|
49
|
+
sx: { bgcolor: h },
|
|
49
50
|
variant: "rounded",
|
|
50
|
-
children: /* @__PURE__ */ t(
|
|
51
|
+
children: /* @__PURE__ */ t(d, {
|
|
51
52
|
name: "calendar_month",
|
|
52
53
|
sx: { color: "text.primary" }
|
|
53
54
|
})
|
|
54
55
|
}) }),
|
|
55
|
-
/* @__PURE__ */ t(
|
|
56
|
-
primary:
|
|
57
|
-
secondary: /* @__PURE__ */ t(
|
|
56
|
+
/* @__PURE__ */ t(B, {
|
|
57
|
+
primary: r.date_title,
|
|
58
|
+
secondary: /* @__PURE__ */ t(O, {
|
|
58
59
|
bold: !0,
|
|
59
60
|
sx: { color: "text.primary" },
|
|
60
61
|
variant: "body1",
|
|
61
|
-
children: C(
|
|
62
|
+
children: C(s(e.date), A.FULL_MONTH_DAY_YEAR)
|
|
62
63
|
}),
|
|
63
64
|
slotProps: { primary: {
|
|
64
65
|
variant: "caption",
|
|
@@ -66,38 +67,43 @@ var st = ({ transaction: e }) => {
|
|
|
66
67
|
fontWeight: "normal"
|
|
67
68
|
} }
|
|
68
69
|
}),
|
|
69
|
-
/* @__PURE__ */ t(
|
|
70
|
+
/* @__PURE__ */ t(w, { children: /* @__PURE__ */ t(d, {
|
|
70
71
|
name: "chevron_right",
|
|
71
72
|
sx: { color: "text.primary" }
|
|
72
73
|
}) })
|
|
73
74
|
]
|
|
74
|
-
}), /* @__PURE__ */ t(
|
|
75
|
-
ariaLabelClose:
|
|
76
|
-
isOpen:
|
|
75
|
+
}), /* @__PURE__ */ t(L, {
|
|
76
|
+
ariaLabelClose: o.close_aria,
|
|
77
|
+
isOpen: u,
|
|
77
78
|
onClose: () => a(!1),
|
|
78
79
|
onPrimaryAction: y,
|
|
79
|
-
primaryText:
|
|
80
|
-
secondaryText:
|
|
81
|
-
title:
|
|
82
|
-
children: /* @__PURE__ */ t(
|
|
80
|
+
primaryText: o.save_button,
|
|
81
|
+
secondaryText: o.cancel_button,
|
|
82
|
+
title: r.date_edit_title,
|
|
83
|
+
children: /* @__PURE__ */ t(E, {
|
|
83
84
|
alignItems: "center",
|
|
84
85
|
mt: 40,
|
|
85
|
-
children: /* @__PURE__ */ t(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
children: /* @__PURE__ */ t(K, {
|
|
87
|
+
dateAdapter: F,
|
|
88
|
+
localeText: {
|
|
89
|
+
nextMonth: r.date_next_aria,
|
|
90
|
+
previousMonth: r.date_prev_aria,
|
|
91
|
+
todayButtonLabel: o.date_range_picker.today
|
|
91
92
|
},
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
children: /* @__PURE__ */ t(Y, {
|
|
94
|
+
displayStaticWrapperAs: "desktop",
|
|
95
|
+
onChange: x,
|
|
96
|
+
slotProps: { actionBar: { actions: ["today"] } },
|
|
97
|
+
value: s(i),
|
|
98
|
+
views: ["day"]
|
|
99
|
+
})
|
|
94
100
|
})
|
|
95
101
|
})
|
|
96
102
|
})]
|
|
97
103
|
});
|
|
98
104
|
};
|
|
99
105
|
export {
|
|
100
|
-
|
|
106
|
+
dt as default
|
|
101
107
|
};
|
|
102
108
|
|
|
103
109
|
//# sourceMappingURL=DateAction.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateAction.es.js","names":[],"sources":["../../../../../../src/transactions/components/shared/transactiondetails/actions/DateAction.tsx"],"sourcesContent":["import React from 'react'\
|
|
1
|
+
{"version":3,"file":"DateAction.es.js","names":[],"sources":["../../../../../../src/transactions/components/shared/transactiondetails/actions/DateAction.tsx"],"sourcesContent":["import React from 'react'\n\nimport Avatar from '@mui/material/Avatar'\nimport Stack from '@mui/material/Stack'\nimport ListItem from '@mui/material/ListItem'\nimport ListItemAvatar from '@mui/material/ListItemAvatar'\nimport ListItemButton from '@mui/material/ListItemButton'\nimport ListItemIcon from '@mui/material/ListItemIcon'\nimport ListItemText from '@mui/material/ListItemText'\nimport { useTheme } from '@mui/material/styles'\nimport { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3'\nimport { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'\nimport { StaticDatePicker } from '@mui/x-date-pickers/StaticDatePicker'\n\nimport { Text } from '@mxenabled/mxui'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport {\n ANALYTICS_EVENTS,\n Drawer,\n useEvent,\n useGlobalCopyStore,\n useTransactionStore,\n} from '../../../../../common'\n\nimport { DATE_FORMATS_INTL, formatDate } from '../../../../../core/constants'\nimport { fromUnixUTC, toUnixUTC } from '../../../../../core/utils/DateUtil'\nimport type { Transaction } from '../../../../../core'\n\nimport { useTransactionsUiStore } from '../../../../context/hooks'\nimport { ON_CLICK_EVENTS } from '../../../../constants/OnClickEvents'\n\ninterface DateActionProps {\n transaction: Transaction\n}\n\nconst DateAction: React.FC<DateActionProps> = ({ transaction }) => {\n const { onEvent } = useEvent()\n const { updateTransaction } = useTransactionStore()\n const { updateManualTransaction } = useTransactionsUiStore()\n const { common: commonCopy, transactions: copy } = useGlobalCopyStore()\n\n const theme = useTheme()\n const [open, setOpen] = React.useState(false)\n const [date, setDate] = React.useState<number>(transaction.date)\n\n const handleDateSelected = (selectedDate: Date | null) => {\n if (selectedDate) setDate(toUnixUTC(selectedDate))\n }\n\n const handleSave = async () => {\n if (transaction.is_manual && !transaction.guid) {\n updateManualTransaction({ ...transaction, date })\n setOpen(false)\n return\n }\n\n await updateTransaction({ ...transaction, date })\n onEvent(ANALYTICS_EVENTS.TRANSACTION_DETAILS_CLICK_DATE, { transaction_guid: transaction.guid })\n setOpen(false)\n }\n\n const bgColor = theme.palette.mode === 'dark' ? 'grey.800' : 'grey.100'\n\n return (\n <ListItem className=\"mx-txn-date-action\" disableGutters={true} disablePadding={true}>\n <ListItemButton\n onClick={() => {\n onEvent(ON_CLICK_EVENTS.ON_TRANSACTION_DATE_CLICK)\n setOpen(true)\n }}\n >\n <ListItemAvatar>\n <Avatar sx={{ bgcolor: bgColor }} variant=\"rounded\">\n <Icon name=\"calendar_month\" sx={{ color: 'text.primary' }} />\n </Avatar>\n </ListItemAvatar>\n <ListItemText\n primary={copy.date_title}\n secondary={\n <Text bold={true} sx={{ color: 'text.primary' }} variant=\"body1\">\n {formatDate(fromUnixUTC(transaction.date), DATE_FORMATS_INTL.FULL_MONTH_DAY_YEAR)}\n </Text>\n }\n slotProps={{ primary: { variant: 'caption', fontSize: 11, fontWeight: 'normal' } }}\n />\n <ListItemIcon>\n <Icon name=\"chevron_right\" sx={{ color: 'text.primary' }} />\n </ListItemIcon>\n </ListItemButton>\n\n <Drawer\n ariaLabelClose={commonCopy.close_aria}\n isOpen={open}\n onClose={() => setOpen(false)}\n onPrimaryAction={handleSave}\n primaryText={commonCopy.save_button}\n secondaryText={commonCopy.cancel_button}\n title={copy.date_edit_title}\n >\n <Stack alignItems=\"center\" mt={40}>\n <LocalizationProvider\n dateAdapter={AdapterDateFns}\n localeText={{\n nextMonth: copy.date_next_aria,\n previousMonth: copy.date_prev_aria,\n todayButtonLabel: commonCopy.date_range_picker.today,\n }}\n >\n <StaticDatePicker\n displayStaticWrapperAs=\"desktop\"\n onChange={handleDateSelected}\n slotProps={{ actionBar: { actions: ['today'] } }}\n value={fromUnixUTC(date)}\n views={['day']}\n />\n </LocalizationProvider>\n </Stack>\n </Drawer>\n </ListItem>\n )\n}\n\nexport default DateAction\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAoCA,IAAM,KAAA,CAAyC,EAAE,aAAA,EAAA,MAAkB;AACjE,QAAM,EAAE,SAAA,EAAA,IAAY,EAAS,GACvB,EAAE,mBAAA,EAAA,IAAsB,EAAoB,GAC5C,EAAE,yBAAA,EAAA,IAA4B,EAAuB,GACrD,EAAE,QAAQ,GAAY,cAAc,EAAA,IAAS,EAAmB,GAEhE,IAAQ,EAAS,GACjB,CAAC,GAAM,CAAA,IAAW,EAAM,SAAS,EAAK,GACtC,CAAC,GAAM,CAAA,IAAW,EAAM,SAAiB,EAAY,IAAI,GAEzD,IAAA,CAAsB,MAA8B;AACxD,IAAI,KAAc,EAAQ,EAAU,CAAY,CAAC;AAAA,EACnD,GAEM,IAAa,YAAY;AAC7B,QAAI,EAAY,aAAa,CAAC,EAAY,MAAM;AAC9C,MAAA,EAAwB;AAAA,QAAE,GAAG;AAAA,QAAa,MAAA;AAAA,MAAK,CAAC,GAChD,EAAQ,EAAK;AACb;AAA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ACA;AAAA,IAEhB,CAAA,GAAA,gBAAA,EAAC,GAAD;AAAA,MACE,gBAAgB,EAAW;AAAA,MAC3B,QAAQ;AAAA,MACR,SAAA,MAAe,EAAQ,EAAK;AAAA,MAC5B,iBAAiB;AAAA,MACjB,aAAa,EAAW;AAAA,MACxB,eAAe,EAAW;AAAA,MAC1B,OAAO,EAAK;AAAA,MAEZ,UAAA,gBAAA,EAAC,GAAD;AAAA,QAAO,YAAW;AAAA,QAAS,IAAI;AAAA,QAC7B,UAAA,gBAAA,EAAC,GAAD;AAAA,UACE,aAAa;AAAA,UACb,YAAY;AAAA,YACV,WAAW,EAAK;AAAA,YAChB,eAAe,EAAK;AAAA,YACpB,kBAAkB,EAAW,kBAAkB;AAAA,UACjD;AAAA,UAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,YACE,wBAAuB;AAAA,YACvB,UAAU;AAAA,YACV,WAAW,EAAE,WAAW,EAAE,SAAS,CAAC,OAAO,EAAE,EAAE;AAAA,YAC/C,OAAO,EAAY,CAAI;AAAA,YACvB,OAAO,CAAC,KAAK;AAAA,UACd,CAAA;AAAA,QACmB,CAAA;AAAA,MACjB,CAAA;AAAA,IACD,CAAA,CACA;AAAA;AAEd"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mx-cartographer/experiences",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.52-alpha.al0",
|
|
4
4
|
"description": "Library containing experience widgets",
|
|
5
5
|
"author": "MX",
|
|
6
6
|
"license": "MIT",
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
"@mui/x-date-pickers-pro": "^7.29.4",
|
|
221
221
|
"@mxenabled/cssinjs": "^0.6.0",
|
|
222
222
|
"@mxenabled/mx-icons": "^2.3.0",
|
|
223
|
-
"@mxenabled/mxui": "^2.
|
|
223
|
+
"@mxenabled/mxui": "^2.10.1",
|
|
224
224
|
"@mxenabled/web-widget-sdk": "^0.0.15",
|
|
225
225
|
"@tanstack/react-virtual": "^3.14.9",
|
|
226
226
|
"bowser": "^2.14.1",
|