@mx-cartographer/experiences 7.11.20 → 7.11.21

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 (70) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{AccountDetailsHeader-DCTCLB3K.mjs → AccountDetailsHeader-DkBNsLsI.mjs} +2 -2
  3. package/dist/{AccountListItem-CZk-bo6j.mjs → AccountListItem-BIVhda6q.mjs} +2 -2
  4. package/dist/{AccountStore-Cw54qb7Y.mjs → AccountStore-Brc0MNSF.mjs} +1 -1
  5. package/dist/BudgetUtil--_QXyszn.mjs +479 -0
  6. package/dist/{CategorySelectorDrawer-Blb22HWt.mjs → CategorySelectorDrawer-5n6Pil_E.mjs} +1 -1
  7. package/dist/{Connect-Df7iVTcV.mjs → Connect-eYIWqCEr.mjs} +1 -1
  8. package/dist/{ConnectDrawer-CVt-8rPJ.mjs → ConnectDrawer-CioFo6Wy.mjs} +2 -2
  9. package/dist/{ConnectionsDrawer-c7HaKeRj.mjs → ConnectionsDrawer-DqhSaMrJ.mjs} +2 -2
  10. package/dist/{CurrencyInput-bcKNJ22c.mjs → CurrencyInput-DuMktPu3.mjs} +1 -1
  11. package/dist/{ExportCsvAction-B5Mn5uyb.mjs → ExportCsvAction-Bg6gO_Cz.mjs} +3 -3
  12. package/dist/{GlobalAccountFilter-CbwySv6c.mjs → GlobalAccountFilter-B73Pw1hJ.mjs} +1 -1
  13. package/dist/{GoalStore-DXIP9dLt.mjs → GoalStore-0bd-Upkc.mjs} +1 -1
  14. package/dist/{Help-COWDMsJq.mjs → Help-CINT6-wG.mjs} +1 -1
  15. package/dist/{LineChart-DVn1AamK.mjs → LineChart-B1qbKR8q.mjs} +1 -1
  16. package/dist/{ListItemAction-5YhgdUZW.mjs → ListItemAction-CfXGuY7a.mjs} +1 -1
  17. package/dist/{ManageIncome-_ZP3uPwX.mjs → ManageIncome-C0ddaiMR.mjs} +10 -10
  18. package/dist/{MicroWidgetContainer-CMES42I1.mjs → MicroWidgetContainer-B_EnfvCq.mjs} +1 -1
  19. package/dist/{MiniWidgetContainer-DhEx4qKi.mjs → MiniWidgetContainer-Cu72GNsE.mjs} +1 -1
  20. package/dist/{NotificationSettings-D8uSK6m9.mjs → NotificationSettings-DCbMa5mg.mjs} +4 -4
  21. package/dist/{OriginalBalanceAction-DuVHcBdO.mjs → OriginalBalanceAction-CW_xOa6Z.mjs} +3 -3
  22. package/dist/{RecurringSettings-CSrJUzaC.mjs → RecurringSettings-CD1_vCES.mjs} +2 -2
  23. package/dist/{SpendingLegend-Cpd_jtoX.mjs → SpendingLegend-DHi0vx8B.mjs} +1 -1
  24. package/dist/StatusIndicator-wyBzyHJc.mjs +252 -0
  25. package/dist/{Transaction-BR682Yj5.mjs → Transaction-B_2AG36b.mjs} +1 -1
  26. package/dist/TransactionDetails-CgC3Qu7o.mjs +1474 -0
  27. package/dist/{TransactionStore-BbjZQa-N.mjs → TransactionStore-DIbZkSVI.mjs} +2 -2
  28. package/dist/{ViewMoreMicroCard-Bf1J0zYY.mjs → ViewMoreMicroCard-CLHlPWC-.mjs} +1 -1
  29. package/dist/{WidgetContainer-DSs6lJbr.mjs → WidgetContainer-BSCjBupR.mjs} +2 -2
  30. package/dist/accounts/index.es.js +13 -13
  31. package/dist/analytics/index.es.js +11 -11
  32. package/dist/budgets/api/BudgetsApi.d.ts +2 -0
  33. package/dist/budgets/components/MerchantBudgetDetailsDrawer.d.ts +17 -0
  34. package/dist/budgets/components/shared/BudgetDetailsTopSection.d.ts +13 -0
  35. package/dist/budgets/index.es.js +550 -609
  36. package/dist/budgets/store/BudgetsStore.d.ts +6 -0
  37. package/dist/budgets/utils/BudgetUtil.d.ts +5 -0
  38. package/dist/cashflow/index.es.js +8 -8
  39. package/dist/categories/index.es.js +1 -1
  40. package/dist/common/index.es.js +254 -224
  41. package/dist/common/types/localization/BudgetsCopy.d.ts +4 -0
  42. package/dist/dashboard/index.es.js +4 -4
  43. package/dist/debts/index.es.js +8 -8
  44. package/dist/{exportTransactionsToCSV-CKHt_UOp.mjs → exportTransactionsToCSV-EwhjfqsJ.mjs} +1 -1
  45. package/dist/finstrong/index.es.js +10 -10
  46. package/dist/goals/index.es.js +10 -10
  47. package/dist/help/index.es.js +4 -4
  48. package/dist/{hooks-zu7yblbi.mjs → hooks-BxkfR-Ff.mjs} +5 -5
  49. package/dist/insights/index.es.js +103 -104
  50. package/dist/investments/index.es.js +4 -4
  51. package/dist/merchants/index.es.js +1 -1
  52. package/dist/microinsights/index.es.js +1 -1
  53. package/dist/networth/index.es.js +6 -6
  54. package/dist/notifications/index.es.js +2 -2
  55. package/dist/recurringtransactions/index.es.js +9 -9
  56. package/dist/settings/index.es.js +7 -7
  57. package/dist/spending/index.es.js +8 -8
  58. package/dist/transactions/components/shared/transactiondetails/actions/AddMerchantBudgetAction.d.ts +5 -0
  59. package/dist/transactions/components/shared/transactiondetails/actions/index.d.ts +1 -0
  60. package/dist/transactions/index.es.js +16 -16
  61. package/dist/trends/index.es.js +12 -12
  62. package/dist/{useAccountDisplayName-CxYB0Wpw.mjs → useAccountDisplayName-DKwT1mWv.mjs} +1 -1
  63. package/dist/{useInsightsEnabled-CYLDtNYt.mjs → useInsightsEnabled-DL_oNyI0.mjs} +1 -1
  64. package/dist/{useWidgetLoadTimer-Bmgv_UeH.mjs → useWidgetLoadTimer-DgN1bTyu.mjs} +1 -1
  65. package/package.json +1 -1
  66. package/dist/BudgetUtil-QbRXtLKn.mjs +0 -101
  67. package/dist/StatusIndicator-0iX3Gnnu.mjs +0 -55
  68. package/dist/TransactionDetails-BEKQKH03.mjs +0 -1261
  69. package/dist/TransactionList-CXiLG0Ur.mjs +0 -204
  70. package/dist/User-BIgPTsU6.mjs +0 -372
