@sumaris-net/ngx-components 1.9.0 → 1.9.3

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sumaris-net/ngx-components",
3
3
  "description": "SUMARiS Angular components",
4
- "version": "1.9.0",
4
+ "version": "1.9.3",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -2,27 +2,16 @@ import { ChangeDetectorRef, Injector, OnInit } from '@angular/core';
2
2
  import { Person } from '../../../core/services/model/person.model';
3
3
  import { referentialToString } from '../../../core/services/model/referential.model';
4
4
  import { PersonService } from '../../services/person.service';
5
- import { ModalController } from '@ionic/angular';
6
- import { ActivatedRoute, Router } from '@angular/router';
7
5
  import { AccountService } from '../../../core/services/account.service';
8
- import { Location } from '@angular/common';
9
6
  import { AbstractControl, FormBuilder, FormGroup } from '@angular/forms';
10
7
  import { AppTable } from '../../../core/table/table.class';
11
8
  import { ValidatorService } from '@e-is/ngx-material-table';
12
9
  import { FormFieldDefinition } from '../../../shared/form/field.model';
13
- import { PlatformService } from '../../../core/services/platform.service';
14
- import { LocalSettingsService } from '../../../core/services/local-settings.service';
15
10
  import { PersonFilter } from '../../services/filter/person.filter';
16
11
  import { ConfigService } from '../../../core/services/config.service';
17
12
  import { MatExpansionPanel } from '@angular/material/expansion';
18
13
  export declare class UsersPage extends AppTable<Person, PersonFilter> implements OnInit {
19
- protected route: ActivatedRoute;
20
- protected router: Router;
21
- protected platform: PlatformService;
22
- protected location: Location;
23
- protected modalCtrl: ModalController;
24
14
  protected accountService: AccountService;
25
- protected settings: LocalSettingsService;
26
15
  protected validatorService: ValidatorService;
27
16
  protected configService: ConfigService;
28
17
  protected dataService: PersonService;
@@ -38,7 +27,7 @@ export declare class UsersPage extends AppTable<Person, PersonFilter> implements
38
27
  set showUsernameExtranetColumn(value: boolean);
39
28
  useSticky: boolean;
40
29
  filterExpansionPanel: MatExpansionPanel;
41
- constructor(route: ActivatedRoute, router: Router, platform: PlatformService, location: Location, modalCtrl: ModalController, accountService: AccountService, settings: LocalSettingsService, validatorService: ValidatorService, configService: ConfigService, dataService: PersonService, cd: ChangeDetectorRef, formBuilder: FormBuilder, injector: Injector, environment: any);
30
+ constructor(injector: Injector, accountService: AccountService, validatorService: ValidatorService, configService: ConfigService, dataService: PersonService, cd: ChangeDetectorRef, formBuilder: FormBuilder, environment: any);
42
31
  ngOnInit(): void;
43
32
  applyFilterAndClosePanel(event?: UIEvent): void;
44
33
  resetFilter(event?: UIEvent): void;
@@ -1,5 +1,5 @@
1
1
  import { AfterViewInit, ChangeDetectorRef, EventEmitter, Injector, OnDestroy, OnInit } from '@angular/core';
2
- import { Subject } from 'rxjs';
2
+ import { Subject, Subscription } from 'rxjs';
3
3
  import { AddToPageHistoryOptions, LocalSettingsService } from '../services/local-settings.service';
4
4
  import { Entity } from '../services/model/entity.model';
5
5
  import { UsageMode } from '../services/model/settings.model';
@@ -51,7 +51,7 @@ export declare abstract class AppEntityEditor<T extends Entity<T, ID>, S extends
51
51
  protected errorTranslator: FormErrorTranslator;
52
52
  data: T;
53
53
  saving: boolean;
54
- hasRemoteListener: boolean;
54
+ listenRemoteSubscription: Subscription;
55
55
  defaultBackHref: string;
56
56
  historyIcon: {
57
57
  icon?: string;
@@ -94,6 +94,7 @@ export declare abstract class AppEntityEditor<T extends Entity<T, ID>, S extends
94
94
  [key: string]: any;
95
95
  }): Promise<void>;
96
96
  startListenRemoteChanges(): void;
