@sumaris-net/ngx-components 2.4.116 → 2.4.118
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/public_api.mjs +5 -1
- package/esm2020/src/app/core/home/home.mjs +5 -4
- package/esm2020/src/app/core/menu/menu.component.mjs +12 -20
- package/esm2020/src/app/core/menu/menu.model.mjs +5 -4
- package/esm2020/src/app/core/menu/menu.service.mjs +53 -72
- package/esm2020/src/app/core/menu/testing/menu-other.testing.mjs +5 -5
- package/esm2020/src/app/core/menu/testing/menu.testing.mjs +24 -8
- package/esm2020/src/app/core/services/account.service.mjs +5 -17
- package/esm2020/src/app/core/services/model/account.model.mjs +27 -2
- package/esm2020/src/app/shared/material/datetime/material.datetime.mjs +1 -1
- package/esm2020/src/app/shared/shared.testing.module.mjs +8 -8
- package/esm2020/src/app/shared/storage/storage-explorer.component.mjs +1 -1
- package/esm2020/src/app/shared/storage/storage-explorer.module.mjs +5 -18
- package/esm2020/src/app/shared/storage/storage-explorer.testing-routing.module.mjs +35 -0
- package/esm2020/src/app/shared/storage/storage-explorer.testing.module.mjs +33 -0
- package/esm2020/src/app/shared/storage/storage.utils.mjs +1 -1
- package/esm2020/src/environments/environment.mjs +5 -5
- package/fesm2015/sumaris-net.ngx-components.mjs +300 -242
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +218 -166
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +2 -5
- package/public_api.d.ts +4 -0
- package/src/app/core/home/home.d.ts +1 -1
- package/src/app/core/menu/menu.model.d.ts +6 -4
- package/src/app/core/menu/menu.service.d.ts +11 -20
- package/src/app/core/menu/testing/menu-other.testing.d.ts +1 -1
- package/src/app/core/menu/testing/menu.testing.d.ts +5 -3
- package/src/app/core/services/model/account.model.d.ts +7 -1
- package/src/app/shared/shared.testing.module.d.ts +2 -2
- package/src/app/shared/storage/storage-explorer.module.d.ts +5 -8
- package/src/app/shared/storage/storage-explorer.testing-routing.module.d.ts +9 -0
- package/src/app/shared/storage/storage-explorer.testing.module.d.ts +10 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sumaris-net/ngx-components",
|
|
3
3
|
"description": "SUMARiS Angular components",
|
|
4
|
-
"version": "2.4.
|
|
4
|
+
"version": "2.4.118",
|
|
5
5
|
"author": "contact@e-is.pro",
|
|
6
6
|
"license": "AGPL-3.0",
|
|
7
7
|
"readmeFilename": "README.md",
|
|
@@ -10,9 +10,6 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@noble/ed25519": "^1.7.3",
|
|
13
|
-
"@rx-angular/cdk": "^14.0.0",
|
|
14
|
-
"@rx-angular/state": "^14.0.0",
|
|
15
|
-
"@rx-angular/template": "^14.0.0",
|
|
16
13
|
"clone": "~2.1.2",
|
|
17
14
|
"tslib": "~2.6.2",
|
|
18
15
|
"@polkadot/util": "~12.5.1",
|
|
@@ -22,7 +19,7 @@
|
|
|
22
19
|
"@angular-devkit/build-angular": "~14.2.13",
|
|
23
20
|
"@angular/compiler-cli": "~14.3.0",
|
|
24
21
|
"@apollo/client": "~3.8.5",
|
|
25
|
-
"@ionic/storage": "~
|
|
22
|
+
"@ionic/storage": "~4.0.0",
|
|
26
23
|
"d3": "~7.6.1",
|
|
27
24
|
"localforage": "~1.10.0",
|
|
28
25
|
"rxjs": "^7.5.7"
|
package/public_api.d.ts
CHANGED
|
@@ -95,6 +95,8 @@ export * from './src/app/shared/services/translate-context.service';
|
|
|
95
95
|
export * from './src/app/shared/services/job.utils';
|
|
96
96
|
export * from './src/app/shared/storage/storage.service';
|
|
97
97
|
export * from './src/app/shared/storage/storage.utils';
|
|
98
|
+
export * from './src/app/shared/storage/storage-explorer.component';
|
|
99
|
+
export * from './src/app/shared/storage/storage-explorer.module';
|
|
98
100
|
export * from './src/app/shared/validator/form-error-adapter.class';
|
|
99
101
|
export * from './src/app/shared/debug/debug-service.class';
|
|
100
102
|
export * from './src/app/shared/types';
|
|
@@ -255,6 +257,8 @@ export * from './src/app/shared/toast/toast.testing.module';
|
|
|
255
257
|
export * from './src/app/shared/image/gallery/testing/gallery.service.testing';
|
|
256
258
|
export * from './src/app/shared/image/gallery/testing/gallery.testing';
|
|
257
259
|
export * from './src/app/shared/image/gallery/testing/gallery.testing.module';
|
|
260
|
+
export * from './src/app/shared/storage/storage-explorer.testing.module';
|
|
261
|
+
export * from './src/app/shared/storage/storage-explorer.testing-routing.module';
|
|
258
262
|
export * from './src/app/shared/audio/audio.testing';
|
|
259
263
|
export * from './src/app/shared/audio/audio.testing.module';
|
|
260
264
|
export * from './src/app/core/menu/testing/menu.testing';
|
|
@@ -67,7 +67,7 @@ export declare class HomePage implements OnDestroy {
|
|
|
67
67
|
protected onSettingsChanged(settings: LocalSettings): void;
|
|
68
68
|
protected onLogin(account: Account): void;
|
|
69
69
|
protected onLogout(): void;
|
|
70
|
-
protected refreshButtons(): void;
|
|
70
|
+
protected refreshButtons(account?: Account): void;
|
|
71
71
|
protected markForCheck(): void;
|
|
72
72
|
static ɵfac: i0.ɵɵFactoryDeclaration<HomePage, [null, null, null, null, null, null, null, null, null, null, null, { optional: true; }]>;
|
|
73
73
|
static ɵcmp: i0.ɵɵComponentDeclaration<HomePage, "app-page-home", never, {}, {}, never, never, false>;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { UserProfileLabel } from '../services/model/person.model';
|
|
2
2
|
import { Configuration } from '../services/model/config.model';
|
|
3
|
-
import { AccountService } from '../services/account.service';
|
|
4
3
|
import { IconRef } from '../../shared/types';
|
|
5
|
-
import { BehaviorSubject } from
|
|
6
|
-
import { MenuPathParam } from
|
|
4
|
+
import { BehaviorSubject } from 'rxjs';
|
|
5
|
+
import { MenuPathParam } from './menu.service';
|
|
6
|
+
import { Account } from '../services/model/account.model';
|
|
7
7
|
export interface MenuItem extends IconRef {
|
|
8
8
|
title: string;
|
|
9
9
|
path?: string;
|
|
10
|
+
after?: string;
|
|
11
|
+
before?: string;
|
|
10
12
|
action?: string | any;
|
|
11
13
|
profile?: UserProfileLabel;
|
|
12
14
|
exactProfile?: UserProfileLabel;
|
|
@@ -44,7 +46,7 @@ export declare class MenuItems {
|
|
|
44
46
|
[key: string]: string;
|
|
45
47
|
}): boolean;
|
|
46
48
|
static isParent(child: MenuItem, parent: MenuItem | MenuPathParam): boolean;
|
|
47
|
-
static checkIfVisible(item: MenuItem,
|
|
49
|
+
static checkIfVisible(item: MenuItem, account: Account, config: Configuration, opts?: {
|
|
48
50
|
isLogin?: boolean;
|
|
49
51
|
debug?: boolean;
|
|
50
52
|
logPrefix?: string;
|
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import { BehaviorSubject, Observable
|
|
2
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
3
3
|
import { MenuItem } from './menu.model';
|
|
4
4
|
import { Router } from '@angular/router';
|
|
5
5
|
import { StartableService } from '../../shared/services/startable-service.class';
|
|
6
6
|
import { Environment } from '../../../environments/environment.class';
|
|
7
7
|
import { PlatformService } from '../services/platform.service';
|
|
8
|
-
import { Moment } from 'moment';
|
|
9
8
|
import { AccountService } from '../services/account.service';
|
|
10
9
|
import { ConfigService } from '../services/config.service';
|
|
10
|
+
import { Configuration } from '../services/model/config.model';
|
|
11
11
|
import { Account } from '../services/model/account.model';
|
|
12
12
|
import * as i0 from "@angular/core";
|
|
13
13
|
export declare type SplitPaneShowWhen = boolean | 'lg';
|
|
14
14
|
export declare const DEFAULT_MENU_SHOW_WHEN: SplitPaneShowWhen;
|
|
15
15
|
export interface AddSubMenuItemsOption {
|
|
16
|
-
skipIfExists
|
|
17
|
-
|
|
18
|
-
export interface AddSubMenuItems {
|
|
19
|
-
items: MenuItem[];
|
|
20
|
-
opts?: AddSubMenuItemsOption;
|
|
16
|
+
skipIfExists?: boolean;
|
|
17
|
+
availableParents?: MenuItem[];
|
|
21
18
|
}
|
|
22
19
|
export interface MenuPathParam {
|
|
23
20
|
path: string;
|
|
@@ -25,43 +22,37 @@ export interface MenuPathParam {
|
|
|
25
22
|
[key: string]: string;
|
|
26
23
|
};
|
|
27
24
|
}
|
|
28
|
-
export declare class MenuService extends StartableService<MenuItem[]
|
|
25
|
+
export declare class MenuService extends StartableService<BehaviorSubject<MenuItem[]>, any> {
|
|
29
26
|
protected platformService: PlatformService;
|
|
30
27
|
protected configService: ConfigService;
|
|
31
28
|
protected accountService: AccountService;
|
|
32
29
|
protected router: Router;
|
|
33
30
|
protected environment: Environment;
|
|
34
|
-
onLoginChange: Subject<Account>;
|
|
35
31
|
onUpdateMenu: EventEmitter<any>;
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
get $items(): BehaviorSubject<MenuItem[]>;
|
|
33
|
+
private _staticItems;
|
|
38
34
|
private _logPrefix;
|
|
39
|
-
private _config;
|
|
40
|
-
private readonly _$toggled;
|
|
41
35
|
private readonly _$opened;
|
|
42
36
|
private readonly _$splitPaneWhen;
|
|
43
37
|
private readonly _$enabled;
|
|
44
|
-
|
|
45
|
-
constructor(platformService: PlatformService, configService: ConfigService, accountService: AccountService, router: Router, environment: Environment, rootItems?: MenuItem[]);
|
|
38
|
+
constructor(platformService: PlatformService, configService: ConfigService, accountService: AccountService, router: Router, environment: Environment, staticItems?: MenuItem[]);
|
|
46
39
|
get opened(): Observable<boolean>;
|
|
47
40
|
get splitPaneWhen(): Observable<SplitPaneShowWhen>;
|
|
48
41
|
get enabled(): Observable<boolean>;
|
|
49
|
-
toggle(): void;
|
|
50
42
|
enable(value: boolean): void;
|
|
51
43
|
setSplitPaneShowWhen(value: SplitPaneShowWhen): void;
|
|
52
44
|
toggleSplitPaneWhen(): void;
|
|
53
45
|
_markAsOpened(): void;
|
|
54
46
|
_markAsClosed(): void;
|
|
55
47
|
addSubMenuItems(newItems: MenuItem[], opts?: AddSubMenuItemsOption): Promise<void>;
|
|
56
|
-
protected ngOnStart(): Promise<MenuItem[]
|
|
57
|
-
protected
|
|
48
|
+
protected ngOnStart(): Promise<BehaviorSubject<MenuItem[]>>;
|
|
49
|
+
protected loadMenuItems(config: Configuration, account: Account): Promise<void>;
|
|
58
50
|
protected addSubMenuItem(newItem: MenuItem, opts?: AddSubMenuItemsOption): Promise<void>;
|
|
59
51
|
protected prepareItem(item: MenuItem): MenuItem;
|
|
60
52
|
protected findExistingItem(item: MenuItem, items?: MenuItem[]): MenuItem;
|
|
61
|
-
protected findParent(childItem: MenuItem,
|
|
53
|
+
protected findParent(childItem: MenuItem, availableParents?: MenuItem[]): MenuItem;
|
|
62
54
|
protected addMenuToParent(parent: MenuItem, child: MenuItem): void;
|
|
63
55
|
protected detachSubMenus(currentPathParam: MenuPathParam, items?: MenuItem[], excludedItems?: MenuItem[]): MenuItem[];
|
|
64
|
-
protected isVisibleForRoute(item: MenuItem, currentPathParam: MenuPathParam): void;
|
|
65
56
|
static ɵfac: i0.ɵɵFactoryDeclaration<MenuService, [null, null, null, null, null, { optional: true; }]>;
|
|
66
57
|
static ɵprov: i0.ɵɵInjectableDeclaration<MenuService>;
|
|
67
58
|
}
|
|
@@ -7,7 +7,7 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
export declare class OtherMenuTestingPage extends MenuTestingPage {
|
|
8
8
|
constructor(route: ActivatedRoute, // Modal editor give 'null'
|
|
9
9
|
router: Router, navController: NavController, alertCtrl: AlertController, translate: TranslateService, menuService: MenuService);
|
|
10
|
-
initSubMenu(): void
|
|
10
|
+
initSubMenu(): Promise<void>;
|
|
11
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<OtherMenuTestingPage, never>;
|
|
12
12
|
static ɵcmp: i0.ɵɵComponentDeclaration<OtherMenuTestingPage, "app-testing-menu-other", never, {}, {}, never, never, false>;
|
|
13
13
|
}
|
|
@@ -4,8 +4,8 @@ import { AppTabEditor } from '../../form/entity/editor.class';
|
|
|
4
4
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
5
5
|
import { AlertController, NavController } from '@ionic/angular';
|
|
6
6
|
import { TranslateService } from '@ngx-translate/core';
|
|
7
|
-
import { MatTab } from
|
|
8
|
-
import { Subject } from
|
|
7
|
+
import { MatTab } from '@angular/material/tabs';
|
|
8
|
+
import { Subject } from 'rxjs';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
export declare class MenuTestingPage extends AppTabEditor implements OnInit, OnDestroy, AfterViewInit {
|
|
11
11
|
protected menuService: MenuService;
|
|
@@ -27,7 +27,9 @@ export declare class MenuTestingPage extends AppTabEditor implements OnInit, OnD
|
|
|
27
27
|
reload(): Promise<void>;
|
|
28
28
|
save(event: Event | undefined, options: any): Promise<boolean>;
|
|
29
29
|
protected toggleThird(): void;
|
|
30
|
-
protected
|
|
30
|
+
protected enableMenu(value: boolean): void;
|
|
31
|
+
protected toggleSplitPaneWhen(): void;
|
|
32
|
+
protected initSubMenu(): Promise<void>;
|
|
31
33
|
protected getFirstInvalidTabIndex(): number;
|
|
32
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<MenuTestingPage, never>;
|
|
33
35
|
static ɵcmp: i0.ɵɵComponentDeclaration<MenuTestingPage, "app-testing-menu", never, {}, {}, never, never, false>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UserSettings } from './settings.model';
|
|
2
|
-
import { Person } from './person.model';
|
|
2
|
+
import { Person, UserProfileLabel } from './person.model';
|
|
3
3
|
import { EntityAsObjectOptions } from './entity.model';
|
|
4
4
|
/**
|
|
5
5
|
* A user account
|
|
@@ -16,4 +16,10 @@ export declare class Account extends Person<Account> {
|
|
|
16
16
|
asPerson(): Person;
|
|
17
17
|
get displayName(): string;
|
|
18
18
|
}
|
|
19
|
+
export declare abstract class AccountUtils {
|
|
20
|
+
static accountToString: typeof accountToString;
|
|
21
|
+
static hasMinProfile(account: Account | null, userProfile: UserProfileLabel): boolean;
|
|
22
|
+
static hasExactProfile(account: Account | null, label: UserProfileLabel): boolean;
|
|
23
|
+
static hasProfileAndIsEnable(account: Account | null, userProfile: UserProfileLabel): boolean;
|
|
24
|
+
}
|
|
19
25
|
export declare function accountToString(data: Account): string;
|
|
@@ -8,11 +8,11 @@ import * as i5 from "./toast/toast.testing.module";
|
|
|
8
8
|
import * as i6 from "./upload-file/testing/upload-file.testing.module";
|
|
9
9
|
import * as i7 from "./image/gallery/testing/gallery.testing.module";
|
|
10
10
|
import * as i8 from "./audio/audio.testing.module";
|
|
11
|
-
import * as i9 from "./storage/storage-explorer.module";
|
|
11
|
+
import * as i9 from "./storage/storage-explorer.testing.module";
|
|
12
12
|
import * as i10 from "../core/menu/testing/menu.testing.module";
|
|
13
13
|
export declare const SHARED_TESTING_PAGES: TestingPage[];
|
|
14
14
|
export declare class SharedTestingModule {
|
|
15
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<SharedTestingModule, never>;
|
|
16
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SharedTestingModule, never, [typeof i1.CommonModule, typeof i2.IonicModule, typeof i3.TranslateModule, typeof i4.MaterialTestingModule, typeof i5.ToastTestingModule, typeof i6.UploadFileTestingModule, typeof i7.ImageGalleryTestingModule, typeof i8.AudioTestingModule, typeof i9.
|
|
16
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SharedTestingModule, never, [typeof i1.CommonModule, typeof i2.IonicModule, typeof i3.TranslateModule, typeof i4.MaterialTestingModule, typeof i5.ToastTestingModule, typeof i6.UploadFileTestingModule, typeof i7.ImageGalleryTestingModule, typeof i8.AudioTestingModule, typeof i9.StorageExplorerTestingModule, typeof i10.MenuTestingModule], [typeof i4.MaterialTestingModule, typeof i5.ToastTestingModule, typeof i6.UploadFileTestingModule, typeof i7.ImageGalleryTestingModule, typeof i8.AudioTestingModule, typeof i9.StorageExplorerTestingModule, typeof i10.MenuTestingModule]>;
|
|
17
17
|
static ɵinj: i0.ɵɵInjectorDeclaration<SharedTestingModule>;
|
|
18
18
|
}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import { TestingPage } from '../testing/tests.page';
|
|
2
1
|
import * as i0 from "@angular/core";
|
|
3
2
|
import * as i1 from "./storage-explorer.component";
|
|
4
3
|
import * as i2 from "@ionic/angular";
|
|
5
4
|
import * as i3 from "@angular/common";
|
|
6
|
-
import * as i4 from "@
|
|
7
|
-
import * as i5 from "@
|
|
8
|
-
import * as i6 from "
|
|
9
|
-
import * as i7 from "../
|
|
10
|
-
import * as i8 from "../material/material.module";
|
|
11
|
-
export declare const SHARED_STORAGE_TESTING_PAGES: TestingPage[];
|
|
5
|
+
import * as i4 from "@rx-angular/template/for";
|
|
6
|
+
import * as i5 from "@ngx-translate/core";
|
|
7
|
+
import * as i6 from "../pipes/pipes.module";
|
|
8
|
+
import * as i7 from "../material/material.module";
|
|
12
9
|
export declare class StorageExplorerModule {
|
|
13
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<StorageExplorerModule, never>;
|
|
14
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<StorageExplorerModule, [typeof i1.StorageExplorerComponent], [typeof i2.IonicModule, typeof i3.CommonModule, typeof i4.
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<StorageExplorerModule, [typeof i1.StorageExplorerComponent], [typeof i2.IonicModule, typeof i3.CommonModule, typeof i4.ForModule, typeof i5.TranslateModule, typeof i6.SharedPipesModule, typeof i7.SharedMaterialModule], [typeof i1.StorageExplorerComponent]>;
|
|
15
12
|
static ɵinj: i0.ɵɵInjectorDeclaration<StorageExplorerModule>;
|
|
16
13
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "@angular/common";
|
|
3
|
+
import * as i2 from "@angular/router";
|
|
4
|
+
import * as i3 from "./storage-explorer.module";
|
|
5
|
+
export declare class StorageExplorerTestingRoutingModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StorageExplorerTestingRoutingModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<StorageExplorerTestingRoutingModule, never, [typeof i1.CommonModule, typeof i2.RouterModule, typeof i3.StorageExplorerModule], [typeof i2.RouterModule]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<StorageExplorerTestingRoutingModule>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TestingPage } from '../testing/tests.page';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/common";
|
|
4
|
+
import * as i2 from "@angular/router";
|
|
5
|
+
export declare const SHARED_STORAGE_TESTING_PAGES: TestingPage[];
|
|
6
|
+
export declare class StorageExplorerTestingModule {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StorageExplorerTestingModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<StorageExplorerTestingModule, never, [typeof i1.CommonModule, typeof i2.RouterModule], [typeof i2.RouterModule]>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<StorageExplorerTestingModule>;
|
|
10
|
+
}
|