@mx-cartographer/experiences 3.1.0-alpha.sms5-await4 → 3.1.0-alpha.sms5-await5

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,7 +11,7 @@ export declare class AccountStore {
11
11
  members: Member[];
12
12
  uiStore: UiStore;
13
13
  constructor(globalStore: GlobalStore);
14
- initialize: (endpoint: string, token: string) => void;
14
+ initialize: (endpoint: string, token: string) => Promise<void>;
15
15
  get cashAccounts(): Account[];
16
16
  get cashBalance(): number;
17
17
  addAccount: (account: Account) => Promise<void>;
@@ -26,7 +26,7 @@ export declare class AccountStore {
26
26
  }) => Promise<any>;
27
27
  mergeAccounts: (accountGuids: string[]) => Promise<void>;
28
28
  sortAccounts: (accounts?: Account[]) => void;
29
- refreshAccounts: () => void;
29
+ refreshAccounts: () => Promise<void>;
30
30
  refreshMembers: () => Promise<void>;
31
31
  removeAccount: (accountGuid: string) => Promise<void>;
32
32
  updateAccount: (account: Account) => Promise<void>;
package/dist/index.es.js CHANGED
@@ -3643,14 +3643,7 @@ class Dc {
3643
3643
  this.globalStore = e, this.uiStore = new Ic(), yA(this);
3644
3644
  }
3645
3645
  initialize = async (e, n) => {
3646
- this.api = new Na(e, n), this.beatApi = new Ge(e, n), Promise.all([
3647
- this.loadAssociatedBeats(vA(/* @__PURE__ */ new Date())),
3648
- this.loadTags(),
3649
- this.loadTaggings(),
3650
- this.loadTransactionRules(),
3651
- // By default loads 90 days of transactions
3652
- this.loadTransactions()
3653
- ]).then(() => this.uiStore.setIsInitialized(!0));
3646
+ this.api = new Na(e, n), this.beatApi = new Ge(e, n), await this.loadAssociatedBeats(vA(/* @__PURE__ */ new Date())), await this.loadTags(), await this.loadTaggings(), await this.loadTransactionRules(), await this.loadTransactions(), this.uiStore.setIsInitialized(!0);
3654
3647
  };
3655
3648
  get sortedTransactions() {
3656
3649
  return yc(
@@ -10459,11 +10452,8 @@ class Yu {
10459
10452
  constructor(e) {
10460
10453
  this.globalStore = e, this.uiStore = new Wu(), yA(this);
10461
10454
  }
10462
- initialize = (e, n) => {
10463
- this.api = new ar(e, n), this.widgetApi = new Ta(e, n), Promise.all([
10464
- this.loadAccounts(),
10465
- this.loadInstitutions()
10466
- ]);
10455
+ initialize = async (e, n) => {
10456
+ this.api = new ar(e, n), this.widgetApi = new Ta(e, n), await this.loadAccounts(), await this.loadInstitutions();
10467
10457
  };
10468
10458
  get cashAccounts() {
10469
10459
  return this.accounts.filter(
@@ -10546,11 +10536,8 @@ class Yu {
10546
10536
  sortAccounts = (e = this.accounts) => {
10547
10537
  this.accounts = e.sort((n, a) => n.account_type > a.account_type ? 1 : n.account_type < a.account_type ? -1 : (n.name || "") > (a.name || "") ? 1 : (n.name || "") < (a.name || "") ? -1 : 0);
10548
10538
  };
10549
- refreshAccounts = () => {
10550
- this.uiStore.setIsLoading(!0), Promise.all([
10551
- this.loadAccounts(),
10552
- this.loadInstitutions()
10553
- ]), this.uiStore.setIsLoading(!1);
10539
+ refreshAccounts = async () => {
10540
+ this.uiStore.setIsLoading(!0), await this.loadAccounts(), await this.loadInstitutions(), this.uiStore.setIsLoading(!1);
10554
10541
  };
10555
10542
  refreshMembers = async () => {
10556
10543
  try {