@emerson-eps/color-tables 0.2.1 → 0.2.4

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.
Files changed (60) hide show
  1. package/dist/component/ColorSelector/ColorSelectorAccordion.d.ts +2 -0
  2. package/dist/component/ColorSelector/{ColorTableSelectorWrapper.js → ColorSelectorAccordion.js} +12 -7
  3. package/dist/component/ColorSelector/ColorSelectorAccordion.js.map +1 -0
  4. package/dist/component/ColorSelector/ColorSelectorComponent.d.ts +12 -3
  5. package/dist/component/ColorSelector/ColorSelectorComponent.js +254 -51
  6. package/dist/component/ColorSelector/ColorSelectorComponent.js.map +1 -1
  7. package/dist/component/ColorSelector/ColorSelectorWrapper.d.ts +8 -0
  8. package/dist/component/ColorSelector/ColorSelectorWrapper.js +64 -0
  9. package/dist/component/ColorSelector/ColorSelectorWrapper.js.map +1 -0
  10. package/dist/component/Legend/ColorLegend.d.ts +13 -0
  11. package/dist/component/Legend/ColorLegend.js +26 -0
  12. package/dist/component/Legend/ColorLegend.js.map +1 -0
  13. package/dist/component/Legend/ContinuousLegend.d.ts +2 -1
  14. package/dist/component/Legend/ContinuousLegend.js +162 -71
  15. package/dist/component/Legend/ContinuousLegend.js.map +1 -1
  16. package/dist/component/Legend/DiscreteLegend.d.ts +3 -1
  17. package/dist/component/Legend/DiscreteLegend.js +132 -57
  18. package/dist/component/Legend/DiscreteLegend.js.map +1 -1
  19. package/dist/component/Utils/discreteLegend.d.ts +1 -1
  20. package/dist/component/Utils/discreteLegend.js +70 -50
  21. package/dist/component/Utils/discreteLegend.js.map +1 -1
  22. package/dist/component/color-tables.json +4 -4
  23. package/dist/stories/ColorLegends/ColorSelector/Selector.stories.d.ts +2 -2
  24. package/dist/stories/ColorLegends/ColorSelector/Selector.stories.js +3 -3
  25. package/dist/stories/ColorLegends/ColorSelector/Selector.stories.js.map +1 -1
  26. package/dist/stories/ColorLegends/DiscreteLegends/Facies.stories.js +11 -11
  27. package/dist/stories/ColorLegends/DiscreteLegends/Facies.stories.js.map +1 -1
  28. package/dist/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.js +1 -1
  29. package/dist/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.js.map +1 -1
  30. package/dist/stories/ColorLegends/LegendWithSelector/DiscreteLegendWithSelector.stories.d.ts +7 -0
  31. package/dist/stories/ColorLegends/LegendWithSelector/DiscreteLegendWithSelector.stories.js +41 -0
  32. package/dist/stories/ColorLegends/LegendWithSelector/DiscreteLegendWithSelector.stories.js.map +1 -0
  33. package/dist/stories/ColorLegends/LegendWithSelector/LegendWithSelector.stories.d.ts +7 -0
  34. package/dist/stories/ColorLegends/LegendWithSelector/LegendWithSelector.stories.js +27 -0
  35. package/dist/stories/ColorLegends/LegendWithSelector/LegendWithSelector.stories.js.map +1 -0
  36. package/dist/stories/ColorLegends/SingleComponent/Single.stories.d.ts +7 -0
  37. package/dist/stories/ColorLegends/SingleComponent/Single.stories.js +47 -0
  38. package/dist/stories/ColorLegends/SingleComponent/Single.stories.js.map +1 -0
  39. package/package.json +3 -3
  40. package/src/component/ColorSelector/{ColorTableSelectorWrapper.tsx → ColorSelectorAccordion.tsx} +11 -6
  41. package/src/component/ColorSelector/ColorSelectorComponent.tsx +308 -93
  42. package/src/component/ColorSelector/ColorSelectorWrapper.tsx +118 -0
  43. package/src/component/Legend/ColorLegend.tsx +81 -0
  44. package/src/component/Legend/ContinuousLegend.tsx +164 -74
  45. package/src/component/Legend/DiscreteLegend.tsx +132 -58
  46. package/src/component/Utils/continousLegend.ts +1 -1
  47. package/src/component/Utils/discreteLegend.ts +77 -52
  48. package/src/component/color-tables.json +4 -4
  49. package/src/stories/ColorLegends/ColorSelector/Selector.stories.jsx +3 -3
  50. package/src/stories/ColorLegends/DiscreteLegends/Facies.stories.jsx +39 -39
  51. package/src/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.jsx +1 -1
  52. package/src/stories/ColorLegends/LegendWithSelector/DiscreteLegendWithSelector.stories.jsx +44 -0
  53. package/src/stories/ColorLegends/LegendWithSelector/LegendWithSelector.stories.jsx +30 -0
  54. package/src/stories/ColorLegends/SingleComponent/Single.stories.jsx +51 -0
  55. package/dist/component/ColorSelector/ColorTableSelectorWrapper.d.ts +0 -2
  56. package/dist/component/ColorSelector/ColorTableSelectorWrapper.js.map +0 -1
  57. package/dist/component/ColorSelector/legendComponent.d.ts +0 -14
  58. package/dist/component/ColorSelector/legendComponent.js +0 -228
  59. package/dist/component/ColorSelector/legendComponent.js.map +0 -1
  60. package/src/component/ColorSelector/legendComponent.tsx +0 -289
