@emerson-eps/color-tables 0.1.16 → 0.1.20

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 (70) hide show
  1. package/dist/component/Legend/ContinuousLegend.d.ts +1 -3
  2. package/dist/component/Legend/ContinuousLegend.js +3 -3
  3. package/dist/component/Legend/ContinuousLegend.js.map +1 -1
  4. package/dist/component/Legend/DiscreteLegend.d.ts +2 -4
  5. package/dist/component/Legend/DiscreteLegend.js +13 -10
  6. package/dist/component/Legend/DiscreteLegend.js.map +1 -1
  7. package/dist/component/Utils/continousLegend.d.ts +2 -3
  8. package/dist/component/Utils/continousLegend.js +9 -9
  9. package/dist/component/Utils/continousLegend.js.map +1 -1
  10. package/dist/index.d.ts +1 -2
  11. package/dist/index.js +1 -2
  12. package/dist/index.js.map +1 -1
  13. package/dist/stories/ColorLegends/ContinousLgends/MD.stories.js +2 -2
  14. package/dist/stories/ColorLegends/ContinousLgends/MD.stories.js.map +1 -1
  15. package/dist/stories/ColorLegends/ContinousLgends/NTG.stories.js +2 -2
  16. package/dist/stories/ColorLegends/ContinousLgends/NTG.stories.js.map +1 -1
  17. package/dist/stories/ColorLegends/ContinousLgends/PermTot.stories.js +2 -2
  18. package/dist/stories/ColorLegends/ContinousLgends/PermTot.stories.js.map +1 -1
  19. package/dist/stories/ColorLegends/ContinousLgends/Permeability.stories.js +2 -2
  20. package/dist/stories/ColorLegends/ContinousLgends/Permeability.stories.js.map +1 -1
  21. package/dist/stories/ColorLegends/ContinousLgends/PoroTot.stories.js +2 -2
  22. package/dist/stories/ColorLegends/ContinousLgends/PoroTot.stories.js.map +1 -1
  23. package/dist/stories/ColorLegends/ContinousLgends/Porosity.stories.js +2 -2
  24. package/dist/stories/ColorLegends/ContinousLgends/Porosity.stories.js.map +1 -1
  25. package/dist/stories/ColorLegends/ContinousLgends/SW.stories.js +2 -2
  26. package/dist/stories/ColorLegends/ContinousLgends/SW.stories.js.map +1 -1
  27. package/dist/stories/ColorLegends/DiscreteLegends/Facies.stories.js +2 -4
  28. package/dist/stories/ColorLegends/DiscreteLegends/Facies.stories.js.map +1 -1
  29. package/dist/stories/ColorLegends/DiscreteLegends/FaciesNoCalcite.stories.js +2 -4
  30. package/dist/stories/ColorLegends/DiscreteLegends/FaciesNoCalcite.stories.js.map +1 -1
  31. package/dist/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.js +2 -4
  32. package/dist/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.js.map +1 -1
  33. package/dist/stories/ColorLegends/DiscreteLegends/FaultProximityFlag.stories.js +2 -4
  34. package/dist/stories/ColorLegends/DiscreteLegends/FaultProximityFlag.stories.js.map +1 -1
  35. package/dist/stories/ColorLegends/DiscreteLegends/RDE.stories.js +2 -4
  36. package/dist/stories/ColorLegends/DiscreteLegends/RDE.stories.js.map +1 -1
  37. package/dist/stories/ColorLegends/DiscreteLegends/RDE_Orig.stories.js +2 -4
  38. package/dist/stories/ColorLegends/DiscreteLegends/RDE_Orig.stories.js.map +1 -1
  39. package/dist/stories/ColorLegends/DiscreteLegends/ZoneMain.stories.js +2 -4
  40. package/dist/stories/ColorLegends/DiscreteLegends/ZoneMain.stories.js.map +1 -1
  41. package/dist/stories/ColorLegends/DiscreteLegends/Zonelog.stories.js +2 -4
  42. package/dist/stories/ColorLegends/DiscreteLegends/Zonelog.stories.js.map +1 -1
  43. package/package.json +5 -5
  44. package/src/component/Legend/ContinuousLegend.tsx +6 -9
  45. package/src/component/Legend/DiscreteLegend.tsx +15 -21
  46. package/src/component/Utils/continousLegend.ts +9 -17
  47. package/src/component/Utils/discreteLegend.ts +2 -2
  48. package/src/index.ts +1 -3
  49. package/src/stories/ColorLegends/ContinousLgends/MD.stories.jsx +2 -2
  50. package/src/stories/ColorLegends/ContinousLgends/NTG.stories.jsx +2 -2
  51. package/src/stories/ColorLegends/ContinousLgends/PermTot.stories.jsx +2 -2
  52. package/src/stories/ColorLegends/ContinousLgends/Permeability.stories.jsx +2 -2
  53. package/src/stories/ColorLegends/ContinousLgends/PoroTot.stories.jsx +2 -2
  54. package/src/stories/ColorLegends/ContinousLgends/Porosity.stories.jsx +2 -2
  55. package/src/stories/ColorLegends/ContinousLgends/SW.stories.jsx +2 -2
  56. package/src/stories/ColorLegends/DiscreteLegends/Facies.stories.jsx +2 -4
  57. package/src/stories/ColorLegends/DiscreteLegends/FaciesNoCalcite.stories.jsx +2 -4
  58. package/src/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.jsx +2 -4
  59. package/src/stories/ColorLegends/DiscreteLegends/FaultProximityFlag.stories.jsx +2 -4
  60. package/src/stories/ColorLegends/DiscreteLegends/RDE.stories.jsx +2 -4
  61. package/src/stories/ColorLegends/DiscreteLegends/RDE_Orig.stories.jsx +2 -4
  62. package/src/stories/ColorLegends/DiscreteLegends/ZoneMain.stories.jsx +2 -4
  63. package/src/stories/ColorLegends/DiscreteLegends/Zonelog.stories.jsx +2 -4
  64. package/tsconfig.json +2 -2
  65. package/dist/component/WelllayerTemplateTypes.d.ts +0 -13
  66. package/dist/component/WelllayerTemplateTypes.js +0 -2
  67. package/dist/component/WelllayerTemplateTypes.js.map +0 -1
  68. package/dist/component/welllayer_template.json +0 -89
  69. package/src/component/WelllayerTemplateTypes.ts +0 -15
  70. package/src/component/welllayer_template.json +0 -89
