@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.
- package/dist/component/ColorSelector/ColorSelectorComponent.d.ts +2 -2
- package/dist/component/ColorSelector/ColorSelectorWrapper.d.ts +2 -2
- package/dist/component/ColorTableTypes.d.ts +2 -2
- package/dist/component/Legend/ColorLegend.d.ts +2 -2
- package/dist/component/Legend/ContinuousLegend.d.ts +2 -2
- package/dist/component/Legend/DiscreteLegend.d.ts +2 -2
- package/dist/component/Utils/discreteLegend.d.ts +2 -2
- package/dist/component/Utils/discreteLegend.js +1 -0
- package/dist/component/Utils/discreteLegend.js.map +1 -1
- package/package.json +1 -1
- package/src/component/ColorSelector/ColorSelectorComponent.tsx +2 -2
- package/src/component/ColorSelector/ColorSelectorWrapper.tsx +1 -1
- package/src/component/ColorTableTypes.ts +1 -1
- package/src/component/Legend/ColorLegend.tsx +1 -1
- package/src/component/Legend/ContinuousLegend.tsx +2 -2
- package/src/component/Legend/DiscreteLegend.tsx +2 -2
- package/src/component/Utils/discreteLegend.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { colorTablesArray } from "../ColorTableTypes";
|
|
3
|
-
|
|
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,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discreteLegend.js","sourceRoot":"","sources":["../../../src/component/Utils/discreteLegend.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"discreteLegend.js","sourceRoot":"","sources":["../../../src/component/Utils/discreteLegend.ts"],"names":[],"mappings":"AAEC,CAAC;AAEF,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,oCAAoC;YACpC,yBAAyB;YACzB,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC;iBACvB,IAAI,CAAC,SAAS,CAAC;iBACf,KAAK,EAAE;iBACP,MAAM,CAAC,GAAG,CAAC;iBACX,MAAM,CAAC,MAAM,CAAC;iBACd,IAAI,CAAC,OAAO,EAAE,WAAW,CAAC;iBAC1B,KAAK,CAAC,QAAQ,EAAE,SAAS,CAAC;iBAC1B,KAAK,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;YACpC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC;iBACd,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;iBACjB,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;iBAChB,KAAK,CAAC,MAAM,EAAE,UAAU,CAA0B;gBAC/C,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;YACtB,CAAC,CAAC,CAAC;YACP,IAAI,UAAU,IAAI,CAAC,gBAAgB,EAAE;gBACjC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC;qBACd,IAAI,CAAC,GAAG,EAAE,UAAU,CAAS,EAAE,CAAS;oBACrC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;oBACd,OAAO,CAAC,CAAC;gBACb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QAClC,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC;IAEF,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
package/package.json
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
23
|
+
interface ItemColor {
|
|
24
24
|
color: string;
|
|
25
25
|
offset?: number;
|
|
26
26
|
}
|
|
@@ -4,7 +4,7 @@ import { ContinuousLegend } from "./ContinuousLegend";
|
|
|
4
4
|
import {useCallback} from "react";
|
|
5
5
|
import { ColorSelectorAccordion } from "../ColorSelector/ColorSelectorAccordion";
|
|
6
6
|
|
|
7
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
7
|
+
interface ItemColor {
|
|
8
8
|
color: string;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
interface colorLegendProps {
|
|
12
12
|
discreteData: { objects: Record<string, [number[], number]> };
|
|
13
13
|
dataObjectName: string;
|
|
14
14
|
position?: number[] | null;
|