@sumaris-net/ngx-components 1.23.0 → 1.23.1-rc1

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.
@@ -1065,13 +1065,22 @@
1065
1065
  function filterFalse(obs) {
1066
1066
  return obs.pipe(operators.filter(function (v) { return v === false; }));
1067
1067
  }
1068
- function firstTruePromise(obs) {
1068
+ function firstTruePromise(obs, opts) {
1069
+ if ((opts === null || opts === void 0 ? void 0 : opts.timeout) > 0) {
1070
+ return obs.pipe(operators.first(function (v) { return v === true; }), operators.takeUntil(rxjs.timer(1000))).toPromise();
1071
+ }
1069
1072
  return obs.pipe(operators.first(function (v) { return v === true; })).toPromise();
1070
1073
  }
1071
- function firstFalsePromise(obs) {
1074
+ function firstFalsePromise(obs, opts) {
1075
+ if ((opts === null || opts === void 0 ? void 0 : opts.timeout) > 0) {
1076
+ return obs.pipe(operators.first(function (v) { return v === false; }), operators.takeUntil(rxjs.timer(1000))).toPromise();
1077
+ }
1072
1078
  return obs.pipe(operators.first(function (v) { return v === false; })).toPromise();
1073
1079
  }
1074
- function firstNotNilPromise(obs) {
1080
+ function firstNotNilPromise(obs, opts) {
1081
+ if ((opts === null || opts === void 0 ? void 0 : opts.timeout) > 0) {
1082
+ return firstNotNil(obs).pipe(operators.takeUntil(rxjs.timer(opts === null || opts === void 0 ? void 0 : opts.timeout))).toPromise();
1083
+ }
1075
1084
  return firstNotNil(obs).toPromise();
1076
1085
  }
1077
1086
  function chainPromises(defers) {