@emerson-eps/color-tables 0.4.100 → 1.0.1
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/BreakPoint/Canvas.d.ts +3 -3
- package/dist/component/BreakPoint/Canvas.js +10 -21
- package/dist/component/BreakPoint/Canvas.js.map +1 -1
- package/dist/component/BreakPoint/ColorScale.d.ts +2 -3
- package/dist/component/BreakPoint/ColorScale.js +19 -20
- package/dist/component/BreakPoint/ColorScale.js.map +1 -1
- package/dist/component/BreakPoint/Legend.d.ts +2 -3
- package/dist/component/BreakPoint/Legend.js +31 -37
- package/dist/component/BreakPoint/Legend.js.map +1 -1
- package/dist/component/BreakPoint/Modal.d.ts +6 -3
- package/dist/component/BreakPoint/Modal.js +17 -21
- package/dist/component/BreakPoint/Modal.js.map +1 -1
- package/dist/component/BreakPoint/index.d.ts +4 -0
- package/dist/component/BreakPoint/index.js +6 -0
- package/dist/component/BreakPoint/index.js.map +1 -0
- package/dist/component/ColorSelector/BreakPointModule.d.ts +3 -4
- package/dist/component/ColorSelector/BreakPointModule.js +99 -140
- package/dist/component/ColorSelector/BreakPointModule.js.map +1 -1
- package/dist/component/ColorSelector/ColorSelectorAccordion.js +55 -60
- package/dist/component/ColorSelector/ColorSelectorAccordion.js.map +1 -1
- package/dist/component/ColorSelector/ColorSelectorComponent.d.ts +2 -3
- package/dist/component/ColorSelector/ColorSelectorComponent.js +83 -86
- package/dist/component/ColorSelector/ColorSelectorComponent.js.map +1 -1
- package/dist/component/ColorSelector/ColorSelectorWrapper.d.ts +12 -5
- package/dist/component/ColorSelector/ColorSelectorWrapper.js +41 -51
- package/dist/component/ColorSelector/ColorSelectorWrapper.js.map +1 -1
- package/dist/component/ColorSelector/index.d.ts +4 -0
- package/dist/component/ColorSelector/index.js +6 -0
- package/dist/component/ColorSelector/index.js.map +1 -0
- package/dist/component/Legend/ColorLegend.d.ts +2 -2
- package/dist/component/Legend/ColorLegend.js +38 -39
- package/dist/component/Legend/ColorLegend.js.map +1 -1
- package/dist/component/Legend/ColorLegend.stories.js +20 -31
- package/dist/component/Legend/ColorLegend.stories.js.map +1 -1
- package/dist/component/Legend/ContinuousLegend.d.ts +2 -2
- package/dist/component/Legend/ContinuousLegend.js +230 -276
- package/dist/component/Legend/ContinuousLegend.js.map +1 -1
- package/dist/component/Legend/ContinuousLegend.stories.js +13 -24
- package/dist/component/Legend/ContinuousLegend.stories.js.map +1 -1
- package/dist/component/Legend/DiscreteLegend.d.ts +2 -2
- package/dist/component/Legend/DiscreteLegend.js +130 -180
- package/dist/component/Legend/DiscreteLegend.js.map +1 -1
- package/dist/component/Legend/DiscreteLegend.stories.js +15 -26
- package/dist/component/Legend/DiscreteLegend.stories.js.map +1 -1
- package/dist/component/Legend/constants.js +1 -1
- package/dist/component/Legend/constants.js.map +1 -1
- package/dist/component/Legend/index.d.ts +3 -0
- package/dist/component/Legend/index.js +4 -0
- package/dist/component/Legend/index.js.map +1 -0
- package/dist/component/Utils/d3ColorScale.js +1 -1
- package/dist/component/Utils/d3ColorScale.js.map +1 -1
- package/dist/component/Utils/discreteLegend.d.ts +2 -3
- package/dist/component/Utils/discreteLegend.js.map +1 -1
- package/dist/component/Utils/index.d.ts +2 -0
- package/dist/component/Utils/index.js +4 -0
- package/dist/component/Utils/index.js.map +1 -0
- package/dist/component/Utils/legendCommonFunction.d.ts +7 -7
- package/dist/component/Utils/legendCommonFunction.js +128 -139
- package/dist/component/Utils/legendCommonFunction.js.map +1 -1
- package/dist/component/Utils/legendCommonFunction.stories.js +14 -25
- package/dist/component/Utils/legendCommonFunction.stories.js.map +1 -1
- package/dist/component/colorTableTypes.d.ts +10 -2
- package/dist/component/index.d.ts +6 -0
- package/dist/component/index.js +7 -0
- package/dist/component/index.js.map +1 -0
- package/dist/index.d.ts +1 -9
- package/dist/index.js +1 -8
- package/dist/index.js.map +1 -1
- package/dist/stories/ColorLegends/ContinousLegends/MD.stories.d.ts +7 -0
- package/dist/stories/ColorLegends/ContinousLegends/MD.stories.js +34 -0
- package/dist/stories/ColorLegends/ContinousLegends/MD.stories.js.map +1 -0
- package/dist/stories/ColorLegends/ContinousLegends/NTG.stories.d.ts +7 -0
- package/dist/stories/ColorLegends/ContinousLegends/NTG.stories.js +34 -0
- package/dist/stories/ColorLegends/ContinousLegends/NTG.stories.js.map +1 -0
- package/dist/stories/ColorLegends/ContinousLegends/PermTot.stories.d.ts +7 -0
- package/dist/stories/ColorLegends/ContinousLegends/PermTot.stories.js +34 -0
- package/dist/stories/ColorLegends/ContinousLegends/PermTot.stories.js.map +1 -0
- package/dist/stories/ColorLegends/ContinousLegends/Permeability.stories.d.ts +7 -0
- package/dist/stories/ColorLegends/ContinousLegends/Permeability.stories.js +36 -0
- package/dist/stories/ColorLegends/ContinousLegends/Permeability.stories.js.map +1 -0
- package/dist/stories/ColorLegends/ContinousLegends/PoroTot.stories.d.ts +7 -0
- package/dist/stories/ColorLegends/ContinousLegends/PoroTot.stories.js +34 -0
- package/dist/stories/ColorLegends/ContinousLegends/PoroTot.stories.js.map +1 -0
- package/dist/stories/ColorLegends/ContinousLegends/Porosity.stories.d.ts +7 -0
- package/dist/stories/ColorLegends/ContinousLegends/Porosity.stories.js +34 -0
- package/dist/stories/ColorLegends/ContinousLegends/Porosity.stories.js.map +1 -0
- package/dist/stories/ColorLegends/ContinousLegends/SW.stories.d.ts +7 -0
- package/dist/stories/ColorLegends/ContinousLegends/SW.stories.js +34 -0
- package/dist/stories/ColorLegends/ContinousLegends/SW.stories.js.map +1 -0
- package/dist/stories/ColorLegends/DiscreteLegends/FaciesNoCalcite.stories.d.ts +7 -0
- package/dist/stories/ColorLegends/DiscreteLegends/FaciesNoCalcite.stories.js +39 -0
- package/dist/stories/ColorLegends/DiscreteLegends/FaciesNoCalcite.stories.js.map +1 -0
- package/dist/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.d.ts +7 -0
- package/dist/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.js +31 -0
- package/dist/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.js.map +1 -0
- package/dist/stories/ColorLegends/DiscreteLegends/FaultProximityFlag.stories.d.ts +7 -0
- package/dist/stories/ColorLegends/DiscreteLegends/FaultProximityFlag.stories.js +31 -0
- package/dist/stories/ColorLegends/DiscreteLegends/FaultProximityFlag.stories.js.map +1 -0
- package/dist/stories/ColorLegends/DiscreteLegends/RDE.stories.d.ts +7 -0
- package/dist/stories/ColorLegends/DiscreteLegends/RDE.stories.js +34 -0
- package/dist/stories/ColorLegends/DiscreteLegends/RDE.stories.js.map +1 -0
- package/dist/stories/ColorLegends/DiscreteLegends/RDE_Orig.stories.d.ts +7 -0
- package/dist/stories/ColorLegends/DiscreteLegends/RDE_Orig.stories.js +45 -0
- package/dist/stories/ColorLegends/DiscreteLegends/RDE_Orig.stories.js.map +1 -0
- package/dist/stories/ColorLegends/DiscreteLegends/ZoneMain.stories.d.ts +7 -0
- package/dist/stories/ColorLegends/DiscreteLegends/ZoneMain.stories.js +34 -0
- package/dist/stories/ColorLegends/DiscreteLegends/ZoneMain.stories.js.map +1 -0
- package/dist/stories/ColorLegends/DiscreteLegends/Zonelog.stories.d.ts +7 -0
- package/dist/stories/ColorLegends/DiscreteLegends/Zonelog.stories.js +44 -0
- package/dist/stories/ColorLegends/DiscreteLegends/Zonelog.stories.js.map +1 -0
- package/dist/stories/ColorLegends/LegendWithSelector/LegendSelector.stories.d.ts +7 -0
- package/dist/stories/ColorLegends/LegendWithSelector/LegendSelector.stories.js +33 -0
- package/dist/stories/ColorLegends/LegendWithSelector/LegendSelector.stories.js.map +1 -0
- package/package.json +8 -7
|
@@ -7,68 +7,67 @@ import { styled } from "@mui/system";
|
|
|
7
7
|
import discreteLegendUtil from "../Utils/discreteLegend";
|
|
8
8
|
import { d3ColorScales } from "../Utils/d3ColorScale";
|
|
9
9
|
import { RGBToHex } from "../Utils/legendCommonFunction";
|
|
10
|
-
|
|
10
|
+
const StyledLegend = styled("div")({
|
|
11
11
|
paddingLeft: "5px",
|
|
12
12
|
"&:hover": {
|
|
13
13
|
background: "#f1f1f1",
|
|
14
14
|
cursor: "pointer",
|
|
15
15
|
},
|
|
16
16
|
});
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
var divRef = useRef(null);
|
|
17
|
+
export const ColorSelectorComponent = ({
|
|
18
|
+
/**
|
|
19
|
+
* Returns the object with name and array of colors for colortable colorscale
|
|
20
|
+
*
|
|
21
|
+
* Returns the array of colors for d3 colorscale
|
|
22
|
+
*/
|
|
23
|
+
colorsObject,
|
|
24
|
+
/**
|
|
25
|
+
* Returns the function for d3 colorscale(continuous)
|
|
26
|
+
*/
|
|
27
|
+
legendColor,
|
|
28
|
+
/**
|
|
29
|
+
* Name of the color(ex: Rainbow)
|
|
30
|
+
*/
|
|
31
|
+
legendColorName,
|
|
32
|
+
/**
|
|
33
|
+
* Used to distinguish between discrete and continuous legend
|
|
34
|
+
*
|
|
35
|
+
* Also used to distinguish between discrete and continuous colors
|
|
36
|
+
*/
|
|
37
|
+
useContColorTable,
|
|
38
|
+
/**
|
|
39
|
+
* Used to distinguish between discrete and continuous legend
|
|
40
|
+
*
|
|
41
|
+
* Also used to distinguish between discrete and continuous colors
|
|
42
|
+
*/
|
|
43
|
+
useDiscColorTable,
|
|
44
|
+
/**
|
|
45
|
+
* Unique id is Used to show multiple legends
|
|
46
|
+
*/
|
|
47
|
+
uniqueId,
|
|
48
|
+
/**
|
|
49
|
+
* Returns the function
|
|
50
|
+
*/
|
|
51
|
+
colorScaleData,
|
|
52
|
+
/**
|
|
53
|
+
* The name of the current (selected) color legend
|
|
54
|
+
*/
|
|
55
|
+
currentLegendName, }) => {
|
|
56
|
+
const divRef = useRef(null);
|
|
58
57
|
// create an array of steps based on the color scale
|
|
59
58
|
// returns an array of evenly-spaced numbers. Returns the integers from zero to the specified end minus one.
|
|
60
59
|
// d3.range(start, stop, step)
|
|
61
|
-
|
|
60
|
+
let data;
|
|
62
61
|
var extent;
|
|
63
62
|
if (legendColor) {
|
|
64
|
-
data = range(10).map(
|
|
63
|
+
data = range(10).map((d) => ({
|
|
65
64
|
color: legendColor(d / 10),
|
|
66
65
|
value: d,
|
|
67
|
-
})
|
|
66
|
+
}));
|
|
68
67
|
// get the array's min and max value
|
|
69
|
-
extent = d3.extent(data,
|
|
68
|
+
extent = d3.extent(data, (d) => d === null || d === void 0 ? void 0 : d.value);
|
|
70
69
|
}
|
|
71
|
-
|
|
70
|
+
const handleChange = React.useCallback(() => {
|
|
72
71
|
// continous legend with colortable colors
|
|
73
72
|
if (colorsObject &&
|
|
74
73
|
Object.keys(colorsObject).length > 0 &&
|
|
@@ -77,10 +76,10 @@ export var ColorSelectorComponent = function (_a) {
|
|
|
77
76
|
}
|
|
78
77
|
// continous legend with d3 colors
|
|
79
78
|
else if (data && !useContColorTable) {
|
|
80
|
-
|
|
81
|
-
data.forEach(
|
|
79
|
+
const arrayData = [];
|
|
80
|
+
data.forEach((colorsObject) => {
|
|
82
81
|
var _a, _b, _c;
|
|
83
|
-
|
|
82
|
+
arrayData.push([
|
|
84
83
|
0 + "." + colorsObject.value,
|
|
85
84
|
(_a = color(colorsObject.color)) === null || _a === void 0 ? void 0 : _a.rgb().r,
|
|
86
85
|
(_b = color(colorsObject.color)) === null || _b === void 0 ? void 0 : _b.rgb().g,
|
|
@@ -88,7 +87,7 @@ export var ColorSelectorComponent = function (_a) {
|
|
|
88
87
|
]);
|
|
89
88
|
});
|
|
90
89
|
return colorScaleData
|
|
91
|
-
? colorScaleData({ arrayData
|
|
90
|
+
? colorScaleData({ arrayData, legendColorName }, true)
|
|
92
91
|
: null;
|
|
93
92
|
}
|
|
94
93
|
// discrete legend with colortable colors
|
|
@@ -100,7 +99,7 @@ export var ColorSelectorComponent = function (_a) {
|
|
|
100
99
|
// discrete legend with d3 colors
|
|
101
100
|
else {
|
|
102
101
|
return colorScaleData
|
|
103
|
-
? colorScaleData({ colorsObject
|
|
102
|
+
? colorScaleData({ colorsObject, legendColorName }, false)
|
|
104
103
|
: null;
|
|
105
104
|
}
|
|
106
105
|
}, [
|
|
@@ -111,7 +110,7 @@ export var ColorSelectorComponent = function (_a) {
|
|
|
111
110
|
useContColorTable,
|
|
112
111
|
useDiscColorTable,
|
|
113
112
|
]);
|
|
114
|
-
React.useEffect(
|
|
113
|
+
React.useEffect(() => {
|
|
115
114
|
// continuous legend using color table colors
|
|
116
115
|
if (useContColorTable === true && divRef.current) {
|
|
117
116
|
contColortableLegend();
|
|
@@ -133,8 +132,8 @@ export var ColorSelectorComponent = function (_a) {
|
|
|
133
132
|
[useContColorTable, useDiscColorTable]);
|
|
134
133
|
// continuous legend using color table colors (using linear gradiend)
|
|
135
134
|
function contColortableLegend() {
|
|
136
|
-
|
|
137
|
-
colorsObject.color.forEach(
|
|
135
|
+
const itemColor = [];
|
|
136
|
+
colorsObject.color.forEach((value) => {
|
|
138
137
|
// return the color and offset needed to draw the legend
|
|
139
138
|
itemColor.push({
|
|
140
139
|
offset: RGBToHex(value).offset,
|
|
@@ -142,15 +141,15 @@ export var ColorSelectorComponent = function (_a) {
|
|
|
142
141
|
});
|
|
143
142
|
});
|
|
144
143
|
// append a defs (for definition) element to your SVG
|
|
145
|
-
|
|
144
|
+
const svgLegend = select(divRef.current)
|
|
146
145
|
.append("svg")
|
|
147
146
|
.style("cursor", "pointer")
|
|
148
147
|
.style("height", "30px")
|
|
149
148
|
.style("width", 220);
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
const defs = svgLegend.append("defs");
|
|
150
|
+
const currentIndex = "linear-gradient-" + uniqueId + "0";
|
|
152
151
|
// append a linearGradient element to the defs and give it a unique id
|
|
153
|
-
|
|
152
|
+
const linearGradient = defs
|
|
154
153
|
.append("linearGradient")
|
|
155
154
|
.attr("id", currentIndex)
|
|
156
155
|
.attr("x1", "0%")
|
|
@@ -189,20 +188,20 @@ export var ColorSelectorComponent = function (_a) {
|
|
|
189
188
|
}
|
|
190
189
|
// continuous legend using d3 colors (using linear gradiend)
|
|
191
190
|
function contD3Legend() {
|
|
192
|
-
|
|
193
|
-
d3ColorScales.forEach(
|
|
191
|
+
const itemColor = [];
|
|
192
|
+
d3ColorScales.forEach((value) => {
|
|
194
193
|
// return the color and offset needed to draw the legend
|
|
195
194
|
itemColor.push(value.colors);
|
|
196
195
|
});
|
|
197
196
|
// append a defs (for definition) element to your SVG
|
|
198
|
-
|
|
197
|
+
const svgLegend = select(divRef.current)
|
|
199
198
|
.append("svg")
|
|
200
199
|
.style("cursor", "pointer")
|
|
201
200
|
.style("height", "50px");
|
|
202
|
-
|
|
203
|
-
|
|
201
|
+
const defs = svgLegend.append("defs");
|
|
202
|
+
const currentIndex = "linear-gradient-" + uniqueId;
|
|
204
203
|
// append a linearGradient element to the defs and give it a unique id
|
|
205
|
-
|
|
204
|
+
const linearGradient = defs
|
|
206
205
|
.append("linearGradient")
|
|
207
206
|
.attr("id", currentIndex)
|
|
208
207
|
.attr("x1", "0%")
|
|
@@ -215,10 +214,8 @@ export var ColorSelectorComponent = function (_a) {
|
|
|
215
214
|
.data(data)
|
|
216
215
|
.enter()
|
|
217
216
|
.append("stop")
|
|
218
|
-
.attr("offset",
|
|
219
|
-
|
|
220
|
-
})
|
|
221
|
-
.attr("stop-color", function (d) { return d.color; });
|
|
217
|
+
.attr("offset", (d) => ((d.value - extent[0]) / (extent[1] - extent[0])) * 100 + "%")
|
|
218
|
+
.attr("stop-color", (d) => d.color);
|
|
222
219
|
// append title
|
|
223
220
|
svgLegend
|
|
224
221
|
.append("text")
|
|
@@ -239,14 +236,14 @@ export var ColorSelectorComponent = function (_a) {
|
|
|
239
236
|
}
|
|
240
237
|
// discrete legend using color table colors
|
|
241
238
|
function discColorTableLegend() {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
colorsObject.color.forEach(
|
|
239
|
+
const itemColor = [];
|
|
240
|
+
const itemName = [];
|
|
241
|
+
colorsObject.color.forEach((element, key) => {
|
|
245
242
|
itemColor.push({ color: RGBToHex(element) });
|
|
246
243
|
itemName.push(key);
|
|
247
244
|
});
|
|
248
245
|
function RGBToHex(rgb) {
|
|
249
|
-
|
|
246
|
+
let r = rgb[1].toString(16), g = rgb[2].toString(16), b = rgb[3].toString(16);
|
|
250
247
|
if (r.length === 1)
|
|
251
248
|
r = "0" + r;
|
|
252
249
|
if (g.length === 1)
|
|
@@ -255,14 +252,14 @@ export var ColorSelectorComponent = function (_a) {
|
|
|
255
252
|
b = "0" + b;
|
|
256
253
|
return "#" + r + g + b;
|
|
257
254
|
}
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
255
|
+
const count = itemName.length;
|
|
256
|
+
const colorLegend = discreteLegendUtil(itemColor, true);
|
|
257
|
+
const selectedLegend = select(divRef.current);
|
|
261
258
|
selectedLegend
|
|
262
259
|
.append("svg")
|
|
263
260
|
.style("cursor", "pointer")
|
|
264
261
|
.style("margin-top", "5px")
|
|
265
|
-
.attr("viewBox",
|
|
262
|
+
.attr("viewBox", `0 0 ${count} 1`)
|
|
266
263
|
.attr("preserveAspectRatio", "none")
|
|
267
264
|
.style("width", "101px")
|
|
268
265
|
.style("height", "15px")
|
|
@@ -282,27 +279,27 @@ export var ColorSelectorComponent = function (_a) {
|
|
|
282
279
|
}
|
|
283
280
|
// discrete legend using d3 colors
|
|
284
281
|
function discD3legend() {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
colorsObject.forEach(
|
|
282
|
+
const itemName = [];
|
|
283
|
+
const itemColor = [];
|
|
284
|
+
colorsObject.forEach((element, key) => {
|
|
288
285
|
itemColor.push({ color: element });
|
|
289
286
|
itemName.push(key);
|
|
290
287
|
});
|
|
291
288
|
//const ordinalValues = scaleOrdinal(colorsObject).domain(itemName);
|
|
292
|
-
|
|
293
|
-
|
|
289
|
+
const count = itemName.length;
|
|
290
|
+
const discreteLegend = discreteLegendUtil(itemColor, true);
|
|
294
291
|
select("svg")
|
|
295
292
|
.append("g")
|
|
296
293
|
.attr("transform", "translate(50,70)")
|
|
297
294
|
.attr("class", "legend")
|
|
298
295
|
.call(discreteLegend);
|
|
299
|
-
|
|
296
|
+
const selectedLegend = select(divRef.current);
|
|
300
297
|
selectedLegend
|
|
301
298
|
.append("svg")
|
|
302
299
|
.style("cursor", "pointer")
|
|
303
300
|
.style("margin-top", "5px")
|
|
304
301
|
.style("background", "grey")
|
|
305
|
-
.attr("viewBox",
|
|
302
|
+
.attr("viewBox", `0 0 ${count} 1`)
|
|
306
303
|
.attr("preserveAspectRatio", "none")
|
|
307
304
|
.style("width", "101px")
|
|
308
305
|
.style("height", "15px")
|
|
@@ -315,8 +312,8 @@ export var ColorSelectorComponent = function (_a) {
|
|
|
315
312
|
.style("font-size", "small")
|
|
316
313
|
.style("font-weight", "700");
|
|
317
314
|
}
|
|
318
|
-
|
|
319
|
-
|
|
315
|
+
const selected = currentLegendName === legendColorName;
|
|
316
|
+
const selectedStyle = selected ? { background: "#c1c1c1 !important" } : {};
|
|
320
317
|
return (React.createElement(StyledLegend, { sx: selectedStyle },
|
|
321
318
|
React.createElement("div", { id: "legend", style: { height: 30 }, ref: divRef, onClick: handleChange })));
|
|
322
319
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorSelectorComponent.js","sourceRoot":"","sources":["../../../src/component/ColorSelector/ColorSelectorComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC;AACnC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,kBAAkB,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD,
|
|
1
|
+
{"version":3,"file":"ColorSelectorComponent.js","sourceRoot":"","sources":["../../../src/component/ColorSelector/ColorSelectorComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC;AACnC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,kBAAkB,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD,MAAM,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACjC,WAAW,EAAE,KAAK;IAClB,SAAS,EAAE;QACT,UAAU,EAAE,SAAS;QACrB,MAAM,EAAE,SAAS;KAClB;CACF,CAAC,CAAC;AAkBH,MAAM,CAAC,MAAM,sBAAsB,GAAiC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,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;aAC5C,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC;aACtB,KAAK,CAAC,aAAa,EAAE,MAAM,CAAC;aAC5B,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC;aAC3B,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;IACjC,CAAC;IAED,MAAM,QAAQ,GAAG,iBAAiB,KAAK,eAAe,CAAC;IACvD,MAAM,aAAa,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,oBAAoB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAE3E,OAAO,CACL,oBAAC,YAAY,IAAC,EAAE,EAAE,aAAa;QAC7B,6BACE,EAAE,EAAC,QAAQ,EACX,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EACrB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,YAAY,GAChB,CACM,CAChB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
export
|
|
2
|
+
export type ColorScaleObj = {
|
|
3
3
|
name: string;
|
|
4
4
|
color: [number, number, number, number][] | ((t: number) => string | string[]);
|
|
5
5
|
};
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated use ColorScaleObj instead.
|
|
8
|
+
*/
|
|
9
|
+
export type colorScaleObj = ColorScaleObj;
|
|
10
|
+
export type ColorScaleArray = Array<ColorScaleObj>;
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated use ColorScaleArray instead.
|
|
13
|
+
*/
|
|
14
|
+
export type colorScaleArray = ColorScaleArray;
|
|
15
|
+
export type ColorSelectorWrapperProps = {
|
|
8
16
|
useColorTableColors?: boolean;
|
|
9
17
|
newColorScaleData?: any;
|
|
10
18
|
colorTables?: any;
|
|
@@ -20,5 +28,4 @@ declare type legendProps = {
|
|
|
20
28
|
selectedInterpolationType?: any;
|
|
21
29
|
selectedRangeType?: any;
|
|
22
30
|
};
|
|
23
|
-
export declare const ColorSelectorWrapper: React.FC<
|
|
24
|
-
export {};
|
|
31
|
+
export declare const ColorSelectorWrapper: React.FC<ColorSelectorWrapperProps>;
|
|
@@ -1,46 +1,37 @@
|
|
|
1
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
|
-
if (ar || !(i in from)) {
|
|
4
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5
|
-
ar[i] = from[i];
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
|
-
};
|
|
10
1
|
import * as React from "react";
|
|
11
2
|
import ContentCopyIcon from "@mui/icons-material/ContentCopy";
|
|
12
3
|
import { styled } from "@mui/system";
|
|
13
4
|
import { d3ColorScales } from "../Utils/d3ColorScale";
|
|
14
5
|
import { ColorSelectorComponent } from "./ColorSelectorComponent";
|
|
15
6
|
import { RGBToHex } from "../Utils/legendCommonFunction";
|
|
16
|
-
|
|
7
|
+
const StyledParentDiv = styled("div")({
|
|
17
8
|
display: "flex",
|
|
18
9
|
});
|
|
19
|
-
|
|
10
|
+
const StyledContentCopyIcon = styled("div")({
|
|
20
11
|
"&:hover": {
|
|
21
12
|
background: "#f1f1f1",
|
|
22
13
|
cursor: "pointer",
|
|
23
14
|
},
|
|
24
15
|
});
|
|
25
|
-
|
|
16
|
+
const StyledRangeParentContainer = styled("div")({
|
|
26
17
|
height: 58,
|
|
27
18
|
borderRadius: "0.5em",
|
|
28
19
|
border: "1px solid #dadada",
|
|
29
20
|
});
|
|
30
|
-
|
|
21
|
+
const StyledRangeChildContainer = styled("div")({
|
|
31
22
|
marginTop: 8,
|
|
32
23
|
marginLeft: 13,
|
|
33
24
|
});
|
|
34
|
-
|
|
25
|
+
const StyledInterpolationParentContainer = styled("div")({
|
|
35
26
|
height: 72,
|
|
36
27
|
borderRadius: "0.5em",
|
|
37
28
|
border: "1px solid #dadada",
|
|
38
29
|
});
|
|
39
|
-
|
|
30
|
+
const StyledInterpolationChildContainer = styled("div")({
|
|
40
31
|
marginTop: 8,
|
|
41
32
|
marginLeft: 13,
|
|
42
33
|
});
|
|
43
|
-
|
|
34
|
+
const StyledInterpolationLegendWrapper = styled("div")({
|
|
44
35
|
height: 120,
|
|
45
36
|
overflow: "auto",
|
|
46
37
|
display: "flex",
|
|
@@ -48,32 +39,31 @@ var StyledInterpolationLegendWrapper = styled("div")({
|
|
|
48
39
|
overflowX: "hidden",
|
|
49
40
|
marginLeft: -12,
|
|
50
41
|
});
|
|
51
|
-
export
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
var _b = React.useState(true), isAuto = _b[0], setAuto = _b[1];
|
|
42
|
+
export const ColorSelectorWrapper = ({ newColorScaleData, colorTables, useRange, getRange, isCont, useInterpolation, getInterpolation, currentLegendName, isCustomScale, getDuplicatedLegendData, selectedInterpolationType, selectedRangeType, }) => {
|
|
43
|
+
let continuousD3Legend;
|
|
44
|
+
let discreteD3Legend;
|
|
45
|
+
let continuousLegend;
|
|
46
|
+
let discreteLegend;
|
|
47
|
+
const continuosColorData = [];
|
|
48
|
+
const continuosD3ColorData = [];
|
|
49
|
+
const discreteColorData = [];
|
|
50
|
+
const discreteD3ColorData = [];
|
|
51
|
+
const [isAuto, setAuto] = React.useState(true);
|
|
62
52
|
// For altering data range
|
|
63
|
-
|
|
53
|
+
const onChangeRange = React.useCallback((e) => {
|
|
64
54
|
if (e.value === "Auto") {
|
|
65
55
|
getRange("Auto");
|
|
66
56
|
setAuto(true);
|
|
67
57
|
}
|
|
68
58
|
else {
|
|
69
59
|
setAuto(false);
|
|
70
|
-
|
|
71
|
-
|
|
60
|
+
const inputValue1 = document.getElementById("minV").value;
|
|
61
|
+
const inputValue2 = document.getElementById("maxV").value;
|
|
72
62
|
getRange([parseFloat(inputValue1), parseFloat(inputValue2)]);
|
|
73
63
|
}
|
|
74
64
|
}, [getRange]);
|
|
75
65
|
// For interpolation
|
|
76
|
-
|
|
66
|
+
const onChangeInterpolation = React.useCallback((e) => {
|
|
77
67
|
if (e.value === "Logarithmic") {
|
|
78
68
|
getInterpolation("Logarithmic");
|
|
79
69
|
}
|
|
@@ -84,19 +74,19 @@ export var ColorSelectorWrapper = function (_a) {
|
|
|
84
74
|
getInterpolation("Nearest");
|
|
85
75
|
}
|
|
86
76
|
}, [getInterpolation]);
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
77
|
+
const [duplicatedLegendData, setDuplicatedLegendData] = React.useState([]);
|
|
78
|
+
const copyLegend = (value) => {
|
|
79
|
+
const test = value.color.map((item) => {
|
|
90
80
|
return {
|
|
91
81
|
position: item[0],
|
|
92
82
|
color: RGBToHex(item).color,
|
|
93
83
|
name: value.name,
|
|
94
84
|
};
|
|
95
85
|
});
|
|
96
|
-
setDuplicatedLegendData(
|
|
86
|
+
setDuplicatedLegendData([...duplicatedLegendData, test]);
|
|
97
87
|
isCustomScale(value.name);
|
|
98
88
|
};
|
|
99
|
-
React.useEffect(
|
|
89
|
+
React.useEffect(() => {
|
|
100
90
|
if (getDuplicatedLegendData) {
|
|
101
91
|
getDuplicatedLegendData(duplicatedLegendData);
|
|
102
92
|
}
|
|
@@ -107,55 +97,55 @@ export var ColorSelectorWrapper = function (_a) {
|
|
|
107
97
|
]);
|
|
108
98
|
if (!useRange || !useInterpolation) {
|
|
109
99
|
// Continuous legend using color table data
|
|
110
|
-
|
|
100
|
+
const colorTableContinuousData = colorTables === null || colorTables === void 0 ? void 0 : colorTables.filter((element) => {
|
|
111
101
|
return element.discrete === false;
|
|
112
102
|
});
|
|
113
|
-
colorTableContinuousData === null || colorTableContinuousData === void 0 ? void 0 : colorTableContinuousData.forEach(
|
|
103
|
+
colorTableContinuousData === null || colorTableContinuousData === void 0 ? void 0 : colorTableContinuousData.forEach((element) => {
|
|
114
104
|
continuosColorData.push({ color: element.colors, name: element.name });
|
|
115
105
|
});
|
|
116
106
|
// Continuous legend using d3 data
|
|
117
|
-
|
|
107
|
+
const d3continuousData = d3ColorScales === null || d3ColorScales === void 0 ? void 0 : d3ColorScales.filter((element) => {
|
|
118
108
|
return element.discrete === false;
|
|
119
109
|
});
|
|
120
|
-
d3continuousData === null || d3continuousData === void 0 ? void 0 : d3continuousData.forEach(
|
|
110
|
+
d3continuousData === null || d3continuousData === void 0 ? void 0 : d3continuousData.forEach((element) => {
|
|
121
111
|
continuosD3ColorData.push({ color: element.colors, name: element.name });
|
|
122
112
|
});
|
|
123
113
|
// Discrete legend using color table data
|
|
124
|
-
|
|
114
|
+
const discreteData = colorTables === null || colorTables === void 0 ? void 0 : colorTables.filter((element) => {
|
|
125
115
|
return element.discrete === true;
|
|
126
116
|
});
|
|
127
|
-
discreteData === null || discreteData === void 0 ? void 0 : discreteData.forEach(
|
|
117
|
+
discreteData === null || discreteData === void 0 ? void 0 : discreteData.forEach((element) => {
|
|
128
118
|
discreteColorData.push({ color: element.colors, name: element.name });
|
|
129
119
|
});
|
|
130
120
|
// Discrete legend using d3 data
|
|
131
|
-
|
|
121
|
+
const d3discreteData = d3ColorScales === null || d3ColorScales === void 0 ? void 0 : d3ColorScales.filter((element) => {
|
|
132
122
|
return element.discrete === true;
|
|
133
123
|
});
|
|
134
|
-
d3discreteData === null || d3discreteData === void 0 ? void 0 : d3discreteData.forEach(
|
|
124
|
+
d3discreteData === null || d3discreteData === void 0 ? void 0 : d3discreteData.forEach((element) => {
|
|
135
125
|
discreteD3ColorData.push({ color: element.colors, name: element.name });
|
|
136
126
|
});
|
|
137
127
|
// return continuous and discrete legend which uses d3 data
|
|
138
|
-
continuousD3Legend = continuosD3ColorData.map(
|
|
128
|
+
continuousD3Legend = continuosD3ColorData.map((val, index) => {
|
|
139
129
|
return (React.createElement(ColorSelectorComponent, { legendColor: val.color, legendColorName: val.name, useContColorTable: false, uniqueId: index, colorScaleData: newColorScaleData, key: val.name, currentLegendName: currentLegendName }));
|
|
140
130
|
});
|
|
141
|
-
discreteD3Legend = d3discreteData.map(
|
|
131
|
+
discreteD3Legend = d3discreteData.map((val) => {
|
|
142
132
|
return (React.createElement(ColorSelectorComponent, { colorsObject: val.colors, legendColorName: val.name, useDiscColorTable: false, colorScaleData: newColorScaleData, key: val.name, currentLegendName: currentLegendName }));
|
|
143
133
|
});
|
|
144
134
|
// return continuous and discrete legend which uses colortable data
|
|
145
|
-
continuousLegend = continuosColorData.map(
|
|
135
|
+
continuousLegend = continuosColorData.map((value, index) => {
|
|
146
136
|
return (React.createElement(StyledParentDiv, { key: value.name },
|
|
147
137
|
React.createElement("div", null,
|
|
148
138
|
React.createElement(ColorSelectorComponent, { colorsObject: value, legendColorName: value.name, useContColorTable: true, uniqueId: index, colorScaleData: newColorScaleData, key: value.name, currentLegendName: currentLegendName })),
|
|
149
139
|
React.createElement(StyledContentCopyIcon, { title: "Duplicate", style: { cursor: "pointer" } },
|
|
150
|
-
React.createElement(ContentCopyIcon, { fontSize: "small", color: "action", style: { marginTop: 5 }, onClick:
|
|
140
|
+
React.createElement(ContentCopyIcon, { fontSize: "small", color: "action", style: { marginTop: 5 }, onClick: () => copyLegend(value) }))));
|
|
151
141
|
});
|
|
152
|
-
discreteLegend = discreteColorData.map(
|
|
142
|
+
discreteLegend = discreteColorData.map((val, index) => {
|
|
153
143
|
return (React.createElement(ColorSelectorComponent, { colorsObject: discreteColorData[index], legendColorName: val.name, useDiscColorTable: true, colorScaleData: newColorScaleData, key: index, currentLegendName: currentLegendName }));
|
|
154
144
|
});
|
|
155
145
|
}
|
|
156
146
|
// Sampling through range
|
|
157
147
|
if (useRange) {
|
|
158
|
-
return (React.createElement(StyledRangeParentContainer, { onChange:
|
|
148
|
+
return (React.createElement(StyledRangeParentContainer, { onChange: (ev) => {
|
|
159
149
|
onChangeRange(ev.target);
|
|
160
150
|
} },
|
|
161
151
|
React.createElement(StyledRangeChildContainer, null,
|
|
@@ -171,7 +161,7 @@ export var ColorSelectorWrapper = function (_a) {
|
|
|
171
161
|
}
|
|
172
162
|
// Interpolation methods
|
|
173
163
|
else if (useInterpolation) {
|
|
174
|
-
return (React.createElement(StyledInterpolationParentContainer, { onChange:
|
|
164
|
+
return (React.createElement(StyledInterpolationParentContainer, { onChange: (ev) => {
|
|
175
165
|
onChangeInterpolation(ev.target);
|
|
176
166
|
} },
|
|
177
167
|
React.createElement(StyledInterpolationChildContainer, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorSelectorWrapper.js","sourceRoot":"","sources":["../../../src/component/ColorSelector/ColorSelectorWrapper.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ColorSelectorWrapper.js","sourceRoot":"","sources":["../../../src/component/ColorSelector/ColorSelectorWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAE9D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD,MAAM,eAAe,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACpC,OAAO,EAAE,MAAM;CAChB,CAAC,CAAC;AAEH,MAAM,qBAAqB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC1C,SAAS,EAAE;QACT,UAAU,EAAE,SAAS;QACrB,MAAM,EAAE,SAAS;KAClB;CACF,CAAC,CAAC;AAEH,MAAM,0BAA0B,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/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