@mx-cartographer/experiences 7.10.21 → 7.10.22

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 (36) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{AccountStore-yQyWbrio.mjs → AccountStore-Bv74StpR.mjs} +1 -1
  3. package/dist/Analytics-i5h6BxR1.mjs +124 -0
  4. package/dist/{ExportCsvAction-D5PGUKAT.mjs → ExportCsvAction-8uWKc_e2.mjs} +2 -2
  5. package/dist/{ManageIncome-UYZbu_-I.mjs → ManageIncome-C6iolYLZ.mjs} +11 -10
  6. package/dist/{RecurringSettings-D2uU-HNE.mjs → RecurringSettings-CDdjajPZ.mjs} +3 -3
  7. package/dist/{RepeatingTransaction-CIrVdIet.mjs → RecurringTransactions-B_I4_FGO.mjs} +3 -2
  8. package/dist/{RecurringTransactionsStore-BJrH7BJ7.mjs → RecurringTransactionsStore-DAX5ozGz.mjs} +1 -1
  9. package/dist/Transaction-RmKYEKSk.mjs +80 -0
  10. package/dist/TransactionDetails-B9cwOn5s.mjs +1193 -0
  11. package/dist/TransactionList-5JxQV7f6.mjs +204 -0
  12. package/dist/{TransactionStore-BrAMgM2Q.mjs → TransactionStore-B-fc3CsB.mjs} +2 -2
  13. package/dist/User-Bs3hX0dH.mjs +237 -0
  14. package/dist/WidgetContainer-CiyWaTc1.mjs +440 -0
  15. package/dist/accounts/index.es.js +62 -60
  16. package/dist/budgets/index.es.js +25 -23
  17. package/dist/cashflow/index.es.js +25 -24
  18. package/dist/common/index.es.js +165 -163
  19. package/dist/debts/index.es.js +30 -29
  20. package/dist/{exportTransactionsToCSV-DK9U4Lmk.mjs → exportTransactionsToCSV-RUWymyA3.mjs} +5 -5
  21. package/dist/finstrong/index.es.js +5 -5
  22. package/dist/goals/index.es.js +9 -8
  23. package/dist/help/index.es.js +1 -1
  24. package/dist/insights/components/index.d.ts +1 -0
  25. package/dist/insights/index.es.js +1014 -937
  26. package/dist/investments/index.es.js +25 -24
  27. package/dist/networth/index.es.js +41 -40
  28. package/dist/recurringtransactions/index.es.js +34 -33
  29. package/dist/settings/index.es.js +1 -1
  30. package/dist/spending/index.es.js +48 -46
  31. package/dist/transactions/index.es.js +40 -37
  32. package/dist/trends/index.es.js +19 -17
  33. package/package.json +1 -1
  34. package/dist/TransactionDetails-LEP8qGrR.mjs +0 -1375
  35. package/dist/User-CYt9qNY3.mjs +0 -314
  36. package/dist/WidgetContainer-BxRQazKR.mjs +0 -560
