@webviz/subsurface-viewer 0.0.1-alpha.1 → 0.0.2-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/dist/package.json +5 -2
  2. package/package.json +6 -3
  3. package/src/DashSubsurfaceViewer.tsx +0 -270
  4. package/src/SubsurfaceViewer.stories.tsx +0 -449
  5. package/src/SubsurfaceViewer.test.tsx +0 -98
  6. package/src/SubsurfaceViewer.tsx +0 -356
  7. package/src/__snapshots__/SubsurfaceViewer.test.tsx.snap +0 -178
  8. package/src/assets/glTF/north_arrow/scene.bin +0 -0
  9. package/src/assets/glTF/north_arrow/scene.gltf +0 -315
  10. package/src/assets/glTF/north_arrow/textures/Arrow5_baseColor.png +0 -0
  11. package/src/assets/glTF/north_arrow/textures/Arrow5_metallicRoughness.png +0 -0
  12. package/src/assets/glTF/north_arrow/textures/Arrow5_normal.png +0 -0
  13. package/src/components/ColorLegend.test.tsx +0 -32
  14. package/src/components/ColorLegend.tsx +0 -80
  15. package/src/components/ColorLegends.test.tsx +0 -97
  16. package/src/components/ColorLegends.tsx +0 -46
  17. package/src/components/DistanceScale.stories.tsx +0 -28
  18. package/src/components/DistanceScale.test.tsx +0 -36
  19. package/src/components/DistanceScale.tsx +0 -84
  20. package/src/components/InfoCard.test.tsx +0 -110
  21. package/src/components/InfoCard.tsx +0 -263
  22. package/src/components/Map.test.tsx +0 -142
  23. package/src/components/Map.tsx +0 -1435
  24. package/src/components/StatusIndicator.test.tsx +0 -14
  25. package/src/components/StatusIndicator.tsx +0 -38
  26. package/src/components/ViewAnnotation.tsx +0 -16
  27. package/src/components/ViewFooter.test.tsx +0 -12
  28. package/src/components/ViewFooter.tsx +0 -30
  29. package/src/components/__snapshots__/ColorLegends.test.tsx.snap +0 -15
  30. package/src/components/__snapshots__/DistanceScale.test.tsx.snap +0 -33
  31. package/src/components/__snapshots__/InfoCard.test.tsx.snap +0 -561
  32. package/src/components/__snapshots__/Map.test.tsx.snap +0 -119
  33. package/src/components/__snapshots__/StatusIndicator.test.tsx.snap +0 -3
  34. package/src/components/__snapshots__/ViewFooter.test.tsx.snap +0 -7
  35. package/src/components/settings/DrawModeSelector.test.tsx +0 -45
  36. package/src/components/settings/DrawModeSelector.tsx +0 -58
  37. package/src/components/settings/DrawModeSelector_performance.test.tsx +0 -35
  38. package/src/components/settings/LayerProperty.test.tsx +0 -35
  39. package/src/components/settings/LayerProperty.tsx +0 -153
  40. package/src/components/settings/LayerProperty_performance.test.tsx +0 -39
  41. package/src/components/settings/LayerSettingsButton.test.tsx +0 -133
  42. package/src/components/settings/LayerSettingsButton.tsx +0 -95
  43. package/src/components/settings/LayersButton.test.tsx +0 -102
  44. package/src/components/settings/LayersButton.tsx +0 -97
  45. package/src/components/settings/NumericInput.test.tsx +0 -25
  46. package/src/components/settings/NumericInput.tsx +0 -67
  47. package/src/components/settings/Settings.tsx +0 -71
  48. package/src/components/settings/SliderInput.test.tsx +0 -28
  49. package/src/components/settings/SliderInput.tsx +0 -71
  50. package/src/components/settings/ToggleButton.test.tsx +0 -25
  51. package/src/components/settings/ToggleButton.tsx +0 -53
  52. package/src/components/settings/__snapshots__/DrawModeSelector.test.tsx.snap +0 -124
  53. package/src/components/settings/__snapshots__/LayerProperty.test.tsx.snap +0 -124
  54. package/src/components/settings/__snapshots__/LayerSettingsButton.test.tsx.snap +0 -36
  55. package/src/components/settings/__snapshots__/LayersButton.test.tsx.snap +0 -83
  56. package/src/components/settings/__snapshots__/NumericInput.test.tsx.snap +0 -123
  57. package/src/components/settings/__snapshots__/SliderInput.test.tsx.snap +0 -244
  58. package/src/components/settings/__snapshots__/ToggleButton.test.tsx.snap +0 -182
  59. package/src/custom.d.ts +0 -9
  60. package/src/index.ts +0 -5
  61. package/src/inputSchema/ColorTables.json +0 -51
  62. package/src/inputSchema/FaultPolygons.json +0 -80
  63. package/src/inputSchema/Grid.json +0 -39
  64. package/src/inputSchema/PieChart.json +0 -72
  65. package/src/inputSchema/WellLog.json +0 -126
  66. package/src/inputSchema/WellLogTemplate.json +0 -136
  67. package/src/inputSchema/WellLogs.json +0 -5
  68. package/src/inputSchema/Wells.json +0 -106
  69. package/src/inputSchema/schemaValidationUtil.tsx +0 -55
  70. package/src/inputSchema/validator.tsx +0 -72
  71. package/src/inputSchema/wellCompletions.json +0 -108
  72. package/src/layers/BoxSelectionLayer/boxSelectionLayer.stories.tsx +0 -172
  73. package/src/layers/BoxSelectionLayer/boxSelectionLayer.tsx +0 -136
  74. package/src/layers/axes/axes-fragment.glsl.ts +0 -15
  75. package/src/layers/axes/axesLayer.stories.tsx +0 -87
  76. package/src/layers/axes/axesLayer.ts +0 -692
  77. package/src/layers/axes/boxLayer.ts +0 -71
  78. package/src/layers/axes/grid-vertex.glsl.ts +0 -14
  79. package/src/layers/axes2d/axes2DLayer.stories.tsx +0 -150
  80. package/src/layers/axes2d/axes2DLayer.ts +0 -841
  81. package/src/layers/axes2d/font-atlas.png +0 -0
  82. package/src/layers/axes2d/label-fragment.glsl.js +0 -37
  83. package/src/layers/axes2d/label-vertex.glsl.js +0 -20
  84. package/src/layers/axes2d/line-fragment.glsl.js +0 -14
  85. package/src/layers/axes2d/line-vertex.glsl.js +0 -13
  86. package/src/layers/colormap/colormap.fs.glsl.ts +0 -42
  87. package/src/layers/colormap/colormapLayer.ts +0 -247
  88. package/src/layers/drawing/drawingLayer.tsx +0 -256
  89. package/src/layers/fault_polygons/faultPolygonsLayer.ts +0 -54
  90. package/src/layers/grid3d/fragment.fs.glsl.ts +0 -109
  91. package/src/layers/grid3d/fragment_lines.glsl.ts +0 -21
  92. package/src/layers/grid3d/grid3dLayer.stories.tsx +0 -172
  93. package/src/layers/grid3d/grid3dLayer.ts +0 -248
  94. package/src/layers/grid3d/privateLayer.ts +0 -292
  95. package/src/layers/grid3d/vertex.glsl.ts +0 -43
  96. package/src/layers/grid3d/vertex_lines.glsl.ts +0 -15
  97. package/src/layers/grid3d/webworker.ts +0 -173
  98. package/src/layers/hillshading2d/hillshading2d.fs.glsl.ts +0 -62
  99. package/src/layers/hillshading2d/hillshading2dLayer.ts +0 -172
  100. package/src/layers/index.ts +0 -35
  101. package/src/layers/intersection/intersectionView.stories.tsx +0 -294
  102. package/src/layers/intersection/unfoldedGeoJsonLayer.ts +0 -92
  103. package/src/layers/map/fragment.fs.glsl.ts +0 -127
  104. package/src/layers/map/fragment_lines.glsl.ts +0 -21
  105. package/src/layers/map/mapLayer.stories.tsx +0 -1369
  106. package/src/layers/map/mapLayer.ts +0 -470
  107. package/src/layers/map/privateMapLayer.ts +0 -317
  108. package/src/layers/map/vertex.glsl.ts +0 -45
  109. package/src/layers/map/vertex_lines.glsl.ts +0 -15
  110. package/src/layers/map/webworker.ts +0 -479
  111. package/src/layers/northarrow/northArrow.stories.tsx +0 -108
  112. package/src/layers/northarrow/northArrow3DLayer.ts +0 -204
  113. package/src/layers/northarrow/northarrow-fragment.glsl.js +0 -14
  114. package/src/layers/northarrow/northarrow-vertex.glsl.js +0 -13
  115. package/src/layers/piechart/fragment.glsl.js +0 -42
  116. package/src/layers/piechart/pieChartLayer.ts +0 -246
  117. package/src/layers/piechart/vertex.glsl.js +0 -42
  118. package/src/layers/points/pointsLayer.stories.tsx +0 -141
  119. package/src/layers/points/pointsLayer.ts +0 -143
  120. package/src/layers/polylines/polylinesLayer.stories.tsx +0 -144
  121. package/src/layers/polylines/polylinesLayer.ts +0 -263
  122. package/src/layers/selectable_geojson/selectableGeoJsonLayer.ts +0 -25
  123. package/src/layers/shader_modules/decoder.fs.glsl.ts +0 -41
  124. package/src/layers/shader_modules/decoder.ts +0 -46
  125. package/src/layers/shader_modules/index.ts +0 -1
  126. package/src/layers/terrain/map3DLayer.stories.tsx +0 -340
  127. package/src/layers/terrain/map3DLayer.ts +0 -556
  128. package/src/layers/terrain/terrainMapLayer.ts +0 -334
  129. package/src/layers/terrain/terrainmap.fs.glsl.ts +0 -134
  130. package/src/layers/triangle/fragment.fs.glsl.ts +0 -126
  131. package/src/layers/triangle/fragment_lines.glsl.ts +0 -21
  132. package/src/layers/triangle/privateTriangleLayer.ts +0 -203
  133. package/src/layers/triangle/test_data/surfacePoints.ts +0 -4344
  134. package/src/layers/triangle/test_data/surfaceTriangles.ts +0 -7392
  135. package/src/layers/triangle/triangleLayer.stories.tsx +0 -191
  136. package/src/layers/triangle/triangleLayer.ts +0 -273
  137. package/src/layers/triangle/vertex.glsl.ts +0 -35
  138. package/src/layers/triangle/vertex_lines.glsl.ts +0 -15
  139. package/src/layers/triangle/webworker.ts +0 -165
  140. package/src/layers/utils/glsl.d.ts +0 -4
  141. package/src/layers/utils/layerTools.ts +0 -182
  142. package/src/layers/utils/propertyMapTools.ts +0 -43
  143. package/src/layers/wells/utils/spline.ts +0 -318
  144. package/src/layers/wells/wellsLayer.stories.tsx +0 -625
  145. package/src/layers/wells/wellsLayer.ts +0 -1377
  146. package/src/redux/actions.ts +0 -8
  147. package/src/redux/reducer.ts +0 -43
  148. package/src/redux/store.ts +0 -15
  149. package/src/redux/types.ts +0 -114
  150. package/src/storybook/SubsurfaceViewer.stories.jsx +0 -644
  151. package/src/storybook/components/InfoCard.stories.jsx +0 -39
  152. package/src/storybook/components/colorLegends/ContinuousLegend.stories.jsx +0 -32
  153. package/src/storybook/components/colorLegends/DiscreteLegend.stories.jsx +0 -33
  154. package/src/storybook/components/colorLegends/IndividualScaleForMap.stories.jsx +0 -99
  155. package/src/storybook/components/colorLegends/SingleScaleForMap.stories.jsx +0 -120
  156. package/src/storybook/components/settings/LayerSettingsButton.stories.jsx +0 -34
  157. package/src/storybook/components/settings/NumericInput.stories.jsx +0 -17
  158. package/src/storybook/components/settings/ToggleButton.stories.jsx +0 -16
  159. package/src/storybook/schemaValidation/sampleData.js +0 -177
  160. package/src/storybook/schemaValidation/schemaValidation.stories.jsx +0 -91
  161. package/src/test/TestWrapper.tsx +0 -13
  162. package/src/utils/configuration.ts +0 -61
  163. package/src/utils/fit-bounds.js +0 -85
  164. package/src/utils/measurement.ts +0 -61
  165. package/src/utils/northArrow.ts +0 -4
  166. package/src/utils/specExtractor.ts +0 -36
  167. package/src/viewports/index.js +0 -1
  168. package/src/viewports/intersectionViewport.ts +0 -137
  169. package/src/views/index.js +0 -1
  170. package/src/views/intersectionView.ts +0 -38
  171. package/tsconfig.json +0 -7
