@mx-cartographer/experiences 7.2.15-alpha.sms33 → 7.2.15-alpha.sms34

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.
@@ -1203,23 +1203,15 @@ class ts {
1203
1203
  constructor(t = K, e = "/", r, o) {
1204
1204
  this.appConfig = t, this.endpoint = e, this.sessionToken = t.options.session_token ?? "", this.onError = r, this.onStoreUpdate = o, this.accountStore = new yt(this), this.appDataStore = new ce(this), this.analyticsStore = new se(this), this.beatStore = new bt(this), this.budgetsStore = new re(this), this.cashflowStore = new nt(this), this.categoryStore = new et(this), this.connectStore = new de(this), this.copyStore = new ee(this), this.debtsStore = new Ct(this), this.finstrongStore = new vt(this), this.goalStore = new it(this), this.helpStore = new ne(this), this.holdingStore = new ie(this), this.merchantStore = new Bt(this), this.netWorthStore = new It(this), this.notificationStore = new st(this), this.recurringTransactionsStore = new mt(this), this.settingsStore = new Nt(this), this.transactionStore = new at(this), this.trendsStore = new ct(this), this.userStore = new ue(this), this.globalUiStore = new le(this), f(this), ft(() => {
1205
1205
  const { transactions: a } = this.transactionStore;
1206
- this.emitChange(a);
1206
+ this.emitChange({ transactions: a });
1207
1207
  });
1208
1208
  }
1209
1209
  get isInitialized() {
1210
1210
  return this.globalUiStore.isInitialized;
1211
1211
  }
1212
- // for external libraries like Pulse to subscribe
1213
- // to global store snapshots, like `getTransactionStoreSnapshot` below
1214
- // using `useSyncExternalStore` https://react.dev/reference/react/useSyncExternalStore
1215
- subscribe = (t) => (this.listeners = [...this.listeners, t], () => {
1216
- this.listeners = this.listeners.filter((e) => e !== t);
1217
- });
1218
- // returns change subscribed to in the autorun (found in the constructor)
1219
- getTransactionStoreSnapshot = () => this.transactionStore;
1220
1212
  // emits change triggered in the autorun
1221
1213
  emitChange = (t) => {
1222
- console.log("emitted change", t), this.onStoreUpdate?.(t);
1214
+ this.onStoreUpdate?.(t);
1223
1215
  };
1224
1216
  loadData = async ({
1225
1217
  accounts: t,
@@ -70,8 +70,6 @@ export declare class GlobalStore {
70
70
  globalUiStore: GlobalUiStore;
71
71
  constructor(appConfig?: AppConfig, endpoint?: string, onError?: GlobalErrorHandler, onStoreUpdate?: OnStoreUpdate);
72
72
  get isInitialized(): boolean;
73
- subscribe: (listener: any) => () => void;
74
- getTransactionStoreSnapshot: () => TransactionStore;
75
73
  emitChange: (change: any) => void;
76
74
  loadData: ({ accounts, appData, associatedBeats, categories, institutions, transactionRules, transactions, userFeatures, }?: LoadDataProps) => Promise<void>;
77
75
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "7.2.15-alpha.sms33",
3
+ "version": "7.2.15-alpha.sms34",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",