@mx-cartographer/experiences 9.6.9 → 9.6.11

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 (47) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/core/stores/AccountStore.d.ts +1 -0
  3. package/dist/core/stores/AccountStore.es.js +47 -42
  4. package/dist/core/stores/AccountStore.es.js.map +1 -1
  5. package/dist/core/stores/AppDataStore.d.ts +1 -0
  6. package/dist/core/stores/AppDataStore.es.js +15 -11
  7. package/dist/core/stores/AppDataStore.es.js.map +1 -1
  8. package/dist/core/stores/BeatStore.d.ts +1 -0
  9. package/dist/core/stores/BeatStore.es.js +10 -6
  10. package/dist/core/stores/BeatStore.es.js.map +1 -1
  11. package/dist/core/stores/BudgetsStore.d.ts +1 -0
  12. package/dist/core/stores/BudgetsStore.es.js +37 -35
  13. package/dist/core/stores/BudgetsStore.es.js.map +1 -1
  14. package/dist/core/stores/CategoryStore.d.ts +1 -0
  15. package/dist/core/stores/CategoryStore.es.js +36 -32
  16. package/dist/core/stores/CategoryStore.es.js.map +1 -1
  17. package/dist/core/stores/FinstrongStore.d.ts +1 -0
  18. package/dist/core/stores/FinstrongStore.es.js +42 -38
  19. package/dist/core/stores/FinstrongStore.es.js.map +1 -1
  20. package/dist/core/stores/GlobalCopyStore.d.ts +1 -0
  21. package/dist/core/stores/GlobalCopyStore.es.js +17 -13
  22. package/dist/core/stores/GlobalCopyStore.es.js.map +1 -1
  23. package/dist/core/stores/GoalStore.d.ts +1 -0
  24. package/dist/core/stores/GoalStore.es.js +104 -100
  25. package/dist/core/stores/GoalStore.es.js.map +1 -1
  26. package/dist/core/stores/HelpStore.d.ts +1 -0
  27. package/dist/core/stores/HelpStore.es.js +10 -6
  28. package/dist/core/stores/HelpStore.es.js.map +1 -1
  29. package/dist/core/stores/HoldingStore.d.ts +1 -0
  30. package/dist/core/stores/HoldingStore.es.js +6 -2
  31. package/dist/core/stores/HoldingStore.es.js.map +1 -1
  32. package/dist/core/stores/NetWorthStore.d.ts +1 -0
  33. package/dist/core/stores/NetWorthStore.es.js +12 -8
  34. package/dist/core/stores/NetWorthStore.es.js.map +1 -1
  35. package/dist/core/stores/NotificationStore.d.ts +1 -0
  36. package/dist/core/stores/NotificationStore.es.js +11 -7
  37. package/dist/core/stores/NotificationStore.es.js.map +1 -1
  38. package/dist/core/stores/SettingsStore.d.ts +1 -0
  39. package/dist/core/stores/SettingsStore.es.js +23 -19
  40. package/dist/core/stores/SettingsStore.es.js.map +1 -1
  41. package/dist/core/stores/TransactionStore.d.ts +1 -0
  42. package/dist/core/stores/TransactionStore.es.js +71 -67
  43. package/dist/core/stores/TransactionStore.es.js.map +1 -1
  44. package/dist/core/stores/UserStore.d.ts +1 -0
  45. package/dist/core/stores/UserStore.es.js +10 -6
  46. package/dist/core/stores/UserStore.es.js.map +1 -1
  47. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { UserApi as t } from "../api/UserApi.es.js";
2
- import { makeAutoObservable as s, runInAction as o } from "mobx";
2
+ import { makeAutoObservable as s, runInAction as a } from "mobx";
3
3
  var u = class {
4
4
  globalStore;
5
5
  api = new t("/", "");
@@ -23,7 +23,7 @@ var u = class {
23
23
  const e = await this.api.getUserFeatures();
24
24
  this.setUserFeatures(e);
25
25
  } catch (e) {
26
- console.error("Error occurred while loading user features:", e), this.globalStore.captureException(e, { store: "UserStore" }), this.setUserFeatures([]);
26
+ this.captureError("loadUserFeatures", e), this.setUserFeatures([]);
27
27
  }
28
28
  };
29
29
  updateUser = async (e) => {
@@ -31,7 +31,7 @@ var u = class {
31
31
  const r = await this.api.updateUser(e);
32
32
  this.globalStore.appDataStore.setUser(r);
33
33
  } catch (r) {
34
- throw console.error("Error updating User:", r), this.globalStore.captureException(r, { store: "UserStore" }), r;
34
+ throw this.captureError("updateUser", r), r;
35
35
  }
36
36
  };
37
37
  updateUserProfile = async (e) => {
@@ -39,7 +39,7 @@ var u = class {
39
39
  const r = await this.api.updateUserProfile(e);
40
40
  this.globalStore.appDataStore.setUserProfile(r);
41
41
  } catch (r) {
42
- console.error("Error occurred while updating user profile:", r), this.globalStore.captureException(r, { store: "UserStore" });
42
+ this.captureError("updateUserProfile", r);
43
43
  }
44
44
  };
