@mx-cartographer/experiences 9.4.70 → 9.5.0-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.
Files changed (59) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +2 -0
  3. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailEdit.es.js +2 -2
  4. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailEdit.es.js.map +1 -1
  5. package/dist/core/types/Insights.d.ts +8 -0
  6. package/dist/debts/components/DebtsTable.es.js +2 -2
  7. package/dist/debts/components/DebtsTable.es.js.map +1 -1
  8. package/dist/finstrong/components/ManageDOB.es.js +1 -1
  9. package/dist/finstrong/components/ManageDOB.es.js.map +1 -1
  10. package/dist/finstrong/components/onboarding/OnboardingBirthday.es.js +1 -1
  11. package/dist/finstrong/components/onboarding/OnboardingBirthday.es.js.map +1 -1
  12. package/dist/goals/components/actions/BirthdayAction.es.js +1 -1
  13. package/dist/goals/components/actions/BirthdayAction.es.js.map +1 -1
  14. package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/DirectDepositBlock.d.ts +16 -0
  15. package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/DirectDepositBlock.es.js +24 -0
  16. package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/DirectDepositBlock.es.js.map +1 -0
  17. package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/index.d.ts +1 -0
  18. package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/layout.d.ts +28 -0
  19. package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/layout.es.js +63 -0
  20. package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/layout.es.js.map +1 -0
  21. package/dist/insights-v2/blocks/ComponentBlocks/index.d.ts +1 -0
  22. package/dist/insights-v2/components/AccountHeroCard.d.ts +7 -1
  23. package/dist/insights-v2/components/AccountHeroCard.es.js +6 -7
  24. package/dist/insights-v2/components/AccountHeroCard.es.js.map +1 -1
  25. package/dist/insights-v2/components/DirectDepositCard.d.ts +48 -0
  26. package/dist/insights-v2/components/DirectDepositCard.es.js +37 -0
  27. package/dist/insights-v2/components/DirectDepositCard.es.js.map +1 -0
  28. package/dist/insights-v2/components/TransferLogoCard.d.ts +5 -0
  29. package/dist/insights-v2/components/TransferLogoCard.es.js +37 -55
  30. package/dist/insights-v2/components/TransferLogoCard.es.js.map +1 -1
  31. package/dist/insights-v2/components/shared/ConfettiOverlay.d.ts +1 -0
  32. package/dist/insights-v2/components/shared/ConfettiOverlay.es.js +27 -0
  33. package/dist/insights-v2/components/shared/ConfettiOverlay.es.js.map +1 -0
  34. package/dist/insights-v2/index.d.ts +1 -0
  35. package/dist/insights-v2/index.es.js +70 -66
  36. package/dist/insights-v2/mappings/blocks.es.js +34 -32
  37. package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
  38. package/dist/investments/components/HoldingTable.es.js +1 -1
  39. package/dist/investments/components/HoldingTable.es.js.map +1 -1
  40. package/dist/recurringtransactions/components/PaymentSchedule.es.js +1 -1
  41. package/dist/recurringtransactions/components/PaymentSchedule.es.js.map +1 -1
  42. package/dist/recurringtransactions/components/recurrencecalendar/RecurrenceCalendar.es.js +1 -1
  43. package/dist/recurringtransactions/components/recurrencecalendar/RecurrenceCalendar.es.js.map +1 -1
  44. package/dist/recurringtransactions/components/recurrencecalendar/RecurrenceDay.d.ts +1 -1
  45. package/dist/recurringtransactions/components/recurrencecalendar/RecurrenceDay.es.js.map +1 -1
  46. package/dist/settings/components/notifications/AccountProfileListItem.es.js +10 -10
  47. package/dist/settings/components/notifications/AccountProfileListItem.es.js.map +1 -1
  48. package/dist/settings/components/profile/ProfileTab.es.js +22 -22
  49. package/dist/settings/components/profile/ProfileTab.es.js.map +1 -1
  50. package/dist/transactions/components/shared/TransactionTable.es.js +2 -2
  51. package/dist/transactions/components/shared/TransactionTable.es.js.map +1 -1
  52. package/dist/transactions/components/shared/transactiondetails/actions/DateAction.es.js +1 -1
  53. package/dist/transactions/components/shared/transactiondetails/actions/DateAction.es.js.map +1 -1
  54. package/dist/trends/components/trendstable/AccessibleSortIcon.d.ts +2 -9
  55. package/dist/trends/components/trendstable/AccessibleSortIcon.es.js +19 -20
  56. package/dist/trends/components/trendstable/AccessibleSortIcon.es.js.map +1 -1
  57. package/dist/trends/components/trendstable/TrendsTable.es.js +2 -2
  58. package/dist/trends/components/trendstable/TrendsTable.es.js.map +1 -1
  59. package/package.json +17 -6
@@ -17,7 +17,7 @@ import M from "@mui/material/ListItemAvatar";
17
17
  import R from "@mui/material/ListItemButton";
