@micropermit/client-angular 0.2.4 → 0.2.6-test2

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.
@@ -1296,6 +1296,7 @@
1296
1296
  var MicroClient = /** @class */ (function () {
1297
1297
  function MicroClient(httpClient) {
1298
1298
  this.httpClient = httpClient;
1299
+ this.entryPointSubject = new rxjs.ReplaySubject();
1299
1300
  this.usePost = true;
1300
1301
  this.sendAsPermitTokenHeader = true;
1301
1302
  }
@@ -1334,15 +1335,28 @@
1334
1335
  this.authHeader = authHeader;
1335
1336
  };
1336
1337
  /**
1337
- * @template T
1338
1338
  * @return {?}
1339
1339
  */
1340
1340
  MicroClient.prototype.getEntryPoint = /**
1341
- * @template T
1342
1341
  * @return {?}
1343
1342
  */
1344
1343
  function () {
1345
- return (/** @type {?} */ (this.entryPoint));
1344
+ return this.entryPoint;
1345
+ };
1346
+ /**
1347
+ * @param {?=} cb
1348
+ * @return {?}
1349
+ */
1350
+ MicroClient.prototype.waitForEntryPoint = /**
1351
+ * @param {?=} cb
1352
+ * @return {?}
1353
+ */
1354
+ function (cb) {
1355
+ if (cb != null) {
1356
+ this.entryPointSubject.subscribe(cb);
1357
+ return null;
1358
+ }
1359
+ return this.entryPointSubject.toPromise();
1346
1360
  };
1347
1361
  /**
1348
1362
  * @param {?} other
@@ -1381,6 +1395,7 @@
1381
1395
  else {
1382
1396
  throw Error('Expected the entryPoint to contain a "permitToken" within the "__meta" field');
1383
1397
  }
1398
+ this.entryPointSubject.next(entryPoint);
1384
1399
  }
1385
1400
  };
1386
1401
  /**
@@ -1743,6 +1758,11 @@
1743
1758
  * @private
1744
1759
  */
1745
1760
  MicroClient.prototype.entryPoint;
1761
+ /**
1762
+ * @type {?}
1763
+ * @private
1764
+ */
1765
+ MicroClient.prototype.entryPointSubject;
1746
1766
  /**
1747
1767
  * @type {?}
1748
1768
  * @private
@@ -2856,7 +2876,7 @@
2856
2876
  function () {
2857
2877
  /** @type {?} */
2858
2878
  var lastRow = this.lastRow();
2859
- if (lastRow) {
2879
+ if (lastRow && lastRow.__meta) {
2860
2880
  this.loadedCompletely = lastRow.__meta.nextPage == null;
2861
2881
  }
2862
2882
  else {