@ionic/angular 8.8.12-dev.11781793379.156d3260 → 8.8.12-dev.11781813448.16e7a064

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 (63) hide show
  1. package/common/directives/navigation/router-link-delegate.d.ts +12 -2
  2. package/css/core.css +1 -1
  3. package/css/core.css.map +1 -1
  4. package/css/display.css +1 -1
  5. package/css/display.css.map +1 -1
  6. package/css/flex-utils.css +1 -1
  7. package/css/flex-utils.css.map +1 -1
  8. package/css/float-elements.css.map +1 -1
  9. package/css/global.bundle.css.map +1 -1
  10. package/css/ionic-swiper.css +1 -1
  11. package/css/ionic-swiper.css.map +1 -1
  12. package/css/ionic.bundle.css +1 -1
  13. package/css/ionic.bundle.css.map +1 -1
  14. package/css/normalize.css.map +1 -1
  15. package/css/padding.css.map +1 -1
  16. package/css/palettes/dark.always.css.map +1 -1
  17. package/css/palettes/dark.class.css.map +1 -1
  18. package/css/palettes/dark.system.css.map +1 -1
  19. package/css/palettes/high-contrast-dark.always.css.map +1 -1
  20. package/css/palettes/high-contrast-dark.class.css.map +1 -1
  21. package/css/palettes/high-contrast-dark.system.css.map +1 -1
  22. package/css/palettes/high-contrast.always.css.map +1 -1
  23. package/css/palettes/high-contrast.class.css.map +1 -1
  24. package/css/palettes/high-contrast.system.css.map +1 -1
  25. package/css/structure.css.map +1 -1
  26. package/css/text-alignment.css.map +1 -1
  27. package/css/text-transformation.css.map +1 -1
  28. package/css/typography.css.map +1 -1
  29. package/css/utils.bundle.css +1 -1
  30. package/css/utils.bundle.css.map +1 -1
  31. package/directives/proxies-list.d.ts +1 -1
  32. package/directives/proxies.d.ts +85 -113
  33. package/esm2022/common/directives/navigation/router-link-delegate.mjs +35 -1
  34. package/esm2022/common/providers/angular-delegate.mjs +8 -1
  35. package/esm2022/directives/proxies-list.mjs +1 -4
  36. package/esm2022/directives/proxies.mjs +246 -338
  37. package/esm2022/ionic-module.mjs +2 -2
  38. package/esm2022/standalone/directives/proxies.mjs +213 -309
  39. package/fesm2022/ionic-angular-common.mjs +41 -0
  40. package/fesm2022/ionic-angular-common.mjs.map +1 -1
  41. package/fesm2022/ionic-angular-standalone.mjs +344 -437
  42. package/fesm2022/ionic-angular-standalone.mjs.map +1 -1
  43. package/fesm2022/ionic-angular.mjs +248 -340
  44. package/fesm2022/ionic-angular.mjs.map +1 -1
  45. package/ionic-module.d.ts +1 -1
  46. package/package.json +2 -2
  47. package/standalone/directives/proxies.d.ts +71 -98
  48. package/css/ionic/bundle.ionic.css +0 -1
  49. package/css/ionic/bundle.ionic.css.map +0 -1
  50. package/css/ionic/core.ionic.css +0 -1
  51. package/css/ionic/core.ionic.css.map +0 -1
  52. package/css/ionic/global.bundle.ionic.css +0 -1
  53. package/css/ionic/global.bundle.ionic.css.map +0 -1
  54. package/css/ionic/ionic-swiper.ionic.css +0 -1
  55. package/css/ionic/ionic-swiper.ionic.css.map +0 -1
  56. package/css/ionic/link.ionic.css +0 -1
  57. package/css/ionic/link.ionic.css.map +0 -1
  58. package/css/ionic/structure.ionic.css +0 -1
  59. package/css/ionic/structure.ionic.css.map +0 -1
  60. package/css/ionic/typography.ionic.css +0 -1
  61. package/css/ionic/typography.ionic.css.map +0 -1
  62. package/css/ionic/utils.bundle.ionic.css +0 -1
  63. package/css/ionic/utils.bundle.ionic.css.map +0 -1
@@ -893,6 +893,13 @@ const attachView = (zone, environmentInjector, injector, applicationRef, elRefMa
893
893
  const unbindEvents = bindLifecycleEvents(zone, instance, hostElement);
894
894
  container.appendChild(hostElement);
895
895
  applicationRef.attachView(componentRef.hostView);
896
+ /**
897
+ * Run change detection so template bindings (e.g. `<ion-nav [root]="rootPage">`)
898
+ * apply during this synchronous pass, before the web component runs its load
899
+ * lifecycle. `createComponent` only runs the creation pass, so without this the
900
+ * binding lands after the element has loaded, too late for `ion-nav` to read it.
901
+ */
902
+ componentRef.changeDetectorRef.detectChanges();
896
903
  elRefMap.set(hostElement, componentRef);
897
904
  elEventsMap.set(hostElement, unbindEvents);
898
905
  return hostElement;
@@ -2258,10 +2265,44 @@ class RouterLinkDelegateDirective {
2258
2265
  ngOnInit() {
2259
2266
  this.updateTargetUrlAndHref();
2260
2267
  this.updateTabindex();
2268
+ /**
2269
+ * Ionic components like `ion-item` render a native anchor in their shadow DOM,
2270
+ * so a modifier click (ctrl/meta/shift/alt) or a non-`_self` target should let
2271
+ * the browser handle the navigation natively (new tab, new window, download)
2272
+ * instead of navigating in-app.
2273
+ *
2274
+ * We listen in the capture phase so this runs before Angular's `RouterLink`
2275
+ * handler and our own bubble-phase `onClick`. On a native-navigation intent it
2276
+ * stops propagation to cancel the in-app navigation, but leaves `preventDefault`
2277
+ * alone so the native anchor can still act.
2278
+ */
2279
+ this.elementRef.nativeElement.addEventListener('click', this.onCaptureClick, { capture: true });
2261
2280
  }
2262
2281
  ngOnChanges() {
2263
2282
  this.updateTargetUrlAndHref();
2264
2283
  }
2284
+ ngOnDestroy() {
2285
+ this.elementRef.nativeElement.removeEventListener('click', this.onCaptureClick, { capture: true });
2286
+ }
2287
+ onCaptureClick = (ev) => {
2288
+ if (this.opensNatively(ev)) {
2289
+ ev.stopImmediatePropagation();
2290
+ }
2291
+ };
2292
+ /**
2293
+ * True when the browser should handle the click natively instead of routing
2294
+ * in-app: a modifier was held (ctrl/meta/shift/alt), or the host targets
2295
+ * something other than `_self`. This mirrors the modifier set Angular's own
2296
+ * `RouterLink` guards on, so an Ionic `routerLink` behaves like a plain anchor
2297
+ * for new-tab, new-window, and download intents.
2298
+ */
2299
+ opensNatively(ev) {
2300
+ if (ev instanceof MouseEvent && (ev.ctrlKey || ev.metaKey || ev.shiftKey || ev.altKey)) {
2301
+ return true;
2302
+ }
2303
+ const target = this.elementRef.nativeElement.target;
2304
+ return target != null && target !== '' && target !== '_self';
2305
+ }
2265
2306
  /**
2266
2307
  * The `tabindex` is set to `0` by default on the host element when
2267
2308
  * the `routerLink` directive is used. This causes issues with Ionic