@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.
- package/common/directives/navigation/router-link-delegate.d.ts +12 -2
- package/css/core.css +1 -1
- package/css/core.css.map +1 -1
- package/css/display.css +1 -1
- package/css/display.css.map +1 -1
- package/css/flex-utils.css +1 -1
- package/css/flex-utils.css.map +1 -1
- package/css/float-elements.css.map +1 -1
- package/css/global.bundle.css.map +1 -1
- package/css/ionic-swiper.css +1 -1
- package/css/ionic-swiper.css.map +1 -1
- package/css/ionic.bundle.css +1 -1
- package/css/ionic.bundle.css.map +1 -1
- package/css/normalize.css.map +1 -1
- package/css/padding.css.map +1 -1
- package/css/palettes/dark.always.css.map +1 -1
- package/css/palettes/dark.class.css.map +1 -1
- package/css/palettes/dark.system.css.map +1 -1
- package/css/palettes/high-contrast-dark.always.css.map +1 -1
- package/css/palettes/high-contrast-dark.class.css.map +1 -1
- package/css/palettes/high-contrast-dark.system.css.map +1 -1
- package/css/palettes/high-contrast.always.css.map +1 -1
- package/css/palettes/high-contrast.class.css.map +1 -1
- package/css/palettes/high-contrast.system.css.map +1 -1
- package/css/structure.css.map +1 -1
- package/css/text-alignment.css.map +1 -1
- package/css/text-transformation.css.map +1 -1
- package/css/typography.css.map +1 -1
- package/css/utils.bundle.css +1 -1
- package/css/utils.bundle.css.map +1 -1
- package/directives/proxies-list.d.ts +1 -1
- package/directives/proxies.d.ts +85 -113
- package/esm2022/common/directives/navigation/router-link-delegate.mjs +35 -1
- package/esm2022/common/providers/angular-delegate.mjs +8 -1
- package/esm2022/directives/proxies-list.mjs +1 -4
- package/esm2022/directives/proxies.mjs +246 -338
- package/esm2022/ionic-module.mjs +2 -2
- package/esm2022/standalone/directives/proxies.mjs +213 -309
- package/fesm2022/ionic-angular-common.mjs +41 -0
- package/fesm2022/ionic-angular-common.mjs.map +1 -1
- package/fesm2022/ionic-angular-standalone.mjs +344 -437
- package/fesm2022/ionic-angular-standalone.mjs.map +1 -1
- package/fesm2022/ionic-angular.mjs +248 -340
- package/fesm2022/ionic-angular.mjs.map +1 -1
- package/ionic-module.d.ts +1 -1
- package/package.json +2 -2
- package/standalone/directives/proxies.d.ts +71 -98
- package/css/ionic/bundle.ionic.css +0 -1
- package/css/ionic/bundle.ionic.css.map +0 -1
- package/css/ionic/core.ionic.css +0 -1
- package/css/ionic/core.ionic.css.map +0 -1
- package/css/ionic/global.bundle.ionic.css +0 -1
- package/css/ionic/global.bundle.ionic.css.map +0 -1
- package/css/ionic/ionic-swiper.ionic.css +0 -1
- package/css/ionic/ionic-swiper.ionic.css.map +0 -1
- package/css/ionic/link.ionic.css +0 -1
- package/css/ionic/link.ionic.css.map +0 -1
- package/css/ionic/structure.ionic.css +0 -1
- package/css/ionic/structure.ionic.css.map +0 -1
- package/css/ionic/typography.ionic.css +0 -1
- package/css/ionic/typography.ionic.css.map +0 -1
- package/css/ionic/utils.bundle.ionic.css +0 -1
- 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
|