97
+ stopListenRemoteChanges(): void;
97
98
  updateView(data: T | null, opts?: {
98
99
  emitEvent?: boolean;
99
100
  openTabIndex?: number;
@@ -5,7 +5,6 @@ import { AppTable } from './table.class';
5
5
  import { IEntity } from '../services/model/entity.model';
6
6
  import { InMemoryEntitiesService } from '../../shared/services/memory-entity-service.class';
7
7
  export declare abstract class AppInMemoryTable<T extends IEntity<T, ID>, F = any, ID = number> extends AppTable<T, F, ID> {
8
- protected injector: Injector;
9
8
  protected columns: string[];
10
9
  protected dataType: new () => T;
11
10
  protected memoryDataService: InMemoryEntitiesService<T, F, ID>;
@@ -7,14 +7,13 @@ import { TableElement } from '@e-is/ngx-material-table';
7
7
  import { EntitiesTableDataSource } from './entities-table-datasource.class';
8
8
  import { SelectionModel } from '@angular/cdk/collections';
9
9
  import { IEntity } from '../services/model/entity.model';
10
- import { AlertController, ModalController, Platform, ToastController } from '@ionic/angular';
10
+ import { AlertController, ModalController, ToastController } from '@ionic/angular';
11
11
  import { ActivatedRoute, Router } from '@angular/router';
12
12
  import { ColumnItem } from './table-select-columns.component';
13
13
  import { Location } from '@angular/common';
14
14
  import { IAppForm } from '../form/form.utils';
15
15
  import { LocalSettingsService } from '../services/local-settings.service';
16
16
  import { TranslateService } from '@ngx-translate/core';
17
- import { PlatformService } from '../services/platform.service';
18
17
  import { MatAutocompleteConfigHolder, MatAutocompleteFieldAddOptions, MatAutocompleteFieldConfig } from '../../shared/material/autocomplete/material.autocomplete';
19
18
  import { CompletableEvent } from '../../shared/events';
20
19
  import { WaitForOptions } from '../../shared/observables';
@@ -45,12 +44,6 @@ export interface IModalDetailOptions<T = any> {
45
44
  }
46
45
  export declare type SaveActionType = 'delete' | 'sort' | 'filter';
47
46
  export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = number> implements OnInit, OnDestroy, AfterViewInit, IAppForm, IFormControlPathTranslator {
48
- protected route: ActivatedRoute;
49
- protected router: Router;
50
- protected platform: Platform | PlatformService;
51
- protected location: Location;
52
- protected modalCtrl: ModalController;
53
- protected settings: LocalSettingsService;
54
47
  protected columns: string[];
55
48
  protected _dataSource?: EntitiesTableDataSource<T, F, ID>;
56
49
  private _filter?;
@@ -62,7 +55,12 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
62
55
  protected _destroy$: Subject<unknown>;
63
56
  protected _autocompleteConfigHolder: MatAutocompleteConfigHolder;
64
57
  protected allowRowDetail: boolean;
58
+ protected route: ActivatedRoute;
59
+ protected router: Router;
60
+ protected location: Location;
61
+ protected settings: LocalSettingsService;
65
62
  protected translate: TranslateService;
63
+ protected modalCtrl: ModalController;
66
64
  protected alertCtrl: AlertController;
67
65
  protected toastController: ToastController;
68
66
  protected previouslyEditedRowId: number;
@@ -92,7 +90,7 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
92
90
  autocompleteFields: {
93
91
  [key: string]: MatAutocompleteFieldConfig;
94
92
  };
95
- mobile: boolean;
93
+ readonly mobile: boolean;
96
94
  settingsId: string;
97
95
  debug: boolean;
98
96
  i18nColumnPrefix: string;
@@ -215,7 +213,7 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
215
213
  table: MatTable<T>;
216
214
  childPaginator: MatPaginator;
217
215
  sort: MatSort;
218
- protected constructor(route: ActivatedRoute, router: Router, platform: Platform | PlatformService, location: Location, modalCtrl: ModalController, settings: LocalSettingsService, columns: string[], _dataSource?: EntitiesTableDataSource<T, F, ID>, _filter?: F, injector?: Injector);
216
+ protected constructor(injector: Injector, columns: string[], _dataSource?: EntitiesTableDataSource<T, F, ID>, _filter?: F);
219
217
  ngOnInit(): void;
220
218
  ngAfterViewInit(): void;
221
219
  ngOnDestroy(): void;
@@ -34,7 +34,6 @@ export interface UserEventIcon {
34
34
  color?: PredefinedColors;
35
35
  }
36
36
  export declare class UserEventsTable extends AppTable<UserEvent, UserEventFilter> implements OnInit {
37
- protected injector: Injector;
38
37
  protected accountService: AccountService;
39
38
  protected service: UserEventService;
40
39
  protected entities: EntitiesStorage;