45
45
  setUserInsightProfile = (e) => {
@@ -52,13 +52,17 @@ var u = class {
52
52
  ...this.userInsightProfile,
53
53
  ...e
54
54
  });
55
- return o(() => {
55
+ return a(() => {
56
56
  this.userInsightProfile = r;
57
57
  }), r;
58
58
  } catch (r) {
59
- throw console.error("Error occurred while updating user insight profile:", r), this.globalStore.captureException(r, { store: "UserStore" }), r;
59
+ throw this.captureError("updateUserInsightProfile", r), r;
60
60
  }
61
61
  };
62
+ captureError = (e, r) => this.globalStore.captureException(r, {
63
+ store: "UserStore",
64
+ action: e
65
+ });
62
66
  };
63
67
  export {
64
68
  u as UserStore
@@ -1 +1 @@
1
- {"version":3,"file":"UserStore.es.js","names":[],"sources":["../../../src/core/stores/UserStore.ts"],"sourcesContent":["import { makeAutoObservable, runInAction } from 'mobx'\n\nimport { UserApi } from '../api'\nimport type { User, UserFeature, UserInsightProfile, UserProfile } from '../types'\n\nimport { GlobalStore } from './GlobalStore'\n\nexport class UserStore {\n globalStore: GlobalStore\n api: UserApi = new UserApi('/', '')\n\n userFeatures: UserFeature[] = []\n userFeaturesLoaded: boolean = false\n userInsightProfile: UserInsightProfile | null = null\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n this.api = new UserApi(globalStore.endpoint, globalStore.sessionToken, globalStore.onError)\n\n makeAutoObservable(this)\n }\n\n get userProfile() {\n return this.globalStore.appDataStore.userProfile\n }\n\n get user() {\n return this.globalStore.appDataStore.user\n }\n\n setUserFeatures = (features: UserFeature[]) => {\n this.userFeatures = features\n this.userFeaturesLoaded = true\n }\n\n loadUserFeatures = async () => {\n try {\n const features = await this.api.getUserFeatures()\n this.setUserFeatures(features)\n } catch (e) {\n console.error('Error occurred while loading user features:', e)\n this.globalStore.captureException(e, { store: 'UserStore' })\n this.setUserFeatures([])\n }\n }\n\n updateUser = async (user: User) => {\n try {\n const updatedUser = await this.api.updateUser(user)\n\n this.globalStore.appDataStore.setUser(updatedUser)\n } catch (error) {\n console.error('Error updating User:', error)\n this.globalStore.captureException(error, { store: 'UserStore' })\n throw error\n }\n }\n\n updateUserProfile = async (userProfile: UserProfile) => {\n try {\n const updatedProfile = await this.api.updateUserProfile(userProfile)\n\n this.globalStore.appDataStore.setUserProfile(updatedProfile)\n } catch (error) {\n console.error('Error occurred while updating user profile:', error)\n this.globalStore.captureException(error, { store: 'UserStore' })\n }\n }\n\n /**\n * Seeds the profile. The host (pulse) loads `user_insight_profile` and pushes it in here;\n * experiences itself never fetches it.\n */\n setUserInsightProfile = (profile: UserInsightProfile | null) => {\n this.userInsightProfile = profile\n }\n\n /**\n * Merges `fields` into the seeded profile and PUTs the whole profile. The endpoint is an\n * upsert that writes every profile field from the request, so a partial body would null\n * the fields it omits; the merge is what keeps them. Throws if the host has not seeded the\n * profile yet, and rethrows API failures, so a caller driving UI state (e.g. an insight\n * CTA) reports the error instead of silently treating the save as done.\n */\n updateUserInsightProfile = async (fields: Partial<UserInsightProfile>) => {\n if (!this.userInsightProfile) {\n throw new Error('User insight profile has not been loaded; refusing a partial PUT')\n }\n\n try {\n const updated = await this.api.updateUserInsightProfile({\n ...this.userInsightProfile,\n ...fields,\n })\n\n runInAction(() => {\n this.userInsightProfile = updated\n })\n\n return updated\n } catch (error) {\n console.error('Error occurred while updating user insight profile:', error)\n this.globalStore.captureException(error, { store: 'UserStore' })\n throw error\n }\n }\n}\n"],"mappings":";;AAOA,IAAa,IAAb,MAAuB;AAAA,EACrB;AAAA,EACA,MAAe,IAAI,EAAQ,KAAK,EAAE;AAAA,EAElC,eAA8B,CAAC;AAAA,EAC/B,qBAA8B;AAAA,EAC9B,qBAAgD;AAAA,EAEhD,YAAY,GAA0B;AACpC,SAAK,cAAc,GACnB,KAAK,MAAM,IAAI,EAAQ,EAAY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ACR,OAAM,IAAI,MAAM,kEAAkE;AAGpF,QAAI;AACF,YAAM,IAAU,MAAM,KAAK,IAAI,yBAAyB;AAAA,QACtD,GAAG,KAAK;AAAA,QACR,GAAG;AAAA,MACL,CAAC;AAED,aAAA,EAAA,MAAkB;AAChB,aAAK,qBAAqB;AAAA,MAC5B,CAAC,GAEM;AAAA,IACT,SAAS,GAAO;AACd,oBAAQ,MAAM,uDAAuD,CAAK,GAC1E,KAAK,YAAY,iBAAiB,GAAO,EAAE,OAAO,YAAY,CAAC,GACzD;AAAA,IACR;AAAA,EACF;AACF"}
1
+ {"version":3,"file":"UserStore.es.js","names":[],"sources":["../../../src/core/stores/UserStore.ts"],"sourcesContent":["import { makeAutoObservable, runInAction } from 'mobx'\n\nimport { UserApi } from '../api'\nimport type { User, UserFeature, UserInsightProfile, UserProfile } from '../types'\n\nimport { GlobalStore } from './GlobalStore'\n\nexport class UserStore {\n globalStore: GlobalStore\n api: UserApi = new UserApi('/', '')\n\n userFeatures: UserFeature[] = []\n userFeaturesLoaded: boolean = false\n userInsightProfile: UserInsightProfile | null = null\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n this.api = new UserApi(globalStore.endpoint, globalStore.sessionToken, globalStore.onError)\n\n makeAutoObservable(this)\n }\n\n get userProfile() {\n return this.globalStore.appDataStore.userProfile\n }\n\n get user() {\n return this.globalStore.appDataStore.user\n }\n\n setUserFeatures = (features: UserFeature[]) => {\n this.userFeatures = features\n this.userFeaturesLoaded = true\n }\n\n loadUserFeatures = async () => {\n try {\n const features = await this.api.getUserFeatures()\n this.setUserFeatures(features)\n } catch (e) {\n this.captureError('loadUserFeatures', e)\n this.setUserFeatures([])\n }\n }\n\n updateUser = async (user: User) => {\n try {\n const updatedUser = await this.api.updateUser(user)\n\n this.globalStore.appDataStore.setUser(updatedUser)\n } catch (error) {\n this.captureError('updateUser', error)\n throw error\n }\n }\n\n updateUserProfile = async (userProfile: UserProfile) => {\n try {\n const updatedProfile = await this.api.updateUserProfile(userProfile)\n\n this.globalStore.appDataStore.setUserProfile(updatedProfile)\n } catch (error) {\n this.captureError('updateUserProfile', error)\n }\n }\n\n /**\n * Seeds the profile. The host (pulse) loads `user_insight_profile` and pushes it in here;\n * experiences itself never fetches it.\n */\n setUserInsightProfile = (profile: UserInsightProfile | null) => {\n this.userInsightProfile = profile\n }\n\n /**\n * Merges `fields` into the seeded profile and PUTs the whole profile. The endpoint is an\n * upsert that writes every profile field from the request, so a partial body would null\n * the fields it omits; the merge is what keeps them. Throws if the host has not seeded the\n * profile yet, and rethrows API failures, so a caller driving UI state (e.g. an insight\n * CTA) reports the error instead of silently treating the save as done.\n */\n updateUserInsightProfile = async (fields: Partial<UserInsightProfile>) => {\n if (!this.userInsightProfile) {\n throw new Error('User insight profile has not been loaded; refusing a partial PUT')\n }\n\n try {\n const updated = await this.api.updateUserInsightProfile({\n ...this.userInsightProfile,\n ...fields,\n })\n\n runInAction(() => {\n this.userInsightProfile = updated\n })\n\n return updated\n } catch (error) {\n this.captureError('updateUserInsightProfile', error)\n throw error\n }\n }\n\n private captureError = (action: string, error: unknown) =>\n this.globalStore.captureException(error, { store: 'UserStore', action })\n}\n"],"mappings":";;AAOA,IAAa,IAAb,MAAuB;AAAA,EACrB;AAAA,EACA,MAAe,IAAI,EAAQ,KAAK,EAAE;AAAA,EAElC,eAA8B,CAAC;AAAA,EAC/B,qBAA8B;AAAA,EAC9B,qBAAgD;AAAA,EAEhD,YAAY,GAA0B;AACpC,SAAK,cAAc,GACnB,KAAK,MAAM,IAAI,EAAQ,EAAY,UAAU,EAAY,cAAc,EAAY,OAAO,GAE1F,EAAmB,IAAI;AAAA,EACzB;AAAA,EAEA,IAAI,cAAc;AAChB,WAAO,KAAK,YAAY,aAAa;AAAA,EACvC;AAAA,EAEA,IAAI,OAAO;AACT,WAAO,KAAK,YAAY,aAAa;AAAA,EACvC;AAAA,EAEA,kBAAA,CAAmB,MAA4B;AAC7C,SAAK,eAAe,GACpB,KAAK,qBAAq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 -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "9.6.9",
3
+ "version": "9.6.11",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",