@mx-cartographer/experiences 9.3.1 → 9.3.2

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 (27) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/dist/core/api/SettingsApi.d.ts +4 -0
  3. package/dist/core/api/SettingsApi.es.js +5 -4
  4. package/dist/core/api/SettingsApi.es.js.map +1 -1
  5. package/dist/core/constants/ApiEndpoints.d.ts +1 -0
  6. package/dist/core/constants/ApiEndpoints.es.js +1 -0
  7. package/dist/core/constants/ApiEndpoints.es.js.map +1 -1
  8. package/dist/core/stores/SettingsStore.d.ts +4 -0
  9. package/dist/core/stores/SettingsStore.es.js +80 -73
  10. package/dist/core/stores/SettingsStore.es.js.map +1 -1
  11. package/dist/core/types/localization/SettingsCopy.d.ts +6 -0
  12. package/dist/dashboard/Greeting.es.js +18 -19
  13. package/dist/dashboard/Greeting.es.js.map +1 -1
  14. package/dist/settings/components/profile/ProfileTab.d.ts +1 -1
  15. package/dist/settings/components/profile/ProfileTab.es.js +115 -108
  16. package/dist/settings/components/profile/ProfileTab.es.js.map +1 -1
  17. package/dist/settings/components/profile/actions/ResetPasswordAction.d.ts +4 -0
  18. package/dist/settings/components/profile/actions/ResetPasswordAction.es.js +94 -0
  19. package/dist/settings/components/profile/actions/ResetPasswordAction.es.js.map +1 -0
  20. package/dist/settings/components/profile/actions/VerifyEmailAction.es.js +20 -37
  21. package/dist/settings/components/profile/actions/VerifyEmailAction.es.js.map +1 -1
  22. package/dist/settings/components/profile/actions/VerifyPhoneAction.es.js +11 -17
  23. package/dist/settings/components/profile/actions/VerifyPhoneAction.es.js.map +1 -1
  24. package/dist/settings/constants/Settings.d.ts +8 -0
  25. package/dist/settings/constants/Settings.es.js +10 -3
  26. package/dist/settings/constants/Settings.es.js.map +1 -1
  27. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## [9.3.2] - 08-11-2026
2
+
3
+ - **ADDED** - Reset password feature in the Settings profile tab, gated behind `display_password_options_in_settings` config flag, with client-side validation (minimum length, letter, number, match) and show/hide password toggles (MEW-3722)
4
+ - **FIXED** - The greeting header text to never be an H1 and to use H3 styling
5
+
1
6
  ## [9.3.1] - 08-10-2026
2
7
 
3
8
  - **FIXED** - Spending, Trends, Finstrong, and Budgets category totals used the viewer's local-midnight timestamps, shifting the query window by the timezone offset for non-UTC users and dropping/gaining boundary transactions; date-range boundaries are now sent as UTC calendar days
@@ -15,5 +15,9 @@ export declare class SettingsApi {
15
15
  updateDevice: (device: Device) => Promise<any>;
16
16
  updateNotificationProfile: (notificationProfile: NotificationProfile) => Promise<any>;
17
17
  updateUserCommunicationProfile: (userCommunicationProfile: UserCommunicationProfile) => Promise<any>;
18
+ updatePassword: (params: {
19
+ new_password: string;
20
+ new_password_again: string;
21
+ }) => Promise<any>;
18
22
  getInsightsNotificationProfiles: () => Promise<any>;
19
23
  }
@@ -1,9 +1,9 @@
1
1
  import { ApiEndpoints as n } from "../constants/ApiEndpoints.es.js";
