@ionic/angular 7.6.2-dev.11704729332.13b412c8 → 7.6.2-dev.11704834200.17f5bc99

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.
@@ -18,7 +18,7 @@ export class IonTabs extends IonTabsBase {
18
18
  ></ion-router-outlet>
19
19
  </div>
20
20
  <ng-content></ng-content>
21
- `, isInline: true, styles: [":host{display:flex;position:absolute;inset:0;flex-direction:column;width:100%;height:100%;contain:layout size style}.tabs-inner{position:relative;flex:1;contain:layout size style}\n"], dependencies: [{ kind: "directive", type: IonRouterOutlet, selector: "ion-router-outlet" }] });
21
+ `, isInline: true, styles: [":host{display:flex;position:absolute;inset:0;flex-direction:column;width:100%;height:100%;contain:layout size style}.tabs-inner{position:relative;flex:1;contain:layout size style}\n"], dependencies: [{ kind: "component", type: IonRouterOutlet, selector: "ion-router-outlet" }] });
22
22
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonTabs, decorators: [{
23
23
  type: Component,
24
24
  args: [{ selector: 'ion-tabs', template: `
@@ -1356,9 +1356,6 @@ class StackController {
1356
1356
  if (enteringEl && enteringEl !== leavingEl) {
1357
1357
  enteringEl.classList.add('ion-page');
1358
1358
  enteringEl.classList.add('ion-page-invisible');
1359
- if (enteringEl.parentElement !== containerEl) {
1360
- containerEl.appendChild(enteringEl);
1361
- }
1362
1359
  if (containerEl.commit) {
1363
1360
  return containerEl.commit(enteringEl, leavingEl, {
1364
1361
  duration: direction === undefined ? 0 : undefined,
@@ -1424,7 +1421,8 @@ const cleanup = (activeRoute, views, viewsSnapshot, location, zone) => {
1424
1421
  // TODO(FW-2827): types
1425
1422
  // eslint-disable-next-line @angular-eslint/directive-class-suffix
1426
1423
  class IonRouterOutlet {
1427
- constructor(name, tabs, commonLocation, elementRef, router, zone, activatedRoute, parentOutlet) {
1424
+ constructor(name, tabs, commonLocation, elementRef, router, zone, activatedRoute, outletContent, parentOutlet) {
1425
+ this.outletContent = outletContent;
1428
1426
  this.parentOutlet = parentOutlet;
1429
1427
  this.activatedView = null;
1430
1428
  // Maintain map of activated route proxies for each component instance
@@ -1613,8 +1611,16 @@ class IonRouterOutlet {
1613
1611
  const injector = new OutletInjector(activatedRouteProxy, childContexts, this.location.injector);
1614
1612
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1615
1613
  const component = (_a = snapshot.routeConfig.component) !== null && _a !== void 0 ? _a : snapshot.component;
1616
- cmpRef = this.activated = this.location.createComponent(component, {
1617
- index: this.location.length,
1614
+ /**
1615
+ * View components need to be added as a child of ion-router-outlet
1616
+ * for page transitions and swipe to go back.
1617
+ * However, createComponent mounts components as siblings of the
1618
+ * ViewContainerRef. As a result, outletContent must reference
1619
+ * an ng-container inside of ion-router-outlet and not
1620
+ * ion-router-outlet itself.
1621
+ */
1622
+ cmpRef = this.activated = this.outletContent.createComponent(component, {
1623
+ index: this.outletContent.length,
1618
1624
  injector,
1619
1625
  environmentInjector: environmentInjector !== null && environmentInjector !== void 0 ? environmentInjector : this.environmentInjector,
1620
1626
  });
@@ -1733,7 +1739,7 @@ class IonRouterOutlet {
1733
1739
  this.currentActivatedRoute$.next({ component, activatedRoute });
1734
1740
  }
1735
1741
  }
1736
- /** @nocollapse */ IonRouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonRouterOutlet, deps: [{ token: 'name', attribute: true }, { token: 'tabs', attribute: true, optional: true }, { token: i1.Location }, { token: i0.ElementRef }, { token: i3.Router }, { token: i0.NgZone }, { token: i3.ActivatedRoute }, { token: IonRouterOutlet, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
1742
+ /** @nocollapse */ IonRouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonRouterOutlet, deps: [{ token: 'name', attribute: true }, { token: 'tabs', attribute: true, optional: true }, { token: i1.Location }, { token: i0.ElementRef }, { token: i3.Router }, { token: i0.NgZone }, { token: i3.ActivatedRoute }, { token: i0.ViewContainerRef }, { token: IonRouterOutlet, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
1737
1743
  /** @nocollapse */ IonRouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: IonRouterOutlet, selector: "ion-router-outlet", inputs: { animated: "animated", animation: "animation", mode: "mode", swipeGesture: "swipeGesture", name: "name" }, outputs: { stackWillChange: "stackWillChange", stackDidChange: "stackDidChange", activateEvents: "activate", deactivateEvents: "deactivate" }, exportAs: ["outlet"], ngImport: i0 });
1738
1744
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonRouterOutlet, decorators: [{
1739
1745
  type: Directive,
@@ -1752,7 +1758,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
1752
1758
  }, {
1753
1759
  type: Attribute,
1754
1760
  args: ['tabs']
1755
- }] }, { type: i1.Location }, { type: i0.ElementRef }, { type: i3.Router }, { type: i0.NgZone }, { type: i3.ActivatedRoute }, { type: IonRouterOutlet, decorators: [{
1761
+ }] }, { type: i1.Location }, { type: i0.ElementRef }, { type: i3.Router }, { type: i0.NgZone }, { type: i3.ActivatedRoute }, { type: i0.ViewContainerRef }, { type: IonRouterOutlet, decorators: [{
1756
1762
  type: SkipSelf
1757
1763
  }, {
1758
1764
  type: Optional