@emerson-eps/color-tables 0.1.22 → 0.2.2
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 +7 -0
- package/dist/component/ColorSelector/ColorSelectorComponent.js +62 -0
- package/dist/component/ColorSelector/ColorSelectorComponent.js.map +1 -0
- package/dist/component/ColorSelector/ColorTableSelectorWrapper.d.ts +2 -0
- package/dist/component/ColorSelector/ColorTableSelectorWrapper.js +25 -0
- package/dist/component/ColorSelector/ColorTableSelectorWrapper.js.map +1 -0
- package/dist/component/ColorSelector/legendComponent.d.ts +14 -0
- package/dist/component/ColorSelector/legendComponent.js +228 -0
- package/dist/component/ColorSelector/legendComponent.js.map +1 -0
- package/dist/component/Legend/ContinuousLegend.d.ts +1 -1
- package/dist/component/Legend/ContinuousLegend.js +84 -65
- package/dist/component/Legend/ContinuousLegend.js.map +1 -1
- package/dist/component/Legend/DiscreteLegend.d.ts +1 -1
- package/dist/component/Legend/DiscreteLegend.js +71 -52
- package/dist/component/Legend/DiscreteLegend.js.map +1 -1
- package/dist/component/Utils/d3ColorScale.d.ts +10 -0
- package/dist/component/Utils/d3ColorScale.js +84 -0
- package/dist/component/Utils/d3ColorScale.js.map +1 -0
- package/dist/component/Utils/discreteLegend.d.ts +2 -2
- package/dist/component/Utils/discreteLegend.js +26 -15
- package/dist/component/Utils/discreteLegend.js.map +1 -1
- package/dist/stories/ColorLegends/ColorSelector/Selector.stories.d.ts +7 -0
- package/dist/stories/ColorLegends/ColorSelector/Selector.stories.js +11 -0
- package/dist/stories/ColorLegends/ColorSelector/Selector.stories.js.map +1 -0
- package/dist/stories/ColorLegends/{ContinousLgends → ContinousLegends}/MD.stories.d.ts +0 -0
- package/dist/stories/ColorLegends/{ContinousLgends → ContinousLegends}/MD.stories.js +0 -2
- package/dist/stories/ColorLegends/ContinousLegends/MD.stories.js.map +1 -0
- package/dist/stories/ColorLegends/{ContinousLgends → ContinousLegends}/NTG.stories.d.ts +0 -0
- package/dist/stories/ColorLegends/{ContinousLgends → ContinousLegends}/NTG.stories.js +0 -2
- package/dist/stories/ColorLegends/ContinousLegends/NTG.stories.js.map +1 -0
- package/dist/stories/ColorLegends/{ContinousLgends → ContinousLegends}/PermTot.stories.d.ts +0 -0
- package/dist/stories/ColorLegends/{ContinousLgends → ContinousLegends}/PermTot.stories.js +0 -2
- package/dist/stories/ColorLegends/ContinousLegends/PermTot.stories.js.map +1 -0
- package/dist/stories/ColorLegends/{ContinousLgends → ContinousLegends}/Permeability.stories.d.ts +0 -0
- package/dist/stories/ColorLegends/{ContinousLgends → ContinousLegends}/Permeability.stories.js +0 -2
- package/dist/stories/ColorLegends/ContinousLegends/Permeability.stories.js.map +1 -0
- package/dist/stories/ColorLegends/{ContinousLgends → ContinousLegends}/PoroTot.stories.d.ts +0 -0
- package/dist/stories/ColorLegends/{ContinousLgends → ContinousLegends}/PoroTot.stories.js +0 -2
- package/dist/stories/ColorLegends/ContinousLegends/PoroTot.stories.js.map +1 -0
- package/dist/stories/ColorLegends/{ContinousLgends → ContinousLegends}/Porosity.stories.d.ts +0 -0
- package/dist/stories/ColorLegends/{ContinousLgends → ContinousLegends}/Porosity.stories.js +0 -2
- package/dist/stories/ColorLegends/ContinousLegends/Porosity.stories.js.map +1 -0
- package/dist/stories/ColorLegends/{ContinousLgends → ContinousLegends}/SW.stories.d.ts +0 -0
- package/dist/stories/ColorLegends/{ContinousLgends → ContinousLegends}/SW.stories.js +2 -4
- package/dist/stories/ColorLegends/ContinousLegends/SW.stories.js.map +1 -0
- package/package.json +3 -1
- package/src/component/ColorSelector/ColorSelectorComponent.tsx +109 -0
- package/src/component/ColorSelector/ColorTableSelectorWrapper.tsx +49 -0
- package/src/component/ColorSelector/legendComponent.tsx +289 -0
- package/src/component/Legend/ContinuousLegend.tsx +12 -3
- package/src/component/Legend/DiscreteLegend.tsx +14 -6
- package/src/component/Utils/d3ColorScale.ts +84 -0
- package/src/component/Utils/discreteLegend.ts +34 -23
- package/src/stories/ColorLegends/ColorSelector/Selector.stories.jsx +12 -0
- package/src/stories/ColorLegends/{ContinousLgends → ContinousLegends}/MD.stories.jsx +0 -2
- package/src/stories/ColorLegends/{ContinousLgends → ContinousLegends}/NTG.stories.jsx +0 -2
- package/src/stories/ColorLegends/{ContinousLgends → ContinousLegends}/PermTot.stories.jsx +0 -2
- package/src/stories/ColorLegends/{ContinousLgends → ContinousLegends}/Permeability.stories.jsx +0 -2
- package/src/stories/ColorLegends/{ContinousLgends → ContinousLegends}/PoroTot.stories.jsx +0 -2
- package/src/stories/ColorLegends/{ContinousLgends → ContinousLegends}/Porosity.stories.jsx +0 -2
- package/src/stories/ColorLegends/{ContinousLgends → ContinousLegends}/SW.stories.jsx +2 -4
- package/tsconfig.json +1 -1
- package/dist/stories/ColorLegends/ContinousLgends/MD.stories.js.map +0 -1
- package/dist/stories/ColorLegends/ContinousLgends/NTG.stories.js.map +0 -1
- package/dist/stories/ColorLegends/ContinousLgends/PermTot.stories.js.map +0 -1
- package/dist/stories/ColorLegends/ContinousLgends/Permeability.stories.js.map +0 -1
- package/dist/stories/ColorLegends/ContinousLgends/PoroTot.stories.js.map +0 -1
- package/dist/stories/ColorLegends/ContinousLgends/Porosity.stories.js.map +0 -1
- package/dist/stories/ColorLegends/ContinousLgends/SW.stories.js.map +0 -1
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
1
10
|
import * as React from "react";
|
|
2
11
|
import { useRef } from "react";
|
|
3
12
|
import legendUtil from "../Utils/discreteLegend";
|
|
@@ -14,60 +23,70 @@ export const DiscreteColorLegend = ({ discreteData, dataObjectName, position, co
|
|
|
14
23
|
};
|
|
15
24
|
}, [discreteData, colorName, colorTables, horizontal]);
|
|
16
25
|
function discreteLegend() {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
const itemName = [];
|
|
28
|
+
const itemColor = [];
|
|
29
|
+
let dataSet;
|
|
30
|
+
if (typeof colorTables === "string") {
|
|
31
|
+
let res = yield fetch(colorTables);
|
|
32
|
+
dataSet = yield res.json();
|
|
33
|
+
}
|
|
34
|
+
let colorsArray = typeof colorTables === "string" ?
|
|
35
|
+
colorTableData(colorName, dataSet)
|
|
36
|
+
:
|
|
37
|
+
colorTableData(colorName, colorTables);
|
|
38
|
+
Object.keys(discreteData).forEach((key) => {
|
|
39
|
+
// eslint-disable-next-line
|
|
40
|
+
let code = discreteData[key][1];
|
|
41
|
+
// compare the first value in colorarray(colortable) and code from discreteData
|
|
42
|
+
const matchedColorsArrays = colorsArray.find((value) => {
|
|
43
|
+
return value[0] == code;
|
|
30
44
|
});
|
|
31
|
-
|
|
45
|
+
if (matchedColorsArrays)
|
|
46
|
+
itemColor.push({
|
|
47
|
+
color: RGBToHex(matchedColorsArrays),
|
|
48
|
+
});
|
|
49
|
+
itemName.push(key);
|
|
50
|
+
});
|
|
51
|
+
function RGBToHex(rgb) {
|
|
52
|
+
let r = rgb[1].toString(16), g = rgb[2].toString(16), b = rgb[3].toString(16);
|
|
53
|
+
if (r.length == 1)
|
|
54
|
+
r = "0" + r;
|
|
55
|
+
if (g.length == 1)
|
|
56
|
+
g = "0" + g;
|
|
57
|
+
if (b.length == 1)
|
|
58
|
+
b = "0" + b;
|
|
59
|
+
return "#" + r + g + b;
|
|
60
|
+
}
|
|
61
|
+
const ordinalValues = scaleOrdinal().domain(itemName);
|
|
62
|
+
const colorLegend = legendUtil(itemColor).inputScale(ordinalValues);
|
|
63
|
+
const legendLength = itemColor.length;
|
|
64
|
+
const calcLegendHeight = 22 * legendLength + 4 * legendLength;
|
|
65
|
+
const selectedLegend = select(divRef.current);
|
|
66
|
+
selectedLegend
|
|
67
|
+
.append("div")
|
|
68
|
+
.text(dataObjectName)
|
|
69
|
+
.attr("y", 7)
|
|
70
|
+
.style("color", "#6F6F6F")
|
|
71
|
+
.style("margin", "10px 10px");
|
|
72
|
+
if (horizontal)
|
|
73
|
+
selectedLegend.style("height", 150 + "px");
|
|
74
|
+
const svgLegend = selectedLegend
|
|
75
|
+
.append("svg")
|
|
76
|
+
.style("margin", "10px 10px")
|
|
77
|
+
.call(colorLegend);
|
|
78
|
+
if (colorLegend && !horizontal) {
|
|
79
|
+
svgLegend
|
|
80
|
+
.attr("height", calcLegendHeight + "px")
|
|
81
|
+
.attr("width", 220 + "px");
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
svgLegend
|
|
85
|
+
.style("transform", "rotate(90deg)")
|
|
86
|
+
.attr("width", calcLegendHeight + "px")
|
|
87
|
+
.attr("height", calcLegendHeight + "px");
|
|
88
|
+
}
|
|
32
89
|
});
|
|
33
|
-
function RGBToHex(rgb) {
|
|
34
|
-
let r = rgb[1].toString(16), g = rgb[2].toString(16), b = rgb[3].toString(16);
|
|
35
|
-
if (r.length == 1)
|
|
36
|
-
r = "0" + r;
|
|
37
|
-
if (g.length == 1)
|
|
38
|
-
g = "0" + g;
|
|
39
|
-
if (b.length == 1)
|
|
40
|
-
b = "0" + b;
|
|
41
|
-
return "#" + r + g + b;
|
|
42
|
-
}
|
|
43
|
-
const ordinalValues = scaleOrdinal().domain(itemName);
|
|
44
|
-
const colorLegend = legendUtil(itemColor).inputScale(ordinalValues);
|
|
45
|
-
const legendLength = itemColor.length;
|
|
46
|
-
const calcLegendHeight = 22 * legendLength + 4 * legendLength;
|
|
47
|
-
const selectedLegend = select(divRef.current);
|
|
48
|
-
selectedLegend
|
|
49
|
-
.append("div")
|
|
50
|
-
.text(dataObjectName)
|
|
51
|
-
.attr("y", 7)
|
|
52
|
-
.style("color", "#6F6F6F")
|
|
53
|
-
.style("margin", "10px 10px");
|
|
54
|
-
if (horizontal)
|
|
55
|
-
selectedLegend.style("height", 150 + "px");
|
|
56
|
-
const svgLegend = selectedLegend
|
|
57
|
-
.append("svg")
|
|
58
|
-
.style("margin", "10px 10px")
|
|
59
|
-
.call(colorLegend);
|
|
60
|
-
if (colorLegend && !horizontal) {
|
|
61
|
-
svgLegend
|
|
62
|
-
.attr("height", calcLegendHeight + "px")
|
|
63
|
-
.attr("width", 220 + "px");
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
svgLegend
|
|
67
|
-
.style("transform", "rotate(90deg)")
|
|
68
|
-
.attr("width", calcLegendHeight + "px")
|
|
69
|
-
.attr("height", calcLegendHeight + "px");
|
|
70
|
-
}
|
|
71
90
|
}
|
|
72
91
|
return (React.createElement("div", { style: {
|
|
73
92
|
position: "absolute",
|
|
@@ -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,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAgB1C,MAAM,CAAC,MAAM,mBAAmB,GAA+B,CAAC,EAC5D,YAAY,EACZ,cAAc,EACd,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,cAAc,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;AACrE,CAAC;AAED,mBAAmB,CAAC,YAAY,GAAG;IAC/B,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;CACpB,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import * as d3 from "d3";
|
|
2
|
+
export const d3ColorScales = [
|
|
3
|
+
{
|
|
4
|
+
"name": "Spectral",
|
|
5
|
+
"discrete": false,
|
|
6
|
+
"colors": d3.interpolateSpectral
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"name": "RdYlBu",
|
|
10
|
+
"discrete": false,
|
|
11
|
+
"colors": d3.interpolateRdYlBu
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "Warm",
|
|
15
|
+
"discrete": false,
|
|
16
|
+
"colors": d3.interpolateWarm
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "Cool",
|
|
20
|
+
"discrete": false,
|
|
21
|
+
"colors": d3.interpolateCool
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "Viridis",
|
|
25
|
+
"discrete": false,
|
|
26
|
+
"colors": d3.interpolateViridis
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "Inferno",
|
|
30
|
+
"discrete": false,
|
|
31
|
+
"colors": d3.interpolateInferno
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "Accent",
|
|
35
|
+
"discrete": true,
|
|
36
|
+
"colors": d3.schemeAccent
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "Dark2",
|
|
40
|
+
"discrete": true,
|
|
41
|
+
"colors": d3.schemeDark2
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "Paired",
|
|
45
|
+
"discrete": true,
|
|
46
|
+
"colors": d3.schemePaired
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "Pastel1",
|
|
50
|
+
"discrete": true,
|
|
51
|
+
"colors": d3.schemePastel1
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "Pastel2",
|
|
55
|
+
"discrete": true,
|
|
56
|
+
"colors": d3.schemePastel2
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "Set1",
|
|
60
|
+
"discrete": true,
|
|
61
|
+
"colors": d3.schemeSet1
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "Set2",
|
|
65
|
+
"discrete": true,
|
|
66
|
+
"colors": d3.schemeSet3
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "Set3",
|
|
70
|
+
"discrete": true,
|
|
71
|
+
"colors": d3.schemeSet3
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "Tableau10",
|
|
75
|
+
"discrete": true,
|
|
76
|
+
"colors": d3.schemeTableau10
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "Category10",
|
|
80
|
+
"discrete": true,
|
|
81
|
+
"colors": d3.schemeCategory10
|
|
82
|
+
},
|
|
83
|
+
];
|
|
84
|
+
//# sourceMappingURL=d3ColorScale.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"d3ColorScale.js","sourceRoot":"","sources":["../../../src/component/Utils/d3ColorScale.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B;QACE,MAAM,EAAE,UAAU;QAClB,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,EAAE,CAAC,mBAAmB;KACjC;IACD;QACE,MAAM,EAAE,QAAQ;QAChB,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,EAAE,CAAC,iBAAiB;KAC/B;IACD;QACE,MAAM,EAAE,MAAM;QACd,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,EAAE,CAAC,eAAe;KAC7B;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gBAAgB;KAC9B;CACF,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// eslint-disable-next-line
|
|
2
|
-
export default function
|
|
2
|
+
export default function discreteLegendUtil(itemColor, ColorSelector) {
|
|
3
3
|
let legendValues = [];
|
|
4
4
|
const cellWidth = 22;
|
|
5
5
|
const cellHeight = 22;
|
|
@@ -15,25 +15,36 @@ export default function legendUtil(itemColor) {
|
|
|
15
15
|
.append("rect")
|
|
16
16
|
.attr("height", cellHeight)
|
|
17
17
|
.attr("width", cellWidth)
|
|
18
|
-
.style("stroke", "black")
|
|
19
|
-
.style("stroke-width", "1px")
|
|
20
18
|
.style("fill", function (d) {
|
|
21
19
|
return d["color"];
|
|
22
20
|
});
|
|
21
|
+
if (!ColorSelector) {
|
|
22
|
+
g.selectAll("g.legendCells.rect").style("stroke", "black").style("stroke-width", "1px");
|
|
23
|
+
}
|
|
23
24
|
// Display the label
|
|
24
|
-
|
|
25
|
-
.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
if (!ColorSelector) {
|
|
26
|
+
g.selectAll("g.legendCells")
|
|
27
|
+
.append("text")
|
|
28
|
+
.attr("class", "breakLabels")
|
|
29
|
+
.style("fill", "#6F6F6F")
|
|
30
|
+
.attr("x", cellWidth + cellPadding)
|
|
31
|
+
.attr("y", 5 + cellHeight / 2)
|
|
32
|
+
.text(function (d) {
|
|
33
|
+
return d["label"];
|
|
34
|
+
});
|
|
35
|
+
}
|
|
33
36
|
// Alighment of cell in straight line
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
if (!ColorSelector) {
|
|
38
|
+
g.selectAll("g.legendCells").attr("transform", function (_d, i) {
|
|
39
|
+
return ("translate(0," + i * (cellHeight + cellPadding) + ")");
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
if (ColorSelector) {
|
|
43
|
+
g.selectAll("g.legendCells")
|
|
44
|
+
.attr("transform", function (d) {
|
|
45
|
+
return "translate(" + (d.label * cellWidth) + ",0)";
|
|
46
|
+
});
|
|
47
|
+
}
|
|
37
48
|
}
|
|
38
49
|
// display the discrete legend
|
|
39
50
|
g.selectAll("g.legendCells")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discreteLegend.js","sourceRoot":"","sources":["../../../src/component/Utils/discreteLegend.ts"],"names":[],"mappings":"AAIA,2BAA2B;AAC3B,MAAM,CAAC,OAAO,UAAU,
|
|
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,aAAsB;IACrF,IAAI,YAAY,GAAgB,EAAE,CAAC;IACnC,MAAM,SAAS,GAAG,EAAE,CAAC;IACrB,MAAM,UAAU,GAAQ,EAAE,CAAC;IAC3B,MAAM,WAAW,GAAG,CAAC,CAAC;IAEtB,2BAA2B;IAC3B,SAAS,MAAM,CAAC,CAAM;QAClB,SAAS,UAAU;YACf,SAAS,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;gBAC9B,YAAY,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;YAC3C,CAAC,CAAC,CAAC;YACH,yBAAyB;YACzB,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC;iBACvB,MAAM,CAAC,MAAM,CAAC;iBACd,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;iBAC1B,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC;iBACxB,KAAK,CAAC,MAAM,EAAE,UAAU,CAA0B;gBAC/C,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;YACtB,CAAC,CAAC,CAAC;YACP,IAAI,CAAC,aAAa,EAAE;gBAChB,CAAC,CAAC,SAAS,CAAC,oBAAoB,CAA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,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;QACjB,YAAY,GAAG,EAAE,CAAC;QAClB,KAAK,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,UAAU,EAAU;YACvC,MAAM,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;IACF,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export { ColorSelectorWrapper as component };
|
|
3
|
+
export const title: string;
|
|
4
|
+
}
|
|
5
|
+
export default _default;
|
|
6
|
+
export const selectorTemplate: any;
|
|
7
|
+
import { ColorSelectorWrapper } from "../../../component/ColorSelector/ColorTableSelectorWrapper";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ColorSelectorWrapper } from "../../../component/ColorSelector/ColorTableSelectorWrapper";
|
|
3
|
+
export default {
|
|
4
|
+
component: ColorSelectorWrapper,
|
|
5
|
+
title: "Legends/ColorSelector",
|
|
6
|
+
};
|
|
7
|
+
const Template = (args) => {
|
|
8
|
+
return React.createElement(ColorSelectorWrapper, null);
|
|
9
|
+
};
|
|
10
|
+
export const selectorTemplate = Template.bind({});
|
|
11
|
+
//# sourceMappingURL=Selector.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Selector.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/ColorSelector/Selector.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,4DAA4D,CAAC;AAClG,eAAe;IACX,SAAS,EAAE,oBAAoB;IAC/B,KAAK,EAAE,uBAAuB;CACjC,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE;IACtB,OAAO,oBAAC,oBAAoB,OAAG,CAAC;AACpC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC"}
|
|
File without changes
|
|
@@ -9,7 +9,6 @@ const min = 2918;
|
|
|
9
9
|
const max = 4770;
|
|
10
10
|
const dataObjectName = "Wells / MD";
|
|
11
11
|
const position = [16, 10];
|
|
12
|
-
const name = "MD";
|
|
13
12
|
const horizontal = true;
|
|
14
13
|
const colorName = "Time/Depth";
|
|
15
14
|
const Template = (args) => {
|
|
@@ -21,7 +20,6 @@ MDTemplate.args = {
|
|
|
21
20
|
max,
|
|
22
21
|
dataObjectName,
|
|
23
22
|
position,
|
|
24
|
-
name,
|
|
25
23
|
colorName,
|
|
26
24
|
colorTables,
|
|
27
25
|
horizontal,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MD.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/ContinousLegends/MD.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,gBAAgB,EAAC,MAAM,4CAA4C,CAAC;AAC5E,eAAe;IACX,SAAS,EAAE,gBAAgB;IAC3B,KAAK,EAAE,yBAAyB;CACnC,CAAC;AACF,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAE/D,MAAM,GAAG,GAAG,IAAI,CAAC;AACjB,MAAM,GAAG,GAAG,IAAI,CAAC;AACjB,MAAM,cAAc,GAAG,YAAY,CAAC;AACpC,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1B,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,SAAS,GAAG,YAAY,CAAC;AAE/B,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE;IACtB,OAAO,oBAAC,gBAAgB,oBAAK,IAAI,EAAI,CAAC;AAC1C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5C,UAAU,CAAC,IAAI,GAAG;IACd,GAAG;IACH,GAAG;IACH,cAAc;IACd,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;CACb,CAAC"}
|
|
File without changes
|
|
@@ -9,7 +9,6 @@ const min = 0;
|
|
|
9
9
|
const max = 1;
|
|
10
10
|
const dataObjectName = "Wells / NTG";
|
|
11
11
|
const position = [16, 10];
|
|
12
|
-
const name = "NTG";
|
|
13
12
|
const horizontal = true;
|
|
14
13
|
const colorName = "Rainbow";
|
|
15
14
|
const Template = (args) => {
|
|
@@ -21,7 +20,6 @@ NTGTemplate.args = {
|
|
|
21
20
|
max,
|
|
22
21
|
dataObjectName,
|
|
23
22
|
position,
|
|
24
|
-
name,
|
|
25
23
|
colorName,
|
|
26
24
|
colorTables,
|
|
27
25
|
horizontal,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NTG.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/ContinousLegends/NTG.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,gBAAgB,EAAC,MAAM,4CAA4C,CAAC;AAC5E,eAAe;IACX,SAAS,EAAE,gBAAgB;IAC3B,KAAK,EAAE,yBAAyB;CACnC,CAAC;AACF,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAE/D,MAAM,GAAG,GAAG,CAAC,CAAC;AACd,MAAM,GAAG,GAAG,CAAC,CAAC;AACd,MAAM,cAAc,GAAG,aAAa,CAAC;AACrC,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1B,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,SAAS,GAAG,SAAS,CAAC;AAE5B,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE;IACtB,OAAO,oBAAC,gBAAgB,oBAAK,IAAI,EAAI,CAAC;AAC1C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC7C,WAAW,CAAC,IAAI,GAAG;IACf,GAAG;IACH,GAAG;IACH,cAAc;IACd,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;CACb,CAAC"}
|
|
File without changes
|
|
@@ -9,7 +9,6 @@ const min = -999;
|
|
|
9
9
|
const max = 14023;
|
|
10
10
|
const dataObjectName = "Wells / PERMTOT";
|
|
11
11
|
const position = [16, 10];
|
|
12
|
-
const name = "PERM_TOT";
|
|
13
12
|
const horizontal = true;
|
|
14
13
|
const colorName = "Porosity";
|
|
15
14
|
const Template = (args) => {
|
|
@@ -21,7 +20,6 @@ PermTotTemplate.args = {
|
|
|
21
20
|
max,
|
|
22
21
|
dataObjectName,
|
|
23
22
|
position,
|
|
24
|
-
name,
|
|
25
23
|
colorName,
|
|
26
24
|
colorTables,
|
|
27
25
|
horizontal,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PermTot.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/ContinousLegends/PermTot.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,gBAAgB,EAAC,MAAM,4CAA4C,CAAC;AAC5E,eAAe;IACX,SAAS,EAAE,gBAAgB;IAC3B,KAAK,EAAE,yBAAyB;CACnC,CAAC;AACF,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAE/D,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC;AACjB,MAAM,GAAG,GAAG,KAAK,CAAC;AAClB,MAAM,cAAc,GAAG,iBAAiB,CAAC;AACzC,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1B,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,SAAS,GAAG,UAAU,CAAC;AAE7B,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE;IACtB,OAAO,oBAAC,gBAAgB,oBAAK,IAAI,EAAI,CAAC;AAC1C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACjD,eAAe,CAAC,IAAI,GAAG;IACnB,GAAG;IACH,GAAG;IACH,cAAc;IACd,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;CACb,CAAC"}
|
package/dist/stories/ColorLegends/{ContinousLgends → ContinousLegends}/Permeability.stories.d.ts
RENAMED
|
File without changes
|
package/dist/stories/ColorLegends/{ContinousLgends → ContinousLegends}/Permeability.stories.js
RENAMED
|
@@ -9,7 +9,6 @@ const min = -999;
|
|
|
9
9
|
const max = 14023;
|
|
10
10
|
const dataObjectName = "Wells / PERM";
|
|
11
11
|
const position = [16, 10];
|
|
12
|
-
const name = "PERM";
|
|
13
12
|
const horizontal = true;
|
|
14
13
|
const colorName = "Permeability";
|
|
15
14
|
const Template = (args) => {
|
|
@@ -21,7 +20,6 @@ PermeabilityTemplate.args = {
|
|
|
21
20
|
max,
|
|
22
21
|
dataObjectName,
|
|
23
22
|
position,
|
|
24
|
-
name,
|
|
25
23
|
colorName,
|
|
26
24
|
colorTables,
|
|
27
25
|
horizontal,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Permeability.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/ContinousLegends/Permeability.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,gBAAgB,EAAC,MAAM,4CAA4C,CAAC;AAC5E,eAAe;IACX,SAAS,EAAE,gBAAgB;IAC3B,KAAK,EAAE,yBAAyB;CACnC,CAAC;AACF,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAE/D,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC;AACjB,MAAM,GAAG,GAAG,KAAK,CAAC;AAClB,MAAM,cAAc,GAAG,cAAc,CAAC;AACtC,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1B,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,SAAS,GAAG,cAAc,CAAC;AAEjC,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE;IACtB,OAAO,oBAAC,gBAAgB,oBAAK,IAAI,EAAI,CAAC;AAC1C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtD,oBAAoB,CAAC,IAAI,GAAG;IACxB,GAAG;IACH,GAAG;IACH,cAAc;IACd,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;CACb,CAAC"}
|
|
File without changes
|
|
@@ -9,7 +9,6 @@ const min = 0;
|
|
|
9
9
|
const max = 0.35;
|
|
10
10
|
const dataObjectName = "Wells / POROTOT";
|
|
11
11
|
const position = [16, 10];
|
|
12
|
-
const name = "PORO";
|
|
13
12
|
const horizontal = true;
|
|
14
13
|
const colorName = "Porosity";
|
|
15
14
|
const Template = (args) => {
|
|
@@ -21,7 +20,6 @@ PoroTotTemplate.args = {
|
|
|
21
20
|
max,
|
|
22
21
|
dataObjectName,
|
|
23
22
|
position,
|
|
24
|
-
name,
|
|
25
23
|
colorName,
|
|
26
24
|
colorTables,
|
|
27
25
|
horizontal,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PoroTot.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/ContinousLegends/PoroTot.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,gBAAgB,EAAC,MAAM,4CAA4C,CAAC;AAC5E,eAAe;IACX,SAAS,EAAE,gBAAgB;IAC3B,KAAK,EAAE,yBAAyB;CACnC,CAAC;AACF,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAE/D,MAAM,GAAG,GAAG,CAAC,CAAC;AACd,MAAM,GAAG,GAAG,IAAI,CAAC;AACjB,MAAM,cAAc,GAAG,iBAAiB,CAAC;AACzC,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1B,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,SAAS,GAAG,UAAU,CAAC;AAE7B,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE;IACtB,OAAO,oBAAC,gBAAgB,oBAAK,IAAI,EAAI,CAAC;AAC1C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACjD,eAAe,CAAC,IAAI,GAAG;IACnB,GAAG;IACH,GAAG;IACH,cAAc;IACd,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;CACb,CAAC"}
|
package/dist/stories/ColorLegends/{ContinousLgends → ContinousLegends}/Porosity.stories.d.ts
RENAMED
|
File without changes
|
|
@@ -9,7 +9,6 @@ const min = 0;
|
|
|
9
9
|
const max = 0.35;
|
|
10
10
|
const dataObjectName = "Wells / PORO";
|
|
11
11
|
const position = [16, 10];
|
|
12
|
-
const name = "PORO";
|
|
13
12
|
const horizontal = true;
|
|
14
13
|
const colorName = "Porosity";
|
|
15
14
|
const Template = (args) => {
|
|
@@ -21,7 +20,6 @@ PorosityTemplate.args = {
|
|
|
21
20
|
max,
|
|
22
21
|
dataObjectName,
|
|
23
22
|
position,
|
|
24
|
-
name,
|
|
25
23
|
colorName,
|
|
26
24
|
colorTables,
|
|
27
25
|
horizontal,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Porosity.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/ContinousLegends/Porosity.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,gBAAgB,EAAC,MAAM,4CAA4C,CAAC;AAC5E,eAAe;IACX,SAAS,EAAE,gBAAgB;IAC3B,KAAK,EAAE,yBAAyB;CACnC,CAAC;AACF,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAE/D,MAAM,GAAG,GAAG,CAAC,CAAC;AACd,MAAM,GAAG,GAAG,IAAI,CAAC;AACjB,MAAM,cAAc,GAAG,cAAc,CAAC;AACtC,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1B,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,SAAS,GAAG,UAAU,CAAC;AAE7B,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE;IACtB,OAAO,oBAAC,gBAAgB,oBAAK,IAAI,EAAI,CAAC;AAC1C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAClD,gBAAgB,CAAC,IAAI,GAAG;IACpB,GAAG;IACH,GAAG;IACH,cAAc;IACd,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;CACb,CAAC"}
|
|
File without changes
|
|
@@ -9,9 +9,8 @@ const min = 0;
|
|
|
9
9
|
const max = 1;
|
|
10
10
|
const dataObjectName = "Wells / SW";
|
|
11
11
|
const position = [16, 10];
|
|
12
|
-
const name = "SW";
|
|
13
12
|
const horizontal = true;
|
|
14
|
-
const colorName = "
|
|
13
|
+
const colorName = "Rainbow";
|
|
15
14
|
const Template = (args) => {
|
|
16
15
|
return React.createElement(ContinuousLegend, Object.assign({}, args));
|
|
17
16
|
};
|
|
@@ -21,8 +20,7 @@ SWTemplate.args = {
|
|
|
21
20
|
max,
|
|
22
21
|
dataObjectName,
|
|
23
22
|
position,
|
|
24
|
-
|
|
25
|
-
Physics,
|
|
23
|
+
colorName,
|
|
26
24
|
colorTables,
|
|
27
25
|
horizontal,
|
|
28
26
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SW.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/ContinousLegends/SW.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,gBAAgB,EAAC,MAAM,4CAA4C,CAAC;AAC5E,eAAe;IACX,SAAS,EAAE,gBAAgB;IAC3B,KAAK,EAAE,yBAAyB;CACnC,CAAC;AACF,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAE/D,MAAM,GAAG,GAAG,CAAC,CAAC;AACd,MAAM,GAAG,GAAG,CAAC,CAAC;AACd,MAAM,cAAc,GAAG,YAAY,CAAC;AACpC,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1B,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,SAAS,GAAG,SAAS,CAAC;AAE5B,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE;IACtB,OAAO,oBAAC,gBAAgB,oBAAK,IAAI,EAAI,CAAC;AAC1C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5C,UAAU,CAAC,IAAI,GAAG;IACd,GAAG;IACH,GAAG;IACH,cAAc;IACd,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;CACb,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emerson-eps/color-tables",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Standard library of color tables for geological domain",
|
|
5
5
|
"release": {
|
|
6
6
|
"branches": [
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"semantic-release": "semantic-release"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
+
"@equinor/eds-core-react": "^0.17.0",
|
|
19
20
|
"d3": "^7.2.0",
|
|
20
21
|
"d3-color": "^3.0.1",
|
|
21
22
|
"d3-interpolate": "^3.0.1",
|
|
@@ -57,6 +58,7 @@
|
|
|
57
58
|
"@testing-library/react": "^12.1.2",
|
|
58
59
|
"@testing-library/user-event": "^13.5.0",
|
|
59
60
|
"@types/d3": "^7.1.0",
|
|
61
|
+
"@types/styled-components": "^5.1.23",
|
|
60
62
|
"babel-loader": "^8.1.0",
|
|
61
63
|
"semantic-release": "^19.0.2",
|
|
62
64
|
"ts-loader": "^9.2.6",
|