2
- import { Fetch as c } from "../utils/Fetch.es.js";
3
- var r = class {
2
+ import { Fetch as s } from "../utils/Fetch.es.js";
3
+ var I = class {
4
4
  fetchInstance;
5
5
  constructor(e, t, i) {
6
- this.fetchInstance = new c(e, t, void 0, i);
6
+ this.fetchInstance = new s(e, t, void 0, i);
7
7
  }
8
8
  deleteDevice = async (e) => this.fetchInstance.delete(`${n.DEVICES}/${e}`).then((t) => t);
9
9
  generateDeviceToken = async () => this.fetchInstance.get(`${n.USER}/mobile_token`).then((e) => e.mobile_token);
@@ -15,10 +15,11 @@ var r = class {
15
15
  updateDevice = async (e) => this.fetchInstance.put(`${n.DEVICES}/${e.guid}`, e).then((t) => t.device);
16
16
  updateNotificationProfile = async (e) => this.fetchInstance.put(`${n.NOTIFICATION_PROFILES}/${e.guid}`, e).then((t) => t.notification_profile);
17
17
  updateUserCommunicationProfile = async (e) => this.fetchInstance.put(n.USER_COMMUNICATION_PROFILE, e).then((t) => t.user_communication_profile);
18
+ updatePassword = async (e) => this.fetchInstance.put(n.CHANGE_PASSWORD, e);
18
19
  getInsightsNotificationProfiles = async () => this.fetchInstance.get(`${n.NOTIFICATION_PROFILES}/${n.INSIGHTS_NOTIFICATION_PROFILES}`).then((e) => e);
19
20
  };
20
21
  export {
21
- r as SettingsApi
22
+ I as SettingsApi
22
23
  };
23
24
 
24
25
  //# sourceMappingURL=SettingsApi.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SettingsApi.es.js","names":[],"sources":["../../../src/core/api/SettingsApi.ts"],"sourcesContent":["import { Fetch } from '../utils'\nimport { ApiEndpoints } from '../constants'\nimport { UserCommunicationProfile } from '..'\nimport type { Device, GlobalErrorHandler, NotificationProfile } from '..'\n\nexport class SettingsApi {\n fetchInstance: Fetch\n\n constructor(endpoint: string, token: string, onError?: GlobalErrorHandler) {\n this.fetchInstance = new Fetch(endpoint, token, undefined, onError)\n }\n\n deleteDevice = async (guid: string) => {\n return this.fetchInstance.delete(`${ApiEndpoints.DEVICES}/${guid}`).then((data) => data)\n }\n\n generateDeviceToken = async () => {\n return this.fetchInstance\n .get(`${ApiEndpoints.USER}/mobile_token`)\n .then((data) => data.mobile_token)\n }\n\n getDevices = async () => {\n return this.fetchInstance\n .get(ApiEndpoints.DEVICES)\n .then((data) => data.map((item: { device: Device }) => item.device))\n }\n\n getNotificationProfiles = async () => {\n return this.fetchInstance\n .get(ApiEndpoints.NOTIFICATION_PROFILES)\n .then((data) => data.notification_profiles)\n }\n\n // verifications endpoints respond with HTTP status codes; they error otherwise\n sendEmailVerification = async () => {\n return this.fetchInstance.post(ApiEndpoints.EMAIL_VERIFICATIONS)\n }\n\n sendPhoneVerification = async () => {\n return this.fetchInstance.post(ApiEndpoints.PHONE_VERIFICATIONS + '/deliver')\n }\n\n verifyPhoneToken = async (sms_verification_token: string) => {\n return this.fetchInstance\n .post(ApiEndpoints.PHONE_VERIFICATIONS + '/verify', { sms_verification_token })\n .then((res) => ({ verified: res.verified }))\n }\n\n updateDevice = async (device: Device) => {\n return this.fetchInstance\n .put(`${ApiEndpoints.DEVICES}/${device.guid}`, device)\n .then((data) => data.device)\n }\n\n updateNotificationProfile = async (notificationProfile: NotificationProfile) => {\n return this.fetchInstance\n .put(`${ApiEndpoints.NOTIFICATION_PROFILES}/${notificationProfile.guid}`, notificationProfile)\n .then((data) => data.notification_profile)\n }\n\n updateUserCommunicationProfile = async (userCommunicationProfile: UserCommunicationProfile) => {\n return this.fetchInstance\n .put(ApiEndpoints.USER_COMMUNICATION_PROFILE, userCommunicationProfile)\n .then((data) => data.user_communication_profile)\n }\n\n getInsightsNotificationProfiles = async () => {\n return this.fetchInstance\n .get(`${ApiEndpoints.NOTIFICATION_PROFILES}/${ApiEndpoints.INSIGHTS_NOTIFICATION_PROFILES}`)\n .then((data) => data)\n }\n}\n"],"mappings":";;AAKA,IAAa,IAAb,MAAyB;AAAA,EACvB;AAAA,EAEA,YAAY,GAAkB,GAAe,GAA8B;AACzE,SAAK,gBAAgB,IAAI,EAAM,GAAU,GAAO,QAAW,CAAO;AAAA,EACpE;AAAA,EAEA,eAAe,OAAO,MACb,KAAK,cAAc,OAAO,GAAG,EAAa,OAAA,IAAW,CAAA,EAAM,EAAE,KAAA,CAAM,MAAS,CAAI;AAAA,EAGzF,sBAAsB,YACb,KAAK,cACT,IAAI,GAAG,EAAa,IAAA,eAAmB,EACvC,KAAA,CAAM,MAAS,EAAK,YAAY;AAAA,EAGrC,aAAa,YACJ,KAAK,cACT,IAAI,EAAa,OAAO,EACxB,KAAA,CAAM,MAAS,EAAK,IAAA,CAAK,MAA6B,EAAK,MAAM,CAAC;AAAA,EAGvE,0BAA0B,YACjB,KAAK,cACT,IAAI,EAAa,qBAAqB,EACtC,KAAA,CAAM,MAAS,EAAK,qBAAqB;AAAA,EAI9C,wBAAwB,YACf,KAAK,cAAc,KAAK,EAAa,mBAAmB;AAAA,EAGjE,wBAAwB,YACf,KAAK,cAAc,KAAK,EAAa,sBAAsB,UAAU;AAAA,EAG9E,mBAAmB,OAAO,MACjB,KAAK,cACT,KAAK,EAAa,sBAAsB,WAAW,EAAE,wBAAA,EAAuB,CAAC,EAC7E,KAAA,CAAM,OAAS,EAAE,UAAU,EAAI,SAAS,EAAE;AAAA,EAG/C,eAAe,OAAO,MACb,KAAK,cACT,IAAI,GAAG,EAAa,OAAA,IAAW,EAAO,IAAA,IAAQ,CAAM,EACpD,KAAA,CAAM,MAAS,EAAK,MAAM;AAAA,EAG/B,4BAA4B,OAAO,MAC1B,KAAK,cACT,IAAI,GAAG,EAAa,qBAAA,IAAyB,EAAoB,IAAA,IAAQ,CAAmB,EAC5F,KAAA,CAAM,MAAS,EAAK,oBAAoB;AAAA,EAG7C,iCAAiC,OAAO,MAC/B,KAAK,cACT,IAAI,EAAa,4BAA4B,CAAwB,EACrE,KAAA,CAAM,MAAS,EAAK,0BAA0B;AAAA,EAGnD,kCAAkC,YACzB,KAAK,cACT,IAAI,GAAG,EAAa,qBAAA,IAAyB,EAAa,8BAAA,EAAgC,EAC1F,KAAA,CAAM,MAAS,CAAI;AAE1B"}
1
+ {"version":3,"file":"SettingsApi.es.js","names":[],"sources":["../../../src/core/api/SettingsApi.ts"],"sourcesContent":["import { Fetch } from '../utils'\nimport { ApiEndpoints } from '../constants'\nimport { UserCommunicationProfile } from '..'\nimport type { Device, GlobalErrorHandler, NotificationProfile } from '..'\n\nexport class SettingsApi {\n fetchInstance: Fetch\n\n constructor(endpoint: string, token: string, onError?: GlobalErrorHandler) {\n this.fetchInstance = new Fetch(endpoint, token, undefined, onError)\n }\n\n deleteDevice = async (guid: string) => {\n return this.fetchInstance.delete(`${ApiEndpoints.DEVICES}/${guid}`).then((data) => data)\n }\n\n generateDeviceToken = async () => {\n return this.fetchInstance\n .get(`${ApiEndpoints.USER}/mobile_token`)\n .then((data) => data.mobile_token)\n }\n\n getDevices = async () => {\n return this.fetchInstance\n .get(ApiEndpoints.DEVICES)\n .then((data) => data.map((item: { device: Device }) => item.device))\n }\n\n getNotificationProfiles = async () => {\n return this.fetchInstance\n .get(ApiEndpoints.NOTIFICATION_PROFILES)\n .then((data) => data.notification_profiles)\n }\n\n // verifications endpoints respond with HTTP status codes; they error otherwise\n sendEmailVerification = async () => {\n return this.fetchInstance.post(ApiEndpoints.EMAIL_VERIFICATIONS)\n }\n\n sendPhoneVerification = async () => {\n return this.fetchInstance.post(ApiEndpoints.PHONE_VERIFICATIONS + '/deliver')\n }\n\n verifyPhoneToken = async (sms_verification_token: string) => {\n return this.fetchInstance\n .post(ApiEndpoints.PHONE_VERIFICATIONS + '/verify', { sms_verification_token })\n .then((res) => ({ verified: res.verified }))\n }\n\n updateDevice = async (device: Device) => {\n return this.fetchInstance\n .put(`${ApiEndpoints.DEVICES}/${device.guid}`, device)\n .then((data) => data.device)\n }\n\n updateNotificationProfile = async (notificationProfile: NotificationProfile) => {\n return this.fetchInstance\n .put(`${ApiEndpoints.NOTIFICATION_PROFILES}/${notificationProfile.guid}`, notificationProfile)\n .then((data) => data.notification_profile)\n }\n\n updateUserCommunicationProfile = async (userCommunicationProfile: UserCommunicationProfile) => {\n return this.fetchInstance\n .put(ApiEndpoints.USER_COMMUNICATION_PROFILE, userCommunicationProfile)\n .then((data) => data.user_communication_profile)\n }\n\n updatePassword = async (params: { new_password: string; new_password_again: string }) => {\n return this.fetchInstance.put(ApiEndpoints.CHANGE_PASSWORD, params)\n }\n\n getInsightsNotificationProfiles = async () => {\n return this.fetchInstance\n .get(`${ApiEndpoints.NOTIFICATION_PROFILES}/${ApiEndpoints.INSIGHTS_NOTIFICATION_PROFILES}`)\n .then((data) => data)\n }\n}\n"],"mappings":";;AAKA,IAAa,IAAb,MAAyB;AAAA,EACvB;AAAA,EAEA,YAAY,GAAkB,GAAe,GAA8B;AACzE,SAAK,gBAAgB,IAAI,EAAM,GAAU,GAAO,QAAW,CAAO;AAAA,EACpE;AAAA,EAEA,eAAe,OAAO,MACb,KAAK,cAAc,OAAO,GAAG,EAAa,O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AAI;AAE1B"}
@@ -8,6 +8,7 @@ export declare const ApiEndpoints: {
8
8
  BEATS: string;
9
9
  BUDGETS: string;
10
10
  CATEGORIES: string;
11
+ CHANGE_PASSWORD: string;
11
12
  DATE_RANGE_CATEGORY_TOTALS: string;
12
13
  DEVICES: string;
13
14
  EMAIL_VERIFICATIONS: string;
@@ -8,6 +8,7 @@ var _ = {
8
8
  BEATS: "beats",
9
9
  BUDGETS: "budgets",
10
10
  CATEGORIES: "categories",
11
+ CHANGE_PASSWORD: "user/change_password",
11
12
  DATE_RANGE_CATEGORY_TOTALS: "date_range_category_totals",
12
13
  DEVICES: "devices",
13
14
  EMAIL_VERIFICATIONS: "email_verifications",
@@ -1 +1 @@
1
- {"version":3,"file":"ApiEndpoints.es.js","names":[],"sources":["../../../src/core/constants/ApiEndpoints.ts"],"sourcesContent":["export const ApiEndpoints = {\n ACCOUNTS: 'accounts',\n ANALYTICS_EVENTS: 'analytics_events',\n ANALYTICS_FEATURE_VISITS: 'feature_visits',\n ANALYTICS_PAGEVIEWS: 'analytics_pageviews',\n ANALYTICS_SESSION: 'analytics_sessions',\n APP_DATA: 'raja/data?type=master',\n BEATS: 'beats',\n BUDGETS: 'budgets',\n CATEGORIES: 'categories',\n DATE_RANGE_CATEGORY_TOTALS: 'date_range_category_totals',\n DEVICES: 'devices',\n EMAIL_VERIFICATIONS: 'email_verifications',\n GOALS: 'goals',\n HEALTH_SCORES: 'health_scores',\n HOLDINGS: 'holdings',\n INSTITUTIONS: 'institutions',\n INSIGHTS_NOTIFICATION_PROFILES: 'insight_notification_profiles',\n LOCALIZED_COPY: 'localized_copies',\n LOCALIZED_CONTENT: 'localized_content',\n MEMBERS: 'members',\n MERCHANTS: 'merchants',\n MERCHANT_BUDGETS: 'merchant_budgets',\n MONTHLY_CASH_FLOW_PROFILE: 'monthly_cash_flow_profile',\n MONTHLY_CATEGORY_TOTALS: 'monthly_category_totals',\n OFFERS: 'offers',\n NOTIFICATION_PROFILES: 'notification_profiles',\n NOTIFICATIONS: 'notifications',\n PHONE_VERIFICATIONS: 'sms_verification',\n PULSE_COMMUNICATIONS: 'pulse_communications',\n REPEATING_TRANSACTIONS: 'repeating_transactions',\n RETIREMENT_GOALS: 'retirement_goals',\n RETIREMENT_GOAL_ACCOUNTS: 'retirement_goal_accounts',\n SCHEDULED_PAYMENTS: 'scheduled_payments',\n SPENDING_PLANS: 'spending_plans',\n SUPPORT_TICKETS: 'support_tickets',\n TAGGINGS: 'taggings',\n TAGS: 'tags',\n TRANSACTION_RULES: 'transaction_rules',\n TRANSACTIONS: 'transactions',\n USER: 'user',\n USER_COMMUNICATION_PROFILE: 'user_communication_profile',\n USER_FEATURES: 'user_features',\n USER_PROFILES: 'user_profiles',\n WIDGET_URLS: 'widget_urls',\n}\n"],"mappings":"AAAA,IAAa,IAAe;AAAA,EAC1B,UAAU;AAAA,EACV,kBAAkB;AAAA,EAClB,0BAA0B;AAAA,EAC1B,qBAAqB;AAAA,EACrB,mBAAmB;AAAA,EACnB,UAAU;AAAA,EACV,OAAO;AAAA,EACP,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,4BAA4B;AAAA,EAC5B,SAAS;AAAA,EACT,qBAAqB;AAAA,EACrB,OAAO;AAAA,EACP,eAAe;AAAA,EACf,UAAU;AAAA,EACV,cAAc;AAAA,EACd,gCAAgC;AAAA,EAChC,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,SAAS;AAAA,EACT,WAAW;AAAA,EACX,kBAAkB;AAAA,EAClB,2BAA2B;AAAA,EAC3B,yBAAyB;AAAA,EACzB,QAAQ;AAAA,EACR,uBAAuB;AAAA,EACvB,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,sBAAsB;AAAA,EACtB,wBAAwB;AAAA,EACxB,kBAAkB;AAAA,EAClB,0BAA0B;AAAA,EAC1B,oBAAoB;AAAA,EACpB,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,mBAAmB;AAAA,EACnB,cAAc;AAAA,EACd,MAAM;AAAA,EACN,4BAA4B;AAAA,EAC5B,eAAe;AAAA,EACf,eAAe;AAAA,EACf,aAAa;AACf"}
1
+ {"version":3,"file":"ApiEndpoints.es.js","names":[],"sources":["../../../src/core/constants/ApiEndpoints.ts"],"sourcesContent":["export const ApiEndpoints = {\n ACCOUNTS: 'accounts',\n ANALYTICS_EVENTS: 'analytics_events',\n ANALYTICS_FEATURE_VISITS: 'feature_visits',\n ANALYTICS_PAGEVIEWS: 'analytics_pageviews',\n ANALYTICS_SESSION: 'analytics_sessions',\n APP_DATA: 'raja/data?type=master',\n BEATS: 'beats',\n BUDGETS: 'budgets',\n CATEGORIES: 'categories',\n CHANGE_PASSWORD: 'user/change_password',\n DATE_RANGE_CATEGORY_TOTALS: 'date_range_category_totals',\n DEVICES: 'devices',\n EMAIL_VERIFICATIONS: 'email_verifications',\n GOALS: 'goals',\n HEALTH_SCORES: 'health_scores',\n HOLDINGS: 'holdings',\n INSTITUTIONS: 'institutions',\n INSIGHTS_NOTIFICATION_PROFILES: 'insight_notification_profiles',\n LOCALIZED_COPY: 'localized_copies',\n LOCALIZED_CONTENT: 'localized_content',\n MEMBERS: 'members',\n MERCHANTS: 'merchants',\n MERCHANT_BUDGETS: 'merchant_budgets',\n MONTHLY_CASH_FLOW_PROFILE: 'monthly_cash_flow_profile',\n MONTHLY_CATEGORY_TOTALS: 'monthly_category_totals',\n OFFERS: 'offers',\n NOTIFICATION_PROFILES: 'notification_profiles',\n NOTIFICATIONS: 'notifications',\n PHONE_VERIFICATIONS: 'sms_verification',\n PULSE_COMMUNICATIONS: 'pulse_communications',\n REPEATING_TRANSACTIONS: 'repeating_transactions',\n RETIREMENT_GOALS: 'retirement_goals',\n RETIREMENT_GOAL_ACCOUNTS: 'retirement_goal_accounts',\n SCHEDULED_PAYMENTS: 'scheduled_payments',\n SPENDING_PLANS: 'spending_plans',\n SUPPORT_TICKETS: 'support_tickets',\n TAGGINGS: 'taggings',\n TAGS: 'tags',\n TRANSACTION_RULES: 'transaction_rules',\n TRANSACTIONS: 'transactions',\n USER: 'user',\n USER_COMMUNICATION_PROFILE: 'user_communication_profile',\n USER_FEATURES: 'user_features',\n USER_PROFILES: 'user_profiles',\n WIDGET_URLS: 'widget_urls',\n}\n"],"mappings":"AAAA,IAAa,IAAe;AAAA,EAC1B,UAAU;AAAA,EACV,kBAAkB;AAAA,EAClB,0BAA0B;AAAA,EAC1B,qBAAqB;AAAA,EACrB,mBAAmB;AAAA,EACnB,UAAU;AAAA,EACV,OAAO;AAAA,EACP,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,iBAAiB;AAAA,EACjB,4BAA4B;AAAA,EAC5B,SAAS;AAAA,EACT,qBAAqB;AAAA,EACrB,OAAO;AAAA,EACP,eAAe;AAAA,EACf,UAAU;AAAA,EACV,cAAc;AAAA,EACd,gCAAgC;AAAA,EAChC,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,SAAS;AAAA,EACT,WAAW;AAAA,EACX,kBAAkB;AAAA,EAClB,2BAA2B;AAAA,EAC3B,yBAAyB;AAAA,EACzB,QAAQ;AAAA,EACR,uBAAuB;AAAA,EACvB,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,sBAAsB;AAAA,EACtB,wBAAwB;AAAA,EACxB,kBAAkB;AAAA,EAClB,0BAA0B;AAAA,EAC1B,oBAAoB;AAAA,EACpB,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,mBAAmB;AAAA,EACnB,cAAc;AAAA,EACd,MAAM;AAAA,EACN,4BAA4B;AAAA,EAC5B,eAAe;AAAA,EACf,eAAe;AAAA,EACf,aAAa;AACf"}
@@ -38,6 +38,10 @@ export declare class SettingsStore {
38
38
  severity: import('@mui/types').OverridableStringUnion<import('@mui/material').AlertColor, import('@mui/material').AlertPropsColorOverrides> | undefined;
39
39
  };
40
40
  setSelectedRule: (rule?: TransactionRule) => void;
41
+ updatePassword: (params: {
42
+ new_password: string;
43
+ new_password_again: string;
44
+ }) => Promise<void>;
41
45
  updateDevice: (device: Device) => Promise<{
42
46
  success: boolean;
43
47
  }>;
@@ -1,12 +1,12 @@
1
- import { SettingsApi as n } from "../api/SettingsApi.es.js";
2
- import { TransactionApi as a } from "../api/TransactionApi.es.js";
1
+ import { SettingsApi as a } from "../api/SettingsApi.es.js";
2
+ import { TransactionApi as n } from "../api/TransactionApi.es.js";
3
3
  import { AccountNotificationTypes as o, BudgetNotificationTypes as c, InsightNotificationTypes as l } from "../types/Notification.es.js";
4
4
  import { augmentNotificationProfiles as u } from "../utils/SettingsUtil.es.js";
5
5
  import { makeAutoObservable as p, runInAction as r } from "mobx";
6
6
  var _ = class {
7
7
  globalStore;
8
- api = new n("/", "");
9
- transactionApi = new a("/", "");
8
+ api = new a("/", "");
9
+ transactionApi = new n("/", "");
10
10
  alert = {
11
11
  message: "",
12
12
  severity: void 0
@@ -15,19 +15,19 @@ var _ = class {
15
15
  notificationProfiles = [];
16
16
  selectedRule = void 0;
17
17
  transactionRules = [];
18
- constructor(e) {
19
- this.globalStore = e, this.api = new n(e.endpoint, e.sessionToken, e.onError), this.transactionApi = new a(e.endpoint, e.sessionToken, e.onError), p(this);
18
+ constructor(t) {
19
+ this.globalStore = t, this.api = new a(t.endpoint, t.sessionToken, t.onError), this.transactionApi = new n(t.endpoint, t.sessionToken, t.onError), p(this);
20
20
  }
21
21
  get accountProfiles() {
22
- const e = this.globalStore.appDataStore.clientCommunicationProfile;
23
- return this.detailedNotificationProfiles.filter((t) => t.notification_type === o.DebtPaymentReminder && e.debt_payment_reminder_notifications_enabled || t.notification_type === o.AccountBalanceLow && e.low_balance_notifications_enabled || t.notification_type === o.AccountDepositLarge && e.large_deposit_notifications_enabled || t.notification_type === o.TransactionExpenseLarge && e.large_expense_notifications_enabled || t.notification_type === o.TransactionFeeCharge && e.transaction_fee_notifications_enabled || t.notification_type === o.InternationalTransaction && e.transaction_is_international_notifications_enabled || t.notification_type === o.AccountDepositLargePosted && e.large_deposit_posted_notifications_enabled);
22
+ const t = this.globalStore.appDataStore.clientCommunicationProfile;
23
+ return this.detailedNotificationProfiles.filter((e) => e.notification_type === o.DebtPaymentReminder && t.debt_payment_reminder_notifications_enabled || e.notification_type === o.AccountBalanceLow && t.low_balance_notifications_enabled || e.notification_type === o.AccountDepositLarge && t.large_deposit_notifications_enabled || e.notification_type === o.TransactionExpenseLarge && t.large_expense_notifications_enabled || e.notification_type === o.TransactionFeeCharge && t.transaction_fee_notifications_enabled || e.notification_type === o.InternationalTransaction && t.transaction_is_international_notifications_enabled || e.notification_type === o.AccountDepositLargePosted && t.large_deposit_posted_notifications_enabled);
24
24
  }
25
25
  get budgetProfiles() {
26
- const e = this.globalStore.appDataStore.clientCommunicationProfile;
27
- return this.detailedNotificationProfiles.filter((t) => t.notification_type === c.BudgetExceeded && e.budget_exceeded_notifications_enabled || t.notification_type === c.BudgetOffTarget && e.budget_off_target_notifications_enabled);
26
+ const t = this.globalStore.appDataStore.clientCommunicationProfile;
27
+ return this.detailedNotificationProfiles.filter((e) => e.notification_type === c.BudgetExceeded && t.budget_exceeded_notifications_enabled || e.notification_type === c.BudgetOffTarget && t.budget_off_target_notifications_enabled);
28
28
  }
29
29
  get insightsProfiles() {
30
- return this.detailedNotificationProfiles.filter((e) => Object.values(l).includes(e.notification_type));
30
+ return this.detailedNotificationProfiles.filter((t) => Object.values(l).includes(t.notification_type));
31
31
  }
32
32
  get clientCommunicationProfile() {
33
33
  return this.globalStore.appDataStore.clientCommunicationProfile;
@@ -41,139 +41,146 @@ var _ = class {
41
41
  get userCommunicationsProfile() {
42
42
  return this.globalStore.appDataStore.userCommunicationProfile;
43
43
  }
44
- deleteDevice = async (e) => {
44
+ deleteDevice = async (t) => {
45
45
  try {
46
- await this.api.deleteDevice(e);
47
- const t = this.devices.findIndex((i) => i.guid === e);
48
- return t >= 0 && r(() => {
49
- this.devices.splice(t, 1);
46
+ await this.api.deleteDevice(t);
47
+ const e = this.devices.findIndex((i) => i.guid === t);
48
+ return e >= 0 && r(() => {
49
+ this.devices.splice(e, 1);
50
50
  }), { success: !0 };
51
- } catch (t) {
52
- return console.error("Error deleting device:", t), this.globalStore.captureException(t, { store: "SettingsStore" }), { success: !1 };
51
+ } catch (e) {
52
+ return console.error("Error deleting device:", e), this.globalStore.captureException(e, { store: "SettingsStore" }), { success: !1 };
53
53
  }
54
54
  };
55
55
  deleteTransactionRule = async () => {
56
56
  if (this.selectedRule)
57
57
  try {
58
58
  await this.transactionApi.removeTransactionRule(this.selectedRule?.guid), this.setAlert(this.copy.delete_rule_success, "success"), await this.loadTransactionRules();
59
- } catch (e) {
60
- console.error("Error deleting transaction rule:", e), this.globalStore.captureException(e, { store: "SettingsStore" }), this.setAlert(this.copy.delete_rule_error, "error");
59
+ } catch (t) {
60
+ console.error("Error deleting transaction rule:", t), this.globalStore.captureException(t, { store: "SettingsStore" }), this.setAlert(this.copy.delete_rule_error, "error");
61
61
  }
62
62
  };
63
63
  generateDeviceToken = async () => {
64
64
  try {
65
65
  return await this.api.generateDeviceToken();
66
- } catch (e) {
67
- console.error("Error generating device token:", e), this.globalStore.captureException(e, { store: "SettingsStore" });
66
+ } catch (t) {
67
+ console.error("Error generating device token:", t), this.globalStore.captureException(t, { store: "SettingsStore" });
68
68
  }
69
69
  };
70
70
  loadDevices = async () => {
71
71
  try {
72
- const e = await this.api.getDevices();
72
+ const t = await this.api.getDevices();
73
73
  r(() => {
74
- this.devices = e;
74
+ this.devices = t;
75
75
  });
76
- } catch (e) {
77
- console.error("Error loading devices:", e), this.globalStore.captureException(e, { store: "SettingsStore" });
76
+ } catch (t) {
77
+ console.error("Error loading devices:", t), this.globalStore.captureException(t, { store: "SettingsStore" });
78
78
  }
79
79
  };
80
80
  loadNotificationProfiles = async () => {
81
81
  try {
82
- const e = await this.api.getNotificationProfiles();
82
+ const t = await this.api.getNotificationProfiles();
83
83
  r(() => {
84
- this.notificationProfiles = e;
84
+ this.notificationProfiles = t;
85
85
  });
86
- } catch (e) {
87
- console.error("Error loading notification profiles:", e), this.globalStore.captureException(e, { store: "SettingsStore" });
86
+ } catch (t) {
87
+ console.error("Error loading notification profiles:", t), this.globalStore.captureException(t, { store: "SettingsStore" });
88
88
  }
89
89
  };
90
90
  loadTransactionRules = async () => {
91
91
  try {
92
- const e = await this.transactionApi.getTransactionRules();
92
+ const t = await this.transactionApi.getTransactionRules();
93
93
  r(() => {
94
- this.transactionRules = e;
94
+ this.transactionRules = t;
95
95
  });
96
- } catch (e) {
97
- console.error("Error loading transaction rules:", e), this.globalStore.captureException(e, { store: "SettingsStore" });
96
+ } catch (t) {
97
+ console.error("Error loading transaction rules:", t), this.globalStore.captureException(t, { store: "SettingsStore" });
98
98
  }
99
99
  };
100
100
  sendEmailVerification = async () => {
101
101
  try {
102
102
  await this.api.sendEmailVerification(), this.setAlert(this.copy.verification_sent_success, "success");
103
- } catch (e) {
104
- console.error("Error sending email verification:", e), this.globalStore.captureException(e, { store: "SettingsStore" }), this.setAlert(this.copy.verification_sent_error, "error");
103
+ } catch (t) {
104
+ console.error("Error sending email verification:", t), this.globalStore.captureException(t, { store: "SettingsStore" }), this.setAlert(this.copy.verification_sent_error, "error");
105
105
  }
106
106
  };
107
107
  sendPhoneVerification = async () => {
108
108
  try {
109
109
  await this.api.sendPhoneVerification(), this.setAlert(this.copy.verification_sent_success, "success");
110
- } catch (e) {
111
- console.error("Error sending phone verification:", e), this.globalStore.captureException(e, { store: "SettingsStore" }), this.setAlert(this.copy.verification_sent_error, "error");
110
+ } catch (t) {
111
+ console.error("Error sending phone verification:", t), this.globalStore.captureException(t, { store: "SettingsStore" }), this.setAlert(this.copy.verification_sent_error, "error");
112
112
  }
113
113
  };
114
- setAlert = (e, t = void 0) => this.alert = {
115
- message: e,
116
- severity: t
114
+ setAlert = (t, e = void 0) => this.alert = {
115
+ message: t,
116
+ severity: e
117
+ };
118
+ setSelectedRule = (t) => {
119
+ this.selectedRule = t;
117
120
  };
118
- setSelectedRule = (e) => {
119
- this.selectedRule = e;
121
+ updatePassword = async (t) => {
122
+ try {
123
+ await this.api.updatePassword(t), this.setAlert(this.copy.password_updated_success, "success");
124
+ } catch (e) {
125
+ console.error("Error updating password:", e), this.globalStore.captureException(e, { store: "SettingsStore" }), this.setAlert(this.copy.password_updated_error, "error");
126
+ }
120
127
  };
121
- updateDevice = async (e) => {
128
+ updateDevice = async (t) => {
122
129
  try {
123
- const t = await this.api.updateDevice(e), i = this.devices.findIndex((s) => s.guid === e.guid);
130
+ const e = await this.api.updateDevice(t), i = this.devices.findIndex((s) => s.guid === t.guid);
124
131
  return i >= 0 && r(() => {
125
- this.devices[i] = t;
132
+ this.devices[i] = e;
126
133
  }), { success: !0 };
127
- } catch (t) {
128
- return console.error("Error updating device:", t), this.globalStore.captureException(t, { store: "SettingsStore" }), { success: !1 };
134
+ } catch (e) {
135
+ return console.error("Error updating device:", e), this.globalStore.captureException(e, { store: "SettingsStore" }), { success: !1 };
129
136
  }
130
137
  };
131
- updateNotificationProfile = async (e) => {
138
+ updateNotificationProfile = async (t) => {
132
139
  try {
133
- const t = await this.api.updateNotificationProfile(e), i = this.notificationProfiles.findIndex((s) => s.guid === e.guid);
140
+ const e = await this.api.updateNotificationProfile(t), i = this.notificationProfiles.findIndex((s) => s.guid === t.guid);
134
141
  i >= 0 && r(() => {
135
- this.notificationProfiles[i] = t;
142
+ this.notificationProfiles[i] = e;
136
143
  });
137
- } catch (t) {
138
- console.error("Error updating notification profile:", t), this.globalStore.captureException(t, { store: "SettingsStore" });
144
+ } catch (e) {
145
+ console.error("Error updating notification profile:", e), this.globalStore.captureException(e, { store: "SettingsStore" });
139
146
  }
140
147
  };
141
- updateRuleCategory = async (e) => {
148
+ updateRuleCategory = async (t) => {
142
149
  try {
143
- await this.transactionApi.updateTransactionRule(e), await this.loadTransactionRules();
144
- } catch (t) {
145
- console.error("Error updating rule category:", t), this.globalStore.captureException(t, { store: "SettingsStore" });
150
+ await this.transactionApi.updateTransactionRule(t), await this.loadTransactionRules();
151
+ } catch (e) {
152
+ console.error("Error updating rule category:", e), this.globalStore.captureException(e, { store: "SettingsStore" });
146
153
  }
147
154
  };
148
- updateRulePayee = async (e) => {
155
+ updateRulePayee = async (t) => {
149
156
  try {
150
- await this.transactionApi.updateTransactionRule(e), this.setAlert(this.copy.edit_payee_success, "success"), await this.loadTransactionRules();
151
- } catch (t) {
152
- console.error("Error updating rule payee:", t), this.globalStore.captureException(t, { store: "SettingsStore" }), this.setAlert(this.copy.edit_payee_error, "error");
157
+ await this.transactionApi.updateTransactionRule(t), this.setAlert(this.copy.edit_payee_success, "success"), await this.loadTransactionRules();
158
+ } catch (e) {
159
+ console.error("Error updating rule payee:", e), this.globalStore.captureException(e, { store: "SettingsStore" }), this.setAlert(this.copy.edit_payee_error, "error");
153
160
  }
154
161
  };
155
- updateUser = async (e) => {
162
+ updateUser = async (t) => {
156
163
  try {
157
- await this.globalStore.userStore.updateUser(e), this.setAlert(this.copy.information_updated_success, "success");
164
+ await this.globalStore.userStore.updateUser(t), this.setAlert(this.copy.information_updated_success, "success");
158
165
  } catch {
159
166
  this.setAlert(this.copy.information_updated_error, "error");
160
167
  }
161
168
  };
162
- updateUserCommunicationProfile = async (e) => {
169
+ updateUserCommunicationProfile = async (t) => {
163
170
  try {
164
- const t = await this.api.updateUserCommunicationProfile(e);
165
- this.globalStore.appDataStore.setUserCommunicationProfile(t);
166
- } catch (t) {
167
- console.error("Error occurred while updating user communication profile:", t), this.globalStore.captureException(t, { store: "SettingsStore" });
171
+ const e = await this.api.updateUserCommunicationProfile(t);
172
+ this.globalStore.appDataStore.setUserCommunicationProfile(e);
173
+ } catch (e) {
174
+ console.error("Error occurred while updating user communication profile:", e), this.globalStore.captureException(e, { store: "SettingsStore" });
168
175
  }
169
176
  };
170
- verifyPhoneToken = async (e) => {
177
+ verifyPhoneToken = async (t) => {
171
178
  try {
172
- const { verified: t } = await this.api.verifyPhoneToken(e);
173
- if (!t) throw new Error();
179
+ const { verified: e } = await this.api.verifyPhoneToken(t);
180
+ if (!e) throw new Error();
174
181
  this.setAlert(this.copy.verified_phone_success, "success");
175
- } catch (t) {
176
- console.error("Error verifying phone token:", t), this.globalStore.captureException(t, { store: "SettingsStore" }), this.setAlert(this.copy.verified_phone_error, "error");
182
+ } catch (e) {
183
+ console.error("Error verifying phone token:", e), this.globalStore.captureException(e, { store: "SettingsStore" }), this.setAlert(this.copy.verified_phone_error, "error");
177
184
  }
178
185
  };
179
186
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SettingsStore.es.js","names":[],"sources":["../../../src/core/stores/SettingsStore.ts"],"sourcesContent":["import { makeAutoObservable, runInAction } from 'mobx'\n\nimport { AlertProps } from '@mui/material'\n\nimport {\n AccountNotificationTypes,\n BudgetNotificationTypes,\n InsightNotificationTypes,\n} from '../types'\n\nimport type {\n DetailedNotificationProfile,\n Device,\n NotificationProfile,\n SettingsCopy,\n TransactionRule,\n User,\n UserCommunicationProfile,\n} from '../types'\n\nimport { SettingsApi, TransactionApi } from '../api'\nimport { augmentNotificationProfiles } from '../utils/SettingsUtil'\n\nimport { GlobalStore } from './GlobalStore'\n\ninterface SettingsAlertProps {\n message: string\n severity: AlertProps['severity']\n}\n\nexport class SettingsStore {\n globalStore: GlobalStore\n api: SettingsApi = new SettingsApi('/', '')\n transactionApi: TransactionApi = new TransactionApi('/', '')\n\n alert: SettingsAlertProps = { message: '', severity: undefined }\n devices: Device[] = []\n notificationProfiles: NotificationProfile[] = []\n selectedRule: TransactionRule | undefined = undefined\n transactionRules: TransactionRule[] = []\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n this.api = new SettingsApi(globalStore.endpoint, globalStore.sessionToken, globalStore.onError)\n this.transactionApi = new TransactionApi(\n globalStore.endpoint,\n globalStore.sessionToken,\n globalStore.onError,\n )\n\n makeAutoObservable(this)\n }\n\n get accountProfiles() {\n const ccp = this.globalStore.appDataStore.clientCommunicationProfile\n\n // TODO: There has to be a better way to do this, but for now, it works\n return this.detailedNotificationProfiles.filter(\n (np) =>\n (np.notification_type === AccountNotificationTypes.DebtPaymentReminder &&\n ccp.debt_payment_reminder_notifications_enabled) ||\n (np.notification_type === AccountNotificationTypes.AccountBalanceLow &&\n ccp.low_balance_notifications_enabled) ||\n (np.notification_type === AccountNotificationTypes.AccountDepositLarge &&\n ccp.large_deposit_notifications_enabled) ||\n (np.notification_type === AccountNotificationTypes.TransactionExpenseLarge &&\n ccp.large_expense_notifications_enabled) ||\n (np.notification_type === AccountNotificationTypes.TransactionFeeCharge &&\n ccp.transaction_fee_notifications_enabled) ||\n (np.notification_type === AccountNotificationTypes.InternationalTransaction &&\n ccp.transaction_is_international_notifications_enabled) ||\n (np.notification_type === AccountNotificationTypes.AccountDepositLargePosted &&\n ccp.large_deposit_posted_notifications_enabled),\n )\n }\n\n get budgetProfiles() {\n const ccp = this.globalStore.appDataStore.clientCommunicationProfile\n\n // TODO: There has to be a better way to do this, but for now, it works\n return this.detailedNotificationProfiles.filter(\n (np) =>\n (np.notification_type === BudgetNotificationTypes.BudgetExceeded &&\n ccp.budget_exceeded_notifications_enabled) ||\n (np.notification_type === BudgetNotificationTypes.BudgetOffTarget &&\n ccp.budget_off_target_notifications_enabled),\n )\n }\n\n get insightsProfiles() {\n return this.detailedNotificationProfiles.filter((np) =>\n Object.values(InsightNotificationTypes).includes(np.notification_type),\n )\n }\n\n get clientCommunicationProfile() {\n return this.globalStore.appDataStore.clientCommunicationProfile\n }\n\n get copy(): SettingsCopy {\n return this.globalStore.copyStore.copy.settings\n }\n\n get detailedNotificationProfiles(): DetailedNotificationProfile[] {\n // Don't attempt to augment profile if global store is not initialized\n if (!this.globalStore.isInitialized) return []\n\n return augmentNotificationProfiles(\n this.globalStore.accountStore.accounts,\n this.clientCommunicationProfile,\n this.copy,\n this.notificationProfiles,\n this.userCommunicationsProfile,\n this.globalStore.userStore.user,\n )\n }\n\n get userCommunicationsProfile() {\n return this.globalStore.appDataStore.userCommunicationProfile\n }\n\n deleteDevice = async (guid: string) => {\n try {\n await this.api.deleteDevice(guid)\n\n const index = this.devices.findIndex((d) => d.guid === guid)\n if (index >= 0) {\n runInAction(() => {\n this.devices.splice(index, 1)\n })\n }\n\n return { success: true }\n } catch (error) {\n console.error('Error deleting device:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n return { success: false }\n }\n }\n\n deleteTransactionRule = async () => {\n if (!this.selectedRule) {\n return\n }\n try {\n await this.transactionApi.removeTransactionRule(this.selectedRule?.guid)\n this.setAlert(this.copy.delete_rule_success, 'success')\n await this.loadTransactionRules()\n } catch (error) {\n console.error('Error deleting transaction rule:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n this.setAlert(this.copy.delete_rule_error, 'error')\n }\n }\n\n generateDeviceToken = async () => {\n try {\n return await this.api.generateDeviceToken()\n } catch (error) {\n console.error('Error generating device token:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n }\n return undefined\n }\n\n loadDevices = async () => {\n try {\n const devices = await this.api.getDevices()\n\n runInAction(() => {\n this.devices = devices\n })\n } catch (error) {\n console.error('Error loading devices:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n }\n }\n\n loadNotificationProfiles = async () => {\n try {\n const profiles = await this.api.getNotificationProfiles()\n\n runInAction(() => {\n this.notificationProfiles = profiles\n })\n } catch (error) {\n console.error('Error loading notification profiles:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n }\n }\n\n loadTransactionRules = async () => {\n try {\n const rules = await this.transactionApi.getTransactionRules()\n\n runInAction(() => {\n this.transactionRules = rules\n })\n } catch (error) {\n console.error('Error loading transaction rules:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n }\n }\n\n sendEmailVerification = async () => {\n try {\n await this.api.sendEmailVerification()\n this.setAlert(this.copy.verification_sent_success, 'success')\n } catch (error) {\n console.error('Error sending email verification:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n this.setAlert(this.copy.verification_sent_error, 'error')\n }\n }\n\n sendPhoneVerification = async () => {\n try {\n await this.api.sendPhoneVerification()\n this.setAlert(this.copy.verification_sent_success, 'success')\n } catch (error) {\n console.error('Error sending phone verification:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n this.setAlert(this.copy.verification_sent_error, 'error')\n }\n }\n\n setAlert = (message: string, severity: SettingsAlertProps['severity'] = undefined) =>\n (this.alert = { message, severity })\n\n setSelectedRule = (rule?: TransactionRule) => {\n this.selectedRule = rule\n }\n\n updateDevice = async (device: Device) => {\n try {\n const updatedDevice = await this.api.updateDevice(device)\n\n const index = this.devices.findIndex((d) => d.guid === device.guid)\n if (index >= 0) {\n runInAction(() => {\n this.devices[index] = updatedDevice\n })\n }\n return { success: true }\n } catch (error) {\n console.error('Error updating device:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n return { success: false }\n }\n }\n\n updateNotificationProfile = async (profile: NotificationProfile) => {\n try {\n const updatedProfile = await this.api.updateNotificationProfile(profile)\n\n const index = this.notificationProfiles.findIndex((p) => p.guid === profile.guid)\n if (index >= 0) {\n runInAction(() => {\n this.notificationProfiles[index] = updatedProfile\n })\n }\n } catch (error) {\n console.error('Error updating notification profile:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n }\n }\n\n updateRuleCategory = async (rule: TransactionRule) => {\n try {\n await this.transactionApi.updateTransactionRule(rule)\n await this.loadTransactionRules()\n } catch (error) {\n console.error('Error updating rule category:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n }\n }\n\n updateRulePayee = async (rule: TransactionRule) => {\n try {\n await this.transactionApi.updateTransactionRule(rule)\n this.setAlert(this.copy.edit_payee_success, 'success')\n await this.loadTransactionRules()\n } catch (error) {\n console.error('Error updating rule payee:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n this.setAlert(this.copy.edit_payee_error, 'error')\n }\n }\n\n updateUser = async (user: User) => {\n try {\n await this.globalStore.userStore.updateUser(user)\n this.setAlert(this.copy.information_updated_success, 'success')\n } catch {\n // Error is already logged and captured in UserStore.updateUser\n this.setAlert(this.copy.information_updated_error, 'error')\n }\n }\n\n updateUserCommunicationProfile = async (profile: UserCommunicationProfile) => {\n try {\n const updatedProfile = await this.api.updateUserCommunicationProfile(profile)\n\n this.globalStore.appDataStore.setUserCommunicationProfile(updatedProfile)\n } catch (error) {\n console.error('Error occurred while updating user communication profile:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n }\n }\n\n verifyPhoneToken = async (sms_verification_token: string) => {\n try {\n const { verified } = await this.api.verifyPhoneToken(sms_verification_token)\n if (!verified) {\n throw new Error()\n }\n this.setAlert(this.copy.verified_phone_success, 'success')\n } catch (error) {\n console.error('Error verifying phone token:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n this.setAlert(this.copy.verified_phone_error, 'error')\n }\n }\n}\n"],"mappings":";;;;;AA8BA,IAAa,IAAb,MAA2B;AAAA,EACzB;AAAA,EACA,MAAmB,IAAI,EAAY,KAAK,EAAE;AAAA,EAC1C,iBAAiC,IAAI,EAAe,KAAK,EAAE;AAAA,EAE3D,QAA4B;AAAA,IAAE,SAAS;AAAA,IAAI,UAAU;AAAA,EAAU;AAAA,EAC/D,UAAoB,CAAC;AAAA,EACrB,uBAA8C,CAAC;AAAA,EAC/C,eAA4C;AAAA,EAC5C,mBAAsC,CAAC;AAAA,EAEvC,YAAY,GAA0B;AACpC,SAAK,cAAc,GACnB,KAAK,MAAM,IAAI,EAAY,EAAY,UAAU,EAAY,cAAc,EAAY,OAAO,GAC9F,KAAK,iBAAiB,IAAI,EACxB,EAAY,UACZ,EAAY,cACZ,EAAY,OACd,GAEA,EAAmB,IAAI;AAAA,EACzB;AAAA,EAEA,IAAI,kBAAkB;AACpB,UAAM,IAAM,KAAK,YAAY,aAAa;AAG1C,WAAO,KAAK,6BAA6B,OAAA,CACtC,MACE,EAAG,sBAAsB,EAAyB,uBACjD,EAAI,+CACL,EAAG,sBAAsB,EAAyB,qBACjD,EAAI,qCACL,E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C,GACnE,KAAK,SAAS,KAAK,KAAK,kBAAkB,OAAO;AAAA,IACnD;AAAA,EACF;AAAA,EAEA,aAAa,OAAO,MAAe;AACjC,QAAI;AACF,YAAM,KAAK,YAAY,UAAU,WAAW,CAAI,GAChD,KAAK,SAAS,KAAK,KAAK,6BAA6B,SAAS;AAAA,IAChE,QAAQ;AAEN,WAAK,SAAS,KAAK,KAAK,2BAA2B,OAAO;AAAA,IAC5D;AAAA,EACF;AAAA,EAEA,iCAAiC,OAAO,MAAsC;AAC5E,QAAI;AACF,YAAM,IAAiB,MAAM,KAAK,IAAI,+BAA+B,CAAO;AAE5E,WAAK,YAAY,aAAa,4BAA4B,CAAc;AAAA,IAC1E,SAAS,GAAO;AACd,cAAQ,MAAM,6DAA6D,CAAK,GAChF,KAAK,YAAY,iBAAiB,GAAO,EAAE,OAAO,gBAAgB,CAAC;AAAA,IACrE;AAAA,EACF;AAAA,EAEA,mBAAmB,OAAO,MAAmC;AAC3D,QAAI;AACF,YAAM,EAAE,UAAA,EAAA,IAAa,MAAM,KAAK,IAAI,iBAAiB,CAAsB;AAC3E,UAAI,CAAC,EACH,OAAM,IAAI,MAAM;AAElB,WAAK,SAAS,KAAK,KAAK,wBAAwB,SAAS;AAAA,IAC3D,SAAS,GAAO;AACd,cAAQ,MAAM,gCAAgC,CAAK,GACnD,KAAK,YAAY,iBAAiB,GAAO,EAAE,OAAO,gBAAgB,CAAC,GACnE,KAAK,SAAS,KAAK,KAAK,sBAAsB,OAAO;AAAA,IACvD;AAAA,EACF;AACF"}
1
+ {"version":3,"file":"SettingsStore.es.js","names":[],"sources":["../../../src/core/stores/SettingsStore.ts"],"sourcesContent":["import { makeAutoObservable, runInAction } from 'mobx'\n\nimport { AlertProps } from '@mui/material'\n\nimport {\n AccountNotificationTypes,\n BudgetNotificationTypes,\n InsightNotificationTypes,\n} from '../types'\n\nimport type {\n DetailedNotificationProfile,\n Device,\n NotificationProfile,\n SettingsCopy,\n TransactionRule,\n User,\n UserCommunicationProfile,\n} from '../types'\n\nimport { SettingsApi, TransactionApi } from '../api'\nimport { augmentNotificationProfiles } from '../utils/SettingsUtil'\n\nimport { GlobalStore } from './GlobalStore'\n\ninterface SettingsAlertProps {\n message: string\n severity: AlertProps['severity']\n}\n\nexport class SettingsStore {\n globalStore: GlobalStore\n api: SettingsApi = new SettingsApi('/', '')\n transactionApi: TransactionApi = new TransactionApi('/', '')\n\n alert: SettingsAlertProps = { message: '', severity: undefined }\n devices: Device[] = []\n notificationProfiles: NotificationProfile[] = []\n selectedRule: TransactionRule | undefined = undefined\n transactionRules: TransactionRule[] = []\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n this.api = new SettingsApi(globalStore.endpoint, globalStore.sessionToken, globalStore.onError)\n this.transactionApi = new TransactionApi(\n globalStore.endpoint,\n globalStore.sessionToken,\n globalStore.onError,\n )\n\n makeAutoObservable(this)\n }\n\n get accountProfiles() {\n const ccp = this.globalStore.appDataStore.clientCommunicationProfile\n\n // TODO: There has to be a better way to do this, but for now, it works\n return this.detailedNotificationProfiles.filter(\n (np) =>\n (np.notification_type === AccountNotificationTypes.DebtPaymentReminder &&\n ccp.debt_payment_reminder_notifications_enabled) ||\n (np.notification_type === AccountNotificationTypes.AccountBalanceLow &&\n ccp.low_balance_notifications_enabled) ||\n (np.notification_type === AccountNotificationTypes.AccountDepositLarge &&\n ccp.large_deposit_notifications_enabled) ||\n (np.notification_type === AccountNotificationTypes.TransactionExpenseLarge &&\n ccp.large_expense_notifications_enabled) ||\n (np.notification_type === AccountNotificationTypes.TransactionFeeCharge &&\n ccp.transaction_fee_notifications_enabled) ||\n (np.notification_type === AccountNotificationTypes.InternationalTransaction &&\n ccp.transaction_is_international_notifications_enabled) ||\n (np.notification_type === AccountNotificationTypes.AccountDepositLargePosted &&\n ccp.large_deposit_posted_notifications_enabled),\n )\n }\n\n get budgetProfiles() {\n const ccp = this.globalStore.appDataStore.clientCommunicationProfile\n\n // TODO: There has to be a better way to do this, but for now, it works\n return this.detailedNotificationProfiles.filter(\n (np) =>\n (np.notification_type === BudgetNotificationTypes.BudgetExceeded &&\n ccp.budget_exceeded_notifications_enabled) ||\n (np.notification_type === BudgetNotificationTypes.BudgetOffTarget &&\n ccp.budget_off_target_notifications_enabled),\n )\n }\n\n get insightsProfiles() {\n return this.detailedNotificationProfiles.filter((np) =>\n Object.values(InsightNotificationTypes).includes(np.notification_type),\n )\n }\n\n get clientCommunicationProfile() {\n return this.globalStore.appDataStore.clientCommunicationProfile\n }\n\n get copy(): SettingsCopy {\n return this.globalStore.copyStore.copy.settings\n }\n\n get detailedNotificationProfiles(): DetailedNotificationProfile[] {\n // Don't attempt to augment profile if global store is not initialized\n if (!this.globalStore.isInitialized) return []\n\n return augmentNotificationProfiles(\n this.globalStore.accountStore.accounts,\n this.clientCommunicationProfile,\n this.copy,\n this.notificationProfiles,\n this.userCommunicationsProfile,\n this.globalStore.userStore.user,\n )\n }\n\n get userCommunicationsProfile() {\n return this.globalStore.appDataStore.userCommunicationProfile\n }\n\n deleteDevice = async (guid: string) => {\n try {\n await this.api.deleteDevice(guid)\n\n const index = this.devices.findIndex((d) => d.guid === guid)\n if (index >= 0) {\n runInAction(() => {\n this.devices.splice(index, 1)\n })\n }\n\n return { success: true }\n } catch (error) {\n console.error('Error deleting device:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n return { success: false }\n }\n }\n\n deleteTransactionRule = async () => {\n if (!this.selectedRule) {\n return\n }\n try {\n await this.transactionApi.removeTransactionRule(this.selectedRule?.guid)\n this.setAlert(this.copy.delete_rule_success, 'success')\n await this.loadTransactionRules()\n } catch (error) {\n console.error('Error deleting transaction rule:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n this.setAlert(this.copy.delete_rule_error, 'error')\n }\n }\n\n generateDeviceToken = async () => {\n try {\n return await this.api.generateDeviceToken()\n } catch (error) {\n console.error('Error generating device token:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n }\n return undefined\n }\n\n loadDevices = async () => {\n try {\n const devices = await this.api.getDevices()\n\n runInAction(() => {\n this.devices = devices\n })\n } catch (error) {\n console.error('Error loading devices:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n }\n }\n\n loadNotificationProfiles = async () => {\n try {\n const profiles = await this.api.getNotificationProfiles()\n\n runInAction(() => {\n this.notificationProfiles = profiles\n })\n } catch (error) {\n console.error('Error loading notification profiles:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n }\n }\n\n loadTransactionRules = async () => {\n try {\n const rules = await this.transactionApi.getTransactionRules()\n\n runInAction(() => {\n this.transactionRules = rules\n })\n } catch (error) {\n console.error('Error loading transaction rules:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n }\n }\n\n sendEmailVerification = async () => {\n try {\n await this.api.sendEmailVerification()\n this.setAlert(this.copy.verification_sent_success, 'success')\n } catch (error) {\n console.error('Error sending email verification:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n this.setAlert(this.copy.verification_sent_error, 'error')\n }\n }\n\n sendPhoneVerification = async () => {\n try {\n await this.api.sendPhoneVerification()\n this.setAlert(this.copy.verification_sent_success, 'success')\n } catch (error) {\n console.error('Error sending phone verification:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n this.setAlert(this.copy.verification_sent_error, 'error')\n }\n }\n\n setAlert = (message: string, severity: SettingsAlertProps['severity'] = undefined) =>\n (this.alert = { message, severity })\n\n setSelectedRule = (rule?: TransactionRule) => {\n this.selectedRule = rule\n }\n\n updatePassword = async (params: { new_password: string; new_password_again: string }) => {\n try {\n await this.api.updatePassword(params)\n this.setAlert(this.copy.password_updated_success, 'success')\n } catch (error) {\n console.error('Error updating password:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n this.setAlert(this.copy.password_updated_error, 'error')\n }\n }\n\n updateDevice = async (device: Device) => {\n try {\n const updatedDevice = await this.api.updateDevice(device)\n\n const index = this.devices.findIndex((d) => d.guid === device.guid)\n if (index >= 0) {\n runInAction(() => {\n this.devices[index] = updatedDevice\n })\n }\n return { success: true }\n } catch (error) {\n console.error('Error updating device:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n return { success: false }\n }\n }\n\n updateNotificationProfile = async (profile: NotificationProfile) => {\n try {\n const updatedProfile = await this.api.updateNotificationProfile(profile)\n\n const index = this.notificationProfiles.findIndex((p) => p.guid === profile.guid)\n if (index >= 0) {\n runInAction(() => {\n this.notificationProfiles[index] = updatedProfile\n })\n }\n } catch (error) {\n console.error('Error updating notification profile:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n }\n }\n\n updateRuleCategory = async (rule: TransactionRule) => {\n try {\n await this.transactionApi.updateTransactionRule(rule)\n await this.loadTransactionRules()\n } catch (error) {\n console.error('Error updating rule category:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n }\n }\n\n updateRulePayee = async (rule: TransactionRule) => {\n try {\n await this.transactionApi.updateTransactionRule(rule)\n this.setAlert(this.copy.edit_payee_success, 'success')\n await this.loadTransactionRules()\n } catch (error) {\n console.error('Error updating rule payee:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n this.setAlert(this.copy.edit_payee_error, 'error')\n }\n }\n\n updateUser = async (user: User) => {\n try {\n await this.globalStore.userStore.updateUser(user)\n this.setAlert(this.copy.information_updated_success, 'success')\n } catch {\n // Error is already logged and captured in UserStore.updateUser\n this.setAlert(this.copy.information_updated_error, 'error')\n }\n }\n\n updateUserCommunicationProfile = async (profile: UserCommunicationProfile) => {\n try {\n const updatedProfile = await this.api.updateUserCommunicationProfile(profile)\n\n this.globalStore.appDataStore.setUserCommunicationProfile(updatedProfile)\n } catch (error) {\n console.error('Error occurred while updating user communication profile:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n }\n }\n\n verifyPhoneToken = async (sms_verification_token: string) => {\n try {\n const { verified } = await this.api.verifyPhoneToken(sms_verification_token)\n if (!verified) {\n throw new Error()\n }\n this.setAlert(this.copy.verified_phone_success, 'success')\n } catch (error) {\n console.error('Error verifying phone token:', error)\n this.globalStore.captureException(error, { store: 'SettingsStore' })\n this.setAlert(this.copy.verified_phone_error, 'error')\n }\n }\n}\n"],"mappings":";;;;;AA8BA,IAAa,IAAb,MAA2B;AAAA,EACzB;AAAA,EACA,MAAmB,IAAI,EAAY,KAAK,EAAE;AAAA,EAC1C,iBAAiC,IAAI,EAAe,KAAK,EAAE;AAAA,EAE3D,QAA4B;AAAA,IAAE,SAAS;AAAA,IAAI,UAAU;AAAA,EAAU;AAAA,EAC/D,UAAoB,CAAC;AAAA,EACrB,uBAA8C,CAAC;AAAA,EAC/C,eAA4C;AAAA,EAC5C,mBAAsC,CAAC;AAAA,EAEvC,YAAY,GAA0B;AACpC,SAAK,cAAc,GACnB,KAAK,MAAM,IAAI,EAAY,EAAY,UAAU,EAAY,cAAc,EAAY,OAAO,GAC9F,KAAK,iBAAiB,IAAI,EACxB,EAAY,UACZ,EAAY,cACZ,EAAY,OACd,GAEA,EAAmB,IAAI;AAAA,EACzB;AAAA,EAEA,IAAI,kBAAkB;AACpB,UAAM,IAAM,KAAK,YAAY,aAAa;AAG1C,WAAO,KAAK,6BAA6B,OAAA,CACtC,MACE,EAAG,sBAAsB,EAAyB,uBACjD,EAAI,+CACL,EAAG,sBAAsB,EAAyB,qBACjD,EAAI,qCACL,EAAG,sBAAsB,EAAyB,uBACjD,EAAI,uCACL,EAAG,sBAAsB,EAAyB,2BACjD,EAAI,uCACL,EAAG,sBAAsB,EAAyB,wBACjD,EAAI,yCACL,EAAG,sBAAsB,EAAyB,4BACjD,EAAI,sDACL,EAAG,sBAAsB,EAAyB,6BACjD,EAAI,0CACV;AAAA,EACF;AAAA,EAEA,IAAI,iBAAiB;AACnB,UAAM,IAAM,KAAK,YAAY,aAAa;AAG1C,WAAO,KAAK,6BAA6B,OAAA,CACtC,MACE,EAAG,sBAAsB,EAAwB,kBAChD,EAAI,yCACL,EAAG,sBAAsB,EAAwB,mBAChD,EAAI,uCACV;AAAA,E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AACjC,QAAI;AACF,YAAM,KAAK,YAAY,UAAU,WAAW,CAAI,GAChD,KAAK,SAAS,KAAK,KAAK,6BAA6B,SAAS;AAAA,IAChE,QAAQ;AAEN,WAAK,SAAS,KAAK,KAAK,2BAA2B,OAAO;AAAA,IAC5D;AAAA,EACF;AAAA,EAEA,iCAAiC,OAAO,MAAsC;AAC5E,QAAI;AACF,YAAM,IAAiB,MAAM,KAAK,IAAI,+BAA+B,CAAO;AAE5E,WAAK,YAAY,aAAa,4BAA4B,CAAc;AAAA,IAC1E,SAAS,GAAO;AACd,cAAQ,MAAM,6DAA6D,CAAK,GAChF,KAAK,YAAY,iBAAiB,GAAO,EAAE,OAAO,gBAAgB,CAAC;AAAA,IACrE;AAAA,EACF;AAAA,EAEA,mBAAmB,OAAO,MAAmC;AAC3D,QAAI;AACF,YAAM,EAAE,UAAA,EAAA,IAAa,MAAM,KAAK,IAAI,iBAAiB,CAAsB;AAC3E,UAAI,CAAC,EACH,OAAM,IAAI,MAAM;AAElB,WAAK,SAAS,KAAK,KAAK,wBAAwB,SAAS;AAAA,IAC3D,SAAS,GAAO;AACd,cAAQ,MAAM,gCAAgC,CAAK,GACnD,KAAK,YAAY,iBAAiB,GAAO,EAAE,OAAO,gBAAgB,CAAC,GACnE,KAAK,SAAS,KAAK,KAAK,sBAAsB,OAAO;AAAA,IACvD;AAAA,EACF;AACF"}
@@ -6,6 +6,7 @@ export interface SettingsCopy {
6
6
  budgets_subtitle: string;
7
7
  budgets_title: string;
8
8
  category: string;
9
+ confirm_new_password: string;
9
10
  confirm_email: string;
10
11
  confirm_phone: string;
11
12
  confirm_your_email: string;
@@ -84,9 +85,13 @@ export interface SettingsCopy {
84
85
  notification_transaction_fee: string;
85
86
  notification_transaction_is_international: string;
86
87
  notifications_label: string;
88
+ password_updated_error: string;
89
+ password_updated_success: string;
87
90
  payee: string;
88
91
  personal_details: string;
89
92
  profile_label: string;
93
+ reset_password: string;
94
+ save_password: string;
90
95
  select_category: string;
91
96
  send_verification: string;
92
97
  title: string;
@@ -103,6 +108,7 @@ export interface SettingsCopy {
103
108
  verify_email: string;
104
109
  verify_phone: string;
105
110
  zip_code: string;
111
+ new_password: string;
106
112
  notification_types_title: string;
107
113
  large_transaction: string;
108
114
  account_balance_low: string;
@@ -1,49 +1,48 @@
1
- import { useAppConfig as p, useGlobalCopyStore as u } from "../common/context/hooks.es.js";
1
+ import { useAppConfig as d, useGlobalCopyStore as p } from "../common/context/hooks.es.js";
2
2
  import { useScreenSize as g } from "../common/hooks/useScreenSize.es.js";
3
- import { GlobalAccountFilter as h } from "../common/components/GlobalAccountFilter.es.js";
4
- import _ from "../common/components/ConnectDrawer.es.js";
5
- import w from "../common/components/addaccounts/AddAccounts.es.js";
3
+ import { GlobalAccountFilter as u } from "../common/components/GlobalAccountFilter.es.js";
4
+ import h from "../common/components/ConnectDrawer.es.js";
5
+ import _ from "../common/components/addaccounts/AddAccounts.es.js";
6
6
  import s from "react";
7
7
  import { observer as C } from "mobx-react-lite";
8
8
  import n from "@mui/material/Stack";
9
- import { H2 as x, P as v } from "@mxenabled/mxui";
10
- import b from "@mui/material/Paper";
9
+ import { H2 as w, P as v } from "@mxenabled/mxui";
10
+ import x from "@mui/material/Paper";
11
11
  import { jsx as e, jsxs as r } from "react/jsx-runtime";
12
- import { useMediaQuery as y } from "@mui/system";
13
- var S = () => {
14
- const [i, c] = s.useState(!1), m = y("(max-width:320px)"), { common: o, connect: l } = u(), { config: a } = p(), { isMobile: f } = g(), d = () => {
12
+ var b = () => {
13
+ const [i, c] = s.useState(!1), { common: o, connect: m } = p(), { config: l } = d(), { isMobile: a } = g(), f = () => {
15
14
  const t = (/* @__PURE__ */ new Date()).getHours();
16
15
  return t > 1 && t < 12 ? o.good_morning : t >= 12 && t < 18 ? o.good_afternoon : o.good_evening;
17
16
  };
18
- return /* @__PURE__ */ r(s.Fragment, { children: [/* @__PURE__ */ e(b, {
17
+ return /* @__PURE__ */ r(s.Fragment, { children: [/* @__PURE__ */ e(x, {
19
18
  sx: {
20
19
  gap: 12,
21
- mb: f ? 24 : 0,
20
+ mb: a ? 24 : 0,
22
21
  p: 24
23
22
  },
24
23
  children: /* @__PURE__ */ r(n, {
25
24
  alignItems: "center",
26
25
  flexDirection: "row",
27
26
  justifyContent: "space-between",
28
- children: [/* @__PURE__ */ r(n, { children: [/* @__PURE__ */ e(x, {
29
- variant: m ? "h2" : "h1",
30
- children: d()
27
+ children: [/* @__PURE__ */ r(n, { children: [/* @__PURE__ */ e(w, {
28
+ variant: "h3",
29
+ children: f()
31
30
  }), /* @__PURE__ */ e(v, {
32
31
  color: "text.secondary",
33
32
  children: o.heres_your_spending_overview
34
33
  })] }), /* @__PURE__ */ r(n, {
35
34
  flexDirection: "row",
36
- children: [a.show_connections_widget_in_master && /* @__PURE__ */ e(w, { handleConnectClick: () => c(!0) }), /* @__PURE__ */ e(h, {})]
35
+ children: [l.show_connections_widget_in_master && /* @__PURE__ */ e(_, { handleConnectClick: () => c(!0) }), /* @__PURE__ */ e(u, {})]
37
36
  })]
38
37
  })
39
- }), i && /* @__PURE__ */ e(_, {
38
+ }), i && /* @__PURE__ */ e(h, {
40
39
  onClose: () => c(!1),
41
40
  showConnectWidget: i,
42
- title: l.mini_title
41
+ title: m.mini_title
43
42
  })] });
44
- }, Q = C(S);
43
+ }, z = C(b);
45
44
  export {
46
- Q as default
45
+ z as default
47
46
  };
48
47
 
49
48
  //# sourceMappingURL=Greeting.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Greeting.es.js","names":[],"sources":["../../src/dashboard/Greeting.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Stack from '@mui/material/Stack'\nimport Paper from '@mui/material/Paper'\n\nimport { H2, P } from '@mxenabled/mxui'\nimport { useMediaQuery } from '@mui/system'\n\nimport { ConnectDrawer, useAppConfig, useGlobalCopyStore, useScreenSize } from '../common'\n\nimport AddAccounts from '../common/components/addaccounts/AddAccounts'\nimport { GlobalAccountFilter } from '../common/components/GlobalAccountFilter'\n\nconst Greeting = () => {\n const [showConnectWidget, setShowConnectWidget] = React.useState(false)\n\n const isSmallMobileDevice = useMediaQuery('(max-width:320px)')\n\n const { common: commonCopy, connect: connectCopy } = useGlobalCopyStore()\n const { config } = useAppConfig()\n const { isMobile } = useScreenSize()\n\n const getGreeting = () => {\n const now = new Date()\n const hour = now.getHours()\n\n if (hour > 1 && hour < 12) {\n return commonCopy.good_morning\n } else if (hour >= 12 && hour < 18) {\n return commonCopy.good_afternoon\n } else {\n return commonCopy.good_evening\n }\n }\n\n return (\n <React.Fragment>\n <Paper sx={{ gap: 12, mb: isMobile ? 24 : 0, p: 24 }}>\n <Stack alignItems=\"center\" flexDirection=\"row\" justifyContent=\"space-between\">\n <Stack>\n <H2 variant={isSmallMobileDevice ? 'h2' : 'h1'}>{getGreeting()}</H2>\n <P color=\"text.secondary\">{commonCopy.heres_your_spending_overview}</P>\n </Stack>\n <Stack flexDirection=\"row\">\n {config.show_connections_widget_in_master && (\n <AddAccounts handleConnectClick={() => setShowConnectWidget(true)} />\n )}\n <GlobalAccountFilter />\n </Stack>\n </Stack>\n </Paper>\n {showConnectWidget && (\n <ConnectDrawer\n onClose={() => setShowConnectWidget(false)}\n showConnectWidget={showConnectWidget}\n title={connectCopy.mini_title}\n />\n )}\n </React.Fragment>\n )\n}\n\nexport default observer(Greeting)\n"],"mappings":";;;;;;;;;;;;AAcA,IAAM,IAAA,MAAiB;AACrB,QAAM,CAAC,GAAmB,CAAA,IAAwB,EAAM,SAAS,EAAK,GAEhE,IAAsB,EAAc,mBAAmB,GAEvD,EAAE,QAAQ,GAAY,SAAS,EAAA,IAAgB,EAAmB,GAClE,EAAE,QAAA,EAAA,IAAW,EAAa,GAC1B,EAAE,UAAA,EAAA,IAAa,EAAc,GAE7B,IAAA,MAAoB;AAExB,UAAM,KAAO,oBADG,KACH,GAAI,SAAS;AAE1B,WAAI,IAAO,KAAK,IAAO,KACd,EAAW,eACT,KAAQ,MAAM,IAAO,KACvB,EAAW,iBAEX,EAAW;AAAA,EAEtB;AAEA,SACE,gBAAA,EAAC,EAAM,UAAP,EAAA,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI;AAAA,MAAE,KAAK;AAAA,MAAI,IAAI,IAAW,KAAK;AAAA,MAAG,GAAG;AAAA,IAAG;AAAA,IACjD,UAAA,gBAAA,EAAC,GAAD;AAAA,MAAO,YAAW;AAAA,MAAS,eAAc;AAAA,MAAM,gBAAe;AAAA,MAA9D,UAAA,CACE,gBAAA,EAAC,GAAD,EAAA,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,QAAI,SAAS,IAAsB,OAAO;AAAA,QAAO,UAAA,EAAY;AAAA,MAAM,CAAA,GACnE,gBAAA,EAAC,GAAD;AAAA,QAAG,OAAM;AAAA,QAAkB,UAAA,EAAW;AAAA,MAAgC,CAAA,CACjE,EAAA,CAAA,GACP,gBAAA,EAAC,GAAD;AAAA,QAAO,eAAc;AAAA,QAArB,UAAA,CACG,EAAO,qCACN,gBAAA,EAAC,GAAD,EAAa,oBAAA,MAA0B,EAAqB,EAAI,EAAI,CAAA,GAEtE,gBAAA,EAAC,GAAD,CAAsB,CAAA,CACjB;AAAA,MACF,CAAA,CAAA;AAAA;EACF,CAAA,GACN,KACC,gBAAA,EAAC,GAAD;AAAA,IACE,SAAA,MAAe,EAAqB,EAAK;AAAA,IACtB,mBAAA;AAAA,IACnB,OAAO,EAAY;AAAA,EACpB,CAAA,CAEW,EAAA,CAAA;AAEpB,GAEA,IAAe,EAAS,CAAQ"}
1
+ {"version":3,"file":"Greeting.es.js","names":[],"sources":["../../src/dashboard/Greeting.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Stack from '@mui/material/Stack'\nimport Paper from '@mui/material/Paper'\n\nimport { H2, P } from '@mxenabled/mxui'\n\nimport { ConnectDrawer, useAppConfig, useGlobalCopyStore, useScreenSize } from '../common'\n\nimport AddAccounts from '../common/components/addaccounts/AddAccounts'\nimport { GlobalAccountFilter } from '../common/components/GlobalAccountFilter'\n\nconst Greeting = () => {\n const [showConnectWidget, setShowConnectWidget] = React.useState(false)\n\n const { common: commonCopy, connect: connectCopy } = useGlobalCopyStore()\n const { config } = useAppConfig()\n const { isMobile } = useScreenSize()\n\n const getGreeting = () => {\n const now = new Date()\n const hour = now.getHours()\n\n if (hour > 1 && hour < 12) {\n return commonCopy.good_morning\n } else if (hour >= 12 && hour < 18) {\n return commonCopy.good_afternoon\n } else {\n return commonCopy.good_evening\n }\n }\n\n return (\n <React.Fragment>\n <Paper sx={{ gap: 12, mb: isMobile ? 24 : 0, p: 24 }}>\n <Stack alignItems=\"center\" flexDirection=\"row\" justifyContent=\"space-between\">\n <Stack>\n <H2 variant=\"h3\">{getGreeting()}</H2>\n <P color=\"text.secondary\">{commonCopy.heres_your_spending_overview}</P>\n </Stack>\n <Stack flexDirection=\"row\">\n {config.show_connections_widget_in_master && (\n <AddAccounts handleConnectClick={() => setShowConnectWidget(true)} />\n )}\n <GlobalAccountFilter />\n </Stack>\n </Stack>\n </Paper>\n {showConnectWidget && (\n <ConnectDrawer\n onClose={() => setShowConnectWidget(false)}\n showConnectWidget={showConnectWidget}\n title={connectCopy.mini_title}\n />\n )}\n </React.Fragment>\n )\n}\n\nexport default observer(Greeting)\n"],"mappings":";;;;;;;;;;;AAaA,IAAM,IAAA,MAAiB;AACrB,QAAM,CAAC,GAAmB,CAAA,IAAwB,EAAM,SAAS,EAAK,GAEhE,EAAE,QAAQ,GAAY,SAAS,EAAA,IAAgB,EAAmB,GAClE,EAAE,QAAA,EAAA,IAAW,EAAa,GAC1B,EAAE,UAAA,EAAA,IAAa,EAAc,GAE7B,IAAA,MAAoB;AAExB,UAAM,KAAO,oBADG,KACH,GAAI,SAAS;AAE1B,WAAI,IAAO,KAAK,IAAO,KACd,EAAW,eACT,KAAQ,MAAM,IAAO,KACvB,EAAW,iBAEX,EAAW;AAAA,EAEtB;AAEA,SACE,gBAAA,EAAC,EAAM,UAAP,EAAA,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI;AAAA,MAAE,KAAK;AAAA,MAAI,IAAI,IAAW,KAAK;AAAA,MAAG,GAAG;AAAA,IAAG;AAAA,IACjD,UAAA,gBAAA,EAAC,GAAD;AAAA,MAAO,YAAW;AAAA,MAAS,eAAc;AAAA,MAAM,gBAAe;AAAA,MAA9D,UAAA,CACE,gBAAA,EAAC,GAAD,EAAA,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,QAAI,SAAQ;AAAA,QAAM,UAAA,EAAY;AAAA,MAAM,CAAA,GACpC,gBAAA,EAAC,GAAD;AAAA,QAAG,OAAM;AAAA,QAAkB,UAAA,EAAW;AAAA,MAAgC,CAAA,CACjE,EAAA,CAAA,GACP,gBAAA,EAAC,GAAD;AAAA,QAAO,eAAc;AAAA,QAArB,UAAA,CACG,EAAO,qCACN,gBAAA,EAAC,GAAD,EAAa,oBAAA,MAA0B,EAAqB,EAAI,EAAI,CAAA,GAEtE,gBAAA,EAAC,GAAD,CAAsB,CAAA,CACjB;AAAA,MACF,CAAA,CAAA;AAAA;EACF,CAAA,GACN,KACC,gBAAA,EAAC,GAAD;AAAA,IACE,SAAA,MAAe,EAAqB,EAAK;AAAA,IACtB,mBAAA;AAAA,IACnB,OAAO,EAAY;AAAA,EACpB,CAAA,CAEW,EAAA,CAAA;AAEpB,GAEA,IAAe,EAAS,CAAQ"}
@@ -1,7 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  interface ProfileFormProps {
3
3
  availableWidth?: number;
4
- handleOnLeavClick?: () => void;
4
+ handleOnLeaveClick?: () => void;
5
5
  }
6
6
  declare const _default: React.FunctionComponent<ProfileFormProps>;
7
7
  export default _default;