@sumaris-net/ngx-components 2.7.4 → 2.7.5-rc10

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.
Files changed (28) hide show
  1. package/esm2022/src/app/core/account/new-token.modal.mjs +3 -3
  2. package/esm2022/src/app/core/services/model/person.model.mjs +9 -6
  3. package/esm2022/src/app/core/services/network.service.mjs +5 -1
  4. package/esm2022/src/app/core/services/pipes/person-to-string.pipe.mjs +4 -4
  5. package/esm2022/src/app/core/table/actions-column.component.mjs +3 -3
  6. package/esm2022/src/app/shared/functions.mjs +1 -1
  7. package/esm2022/src/app/shared/named-filter/named-filter-selector.component.mjs +10 -8
  8. package/esm2022/src/app/shared/named-filter/named-filter.service.mjs +1 -1
  9. package/esm2022/src/app/shared/pipes/property.pipes.mjs +3 -3
  10. package/esm2022/src/app/shared/toolbar/toolbar.mjs +12 -14
  11. package/esm2022/src/app/shared/upload-file/upload-file.component.mjs +4 -3
  12. package/esm2022/src/app/shared/validator/validators.mjs +10 -1
  13. package/esm2022/src/environments/environment.class.mjs +3 -1
  14. package/fesm2022/sumaris-net.ngx-components.mjs +100 -79
  15. package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
  16. package/package.json +1 -1
  17. package/src/app/core/services/model/person.model.d.ts +6 -2
  18. package/src/app/core/services/pipes/person-to-string.pipe.d.ts +3 -1
  19. package/src/app/shared/functions.d.ts +1 -1
  20. package/src/app/shared/named-filter/named-filter-selector.component.d.ts +5 -4
  21. package/src/app/shared/named-filter/named-filter.service.d.ts +12 -6
  22. package/src/app/shared/pipes/property.pipes.d.ts +1 -1
  23. package/src/app/shared/toolbar/toolbar.d.ts +2 -2
  24. package/src/app/shared/validator/validators.d.ts +1 -0
  25. package/src/assets/manifest.json +1 -1
  26. package/src/environments/environment.class.d.ts +6 -0
  27. package/src/theme/_mixins.scss +0 -1
  28. package/src/theme/_theme.variables.scss +4 -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.7.4",
4
+ "version": "2.7.5-rc10",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -27,7 +27,11 @@ export declare class PersonUtils {
27
27
  static getMainProfile(profiles?: string[]): UserProfileLabel;
28
28
  static getMainProfileIndex(profiles?: string[]): number;
29
29
  static hasUpperOrEqualsProfile(actualProfiles: string[], expectedProfile: UserProfileLabel): boolean;
30
- static personToString(obj: Person): string;
31
- static personsToString(data: Person[], separator?: string): string;
30
+ static personToString(obj: Person, opts?: {
31
+ withDepartment?: boolean;
32
+ }): string;
33
+ static personsToString(data: Person[], separator?: string, opts?: {
34
+ withDepartment?: boolean;
35
+ }): string;
32
36
  static roleToProfile(role: string, defaultProfile?: UserProfileLabel): UserProfileLabel;
33
37
  }
