@ionic/angular 8.2.8-dev.11724252750.181edeb4 → 8.2.8-dev.11724280606.1a8c11d4
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 +2 -9
- package/directives/navigation/ion-tabs.d.ts +2 -3
- package/directives/proxies-list.d.ts +1 -1
- package/directives/proxies.d.ts +0 -9
- package/esm2022/app-initialize.mjs +2 -2
- package/esm2022/common/directives/navigation/tabs.mjs +1 -57
- package/esm2022/directives/navigation/ion-tabs.mjs +5 -14
- package/esm2022/directives/proxies-list.mjs +1 -2
- package/esm2022/directives/proxies.mjs +1 -29
- package/esm2022/ionic-module.mjs +2 -2
- package/esm2022/standalone/directives/proxies.mjs +1 -32
- package/esm2022/standalone/navigation/tabs.mjs +5 -14
- package/fesm2022/ionic-angular-common.mjs +0 -56
- package/fesm2022/ionic-angular-common.mjs.map +1 -1
- package/fesm2022/ionic-angular-standalone.mjs +44 -82
- package/fesm2022/ionic-angular-standalone.mjs.map +1 -1
- package/fesm2022/ionic-angular.mjs +6 -42
- 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 +0 -9
- package/standalone/navigation/tabs.d.ts +2 -3
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { NgIf } from '@angular/common';
|
|
2
1
|
import { Component, ContentChild, ContentChildren, ViewChild } from '@angular/core';
|
|
3
2
|
import { IonTabs as IonTabsBase } from '@ionic/angular/common';
|
|
4
|
-
import { IonTabBar
|
|
3
|
+
import { IonTabBar } from '../directives/proxies';
|
|
5
4
|
import { IonRouterOutlet } from './router-outlet';
|
|
6
5
|
import * as i0 from "@angular/core";
|
|
7
6
|
// eslint-disable-next-line @angular-eslint/component-class-suffix
|
|
@@ -9,22 +8,19 @@ export class IonTabs extends IonTabsBase {
|
|
|
9
8
|
outlet;
|
|
10
9
|
tabBar;
|
|
11
10
|
tabBars;
|
|
12
|
-
tabs;
|
|
13
11
|
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IonTabs, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
14
|
-
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: IonTabs, isStandalone: true, selector: "ion-tabs", queries: [{ propertyName: "tabBar", first: true, predicate: IonTabBar, descendants: true }, { propertyName: "tabBars", predicate: IonTabBar }
|
|
12
|
+
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: IonTabs, isStandalone: true, selector: "ion-tabs", queries: [{ propertyName: "tabBar", first: true, predicate: IonTabBar, descendants: true }, { propertyName: "tabBars", predicate: IonTabBar }], viewQueries: [{ propertyName: "outlet", first: true, predicate: ["outlet"], descendants: true, read: IonRouterOutlet }], usesInheritance: true, ngImport: i0, template: `
|
|
15
13
|
<ng-content select="[slot=top]"></ng-content>
|
|
16
14
|
<div class="tabs-inner" #tabsInner>
|
|
17
15
|
<ion-router-outlet
|
|
18
|
-
*ngIf="tabs?.length === 0"
|
|
19
16
|
#outlet
|
|
20
17
|
tabs="true"
|
|
21
18
|
(stackWillChange)="onStackWillChange($event)"
|
|
22
19
|
(stackDidChange)="onStackDidChange($event)"
|
|
23
20
|
></ion-router-outlet>
|
|
24
|
-
<ng-container *ngIf="tabs?.length > 0" select="ion-tab"></ng-container>
|
|
25
21
|
</div>
|
|
26
22
|
<ng-content></ng-content>
|
|
27
|
-
`, 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" }
|
|
23
|
+
`, 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" }] });
|
|
28
24
|
}
|
|
29
25
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IonTabs, decorators: [{
|
|
30
26
|
type: Component,
|
|
@@ -32,16 +28,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
32
28
|
<ng-content select="[slot=top]"></ng-content>
|
|
33
29
|
<div class="tabs-inner" #tabsInner>
|
|
34
30
|
<ion-router-outlet
|
|
35
|
-
*ngIf="tabs?.length === 0"
|
|
36
31
|
#outlet
|
|
37
32
|
tabs="true"
|
|
38
33
|
(stackWillChange)="onStackWillChange($event)"
|
|
39
34
|
(stackDidChange)="onStackDidChange($event)"
|
|
40
35
|
></ion-router-outlet>
|
|
41
|
-
<ng-container *ngIf="tabs?.length > 0" select="ion-tab"></ng-container>
|
|
42
36
|
</div>
|
|
43
37
|
<ng-content></ng-content>
|
|
44
|
-
`, standalone: true, imports: [IonRouterOutlet
|
|
38
|
+
`, standalone: true, imports: [IonRouterOutlet], 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"] }]
|
|
45
39
|
}], propDecorators: { outlet: [{
|
|
46
40
|
type: ViewChild,
|
|
47
41
|
args: ['outlet', { read: IonRouterOutlet, static: false }]
|
|
@@ -51,8 +45,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
51
45
|
}], tabBars: [{
|
|
52
46
|
type: ContentChildren,
|
|
53
47
|
args: [IonTabBar]
|
|
54
|
-
}], tabs: [{
|
|
55
|
-
type: ContentChildren,
|
|
56
|
-
args: [IonTab]
|
|
57
48
|
}] } });
|
|
58
|
-
//# sourceMappingURL=data:application/json;base64,
|
|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wb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgICAgIHRvcDogMDtcbiAgICAgICAgbGVmdDogMDtcbiAgICAgICAgcmlnaHQ6IDA7XG4gICAgICAgIGJvdHRvbTogMDtcblxuICAgICAgICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXG4gICAgICAgIHdpZHRoOiAxMDAlO1xuICAgICAgICBoZWlnaHQ6IDEwMCU7XG5cbiAgICAgICAgY29udGFpbjogbGF5b3V0IHNpemUgc3R5bGU7XG4gICAgICB9XG4gICAgICAudGFicy1pbm5lciB7XG4gICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcblxuICAgICAgICBmbGV4OiAxO1xuXG4gICAgICAgIGNvbnRhaW46IGxheW91dCBzaXplIHN0eWxlO1xuICAgICAgfVxuICAgIGAsXG4gIF0sXG4gIGltcG9ydHM6IFtJb25Sb3V0ZXJPdXRsZXRdLFxufSlcbi8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBAYW5ndWxhci1lc2xpbnQvY29tcG9uZW50LWNsYXNzLXN1ZmZpeFxuZXhwb3J0IGNsYXNzIElvblRhYnMgZXh0ZW5kcyBJb25UYWJzQmFzZSB7XG4gIEBWaWV3Q2hpbGQoJ291dGxldCcsIHsgcmVhZDogSW9uUm91dGVyT3V0bGV0LCBzdGF0aWM6IGZhbHNlIH0pIG91dGxldDogSW9uUm91dGVyT3V0bGV0O1xuXG4gIEBDb250ZW50Q2hpbGQoSW9uVGFiQmFyLCB7IHN0YXRpYzogZmFsc2UgfSkgdGFiQmFyOiBJb25UYWJCYXIgfCB1bmRlZmluZWQ7XG4gIEBDb250ZW50Q2hpbGRyZW4oSW9uVGFiQmFyKSB0YWJCYXJzOiBRdWVyeUxpc3Q8SW9uVGFiQmFyPjtcbn1cbiJdfQ==
|
|
@@ -2201,27 +2201,9 @@ class IonTabs {
|
|
|
2201
2201
|
*/
|
|
2202
2202
|
ionTabsDidChange = new EventEmitter();
|
|
2203
2203
|
tabBarSlot = 'bottom';
|
|
2204
|
-
hasTab = false;
|
|
2205
|
-
selectedTab;
|
|
2206
|
-
leavingTab;
|
|
2207
2204
|
constructor(navCtrl) {
|
|
2208
2205
|
this.navCtrl = navCtrl;
|
|
2209
2206
|
}
|
|
2210
|
-
ngAfterViewInit() {
|
|
2211
|
-
/**
|
|
2212
|
-
* Developers must pass at least one ion-tab
|
|
2213
|
-
* inside of ion-tabs if they want to use a
|
|
2214
|
-
* basic tab-based navigation without the
|
|
2215
|
-
* history stack or URL updates associated
|
|
2216
|
-
* with the router.
|
|
2217
|
-
*/
|
|
2218
|
-
const firstTab = this.tabs.length > 0 ? this.tabs.first : undefined;
|
|
2219
|
-
if (firstTab) {
|
|
2220
|
-
this.hasTab = true;
|
|
2221
|
-
this.setActiveTab(firstTab.tab);
|
|
2222
|
-
this.tabSwitch();
|
|
2223
|
-
}
|
|
2224
|
-
}
|
|
2225
2207
|
ngAfterContentInit() {
|
|
2226
2208
|
this.detectSlotChanges();
|
|
2227
2209
|
}
|
|
@@ -2272,16 +2254,6 @@ class IonTabs {
|
|
|
2272
2254
|
select(tabOrEvent) {
|
|
2273
2255
|
const isTabString = typeof tabOrEvent === 'string';
|
|
2274
2256
|
const tab = isTabString ? tabOrEvent : tabOrEvent.detail.tab;
|
|
2275
|
-
/**
|
|
2276
|
-
* If the tabs are not using the router, then
|
|
2277
|
-
* the tab switch logic is handled by the tabs
|
|
2278
|
-
* component itself.
|
|
2279
|
-
*/
|
|
2280
|
-
if (this.hasTab) {
|
|
2281
|
-
this.setActiveTab(tab);
|
|
2282
|
-
this.tabSwitch();
|
|
2283
|
-
return;
|
|
2284
|
-
}
|
|
2285
2257
|
const alreadySelected = this.outlet.getActiveStackId() === tab;
|
|
2286
2258
|
const tabRootUrl = `${this.outlet.tabsPrefix}/${tab}`;
|
|
2287
2259
|
/**
|
|
@@ -2323,35 +2295,7 @@ class IonTabs {
|
|
|
2323
2295
|
});
|
|
2324
2296
|
}
|
|
2325
2297
|
}
|
|
2326
|
-
setActiveTab(tab) {
|
|
2327
|
-
const tabs = this.tabs;
|
|
2328
|
-
const selectedTab = tabs.find((t) => t.tab === tab);
|
|
2329
|
-
if (!selectedTab) {
|
|
2330
|
-
console.error(`tab with id: "${tab}" does not exist`);
|
|
2331
|
-
return;
|
|
2332
|
-
}
|
|
2333
|
-
this.leavingTab = this.selectedTab;
|
|
2334
|
-
this.selectedTab = selectedTab;
|
|
2335
|
-
this.ionTabsWillChange.emit({ tab });
|
|
2336
|
-
selectedTab.el.active = true;
|
|
2337
|
-
}
|
|
2338
|
-
tabSwitch() {
|
|
2339
|
-
const selectedTab = this.selectedTab;
|
|
2340
|
-
const leavingTab = this.leavingTab;
|
|
2341
|
-
if (this.tabBar) {
|
|
2342
|
-
this.tabBar.selectedTab = selectedTab.tab;
|
|
2343
|
-
}
|
|
2344
|
-
if (leavingTab?.tab !== selectedTab.tab) {
|
|
2345
|
-
if (leavingTab) {
|
|
2346
|
-
leavingTab.el.active = false;
|
|
2347
|
-
}
|
|
2348
|
-
}
|
|
2349
|
-
this.ionTabsDidChange.emit({ tab: selectedTab.tab });
|
|
2350
|
-
}
|
|
2351
2298
|
getSelected() {
|
|
2352
|
-
if (this.hasTab) {
|
|
2353
|
-
return this.selectedTab.tab;
|
|
2354
|
-
}
|
|
2355
2299
|
return this.outlet.getActiveStackId();
|
|
2356
2300
|
}
|
|
2357
2301
|
/**
|