@@ -1,314 +0,0 @@
1
- import { jsxs as h, jsx as e } from "react/jsx-runtime";
2
- import A from "react";
3
- import { css as p } from "@mxenabled/cssinjs";
4
- import { addDays as b } from "date-fns/addDays";
5
- import { addMonths as B } from "date-fns/addMonths";
6
- import { eachDayOfInterval as P } from "date-fns/eachDayOfInterval";
7
- import { eachWeekOfInterval as $ } from "date-fns/eachWeekOfInterval";
8
- import { endOfMonth as U } from "date-fns/endOfMonth";
9
- import { format as y } from "date-fns/format";
10
- import { isBefore as j } from "date-fns/isBefore";
11
- import { isSameMonth as W } from "date-fns/isSameMonth";
12
- import { startOfMonth as V } from "date-fns/startOfMonth";
13
- import { startOfToday as f } from "date-fns/startOfToday";
14
- import { subMonths as F } from "date-fns/subMonths";
15
- import E from "@mui/material/Button";
16
- import Y from "@mui/material/Paper";
17
- import { useTokens as v, H2 as z, Text as G } from "@mxenabled/mxui";
18
- import { ChevronLeft as X, ChevronRight as Z } from "@mxenabled/mx-icons";
19
- import { f as q, D as J } from "./DateFormats-Cs-NbEZ7.mjs";
20
- import { isSameDay as T } from "date-fns/isSameDay";
21
- import { isWithinInterval as Q } from "date-fns/isWithinInterval";
22
- import nn from "@mui/material/styles/useTheme";
23
- import k from "@mui/material/ListItem";
24
- import an from "@mui/material/ListItemButton";
25
- import { g as tn } from "./hooks-DWJQ4phS.mjs";
26
- const on = ({ copy: n, date: a, onNextClick: o, onPreviousClick: r }) => {
27
- const c = v(), l = en(c);
28
- return /* @__PURE__ */ h("div", { className: `mx-cmn-calendar-header ${l}`, children: [
29
- /* @__PURE__ */ e(z, { className: "mx-cmn-calendar-header-title", variant: "H3", children: q(a, J.MONTH_YEAR) }),
30
- /* @__PURE__ */ h("div", { className: "mx-cmn-calendar-header-button-container", children: [
31
- /* @__PURE__ */ e(E, { "aria-label": n.prevAria, onClick: r, children: /* @__PURE__ */ e(X, { size: 24 }) }),
32
- /* @__PURE__ */ e(E, { "aria-label": n.nextAria, onClick: o, children: /* @__PURE__ */ e(Z, { size: 24 }) })
33
- ] })
34
- ] });
35
- }, en = (n) => p({
36
- alignItems: "center",
37
- display: "flex",
38
- marginBottom: n.Spacing.Medium,
39
- marginRight: -n.Spacing.Medium,
40
- paddingLeft: n.Spacing.XSmall,
41
- "& .mx-cmn-calendar-header-title": {
42
- flexGrow: 1
43
- },
44
- "& .mx-cmn-calendar-header-button-container": {
45
- display: "flex",
46
- gap: 4
47
- }
48
- }), rn = ({ beginDate: n, date: a, endDate: o, isInMonth: r, onClick: c }) => {
49
- const l = nn(), S = cn(l), g = n && o && Q(a, { start: n, end: o }) && !T(a, n) && !T(a, o), s = n && o && T(n, a) && !T(n, o), N = o && n && T(o, a) && !T(n, o), i = n && T(n, a) || o && T(o, a), C = T(a, f());
50
- return /* @__PURE__ */ e(
51
- "div",
52
- {
53
- className: `
54
- mx-cmn-calendar-day
55
- ${S}
56
- ${r ? "" : "mx-cmn-out-of-month"}
57
- ${g ? "mx-cmn-date-interval" : ""}
58
- `,
59
- children: /* @__PURE__ */ e(
60
- E,
61
- {
62
- className: `
63
- mx-cmn-calendar-day-button
64
- ${s ? "mx-cmn-range-start" : ""}
65
- ${N ? "mx-cmn-range-end" : ""}
66
- `,
67
- color: i ? "primary" : "secondary",
68
- onClick: () => c(a),
69
- variant: i ? "contained" : "text",
70
- children: /* @__PURE__ */ e(
71
- G,
72
- {
73
- className: `
74
- mx-cmn-calendar-day-text
75
- ${i ? "mx-cmn-day-selected" : ""}
76
- ${C ? "mx-cmn-today" : ""}`,
77
- variant: "Small",
78
- children: y(a, "d")
79
- }
80
- )
81
- }
82
- )
83
- }
84
- );
85
- }, cn = (n) => p({
86
- height: I,
87
- width: I,
88
- display: "flex",
89
- justifyContent: "center",
90
- "&.mx-cmn-out-of-month": {
91
- backgroundColor: n.palette.background.default
92
- },
93
- "&.mx-cmn-date-interval": {
94
- backgroundColor: n.palette.secondary.light
95
- },
96
- "& .MuiButton-root": {
97
- maxWidth: 44,
98
- minWidth: 44,
99
- height: 44,
100
- padding: 0,
101
- width: 44,
102
- "&.mx-cmn-range-start": {
103
- borderTopRightRadius: 0,
104
- borderBottomRightRadius: 0,
105
- "&:focus": {
106
- boxShadow: "none"
107
- }
108
- },
109
- "&.mx-cmn-range-end": {
110
- borderTopLeftRadius: 0,
111
- borderBottomLeftRadius: 0,
112
- "&:focus": {
113
- boxShadow: "none"
114
- }
115
- }
116
- },
117
- "& .mx-cmn-calendar-day-text": {
118
- "&.mx-cmn-day-selected": {
119
- color: n.palette.primary,
120
- "&.mx-cmn-day-selected": {
121
- borderColor: n.palette.common.white
122
- }
123
- },
124
- "&.mx-cmn-today": {
125
- borderBottom: `solid 2px ${n.palette.primary.main}`,
126
- marginBottom: -6,
127
- paddingBottom: 5
128
- }
129
- }
130
- }), sn = 340, I = 44;
131
- var Tn = /* @__PURE__ */ ((n) => (n.None = "None", n.Single = "Single", n.Range = "Range", n))(Tn || {});
132
- const ln = ({
133
- copy: n,
134
- beginDate: a = void 0,
135
- endDate: o = void 0,
136
- onDateSelected: r,
137
- onRangeSelected: c,
138
- selectionType: l = "Single"
139
- /* Single */
140
- }) => {
141
- const S = v(), g = Cn(S), [s, N] = A.useState(f), [i, C] = A.useState(a), [R, m] = A.useState(o);
142
- A.useEffect(() => {
143
- C(a), m(o), a && N(a);
144
- }, [a, o]);
145
- const D = A.useMemo(() => {
146
- const t = $({ start: V(s), end: U(s) }), _ = [];
147
- for (let d = 0; d < t.length; d++) {
148
- const O = t[d], u = P({ start: O, end: b(O, 6) }), x = [];
149
- for (let L = 0; L < u.length; L++)
150
- x.push(u[L]);
151
- _.push(x);
152
- }
153
- return _;
154
- }, [s]), K = (t) => {
155
- if (l !== "None") {
156
- if (l === "Single") {
157
- C(t), r?.(t);
158
- return;
159
- }
160
- !i || R ? (C(t), m(void 0)) : j(t, i) ? (m(i), C(t), c?.(t, i)) : (m(t), c?.(i, t));
161
- }
162
- }, M = () => {
163
- const t = f();
164
- N(t), l !== "None" && (C(t), l === "Single" ? r?.(t) : (m(t), c?.(t, t)));
165
- }, w = () => {
166
- N(B(s, 1));
167
- }, H = () => {
168
- N(F(s, 1));
169
- };
170
- return /* @__PURE__ */ e("div", { className: `mx-cmn-calendar ${g}`, children: /* @__PURE__ */ h(Y, { sx: { boxShadow: "none" }, children: [
171
- /* @__PURE__ */ e(
172
- on,
173
- {
174
- copy: n,
175
- date: s,
176
- onNextClick: w,
177
- onPreviousClick: H
178
- }
179
- ),
180
- /* @__PURE__ */ e("div", { className: "mx-cmn-calendar-header-row", children: D[0].map((t, _) => /* @__PURE__ */ e("div", { className: "mx-cmn-calendar-header-cell", children: /* @__PURE__ */ e(G, { bold: !0, variant: "Small", children: y(t, "EEEEE") }) }, _)) }),
181
- D.map((t, _) => /* @__PURE__ */ e("div", { className: "mx-cmn-calendar-week", children: t.map((d, O) => /* @__PURE__ */ e(
182
- rn,
183
- {
184
- beginDate: i,
185
- date: d,
186
- endDate: R,
187
- isInMonth: W(d, s),
188
- onClick: K
189
- },
190
- O
191
- )) }, `w-${_}`)),
192
- /* @__PURE__ */ e("div", { className: "mx-cmn-calendar-today-container", children: /* @__PURE__ */ e(E, { onClick: M, size: "small", variant: "text", children: n.today }) })
193
- ] }) });
194
- }, Cn = (n) => p({
195
- width: sn,
196
- "& .MuiPaper-root": {
197
- paddingLeft: 24,
198
- paddingRight: 24,
199
- paddingTop: 4,
200
- paddingBottom: 4
201
- },
202
- "& .mx-cmn-calendar-header-row": {
203
- display: "flex",
204
- justifyContent: "center",
205
- textAlign: "center",
206
- "& .mx-cmn-calendar-header-cell": {
207
- height: I,
208
- width: I,
209
- minWidth: I,
210
- "& .kmui-text": {
211
- alignItems: "center",
212
- display: "flex",
213
- height: "100%",
214
- justifyContent: "center",
215
- width: "100%"
216
- }
217
- }
218
- },
219
- "& .mx-cmn-calendar-week": {
220
- display: "flex",
221
- justifyContent: "center",
222
- textAlign: "center"
223
- },
224
- "& .mx-cmn-calendar-today-container": {
225
- display: "block",
226
- marginTop: n.Spacing.Medium,
227
- textAlign: "center",
228
- width: "100%",
229
- "& > .MuiButton-root": {
230
- display: "inline-block",
231
- marginLeft: "auto",
232
- marginRight: "auto"
233
- }
234
- }
235
- }), Bn = ln, Pn = ({
236
- children: n,
237
- clickEventName: a,
238
- onClick: o,
239
- sx: r = {}
240
- }) => {
241
- const { onEvent: c } = tn();
242
- return o ? /* @__PURE__ */ e(k, { sx: { bgcolor: "background.paper", ...r }, children: /* @__PURE__ */ e(
243
- an,
244
- {
245
- onClick: () => {
246
- a && c(a), o();
247
- },
248
- children: n
249
- }
250
- ) }) : /* @__PURE__ */ e(
251
- k,
252
- {
253
- disableGutters: !1,
254
- disablePadding: !1,
255
- sx: { bgcolor: "background.paper", ...r },
256
- children: n
257
- }
258
- );
259
- }, $n = {
260
- ON_TRANSACTION_CATEGORY_CLICK: "onTransactionCategoryClick",
261
- ON_TRANSACTION_CATEGORY_CHANGED: "onTransactionCategoryChanged",
262
- ON_TRANSACTION_MANUAL_ADD_CLICK: "onTransactionManualAddClick",
263
- ON_TRANSACTION_MANUAL_ADD_ADDED: "onTransactionManualAddAdded",
264
- ON_TRANSACTION_DATE_CHANGED: "onTransactionDateChanged",
265
- ON_TRANSACTION_DATE_CLICK: "onTransactionDateClick",
266
- ON_TRANSACTION_DELETE_CANCEL: "onTransactionDeleteCancel",
267
- ON_TRANSACTION_DELETE_CLICK: "onTransactionDeleteClick",
268
- ON_TRANSACTION_DELETE_DELETED: "onTransactionDeleted",
269
- ON_TRANSACTION_DELETE_LOGO_CANCEL: "onTransactionDeleteLogoCancel",
270
- ON_TRANSACTION_DELETE_LOGO_CLICK: "onTransactionDeleteLogoClick",
271
- ON_TRANSACTION_DELETE_LOGO_DELETED: "onTransactionDeletedLogo",
272
- ON_TRANSACTION_DESCRIPTION_EDIT_CLICK: "onTransactionDescriptionEditClick",
273
- ON_TRANSACTION_DESCRIPTION_SAVE_CLICK: "onTransactionDescriptionSaveClick",
274
- ON_TRANSACTION_EXPORT_CSV_CLICK: "onTransactionExportCsvClick",
275
- ON_TRANSACTION_HIDDEN: "onTransactionHidden",
276
- ON_TRANSACTION_HIDE_CLICK: "onTransactionHideClick",
277
- ON_TRANSACTION_HIDE_CANCEL_CLICK: "onTransactionHideCancelClick",
278
- ON_TRANSACTION_LIST_ITEM_CLICK: "onTransactionListItemClick",
279
- ON_TRANSACTION_MEMO_CHANGED: "onTransactionMemoChanged",
280
- ON_TRANSACTION_MEMO_CLICK: "onTransactionMemoClick",
281
- ON_TRANSACTION_SPLIT_ADD_CLICK: "onTransactionSplitAddClick",
282
- ON_TRANSACTION_SPLIT_CANCEL_CLICK: "onTransactionSplitCancelClick",
283
- ON_TRANSACTION_SPLIT_CATEGORY_CLICK: "onTransactionSplitCategoryClick",
284
- ON_TRANSACTION_SPLIT_CLICK: "onTransactionSplitClick",
285
- ON_TRANSACTION_SPLIT_DELETE_CLICK: "onTransactionSplitDeleteClick",
286
- ON_TRANSACTION_SPLIT_SAVE_CLICK: "onTransactionSplitSaveClick",
287
- ON_TRANSACTION_TAGS_CHANGED: "onTransactionTagsChanged",
288
- ON_TRANSACTION_TAGS_CLICK: "onTransactionTagsClick",
289
- ON_TRANSACTION_TAGS_TAG_ADD_CANCEL_CLICK: "onTransactionTagsTagAddCancelClick",
290
- ON_TRANSACTION_TAGS_TAG_ADD_CLICK: "onTransactionTagsTagAddClick",
291
- ON_TRANSACTION_TAGS_TAG_ADDED: "onTransactionTagsTagAdded",
292
- ON_TRANSACTION_TAGS_TAG_DELETE_CLICK: "onTransactionTagsTagDeleteClick",
293
- ON_TRANSACTION_TAGS_TAG_DELETE_CANCEL_CLICK: "onTransactionTagsTagDeleteCancelClick",
294
- ON_TRANSACTION_TAGS_TAG_DELETED: "onTransactionTagsTagDeleted",
295
- ON_TRANSACTION_TAGS_TAG_EDIT_CLICK: "onTransactionTagsTagEditClick",
296
- ON_TRANSACTION_TAGS_TAG_EDIT_SAVED: "onTransactionTagsTagEditSavedClick",
297
- ON_TRANSACTION_TOGGLE_FLAG_CLICK: "onTransactionToggleFlagClick",
298
- ON_TRANSACTION_UNHIDDEN: "onTransactionUnHidden",
299
- ON_TRANSACTION_UNHIDE_CLICK: "onTransactionUnHideClick",
300
- ON_TRANSACTION_UNHIDE_CANCEL_CLICK: "onTransactionUnHideCancelClick",
301
- ON_TRANSACTION_UNSPLIT: "onTransactionUnsplit",
302
- ON_TRANSACTION_UNSPLIT_CANCEL: "onTransactionUnsplitCancel"
303
- };
304
- var Nn = /* @__PURE__ */ ((n) => (n[n.CREDIT = 1] = "CREDIT", n[n.DEBIT = 2] = "DEBIT", n))(Nn || {}), _n = /* @__PURE__ */ ((n) => (n[n.POSTED = 1] = "POSTED", n[n.PENDING = 2] = "PENDING", n))(_n || {});
305
- const Un = (n, a) => !!n.find((o) => o.feature_name === a)?.is_enabled;
306
- export {
307
- Bn as C,
308
- Pn as L,
309
- $n as O,
310
- Nn as T,
311
- _n as a,
312
- Tn as b,
313
- Un as i
314
- };