@mx-cartographer/experiences 6.26.33-alpha.mm0 → 7.0.0-alpha.mega1

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 (104) hide show
  1. package/CHANGELOG.md +2 -3
  2. package/dist/Account-DY6nxO7y.mjs +30 -0
  3. package/dist/AccountDetailsContent-DvPs81kL.mjs +677 -0
  4. package/dist/AccountDetailsHeader-W2U7ZVm_.mjs +119 -0
  5. package/dist/AccountFields-DAVcbZy5.mjs +135 -0
  6. package/dist/AccountListItem-DFlbdcmT.mjs +90 -0
  7. package/dist/AccountStore-CU7qV3vg.mjs +230 -0
  8. package/dist/Accounts-BLlrQA5m.mjs +9 -0
  9. package/dist/BeatApi-DLu87ijw.mjs +21 -0
  10. package/dist/BeatStore-By4aGoRM.mjs +81 -0
  11. package/dist/BudgetUtil-Ci1TN0J5.mjs +101 -0
  12. package/dist/CashflowStore-D9Dpuz7X.mjs +91 -0
  13. package/dist/Category-5S6uwuXz.mjs +301 -0
  14. package/dist/CategorySelectorDrawer-rHyHHYuh.mjs +397 -0
  15. package/dist/CategoryStore-B5EW6I1d.mjs +183 -0
  16. package/dist/CategoryUtil-DRyruNgi.mjs +78 -0
  17. package/dist/ConnectDrawer-D9cR5phc.mjs +508 -0
  18. package/dist/ConnectionsDrawer-BzGqljSp.mjs +52 -0
  19. package/dist/CurrencyInput-D74cemI2.mjs +83 -0
  20. package/dist/CurrencyText-YUhH2caW.mjs +20 -0
  21. package/dist/DateUtil-BcuH7ErC.mjs +48 -0
  22. package/dist/DebtsStore-S0l9kr0r.mjs +60 -0
  23. package/dist/Dialog-CWW597AF.mjs +123 -0
  24. package/dist/Donut-1UMNcG67.mjs +57 -0
  25. package/dist/Drawer-kEE73B87.mjs +113 -0
  26. package/dist/EmptyState-Dcb-o2tl.mjs +55 -0
  27. package/dist/Fetch-CkFKy79O.mjs +116 -0
  28. package/dist/FinstrongStore-mkALvztw.mjs +101 -0
  29. package/dist/GoalStore-DioeeL-s.mjs +263 -0
  30. package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
  31. package/dist/Help-DhcC-C05.mjs +320 -0
  32. package/dist/Help-DpYRO8oA.mjs +3181 -0
  33. package/dist/IconBacking-B9oC6uL2.mjs +39 -0
  34. package/dist/InvestmentUtil-jOyOgzIB.mjs +134 -0
  35. package/dist/LineChart-CcyX38kK.mjs +499 -0
  36. package/dist/ListItemAction-BabpYivr.mjs +69 -0
  37. package/dist/Loader-Dp1P2gNw.mjs +14 -0
  38. package/dist/Localization-2MODESHW.mjs +30 -0
  39. package/dist/ManageIncome-ndMuhJMG.mjs +535 -0
  40. package/dist/MerchantStore-DVH-QOf0.mjs +37 -0
  41. package/dist/MicroWidgetContainer-CsvHLYKX.mjs +45 -0
  42. package/dist/MiniWidgetContainer-BoOp-A05.mjs +39 -0
  43. package/dist/NetWorthStore-PD-RUe09.mjs +150 -0
  44. package/dist/Notification-AMGWM1Al.mjs +78 -0
  45. package/dist/NotificationSettings-VhHuMAFU.mjs +667 -0
  46. package/dist/NotificationStore-DHtSGySy.mjs +67 -0
  47. package/dist/NumberFormatting-CtWHhyBX.mjs +40 -0
  48. package/dist/OriginalBalanceAction-D39mx6uE.mjs +115 -0
  49. package/dist/RecurringSettings-D_HnMYZP.mjs +57 -0
  50. package/dist/RecurringTransactionsStore-BKLD3OWo.mjs +263 -0
  51. package/dist/RepeatingTransaction-BPWfaB3f.mjs +282 -0
  52. package/dist/SearchBox-B2_zLv8-.mjs +42 -0
  53. package/dist/SettingsStore-CE7jDVFL.mjs +265 -0
  54. package/dist/SingleSegmentDonut-BgbLgwHi.mjs +69 -0
  55. package/dist/SpendingData-BkrxzHdr.mjs +55 -0
  56. package/dist/StatusBar-BK_uYHAB.mjs +30 -0
  57. package/dist/TabContentContainer-j01JYR_7.mjs +21 -0
  58. package/dist/Transaction-CA0FW2Ij.mjs +312 -0
  59. package/dist/TransactionApi-DbbcjI2L.mjs +86 -0
  60. package/dist/TransactionDetails-WBHFmbxL.mjs +1283 -0
  61. package/dist/TransactionStore-CeLdmVnC.mjs +669 -0
  62. package/dist/TrendsStore-BHJUapXF.mjs +487 -0
  63. package/dist/ViewMoreMicroCard-CAPFNz-J.mjs +1959 -0
  64. package/dist/WidgetContainer-DWCusxYI.mjs +556 -0
  65. package/dist/accounts/index.es.js +752 -0
  66. package/dist/analytics/index.es.js +171 -0
  67. package/dist/budgets/index.es.js +1075 -0
  68. package/dist/cashflow/index.es.js +1098 -0
  69. package/dist/categories/index.es.js +9 -0
  70. package/dist/common/components/WidgetContainer.d.ts +1 -1
  71. package/dist/common/components/charts/LineChart.d.ts +0 -1
  72. package/dist/common/constants/Analytics.d.ts +10 -20
  73. package/dist/common/context/hooks.d.ts +13 -13
  74. package/dist/common/index.es.js +1451 -0
  75. package/dist/dashboard/index.es.js +181 -0
  76. package/dist/debts/index.es.js +1460 -0
  77. package/dist/exportTransactionsToCSV-CmwsKl2D.mjs +47 -0
  78. package/dist/finstrong/index.es.js +1455 -0
  79. package/dist/goals/index.es.js +1209 -0
  80. package/dist/help/components/content/section/index.d.ts +15 -15
  81. package/dist/help/index.es.js +14 -0
  82. package/dist/hooks-30y_BLwc.mjs +71 -0
  83. package/dist/index.d.ts +0 -22
  84. package/dist/insights/index.d.ts +1 -0
  85. package/dist/insights/index.es.js +4 -0
  86. package/dist/investments/index.es.js +1638 -0
  87. package/dist/merchants/index.es.js +79 -0
  88. package/dist/microinsights/components/carouselheader/CarouselHeader.d.ts +0 -1
  89. package/dist/microinsights/components/microBeatCarousel/MicroBeatCarousel.d.ts +0 -1
  90. package/dist/microinsights/index.es.js +16 -0
  91. package/dist/networth/index.es.js +576 -0
  92. package/dist/notifications/index.es.js +192 -0
  93. package/dist/recurringtransactions/index.es.js +879 -0
  94. package/dist/settings/index.es.js +879 -0
  95. package/dist/spending/index.es.js +570 -0
  96. package/dist/transactions/index.es.js +587 -0
  97. package/dist/trends/index.es.js +1086 -0
  98. package/dist/useCombineEvents-DaDBSR_1.mjs +92 -0
  99. package/dist/useDimensions-27p2evRx.mjs +36 -0
  100. package/dist/useScreenSize-B6JyS_Lj.mjs +36 -0
  101. package/package.json +155 -3
  102. package/dist/index.es.js +0 -30564
  103. package/dist/index.es.js.map +0 -1
  104. package/dist/trends/constants/TrendsWidget.d.ts +0 -3