@@ -2,7 +2,9 @@ import { PipeTransform } from '@angular/core';
2
2
  import { Person } from '../model/person.model';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class PersonToStringPipe implements PipeTransform {
5
- transform(value: Person | Person[], separator?: string): string;
5
+ transform(value: Person | Person[], separator?: string, opts?: {
6
+ withDepartment?: boolean;
7
+ }): string;
6
8
  static ɵfac: i0.ɵɵFactoryDeclaration<PersonToStringPipe, never>;
7
9
  static ɵpipe: i0.ɵɵPipeDeclaration<PersonToStringPipe, "personToString", false>;
8
10
  static ɵprov: i0.ɵɵInjectableDeclaration<PersonToStringPipe>;
@@ -67,7 +67,7 @@ export declare function sort<T>(array: T[], attribute?: string, opts?: Intl.Coll
67
67
  export declare function isInt(value: string): boolean;
68
68
  export declare function isNumber(value: string): boolean;
69
69
  export declare function isNumberRange(value: string): boolean;
70
- export declare function getPropertyByPath(obj: any, path: string | string[], defaultValue?: any): any;
70
+ export declare function getPropertyByPath(obj: any, path: string | Array<string | number>, defaultValue?: any): any;
71
71
  export declare function getProperty<T = any, K extends keyof T = any>(obj: T, key: K): T[K];
72
72
  export declare function getPropertyByPathAsString(obj: any, path: string | string[]): string | undefined;
73
73
  export declare function setPropertyByPath(obj: any, path: string | string[], value: any): any;
@@ -2,10 +2,10 @@ import { ChangeDetectorRef, EventEmitter, Injector, OnInit } from '@angular/core
2
2
  import { UntypedFormBuilder } from '@angular/forms';
3
3
  import { PopoverController, ToastController } from '@ionic/angular';
4
4
  import { AppForm } from '../../core/form/form.class';
5
- import { INamedFilterService } from './named-filter.service';
6
5
  import { MatAutocompleteField } from '../material/autocomplete/material.autocomplete';
7
- import { INamedFilter, INamedFilterFilter, NamedFilter } from './named-filter.model';
8
6
  import { MatAutocompleteFieldConfig } from '../material/autocomplete/material.autocomplete.config';
7
+ import { INamedFilter, INamedFilterFilter, NamedFilter } from './named-filter.model';
8
+ import { INamedFilterService, NamedFilterLoadOptions, NamedFilterWatchOptions } from './named-filter.service';
9
9
  import * as i0 from "@angular/core";
10
10
  export declare class NamedFilterSelector extends AppForm<any> implements OnInit {
11
11
  protected injector: Injector;
@@ -13,8 +13,9 @@ export declare class NamedFilterSelector extends AppForm<any> implements OnInit
13
13
  protected cd: ChangeDetectorRef;
14
14
  protected toastController: ToastController;
15
15
  protected popoverController: PopoverController;
16
- protected dataService: INamedFilterService<INamedFilter<any>, INamedFilterFilter<any, any>>;
16
+ protected dataService: INamedFilterService<INamedFilter<any>, INamedFilterFilter<any, any>, NamedFilterWatchOptions, NamedFilterLoadOptions>;
17
17
  protected logPrefix: string;
18
+ protected readonly mobile: boolean;
18
19
  private _entityName;
19
20
  private _deleteDisabled;
20
21
  set entityName(entityName: string);
@@ -30,7 +31,7 @@ export declare class NamedFilterSelector extends AppForm<any> implements OnInit
30
31
  filterSelected: EventEmitter<any>;
31
32
  filterDeleted: EventEmitter<NamedFilter<NamedFilter<any>>>;
32
33
  autocompleteField: MatAutocompleteField;
33
- constructor(injector: Injector, formBuilder: UntypedFormBuilder, cd: ChangeDetectorRef, toastController: ToastController, popoverController: PopoverController, dataService: INamedFilterService<INamedFilter<any>, INamedFilterFilter<any, any>>);
34
+ constructor(injector: Injector, formBuilder: UntypedFormBuilder, cd: ChangeDetectorRef, toastController: ToastController, popoverController: PopoverController, dataService: INamedFilterService<INamedFilter<any>, INamedFilterFilter<any, any>, NamedFilterWatchOptions, NamedFilterLoadOptions>);
34
35
  get isNew(): boolean;
35
36
  get saveDisabled(): boolean;
36
37
  get deleteDisabled(): boolean;
@@ -1,15 +1,21 @@
1
1
  import { InjectionToken } from '@angular/core';
2
- import { IEntitiesService, IEntityService, LoadResult, SuggestService } from '../services/entity-service.class';
2
+ import { EntitiesServiceLoadOptions, EntityServiceWatchOptions, IEntitiesService, IEntityService, LoadResult, SuggestService } from '../services/entity-service.class';
3
3
  import { GraphqlService } from '../../core/graphql/graphql.service';
4
4
  import { BaseEntityService, BaseEntityServiceOptions } from '../../core/services/base-entity-service.class';
5
5
  import { PlatformService } from '../../core/services/platform.service';
6
6
  import { AccountService } from '../../core/services/account.service';
7
7
  import { INamedFilter, INamedFilterFilter, NamedFilter, NamedFilterFilter } from './named-filter.model';
8
8
  import * as i0 from "@angular/core";
9
- export declare const APP_NAMED_FILTER_SERVICE: InjectionToken<INamedFilterService<any, any>>;
10
- export interface INamedFilterService<T extends INamedFilter<T>, F extends INamedFilterFilter<F, T>> extends IEntitiesService<T, F>, IEntityService<T, number>, SuggestService<T, F> {
9
+ export declare const APP_NAMED_FILTER_SERVICE: InjectionToken<INamedFilterService<any, any, any, any>>;
10
+ export interface INamedFilterService<T extends INamedFilter<T>, F extends INamedFilterFilter<F, T>, WO extends NamedFilterWatchOptions, LO extends NamedFilterLoadOptions> extends IEntitiesService<T, F, WO>, IEntityService<T, number, LO>, SuggestService<T, F> {
11
11
  }
12
- export declare abstract class AbstractNamedFilterService<T extends NamedFilter<T>, F extends NamedFilterFilter<F, T>> extends BaseEntityService<T, F, number> implements INamedFilterService<T, F> {
12
+ export interface NamedFilterWatchOptions extends EntityServiceWatchOptions {
13
+ withContent?: boolean;
14
+ }
15
+ export interface NamedFilterLoadOptions extends EntitiesServiceLoadOptions {
16
+ withContent?: boolean;
17
+ }
18
+ export declare abstract class AbstractNamedFilterService<T extends NamedFilter<T>, F extends NamedFilterFilter<F, T>, WO extends NamedFilterWatchOptions = NamedFilterWatchOptions, LO extends NamedFilterLoadOptions = NamedFilterLoadOptions> extends BaseEntityService<T, F, number> implements INamedFilterService<T, F, WO, LO> {
13
19
  protected graphql: GraphqlService;
14
20
  protected platform: PlatformService;
15
21
  protected account: AccountService;
@@ -21,6 +27,6 @@ export declare abstract class AbstractNamedFilterService<T extends NamedFilter<T
21
27
  asSuggestFilter(searchText: string, filter?: Partial<F>): F;
22
28
  asFilter(source: any): F;
23
29
  protected fillDefaultProperties(source: T): void;
24
- static ɵfac: i0.ɵɵFactoryDeclaration<AbstractNamedFilterService<any, any>, never>;
25
- static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractNamedFilterService<any, any>, never, never, {}, {}, never, never, false, never>;
30
+ static ɵfac: i0.ɵɵFactoryDeclaration<AbstractNamedFilterService<any, any, any, any>, never>;
31
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractNamedFilterService<any, any, any, any>, never, never, {}, {}, never, never, false, never>;
26
32
  }
@@ -4,7 +4,7 @@ import { FormFieldDefinition } from '../form/field.model';
4
4
  import { TranslateService } from '@ngx-translate/core';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class PropertyGetPipe implements PipeTransform {
7
- transform(obj: any, args: string | {
7
+ transform(obj: any, args: string | Array<string | number> | {
8
8
  key: string;
9
9
  defaultValue?: any;
10
10
  }): any;
@@ -2,7 +2,7 @@ import { ChangeDetectorRef, EventEmitter, OnDestroy, OnInit } from '@angular/cor
2
2
  import { IProgressBarService } from '../services/progress-bar.service';
3
3
  import { ActivatedRoute, Router } from '@angular/router';
4
4
  import { IonMenuToggle, IonRouterOutlet, IonSearchbar, NavController } from '@ionic/angular';
5
- import { BehaviorSubject, Observable } from 'rxjs';
5
+ import { Observable } from 'rxjs';
6
6
  import { HammerTapEvent } from '../gesture/hammer.utils';
7
7
  import { AppColors } from '../types';
8
8
  import { SearchbarChangeEventDetail as ISearchbarSearchbarChangeEventDetail } from '@ionic/core/dist/types/components/searchbar/searchbar-interface';
@@ -25,7 +25,7 @@ export declare class ToolbarComponent implements ToolbarToken, OnInit, OnDestroy
25
25
  private _validateTapCount;
26
26
  private _defaultBackHref;
27
27
  private _backHref;
28
- protected readonly _progressBarMode$: BehaviorSubject<ProgressBarMode>;
28
+ private _progressBarMode;
29
29
  set progressBarMode(value: ProgressBarMode);
30
30
  get progressBarMode(): ProgressBarMode;
31
31
  title: string;
@@ -88,6 +88,7 @@ export declare class SharedFormArrayValidators {
88
88
  */
89
89
  static uniqueEntity(controlName: string): ValidatorFn;
90
90
  static requiredArrayMinLength(minLength?: number): ValidatorFn;
91
+ static arrayMaxLength(maxLength?: number): ValidatorFn;
91
92
  /**
92
93
  * Validate the sum of control values in an FormArray not overflow the max value
93
94
  *
@@ -2,7 +2,7 @@
2
2
  "name": "ngx-sumaris-components",
3
3
  "short_name": "ngx-sumaris-components",
4
4
  "manifest_version": 1,
5
- "version": "2.7.4",
5
+ "version": "2.7.5-rc9",
6
6
  "default_locale": "fr",
7
7
  "description": "Angular components for building beautiful and responsive Apps",
8
8
  "icons": [{
@@ -12,6 +12,12 @@ export declare class Environment {
12
12
  baseUrl: string;
13
13
  connectionTimeout?: number;
14
14
  sameUrlPeer?: boolean;
15
+ peer?: {
16
+ host: string;
17
+ port: number;
18
+ useSsl?: boolean;
19
+ path?: string;
20
+ } | undefined | null;
15
21
  defaultPeer?: {
16
22
  host: string;
17
23
  port: number;
@@ -8,7 +8,6 @@
8
8
  font-size: calculateRem($size) !important;
9
9
  }
10
10
 
11
-
12
11
  @mixin font-roboto($size: false, $colour: false, $weight: false, $lh: false) {
13
12
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
14
13
 
@@ -1,6 +1,10 @@
1
1
  /** Inject all CSS Variables **/
2
2
  html {
3
3
  @include css-variables-to-root();
4
+
5
+ &.plt-mobile {
6
+ @include css-variables-to-root-mobile();
7
+ }
4
8
  }
5
9
 
6
10
  html.dark {