@emerson-eps/color-tables 0.2.6 → 0.2.7

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.
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { colorTablesArray } from "../ColorTableTypes";
3
- declare type legendProps = {
3
+ interface legendProps {
4
4
  position: number[];
5
5
  colorsObject?: any;
6
6
  legendColor?: any;
@@ -10,7 +10,7 @@ declare type legendProps = {
10
10
  valueIndex?: any;
11
11
  colorScaleData: any;
12
12
  getColorMapname?: any | null;
13
- };
13
+ }
14
14
  export declare const ColorSelectorComponent: React.FC<legendProps>;
15
15
  export declare function colorTableData(colorName: string, colorTables: colorTablesArray): [number, number, number, number][];
16
16
  export {};
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
- declare type legendProps = {
2
+ interface legendProps {
3
3
  useColorTableColors: boolean;
4
4
  useD3Colors: boolean;
5
5
  colorScaleObject: any;
6
- };
6
+ }
7
7
  export declare const ColorSelectorWrapper: React.FC<legendProps>;
8
8
  export {};
@@ -1,6 +1,6 @@
1
- export declare type colorTablesObj = {
1
+ export interface colorTablesObj {
2
2
  name: string;
3
3
  discrete: boolean;
4
4
  colors: [number, number, number, number][];
5
- };
5
+ }
6
6
  export declare type colorTablesArray = Array<colorTablesObj>;
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- declare type ColorLegendProps = {
2
+ interface ColorLegendProps {
3
3
  colorTables: any;
4
4
  min: number;
5
5
  max: number;
@@ -11,6 +11,6 @@ declare type ColorLegendProps = {
11
11
  objects: Record<string, [number[], number]>;
12
12
  };
13
13
  getColorMapname?: any;
14
- };
14
+ }
15
15
  declare const ColorLegend: React.FC<ColorLegendProps>;
16
16
  export default ColorLegend;
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { colorTablesArray } from "../ColorTableTypes";
3
- declare type legendProps = {
3
+ interface legendProps {
4
4
  min: number;
5
5
  max: number;
6
6
  dataObjectName: string;
@@ -9,6 +9,6 @@ declare type legendProps = {
9
9
  colorTables: colorTablesArray | string;
10
10
  horizontal?: boolean | null;
11
11
  updateLegend?: any;
12
- };
12
+ }
13
13
  export declare const ContinuousLegend: React.FC<legendProps>;
14
14
  export {};
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { colorTablesArray } from "../ColorTableTypes";
3
- declare type colorLegendProps = {
3
+ interface colorLegendProps {
4
4
  discreteData: {
5
5
  objects: Record<string, [number[], number]>;
6
6
  };
@@ -10,7 +10,7 @@ declare type colorLegendProps = {
10
10
  colorTables: colorTablesArray | string;
11
11
  horizontal?: boolean | null;
12
12
  updateLegend?: any;
13
- };
13
+ }
14
14
  export declare const DiscreteColorLegend: React.FC<colorLegendProps>;
15
15
  export declare function colorTableData(colorName: string, colorTables: colorTablesArray): [number, number, number, number][];
16
16
  export declare function RGBToHex(rgb: number[]): string;
@@ -1,5 +1,5 @@
1
- declare type ItemColor = {
1
+ interface ItemColor {
2
2
  color: any;
3
- };
3
+ }
4
4
  export default function discreteLegendUtil(itemColor: ItemColor[], isSelectorLegend?: boolean, horizontal?: any): any;
5
5
  export {};
@@ -1,3 +1,4 @@
1
+ ;
1
2
  // eslint-disable-next-line
2
3
  export default function discreteLegendUtil(itemColor, isSelectorLegend, horizontal) {
3
4
  // var cellWidth = 22;
@@ -1 +1 @@
1
- {"version":3,"file":"discreteLegend.js","sourceRoot":"","sources":["../../../src/component/Utils/discreteLegend.ts"],"names":[],"mappings":"AAIA,2BAA2B;AAC3B,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,SAAsB,EAAE,gBAA0B,EAAE,UAAgB;IAC3G,sBAAsB;IACtB,uBAAuB;IAEvB,0BAA0B;IAC1B,sBAAsB;IACtB,uBAAuB;IACvB,IAAI;IAEJ,IAAM,YAAY,GAAgB,EAAE,CAAC;IAErC,2BAA2B;IAC3B,SAAS,MAAM,CAAC,CAAM;QAClB,SAAS,UAAU;YACf,yBAAyB;YACzB,oC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ACjC,cAAc;YACd,mCAAmC;YACnC,kCAAkC;YAClC,0BAA0B;YAC1B,sCAAsC;YACtC,oCAAoC;YACpC,iEAAiE;YACjE,oCAAoC;YACpC,iCAAiC;YACjC,aAAa;YAEb,4CAA4C;YAC5C,yCAAyC;YACzC,uBAAuB;YACvB,8DAA8D;YAC9D,uBAAuB;YACvB,uEAAuE;YACvE,4CAA4C;YAC5C,iBAAiB;YACjB,YAAY;YACZ,SAAS;YACT,IAAI;QACR,CAAC;QAED,8BAA8B;QAC9B,2BAA2B;QAC3B,4CAA4C;QAC5C,mCAAmC;QACnC,0BAA0B;QAC1B,eAAe;QACf,mBAAmB;QACnB,oCAAoC;QACpC,IAAI;QAEJ,UAAU,EAAE,CAAC;IACjB,CAAC;IACD,2BAA2B;IAC3B,MAAM,CAAC,UAAU,GAAG,UAAU,QAAa;QACvC,2BAA2B;QAC3B,IAAI,KAAK,GAAQ,EAAE,CAAC;QACpB,KAAK,GAAG,QAAQ,CAAC;QAEjB,KAAK,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,UAAU,EAAO;YACpC,IAAM,UAAU,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;YACnD,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC;IAEF,OAAO,MAAM,CAAC;AAClB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emerson-eps/color-tables",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "Standard library of color tables for geological domain",
5
5
  "release": {
6
6
  "branches": [
@@ -8,7 +8,7 @@ import { colorTablesArray, colorTablesObj } from "../ColorTableTypes";
8
8
  import discreteLegendUtil from "../Utils/discreteLegend";
9
9
  import { color } from "d3-color";
10
10
 
11
- declare type legendProps = {
11
+ interface legendProps {
12
12
  position: number[];
13
13
  colorsObject?: any;
14
14
  legendColor?: any;
@@ -20,7 +20,7 @@ declare type legendProps = {
20
20
  getColorMapname?: any | null;
21
21
  }
22
22
 
23
- declare type ItemColor = {
23
+ interface ItemColor {
24
24
  color: string;
25
25
  offset?: number;
26
26
  }
@@ -9,7 +9,7 @@ const continuosD3ColorData: any = [];
9
9
  const discreteColorData: any = [];
10
10
  const discreteD3ColorData: any = [];
11
11
 
12
- declare type legendProps = {
12
+ interface legendProps {
13
13
  useColorTableColors: boolean,
14
14
  useD3Colors: boolean,
15
15
  colorScaleObject: any
@@ -1,4 +1,4 @@
1
- export declare type colorTablesObj = {
1
+ export interface colorTablesObj {
2
2
  name: string;
3
3
  discrete: boolean;
4
4
  colors: [number, number, number, number][];
@@ -4,7 +4,7 @@ import { ContinuousLegend } from "./ContinuousLegend";
4
4
  import {useCallback} from "react";
5
5
  import { ColorSelectorAccordion } from "../ColorSelector/ColorSelectorAccordion";
6
6
 
7
- declare type ColorLegendProps = {
7
+ interface ColorLegendProps {
8
8
  colorTables: any;
9
9
  min: number;
10
10
  max: number;
@@ -4,7 +4,7 @@ import { RGBToHex, colorsArray } from "../Utils/continousLegend";
4
4
  import { select, scaleLinear, scaleSequential, axisBottom, axisRight } from "d3";
5
5
  import { colorTablesArray } from "../ColorTableTypes";
6
6
 
7
- declare type legendProps = {
7
+ interface legendProps {
8
8
  min: number;
9
9
  max: number;
10
10
  dataObjectName: string;
@@ -15,7 +15,7 @@ declare type legendProps = {
15
15
  updateLegend?: any;
16
16
  }
17
17
 
18
- declare type ItemColor = {
18
+ interface ItemColor {
19
19
  color: string;
20
20
  offset: number;
21
21
  }
@@ -4,11 +4,11 @@ import discreteLegendUtil from "../Utils/discreteLegend";
4
4
  import { select, scaleOrdinal } from "d3";
5
5
  import { colorTablesArray, colorTablesObj } from "../ColorTableTypes";
6
6
 
7
- declare type ItemColor = {
7
+ interface ItemColor {
8
8
  color: string;
9
9
  }
10
10
 
11
- declare type colorLegendProps = {
11
+ interface colorLegendProps {
12
12
  discreteData: { objects: Record<string, [number[], number]> };
13
13
  dataObjectName: string;
14
14
  position?: number[] | null;
@@ -1,4 +1,4 @@
1
- declare type ItemColor = {
1
+ interface ItemColor {
2
2
  color: any;
3
3
  };
4
4