@eui/mobile-core 16.7.0-snapshot-1709721306777 → 16.7.0-snapshot-1709826888376
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/docs/components/EuimSidebarComponent.html +111 -0
- package/docs/components/EuimSidebarContentComponent.html +50 -0
- package/docs/dependencies.html +2 -2
- package/docs/js/search/search_index.js +2 -2
- package/esm2022/lib/components/layout/euim-sidebar/euim-sidebar.component.mjs +32 -6
- package/fesm2022/eui-mobile-core.mjs +30 -5
- package/fesm2022/eui-mobile-core.mjs.map +1 -1
- package/lib/components/layout/euim-sidebar/euim-sidebar.component.d.ts +10 -2
- package/lib/components/layout/euim-sidebar/euim-sidebar.component.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,20 +1,46 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component, HostBinding, Input, ViewEncapsulation } from '@angular/core';
|
|
2
|
+
import { NavigationEnd } from '@angular/router';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@
|
|
4
|
+
import * as i1 from "@angular/router";
|
|
5
|
+
import * as i2 from "@ionic/angular";
|
|
4
6
|
export class EuimSidebarComponent {
|
|
5
|
-
constructor() {
|
|
7
|
+
constructor(router, menuCtrl) {
|
|
8
|
+
this.router = router;
|
|
9
|
+
this.menuCtrl = menuCtrl;
|
|
6
10
|
this.className = 'euim-sidebar';
|
|
7
11
|
this.ionMenuId = 'main';
|
|
12
|
+
this.routerPath = 'home';
|
|
8
13
|
}
|
|
9
|
-
|
|
10
|
-
|
|
14
|
+
ngOnInit() {
|
|
15
|
+
this.router.events.subscribe(event => {
|
|
16
|
+
const path = `/${this.routerPath}`;
|
|
17
|
+
if (event instanceof NavigationEnd) {
|
|
18
|
+
if (this.router.url === path) {
|
|
19
|
+
this.menuCtrl.close(this.ionMenuId);
|
|
20
|
+
setTimeout(() => {
|
|
21
|
+
this.menuCtrl.swipeGesture(true, this.ionMenuId);
|
|
22
|
+
}, 1000);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
this.menuCtrl.close(this.ionMenuId);
|
|
26
|
+
setTimeout(() => {
|
|
27
|
+
this.menuCtrl.swipeGesture(false, this.ionMenuId);
|
|
28
|
+
}, 1000);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EuimSidebarComponent, deps: [{ token: i1.Router }, { token: i2.MenuController }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
34
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EuimSidebarComponent, selector: "euim-sidebar", inputs: { ionMenuId: "ionMenuId", routerPath: "routerPath" }, host: { properties: { "className": "this.className" } }, ngImport: i0, template: "<ion-menu contentId=\"{{ionMenuId}}\" menuId=\"{{ionMenuId}}\" slot=\"start\">\n <ng-content></ng-content>\n <ion-content>\n <ng-content select=\"euim-sidebar-content\"></ng-content>\n </ion-content>\n</ion-menu>\n", styles: [".euim-sidebar-content{height:100%}.euim-sidebar-content__list{height:auto;padding:0}.euim-sidebar-content ion-item euim-avatar-icon:first-child{margin-inline-end:var(--eui-base-spacing-m)}.euim-sidebar-content ion-icon[slot=start]{margin-inline-end:var(--eui-base-spacing-m)}\n"], dependencies: [{ kind: "component", type: i2.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i2.IonMenu, selector: "ion-menu", inputs: ["contentId", "disabled", "maxEdgeStart", "menuId", "side", "swipeGesture", "type"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
11
35
|
}
|
|
12
36
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EuimSidebarComponent, decorators: [{
|
|
13
37
|
type: Component,
|
|
14
38
|
args: [{ selector: 'euim-sidebar', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ion-menu contentId=\"{{ionMenuId}}\" menuId=\"{{ionMenuId}}\" slot=\"start\">\n <ng-content></ng-content>\n <ion-content>\n <ng-content select=\"euim-sidebar-content\"></ng-content>\n </ion-content>\n</ion-menu>\n", styles: [".euim-sidebar-content{height:100%}.euim-sidebar-content__list{height:auto;padding:0}.euim-sidebar-content ion-item euim-avatar-icon:first-child{margin-inline-end:var(--eui-base-spacing-m)}.euim-sidebar-content ion-icon[slot=start]{margin-inline-end:var(--eui-base-spacing-m)}\n"] }]
|
|
15
|
-
}], propDecorators: { className: [{
|
|
39
|
+
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i2.MenuController }]; }, propDecorators: { className: [{
|
|
16
40
|
type: HostBinding
|
|
17
41
|
}], ionMenuId: [{
|
|
18
42
|
type: Input
|
|
43
|
+
}], routerPath: [{
|
|
44
|
+
type: Input
|
|
19
45
|
}] } });
|
|
20
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
46
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXVpbS1zaWRlYmFyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9saWIvY29tcG9uZW50cy9sYXlvdXQvZXVpbS1zaWRlYmFyL2V1aW0tc2lkZWJhci5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvbXBvbmVudHMvbGF5b3V0L2V1aW0tc2lkZWJhci9ldWltLXNpZGViYXIuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLHVCQUF1QixFQUFFLFNBQVMsRUFB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F0aW9uOiBWaWV3RW5jYXBzdWxhdGlvbi5Ob25lLFxufSlcbmV4cG9ydCBjbGFzcyBFdWltU2lkZWJhckNvbXBvbmVudCBpbXBsZW1lbnRzIE9uSW5pdCB7XG4gICAgQEhvc3RCaW5kaW5nKCkgY2xhc3NOYW1lID0gJ2V1aW0tc2lkZWJhcic7XG5cbiAgICBASW5wdXQoKSBpb25NZW51SWQgPSAnbWFpbic7XG4gICAgQElucHV0KCkgcm91dGVyUGF0aCA9ICdob21lJztcblxuICAgIGNvbnN0cnVjdG9yKHByaXZhdGUgcm91dGVyOiBSb3V0ZXIsIHB1YmxpYyBtZW51Q3RybDogTWVudUNvbnRyb2xsZXIpIHt9XG5cbiAgICBuZ09uSW5pdCgpOiB2b2lkIHtcbiAgICAgICAgdGhpcy5yb3V0ZXIuZXZlbnRzLnN1YnNjcmliZShldmVudCA9PiB7XG4gICAgICAgICAgICBjb25zdCBwYXRoID0gYC8ke3RoaXMucm91dGVyUGF0aH1gXG4gICAgICAgICAgICBpZiAoZXZlbnQgaW5zdGFuY2VvZiBOYXZpZ2F0aW9uRW5kKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMucm91dGVyLnVybCA9PT0gcGF0aCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLm1lbnVDdHJsLmNsb3NlKHRoaXMuaW9uTWVudUlkKTtcbiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dCgoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm1lbnVDdHJsLnN3aXBlR2VzdHVyZSh0cnVlLCB0aGlzLmlvbk1lbnVJZCk7XG4gICAgICAgICAgICAgICAgICAgIH0sIDEwMDApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMubWVudUN0cmwuY2xvc2UodGhpcy5pb25NZW51SWQpO1xuICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubWVudUN0cmwuc3dpcGVHZXN0dXJlKGZhbHNlLCB0aGlzLmlvbk1lbnVJZCk7XG4gICAgICAgICAgICAgICAgICAgIH0sIDEwMDApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfVxufVxuIiwiPGlvbi1tZW51IGNvbnRlbnRJZD1cInt7aW9uTWVudUlkfX1cIiBtZW51SWQ9XCJ7e2lvbk1lbnVJZH19XCIgc2xvdD1cInN0YXJ0XCI+XG4gICAgPG5nLWNvbnRlbnQ+PC9uZy1jb250ZW50PlxuICAgIDxpb24tY29udGVudD5cbiAgICAgICAgPG5nLWNvbnRlbnQgc2VsZWN0PVwiZXVpbS1zaWRlYmFyLWNvbnRlbnRcIj48L25nLWNvbnRlbnQ+XG4gICAgPC9pb24tY29udGVudD5cbjwvaW9uLW1lbnU+XG4iXX0=
|
|
@@ -8,7 +8,8 @@ import * as i2 from '@angular/common';
|
|
|
8
8
|
import { CommonModule } from '@angular/common';
|
|
9
9
|
import * as i1 from '@ionic/angular';
|
|
10
10
|
import { IonicModule } from '@ionic/angular';
|
|
11
|
-
import
|
|
11
|
+
import * as i1$2 from '@angular/router';
|
|
12
|
+
import { RouterModule, NavigationEnd } from '@angular/router';
|
|
12
13
|
import { EclLanguageService, EclDefaultLanguageService } from '@eui/ecl';
|
|
13
14
|
import * as i2$1 from '@eui/core';
|
|
14
15
|
import { UxEuLanguages } from '@eui/core';
|
|
@@ -1604,20 +1605,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
1604
1605
|
}] });
|
|
1605
1606
|
|
|
1606
1607
|
class EuimSidebarComponent {
|
|
1607
|
-
constructor() {
|
|
1608
|
+
constructor(router, menuCtrl) {
|
|
1609
|
+
this.router = router;
|
|
1610
|
+
this.menuCtrl = menuCtrl;
|
|
1608
1611
|
this.className = 'euim-sidebar';
|
|
1609
1612
|
this.ionMenuId = 'main';
|
|
1613
|
+
this.routerPath = 'home';
|
|
1610
1614
|
}
|
|
1611
|
-
|
|
1612
|
-
|
|
1615
|
+
ngOnInit() {
|
|
1616
|
+
this.router.events.subscribe(event => {
|
|
1617
|
+
const path = `/${this.routerPath}`;
|
|
1618
|
+
if (event instanceof NavigationEnd) {
|
|
1619
|
+
if (this.router.url === path) {
|
|
1620
|
+
this.menuCtrl.close(this.ionMenuId);
|
|
1621
|
+
setTimeout(() => {
|
|
1622
|
+
this.menuCtrl.swipeGesture(true, this.ionMenuId);
|
|
1623
|
+
}, 1000);
|
|
1624
|
+
}
|
|
1625
|
+
else {
|
|
1626
|
+
this.menuCtrl.close(this.ionMenuId);
|
|
1627
|
+
setTimeout(() => {
|
|
1628
|
+
this.menuCtrl.swipeGesture(false, this.ionMenuId);
|
|
1629
|
+
}, 1000);
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1632
|
+
});
|
|
1633
|
+
}
|
|
1634
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EuimSidebarComponent, deps: [{ token: i1$2.Router }, { token: i1.MenuController }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1635
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EuimSidebarComponent, selector: "euim-sidebar", inputs: { ionMenuId: "ionMenuId", routerPath: "routerPath" }, host: { properties: { "className": "this.className" } }, ngImport: i0, template: "<ion-menu contentId=\"{{ionMenuId}}\" menuId=\"{{ionMenuId}}\" slot=\"start\">\n <ng-content></ng-content>\n <ion-content>\n <ng-content select=\"euim-sidebar-content\"></ng-content>\n </ion-content>\n</ion-menu>\n", styles: [".euim-sidebar-content{height:100%}.euim-sidebar-content__list{height:auto;padding:0}.euim-sidebar-content ion-item euim-avatar-icon:first-child{margin-inline-end:var(--eui-base-spacing-m)}.euim-sidebar-content ion-icon[slot=start]{margin-inline-end:var(--eui-base-spacing-m)}\n"], dependencies: [{ kind: "component", type: i1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i1.IonMenu, selector: "ion-menu", inputs: ["contentId", "disabled", "maxEdgeStart", "menuId", "side", "swipeGesture", "type"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1613
1636
|
}
|
|
1614
1637
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EuimSidebarComponent, decorators: [{
|
|
1615
1638
|
type: Component,
|
|
1616
1639
|
args: [{ selector: 'euim-sidebar', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ion-menu contentId=\"{{ionMenuId}}\" menuId=\"{{ionMenuId}}\" slot=\"start\">\n <ng-content></ng-content>\n <ion-content>\n <ng-content select=\"euim-sidebar-content\"></ng-content>\n </ion-content>\n</ion-menu>\n", styles: [".euim-sidebar-content{height:100%}.euim-sidebar-content__list{height:auto;padding:0}.euim-sidebar-content ion-item euim-avatar-icon:first-child{margin-inline-end:var(--eui-base-spacing-m)}.euim-sidebar-content ion-icon[slot=start]{margin-inline-end:var(--eui-base-spacing-m)}\n"] }]
|
|
1617
|
-
}], propDecorators: { className: [{
|
|
1640
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1.MenuController }]; }, propDecorators: { className: [{
|
|
1618
1641
|
type: HostBinding
|
|
1619
1642
|
}], ionMenuId: [{
|
|
1620
1643
|
type: Input
|
|
1644
|
+
}], routerPath: [{
|
|
1645
|
+
type: Input
|
|
1621
1646
|
}] } });
|
|
1622
1647
|
|
|
1623
1648
|
class EuimSidebarContentComponent extends EuimSidebarComponent {
|