@@ -1,33 +0,0 @@
1
- import React from "react";
2
- import { DiscreteColorLegend, colorTables } from "@emerson-eps/color-tables";
3
-
4
- export default {
5
- component: DiscreteColorLegend,
6
- title: "SubsurfaceViewer/Components/ColorLegends/DiscreteColorLegend",
7
- };
8
-
9
- const discreteData = {
10
- Above_BCU: [[255, 13, 186, 255], 0],
11
- ABOVE: [[255, 64, 53, 255], 1],
12
- H12: [[247, 255, 164, 255], 2],
13
- BELOW: [[73, 255, 35, 255], 14],
14
- H3: [[255, 144, 1, 255], 11],
15
- };
16
- const colorName = "Stratigraphy";
17
- const dataObjectName = "Wells / ZONELOG";
18
- const position = [16, 10];
19
- const horizontal = false;
20
-
21
- const Template = (args) => {
22
- return <DiscreteColorLegend {...args} />;
23
- };
24
-
25
- export const DiscreteTemplate = Template.bind({});
26
- DiscreteTemplate.args = {
27
- discreteData,
28
- dataObjectName,
29
- position,
30
- colorName,
31
- colorTables,
32
- horizontal,
33
- };
@@ -1,99 +0,0 @@
1
- import React from "react";
2
- import exampleData from "../../../../../../demo/example-data/deckgl-map.json";
3
- import SubsurfaceViewer from "../../../SubsurfaceViewer";
4
-
5
- export default {
6
- component: SubsurfaceViewer,
7
- title: "SubsurfaceViewer/Components/ColorLegends/IndividualScaleForMap",
8
- };
9
-
10
- // Template for when edited data needs to be captured.
11
- const EditDataTemplate = (args) => {
12
- const [editedData, setEditedData] = React.useState(args.editedData);
13
- React.useEffect(() => {
14
- setEditedData(args.editedData);
15
- }, [args.editedData]);
16
- return (
17
- <SubsurfaceViewer
18
- {...args}
19
- editedData={editedData}
20
- setProps={(updatedProps) => {
21
- setEditedData(updatedProps.editedData);
22
- }}
23
- />
24
- );
25
- };
26
-
27
- // 4 maps with individual color scales for each map
28
- export const IndividualScaleForMap = EditDataTemplate.bind({});
29
- IndividualScaleForMap.args = {
30
- ...exampleData[0],
31
- legend: {
32
- visible: true,
33
- },
34
- zoom: -5,
35
- layers: [
36
- exampleData[0].layers[0],
37
- {
38
- ...exampleData[0].layers[0],
39
- colorMapRange: [3000, 3100],
40
- valueRange: [3000, 3100],
41
- id: "colormap-2-layer",
42
- colorMapName: "Porosity",
43
- },
44
- {
45
- ...exampleData[0].layers[0],
46
- colorMapRange: [3000, 3100],
47
- valueRange: [3000, 3100],
48
- id: "colormap-3-layer",
49
- colorMapName: "Permeability",
50
- },
51
- {
52
- ...exampleData[0].layers[0],
53
- colorMapRange: [3000, 3100],
54
- valueRange: [3000, 3100],
55
- id: "colormap-4-layer",
56
- colorMapName: "Seismic",
57
- },
58
- ],
59
- views: {
60
- layout: [2, 2],
61
- showLabel: true,
62
- viewports: [
63
- {
64
- id: "view_1",
65
- name: "Colormap 1 layer",
66
- show3D: false,
67
- layerIds: ["colormap-layer"],
68
- },
69
- {
70
- id: "view_2",
71
- name: "Colormap 2 layer",
72
- show3D: false,
73
- layerIds: ["colormap-2-layer"],
74
- },
75
- {
76
- id: "view_3",
77
- name: "Colormap 3 layer",
78
- show3D: false,
79
- layerIds: ["colormap-3-layer"],
80
- },
81
- {
82
- id: "view_4",
83
- name: "Colormap 4 layer",
84
- show3D: false,
85
- layerIds: ["colormap-4-layer"],
86
- },
87
- ],
88
- },
89
- };
90
-
91
- IndividualScaleForMap.parameters = {
92
- docs: {
93
- description: {
94
- story: "Four maps with individual color scales for each map",
95
- },
96
- inlineStories: false,
97
- iframeHeight: 500,
98
- },
99
- };
@@ -1,120 +0,0 @@
1
- import React from "react";
2
- import { ContinuousLegend, colorTables } from "@emerson-eps/color-tables";
3
- import SubsurfaceViewer from "../../../SubsurfaceViewer";
4
-
5
- export default {
6
- component: SubsurfaceViewer,
7
- title: "SubsurfaceViewer/Components/ColorLegends/SingleScaleForMap",
8
- };
9
-
10
- const defaultProps = {
11
- id: "SubsurfaceViewer",
12
- resources: {
13
- propertyMap:
14
- "https://raw.githubusercontent.com/equinor/webviz-subsurface-components/master/react/src/demo/example-data/propertyMap.png",
15
- },
16
- bounds: [432150, 6475800, 439400, 6481500],
17
- };
18
-
19
- const layers = [
20
- {
21
- "@@type": "ColormapLayer",
22
- image: "@@#resources.propertyMap",
23
- rotDeg: 0,
24
- bounds: [432205, 6475078, 437720, 6481113],
25
- valueRange: [2782, 3513],
26
- colorMapRange: [2782, 3513],
27
- },
28
- ];
29
-
30
- // prop for legend
31
- const min = 0;
32
- const max = 0.35;
33
- const dataObjectName = "Legend";
34
- const position = [16, 10];
35
- const horizontal = true;
36
- const reverseRange = false;
37
-
38
- // 4 maps with same color scale for all maps
39
- const mapWithScaleTemplate = (args) => {
40
- const updatedLayerData = [
41
- {
42
- ...args.layers[0],
43
- colorMapName: args.colorName,
44
- },
45
- ];
46
- return (
47
- <div>
48
- <div
49
- style={{
50
- float: "right",
51
- zIndex: 999,
52
- opacity: 1,
53
- position: "relative",
54
- }}
55
- >
56
- <ContinuousLegend {...args} />
57
- </div>
58
- <SubsurfaceViewer {...args} layers={updatedLayerData} />
59
- </div>
60
- );
61
- };
62
-
63
- export const SingleScaleForMap = mapWithScaleTemplate.bind({});
64
-
65
- SingleScaleForMap.args = {
66
- min,
67
- max,
68
- dataObjectName,
69
- position,
70
- horizontal,
71
- colorTables,
72
- colorName: "Rainbow",
73
- layers,
74
- ...defaultProps,
75
- legend: {
76
- visible: false,
77
- },
78
- zoom: -5,
79
- reverseRange,
80
- views: {
81
- layout: [2, 2],
82
- showLabel: true,
83
- viewports: [
84
- {
85
- id: "view_1",
86
- name: "Colormap layer 1",
87
- show3D: false,
88
- layerIds: ["colormap-layer"],
89
- },
90
- {
91
- id: "view_2",
92
- name: "Colormap layer 2",
93
- show3D: false,
94
- layerIds: ["colormap-layer"],
95
- },
96
- {
97
- id: "view_3",
98
- name: "Colormap layer 3",
99
- show3D: false,
100
- layerIds: ["colormap-layer"],
101
- },
102
- {
103
- id: "view_4",
104
- name: "Colormap layer 4",
105
- show3D: false,
106
- layerIds: ["colormap-layer"],
107
- },
108
- ],
109
- },
110
- };
111
-
112
- SingleScaleForMap.parameters = {
113
- docs: {
114
- description: {
115
- story: "Four maps with same color scale for all maps",
116
- },
117
- inlineStories: false,
118
- iframeHeight: 500,
119
- },
120
- };
@@ -1,34 +0,0 @@
1
- import React from "react";
2
- import LayerSettingsButton from "../../../components/settings/LayerSettingsButton";
3
-
4
- export default {
5
- component: LayerSettingsButton,
6
- title: "SubsurfaceViewer/Components/Settings/LayerSettingsButton",
7
- };
8
-
9
- const Template = (args) => {
10
- return <LayerSettingsButton layer={args.layer} />;
11
- };
12
-
13
- export const DrawingSettings = Template.bind({});
14
- DrawingSettings.args = {
15
- layer: {
16
- name: "Drawing",
17
- "@@type": "DrawingLayer",
18
- id: "drawing-layer",
19
- visible: true,
20
- mode: "drawLineString",
21
- },
22
- };
23
-
24
- export const WellsSettings = Template.bind({});
25
- WellsSettings.args = {
26
- layer: {
27
- name: "Wells",
28
- "@@type": "WellsLayer",
29
- id: "wells-layer",
30
- opacity: 1,
31
- pointRadiusScale: 8,
32
- visible: true,
33
- },
34
- };
@@ -1,17 +0,0 @@
1
- import React from "react";
2
- import NumericInput from "../../../components/settings/NumericInput";
3
-
4
- export default {
5
- component: NumericInput,
6
- title: "SubsurfaceViewer/Components/Settings/NumericInput",
7
- };
8
-
9
- const Template = (args) => {
10
- return <NumericInput {...args} />;
11
- };
12
-
13
- export const Default = Template.bind({});
14
- Default.args = {
15
- label: "test",
16
- value: 5,
17
- };
@@ -1,16 +0,0 @@
1
- import React from "react";
2
- import ToggleButton from "../../../components/settings/ToggleButton";
3
-
4
- export default {
5
- component: ToggleButton,
6
- title: "SubsurfaceViewer/Components/Settings/Switch",
7
- };
8
-
9
- const Template = (args) => {
10
- return <ToggleButton {...args} />;
11
- };
12
-
13
- export const Default = Template.bind({});
14
- Default.args = {
15
- label: "test",
16
- };
@@ -1,177 +0,0 @@
1
- export const sampleLogData = [
2
- {
3
- header: {
4
- name: "EcoScope Data",
5
- well: "35/12-6S",
6
- source: "Converted from LIS by Log Studio 4.87 - Petroware AS",
7
- operator: "Logtek Petroleum",
8
- startIndex: 2907,
9
- endIndex: 2908,
10
- step: 1,
11
- },
12
- curves: [
13
- {
14
- _wrongName: "MD",
15
- description: "Measured depth",
16
- quantity: "length",
17
- unit: "m",
18
- valueType: "float",
19
- dimensions: 1,
20
- },
21
- {
22
- name: "A40H",
23
- description: "Attenuation resistivity 40 inch",
24
- quantity: "electrical resistivity",
25
- unit: "ohm.m",
26
- valueType: "float",
27
- dimensions: 1,
28
- },
29
- ],
30
- data: [
31
- [2907, 29.955],
32
- [2908, 27.733],
33
- ],
34
- },
35
- ];
36
-
37
- export const sampleWellsData = {
38
- type: "FeatureCollection",
39
- features: [
40
- {
41
- type: "Feature",
42
- geometry: {
43
- _wrongType: "GeometryCollection",
44
- geometries: [
45
- {
46
- type: "Point",
47
- coordinates: [437506.854656, 6477887.47091],
48
- },
49
- {
50
- type: "LineString",
51
- coordinates: [
52
- [437506.85465554806, 6477887.47091465, 25.0],
53
- [
54
- 437505.96268892975, 6477887.532817844,
55
- -83.9951103268622,
56
- ],
57
- [
58
- 437505.8497621946, 6477887.5323076015,
59
- -97.94448791185415,
60
- ],
61
- ],
62
- },
63
- ],
64
- },
65
- properties: {
66
- name: "15/9-19 A",
67
- color: [28, 255, 12, 255],
68
- md: [[0.0, 109.0, 122.94999694824219]],
69
- },
70
- },
71
- ],
72
- };
73
-
74
- export const samplePieData = {
75
- pies: [
76
- {
77
- x: 433600,
78
- y: 6477600,
79
- R: 100,
80
- fractions: [
81
- { value: 99, idx: 0 },
82
- { value: "65", idx: 1 },
83
- { value: 67, idx: 2 },
84
- ],
85
- },
86
- ],
87
-
88
- properties: [
89
- { color: [255, 0, 0], label: "oil" },
90
- { color: [0, 0, 255], label: "water" },
91
- { color: [0, 255, 0], label: "gas" },
92
- ],
93
- };
94
-
95
- export const sampleGridData = [
96
- {
97
- i: 0,
98
- j: 11,
99
- z: 3306.64,
100
- cs: [
101
- [432156.53, 6477273.01, -3306.64],
102
- [432206.44, 6477273.93, -3303.06],
103
- [432205.61, 6477323.14, -3315.68],
104
- [432156.53, 6477322.75, -3320.86],
105
- ],
106
- vs: [0.0, 1.0, 0.0],
107
- },
108
- {
109
- i: 0,
110
- j: 12,
111
- z: 3320.86,
112
- cs: [
113
- [432156.53, 6477322.75, -3320.86],
114
- [432205.61, 6477323.14, -3315.68],
115
- [432205.27, 6477372.91, -3320.22],
116
- [432156.53, 6477372.51, -3326.91],
117
- ],
118
- vs: 1.0,
119
- },
120
- ];
121
-
122
- export const sampleFaultPolygonsData = {
123
- type: "FeatureCollection",
124
- features: [
125
- {
126
- type: "Feature",
127
- geometry: {
128
- type: "Polygon",
129
- coordinates: [
130
- [
131
- [434562, 6477595],
132
- [434562, 6478595],
133
- // [435062, 6478595],
134
- // [435062, 6477595],
135
- // [434562, 6477595],
136
- ],
137
- ],
138
- },
139
- properties: {
140
- name: "Top_Hugin:F_52",
141
- color: [0, 0, 0, 255],
142
- },
143
- },
144
- ],
145
- };
146
-
147
- export const sampleColorTable = [
148
- {
149
- name: "Physics",
150
- discrete: false,
151
- description: "Full options color table",
152
- colorNaN: [255, 255, 255],
153
- colorBelow: [255, 0.0, 0.0],
154
- colorAbove: [0.0, 0.0, 255],
155
- colors: [
156
- [0.0, 255, 0.0, 0.0],
157
- [0.5, 0.0, 255, 0.0],
158
- [1.0, 0.0, 0.0, 255],
159
- ],
160
- },
161
- {
162
- name: "Rainbow",
163
- discrete: "false",
164
- colors: [
165
- [0.0, 255, 0.0, 0.0],
166
- [1.0, 182, 0.0, 182],
167
- ],
168
- },
169
- {
170
- name: "Colors_set_5",
171
- discrete: true,
172
- colors: [
173
- [0, 244, 237, 255],
174
- [1, 255, 171, 178],
175
- ],
176
- },
177
- ];
@@ -1,91 +0,0 @@
1
- import React from "react";
2
- import SubsurfaceViewer from "../../SubsurfaceViewer";
3
- import {
4
- sampleLogData,
5
- sampleWellsData,
6
- samplePieData,
7
- sampleGridData,
8
- sampleColorTable,
9
- sampleFaultPolygonsData,
10
- } from "./sampleData";
11
- import exampleData from "../../../../../demo/example-data/deckgl-map.json";
12
-
13
- export default {
14
- component: SubsurfaceViewer,
15
- title: "SubsurfaceViewer/SchemaValidation",
16
- };
17
-
18
- // Template for when edited data needs to be captured.
19
- const StoryTemplate = (args) => {
20
- return <SubsurfaceViewer {...args} />;
21
- };
22
-
23
- export const WellsLayerValidation = StoryTemplate.bind();
24
- WellsLayerValidation.args = {
25
- ...exampleData[0],
26
- layers: [
27
- {
28
- ...exampleData[0].layers[4],
29
- data: sampleWellsData,
30
- logData: sampleLogData,
31
- },
32
- {
33
- ...exampleData[0].layers[6],
34
- },
35
- ],
36
- legend: {
37
- visible: false,
38
- },
39
- checkDatafileSchema: true,
40
- };
41
-
42
- export const PieLayerValidation = StoryTemplate.bind();
43
- PieLayerValidation.args = {
44
- ...exampleData[0],
45
- layers: [
46
- {
47
- "@@type": "PieChartLayer",
48
- data: samplePieData,
49
- },
50
- ],
51
- checkDatafileSchema: true,
52
- };
53
-
54
- export const GridLayerValidation = StoryTemplate.bind();
55
- GridLayerValidation.args = {
56
- ...exampleData[0],
57
- layers: [
58
- {
59
- ...exampleData[0].layers[2],
60
- data: sampleGridData,
61
- visible: true,
62
- },
63
- ],
64
- checkDatafileSchema: true,
65
- };
66
-
67
- export const FaultPolygonsValidation = StoryTemplate.bind();
68
- FaultPolygonsValidation.args = {
69
- ...exampleData[0],
70
- layers: [
71
- {
72
- "@@type": "FaultPolygonsLayer",
73
- data: sampleFaultPolygonsData,
74
- },
75
- ],
76
- checkDatafileSchema: true,
77
- };
78
-
79
- export const ColorTableValidation = StoryTemplate.bind();
80
- ColorTableValidation.args = {
81
- ...exampleData[0],
82
- layers: [
83
- {
84
- ...exampleData[0].layers[4],
85
- logColor: "Colors_set_5",
86
- logRadius: 15,
87
- },
88
- ],
89
- colorTables: sampleColorTable,
90
- checkDatafileSchema: true,
91
- };
@@ -1,13 +0,0 @@
1
- import React from "react";
2
- import { Provider } from "react-redux";
3
- import { createStore } from "../redux/store";
4
-
5
- export const emptytestStore = createStore({});
6
- emptytestStore.dispatch = jest.fn() as never;
7
- export const EmptyWrapper = ({
8
- children,
9
- }: {
10
- children: JSX.Element;
11
- }): JSX.Element => {
12
- return <Provider store={emptytestStore}>{children}</Provider>;
13
- };
@@ -1,61 +0,0 @@
1
- // This configuration object determines which deck.gl classes are accessible in the serialized json
2
- // See https://deck.gl/docs/api-reference/json/overview for more details.
3
-
4
- import {
5
- COORDINATE_SYSTEM,
6
- FirstPersonView,
7
- MapView,
8
- OrbitView,
9
- OrthographicView,
10
- } from "@deck.gl/core/typed";
11
-
12
- import * as AggregationLayers from "@deck.gl/aggregation-layers/typed";
13
- import * as GeoLayers from "@deck.gl/geo-layers/typed";
14
- import * as Layers from "@deck.gl/layers/typed";
15
- import * as MeshLayers from "@deck.gl/mesh-layers/typed";
16
- import { EditableGeoJsonLayer } from "@nebula.gl/layers";
17
-
18
- import { registerLoaders } from "@loaders.gl/core";
19
- import GL from "@luma.gl/constants";
20
-
21
- import * as CustomLayers from "../layers";
22
- import * as CustomViews from "../views";
23
-
24
- // Note: deck already registers JSONLoader...
25
- registerLoaders([]);
26
-
27
- export default {
28
- // Classes that should be instantiatable by JSON converter
29
- classes: Object.assign(
30
- // Support `@deck.gl/core` Views
31
- {
32
- FirstPersonView,
33
- MapView,
34
- OrbitView,
35
- OrthographicView,
36
- ...CustomViews,
37
- },
38
-
39
- // a map of all layers that should be exposes as JSONLayers
40
- Layers,
41
- AggregationLayers,
42
- GeoLayers,
43
- MeshLayers,
44
- CustomLayers,
45
- // Any non-standard views or layers
46
- { EditableGeoJsonLayer }
47
- ),
48
-
49
- // Functions that should be executed by JSON converter
50
- functions: {},
51
-
52
- // Enumerations that should be available to JSON parser
53
- // Will be resolved as `<enum-name>.<enum-value>`
54
- enumerations: {
55
- COORDINATE_SYSTEM,
56
- GL,
57
- },
58
-
59
- // Constants that should be resolved with the provided values by JSON converter
60
- constants: {},
61
- };