@sumaris-net/ngx-components 1.23.43 → 1.23.45

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.23.43",
4
+ "version": "1.23.45",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -1,5 +1,6 @@
1
1
  import { Moment } from 'moment';
2
2
  import { Entity, EntityAsObjectOptions, IEntity } from './entity.model';
3
+ import { IconRef } from '../../../shared/types';
3
4
  export declare function referentialToString(obj: Referential | any, properties?: string[]): string | undefined;
4
5
  export declare function referentialsToString(values: Referential[], properties?: string[], separator?: string): string;
5
6
  export declare interface IStatus {
@@ -44,6 +45,7 @@ export declare class ReferentialUtils {
44
45
  }
45
46
  export interface ReferentialAsObjectOptions extends EntityAsObjectOptions {
46
47
  keepEntityName?: boolean;
48
+ keepIcon?: boolean;
47
49
  }
48
50
  /**
49
51
  * Used to store an entity locally
@@ -61,6 +63,7 @@ export declare class ReferentialRef<T extends ReferentialRef<any, ID> = Referent
61
63
  statusId: number;
62
64
  levelId: number;
63
65
  entityName: string;
66
+ icon: IconRef;
64
67
  constructor();
65
68
  asObject(opts?: O): any;
66
69
  fromObject(source: any, opts?: FO): void;
@@ -9,7 +9,6 @@ export declare class Color {
9
9
  private _name;
10
10
  static get(name: ColorName): Color;
11
11
  static parseRgba(rgba: string): Color | null;
12
- static parseHexa(hexColor: string): Color;
13
12
  static transparent: () => Color;
14
13
  constructor(_rgbArray: number[], _opacity?: number, _name?: string);
15
14
  get name(): string;
@@ -21,21 +20,20 @@ export declare class Color {
21
20
  rgba(opacity?: number): string;
22
21
  }
23
22
  export declare interface ColorGradientOptions {
24
- opacity?: number;
25
23
  startColor?: number[];
26
24
  mainColor?: number[];
27
25
  mainColorIndex?: number;
28
26
  endColor?: number[];
29
- format?: 'rgb' | 'hex' | 'array';
30
27
  }
31
28
  export declare interface ColorScaleOptions extends ColorGradientOptions {
29
+ opacity?: number;
32
30
  min?: number;
33
31
  max?: number;
34
32
  upperMax?: boolean;
35
33
  }
36
34
  export declare interface ColorScaleLegendItem {
37
- label: string;
38
- color: string;
35
+ label: string | number[];
36
+ color: Color;
39
37
  }
40
38
  export declare interface ColorScaleLegend {
41
39
  items: ColorScaleLegendItem[];
@@ -44,7 +42,6 @@ export declare interface ColorScaleLegend {
44
42
  * Helper class for colors scale
45
43
  */
46
44
  export declare class ColorScale {
47
- private colorArray;
48
45
  static custom: (count: number, options?: ColorScaleOptions) => ColorScale;
49
46
  static default(): ColorScale;
50
47
  /**
@@ -57,8 +54,9 @@ export declare class ColorScale {
57
54
  private _legendItems;
58
55
  get min(): number;
59
56
  get max(): number;
60
- constructor(colorArray: string[], options?: ColorScaleOptions);
57
+ constructor(colorArray: number[][], options?: ColorScaleOptions);
61
58
  get legend(): ColorScaleLegend;
62
- getValueColor(value: number): string | number[];
63
- protected computeLegend(): ColorScaleLegendItem[];
59
+ getLegendForValue(value: number): ColorScaleLegendItem;
60
+ getLegendAtIndex(index: number): ColorScaleLegendItem;
61
+ protected computeLegendItems(colorArray: number[][]): ColorScaleLegendItem[];
64
62
  }