@emerson-eps/color-tables 0.2.7 → 0.2.8
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 +0 -1
- package/dist/component/Utils/discreteLegend.js.map +1 -1
- package/dist/index.d.ts +8 -5
- package/dist/index.js +7 -4
- package/dist/index.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
- package/src/index.ts +22 -5
- package/tsconfig.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { colorTablesArray } from "../ColorTableTypes";
|
|
3
|
-
|
|
3
|
+
declare type legendProps = {
|
|
4
4
|
position: number[];
|
|
5
5
|
colorsObject?: any;
|
|
6
6
|
legendColor?: any;
|
|
@@ -10,7 +10,7 @@ interface 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
|
+
declare type ColorLegendProps = {
|
|
3
3
|
colorTables: any;
|
|
4
4
|
min: number;
|
|
5
5
|
max: number;
|
|
@@ -11,6 +11,6 @@ interface 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
|
+
declare type legendProps = {
|
|
4
4
|
min: number;
|
|
5
5
|
max: number;
|
|
6
6
|
dataObjectName: string;
|
|
@@ -9,6 +9,6 @@ interface 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
|
+
declare type colorLegendProps = {
|
|
4
4
|
discreteData: {
|
|
5
5
|
objects: Record<string, [number[], number]>;
|
|
6
6
|
};
|
|
@@ -10,7 +10,7 @@ interface 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":"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,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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,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/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { ContinuousLegend } from './component/Legend/ContinuousLegend';
|
|
2
|
+
import { colorsArray, rgbValues, RGBToHex } from './component/Utils/continousLegend';
|
|
3
|
+
import { colorTableData, DiscreteColorLegend } from './component/Legend/DiscreteLegend';
|
|
4
|
+
import { colorTablesObj, colorTablesArray } from './component/ColorTableTypes';
|
|
5
|
+
import { ColorSelectorAccordion } from './component/ColorSelector/ColorSelectorAccordion';
|
|
6
|
+
import { ColorSelectorComponent } from './component/ColorSelector/ColorSelectorComponent';
|
|
7
|
+
import { ColorSelectorWrapper } from './component/ColorSelector/ColorSelectorWrapper';
|
|
5
8
|
import * as colorTables from './component/color-tables.json';
|
|
6
|
-
export
|
|
9
|
+
export { ContinuousLegend, colorsArray, rgbValues, RGBToHex, colorTableData, DiscreteColorLegend, colorTablesObj, colorTablesArray, ColorSelectorAccordion, ColorSelectorComponent, ColorSelectorWrapper, colorTables, };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { ContinuousLegend } from './component/Legend/ContinuousLegend';
|
|
2
|
+
import { colorsArray, rgbValues, RGBToHex } from './component/Utils/continousLegend';
|
|
3
|
+
import { colorTableData, DiscreteColorLegend } from './component/Legend/DiscreteLegend';
|
|
4
|
+
import { ColorSelectorAccordion } from './component/ColorSelector/ColorSelectorAccordion';
|
|
5
|
+
import { ColorSelectorComponent } from './component/ColorSelector/ColorSelectorComponent';
|
|
6
|
+
import { ColorSelectorWrapper } from './component/ColorSelector/ColorSelectorWrapper';
|
|
4
7
|
import * as colorTables from './component/color-tables.json';
|
|
5
|
-
export
|
|
8
|
+
export { ContinuousLegend, colorsArray, rgbValues, RGBToHex, colorTableData, DiscreteColorLegend, ColorSelectorAccordion, ColorSelectorComponent, ColorSelectorWrapper, colorTables, };
|
|
6
9
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAC,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAExF,OAAO,KAAK,WAAW,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAC,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAExF,OAAO,EAAE,sBAAsB,EAAE,MAAM,kDAAkD,CAAC;AAC1F,OAAO,EAAE,sBAAsB,EAAE,MAAM,kDAAkD,CAAC;AAC1F,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AACtF,OAAO,KAAK,WAAW,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EACH,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,QAAQ,EACR,cAAc,EACd,mBAAmB,EAGnB,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,WAAW,GACd,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
|
+
declare type legendProps = {
|
|
12
12
|
position: number[];
|
|
13
13
|
colorsObject?: any;
|
|
14
14
|
legendColor?: any;
|
|
@@ -20,7 +20,7 @@ interface legendProps {
|
|
|
20
20
|
getColorMapname?: any | null;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
declare type 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
|
+
declare type 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
|
+
declare type legendProps = {
|
|
8
8
|
min: number;
|
|
9
9
|
max: number;
|
|
10
10
|
dataObjectName: string;
|
|
@@ -15,7 +15,7 @@ interface legendProps {
|
|
|
15
15
|
updateLegend?: any;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
declare type 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
|
+
declare type ItemColor = {
|
|
8
8
|
color: string;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
declare type colorLegendProps = {
|
|
12
12
|
discreteData: { objects: Record<string, [number[], number]> };
|
|
13
13
|
dataObjectName: string;
|
|
14
14
|
position?: number[] | null;
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { ContinuousLegend } from './component/Legend/ContinuousLegend';
|
|
2
|
+
import { colorsArray, rgbValues, RGBToHex} from './component/Utils/continousLegend';
|
|
3
|
+
import { colorTableData, DiscreteColorLegend } from './component/Legend/DiscreteLegend';
|
|
4
|
+
import { colorTablesObj, colorTablesArray } from './component/ColorTableTypes';
|
|
5
|
+
import { ColorSelectorAccordion } from './component/ColorSelector/ColorSelectorAccordion';
|
|
6
|
+
import { ColorSelectorComponent } from './component/ColorSelector/ColorSelectorComponent';
|
|
7
|
+
import { ColorSelectorWrapper } from './component/ColorSelector/ColorSelectorWrapper';
|
|
5
8
|
import * as colorTables from './component/color-tables.json';
|
|
6
|
-
|
|
9
|
+
|
|
10
|
+
export {
|
|
11
|
+
ContinuousLegend,
|
|
12
|
+
colorsArray,
|
|
13
|
+
rgbValues,
|
|
14
|
+
RGBToHex,
|
|
15
|
+
colorTableData,
|
|
16
|
+
DiscreteColorLegend,
|
|
17
|
+
colorTablesObj,
|
|
18
|
+
colorTablesArray,
|
|
19
|
+
ColorSelectorAccordion,
|
|
20
|
+
ColorSelectorComponent,
|
|
21
|
+
ColorSelectorWrapper,
|
|
22
|
+
colorTables,
|
|
23
|
+
};
|
package/tsconfig.json
CHANGED