@sumaris-net/ngx-components 1.20.35 → 1.20.36

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.
@@ -1092,14 +1092,13 @@
1092
1092
  }
1093
1093
  function waitForTrue(observable, opts) {
1094
1094
  return __awaiter(this, void 0, void 0, function () {
1095
- var firstTrueObservable, $timeout;
1095
+ var $timeout;
1096
1096
  return __generator(this, function (_a) {
1097
- firstTrueObservable = firstTrue(observable);
1098
1097
  // Timeout (+ dueTime)
1099
1098
  if (opts && opts.timeout > 0) {
1100
1099
  $timeout = rxjs.timer(opts.timeout);
1101
1100
  return [2 /*return*/, rxjs.merge(rxjs.timer(opts.dueTime || 0)
1102
- .pipe(operators.switchMap(function () { return firstTrueObservable; }), operators.takeUntil($timeout)), $timeout
1101
+ .pipe(operators.switchMap(function () { return firstTrue(observable); }), operators.takeUntil($timeout)), $timeout
1103
1102
  .pipe(operators.map(function () {
1104
1103
  throw new Error("Timeout ready() - after " + opts.timeout + "ms");
1105
1104
  })))
@@ -1108,10 +1107,10 @@
1108
1107
  // dueTime (without timeout)
1109
1108
  if (opts && opts.dueTime > 0) {
1110
1109
  return [2 /*return*/, rxjs.timer(opts.dueTime)
1111
- .pipe(operators.switchMap(function () { return firstTrueObservable; }))
1110
+ .pipe(operators.switchMap(function () { return firstTrue(observable); }))
1112
1111
  .toPromise()];
1113
1112
  }
1114
- return [2 /*return*/, firstTrueObservable.toPromise()];
1113
+ return [2 /*return*/, firstTrue(observable).toPromise()];
1115
1114
  });
1116
1115
  });
1117
1116
  }
@@ -12024,7 +12023,7 @@
12024
12023
  Object.defineProperty(LocalSettingsService.prototype, "usageMode", {
12025
12024
  get: function () {
12026
12025
  var _a;
12027
- if (isNil((_a = this._data) === null || _a === void 0 ? void 0 : _a.mobile)) {
12026
+ if (isNil((_a = this._data) === null || _a === void 0 ? void 0 : _a.usageMode)) {
12028
12027
  console.warn("[settings] Accessing to property 'usageMode' BEFORE service started! Please use ready()");
12029
12028
  return isCordova(window) ? 'FIELD' : 'DESK';
12030
12029
  }
@@ -28151,6 +28150,8 @@
28151
28150
  AppEditor.prototype.ready = function (opts) {
28152
28151
  return __awaiter(this, void 0, void 0, function () {
28153
28152
  return __generator(this, function (_b) {
28153
+ if (this._$ready.value)
28154
+ return [2 /*return*/];
28154
28155
  return [2 /*return*/, waitForTrue(this._$ready, opts)];
28155
28156
  });
28156
28157
  });