@emerson-eps/color-tables 0.1.13 → 0.1.17

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 (38) hide show
  1. package/dist/component/Legend/DiscreteLegend.d.ts +4 -6
  2. package/dist/component/Legend/DiscreteLegend.js +13 -10
  3. package/dist/component/Legend/DiscreteLegend.js.map +1 -1
  4. package/dist/component/Utils/discreteLegend.d.ts +2 -2
  5. package/dist/component/color-tables.json +202 -0
  6. package/dist/component/welllayer_template.json +89 -0
  7. package/dist/index.d.ts +2 -0
  8. package/dist/index.js +2 -1
  9. package/dist/index.js.map +1 -1
  10. package/dist/stories/ColorLegends/DiscreteLegends/Facies.stories.js +2 -4
  11. package/dist/stories/ColorLegends/DiscreteLegends/Facies.stories.js.map +1 -1
  12. package/dist/stories/ColorLegends/DiscreteLegends/FaciesNoCalcite.stories.js +2 -4
  13. package/dist/stories/ColorLegends/DiscreteLegends/FaciesNoCalcite.stories.js.map +1 -1
  14. package/dist/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.js +2 -4
  15. package/dist/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.js.map +1 -1
  16. package/dist/stories/ColorLegends/DiscreteLegends/FaultProximityFlag.stories.js +2 -4
  17. package/dist/stories/ColorLegends/DiscreteLegends/FaultProximityFlag.stories.js.map +1 -1
  18. package/dist/stories/ColorLegends/DiscreteLegends/RDE.stories.js +2 -3
  19. package/dist/stories/ColorLegends/DiscreteLegends/RDE.stories.js.map +1 -1
  20. package/dist/stories/ColorLegends/DiscreteLegends/RDE_Orig.stories.js +2 -4
  21. package/dist/stories/ColorLegends/DiscreteLegends/RDE_Orig.stories.js.map +1 -1
  22. package/dist/stories/ColorLegends/DiscreteLegends/ZoneMain.stories.js +2 -4
  23. package/dist/stories/ColorLegends/DiscreteLegends/ZoneMain.stories.js.map +1 -1
  24. package/dist/stories/ColorLegends/DiscreteLegends/Zonelog.stories.js +2 -4
  25. package/dist/stories/ColorLegends/DiscreteLegends/Zonelog.stories.js.map +1 -1
  26. package/package.json +1 -1
  27. package/src/component/Legend/DiscreteLegend.tsx +17 -23
  28. package/src/component/Utils/discreteLegend.ts +2 -2
  29. package/src/index.ts +2 -1
  30. package/src/stories/ColorLegends/DiscreteLegends/Facies.stories.jsx +2 -3
  31. package/src/stories/ColorLegends/DiscreteLegends/FaciesNoCalcite.stories.jsx +2 -4
  32. package/src/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.jsx +2 -4
  33. package/src/stories/ColorLegends/DiscreteLegends/FaultProximityFlag.stories.jsx +2 -4
  34. package/src/stories/ColorLegends/DiscreteLegends/RDE.stories.jsx +2 -3
  35. package/src/stories/ColorLegends/DiscreteLegends/RDE_Orig.stories.jsx +2 -4
  36. package/src/stories/ColorLegends/DiscreteLegends/ZoneMain.stories.jsx +2 -4
  37. package/src/stories/ColorLegends/DiscreteLegends/Zonelog.stories.jsx +2 -4
  38. package/tsconfig.json +5 -4
@@ -1,17 +1,15 @@
1
1
  import * as React from "react";
2
- import { templateArray } from "../WelllayerTemplateTypes";
3
2
  import { colorTablesArray } from "../ColorTableTypes";
4
- declare type colorLegendProps = {
3
+ interface colorLegendProps {
5
4
  discreteData: {
6
5
  objects: Record<string, [number[], number]>;
7
6
  };
8
7
  dataObjectName: string;
9
- name: string;
10
8
  position: number[];
11
- template: templateArray;
9
+ colorName: string;
12
10
  colorTables: colorTablesArray;
13
11
  horizontal: boolean;
14
- };
12
+ }
15
13
  export declare const DiscreteColorLegend: React.FC<colorLegendProps>;
16
- export declare function colorTableData(name: string, template: templateArray, colorTables: colorTablesArray): [number, number, number, number][];
14
+ export declare function colorTableData(colorName: string, colorTables: colorTablesArray): [number, number, number, number][];
17
15
  export {};
@@ -1,14 +1,14 @@
1
1
  import * as React from "react";
2
2
  import legendUtil from "../Utils/discreteLegend";
3
3
  import { scaleOrdinal, select } from "d3";
