@coolon/angular-ui-powerups 0.0.74 → 0.0.76

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.
Files changed (41) hide show
  1. package/bundles/coolon-angular-ui-powerups.umd.js +288 -80
  2. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  3. package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  5. package/coolon-angular-ui-powerups.d.ts +2 -1
  6. package/coolon-angular-ui-powerups.metadata.json +1 -1
  7. package/esm2015/coolon-angular-ui-powerups.js +4 -3
  8. package/esm2015/index.js +2 -2
  9. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +71 -48
  10. package/esm2015/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.js +128 -0
  11. package/esm2015/lib/interaction/index.js +2 -1
  12. package/esm2015/lib/interaction/interaction.module.js +6 -3
  13. package/esm2015/lib/interaction/services/dialog-interaction.service.js +10 -9
  14. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +15 -10
  15. package/esm2015/lib/place/place-component.js +3 -1
  16. package/esm2015/lib/place/route/guards/enter-place-guard.service.js +1 -1
  17. package/esm2015/lib/place/route/guards/leave-place.guard.js +6 -13
  18. package/esm2015/public_api.js +2 -2
  19. package/esm5/coolon-angular-ui-powerups.js +4 -3
  20. package/esm5/index.js +2 -2
  21. package/esm5/lib/interaction/components/activity-container/activity-container.component.js +79 -49
  22. package/esm5/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.js +171 -0
  23. package/esm5/lib/interaction/index.js +2 -1
  24. package/esm5/lib/interaction/interaction.module.js +6 -3
  25. package/esm5/lib/interaction/services/dialog-interaction.service.js +10 -9
  26. package/esm5/lib/place/components/place-outlet/place-outlet.component.js +19 -11
  27. package/esm5/lib/place/place-component.js +3 -1
  28. package/esm5/lib/place/route/guards/enter-place-guard.service.js +1 -1
  29. package/esm5/lib/place/route/guards/leave-place.guard.js +10 -14
  30. package/esm5/public_api.js +2 -2
  31. package/fesm2015/coolon-angular-ui-powerups.js +225 -74
  32. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  33. package/fesm5/coolon-angular-ui-powerups.js +282 -77
  34. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  35. package/lib/interaction/components/activity-container/activity-container.component.d.ts +9 -6
  36. package/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.d.ts +21 -0
  37. package/lib/interaction/index.d.ts +1 -0
  38. package/lib/place/components/place-outlet/place-outlet.component.d.ts +1 -0
  39. package/lib/place/place-component.d.ts +2 -0
  40. package/package.json +1 -1
  41. package/styles/styles.scss +6 -1
@@ -7,11 +7,10 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
7
7
  import { GarbageCollector, assert, UnaryCommand, lang, Dsl, Logger, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, DelegatingValueModel, MutableStream, MutableListModel, DelegatingListModel, StoreInValueModel, Binding, MutableValueModel, Trace, Guard as Guard$1, Command, OptionsHelper, ValueHolder } from '@coolon/pectin';
8
8
  import { __decorate, __metadata, __awaiter } from 'tslib';
9
9
  import { PortalModule } from '@angular/cdk/portal';
10
- import { Router, RouterModule, UrlSegment, NavigationStart, NavigationEnd, NavigationError, RouterOutlet, ActivatedRouteSnapshot, RouterStateSnapshot, UrlSerializer } from '@angular/router';
10
+ import { Router, RouterModule, UrlSegment, NavigationStart, NavigationEnd, NavigationError, ActivatedRouteSnapshot, RouterStateSnapshot, UrlSerializer } from '@angular/router';
11
11
  import ___default, { last, isNil, isEqual } from 'lodash';
12
12
  import { assert as assert$1, Opts, Klass } from '@coolon/typescript-utilities';
13
13
  import { MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS, MatDialog as MatDialog$1 } from '@angular/material/dialog';
14
- import { v1 } from 'uuid';
15
14
  import { MatIconModule } from '@angular/material/icon';
16
15
  import { MatListModule } from '@angular/material/list';
17
16
  import { MatTooltipModule } from '@angular/material/tooltip';
