@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.
@@ -2364,6 +2364,8 @@
2364
2364
  _this._activityList = new pectin.DelegatingListModel();
2365
2365
  _this.startingGuard = new Guard();
2366
2366
  typescriptUtilities.assert.notNil(dialogService);
2367
+ var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
2368
+ _this.active = chain(_this._activityList).isNotEmpty();
2367
2369
  return _this;
2368
2370
  }
2369
2371
  /**
@@ -2373,7 +2375,7 @@
2373
2375
  * @return {?}
2374
2376
  */
2375
2377
  function () {
2376
- return this._activityList.length > 0;
2378
+ return this.active.value;
2377
2379
  };
2378
2380
  /**
2379
2381
  * @return {?}
@@ -2596,11 +2598,8 @@
2596
2598
  * @private
2597
2599
  */
2598
2600
  DialogInteractionService.prototype.startingGuard;
2599
- /**
2600
- * @type {?}
2601
- * @private
2602
- */
2603
- DialogInteractionService.prototype.currentActivityId;
2601
+ /** @type {?} */
2602
+ DialogInteractionService.prototype.active;
2604
2603
  /**
2605
2604
  * @type {?}
2606
2605
  * @private
@@ -6442,10 +6441,19 @@
6442
6441
  self_1 = this;
6443
6442
  canLeave = true;
6444
6443
  if (!this.isLeavingTheCurrentPlace(nextState, component.placeDefinition)) return [3 /*break*/, 4];
6445
- // we check the interaction first, so that components that don't need to check if they're in an
6444
+ // we check the dialog interaction first, so that components that don't need to check if they're in an
6446
6445
  // interaction during the canDeactivate cycle.
6447
6446
  // TODO: Add tests: show dialog -> hit back -> same route
6448
- if (component.interactionContext && component.interactionContext.isActive()) {
6447
+ if (this.interactionContext.isActive()) {
6448
+ console.log('cancelling', { activity: this.interactionContext.currentActivity });
6449
+ this.interactionContext.currentActivity.cancel(null);
6450
+ canLeave = false;
6451
+ }
6452
+ else {
6453
+ canLeave = true;
6454
+ }
6455
+ // now check if the component has an active interaction context
6456
+ if (canLeave && component.interactionContext && component.interactionContext.isActive()) {
6449
6457
  canLeave = false;
6450
6458
  console.log('cancelling', { activity: component.interactionContext.currentActivity });
6451
6459
  component.interactionContext.currentActivity.cancel(null);