@@ -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,20 +12,19 @@ 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
  };
23
22
  export const RDETemplate = Template.bind({});
24
23
  RDETemplate.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":"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,EAA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,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,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,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,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
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C,CAAC;IAClB,WAAW,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACpB,YAAY,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;IACtB,aAAa,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;IACvB,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;IACnB,WAAW,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;IACrB,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,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,EAA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package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emerson-eps/color-tables",
3
- "version": "0.1.16",
3
+ "version": "0.1.20",
4
4
  "description": "Standard library of color tables for geological domain",
5
5
  "release": {
6
6
  "branches": [
@@ -16,9 +16,6 @@
16
16
  "semantic-release": "semantic-release"
17
17
  },
18
18
  "dependencies": {
19
- "@testing-library/jest-dom": "^5.16.1",
20
- "@testing-library/react": "^11.2.7",
21
- "@testing-library/user-event": "^12.8.3",
22
19
  "d3": "^7.2.0",
23
20
  "d3-color": "^3.0.1",
24
21
  "d3-interpolate": "^3.0.1",
@@ -60,6 +57,9 @@
60
57
  "babel-loader": "^8.1.0",
61
58
  "semantic-release": "^18.0.1",
62
59
  "ts-loader": "^9.2.6",
63
- "typescript": "^4.5.4"
60
+ "typescript": "^4.5.4",
61
+ "@testing-library/jest-dom": "^5.16.1",
62
+ "@testing-library/react": "^11.2.7",
63
+ "@testing-library/user-event": "^12.8.3"
64
64
  }
65
65
  }
@@ -1,7 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { RGBToHex, colorsArray } from "../Utils/continousLegend";
3
3
  import { select, scaleLinear, scaleSequential, axisBottom } from "d3";
4
- import { templateArray } from "../WelllayerTemplateTypes";
5
4
  import { colorTablesArray } from "../ColorTableTypes";
