@mx-cartographer/experiences 9.0.3 → 9.1.0-alpha.bb1
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 +0 -4
- package/dist/Analytics-BKzTPees.mjs +61 -0
- package/dist/GlobalCopyApi-BeXzaDH9.mjs +487 -0
- package/dist/HeaderCell-EhCUSjvj.mjs +10 -0
- package/dist/Loader-BlVzRtUd.mjs +73 -0
- package/dist/MiniWidgetContainer-COwnjfy7.mjs +110 -0
- package/dist/OriginalBalanceAction-sbiqaxok.mjs +110 -0
- package/dist/SpendingLegend-D15ixlQ1.mjs +222 -0
- package/dist/accounts/index.es.js +12 -1598
- package/dist/accounts-DkyAiLpg.mjs +15632 -0
- package/dist/analytics/index.es.js +155 -139
- package/dist/budgets/index.es.js +1317 -1266
- package/dist/cashflow/index.es.js +1047 -942
- package/dist/categories/index.es.js +4 -4
- package/dist/common/index.es.js +101 -310
- package/dist/core/index.es.js +80 -104
- package/dist/core-BexP5oiV.mjs +4047 -0
- package/dist/dashboard/index.es.js +185 -141
- package/dist/debts/index.es.js +1384 -1272
- package/dist/finstrong/index.es.js +3366 -3471
- package/dist/goals/index.es.js +1103 -984
- package/dist/help/index.es.js +3 -25
- package/dist/help-CctDYrAH.mjs +2308 -0
- package/dist/insights/index.es.js +93 -4843
- package/dist/investments/index.es.js +1533 -1522
- package/dist/merchants/index.es.js +75 -64
- package/dist/microinsights/index.es.js +15 -824
- package/dist/microinsights-CRf3ChsJ.mjs +1814 -0
- package/dist/networth/index.es.js +550 -503
- package/dist/notifications/index.es.js +169 -161
- package/dist/recurringtransactions/index.es.js +10 -962
- package/dist/recurringtransactions-gbJ_NA8u.mjs +1564 -0
- package/dist/settings/index.es.js +13 -880
- package/dist/settings-ZMHe439l.mjs +1526 -0
- package/dist/spending/index.es.js +400 -456
- package/dist/transactions/index.es.js +10 -603
- package/dist/trends/index.es.js +1268 -1407
- package/package.json +28 -28
- package/dist/Account-BaJmiJAG.mjs +0 -118
- package/dist/Account-BxHMlV9R.mjs +0 -30
- package/dist/AccountDetailsHeader-DIysk_4w.mjs +0 -95
- package/dist/AccountDisplayName-CO7z3v99.mjs +0 -11
- package/dist/AccountFields-mwJ8NXsX.mjs +0 -141
- package/dist/AccountListItem-BDXHs4tV.mjs +0 -94
- package/dist/AccountUtils-T5_Odvos.mjs +0 -27
- package/dist/Accounts-CseLC3lL.mjs +0 -5
- package/dist/Analytics-CkYXKvco.mjs +0 -53
- package/dist/Analytics-CzGzz_sE.mjs +0 -136
- package/dist/ApiEndpoints-DXwIYNUV.mjs +0 -49
- package/dist/BudgetUtil-Bg2AQJpQ.mjs +0 -74
- package/dist/Category-DEKZGLYe.mjs +0 -301
- package/dist/CategorySelectorDrawer-8soGrhB8.mjs +0 -430
- package/dist/Connect-Dk6GZEsA.mjs +0 -39
- package/dist/ConnectCard-CCep7Zqe.mjs +0 -54
- package/dist/ConnectDrawer-Cnjr3Ddg.mjs +0 -58
- package/dist/ConnectionsDrawer-CtfPXk0M.mjs +0 -54
- package/dist/CurrencyDialog-DumQCTPO.mjs +0 -373
- package/dist/CurrencyInput-adTIRtL3.mjs +0 -87
- package/dist/CurrencyText-CCbE6MmF.mjs +0 -20
- package/dist/DateFormats-HudZ3Bjs.mjs +0 -64
- package/dist/DateUtil-Bhq59ZVg.mjs +0 -58
- package/dist/DebtUtils-DD3186U-.mjs +0 -153
- package/dist/Dialog-Bvd2n8hz.mjs +0 -66
- package/dist/Donut-SzzfZDHF.mjs +0 -88
- package/dist/Drawer-BXqqBMxg.mjs +0 -174
- package/dist/EmbeddedCard-DPwJjqMH.mjs +0 -856
- package/dist/EmptyState-CJUDc3kD.mjs +0 -84
- package/dist/Error-Dogaw2jO.mjs +0 -84
- package/dist/ErrorBoundary-CsdOcnJ9.mjs +0 -23
- package/dist/ExportCsvAction-Bw02ZJEj.mjs +0 -24
- package/dist/GlobalAccountFilter-7Cg2-9A5.mjs +0 -237
- package/dist/GlobalCopyApi-wcnDUzMV.mjs +0 -128
- package/dist/GoalsUtil-C9EnLWvC.mjs +0 -107
- package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
- package/dist/Help-CkQTjORd.mjs +0 -299
- package/dist/Help-DJ8PrVHX.mjs +0 -3209
- package/dist/IconBacking-DgT8DCeh.mjs +0 -39
- package/dist/InformationTooltip-4su8bn1e.mjs +0 -41
- package/dist/InvestmentUtil-BItV7uEs.mjs +0 -134
- package/dist/LineChart-CejWS_rh.mjs +0 -612
- package/dist/ListItemAction-CzZ8s39Z.mjs +0 -69
- package/dist/ListItemRow-kH1rn8Xu.mjs +0 -67
- package/dist/ListItemWrapper-B5r-YQQ_.mjs +0 -42
- package/dist/Loader-CxeBwuPG.mjs +0 -21
- package/dist/Localization-DnoVyBNK.mjs +0 -38
- package/dist/ManageIncome-D1yBODQi.mjs +0 -595
- package/dist/MicroWidgetContainer-CfKdQfhi.mjs +0 -45
- package/dist/MiniWidgetContainer-BdPiUU-u.mjs +0 -66
- package/dist/NetWorthUtils-DilGN1nW.mjs +0 -95
- package/dist/Notification-DTNYSd8P.mjs +0 -7
- package/dist/NotificationSettings-B4JA5IKE.mjs +0 -677
- package/dist/NotificationUtils-BRGFTePr.mjs +0 -23
- package/dist/NumberFormatting--XMeeBfr.mjs +0 -49
- package/dist/OriginalBalanceAction-BybTXDtO.mjs +0 -114
- package/dist/RecurringSettings-D2xbNb67.mjs +0 -88
- package/dist/RecurringTransactionsUtil-B3rLEx_g.mjs +0 -253
- package/dist/ResponsiveButton-CC9F_Ezk.mjs +0 -45
- package/dist/SearchBox-Cpgu_gdO.mjs +0 -50
- package/dist/Select-BFt-HD-L.mjs +0 -55
- package/dist/SelectionBox-B4xELRgp.mjs +0 -48
- package/dist/SingleSegmentDonut-7Uy6VEld.mjs +0 -69
- package/dist/Sizes-DISGrlUg.mjs +0 -6
- package/dist/SkeletonLoader-BaNboJjD.mjs +0 -38
- package/dist/SpendingData-Fii_xATx.mjs +0 -53
- package/dist/SpendingLegend-5Ct_FZ8o.mjs +0 -193
- package/dist/StatusBar-CPfSXe80.mjs +0 -30
- package/dist/TabContentContainer-CnMXkVqr.mjs +0 -21
- package/dist/ToggleListItem-Dl1lXNwj.mjs +0 -91
- package/dist/TransactionDetails-DctXr07p.mjs +0 -1714
- package/dist/TransactionUtils-BphBJBbU.mjs +0 -234
- package/dist/TrendsUtil-D9z3kIj_.mjs +0 -69
- package/dist/UserStore-CRpKQjpP.mjs +0 -3002
- package/dist/ViewMoreMicroCard-BD_MNc2z.mjs +0 -1295
- package/dist/WidgetContainer-CmbU4CBH.mjs +0 -482
- package/dist/hooks-BaO_gOI6.mjs +0 -77
- package/dist/useAccountDisplayName-CFa_MrS6.mjs +0 -15
- package/dist/useAriaLive-MkYebyUR.mjs +0 -35
- package/dist/useDimensions-CeDR9V8N.mjs +0 -36
- package/dist/useInsightsEnabled-DaNLPmUU.mjs +0 -11
- package/dist/useScreenSize-mWpmnh5w.mjs +0 -36
- package/dist/useWidgetLoadTimer-CJb-RELP.mjs +0 -19
|
@@ -1,373 +0,0 @@
|
|
|
1
|
-
import { jsxs as p, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import b from "react";
|
|
3
|
-
import { css as A } from "@mxenabled/cssinjs";
|
|
4
|
-
import { addDays as O } from "date-fns/addDays";
|
|
5
|
-
import { addMonths as _ } from "date-fns/addMonths";
|
|
6
|
-
import { eachDayOfInterval as H } from "date-fns/eachDayOfInterval";
|
|
7
|
-
import { eachWeekOfInterval as L } from "date-fns/eachWeekOfInterval";
|
|
8
|
-
import { endOfMonth as z } from "date-fns/endOfMonth";
|
|
9
|
-
import { format as T } from "date-fns/format";
|
|
10
|
-
import { isBefore as F } from "date-fns/isBefore";
|
|
11
|
-
import { isSameMonth as G } from "date-fns/isSameMonth";
|
|
12
|
-
import { startOfMonth as Y } from "date-fns/startOfMonth";
|
|
13
|
-
import { startOfToday as $ } from "date-fns/startOfToday";
|
|
14
|
-
import { subMonths as Z } from "date-fns/subMonths";
|
|
15
|
-
import C from "@mui/material/Button";
|
|
16
|
-
import q from "@mui/material/Paper";
|
|
17
|
-
import { H2 as D, Text as W, H3 as J, P as K } from "@mxenabled/mxui";
|
|
18
|
-
import { ChevronLeft as Q, ChevronRight as U, Icon as V } from "@mxenabled/mx-icons";
|
|
19
|
-
import { f as X, D as P } from "./DateFormats-HudZ3Bjs.mjs";
|
|
20
|
-
import { isSameDay as d } from "date-fns/isSameDay";
|
|
21
|
-
import { isWithinInterval as tt } from "date-fns/isWithinInterval";
|
|
22
|
-
import { useTheme as nt } from "@mui/material/styles";
|
|
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-mWpmnh5w.mjs";
|
|
31
|
-
const ct = ({ copy: t, date: r, onNextClick: o, onPreviousClick: l }) => {
|
|
32
|
-
const c = st();
|
|
33
|
-
return /* @__PURE__ */ p("div", { className: `mx-cmn-calendar-header ${c}`, children: [
|
|
34
|
-
/* @__PURE__ */ n(D, { className: "mx-cmn-calendar-header-title", variant: "h3", children: X(r, P.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(Q, { size: 24 }) }),
|
|
37
|
-
/* @__PURE__ */ n(C, { "aria-label": t.nextAria, onClick: o, children: /* @__PURE__ */ n(U, { size: 24 }) })
|
|
38
|
-
] })
|
|
39
|
-
] });
|
|
40
|
-
}, st = () => A({
|
|
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: r, endDate: o, isInMonth: l, onClick: c }) => {
|
|
54
|
-
const h = nt(), x = ht(h), a = t && o && tt(r, { start: t, end: o }) && !d(r, t) && !d(r, o), f = t && o && d(t, r) && !d(t, o), m = o && t && d(o, r) && !d(t, o), i = t && d(t, r) || o && d(o, r), u = d(r, $());
|
|
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(r),
|
|
74
|
-
variant: i ? "contained" : "text",
|
|
75
|
-
children: /* @__PURE__ */ n(
|
|
76
|
-
W,
|
|
77
|
-
{
|
|
78
|
-
className: `
|
|
79
|
-
mx-cmn-calendar-day-text
|
|
80
|
-
${i ? "mx-cmn-day-selected" : ""}
|
|
81
|
-
${u ? "mx-cmn-today" : ""}`,
|
|
82
|
-
variant: "body2",
|
|
83
|
-
children: T(r, "d")
|
|
84
|
-
}
|
|
85
|
-
)
|
|
86
|
-
}
|
|
87
|
-
)
|
|
88
|
-
}
|
|
89
|
-
);
|
|
90
|
-
}, ht = (t) => A({
|
|
91
|
-
height: w,
|
|
92
|
-
width: w,
|
|
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, w = 44;
|
|
136
|
-
var pt = /* @__PURE__ */ ((t) => (t.None = "None", t.Single = "Single", t.Range = "Range", t))(pt || {});
|
|
137
|
-
const Dt = ({
|
|
138
|
-
copy: t,
|
|
139
|
-
beginDate: r = void 0,
|
|
140
|
-
endDate: o = void 0,
|
|
141
|
-
onDateSelected: l,
|
|
142
|
-
onRangeSelected: c,
|
|
143
|
-
selectionType: h = "Single"
|
|
144
|
-
/* Single */
|
|
145
|
-
}) => {
|
|
146
|
-
const x = xt(), [a, f] = b.useState($), [m, i] = b.useState(r), [u, s] = b.useState(o);
|
|
147
|
-
b.useEffect(() => {
|
|
148
|
-
i(r), s(o), r && f(r);
|
|
149
|
-
}, [r, o]);
|
|
150
|
-
const k = b.useMemo(() => {
|
|
151
|
-
const e = L({ start: Y(a), end: z(a) }), y = [];
|
|
152
|
-
for (let v = 0; v < e.length; v++) {
|
|
153
|
-
const N = e[v], B = H({ start: N, end: O(N, 6) }), E = [];
|
|
154
|
-
for (let R = 0; R < B.length; R++)
|
|
155
|
-
E.push(B[R]);
|
|
156
|
-
y.push(E);
|
|
157
|
-
}
|
|
158
|
-
return y;
|
|
159
|
-
}, [a]), S = (e) => {
|
|
160
|
-
if (h !== "None") {
|
|
161
|
-
if (h === "Single") {
|
|
162
|
-
i(e), l?.(e);
|
|
163
|
-
return;
|
|
164
|
-
}
|
|
165
|
-
!m || u ? (i(e), s(void 0)) : F(e, m) ? (s(m), i(e), c?.(e, m)) : (s(e), c?.(m, e));
|
|
166
|
-
}
|
|
167
|
-
}, I = () => {
|
|
168
|
-
const e = $();
|
|
169
|
-
f(e), h !== "None" && (i(e), h === "Single" ? l?.(e) : (s(e), c?.(e, e)));
|
|
170
|
-
}, M = () => {
|
|
171
|
-
f(_(a, 1));
|
|
172
|
-
}, g = () => {
|
|
173
|
-
f(Z(a, 1));
|
|
174
|
-
};
|
|
175
|
-
return /* @__PURE__ */ n("div", { className: `mx-cmn-calendar ${x}`, children: /* @__PURE__ */ p(q, { 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((e, y) => /* @__PURE__ */ n("div", { className: "mx-cmn-calendar-header-cell", children: /* @__PURE__ */ n(W, { bold: !0, variant: "body2", children: T(e, "EEEEE") }) }, y)) }),
|
|
186
|
-
k.map((e, y) => /* @__PURE__ */ n("div", { className: "mx-cmn-calendar-week", children: e.map((v, N) => /* @__PURE__ */ n(
|
|
187
|
-
dt,
|
|
188
|
-
{
|
|
189
|
-
beginDate: m,
|
|
190
|
-
date: v,
|
|
191
|
-
endDate: u,
|
|
192
|
-
isInMonth: G(v, a),
|
|
193
|
-
onClick: S
|
|
194
|
-
},
|
|
195
|
-
N
|
|
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
|
-
}, xt = () => A({
|
|
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: w,
|
|
213
|
-
width: w,
|
|
214
|
-
minWidth: w,
|
|
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
|
-
}), Jt = ({
|
|
241
|
-
closeAriaLabel: t,
|
|
242
|
-
content: r,
|
|
243
|
-
inputLabel: o,
|
|
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 S = parseFloat(l ?? "0"), I = l !== "" && l !== "0" && !isNaN(S), { 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(V, { 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: r }),
|
|
306
|
-
o && /* @__PURE__ */ n(
|
|
307
|
-
lt,
|
|
308
|
-
{
|
|
309
|
-
autoFocus: !0,
|
|
310
|
-
inputMode: "decimal",
|
|
311
|
-
label: o,
|
|
312
|
-
onChange: ({ target: { value: g } }) => {
|
|
313
|
-
/^\d*\.?\d*$/.test(g) && h?.(g);
|
|
314
|
-
},
|
|
315
|
-
slotProps: {
|
|
316
|
-
input: {
|
|
317
|
-
startAdornment: /* @__PURE__ */ n(it, { position: "start", children: "$" })
|
|
318
|
-
},
|
|
319
|
-
htmlInput: {
|
|
320
|
-
"aria-label": o,
|
|
321
|
-
noValidate: !0,
|
|
322
|
-
pattern: "[0-9]*\\.?[0-9]*"
|
|
323
|
-
}
|
|
324
|
-
},
|
|
325
|
-
type: "text",
|
|
326
|
-
value: l
|
|
327
|
-
}
|
|
328
|
-
)
|
|
329
|
-
] }),
|
|
330
|
-
/* @__PURE__ */ p(
|
|
331
|
-
ot,
|
|
332
|
-
{
|
|
333
|
-
sx: {
|
|
334
|
-
justifyContent: "flex-end",
|
|
335
|
-
gap: 16,
|
|
336
|
-
p: 24,
|
|
337
|
-
">:not(style)~:not(style)": { ml: 0 }
|
|
338
|
-
},
|
|
339
|
-
children: [
|
|
340
|
-
s && /* @__PURE__ */ n(
|
|
341
|
-
C,
|
|
342
|
-
{
|
|
343
|
-
"aria-label": s,
|
|
344
|
-
color: u,
|
|
345
|
-
onClick: f,
|
|
346
|
-
children: s
|
|
347
|
-
}
|
|
348
|
-
),
|
|
349
|
-
/* @__PURE__ */ n(
|
|
350
|
-
C,
|
|
351
|
-
{
|
|
352
|
-
"aria-label": i,
|
|
353
|
-
color: m,
|
|
354
|
-
disabled: o ? !I : !1,
|
|
355
|
-
onClick: a,
|
|
356
|
-
variant: "contained",
|
|
357
|
-
children: i
|
|
358
|
-
}
|
|
359
|
-
)
|
|
360
|
-
]
|
|
361
|
-
}
|
|
362
|
-
)
|
|
363
|
-
]
|
|
364
|
-
}
|
|
365
|
-
) })
|
|
366
|
-
}
|
|
367
|
-
);
|
|
368
|
-
};
|
|
369
|
-
export {
|
|
370
|
-
Dt as C,
|
|
371
|
-
pt as a,
|
|
372
|
-
Jt as b
|
|
373
|
-
};
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import i from "react";
|
|
3
|
-
import { css as k } from "@mxenabled/cssinjs";
|
|
4
|
-
import { v4 as q } from "uuid";
|
|
5
|
-
import { TextField as B, P as p } from "@mxenabled/mxui";
|
|
6
|
-
import { g as L, C as O, f as y, M as C } from "./NumberFormatting--XMeeBfr.mjs";
|
|
7
|
-
import { b as h, g as b } from "./Localization-DnoVyBNK.mjs";
|
|
8
|
-
import { u as W } from "./hooks-BaO_gOI6.mjs";
|
|
9
|
-
const J = ({
|
|
10
|
-
allowDecimals: o = !0,
|
|
11
|
-
ariaLabel: g,
|
|
12
|
-
amount: c,
|
|
13
|
-
amountIsRequired: M = !0,
|
|
14
|
-
copy: a,
|
|
15
|
-
customValidate: $ = () => !0,
|
|
16
|
-
errorText: S = "",
|
|
17
|
-
label: u,
|
|
18
|
-
minAmount: f = 1,
|
|
19
|
-
setAmount: x,
|
|
20
|
-
setHasValidInput: r,
|
|
21
|
-
...N
|
|
22
|
-
}) => {
|
|
23
|
-
const [l, t] = i.useState(""), { common: R } = W(), n = a || R.currency_input, A = j(), E = /^[0-9]*$/, P = /^(\d)*(\,)?([0-9]{1,2})?$/, T = /^(\d)*(\.)?([0-9]{1,2})?$/;
|
|
24
|
-
let s;
|
|
25
|
-
const d = i.useRef(q());
|
|
26
|
-
if (o)
|
|
27
|
-
switch (L()) {
|
|
28
|
-
case O.CAD:
|
|
29
|
-
s = P;
|
|
30
|
-
break;
|
|
31
|
-
default:
|
|
32
|
-
s = T;
|
|
33
|
-
break;
|
|
34
|
-
}
|
|
35
|
-
else
|
|
36
|
-
s = E;
|
|
37
|
-
i.useEffect(() => {
|
|
38
|
-
_(c);
|
|
39
|
-
}, [c]);
|
|
40
|
-
const _ = (e) => {
|
|
41
|
-
!M && (e === "" || e === "." || e === ",") ? (t(""), r?.(!1)) : Number(e) < f ? (t(
|
|
42
|
-
h(
|
|
43
|
-
n.error_amount_must_be_equal_to,
|
|
44
|
-
y(f, "0")
|
|
45
|
-
)
|
|
46
|
-
), r?.(!1)) : Number(e) > C ? (t(
|
|
47
|
-
h(
|
|
48
|
-
n.error_amount_must_be_less_than_or_equal_to,
|
|
49
|
-
y(C, o ? "0,0.00" : "0,0", Math.floor)
|
|
50
|
-
)
|
|
51
|
-
), r?.(!1)) : e.toString().match(s) ? $() ? (t(""), r?.(!0)) : (t(S), r?.(!1)) : (t(n.error_amount_is_invalid), r?.(!1)), x(e.toString());
|
|
52
|
-
};
|
|
53
|
-
return /* @__PURE__ */ m(
|
|
54
|
-
B,
|
|
55
|
-
{
|
|
56
|
-
className: `mx-cmn-currency-input ${A}`,
|
|
57
|
-
error: !!l,
|
|
58
|
-
helperText: l,
|
|
59
|
-
hiddenLabel: !u,
|
|
60
|
-
id: `currency-input-${d.current}`,
|
|
61
|
-
inputMode: o ? "decimal" : "numeric",
|
|
62
|
-
label: u,
|
|
63
|
-
name: `currency-input-${d.current}`,
|
|
64
|
-
onChange: (e) => _(e.target.value),
|
|
65
|
-
slotProps: {
|
|
66
|
-
input: {
|
|
67
|
-
endAdornment: b().includes("fr-ca") ? /* @__PURE__ */ m(p, { children: "$" }) : void 0,
|
|
68
|
-
startAdornment: b().includes("fr-ca") ? void 0 : /* @__PURE__ */ m(p, { children: "$" })
|
|
69
|
-
},
|
|
70
|
-
htmlInput: {
|
|
71
|
-
"aria-label": g || n.enter_amount,
|
|
72
|
-
noValidate: !0,
|
|
73
|
-
pattern: o ? "[0-9]*\\.?[0-9]*" : "[0-9]*"
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
value: c,
|
|
77
|
-
...N
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
}, j = () => k({
|
|
81
|
-
"& .MuiInputBase-adornedStart > .p": {
|
|
82
|
-
marginRight: 4
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
export {
|
|
86
|
-
J as C
|
|
87
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsxs as i } from "react/jsx-runtime";
|
|
2
|
-
import { P as u } from "@mxenabled/mxui";
|
|
3
|
-
import { f as a } from "./NumberFormatting--XMeeBfr.mjs";
|
|
4
|
-
const y = ({
|
|
5
|
-
isIncome: e = !1,
|
|
6
|
-
amount: o = 0,
|
|
7
|
-
bold: s,
|
|
8
|
-
color: r,
|
|
9
|
-
formatString: m,
|
|
10
|
-
sx: n,
|
|
11
|
-
symbol: t,
|
|
12
|
-
variant: c,
|
|
13
|
-
...f
|
|
14
|
-
}) => /* @__PURE__ */ i(u, { bold: s, color: r || (e ? "success.main" : "text.primary"), sx: n, variant: c, ...f, children: [
|
|
15
|
-
t && t,
|
|
16
|
-
a(Number(o), m ?? "0,0.00")
|
|
17
|
-
] });
|
|
18
|
-
export {
|
|
19
|
-
y as C
|
|
20
|
-
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { intlFormat as t } from "date-fns/intlFormat";
|
|
2
|
-
import { g as r } from "./Localization-DnoVyBNK.mjs";
|
|
3
|
-
const _ = "do", a = {
|
|
4
|
-
TIME_STAMP_HOUR_MINUTE: {
|
|
5
|
-
hour: "numeric",
|
|
6
|
-
minute: "numeric"
|
|
7
|
-
},
|
|
8
|
-
DAY: {
|
|
9
|
-
day: "numeric"
|
|
10
|
-
},
|
|
11
|
-
DAY_OF_WEEK: {
|
|
12
|
-
weekday: "long"
|
|
13
|
-
},
|
|
14
|
-
DAY_OF_WEEK_MONTH_DAY: {
|
|
15
|
-
day: "numeric",
|
|
16
|
-
month: "long",
|
|
17
|
-
weekday: "long"
|
|
18
|
-
},
|
|
19
|
-
FULL_MONTH_DAY: {
|
|
20
|
-
day: "numeric",
|
|
21
|
-
month: "long"
|
|
22
|
-
},
|
|
23
|
-
MONTH: {
|
|
24
|
-
month: "short"
|
|
25
|
-
},
|
|
26
|
-
MONTH_DAY: {
|
|
27
|
-
day: "numeric",
|
|
28
|
-
month: "short"
|
|
29
|
-
},
|
|
30
|
-
MONTH_LONG: {
|
|
31
|
-
month: "long"
|
|
32
|
-
},
|
|
33
|
-
MONTH_SHORT: {
|
|
34
|
-
month: "short"
|
|
35
|
-
},
|
|
36
|
-
MONTH_SHORT_YEAR: {
|
|
37
|
-
month: "short",
|
|
38
|
-
year: "numeric"
|
|
39
|
-
},
|
|
40
|
-
MONTH_YEAR: {
|
|
41
|
-
month: "long",
|
|
42
|
-
year: "numeric"
|
|
43
|
-
},
|
|
44
|
-
YEAR_MONTH_DAY: {
|
|
45
|
-
day: "2-digit",
|
|
46
|
-
month: "2-digit",
|
|
47
|
-
year: "numeric"
|
|
48
|
-
},
|
|
49
|
-
MONTH_DAY_YEAR: {
|
|
50
|
-
month: "short",
|
|
51
|
-
day: "2-digit",
|
|
52
|
-
year: "numeric"
|
|
53
|
-
},
|
|
54
|
-
MED_MONTH_SHORT_DAY_FULL_YEAR: {
|
|
55
|
-
month: "short",
|
|
56
|
-
day: "numeric",
|
|
57
|
-
year: "numeric"
|
|
58
|
-
}
|
|
59
|
-
}, i = (o, n) => t(new Date(o), Object.assign(n), { locale: r() });
|
|
60
|
-
export {
|
|
61
|
-
a as D,
|
|
62
|
-
_ as O,
|
|
63
|
-
i as f
|
|
64
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { addMonths as m } from "date-fns/addMonths";
|
|
2
|
-
import { addQuarters as n } from "date-fns/addQuarters";
|
|
3
|
-
import { addWeeks as i } from "date-fns/addWeeks";
|
|
4
|
-
import { addYears as l } from "date-fns/addYears";
|
|
5
|
-
import { getDay as x } from "date-fns/getDay";
|
|
6
|
-
import { isBefore as a } from "date-fns/isBefore";
|
|
7
|
-
import { nextDay as T } from "date-fns/nextDay";
|
|
8
|
-
import { setDate as c } from "date-fns/setDate";
|
|
9
|
-
import { startOfToday as r } from "date-fns/startOfToday";
|
|
10
|
-
import { fromUnixTime as s } from "date-fns/fromUnixTime";
|
|
11
|
-
import { f as D, D as f } from "./DateFormats-HudZ3Bjs.mjs";
|
|
12
|
-
const Y = (e) => {
|
|
13
|
-
const t = x(e);
|
|
14
|
-
let o = T(e, t);
|
|
15
|
-
for (; a(o, r()); )
|
|
16
|
-
o = i(o, 1);
|
|
17
|
-
return o;
|
|
18
|
-
}, _ = (e) => {
|
|
19
|
-
let t = e;
|
|
20
|
-
for (; a(t, r()); )
|
|
21
|
-
t = i(t, 2);
|
|
22
|
-
return t;
|
|
23
|
-
}, A = (e) => {
|
|
24
|
-
let t = c(r(), e.getDate());
|
|
25
|
-
for (; a(t, r()); )
|
|
26
|
-
t = m(t, 1);
|
|
27
|
-
return t;
|
|
28
|
-
}, W = (e) => {
|
|
29
|
-
let t = e;
|
|
30
|
-
for (; a(t, r()); )
|
|
31
|
-
t = m(t, 2);
|
|
32
|
-
return t;
|
|
33
|
-
}, k = (e) => {
|
|
34
|
-
let t = n(e, 1);
|
|
35
|
-
for (; a(t, r()); )
|
|
36
|
-
t = n(t, 1);
|
|
37
|
-
return t;
|
|
38
|
-
}, B = (e) => {
|
|
39
|
-
let t = e;
|
|
40
|
-
for (; a(t, r()); )
|
|
41
|
-
t = n(t, 2);
|
|
42
|
-
return t;
|
|
43
|
-
}, C = (e) => l(e, 1), E = (e) => {
|
|
44
|
-
const t = s(e);
|
|
45
|
-
return new Date(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate());
|
|
46
|
-
}, F = (e) => D(s(e), f.DAY_OF_WEEK_MONTH_DAY), Q = (e) => e ? D(s(e), f.MONTH_YEAR) : "";
|
|
47
|
-
export {
|
|
48
|
-
B as a,
|
|
49
|
-
k as b,
|
|
50
|
-
W as c,
|
|
51
|
-
A as d,
|
|
52
|
-
_ as e,
|
|
53
|
-
E as f,
|
|
54
|
-
C as g,
|
|
55
|
-
Y as h,
|
|
56
|
-
F as i,
|
|
57
|
-
Q as j
|
|
58
|
-
};
|