@sumaris-net/ngx-components 2.4.128 → 2.4.129
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/esm2020/src/app/core/menu/menu.model.mjs +7 -6
- package/esm2020/src/app/core/menu/menu.service.mjs +16 -15
- package/esm2020/src/app/core/menu/sub-menu-tab.directive.mjs +13 -13
- package/esm2020/src/app/core/menu/testing/menu-other.testing.mjs +5 -4
- package/esm2020/src/app/core/menu/testing/menu.testing.mjs +13 -7
- package/esm2020/src/app/core/menu/testing/menu.testing.module.mjs +2 -2
- package/esm2020/src/environments/environment.mjs +5 -5
- package/fesm2015/sumaris-net.ngx-components.mjs +48 -40
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +48 -40
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/core/menu/menu.service.d.ts +3 -3
- package/src/app/core/menu/testing/menu.testing.d.ts +5 -1
|
@@ -11738,10 +11738,10 @@ const environment = Object.freeze({
|
|
|
11738
11738
|
helpUrl: 'https://gitlab.ifremer.fr/sih-public/sumaris/sumaris-doc/-/blob/master/user-manual/index_fr.md',
|
|
11739
11739
|
// Development
|
|
11740
11740
|
defaultAuthValues: {
|
|
11741
|
-
|
|
11742
|
-
|
|
11743
|
-
|
|
11744
|
-
|
|
11741
|
+
// Basic auth (using Person.username)
|
|
11742
|
+
// username: 'admq2', password: 'q22006'
|
|
11743
|
+
// Token auth (using Person.pubkey)
|
|
11744
|
+
//username: 'admin@sumaris.net', password: 'admin',
|
|
11745
11745
|
},
|
|
11746
11746
|
account: {
|
|
11747
11747
|
enableListenChanges: true,
|
|
@@ -22682,10 +22682,11 @@ class MenuItems {
|
|
|
22682
22682
|
* @param otherItem
|
|
22683
22683
|
*/
|
|
22684
22684
|
static isSame(mainItem, otherItem) {
|
|
22685
|
-
return mainItem.
|
|
22686
|
-
|
|
22687
|
-
|
|
22688
|
-
|
|
22685
|
+
return (isNotNil(mainItem?.id) && mainItem.id === otherItem?.id)
|
|
22686
|
+
|| (mainItem.path === otherItem.path
|
|
22687
|
+
&& mainItem.parentPath === otherItem.parentPath
|
|
22688
|
+
&& mainItem.title === otherItem.title
|
|
22689
|
+
&& this.isSameParams(mainItem.pathParams, otherItem.pathParams));
|
|
22689
22690
|
}
|
|
22690
22691
|
/**
|
|
22691
22692
|
* All key/value of the mainParams should exist (and be equals) in the other params
|
|
@@ -22790,7 +22791,7 @@ class MenuService extends StartableObservableService {
|
|
|
22790
22791
|
this.environment = environment;
|
|
22791
22792
|
this.accountChanges = new BehaviorSubject(undefined);
|
|
22792
22793
|
this._itemCounter = 0;
|
|
22793
|
-
this._logPrefix = '[menu-service]';
|
|
22794
|
+
this._logPrefix = '[menu-service] ';
|
|
22794
22795
|
this._$opened = new Subject();
|
|
22795
22796
|
this._$splitPaneWhen = new BehaviorSubject(DEFAULT_MENU_SHOW_WHEN);
|
|
22796
22797
|
this._$enabled = new BehaviorSubject(true);
|
|
@@ -22856,13 +22857,13 @@ class MenuService extends StartableObservableService {
|
|
|
22856
22857
|
if (!excludedItems.length)
|
|
22857
22858
|
return; // Skip if no items detached
|
|
22858
22859
|
if (this._debug)
|
|
22859
|
-
console.debug(`${this._logPrefix}
|
|
22860
|
+
console.debug(`${this._logPrefix}Detached sub menus: `, excludedItems);
|
|
22860
22861
|
// TODO Store excluded items
|
|
22861
22862
|
// TODO Restore old excluded items
|
|
22862
22863
|
// this.addSubMenuItems();
|
|
22863
22864
|
}
|
|
22864
22865
|
async ngOnStart() {
|
|
22865
|
-
console.info(`${this._logPrefix}
|
|
22866
|
+
console.info(`${this._logPrefix}Starting...`);
|
|
22866
22867
|
const [account, config] = await Promise.all([
|
|
22867
22868
|
this.accountService.ready(),
|
|
22868
22869
|
this.configService.ready(),
|
|
@@ -22876,7 +22877,7 @@ class MenuService extends StartableObservableService {
|
|
|
22876
22877
|
accountEvent$
|
|
22877
22878
|
]).subscribe(async ([config, account]) => {
|
|
22878
22879
|
if (this._debug)
|
|
22879
|
-
console.debug(`${this._logPrefix}
|
|
22880
|
+
console.debug(`${this._logPrefix}Received config or account event. Refreshing items...`, account);
|
|
22880
22881
|
// Load all items
|
|
22881
22882
|
await this._loadMenuItems(config, account);
|
|
22882
22883
|
// Emit account changes event
|
|
@@ -22900,18 +22901,19 @@ class MenuService extends StartableObservableService {
|
|
|
22900
22901
|
if (opts.skipIfExists) {
|
|
22901
22902
|
// DEBUG
|
|
22902
22903
|
if (this._debug)
|
|
22903
|
-
console.debug(`${this._logPrefix}
|
|
22904
|
-
return;
|
|
22904
|
+
console.debug(`${this._logPrefix}Skipping sub item (already exist)`, newItem);
|
|
22905
|
+
return existingItem;
|
|
22905
22906
|
}
|
|
22906
22907
|
if (this._debug)
|
|
22907
|
-
console.debug(`${this._logPrefix}
|
|
22908
|
+
console.debug(`${this._logPrefix}Updating existing sub item #`, existingItem.id);
|
|
22908
22909
|
// Replace existing item, but keep the existing id
|
|
22909
22910
|
newItem.id = existingItem.id;
|
|
22911
|
+
newItem.$children = existingItem.$children;
|
|
22910
22912
|
}
|
|
22911
22913
|
const parent = this._findParent(newItem, opts?.availableParents);
|
|
22912
22914
|
if (!parent) {
|
|
22913
|
-
console.warn(`${this._logPrefix}
|
|
22914
|
-
return
|
|
22915
|
+
console.warn(`${this._logPrefix}Unable to add sub item: no parent found`);
|
|
22916
|
+
return null;
|
|
22915
22917
|
}
|
|
22916
22918
|
// Generate item's id (if need)
|
|
22917
22919
|
if (isNil(newItem.id))
|
|
@@ -22920,11 +22922,11 @@ class MenuService extends StartableObservableService {
|
|
|
22920
22922
|
// Start listening route
|
|
22921
22923
|
if (!this._$listenRoute.value)
|
|
22922
22924
|
this._$listenRoute.next(true);
|
|
22923
|
-
return
|
|
22925
|
+
return newItem;
|
|
22924
22926
|
}
|
|
22925
22927
|
async _loadMenuItems(config, account) {
|
|
22926
22928
|
if (this._debug)
|
|
22927
|
-
console.debug(`${this._logPrefix}
|
|
22929
|
+
console.debug(`${this._logPrefix}Loading menu items...`);
|
|
22928
22930
|
// Save previous children of root items
|
|
22929
22931
|
const rootChildren = (this.data || [])
|
|
22930
22932
|
.reduce((res, rootItem) => res.concat(rootItem?.$children?.value || []), []);
|
|
@@ -22966,7 +22968,7 @@ class MenuService extends StartableObservableService {
|
|
|
22966
22968
|
}, items);
|
|
22967
22969
|
}
|
|
22968
22970
|
catch (err) {
|
|
22969
|
-
console.error(`${this._logPrefix}
|
|
22971
|
+
console.error(`${this._logPrefix}Invalid value for option '${CORE_CONFIG_OPTIONS.MENU_ITEMS.key}'. Expected an array of menu item`, err);
|
|
22970
22972
|
}
|
|
22971
22973
|
}
|
|
22972
22974
|
// Filter item using account rights
|
|
@@ -22990,7 +22992,7 @@ class MenuService extends StartableObservableService {
|
|
|
22990
22992
|
await this.addSubMenuItems(rootChildren, { skipIfExists: false, availableParents: items });
|
|
22991
22993
|
}
|
|
22992
22994
|
if (this._debug)
|
|
22993
|
-
console.debug(`${this._logPrefix}
|
|
22995
|
+
console.debug(`${this._logPrefix}Found ${items.length} visible items...`);
|
|
22994
22996
|
this.dataSubject.next(items);
|
|
22995
22997
|
}
|
|
22996
22998
|
_findExistingItem(item, items) {
|
|
@@ -23047,7 +23049,7 @@ class MenuService extends StartableObservableService {
|
|
|
23047
23049
|
if (!excludedItems.length)
|
|
23048
23050
|
return; // Skip if no items detached
|
|
23049
23051
|
if (this._debug)
|
|
23050
|
-
console.debug(`${this._logPrefix}
|
|
23052
|
+
console.debug(`${this._logPrefix}Detached sub menus: `, excludedItems);
|
|
23051
23053
|
// TODO Store excluded items
|
|
23052
23054
|
// TODO Restore old excluded items
|
|
23053
23055
|
// this.addSubMenuItems();
|
|
@@ -23401,21 +23403,20 @@ class SubMenuTabDirective {
|
|
|
23401
23403
|
parentPath,
|
|
23402
23404
|
icon: 'none',
|
|
23403
23405
|
path: this.path,
|
|
23404
|
-
pathParams
|
|
23406
|
+
pathParams,
|
|
23405
23407
|
});
|
|
23406
23408
|
}
|
|
23407
23409
|
async _addItemToMenu() {
|
|
23410
|
+
let menuItem = this._computeMenuItem();
|
|
23408
23411
|
if (this._menuItem) {
|
|
23409
|
-
|
|
23410
|
-
if (!MenuItems.isSame(newItem, this._menuItem))
|
|
23411
|
-
this._menuItem = newItem;
|
|
23412
|
+
menuItem.id = this._menuItem.id;
|
|
23412
23413
|
}
|
|
23413
|
-
|
|
23414
|
-
|
|
23415
|
-
|
|
23416
|
-
|
|
23417
|
-
|
|
23418
|
-
this.
|
|
23414
|
+
if (!menuItem.parentPath)
|
|
23415
|
+
return; // Skip if no parent
|
|
23416
|
+
if (isNilOrBlank(menuItem.title))
|
|
23417
|
+
return; // Skip if no title
|
|
23418
|
+
menuItem = await this.menuService.addSubMenuItem(menuItem, { skipIfExists: isNil(menuItem.id) });
|
|
23419
|
+
this._menuItem = menuItem;
|
|
23419
23420
|
}
|
|
23420
23421
|
}
|
|
23421
23422
|
SubMenuTabDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SubMenuTabDirective, deps: [{ token: MenuService }, { token: i7$3.MatTabGroup }, { token: i7$3.MatTab }, { token: i1$5.Router }], target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -23423,7 +23424,7 @@ SubMenuTabDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", ve
|
|
|
23423
23424
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SubMenuTabDirective, decorators: [{
|
|
23424
23425
|
type: Directive,
|
|
23425
23426
|
args: [{
|
|
23426
|
-
selector: '[appSubMenuTab]'
|
|
23427
|
+
selector: '[appSubMenuTab]',
|
|
23427
23428
|
}]
|
|
23428
23429
|
}], ctorParameters: function () { return [{ type: MenuService }, { type: i7$3.MatTabGroup }, { type: i7$3.MatTab }, { type: i1$5.Router }]; }, propDecorators: { label: [{
|
|
23429
23430
|
type: Input
|
|
@@ -36316,15 +36317,22 @@ class MenuTestingPage extends AppTabEditor {
|
|
|
36316
36317
|
constructor(route, // Modal editor give 'null'
|
|
36317
36318
|
router, navController, alertCtrl, translate, menuService) {
|
|
36318
36319
|
super(route, router, navController, alertCtrl, translate, {
|
|
36319
|
-
tabCount: 3
|
|
36320
|
+
tabCount: 3,
|
|
36320
36321
|
});
|
|
36321
36322
|
this.menuService = menuService;
|
|
36322
36323
|
this.logPrefix = '[menu-testing] ';
|
|
36323
36324
|
this.childPath = '';
|
|
36324
36325
|
this.title = '';
|
|
36325
|
-
this.secondTabTitle = '';
|
|
36326
36326
|
this.thirdTabTitle = '';
|
|
36327
36327
|
this.parentPath = null;
|
|
36328
|
+
this.showOtherLinks = true;
|
|
36329
|
+
this.$secondTabTitle = new BehaviorSubject('Second');
|
|
36330
|
+
}
|
|
36331
|
+
set secondTabTitle(value) {
|
|
36332
|
+
this.$secondTabTitle.next(value);
|
|
36333
|
+
}
|
|
36334
|
+
get secondTabTitle() {
|
|
36335
|
+
return this.$secondTabTitle.value;
|
|
36328
36336
|
}
|
|
36329
36337
|
ngOnInit() {
|
|
36330
36338
|
console.debug(`${this.logPrefix} Init page...`);
|
|
@@ -36357,7 +36365,6 @@ class MenuTestingPage extends AppTabEditor {
|
|
|
36357
36365
|
this.menuService.toggleSplitPaneWhen();
|
|
36358
36366
|
}
|
|
36359
36367
|
async initSubMenu() {
|
|
36360
|
-
const pathParam = MenuItems.parsePathWithQuery(this.router.url);
|
|
36361
36368
|
this.title = 'Menu';
|
|
36362
36369
|
this.secondTabTitle = 'Others';
|
|
36363
36370
|
this.thirdTabTitle = 'Third';
|
|
@@ -36371,10 +36378,10 @@ class MenuTestingPage extends AppTabEditor {
|
|
|
36371
36378
|
}
|
|
36372
36379
|
}
|
|
36373
36380
|
MenuTestingPage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MenuTestingPage, deps: [{ token: i1$5.ActivatedRoute }, { token: i1$5.Router }, { token: i2.NavController }, { token: i2.AlertController }, { token: i1$1.TranslateService }, { token: MenuService }], target: i0.ɵɵFactoryTarget.Component });
|
|
36374
|
-
MenuTestingPage.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: MenuTestingPage, selector: "app-testing-menu", viewQueries: [{ propertyName: "toggleThird", first: true, predicate: ["toggleThird"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<app-toolbar [defaultBackHref]=\"parentPath\">\n <ion-title>{{ title }}</ion-title>\n</app-toolbar>\n\n<ion-content>\n\n <mat-tab-group #tabGroup\n [(selectedIndex)]=\"selectedTabIndex\"\n (selectedTabChange)=\"onTabChange($event)\"\n dynamicHeight>\n\n <!-- TAB: 1 -->\n <mat-tab appSubMenuTab [subMenuTitle]=\"title\" [parentPath]=\"parentPath\" label=\"Details\" class=\"ion-padding\">\n <ng-template mat-tab-label>\n <ion-label>Details</ion-label>\n </ng-template>\n\n <div class=\"ion-padding\">\n <p>A first tab</p>\n\n <
|
|
36381
|
+
MenuTestingPage.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: MenuTestingPage, selector: "app-testing-menu", viewQueries: [{ propertyName: "toggleThird", first: true, predicate: ["toggleThird"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<app-toolbar [defaultBackHref]=\"parentPath\">\n <ion-title>{{ title }}</ion-title>\n</app-toolbar>\n\n<ion-content>\n\n <mat-tab-group #tabGroup\n [(selectedIndex)]=\"selectedTabIndex\"\n (selectedTabChange)=\"onTabChange($event)\"\n dynamicHeight>\n\n <!-- TAB: 1 -->\n <mat-tab appSubMenuTab [subMenuTitle]=\"title\" [parentPath]=\"parentPath\" label=\"Details\" class=\"ion-padding\">\n <ng-template mat-tab-label>\n <ion-label>Details</ion-label>\n </ng-template>\n\n <div class=\"ion-padding\">\n <p>A first tab</p>\n\n <p>\n <ion-toggle #toggleThird>\n Toggle Third Tab\n </ion-toggle>\n </p>\n\n <p>\n <ion-button (click)=\"enableMenu(false)\" *ngIf=\"menuService.enabled|async\">\n Disable menu\n </ion-button>\n <ion-button (click)=\"enableMenu(true)\" *ngIf=\"!(menuService.enabled|async)\">\n Enable menu\n </ion-button>\n <ion-button (click)=\"toggleSplitPaneWhen()\"\n [disabled]=\"!(menuService.enabled|async)\">\n Toggle split pane\n </ion-button>\n </p>\n </div>\n\n </mat-tab>\n\n <!-- TAB: 2 -->\n <mat-tab appSubMenuTab [label]=\"$secondTabTitle|async\" class=\"ion-padding\">\n <ng-template mat-tab-label>\n <ion-label>{{$secondTabTitle|async}}</ion-label>\n </ng-template>\n\n <div class=\"ion-padding\">\n <p>A second tab</p>\n\n <p *ngIf=\"showOtherLinks\">\n Navigate to : <a [routerLink]=\"childPath+'/1'\" >\n {{ childPath }}/1\n </a>\n <br/>\n Navigate to : <a [routerLink]=\"childPath+'/2'\" >\n {{ childPath }}/2\n </a>\n </p>\n\n <p>\n <ion-button (click)=\"secondTabTitle = secondTabTitle + '_'\">\n Change tab label\n </ion-button>\n </p>\n </div>\n\n </mat-tab>\n\n <!-- TAB: 3 -->\n <mat-tab appSubMenuTab [label]=\"thirdTabTitle\" class=\"ion-padding\" [disabled]=\"!toggleThird.checked\">\n <ng-template mat-tab-label>\n <ion-label>{{thirdTabTitle}}</ion-label>\n </ng-template>\n\n <div class=\"ion-padding\">\n A third tab\n </div>\n\n </mat-tab>\n </mat-tab-group>\n</ion-content>\n", styles: [".menu-item{padding-left:0 px}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$5.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: SubMenuTabDirective, selector: "[appSubMenuTab]", inputs: ["label", "disabled", "parentPath", "path", "subMenuTitle"] }, { kind: "component", type: i2.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i2.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i2.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: i2.IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { kind: "component", type: i2.IonToggle, selector: "ion-toggle", inputs: ["alignment", "checked", "color", "disabled", "enableOnOffLabels", "justify", "labelPlacement", "legacy", "mode", "name", "value"] }, { kind: "directive", type: i2.BooleanValueAccessor, selector: "ion-checkbox,ion-toggle" }, { kind: "directive", type: i2.RouterLinkWithHrefDelegate, selector: "a[routerLink],area[routerLink]", inputs: ["routerDirection", "routerAnimation"] }, { kind: "component", type: i7$3.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { kind: "directive", type: i7$3.MatTabLabel, selector: "[mat-tab-label], [matTabLabel]" }, { kind: "component", type: i7$3.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "component", type: ToolbarComponent, selector: "app-toolbar", inputs: ["progressBarMode", "title", "color", "class", "backHref", "defaultBackHref", "hasValidate", "hasClose", "hasSearch", "canGoBack", "canShowMenu"], outputs: ["onValidate", "onClose", "onValidateAndClose", "onBackClick", "onSearch"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }] });
|
|
36375
36382
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MenuTestingPage, decorators: [{
|
|
36376
36383
|
type: Component,
|
|
36377
|
-
args: [{ selector: 'app-testing-menu', template: "<app-toolbar [defaultBackHref]=\"parentPath\">\n <ion-title>{{ title }}</ion-title>\n</app-toolbar>\n\n<ion-content>\n\n <mat-tab-group #tabGroup\n [(selectedIndex)]=\"selectedTabIndex\"\n (selectedTabChange)=\"onTabChange($event)\"\n dynamicHeight>\n\n <!-- TAB: 1 -->\n <mat-tab appSubMenuTab [subMenuTitle]=\"title\" [parentPath]=\"parentPath\" label=\"Details\" class=\"ion-padding\">\n <ng-template mat-tab-label>\n <ion-label>Details</ion-label>\n </ng-template>\n\n <div class=\"ion-padding\">\n <p>A first tab</p>\n\n <
|
|
36384
|
+
args: [{ selector: 'app-testing-menu', template: "<app-toolbar [defaultBackHref]=\"parentPath\">\n <ion-title>{{ title }}</ion-title>\n</app-toolbar>\n\n<ion-content>\n\n <mat-tab-group #tabGroup\n [(selectedIndex)]=\"selectedTabIndex\"\n (selectedTabChange)=\"onTabChange($event)\"\n dynamicHeight>\n\n <!-- TAB: 1 -->\n <mat-tab appSubMenuTab [subMenuTitle]=\"title\" [parentPath]=\"parentPath\" label=\"Details\" class=\"ion-padding\">\n <ng-template mat-tab-label>\n <ion-label>Details</ion-label>\n </ng-template>\n\n <div class=\"ion-padding\">\n <p>A first tab</p>\n\n <p>\n <ion-toggle #toggleThird>\n Toggle Third Tab\n </ion-toggle>\n </p>\n\n <p>\n <ion-button (click)=\"enableMenu(false)\" *ngIf=\"menuService.enabled|async\">\n Disable menu\n </ion-button>\n <ion-button (click)=\"enableMenu(true)\" *ngIf=\"!(menuService.enabled|async)\">\n Enable menu\n </ion-button>\n <ion-button (click)=\"toggleSplitPaneWhen()\"\n [disabled]=\"!(menuService.enabled|async)\">\n Toggle split pane\n </ion-button>\n </p>\n </div>\n\n </mat-tab>\n\n <!-- TAB: 2 -->\n <mat-tab appSubMenuTab [label]=\"$secondTabTitle|async\" class=\"ion-padding\">\n <ng-template mat-tab-label>\n <ion-label>{{$secondTabTitle|async}}</ion-label>\n </ng-template>\n\n <div class=\"ion-padding\">\n <p>A second tab</p>\n\n <p *ngIf=\"showOtherLinks\">\n Navigate to : <a [routerLink]=\"childPath+'/1'\" >\n {{ childPath }}/1\n </a>\n <br/>\n Navigate to : <a [routerLink]=\"childPath+'/2'\" >\n {{ childPath }}/2\n </a>\n </p>\n\n <p>\n <ion-button (click)=\"secondTabTitle = secondTabTitle + '_'\">\n Change tab label\n </ion-button>\n </p>\n </div>\n\n </mat-tab>\n\n <!-- TAB: 3 -->\n <mat-tab appSubMenuTab [label]=\"thirdTabTitle\" class=\"ion-padding\" [disabled]=\"!toggleThird.checked\">\n <ng-template mat-tab-label>\n <ion-label>{{thirdTabTitle}}</ion-label>\n </ng-template>\n\n <div class=\"ion-padding\">\n A third tab\n </div>\n\n </mat-tab>\n </mat-tab-group>\n</ion-content>\n", styles: [".menu-item{padding-left:0 px}\n"] }]
|
|
36378
36385
|
}], ctorParameters: function () { return [{ type: i1$5.ActivatedRoute }, { type: i1$5.Router }, { type: i2.NavController }, { type: i2.AlertController }, { type: i1$1.TranslateService }, { type: MenuService }]; }, propDecorators: { toggleThird: [{
|
|
36379
36386
|
type: ViewChild,
|
|
36380
36387
|
args: ['toggleThird']
|
|
@@ -36385,6 +36392,7 @@ class OtherMenuTestingPage extends MenuTestingPage {
|
|
|
36385
36392
|
router, navController, alertCtrl, translate, menuService) {
|
|
36386
36393
|
super(route, router, navController, alertCtrl, translate, menuService);
|
|
36387
36394
|
this.logPrefix = '[menu-testing-other] ';
|
|
36395
|
+
this.showOtherLinks = false;
|
|
36388
36396
|
}
|
|
36389
36397
|
async initSubMenu() {
|
|
36390
36398
|
const otherId = this.route.snapshot.paramMap.get('otherId');
|
|
@@ -36398,10 +36406,10 @@ class OtherMenuTestingPage extends MenuTestingPage {
|
|
|
36398
36406
|
}
|
|
36399
36407
|
}
|
|
36400
36408
|
OtherMenuTestingPage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OtherMenuTestingPage, deps: [{ token: i1$5.ActivatedRoute }, { token: i1$5.Router }, { token: i2.NavController }, { token: i2.AlertController }, { token: i1$1.TranslateService }, { token: MenuService }], target: i0.ɵɵFactoryTarget.Component });
|
|
36401
|
-
OtherMenuTestingPage.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: OtherMenuTestingPage, selector: "app-testing-menu-other", usesInheritance: true, ngImport: i0, template: "<app-toolbar [defaultBackHref]=\"parentPath\">\n <ion-title>{{ title }}</ion-title>\n</app-toolbar>\n\n<ion-content>\n\n <mat-tab-group #tabGroup\n [(selectedIndex)]=\"selectedTabIndex\"\n (selectedTabChange)=\"onTabChange($event)\"\n dynamicHeight>\n\n <!-- TAB: 1 -->\n <mat-tab appSubMenuTab [subMenuTitle]=\"title\" [parentPath]=\"parentPath\" label=\"Details\" class=\"ion-padding\">\n <ng-template mat-tab-label>\n <ion-label>Details</ion-label>\n </ng-template>\n\n <div class=\"ion-padding\">\n <p>A first tab</p>\n\n <
|
|
36409
|
+
OtherMenuTestingPage.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: OtherMenuTestingPage, selector: "app-testing-menu-other", usesInheritance: true, ngImport: i0, template: "<app-toolbar [defaultBackHref]=\"parentPath\">\n <ion-title>{{ title }}</ion-title>\n</app-toolbar>\n\n<ion-content>\n\n <mat-tab-group #tabGroup\n [(selectedIndex)]=\"selectedTabIndex\"\n (selectedTabChange)=\"onTabChange($event)\"\n dynamicHeight>\n\n <!-- TAB: 1 -->\n <mat-tab appSubMenuTab [subMenuTitle]=\"title\" [parentPath]=\"parentPath\" label=\"Details\" class=\"ion-padding\">\n <ng-template mat-tab-label>\n <ion-label>Details</ion-label>\n </ng-template>\n\n <div class=\"ion-padding\">\n <p>A first tab</p>\n\n <p>\n <ion-toggle #toggleThird>\n Toggle Third Tab\n </ion-toggle>\n </p>\n\n <p>\n <ion-button (click)=\"enableMenu(false)\" *ngIf=\"menuService.enabled|async\">\n Disable menu\n </ion-button>\n <ion-button (click)=\"enableMenu(true)\" *ngIf=\"!(menuService.enabled|async)\">\n Enable menu\n </ion-button>\n <ion-button (click)=\"toggleSplitPaneWhen()\"\n [disabled]=\"!(menuService.enabled|async)\">\n Toggle split pane\n </ion-button>\n </p>\n </div>\n\n </mat-tab>\n\n <!-- TAB: 2 -->\n <mat-tab appSubMenuTab [label]=\"$secondTabTitle|async\" class=\"ion-padding\">\n <ng-template mat-tab-label>\n <ion-label>{{$secondTabTitle|async}}</ion-label>\n </ng-template>\n\n <div class=\"ion-padding\">\n <p>A second tab</p>\n\n <p *ngIf=\"showOtherLinks\">\n Navigate to : <a [routerLink]=\"childPath+'/1'\" >\n {{ childPath }}/1\n </a>\n <br/>\n Navigate to : <a [routerLink]=\"childPath+'/2'\" >\n {{ childPath }}/2\n </a>\n </p>\n\n <p>\n <ion-button (click)=\"secondTabTitle = secondTabTitle + '_'\">\n Change tab label\n </ion-button>\n </p>\n </div>\n\n </mat-tab>\n\n <!-- TAB: 3 -->\n <mat-tab appSubMenuTab [label]=\"thirdTabTitle\" class=\"ion-padding\" [disabled]=\"!toggleThird.checked\">\n <ng-template mat-tab-label>\n <ion-label>{{thirdTabTitle}}</ion-label>\n </ng-template>\n\n <div class=\"ion-padding\">\n A third tab\n </div>\n\n </mat-tab>\n </mat-tab-group>\n</ion-content>\n", styles: [".menu-item{padding-left:0 px}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$5.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: SubMenuTabDirective, selector: "[appSubMenuTab]", inputs: ["label", "disabled", "parentPath", "path", "subMenuTitle"] }, { kind: "component", type: i2.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i2.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i2.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: i2.IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { kind: "component", type: i2.IonToggle, selector: "ion-toggle", inputs: ["alignment", "checked", "color", "disabled", "enableOnOffLabels", "justify", "labelPlacement", "legacy", "mode", "name", "value"] }, { kind: "directive", type: i2.BooleanValueAccessor, selector: "ion-checkbox,ion-toggle" }, { kind: "directive", type: i2.RouterLinkWithHrefDelegate, selector: "a[routerLink],area[routerLink]", inputs: ["routerDirection", "routerAnimation"] }, { kind: "component", type: i7$3.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { kind: "directive", type: i7$3.MatTabLabel, selector: "[mat-tab-label], [matTabLabel]" }, { kind: "component", type: i7$3.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "component", type: ToolbarComponent, selector: "app-toolbar", inputs: ["progressBarMode", "title", "color", "class", "backHref", "defaultBackHref", "hasValidate", "hasClose", "hasSearch", "canGoBack", "canShowMenu"], outputs: ["onValidate", "onClose", "onValidateAndClose", "onBackClick", "onSearch"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }] });
|
|
36402
36410
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OtherMenuTestingPage, decorators: [{
|
|
36403
36411
|
type: Component,
|
|
36404
|
-
args: [{ selector: 'app-testing-menu-other', template: "<app-toolbar [defaultBackHref]=\"parentPath\">\n <ion-title>{{ title }}</ion-title>\n</app-toolbar>\n\n<ion-content>\n\n <mat-tab-group #tabGroup\n [(selectedIndex)]=\"selectedTabIndex\"\n (selectedTabChange)=\"onTabChange($event)\"\n dynamicHeight>\n\n <!-- TAB: 1 -->\n <mat-tab appSubMenuTab [subMenuTitle]=\"title\" [parentPath]=\"parentPath\" label=\"Details\" class=\"ion-padding\">\n <ng-template mat-tab-label>\n <ion-label>Details</ion-label>\n </ng-template>\n\n <div class=\"ion-padding\">\n <p>A first tab</p>\n\n <
|
|
36412
|
+
args: [{ selector: 'app-testing-menu-other', template: "<app-toolbar [defaultBackHref]=\"parentPath\">\n <ion-title>{{ title }}</ion-title>\n</app-toolbar>\n\n<ion-content>\n\n <mat-tab-group #tabGroup\n [(selectedIndex)]=\"selectedTabIndex\"\n (selectedTabChange)=\"onTabChange($event)\"\n dynamicHeight>\n\n <!-- TAB: 1 -->\n <mat-tab appSubMenuTab [subMenuTitle]=\"title\" [parentPath]=\"parentPath\" label=\"Details\" class=\"ion-padding\">\n <ng-template mat-tab-label>\n <ion-label>Details</ion-label>\n </ng-template>\n\n <div class=\"ion-padding\">\n <p>A first tab</p>\n\n <p>\n <ion-toggle #toggleThird>\n Toggle Third Tab\n </ion-toggle>\n </p>\n\n <p>\n <ion-button (click)=\"enableMenu(false)\" *ngIf=\"menuService.enabled|async\">\n Disable menu\n </ion-button>\n <ion-button (click)=\"enableMenu(true)\" *ngIf=\"!(menuService.enabled|async)\">\n Enable menu\n </ion-button>\n <ion-button (click)=\"toggleSplitPaneWhen()\"\n [disabled]=\"!(menuService.enabled|async)\">\n Toggle split pane\n </ion-button>\n </p>\n </div>\n\n </mat-tab>\n\n <!-- TAB: 2 -->\n <mat-tab appSubMenuTab [label]=\"$secondTabTitle|async\" class=\"ion-padding\">\n <ng-template mat-tab-label>\n <ion-label>{{$secondTabTitle|async}}</ion-label>\n </ng-template>\n\n <div class=\"ion-padding\">\n <p>A second tab</p>\n\n <p *ngIf=\"showOtherLinks\">\n Navigate to : <a [routerLink]=\"childPath+'/1'\" >\n {{ childPath }}/1\n </a>\n <br/>\n Navigate to : <a [routerLink]=\"childPath+'/2'\" >\n {{ childPath }}/2\n </a>\n </p>\n\n <p>\n <ion-button (click)=\"secondTabTitle = secondTabTitle + '_'\">\n Change tab label\n </ion-button>\n </p>\n </div>\n\n </mat-tab>\n\n <!-- TAB: 3 -->\n <mat-tab appSubMenuTab [label]=\"thirdTabTitle\" class=\"ion-padding\" [disabled]=\"!toggleThird.checked\">\n <ng-template mat-tab-label>\n <ion-label>{{thirdTabTitle}}</ion-label>\n </ng-template>\n\n <div class=\"ion-padding\">\n A third tab\n </div>\n\n </mat-tab>\n </mat-tab-group>\n</ion-content>\n", styles: [".menu-item{padding-left:0 px}\n"] }]
|
|
36405
36413
|
}], ctorParameters: function () { return [{ type: i1$5.ActivatedRoute }, { type: i1$5.Router }, { type: i2.NavController }, { type: i2.AlertController }, { type: i1$1.TranslateService }, { type: MenuService }]; } });
|
|
36406
36414
|
|
|
36407
36415
|
const routes$4 = [
|