6
5
 
7
6
  declare type legendProps = {
@@ -9,8 +8,7 @@ declare type legendProps = {
9
8
  max: number;
10
9
  dataObjectName: string;
11
10
  position: number[];
12
- name: string;
13
- template: templateArray;
11
+ colorName: string;
14
12
  colorTables: colorTablesArray;
15
13
  horizontal: boolean;
16
14
  }
@@ -25,19 +23,18 @@ export const ContinuousLegend: React.FC<legendProps> = ({
25
23
  max,
26
24
  dataObjectName,
27
25
  position,
28
- name,
29
- template,
26
+ colorName,
30
27
  colorTables,
31
28
  horizontal,
32
29
  }: legendProps) => {
33
30
  React.useEffect(() => {
34
31
  continuousLegend("#legend");
35
- }, [min, max, template, colorTables, horizontal]);
32
+ }, [min, max, colorName, colorTables, horizontal]);
36
33
 
37
34
  function continuousLegend(selected_id: string) {
38
35
  const itemColor: ItemColor[] = [];
39
36
  // Return the matched colors array from color.tables.json file
40
- const colorTableColors = colorsArray(name, template, colorTables);
37
+ const colorTableColors = colorsArray(colorName, colorTables);
41
38
  colorTableColors.forEach((value: [number, number, number, number]) => {
42
39
  // return the color and offset needed to draw the legend
43
40
  itemColor.push({
@@ -72,10 +69,10 @@ export const ContinuousLegend: React.FC<legendProps> = ({
72
69
  .data(itemColor)
73
70
  .enter()
74
71
  .append("stop")
75
- .attr("offset", function (data: any) {
72
+ .attr("offset", function (data) {
76
73
  return data.offset + "%";
77
74
  })
78
- .attr("stop-color", function (data: any) {
75
+ .attr("stop-color", function (data) {
79
76
  return data.color;
80
77
  });
81
78
 
@@ -1,7 +1,6 @@
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
6
  declare type ItemColor = {
@@ -11,31 +10,28 @@ declare type ItemColor = {
11
10
  declare type 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
+ };
@@ -4,37 +4,26 @@ import {
4
4
  colorTablesArray,
5
5
  colorTablesObj,
6
6
  } from "../ColorTableTypes";
7
- import {
8
- templateArray,
9
- propertiesObj,
10
- } from "../WelllayerTemplateTypes";
11
7
 
12
8
  // Based on objectName return the colors array from color.tables.json file
13
9
  export function colorsArray(
14
- objectName: string,
15
- template: templateArray,
10
+ colorName: string,
16
11
  colorTables: colorTablesArray
17
12
  ): [number, number, number, number][] {
18
- const properties = template[0]["properties"];
19
- const propertiesData = properties.filter(
20
- (value: propertiesObj) => value.objectName == objectName
21
- );
22
13
  const colorTableData = colorTables.filter(
23
14
  (value: colorTablesObj) =>
24
- value.name.toLowerCase() ==
25
- propertiesData[0].colorTable.toLowerCase()
15
+ value.name.toLowerCase() == colorName.toLowerCase()
26
16
  );
27
- return colorTableData[0].colors;
17
+ return colorTableData.length > 0 ? colorTableData[0].colors : [];
28
18
  }
29
19
 
30
20
  // return the colors based on the point
31
21
  export function rgbValues(
32
- objectName: string,
33
22
  point: number,
34
- template: templateArray,
23
+ colorName: string,
35
24
  colorTables: colorTablesArray
36
25
  ): number[] | { r: number; g: number; b: number; opacity: number } | undefined {
37
- const colorTableColors = colorsArray(objectName, template, colorTables);
26
+ const colorTableColors = colorsArray(colorName, colorTables);
38
27
  // compare the point and first value from colorTableColors
39
28
  const colorArrays = colorTableColors.find(
40
29
  (value: [number, number, number, number]) => {
@@ -57,10 +46,13 @@ export function rgbValues(
57
46
  const secondColorArray = colorTableColors[index];
58
47
 
59
48
  if ((firstColorArray || secondColorArray) != undefined) {
49
+ const t0 = firstColorArray[0];
50
+ const t1 = secondColorArray[0];
51
+ const t = (point - t0) / (t1 - t0); // t = 0.0 gives first color, t = 1.0 gives second color.
60
52
  const interpolatedValues = interpolateRgb(
61
53
  RGBToHex(firstColorArray).color,
62
54
  RGBToHex(secondColorArray).color
63
- )(point);
55
+ )(t);
64
56
  return color(interpolatedValues)?.rgb();
65
57
  }
66
58
  return undefined;
@@ -1,5 +1,5 @@
1
- declare type ItemColor = {
2
- color: string;
1
+ declare type ItemColor = {
2
+ color: string;
3
3
  }
4
4
 
5
5
  // eslint-disable-next-line
package/src/index.ts CHANGED
@@ -1,8 +1,6 @@
1
1
  export { ContinuousLegend } from './component/Legend/ContinuousLegend';
2
- export { colorTableData, DiscreteColorLegend } from './component/Legend/DiscreteLegend';
3
2
  export { colorsArray, rgbValues, RGBToHex} from './component/Utils/continousLegend';
3
+ export { colorTableData, DiscreteColorLegend } from './component/Legend/DiscreteLegend';
4
4
  export { colorTablesObj, colorTablesArray } from './component/ColorTableTypes';
5
- export { propertiesObj, templateArray } from './component/WelllayerTemplateTypes';
6
- //export const colorTables = require('./component/color-tables');
7
5
  import * as colorTables from './component/color-tables.json';
8
6
  export default colorTables;
@@ -4,7 +4,6 @@ export default {
4
4
  component: ContinuousLegend,
5
5
  title: "Legends/ContinousLegend",
6
6
  };
7
- import template from "../../../component/welllayer_template.json";
8
7
  import colorTables from "../../../component/color-tables.json";
9
8
 
10
9
  const min = 2918;
@@ -13,6 +12,7 @@ const dataObjectName = "Wells / MD";
13
12
  const position = [16, 10];
14
13
  const name = "MD";
15
14
  const horizontal = true;
15
+ const colorName = "Time/Depth";
16
16
 
17
17
  const Template = (args) => {
18
18
  return <ContinuousLegend {...args} />;
@@ -25,7 +25,7 @@ MDTemplate.args = {
25
25
  dataObjectName,
26
26
  position,
27
27
  name,
28
- template,
28
+ colorName,
29
29
  colorTables,
30
30
  horizontal,
31
31
  };
@@ -4,7 +4,6 @@ export default {
4
4
  component: ContinuousLegend,
5
5
  title: "Legends/ContinousLegend",
6
6
  };
7
- import template from "../../../component/welllayer_template.json";
8
7
  import colorTables from "../../../component/color-tables.json";
9
8
 
10
9
  const min = 0;
@@ -13,6 +12,7 @@ const dataObjectName = "Wells / NTG";
13
12
  const position = [16, 10];
14
13
  const name = "NTG";
15
14
  const horizontal = true;
15
+ const colorName = "Rainbow";
16
16
 
17
17
  const Template = (args) => {
18
18
  return <ContinuousLegend {...args} />;
@@ -25,7 +25,7 @@ NTGTemplate.args = {
25
25
  dataObjectName,
26
26
  position,
27
27
  name,
28
- template,
28
+ colorName,
29
29
  colorTables,
30
30
  horizontal,
31
31
  };
@@ -4,7 +4,6 @@ export default {
4
4
  component: ContinuousLegend,
5
5
  title: "Legends/ContinousLegend",
6
6
  };
7
- import template from "../../../component/welllayer_template.json";
8
7
  import colorTables from "../../../component/color-tables.json";
9
8
 
10
9
  const min = -999;
@@ -13,6 +12,7 @@ const dataObjectName = "Wells / PERMTOT";
13
12
  const position = [16, 10];
14
13
  const name = "PERM_TOT";
15
14
  const horizontal = true;
15
+ const colorName = "Porosity";
16
16
 
17
17
  const Template = (args) => {
18
18
  return <ContinuousLegend {...args} />;
@@ -25,7 +25,7 @@ PermTotTemplate.args = {
25
25
  dataObjectName,
26
26
  position,
27
27
  name,
28
- template,
28
+ colorName,
29
29
  colorTables,
30
30
  horizontal,
31
31
  };
@@ -4,7 +4,6 @@ export default {
4
4
  component: ContinuousLegend,
5
5
  title: "Legends/ContinousLegend",
6
6
  };
7
- import template from "../../../component/welllayer_template.json";
8
7
  import colorTables from "../../../component/color-tables.json";
9
8
 
10
9
  const min = -999;
@@ -13,6 +12,7 @@ const dataObjectName = "Wells / PERM";
13
12
  const position = [16, 10];
14
13
  const name = "PERM";
15
14
  const horizontal = true;
15
+ const colorName = "Permeability";
16
16
 
17
17
  const Template = (args) => {
18
18
  return <ContinuousLegend {...args} />;
@@ -25,7 +25,7 @@ PermeabilityTemplate.args = {
25
25
  dataObjectName,
26
26
  position,
27
27
  name,
28
- template,
28
+ colorName,
29
29
  colorTables,
30
30
  horizontal,
31
31
  };
@@ -4,7 +4,6 @@ export default {
4
4
  component: ContinuousLegend,
5
5
  title: "Legends/ContinousLegend",
6
6
  };
7
- import template from "../../../component/welllayer_template.json";
8
7
  import colorTables from "../../../component/color-tables.json";
9
8
 
10
9
  const min = 0;
@@ -13,6 +12,7 @@ const dataObjectName = "Wells / POROTOT";
13
12
  const position = [16, 10];
14
13
  const name = "PORO";
15
14
  const horizontal = true;
15
+ const colorName = "Porosity";
16
16
 
17
17
  const Template = (args) => {
18
18
  return <ContinuousLegend {...args} />;
@@ -25,7 +25,7 @@ PoroTotTemplate.args = {
25
25
  dataObjectName,
26
26
  position,
27
27
  name,
28
- template,
28
+ colorName,
29
29
  colorTables,
30
30
  horizontal,
31
31
  };
@@ -4,7 +4,6 @@ export default {
4
4
  component: ContinuousLegend,
5
5
  title: "Legends/ContinousLegend",
6
6
  };
7
- import template from "../../../component/welllayer_template.json";
8
7
  import colorTables from "../../../component/color-tables.json";
9
8
 
10
9
  const min = 0;
@@ -13,6 +12,7 @@ const dataObjectName = "Wells / PORO";
13
12
  const position = [16, 10];
14
13
  const name = "PORO";
15
14
  const horizontal = true;
15
+ const colorName = "Porosity";
16
16
 
17
17
  const Template = (args) => {
18
18
  return <ContinuousLegend {...args} />;
@@ -25,7 +25,7 @@ PorosityTemplate.args = {
25
25
  dataObjectName,
26
26
  position,
27
27
  name,
28
- template,
28
+ colorName,
29
29
  colorTables,
30
30
  horizontal,
31
31
  };
@@ -4,7 +4,6 @@ export default {
4
4
  component: ContinuousLegend,
5
5
  title: "Legends/ContinousLegend",
6
6
  };
7
- import template from "../../../component/welllayer_template.json";
8
7
  import colorTables from "../../../component/color-tables.json";
9
8
 
10
9
  const min = 0;
@@ -13,6 +12,7 @@ const dataObjectName = "Wells / SW";
13
12
  const position = [16, 10];
14
13
  const name = "SW";
15
14
  const horizontal = true;
15
+ const colorName = "Physics";
16
16
 
17
17
  const Template = (args) => {
18
18
  return <ContinuousLegend {...args} />;
@@ -25,7 +25,7 @@ SWTemplate.args = {
25
25
  dataObjectName,
26
26
  position,
27
27
  name,
28
- template,
28
+ Physics,
29
29
  colorTables,
30
30
  horizontal,
31
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 {
@@ -20,10 +19,10 @@ const discreteData = {
20
19
  "MSH": [[], 8],
21
20
  "CAL": [[], 9]
22
21
  };
23
- const name = "FACIES";
24
22
  const dataObjectName = "Wells / FACIES";
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 FaciesTemplate = Template.bind({});
33
32
  FaciesTemplate.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 {
@@ -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
  };