@sumaris-net/ngx-components 18.19.6 → 18.20.0
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/doc/changelog.md +8 -0
- package/esm2022/src/app/core/home/home.mjs +12 -9
- package/esm2022/src/app/core/menu/menu.component.mjs +6 -5
- package/esm2022/src/app/core/menu/menu.model.mjs +21 -1
- package/esm2022/src/app/core/menu/sub-menu-tab.directive.mjs +9 -5
- package/esm2022/src/app/core/menu/testing/menu-other.testing.mjs +7 -6
- package/esm2022/src/app/core/menu/testing/menu.testing.mjs +14 -7
- package/esm2022/src/app/shared/toolbar/modal-toolbar.mjs +3 -3
- package/fesm2022/sumaris-net.ngx-components.mjs +78 -45
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/core/home/home.d.ts +3 -3
- package/src/app/core/menu/menu.model.d.ts +11 -0
- package/src/app/core/menu/sub-menu-tab.directive.d.ts +3 -3
- package/src/app/core/menu/testing/menu.testing.d.ts +3 -1
- package/src/app/shared/toolbar/modal-toolbar.d.ts +1 -1
- package/src/assets/manifest.json +1 -1
- package/src/theme/_ngx-components.scss +17 -0
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@ 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 { IMenuItem } from '../menu/menu.model';
|
|
14
|
+
import { IMenuItem, MenuItem } 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';
|
|
@@ -53,7 +53,6 @@ export declare class HomePage extends RxState<HomePageState> implements OnInit,
|
|
|
53
53
|
settings: LocalSettingsService;
|
|
54
54
|
protected environment: Environment;
|
|
55
55
|
protected locales: LocaleConfig[];
|
|
56
|
-
protected buttons: IMenuItem[];
|
|
57
56
|
protected config: IHomePageConfig;
|
|
58
57
|
private _subscription;
|
|
59
58
|
private _config;
|
|
@@ -79,9 +78,10 @@ export declare class HomePage extends RxState<HomePageState> implements OnInit,
|
|
|
79
78
|
protected feedMaxAgeInMonths: number;
|
|
80
79
|
protected feedMaxContentLength: number;
|
|
81
80
|
protected hasScrollbar: boolean;
|
|
81
|
+
protected readonly buttons: MenuItem[];
|
|
82
82
|
protected loading$: import("rxjs").Observable<boolean>;
|
|
83
83
|
protected $partners: BehaviorSubject<Department[]>;
|
|
84
|
-
protected $filteredButtons: BehaviorSubject<
|
|
84
|
+
protected $filteredButtons: BehaviorSubject<MenuItem[]>;
|
|
85
85
|
protected darkMode$: import("rxjs").Observable<boolean>;
|
|
86
86
|
protected pageHistory$: import("rxjs").Observable<HistoryPageReference[]>;
|
|
87
87
|
protected hasFeed$: import("rxjs").Observable<boolean>;
|
|
@@ -6,12 +6,17 @@ import { MenuPathParam } from './menu.service';
|
|
|
6
6
|
import { Account } from '../services/model/account.model';
|
|
7
7
|
import { Entity, EntityAsObjectOptions } from '../services/model/entity.model';
|
|
8
8
|
import { ITreeItemEntity } from '../services/model/tree-item-entity.model';
|
|
9
|
+
import { PredefinedColors } from '@ionic/core';
|
|
9
10
|
export interface IMenuItem extends IconRef {
|
|
10
11
|
id?: number;
|
|
11
12
|
parent?: IMenuItem;
|
|
12
13
|
children?: IMenuItem[];
|
|
13
14
|
title: string;
|
|
14
15
|
path?: string;
|
|
16
|
+
badge?: string | number;
|
|
17
|
+
badgeColor?: PredefinedColors;
|
|
18
|
+
$badge?: BehaviorSubject<string | number>;
|
|
19
|
+
$badgeColor?: BehaviorSubject<PredefinedColors>;
|
|
15
20
|
after?: string;
|
|
16
21
|
before?: string;
|
|
17
22
|
static?: boolean;
|
|
@@ -47,6 +52,8 @@ export declare class MenuItem extends Entity<MenuItem> implements IMenuItem, ITr
|
|
|
47
52
|
titleArgs?: {
|
|
48
53
|
[key: string]: string;
|
|
49
54
|
};
|
|
55
|
+
$badge: BehaviorSubject<string | number>;
|
|
56
|
+
$badgeColor: BehaviorSubject<PredefinedColors>;
|
|
50
57
|
path?: string;
|
|
51
58
|
pathParams?: {
|
|
52
59
|
[key: string]: string;
|
|
@@ -77,6 +84,10 @@ export declare class MenuItem extends Entity<MenuItem> implements IMenuItem, ITr
|
|
|
77
84
|
set children(value: MenuItem[]);
|
|
78
85
|
get title(): string;
|
|
79
86
|
set title(value: string);
|
|
87
|
+
get badge(): string | number;
|
|
88
|
+
set badge(value: string | number);
|
|
89
|
+
get badgeColor(): PredefinedColors;
|
|
90
|
+
set badgeColor(value: PredefinedColors);
|
|
80
91
|
get detached(): boolean;
|
|
81
92
|
get visible(): boolean;
|
|
82
93
|
get expanded(): boolean;
|
|
@@ -9,14 +9,14 @@ export declare class SubMenuTabDirective implements OnChanges, AfterViewInit {
|
|
|
9
9
|
private tabGroup;
|
|
10
10
|
private tab;
|
|
11
11
|
private router;
|
|
12
|
+
private _menuItem;
|
|
12
13
|
label: string;
|
|
13
14
|
disabled: boolean;
|
|
14
15
|
parentPath: string;
|
|
15
16
|
path: string;
|
|
16
17
|
subMenuTitle: string;
|
|
18
|
+
subMenuBadge: string | number;
|
|
17
19
|
subMenuIcon: IconRef;
|
|
18
|
-
private _menuItem;
|
|
19
|
-
private readonly _enable;
|
|
20
20
|
constructor(menuService: MenuService, tabGroup: MatTabGroup, tab: MatTab, router: Router);
|
|
21
21
|
ngAfterViewInit(): void;
|
|
22
22
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -25,5 +25,5 @@ export declare class SubMenuTabDirective implements OnChanges, AfterViewInit {
|
|
|
25
25
|
private get menuItem();
|
|
26
26
|
private get title();
|
|
27
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<SubMenuTabDirective, never>;
|
|
28
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<SubMenuTabDirective, "[appSubMenuTab]", never, { "label": { "alias": "label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "parentPath": { "alias": "parentPath"; "required": false; }; "path": { "alias": "path"; "required": false; }; "subMenuTitle": { "alias": "subMenuTitle"; "required": false; }; "subMenuIcon": { "alias": "subMenuIcon"; "required": false; }; }, {}, never, never, false, never>;
|
|
28
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SubMenuTabDirective, "[appSubMenuTab]", never, { "label": { "alias": "label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "parentPath": { "alias": "parentPath"; "required": false; }; "path": { "alias": "path"; "required": false; }; "subMenuTitle": { "alias": "subMenuTitle"; "required": false; }; "subMenuBadge": { "alias": "subMenuBadge"; "required": false; }; "subMenuIcon": { "alias": "subMenuIcon"; "required": false; }; }, {}, never, never, false, never>;
|
|
29
29
|
}
|
|
@@ -3,7 +3,7 @@ import { MenuService } from '../menu.service';
|
|
|
3
3
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
4
4
|
import { AlertController, NavController } from '@ionic/angular';
|
|
5
5
|
import { TranslateService } from '@ngx-translate/core';
|
|
6
|
-
import { Subject } from 'rxjs';
|
|
6
|
+
import { BehaviorSubject, Subject } from 'rxjs';
|
|
7
7
|
import { MatTabGroup } from '@angular/material/tabs';
|
|
8
8
|
import { AppTabEditor } from '../../form/entity/tab-editor.class';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
@@ -18,6 +18,7 @@ export declare class MenuTestingPage extends AppTabEditor implements OnInit, OnD
|
|
|
18
18
|
protected showThirdTab: boolean;
|
|
19
19
|
protected $title: Subject<string>;
|
|
20
20
|
protected $secondTabTitle: Subject<string>;
|
|
21
|
+
protected $thirdTabBadge: BehaviorSubject<number>;
|
|
21
22
|
protected _subSelectedTabIndex: number;
|
|
22
23
|
subTabCount: number;
|
|
23
24
|
set subSelectedTabIndex(value: number);
|
|
@@ -46,6 +47,7 @@ export declare class MenuTestingPage extends AppTabEditor implements OnInit, OnD
|
|
|
46
47
|
protected getDefaultTitle(): string;
|
|
47
48
|
protected computeTitle(): Promise<string>;
|
|
48
49
|
setSubSelectedTabIndex(value: number): void;
|
|
50
|
+
protected incrementThirdTabBadge(): void;
|
|
49
51
|
static ɵfac: i0.ɵɵFactoryDeclaration<MenuTestingPage, never>;
|
|
50
52
|
static ɵcmp: i0.ɵɵComponentDeclaration<MenuTestingPage, "app-testing-menu", never, { "subSelectedTabIndex": { "alias": "subSelectedTabIndex"; "required": false; }; }, { "subSelectedTabIndexChange": "subSelectedTabIndexChange"; }, never, never, false, never>;
|
|
51
53
|
}
|
|
@@ -17,5 +17,5 @@ export declare class ModalToolbarComponent implements OnInit, OnDestroy {
|
|
|
17
17
|
ngOnInit(): void;
|
|
18
18
|
ngOnDestroy(): void;
|
|
19
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<ModalToolbarComponent, never>;
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ModalToolbarComponent, "app-modal-toolbar", never, { "modalName": { "alias": "modalName"; "required": false; }; "title": { "alias": "title"; "required": false; }; "color": { "alias": "color"; "required": false; }; "showSpinner": { "alias": "showSpinner"; "required": false; }; "canValidate": { "alias": "canValidate"; "required": false; }; "validateIcon": { "alias": "validateIcon"; "required": false; }; }, { "cancel": "cancel"; "validate": "validate"; }, never, ["[slot=start]", "ion-title", "ion-buttons[slot=end]", "ion-button[slot=end]"], false, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ModalToolbarComponent, "app-modal-toolbar", never, { "modalName": { "alias": "modalName"; "required": false; }; "title": { "alias": "title"; "required": false; }; "color": { "alias": "color"; "required": false; }; "showSpinner": { "alias": "showSpinner"; "required": false; }; "canValidate": { "alias": "canValidate"; "required": false; }; "validateIcon": { "alias": "validateIcon"; "required": false; }; }, { "cancel": "cancel"; "validate": "validate"; }, never, ["[slot=start]", "[slot=title], ion-title", "ion-buttons[slot=end]", "ion-button[slot=end]"], false, never>;
|
|
21
21
|
}
|
package/src/assets/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "ngx-sumaris-components",
|
|
3
3
|
"short_name": "ngx-sumaris-components",
|
|
4
4
|
"manifest_version": 1,
|
|
5
|
-
"version": "18.
|
|
5
|
+
"version": "18.20.0",
|
|
6
6
|
"default_locale": "fr",
|
|
7
7
|
"description": "Angular components for building beautiful and responsive Apps",
|
|
8
8
|
"icons": [{
|
|
@@ -911,6 +911,23 @@ ion-button[expand="full"],
|
|
|
911
911
|
right: 0;
|
|
912
912
|
}
|
|
913
913
|
}
|
|
914
|
+
ion-badge {
|
|
915
|
+
&[slot='start'],
|
|
916
|
+
&[slot='end'] {
|
|
917
|
+
margin-left: unset;
|
|
918
|
+
margin-right: unset;
|
|
919
|
+
margin-top: 0;
|
|
920
|
+
margin-bottom: 0;
|
|
921
|
+
}
|
|
922
|
+
&[slot='start'] {
|
|
923
|
+
position: absolute;
|
|
924
|
+
left: 0;
|
|
925
|
+
}
|
|
926
|
+
&[slot='end'] {
|
|
927
|
+
position: absolute;
|
|
928
|
+
right: 0;
|
|
929
|
+
}
|
|
930
|
+
}
|
|
914
931
|
}
|
|
915
932
|
|
|
916
933
|
// --------------------------------------------------
|