@@ -1,71 +1,91 @@
1
1
  // eslint-disable-next-line
2
- export default function discreteLegendUtil(itemColor, ColorSelector) {
3
- let legendValues = [];
4
- const cellWidth = 22;
5
- const cellHeight = 22;
6
- const cellPadding = 4;
2
+ export default function discreteLegendUtil(itemColor, isSelectorLegend) {
3
+ var cellWidth = 22;
4
+ var cellHeight = 22;
5
+ const cellPadding = 2;
6
+ if (isSelectorLegend) {
7
+ cellWidth = 25;
8
+ cellHeight = 22;
9
+ }
10
+ //let legendValues: ItemColor[] = [];
7
11
  // eslint-disable-next-line
8
12
  function legend(g) {
9
13
  function drawLegend() {
10
- itemColor.forEach((item, index) => {
11
- legendValues[index].color = item.color;
12
- });
13
14
  // Code to fill the color
14
- g.selectAll("g.legendCells")
15
- .append("rect")
16
- .attr("height", cellHeight)
17
- .attr("width", cellWidth)
18
- .style("fill", function (d) {
19
- return d["color"];
20
- });
21
- if (!ColorSelector) {
22
- g.selectAll("g.legendCells.rect").style("stroke", "black").style("stroke-width", "1px");
23
- }
24
- // Display the label
25
- if (!ColorSelector) {
15
+ // Styling for color selector legend
16
+ if (isSelectorLegend) {
26
17
  g.selectAll("g.legendCells")
18
+ .data(itemColor)
19
+ .enter()
20
+ .append("g")
21
+ .append("rect");
22
+ g.selectAll("rect")
23
+ .attr("x", function (d, i) {
24
+ console.log(d);
25
+ return i;
26
+ })
27
+ .attr("y", 0)
28
+ .attr("height", 1)
29
+ .attr("width", 1)
30
+ .style("fill", function (d) {
31
+ return d["color"];
32
+ });
33
+ // Display the labels for legend
34
+ g.selectAll("g")
35
+ .style("background", "grey")
27
36
  .append("text")
28
37
  .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"];
38
+ .style("font-size", "0.4")
39
+ //.attr("x", cellWidth + cellPadding)
40
+ //.attr("y", 5 + cellHeight / 2)
41
+ .attr("x", function (d, i) {
42
+ console.log(d);
43
+ return i + "." + 25;
44
+ })
45
+ .attr("y", 1.5)
46
+ .text(function (d, i) {
47
+ console.log(d);
48
+ return i;
34
49
  });
35
50
  }
36
- // Alighment of cell in straight line
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) {
51
+ // styling for main legend
52
+ else {
43
53
  g.selectAll("g.legendCells")
44
- .attr("transform", function (d) {
45
- return "translate(" + (d.label * cellWidth) + ",0)";
54
+ .append("rect")
55
+ .attr("height", cellHeight)
56
+ .attr("width", cellWidth)
57
+ .style("fill", function (d) {
58
+ return d["color"];
59
+ });
60
+ // Alighment of cell in straight line
61
+ g.selectAll("g.legendCells").attr("transform", function (_d, i) {
62
+ return ("translate(0," + i * (cellHeight + cellPadding) + ")"
63
+ //"translate(0," + i + ")"
64
+ );
46
65
  });
47
66
  }
48
67
  }
49
68
  // display the discrete legend
50
- g.selectAll("g.legendCells")
51
- .data(legendValues)
52
- .enter()
53
- .append("g")
54
- .attr("class", "legendCells");
69
+ if (!isSelectorLegend) {
70
+ g.selectAll("g.legendCells")
71
+ .data(itemColor)
72
+ .enter()
73
+ .append("g")
74
+ .attr("class", "legendCells");
75
+ }
55
76
  drawLegend();
56
77
  }
57
78
  // eslint-disable-next-line
58
- legend.inputScale = function (newScale) {
59
- // eslint-disable-next-line
60
- let scale = {};
61
- scale = newScale;
62
- legendValues = [];
63
- scale.domain().forEach(function (el) {
64
- const cellObject = { color: scale(el), label: el };
65
- legendValues.push(cellObject);
66
- });
67
- return this;
68
- };
79
+ // legend.inputScale = function (newScale: any) {
80
+ // // eslint-disable-next-line
81
+ // let scale: any = {};
82
+ // scale = newScale;
83
+ // scale.domain().forEach(function (el: any) {
84
+ // const cellObject = { color: scale(el), label: el };
85
+ // legendValues.push(cellObject);
86
+ // });
87
+ // return this;
88
+ // };
69
89
  return legend;
70
90
  }
71
91
  //# sourceMappingURL=discreteLegend.js.map
@@ -1 +1 @@
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;Y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,GAAG,CAAC;aACX,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;QAClC,UAAU,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"}
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;IACzF,IAAI,SAAS,GAAG,EAAE,CAAC;IACnB,IAAI,UAAU,GAAG,EAAE,CAAC;IACpB,MAAM,WAAW,GAAG,CAAC,CAAC;IAEtB,IAAI,gBAAgB,EAAE;QAClB,SAAS,GAAG,EAAE,CAAC;QACf,UAAU,GAAG,EAAE,CAAC;KACnB;IAED,qCAAqC;IAErC,2BAA2B;IAC3B,SAAS,MAAM,CAAC,CAAM;QAClB,SAAS,UAAU;YACf,yBAAyB;YACzB,oCAAoC;YACpC,IAAI,gBAAgB,EAAE;gBAClB,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC;qBACvB,IAAI,CAAC,SAAS,CAAC;qBACf,KAAK,EAAE;qBACP,MAAM,CAAC,GAAG,CAAC;qBACX,MAAM,CAAC,MAAM,CAAC,CA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qBACxB,KAAK,CAAC,MAAM,EAAE,UAAU,CAA0B;oBAC/C,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;gBACtB,CAAC,CAAC,CAAC;gBACP,qCAAqC;gBACrC,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,IAAI,CAC7B,WAAW,EACX,UAAU,EAA2B,EAAE,CAAS;oBAC5C,OAAO,CACJ,cAAc,GAAG,CAAC,GAAG,CAAC,UAAU,GAAG,WAAW,CAAC,GAAG,GAAG;oBACrD,0BAA0B;qBAC5B,CAAC;gBACN,CAAC,CACJ,CAAC;aACL;QACL,CAAC;QAED,8BAA8B;QAC9B,IAAI,CAAC,gBAAgB,EAAE;YACnB,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC;iBAC3B,IAAI,CAAC,SAAS,CAAC;iBACf,KAAK,EAAE;iBACP,MAAM,CAAC,GAAG,CAAC;iBACX,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,CAAA;SAChC;QAED,UAAU,EAAE,CAAC;IACjB,CAAC;IACD,2BAA2B;IAC3B,iDAAiD;IACjD,kCAAkC;IAClC,2BAA2B;IAC3B,wBAAwB;IAExB,kDAAkD;IAClD,8DAA8D;IAC9D,yCAAyC;IACzC,UAAU;IACV,mBAAmB;IACnB,KAAK;IAEL,OAAO,MAAM,CAAC;AAClB,CAAC"}
@@ -59,7 +59,7 @@
59
59
  ]
60
60
  },
61
61
  {
62
- "name": "Seismic BlueWhiteRed",
62
+ "name": "Seismic",
63
63
  "discrete": false,
64
64
  "colors": [
65
65
  [0.00, 0, 0, 255],
@@ -158,7 +158,7 @@
158
158
  ]
159
159
  },
160
160
  {
161
- "name": "Gas-Oil-Water",
161
+ "name": "GasOilWater",
162
162
  "discrete": true,
163
163
  "colors": [
164
164
  [0, 255, 46, 0],
@@ -168,7 +168,7 @@
168
168
  ]
169
169
  },
170
170
  {
171
- "name": "Gas-Water",
171
+ "name": "GasWater",
172
172
  "discrete": true,
173
173
  "colors": [
174
174
  [0, 255, 46, 0],
@@ -177,7 +177,7 @@
177
177
  ]
178
178
  },
179
179
  {
180
- "name": "Oil-Water",
180
+ "name": "OilWater",
181
181
  "discrete": true,
182
182
  "colors": [
183
183
  [0, 0, 184, 0],
@@ -1,7 +1,7 @@
1
1
  declare namespace _default {
2
- export { ColorSelectorWrapper as component };
2
+ export { ColorSelectorAccordion as component };
3
3
  export const title: string;
4
4
  }
5
5
  export default _default;
6
6
  export const selectorTemplate: any;
7
- import { ColorSelectorWrapper } from "../../../component/ColorSelector/ColorTableSelectorWrapper";
7
+ import { ColorSelectorAccordion } from "../../../component/ColorSelector/ColorSelectorAccordion";
@@ -1,11 +1,11 @@
1
1
  import * as React from "react";
2
- import { ColorSelectorWrapper } from "../../../component/ColorSelector/ColorTableSelectorWrapper";
2
+ import { ColorSelectorAccordion } from "../../../component/ColorSelector/ColorSelectorAccordion";
3
3
  export default {
4
- component: ColorSelectorWrapper,
4
+ component: ColorSelectorAccordion,
5
5
  title: "Legends/ColorSelector",
6
6
  };
7
7
  const Template = (args) => {
8
- return React.createElement(ColorSelectorWrapper, null);
8
+ return React.createElement(ColorSelectorAccordion, null);
9
9
  };
10
10
  export const selectorTemplate = Template.bind({});
11
11
  //# sourceMappingURL=Selector.stories.js.map
@@ -1 +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"}
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,sBAAsB,EAAE,MAAM,yDAAyD,CAAC;AACjG,eAAe;IACX,SAAS,EAAE,sBAAsB;IACjC,KAAK,EAAE,uBAAuB;CACjC,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE;IACtB,OAAO,oBAAC,sBAAsB,OAAG,CAAC;AACtC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC"}
@@ -6,22 +6,22 @@ export default {
6
6
  title: "Legends/DiscreteColorLegend",
7
7
  };
8
8
  const discreteData = {
9
- "OS": [[], 0],
10
- "LSF": [[], 1],
11
- "USF": [[], 2],
12
- "MB": [[], 3],
13
- "TB": [[], 4],
14
- "TC": [[], 5],
15
- "TFS": [[], 6],
16
- "TFM": [[], 7],
17
- "MSH": [[], 8],
18
- "CAL": [[], 9]
9
+ OS: [[], 0],
10
+ LSF: [[], 1],
11
+ USF: [[], 2],
12
+ MB: [[], 3],
13
+ TB: [[], 4],
14
+ TC: [[], 5],
15
+ TFS: [[], 6],
16
+ TFM: [[], 7],
17
+ MSH: [[], 8],
18
+ CAL: [[], 9],
19
19
  };
20
20
  const dataObjectName = "Wells / FACIES";
21
21
  const position = [16, 10];
22
22
  const horizontal = true;
23
23
  const colorName = "Facies";
24
- const Template = (args) => {
24
+ const Template = args => {
25
25
  return React.createElement(DiscreteColorLegend, Object.assign({}, args));
26
26
  };
27
27
  export const FaciesTemplate = Template.bind({});
@@ -1 +1 @@
1
- {"version":3,"file":"Facies.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/Facies.stories.jsx"],"names":[],"mappings":"AAAA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IACT,WAAW;IACX,UAAU;CACX,CAAC"}
@@ -12,7 +12,7 @@ const discreteData = {
12
12
  const dataObjectName = "Wells / FaultDistance_HUM";
13
13
  const position = [16, 10];
14
14
  const horizontal = true;
15
- const colorName = "Gas-Oil-Water";
15
+ const colorName = "GasOilWater";
16
16
  const Template = (args) => {
17
17
  return React.createElement(DiscreteColorLegend, Object.assign({}, args));
18
18
  };
@@ -1 +1 @@
1
- {"version":3,"file":"FaultDistanceHum.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAC7E,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAE/D,eAAe;IACX,SAAS,EAAE,mBAAmB;IAC9B,KAAK,EAAE,6BAA6B;CACvC,CAAC;AAEF,MAAM,YAAY,GAAG;IACjB,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACb,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;CACjB,CAAC;AACF,MAAM,cAAc,GAAG,2BAA2B,CAAC;AACnD,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1B,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,SAAS,GAAG,eAAe,CAAC;AAElC,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE;IACtB,OAAO,oBAAC,mBAAmB,oBAAK,IAAI,EAAI,CAAC;AAC7C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC1D,wBAAwB,CAAC,IAAI,GAAG;IAC5B,YAAY;IACZ,cAAc;IACd,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;CACb,CAAC"}
1
+ {"version":3,"file":"FaultDistanceHum.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAC7E,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAE/D,eAAe;IACX,SAAS,EAAE,mBAAmB;IAC9B,KAAK,EAAE,6BAA6B;CACvC,CAAC;AAEF,MAAM,YAAY,GAAG;IACjB,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACb,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;CACjB,CAAC;AACF,MAAM,cAAc,GAAG,2BAA2B,CAAC;AACnD,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1B,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,SAAS,GAAG,aAAa,CAAC;AAEhC,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE;IACtB,OAAO,oBAAC,mBAAmB,oBAAK,IAAI,EAAI,CAAC;AAC7C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC1D,wBAAwB,CAAC,IAAI,GAAG;IAC5B,YAAY;IACZ,cAAc;IACd,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;CACb,CAAC"}
@@ -0,0 +1,7 @@
1
+ declare namespace _default {
2
+ export { DiscreteColorLegend as component };
3
+ export const title: string;
4
+ }
5
+ export default _default;
6
+ export const discreteLegendWithSelector: any;
7
+ import { DiscreteColorLegend } from "../../../component/Legend/DiscreteLegend";
@@ -0,0 +1,41 @@
1
+ import React from "react";
2
+ import { DiscreteColorLegend } from "../../../component/Legend/DiscreteLegend";
3
+ import colorTables from "../../../component/color-tables.json";
4
+ export default {
5
+ component: DiscreteColorLegend,
6
+ title: "Legends/DiscreteLegendWithSelector",
7
+ };
8
+ const discreteData = {
9
+ "Above_BCU": [[], 0],
10
+ "ABOVE": [[], 1],
11
+ "H12": [[], 2],
12
+ "H11": [[], 3],
13
+ "H10": [[], 4],
14
+ "H9": [[], 5],
15
+ "H8": [[], 6],
16
+ "H7": [[], 7],
17
+ "H6": [[], 8],
18
+ "H5": [[], 9],
19
+ "H4": [[], 10],
20
+ "H3": [[], 11],
21
+ "H2": [[], 12],
22
+ "H1": [[], 13],
23
+ "BELOW": [[], 14]
24
+ };
25
+ const dataObjectName = "Wells / ZONELOG";
26
+ const position = [16, 10];
27
+ const horizontal = true;
28
+ const colorName = "Stratigraphy";
29
+ const Template = (args) => {
30
+ return React.createElement(DiscreteColorLegend, Object.assign({}, args));
31
+ };
32
+ export const discreteLegendWithSelector = Template.bind({});
33
+ discreteLegendWithSelector.args = {
34
+ discreteData,
35
+ dataObjectName,
36
+ position,
37
+ horizontal,
38
+ colorName,
39
+ colorTables,
40
+ };
41
+ //# sourceMappingURL=DiscreteLegendWithSelector.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DiscreteLegendWithSelector.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/LegendWithSelector/DiscreteLegendWithSelector.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAE/D,eAAe;IACX,SAAS,EAAE,mBAAmB;IAC9B,KAAK,EAAE,oCAAoC;CAC9C,CAAC;AAEF,MAAM,YAAY,GAAG;IACjB,WAAW,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACpB,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAChB,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACd,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACd,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACd,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACb,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACb,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACb,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACb,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACb,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;IACd,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;IACd,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;IACd,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;IACd,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;CACpB,CAAC;AACF,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,cAAc,CAAC;AAEjC,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE;IACtB,OAAO,oBAAC,mBAAmB,oBAAK,IAAI,EAAI,CAAC;AAC7C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5D,0BAA0B,CAAC,IAAI,GAAG;IAC9B,YAAY;IACZ,cAAc;IACd,QAAQ;IACR,UAAU;IACV,SAAS;IACT,WAAW;CACd,CAAC"}
@@ -0,0 +1,7 @@
1
+ declare namespace _default {
2
+ export { ContinuousLegend as component };
3
+ export const title: string;
4
+ }
5
+ export default _default;
6
+ export const legendWithSelector: any;
7
+ import { ContinuousLegend } from "../../../component/Legend/ContinuousLegend";
@@ -0,0 +1,27 @@
1
+ import React from "react";
2
+ import { ContinuousLegend } from "../../../component/Legend/ContinuousLegend";
3
+ import colorTables from "../../../component/color-tables.json";
4
+ export default {
5
+ component: ContinuousLegend,
6
+ title: "Legends/LegendWithSelector",
7
+ };
8
+ const min = 0;
9
+ const max = 0.35;
10
+ const dataObjectName = "Legend";
11
+ const position = [16, 10];
12
+ const horizontal = true;
13
+ const colorName = "Time/Depth";
14
+ const Template = (args) => {
15
+ return React.createElement(ContinuousLegend, Object.assign({}, args));
16
+ };
17
+ export const legendWithSelector = Template.bind({});
18
+ legendWithSelector.args = {
19
+ min,
20
+ max,
21
+ dataObjectName,
22
+ position,
23
+ horizontal,
24
+ colorName,
25
+ colorTables,
26
+ };
27
+ //# sourceMappingURL=LegendWithSelector.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LegendWithSelector.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/LegendWithSelector/LegendWithSelector.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAE/D,eAAe;IACX,SAAS,EAAE,gBAAgB;IAC3B,KAAK,EAAE,4BAA4B;CACtC,CAAC;AAEF,MAAM,GAAG,GAAG,CAAC,CAAC;AACd,MAAM,GAAG,GAAG,IAAI,CAAC;AACjB,MAAM,cAAc,GAAG,QAAQ,CAAC;AAChC,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,kBAAkB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACpD,kBAAkB,CAAC,IAAI,GAAG;IACtB,GAAG;IACH,GAAG;IACH,cAAc;IACd,QAAQ;IACR,UAAU;IACV,SAAS;IACT,WAAW;CACd,CAAC"}
@@ -0,0 +1,7 @@
1
+ declare namespace _default {
2
+ export { ColorLegend as component };
3
+ export const title: string;
4
+ }
5
+ export default _default;
6
+ export const legendWithSelector: any;
7
+ import ColorLegend from "../../../component/Legend/ColorLegend";
@@ -0,0 +1,47 @@
1
+ import React from "react";
2
+ import colorTables from "../../../component/color-tables.json";
3
+ import ColorLegend from "../../../component/Legend/ColorLegend";
4
+ export default {
5
+ component: ColorLegend,
6
+ title: "Legends/SingleComponent",
7
+ };
8
+ // prop for continous legend
9
+ const min = 0;
10
+ const max = 0.35;
11
+ const dataObjectName = "Legend";
12
+ const position = [16, 10];
13
+ const horizontal = true;
14
+ const colorName = "Physics";
15
+ // prop for discrete data
16
+ const discreteData = {
17
+ "Above_BCU": [[], 0],
18
+ "ABOVE": [[], 1],
19
+ "H12": [[], 2],
20
+ "H11": [[], 3],
21
+ "H10": [[], 4],
22
+ "H9": [[], 5],
23
+ "H8": [[], 6],
24
+ "H7": [[], 7],
25
+ "H6": [[], 8],
26
+ "H5": [[], 9],
27
+ "H4": [[], 10],
28
+ "H3": [[], 11],
29
+ "H2": [[], 12],
30
+ "H1": [[], 13],
31
+ "BELOW": [[], 14]
32
+ };
33
+ const Template = (args) => {
34
+ return React.createElement(ColorLegend, Object.assign({}, args));
35
+ };
36
+ export const legendWithSelector = Template.bind({});
37
+ legendWithSelector.args = {
38
+ min,
39
+ max,
40
+ dataObjectName,
41
+ position,
42
+ horizontal,
43
+ colorName,
44
+ colorTables,
45
+ discreteData,
46
+ };
47
+ //# sourceMappingURL=Single.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Single.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/SingleComponent/Single.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OA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AAW,oBAAK,IAAI,EAAI,CAAC;AACrC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACpD,kBAAkB,CAAC,IAAI,GAAG;IACtB,GAAG;IACH,GAAG;IACH,cAAc;IACd,QAAQ;IACR,UAAU;IACV,SAAS;IACT,WAAW;IACX,YAAY;CACf,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emerson-eps/color-tables",
3
- "version": "0.2.1",
3
+ "version": "0.2.4",
4
4
  "description": "Standard library of color tables for geological domain",
5
5
  "release": {
6
6
  "branches": [
@@ -16,14 +16,14 @@
16
16
  "semantic-release": "semantic-release"
17
17
  },
18
18
  "dependencies": {
19
- "@equinor/eds-core-react": "^0.17.0",
19
+ "@equinor/eds-core-react": "^0.18.0",
20
20
  "d3": "^7.2.0",
21
21
  "d3-color": "^3.0.1",
22
22
  "d3-interpolate": "^3.0.1",
23
23
  "react": "^17.0.2",
24
24
  "react-dom": "^17.0.2",
25
25
  "react-scripts": "^5.0.0",
26
- "web-vitals": "^1.1.2"
26
+ "web-vitals": "^2.1.4"
27
27
  },
28
28
  "repository": {
29
29
  "type": "git",
@@ -1,12 +1,17 @@
1
1
  import * as React from "react";
2
2
  import { Accordion } from "@equinor/eds-core-react";
3
- import { ColorSelector } from "./ColorSelectorComponent";
3
+ import { ColorSelectorWrapper } from "./ColorSelectorWrapper";
4
4
 
5
- export const ColorSelectorWrapper = () => {
5
+ export const ColorSelectorAccordion = (props: any) => {
6
6
  return (
7
- <div style={{width: "650px"}}>
7
+ <div className="Container" style={{width: "316px",
8
+ position: "absolute",
9
+ zIndex: 1,
10
+ top: 150,
11
+ right: 5,
12
+ }}>
8
13
  <Accordion >
9
- <Accordion.Item>
14
+ <Accordion.Item isExpanded>
10
15
  <Accordion.Header>
11
16
  Color Scales
12
17
  </Accordion.Header>
@@ -17,7 +22,7 @@ export const ColorSelectorWrapper = () => {
17
22
  Geologic Color Scale
18
23
  </Accordion.Header>
19
24
  <Accordion.Panel>
20
- <ColorSelector useColorTableColors={true} useD3Colors={false}/>
25
+ <ColorSelectorWrapper useColorTableColors={true} useD3Colors={false} colorScaleObject={props}/>
21
26
  </Accordion.Panel>
22
27
  </Accordion.Item>
23
28
  </Accordion>
@@ -27,7 +32,7 @@ export const ColorSelectorWrapper = () => {
27
32
  D3 Color Scale
28
33
  </Accordion.Header>
29
34
  <Accordion.Panel>
30
- <ColorSelector useColorTableColors={false} useD3Colors={true}/>
35
+ <ColorSelectorWrapper useD3Colors={true} useColorTableColors={false} colorScaleObject={props}/>
31
36
  </Accordion.Panel>
32
37
  </Accordion.Item>
33
38
  </Accordion>