@@ -1280,52 +1279,59 @@ if (false) {
1280
1279
  class ActivityContainerComponent extends InteractionContext {
1281
1280
  constructor() {
1282
1281
  super();
1283
- this.activityFinishedEvents = new MutableStream();
1282
+ this.throttledNestedActivityFinishEvents = new MutableStream();
1283
+ // tslint:disable-next-line:no-output-rename
1284
+ this.initialActivityOutletContextEvent = new EventEmitter();
1285
+ this.dynamicHeight = false;
1284
1286
  this.activityTabs = new MutableListModel();
1285
- this.finished = false;
1286
1287
  this._activityList = new MutableListModel();
1287
1288
  const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
1288
- chain(this.activityFinishedEvents).throttle(50).subscribe((/**
1289
+ chain(this.throttledNestedActivityFinishEvents).throttle(50).subscribe((/**
1289
1290
  * @return {?}
1290
1291
  */
1291
- () => this.onActivityFinished()));
1292
+ () => this.onNestedActivityFinished()));
1292
1293
  }
1293
1294
  /**
1294
1295
  * @param {?} initialContext
1295
1296
  * @return {?}
1296
1297
  */
1297
1298
  set initialActivityOutletContext(initialContext) {
1298
- assert.isNil(this.initialActivityOutletContext);
1299
- this.activityTabs.push(new TabContext(initialContext.activityData, initialContext.activityClass, this, {
1300
- onDone: (/**
1301
- * @param {?} result
1302
- * @return {?}
1303
- */
1304
- (result) => {
1305
- this.finished = true;
1306
- return initialContext.onDone(result);
1307
- }),
1308
- onCancel: (/**
1309
- * @param {?} error
1310
- * @return {?}
1311
- */
1312
- (error) => {
1313
- this.finished = true;
1314
- return initialContext.onCancel(error);
1315
- })
1316
- }));
1299
+ assert.isNil(this._initialActivityOutletContext);
1300
+ /** @type {?} */
1301
+ const self = this;
1302
+ if (initialContext) {
1303
+ this._initialActivityOutletContext = initialContext;
1304
+ this.activityTabs.push(new TabContext(initialContext.activityData, initialContext.activityClass, this, {
1305
+ onDone: (/**
1306
+ * @param {?} result
1307
+ * @return {?}
1308
+ */
1309
+ (result) => {
1310
+ self.finishInitialActivity();
1311
+ initialContext.onDone(result);
1312
+ }),
1313
+ onCancel: (/**
1314
+ * @param {?} error
1315
+ * @return {?}
1316
+ */
1317
+ (error) => {
1318
+ self.finishInitialActivity();
1319
+ initialContext.onCancel(error);
1320
+ })
1321
+ }));
1322
+ }
1317
1323
  }
1318
1324
  /**
1319
1325
  * @return {?}
1320
1326
  */
1321
1327
  get initialActivityOutletContext() {
1322
- return this.activityTabs.length > 0 ? this.activityTabs.value[0] : null;
1328
+ return this._initialActivityOutletContext;
1323
1329
  }
1324
1330
  /**
1325
1331
  * @return {?}
1326
1332
  */
1327
1333
  isActive() {
1328
- return this.parentInteractionContext.isActive();
1334
+ return this._activityList.length > 0;
1329
1335
  }
1330
1336
  /**
1331
1337
  * @return {?}
@@ -1333,6 +1339,12 @@ class ActivityContainerComponent extends InteractionContext {
1333
1339
  get activityList() {
1334
1340
  return this._activityList.readonly;
1335
1341
  }
1342
+ /**
1343
+ * @return {?}
1344
+ */
1345
+ get isFinished() {
1346
+ return !this._initialActivityOutletContext;
1347
+ }
1336
1348
  /**
1337
1349
  * @return {?}
1338
1350
  */
@@ -1379,7 +1391,7 @@ class ActivityContainerComponent extends InteractionContext {
1379
1391
  */
1380
1392
  function (result) {
1381
1393
  resolve(result);
1382
- self.activityFinishedEvents.publish({});
1394
+ self.throttledNestedActivityFinishEvents.publish({});
1383
1395
  }),
