@mx-cartographer/experiences 8.0.0-alpha.test2 → 8.0.0-alpha.v2

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 (513) hide show
  1. package/CHANGELOG.md +335 -0
  2. package/README.md +5 -3
  3. package/dist/{Account-CMjOp7S2.mjs → Account-BiB1F8lL.mjs} +2 -2
  4. package/dist/{Account-BIKn4XEZ.mjs → Account-DuOz1a27.mjs} +1 -1
  5. package/dist/{AccountApi-DgZ8ILj1.mjs → AccountApi-ChQr5PAZ.mjs} +1 -1
  6. package/dist/AccountDetailsHeader-D9gbTbUt.mjs +95 -0
  7. package/dist/{AccountFields-DuFtmuud.mjs → AccountFields-CxqONzjY.mjs} +12 -12
  8. package/dist/AccountListItem-D9WJDbZ1.mjs +94 -0
  9. package/dist/{AccountStore-Cq_w2Hfb.mjs → AccountStore-DpYvNnql.mjs} +15 -9
  10. package/dist/Accounts-CseLC3lL.mjs +5 -0
  11. package/dist/Accounts-o7ohkngR.mjs +27 -0
  12. package/dist/{Analytics-i5h6BxR1.mjs → Analytics-BYItVAe-.mjs} +10 -0
  13. package/dist/{BeatApi-De2IaqH2.mjs → BeatApi-EFHXULDx.mjs} +1 -1
  14. package/dist/{BeatStore-D_NYuBSz.mjs → BeatStore-C6CAT-ce.mjs} +1 -1
  15. package/dist/BudgetUtil-CLhRnCoX.mjs +479 -0
  16. package/dist/CashflowStore-CeAzChyD.mjs +91 -0
  17. package/dist/{Category-Ccoew_sA.mjs → Category-CevNQ03n.mjs} +2 -2
  18. package/dist/{CategorySelectorDrawer-CzRxYpiP.mjs → CategorySelectorDrawer-Dc9Widy9.mjs} +118 -110
  19. package/dist/{CategoryStore-V-0d9oje.mjs → CategoryStore-FTxUbn0f.mjs} +3 -3
  20. package/dist/{CategoryUtil-DB-9JMbi.mjs → CategoryUtil-BVixr0d5.mjs} +4 -4
  21. package/dist/Connect-eYIWqCEr.mjs +39 -0
  22. package/dist/ConnectDrawer-C0wjwcJt.mjs +58 -0
  23. package/dist/{ConnectionsDrawer-DMBBzlIJ.mjs → ConnectionsDrawer-IA7vnv1J.mjs} +10 -9
  24. package/dist/CurrencyInput-DuMktPu3.mjs +85 -0
  25. package/dist/{CurrencyText-C-85TnUF.mjs → CurrencyText-CA-E5N_y.mjs} +1 -1
  26. package/dist/{DateFormats-Cs-NbEZ7.mjs → DateFormats-BMpMrZpW.mjs} +1 -1
  27. package/dist/{DateUtil-CVXVMbjf.mjs → DateUtil-wcYTmDRD.mjs} +1 -1
  28. package/dist/{DebtsStore-Dv_T7Dts.mjs → DebtsStore-BZqNLaqd.mjs} +3 -3
  29. package/dist/Dialog-Ck34yr-d.mjs +63 -0
  30. package/dist/{Donut-DKY8mL3P.mjs → Donut-CpxJlVvJ.mjs} +29 -27
  31. package/dist/{Drawer-Bet2ZPJo.mjs → Drawer-Bbe4AMB1.mjs} +14 -14
  32. package/dist/{ExportCsvAction-Cc14QGA9.mjs → ExportCsvAction-ErKh7wJ2.mjs} +4 -4
  33. package/dist/{Fetch-DecPFeGU.mjs → Fetch-B6tMJC1r.mjs} +2 -1
  34. package/dist/{FinstrongStore-DW7-LvAh.mjs → FinstrongStore-BQxXxxYD.mjs} +129 -129
  35. package/dist/GlobalAccountFilter-B73Pw1hJ.mjs +237 -0
  36. package/dist/Goal-0loDagc5.mjs +6 -0
  37. package/dist/GoalStore-fgXt--2Y.mjs +418 -0
  38. package/dist/HeaderCell-P8w6CmfO.mjs +6 -0
  39. package/dist/{Help-CgpJK03Q.mjs → Help-B8mD4aLJ.mjs} +6 -6
  40. package/dist/{Help-DOPJteew.mjs → Help-D-laTbKu.mjs} +544 -493
  41. package/dist/{IconBacking-DgT8DCeh.mjs → IconBacking-B9oC6uL2.mjs} +11 -11
  42. package/dist/LineChart-EAr5ox5U.mjs +612 -0
  43. package/dist/{ListItemAction-engf-T9W.mjs → ListItemAction-4KB7P75M.mjs} +2 -2
  44. package/dist/Loader-D3rjKx72.mjs +21 -0
  45. package/dist/Localization-CPkpIwIx.mjs +37 -0
  46. package/dist/{ManageIncome-BVqHHIO7.mjs → ManageIncome-Cc-wba0I.mjs} +118 -113
  47. package/dist/{MerchantStore-WvZ4gnQe.mjs → MerchantStore-BzGi4JAZ.mjs} +1 -1
  48. package/dist/MicroWidgetContainer-B_EnfvCq.mjs +45 -0
  49. package/dist/MiniWidgetContainer-Bhkv-hpz.mjs +66 -0
  50. package/dist/{NetWorthStore-B6ziBtaH.mjs → NetWorthStore-BqZ44-4M.mjs} +5 -5
  51. package/dist/Notification-DTNYSd8P.mjs +7 -0
  52. package/dist/{NotificationSettings-CEzQSKfg.mjs → NotificationSettings-D7VqsrZy.mjs} +160 -159
  53. package/dist/{NotificationStore-Ck2KdNmT.mjs → NotificationStore-D_e8zo5M.mjs} +28 -21
  54. package/dist/{NumberFormatting-DjTD0t3W.mjs → NumberFormatting-QCaNwbjv.mjs} +1 -1
  55. package/dist/{Transaction-C8QRYhYc.mjs → OnClickEvents-CseHDZ94.mjs} +32 -25
  56. package/dist/{OriginalBalanceAction-CYqr8z8w.mjs → OriginalBalanceAction-DjpvVVFz.mjs} +10 -10
  57. package/dist/{RecurringSettings-rEotGPcM.mjs → RecurringSettings-BN9H5ALr.mjs} +4 -4
  58. package/dist/RecurringTransactions-BCJp-Nap.mjs +297 -0
  59. package/dist/{RecurringTransactionsStore-DpzLX8E8.mjs → RecurringTransactionsStore-CkMA7gY3.mjs} +11 -10
  60. package/dist/RepeatingTransaction-DF4vJn_v.mjs +7 -0
  61. package/dist/{ResponsiveButton-BNsV08Ud.mjs → ResponsiveButton-DZFp78fJ.mjs} +12 -12
  62. package/dist/SearchBox-CwDgvWVJ.mjs +48 -0
  63. package/dist/{SettingsStore-ImYpLCSK.mjs → SettingsStore-BoIoiRLj.mjs} +3 -3
  64. package/dist/{SingleSegmentDonut-PsRQPkmV.mjs → SingleSegmentDonut-BgbLgwHi.mjs} +5 -5
  65. package/dist/{SpendingData-CI_C9xln.mjs → SpendingData-Bz1bCWAs.mjs} +4 -4
  66. package/dist/SpendingLegend-BgjazduU.mjs +193 -0
  67. package/dist/{StatusBar-CPfSXe80.mjs → StatusBar-BK_uYHAB.mjs} +6 -6
  68. package/dist/StatusIndicator-4tWnjeKS.mjs +264 -0
  69. package/dist/{TabContentContainer-CnMXkVqr.mjs → TabContentContainer-j01JYR_7.mjs} +8 -8
  70. package/dist/ToggleListItem-BLu_fWA2.mjs +90 -0
  71. package/dist/Transaction-Cn5_iFm0.mjs +5 -0
  72. package/dist/{TransactionApi-CjBoLleL.mjs → TransactionApi-Ck5Ua-7F.mjs} +1 -1
  73. package/dist/TransactionDetails-D1I1XEsT.mjs +1469 -0
  74. package/dist/{TransactionStore-CEehNrKo.mjs → TransactionStore-Bx9euVrY.mjs} +195 -177
  75. package/dist/{TrendsStore-ncmbS9eE.mjs → TrendsStore-CYdTo7cN.mjs} +10 -10
  76. package/dist/ViewMoreMicroCard-D24H9kDm.mjs +1291 -0
  77. package/dist/{WidgetContainer-DFwVgavi.mjs → WidgetContainer-B7xDq2bM.mjs} +47 -46
  78. package/dist/accounts/AccountsMiniWidget.d.ts +1 -1
  79. package/dist/accounts/AccountsWidget.d.ts +1 -1
  80. package/dist/accounts/api/AccountApi.d.ts +1 -1
  81. package/dist/accounts/components/AccountListItem.d.ts +1 -1
  82. package/dist/accounts/components/AccountsListCompact.d.ts +1 -1
  83. package/dist/accounts/components/detailsdrawer/Accounts/AccountActionsRow.d.ts +1 -0
  84. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +1 -1
  85. package/dist/accounts/hooks/useGetMergeableAccounts.d.ts +1 -1
  86. package/dist/accounts/index.es.js +459 -368
  87. package/dist/accounts/stores/AccountStore.d.ts +2 -1
  88. package/dist/accounts/stores/UiStore.d.ts +1 -1
  89. package/dist/accounts/utils/AccountDetails.d.ts +1 -1
  90. package/dist/accounts/utils/AccountFields.d.ts +1 -1
  91. package/dist/accounts/utils/Accounts.d.ts +2 -2
  92. package/dist/analytics/index.es.js +93 -112
  93. package/dist/budgets/BubbleBudgetsMiniWidget.d.ts +1 -1
  94. package/dist/budgets/BubbleBudgetsWidget.d.ts +1 -1
  95. package/dist/budgets/api/BudgetsApi.d.ts +5 -1
  96. package/dist/budgets/components/BubbleChart.d.ts +1 -1
  97. package/dist/budgets/components/BudgetDetailsDrawerV2.d.ts +4 -1
  98. package/dist/budgets/components/MerchantBudgetDetailsDrawer.d.ts +17 -0
  99. package/dist/budgets/components/addbudget/RecalculateBudgetRow.d.ts +1 -1
  100. package/dist/budgets/components/addbudget/UnbudgetedRow.d.ts +1 -1
  101. package/dist/budgets/components/bubblechart/Bubble.d.ts +1 -1
  102. package/dist/budgets/components/budgetdetails/AddSubBudget.d.ts +1 -1
  103. package/dist/budgets/components/budgetdetails/BudgetDetails.d.ts +1 -1
  104. package/dist/budgets/components/budgetdetails/Header.d.ts +1 -1
  105. package/dist/budgets/components/budgetdetails/SubBudgetList.d.ts +1 -1
  106. package/dist/budgets/components/budgetlist/BudgetRow.d.ts +1 -1
  107. package/dist/budgets/components/budgetlist/SubBudgetRow.d.ts +1 -1
  108. package/dist/budgets/components/shared/BudgetDetailsTopSection.d.ts +13 -0
  109. package/dist/budgets/index.es.js +851 -865
  110. package/dist/budgets/store/BudgetsStore.d.ts +15 -1
  111. package/dist/budgets/utils/BubblesSVG.d.ts +3 -3
  112. package/dist/budgets/utils/BudgetUtil.d.ts +6 -1
  113. package/dist/cashflow/CashflowMiniWidget.d.ts +1 -1
  114. package/dist/cashflow/CashflowWidget.d.ts +1 -1
  115. package/dist/cashflow/api/CashflowApi.d.ts +1 -1
  116. package/dist/cashflow/components/DetailsExpenseRow.d.ts +1 -1
  117. package/dist/cashflow/index.es.js +290 -288
  118. package/dist/cashflow/stores/UiStore.d.ts +1 -1
  119. package/dist/cashflow/util/Filters.d.ts +1 -1
  120. package/dist/categories/components/CategoryRow.d.ts +1 -1
  121. package/dist/categories/components/CustomCategories/AddSubcategory.d.ts +1 -1
  122. package/dist/categories/components/CustomCategories/DeleteSubcategory.d.ts +1 -1
  123. package/dist/categories/components/CustomCategories/RenameSubcategory.d.ts +1 -1
  124. package/dist/categories/components/SubcategoryList.d.ts +1 -1
  125. package/dist/categories/components/SubcategoryRow.d.ts +1 -1
  126. package/dist/categories/index.es.js +2 -2
  127. package/dist/categories/stores/CategoryStore.d.ts +2 -1
  128. package/dist/categories/util/CategoryUtil.d.ts +1 -1
  129. package/dist/common/api/AnalyticsApi.d.ts +1 -1
  130. package/dist/common/api/AppDataApi.d.ts +1 -1
  131. package/dist/common/api/BeatApi.d.ts +1 -1
  132. package/dist/common/api/CategoryApi.d.ts +1 -1
  133. package/dist/common/api/GlobalCopyApi.d.ts +1 -1
  134. package/dist/common/api/LocalizedCopyApi.d.ts +1 -1
  135. package/dist/common/api/NotificationApi.d.ts +1 -1
  136. package/dist/common/api/ScheduledPaymentsApi.d.ts +1 -1
  137. package/dist/common/api/UserApi.d.ts +1 -1
  138. package/dist/common/components/CurrencyDialog.d.ts +1 -1
  139. package/dist/common/components/CurrencyInput.d.ts +1 -1
  140. package/dist/common/components/ErrorBoundary.d.ts +1 -1
  141. package/dist/common/components/GlobalAccountFilter.d.ts +1 -1
  142. package/dist/common/components/Loader.d.ts +1 -2
  143. package/dist/common/components/MiniWidgetContainer.d.ts +1 -0
  144. package/dist/common/components/WidgetContainer.d.ts +1 -1
  145. package/dist/common/components/charts/LineChart.d.ts +1 -0
  146. package/dist/common/components/charts/index.d.ts +1 -0
  147. package/dist/common/components/charts/linechart/CustomTooltip.d.ts +2 -1
  148. package/dist/common/components/charts/linechart/utils/markerShapes.d.ts +3 -0
  149. package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +1 -1
  150. package/dist/common/components/index.d.ts +0 -1
  151. package/dist/common/constants/Account.d.ts +1 -1
  152. package/dist/common/constants/Analytics.d.ts +10 -0
  153. package/dist/common/constants/ApiEndpoints.d.ts +1 -0
  154. package/dist/common/constants/DefaultConfig.d.ts +1 -1
  155. package/dist/common/constants/ScheduledPayment.d.ts +1 -10
  156. package/dist/common/constants/SpendingPlan.d.ts +0 -10
  157. package/dist/common/constants/index.d.ts +2 -2
  158. package/dist/common/context/GlobalDataProvider.d.ts +2 -1
  159. package/dist/common/context/hooks.d.ts +4 -4
  160. package/dist/common/hooks/index.d.ts +1 -0
  161. package/dist/common/hooks/useAccountDisplayName.d.ts +1 -1
  162. package/dist/common/hooks/useCombineEvents.d.ts +1 -1
  163. package/dist/common/hooks/usePrevious.d.ts +2 -0
  164. package/dist/common/index.d.ts +0 -1
  165. package/dist/common/index.es.js +625 -860
  166. package/dist/common/stores/AppDataStore.d.ts +3 -3
  167. package/dist/common/stores/GlobalCopyStore.d.ts +1 -1
  168. package/dist/common/stores/GlobalStore.d.ts +4 -2
  169. package/dist/common/stores/GlobalUiStore.d.ts +3 -3
  170. package/dist/common/stores/UserStore.d.ts +1 -1
  171. package/dist/common/utils/AccountDisplayName.d.ts +1 -1
  172. package/dist/common/utils/AccountFilter.d.ts +1 -1
  173. package/dist/common/utils/Analytics.d.ts +1 -1
  174. package/dist/common/utils/Categories.d.ts +1 -1
  175. package/dist/common/utils/Fetch.d.ts +1 -1
  176. package/dist/common/utils/Localization.d.ts +9 -1
  177. package/dist/common/utils/Theme.d.ts +3 -3
  178. package/dist/common/utils/User.d.ts +1 -1
  179. package/dist/common/utils/index.d.ts +1 -1
  180. package/dist/core/constants/index.d.ts +1 -0
  181. package/dist/core/constants/repeatingTransactions.d.ts +10 -0
  182. package/dist/core/index.d.ts +2 -0
  183. package/dist/core/index.es.js +41 -0
  184. package/dist/{common → core}/types/Analytics.d.ts +6 -3
  185. package/dist/{common → core}/types/AppData.d.ts +1 -0
  186. package/dist/{common → core}/types/Beat.d.ts +2 -0
  187. package/dist/{common → core}/types/Budget.d.ts +8 -0
  188. package/dist/{common → core}/types/Expense.d.ts +2 -1
  189. package/dist/{common → core}/types/Finstrong.d.ts +0 -2
  190. package/dist/{common → core}/types/Notification.d.ts +15 -5
  191. package/dist/{common → core}/types/index.d.ts +1 -2
  192. package/dist/{common → core}/types/localization/BudgetsCopy.d.ts +11 -0
  193. package/dist/{common → core}/types/localization/CashflowCopy.d.ts +1 -0
  194. package/dist/{common → core}/types/localization/CommonCopy.d.ts +2 -0
  195. package/dist/{common → core}/types/localization/DebtsCopy.d.ts +5 -0
  196. package/dist/{common → core}/types/localization/RecurringCopy.d.ts +2 -0
  197. package/dist/{common → core}/types/localization/SpendingCopy.d.ts +1 -0
  198. package/dist/dashboard/index.es.js +46 -45
  199. package/dist/debts/DebtsWidget.d.ts +1 -1
  200. package/dist/debts/components/actions/DebtsPriorityAction.d.ts +5 -1
  201. package/dist/debts/components/debtspaydown/PaydownButton.d.ts +2 -1
  202. package/dist/debts/components/debtspriority/DebtsPriorityButton.d.ts +2 -1
  203. package/dist/debts/index.es.js +705 -646
  204. package/dist/debts/store/DebtsStore.d.ts +2 -1
  205. package/dist/debts/utils/DebtStore.d.ts +1 -1
  206. package/dist/debts/utils/DebtsWidget.d.ts +7 -1
  207. package/dist/debts/utils/shared.d.ts +1 -1
  208. package/dist/{exportTransactionsToCSV-CGnrndmA.mjs → exportTransactionsToCSV-MCYH_zzN.mjs} +5 -5
  209. package/dist/finstrong/FinstrongWidget.d.ts +1 -1
  210. package/dist/finstrong/api/FinstrongApi.d.ts +1 -1
  211. package/dist/finstrong/components/HealthChart.d.ts +1 -1
  212. package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +1 -1
  213. package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +1 -1
  214. package/dist/finstrong/components/shared/Accounts.d.ts +1 -1
  215. package/dist/finstrong/components/shared/DoubleBarChart.d.ts +1 -0
  216. package/dist/finstrong/components/shared/ScoreHistoryTimeline.d.ts +1 -1
  217. package/dist/finstrong/components/shared/Transactions.d.ts +1 -1
  218. package/dist/finstrong/index.es.js +161 -159
  219. package/dist/finstrong/stores/FinstrongStore.d.ts +3 -2
  220. package/dist/finstrong/util/finstrongUtils.d.ts +3 -3
  221. package/dist/goals/GoalsWidget.d.ts +1 -1
  222. package/dist/goals/api/GoalApi.d.ts +2 -2
  223. package/dist/goals/components/AccountSelectionDrawer.d.ts +1 -1
  224. package/dist/goals/components/AddGoal.d.ts +1 -1
  225. package/dist/goals/components/GoalDetails.d.ts +1 -1
  226. package/dist/goals/components/GoalDetailsDrawer.d.ts +1 -1
  227. package/dist/goals/components/GoalList.d.ts +1 -1
  228. package/dist/goals/components/GoalStatusCard.d.ts +1 -1
  229. package/dist/goals/components/ManageGoals.d.ts +1 -1
  230. package/dist/goals/components/actions/AccountAction.d.ts +1 -1
  231. package/dist/goals/components/actions/AddRetirementAccountAction.d.ts +1 -1
  232. package/dist/goals/components/actions/AmountToSaveAction.d.ts +1 -1
  233. package/dist/goals/components/actions/BirthdayAction.d.ts +1 -1
  234. package/dist/goals/components/actions/ChangeAccountAction.d.ts +1 -1
  235. package/dist/goals/components/actions/ContributionAction.d.ts +1 -1
  236. package/dist/goals/components/actions/GoalNameAction.d.ts +1 -1
  237. package/dist/goals/components/actions/InterestRateAction.d.ts +1 -1
  238. package/dist/goals/components/actions/MonthlyPaymentAction.d.ts +1 -1
  239. package/dist/goals/components/actions/OriginalBalanceAction.d.ts +1 -1
  240. package/dist/goals/components/actions/RetirementAgeAction.d.ts +1 -1
  241. package/dist/goals/components/addgoal/AddGoalListItem.d.ts +1 -1
  242. package/dist/goals/components/managegoals/CompleteListItem.d.ts +1 -1
  243. package/dist/goals/components/managegoals/OngoingListItem.d.ts +1 -1
  244. package/dist/goals/components/managegoals/ReorderGoals.d.ts +1 -1
  245. package/dist/goals/components/micro/GoalMicroStatusCard.d.ts +1 -1
  246. package/dist/goals/index.es.js +445 -419
  247. package/dist/goals/stores/GoalStore.d.ts +2 -1
  248. package/dist/goals/util/GoalsUtil.d.ts +1 -1
  249. package/dist/help/HelpWidget.d.ts +1 -1
  250. package/dist/help/api/HelpApi.d.ts +1 -1
  251. package/dist/help/components/HelpContent.d.ts +1 -1
  252. package/dist/help/components/HelpList.d.ts +1 -1
  253. package/dist/help/components/content/BottomImageContent.d.ts +1 -1
  254. package/dist/help/components/content/ContentItem.d.ts +1 -1
  255. package/dist/help/components/content/LeftImageContent.d.ts +1 -1
  256. package/dist/help/components/content/NoImageContent.d.ts +1 -1
  257. package/dist/help/components/content/RightImageContent.d.ts +1 -1
  258. package/dist/help/components/content/TopImageContent.d.ts +1 -1
  259. package/dist/help/components/content/section/Accounts.d.ts +1 -1
  260. package/dist/help/components/content/section/Budgets.d.ts +1 -1
  261. package/dist/help/components/content/section/CashFlow.d.ts +1 -1
  262. package/dist/help/components/content/section/Debts.d.ts +1 -1
  263. package/dist/help/components/content/section/General.d.ts +1 -1
  264. package/dist/help/components/content/section/Goals.d.ts +1 -1
  265. package/dist/help/components/content/section/Insights.d.ts +1 -1
  266. package/dist/help/components/content/section/Investments.d.ts +1 -1
  267. package/dist/help/components/content/section/Mobile.d.ts +1 -1
  268. package/dist/help/components/content/section/NetWorth.d.ts +1 -1
  269. package/dist/help/components/content/section/Notifications.d.ts +1 -1
  270. package/dist/help/components/content/section/RecurringTransactions.d.ts +1 -1
  271. package/dist/help/components/content/section/Spending.d.ts +1 -1
  272. package/dist/help/components/content/section/Transactions.d.ts +1 -1
  273. package/dist/help/components/content/section/Trends.d.ts +1 -1
  274. package/dist/help/components/content/section/index.d.ts +15 -15
  275. package/dist/help/components/requestsupport/ContactSupport.d.ts +1 -1
  276. package/dist/help/components/requestsupport/HelpByCategoryList.d.ts +1 -1
  277. package/dist/help/components/requestsupport/MissingInstitution.d.ts +1 -1
  278. package/dist/help/components/requestsupport/PopularTopicsDrawer.d.ts +1 -1
  279. package/dist/help/components/requestsupport/PopularTopicsList.d.ts +1 -1
  280. package/dist/help/components/requestsupport/RequestSupport.d.ts +1 -1
  281. package/dist/help/components/requestsupport/RequestSupportFooter.d.ts +1 -1
  282. package/dist/help/components/requestsupport/RequestSupportInstitution.d.ts +1 -1
  283. package/dist/help/components/requestsupport/SupportSuccessMessage.d.ts +1 -1
  284. package/dist/help/index.es.js +8 -8
  285. package/dist/help/store/HelpStore.d.ts +5 -4
  286. package/dist/help/utils/getAccessibleHelpCategories.d.ts +2 -2
  287. package/dist/{hooks-CBl85iRr.mjs → hooks-BxkfR-Ff.mjs} +12 -12
  288. package/dist/insights/components/feed/Header.d.ts +8 -0
  289. package/dist/insights/components/index.d.ts +4 -0
  290. package/dist/insights/components/insights/CategoryBudget/types/CategoryBudget.d.ts +1 -0
  291. package/dist/insights/components/insights/CategorySpendingV2/types/CategorySpendingV2.d.ts +1 -0
  292. package/dist/insights/components/shared/ChartDrawerTemplate/ChartDrawerTemplate.d.ts +2 -1
  293. package/dist/insights/components/shared/ChartDrawerTemplate/TipSection.d.ts +3 -1
  294. package/dist/insights/components/shared/ChartTransactionWithDrillDown.d.ts +2 -1
  295. package/dist/insights/components/shared/DonutChartV2.d.ts +13 -0
  296. package/dist/insights/components/shared/InsightsCard/BeatCardMUI.d.ts +20 -0
  297. package/dist/insights/components/shared/InsightsCard/CardHeaderMUI.d.ts +11 -0
  298. package/dist/insights/components/shared/InsightsCard/ContentAndDescriptionMUI.d.ts +17 -0
  299. package/dist/insights/components/shared/InsightsCard/DescriptionMUI.d.ts +12 -0
  300. package/dist/insights/components/shared/InsightsCard/MiniDescriptionMUI.d.ts +9 -0
  301. package/dist/insights/components/shared/StatusIndicator.d.ts +1 -1
  302. package/dist/insights/components/shared/TransactionCard.d.ts +14 -0
  303. package/dist/insights/index.es.js +1361 -1081
  304. package/dist/insights/store/BeatStore.d.ts +1 -1
  305. package/dist/investments/InvestmentsWidget.d.ts +1 -1
  306. package/dist/investments/api/HoldingApi.d.ts +1 -1
  307. package/dist/investments/components/allocation/util/createInvestementsAllocationData.d.ts +2 -2
  308. package/dist/investments/index.es.js +258 -258
  309. package/dist/investments/stores/HoldingStore.d.ts +2 -1
  310. package/dist/investments/util/InvestmentUtil.d.ts +1 -1
  311. package/dist/merchants/api/MerchantApi.d.ts +1 -1
  312. package/dist/merchants/index.es.js +16 -16
  313. package/dist/merchants/stores/MerchantStore.d.ts +2 -1
  314. package/dist/microinsights/InsightsMicroWidget.d.ts +1 -1
  315. package/dist/microinsights/beaticons/AreaChartIcon.d.ts +3 -0
  316. package/dist/microinsights/beaticons/AverageSpendComparisonIcon.d.ts +3 -0
  317. package/dist/microinsights/beaticons/BeatMaterialIcon.d.ts +5 -1
  318. package/dist/microinsights/beaticons/InstitutionLogoIcon.d.ts +5 -0
  319. package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +0 -2
  320. package/dist/microinsights/beaticons/index.d.ts +3 -0
  321. package/dist/microinsights/cards/InsightCard.d.ts +1 -1
  322. package/dist/microinsights/carousel/BeatList.d.ts +1 -1
  323. package/dist/microinsights/carousel/CarouselHeader.d.ts +1 -1
  324. package/dist/microinsights/carousel/MicroBeatCarousel.d.ts +1 -1
  325. package/dist/microinsights/constants/Analytics.d.ts +1 -1
  326. package/dist/microinsights/context/InsightsMicroWidgetDataProvider.d.ts +1 -1
  327. package/dist/microinsights/context/hooks.d.ts +1 -1
  328. package/dist/microinsights/index.es.js +1 -1
  329. package/dist/microinsights/interfaces.d.ts +1 -1
  330. package/dist/microinsights/stores/CopyStore.d.ts +1 -1
  331. package/dist/microinsights/stores/InsightsMicroWidgetStore.d.ts +1 -1
  332. package/dist/microinsights/utils/DataSeries.d.ts +1 -1
  333. package/dist/microinsights/utils/colorType.d.ts +22 -0
  334. package/dist/networth/NetWorthWidget.d.ts +1 -1
  335. package/dist/networth/components/micro/NetworthData.d.ts +1 -1
  336. package/dist/networth/components/micro/ZeroState.d.ts +1 -1
  337. package/dist/networth/index.es.js +181 -174
  338. package/dist/networth/stores/NetWorthStore.d.ts +2 -1
  339. package/dist/networth/types/NetWorth.d.ts +1 -1
  340. package/dist/networth/utils/NetWorthUtils.d.ts +1 -1
  341. package/dist/notifications/components/NotificationBadge.d.ts +1 -1
  342. package/dist/notifications/components/NotificationCard.d.ts +1 -1
  343. package/dist/notifications/components/NotificationDrawer.d.ts +1 -1
  344. package/dist/notifications/components/NotificationList.d.ts +2 -1
  345. package/dist/notifications/index.es.js +104 -92
  346. package/dist/notifications/stores/NotificationStore.d.ts +2 -1
  347. package/dist/notifications/utils/NotificationUtils.d.ts +2 -1
  348. package/dist/recurringtransactions/RecurringTransactionsMiniWidget.d.ts +1 -1
  349. package/dist/recurringtransactions/RecurringTransactionsWidget.d.ts +1 -1
  350. package/dist/recurringtransactions/api/RepeatingTransactionsApi.d.ts +2 -1
  351. package/dist/recurringtransactions/components/PaymentSchedule.d.ts +1 -1
  352. package/dist/recurringtransactions/components/RecurrenceList.d.ts +1 -1
  353. package/dist/recurringtransactions/components/RecurrenceRow.d.ts +1 -1
  354. package/dist/recurringtransactions/components/RecurringTransactionDetails.d.ts +1 -1
  355. package/dist/recurringtransactions/components/actions/PaymentScheduleAction.d.ts +1 -1
  356. package/dist/recurringtransactions/components/micro/MerchantLogosRow.d.ts +1 -1
  357. package/dist/recurringtransactions/components/micro/OverlappingMerchantLogos.d.ts +1 -1
  358. package/dist/recurringtransactions/components/shared/recurringsettings/AddRecurringTransactionDetails.d.ts +1 -1
  359. package/dist/recurringtransactions/components/shared/recurringsettings/RecurringRow.d.ts +1 -1
  360. package/dist/recurringtransactions/index.es.js +477 -451
  361. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -1
  362. package/dist/recurringtransactions/util/RecurringTransactions.d.ts +1 -1
  363. package/dist/repeatingTransactions-DHIG94pi.mjs +4 -0
  364. package/dist/settings/NotificationSettingsWidget.d.ts +1 -1
  365. package/dist/settings/SettingsWidget.d.ts +1 -1
  366. package/dist/settings/TransactionRulesWidget.d.ts +1 -1
  367. package/dist/settings/api/SettingsApi.d.ts +1 -2
  368. package/dist/settings/components/devices/DeviceDialog.d.ts +1 -1
  369. package/dist/settings/components/devices/DeviceList.d.ts +1 -1
  370. package/dist/settings/components/devices/DeviceTable.d.ts +1 -1
  371. package/dist/settings/components/notifications/AccountNotificationProfile.d.ts +1 -1
  372. package/dist/settings/components/notifications/AccountProfileListItem.d.ts +1 -1
  373. package/dist/settings/components/notifications/NotificationProfile.d.ts +1 -1
  374. package/dist/settings/components/notifications/NotificationSettings.d.ts +1 -1
  375. package/dist/settings/components/transactionrules/actions/EditRuleAction.d.ts +1 -1
  376. package/dist/settings/index.es.js +314 -323
  377. package/dist/settings/stores/SettingsStore.d.ts +3 -2
  378. package/dist/settings/util/Notifications.d.ts +1 -1
  379. package/dist/spending/SpendingMiniWidget.d.ts +1 -1
  380. package/dist/spending/SpendingWidget.d.ts +1 -1
  381. package/dist/spending/index.es.js +167 -166
  382. package/dist/spending/utils/SpendingData.d.ts +1 -1
  383. package/dist/transactions/TransactionWidget.d.ts +1 -1
  384. package/dist/transactions/api/TransactionApi.d.ts +1 -1
  385. package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -1
  386. package/dist/transactions/components/shared/TransactionList.d.ts +1 -1
  387. package/dist/transactions/components/shared/getEmbeddedInstanceSlotByBeatTemplates.d.ts +1 -1
  388. package/dist/transactions/components/shared/transactiondetails/Description.d.ts +1 -1
  389. package/dist/transactions/components/shared/transactiondetails/FlagTransaction.d.ts +1 -1
  390. package/dist/transactions/components/shared/transactiondetails/TransactionAmountHeader.d.ts +1 -1
  391. package/dist/transactions/components/shared/transactiondetails/TransactionDetailsView.d.ts +1 -1
  392. package/dist/transactions/components/shared/transactiondetails/actions/AddMerchantBudgetAction.d.ts +13 -0
  393. package/dist/transactions/components/shared/transactiondetails/actions/CategoryAction.d.ts +1 -1
  394. package/dist/transactions/components/shared/transactiondetails/actions/DateAction.d.ts +1 -1
  395. package/dist/transactions/components/shared/transactiondetails/actions/DeleteAction.d.ts +1 -1
  396. package/dist/transactions/components/shared/transactiondetails/actions/DeleteLogoAction.d.ts +1 -1
  397. package/dist/transactions/components/shared/transactiondetails/actions/HideAction.d.ts +1 -1
  398. package/dist/transactions/components/shared/transactiondetails/actions/MemoAction.d.ts +1 -1
  399. package/dist/transactions/components/shared/transactiondetails/actions/SplitAction.d.ts +1 -1
  400. package/dist/transactions/components/shared/transactiondetails/actions/TagsAction.d.ts +1 -1
  401. package/dist/transactions/components/shared/transactiondetails/actions/index.d.ts +1 -0
  402. package/dist/transactions/components/shared/transactionlist/TransactionRow.d.ts +1 -1
  403. package/dist/transactions/components/splitmanager/SplitManager.d.ts +1 -1
  404. package/dist/transactions/components/splitmanager/SplitRow.d.ts +1 -1
  405. package/dist/transactions/components/tagmanager/TagRow.d.ts +1 -1
  406. package/dist/transactions/components/transactionwidget/actions/EditCategoryAction.d.ts +1 -1
  407. package/dist/transactions/components/transactionwidget/actions/ExportCsvAction.d.ts +1 -1
  408. package/dist/transactions/constants/Actions.d.ts +4 -3
  409. package/dist/transactions/constants/Transaction.d.ts +1 -1
  410. package/dist/transactions/index.es.js +195 -187
  411. package/dist/transactions/stores/TransactionStore.d.ts +2 -1
  412. package/dist/transactions/stores/UiStore.d.ts +1 -1
  413. package/dist/transactions/utils/Filters.d.ts +1 -1
  414. package/dist/transactions/utils/Transactions.d.ts +1 -1
  415. package/dist/transactions/utils/buildDetailedTransactions.d.ts +2 -2
  416. package/dist/transactions/utils/exportTransactionsToCSV.d.ts +1 -1
  417. package/dist/transactions/utils/sortAndFilterTransactions.d.ts +1 -1
  418. package/dist/trends/TrendsFullWidget.d.ts +1 -1
  419. package/dist/trends/TrendsMiniWidget.d.ts +1 -1
  420. package/dist/trends/TrendsWidget.d.ts +1 -1
  421. package/dist/trends/components/CategoriesList.d.ts +1 -1
  422. package/dist/trends/components/CategoriesListItem.d.ts +1 -1
  423. package/dist/trends/components/CategoryDetails.d.ts +3 -0
  424. package/dist/trends/components/TrendsChartTotals.d.ts +1 -1
  425. package/dist/trends/components/TrendsInsights.d.ts +1 -1
  426. package/dist/trends/components/trendstable/AccessibleSortIcon.d.ts +13 -0
  427. package/dist/trends/components/trendstable/TrendsTable.d.ts +1 -1
  428. package/dist/trends/index.es.js +817 -764
  429. package/dist/trends/stores/TrendsStore.d.ts +2 -1
  430. package/dist/trends/utils/SpendingData.d.ts +1 -1
  431. package/dist/trends/utils/TrendsData.d.ts +1 -1
  432. package/dist/trends/utils/TrendsTable.d.ts +1 -1
  433. package/dist/trends/utils/TrendsWidget.d.ts +7 -0
  434. package/dist/trends/utils/shared.d.ts +1 -1
  435. package/dist/{useAccountDisplayName-b2xxcD0C.mjs → useAccountDisplayName-DKwT1mWv.mjs} +1 -1
  436. package/dist/{useCombineEvents-ARuNN9Xh.mjs → useCombineEvents-Bqojlv8q.mjs} +3 -3
  437. package/dist/{useInsightsEnabled-Dd-AfsqC.mjs → useInsightsEnabled-DL_oNyI0.mjs} +1 -1
  438. package/dist/{useWidgetLoadTimer-DmNCCLa-.mjs → useWidgetLoadTimer-DgN1bTyu.mjs} +1 -1
  439. package/package.json +17 -10
  440. package/dist/AccountDetailsHeader-Bn2E0Qjk.mjs +0 -95
  441. package/dist/AccountListItem-k63LpVBs.mjs +0 -90
  442. package/dist/Accounts-CuE8aSZN.mjs +0 -27
  443. package/dist/BudgetUtil-BZiGckNY.mjs +0 -238
  444. package/dist/CashflowStore-naOtJcwo.mjs +0 -91
  445. package/dist/CurrencyInput-BEB3FS70.mjs +0 -85
  446. package/dist/Dialog-jmgGw5WA.mjs +0 -58
  447. package/dist/GlobalAccountFilter-CIF-aT3F.mjs +0 -316
  448. package/dist/GoalStore-BjHKNAVm.mjs +0 -421
  449. package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
  450. package/dist/LineChart-CnscUFUG.mjs +0 -580
  451. package/dist/Loader-icSc5MlE.mjs +0 -24
  452. package/dist/Localization-2MODESHW.mjs +0 -30
  453. package/dist/MicroWidgetContainer-CBRk9KG-.mjs +0 -45
  454. package/dist/MiniWidgetContainer-CXQcSWSl.mjs +0 -56
  455. package/dist/Notification-Bs1fdbzI.mjs +0 -95
  456. package/dist/RecurringTransactions-DlKYwpfK.mjs +0 -296
  457. package/dist/SearchBox-B2_zLv8-.mjs +0 -42
  458. package/dist/SpendingLegend-Bld71d7q.mjs +0 -193
  459. package/dist/StatusIndicator-CNMQeYyJ.mjs +0 -55
  460. package/dist/TransactionDetails-Lvt9GCU5.mjs +0 -1194
  461. package/dist/TransactionList-BDffKJMO.mjs +0 -204
  462. package/dist/User-DS18cMaz.mjs +0 -237
  463. package/dist/ViewMoreMicroCard-YHRLl08A.mjs +0 -1152
  464. package/dist/common/components/barchart/Bar.d.ts +0 -25
  465. package/dist/common/components/barchart/BarChart.d.ts +0 -34
  466. package/dist/common/components/barchart/BarColumn.d.ts +0 -37
  467. package/dist/common/components/barchart/Legend.d.ts +0 -8
  468. package/dist/common/components/barchart/Util.d.ts +0 -42
  469. package/dist/common/components/barchart/index.d.ts +0 -1
  470. package/dist/common/types/SpendingPlan.d.ts +0 -44
  471. package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +0 -7
  472. package/dist/trends/components/CategoryDetailDrawer.d.ts +0 -7
  473. /package/dist/{common → core}/types/Account.d.ts +0 -0
  474. /package/dist/{common → core}/types/Cashflow.d.ts +0 -0
  475. /package/dist/{common → core}/types/Category.d.ts +0 -0
  476. /package/dist/{common → core}/types/Client.d.ts +0 -0
  477. /package/dist/{common → core}/types/Date.d.ts +0 -0
  478. /package/dist/{common → core}/types/Debt.d.ts +0 -0
  479. /package/dist/{common → core}/types/Global.d.ts +0 -0
  480. /package/dist/{common → core}/types/GlobalCopy.d.ts +0 -0
  481. /package/dist/{common → core}/types/Goal.d.ts +0 -0
  482. /package/dist/{common → core}/types/Handlers.d.ts +0 -0
  483. /package/dist/{common → core}/types/Help.d.ts +0 -0
  484. /package/dist/{common → core}/types/Holding.d.ts +0 -0
  485. /package/dist/{common → core}/types/Institution.d.ts +0 -0
  486. /package/dist/{common → core}/types/LocalizedContent.d.ts +0 -0
  487. /package/dist/{common → core}/types/Merchant.d.ts +0 -0
  488. /package/dist/{common → core}/types/RepeatingTransaction.d.ts +0 -0
  489. /package/dist/{common → core}/types/ScheduledPayment.d.ts +0 -0
  490. /package/dist/{common → core}/types/ScreenSize.d.ts +0 -0
  491. /package/dist/{common → core}/types/Transaction.d.ts +0 -0
  492. /package/dist/{common → core}/types/User.d.ts +0 -0
  493. /package/dist/{common → core}/types/Widgets.d.ts +0 -0
  494. /package/dist/{common → core}/types/localization/AccountFilterCopy.d.ts +0 -0
  495. /package/dist/{common → core}/types/localization/AccountTypeCopy.d.ts +0 -0
  496. /package/dist/{common → core}/types/localization/AccountsCopy.d.ts +0 -0
  497. /package/dist/{common → core}/types/localization/AnalyticsCopy.d.ts +0 -0
  498. /package/dist/{common → core}/types/localization/CategoryCopy.d.ts +0 -0
  499. /package/dist/{common → core}/types/localization/ConnectCopy.d.ts +0 -0
  500. /package/dist/{common → core}/types/localization/CurrencyInputCopy.d.ts +0 -0
  501. /package/dist/{common → core}/types/localization/DateRangePickerCopy.d.ts +0 -0
  502. /package/dist/{common → core}/types/localization/FinstrongCopy.d.ts +0 -0
  503. /package/dist/{common → core}/types/localization/GoalsCopy.d.ts +0 -0
  504. /package/dist/{common → core}/types/localization/HelpCopy.d.ts +0 -0
  505. /package/dist/{common → core}/types/localization/InsightsFeedCopy.d.ts +0 -0
  506. /package/dist/{common → core}/types/localization/InvestmentsCopy.d.ts +0 -0
  507. /package/dist/{common → core}/types/localization/MicroInsightsCopy.d.ts +0 -0
  508. /package/dist/{common → core}/types/localization/NetWorthCopy.d.ts +0 -0
  509. /package/dist/{common → core}/types/localization/NotificationsCopy.d.ts +0 -0
  510. /package/dist/{common → core}/types/localization/SettingsCopy.d.ts +0 -0
  511. /package/dist/{common → core}/types/localization/TransactionsCopy.d.ts +0 -0
  512. /package/dist/{common → core}/types/localization/TrendsCopy.d.ts +0 -0
  513. /package/dist/{common → core}/types/localization/index.d.ts +0 -0