18
18
  import w from "@mui/material/ListItemIcon";
19
19
  import B from "@mui/material/ListItemText";
20
- import { AdapterDateFns as F } from "@mui/x-date-pickers/AdapterDateFnsV3";
20
+ import { AdapterDateFns as F } from "@mui/x-date-pickers/AdapterDateFns";
21
21
  import { LocalizationProvider as K } from "@mui/x-date-pickers/LocalizationProvider";
22
22
  import { StaticDatePicker as Y } from "@mui/x-date-pickers/StaticDatePicker";
23
23
  var dt = ({ transaction: e }) => {
@@ -1 +1 @@
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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A,QAAI,CAAA,EAC/C,CAAA;AAAA,MACA;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"}
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/AdapterDateFns'\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,QAA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AAC,GAAD,EAAA,UACE,gBAAA,EAAC,GAAD;AAAA,UAAM,MAAK;AAAA,UAAgB,IAAI,EAAE,OAAO,eAAe;AAAA,QAAI,CAAA,EAC/C,CAAA;AAAA,MACA;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"}
@@ -1,13 +1,6 @@
1
1
  import { default as React } from 'react';
2
- import { GridSortDirection } from '@mui/x-data-grid-pro';
3
- interface AccessibleSortIconProps {
4
- field: string;
5
- direction: GridSortDirection;
6
- index: number | undefined;
7
- sortingOrder: readonly GridSortDirection[];
8
- disabled?: boolean;
9
- className?: string;
10
- }
2
+ import { GridSlotProps } from '@mui/x-data-grid-pro';
3
+ type AccessibleSortIconProps = GridSlotProps['columnHeaderSortIcon'];
11
4
  declare function AccessibleSortIconRaw({ direction, index, sortingOrder, disabled, className, field, }: AccessibleSortIconProps): import("react/jsx-runtime").JSX.Element | null;
12
5
  export declare const AccessibleSortIcon: React.MemoExoticComponent<typeof AccessibleSortIconRaw>;
13
6
  export {};
@@ -1,49 +1,48 @@
1
- import b from "react";
1
+ import I from "react";
2
2
  import { jsx as n } from "react/jsx-runtime";
3
3
  import { styled as g } from "@mui/material/styles";
4
- import B from "@mui/material/IconButton";
5
- import S from "@mui/material/Badge";
6
- import { useGridApiContext as h, useGridRootProps as y } from "@mui/x-data-grid-pro";
7
- var C = g("div")({
4
+ import B from "@mui/material/Badge";
5
+ import { useGridApiContext as S, useGridRootProps as h } from "@mui/x-data-grid-pro";
6
+ var y = g("div")({
8
7
  display: "flex",
9
8
  visibility: "hidden",
10
9
  width: 0
11
10
  });
12
- function v({ direction: t, index: s, sortingOrder: m, disabled: f, className: l, field: c }) {
13
- const p = h(), e = y();
14
- let o = null;
11
+ function C({ direction: e, index: r, sortingOrder: m, disabled: f, className: l, field: c }) {
12
+ const p = S(), o = h();
13
+ let t = null;
15
14
  const a = {};
16
- if (t === "asc" ? o = e.slots.columnSortedAscendingIcon : t === "desc" ? o = e.slots.columnSortedDescendingIcon : (o = e.slots.columnUnsortedIcon ?? null, a.sortingOrder = m), !o) return null;
15
+ if (e === "asc" ? t = o.slots.columnSortedAscendingIcon : e === "desc" ? t = o.slots.columnSortedDescendingIcon : (t = o.slots.columnUnsortedIcon ?? null, a.sortingOrder = m), !t) return null;
17
16
  const i = p.current.getColumn(c)?.headerName ?? c;
18
- let r = "";
19
- t === "asc" ? r = ", sorted ascending" : t === "desc" && (r = ", sorted descending");
20
- const d = `Sort by ${i}${["Total", "Category"].includes(i) ? "" : " category totals"}${r}`, I = /* @__PURE__ */ n(o, {
17
+ let s = "";
18
+ e === "asc" ? s = ", sorted ascending" : e === "desc" && (s = ", sorted descending");
19
+ const d = `Sort by ${i}${["Total", "Category"].includes(i) ? "" : " category totals"}${s}`, b = /* @__PURE__ */ n(t, {
21
20
  className: "MuiDataGrid-sortIcon",
22
21
  fontSize: "small",
23
22
  ...a
24
- }), u = /* @__PURE__ */ n(B, {
23
+ }), u = /* @__PURE__ */ n(o.slots.baseIconButton, {
25
24
  disabled: f,
26
25
  size: "small",
27
26
  tabIndex: -1,
28
- ...e.slotProps?.baseIconButton,
27
+ ...o.slotProps?.baseIconButton,
29
28
  "aria-label": d,
30
29
  className: `MuiDataGrid-sortButton${l ? ` ${l}` : ""}`,
31
30
  title: d,
32
- children: I
31
+ children: b
33
32
  });
34
- return /* @__PURE__ */ n(C, {
33
+ return /* @__PURE__ */ n(y, {
35
34
  className: "MuiDataGrid-iconButtonContainer",
36
- children: s != null ? /* @__PURE__ */ n(S, {
37
- badgeContent: s,
35
+ children: r != null ? /* @__PURE__ */ n(B, {
36
+ badgeContent: r,
38
37
  color: "default",
39
38
  overlap: "circular",
40
39
  children: u
41
40
  }) : u
42
41
  });
43
42
  }
44
- var P = b.memo(v);
43
+ var D = I.memo(C);
45
44
  export {
46
- P as AccessibleSortIcon
45
+ D as AccessibleSortIcon
47
46
  };
48
47
 
49
48
  //# sourceMappingURL=AccessibleSortIcon.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AccessibleSortIcon.es.js","names":[],"sources":["../../../../src/trends/components/trendstable/AccessibleSortIcon.tsx"],"sourcesContent":["import React from 'react'\n\nimport Badge from '@mui/material/Badge'\nimport IconButton from '@mui/material/IconButton'\nimport { useGridApiContext, useGridRootProps } from '@mui/x-data-grid-pro'\nimport type { GridSortDirection } from '@mui/x-data-grid-pro'\n\nimport { styled } from '@mui/material/styles'\n\nconst IconButtonContainer = styled('div')({\n display: 'flex',\n visibility: 'hidden',\n width: 0,\n})\n\ninterface AccessibleSortIconProps {\n field: string\n direction: GridSortDirection\n index: number | undefined\n sortingOrder: readonly GridSortDirection[]\n disabled?: boolean\n className?: string\n}\n\nfunction AccessibleSortIconRaw({\n direction,\n index,\n sortingOrder,\n disabled,\n className,\n field,\n}: AccessibleSortIconProps) {\n const apiRef = useGridApiContext()\n const rootProps = useGridRootProps()\n\n let Icon: React.JSXElementConstructor<any> | null = null\n const iconProps: Record<string, unknown> = {}\n\n if (direction === 'asc') {\n Icon = rootProps.slots.columnSortedAscendingIcon\n } else if (direction === 'desc') {\n Icon = rootProps.slots.columnSortedDescendingIcon\n } else {\n Icon = rootProps.slots.columnUnsortedIcon ?? null\n iconProps.sortingOrder = sortingOrder\n }\n\n if (!Icon) return null\n\n const column = apiRef.current.getColumn(field)\n const columnName = column?.headerName ?? field\n\n let sortStateLabel = ''\n if (direction === 'asc') sortStateLabel = ', sorted ascending'\n else if (direction === 'desc') sortStateLabel = ', sorted descending'\n\n const sortTypeLabel = !['Total', 'Category'].includes(columnName) ? ' category totals' : ''\n const ariaLabel = `Sort by ${columnName}${sortTypeLabel}${sortStateLabel}`\n\n const iconElement = <Icon className=\"MuiDataGrid-sortIcon\" fontSize=\"small\" {...iconProps} />\n\n const iconButton = (\n <IconButton\n disabled={disabled}\n size=\"small\"\n tabIndex={-1}\n {...(rootProps.slotProps?.baseIconButton as Record<string, unknown>)}\n aria-label={ariaLabel}\n className={`MuiDataGrid-sortButton${className ? ` ${className}` : ''}`}\n title={ariaLabel}\n >\n {iconElement}\n </IconButton>\n )\n\n return (\n <IconButtonContainer className=\"MuiDataGrid-iconButtonContainer\">\n {index != null ? (\n <Badge badgeContent={index} color=\"default\" overlap=\"circular\">\n {iconButton}\n </Badge>\n ) : (\n iconButton\n )}\n </IconButtonContainer>\n )\n}\n\nexport const AccessibleSortIcon = React.memo(AccessibleSortIconRaw)\n"],"mappings":";;;;;;AASA,IAAM,IAAsB,EAAO,KAAK,EAAE;AAAA,EACxC,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,OAAO;AACT,CAAC;AAWD,SAAS,EAAsB,EAC7B,WAAA,GACA,OAAA,GACA,cAAA,GACA,UAAA,GACA,WAAA,GACA,OAAA,EAAA,GAC0B;AAC1B,QAAM,IAAS,EAAkB,GAC3B,IAAY,EAAiB;AAEnC,MAAI,IAAgD;AACpD,QAAM,IAAqC,CAAC;AAW5C,MATI,MAAc,QAChB,IAAO,EAAU,MAAM,4BACd,MAAc,SACvB,IAAO,EAAU,MAAM,8BAEvB,IAAO,EAAU,MAAM,sBAAsB,MAC7C,EAAU,eAAe,IAGvB,CAAC,EAAM,QAAO;AAGlB,QAAM,IADS,EAAO,QAAQ,UAAU,CACrB,GAAQ,cAAc;AAEzC,MAAI,IAAiB;AACrB,EAAI,MAAc,QAAO,IAAiB,uBACjC,MAAc,WAAQ,IAAiB;AAGhD,QAAM,IAAY,WAAW,CAAA,GADN,CAAC,SAAS,UAAU,EAAE,SAAS,CAAU,IAAyB,KAArB,kBAAqB,GAC/B,CAAA,IAEpD,IAAc,gBAAA,EAAC,GAAD;AAAA,IAAM,WAAU;AAAA,IAAuB,UAAS;AAAA,IAAQ,GAAI;AAAA,EAAY,CAAA,GAEtF,IACJ,gBAAA,EAAC,GAAD;AAAA,IACY,UAAA;AAAA,IACV,MAAK;AAAA,IACL,UAAU;AAAA,IACV,GAAK,EAAU,WAAW;AAAA,IAC1B,cAAY;AAAA,IACZ,WAAW,yBAAyB,IAAY,IAAI,CAAA,KAAc,EAAA;AAAA,IAClE,OAAO;AAAA,IAEN,UAAA;AAAA,EACS,CAAA;AAGd,SACE,gBAAA,EAAC,GAAD;AAAA,IAAqB,WAAU;AAAA,IAC5B,UAAA,KAAS,OACR,gBAAA,EAAC,GAAD;AAAA,MAAO,cAAc;AAAA,MAAO,OAAM;AAAA,MAAU,SAAQ;AAAA,MACjD,UAAA;AAAA,IACI,CAAA,IAEP;AAAA,EAEiB,CAAA;AAEzB;AAEA,IAAa,IAAqB,EAAM,KAAK,CAAqB"}
1
+ {"version":3,"file":"AccessibleSortIcon.es.js","names":[],"sources":["../../../../src/trends/components/trendstable/AccessibleSortIcon.tsx"],"sourcesContent":["import React from 'react'\n\nimport Badge from '@mui/material/Badge'\nimport { useGridApiContext, useGridRootProps } from '@mui/x-data-grid-pro'\nimport type { GridSlotProps } from '@mui/x-data-grid-pro'\n\nimport { styled } from '@mui/material/styles'\n\nconst IconButtonContainer = styled('div')({\n display: 'flex',\n visibility: 'hidden',\n width: 0,\n})\n\ntype AccessibleSortIconProps = GridSlotProps['columnHeaderSortIcon']\n\nfunction AccessibleSortIconRaw({\n direction,\n index,\n sortingOrder,\n disabled,\n className,\n field,\n}: AccessibleSortIconProps) {\n const apiRef = useGridApiContext()\n const rootProps = useGridRootProps()\n\n let Icon: React.JSXElementConstructor<any> | null = null\n const iconProps: Record<string, unknown> = {}\n\n if (direction === 'asc') {\n Icon = rootProps.slots.columnSortedAscendingIcon\n } else if (direction === 'desc') {\n Icon = rootProps.slots.columnSortedDescendingIcon\n } else {\n Icon = rootProps.slots.columnUnsortedIcon ?? null\n iconProps.sortingOrder = sortingOrder\n }\n\n if (!Icon) return null\n\n const column = apiRef.current.getColumn(field)\n const columnName = column?.headerName ?? field\n\n let sortStateLabel = ''\n if (direction === 'asc') sortStateLabel = ', sorted ascending'\n else if (direction === 'desc') sortStateLabel = ', sorted descending'\n\n const sortTypeLabel = !['Total', 'Category'].includes(columnName) ? ' category totals' : ''\n const ariaLabel = `Sort by ${columnName}${sortTypeLabel}${sortStateLabel}`\n\n const iconElement = <Icon className=\"MuiDataGrid-sortIcon\" fontSize=\"small\" {...iconProps} />\n\n const iconButton = (\n <rootProps.slots.baseIconButton\n disabled={disabled}\n size=\"small\"\n tabIndex={-1}\n {...rootProps.slotProps?.baseIconButton}\n aria-label={ariaLabel}\n className={`MuiDataGrid-sortButton${className ? ` ${className}` : ''}`}\n title={ariaLabel}\n >\n {iconElement}\n </rootProps.slots.baseIconButton>\n )\n\n return (\n <IconButtonContainer className=\"MuiDataGrid-iconButtonContainer\">\n {index != null ? (\n <Badge badgeContent={index} color=\"default\" overlap=\"circular\">\n {iconButton}\n </Badge>\n ) : (\n iconButton\n )}\n </IconButtonContainer>\n )\n}\n\nexport const AccessibleSortIcon = React.memo(AccessibleSortIconRaw)\n"],"mappings":";;;;;AAQA,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I,CAAA,IAEP;AAAA,EAEiB,CAAA;AAEzB;AAEA,IAAa,IAAqB,EAAM,KAAK,CAAqB"}
@@ -33,10 +33,10 @@ var S = () => /* @__PURE__ */ d(p, {}), t = (r) => r.id !== "total" && !r.isPare
33
33
  pinnedRows: { bottom: n && a.length > 0 ? [n] : [] },
34
34
  rowHeight: 64,
35
35
  rows: a,
36
- slotProps: { baseIconButton: {
36
+ slotProps: { baseIconButton: { material: {
37
37
  color: "secondary",
38
38
  sx: { ml: 8 }
39
- } },
39
+ } } },
40
40
  slots: {
41
41
  columnHeaderSortIcon: y,
42
42
  noRowsOverlay: S
@@ -1 +1 @@
1
- {"version":3,"file":"TrendsTable.es.js","names":[],"sources":["../../../../src/trends/components/trendstable/TrendsTable.tsx"],"sourcesContent":["import { ANALYTICS_EVENTS, useEvent, ZeroState } from '../../../common'\nimport { CategoryGuidToName } from '../../../core/constants'\nimport { TRENDS_ANALYTICS_METADATA } from '../../constants/TrendsWidget'\nimport { DataGridPro, GridColDef } from '@mui/x-data-grid-pro'\nimport { useTheme } from '@mui/material/styles'\nimport { TrendsTableRow } from '../../utils/TrendsTable'\nimport { AccessibleSortIcon } from './AccessibleSortIcon'\n\n// The grid's default no-rows overlay is a bare \"No rows\". Render the same shared\n// zero state the app's other empty lists use instead. Wrapped because the\n// slot's prop type doesn't match ZeroState's; positioning is handled by the\n// grid's own overlay wrapper.\nconst TrendsTableNoRowsOverlay = () => <ZeroState />\n\ninterface TrendsTableProps {\n columns: GridColDef[]\n onRowClick?: (category: string) => void\n rows: TrendsTableRow[]\n totalRow?: TrendsTableRow\n}\n\n// The pinned total row and the synthetic \"General [Parent]\" row (isParent: true,\n// only present in a drilled-in table) are summaries, not navigation destinations.\nconst isRowNavigable = (row: TrendsTableRow) => row.id !== 'total' && !row.isParent\n\nexport const TrendsTable = ({ columns, onRowClick, rows, totalRow }: TrendsTableProps) => {\n const theme = useTheme()\n const { onEvent } = useEvent()\n const isLightMode = theme.palette.mode === 'light'\n const isRowInteractive = Boolean(onRowClick)\n\n // Shared by pointer and keyboard activation; non-navigable rows are dropped so\n // neither path acts on them.\n const activateRow = (row: TrendsTableRow) => {\n if (!isRowNavigable(row)) return\n onRowClick?.(row.category_guid)\n onEvent(ANALYTICS_EVENTS.TRENDS_CLICK_LIST_ITEM, {\n ...TRENDS_ANALYTICS_METADATA,\n // Fall back to the row's display name for user-created categories, which\n // are absent from the static default-category map.\n listItem: CategoryGuidToName[row.category_guid] ?? row.category,\n // A top-level row (guid is its own top level) drills down; a sub-category\n // row opens the drawer.\n destination: row.top_level_category_guid === row.category_guid ? 'drill_down' : 'drawer',\n })\n }\n\n return (\n <DataGridPro\n // autoHeight sizes the grid to its content instead of measuring a flex\n // parent. The parent is an overflow:auto Stack with no fixed height, so the\n // default virtualized layout makes x-data-grid's useGridDimensions loop on\n // its own ResizeObserver measurement (a feedback loop that spikes to React's\n // \"Maximum update depth exceeded\" under a starved CI worker in jsdom). Content\n // sizing removes the measurement feedback and is correct for this unbounded,\n // page-scrolling table.\n autoHeight={true}\n columns={columns}\n disableColumnFilter={true}\n disableColumnMenu={true}\n getRowClassName={(params) => (isRowNavigable(params.row) ? '' : 'trends-row-static')}\n hideFooter={true}\n initialState={{ sorting: { sortModel: [{ field: 'category', sort: 'asc' }] } }}\n onCellKeyDown={(params, event) => {\n // Rows are reachable only by grid cell navigation, so Enter/Space on a\n // cell is the keyboard equivalent of clicking the row. Guard before\n // preventDefault so a non-navigable row keeps the grid's native key\n // handling instead of being swallowed with no action. Space would\n // otherwise scroll the grid.\n if (event.key !== 'Enter' && event.key !== ' ') return\n if (!isRowNavigable(params.row)) return\n event.preventDefault()\n activateRow(params.row)\n }}\n onRowClick={(r) => activateRow(r.row)}\n pinnedRows={{\n // A pinned \"Total $0.00\" is meaningless with no rows above it, and while it\n // is present the grid suppresses the no-rows overlay entirely. Drop it so the\n // empty table shows the zero state instead.\n bottom: totalRow && rows.length > 0 ? [totalRow] : [],\n }}\n rowHeight={64}\n rows={rows}\n slotProps={{ baseIconButton: { color: 'secondary', sx: { ml: 8 } } }}\n slots={{\n columnHeaderSortIcon: AccessibleSortIcon,\n noRowsOverlay: TrendsTableNoRowsOverlay,\n }}\n sortingOrder={['asc', 'desc']}\n sx={{\n borderColor: 'divider',\n borderWidth: 1,\n borderStyle: 'solid',\n borderRadius: 2,\n '& .MuiDataGrid-columnHeaders': {\n bgcolor: isLightMode ? 'neutral.50' : 'neutral.800',\n borderBottom: 'none',\n },\n '& .trends-table-header': {\n bgcolor: isLightMode ? 'neutral.50' : 'neutral.800',\n },\n '& .MuiDataGrid-row': { cursor: isRowInteractive ? 'pointer' : 'default' },\n // getRowClassName stamps trends-row-static on every non-navigable row,\n // including the pinned total row.\n '& .trends-row-static': { cursor: 'default' },\n }}\n />\n )\n}\n"],"mappings":";;;;;;;;;AAYA,IAAM,IAAA,MAAiC,gBAAA,EAAC,GAAD,CAAY,CAAA,GAW7C,IAAA,CAAkB,MAAwB,EAAI,OAAO,WAAW,CAAC,EAAI,UAE9D,IAAA,CAAe,EAAE,SAAA,GAAS,YAAA,GAAY,MAAA,GAAM,UAAA,EAAA,MAAiC;AACxF,QAAM,IAAQ,EAAS,GACjB,EAAE,SAAA,EAAA,IAAY,EAAS,GACvB,IAAc,EAAM,QAAQ,SAAS,SACrC,IAAmB,EAAQ,GAI3B,IAAA,CAAe,MAAwB;AAC3C,IAAK,EAAe,CAAG,MACvB,IAAa,EAAI,aAAa,GAC9B,EAAQ,EAAiB,wBAAwB;AAAA,MAC/C,GAAG;AAAA,MAGH,UAAU,EAAmB,EAAI,aAAA,KAAkB,EAAI;AAAA,MAGvD,aAAa,EAAI,4BAA4B,EAAI,gBAAgB,eAAe;AAAA,IAClF,CAAC;AAAA,EACH;AAEA,SACE,gBAAA,EAAC,GAAD;AAAA,IAQE,YAAY;AAAA,IACH,SAAA;AAAA,IACT,qBAAqB;AAAA,IACrB,mBAAmB;AAAA,IACnB,iBAAA,CAAkB,MAAY,EAAe,EAAO,GAAG,IAAI,KAAK;AAAA,IAChE,YAAY;AAAA,IACZ,cAAc,EAAE,SAAS,EAAE,WAAW,CAAC;AAAA,MAAE,OAAO;AAAA,MAAY,MAAM;AAAA,IAAM,CAAC,EAAE,EAAE;AAAA,IAC7E,eAAA,CAAgB,GAAQ,MAAU;AAMhC,MAAI,EAAM,QAAQ,WAAW,EAAM,QAAQ,OACtC,EAAe,EAAO,GAAG,MAC9B,EAAM,eAAe,GACrB,EAAY,EAAO,GAAG;AAAA,IACxB;AAAA,IACA,YAAA,CAAa,MAAM,EAAY,EAAE,GAAG;AAAA,IACpC,YAAY,EAIV,QAAQ,KAAY,EAAK,SAAS,IAAI,CAAC,CAAQ,IAAI,CAAC,EACtD;AAAA,IACA,WAAW;AAAA,IACL,MAAA;AAAA,IACN,WAAW,EAAE,gBAAgB;AAAA,MAAE,OAAO;AAAA,MAAa,IAAI,EAAE,IAAI,EAAE;AAAA,IAAE,EAAE;AAAA,IACnE,OAAO;AAAA,MACL,sBAAsB;AAAA,MACtB,eAAe;AAAA,IACjB;AAAA,IACA,cAAc,CAAC,OAAO,MAAM;AAAA,IAC5B,IAAI;AAAA,MACF,aAAa;AAAA,MACb,aAAa;AAAA,MACb,aAAa;AAAA,MACb,cAAc;AAAA,MACd,gCAAgC;AAAA,QAC9B,SAAS,IAAc,eAAe;AAAA,QACtC,cAAc;AAAA,MAChB;AAAA,MACA,0BAA0B,EACxB,SAAS,IAAc,eAAe,cACxC;AAAA,MACA,sBAAsB,EAAE,QAAQ,IAAmB,YAAY,UAAU;AAAA,MAGzE,wBAAwB,EAAE,QAAQ,UAAU;AAAA,IAC9C;AAAA,EACD,CAAA;AAEL"}
1
+ {"version":3,"file":"TrendsTable.es.js","names":[],"sources":["../../../../src/trends/components/trendstable/TrendsTable.tsx"],"sourcesContent":["import { ANALYTICS_EVENTS, useEvent, ZeroState } from '../../../common'\nimport { CategoryGuidToName } from '../../../core/constants'\nimport { TRENDS_ANALYTICS_METADATA } from '../../constants/TrendsWidget'\nimport { DataGridPro, GridColDef } from '@mui/x-data-grid-pro'\nimport { useTheme } from '@mui/material/styles'\nimport { TrendsTableRow } from '../../utils/TrendsTable'\nimport { AccessibleSortIcon } from './AccessibleSortIcon'\n\n// The grid's default no-rows overlay is a bare \"No rows\". Render the same shared\n// zero state the app's other empty lists use instead. Wrapped because the\n// slot's prop type doesn't match ZeroState's; positioning is handled by the\n// grid's own overlay wrapper.\nconst TrendsTableNoRowsOverlay = () => <ZeroState />\n\ninterface TrendsTableProps {\n columns: GridColDef[]\n onRowClick?: (category: string) => void\n rows: TrendsTableRow[]\n totalRow?: TrendsTableRow\n}\n\n// The pinned total row and the synthetic \"General [Parent]\" row (isParent: true,\n// only present in a drilled-in table) are summaries, not navigation destinations.\nconst isRowNavigable = (row: TrendsTableRow) => row.id !== 'total' && !row.isParent\n\nexport const TrendsTable = ({ columns, onRowClick, rows, totalRow }: TrendsTableProps) => {\n const theme = useTheme()\n const { onEvent } = useEvent()\n const isLightMode = theme.palette.mode === 'light'\n const isRowInteractive = Boolean(onRowClick)\n\n // Shared by pointer and keyboard activation; non-navigable rows are dropped so\n // neither path acts on them.\n const activateRow = (row: TrendsTableRow) => {\n if (!isRowNavigable(row)) return\n onRowClick?.(row.category_guid)\n onEvent(ANALYTICS_EVENTS.TRENDS_CLICK_LIST_ITEM, {\n ...TRENDS_ANALYTICS_METADATA,\n // Fall back to the row's display name for user-created categories, which\n // are absent from the static default-category map.\n listItem: CategoryGuidToName[row.category_guid] ?? row.category,\n // A top-level row (guid is its own top level) drills down; a sub-category\n // row opens the drawer.\n destination: row.top_level_category_guid === row.category_guid ? 'drill_down' : 'drawer',\n })\n }\n\n return (\n <DataGridPro\n // autoHeight sizes the grid to its content instead of measuring a flex\n // parent. The parent is an overflow:auto Stack with no fixed height, so the\n // default virtualized layout makes x-data-grid's useGridDimensions loop on\n // its own ResizeObserver measurement (a feedback loop that spikes to React's\n // \"Maximum update depth exceeded\" under a starved CI worker in jsdom). Content\n // sizing removes the measurement feedback and is correct for this unbounded,\n // page-scrolling table.\n autoHeight={true}\n columns={columns}\n disableColumnFilter={true}\n disableColumnMenu={true}\n getRowClassName={(params) => (isRowNavigable(params.row) ? '' : 'trends-row-static')}\n hideFooter={true}\n initialState={{ sorting: { sortModel: [{ field: 'category', sort: 'asc' }] } }}\n onCellKeyDown={(params, event) => {\n // Rows are reachable only by grid cell navigation, so Enter/Space on a\n // cell is the keyboard equivalent of clicking the row. Guard before\n // preventDefault so a non-navigable row keeps the grid's native key\n // handling instead of being swallowed with no action. Space would\n // otherwise scroll the grid.\n if (event.key !== 'Enter' && event.key !== ' ') return\n if (!isRowNavigable(params.row)) return\n event.preventDefault()\n activateRow(params.row)\n }}\n onRowClick={(r) => activateRow(r.row)}\n pinnedRows={{\n // A pinned \"Total $0.00\" is meaningless with no rows above it, and while it\n // is present the grid suppresses the no-rows overlay entirely. Drop it so the\n // empty table shows the zero state instead.\n bottom: totalRow && rows.length > 0 ? [totalRow] : [],\n }}\n rowHeight={64}\n rows={rows}\n slotProps={{ baseIconButton: { material: { color: 'secondary', sx: { ml: 8 } } } }}\n slots={{\n columnHeaderSortIcon: AccessibleSortIcon,\n noRowsOverlay: TrendsTableNoRowsOverlay,\n }}\n sortingOrder={['asc', 'desc']}\n sx={{\n borderColor: 'divider',\n borderWidth: 1,\n borderStyle: 'solid',\n borderRadius: 2,\n '& .MuiDataGrid-columnHeaders': {\n bgcolor: isLightMode ? 'neutral.50' : 'neutral.800',\n borderBottom: 'none',\n },\n '& .trends-table-header': {\n bgcolor: isLightMode ? 'neutral.50' : 'neutral.800',\n },\n '& .MuiDataGrid-row': { cursor: isRowInteractive ? 'pointer' : 'default' },\n // getRowClassName stamps trends-row-static on every non-navigable row,\n // including the pinned total row.\n '& .trends-row-static': { cursor: 'default' },\n }}\n />\n )\n}\n"],"mappings":";;;;;;;;;AAYA,IAAM,IAAA,MAAiC,gBAAA,EAAC,GAAD,CAAY,CAAA,GAW7C,IAAA,CAAkB,MAAwB,EA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;AAAA,IACjF,OAAO;AAAA,MACL,sBAAsB;AAAA,MACtB,eAAe;AAAA,IACjB;AAAA,IACA,cAAc,CAAC,OAAO,MAAM;AAAA,IAC5B,IAAI;AAAA,MACF,aAAa;AAAA,MACb,aAAa;AAAA,MACb,aAAa;AAAA,MACb,cAAc;AAAA,MACd,gCAAgC;AAAA,QAC9B,SAAS,IAAc,eAAe;AAAA,QACtC,cAAc;AAAA,MAChB;AAAA,MACA,0BAA0B,EACxB,SAAS,IAAc,eAAe,cACxC;AAAA,MACA,sBAAsB,EAAE,QAAQ,IAAmB,YAAY,UAAU;AAAA,MAGzE,wBAAwB,EAAE,QAAQ,UAAU;AAAA,IAC9C;AAAA,EACD,CAAA;AAEL"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "9.4.70",
3
+ "version": "9.5.0-alpha.al0",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",
@@ -193,6 +193,7 @@
193
193
  "build": "tsc && vite build && yarn verify:exports",
194
194
  "build-storybook": "storybook build -o compiled_docs",
195
195
  "verify:exports": "node scripts/verify-exports.mjs",
196
+ "verify:mui-x": "test \"$(yarn info -AR --name-only | grep -cE '@mui/x-(date-pickers|data-grid)(-pro)?@')\" = 4",
196
197
  "dev": "storybook dev -p 8106",
197
198
  "lint": "oxlint src",
198
199
  "lint:fix": "oxlint --fix src",
@@ -214,13 +215,9 @@
214
215
  "@mui/material": "7.3.11",
215
216
  "@mui/system": "7.3.11",
216
217
  "@mui/x-charts": "^8.29.2",
217
- "@mui/x-data-grid": "7.29.13",
218
- "@mui/x-data-grid-pro": "^7.29.13",
219
- "@mui/x-date-pickers": "^7.29.4",
220
- "@mui/x-date-pickers-pro": "^7.29.4",
221
218
  "@mxenabled/cssinjs": "^0.6.0",
222
219
  "@mxenabled/mx-icons": "^2.3.0",
223
- "@mxenabled/mxui": "^2.11.1",
220
+ "@mxenabled/mxui": "^2.12.1",
224
221
  "@mxenabled/web-widget-sdk": "^0.0.15",
225
222
  "@tanstack/react-virtual": "^3.14.9",
226
223
  "bowser": "^2.14.1",
@@ -240,6 +237,10 @@
240
237
  "devDependencies": {
241
238
  "@babel/core": "^7.29.7",
242
239
  "@datadog/browser-rum": "7.12.0",
240
+ "@mui/x-data-grid": "^8.29.3",
241
+ "@mui/x-data-grid-pro": "^8.29.3",
242
+ "@mui/x-date-pickers": "^8.29.4",
243
+ "@mui/x-date-pickers-pro": "^8.29.4",
243
244
  "@storybook/addon-a11y": "^10.5.5",
244
245
  "@storybook/addon-docs": "^10.5.5",
245
246
  "@storybook/addon-links": "^10.5.5",
@@ -285,6 +286,10 @@
285
286
  "peerDependencies": {
286
287
  "@datadog/browser-rum": "^7",
287
288
  "@mui/material": "^7",
289
+ "@mui/x-data-grid": "^8.29.3",
290
+ "@mui/x-data-grid-pro": "^8.29.3",
291
+ "@mui/x-date-pickers": "^8.29.4",
292
+ "@mui/x-date-pickers-pro": "^8.29.4",
288
293
  "@mxenabled/mxui": "^2",
289
294
  "d3": "^7",
290
295
  "date-fns": "^3 || ^4",
@@ -313,6 +318,12 @@
313
318
  "peerDependenciesMeta": {
314
319
  "@datadog/browser-rum": {
315
320
  "optional": true
321
+ },
322
+ "@mui/x-data-grid": {
323
+ "optional": true
324
+ },
325
+ "@mui/x-data-grid-pro": {
326
+ "optional": true
316
327
  }
317
328
  }
318
329
  }