@ionic/angular 7.6.2-dev.11703182244.1165aeec → 7.6.2-dev.11704390532.1202188d

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 (47) hide show
  1. package/common/directives/navigation/router-outlet.d.ts +4 -3
  2. package/directives/control-value-accessors/index.d.ts +0 -1
  3. package/directives/navigation/ion-router-outlet.d.ts +12 -4
  4. package/directives/proxies-list.d.ts +1 -1
  5. package/directives/proxies.d.ts +38 -6
  6. package/esm2020/common/directives/navigation/router-outlet.mjs +14 -6
  7. package/esm2020/common/directives/navigation/stack-controller.mjs +1 -4
  8. package/esm2020/common/providers/nav-controller.mjs +3 -3
  9. package/esm2020/directives/control-value-accessors/index.mjs +1 -2
  10. package/esm2020/directives/navigation/ion-router-outlet.mjs +13 -9
  11. package/esm2020/directives/navigation/ion-tabs.mjs +1 -1
  12. package/esm2020/directives/proxies-list.mjs +4 -1
  13. package/esm2020/directives/proxies.mjs +82 -5
  14. package/esm2020/index.mjs +1 -2
  15. package/esm2020/ionic-module.mjs +4 -7
  16. package/esm2020/providers/picker-controller.mjs +4 -1
  17. package/esm2020/standalone/directives/index.mjs +1 -2
  18. package/esm2020/standalone/directives/proxies.mjs +120 -5
  19. package/esm2020/standalone/index.mjs +2 -2
  20. package/esm2020/standalone/navigation/router-outlet.mjs +13 -9
  21. package/esm2020/standalone/navigation/tabs.mjs +1 -1
  22. package/esm2020/standalone/providers/picker-controller.mjs +5 -2
  23. package/fesm2015/ionic-angular-common.mjs +15 -10
  24. package/fesm2015/ionic-angular-common.mjs.map +1 -1
  25. package/fesm2015/ionic-angular-standalone.mjs +208 -145
  26. package/fesm2015/ionic-angular-standalone.mjs.map +1 -1
  27. package/fesm2015/ionic-angular.mjs +100 -57
  28. package/fesm2015/ionic-angular.mjs.map +1 -1
  29. package/fesm2020/ionic-angular-common.mjs +15 -10
  30. package/fesm2020/ionic-angular-common.mjs.map +1 -1
  31. package/fesm2020/ionic-angular-standalone.mjs +208 -145
  32. package/fesm2020/ionic-angular-standalone.mjs.map +1 -1
  33. package/fesm2020/ionic-angular.mjs +100 -57
  34. package/fesm2020/ionic-angular.mjs.map +1 -1
  35. package/index.d.ts +0 -1
  36. package/ionic-module.d.ts +11 -12
  37. package/package.json +2 -2
  38. package/providers/picker-controller.d.ts +4 -1
  39. package/standalone/directives/index.d.ts +0 -1
  40. package/standalone/directives/proxies.d.ts +55 -6
  41. package/standalone/index.d.ts +1 -1
  42. package/standalone/navigation/router-outlet.d.ts +12 -4
  43. package/standalone/providers/picker-controller.d.ts +4 -1
  44. package/directives/control-value-accessors/radio-value-accessor.d.ts +0 -9
  45. package/esm2020/directives/control-value-accessors/radio-value-accessor.mjs +0 -42
  46. package/esm2020/standalone/directives/radio.mjs +0 -62
  47. package/standalone/directives/radio.d.ts +0 -22
@@ -427,9 +427,9 @@ class NavController {
427
427
  if (router) {
428
428
  router.events.subscribe((ev) => {
429
429
  if (ev instanceof NavigationStart) {
430
+ // restoredState is set if the browser back/forward button is used
430
431
  const id = ev.restoredState ? ev.restoredState.navigationId : ev.id;
431
- this.guessDirection = id < this.lastNavId ? 'back' : 'forward';
432
- this.guessAnimation = !ev.restoredState ? this.guessDirection : undefined;
432
+ this.guessDirection = this.guessAnimation = id < this.lastNavId ? 'back' : 'forward';
433
433
  this.lastNavId = this.guessDirection === 'forward' ? ev.id : id;
434
434
  }
435
435
  });
@@ -1347,9 +1347,6 @@ class StackController {
1347
1347
  if (enteringEl && enteringEl !== leavingEl) {
1348
1348
  enteringEl.classList.add('ion-page');
1349
1349
  enteringEl.classList.add('ion-page-invisible');
1350
- if (enteringEl.parentElement !== containerEl) {
1351
- containerEl.appendChild(enteringEl);
1352
- }
1353
1350
  if (containerEl.commit) {
1354
1351
  return containerEl.commit(enteringEl, leavingEl, {
1355
1352
  duration: direction === undefined ? 0 : undefined,
@@ -1413,7 +1410,8 @@ const cleanup = (activeRoute, views, viewsSnapshot, location, zone) => {
1413
1410
  // TODO(FW-2827): types
1414
1411
  // eslint-disable-next-line @angular-eslint/directive-class-suffix
1415
1412
  class IonRouterOutlet {
1416
- constructor(name, tabs, commonLocation, elementRef, router, zone, activatedRoute, parentOutlet) {
1413
+ constructor(name, tabs, commonLocation, elementRef, router, zone, activatedRoute, outletContent, parentOutlet) {
1414
+ this.outletContent = outletContent;
1417
1415
  this.parentOutlet = parentOutlet;
1418
1416
  this.activatedView = null;
1419
1417
  // Maintain map of activated route proxies for each component instance
@@ -1600,8 +1598,15 @@ class IonRouterOutlet {
1600
1598
  const injector = new OutletInjector(activatedRouteProxy, childContexts, this.location.injector);
1601
1599
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1602
1600
  const component = snapshot.routeConfig.component ?? snapshot.component;
1603
- cmpRef = this.activated = this.location.createComponent(component, {
1604
- index: this.location.length,
1601
+ /**
1602
+ * View components need to be added as a child of ion-router-outlet.
1603
+ * However, createComponent mounts components as siblings of the
1604
+ * ViewContainerRef. As a result, outletContent must reference
1605
+ * an ng-container inside of ion-router-outlet and not
1606
+ * ion-router-outlet itself.
1607
+ */
1608
+ cmpRef = this.activated = this.outletContent.createComponent(component, {
1609
+ index: this.outletContent.length,
1605
1610
  injector,
1606
1611
  environmentInjector: environmentInjector ?? this.environmentInjector,
1607
1612
  });
@@ -1720,7 +1725,7 @@ class IonRouterOutlet {
1720
1725
  this.currentActivatedRoute$.next({ component, activatedRoute });
1721
1726
  }
1722
1727
  }
1723
- /** @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 });
1728
+ /** @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 });
1724
1729
  /** @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 });
1725
1730
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonRouterOutlet, decorators: [{
1726
1731
  type: Directive,
@@ -1738,7 +1743,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
1738
1743
  }, {
1739
1744
  type: Attribute,
1740
1745
  args: ['tabs']
1741
- }] }, { type: i1.Location }, { type: i0.ElementRef }, { type: i3.Router }, { type: i0.NgZone }, { type: i3.ActivatedRoute }, { type: IonRouterOutlet, decorators: [{
1746
+ }] }, { type: i1.Location }, { type: i0.ElementRef }, { type: i3.Router }, { type: i0.NgZone }, { type: i3.ActivatedRoute }, { type: i0.ViewContainerRef }, { type: IonRouterOutlet, decorators: [{
1742
1747
  type: SkipSelf
1743
1748
  }, {
1744
1749
  type: Optional