@@ -1,204 +0,0 @@
1
- import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
- import a from "react";
3
- import { observer as v } from "mobx-react-lite";
4
- import { useVirtualizer as $ } from "@tanstack/react-virtual";
5
- import T from "@mui/material/Box";
6
- import j from "@mui/material/Divider";
7
- import H from "@mui/material/List";
8
- import { G as X, h as C, u as z, g as K } from "./hooks-zu7yblbi.mjs";
9
- import { MerchantLogo as P, Icon as I, Text as d } from "@mxenabled/mxui";
10
- import Y from "@mui/material/ListItemAvatar";
11
- import Z from "@mui/material/ListItemText";
12
- import S from "@mui/material/Stack";
13
- import { T as F, L as q, O as J } from "./Transaction-BR682Yj5.mjs";
14
- import { f as Q } from "./NumberFormatting-QCaNwbjv.mjs";
15
- import { Receipt as ee } from "@mxenabled/mx-icons";
16
- import { fromUnixTime as x } from "date-fns/fromUnixTime";
17
- import { isSameDay as N } from "date-fns/isSameDay";
18
- import { h as te } from "./DateUtil-wcYTmDRD.mjs";
19
- import { L as re } from "./Loader-D3rjKx72.mjs";
20
- import { A as oe } from "./Analytics-i5h6BxR1.mjs";
21
- const w = () => {
22
- if (!a.useContext(X))
23
- throw new Error("useTransactionsUiStore() must be used within the GlobalDataContext");
24
- return C().uiStore;
25
- };
26
- function ne() {
27
- return window.opener && window.opener.location ? window.opener.location.toString() : document.referrer;
28
- }
29
- function se(e) {
30
- const r = ne().replace(/([^:]+:\/\/[^\/]+).*/, "$1"), o = window.parent || window.opener || !1;
31
- return o && o.postMessage && r ? (o.postMessage(e, r), !0) : !1;
32
- }
33
- function ie(e) {
34
- return se({
35
- metadata: { beat_guid: e },
36
- mx: !0,
37
- type: "mx/moneyDashboard/insightOnTransaction"
38
- });
39
- }
40
- const ae = ({ transaction: e, onClick: r }) => {
41
- const { associatedBeats: o } = C(), { expandedSplits: c } = w(), { transactions: g } = z(), { showInsights: _ } = w(), u = e.transaction_type === F.CREDIT, m = a.useMemo(() => o.find((p) => p.associated_transaction_guid === e.guid), [o, e]);
42
- return (
43
- //TODO: implement common/components/ListItemRow.tsx
44
- /* @__PURE__ */ i(
45
- q,
46
- {
47
- clickEventName: J.ON_TRANSACTION_LIST_ITEM_CLICK,
48
- onClick: r ? () => r(e.guid) : void 0,
49
- children: [
50
- /* @__PURE__ */ t(Y, { children: e.parent_guid && c.includes(e.parent_guid) ? /* @__PURE__ */ t(a.Fragment, {}) : /* @__PURE__ */ t(
51
- P,
52
- {
53
- categoryGuid: e.top_level_category_guid || "",
54
- merchantGuid: e.merchant_guid || ""
55
- }
56
- ) }),
57
- /* @__PURE__ */ t(
58
- Z,
59
- {
60
- disableTypography: !0,
61
- secondary: /* @__PURE__ */ i(S, { direction: "row", justifyContent: "space-between", children: [
62
- /* @__PURE__ */ i(S, { alignItems: "center", direction: "row", gap: 4, children: [
63
- e.is_flagged && /* @__PURE__ */ t(I, { fill: !0, name: "flag", size: 16, sx: { color: "warning.dark" } }),
64
- e.is_hidden && /* @__PURE__ */ t(I, { name: "visibility_off", size: 16 }),
65
- e.has_been_split && /* @__PURE__ */ t(I, { name: "call_split", size: 16 }),
66
- /* @__PURE__ */ t(d, { variant: "XSmall", children: e.has_been_split ? g.split_transaction_category_label : e.category })
67
- ] }),
68
- m && _ && /* @__PURE__ */ t(
69
- d,
70
- {
71
- bold: !0,
72
- color: "action.active",
73
- onClick: (p) => {
74
- p.stopPropagation(), p.preventDefault(), ie(m.guid);
75
- },
76
- variant: "XSmall",
77
- children: m.short_title
78
- }
79
- )
80
- ] }),
81
- children: /* @__PURE__ */ i(S, { direction: "row", justifyContent: "space-between", sx: { gap: 8 }, children: [
82
- /* @__PURE__ */ i(d, { bold: !0, variant: "Body", children: [
83
- e.is_hidden && g.hide_trnx_cancel_hidden_note,
84
- e.payee || e.description || e.feed_description
85
- ] }),
86
- /* @__PURE__ */ i(
87
- d,
88
- {
89
- bold: !0,
90
- color: u ? "success.main" : "text.primary",
91
- sx: { flexShrink: 0 },
92
- variant: "Body",
93
- children: [
94
- u ? "+" : "",
95
- Q(e.amount, "0,0.00")
96
- ]
97
- }
98
- )
99
- ] })
100
- }
101
- )
102
- ]
103
- }
104
- )
105
- );
106
- }, ce = v(ae), le = ({
107
- bgcolor: e = "background.default",
108
- children: r
109
- }) => /* @__PURE__ */ t(T, { display: "inline-block", sx: { bgcolor: e, py: 6, width: "100%" }, children: /* @__PURE__ */ t(d, { bold: !0, sx: { pl: 24 }, variant: "XSmall", children: r }) }), de = ({ showIcon: e = !0, showSubtitle: r = !0 }) => {
110
- const { transactions: o } = z();
111
- return /* @__PURE__ */ i(S, { alignItems: "center", gap: 12, height: "auto", mt: 24, children: [
112
- e && /* @__PURE__ */ t(ee, { color: "secondary", sx: { fontSize: 32 } }),
113
- /* @__PURE__ */ t(d, { bold: !0, color: "secondary", variant: "Small", children: o.zero_state_no_transactions }),
114
- r && /* @__PURE__ */ t(d, { color: "secondary", variant: "XSmall", children: o.zero_state_there_are_no_transactions })
115
- ] });
116
- }, ue = v(de), L = (e, r) => {
117
- const o = x(r[e].date), c = x(r[e - 1]?.date);
118
- return !N(o, c);
119
- }, me = (e, r) => {
120
- const o = x(r[e].date), c = x(r[e + 1]?.date);
121
- return N(o, c);
122
- }, R = 65, A = 32, pe = ({
123
- bgcolor: e,
124
- filter: r,
125
- height: o = "calc(100dvh - 36px)",
126
- loader: c = /* @__PURE__ */ t(re, { label: "Loading", size: 40 }),
127
- onClick: g,
128
- showInsights: _ = !1,
129
- showLoader: u = !1,
130
- showHiddenTransactions: m = !1,
131
- transaction: p,
132
- width: E = "100%",
133
- zeroState: O = /* @__PURE__ */ t(ue, {})
134
- }) => {
135
- const { isLoading: y, sortedTransactions: b } = C(), l = a.useMemo(() => {
136
- const n = r ? b.filter(r) : b, s = p ?? n;
137
- return m ? s : s.filter((h) => !h.is_hidden);
138
- }, [b, m]), { clearExpandedSplits: k, setShowInsights: G, toggleSplit: V } = w(), { onEvent: M } = K(), U = (n) => {
139
- const s = l.find((h) => h.guid === n);
140
- if (s?.has_been_split) {
141
- V(s.guid);
142
- return;
143
- }
144
- M(oe.ACCOUNT_DETAILS_CLICK_TRANSACTION, {
145
- account_guid: s?.account_guid,
146
- transaction_guid: n
147
- }), g?.(n);
148
- }, D = a.useRef(null), f = $({
149
- count: l.length,
150
- getScrollElement: () => D.current,
151
- estimateSize: (n) => R + (L(n, l) ? A : 0),
152
- overscan: 5
153
- });
154
- return a.useEffect(() => f.measure(), [l]), a.useEffect(() => G(_), [_]), a.useEffect(() => () => k(), []), /* @__PURE__ */ t(H, { sx: { width: E }, children: /* @__PURE__ */ t(T, { height: o, overflow: "auto", ref: D, width: E, children: /* @__PURE__ */ i(
155
- T,
156
- {
157
- height: (
158
- // set the height to auto when there are no transactions so the zero state isn't set to 0
159
- f.getVirtualItems().length === 0 ? "auto" : f.getTotalSize()
160
- ),
161
- position: "relative",
162
- width: "100%",
163
- children: [
164
- (y || u) && c,
165
- !y && !u && f.getVirtualItems().length === 0 && O,
166
- !y && !u && f.getVirtualItems().length > 0 && f.getVirtualItems().map((n) => {
167
- const s = l[n.index], h = L(n.index, l), B = me(n.index, l), W = R + (h ? A : 0);
168
- return /* @__PURE__ */ i(
169
- T,
170
- {
171
- sx: {
172
- height: W,
173
- position: "absolute",
174
- transform: `translateY(${n.start}px)`,
175
- width: "100%",
176
- bgcolor: "background.paper"
177
- },
178
- children: [
179
- h && /* @__PURE__ */ t(le, { bgcolor: e, children: te(s.date) }),
180
- /* @__PURE__ */ t(
181
- ce,
182
- {
183
- ...g && { onClick: U },
184
- transaction: s
185
- }
186
- ),
187
- /* @__PURE__ */ t(j, { sx: { ml: B ? 68 : 0 } })
188
- ]
189
- },
190
- s.guid
191
- );
192
- })
193
- ]
194
- }
195
- ) }) });
196
- }, Oe = v(pe);
197
- export {
198
- le as S,
199
- Oe as T,
200
- ce as a,
201
- me as h,
202
- L as s,
203
- w as u
204
- };
@@ -1,372 +0,0 @@
1
- import { jsxs as p, jsx as n } from "react/jsx-runtime";
2
- import b from "react";
3
- import { css as E } from "@mxenabled/cssinjs";
4
- import { addDays as W } from "date-fns/addDays";
5
- import { addMonths as H } from "date-fns/addMonths";
6
- import { eachDayOfInterval as O } from "date-fns/eachDayOfInterval";
7
- import { eachWeekOfInterval as F } from "date-fns/eachWeekOfInterval";
8
- import { endOfMonth as L } from "date-fns/endOfMonth";
9
- import { format as _ } from "date-fns/format";
10
- import { isBefore as z } from "date-fns/isBefore";
11
- import { isSameMonth as D } from "date-fns/isSameMonth";
12
- import { startOfMonth as G } from "date-fns/startOfMonth";
13
- import { startOfToday as $ } from "date-fns/startOfToday";
14
- import { subMonths as Y } from "date-fns/subMonths";
15
- import C from "@mui/material/Button";
16
- import Z from "@mui/material/Paper";
17
- import { H2 as q, Text as T, H3 as J, P as K } from "@mxenabled/mxui";
18
- import { ChevronLeft as P, ChevronRight as Q, Icon as U } from "@mxenabled/mx-icons";
19
- import { f as V, D as X } from "./DateFormats-BMpMrZpW.mjs";
20
- import { isSameDay as d } from "date-fns/isSameDay";
21
- import { isWithinInterval as tt } from "date-fns/isWithinInterval";
22
- import nt from "@mui/material/styles/useTheme";
23
- import et from "@mui/material/Dialog";
24
- import ot from "@mui/material/DialogActions";
25
- import rt from "@mui/material/DialogContent";
26
- import at from "@mui/material/IconButton";
27
- import it from "@mui/material/InputAdornment";
28
- import j from "@mui/material/Stack";
29
- import lt from "@mui/material/TextField";
30
- import { u as mt } from "./useScreenSize-B6JyS_Lj.mjs";
31
- const ct = ({ copy: t, date: o, onNextClick: e, onPreviousClick: l }) => {
32
- const c = st();
33
- return /* @__PURE__ */ p("div", { className: `mx-cmn-calendar-header ${c}`, children: [
34
- /* @__PURE__ */ n(q, { className: "mx-cmn-calendar-header-title", variant: "H3", children: V(o, X.MONTH_YEAR) }),
35
- /* @__PURE__ */ p("div", { className: "mx-cmn-calendar-header-button-container", children: [
36
- /* @__PURE__ */ n(C, { "aria-label": t.prevAria, onClick: l, children: /* @__PURE__ */ n(P, { size: 24 }) }),
37
- /* @__PURE__ */ n(C, { "aria-label": t.nextAria, onClick: e, children: /* @__PURE__ */ n(Q, { size: 24 }) })
38
- ] })
39
- ] });
40
- }, st = () => E({
41
- alignItems: "center",
42
- display: "flex",
43
- marginBottom: 16,
44
- marginRight: -16,
45
- paddingLeft: 8,
46
- "& .mx-cmn-calendar-header-title": {
47
- flexGrow: 1
48
- },
49
- "& .mx-cmn-calendar-header-button-container": {
50
- display: "flex",
51
- gap: 4
52
- }
53
- }), dt = ({ beginDate: t, date: o, endDate: e, isInMonth: l, onClick: c }) => {
54
- const h = nt(), x = ht(h), a = t && e && tt(o, { start: t, end: e }) && !d(o, t) && !d(o, e), f = t && e && d(t, o) && !d(t, e), m = e && t && d(e, o) && !d(t, e), i = t && d(t, o) || e && d(e, o), u = d(o, $());
55
- return /* @__PURE__ */ n(
56
- "div",
57
- {
58
- className: `
59
- mx-cmn-calendar-day
60
- ${x}
61
- ${l ? "" : "mx-cmn-out-of-month"}
62
- ${a ? "mx-cmn-date-interval" : ""}
63
- `,
64
- children: /* @__PURE__ */ n(
65
- C,
66
- {
67
- className: `
68
- mx-cmn-calendar-day-button
69
- ${f ? "mx-cmn-range-start" : ""}
70
- ${m ? "mx-cmn-range-end" : ""}
71
- `,
72
- color: i ? "primary" : "secondary",
73
- onClick: () => c(o),
74
- variant: i ? "contained" : "text",
75
- children: /* @__PURE__ */ n(
76
- T,
77
- {
78
- className: `
79
- mx-cmn-calendar-day-text
80
- ${i ? "mx-cmn-day-selected" : ""}
81
- ${u ? "mx-cmn-today" : ""}`,
82
- variant: "Small",
83
- children: _(o, "d")
84
- }
85
- )
86
- }
87
- )
88
- }
89
- );
90
- }, ht = (t) => E({
91
- height: S,
92
- width: S,
93
- display: "flex",
94
- justifyContent: "center",
95
- "&.mx-cmn-out-of-month": {
96
- backgroundColor: t.palette.background.default
97
- },
98
- "&.mx-cmn-date-interval": {
99
- backgroundColor: t.palette.secondary.light
100
- },
101
- "& .MuiButton-root": {
102
- maxWidth: 44,
103
- minWidth: 44,
104
- height: 44,
105
- padding: 0,
106
- width: 44,
107
- "&.mx-cmn-range-start": {
108
- borderTopRightRadius: 0,
109
- borderBottomRightRadius: 0,
110
- "&:focus": {
111
- boxShadow: "none"
112
- }
113
- },
114
- "&.mx-cmn-range-end": {
115
- borderTopLeftRadius: 0,
116
- borderBottomLeftRadius: 0,
117
- "&:focus": {
118
- boxShadow: "none"
119
- }
120
- }
121
- },
122
- "& .mx-cmn-calendar-day-text": {
123
- "&.mx-cmn-day-selected": {
124
- color: t.palette.primary,
125
- "&.mx-cmn-day-selected": {
126
- borderColor: t.palette.common.white
127
- }
128
- },
129
- "&.mx-cmn-today": {
130
- borderBottom: `solid 2px ${t.palette.primary.main}`,
131
- marginBottom: -6,
132
- paddingBottom: 5
133
- }
134
- }
135
- }), ft = 340, S = 44;
136
- var pt = /* @__PURE__ */ ((t) => (t.None = "None", t.Single = "Single", t.Range = "Range", t))(pt || {});
137
- const xt = ({
138
- copy: t,
139
- beginDate: o = void 0,
140
- endDate: e = void 0,
141
- onDateSelected: l,
142
- onRangeSelected: c,
143
- selectionType: h = "Single"
144
- /* Single */
145
- }) => {
146
- const x = ut(), [a, f] = b.useState($), [m, i] = b.useState(o), [u, s] = b.useState(e);
147
- b.useEffect(() => {
148
- i(o), s(e), o && f(o);
149
- }, [o, e]);
150
- const k = b.useMemo(() => {
151
- const r = F({ start: G(a), end: L(a) }), y = [];
152
- for (let v = 0; v < r.length; v++) {
153
- const w = r[v], A = O({ start: w, end: W(w, 6) }), B = [];
154
- for (let R = 0; R < A.length; R++)
155
- B.push(A[R]);
156
- y.push(B);
157
- }
158
- return y;
159
- }, [a]), N = (r) => {
160
- if (h !== "None") {
161
- if (h === "Single") {
162
- i(r), l?.(r);
163
- return;
164
- }
165
- !m || u ? (i(r), s(void 0)) : z(r, m) ? (s(m), i(r), c?.(r, m)) : (s(r), c?.(m, r));
166
- }
167
- }, I = () => {
168
- const r = $();
169
- f(r), h !== "None" && (i(r), h === "Single" ? l?.(r) : (s(r), c?.(r, r)));
170
- }, M = () => {
171
- f(H(a, 1));
172
- }, g = () => {
173
- f(Y(a, 1));
174
- };
175
- return /* @__PURE__ */ n("div", { className: `mx-cmn-calendar ${x}`, children: /* @__PURE__ */ p(Z, { sx: { boxShadow: "none" }, children: [
176
- /* @__PURE__ */ n(
177
- ct,
178
- {
179
- copy: t,
180
- date: a,
181
- onNextClick: M,
182
- onPreviousClick: g
183
- }
184
- ),
185
- /* @__PURE__ */ n("div", { className: "mx-cmn-calendar-header-row", children: k[0].map((r, y) => /* @__PURE__ */ n("div", { className: "mx-cmn-calendar-header-cell", children: /* @__PURE__ */ n(T, { bold: !0, variant: "Small", children: _(r, "EEEEE") }) }, y)) }),
186
- k.map((r, y) => /* @__PURE__ */ n("div", { className: "mx-cmn-calendar-week", children: r.map((v, w) => /* @__PURE__ */ n(
187
- dt,
188
- {
189
- beginDate: m,
190
- date: v,
191
- endDate: u,
192
- isInMonth: D(v, a),
193
- onClick: N
194
- },
195
- w
196
- )) }, `w-${y}`)),
197
- /* @__PURE__ */ n("div", { className: "mx-cmn-calendar-today-container", children: /* @__PURE__ */ n(C, { onClick: I, size: "small", variant: "text", children: t.today }) })
198
- ] }) });
199
- }, ut = () => E({
200
- width: ft,
201
- "& .MuiPaper-root": {
202
- paddingLeft: 24,
203
- paddingRight: 24,
204
- paddingTop: 4,
205
- paddingBottom: 4
206
- },
207
- "& .mx-cmn-calendar-header-row": {
208
- display: "flex",
209
- justifyContent: "center",
210
- textAlign: "center",
211
- "& .mx-cmn-calendar-header-cell": {
212
- height: S,
213
- width: S,
214
- minWidth: S,
215
- "& .kmui-text": {
216
- alignItems: "center",
217
- display: "flex",
218
- height: "100%",
219
- justifyContent: "center",
220
- width: "100%"
221
- }
222
- }
223
- },
224
- "& .mx-cmn-calendar-week": {
225
- display: "flex",
226
- justifyContent: "center",
227
- textAlign: "center"
228
- },
229
- "& .mx-cmn-calendar-today-container": {
230
- display: "block",
231
- marginTop: 16,
232
- textAlign: "center",
233
- width: "100%",
234
- "& > .MuiButton-root": {
235
- display: "inline-block",
236
- marginLeft: "auto",
237
- marginRight: "auto"
238
- }
239
- }
240
- }), Kt = xt, gt = ({
241
- closeAriaLabel: t,
242
- content: o,
243
- inputLabel: e,
244
- inputValue: l,
245
- isOpen: c,
246
- handleInputChange: h,
247
- handleModalClose: x,
248
- handlePrimaryAction: a,
249
- handleSecondaryAction: f,
250
- primaryColor: m = "primary",
251
- primaryText: i,
252
- secondaryColor: u = "primary",
253
- secondaryText: s,
254
- title: k
255
- }) => {
256
- const N = parseFloat(l ?? "0"), I = l !== "" && l !== "0" && !isNaN(N), { isSmallMobile: M } = mt();
257
- return /* @__PURE__ */ n(
258
- et,
259
- {
260
- "aria-label": k,
261
- "aria-labelledby": "modal-title",
262
- maxWidth: "xs",
263
- onClose: x,
264
- open: c,
265
- role: "dialog",
266
- sx: {
267
- "& .MuiDialogContent-root": { p: 0 },
268
- ...M && { "& .MuiDialog-paper": { minWidth: "100%" } }
269
- },
270
- children: /* @__PURE__ */ n(rt, { children: /* @__PURE__ */ p(
271
- "form",
272
- {
273
- onSubmit: (g) => {
274
- g.preventDefault(), a();
275
- },
276
- children: [
277
- /* @__PURE__ */ p(
278
- j,
279
- {
280
- sx: {
281
- alignItems: "center",
282
- flexDirection: "row",
283
- justifyContent: "space-between",
284
- pb: 12,
285
- pl: 24,
286
- position: "relative",
287
- pr: 16,
288
- pt: 24
289
- },
290
- children: [
291
- /* @__PURE__ */ n(J, { id: "modal-title", children: k }),
292
- /* @__PURE__ */ n(
293
- at,
294
- {
295
- "aria-label": t,
296
- onClick: x,
297
- sx: { minHeight: 24, position: "absolute", right: 8, top: 18 },
298
- children: /* @__PURE__ */ n(U, { name: "close", sx: { color: "action.active" } })
299
- }
300
- )
301
- ]
302
- }
303
- ),
304
- /* @__PURE__ */ p(j, { sx: { gap: 24, px: 24 }, children: [
305
- /* @__PURE__ */ n(K, { variant: "subtitle1", children: o }),
306
- e && /* @__PURE__ */ n(
307
- lt,
308
- {
309
- InputProps: {
310
- startAdornment: /* @__PURE__ */ n(it, { position: "start", children: "$" })
311
- },
312
- autoFocus: !0,
313
- inputMode: "decimal",
314
- inputProps: {
315
- "aria-label": e,
316
- noValidate: !0,
317
- pattern: "[0-9]*\\.?[0-9]*"
318
- },
319
- label: e,
320
- onChange: ({ target: { value: g } }) => {
321
- /^\d*\.?\d*$/.test(g) && h?.(g);
322
- },
323
- type: "text",
324
- value: l
325
- }
326
- )
327
- ] }),
328
- /* @__PURE__ */ p(
329
- ot,
330
- {
331
- sx: {
332
- justifyContent: "flex-end",
333
- gap: 16,
334
- p: 24,
335
- ">:not(style)~:not(style)": { ml: 0 }
336
- },
337
- children: [
338
- s && /* @__PURE__ */ n(
339
- C,
340
- {
341
- "aria-label": s,
342
- color: u,
343
- onClick: f,
344
- children: s
345
- }
346
- ),
347
- /* @__PURE__ */ n(
348
- C,
349
- {
350
- "aria-label": i,
351
- color: m,
352
- disabled: e ? !I : !1,
353
- onClick: a,
354
- variant: "contained",
355
- children: i
356
- }
357
- )
358
- ]
359
- }
360
- )
361
- ]
362
- }
363
- ) })
364
- }
365
- );
366
- }, Pt = gt, Qt = (t, o) => !!t.find((e) => e.feature_name === o)?.is_enabled;
367
- export {
368
- Kt as C,
369
- pt as a,
370
- Pt as b,
371
- Qt as i
372
- };