4
- export const DiscreteColorLegend = ({ discreteData, name, dataObjectName, position, template, colorTables, horizontal, }) => {
4
+ export const DiscreteColorLegend = ({ discreteData, dataObjectName, position, colorName, colorTables, horizontal, }) => {
5
5
  React.useEffect(() => {
6
6
  discreteLegend("#legend");
7
- }, [discreteData, template, colorTables, horizontal]);
7
+ }, [discreteData, colorName, colorTables, horizontal]);
8
8
  function discreteLegend(legend) {
9
9
  const itemName = [];
10
10
  const itemColor = [];
11
- const colorsArray = colorTableData(name, template, colorTables);
11
+ const colorsArray = colorTableData(colorName, colorTables);
12
12
  Object.keys(discreteData).forEach((key) => {
13
13
  // eslint-disable-next-line
14
14
  let code = discreteData[key][1];
@@ -34,10 +34,17 @@ export const DiscreteColorLegend = ({ discreteData, name, dataObjectName, positi
34
34
  }
35
35
  const ordinalValues = scaleOrdinal().domain(itemName);
36
36
  const colorLegend = legendUtil(itemColor).inputScale(ordinalValues);
37
+ select(legend).select("div").remove();
37
38
  select(legend).select("svg").remove();
38
39
  const legendLength = itemColor.length;
39
40
  const calcLegendHeight = 22 * legendLength + 4 * legendLength;
40
41
  const selectedLegend = select(legend);
42
+ selectedLegend
43
+ .append("div")
44
+ .text(dataObjectName)
45
+ .attr("y", 7)
46
+ .style("color", "#6F6F6F")
47
+ .style("margin", "10px 10px");
41
48
  if (!horizontal)
42
49
  selectedLegend.style("height", 150 + "px");
43
50
  const svgLegend = selectedLegend
@@ -63,16 +70,12 @@ export const DiscreteColorLegend = ({ discreteData, name, dataObjectName, positi
63
70
  backgroundColor: "#ffffffcc",
64
71
  borderRadius: "5px",
65
72
  } },
66
- React.createElement("label", { style: { color: "#6F6F6F", margin: "10px 10px" } }, dataObjectName),
67
73
  React.createElement("div", { id: "legend" })));
68
74
  };
69
75
  // Based on name return the colors array from color.tables.json file
70
- export function colorTableData(name, template, colorTables) {
71
- const properties = template[0]["properties"];
72
- const propertiesData = properties.filter((value) => value.objectName == name);
73
- const colorTableData = colorTables.filter((value) => value.name.toLowerCase() ==
74
- propertiesData[0].colorTable.toLowerCase());
75
- return colorTableData[0].colors;
76
+ export function colorTableData(colorName, colorTables) {
77
+ const colorTableData = colorTables.filter((value) => value.name.toLowerCase() == colorName.toLowerCase());
78
+ return colorTableData.length > 0 ? colorTableData[0].colors : [];
76
79
  }
77
80
  DiscreteColorLegend.defaultProps = {
78
81
  position: [5, 10],
@@ -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,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAkB1C,MAAM,CAAC,MAAM,mBAAmB,GAA+B,CAAC,EAC5D,YAAY,EACZ,IAAI,EACJ,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,UAAU,GACK,EAAE,EAAE;IACnB,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,cAAc,CAAC,SAAS,CAAC,CAAC;IAC9B,CAAC,EAAE,CAAC,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC;IACtD,SAAS,cAAc,CAAC,MAAc;QAClC,MAAM,QAAQ,GAAa,EAAE,CAAC;QAC9B,MAAM,SAAS,GAAgB,EAAE,CAAC;QAClC,MAAM,WAAW,GAAuC,cAAc,CAClE,IAAI,EACJ,QAAQ,EACR,WAAW,CACd,CAAC;QACF,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACtC,2BAA2B;YAC3B,IAAI,IAAI,GAAI,YAAuC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;YAC3D,+EAA+E;YAC/E,MAAM,mBAAmB,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,KAAe,EAAE,EAAE;gBAC7D,OAAO,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAA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AC5B,YAAY,EAAE,KAAK;SACtB;QAED,6BAAK,EAAE,EAAC,QAAQ,GAAO,CACrB,CACT,CAAC;AACN,CAAC,CAAC;AAEF,oEAAoE;AACpE,MAAM,UAAU,cAAc,CAC1B,SAAiB,EACjB,WAA6B;IAE7B,MAAM,cAAc,GAAG,WAAW,CAAC,MAAM,CACrC,CAAC,KAAqB,EAAE,EAAE,CACtB,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,SAAS,CAAC,WAAW,EAAE,CAC1D,CAAC;IACF,OAAO,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,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"}
@@ -1,5 +1,5 @@
1
- declare type ItemColor = {
1
+ interface ItemColor {
2
2
  color: string;
3
- };
3
+ }
4
4
  export default function legendUtil(itemColor: ItemColor[]): any;
5
5
  export {};
@@ -0,0 +1,202 @@
1
+ [
2
+ {
3
+ "name": "Physics",
4
+ "discrete": false,
5
+ "colors": [
6
+ [0.00, 255, 0, 0],
7
+ [0.25, 255, 255, 0],
8
+ [0.50, 0, 255, 0],
9
+ [0.75, 0, 255, 255],
10
+ [1.00, 0, 0, 255]
11
+ ]
12
+ },
13
+ {
14
+ "name": "Rainbow",
15
+ "discrete": false,
16
+ "colors": [
17
+ [0.00, 255, 0, 0],
18
+ [0.20, 255, 255, 0],
19
+ [0.40, 0, 255, 0],
20
+ [0.60, 0, 255, 255],
21
+ [0.80, 0, 0, 255],
22
+ [1.00, 255, 0, 255]
23
+ ]
24
+ },
25
+ {
26
+ "name": "Porosity",
27
+ "discrete": false,
28
+ "colors": [
29
+ [0.00, 255, 246, 117],
30
+ [0.11, 255, 243, 53],
31
+ [0.18, 255, 241, 0],
32
+ [0.25, 155, 193, 0],
33
+ [0.32, 255, 155, 23],
34
+ [0.39, 255, 162, 61],
35
+ [0.46, 255, 126, 45],
36
+ [0.53, 227, 112, 24],
37
+ [0.60, 246, 96, 31],
38
+ [0.67, 229, 39, 48],
39
+ [0.74, 252, 177, 170],
40
+ [0.81, 236, 103, 146],
41
+ [0.88, 226, 44, 118],
42
+ [1.00, 126, 40, 111]
43
+ ]
44
+ },
45
+ {
46
+ "name": "Permeability",
47
+ "discrete": false,
48
+ "colors": [
49
+ [0.00, 119, 63, 49],
50
+ [0.148, 135, 49, 45],
51
+ [0.246, 154, 89, 24],
52
+ [0.344, 191, 88, 22],
53
+ [0.441, 190, 142, 97],
54
+ [0.539, 255, 126, 45],
55
+ [0.637, 255, 162, 61],
56
+ [0.734, 255, 155, 23],
57
+ [0.832, 255, 241, 0],
58
+ [1.00, 255, 246, 117]
59
+ ]
60
+ },
61
+ {
62
+ "name": "Seismic BlueWhiteRed",
63
+ "discrete": false,
64
+ "colors": [
65
+ [0.00, 0, 0, 255],
66
+ [0.50, 255, 255, 255],
67
+ [1.00, 255, 2, 2]
68
+ ]
69
+ },
70
+ {
71
+ "name": "Time/Depth",
72
+ "discrete": false,
73
+ "colors": [
74
+ [0.00, 252, 174, 169],
75
+ [0.10, 226, 44, 118],
76
+ [0.168, 229, 39, 48],
77
+ [0.234, 150, 40, 34],
78
+ [0.301, 255, 126, 45],
79
+ [0.367, 255, 162, 61],
80
+ [0.434, 255, 241, 0],
81
+ [0.50, 219, 228, 163],
82
+ [0.566, 0, 143, 74],
83
+ [0.633, 0, 110, 78],
84
+ [0.699, 0, 124, 140],
85
+ [0.766, 116, 190, 230],
86
+ [0.832, 0, 143, 212],
87
+ [0.898, 0, 51, 116],
88
+ [1.00, 74, 19, 86]
89
+ ]
90
+ },
91
+ {
92
+ "name": "Stratigraphy",
93
+ "discrete": true,
94
+ "colors": [
95
+ [0, 255, 120, 61],
96
+ [1, 255, 193, 0],
97
+ [2, 255, 155, 76],
98
+ [3, 255, 223, 161],
99
+ [4, 226, 44, 118],
100
+ [5, 255, 243, 53],
101
+ [6, 255, 212, 179],
102
+ [7, 255, 155, 23],
103
+ [8, 255, 246, 117],
104
+ [9, 255, 241, 0],
105
+ [10, 255, 211, 178],
106
+ [11, 255, 173, 128],
107
+ [12, 248, 152, 0],
108
+ [13, 154, 89, 24],
109
+ [14, 0, 138, 185],
110
+ [15, 82, 161, 40],
111
+ [16, 219, 228, 163],
112
+ [17, 0, 119, 64],
113
+ [18, 0, 110, 172],
114
+ [19, 116, 190, 230],
115
+ [20, 0, 155, 212],
116
+ [21, 0, 117, 190],
117
+ [22, 143, 40, 112],
118
+ [23, 220, 153, 190],
119
+ [24, 226, 44, 118],
120
+ [25, 126, 40, 111],
121
+ [26, 73, 69, 43],
122
+ [27, 203, 63, 42],
123
+ [28, 255, 198, 190],
124
+ [29, 135, 49, 45],
125
+ [30, 150, 136, 120],
126
+ [31, 198, 182, 175],
127
+ [32, 166, 154, 145],
128
+ [33, 191, 88, 22],
129
+ [34, 255, 212, 179],
130
+ [35, 251, 139, 105],
131
+ [36, 154, 89, 24],
132
+ [37, 186, 222, 200],
133
+ [38, 0, 124, 140],
134
+ [39, 87, 84, 83]
135
+ ]
136
+ },
137
+ {
138
+ "name": "Facies",
139
+ "discrete": true,
140
+ "colors": [
141
+ [0, 255, 193, 0],
142
+ [1, 255, 246, 117],
143
+ [2, 166, 194, 42],
144
+ [3, 149, 160, 24],
145
+ [4, 9, 143, 74],
146
+ [5, 125, 98, 15],
147
+ [6, 0, 108, 154],
148
+ [7, 0, 117, 190],
149
+ [8, 28, 22, 59],
150
+ [9, 39, 142, 199],
151
+ [10, 0, 138, 185],
152
+ [11, 52, 178, 188],
153
+ [12, 235, 63, 34],
154
+ [13, 74, 19, 86],
155
+ [14, 248, 152, 0],
156
+ [15, 1, 1, 1],
157
+ [16, 128, 128, 128]
158
+ ]
159
+ },
160
+ {
161
+ "name": "Gas-Oil-Water",
162
+ "discrete": true,
163
+ "colors": [
164
+ [0, 255, 46, 0],
165
+ [1, 0, 184, 0],
166
+ [2, 0, 25, 255],
167
+ [3, 179, 179, 179]
168
+ ]
169
+ },
170
+ {
171
+ "name": "Gas-Water",
172
+ "discrete": true,
173
+ "colors": [
174
+ [0, 255, 46, 0],
175
+ [1, 0, 25, 255],
176
+ [2, 179, 179, 179]
177
+ ]
178
+ },
179
+ {
180
+ "name": "Oil-Water",
181
+ "discrete": true,
182
+ "colors": [
183
+ [0, 0, 184, 0],
184
+ [1, 0, 25, 255],
185
+ [2, 179, 179, 179]
186
+ ]
187
+ },
188
+ {
189
+ "name": "Accent",
190
+ "discrete": true,
191
+ "colors": [
192
+ [0, 127, 201, 127],
193
+ [1, 190, 174, 212],
194
+ [2, 253, 192, 134],
195
+ [4, 255, 255, 153],
196
+ [5, 56, 108, 176],
197
+ [6, 240, 2, 127],
198
+ [7, 191, 91, 23],
199
+ [8, 102, 102, 102]
200
+ ]
201
+ }
202
+ ]
@@ -0,0 +1,89 @@
1
+ [
2
+ {
3
+ "name": "Welllayer Template",
4
+ "properties": [
5
+ {
6
+ "objectName": "PORO",
7
+ "colorTable": "Porosity",
8
+ "context": "wells-layer",
9
+ "scale": "linear"
10
+ },
11
+ {
12
+ "objectName": "PERM",
13
+ "colorTable": "Permeability",
14
+ "context": "wells-layer",
15
+ "scale": "linear"
16
+ },
17
+ {
18
+ "objectName": "MD",
19
+ "colorTable": "Time/Depth",
20
+ "context": "wells-layer",
21
+ "scale": "linear"
22
+ },
23
+ {
24
+ "objectName": "PORO_TOT",
25
+ "colorTable": "Porosity",
26
+ "context": "wells-layer",
27
+ "scale": "linear"
28
+ },
29
+ {
30
+ "objectName": "NTG",
31
+ "colorTable": "Rainbow",
32
+ "context": "wells-layer",
33
+ "scale": "linear"
34
+ },
35
+ {
36
+ "objectName": "PERM_TOT",
37
+ "colorTable": "Permeability",
38
+ "context": "wells-layer",
39
+ "scale": "linear"
40
+ },
41
+ {
42
+ "objectName": "SW",
43
+ "colorTable": "Physics",
44
+ "context": "wells-layer",
45
+ "scale": "linear"
46
+ },
47
+ {
48
+ "objectName": "ZONELOG",
49
+ "colorTable": "Stratigraphy",
50
+ "context": "wells-layer"
51
+ },
52
+ {
53
+ "objectName": "RDE_ORIG",
54
+ "colorTable": "Stratigraphy",
55
+ "context": "wells-layer"
56
+ },
57
+ {
58
+ "objectName": "FACIES",
59
+ "colorTable": "Facies",
60
+ "context": "wells-layer"
61
+ },
62
+ {
63
+ "objectName": "ZONE_MAIN",
64
+ "colorTable": "Stratigraphy",
65
+ "context": "wells-layer"
66
+ },
67
+ {
68
+ "objectName": "RDE",
69
+ "colorTable": "Accent",
70
+ "context": "wells-layer"
71
+ },
72
+ {
73
+ "objectName": "FaultDistance_HUM",
74
+ "colorTable": "Gas-Oil-Water",
75
+ "context": "wells-layer"
76
+ },
77
+ {
78
+ "objectName": "FAULT_PROXIMITY_FLAG",
79
+ "colorTable": "Gas-Water",
80
+ "context": "wells-layer"
81
+ },
82
+ {
83
+ "objectName": "FACIES_NoCalcite",
84
+ "colorTable": "Facies",
85
+ "context": "wells-layer"
86
+ }
87
+ ]
88
+ }
89
+ ]
package/dist/index.d.ts CHANGED
@@ -3,3 +3,5 @@ export { colorTableData, DiscreteColorLegend } from './component/Legend/Discrete
3
3
  export { colorsArray, rgbValues, RGBToHex } from './component/Utils/continousLegend';
4
4
  export { colorTablesObj, colorTablesArray } from './component/ColorTableTypes';
5
5
  export { propertiesObj, templateArray } from './component/WelllayerTemplateTypes';
6
+ import * as colorTables from './component/color-tables.json';
7
+ export default colorTables;
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export { ContinuousLegend } from './component/Legend/ContinuousLegend';
2
2
  export { colorTableData, DiscreteColorLegend } from './component/Legend/DiscreteLegend';
3
3
  export { colorsArray, rgbValues, RGBToHex } from './component/Utils/continousLegend';
4
- //export const colorTables = require('./component/color-tables');
4
+ import * as colorTables from './component/color-tables.json';
5
+ export default colorTables;
5
6
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAC,MAAM,mCAAmC,CAAC;AAGpF,iEAAiE"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAC,MAAM,mCAAmC,CAAC;AAGpF,OAAO,KAAK,WAAW,MAAM,+BAA+B,CAAC;AAC7D,eAAe,WAAW,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import { DiscreteColorLegend } from "../../../component/Legend/DiscreteLegend";
3
- import template from "../../../component/welllayer_template.json";
4
3
  import colorTables from "../../../component/color-tables.json";
5
4
  export default {
6
5
  component: DiscreteColorLegend,
@@ -18,20 +17,19 @@ const discreteData = {
18
17
  "MSH": [[], 8],
19
18
  "CAL": [[], 9]
20
19
  };
21
- const name = "FACIES";
22
20
  const dataObjectName = "Wells / FACIES";
23
21
  const position = [16, 10];
24
22
  const horizontal = true;
23
+ const colorName = "Facies";
25
24
  const Template = (args) => {
26
25
  return React.createElement(DiscreteColorLegend, Object.assign({}, args));
27
26
  };
28
27
  export const FaciesTemplate = Template.bind({});
29
28
  FaciesTemplate.args = {
30
29
  discreteData,
31
- name,
32
30
  dataObjectName,
33
31
  position,
34
- template,
32
+ colorName,
35
33
  colorTables,
36
34
  horizontal,
37
35
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Facies.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GAAG;IAClB,YAAY;IACZ,IAAI;IACJ,cAAc;IACd,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,UAAU;CACb,CAAC"}
1
+ {"version":3,"file":"Facies.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/Facies.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAE7E,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;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,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACd,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACd,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACd,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;CACjB,CAAC;AACF,MAAM,cAAc,GAAG,gBAAgB,CAAC;AACxC,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1B,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,SAAS,GAAG,QAAQ,CAAC;AAE3B,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE;IACtB,OAAO,oBAAC,mBAAmB,oBAAK,IAAI,EAAI,CAAC;AAC7C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAChD,cAAc,CAAC,IAAI,GAAG;IAClB,YAAY;IACZ,cAAc;IACd,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;CACb,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import { DiscreteColorLegend } from "../../../component/Legend/DiscreteLegend";
3
- import template from "../../../component/welllayer_template.json";
4
3
  import colorTables from "../../../component/color-tables.json";
5
4
  export default {
6
5
  component: DiscreteColorLegend,
@@ -18,20 +17,19 @@ const discreteData = {
18
17
  "F_MARSH": [[], 8],
19
18
  "F_CALCITE": [[], 9]
20
19
  };
21
- const name = "FACIES_NoCalcite";
22
20
  const dataObjectName = "Wells / FACIES_NoCalcite";
23
21
  const position = [16, 10];
24
22
  const horizontal = true;
23
+ const colorName = "Facies";
25
24
  const Template = (args) => {
26
25
  return React.createElement(DiscreteColorLegend, Object.assign({}, args));
27
26
  };
28
27
  export const FaciesNoCalciteTemplate = Template.bind({});
29
28
  FaciesNoCalciteTemplate.args = {
30
29
  discreteData,
31
- name,
32
30
  dataObjectName,
33
31
  position,
34
- template,
32
+ colorName,
35
33
  colorTables,
36
34
  horizontal,
37
35
  };
@@ -1 +1 @@
1
- {"version":3,"file":"FaciesNoCalcite.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/FaciesNoCalcite.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAC7E,OAAO,QAAQ,MAAM,4CAA4C,CAAC;AAClE,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAE/D,eAAe;IACX,SAAS,EAAE,mBAAmB;IAC9B,KAAK,EAAE,6BAA6B;CACvC,CAAC;AAEF,MAAM,YAAY,GAAG;IACjB,YAAY,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACrB,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AS,EAAE,mBAAmB;IAC9B,KAAK,EAAE,6BAA6B;CACvC,CAAC;AAEF,MAAM,YAAY,GAAG;IACjB,YAAY,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACrB,mBAAmB,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAC5B,mBAAmB,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAC5B,aAAa,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACtB,aAAa,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACtB,iBAAiB,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAC1B,oBAAoB,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAC7B,oBAAoB,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAC7B,SAAS,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAClB,WAAW,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;CACvB,CAAC;AACF,MAAM,cAAc,GAAG,0BAA0B,CAAC;AAClD,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1B,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,SAAS,GAAG,QAAQ,CAAC;AAE3B,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE;IACtB,OAAO,oBAAC,mBAAmB,oBAAK,IAAI,EAAI,CAAC;AAC7C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzD,uBAAuB,CAAC,IAAI,GAAG;IAC3B,YAAY;IACZ,cAAc;IACd,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;CACb,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import { DiscreteColorLegend } from "../../../component/Legend/DiscreteLegend";
3
- import template from "../../../component/welllayer_template.json";
4
3
  import colorTables from "../../../component/color-tables.json";
5
4
  export default {
6
5
  component: DiscreteColorLegend,
@@ -10,20 +9,19 @@ const discreteData = {
10
9
  "no": [[], 0],
11
10
  "yes": [[], 1]
12
11
  };
13
- const name = "FaultDistance_HUM";
14
12
  const dataObjectName = "Wells / FaultDistance_HUM";
15
13
  const position = [16, 10];
16
14
  const horizontal = true;
15
+ const colorName = "Gas-Oil-Water";
17
16
  const Template = (args) => {
18
17
  return React.createElement(DiscreteColorLegend, Object.assign({}, args));
19
18
  };
20
19
  export const FaultDistanceHumTemplate = Template.bind({});
21
20
  FaultDistanceHumTemplate.args = {
22
21
  discreteData,
23
- name,
24
22
  dataObjectName,
25
23
  position,
26
- template,
24
+ colorName,
27
25
  colorTables,
28
26
  horizontal,
29
27
  };
@@ -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,QAAQ,MAAM,4CAA4C,CAAC;AAClE,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,IAAI,GAAG,mBAAmB,CAAC;AACjC,MAAM,cAAc,GAAG,2BAA2B,CAAC;AACnD,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1B,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,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,IAAI;IACJ,cAAc;IACd,QAAQ;IACR,QAAQ;IACR,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,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,6 +1,5 @@
1
1
  import React from "react";
2
2
  import { DiscreteColorLegend } from "../../../component/Legend/DiscreteLegend";
3
- import template from "../../../component/welllayer_template.json";
4
3
  import colorTables from "../../../component/color-tables.json";
5
4
  export default {
6
5
  component: DiscreteColorLegend,
@@ -10,20 +9,19 @@ const discreteData = {
10
9
  "no": [[], 0],
11
10
  "yes": [[], 1]
12
11
  };
13
- const name = "FAULT_PROXIMITY_FLAG";
14
12
  const dataObjectName = "Wells / FAULT_PROXIMITY_FLAG";
15
13
  const position = [16, 10];
16
14
  const horizontal = true;
15
+ const colorName = "Time/Depth";
17
16
  const Template = (args) => {
18
17
  return React.createElement(DiscreteColorLegend, Object.assign({}, args));
19
18
  };
20
19
  export const FaultProximityFlagTemplate = Template.bind({});
21
20
  FaultProximityFlagTemplate.args = {
22
21
  discreteData,
23
- name,
24
22
  dataObjectName,
25
23
  position,
26
- template,
24
+ colorName,
27
25
  colorTables,
28
26
  horizontal,
29
27
  };
@@ -1 +1 @@
1
- {"version":3,"file":"FaultProximityFlag.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/FaultProximityFlag.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAC7E,OAAO,QAAQ,MAAM,4CAA4C,CAAC;AAClE,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,IAAI,GAAG,sBAAsB,CAAC;AACpC,MAAM,cAAc,GAAG,8BAA8B,CAAC;AACtD,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1B,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,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,IAAI;IACJ,cAAc;IACd,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,UAAU;CACb,CAAC"}
1
+ {"version":3,"file":"FaultProximityFlag.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/FaultProximityFlag.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,8BAA8B,CAAC;AACtD,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,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,SAAS;IACT,WAAW;IACX,UAAU;CACb,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import { DiscreteColorLegend } from "../../../component/Legend/DiscreteLegend";
3
- import template from "../../../component/welllayer_template.json";
4
3
  import colorTables from "../../../component/color-tables.json";
5
4
  export default {
6
5
  component: DiscreteColorLegend,
@@ -13,10 +12,10 @@ const discreteData = {
13
12
  "TIDAL": [[], 4],
14
13
  "ONSHORE": [[], 5]
15
14
  };
16
- const name = "RDE";
17
15
  const dataObjectName = "Wells / RDE";
18
16
  const position = [16, 10];
19
17
  const horizontal = true;
18
+ const colorName = "Accent";
20
19
  const Template = (args) => {
21
20
  return React.createElement(DiscreteColorLegend, Object.assign({}, args));
22
21
  };
@@ -26,7 +25,7 @@ RDETemplate.args = {
26
25
  name,
27
26
  dataObjectName,
28
27
  position,
29
- template,
28
+ colorName,
30
29
  colorTables,
31
30
  horizontal,
32
31
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RDE.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/RDE.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAC7E,OAAO,QAAQ,MAAM,4CAA4C,CAAC;AAClE,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAE/D,eAAe;IACX,SAAS,EAAE,mBAAmB;IAC9B,KAAK,EAAE,6BAA6B;CACvC,CAAC;AAEF,MAAM,YAAY,GAAG;IACjB,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACnB,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACd,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACd,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAChB,SAAS,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;CACrB,CAAC;AACF,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QAAQ,CAAC;AAE3B,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE;IACtB,OAAO,oBAAC,mBAAmB,oBAAK,IAAI,EAAI,CAAC;AAC7C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC7C,WAAW,CAAC,IAAI,GAAG;IACf,YAAY;IACZ,IAAI;IACJ,cAAc;IACd,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;CACb,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import { DiscreteColorLegend } from "../../../component/Legend/DiscreteLegend";
3
- import template from "../../../component/welllayer_template.json";
4
3
  import colorTables from "../../../component/color-tables.json";
5
4
  export default {
6
5
  component: DiscreteColorLegend,
@@ -24,20 +23,19 @@ const discreteData = {
24
23
  "R_USF": [[], 14],
25
24
  "R_LSF": [[], 15]
26
25
  };
27
- const name = "RDE_ORIG";
28
26
  const dataObjectName = "Wells / RDE_ORIG";
29
27
  const position = [16, 10];
30
28
  const horizontal = true;
29
+ const colorName = "Stratigraphy";
31
30
  const Template = (args) => {
32
31
  return React.createElement(DiscreteColorLegend, Object.assign({}, args));
33
32
  };
34
33
  export const RDEOrigTemplate = Template.bind({});
35
34
  RDEOrigTemplate.args = {
36
35
  discreteData,
37
- name,
38
36
  dataObjectName,
39
37
  position,
40
- template,
38
+ colorName,
41
39
  colorTables,
42
40
  horizontal,
43
41
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RDE_Orig.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/RDE_Orig.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAC7E,OAAO,QAAQ,MAAM,4CAA4C,CAAC;AAClE,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAE/D,eAAe;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,CAAC;IACjB,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;CACpB,CAAC;AACF,MAAM,cAAc,GAAG,kBAAkB,CAAC;AAC1C,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,eAAe,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACjD,eAAe,CAAC,IAAI,GAAG;IACnB,YAAY;IACZ,cAAc;IACd,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;CACb,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import { DiscreteColorLegend } from "../../../component/Legend/DiscreteLegend";
3
- import template from "../../../component/welllayer_template.json";
4
3
  import colorTables from "../../../component/color-tables.json";
5
4
  export default {
6
5
  component: DiscreteColorLegend,
@@ -13,20 +12,19 @@ const discreteData = {
13
12
  "MID": [[], 2],
14
13
  "LOWER": [[], 3]
15
14
  };
16
- const name = "ZONE_MAIN";
17
15
  const dataObjectName = "Wells / ZONE_MAIN";
18
16
  const position = [16, 10];
19
17
  const horizontal = true;
18
+ const colorName = "Stratigraphy";
20
19
  const Template = (args) => {
21
20
  return React.createElement(DiscreteColorLegend, Object.assign({}, args));
22
21
  };
23
22
  export const ZoneMainTemplate = Template.bind({});
24
23
  ZoneMainTemplate.args = {
25
24
  discreteData,
26
- name,
27
25
  dataObjectName,
28
26
  position,
29
- template,
27
+ colorName,
30
28
  colorTables,
31
29
  horizontal,
32
30
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ZoneMain.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/ZoneMain.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAC7E,OAAO,QAAQ,MAAM,4CAA4C,CAAC;AAClE,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAE/D,eAAe;IACX,SAAS,EAAE,mBAAmB;IAC9B,KAAK,EAAE,6BAA6B;CACvC,CAAC;AAEF,MAAM,YAAY,GAAG;IACjB,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACZ,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACZ,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAChB,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACd,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;CACnB,CAAC;AACF,MAAM,IAAI,GAAG,WAAW,CAAC;AACzB,MAAM,cAAc,GAAG,mBAAmB,CAAC;AAC3C,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1B,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE;IACtB,OAAO,oBAAC,mBAAmB,oBAAK,IAAI,EAAI,CAAC;AAC7C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAClD,gBAAgB,CAAC,IAAI,GAAG;IACpB,YAAY;IACZ,IAAI;IACJ,cAAc;IACd,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,UAAU;CACb,CAAC"}
1
+ {"version":3,"file":"ZoneMain.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/ZoneMain.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,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACZ,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACZ,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAChB,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACd,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;CACnB,CAAC;AACF,MAAM,cAAc,GAAG,mBAAmB,CAAC;AAC3C,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,gBAAgB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAClD,gBAAgB,CAAC,IAAI,GAAG;IACpB,YAAY;IACZ,cAAc;IACd,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;CACb,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import { DiscreteColorLegend } from "../../../component/Legend/DiscreteLegend";
3
- import template from "../../../component/welllayer_template.json";
4
3
  import colorTables from "../../../component/color-tables.json";
5
4
  export default {
6
5
  component: DiscreteColorLegend,
@@ -23,20 +22,19 @@ const discreteData = {
23
22
  "H1": [[], 13],
24
23
  "BELOW": [[], 14]
25
24
  };
26
- const name = "ZONELOG";
27
25
  const dataObjectName = "Wells / ZONELOG";
28
26
  const position = [16, 10];
29
27
  const horizontal = true;
28
+ const colorName = "Stratigraphy";
30
29
  const Template = (args) => {
31
30
  return React.createElement(DiscreteColorLegend, Object.assign({}, args));
32
31
  };
33
32
  export const ZonelogTemplate = Template.bind({});
34
33
  ZonelogTemplate.args = {
35
34
  discreteData,
36
- name,
37
35
  dataObjectName,
38
36
  position,
39
- template,
37
+ colorName,
40
38
  colorTables,
41
39
  horizontal,
42
40
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Zonelog.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/Zonelog.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAC7E,OAAO,QAAQ,MAAM,4CAA4C,CAAC;AAClE,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAE/D,eAAe;IACX,SAAS,EAAE,mBAAmB;IAC9B,KAAK,EAAE,6BAA6B;CACvC,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,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,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,eAAe,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACjD,eAAe,CAAC,IAAI,GAAG;IACnB,YAAY;IACZ,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.1.13",
3
+ "version": "0.1.17",
4
4
  "description": "Standard library of color tables for geological domain",
5
5
  "release": {
6
6
  "branches": [
@@ -1,41 +1,37 @@
1
1
  import * as React from "react";
2
2
  import legendUtil from "../Utils/discreteLegend";
3
3
  import { scaleOrdinal, select } from "d3";
4
- import { templateArray, propertiesObj } from "../WelllayerTemplateTypes";
5
4
  import { colorTablesArray, colorTablesObj } from "../ColorTableTypes";
6
5
 
7
- declare type ItemColor = {
6
+ interface ItemColor {
8
7
  color: string;
9
8
  }
10
9
 
11
- declare type colorLegendProps = {
10
+ interface colorLegendProps {
12
11
  discreteData: { objects: Record<string, [number[], number]> };
13
12
  dataObjectName: string;
14
- name: string;
15
13
  position: number[];
16
- template: templateArray;
14
+ colorName: string;
17
15
  colorTables: colorTablesArray;
18
16
  horizontal: boolean;
19
17
  }
20
18
 
21
19
  export const DiscreteColorLegend: React.FC<colorLegendProps> = ({
22
20
  discreteData,
23
- name,
24
21
  dataObjectName,
25
22
  position,
26
- template,
23
+ colorName,
27
24
  colorTables,
28
25
  horizontal,
29
26
  }: colorLegendProps) => {
30
27
  React.useEffect(() => {
31
28
  discreteLegend("#legend");
32
- }, [discreteData, template, colorTables, horizontal]);
29
+ }, [discreteData, colorName, colorTables, horizontal]);
33
30
  function discreteLegend(legend: string) {
34
31
  const itemName: string[] = [];
35
32
  const itemColor: ItemColor[] = [];
36
33
  const colorsArray: [number, number, number, number][] = colorTableData(
37
- name,
38
- template,
34
+ colorName,
39
35
  colorTables
40
36
  );
41
37
  Object.keys(discreteData).forEach((key) => {
@@ -63,10 +59,17 @@ export const DiscreteColorLegend: React.FC<colorLegendProps> = ({
63
59
  }
64
60
  const ordinalValues = scaleOrdinal().domain(itemName);
65
61
  const colorLegend = legendUtil(itemColor).inputScale(ordinalValues);
62
+ select(legend).select("div").remove();
66
63
  select(legend).select("svg").remove();
67
64
  const legendLength = itemColor.length;
68
65
  const calcLegendHeight = 22 * legendLength + 4 * legendLength;
69
66
  const selectedLegend = select(legend);
67
+ selectedLegend
68
+ .append("div")
69
+ .text(dataObjectName)
70
+ .attr("y", 7)
71
+ .style("color", "#6F6F6F")
72
+ .style("margin", "10px 10px");
70
73
  if (!horizontal) selectedLegend.style("height", 150 + "px");
71
74
  const svgLegend = selectedLegend
72
75
  .append("svg")
@@ -93,9 +96,6 @@ export const DiscreteColorLegend: React.FC<colorLegendProps> = ({
93
96
  borderRadius: "5px",
94
97
  }}
95
98
  >
96
- <label style={{ color: "#6F6F6F", margin: "10px 10px" }}>
97
- {dataObjectName}
98
- </label>
99
99
  <div id="legend"></div>
100
100
  </div>
101
101
  );
@@ -103,22 +103,16 @@ export const DiscreteColorLegend: React.FC<colorLegendProps> = ({
103
103
 
104
104
  // Based on name return the colors array from color.tables.json file
105
105
  export function colorTableData(
106
- name: string,
107
- template: templateArray,
106
+ colorName: string,
108
107
  colorTables: colorTablesArray
109
108
  ): [number, number, number, number][] {
110
- const properties = template[0]["properties"];
111
- const propertiesData = properties.filter(
112
- (value: propertiesObj) => value.objectName == name
113
- );
114
109
  const colorTableData = colorTables.filter(
115
110
  (value: colorTablesObj) =>
116
- value.name.toLowerCase() ==
117
- propertiesData[0].colorTable.toLowerCase()
111
+ value.name.toLowerCase() == colorName.toLowerCase()
118
112
  );
119
- return colorTableData[0].colors;
113
+ return colorTableData.length > 0 ? colorTableData[0].colors : [];
120
114
  }
121
115
 
122
116
  DiscreteColorLegend.defaultProps = {
123
117
  position: [5, 10],
124
- };
118
+ };
@@ -1,5 +1,5 @@
1
- declare type ItemColor = {
2
- color: string;
1
+ interface ItemColor {
2
+ color: string;
3
3
  }
4
4
 
5
5
  // eslint-disable-next-line
package/src/index.ts CHANGED
@@ -3,4 +3,5 @@ export { colorTableData, DiscreteColorLegend } from './component/Legend/Discrete
3
3
  export { colorsArray, rgbValues, RGBToHex} from './component/Utils/continousLegend';
4
4
  export { colorTablesObj, colorTablesArray } from './component/ColorTableTypes';
5
5
  export { propertiesObj, templateArray } from './component/WelllayerTemplateTypes';
6
- //export const colorTables = require('./component/color-tables');
6
+ import * as colorTables from './component/color-tables.json';
7
+ export default colorTables;
@@ -20,10 +20,10 @@ const discreteData = {
20
20
  "MSH": [[], 8],
21
21
  "CAL": [[], 9]
22
22
  };
23
- const name = "FACIES";
24
23
  const dataObjectName = "Wells / FACIES";
25
24
  const position = [16, 10];
26
25
  const horizontal = true;
26
+ const colorName = "Facies";
27
27
 
28
28
  const Template = (args) => {
29
29
  return <DiscreteColorLegend {...args} />;
@@ -32,10 +32,9 @@ const Template = (args) => {
32
32
  export const FaciesTemplate = Template.bind({});
33
33
  FaciesTemplate.args = {
34
34
  discreteData,
35
- name,
36
35
  dataObjectName,
37
36
  position,
38
- template,
37
+ colorName,
39
38
  colorTables,
40
39
  horizontal,
41
40
  };
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import {DiscreteColorLegend} from "../../../component/Legend/DiscreteLegend";
3
- import template from "../../../component/welllayer_template.json";
4
3
  import colorTables from "../../../component/color-tables.json";
5
4
 
6
5
  export default {
@@ -20,10 +19,10 @@ const discreteData = {
20
19
  "F_MARSH": [[], 8],
21
20
  "F_CALCITE": [[], 9]
22
21
  };
23
- const name = "FACIES_NoCalcite";
24
22
  const dataObjectName = "Wells / FACIES_NoCalcite";
25
23
  const position = [16, 10];
26
24
  const horizontal = true;
25
+ const colorName = "Facies";
27
26
 
28
27
  const Template = (args) => {
29
28
  return <DiscreteColorLegend {...args} />;
@@ -32,10 +31,9 @@ const Template = (args) => {
32
31
  export const FaciesNoCalciteTemplate = Template.bind({});
33
32
  FaciesNoCalciteTemplate.args = {
34
33
  discreteData,
35
- name,
36
34
  dataObjectName,
37
35
  position,
38
- template,
36
+ colorName,
39
37
  colorTables,
40
38
  horizontal,
41
39
  };
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import {DiscreteColorLegend} from "../../../component/Legend/DiscreteLegend";
3
- import template from "../../../component/welllayer_template.json";
4
3
  import colorTables from "../../../component/color-tables.json";
5
4
 
6
5
  export default {
@@ -12,10 +11,10 @@ const discreteData = {
12
11
  "no": [[], 0],
13
12
  "yes": [[], 1]
14
13
  };
15
- const name = "FaultDistance_HUM";
16
14
  const dataObjectName = "Wells / FaultDistance_HUM";
17
15
  const position = [16, 10];
18
16
  const horizontal = true;
17
+ const colorName = "Gas-Oil-Water";
19
18
 
20
19
  const Template = (args) => {
21
20
  return <DiscreteColorLegend {...args} />;
@@ -24,10 +23,9 @@ const Template = (args) => {
24
23
  export const FaultDistanceHumTemplate = Template.bind({});
25
24
  FaultDistanceHumTemplate.args = {
26
25
  discreteData,
27
- name,
28
26
  dataObjectName,
29
27
  position,
30
- template,
28
+ colorName,
31
29
  colorTables,
32
30
  horizontal,
33
31
  };
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import {DiscreteColorLegend} from "../../../component/Legend/DiscreteLegend";
3
- import template from "../../../component/welllayer_template.json";
4
3
  import colorTables from "../../../component/color-tables.json";
5
4
 
6
5
  export default {
@@ -12,10 +11,10 @@ const discreteData = {
12
11
  "no": [[], 0],
13
12
  "yes": [[], 1]
14
13
  };
15
- const name = "FAULT_PROXIMITY_FLAG";
16
14
  const dataObjectName = "Wells / FAULT_PROXIMITY_FLAG";
17
15
  const position = [16, 10];
18
16
  const horizontal = true;
17
+ const colorName = "Time/Depth";
19
18
 
20
19
  const Template = (args) => {
21
20
  return <DiscreteColorLegend {...args} />;
@@ -24,10 +23,9 @@ const Template = (args) => {
24
23
  export const FaultProximityFlagTemplate = Template.bind({});
25
24
  FaultProximityFlagTemplate.args = {
26
25
  discreteData,
27
- name,
28
26
  dataObjectName,
29
27
  position,
30
- template,
28
+ colorName,
31
29
  colorTables,
32
30
  horizontal,
33
31
  };
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import {DiscreteColorLegend} from "../../../component/Legend/DiscreteLegend";
3
- import template from "../../../component/welllayer_template.json";
4
3
  import colorTables from "../../../component/color-tables.json";
5
4
 
6
5
  export default {
@@ -15,10 +14,10 @@ const discreteData = {
15
14
  "TIDAL": [[], 4],
16
15
  "ONSHORE": [[], 5]
17
16
  };
18
- const name = "RDE";
19
17
  const dataObjectName = "Wells / RDE";
20
18
  const position = [16, 10];
21
19
  const horizontal = true;
20
+ const colorName = "Accent";
22
21
 
23
22
  const Template = (args) => {
24
23
  return <DiscreteColorLegend {...args} />;
@@ -30,7 +29,7 @@ RDETemplate.args = {
30
29
  name,
31
30
  dataObjectName,
32
31
  position,
33
- template,
32
+ colorName,
34
33
  colorTables,
35
34
  horizontal,
36
35
  };
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import {DiscreteColorLegend} from "../../../component/Legend/DiscreteLegend";
3
- import template from "../../../component/welllayer_template.json";
4
3
  import colorTables from "../../../component/color-tables.json";
5
4
 
6
5
  export default {
@@ -26,10 +25,10 @@ const discreteData = {
26
25
  "R_USF": [[], 14],
27
26
  "R_LSF": [[], 15]
28
27
  };
29
- const name = "RDE_ORIG";
30
28
  const dataObjectName = "Wells / RDE_ORIG";
31
29
  const position = [16, 10];
32
30
  const horizontal = true;
31
+ const colorName = "Stratigraphy";
33
32
 
34
33
  const Template = (args) => {
35
34
  return <DiscreteColorLegend {...args} />;
@@ -38,10 +37,9 @@ const Template = (args) => {
38
37
  export const RDEOrigTemplate = Template.bind({});
39
38
  RDEOrigTemplate.args = {
40
39
  discreteData,
41
- name,
42
40
  dataObjectName,
43
41
  position,
44
- template,
42
+ colorName,
45
43
  colorTables,
46
44
  horizontal,
47
45
  };
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import {DiscreteColorLegend} from "../../../component/Legend/DiscreteLegend";
3
- import template from "../../../component/welllayer_template.json";
4
3
  import colorTables from "../../../component/color-tables.json";
5
4
 
6
5
  export default {
@@ -15,10 +14,10 @@ const discreteData = {
15
14
  "MID": [[], 2],
16
15
  "LOWER": [[], 3]
17
16
  };
18
- const name = "ZONE_MAIN";
19
17
  const dataObjectName = "Wells / ZONE_MAIN";
20
18
  const position = [16, 10];
21
19
  const horizontal = true;
20
+ const colorName = "Stratigraphy";
22
21
 
23
22
  const Template = (args) => {
24
23
  return <DiscreteColorLegend {...args} />;
@@ -27,10 +26,9 @@ const Template = (args) => {
27
26
  export const ZoneMainTemplate = Template.bind({});
28
27
  ZoneMainTemplate.args = {
29
28
  discreteData,
30
- name,
31
29
  dataObjectName,
32
30
  position,
33
- template,
31
+ colorName,
34
32
  colorTables,
35
33
  horizontal,
36
34
  };
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import {DiscreteColorLegend} from "../../../component/Legend/DiscreteLegend";
3
- import template from "../../../component/welllayer_template.json";
4
3
  import colorTables from "../../../component/color-tables.json";
5
4
 
6
5
  export default {
@@ -25,10 +24,10 @@ const discreteData = {
25
24
  "H1": [[], 13],
26
25
  "BELOW": [[], 14]
27
26
  };
28
- const name = "ZONELOG";
29
27
  const dataObjectName = "Wells / ZONELOG";
30
28
  const position = [16, 10];
31
29
  const horizontal = true;
30
+ const colorName = "Stratigraphy";
32
31
 
33
32
  const Template = (args) => {
34
33
  return <DiscreteColorLegend {...args} />;
@@ -37,10 +36,9 @@ const Template = (args) => {
37
36
  export const ZonelogTemplate = Template.bind({});
38
37
  ZonelogTemplate.args = {
39
38
  discreteData,
40
- name,
41
39
  dataObjectName,
42
40
  position,
43
- template,
41
+ colorName,
44
42
  colorTables,
45
43
  horizontal,
46
44
  };
package/tsconfig.json CHANGED
@@ -1,10 +1,8 @@
1
1
  {
2
2
  "compilerOptions": {
3
- //"baseUrl": "src",
4
3
  "outDir": "dist",
5
4
  "module": "es6",
6
5
  "target": "es6",
7
- //"lib": ["es6", "dom", "es2016", "es2017"],
8
6
  "sourceMap": true,
9
7
  "allowJs": true,
10
8
  "jsx": "react",
@@ -17,8 +15,11 @@
17
15
  "strictNullChecks": true,
18
16
  "suppressImplicitAnyIndexErrors": true,
19
17
  "noUnusedLocals": true,
20
- "noUnusedParameters": true
18
+ "noUnusedParameters": true,
19
+ "resolveJsonModule": true,
20
+ "esModuleInterop": true,
21
+ "allowSyntheticDefaultImports": true
21
22
  },
22
- "include": ["src",],
23
+ "include": ["src"],
23
24
  "exclude": ["node_modules"]
24
25
  }