1384
1396
  onCancel: (/**
1385
1397
  * @param {?} error
@@ -1387,7 +1399,7 @@ class ActivityContainerComponent extends InteractionContext {
1387
1399
  */
1388
1400
  function (error) {
1389
1401
  reject(error);
1390
- self.activityFinishedEvents.publish({});
1402
+ self.throttledNestedActivityFinishEvents.publish({});
1391
1403
  })
1392
1404
  });
1393
1405
  self.activityTabs.push(context);
@@ -1422,27 +1434,34 @@ class ActivityContainerComponent extends InteractionContext {
1422
1434
  data: data
1423
1435
  });
1424
1436
  }
1437
+ /**
1438
+ * @private
1439
+ * @return {?}
1440
+ */
1441
+ finishInitialActivity() {
1442
+ this._initialActivityOutletContext = null;
1443
+ this.activityTabs.value = [];
1444
+ this._activityList.value = [];
1445
+ this.initialActivityOutletContextEvent.emit(null);
1446
+ }
1425
1447
  // @Trace()
1426
1448
  /**
1427
1449
  * @private
1428
1450
  * @return {?}
1429
1451
  */
1430
- onActivityFinished() {
1452
+ onNestedActivityFinished() {
1431
1453
  // don't do anything if job already queued up.
1432
- if (!this.finished) {
1433
- if (this.synchroniseSelectedTabIndex()) {
1434
- this.cleanupStaleActivities();
1435
- }
1436
- this.updateActivityList();
1454
+ if (this.synchroniseSelectedTabIndex()) {
1455
+ this.cleanupStaleNestedActivities();
1437
1456
  }
1457
+ this.updateActivityList();
1438
1458
  }
1439
1459
  // @Trace()
1440
1460
  /**
1441
1461
  * @private
1442
1462
  * @return {?}
1443
1463
  */
1444
- cleanupStaleActivities() {
1445
- // clean up old tabs
1464
+ cleanupStaleNestedActivities() {
1446
1465
  if (this.tabs.selectedIndex < this.activityTabs.length - 1) {
1447
1466
  this.activityTabs.runInTransaction((/**
1448
1467
  * @param {?} draft
@@ -1478,7 +1497,7 @@ class ActivityContainerComponent extends InteractionContext {
1478
1497
  */
1479
1498
  onAnimationFinished() {
1480
1499
  this.getSelectedOutlet().component.onActivityReady();
1481
- this.cleanupStaleActivities();
1500
+ this.cleanupStaleNestedActivities();
1482
1501
  this.updateActivityList();
1483
1502
  }
1484
1503
  /**
@@ -1507,15 +1526,16 @@ class ActivityContainerComponent extends InteractionContext {
1507
1526
  ActivityContainerComponent.decorators = [
1508
1527
  { type: Component, args: [{
1509
1528
  selector: 'aup-activity-container',
1510
- template: "<mat-tab-group #tabs no-tab-header [dynamicHeight]=\"true\">\n <mat-tab *ngFor=\"let tab of activityTabs.value\">\n <aup-activity-outlet [interactionContext]=\"this\"\n [activityContext]=\"tab\"></aup-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n",
1511
- styles: [":host{display:block}"]
1529
+ template: "<mat-tab-group #tabs no-tab-header [dynamicHeight]=\"dynamicHeight\" [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let tab of activityTabs.value\">\n <aup-activity-outlet [interactionContext]=\"this\" [activityContext]=\"tab\"></aup-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n",
1530
+ styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
1512
1531
  }] }
1513
1532
  ];
1514
1533
  /** @nocollapse */
1515
1534
  ActivityContainerComponent.ctorParameters = () => [];
1516
1535
  ActivityContainerComponent.propDecorators = {
1517
- parentInteractionContext: [{ type: Input }],
1518
1536
  initialActivityOutletContext: [{ type: Input }],
1537
+ initialActivityOutletContextEvent: [{ type: Output, args: ['initialActivityOutletContext',] }],
1538
+ dynamicHeight: [{ type: Input }],
1519
1539
  tabs: [{ type: ViewChild, args: ['tabs', { static: true },] }],
1520
1540
  outlets: [{ type: ViewChildren, args: [ActivityOutletComponent,] }]
1521
1541
  };
@@ -1524,9 +1544,16 @@ if (false) {
1524
1544
  * @type {?}
1525
1545
  * @private
1526
1546
  */
1527
- ActivityContainerComponent.prototype.activityFinishedEvents;
1547
+ ActivityContainerComponent.prototype.throttledNestedActivityFinishEvents;
1548
+ /**
1549
+ * @type {?}
1550
+ * @private
1551
+ */
1552
+ ActivityContainerComponent.prototype._initialActivityOutletContext;
1553
+ /** @type {?} */
1554
+ ActivityContainerComponent.prototype.initialActivityOutletContextEvent;
1528
1555
  /** @type {?} */
1529
- ActivityContainerComponent.prototype.parentInteractionContext;
1556
+ ActivityContainerComponent.prototype.dynamicHeight;
1530
1557
  /** @type {?} */
1531
1558
  ActivityContainerComponent.prototype.tabs;
1532
1559
  /** @type {?} */
@@ -1537,12 +1564,129 @@ if (false) {
1537
1564
  * @type {?}
1538
1565
  * @private
1539
1566
  */
1540
- ActivityContainerComponent.prototype.finished;
1567
+ ActivityContainerComponent.prototype._activityList;
1568
+ }
1569
+
1570
+ /**
1571
+ * @fileoverview added by tsickle
1572
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1573
+ */
1574
+ /**
1575
+ * @template D, R, E
1576
+ */
1577
+ class InplaceInteractionContextComponent extends InteractionContext {
1578
+ constructor() {
1579
+ super();
1580
+ }
1541
1581
  /**
1542
- * @type {?}
1543
- * @private
1582
+ * @return {?}
1544
1583
  */
1545
- ActivityContainerComponent.prototype._activityList;
1584
+ ngOnInit() {
1585
+ }
1586
+ /**
1587
+ * @return {?}
1588
+ */
1589
+ get activityList() {
1590
+ return this.interactionContext.activityList;
1591
+ }
1592
+ /**
1593
+ * @return {?}
1594
+ */
1595
+ isActive() {
1596
+ return this.interactionContext.isActive();
1597
+ }
1598
+ /**
1599
+ * @param {?} alert
1600
+ * @return {?}
1601
+ */
1602
+ alert(alert) {
1603
+ // TODO: Test disableClose === false
1604
+ return this._startActivity(AlertDialogComponent, alert);
1605
+ }
1606
+ /**
1607
+ * @param {?} confirm
1608
+ * @return {?}
1609
+ */
1610
+ confirm(confirm) {
1611
+ return this._startActivity(ConfirmationDialogComponent, confirm);
1612
+ }
1613
+ /**
1614
+ * @template D1, R1, E1
1615
+ * @param {?} confirm
1616
+ * @param {?} activityType
1617
+ * @param {?=} data
1618
+ * @return {?}
1619
+ */
1620
+ confirmThen(confirm, activityType, data) {
1621
+ return this._startActivity(ConfirmThenDialogComponent, {
1622
+ confirm,
1623
+ activityType: activityType,
1624
+ data: data
1625
+ });
1626
+ }
1627
+ /**
1628
+ * @template D1, R1, E1
1629
+ * @param {?} activityType
1630
+ * @param {?=} data
1631
+ * @return {?}
1632
+ */
1633
+ startActivity(activityType, data) {
1634
+ return this._startActivity(activityType, data);
1635
+ }
1636
+ /**
1637
+ * @protected
1638
+ * @template D1, R1, E1
1639
+ * @param {?} activityType
1640
+ * @param {?=} data
1641
+ * @return {?}
1642
+ */
1643
+ _startActivity(activityType, data) {
1644
+ /** @type {?} */
1645
+ const self = this;
1646
+ return new Promise((/**
1647
+ * @param {?} resolve
1648
+ * @param {?} reject
1649
+ * @return {?}
1650
+ */
1651
+ (resolve, reject) => {
1652
+ this.interactionContext.initialActivityOutletContext = {
1653
+ activityClass: activityType,
1654
+ activityData: data,
1655
+ /**
1656
+ * @param {?} result
1657
+ * @return {?}
1658
+ */
1659
+ onDone(result) {
1660
+ resolve(result);
1661
+ },
1662
+ /**
1663
+ * @param {?} error
1664
+ * @return {?}
1665
+ */
1666
+ onCancel(error) {
1667
+ reject(error);
1668
+ }
1669
+ };
1670
+ }));
1671
+ }
1672
+ }
1673
+ InplaceInteractionContextComponent.decorators = [
1674
+ { type: Component, args: [{
1675
+ selector: 'aup-inplace-interaction-context',
1676
+ template: "<mat-tab-group no-tab-header [selectedIndex]=\"isActive() ? 1 : 0\" full-height-tabs [dynamicHeight]=\"false\">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer\n [(initialActivityOutletContext)]=\"initialActivityContext\"\n [dynamicHeight]=\"false\"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n",
1677
+ styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
1678
+ }] }
1679
+ ];
1680
+ /** @nocollapse */
1681
+ InplaceInteractionContextComponent.ctorParameters = () => [];
1682
+ InplaceInteractionContextComponent.propDecorators = {
1683
+ interactionContext: [{ type: ViewChild, args: ["activityContainer", { static: true },] }]
1684
+ };
1685
+ if (false) {
1686
+ /** @type {?} */
1687
+ InplaceInteractionContextComponent.prototype.interactionContext;
1688
+ /** @type {?} */
1689
+ InplaceInteractionContextComponent.prototype.initialActivityContext;
1546
1690
  }
1547
1691
 
1548
1692
  /**
@@ -1626,7 +1770,7 @@ class DialogInteractionService extends InteractionContext {
1626
1770
  * @return {?}
1627
1771
  */
1628
1772
  isActive() {
1629
- return !!this.currentActivityId;
1773
+ return this._activityList.length > 0;
1630
1774
  }
1631
1775
  /**
1632
1776
  * @return {?}
@@ -1669,8 +1813,8 @@ class DialogInteractionService extends InteractionContext {
1669
1813
  * @return {?}
1670
1814
  */
1671
1815
  () => {
1672
- console.log("###### STARTING");
1673
- this.currentActivityId = v1();
1816
+ console.log('###### STARTING');
1817
+ // this.currentActivityId = uuid.v1();
1674
1818
  // this.location.go(this.router.routerState.snapshot.url, "aup");
1675
1819
  /** @type {?} */
1676
1820
  const self = this;
@@ -1690,7 +1834,6 @@ class DialogInteractionService extends InteractionContext {
1690
1834
  (resolve, reject) => {
1691
1835
  /** @type {?} */
1692
1836
  const activityContainer = matDialogRef.componentInstance;
1693
- activityContainer.parentInteractionContext = this;
1694
1837
  self.safelyUpdateActivityListDelegate(activityContainer.activityList);
1695
1838
  activityContainer.initialActivityOutletContext = {
1696
1839
  activityClass: activityType,
@@ -1712,13 +1855,16 @@ class DialogInteractionService extends InteractionContext {
1712
1855
  matDialogRef.close(true); // return true to let the after close listener know we've already handled it.
1713
1856
  }
1714
1857
  };
1858
+ // we need to check if our onDone/onCancel methods above we called or if we were
1859
+ // closed by the user clicking the backdrop. If the later then we need to reject
1860
+ // our promise.
1715
1861
  matDialogRef.afterClosed().subscribe((/**
1716
1862
  * @param {?} promiseAlreadyFinished
1717
1863
  * @return {?}
1718
1864
  */
1719
1865
  promiseAlreadyFinished => {
1720
1866
  if (!promiseAlreadyFinished) {
1721
- reject("auto-closed");
1867
+ reject('auto-closed');
1722
1868
  }
1723
1869
  }));
1724
1870
  matDialogRef.updateSize();
@@ -1726,8 +1872,8 @@ class DialogInteractionService extends InteractionContext {
1726
1872
  * @return {?}
1727
1873
  */
1728
1874
  () => {
1729
- console.log("###### FINISHED");
1730
- this.currentActivityId = null;
1875
+ console.log('###### FINISHED');
1876
+ // this.currentActivityId = null;
1731
1877
  self.safelyUpdateActivityListDelegate(null);
1732
1878
  }));
1733
1879
  }));
@@ -1840,12 +1986,14 @@ InteractionModule.decorators = [
1840
1986
  ConfirmThenDialogComponent,
1841
1987
  AlertDialogComponent,
1842
1988
  ActivityOutletComponent,
1843
- InteractionOutletComponent
1989
+ InteractionOutletComponent,
1990
+ InplaceInteractionContextComponent
1844
1991
  ],
1845
1992
  exports: [
1846
1993
  ActivityContainerComponent,
1847
1994
  ActivityOutletComponent,
1848
- InteractionOutletComponent
1995
+ InteractionOutletComponent,
1996
+ InplaceInteractionContextComponent
1849
1997
  ],
1850
1998
  entryComponents: [
1851
1999
  ActivityContainerComponent,
@@ -2526,6 +2674,8 @@ if (false) {
2526
2674
  * @private
2527
2675
  */
2528
2676
  PlaceComponent.prototype.visit;
2677
+ /** @type {?} */
2678
+ PlaceComponent.prototype.interactionContext;
2529
2679
  }
2530
2680
  (function (PlaceComponent) {
2531
2681
  /**
@@ -3270,6 +3420,7 @@ class PlaceOutletComponent extends DisposableComponent {
3270
3420
  this._inOutletUpdate = new Guard$1();
3271
3421
  this._activatedRouteModel = new MutableValueModel();
3272
3422
  this._placeDefinition = new MutableValueModel();
3423
+ this.isOnInitialPlace = true;
3273
3424
  const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
3274
3425
  this.parentOutletModel = new MutableValueModel(parentOutlet);
3275
3426
  /** @type {?} */
@@ -3295,8 +3446,12 @@ class PlaceOutletComponent extends DisposableComponent {
3295
3446
  * @param {?} order
3296
3447
  * @return {?}
3297
3448
  */
3298
- order => Math.max(order, 0))); // we get -1 on the first load which triggers an animation to the first page, so alway pin it to 0.
3299
- // we get -1 on the first load which triggers an animation to the first page, so alway pin it to 0.
3449
+ order => {
3450
+ // we get -1 on the first load which triggers an animation to the first page, so alway pin it to 0
3451
+ // if we're animating.
3452
+ return this.isOnInitialPlace ? 0 :
3453
+ this.animate ? Math.max(order, 0) : 0;
3454
+ }));
3300
3455
  // Push incoming changes into the component
3301
3456
  /** @type {?} */
3302
3457
  const routeVisit = chain(this._activePlace).pluck('placeDefinition').findIn(placeRouter.activeVisitIndex);
@@ -3380,6 +3535,7 @@ class PlaceOutletComponent extends DisposableComponent {
3380
3535
  get activatedRouteModel() {
3381
3536
  return this._activatedRouteModel.readonly;
3382
3537
  }
3538
+ // @Trace()
3383
3539
  /**
3384
3540
  * @param {?} routerOutlet
3385
3541
  * @param {?} place
@@ -3416,6 +3572,7 @@ class PlaceOutletComponent extends DisposableComponent {
3416
3572
  * @return {?}
3417
3573
  */
3418
3574
  () => {
3575
+ this.isOnInitialPlace = false;
3419
3576
  this._activePlace.value = null;
3420
3577
  this._activatedRouteModel.value = null;
3421
3578
  this._placeDefinition.value = null;
@@ -3465,12 +3622,6 @@ __decorate([
3465
3622
  __metadata("design:paramtypes", [Visit]),
3466
3623
  __metadata("design:returntype", void 0)
3467
3624
  ], PlaceOutletComponent.prototype, "navigate", null);
3468
- __decorate([
3469
- Trace(),
3470
- __metadata("design:type", Function),
3471
- __metadata("design:paramtypes", [RouterOutlet, PlaceComponent]),
3472
- __metadata("design:returntype", void 0)
3473
- ], PlaceOutletComponent.prototype, "onOutletActivated", null);
3474
3625
  if (false) {
3475
3626
  /** @type {?} */
3476
3627
  PlaceOutletComponent.prototype.animate;
@@ -3514,6 +3665,11 @@ if (false) {
3514
3665
  PlaceOutletComponent.prototype.parentOutletModel;
3515
3666
  /** @type {?} */
3516
3667
  PlaceOutletComponent.prototype.placeAnimationOrder;
3668
+ /**
3669
+ * @type {?}
3670
+ * @private
3671
+ */
3672
+ PlaceOutletComponent.prototype.isOnInitialPlace;
3517
3673
  /**
3518
3674
  * @type {?}
3519
3675
  * @private
@@ -4845,6 +5001,7 @@ class LeavePlaceGuard {
4845
5001
  this.interactionContext = interactionContext;
4846
5002
  this.angularLocation = angularLocation;
4847
5003
  }
5004
+ // @Trace()
4848
5005
  /**
4849
5006
  * @private
4850
5007
  * @param {?} nextState
@@ -4937,10 +5094,10 @@ class LeavePlaceGuard {
4937
5094
  // we check the interaction first, so that components that don't need to check if they're in an
4938
5095
  // interaction during the canDeactivate cycle.
4939
5096
  // TODO: Add tests: show dialog -> hit back -> same route
4940
- if (this.interactionContext.isActive()) {
5097
+ if (component.interactionContext && component.interactionContext.isActive()) {
4941
5098
  canLeave = false;
4942
- console.log('cancelling', { activity: this.interactionContext.currentActivity });
4943
- this.interactionContext.currentActivity.cancel(null);
5099
+ console.log('cancelling', { activity: component.interactionContext.currentActivity });
5100
+ component.interactionContext.currentActivity.cancel(null);
4944
5101
  }
4945
5102
  // No interaction in progress, so ask the component .
4946
5103
  // This may start an interaction, hence checking the interaction context above. I.e. if the place pops up the dialog, and
@@ -4998,12 +5155,6 @@ LeavePlaceGuard.ctorParameters = () => [
4998
5155
  { type: Location }
4999
5156
  ];
5000
5157
  /** @nocollapse */ LeavePlaceGuard.ngInjectableDef = ɵɵdefineInjectable({ factory: function LeavePlaceGuard_Factory() { return new LeavePlaceGuard(ɵɵinject(Router), ɵɵinject(INJECTOR), ɵɵinject(PlaceRouter), ɵɵinject(InteractionContext), ɵɵinject(Location)); }, token: LeavePlaceGuard, providedIn: "root" });
5001
- __decorate([
5002
- Trace(),
5003
- __metadata("design:type", Function),
5004
- __metadata("design:paramtypes", [RouterStateSnapshot, PlaceDefinition]),
5005
- __metadata("design:returntype", void 0)
5006
- ], LeavePlaceGuard.prototype, "isLeavingTheCurrentPlace", null);
5007
5158
  if (false) {
5008
5159
  /**
5009
5160
  * @type {?}
@@ -5046,5 +5197,5 @@ if (false) {
5046
5197
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5047
5198
  */
5048
5199
 
5049
- export { ACTIVITY_DATA, AbstractActivity, AbstractInputComponent, AbstractPlaceNavigationComponent, Activity, ActivityContainerComponent, ActivityOutletComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CommandDirective, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DialogInteractionService, Dimension, DirectivesModule, DisposableComponent, EmptyStateComponent, EnterPlaceGuard, FocusBindingDirective, Formatter, InteractionContext, InteractionGuard, InteractionModule, InteractionOutletComponent, LEFT_RIGHT_PLACE_ANIMATION, LeavePlaceGuard, ListPlaceNavComponent, NavigationSession, NoopComponent, NumberInputComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceDefinition, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, ROUTE_PARAMETER_LIST_KEY, ResizeAwareComponent, RouteId, SelectInputComponent, StringInputComponent, TabbedPlaceNavigationComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, leftRightPlaceAnimation, slideDownAndUpAnimation, DirectivesModule as ɵa, CommandDirective as ɵb, ConfirmationDialogComponent as ɵba, AbstractActivity as ɵbb, ACTIVITY_DATA as ɵbc, Activity as ɵbd, ConfirmThenDialogComponent as ɵbf, AlertDialogComponent as ɵbg, InteractionOutletComponent as ɵbi, DIALOG_INTERACTION_SERVICE_DEFAULTS as ɵbj, DialogInteractionService as ɵbk, FocusBindingDirective as ɵc, DisposableComponent as ɵd, ComponentsModule as ɵe, NumberInputComponent as ɵf, AbstractInputComponent as ɵg, StringInputComponent as ɵh, PasswordInputComponent as ɵi, SelectInputComponent as ɵj, NoopComponent as ɵk, PlaceModule as ɵl, EmptyStateComponent as ɵm, BusyOverlayComponent as ɵn, PlaceOutletComponent as ɵo, leftRightPlaceAnimation as ɵp, LEFT_RIGHT_PLACE_ANIMATION as ɵq, PlaceRouter as ɵr, PlaceHistory as ɵs, TabbedPlaceNavigationComponent as ɵt, AbstractPlaceNavigationComponent as ɵu, ListPlaceNavComponent as ɵv, InteractionModule as ɵw, ActivityContainerComponent as ɵx, InteractionContext as ɵy, ActivityOutletComponent as ɵz };
5200
+ export { ACTIVITY_DATA, AbstractActivity, AbstractInputComponent, AbstractPlaceNavigationComponent, Activity, ActivityContainerComponent, ActivityOutletComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CommandDirective, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DialogInteractionService, Dimension, DirectivesModule, DisposableComponent, EmptyStateComponent, EnterPlaceGuard, FocusBindingDirective, Formatter, InplaceInteractionContextComponent, InteractionContext, InteractionGuard, InteractionModule, InteractionOutletComponent, LEFT_RIGHT_PLACE_ANIMATION, LeavePlaceGuard, ListPlaceNavComponent, NavigationSession, NoopComponent, NumberInputComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceDefinition, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, ROUTE_PARAMETER_LIST_KEY, ResizeAwareComponent, RouteId, SelectInputComponent, StringInputComponent, TabbedPlaceNavigationComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, leftRightPlaceAnimation, slideDownAndUpAnimation, DirectivesModule as ɵa, CommandDirective as ɵb, ConfirmationDialogComponent as ɵba, AbstractActivity as ɵbb, ACTIVITY_DATA as ɵbc, Activity as ɵbd, ConfirmThenDialogComponent as ɵbf, AlertDialogComponent as ɵbg, InteractionOutletComponent as ɵbi, InplaceInteractionContextComponent as ɵbj, DIALOG_INTERACTION_SERVICE_DEFAULTS as ɵbk, DialogInteractionService as ɵbl, FocusBindingDirective as ɵc, DisposableComponent as ɵd, ComponentsModule as ɵe, NumberInputComponent as ɵf, AbstractInputComponent as ɵg, StringInputComponent as ɵh, PasswordInputComponent as ɵi, SelectInputComponent as ɵj, NoopComponent as ɵk, PlaceModule as ɵl, EmptyStateComponent as ɵm, BusyOverlayComponent as ɵn, PlaceOutletComponent as ɵo, leftRightPlaceAnimation as ɵp, LEFT_RIGHT_PLACE_ANIMATION as ɵq, PlaceRouter as ɵr, PlaceHistory as ɵs, TabbedPlaceNavigationComponent as ɵt, AbstractPlaceNavigationComponent as ɵu, ListPlaceNavComponent as ɵv, InteractionModule as ɵw, ActivityContainerComponent as ɵx, InteractionContext as ɵy, ActivityOutletComponent as ɵz };
5050
5201
  //# sourceMappingURL=coolon-angular-ui-powerups.js.map