@coolon/angular-ui-powerups 0.0.85 → 0.0.87

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.
@@ -2180,6 +2180,8 @@ var DialogInteractionService = /** @class */ (function (_super) {
2180
2180
  _this._activityList = new DelegatingListModel();
2181
2181
  _this.startingGuard = new Guard();
2182
2182
  assert$1.notNil(dialogService);
2183
+ var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
2184
+ _this.active = chain(_this._activityList).isNotEmpty();
2183
2185
  return _this;
2184
2186
  }
2185
2187
  /**
@@ -2189,7 +2191,7 @@ var DialogInteractionService = /** @class */ (function (_super) {
2189
2191
  * @return {?}
2190
2192
  */
2191
2193
  function () {
2192
- return this._activityList.length > 0;
2194
+ return this.active.value;
2193
2195
  };
2194
2196
  /**
2195
2197
  * @return {?}
@@ -2412,11 +2414,8 @@ if (false) {
2412
2414
  * @private
2413
2415
  */
2414
2416
  DialogInteractionService.prototype.startingGuard;
2415
- /**
2416
- * @type {?}
2417
- * @private
2418
- */
2419
- DialogInteractionService.prototype.currentActivityId;
2417
+ /** @type {?} */
2418
+ DialogInteractionService.prototype.active;
2420
2419
  /**
2421
2420
  * @type {?}
2422
2421
  * @private
@@ -6258,10 +6257,19 @@ var LeavePlaceGuard = /** @class */ (function () {
6258
6257
  self_1 = this;
6259
6258
  canLeave = true;
6260
6259
  if (!this.isLeavingTheCurrentPlace(nextState, component.placeDefinition)) return [3 /*break*/, 4];
6261
- // we check the interaction first, so that components that don't need to check if they're in an
6260
+ // we check the dialog interaction first, so that components that don't need to check if they're in an
6262
6261
  // interaction during the canDeactivate cycle.
6263
6262
  // TODO: Add tests: show dialog -> hit back -> same route
6264
- if (component.interactionContext && component.interactionContext.isActive()) {
6263
+ if (this.interactionContext.isActive()) {
6264
+ console.log('cancelling', { activity: this.interactionContext.currentActivity });
6265
+ this.interactionContext.currentActivity.cancel(null);
6266
+ canLeave = false;
6267
+ }
6268
+ else {
6269
+ canLeave = true;
6270
+ }
6271
+ // now check if the component has an active interaction context
6272
+ if (canLeave && component.interactionContext && component.interactionContext.isActive()) {
6265
6273
  canLeave = false;
6266
6274
  console.log('cancelling', { activity: component.interactionContext.currentActivity });
6267
6275
  component.interactionContext.currentActivity.cancel(null);