@emerson-eps/color-tables 0.2.31 → 0.2.34
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/ColorSelectorWrapper.js +8 -9
- package/dist/component/ColorSelector/ColorSelectorWrapper.js.map +1 -1
- package/dist/component/Legend/ColorLegend.js +3 -2
- package/dist/component/Legend/ColorLegend.js.map +1 -1
- package/dist/component/Legend/ContinuousLegend.d.ts +3 -5
- package/dist/component/Legend/ContinuousLegend.js +5 -4
- package/dist/component/Legend/ContinuousLegend.js.map +1 -1
- package/dist/component/Legend/DiscreteLegend.d.ts +3 -4
- package/dist/component/Legend/DiscreteLegend.js +4 -3
- package/dist/component/Legend/DiscreteLegend.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -40,21 +40,20 @@ export var ColorSelectorWrapper = function (_a) {
|
|
|
40
40
|
var discreteLegend;
|
|
41
41
|
// return continuous and discrete legend which uses d3 data
|
|
42
42
|
if (!useColorTableColors) {
|
|
43
|
-
continuousLegend = continuosD3ColorData.map(function (val,
|
|
44
|
-
return React.createElement(ColorSelectorComponent, { legendColor: val.color, legendColorName: val.name, useContColorTable: false, uniqueId:
|
|
43
|
+
continuousLegend = continuosD3ColorData.map(function (val, index) {
|
|
44
|
+
return React.createElement(ColorSelectorComponent, { legendColor: val.color, legendColorName: val.name, useContColorTable: false, uniqueId: index, colorScaleData: newColorScaleData, key: index });
|
|
45
45
|
});
|
|
46
|
-
discreteLegend = d3discreteData.map(function (val) {
|
|
47
|
-
return React.createElement(ColorSelectorComponent, { colorsObject: val.colors, legendColorName: val.name, useDiscColorTable: false, colorScaleData: newColorScaleData });
|
|
46
|
+
discreteLegend = d3discreteData.map(function (val, index) {
|
|
47
|
+
return React.createElement(ColorSelectorComponent, { colorsObject: val.colors, legendColorName: val.name, useDiscColorTable: false, colorScaleData: newColorScaleData, key: index });
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
// return continuous and discrete legend which uses colortable data
|
|
51
51
|
else if (useColorTableColors) {
|
|
52
|
-
continuousLegend = continuosColorData.map(function (value,
|
|
53
|
-
return React.createElement(
|
|
54
|
-
React.createElement(ColorSelectorComponent, { colorsObject: value, useContColorTable: true, uniqueId: key, colorScaleData: newColorScaleData }));
|
|
52
|
+
continuousLegend = continuosColorData.map(function (value, index) {
|
|
53
|
+
return React.createElement(ColorSelectorComponent, { colorsObject: value, useContColorTable: true, uniqueId: index, colorScaleData: newColorScaleData, key: index });
|
|
55
54
|
});
|
|
56
|
-
discreteLegend = discreteColorData.map(function (val,
|
|
57
|
-
return React.createElement(ColorSelectorComponent, { colorsObject: discreteColorData[
|
|
55
|
+
discreteLegend = discreteColorData.map(function (val, index) {
|
|
56
|
+
return React.createElement(ColorSelectorComponent, { colorsObject: discreteColorData[index], legendColorName: val.name, useDiscColorTable: true, colorScaleData: newColorScaleData, key: index });
|
|
58
57
|
});
|
|
59
58
|
}
|
|
60
59
|
//}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorSelectorWrapper.js","sourceRoot":"","sources":["../../../src/component/ColorSelector/ColorSelectorWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,WAAW,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAC;AAQhE,IAAM,kBAAkB,GAAoB,EAAE,CAAC;AAC/C,IAAM,oBAAoB,GAAoB,EAAE,CAAC;AACjD,IAAM,iBAAiB,GAAoB,EAAE,CAAC;AAC9C,IAAM,mBAAmB,GAAoB,EAAE,CAAC;AAOhD,4CAA4C;AAC5C,IAAM,wBAAwB,GAAG,WAAW,CAAC,MAAM,CAAC,UAAC,OAAY;IAC7D,OAAO,O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EAAE,QAAQ,EAAC;QAEpG,gBAAgB;QAChB,cAAc,CACb,CACT,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -7,6 +7,7 @@ import { d3ColorScales } from "../Utils/d3ColorScale";
|
|
|
7
7
|
// Todo: Adapt it for other layers too
|
|
8
8
|
export var ColorLegend = function (_a) {
|
|
9
9
|
var position = _a.position, horizontal = _a.horizontal, colorTables = _a.colorTables, min = _a.min, max = _a.max, dataObjectName = _a.dataObjectName, colorName = _a.colorName, discreteData = _a.discreteData, getColorMapname = _a.getColorMapname;
|
|
10
|
+
var generateUniqueId = Math.ceil((Math.random() * 9999)).toString();
|
|
10
11
|
var divRef = useRef(null);
|
|
11
12
|
var _b = React.useState(false), isOpen = _b[0], setIsOpen = _b[1];
|
|
12
13
|
var toggleColorSelector = useCallback(function () {
|
|
@@ -38,8 +39,8 @@ export var ColorLegend = function (_a) {
|
|
|
38
39
|
}, []);
|
|
39
40
|
return (React.createElement("div", null,
|
|
40
41
|
React.createElement("div", { ref: divRef, onClick: toggleColorSelector },
|
|
41
|
-
isCont == true && (React.createElement(ContinuousLegend, { min: min, max: max, dataObjectName: dataObjectName, position: position, colorName: colorName,
|
|
42
|
-
isCont == false && (React.createElement(DiscreteColorLegend, { discreteData: discreteData, dataObjectName: dataObjectName, position: position, colorName: colorName,
|
|
42
|
+
isCont == true && (React.createElement(ContinuousLegend, { min: min, max: max, dataObjectName: dataObjectName, position: position, colorName: colorName, horizontal: horizontal, updateLegend: updateLegend, id: generateUniqueId })),
|
|
43
|
+
isCont == false && (React.createElement(DiscreteColorLegend, { discreteData: discreteData, dataObjectName: dataObjectName, position: position, colorName: colorName, horizontal: horizontal, updateLegend: updateLegend, id: generateUniqueId }))),
|
|
43
44
|
React.createElement("div", null, isOpen && (React.createElement(ColorSelectorAccordion, { newColorScaleData: getSelectedColorScale, isHorizontal: horizontal })))));
|
|
44
45
|
};
|
|
45
46
|
//# sourceMappingURL=ColorLegend.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorLegend.js","sourceRoot":"","sources":["../../../src/component/Legend/ColorLegend.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACjF,OAAO,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAcpD,sCAAsC;AACtC,MAAM,CAAC,IAAM,WAAW,GAA+B,UAAC,EAUrC;QATf,QAAQ,cAAA,EACR,UAAU,gBAAA,EACV,WAAW,iBAAA,EACX,GAAG,SAAA,EACH,GAAG,SAAA,EACH,cAAc,oBAAA,EACd,SAAS,eAAA,EACT,YAAY,kBAAA,EACZ,eAAe,qBAAA;
|
|
1
|
+
{"version":3,"file":"ColorLegend.js","sourceRoot":"","sources":["../../../src/component/Legend/ColorLegend.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACjF,OAAO,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAcpD,sCAAsC;AACtC,MAAM,CAAC,IAAM,WAAW,GAA+B,UAAC,EAUrC;QATf,QAAQ,cAAA,EACR,UAAU,gBAAA,EACV,WAAW,iBAAA,EACX,GAAG,SAAA,EACH,GAAG,SAAA,EACH,cAAc,oBAAA,EACd,SAAS,eAAA,EACT,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|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
declare type legendProps = {
|
|
2
|
+
declare type continuousLegendProps = {
|
|
4
3
|
min: number;
|
|
5
4
|
max: number;
|
|
6
5
|
dataObjectName: string;
|
|
7
6
|
position?: number[] | null;
|
|
8
7
|
colorName: string;
|
|
9
|
-
colorTables: colorTablesArray | string;
|
|
10
8
|
horizontal?: boolean | null;
|
|
11
9
|
updateLegend?: any;
|
|
12
|
-
|
|
10
|
+
id?: string;
|
|
13
11
|
};
|
|
14
|
-
export declare const ContinuousLegend: React.FC<
|
|
12
|
+
export declare const ContinuousLegend: React.FC<continuousLegendProps>;
|
|
15
13
|
export {};
|
|
@@ -43,7 +43,8 @@ import { color } from "d3-color";
|
|
|
43
43
|
import { range } from "d3";
|
|
44
44
|
import colorTables from "../color-tables.json";
|
|
45
45
|
export var ContinuousLegend = function (_a) {
|
|
46
|
-
var min = _a.min, max = _a.max, dataObjectName = _a.dataObjectName, position = _a.position, colorName = _a.colorName, horizontal = _a.horizontal, updateLegend = _a.updateLegend,
|
|
46
|
+
var min = _a.min, max = _a.max, dataObjectName = _a.dataObjectName, position = _a.position, colorName = _a.colorName, horizontal = _a.horizontal, updateLegend = _a.updateLegend, id = _a.id;
|
|
47
|
+
var generateUniqueId = Math.ceil((Math.random() * 9999)).toString();
|
|
47
48
|
var divRef = useRef(null);
|
|
48
49
|
React.useEffect(function () {
|
|
49
50
|
if (divRef.current) {
|
|
@@ -129,7 +130,7 @@ export var ContinuousLegend = function (_a) {
|
|
|
129
130
|
svgLegend
|
|
130
131
|
.attr("width", horizontal ? "190" : "77")
|
|
131
132
|
.attr("height", horizontal ? "70" : "173");
|
|
132
|
-
currentIndex = "linear-gradient-" +
|
|
133
|
+
currentIndex = "linear-gradient-" + id + "0";
|
|
133
134
|
linearGradient = defs
|
|
134
135
|
.append("linearGradient")
|
|
135
136
|
.attr("id", currentIndex)
|
|
@@ -193,12 +194,12 @@ export var ContinuousLegend = function (_a) {
|
|
|
193
194
|
});
|
|
194
195
|
}
|
|
195
196
|
return (React.createElement("div", { style: {
|
|
196
|
-
// position: "absolute",
|
|
197
197
|
right: position ? position[0] : " ",
|
|
198
198
|
top: position ? position[1] : " ",
|
|
199
199
|
zIndex: 999,
|
|
200
200
|
} },
|
|
201
|
-
React.createElement("div", { id:
|
|
201
|
+
React.createElement("div", { id: id ? id :
|
|
202
|
+
"cont-legend - ".concat(generateUniqueId), ref: divRef })));
|
|
202
203
|
};
|
|
203
204
|
ContinuousLegend.defaultProps = {
|
|
204
205
|
position: [5, 10],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContinuousLegend.js","sourceRoot":"","sources":["../../../src/component/Legend/ContinuousLegend.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"ContinuousLegend.js","sourceRoot":"","sources":["../../../src/component/Legend/ContinuousLegend.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACjF,OAAO,EAAE,aAAa,EA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QAAQ,CAAC,EAAE,CAAC;6BACZ,UAAU,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;wBAEjC,SAAS;6BACJ,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC;6BACrB,MAAM,CAAC,GAAG,CAAC;6BACX,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,oBAAoB,CAAC;6BAC1E,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC;6BAC1B,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC;6BAC3B,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,eAAe,CAAC;6BACtD,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;;;;wBAE7B,OAAO,CAAC,KAAK,CAAC,OAAK,CAAC,CAAC;;;;;;KAE5B;IACD,OAAO,CACH,6BACI,KAAK,EAAE;YACH,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;YACnC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;YACjC,MAAM,EAAE,GAAG;SACd;QAED,6BAAK,EAAE,EACH,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;gBACT,wBAAiB,gBAAgB,CAAE,EAAE,GAAG,EAAE,MAAM,GAC9C,CACJ,CACT,CAAC;AACN,CAAC,CAAC;AAEF,gBAAgB,CAAC,YAAY,GAAG;IAC5B,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;CACpB,CAAC"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
declare type colorLegendProps = {
|
|
2
|
+
declare type discreteLegendProps = {
|
|
4
3
|
discreteData: {
|
|
5
4
|
objects: Record<string, [number[], number]>;
|
|
6
5
|
};
|
|
7
6
|
dataObjectName: string;
|
|
8
7
|
position?: number[] | null;
|
|
9
8
|
colorName: string;
|
|
10
|
-
colorTables: colorTablesArray | string;
|
|
11
9
|
horizontal?: boolean | null;
|
|
12
10
|
updateLegend?: any;
|
|
11
|
+
id?: string;
|
|
13
12
|
};
|
|
14
|
-
export declare const DiscreteColorLegend: React.FC<
|
|
13
|
+
export declare const DiscreteColorLegend: React.FC<discreteLegendProps>;
|
|
15
14
|
export declare function RGBToHex(rgb: number[]): string;
|
|
16
15
|
export {};
|
|
@@ -42,7 +42,8 @@ import { colorsArray } from "../Utils/legendCommonFunction";
|
|
|
42
42
|
import { d3ColorScales } from "../Utils/d3ColorScale";
|
|
43
43
|
import colorTables from "../color-tables.json";
|
|
44
44
|
export var DiscreteColorLegend = function (_a) {
|
|
45
|
-
var discreteData = _a.discreteData, dataObjectName = _a.dataObjectName, position = _a.position, colorName = _a.colorName, horizontal = _a.horizontal, updateLegend = _a.updateLegend;
|
|
45
|
+
var discreteData = _a.discreteData, dataObjectName = _a.dataObjectName, position = _a.position, colorName = _a.colorName, horizontal = _a.horizontal, updateLegend = _a.updateLegend, id = _a.id;
|
|
46
|
+
var generateUniqueId = Math.ceil((Math.random() * 9999)).toString();
|
|
46
47
|
var divRef = useRef(null);
|
|
47
48
|
var itemName = [];
|
|
48
49
|
var itemColor = [];
|
|
@@ -180,14 +181,14 @@ export var DiscreteColorLegend = function (_a) {
|
|
|
180
181
|
});
|
|
181
182
|
}
|
|
182
183
|
return (React.createElement("div", { style: {
|
|
183
|
-
// position: "absolute",
|
|
184
184
|
right: position ? position[0] : " ",
|
|
185
185
|
top: position ? position[1] : " ",
|
|
186
186
|
backgroundColor: "#ffffffcc",
|
|
187
187
|
borderRadius: "5px",
|
|
188
188
|
zIndex: 999,
|
|
189
189
|
} },
|
|
190
|
-
React.createElement("div", { id:
|
|
190
|
+
React.createElement("div", { id: id ? id :
|
|
191
|
+
"disc-legend - ".concat(generateUniqueId), ref: divRef })));
|
|
191
192
|
};
|
|
192
193
|
export function RGBToHex(rgb) {
|
|
193
194
|
var r = rgb[1].toString(16), g = rgb[2].toString(16), b = rgb[3].toString(16);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiscreteLegend.js","sourceRoot":"","sources":["../../../src/component/Legend/DiscreteLegend.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,kBAAkB,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"DiscreteLegend.js","sourceRoot":"","sources":["../../../src/component/Legend/DiscreteLegend.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,kBAAkB,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,WAAW,MAAM,sBAAsB,CAAC;AAiB/C,MAAM,CAAC,IAAM,mBAAmB,GAAkC,UAAC,EAQ7C;QAPlB,YAAY,kBAAA,EACZ,cAAc,oBAAA,EACd,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,UAAU,gBAAA,EACV,YAAY,kBAAA,EACZ,EAAE,QAAA;IAEF,IAAM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC,C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@
|
|
|
1
1
|
import { ColorSelectorAccordion } from './component/ColorSelector/ColorSelectorAccordion';
|
|
2
2
|
import { ColorLegend } from './component/Legend/ColorLegend';
|
|
3
|
-
import { colorsArray, rgbValues, RGBToHex, createColorMapFunction, getColors, getRgbData } from './component/Utils/legendCommonFunction';
|
|
3
|
+
import { colorsArray, rgbValues, RGBToHex, createColorMapFunction, getColors, getRgbData, RGBToHexValue } from './component/Utils/legendCommonFunction';
|
|
4
4
|
import { d3ColorScales } from './component/Utils/d3ColorScale';
|
|
5
5
|
import { colorTablesObj, colorTablesArray } from './component/colorTableTypes';
|
|
6
6
|
import { ContinuousLegend } from './component/Legend/ContinuousLegend';
|
|
7
7
|
import { DiscreteColorLegend } from './component/Legend/DiscreteLegend';
|
|
8
8
|
import * as colorTables from './component/color-tables.json';
|
|
9
|
-
export { ColorSelectorAccordion, ContinuousLegend, DiscreteColorLegend, ColorLegend, colorsArray, rgbValues, RGBToHex, createColorMapFunction, getColors, getRgbData, d3ColorScales, colorTablesObj, colorTablesArray, colorTables, };
|
|
9
|
+
export { ColorSelectorAccordion, ContinuousLegend, DiscreteColorLegend, ColorLegend, colorsArray, rgbValues, RGBToHex, createColorMapFunction, getColors, getRgbData, RGBToHexValue, d3ColorScales, colorTablesObj, colorTablesArray, colorTables, };
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ColorSelectorAccordion } from './component/ColorSelector/ColorSelectorAccordion';
|
|
2
2
|
import { ColorLegend } from './component/Legend/ColorLegend';
|
|
3
|
-
import { colorsArray, rgbValues, RGBToHex, createColorMapFunction, getColors, getRgbData } from './component/Utils/legendCommonFunction';
|
|
3
|
+
import { colorsArray, rgbValues, RGBToHex, createColorMapFunction, getColors, getRgbData, RGBToHexValue } from './component/Utils/legendCommonFunction';
|
|
4
4
|
import { d3ColorScales } from './component/Utils/d3ColorScale';
|
|
5
5
|
import { ContinuousLegend } from './component/Legend/ContinuousLegend';
|
|
6
6
|
import { DiscreteColorLegend } from './component/Legend/DiscreteLegend';
|
|
7
7
|
import * as colorTables from './component/color-tables.json';
|
|
8
|
-
export { ColorSelectorAccordion, ContinuousLegend, DiscreteColorLegend, ColorLegend, colorsArray, rgbValues, RGBToHex, createColorMapFunction, getColors, getRgbData, d3ColorScales, colorTables, };
|
|
8
|
+
export { ColorSelectorAccordion, ContinuousLegend, DiscreteColorLegend, ColorLegend, colorsArray, rgbValues, RGBToHex, createColorMapFunction, getColors, getRgbData, RGBToHexValue, d3ColorScales, colorTables, };
|
|
9
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,sBAAsB,EAAE,MAAM,kDAAkD,CAAC;AAC1F,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,sBAAsB,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kDAAkD,CAAC;AAC1F,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,sBAAsB,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACxJ,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,WAAW,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EACH,sBAAsB,EACtB,gBAAgB,EAChB,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,SAAS,EACT,QAAQ,EACR,sBAAsB,EACtB,SAAS,EACT,UAAU,EACV,aAAa,EACb,aAAa,EAGb,WAAW,GACd,CAAC"}
|