@sumaris-net/ngx-components 2.8.10 → 2.8.11

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": "2.8.10",
4
+ "version": "2.8.11",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -1,10 +1,17 @@
1
1
  import { Moment } from 'moment';
2
2
  import { ReferentialAsObjectOptions } from './referential.model';
3
- import { Entity } from './entity.model';
3
+ import { Entity, IEntity } from './entity.model';
4
4
  import { Department } from './department.model';
5
5
  export type UserProfileLabel = 'ADMIN' | 'USER' | 'SUPERVISOR' | 'GUEST';
6
6
  export declare const PRIORITIZED_AUTHORITIES: Readonly<UserProfileLabel[]>;
7
- export declare class Person<T extends Person<any> = Person<any>> extends Entity<T, number, ReferentialAsObjectOptions> {
7
+ export interface IPerson extends IEntity<Person> {
8
+ firstName: string;
9
+ lastName: string;
10
+ email?: string;
11
+ department?: Department;
12
+ avatar?: string;
13
+ }
14
+ export declare class Person<T extends Person<any> = Person<any>> extends Entity<T, number, ReferentialAsObjectOptions> implements IPerson {
8
15
  static fromObject: (source: any, opts?: any) => Person;
9
16
  firstName: string;
10
17
  lastName: string;
@@ -27,10 +34,10 @@ export declare class PersonUtils {
27
34
  static getMainProfile(profiles?: string[]): UserProfileLabel;
28
35
  static getMainProfileIndex(profiles?: string[]): number;
29
36
  static hasUpperOrEqualsProfile(actualProfiles: string[], expectedProfile: UserProfileLabel): boolean;
30
- static personToString(obj: Person, opts?: {
37
+ static personToString(obj: Person | IPerson, opts?: {
31
38
  withDepartment?: boolean;
32
39
  }): string;
33
- static personsToString(data: Person[], separator?: string, opts?: {
40
+ static personsToString(data: (Person | IPerson)[], separator?: string, opts?: {
34
41
  withDepartment?: boolean;
35
42
  }): string;
36
43
  static roleToProfile(role: string, defaultProfile?: UserProfileLabel): UserProfileLabel;
@@ -1,8 +1,8 @@
1
1
  import { PipeTransform } from '@angular/core';
2
- import { Person } from '../model/person.model';
2
+ import { IPerson, 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, opts?: {
5
+ transform(value: Person | IPerson | (Person | IPerson)[], separator?: string, opts?: {
6
6
  withDepartment?: boolean;
7
7
  }): string;
8
8
  static ɵfac: i0.ɵɵFactoryDeclaration<PersonToStringPipe, never>;
@@ -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.8.10",
5
+ "version": "2.8.11",
6
6
  "default_locale": "fr",
7
7
  "description": "Angular components for building beautiful and responsive Apps",
8
8
  "icons": [{