@@ -0,0 +1,92 @@
1
+ import { getUnixTime as l } from "date-fns/getUnixTime";
2
+ import A from "bowser";
3
+ import { F as u, A as r } from "./Fetch-CkFKy79O.mjs";
4
+ import y from "react";
5
+ const d = async (o, t, n = "1.0.0", a = "Experiences") => {
6
+ const i = new _(o, t), { analytics_session: s } = await i.initializeAnalyticsSession(
7
+ n,
8
+ a
9
+ ), e = window.location.hostname;
10
+ return {
11
+ sendAnalyticEvent: async (c) => await i.sendAnalyticEvent({
12
+ analytics_event: {
13
+ ...c,
14
+ app_version: "widgets-v2",
15
+ created_at: l(/* @__PURE__ */ new Date()).toString(),
16
+ host: e,
17
+ name: c?.label || "",
18
+ session_id: s.guid,
19
+ user_agent: navigator.userAgent || "",
20
+ version: 2
21
+ }
22
+ }),
23
+ sendAnalyticsPageview: async (c) => await i.sendAnalyticsPageview({
24
+ analytics_pageview: {
25
+ ...c,
26
+ app_version: "widgets-v2",
27
+ created_at: l(/* @__PURE__ */ new Date()).toString(),
28
+ host: e,
29
+ name: c.name,
30
+ session_id: s.guid,
31
+ user_agent: navigator.userAgent || ""
32
+ }
33
+ })
34
+ };
35
+ };
36
+ class _ {
37
+ fetchInstance;
38
+ constructor(t, n) {
39
+ this.fetchInstance = new u(t, n);
40
+ }
41
+ initializeAnalyticsSession = async (t, n) => {
42
+ const a = A.getParser(window.navigator.userAgent), { analytics_session: i } = await this.fetchInstance.post(r.ANALYTICS_SESSION, {
43
+ browser_name: a.getBrowserName() || "Unknown",
44
+ browser_version: a.getBrowserVersion() || "0.0.0",
45
+ is_first_visit: !1,
46
+ product_name: "Individual Widget",
47
+ product_version: t
48
+ });
49
+ return i ? (this.fetchInstance.post(r.ANALYTICS_FEATURE_VISITS, {
50
+ feature_visit: {
51
+ analytics_session_guid: i.guid,
52
+ feature_name: n || "Experiences",
53
+ is_first_visit: i.is_first_visit
54
+ }
55
+ }), { analytics_session: i }) : { analytics_session: null };
56
+ };
57
+ sendAnalyticEvent = async (t) => this.fetchInstance.post(r.ANALYTICS_EVENTS, t).catch((n) => {
58
+ throw n;
59
+ });
60
+ sendAnalyticsPageview = async (t) => this.fetchInstance.post(r.ANALYTICS_PAGEVIEWS, t).catch((n) => {
61
+ throw n;
62
+ });
63
+ }
64
+ class h {
65
+ fetchInstance;
66
+ constructor(t, n) {
67
+ this.fetchInstance = new u(t, n);
68
+ }
69
+ getGlobalCopy = async (t, n) => this.fetchInstance.post(`${r.LOCALIZED_CONTENT}/${t}`, { translation_key: n }).then((a) => a);
70
+ }
71
+ const p = (o, t) => {
72
+ const { session: n } = t, a = Object.values(t).reduce((s, e) => n && e?.onAnalyticEvent && typeof e?.onAnalyticEvent == "function" ? [...s, e.onAnalyticEvent] : s, []), i = [...o, ...a];
73
+ return y.useMemo(() => (s) => {
74
+ i.forEach((e) => {
75
+ n ? e(s, n) : e(s);
76
+ });
77
+ }, [o, n]);
78
+ }, E = (o, t) => {
79
+ const { session: n } = t, a = Object.values(t).reduce((s, e) => n && e?.onAnalyticPageView && typeof e?.onAnalyticPageView == "function" ? [...s, e.onAnalyticPageView] : s, []), i = [...o, ...a];
80
+ return y.useMemo(() => (s) => {
81
+ i.forEach((e) => {
82
+ n ? e(s, n) : e(s);
83
+ });
84
+ }, [o, n]);
85
+ };
86
+ export {
87
+ _ as A,
88
+ h as G,
89
+ d as a,
90
+ E as b,
91
+ p as u
92
+ };
@@ -0,0 +1,36 @@
1
+ import t from "react";
2
+ const d = (i, s) => t.useMemo(() => {
3
+ let o = null;
4
+ return (...e) => {
5
+ o && clearTimeout(o), o = setTimeout(() => {
6
+ i(...e);
7
+ }, s);
8
+ };
9
+ }, [i, s]);
10
+ function R(i = 100) {
11
+ const [s, o] = t.useState({
12
+ width: 0,
13
+ height: 0
14
+ }), e = t.useRef(null), u = t.useRef(s), f = d((n, r) => {
15
+ (n !== u.current.width || r !== u.current.height) && (o({ width: n, height: r }), u.current = { width: n, height: r });
16
+ }, i), m = t.useCallback(
17
+ (n) => {
18
+ if (e.current && (e.current.disconnect(), e.current = null), n?.nodeType === Node.ELEMENT_NODE) {
19
+ const r = new ResizeObserver(([c]) => {
20
+ if (c && c.borderBoxSize) {
21
+ const { inlineSize: l, blockSize: b } = c.borderBoxSize[0];
22
+ f(l, b);
23
+ }
24
+ });
25
+ r.observe(n), e.current = r;
26
+ }
27
+ },
28
+ [f]
29
+ );
30
+ return t.useEffect(() => () => {
31
+ e.current && e.current.disconnect();
32
+ }, []), [m, s];
33
+ }
34
+ export {
35
+ R as u
36
+ };
@@ -0,0 +1,36 @@
1
+ import k from "@mui/material/styles/useTheme";
2
+ import o from "@mui/material/useMediaQuery";
3
+ const l = (s) => {
4
+ const e = k(), { xs: n, sm: r, md: p, lg: t, xl: i } = e.breakpoints.values;
5
+ let m = {
6
+ // Larger than 1536
7
+ isLargeDesktop: o(e.breakpoints.up("xl")),
8
+ // Larger than 1200
9
+ isDesktop: o(e.breakpoints.up("lg")),
10
+ // Smaller than 600
11
+ isMobile: o(e.breakpoints.down("sm")),
12
+ // Smaller than 444
13
+ isSmallMobile: o(e.breakpoints.down("xs")),
14
+ // Between 600 and 900
15
+ isSmallTablet: o(e.breakpoints.between("sm", "md")),
16
+ // Between 600 and 1200
17
+ isTablet: o(e.breakpoints.between("sm", "lg"))
18
+ };
19
+ return s && (m = {
20
+ // Larger than 1536
21
+ isLargeDesktop: s > i,
22
+ // Larger than 1200
23
+ isDesktop: s > t,
24
+ // Smaller than 600
25
+ isMobile: s < r,
26
+ // Smaller than 444
27
+ isSmallMobile: s < n,
28
+ // Between 600 and 900
29
+ isSmallTablet: s >= r && s <= p,
30
+ // Between 600 and 1200
31
+ isTablet: s > r && s <= t
32
+ }), m;
33
+ };
34
+ export {
35
+ l as u
36
+ };
package/package.json CHANGED
@@ -1,14 +1,166 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "6.26.33-alpha.mm0",
3
+ "version": "7.0.0-alpha.mega1",
4
4
  "description": "Library containing experience widgets",
