@sumaris-net/ngx-components 2.4.132 → 2.4.134
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/home/home.mjs +1 -1
- package/esm2020/src/app/core/menu/menu.component.mjs +21 -26
- package/esm2020/src/app/core/menu/menu.model.mjs +131 -33
- package/esm2020/src/app/core/menu/menu.module.mjs +14 -4
- package/esm2020/src/app/core/menu/menu.service.mjs +224 -161
- package/esm2020/src/app/core/menu/sub-menu-tab.directive.mjs +47 -25
- package/esm2020/src/app/core/menu/testing/menu-other.testing.mjs +10 -7
- package/esm2020/src/app/core/menu/testing/menu.testing.mjs +29 -12
- package/esm2020/src/app/core/settings/settings.page.mjs +1 -1
- package/esm2020/src/app/social/message/message.form.mjs +11 -8
- package/fesm2015/sumaris-net.ngx-components.mjs +516 -298
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +470 -260
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/core/home/home.d.ts +5 -5
- package/src/app/core/menu/menu.component.d.ts +8 -10
- package/src/app/core/menu/menu.model.d.ts +67 -11
- package/src/app/core/menu/menu.module.d.ts +4 -2
- package/src/app/core/menu/menu.service.d.ts +20 -19
- package/src/app/core/menu/sub-menu-tab.directive.d.ts +8 -3
- package/src/app/core/menu/testing/menu.testing.d.ts +5 -2
- package/src/app/core/settings/settings.page.d.ts +5 -5
- package/src/theme/_ngx-components.scss +2 -1
package/package.json
CHANGED
|
@@ -11,13 +11,13 @@ import { ConfigService } from '../services/config.service';
|
|
|
11
11
|
import { PlatformService } from '../services/platform.service';
|
|
12
12
|
import { LocalSettingsService } from '../services/local-settings.service';
|
|
13
13
|
import { NetworkService } from '../services/network.service';
|
|
14
|
-
import {
|
|
14
|
+
import { IMenuItem } from '../menu/menu.model';
|
|
15
15
|
import { ShowToastOptions } from '../../shared/toast/toasts';
|
|
16
16
|
import { Environment } from '../../../environments/environment.class';
|
|
17
17
|
import { HistoryPageReference } from '../services/model/history.model';
|
|
18
18
|
import * as i0 from "@angular/core";
|
|
19
19
|
export declare function getRandomImage(files: String[]): String;
|
|
20
|
-
export declare const APP_HOME_BUTTONS: InjectionToken<
|
|
20
|
+
export declare const APP_HOME_BUTTONS: InjectionToken<IMenuItem[]>;
|
|
21
21
|
export declare class HomePage implements OnDestroy {
|
|
22
22
|
private accountService;
|
|
23
23
|
private modalCtrl;
|
|
@@ -30,7 +30,7 @@ export declare class HomePage implements OnDestroy {
|
|
|
30
30
|
settings: LocalSettingsService;
|
|
31
31
|
protected environment: Environment;
|
|
32
32
|
locales: LocaleConfig[];
|
|
33
|
-
buttons:
|
|
33
|
+
buttons: IMenuItem[];
|
|
34
34
|
private readonly _debug;
|
|
35
35
|
private _started;
|
|
36
36
|
private _subscription;
|
|
@@ -50,10 +50,10 @@ export declare class HomePage implements OnDestroy {
|
|
|
50
50
|
contentStyle: any;
|
|
51
51
|
pageHistory: HistoryPageReference[];
|
|
52
52
|
offline: boolean;
|
|
53
|
-
$filteredButtons: BehaviorSubject<
|
|
53
|
+
$filteredButtons: BehaviorSubject<IMenuItem[]>;
|
|
54
54
|
readonly showAccountButton: boolean;
|
|
55
55
|
get currentLocaleCode(): string;
|
|
56
|
-
constructor(accountService: AccountService, modalCtrl: ModalController, translate: TranslateService, toastController: ToastController, configService: ConfigService, platform: PlatformService, cd: ChangeDetectorRef, network: NetworkService, settings: LocalSettingsService, environment: Environment, locales: LocaleConfig[], buttons:
|
|
56
|
+
constructor(accountService: AccountService, modalCtrl: ModalController, translate: TranslateService, toastController: ToastController, configService: ConfigService, platform: PlatformService, cd: ChangeDetectorRef, network: NetworkService, settings: LocalSettingsService, environment: Environment, locales: LocaleConfig[], buttons: IMenuItem[]);
|
|
57
57
|
ngOnDestroy(): void;
|
|
58
58
|
login(): Promise<void>;
|
|
59
59
|
register(): Promise<void>;
|
|
@@ -3,14 +3,13 @@ import { AlertController, IonSplitPane, MenuController, ModalController, NavCont
|
|
|
3
3
|
import { Account } from '../services/model/account.model';
|
|
4
4
|
import { AccountService } from '../services/account.service';
|
|
5
5
|
import { TranslateService } from '@ngx-translate/core';
|
|
6
|
-
import { ConfigService } from '../services/config.service';
|
|
7
6
|
import { PlatformService } from '../services/platform.service';
|
|
8
7
|
import { MenuService, SplitPaneShowWhen } from './menu.service';
|
|
9
|
-
import {
|
|
8
|
+
import { IMenuItem, MenuOptions } from './menu.model';
|
|
10
9
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
11
10
|
import { RxStrategyNames } from '@rx-angular/cdk/render-strategies';
|
|
12
11
|
import * as i0 from "@angular/core";
|
|
13
|
-
export declare const APP_MENU_ITEMS: InjectionToken<
|
|
12
|
+
export declare const APP_MENU_ITEMS: InjectionToken<IMenuItem[]>;
|
|
14
13
|
export declare const APP_MENU_OPTIONS: InjectionToken<MenuOptions>;
|
|
15
14
|
export declare class MenuComponent implements OnInit {
|
|
16
15
|
protected platformService: PlatformService;
|
|
@@ -20,14 +19,13 @@ export declare class MenuComponent implements OnInit {
|
|
|
20
19
|
protected modalCtrl: ModalController;
|
|
21
20
|
protected alertController: AlertController;
|
|
22
21
|
protected translate: TranslateService;
|
|
23
|
-
protected configService: ConfigService;
|
|
24
22
|
protected cd: ChangeDetectorRef;
|
|
25
23
|
protected menuService: MenuService;
|
|
26
24
|
protected router: Router;
|
|
27
25
|
protected environment: any;
|
|
28
26
|
protected route: ActivatedRoute;
|
|
29
27
|
protected options: MenuOptions;
|
|
30
|
-
protected items:
|
|
28
|
+
protected items: IMenuItem[];
|
|
31
29
|
id: string;
|
|
32
30
|
menuId: string;
|
|
33
31
|
side: string;
|
|
@@ -44,13 +42,13 @@ export declare class MenuComponent implements OnInit {
|
|
|
44
42
|
accountEmail: string;
|
|
45
43
|
private readonly _debug;
|
|
46
44
|
private _subscription;
|
|
47
|
-
constructor(platformService: PlatformService, accountService: AccountService, navController: NavController, menu: MenuController, modalCtrl: ModalController, alertController: AlertController, translate: TranslateService,
|
|
48
|
-
options: MenuOptions, items:
|
|
45
|
+
constructor(platformService: PlatformService, accountService: AccountService, navController: NavController, menu: MenuController, modalCtrl: ModalController, alertController: AlertController, translate: TranslateService, cd: ChangeDetectorRef, menuService: MenuService, router: Router, environment: any, route: ActivatedRoute, // Modal editor give 'null'
|
|
46
|
+
options: MenuOptions, items: IMenuItem[]);
|
|
49
47
|
ngOnInit(): Promise<void>;
|
|
50
48
|
onLogin(account: Account): Promise<void>;
|
|
51
49
|
onLogout(skipRedirect?: boolean): Promise<void>;
|
|
52
50
|
logout(): Promise<void>;
|
|
53
|
-
trackByFn(index: number, item:
|
|
51
|
+
trackByFn(index: number, item: IMenuItem): string;
|
|
54
52
|
enable(value: boolean): Promise<void>;
|
|
55
53
|
open(): Promise<boolean>;
|
|
56
54
|
close(): Promise<boolean>;
|
|
@@ -67,7 +65,7 @@ export declare class MenuComponent implements OnInit {
|
|
|
67
65
|
}): void;
|
|
68
66
|
protected detectChanges(): void;
|
|
69
67
|
protected markForCheck(): void;
|
|
70
|
-
protected
|
|
71
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MenuComponent, [null, null, null, null, null, null, null, null, null, null, null,
|
|
68
|
+
protected togglePinned(event: Event, item: IMenuItem): void;
|
|
69
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuComponent, [null, null, null, null, null, null, null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
72
70
|
static ɵcmp: i0.ɵɵComponentDeclaration<MenuComponent, "app-menu", never, { "id": "id"; "menuId": "menuId"; "side": "side"; "contentId": "contentId"; "logo": "logo"; "appName": "appName"; "appVersion": "appVersion"; "rxStrategy": "rxStrategy"; }, {}, never, ["*", "[headerBottomRight]"], false>;
|
|
73
71
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { UserProfileLabel } from '../services/model/person.model';
|
|
2
2
|
import { Configuration } from '../services/model/config.model';
|
|
3
|
-
import { IconRef } from '../../shared/types';
|
|
3
|
+
import { AppColors, IconRef } from '../../shared/types';
|
|
4
4
|
import { BehaviorSubject } from 'rxjs';
|
|
5
5
|
import { MenuPathParam } from './menu.service';
|
|
6
6
|
import { Account } from '../services/model/account.model';
|
|
7
|
-
export interface
|
|
8
|
-
id?: number;
|
|
7
|
+
export interface IMenuItem extends IconRef {
|
|
9
8
|
title: string;
|
|
10
9
|
path?: string;
|
|
11
10
|
after?: string;
|
|
@@ -13,7 +12,7 @@ export interface MenuItem extends IconRef {
|
|
|
13
12
|
action?: string | any;
|
|
14
13
|
profile?: UserProfileLabel;
|
|
15
14
|
exactProfile?: UserProfileLabel;
|
|
16
|
-
color?: string;
|
|
15
|
+
color?: string | AppColors;
|
|
17
16
|
cssClass?: string;
|
|
18
17
|
ifProperty?: string;
|
|
19
18
|
titleProperty?: string;
|
|
@@ -28,7 +27,48 @@ export interface MenuItem extends IconRef {
|
|
|
28
27
|
[key: string]: string;
|
|
29
28
|
};
|
|
30
29
|
pinned?: boolean;
|
|
31
|
-
|
|
30
|
+
id?: number;
|
|
31
|
+
parent?: IMenuItem;
|
|
32
|
+
children?: IMenuItem[];
|
|
33
|
+
}
|
|
34
|
+
export declare class MenuItem implements IMenuItem {
|
|
35
|
+
id?: number;
|
|
36
|
+
parent?: MenuItem;
|
|
37
|
+
$children: BehaviorSubject<MenuItem[]>;
|
|
38
|
+
$title: BehaviorSubject<string>;
|
|
39
|
+
titleProperty?: string;
|
|
40
|
+
titleArgs?: {
|
|
41
|
+
[key: string]: string;
|
|
42
|
+
};
|
|
43
|
+
path?: string;
|
|
44
|
+
pathParams?: {
|
|
45
|
+
[key: string]: string;
|
|
46
|
+
};
|
|
47
|
+
parentPath?: string;
|
|
48
|
+
parentPathParams?: {
|
|
49
|
+
[key: string]: string;
|
|
50
|
+
};
|
|
51
|
+
after?: string;
|
|
52
|
+
before?: string;
|
|
53
|
+
action?: string | any;
|
|
54
|
+
profile?: UserProfileLabel;
|
|
55
|
+
exactProfile?: UserProfileLabel;
|
|
56
|
+
color?: string | AppColors;
|
|
57
|
+
cssClass?: string;
|
|
58
|
+
ifProperty?: string;
|
|
59
|
+
pinned?: boolean;
|
|
60
|
+
icon?: string;
|
|
61
|
+
matIcon?: string;
|
|
62
|
+
matSvgIcon?: string;
|
|
63
|
+
static fromObject(source: any): MenuItem;
|
|
64
|
+
fromObject(source: any): void;
|
|
65
|
+
asObject(): any;
|
|
66
|
+
get children(): MenuItem[];
|
|
67
|
+
set children(value: MenuItem[]);
|
|
68
|
+
get title(): string;
|
|
69
|
+
set title(value: string);
|
|
70
|
+
get detached(): boolean;
|
|
71
|
+
isPinned(): any;
|
|
32
72
|
}
|
|
33
73
|
export declare class MenuItems {
|
|
34
74
|
/**
|
|
@@ -37,7 +77,21 @@ export declare class MenuItems {
|
|
|
37
77
|
* @param mainItem
|
|
38
78
|
* @param otherItem
|
|
39
79
|
*/
|
|
40
|
-
static isSame(mainItem:
|
|
80
|
+
static isSame(mainItem: IMenuItem, otherItem: IMenuItem): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Compare, without checking the children and the title
|
|
83
|
+
*
|
|
84
|
+
* @param mainItem
|
|
85
|
+
* @param otherItem
|
|
86
|
+
*/
|
|
87
|
+
static isSameIdOrPathAndParams(mainItem: IMenuItem, otherItem: IMenuItem): boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Compare, without checking the children
|
|
90
|
+
*
|
|
91
|
+
* @param mainItem
|
|
92
|
+
* @param otherItem
|
|
93
|
+
*/
|
|
94
|
+
static isSamePathAndParams(mainItem: IMenuItem, otherItem: IMenuItem): boolean;
|
|
41
95
|
/**
|
|
42
96
|
* All key/value of the mainParams should exist (and be equals) in the other params
|
|
43
97
|
*
|
|
@@ -49,17 +103,19 @@ export declare class MenuItems {
|
|
|
49
103
|
}, otherParams: {
|
|
50
104
|
[key: string]: string;
|
|
51
105
|
}): boolean;
|
|
52
|
-
static
|
|
53
|
-
static
|
|
54
|
-
static checkIfVisible(item: MenuItem, account: Account, config: Configuration, opts?: {
|
|
106
|
+
static isParent(child: IMenuItem, parent: IMenuItem | MenuPathParam): boolean;
|
|
107
|
+
static checkIfVisible(item: IMenuItem, account: Account, config: Configuration, opts?: {
|
|
55
108
|
isLogin?: boolean;
|
|
56
109
|
debug?: boolean;
|
|
57
110
|
logPrefix?: string;
|
|
58
111
|
}): boolean;
|
|
59
|
-
static
|
|
112
|
+
static checkIfSubMenuVisible(item: MenuItem, currentPathParam: MenuPathParam): boolean;
|
|
60
113
|
static parsePathWithQuery(pathWithQuery: string): MenuPathParam;
|
|
61
|
-
static getUrl(item:
|
|
114
|
+
static getUrl(item: IMenuItem): string;
|
|
62
115
|
static getUrlFromPathAndParams(path: string, params?: any): string;
|
|
116
|
+
static sortByParamOrIdComparator(paramName?: string): (n1: IMenuItem, n2: IMenuItem) => number;
|
|
117
|
+
static sortByTabOrId: (n1: IMenuItem, n2: IMenuItem) => number;
|
|
63
118
|
}
|
|
64
119
|
export declare class MenuOptions {
|
|
120
|
+
enableSubMenus?: boolean;
|
|
65
121
|
}
|
|
@@ -4,9 +4,11 @@ import * as i2 from "./sub-menu-tab.directive";
|
|
|
4
4
|
import * as i3 from "../../shared/shared.module";
|
|
5
5
|
import * as i4 from "@angular/router";
|
|
6
6
|
import * as i5 from "@rx-angular/template/for";
|
|
7
|
-
import * as i6 from "@
|
|
7
|
+
import * as i6 from "@rx-angular/template/if";
|
|
8
|
+
import * as i7 from "@rx-angular/template/let";
|
|
9
|
+
import * as i8 from "@ngx-translate/core";
|
|
8
10
|
export declare class AppMenuModule {
|
|
9
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<AppMenuModule, never>;
|
|
10
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AppMenuModule, [typeof i1.MenuComponent, typeof i2.SubMenuTabDirective], [typeof i3.SharedModule, typeof i4.RouterModule, typeof i5.ForModule, typeof i6.TranslateModule], [typeof
|
|
12
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AppMenuModule, [typeof i1.MenuComponent, typeof i2.SubMenuTabDirective], [typeof i3.SharedModule, typeof i4.RouterModule, typeof i5.ForModule, typeof i6.IfModule, typeof i7.LetModule, typeof i8.TranslateModule], [typeof i8.TranslateModule, typeof i1.MenuComponent, typeof i2.SubMenuTabDirective]>;
|
|
11
13
|
static ɵinj: i0.ɵɵInjectorDeclaration<AppMenuModule>;
|
|
12
14
|
}
|
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
import { BehaviorSubject, Observable } from 'rxjs';
|
|
2
|
-
import { MenuItem } from './menu.model';
|
|
2
|
+
import { IMenuItem, MenuItem } from './menu.model';
|
|
3
3
|
import { Router } from '@angular/router';
|
|
4
4
|
import { Environment } from '../../../environments/environment.class';
|
|
5
5
|
import { PlatformService } from '../services/platform.service';
|
|
6
6
|
import { AccountService } from '../services/account.service';
|
|
7
7
|
import { ConfigService } from '../services/config.service';
|
|
8
|
-
import { Configuration } from '../services/model/config.model';
|
|
9
8
|
import { Account } from '../services/model/account.model';
|
|
10
9
|
import { StartableObservableService } from '../../shared/services/startable-observable-service.class';
|
|
11
10
|
import * as i0 from "@angular/core";
|
|
12
11
|
export declare type SplitPaneShowWhen = boolean | 'lg';
|
|
13
12
|
export declare const DEFAULT_MENU_SHOW_WHEN: SplitPaneShowWhen;
|
|
14
|
-
export interface AddSubMenuItemsOption {
|
|
15
|
-
skipIfExists?: boolean;
|
|
16
|
-
availableParents?: MenuItem[];
|
|
17
|
-
}
|
|
18
13
|
export interface MenuPathParam {
|
|
19
14
|
path: string;
|
|
20
15
|
params: {
|
|
@@ -36,28 +31,34 @@ export declare class MenuService extends StartableObservableService<MenuItem[]>
|
|
|
36
31
|
private readonly _$splitPaneWhen;
|
|
37
32
|
private readonly _$enabled;
|
|
38
33
|
private readonly _$listenRoute;
|
|
39
|
-
constructor(platformService: PlatformService, configService: ConfigService, accountService: AccountService, router: Router, environment: Environment, staticItems?:
|
|
34
|
+
constructor(platformService: PlatformService, configService: ConfigService, accountService: AccountService, router: Router, environment: Environment, staticItems?: IMenuItem[]);
|
|
40
35
|
get opened(): Observable<boolean>;
|
|
41
36
|
get splitPaneWhen(): Observable<SplitPaneShowWhen>;
|
|
42
37
|
get enabled(): Observable<boolean>;
|
|
43
38
|
enable(value: boolean): void;
|
|
44
39
|
setSplitPaneShowWhen(value: SplitPaneShowWhen): void;
|
|
45
40
|
toggleSplitPaneWhen(): void;
|
|
41
|
+
loadOrCreate(source: Partial<IMenuItem>): MenuItem;
|
|
42
|
+
addSubMenuItems(sources: IMenuItem[], opts?: {
|
|
43
|
+
skipIfExists?: boolean;
|
|
44
|
+
}): Promise<MenuItem[]>;
|
|
45
|
+
addSubMenuItem(item: IMenuItem, opts?: {
|
|
46
|
+
skipIfExists?: boolean;
|
|
47
|
+
}): Promise<MenuItem>;
|
|
48
|
+
removeSubMenuItem(item: IMenuItem): Promise<MenuItem>;
|
|
49
|
+
togglePinned(source: IMenuItem): void;
|
|
46
50
|
_markAsOpened(): void;
|
|
47
51
|
_markAsClosed(): void;
|
|
48
|
-
addSubMenuItems(newItems: MenuItem[], opts?: AddSubMenuItemsOption): Promise<MenuItem[]>;
|
|
49
|
-
addSubMenuItem(newItem: MenuItem, opts?: AddSubMenuItemsOption): Promise<MenuItem>;
|
|
50
|
-
removeSubMenuItem(item: MenuItem): void;
|
|
51
|
-
detachSubMenuItem(pathParam: MenuPathParam): void;
|
|
52
52
|
protected ngOnStart(): Promise<MenuItem[]>;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
53
|
+
private _loadMenuItems;
|
|
54
|
+
private _addSubMenuItems;
|
|
55
|
+
private _addSubMenuItem;
|
|
56
|
+
private _computeNewId;
|
|
57
|
+
private _detachSubMenuItems;
|
|
58
|
+
private _detachToParent;
|
|
59
|
+
private _findExistingItem;
|
|
60
|
+
private _findParent;
|
|
61
|
+
private _attachMenuToParent;
|
|
61
62
|
static ɵfac: i0.ɵɵFactoryDeclaration<MenuService, [null, null, null, null, null, { optional: true; }]>;
|
|
62
63
|
static ɵprov: i0.ɵɵInjectableDeclaration<MenuService>;
|
|
63
64
|
}
|
|
@@ -2,6 +2,7 @@ import { AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
|
2
2
|
import { MatTab, MatTabGroup } from '@angular/material/tabs';
|
|
3
3
|
import { Router } from '@angular/router';
|
|
4
4
|
import { MenuService } from './menu.service';
|
|
5
|
+
import { IconRef } from '../../shared/types';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class SubMenuTabDirective implements OnChanges, AfterViewInit {
|
|
7
8
|
private menuService;
|
|
@@ -13,12 +14,16 @@ export declare class SubMenuTabDirective implements OnChanges, AfterViewInit {
|
|
|
13
14
|
parentPath: string;
|
|
14
15
|
path: string;
|
|
15
16
|
subMenuTitle: string;
|
|
17
|
+
subMenuIcon: IconRef;
|
|
16
18
|
private _menuItem;
|
|
19
|
+
private _debug;
|
|
17
20
|
constructor(menuService: MenuService, tabGroup: MatTabGroup, tab: MatTab, router: Router);
|
|
18
21
|
ngAfterViewInit(): void;
|
|
19
22
|
ngOnChanges(changes: SimpleChanges): void;
|
|
20
|
-
private
|
|
21
|
-
private
|
|
23
|
+
private _removeToMenu;
|
|
24
|
+
private _addToMenu;
|
|
25
|
+
private get menuItem();
|
|
26
|
+
private get title();
|
|
22
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<SubMenuTabDirective, never>;
|
|
23
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<SubMenuTabDirective, "[appSubMenuTab]", never, { "label": "label"; "disabled": "disabled"; "parentPath": "parentPath"; "path": "path"; "subMenuTitle": "subMenuTitle"; }, {}, never, never, false>;
|
|
28
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SubMenuTabDirective, "[appSubMenuTab]", never, { "label": "label"; "disabled": "disabled"; "parentPath": "parentPath"; "path": "path"; "subMenuTitle": "subMenuTitle"; "subMenuIcon": "subMenuIcon"; }, {}, never, never, false>;
|
|
24
29
|
}
|
|
@@ -2,18 +2,19 @@ import { AfterViewInit, OnDestroy, OnInit } from '@angular/core';
|
|
|
2
2
|
import { MenuService } from '../menu.service';
|
|
3
3
|
import { AppTabEditor } from '../../form/entity/editor.class';
|
|
4
4
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
5
|
-
import { AlertController,
|
|
5
|
+
import { AlertController, NavController } from '@ionic/angular';
|
|
6
6
|
import { TranslateService } from '@ngx-translate/core';
|
|
7
7
|
import { Subject } from 'rxjs';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
export declare class MenuTestingPage extends AppTabEditor implements OnInit, OnDestroy, AfterViewInit {
|
|
10
10
|
protected menuService: MenuService;
|
|
11
|
-
toggleThird: IonToggle;
|
|
12
11
|
protected logPrefix: string;
|
|
13
12
|
protected childPath: string;
|
|
14
13
|
protected thirdTabTitle: string;
|
|
15
14
|
protected parentPath: string;
|
|
15
|
+
protected path: string;
|
|
16
16
|
protected showOtherLinks: boolean;
|
|
17
|
+
protected showThirdTab: boolean;
|
|
17
18
|
protected $title: Subject<string>;
|
|
18
19
|
protected $secondTabTitle: Subject<string>;
|
|
19
20
|
protected set title(value: string);
|
|
@@ -29,6 +30,8 @@ export declare class MenuTestingPage extends AppTabEditor implements OnInit, OnD
|
|
|
29
30
|
save(event: Event | undefined, options: any): Promise<boolean>;
|
|
30
31
|
changeTitle(event?: UIEvent): void;
|
|
31
32
|
changeSecondTabTitle(event?: UIEvent): void;
|
|
33
|
+
addSubMenuItem(event?: UIEvent): void;
|
|
34
|
+
addOutsideRouteSubMenuItem(event?: UIEvent, pinned?: boolean): void;
|
|
32
35
|
protected enableMenu(value: boolean): void;
|
|
33
36
|
protected toggleSplitPaneWhen(): void;
|
|
34
37
|
protected initSubMenu(): Promise<void>;
|
|
@@ -14,9 +14,9 @@ import { AlertController, NavController } from '@ionic/angular';
|
|
|
14
14
|
import { Property } from '../../shared/types';
|
|
15
15
|
import { CanLeave } from '../../shared/guard/component-dirty.guard';
|
|
16
16
|
import { ISelectPeerModalOptions } from '../peer/select-peer.modal';
|
|
17
|
-
import {
|
|
17
|
+
import { IMenuItem } from '../menu/menu.model';
|
|
18
18
|
import * as i0 from "@angular/core";
|
|
19
|
-
export declare const APP_SETTINGS_MENU_ITEMS: InjectionToken<
|
|
19
|
+
export declare const APP_SETTINGS_MENU_ITEMS: InjectionToken<IMenuItem[]>;
|
|
20
20
|
export declare class SettingsPage extends AppForm<LocalSettings> implements OnInit, OnDestroy, CanLeave {
|
|
21
21
|
protected platform: PlatformService;
|
|
22
22
|
protected navController: NavController;
|
|
@@ -33,7 +33,7 @@ export declare class SettingsPage extends AppForm<LocalSettings> implements OnIn
|
|
|
33
33
|
mobile: boolean;
|
|
34
34
|
saving: boolean;
|
|
35
35
|
usageModes: UsageMode[];
|
|
36
|
-
menuItems:
|
|
36
|
+
menuItems: IMenuItem[];
|
|
37
37
|
propertyDefinitions: FormFieldDefinition[];
|
|
38
38
|
propertyDefinitionsByKey: FormFieldDefinitionMap;
|
|
39
39
|
propertyDefinitionsByIndex: {
|
|
@@ -44,7 +44,7 @@ export declare class SettingsPage extends AppForm<LocalSettings> implements OnIn
|
|
|
44
44
|
get accountInheritance(): boolean;
|
|
45
45
|
get isLogin(): boolean;
|
|
46
46
|
get propertiesForm(): UntypedFormArray;
|
|
47
|
-
constructor(injector: Injector, platform: PlatformService, navController: NavController, validatorService: LocalSettingsValidatorService, alertCtrl: AlertController, translate: TranslateService, formBuilder: UntypedFormBuilder, accountService: AccountService, settings: LocalSettingsService, cd: ChangeDetectorRef, network: NetworkService, locales: LocaleConfig[], menuItems?:
|
|
47
|
+
constructor(injector: Injector, platform: PlatformService, navController: NavController, validatorService: LocalSettingsValidatorService, alertCtrl: AlertController, translate: TranslateService, formBuilder: UntypedFormBuilder, accountService: AccountService, settings: LocalSettingsService, cd: ChangeDetectorRef, network: NetworkService, locales: LocaleConfig[], menuItems?: IMenuItem[]);
|
|
48
48
|
ngOnInit(): Promise<void>;
|
|
49
49
|
getPropertyDefinition(index: number): FormFieldDefinition;
|
|
50
50
|
updatePropertyDefinition(index: number): FormFieldDefinition;
|
|
@@ -59,7 +59,7 @@ export declare class SettingsPage extends AppForm<LocalSettings> implements OnIn
|
|
|
59
59
|
cancel(event?: Event): Promise<void>;
|
|
60
60
|
close(event?: Event): Promise<boolean>;
|
|
61
61
|
clearCache(event?: Event): Promise<void>;
|
|
62
|
-
executeAction(event: Event, item:
|
|
62
|
+
executeAction(event: Event, item: IMenuItem): Promise<void>;
|
|
63
63
|
protected getValue(): Promise<LocalSettings>;
|
|
64
64
|
protected getJsonValueToSave(): Promise<any>;
|
|
65
65
|
protected markForCheck(): void;
|
|
@@ -1308,7 +1308,8 @@ ion-modal.modal-fullscreen {
|
|
|
1308
1308
|
}
|
|
1309
1309
|
|
|
1310
1310
|
.popover-notifications {
|
|
1311
|
-
--
|
|
1311
|
+
--popover-top: 0;
|
|
1312
|
+
--max-height: calc(90vh - 40px /* header + footer height */ - var(--popover-top, 0px) - var(--offset-y, 0px));
|
|
1312
1313
|
|
|
1313
1314
|
ion-item {
|
|
1314
1315
|
--ion-item-background-color-hover: var(--ion-color-light);
|