@sumaris-net/ngx-components 2.6.4 → 2.6.6-rc1
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 +6 -0
- package/esm2020/public_api.mjs +12 -2
- package/esm2020/src/app/admin/services/filter/person.filter.mjs +1 -1
- package/esm2020/src/app/admin/services/person.service.mjs +9 -1
- package/esm2020/src/app/admin/users/users.mjs +73 -67
- package/esm2020/src/app/core/account/account.page.mjs +1 -1
- package/esm2020/src/app/core/form/buttons/form-buttons-bar.component.mjs +44 -8
- package/esm2020/src/app/core/form/entity/editor.class.mjs +7 -7
- package/esm2020/src/app/core/form/entity/entity-editor-modal.class.mjs +4 -3
- package/esm2020/src/app/core/form/entity/entity-editor.class.mjs +6 -3
- package/esm2020/src/app/core/form/form.class.mjs +7 -2
- package/esm2020/src/app/core/form/form.utils.mjs +4 -1
- package/esm2020/src/app/core/form/properties/properties.table.mjs +1 -1
- package/esm2020/src/app/core/form/properties/testing/properties-form.test.mjs +2 -2
- package/esm2020/src/app/core/form/text-popover/text-popover.component.mjs +2 -2
- package/esm2020/src/app/core/graphql/graphql.service.mjs +6 -2
- package/esm2020/src/app/core/graphql/graphql.utils.mjs +1 -1
- package/esm2020/src/app/core/home/home.mjs +12 -10
- package/esm2020/src/app/core/install/install-upgrade-card.component.mjs +3 -2
- package/esm2020/src/app/core/menu/menu.component.mjs +80 -171
- package/esm2020/src/app/core/menu/menu.model.mjs +219 -7
- package/esm2020/src/app/core/menu/menu.module.mjs +27 -14
- package/esm2020/src/app/core/menu/menu.service.mjs +610 -11
- package/esm2020/src/app/core/menu/sub-menu-tab.directive.mjs +98 -0
- package/esm2020/src/app/core/menu/testing/menu-other.testing.mjs +48 -0
- package/esm2020/src/app/core/menu/testing/menu.testing.mjs +121 -0
- package/esm2020/src/app/core/menu/testing/menu.testing.module.mjs +79 -0
- package/esm2020/src/app/core/peer/select-peer.modal.mjs +3 -2
- package/esm2020/src/app/core/register/register-confirm.page.mjs +3 -3
- package/esm2020/src/app/core/register/register.form.mjs +21 -19
- package/esm2020/src/app/core/services/account.service.mjs +9 -15
- package/esm2020/src/app/core/services/base-entity-service.class.mjs +1 -1
- package/esm2020/src/app/core/services/base-graphql-service.class.mjs +2 -4
- package/esm2020/src/app/core/services/config.service.mjs +23 -22
- package/esm2020/src/app/core/services/crypto.service.mjs +14 -21
- package/esm2020/src/app/core/services/local-settings.service.mjs +12 -1
- package/esm2020/src/app/core/services/model/account.model.mjs +27 -2
- package/esm2020/src/app/core/services/model/config.model.mjs +1 -1
- package/esm2020/src/app/core/services/model/department.model.mjs +1 -1
- package/esm2020/src/app/core/services/model/entity.decorators.mjs +1 -1
- package/esm2020/src/app/core/services/model/entity.model.mjs +20 -35
- package/esm2020/src/app/core/services/model/filter.model.mjs +3 -1
- package/esm2020/src/app/core/services/model/peer.model.mjs +1 -1
- package/esm2020/src/app/core/services/model/person.model.mjs +5 -1
- package/esm2020/src/app/core/services/model/referential.model.mjs +3 -3
- package/esm2020/src/app/core/services/model/token.model.mjs +1 -1
- package/esm2020/src/app/core/services/model/tree-item-entity.model.mjs +199 -0
- package/esm2020/src/app/core/services/network.service.mjs +12 -8
- package/esm2020/src/app/core/services/network.utils.mjs +1 -1
- package/esm2020/src/app/core/services/platform.service.mjs +15 -16
- package/esm2020/src/app/core/services/storage/entities-storage.service.mjs +10 -10
- package/esm2020/src/app/core/services/testing/referential-filter.model.mjs +1 -1
- package/esm2020/src/app/core/services/validator/local-settings.validator.mjs +3 -3
- package/esm2020/src/app/core/settings/settings.page.mjs +2 -2
- package/esm2020/src/app/core/table/async-table.class.mjs +4 -3
- package/esm2020/src/app/core/table/entities-async-table-datasource.class.mjs +1 -1
- package/esm2020/src/app/core/table/entities-table-datasource.class.mjs +1 -1
- package/esm2020/src/app/core/table/table-select-columns.component.mjs +1 -1
- package/esm2020/src/app/core/table/table.class.mjs +19 -14
- package/esm2020/src/app/core/table/table.utils.mjs +6 -3
- package/esm2020/src/app/core/table/testing/table.testing.mjs +3 -2
- package/esm2020/src/app/shared/audio/audio.mjs +5 -5
- package/esm2020/src/app/shared/capacitor/plugins.mjs +1 -1
- package/esm2020/src/app/shared/dates.mjs +3 -1
- package/esm2020/src/app/shared/debug/debug.component.mjs +1 -1
- package/esm2020/src/app/shared/directives/autofocus.directive.mjs +5 -4
- package/esm2020/src/app/shared/directives/drag-and-drop.directive.mjs +1 -1
- package/esm2020/src/app/shared/directives/ng-var.directive.mjs +1 -1
- package/esm2020/src/app/shared/directives/resizable/resizable.directive.mjs +1 -1
- package/esm2020/src/app/shared/events.mjs +2 -1
- package/esm2020/src/app/shared/file/csv.utils.mjs +12 -14
- package/esm2020/src/app/shared/file/file.utils.mjs +2 -2
- package/esm2020/src/app/shared/file/images.utils.mjs +2 -2
- package/esm2020/src/app/shared/file/json.utils.mjs +3 -3
- package/esm2020/src/app/shared/file/uri.utils.mjs +2 -1
- package/esm2020/src/app/shared/form/field.component.mjs +28 -3
- package/esm2020/src/app/shared/forms.mjs +48 -30
- package/esm2020/src/app/shared/functions.mjs +7 -2
- package/esm2020/src/app/shared/geolocation/geolocation.utils.mjs +1 -1
- package/esm2020/src/app/shared/help/help.modal.mjs +1 -1
- package/esm2020/src/app/shared/image/gallery/image-gallery.component.mjs +9 -6
- package/esm2020/src/app/shared/image/gallery/testing/gallegry.model.testing.mjs +1 -1
- package/esm2020/src/app/shared/image/gallery/testing/gallery.service.testing.mjs +1 -1
- package/esm2020/src/app/shared/image/gallery/testing/gallery.testing.mjs +2 -2
- package/esm2020/src/app/shared/image/gallery/testing/gallery.testing.module.mjs +1 -1
- package/esm2020/src/app/shared/interceptors/progess.interceptor.mjs +1 -1
- package/esm2020/src/app/shared/logging/logger.model.mjs +1 -1
- package/esm2020/src/app/shared/logging/logging-service.class.mjs +2 -2
- package/esm2020/src/app/shared/logging/logging-service.config.mjs +1 -1
- package/esm2020/src/app/shared/material/autocomplete/material.autocomplete.mjs +10 -10
- package/esm2020/src/app/shared/material/autocomplete/material.autocomplete.utils.mjs +4 -6
- package/esm2020/src/app/shared/material/autocomplete/testing/autocomplete.test.mjs +1 -1
- package/esm2020/src/app/shared/material/badge/badge.directive.mjs +8 -3
- package/esm2020/src/app/shared/material/badge/badge.test.mjs +2 -2
- package/esm2020/src/app/shared/material/chips/material.chips.mjs +9 -10
- package/esm2020/src/app/shared/material/chips/testing/chips.test.mjs +3 -3
- package/esm2020/src/app/shared/material/datetime/material.date.mjs +2 -2
- package/esm2020/src/app/shared/material/datetime/material.dateshort.mjs +3 -3
- package/esm2020/src/app/shared/material/datetime/material.datetime.mjs +3 -3
- package/esm2020/src/app/shared/material/datetime/testing/mat-date-time.test.mjs +1 -1
- package/esm2020/src/app/shared/material/datetime/testing/mat-date.test.mjs +1 -1
- package/esm2020/src/app/shared/material/datetime/testing/mat-dateshort.test.mjs +1 -1
- package/esm2020/src/app/shared/material/duration/material.duration.mjs +3 -3
- package/esm2020/src/app/shared/material/latlong/material.latlong.mjs +5 -4
- package/esm2020/src/app/shared/material/latlong/testing/latlong.test.mjs +1 -1
- package/esm2020/src/app/shared/material/material.animations.mjs +41 -2
- package/esm2020/src/app/shared/material/material.testing.module.mjs +2 -2
- package/esm2020/src/app/shared/material/numpad/testing/numpad.test.mjs +1 -1
- package/esm2020/src/app/shared/material/swipe/testing/swipe.test.mjs +1 -1
- package/esm2020/src/app/shared/modules.mjs +2 -1
- package/esm2020/src/app/shared/named-filter/named-filter.model.mjs +1 -1
- package/esm2020/src/app/shared/observables.mjs +3 -2
- package/esm2020/src/app/shared/pipes/colors.pipe.mjs +3 -1
- package/esm2020/src/app/shared/pipes/date-format.pipe.mjs +1 -1
- package/esm2020/src/app/shared/pipes/form.pipes.mjs +1 -1
- package/esm2020/src/app/shared/pipes/property.pipes.mjs +1 -1
- package/esm2020/src/app/shared/pipes/translate-context.pipe.mjs +1 -1
- package/esm2020/src/app/shared/platforms.mjs +1 -1
- package/esm2020/src/app/shared/services/memory-entity-service.class.mjs +3 -1
- package/esm2020/src/app/shared/services/startable-observable-service.class.mjs +5 -6
- package/esm2020/src/app/shared/services/startable-service.class.mjs +1 -1
- package/esm2020/src/app/shared/services/translate-context.service.mjs +11 -13
- package/esm2020/src/app/shared/services/validator-service.class.mjs +1 -1
- package/esm2020/src/app/shared/shared-routing.module.mjs +2 -1
- package/esm2020/src/app/shared/shared.testing.module.mjs +16 -8
- package/esm2020/src/app/shared/storage/storage-explorer.component.mjs +3 -3
- 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.service.mjs +3 -3
- package/esm2020/src/app/shared/storage/storage.utils.mjs +1 -1
- package/esm2020/src/app/shared/testing/observable.test.mjs +2 -2
- package/esm2020/src/app/shared/testing/tests.page.mjs +1 -1
- package/esm2020/src/app/shared/toast/toast.testing.mjs +1 -1
- package/esm2020/src/app/shared/toast/toasts.mjs +2 -2
- package/esm2020/src/app/shared/toolbar/toolbar.mjs +1 -1
- package/esm2020/src/app/shared/upload-file/testing/upload-file.testing.mjs +2 -1
- package/esm2020/src/app/shared/upload-file/upload-file.component.mjs +1 -1
- package/esm2020/src/app/shared/validator/form-error-adapter.class.mjs +5 -5
- package/esm2020/src/app/shared/validator/validators.mjs +10 -3
- package/esm2020/src/app/shared/version/versions.mjs +2 -2
- package/esm2020/src/app/social/job/progression/job-progression.icon.mjs +2 -2
- package/esm2020/src/app/social/job/progression/job-progression.model.mjs +1 -1
- package/esm2020/src/app/social/job/progression/job-progression.service.mjs +1 -1
- package/esm2020/src/app/social/job/testing/job-progression.testing.mjs +1 -1
- package/esm2020/src/app/social/job/testing/job-progression.testing.service.mjs +3 -3
- package/esm2020/src/app/social/message/message.form.mjs +11 -8
- package/esm2020/src/app/social/message/message.modal.mjs +1 -1
- package/esm2020/src/app/social/message/message.model.mjs +1 -1
- package/esm2020/src/app/social/message/message.service.mjs +2 -2
- package/esm2020/src/app/social/social.module.mjs +2 -2
- package/esm2020/src/app/social/user-event/testing/user-event.testing.mjs +5 -5
- package/esm2020/src/app/social/user-event/testing/user-event.testing.model.mjs +1 -1
- package/esm2020/src/app/social/user-event/testing/user-event.testing.service.mjs +1 -1
- package/esm2020/src/app/social/user-event/user-event.model.mjs +1 -1
- package/esm2020/src/app/social/user-event/user-event.service.mjs +4 -3
- package/fesm2015/sumaris-net.ngx-components.mjs +2758 -1263
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +2687 -1223
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +8 -9
- package/public_api.d.ts +11 -1
- package/src/app/admin/services/person.service.d.ts +5 -0
- package/src/app/admin/users/users.d.ts +4 -2
- package/src/app/core/form/buttons/form-buttons-bar.component.d.ts +14 -2
- package/src/app/core/form/entity/entity-editor-modal.class.d.ts +1 -0
- package/src/app/core/form/form.class.d.ts +2 -0
- package/src/app/core/form/form.utils.d.ts +4 -1
- package/src/app/core/form/text-popover/text-popover.component.d.ts +2 -1
- package/src/app/core/graphql/graphql.service.d.ts +5 -4
- package/src/app/core/graphql/graphql.utils.d.ts +2 -2
- package/src/app/core/home/home.d.ts +11 -10
- package/src/app/core/install/install-upgrade-card.component.d.ts +3 -2
- package/src/app/core/menu/menu.component.d.ts +29 -26
- package/src/app/core/menu/menu.model.d.ts +123 -6
- package/src/app/core/menu/menu.module.d.ts +8 -4
- package/src/app/core/menu/menu.service.d.ts +76 -5
- package/src/app/core/menu/sub-menu-tab.directive.d.ts +29 -0
- package/src/app/core/menu/testing/menu-other.testing.d.ts +15 -0
- package/src/app/core/menu/testing/menu.testing.d.ts +43 -0
- package/src/app/core/menu/testing/menu.testing.module.d.ts +12 -0
- package/src/app/core/peer/select-peer.modal.d.ts +4 -3
- package/src/app/core/register/register.form.d.ts +3 -2
- package/src/app/core/services/account.service.d.ts +4 -3
- package/src/app/core/services/config.service.d.ts +5 -3
- package/src/app/core/services/crypto.service.d.ts +7 -7
- package/src/app/core/services/local-settings.service.d.ts +1 -0
- package/src/app/core/services/model/account.model.d.ts +7 -1
- package/src/app/core/services/model/entity.model.d.ts +5 -8
- package/src/app/core/services/model/filter.model.d.ts +2 -0
- package/src/app/core/services/model/person.model.d.ts +1 -0
- package/src/app/core/services/model/tree-item-entity.model.d.ts +53 -0
- package/src/app/core/services/network.service.d.ts +4 -3
- package/src/app/core/services/platform.service.d.ts +4 -5
- package/src/app/core/services/storage/entities-storage.service.d.ts +3 -3
- package/src/app/core/settings/settings.page.d.ts +5 -5
- package/src/app/core/table/async-table.class.d.ts +1 -0
- package/src/app/core/table/table.class.d.ts +5 -1
- package/src/app/core/table/testing/table.testing.d.ts +1 -0
- package/src/app/shared/dates.d.ts +2 -0
- package/src/app/shared/events.d.ts +1 -0
- package/src/app/shared/file/uri.utils.d.ts +1 -0
- package/src/app/shared/form/field.component.d.ts +1 -0
- package/src/app/shared/forms.d.ts +4 -1
- package/src/app/shared/functions.d.ts +1 -0
- package/src/app/shared/material/autocomplete/material.autocomplete.d.ts +1 -0
- package/src/app/shared/material/badge/badge.directive.d.ts +1 -1
- package/src/app/shared/material/datetime/material.dateshort.d.ts +1 -1
- package/src/app/shared/material/latlong/material.latlong.d.ts +1 -0
- package/src/app/shared/material/material.animations.d.ts +2 -0
- package/src/app/shared/modules.d.ts +1 -0
- package/src/app/shared/observables.d.ts +1 -0
- package/src/app/shared/pipes/translate-context.pipe.d.ts +1 -1
- package/src/app/shared/services/memory-entity-service.class.d.ts +2 -0
- package/src/app/shared/services/startable-observable-service.class.d.ts +1 -1
- package/src/app/shared/services/translate-context.service.d.ts +2 -2
- package/src/app/shared/services/validator-service.class.d.ts +1 -0
- package/src/app/shared/shared-routing.module.d.ts +1 -0
- package/src/app/shared/shared.testing.module.d.ts +3 -2
- package/src/app/shared/storage/storage-explorer.component.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/src/app/shared/storage/storage.service.d.ts +0 -1
- package/src/app/shared/upload-file/testing/upload-file.testing.d.ts +1 -0
- package/src/app/shared/validator/validators.d.ts +4 -0
- package/src/app/social/user-event/user-event.model.d.ts +1 -2
- package/src/assets/i18n/en-US.json +1 -0
- package/src/assets/i18n/en.json +1 -0
- package/src/assets/i18n/fr.json +10 -1
- package/src/assets/manifest.json +1 -1
- package/src/theme/_ngx-components.scss +2 -1
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./menu.component";
|
|
3
|
-
import * as i2 from "
|
|
4
|
-
import * as i3 from "
|
|
5
|
-
import * as i4 from "@
|
|
3
|
+
import * as i2 from "./sub-menu-tab.directive";
|
|
4
|
+
import * as i3 from "../../shared/shared.module";
|
|
5
|
+
import * as i4 from "@angular/router";
|
|
6
|
+
import * as i5 from "@rx-angular/template/for";
|
|
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";
|
|
6
10
|
export declare class AppMenuModule {
|
|
7
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<AppMenuModule, never>;
|
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AppMenuModule, [typeof i1.MenuComponent], [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]>;
|
|
9
13
|
static ɵinj: i0.ɵɵInjectorDeclaration<AppMenuModule>;
|
|
10
14
|
}
|
|
@@ -1,21 +1,92 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EventEmitter, InjectionToken } from '@angular/core';
|
|
2
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
3
|
+
import { IMenuItem, MenuItem, MenuOptions } from './menu.model';
|
|
4
|
+
import { Router } from '@angular/router';
|
|
5
|
+
import { Environment } from '../../../environments/environment.class';
|
|
6
|
+
import { AccountService } from '../services/account.service';
|
|
7
|
+
import { ConfigService } from '../services/config.service';
|
|
8
|
+
import { Account } from '../services/model/account.model';
|
|
9
|
+
import { StartableObservableService } from '../../shared/services/startable-observable-service.class';
|
|
10
|
+
import { LocalSettingsService } from '../services/local-settings.service';
|
|
11
|
+
import { AlertController, ModalController, NavController } from '@ionic/angular';
|
|
12
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
2
13
|
import * as i0 from "@angular/core";
|
|
3
14
|
export declare type SplitPaneShowWhen = boolean | 'lg';
|
|
4
15
|
export declare const DEFAULT_MENU_SHOW_WHEN: SplitPaneShowWhen;
|
|
5
|
-
export declare
|
|
6
|
-
|
|
16
|
+
export declare const APP_MENU_ITEMS: InjectionToken<IMenuItem[]>;
|
|
17
|
+
export declare const APP_MENU_OPTIONS: InjectionToken<MenuOptions>;
|
|
18
|
+
export interface MenuPathParam {
|
|
19
|
+
path: string;
|
|
20
|
+
params: {
|
|
21
|
+
[key: string]: string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export declare class MenuService extends StartableObservableService<MenuItem[]> {
|
|
25
|
+
protected settings: LocalSettingsService;
|
|
26
|
+
protected configService: ConfigService;
|
|
27
|
+
protected accountService: AccountService;
|
|
28
|
+
protected router: Router;
|
|
29
|
+
protected modalCtrl: ModalController;
|
|
30
|
+
protected alertController: AlertController;
|
|
31
|
+
protected navController: NavController;
|
|
32
|
+
protected translate: TranslateService;
|
|
33
|
+
protected environment: Environment;
|
|
34
|
+
readonly accountChanges: BehaviorSubject<Account>;
|
|
35
|
+
readonly onPinned: EventEmitter<MenuItem>;
|
|
36
|
+
private _staticItems;
|
|
37
|
+
private _detachedSubItems;
|
|
38
|
+
private _itemCounter;
|
|
39
|
+
private readonly _options;
|
|
40
|
+
private readonly _logPrefix;
|
|
7
41
|
private readonly _$opened;
|
|
8
42
|
private readonly _$splitPaneWhen;
|
|
9
43
|
private readonly _$enabled;
|
|
44
|
+
private readonly _$enableSubMenu;
|
|
45
|
+
private readonly _$listenRoute;
|
|
46
|
+
constructor(settings: LocalSettingsService, configService: ConfigService, accountService: AccountService, router: Router, modalCtrl: ModalController, alertController: AlertController, navController: NavController, translate: TranslateService, environment: Environment, options?: MenuOptions, staticItems?: IMenuItem[]);
|
|
10
47
|
get opened(): Observable<boolean>;
|
|
11
48
|
get splitPaneWhen(): Observable<SplitPaneShowWhen>;
|
|
12
49
|
get enabled(): Observable<boolean>;
|
|
13
|
-
|
|
50
|
+
get subMenuEnabled(): boolean;
|
|
51
|
+
get subItems(): MenuItem[];
|
|
52
|
+
private get _staticSubItems();
|
|
14
53
|
enable(value: boolean): void;
|
|
54
|
+
enableSubMenu(value: boolean): void;
|
|
15
55
|
setSplitPaneShowWhen(value: SplitPaneShowWhen): void;
|
|
16
56
|
toggleSplitPaneWhen(): void;
|
|
57
|
+
fromObject(source: any, opts?: {
|
|
58
|
+
withChildren?: boolean;
|
|
59
|
+
computeId?: boolean;
|
|
60
|
+
fillParent?: boolean;
|
|
61
|
+
fillDefaultFromParent?: boolean;
|
|
62
|
+
}): MenuItem;
|
|
63
|
+
createSubMenu(source: Partial<IMenuItem>): MenuItem;
|
|
64
|
+
addSubMenuItems(sources: IMenuItem[], opts?: {
|
|
65
|
+
skipIfExists?: boolean;
|
|
66
|
+
}): Promise<MenuItem[]>;
|
|
67
|
+
addSubMenuItem(item: IMenuItem, opts?: {
|
|
68
|
+
skipIfExists?: boolean;
|
|
69
|
+
}): Promise<MenuItem>;
|
|
70
|
+
removeSubMenuItems(items: IMenuItem[]): Promise<MenuItem[]>;
|
|
71
|
+
removeSubMenuItem(item: IMenuItem): Promise<MenuItem>;
|
|
72
|
+
togglePinned(source: IMenuItem): void;
|
|
73
|
+
executeAction(event: Event, item: MenuItem): Promise<void>;
|
|
74
|
+
logout(): Promise<void>;
|
|
75
|
+
openAboutModal(): Promise<void>;
|
|
76
|
+
toggleExpandableItem(item: MenuItem): Promise<void>;
|
|
17
77
|
_markAsOpened(): void;
|
|
18
78
|
_markAsClosed(): void;
|
|
19
|
-
|
|
79
|
+
protected ngOnStart(): Promise<MenuItem[]>;
|
|
80
|
+
private _loadMenuItems;
|
|
81
|
+
private _addSubMenuItems;
|
|
82
|
+
private _addSubMenuItem;
|
|
83
|
+
private _computeNewId;
|
|
84
|
+
private _removeSubMenuItem;
|
|
85
|
+
private _detachSubMenuItems;
|
|
86
|
+
private _detachToParent;
|
|
87
|
+
private _findExistingItem;
|
|
88
|
+
private _findParent;
|
|
89
|
+
private _attachMenuToParent;
|
|
90
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuService, [null, null, null, null, null, null, null, null, null, { optional: true; }, { optional: true; }]>;
|
|
20
91
|
static ɵprov: i0.ɵɵInjectableDeclaration<MenuService>;
|
|
21
92
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { MatTab, MatTabGroup } from '@angular/material/tabs';
|
|
3
|
+
import { Router } from '@angular/router';
|
|
4
|
+
import { MenuService } from './menu.service';
|
|
5
|
+
import { IconRef } from '../../shared/types';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class SubMenuTabDirective implements OnChanges, AfterViewInit {
|
|
8
|
+
private menuService;
|
|
9
|
+
private tabGroup;
|
|
10
|
+
private tab;
|
|
11
|
+
private router;
|
|
12
|
+
label: string;
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
parentPath: string;
|
|
15
|
+
path: string;
|
|
16
|
+
subMenuTitle: string;
|
|
17
|
+
subMenuIcon: IconRef;
|
|
18
|
+
private _menuItem;
|
|
19
|
+
private readonly _enable;
|
|
20
|
+
constructor(menuService: MenuService, tabGroup: MatTabGroup, tab: MatTab, router: Router);
|
|
21
|
+
ngAfterViewInit(): void;
|
|
22
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
23
|
+
private _removeToMenu;
|
|
24
|
+
private _addToMenu;
|
|
25
|
+
private get menuItem();
|
|
26
|
+
private get title();
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SubMenuTabDirective, never>;
|
|
28
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SubMenuTabDirective, "[appSubMenuTab]", never, { "label": "label"; "disabled": "disabled"; "parentPath": "parentPath"; "path": "path"; "subMenuTitle": "subMenuTitle"; "subMenuIcon": "subMenuIcon"; }, {}, never, never, false>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MenuService } from '../menu.service';
|
|
2
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
|
+
import { AlertController, NavController } from '@ionic/angular';
|
|
4
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
5
|
+
import { MenuTestingPage } from './menu.testing';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class OtherMenuTestingPage extends MenuTestingPage {
|
|
8
|
+
constructor(route: ActivatedRoute, // Modal editor give 'null'
|
|
9
|
+
router: Router, navController: NavController, alertCtrl: AlertController, translate: TranslateService, menuService: MenuService);
|
|
10
|
+
initSubMenu(): Promise<void>;
|
|
11
|
+
protected getDefaultTitle(): string;
|
|
12
|
+
protected computeTitle(): Promise<string>;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OtherMenuTestingPage, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OtherMenuTestingPage, "app-testing-menu-other", never, {}, {}, never, never, false>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { AfterViewInit, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { MenuService } from '../menu.service';
|
|
3
|
+
import { AppTabEditor } from '../../form/entity/editor.class';
|
|
4
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
5
|
+
import { AlertController, NavController } from '@ionic/angular';
|
|
6
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
7
|
+
import { Subject } from 'rxjs';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class MenuTestingPage extends AppTabEditor implements OnInit, OnDestroy, AfterViewInit {
|
|
10
|
+
protected menuService: MenuService;
|
|
11
|
+
protected logPrefix: string;
|
|
12
|
+
protected childPath: string;
|
|
13
|
+
protected thirdTabTitle: string;
|
|
14
|
+
protected parentPath: string;
|
|
15
|
+
protected path: string;
|
|
16
|
+
protected showOtherLinks: boolean;
|
|
17
|
+
protected showThirdTab: boolean;
|
|
18
|
+
protected $title: Subject<string>;
|
|
19
|
+
protected $secondTabTitle: Subject<string>;
|
|
20
|
+
protected set title(value: string);
|
|
21
|
+
protected set secondTabTitle(value: string);
|
|
22
|
+
constructor(route: ActivatedRoute, // Modal editor give 'null'
|
|
23
|
+
router: Router, navController: NavController, alertCtrl: AlertController, translate: TranslateService, menuService: MenuService);
|
|
24
|
+
ngOnInit(): void;
|
|
25
|
+
ngAfterViewInit(): void;
|
|
26
|
+
ngOnDestroy(): void;
|
|
27
|
+
load(id?: number, options?: any): Promise<void>;
|
|
28
|
+
get isNewData(): boolean;
|
|
29
|
+
reload(): Promise<void>;
|
|
30
|
+
save(event: Event | undefined, options: any): Promise<boolean>;
|
|
31
|
+
changeTitle(event?: UIEvent): void;
|
|
32
|
+
changeSecondTabTitle(event?: UIEvent): void;
|
|
33
|
+
addSubMenuItem(event?: UIEvent): void;
|
|
34
|
+
addOutsideRouteSubMenuItem(event?: UIEvent, pinned?: boolean): void;
|
|
35
|
+
protected enableMenu(value: boolean): void;
|
|
36
|
+
protected toggleSplitPaneWhen(): void;
|
|
37
|
+
protected initSubMenu(): Promise<void>;
|
|
38
|
+
protected getFirstInvalidTabIndex(): number;
|
|
39
|
+
protected getDefaultTitle(): string;
|
|
40
|
+
protected computeTitle(): Promise<string>;
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuTestingPage, never>;
|
|
42
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuTestingPage, "app-testing-menu", never, {}, {}, never, never, false>;
|
|
43
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./menu.testing";
|
|
3
|
+
import * as i2 from "./menu-other.testing";
|
|
4
|
+
import * as i3 from "@angular/common";
|
|
5
|
+
import * as i4 from "@angular/router";
|
|
6
|
+
import * as i5 from "../menu.module";
|
|
7
|
+
import * as i6 from "../../../shared/shared.module";
|
|
8
|
+
export declare class MenuTestingModule {
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuTestingModule, never>;
|
|
10
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MenuTestingModule, [typeof i1.MenuTestingPage, typeof i2.OtherMenuTestingPage], [typeof i3.CommonModule, typeof i4.RouterModule, typeof i5.AppMenuModule, typeof i6.SharedModule], [typeof i4.RouterModule, typeof i1.MenuTestingPage, typeof i2.OtherMenuTestingPage]>;
|
|
11
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<MenuTestingModule>;
|
|
12
|
+
}
|
|
@@ -3,6 +3,7 @@ import { ModalController, PopoverController } from '@ionic/angular';
|
|
|
3
3
|
import { Peer } from '../services/model/peer.model';
|
|
4
4
|
import { Observable, Subject } from 'rxjs';
|
|
5
5
|
import { HttpClient } from '@angular/common/http';
|
|
6
|
+
import { Environment } from '../../../environments/environment.class';
|
|
6
7
|
import { TextPopoverOptions } from '../form/text-popover/text-popover.component';
|
|
7
8
|
import { TranslateService } from '@ngx-translate/core';
|
|
8
9
|
import { ILoggingService } from '../../shared/logging/logger.model';
|
|
@@ -19,19 +20,19 @@ export declare class SelectPeerModal implements OnDestroy, ISelectPeerModalOptio
|
|
|
19
20
|
private translate;
|
|
20
21
|
private http;
|
|
21
22
|
private cd;
|
|
22
|
-
protected environment:
|
|
23
|
+
protected environment: Environment;
|
|
23
24
|
protected loggingService?: ILoggingService;
|
|
24
25
|
private _subscription;
|
|
25
26
|
private readonly _logger;
|
|
26
27
|
loading: boolean;
|
|
27
28
|
mobile: boolean;
|
|
28
29
|
$peers: Subject<Peer[]>;
|
|
29
|
-
peerMinVersion:
|
|
30
|
+
peerMinVersion: string;
|
|
30
31
|
canCancel: boolean;
|
|
31
32
|
allowSelectDownPeer: boolean;
|
|
32
33
|
onRefresh: EventEmitter<Event>;
|
|
33
34
|
showSetManuallyButton: boolean;
|
|
34
|
-
constructor(modalCtrl: ModalController, popoverController: PopoverController, translate: TranslateService, http: HttpClient, cd: ChangeDetectorRef, environment:
|
|
35
|
+
constructor(modalCtrl: ModalController, popoverController: PopoverController, translate: TranslateService, http: HttpClient, cd: ChangeDetectorRef, environment: Environment, loggingService?: ILoggingService);
|
|
35
36
|
set peers(peers: Observable<Peer[]>);
|
|
36
37
|
cancel(): void;
|
|
37
38
|
ngOnDestroy(): void;
|
|
@@ -6,13 +6,14 @@ import { Subscription } from 'rxjs';
|
|
|
6
6
|
import { AccountValidatorService } from '../services/validator/account.validator';
|
|
7
7
|
import { FormFieldDefinition } from '../../shared/form/field.model';
|
|
8
8
|
import { LocalSettingsService } from '../services/local-settings.service';
|
|
9
|
+
import { Environment } from '../../../environments/environment.class';
|
|
9
10
|
import { MatAutocompleteConfigHolder } from '../../shared/material/autocomplete/material.autocomplete.config';
|
|
10
11
|
import * as i0 from "@angular/core";
|
|
11
12
|
export declare class RegisterForm implements OnInit {
|
|
12
13
|
private accountService;
|
|
13
14
|
private accountValidatorService;
|
|
14
15
|
formBuilder: UntypedFormBuilder;
|
|
15
|
-
protected environment:
|
|
16
|
+
protected environment: Environment;
|
|
16
17
|
protected settings?: LocalSettingsService;
|
|
17
18
|
protected debug: boolean;
|
|
18
19
|
autocompleteHelper: MatAutocompleteConfigHolder;
|
|
@@ -27,7 +28,7 @@ export declare class RegisterForm implements OnInit {
|
|
|
27
28
|
private stepper;
|
|
28
29
|
onCancel: EventEmitter<any>;
|
|
29
30
|
onSubmit: EventEmitter<RegisterData>;
|
|
30
|
-
constructor(accountService: AccountService, accountValidatorService: AccountValidatorService, formBuilder: UntypedFormBuilder, environment:
|
|
31
|
+
constructor(accountService: AccountService, accountValidatorService: AccountValidatorService, formBuilder: UntypedFormBuilder, environment: Environment, settings?: LocalSettingsService);
|
|
31
32
|
ngOnInit(): void;
|
|
32
33
|
get value(): RegisterData;
|
|
33
34
|
get valid(): boolean;
|
|
@@ -15,6 +15,7 @@ import { NetworkService } from './network.service';
|
|
|
15
15
|
import { AuthTokenType } from './network.types';
|
|
16
16
|
import { FileService } from '../../shared/file/file.service';
|
|
17
17
|
import { Referential } from './model/referential.model';
|
|
18
|
+
import { Environment } from '../../../environments/environment.class';
|
|
18
19
|
import { ShowToastOptions } from '../../shared/toast/toasts';
|
|
19
20
|
import { OverlayEventDetail } from '@ionic/core';
|
|
20
21
|
import { ToastController } from '@ionic/angular';
|
|
@@ -64,7 +65,7 @@ export declare class AccountService extends BaseGraphqlService<Account, any, num
|
|
|
64
65
|
protected file: FileService;
|
|
65
66
|
private translate;
|
|
66
67
|
private toastController;
|
|
67
|
-
protected environment:
|
|
68
|
+
protected environment: Environment;
|
|
68
69
|
onLogin: Subject<Account>;
|
|
69
70
|
onLogout: Subject<void>;
|
|
70
71
|
onChange: Subject<Account>;
|
|
@@ -82,7 +83,7 @@ export declare class AccountService extends BaseGraphqlService<Account, any, num
|
|
|
82
83
|
get department(): Department;
|
|
83
84
|
get tokenType(): AuthTokenType;
|
|
84
85
|
set tokenType(value: AuthTokenType);
|
|
85
|
-
constructor(network: NetworkService, graphql: GraphqlService, settings: LocalSettingsService, storage: Storage, file: FileService, translate: TranslateService, toastController: ToastController, environment:
|
|
86
|
+
constructor(network: NetworkService, graphql: GraphqlService, settings: LocalSettingsService, storage: Storage, file: FileService, translate: TranslateService, toastController: ToastController, environment: Environment, options: UserSettingsOptions);
|
|
86
87
|
ngOnStart(): Promise<Account>;
|
|
87
88
|
protected ngOnStop(): Promise<void>;
|
|
88
89
|
isLogin(): boolean;
|
|
@@ -102,7 +103,7 @@ export declare class AccountService extends BaseGraphqlService<Account, any, num
|
|
|
102
103
|
/**
|
|
103
104
|
*
|
|
104
105
|
* @param recorderDepartment
|
|
105
|
-
* @deprecated use ProgramRefService.
|
|
106
|
+
* @deprecated use ProgramRefService.canUserWriteEntity() instead
|
|
106
107
|
*/
|
|
107
108
|
canUserWriteDataForDepartment(recorderDepartment: Referential | any): boolean;
|
|
108
109
|
register(data: RegisterData): Promise<Account>;
|
|
@@ -10,11 +10,12 @@ import { Platform, ToastController } from '@ionic/angular';
|
|
|
10
10
|
import { ShowToastOptions } from '../../shared/toast/toasts';
|
|
11
11
|
import { TranslateService } from '@ngx-translate/core';
|
|
12
12
|
import { EntityServiceLoadOptions, IEntityService } from '../../shared/services/entity-service.class';
|
|
13
|
+
import { Environment } from '../../../environments/environment.class';
|
|
13
14
|
import { BaseGraphqlService } from './base-graphql-service.class';
|
|
14
15
|
import { IStartableService } from '../../shared/services/startable-service.class';
|
|
15
16
|
import { AccountService } from './account.service';
|
|
16
17
|
import * as i0 from "@angular/core";
|
|
17
|
-
export declare const
|
|
18
|
+
export declare const ConfigFragments: {
|
|
18
19
|
config: import("graphql/language/ast").DocumentNode;
|
|
19
20
|
};
|
|
20
21
|
export declare const APP_CONFIG_OPTIONS: InjectionToken<FormFieldDefinitionMap>;
|
|
@@ -27,15 +28,16 @@ export declare class ConfigService extends BaseGraphqlService<Configuration, any
|
|
|
27
28
|
protected toastController: ToastController;
|
|
28
29
|
protected translate: TranslateService;
|
|
29
30
|
protected accountService: AccountService;
|
|
30
|
-
protected environment:
|
|
31
|
+
protected environment: Environment;
|
|
31
32
|
private _optionDefs;
|
|
32
33
|
private $data;
|
|
33
34
|
get config(): Observable<Configuration>;
|
|
34
|
-
constructor(platform: Platform, graphql: GraphqlService, storage: Storage, network: NetworkService, file: FileService, toastController: ToastController, translate: TranslateService, accountService: AccountService, environment:
|
|
35
|
+
constructor(platform: Platform, graphql: GraphqlService, storage: Storage, network: NetworkService, file: FileService, toastController: ToastController, translate: TranslateService, accountService: AccountService, environment: Environment, defaultOptionsMap: FormFieldDefinitionMap);
|
|
35
36
|
protected ngOnStart(): Promise<Configuration>;
|
|
36
37
|
loadDefault(opts?: EntityServiceLoadOptions): Promise<Configuration>;
|
|
37
38
|
load(id: number, opts?: EntityServiceLoadOptions & {
|
|
38
39
|
query?: any;
|
|
40
|
+
variables?: any;
|
|
39
41
|
}): Promise<Configuration>;
|
|
40
42
|
canUserWrite(data: Configuration, opts?: any): boolean;
|
|
41
43
|
/**
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ScryptParams } from '@polkadot/util-crypto/scrypt/types';
|
|
2
2
|
import { Keypair } from '@polkadot/util-crypto/types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare const ED25519_SEED_LENGTH = 32;
|
|
5
5
|
export declare const SCRYPT_PARAMS: {
|
|
6
|
-
SIMPLE:
|
|
7
|
-
DEFAULT:
|
|
8
|
-
SECURE:
|
|
9
|
-
HARDEST:
|
|
10
|
-
EXTREME:
|
|
6
|
+
SIMPLE: ScryptParams;
|
|
7
|
+
DEFAULT: ScryptParams;
|
|
8
|
+
SECURE: ScryptParams;
|
|
9
|
+
HARDEST: ScryptParams;
|
|
10
|
+
EXTREME: ScryptParams;
|
|
11
11
|
};
|
|
12
12
|
export { Keypair };
|
|
13
13
|
export declare class CryptoService {
|
|
@@ -21,7 +21,7 @@ export declare class CryptoService {
|
|
|
21
21
|
* @param password
|
|
22
22
|
* @param scryptParams
|
|
23
23
|
*/
|
|
24
|
-
static scryptKeypair(salt: string, password: string, scryptParams?:
|
|
24
|
+
static scryptKeypair(salt: string, password: string, scryptParams?: ScryptParams): Promise<Keypair>;
|
|
25
25
|
/**
|
|
26
26
|
* Sign a message, from a key pair
|
|
27
27
|
*/
|
|
@@ -55,6 +55,7 @@ export declare class LocalSettingsService extends StartableService<LocalSettings
|
|
|
55
55
|
getPropertyAsInt(definition: FormFieldDefinition, defaultValue?: number): number;
|
|
56
56
|
getPropertyAsNumbers(definition: FormFieldDefinition, defaultValue?: number[]): number[];
|
|
57
57
|
getPropertyAsStrings(definition: FormFieldDefinition, defaultValue?: string[]): string[];
|
|
58
|
+
getPropertyAsObjects(definition: FormFieldDefinition, defaultValue?: any[]): any[];
|
|
58
59
|
apply(settings: Partial<LocalSettings>, opts?: {
|
|
59
60
|
emitEvent?: boolean;
|
|
60
61
|
persistImmediate?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LocalSettings } from './settings.model';
|
|
2
|
-
import { Person } from './person.model';
|
|
2
|
+
import { Person, UserProfileLabel } from './person.model';
|
|
3
3
|
import { Entity, EntityAsObjectOptions } from './entity.model';
|
|
4
4
|
import { LatLongPattern } from '../../../shared/material/latlong/latlong.utils';
|
|
5
5
|
import { UserToken } from './token.model';
|
|
@@ -19,6 +19,12 @@ export declare class Account extends Person<Account> {
|
|
|
19
19
|
asPerson(): Person;
|
|
20
20
|
get displayName(): string;
|
|
21
21
|
}
|
|
22
|
+
export declare abstract class AccountUtils {
|
|
23
|
+
static accountToString: typeof accountToString;
|
|
24
|
+
static hasMinProfile(account: Account | null, userProfile: UserProfileLabel): boolean;
|
|
25
|
+
static hasExactProfile(account: Account | null, label: UserProfileLabel): boolean;
|
|
26
|
+
static hasProfileAndIsEnable(account: Account | null, userProfile: UserProfileLabel): boolean;
|
|
27
|
+
}
|
|
22
28
|
export declare class UserSettings extends Entity<UserSettings> {
|
|
23
29
|
static SETTINGS_PROPERTIES: string[];
|
|
24
30
|
static fromObject: (source: any, opts?: any) => UserSettings;
|
|
@@ -3,6 +3,7 @@ import { getPropertyByPath } from '../../../shared/functions';
|
|
|
3
3
|
import { FilterFn } from '../../../shared/services/entity-service.class';
|
|
4
4
|
import { ObjectMap, ObjectMapEntry, PropertiesArray, PropertiesMap } from '../../../shared/types';
|
|
5
5
|
import { StoreObject } from '@apollo/client/core';
|
|
6
|
+
import { TreeItemEntityUtils } from './tree-item-entity.model';
|
|
6
7
|
export declare interface Cloneable<T> {
|
|
7
8
|
clone(): T;
|
|
8
9
|
}
|
|
@@ -22,11 +23,6 @@ export interface IEntity<T, ID = number, AO extends EntityAsObjectOptions = Enti
|
|
|
22
23
|
asObject(opts?: AO): any;
|
|
23
24
|
fromObject(source: any, opts?: FO): any;
|
|
24
25
|
}
|
|
25
|
-
export declare interface ITreeItemEntity<T extends IEntity<T, ID>, ID = number> {
|
|
26
|
-
parentId: ID;
|
|
27
|
-
parent: T;
|
|
28
|
-
children: T[];
|
|
29
|
-
}
|
|
30
26
|
export declare abstract class Entity<T extends Entity<T, ID, AO, FO>, ID = number, AO extends EntityAsObjectOptions = EntityAsObjectOptions, FO = any> implements IEntity<T, ID, AO, FO> {
|
|
31
27
|
static TYPENAME: string;
|
|
32
28
|
id: ID;
|
|
@@ -71,19 +67,20 @@ export declare abstract class EntityUtils {
|
|
|
71
67
|
*
|
|
72
68
|
* @param source
|
|
73
69
|
*/
|
|
74
|
-
static treeToArray
|
|
75
|
-
static listOfTreeToArray
|
|
70
|
+
static treeToArray: typeof TreeItemEntityUtils.treeToArray;
|
|
71
|
+
static listOfTreeToArray: typeof TreeItemEntityUtils.listOfTreeToArray;
|
|
76
72
|
/**
|
|
77
73
|
* Fill parent attribute, of all children found in the tree
|
|
78
74
|
*
|
|
79
75
|
* @param source
|
|
80
76
|
*/
|
|
81
|
-
static treeFillParent
|
|
77
|
+
static treeFillParent: typeof TreeItemEntityUtils.treeFillParent;
|
|
82
78
|
static isLocal(entity: IEntity<any, any> | Entity<any, any>): boolean;
|
|
83
79
|
static isRemote(entity: IEntity<any, any> | Entity<any, any>): boolean;
|
|
84
80
|
static isLocalId(id: number): boolean;
|
|
85
81
|
static isRemoteId(id: number): boolean;
|
|
86
82
|
static getId<T extends IEntity<T, ID> = IEntity<any, any>, ID = any>(entity: T): ID;
|
|
83
|
+
static hasId<T extends IEntity<T, ID> = IEntity<any, any>, ID = any>(entity: T): boolean;
|
|
87
84
|
static collectById<T extends IEntity<T, ID>, ID = any>(entities: T[]): ID[];
|
|
88
85
|
static arrayDistinctFilterFn<E extends IEntity<any, any>>(item: E, index: number, values: E[]): boolean;
|
|
89
86
|
}
|
|
@@ -9,12 +9,14 @@ export interface IEntityFilter<F extends IEntityFilter<F, T, ID, AO, FO>, T exte
|
|
|
9
9
|
export declare abstract class EntityFilter<F extends EntityFilter<F, T, ID, AO, FO>, T extends IEntity<T, any>, ID = number, AO extends EntityAsObjectOptions = EntityAsObjectOptions, FO = any> extends Entity<F, ID, AO, FO> implements IEntityFilter<F, T, ID, AO, FO> {
|
|
10
10
|
/**
|
|
11
11
|
* Compose some filter functions: all should return true
|
|
12
|
+
*
|
|
12
13
|
* @param filterFns
|
|
13
14
|
*/
|
|
14
15
|
static composeFilters<T extends IEntity<T, any>>(filterFns: FilterFn<T>[]): FilterFn<T>;
|
|
15
16
|
static compose<F extends EntityFilter<F, T>, T extends IEntity<T>>(filters: F[]): FilterFn<T>;
|
|
16
17
|
/**
|
|
17
18
|
* Compose some filter functions: all should return true
|
|
19
|
+
*
|
|
18
20
|
* @param filterFns
|
|
19
21
|
*/
|
|
20
22
|
static composeFns<T extends IEntity<T, any>>(filterFns: FilterFn<T>[]): FilterFn<T>;
|
|
@@ -28,4 +28,5 @@ export declare class PersonUtils {
|
|
|
28
28
|
static hasUpperOrEqualsProfile(actualProfiles: string[], expectedProfile: UserProfileLabel): boolean;
|
|
29
29
|
static personToString(obj: Person): string;
|
|
30
30
|
static personsToString(data: Person[], separator?: string): string;
|
|
31
|
+
static roleToProfile(role: string, defaultProfile?: UserProfileLabel): UserProfileLabel;
|
|
31
32
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { IEntity } from './entity.model';
|
|
2
|
+
import { FilterFn } from '../../../shared/services/entity-service.class';
|
|
3
|
+
import { EntityFilter } from './filter.model';
|
|
4
|
+
export declare interface ITreeItemEntity<T extends IEntity<T, ID>, ID = number> {
|
|
5
|
+
parentId: ID;
|
|
6
|
+
parent: T;
|
|
7
|
+
children: T[];
|
|
8
|
+
}
|
|
9
|
+
export declare class TreeItemEntityUtils {
|
|
10
|
+
static forward<T extends ITreeItemEntity<any>, ID = number>(node: T, filterFn?: FilterFn<T>, loopCount?: number): T;
|
|
11
|
+
static backward<T extends ITreeItemEntity<any>, ID = number>(node: T, filterFn?: FilterFn<T>, loopCount?: number): T;
|
|
12
|
+
static first<T extends ITreeItemEntity<any>>(node: T, filterFn?: FilterFn<T>): T;
|
|
13
|
+
static lastLeaf<T extends ITreeItemEntity<any>>(node: T, filterFn?: FilterFn<T>): T;
|
|
14
|
+
static findByFilter<T extends ITreeItemEntity<T> & IEntity<T>>(node: T, filter: EntityFilter<any, T>): T[];
|
|
15
|
+
/**
|
|
16
|
+
* Delete matches batches
|
|
17
|
+
*
|
|
18
|
+
* @param node
|
|
19
|
+
* @param filter
|
|
20
|
+
*/
|
|
21
|
+
static deleteByFilter<T extends ITreeItemEntity<T> & IEntity<T>>(node: T, filter: EntityFilter<any, T>): T[];
|
|
22
|
+
static filterRecursively<T extends ITreeItemEntity<any>>(node: T, filterFn: (n: T) => boolean): T[];
|
|
23
|
+
static deleteRecursively<T extends ITreeItemEntity<any>>(node: T, filterFn: (n: T) => boolean): T[];
|
|
24
|
+
/**
|
|
25
|
+
* Visit each node, from root to leaf
|
|
26
|
+
*
|
|
27
|
+
* @param node
|
|
28
|
+
* @param action
|
|
29
|
+
*/
|
|
30
|
+
static visit<T extends ITreeItemEntity<any>>(node: T, action: (item: T) => void): void;
|
|
31
|
+
/**
|
|
32
|
+
* Visit each node, from leaf to root
|
|
33
|
+
*
|
|
34
|
+
* @param node
|
|
35
|
+
* @param action
|
|
36
|
+
*/
|
|
37
|
+
static visitInverse<T extends ITreeItemEntity<any>>(node: T, action: (T: any) => void): void;
|
|
38
|
+
/**
|
|
39
|
+
* Transform a batch entity tree into a array list. This method keep links parent/children.
|
|
40
|
+
*
|
|
41
|
+
* Method used to find batch without id (e.g. before local storage)
|
|
42
|
+
*
|
|
43
|
+
* @param source
|
|
44
|
+
*/
|
|
45
|
+
static treeToArray<T extends ITreeItemEntity<any>>(source: T): T[];
|
|
46
|
+
static listOfTreeToArray<T extends ITreeItemEntity<any>>(sources: T[]): T[];
|
|
47
|
+
/**
|
|
48
|
+
* Fill parent attribute, of all children found in the tree
|
|
49
|
+
*
|
|
50
|
+
* @param source
|
|
51
|
+
*/
|
|
52
|
+
static treeFillParent<T extends ITreeItemEntity<any>>(source: T): any;
|
|
53
|
+
}
|
|
@@ -13,6 +13,7 @@ import { CacheService } from 'ionic-cache';
|
|
|
13
13
|
import { ShowToastOptions } from '../../shared/toast/toasts';
|
|
14
14
|
import { OverlayEventDetail } from '@ionic/core';
|
|
15
15
|
import { AppManifest, NodeInfo } from './network.utils';
|
|
16
|
+
import { Environment } from '../../../environments/environment.class';
|
|
16
17
|
import { StartableObservableService } from '../../shared/services/startable-observable-service.class';
|
|
17
18
|
import { ConnectionType, NetworkEventType } from './network.types';
|
|
18
19
|
import { ILoggingService } from '../../shared/logging/logger.model';
|
|
@@ -27,9 +28,8 @@ export declare class NetworkService extends StartableObservableService<Peer, Pee
|
|
|
27
28
|
private settings;
|
|
28
29
|
private cache;
|
|
29
30
|
private http;
|
|
30
|
-
protected environment:
|
|
31
|
+
protected environment: Environment;
|
|
31
32
|
private loggingService;
|
|
32
|
-
private network;
|
|
33
33
|
private translate;
|
|
34
34
|
private toastController;
|
|
35
35
|
onPeerChanges: import("rxjs").Observable<string>;
|
|
@@ -37,6 +37,7 @@ export declare class NetworkService extends StartableObservableService<Peer, Pee
|
|
|
37
37
|
onResetNetworkCache: EventEmitter<any>;
|
|
38
38
|
private readonly _mobile;
|
|
39
39
|
private readonly _logger;
|
|
40
|
+
private readonly _network;
|
|
40
41
|
private _timerSubscription;
|
|
41
42
|
private readonly _timerRefreshPeriod;
|
|
42
43
|
private readonly _timerRefreshCondition;
|
|
@@ -48,7 +49,7 @@ export declare class NetworkService extends StartableObservableService<Peer, Pee
|
|
|
48
49
|
get connectionType(): ConnectionType;
|
|
49
50
|
get peer(): Peer;
|
|
50
51
|
set peer(peer: Peer);
|
|
51
|
-
constructor(_document: any, platform: Platform, modalCtrl: ModalController, cryptoService: CryptoService, storage: Storage, settings: LocalSettingsService, cache: CacheService, http: HttpClient, environment:
|
|
52
|
+
constructor(_document: any, platform: Platform, modalCtrl: ModalController, cryptoService: CryptoService, storage: Storage, settings: LocalSettingsService, cache: CacheService, http: HttpClient, environment: Environment, loggingService: ILoggingService, network: Network, translate: TranslateService, toastController: ToastController);
|
|
52
53
|
/**
|
|
53
54
|
* Register to network event
|
|
54
55
|
*
|
|
@@ -10,11 +10,11 @@ import { ShowToastOptions } from '../../shared/toast/toasts';
|
|
|
10
10
|
import { TranslateService } from '@ngx-translate/core';
|
|
11
11
|
import { AccountService } from './account.service';
|
|
12
12
|
import { Observable } from 'rxjs';
|
|
13
|
+
import { Environment } from '../../../environments/environment.class';
|
|
13
14
|
import { ConfigService } from './config.service';
|
|
14
15
|
import { MomentDateAdapter } from '@angular/material-moment-adapter';
|
|
15
16
|
import { Downloader, DownloadRequest } from '@ionic-native/downloader/ngx';
|
|
16
17
|
import { StartableService } from '../../shared/services/startable-service.class';
|
|
17
|
-
import { StorageService } from '../../shared/storage/storage.service';
|
|
18
18
|
import { OpenOptions } from '@capacitor/browser';
|
|
19
19
|
import { ILoggingService } from '../../shared/logging/logger.model';
|
|
20
20
|
import * as i0 from "@angular/core";
|
|
@@ -28,7 +28,6 @@ export declare class PlatformService extends StartableService {
|
|
|
28
28
|
private toastController;
|
|
29
29
|
private translate;
|
|
30
30
|
private dateAdapter;
|
|
31
|
-
private storageService;
|
|
32
31
|
private entitiesStorage;
|
|
33
32
|
private settings;
|
|
34
33
|
private networkService;
|
|
@@ -36,7 +35,7 @@ export declare class PlatformService extends StartableService {
|
|
|
36
35
|
private configService;
|
|
37
36
|
private cache;
|
|
38
37
|
private audioProvider;
|
|
39
|
-
protected environment:
|
|
38
|
+
protected environment: Environment;
|
|
40
39
|
private loggingService;
|
|
41
40
|
private downloader;
|
|
42
41
|
private _logger;
|
|
@@ -45,7 +44,7 @@ export declare class PlatformService extends StartableService {
|
|
|
45
44
|
private _capacitor;
|
|
46
45
|
private _android;
|
|
47
46
|
private _ios;
|
|
48
|
-
constructor(ionicPlatform: Platform, cdkPlatform: CdkPlatform, toastController: ToastController, translate: TranslateService, dateAdapter: MomentDateAdapter,
|
|
47
|
+
constructor(ionicPlatform: Platform, cdkPlatform: CdkPlatform, toastController: ToastController, translate: TranslateService, dateAdapter: MomentDateAdapter, entitiesStorage: EntitiesStorage, settings: LocalSettingsService, networkService: NetworkService, accountService: AccountService, configService: ConfigService, cache: CacheService, audioProvider: AudioProvider, environment: Environment, loggingService: ILoggingService, downloader: Downloader);
|
|
49
48
|
private _downloadingJobs;
|
|
50
49
|
private checkAppVersionTimer;
|
|
51
50
|
is(platformName: Platforms): boolean;
|
|
@@ -91,6 +90,6 @@ export declare class PlatformService extends StartableService {
|
|
|
91
90
|
}): Promise<void>;
|
|
92
91
|
protected showToast(opts: ShowToastOptions): Promise<HTMLIonToastElement>;
|
|
93
92
|
protected onStartupError(err: any): Promise<void>;
|
|
94
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PlatformService, [null, null, null, null, null, null, null, null, null, null, null, null, null,
|
|
93
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PlatformService, [null, null, null, null, null, null, null, null, null, null, null, null, null, { optional: true; }, { optional: true; }]>;
|
|
95
94
|
static ɵprov: i0.ɵɵInjectableDeclaration<PlatformService>;
|
|
96
95
|
}
|
|
@@ -18,9 +18,9 @@ declare interface EntityStorageMap {
|
|
|
18
18
|
}
|
|
19
19
|
export declare class EntitiesStorage extends StartableService<EntityStorageMap> {
|
|
20
20
|
private platform;
|
|
21
|
-
private progressBarService;
|
|
22
21
|
private storage;
|
|
23
22
|
protected environment: Environment;
|
|
23
|
+
private progressBarService?;
|
|
24
24
|
static readonly TRASH_PREFIX = "Trash#";
|
|
25
25
|
static readonly REMOTE_PREFIX = "Remote#";
|
|
26
26
|
private readonly _typePolicies;
|
|
@@ -29,7 +29,7 @@ export declare class EntitiesStorage extends StartableService<EntityStorageMap>
|
|
|
29
29
|
private _dirty;
|
|
30
30
|
private _saving;
|
|
31
31
|
get dirty(): boolean;
|
|
32
|
-
constructor(platform: Platform,
|
|
32
|
+
constructor(platform: Platform, storage: IStorage, environment: Environment, progressBarService?: IProgressBarService, typePolicies?: EntitiesStorageTypePolicies);
|
|
33
33
|
ngOnStart(): Promise<EntityStorageMap>;
|
|
34
34
|
protected ngOnStop(): Promise<void>;
|
|
35
35
|
watchAll<T extends Entity<T>>(entityName: string, variables: {
|
|
@@ -102,7 +102,7 @@ export declare class EntitiesStorage extends StartableService<EntityStorageMap>
|
|
|
102
102
|
protected storeLocally(opts?: {
|
|
103
103
|
skipIfPristine: boolean;
|
|
104
104
|
}): Promise<void>;
|
|
105
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<EntitiesStorage, [null, { optional: true; },
|
|
105
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EntitiesStorage, [null, null, null, { optional: true; }, { optional: true; }]>;
|
|
106
106
|
static ɵprov: i0.ɵɵInjectableDeclaration<EntitiesStorage>;
|
|
107
107
|
}
|
|
108
108
|
export {};
|