5
- "main": "dist/index.es.js",
6
- "types": "dist/index.d.ts",
7
5
  "author": "MX",
8
6
  "license": "MIT",
9
7
  "publishConfig": {
10
8
  "access": "public"
11
9
  },
10
+ "sideEffects": false,
11
+ "exports": {
12
+ "./accounts": {
13
+ "import": "./dist/accounts/index.es.js",
14
+ "types": "./dist/accounts/index.d.ts"
15
+ },
16
+ "./analytics": {
17
+ "import": "./dist/analytics/index.es.js",
18
+ "types": "./dist/analytics/index.d.ts"
19
+ },
20
+ "./budgets": {
21
+ "import": "./dist/budgets/index.es.js",
22
+ "types": "./dist/budgets/index.d.ts"
23
+ },
24
+ "./cashflow": {
25
+ "import": "./dist/cashflow/index.es.js",
26
+ "types": "./dist/cashflow/index.d.ts"
27
+ },
28
+ "./categories": {
29
+ "import": "./dist/categories/index.es.js",
30
+ "types": "./dist/categories/index.d.ts"
31
+ },
32
+ "./common": {
33
+ "import": "./dist/common/index.es.js",
34
+ "types": "./dist/common/index.d.ts"
35
+ },
36
+ "./dashboard": {
37
+ "import": "./dist/dashboard/index.es.js",
38
+ "types": "./dist/dashboard/index.d.ts"
39
+ },
40
+ "./debts": {
41
+ "import": "./dist/debts/index.es.js",
42
+ "types": "./dist/debts/index.d.ts"
43
+ },
44
+ "./finstrong": {
45
+ "import": "./dist/finstrong/index.es.js",
46
+ "types": "./dist/finstrong/index.d.ts"
47
+ },
48
+ "./goals": {
49
+ "import": "./dist/goals/index.es.js",
50
+ "types": "./dist/goals/index.d.ts"
51
+ },
52
+ "./help": {
53
+ "import": "./dist/help/index.es.js",
54
+ "types": "./dist/help/index.d.ts"
55
+ },
56
+ "./investments": {
57
+ "import": "./dist/investments/index.es.js",
58
+ "types": "./dist/investments/index.d.ts"
59
+ },
60
+ "./merchants": {
61
+ "import": "./dist/merchants/index.es.js",
62
+ "types": "./dist/merchants/index.d.ts"
63
+ },
64
+ "./microinsights": {
65
+ "import": "./dist/microinsights/index.es.js",
66
+ "types": "./dist/microinsights/index.d.ts"
67
+ },
68
+ "./networth": {
69
+ "import": "./dist/networth/index.es.js",
70
+ "types": "./dist/networth/index.d.ts"
71
+ },
72
+ "./notifications": {
73
+ "import": "./dist/notifications/index.es.js",
74
+ "types": "./dist/notifications/index.d.ts"
75
+ },
76
+ "./recurringtransactions": {
77
+ "import": "./dist/recurringtransactions/index.es.js",
78
+ "types": "./dist/recurringtransactions/index.d.ts"
79
+ },
80
+ "./spending": {
81
+ "import": "./dist/spending/index.es.js",
82
+ "types": "./dist/spending/index.d.ts"
83
+ },
84
+ "./settings": {
85
+ "import": "./dist/settings/index.es.js",
86
+ "types": "./dist/settings/index.d.ts"
87
+ },
88
+ "./transactions": {
89
+ "import": "./dist/transactions/index.es.js",
90
+ "types": "./dist/transactions/index.d.ts"
91
+ },
92
+ "./trends": {
93
+ "import": "./dist/trends/index.es.js",
94
+ "types": "./dist/trends/index.d.ts"
95
+ }
96
+ },
97
+ "typesVersions": {
98
+ "*": {
99
+ "accounts": [
100
+ "./dist/accounts/index.d.ts"
101
+ ],
102
+ "analytics": [
103
+ "./dist/analytics/index.d.ts"
104
+ ],
105
+ "budgets": [
106
+ "./dist/budgets/index.d.ts"
107
+ ],
108
+ "cashflow": [
109
+ "./dist/cashflow/index.d.ts"
110
+ ],
111
+ "categories": [
112
+ "./dist/categories/index.d.ts"
113
+ ],
114
+ "common": [
115
+ "./dist/common/index.d.ts"
116
+ ],
117
+ "dashboard": [
118
+ "./dist/dashboard/index.d.ts"
119
+ ],
120
+ "debts": [
121
+ "./dist/debts/index.d.ts"
122
+ ],
123
+ "finstrong": [
124
+ "./dist/finstrong/index.d.ts"
125
+ ],
126
+ "goals": [
127
+ "./dist/goals/index.d.ts"
128
+ ],
129
+ "help": [
130
+ "./dist/help/index.d.ts"
131
+ ],
132
+ "investments": [
133
+ "./dist/investments/index.d.ts"
134
+ ],
135
+ "merchants": [
136
+ "./dist/merchants/index.d.ts"
137
+ ],
138
+ "microinsights": [
139
+ "./dist/microinsights/index.d.ts"
140
+ ],
141
+ "networth": [
142
+ "./dist/networth/index.d.ts"
143
+ ],
144
+ "notifications": [
145
+ "./dist/notifications/index.d.ts"
146
+ ],
147
+ "recurringtransactions": [
148
+ "./dist/recurringtransactions/index.d.ts"
149
+ ],
150
+ "spending": [
151
+ "./dist/spending/index.d.ts"
152
+ ],
153
+ "settings": [
154
+ "./dist/settings/index.d.ts"
155
+ ],
156
+ "transactions": [
157
+ "./dist/transactions/index.d.ts"
158
+ ],
159
+ "trends": [
160
+ "./dist/trends/index.d.ts"
161
+ ]
162
+ }
163
+ },
12
164
  "scripts": {
13
165
  "build": "tsc && vite build",
14
166
  "build-storybook": "storybook build -o compiled_docs",