@@ -1,1152 +0,0 @@
1
- import { jsx as i, jsxs as N, Fragment as fe } from "react/jsx-runtime";
2
- import h, { useEffect as ne, useState as ie } from "react";
3
- import { observer as U } from "mobx-react-lite";
4
- import W from "@mui/material/Stack";
5
- import re from "@mui/material/Button";
6
- import { CategoryIcon as be, MerchantLogo as Pe, P as ue, Text as pe, H3 as Be } from "@mxenabled/mxui";
7
- import { Icon as Ve, Close as Ge, ChevronLeft as ke, ChevronRight as Te } from "@mxenabled/mx-icons";
8
- import { L as ze } from "./Loader-icSc5MlE.mjs";
9
- import $ from "@mui/material/Box";
10
- import ae from "@mui/material/IconButton";
11
- import { alpha as f, useTheme as j } from "@mui/material/styles";
12
- import { useInView as Re } from "react-intersection-observer";
13
- import Ue from "@mui/material/styles/useTheme";
14
- import { b as Ke } from "./Category-Ccoew_sA.mjs";
15
- import { b as Fe } from "./Localization-2MODESHW.mjs";
16
- import He from "@mui/material/CircularProgress";
17
- import { makeAutoObservable as se, runInAction as Oe } from "mobx";
18
- import { G as he, a as $e, u as je, b as Ye } from "./useCombineEvents-ARuNN9Xh.mjs";
19
- import { B as me } from "./BeatApi-De2IaqH2.mjs";
20
- import { u as Xe } from "./useWidgetLoadTimer-DmNCCLa-.mjs";
21
- import Ze from "@mui/material/Card";
22
- import Qe from "@mui/material/CardActionArea";
23
- import qe from "@mui/material/Avatar";
24
- const Ce = {
25
- featureVersion: "spendVsIncomeTrends"
26
- };
27
- class Je {
28
- copyApi = new he("/", "");
29
- copyObject = {};
30
- namespace = "experiences";
31
- translationKey = "micro_insights";
32
- constructor() {
33
- se(this);
34
- }
35
- // NOTE: Not sure if this is special case, but other stores have this deprecation todo
36
- // DEPRECATED: Initialize api in constructor and use loadCopy instead
37
- // TODO: Remove this function
38
- initialize = async (e, o) => {
39
- this.copyApi = new he(e, o), await this.loadCopy();
40
- };
41
- loadCopy = async () => {
42
- const e = await this.copyApi.getGlobalCopy(this.namespace, this.translationKey);
43
- Oe(() => {
44
- this.copyObject = e[this.translationKey];
45
- });
46
- };
47
- get cardsCopy() {
48
- return this.copyObject.cards;
49
- }
50
- get carouselCopy() {
51
- return this.copyObject.carousel;
52
- }
53
- get zeroStateCopy() {
54
- return this.copyObject.zero_state;
55
- }
56
- }
57
- const ce = {
58
- BillAmountNotStandard: "BillAmountNotStandard",
59
- CanadianUpcomingDeadlineAlert: "CanadianUpcomingDeadlineAlert",
60
- DuplicatePaymentV2: "DuplicatePaymentV2",
61
- IntroducePulse: "IntroducePulse",
62
- LargeTransaction: "LargeTransaction",
63
- MonthlySpendToIncomeComparisonV2: "MonthlySpendToIncomeComparisonV2",
64
- QuarterlySummary: "QuarterlySummary",
65
- SpendingPlanCategorySpending: "SpendingPlanCategorySpending",
66
- SubscriptionPriceIncrease: "SubscriptionPriceIncrease",
67
- UncategorizedTransactionsV2: "UncategorizedTransactionsV2",
68
- UpcomingBill: "UpcomingBill",
69
- UnifiedDeposit: "UnifiedDeposit",
70
- WeeklySpendingPlanSummary: "WeeklySpendingPlanSummary",
71
- WeeklyNewMerchantsV2: "WeeklyNewMerchantsV2",
72
- MonthlySpendComparison: "MonthlySpendComparison",
73
- MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
74
- }, R = window?.app?.clientConfig?.microwidget_instance_id || "", Ee = {
75
- INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
76
- }, ye = (t) => `on${t}Click`, We = (t) => `on${t}View`, Ne = (t) => `on${t}ViewFirstTime`, le = (t) => t.replace(/([a-z])([A-Z])/g, "$1 $2"), et = () => Object.values(ce).reduce(
77
- (t, e) => ({
78
- ...t,
79
- [ye(e)]: {
80
- action: v.MICRO_BEAT_CLICKED,
81
- category: D.BEAT_INTERACTION,
82
- label: le(e),
83
- value: R
84
- }
85
- }),
86
- {}
87
- ), tt = () => Object.values(ce).reduce(
88
- (t, e) => ({
89
- ...t,
90
- [We(e)]: {
91
- action: v.MICRO_BEAT_DISPLAYED,
92
- category: D.BEAT_INTERACTION,
93
- label: le(e),
94
- value: R
95
- }
96
- }),
97
- {}
98
- ), ot = () => Object.values(ce).reduce(
99
- (t, e) => ({
100
- ...t,
101
- [Ne(e)]: {
102
- action: v.MICRO_BEAT_DISPLAYED_FIRST_TIME,
103
- category: D.BEAT_INTERACTION,
104
- label: le(e),
105
- value: R
106
- }
107
- }),
108
- {}
109
- ), L = {
110
- CAROUSEL_CONTROL: "Carousel Control",
111
- MICRO_WIDGET: "Micro Widget",
112
- VIEW_MORE: "View More"
113
- }, D = {
114
- MICRO_WIDGET_INTERACTION: "Micro Widget Interaction",
115
- BEAT_INTERACTION: "Beat Interaction"
116
- }, O = {
117
- ON_CAROUSEL_BACK_CLICK: "onCarouselBackClick",
118
- ON_CAROUSEL_BACK_SWIPE: "onCarouselBackSwipe",
119
- ON_CAROUSEL_FORWARD_CLICK: "onCarouselForwardClick",
120
- ON_CAROUSEL_FORWARD_SWIPE: "onCarouselForwardSwipe",
121
- ON_NO_RELEVANT_INSIGHTS_CLICKED: "onNoRelevantInsightsClicked",
122
- ON_VIEW_MORE_CLICKED: "onViewMoreClicked"
123
- }, Me = {
124
- ON_VIEW_MORE_VIEWED: "onViewMoreCardView"
125
- }, v = {
126
- CONTROL_BACKWARD: "Control Backward",
127
- CONTROL_FORWARD: "Control Forward",
128
- MICRO_BEAT_CLICKED: "Micro Beat Clicked",
129
- MICRO_BEAT_DISPLAYED: "Micro Beat Displayed",
130
- MICRO_BEAT_DISPLAYED_FIRST_TIME: "Micro Beat Displayed For First Time",
131
- SWIPE_BACKWARD: "Swipe Backward",
132
- SWIPE_FORWARD: "Swipe Forward"
133
- }, G = {
134
- MICRO_WIDGET_CAROUSEL: "Micro Widget Carousel",
135
- MICRO_WIDGET_CAROUSEL_ZERO_STATE: "Micro Widget Carousel Zero State",
136
- MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS: "Micro Widget Carousel No Relevant Insights"
137
- }, ge = {
138
- [G.MICRO_WIDGET_CAROUSEL]: {
139
- label: L.MICRO_WIDGET,
140
- name: G.MICRO_WIDGET_CAROUSEL,
141
- path: Ee.INSIGHTS_MICRO_WIDGET,
142
- value: R
143
- },
144
- // zero state
145
- [G.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
146
- label: L.MICRO_WIDGET,
147
- name: G.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
148
- path: Ee.INSIGHTS_MICRO_WIDGET,
149
- value: R
150
- },
151
- // no relevant cards
152
- [G.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
153
- label: L.MICRO_WIDGET,
154
- name: G.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
155
- path: "/micro-widget",
156
- value: R
157
- }
158
- }, Ie = {
159
- // carousel control interaction events - clicks and swipes
160
- [O.ON_CAROUSEL_BACK_CLICK]: {
161
- action: v.CONTROL_BACKWARD,
162
- category: D.MICRO_WIDGET_INTERACTION,
163
- label: L.CAROUSEL_CONTROL,
164
- value: R
165
- },
166
- [O.ON_CAROUSEL_FORWARD_CLICK]: {
167
- action: v.CONTROL_FORWARD,
168
- category: D.MICRO_WIDGET_INTERACTION,
169
- label: L.CAROUSEL_CONTROL,
170
- value: R
171
- },
172
- [O.ON_CAROUSEL_BACK_SWIPE]: {
173
- action: v.SWIPE_BACKWARD,
174
- category: D.MICRO_WIDGET_INTERACTION,
175
- label: L.CAROUSEL_CONTROL,
176
- value: R
177
- },
178
- [O.ON_CAROUSEL_FORWARD_SWIPE]: {
179
- action: v.SWIPE_FORWARD,
180
- category: D.MICRO_WIDGET_INTERACTION,
181
- label: L.CAROUSEL_CONTROL,
182
- value: R
183
- },
184
- // read more card events
185
- [O.ON_VIEW_MORE_CLICKED]: {
186
- action: v.MICRO_BEAT_CLICKED,
187
- category: D.BEAT_INTERACTION,
188
- label: L.VIEW_MORE,
189
- value: R
190
- },
191
- [Me.ON_VIEW_MORE_VIEWED]: {
192
- action: v.MICRO_BEAT_DISPLAYED,
193
- category: D.BEAT_INTERACTION,
194
- label: L.VIEW_MORE,
195
- value: R
196
- },
197
- ...et(),
198
- ...tt(),
199
- ...ot()
200
- }, Ae = async (t, e) => !e || !Ie[t] ? null : e.sendAnalyticEvent(Ie[t]).then((o) => o).catch((o) => {
201
- throw o;
202
- }), Se = async (t, e) => !e || !ge[t] ? null : e.sendAnalyticsPageview(ge[t]).then((o) => o).catch((o) => {
203
- throw o;
204
- });
205
- class it {
206
- onAnalyticEvent = Ae;
207
- onAnalyticPageView = Se;
208
- beatApi = new me("/", "");
209
- constructor() {
210
- se(this);
211
- }
212
- initialize = async (e, o, n) => {
213
- this.onAnalyticEvent = (r, a) => {
214
- Ae(r, a).then((s) => s).catch((s) => {
215
- throw s.status === 401 && n(), s;
216
- });
217
- }, this.onAnalyticPageView = (r, a) => {
218
- Se(r, a).then((s) => s).catch((s) => {
219
- throw s.status === 401 && n(), s;
220
- });
221
- }, this.beatApi = new me(e, o);
222
- };
223
- updateBeat = async (e) => {
224
- this.beatApi.updateBeat(e);
225
- };
226
- updateOffer = async (e) => {
227
- this.beatApi.updateOffer(e);
228
- };
229
- }
230
- class nt {
231
- copyStore;
232
- endpoint = "/";
233
- insightsMicroWidgetStore;
234
- session = null;
235
- token = "";
236
- isInitialized = !1;
237
- constructor() {
238
- this.copyStore = new Je(), this.insightsMicroWidgetStore = new it(), se(this);
239
- }
240
- initialize = async (e, o, n) => {
241
- await this.copyStore.initialize(e, o), await this.insightsMicroWidgetStore.initialize(e, o, n);
242
- const r = await $e(e, o, "1.0.0", "Micro Insights Carousel");
243
- Oe(() => {
244
- this.session = r, this.isInitialized = !0;
245
- });
246
- };
247
- }
248
- const Y = h.createContext(null), rt = ({
249
- onEvent: t,
250
- onPageview: e,
251
- store: o,
252
- children: n
253
- }) => /* @__PURE__ */ i(Y.Provider, { value: { onEvent: t, onPageview: e, store: o, children: n }, children: n }), at = ({ beat: t }) => {
254
- const { primary_category_guid: e, category_guids: o } = t, n = e || o?.[0] || Ke.UNCATEGORIZED;
255
- return /* @__PURE__ */ i(be, { categoryGuid: n, size: 32, sx: { minWidth: 32 } });
256
- }, T = ({
257
- bgColor: t,
258
- name: e,
259
- iconColor: o = "primary"
260
- }) => /* @__PURE__ */ i(
261
- qe,
262
- {
263
- sx: {
264
- bgcolor: t,
265
- width: 32,
266
- height: 32
267
- },
268
- variant: "rounded",
269
- children: /* @__PURE__ */ i(Ve, { color: o, fill: !0, name: e, size: 20 })
270
- }
271
- ), st = ({ beat: t }) => {
272
- const { category_guids: e, merchant_guids: o, primary_category_guid: n, primary_merchant_guid: r } = t;
273
- return /* @__PURE__ */ i(
274
- Pe,
275
- {
276
- categoryGuid: n || e && e[0] || "",
277
- merchantGuid: r || o[0],
278
- size: 32,
279
- sx: {
280
- display: "flex",
281
- mt: 2,
282
- minWidth: 32
283
- }
284
- }
285
- );
286
- }, ct = (t) => t ? t.data ? t.data.map((e) => {
287
- const o = {};
288
- return t.names?.map((n, r) => {
289
- o[n] = e[r];
290
- }), o;
291
- }) : [] : [], lt = (t) => {
292
- const e = ct(t), o = e.length / 2, n = e.slice(0, o), r = e.slice(o);
293
- return !n.length || !r.length ? "primary" : n[0].amount > r[0].amount ? "error" : n[0].amount < r[0].amount ? "success" : "primary";
294
- }, dt = ({ beat: t }) => {
295
- const e = Ue(), o = lt(t.data_series), n = e.palette[o].main;
296
- return /* @__PURE__ */ i(T, { bgColor: f(n, 0.15), iconColor: o, name: "bar_chart" });
297
- }, _t = {
298
- 0: (t, e) => /* @__PURE__ */ i(T, { bgColor: f(e.palette.primary.main, 0.15), name: "error" }),
299
- 1: (t) => /* @__PURE__ */ i(at, { beat: t }),
300
- 2: (t) => /* @__PURE__ */ i(st, { beat: t }),
301
- 3: (t) => /* @__PURE__ */ i(dt, { beat: t }),
302
- 4: (t, e) => /* @__PURE__ */ i(
303
- T,
304
- {
305
- bgColor: f(e.palette.secondary.main, 0.15),
306
- iconColor: "secondary",
307
- name: "info"
308
- }
309
- ),
310
- 5: (t, e) => /* @__PURE__ */ i(T, { bgColor: f(e.palette.primary.main, 0.15), name: "campaign" }),
311
- // TODO: Waiting for the backend to accommodate icon types 6, 7, 8, and 9
312
- 6: (t, e) => /* @__PURE__ */ i(
313
- T,
314
- {
315
- bgColor: f(e.palette.success.main, 0.15),
316
- iconColor: "success",
317
- name: "check_circle"
318
- }
319
- ),
320
- 7: (t, e) => /* @__PURE__ */ i(T, { bgColor: f(e.palette.primary.main, 0.15), name: "today" }),
321
- 8: (t, e) => /* @__PURE__ */ i(T, { bgColor: f(e.palette.primary.main, 0.15), name: "calendar_clock" }),
322
- 9: (t, e) => /* @__PURE__ */ i(T, { bgColor: f(e.palette.primary.main, 0.15), name: "celebration" })
323
- }, ut = ({ beat: t }) => {
324
- const e = j(), { icon_type: o } = t, n = o != null ? _t[o] : null;
325
- return n ? n(t, e) : /* @__PURE__ */ i(T, { bgColor: f(e.palette.primary.main, 0.15), name: "error" });
326
- }, x = () => {
327
- const t = h.useContext(Y);
328
- if (!t)
329
- throw new Error("useCopyStore() must be used within the InsightsMicroWidgetDataProvider");
330
- return t.store.copyStore;
331
- }, pt = () => {
332
- const t = h.useContext(Y);
333
- if (!t?.store?.insightsMicroWidgetStore)
334
- throw new Error(
335
- "useInsightsMicroWidgetStore() must be used within the InsightsMicroWidgetDataProvider"
336
- );
337
- return t.store.insightsMicroWidgetStore;
338
- }, X = () => {
339
- const t = h.useContext(Y);
340
- if (!t)
341
- throw new Error("useEvent() must be used within the InsightsMicroWidgetDataProvider");
342
- return { onEvent: t.onEvent };
343
- }, we = () => {
344
- const t = h.useContext(Y);
345
- if (!t)
346
- throw new Error("usePageview() must be used within the InsightsMicroWidgetDataProvider");
347
- return { onPageview: t.onPageview };
348
- }, ht = {
349
- LARGE: 180,
350
- STANDARD: 154,
351
- XLARGE: 200,
352
- XXLARGE: 248
353
- }, mt = 50, Le = 1, q = h.forwardRef(
354
- function({
355
- ariaLabel: e,
356
- cardSx: o,
357
- closeAriaLabel: n,
358
- description: r,
359
- icon: a,
360
- isActiveCard: s,
361
- hasCardEffect: p = !1,
362
- heightOverrides: m,
363
- onClose: C,
364
- onCardClick: u,
365
- onPrimaryAction: c,
366
- onSecondaryAction: _,
367
- primaryActionText: l,
368
- secondaryActionText: A,
369
- title: E,
370
- variant: S,
371
- widthOverrides: g,
372
- ...b
373
- }, M) {
374
- const k = !!(c && l), I = !!(_ && A), P = p ? Ze : $, w = /* @__PURE__ */ N(fe, { children: [
375
- C && /* @__PURE__ */ i(
376
- ae,
377
- {
378
- "aria-label": n,
379
- onClick: (d) => {
380
- d.stopPropagation(), C?.();
381
- },
382
- onMouseDown: (d) => {
383
- d.stopPropagation();
384
- },
385
- onTouchStart: (d) => {
386
- d.stopPropagation();
387
- },
388
- sx: { minHeight: 40, minWidth: 40, position: "absolute", right: 4, top: 4 },
389
- children: /* @__PURE__ */ i(Ge, {})
390
- }
391
- ),
392
- /* @__PURE__ */ N(W, { sx: { gap: 6, height: "100%", justifyContent: "space-between" }, children: [
393
- /* @__PURE__ */ N(W, { sx: { flexDirection: "row", gap: 12 }, children: [
394
- a && a,
395
- /* @__PURE__ */ N(W, { sx: { gap: 6 }, children: [
396
- /* @__PURE__ */ i(W, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: /* @__PURE__ */ i(ue, { bold: !0, sx: { lineHeight: "16px" }, variant: "body1", children: E }) }),
397
- /* @__PURE__ */ i(
398
- ue,
399
- {
400
- dangerouslySetInnerHTML: { __html: r },
401
- sx: {
402
- display: "-webkit-box",
403
- overflow: "hidden",
404
- textOverflow: "ellipsis",
405
- WebkitBoxOrient: "vertical",
406
- WebkitLineClamp: k ? 2 : 3
407
- },
408
- variant: "subtitle2"
409
- }
410
- )
411
- ] })
412
- ] }),
413
- k && /* @__PURE__ */ N(
414
- W,
415
- {
416
- sx: {
417
- alignItems: "center",
418
- flexDirection: "row",
419
- height: 28,
420
- pb: 4,
421
- pl: a ? 36 : 0
422
- },
423
- children: [
424
- k && /* @__PURE__ */ i(
425
- re,
426
- {
427
- onClick: (d) => {
428
- d.stopPropagation(), c?.();
429
- },
430
- onMouseDown: (d) => {
431
- d.stopPropagation();
432
- },
433
- onTouchStart: (d) => {
434
- d.stopPropagation();
435
- },
436
- size: "small",
437
- sx: { px: 8, ml: a ? 0 : -8 },
438
- variant: "text",
439
- children: /* @__PURE__ */ i(pe, { bold: !0, variant: "body2", children: l })
440
- }
441
- ),
442
- I && /* @__PURE__ */ i(
443
- re,
444
- {
445
- onClick: (d) => {
446
- d.stopPropagation(), _?.();
447
- },
448
- onMouseDown: (d) => {
449
- d.stopPropagation();
450
- },
451
- onTouchStart: (d) => {
452
- d.stopPropagation();
453
- },
454
- size: "small",
455
- sx: { px: 8 },
456
- variant: "text",
457
- children: /* @__PURE__ */ i(pe, { bold: !0, sx: { color: "text.secondary" }, variant: "body2", children: A })
458
- }
459
- )
460
- ]
461
- }
462
- )
463
- ] })
464
- ] });
465
- return /* @__PURE__ */ i(
466
- P,
467
- {
468
- "aria-hidden": !s,
469
- "aria-label": e,
470
- ref: M,
471
- role: "group",
472
- sx: {
473
- backgroundColor: "background.paper",
474
- height: m ? "100%" : 120,
475
- minWidth: g ? `${g}px` : "100%",
476
- position: "relative",
477
- my: 1,
478
- ...o
479
- },
480
- tabIndex: u || !s ? -1 : 0,
481
- variant: S,
482
- ...b,
483
- children: u ? /* @__PURE__ */ i(
484
- Qe,
485
- {
486
- onClick: u,
487
- sx: {
488
- pb: 8,
489
- pt: 16,
490
- px: 16,
491
- height: "100%"
492
- },
493
- children: w
494
- }
495
- ) : /* @__PURE__ */ i($, { sx: { pb: 8, pt: 16, px: 16, height: "100%" }, children: w })
496
- }
497
- );
498
- }
499
- ), Ct = ({
500
- ariaLabel: t,
501
- beat: e,
502
- index: o,
503
- isActiveCard: n,
504
- onCardClick: r,
505
- posthog: a,
506
- widthOverrides: s,
507
- variant: p,
508
- showIcon: m,
509
- heightOverrides: C
510
- }) => {
511
- const { ref: u, inView: c } = Re({
512
- threshold: Le
513
- }), { cardsCopy: _ } = x(), { onEvent: l } = X(), { updateBeat: A, updateOffer: E } = pt();
514
- ne(() => {
515
- c && (e.has_been_displayed ? l(We(e.template)) : (e.guid.startsWith("OFR") ? E({
516
- ...e,
517
- has_been_displayed: !0
518
- }) : A({
519
- ...e,
520
- has_been_displayed: !0
521
- }), l(Ne(e.template))));
522
- }, [c]), ne(() => {
523
- if (c && e)
524
- if (e.template === "MarketingOffer") {
525
- const g = e;
526
- a?.capture("viewed_messaging_insight", {
527
- template: e.template,
528
- campaign_guid: g.campaign_guid,
529
- campaign_name: g.pulse_campaign_name
530
- });
531
- } else
532
- a?.capture("viewed_insight", {
533
- beat_guid: e.guid,
534
- template: e.template,
535
- position: o
536
- });
537
- }, [e, o, c]);
538
- const S = () => {
539
- if (r && r(e), l(ye(e.template)), e.template === "MarketingOffer") {
540
- const g = e;
541
- a?.capture("clicked_messaging_insight", {
542
- template: e.template,
543
- campaign_guid: g.campaign_guid,
544
- campaign_name: g.pulse_campaign_name
545
- });
546
- } else
547
- a?.capture("clicked_insight", {
548
- beat_guid: e.guid,
549
- template: e.template,
550
- position: o
551
- });
552
- };
553
- return /* @__PURE__ */ i(
554
- q,
555
- {
556
- "aria-roledescription": "slide",
557
- ariaLabel: t,
558
- cardSx: {
559
- borderRadius: 2
560
- },
561
- description: e?.html_micro_description && e?.html_micro_description.length > 0 ? e.html_micro_description : e.html_description || "",
562
- hasCardEffect: !0,
563
- heightOverrides: C,
564
- icon: m && /* @__PURE__ */ i(ut, { beat: e }),
565
- isActiveCard: n,
566
- onCardClick: S,
567
- onPrimaryAction: S,
568
- primaryActionText: e.micro_call_to_action || _.micro_card_cta,
569
- ref: u,
570
- title: e.micro_title && e.micro_title.length > 0 ? e.micro_title : e.title,
571
- variant: p,
572
- widthOverrides: s
573
- }
574
- );
575
- }, Et = ({
576
- currentBeatIndex: t,
577
- numBeats: e,
578
- onNextClick: o,
579
- onPreviousClick: n,
580
- scrollRightBoundary: r,
581
- scrollX: a,
582
- shouldApplyDotAnimation: s = !1,
583
- visibleCardsCount: p = 1
584
- }) => {
585
- const m = j(), { carouselCopy: C } = x(), u = Math.floor(a) > r || t - p + 1 === 0, c = a < 0 || e - 1 === t, _ = m.palette.grey[500], l = m.palette.primary.main;
586
- return /* @__PURE__ */ N(
587
- W,
588
- {
589
- direction: "row",
590
- sx: {
591
- alignItems: "center",
592
- justifyContent: "center",
593
- pt: 4,
594
- width: "100%",
595
- // we were using `gap` instead of margin, but it doesn't work in safari browsers older than iOS 14.1
596
- "& button:first-child": {
597
- mr: 8
598
- }
599
- },
600
- children: [
601
- /* @__PURE__ */ i(
602
- ae,
603
- {
604
- "aria-disabled": u,
605
- "aria-label": C.previous_insight_cta_aria,
606
- disabled: u,
607
- onClick: n,
608
- children: /* @__PURE__ */ i(
609
- ke,
610
- {
611
- style: {
612
- color: u ? _ : l
613
- }
614
- }
615
- )
616
- }
617
- ),
618
- Array.from({ length: e }).map((A, E) => {
619
- const S = E === t;
620
- return /* @__PURE__ */ i(
621
- $,
622
- {
623
- className: "mx-insights-micro-carousel-dots",
624
- sx: {
625
- bgcolor: S ? l : _,
626
- height: 8,
627
- mr: 8,
628
- // existing comment from meganthan "we were using `gap` instead of margin, but it doesn't work in safari browsers older than iOS 14.1"
629
- ...s ? {
630
- borderRadius: "4px",
631
- transformOrigin: "center",
632
- transition: "all 0.5s ease-out",
633
- willChange: "width, background-color"
634
- } : {
635
- borderRadius: "50%",
636
- p: 0
637
- },
638
- width: S && s ? 24 : 8
639
- }
640
- },
641
- `carousel-button-${E}`
642
- );
643
- }),
644
- /* @__PURE__ */ i(
645
- ae,
646
- {
647
- "aria-disabled": c,
648
- "aria-label": C.next_insight_cta_aria,
649
- disabled: c,
650
- onClick: o,
651
- children: /* @__PURE__ */ i(
652
- Te,
653
- {
654
- style: {
655
- color: c ? _ : l
656
- }
657
- }
658
- )
659
- }
660
- )
661
- ]
662
- }
663
- );
664
- }, gt = ({
665
- activeCardIndex: t,
666
- beats: e,
667
- cardWidth: o,
668
- showCTAColocatedWithText: n,
669
- heightOverrides: r,
670
- onCardClick: a,
671
- posthog: s,
672
- showIcon: p,
673
- variant: m
674
- }) => {
675
- const { carouselCopy: C } = x(), u = {
676
- showCTAColocatedWithText: n,
677
- heightOverrides: r,
678
- posthog: s,
679
- showIcon: p,
680
- variant: m
681
- };
682
- return /* @__PURE__ */ N(fe, { children: [
683
- e.map((c, _) => {
684
- const l = _ + 1, A = e.length + 1, E = Fe(
685
- C.card_position_in_carousel_aria,
686
- l.toString(),
687
- A.toString()
688
- ), S = c.micro_title && c.micro_title.length > 0, g = c.micro_description && c.micro_description.length > 0, b = S ? c.micro_title : c.title, M = g ? c.micro_description : c.description;
689
- return /* @__PURE__ */ i(
690
- Ct,
691
- {
692
- ariaLabel: `${E}: ${b}, ${M}`,
693
- beat: c,
694
- index: _,
695
- isActiveCard: _ === t,
696
- onCardClick: a,
697
- widthOverrides: o || void 0,
698
- ...u
699
- },
700
- `${c.guid} ${_}`
701
- );
702
- }),
703
- /* @__PURE__ */ i(
704
- Wt,
705
- {
706
- isActiveCard: t === e.length,
707
- onCardClick: a,
708
- widthOverrides: o || void 0,
709
- ...u
710
- }
711
- )
712
- ] });
713
- }, It = ({
714
- analyticsMetadata: t,
715
- allowSingleCardPeeking: e = !1,
716
- beats: o = [],
717
- showCTAColocatedWithText: n,
718
- heightOverrides: r,
719
- onCardClick: a,
720
- posthog: s,
721
- showCarouselControls: p,
722
- showIcon: m,
723
- showWithMargin: C = !0,
724
- variant: u,
725
- widthOverrides: c,
726
- visibleCardsCount: _ = 1
727
- // Default to 1 card visible
728
- }) => {
729
- const l = h.useRef(null), A = h.useRef(null), [E, S] = h.useState(0), [g, b] = h.useState(null), [M, k] = h.useState(null), [I, P] = h.useState(null), { carouselCopy: w } = x(), { onEvent: d } = X();
730
- h.useEffect(() => {
731
- if (l.current && !e) {
732
- const y = l.current.offsetWidth, F = 8;
733
- let z;
734
- if (_ > 1) {
735
- const de = (y - (_ - 1) * F) / _ / 3;
736
- z = (y - de - (_ - 1) * F) / _;
737
- } else
738
- z = y;
739
- P(z);
740
- }
741
- }, [_, l.current?.offsetWidth]), h.useEffect(() => {
742
- const y = A.current?.offsetWidth;
743
- if (typeof y == "number" && e) {
744
- const F = (H) => {
745
- const _e = [
746
- { maxWidth: 375, cardWidth: 268 },
747
- { maxWidth: 444, cardWidth: 300 },
748
- { maxWidth: 599, cardWidth: 350 },
749
- { maxWidth: 749, cardWidth: 450 },
750
- { maxWidth: 900, cardWidth: 600 }
751
- ].find((xe) => H <= xe.maxWidth);
752
- return _e ? _e.cardWidth : 750;
753
- };
754
- P(F(y));
755
- const z = () => {
756
- const H = A.current?.offsetWidth;
757
- typeof H == "number" && P(F(H));
758
- };
759
- return window.addEventListener("resize", z), () => {
760
- window.removeEventListener("resize", z);
761
- };
762
- }
763
- }, [e, A]);
764
- const J = () => {
765
- d(O.ON_CAROUSEL_FORWARD_CLICK, t), l.current && I && l.current.scrollTo({
766
- left: E + I + 8,
767
- top: 0,
768
- behavior: "smooth"
769
- });
770
- }, Z = () => {
771
- d(O.ON_CAROUSEL_BACK_CLICK, t), l.current && I && l.current.scrollTo({
772
- left: Math.max(0, E - (I + 8)),
773
- top: 0,
774
- behavior: "smooth"
775
- });
776
- }, Q = () => {
777
- l.current && S(l.current.scrollLeft);
778
- }, ee = () => {
779
- if (!M || !g) return;
780
- M - g > mt ? d(O.ON_CAROUSEL_FORWARD_SWIPE, t) : d(O.ON_CAROUSEL_BACK_SWIPE, t);
781
- }, te = (y) => {
782
- b(y.targetTouches[0].clientX);
783
- }, oe = (y) => {
784
- b(null), k(y.targetTouches[0].clientX);
785
- }, K = I ? Math.round(E / (I + 8)) : 0, B = l.current ? l.current.scrollWidth - l.current.offsetWidth : 0;
786
- return /* @__PURE__ */ N(
787
- W,
788
- {
789
- "aria-label": w.carousel_title,
790
- "aria-roledescription": "carousel",
791
- ref: A,
792
- role: "region",
793
- sx: {
794
- alignItems: "center",
795
- boxSizing: "border-box",
796
- height: r,
797
- width: c || "100%"
798
- },
799
- children: [
800
- /* @__PURE__ */ i(
801
- W,
802
- {
803
- direction: "row",
804
- onScroll: Q,
805
- onTouchEnd: ee,
806
- onTouchMove: te,
807
- onTouchStart: oe,
808
- ref: l,
809
- sx: {
810
- alignItems: "center",
811
- height: r && "100%",
812
- gap: 8,
813
- listStyleType: "none",
814
- m: 0,
815
- maxWidth: C ? "calc(100% - 32px)" : "100%",
816
- overflowX: "auto",
817
- overflowY: "hidden",
818
- p: 0,
819
- scrollbarWidth: "none",
820
- "-ms-overflow-style": "none",
821
- "-webkit-overflow-scrolling": "touch",
822
- "&::-webkit-scrollbar": {
823
- display: "none"
824
- }
825
- },
826
- children: /* @__PURE__ */ i(
827
- gt,
828
- {
829
- activeCardIndex: K,
830
- beats: o,
831
- cardWidth: I,
832
- heightOverrides: r,
833
- onCardClick: a,
834
- posthog: s,
835
- showCTAColocatedWithText: n,
836
- showIcon: m,
837
- variant: u
838
- }
839
- )
840
- }
841
- ),
842
- p && /* @__PURE__ */ i(
843
- Et,
844
- {
845
- currentBeatIndex: K + _ - 1,
846
- numBeats: o.length + 1,
847
- onNextClick: J,
848
- onPreviousClick: Z,
849
- scrollRightBoundary: B,
850
- scrollX: E,
851
- shouldApplyDotAnimation: e,
852
- visibleCardsCount: _
853
- }
854
- )
855
- ]
856
- }
857
- );
858
- }, At = U(It), St = ({
859
- analyticsMetadata: t,
860
- onCardClick: e,
861
- posthog: o,
862
- widthOverrides: n,
863
- headerSx: r
864
- }) => {
865
- const { carouselCopy: a } = x(), { onEvent: s } = X(), p = () => {
866
- s && (s(O.ON_VIEW_MORE_CLICKED, t), e(), o?.capture("clicked_view_more"));
867
- };
868
- return a ? /* @__PURE__ */ N(
869
- W,
870
- {
871
- alignItems: "center",
872
- direction: "row",
873
- justifyContent: "space-between",
874
- spacing: 2,
875
- sx: {
876
- p: 16,
877
- pb: 8,
878
- width: n || void 0,
879
- ...r
880
- },
881
- children: [
882
- /* @__PURE__ */ i(Be, { children: a.carousel_title }),
883
- /* @__PURE__ */ i(
884
- re,
885
- {
886
- endIcon: /* @__PURE__ */ i(Te, { size: 20 }),
887
- onClick: p,
888
- size: "small",
889
- variant: "text",
890
- children: a.view_all_insights_in_full_feed_cta_aria
891
- }
892
- )
893
- ]
894
- }
895
- ) : /* @__PURE__ */ i(ze, {});
896
- }, ft = U(St), Tt = ({
897
- heightOverrides: t,
898
- widthOverrides: e,
899
- children: o
900
- }) => {
901
- const { carouselCopy: n } = x();
902
- return /* @__PURE__ */ i(
903
- $,
904
- {
905
- "aria-label": n?.carousel_title,
906
- "aria-roledescription": "carousel",
907
- role: "group",
908
- sx: {
909
- boxSizing: "border-box",
910
- height: t ? void 0 : "100%",
911
- m: "0 auto",
912
- width: e ? void 0 : "100%"
913
- },
914
- children: o
915
- }
916
- );
917
- }, De = ({
918
- ariaLabel: t,
919
- heightOverrides: e,
920
- onCardClick: o,
921
- posthog: n,
922
- showIcon: r,
923
- variant: a
924
- }) => {
925
- const { cardsCopy: s } = x(), p = j(), { onEvent: m } = X(), { onPageview: C } = we();
926
- h.useEffect(() => {
927
- C(G.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
928
- }, []);
929
- const u = () => {
930
- o && o(), m(O.ON_NO_RELEVANT_INSIGHTS_CLICKED), n?.capture("clicked_insight", {
931
- template: "no_relevant_insights"
932
- });
933
- };
934
- return /* @__PURE__ */ i(
935
- q,
936
- {
937
- ariaLabel: t,
938
- cardSx: {
939
- borderRadius: 2
940
- },
941
- description: s.no_relevant_insights_card_description,
942
- hasCardEffect: !0,
943
- heightOverrides: e,
944
- icon: r && /* @__PURE__ */ i(T, { bgColor: f(p.palette.primary.main, 0.15), name: "lightbulb" }),
945
- onCardClick: u,
946
- onPrimaryAction: u,
947
- primaryActionText: s.micro_card_cta,
948
- title: s.no_relevant_insights_card_title,
949
- variant: a
950
- }
951
- );
952
- }, Qt = U(De), ve = ({
953
- ariaLabel: t,
954
- heightOverrides: e,
955
- onCardClick: o,
956
- showIcon: n,
957
- variant: r
958
- }) => {
959
- const { onPageview: a } = we(), { zeroStateCopy: s } = x(), p = j();
960
- return h.useEffect(() => {
961
- a(G.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
962
- }, []), /* @__PURE__ */ i(
963
- q,
964
- {
965
- ariaLabel: t,
966
- cardSx: {
967
- borderRadius: 2
968
- },
969
- description: s.carousel_zero_state_description,
970
- hasCardEffect: !0,
971
- heightOverrides: e,
972
- icon: n && /* @__PURE__ */ i(T, { bgColor: f(p.palette.primary.main, 0.15), name: "lightbulb" }),
973
- onCardClick: o,
974
- title: s.carousel_zero_state_title,
975
- variant: r
976
- }
977
- );
978
- }, qt = U(ve), Rt = () => /* @__PURE__ */ i(
979
- $,
980
- {
981
- sx: {
982
- alignItems: "center",
983
- display: "flex",
984
- height: "100%",
985
- justifyContent: "center",
986
- width: "100%"
987
- },
988
- children: /* @__PURE__ */ i(He, {})
989
- }
990
- ), V = new nt(), Ot = ({
991
- allowSingleCardPeeking: t,
992
- areBeatsLoading: e,
993
- beats: o = [],
994
- // This also determines the length of the carousel controls (beat.length + 1)
995
- showCTAColocatedWithText: n = !0,
996
- endpoint: r = "/",
997
- heightOverrides: a,
998
- headerSx: s,
999
- logOutUser: p,
1000
- onCardClick: m = () => {
1001
- },
1002
- onEvent: C = () => {
1003
- },
1004
- onPageview: u = () => {
1005
- },
1006
- posthog: c,
1007
- showBorder: _ = !0,
1008
- showCarouselControls: l,
1009
- showHeader: A,
1010
- showIcon: E,
1011
- showWithMargin: S = !0,
1012
- token: g = "",
1013
- userHasFullInsightFeedBeats: b,
1014
- variant: M,
1015
- visibleCardsCount: k = 1,
1016
- widthOverrides: I
1017
- }) => {
1018
- const [P, w] = ie("STANDARD"), [d, J] = ie(!1), [Z, Q] = ie(!1), ee = je([C], V), te = Ye([u], V);
1019
- Xe({
1020
- widgetName: "InsightsMicroWidget",
1021
- isLoaded: d
1022
- }), h.useEffect(() => {
1023
- !V.isInitialized && !Z && (V.initialize(r, g, p).catch(() => Q(!1)), Q(!0));
1024
- }, [r, g, p, V.isInitialized, Z]), h.useEffect(() => {
1025
- const B = window.innerHeight;
1026
- B < 180 ? w("STANDARD") : B >= 180 && B < 200 ? w("LARGE") : B >= 200 && B < 248 ? w("XLARGE") : B >= 248 && w("XXLARGE");
1027
- }, [window.innerHeight]), h.useEffect(() => {
1028
- J(!e && V.isInitialized);
1029
- }, [e, V.isInitialized]);
1030
- const oe = {
1031
- showCTAColocatedWithText: n,
1032
- heightOverrides: a,
1033
- onCardClick: m,
1034
- posthog: c,
1035
- showIcon: E,
1036
- showWithMargin: S,
1037
- widthOverrides: I
1038
- }, K = {
1039
- carouselSize: P,
1040
- variant: M,
1041
- showCTAColocatedWithText: n,
1042
- heightOverrides: a,
1043
- onCardClick: m,
1044
- posthog: c,
1045
- showIcon: E
1046
- };
1047
- return /* @__PURE__ */ i(rt, { onEvent: ee, onPageview: te, store: V, children: /* @__PURE__ */ N(Tt, { heightOverrides: a, widthOverrides: I, children: [
1048
- !d && /* @__PURE__ */ i(Rt, {}),
1049
- d && A && /* @__PURE__ */ i(
1050
- ft,
1051
- {
1052
- analyticsMetadata: Ce,
1053
- headerSx: s,
1054
- onCardClick: m,
1055
- posthog: c,
1056
- widthOverrides: I
1057
- }
1058
- ),
1059
- d && !!o.length && /* @__PURE__ */ i(
1060
- At,
1061
- {
1062
- allowSingleCardPeeking: t,
1063
- analyticsMetadata: Ce,
1064
- beats: o,
1065
- showCarouselControls: l,
1066
- variant: _ ? M : void 0,
1067
- visibleCardsCount: k,
1068
- ...oe
1069
- }
1070
- ),
1071
- d && !o.length && /* @__PURE__ */ i(
1072
- W,
1073
- {
1074
- sx: {
1075
- alignItems: "center",
1076
- height: a,
1077
- width: I || "100%"
1078
- },
1079
- children: /* @__PURE__ */ i(
1080
- W,
1081
- {
1082
- sx: {
1083
- height: `calc(${ht[P]}px - 44px)`,
1084
- width: S ? `calc(${I}px - 32px)` : "100%"
1085
- },
1086
- children: b ? /* @__PURE__ */ i(De, { ...K }) : /* @__PURE__ */ i(ve, { ...K })
1087
- }
1088
- )
1089
- }
1090
- )
1091
- ] }) });
1092
- }, Jt = U(Ot), yt = ({
1093
- ariaLabel: t,
1094
- heightOverrides: e,
1095
- isActiveCard: o,
1096
- onCardClick: n,
1097
- posthog: r,
1098
- widthOverrides: a,
1099
- showIcon: s,
1100
- variant: p
1101
- }) => {
1102
- const m = j(), { ref: C, inView: u } = Re({
1103
- threshold: Le
1104
- }), { cardsCopy: c } = x(), { onEvent: _ } = X();
1105
- ne(() => {
1106
- u && (_(Me.ON_VIEW_MORE_VIEWED), r?.capture("viewed_insight", {
1107
- template: "view_more_card"
1108
- }));
1109
- }, [u]);
1110
- const l = () => {
1111
- n && n(), _(O.ON_VIEW_MORE_CLICKED), r?.capture("clicked_insight", {
1112
- template: "view_more_card"
1113
- });
1114
- };
1115
- return /* @__PURE__ */ i(
1116
- q,
1117
- {
1118
- "aria-roledescription": "slide",
1119
- ariaLabel: t,
1120
- cardSx: {
1121
- borderRadius: 2
1122
- },
1123
- description: c.view_more_card_description,
1124
- hasCardEffect: !0,
1125
- heightOverrides: e,
1126
- icon: s && /* @__PURE__ */ i(T, { bgColor: f(m.palette.primary.main, 0.15), name: "show_chart" }),
1127
- isActiveCard: o,
1128
- onCardClick: l,
1129
- onPrimaryAction: l,
1130
- primaryActionText: c.micro_card_cta,
1131
- ref: C,
1132
- title: c.view_more_card_title,
1133
- variant: p,
1134
- widthOverrides: a
1135
- }
1136
- );
1137
- }, Wt = U(yt);
1138
- export {
1139
- nt as A,
1140
- T as B,
1141
- ft as C,
1142
- Ct as I,
1143
- At as M,
1144
- Qt as N,
1145
- Ce as T,
1146
- Wt as V,
1147
- qt as Z,
1148
- Jt as a,
1149
- rt as b,
1150
- q as c,
1151
- dt as d
1152
- };