@ionic/angular 8.8.8-nightly.20260520 → 8.8.9-dev.11779403760.13ea2a08
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/tabs.d.ts +9 -7
- 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/bundle.ionic.css +1 -0
- package/css/ionic/bundle.ionic.css.map +1 -0
- package/css/ionic/core.ionic.css +1 -0
- package/css/ionic/core.ionic.css.map +1 -0
- package/css/ionic/global.bundle.ionic.css +1 -0
- package/css/ionic/global.bundle.ionic.css.map +1 -0
- package/css/ionic/ionic-swiper.ionic.css +1 -0
- package/css/ionic/ionic-swiper.ionic.css.map +1 -0
- package/css/ionic/link.ionic.css +1 -0
- package/css/ionic/link.ionic.css.map +1 -0
- package/css/ionic/structure.ionic.css +1 -0
- package/css/ionic/structure.ionic.css.map +1 -0
- package/css/ionic/typography.ionic.css +1 -0
- package/css/ionic/typography.ionic.css.map +1 -0
- package/css/ionic/utils.bundle.ionic.css +1 -0
- package/css/ionic/utils.bundle.ionic.css.map +1 -0
- 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 +104 -85
- package/esm2022/common/directives/navigation/tabs.mjs +58 -10
- package/esm2022/directives/proxies-list.mjs +3 -1
- package/esm2022/directives/proxies.mjs +311 -246
- package/esm2022/ionic-module.mjs +2 -2
- package/esm2022/standalone/directives/proxies.mjs +279 -213
- package/fesm2022/ionic-angular-common.mjs +57 -9
- package/fesm2022/ionic-angular-common.mjs.map +1 -1
- package/fesm2022/ionic-angular-standalone.mjs +408 -344
- package/fesm2022/ionic-angular-standalone.mjs.map +1 -1
- package/fesm2022/ionic-angular.mjs +313 -248
- 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 +89 -71
|
@@ -2383,6 +2383,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2383
2383
|
args: ['click']
|
|
2384
2384
|
}] } });
|
|
2385
2385
|
|
|
2386
|
+
/**
|
|
2387
|
+
* Extracts `queryParams` and `fragment` from a tab button's href for use
|
|
2388
|
+
* as Angular `NavigationExtras`. Returns `undefined` when neither is present.
|
|
2389
|
+
*/
|
|
2390
|
+
const parseHrefExtras = (href) => {
|
|
2391
|
+
if (!href) {
|
|
2392
|
+
return undefined;
|
|
2393
|
+
}
|
|
2394
|
+
const hashIndex = href.indexOf('#');
|
|
2395
|
+
// Treat a bare `#` (no fragment text) as no fragment.
|
|
2396
|
+
const fragment = hashIndex >= 0 && hashIndex < href.length - 1 ? href.slice(hashIndex + 1) : undefined;
|
|
2397
|
+
const beforeHash = hashIndex >= 0 ? href.slice(0, hashIndex) : href;
|
|
2398
|
+
const queryIndex = beforeHash.indexOf('?');
|
|
2399
|
+
const search = queryIndex >= 0 ? beforeHash.slice(queryIndex + 1) : '';
|
|
2400
|
+
let queryParams;
|
|
2401
|
+
if (search) {
|
|
2402
|
+
const params = new URLSearchParams(search);
|
|
2403
|
+
queryParams = {};
|
|
2404
|
+
for (const key of new Set(params.keys())) {
|
|
2405
|
+
const all = params.getAll(key);
|
|
2406
|
+
queryParams[key] = all.length > 1 ? all : all[0];
|
|
2407
|
+
}
|
|
2408
|
+
}
|
|
2409
|
+
if (!queryParams && fragment === undefined) {
|
|
2410
|
+
return undefined;
|
|
2411
|
+
}
|
|
2412
|
+
/**
|
|
2413
|
+
* Build the result with only the populated keys so that a spread of the
|
|
2414
|
+
* returned object does not overwrite saved `queryParams`/`fragment` with
|
|
2415
|
+
* `undefined` (which `Object.assign`/spread would copy as a real key).
|
|
2416
|
+
*/
|
|
2417
|
+
const extras = {};
|
|
2418
|
+
if (queryParams)
|
|
2419
|
+
extras.queryParams = queryParams;
|
|
2420
|
+
if (fragment !== undefined)
|
|
2421
|
+
extras.fragment = fragment;
|
|
2422
|
+
return extras;
|
|
2423
|
+
};
|
|
2386
2424
|
class IonTabs {
|
|
2387
2425
|
navCtrl;
|
|
2388
2426
|
tabsInner;
|
|
@@ -2450,22 +2488,25 @@ class IonTabs {
|
|
|
2450
2488
|
*
|
|
2451
2489
|
* a. Get the saved root view from the router outlet. If the saved root view
|
|
2452
2490
|
* matches the tabRootUrl, set the route view to this view including the
|
|
2453
|
-
* navigation extras.
|
|
2454
|
-
*
|
|
2455
|
-
*
|
|
2456
|
-
*
|
|
2491
|
+
* navigation extras. Any `queryParams` or `fragment` declared on the tab
|
|
2492
|
+
* button's `href` are also forwarded.
|
|
2493
|
+
* b. If the saved root view from the router outlet does not match, navigate
|
|
2494
|
+
* to the tabRootUrl, forwarding any `queryParams`/`fragment` declared on
|
|
2495
|
+
* the tab button's `href`.
|
|
2457
2496
|
*
|
|
2458
2497
|
* 2. If the current tab tab is not currently selected, get the last route
|
|
2459
2498
|
* view from the router outlet.
|
|
2460
2499
|
*
|
|
2461
2500
|
* a. If the last route view exists, navigate to that view including any
|
|
2462
|
-
* navigation extras
|
|
2463
|
-
* b. If the last route view doesn't exist, then navigate
|
|
2464
|
-
*
|
|
2501
|
+
* navigation extras.
|
|
2502
|
+
* b. If the last route view doesn't exist, then navigate to the default
|
|
2503
|
+
* tabRootUrl, forwarding any `queryParams`/`fragment` declared on the
|
|
2504
|
+
* tab button's `href`.
|
|
2465
2505
|
*/
|
|
2466
2506
|
select(tabOrEvent) {
|
|
2467
2507
|
const isTabString = typeof tabOrEvent === 'string';
|
|
2468
2508
|
const tab = isTabString ? tabOrEvent : tabOrEvent.detail.tab;
|
|
2509
|
+
const href = isTabString ? undefined : tabOrEvent.detail.href;
|
|
2469
2510
|
/**
|
|
2470
2511
|
* If the tabs are not using the router, then
|
|
2471
2512
|
* the tab switch logic is handled by the tabs
|
|
@@ -2478,6 +2519,11 @@ class IonTabs {
|
|
|
2478
2519
|
}
|
|
2479
2520
|
const alreadySelected = this.outlet.getActiveStackId() === tab;
|
|
2480
2521
|
const tabRootUrl = `${this.outlet.tabsPrefix}/${tab}`;
|
|
2522
|
+
/**
|
|
2523
|
+
* The href pathname is ignored here; tab routing is driven by `tabsPrefix/tab`.
|
|
2524
|
+
* Only the query and fragment are forwarded as navigation extras.
|
|
2525
|
+
*/
|
|
2526
|
+
const hrefExtras = parseHrefExtras(href);
|
|
2481
2527
|
/**
|
|
2482
2528
|
* If this is a nested tab, prevent the event
|
|
2483
2529
|
* from bubbling otherwise the outer tabs
|
|
@@ -2498,6 +2544,7 @@ class IonTabs {
|
|
|
2498
2544
|
const navigationExtras = rootView && tabRootUrl === rootView.url && rootView.savedExtras;
|
|
2499
2545
|
return this.navCtrl.navigateRoot(tabRootUrl, {
|
|
2500
2546
|
...navigationExtras,
|
|
2547
|
+
...hrefExtras,
|
|
2501
2548
|
animated: true,
|
|
2502
2549
|
animationDirection: 'back',
|
|
2503
2550
|
});
|
|
@@ -2506,10 +2553,11 @@ class IonTabs {
|
|
|
2506
2553
|
const lastRoute = this.outlet.getLastRouteView(tab);
|
|
2507
2554
|
/**
|
|
2508
2555
|
* If there is a lastRoute, goto that, otherwise goto the fallback url of the
|
|
2509
|
-
* selected tab
|
|
2556
|
+
* selected tab. When falling back to the tab root, honor query params and
|
|
2557
|
+
* fragment declared on the tab button's href.
|
|
2510
2558
|
*/
|
|
2511
2559
|
const url = lastRoute?.url || tabRootUrl;
|
|
2512
|
-
const navigationExtras = lastRoute?.savedExtras;
|
|
2560
|
+
const navigationExtras = lastRoute?.savedExtras ?? (url === tabRootUrl ? hrefExtras : undefined);
|
|
2513
2561
|
return this.navCtrl.navigateRoot(url, {
|
|
2514
2562
|
...navigationExtras,
|
|
2515
2563
|
animated: true,
|