@webviz/subsurface-viewer 0.0.1-alpha.1 → 0.0.2-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/package.json +5 -2
- package/package.json +6 -3
- package/dist/DashSubsurfaceViewer.d.ts +0 -56
- package/dist/DashSubsurfaceViewer.js +0 -160
- package/dist/DashSubsurfaceViewer.js.map +0 -1
- package/src/DashSubsurfaceViewer.tsx +0 -270
- package/src/SubsurfaceViewer.stories.tsx +0 -449
- package/src/SubsurfaceViewer.test.tsx +0 -98
- package/src/SubsurfaceViewer.tsx +0 -356
- package/src/__snapshots__/SubsurfaceViewer.test.tsx.snap +0 -178
- package/src/assets/glTF/north_arrow/scene.bin +0 -0
- package/src/assets/glTF/north_arrow/scene.gltf +0 -315
- package/src/assets/glTF/north_arrow/textures/Arrow5_baseColor.png +0 -0
- package/src/assets/glTF/north_arrow/textures/Arrow5_metallicRoughness.png +0 -0
- package/src/assets/glTF/north_arrow/textures/Arrow5_normal.png +0 -0
- package/src/components/ColorLegend.test.tsx +0 -32
- package/src/components/ColorLegend.tsx +0 -80
- package/src/components/ColorLegends.test.tsx +0 -97
- package/src/components/ColorLegends.tsx +0 -46
- package/src/components/DistanceScale.stories.tsx +0 -28
- package/src/components/DistanceScale.test.tsx +0 -36
- package/src/components/DistanceScale.tsx +0 -84
- package/src/components/InfoCard.test.tsx +0 -110
- package/src/components/InfoCard.tsx +0 -263
- package/src/components/Map.test.tsx +0 -142
- package/src/components/Map.tsx +0 -1435
- package/src/components/StatusIndicator.test.tsx +0 -14
- package/src/components/StatusIndicator.tsx +0 -38
- package/src/components/ViewAnnotation.tsx +0 -16
- package/src/components/ViewFooter.test.tsx +0 -12
- package/src/components/ViewFooter.tsx +0 -30
- package/src/components/__snapshots__/ColorLegends.test.tsx.snap +0 -15
- package/src/components/__snapshots__/DistanceScale.test.tsx.snap +0 -33
- package/src/components/__snapshots__/InfoCard.test.tsx.snap +0 -561
- package/src/components/__snapshots__/Map.test.tsx.snap +0 -119
- package/src/components/__snapshots__/StatusIndicator.test.tsx.snap +0 -3
- package/src/components/__snapshots__/ViewFooter.test.tsx.snap +0 -7
- package/src/components/settings/DrawModeSelector.test.tsx +0 -45
- package/src/components/settings/DrawModeSelector.tsx +0 -58
- package/src/components/settings/DrawModeSelector_performance.test.tsx +0 -35
- package/src/components/settings/LayerProperty.test.tsx +0 -35
- package/src/components/settings/LayerProperty.tsx +0 -153
- package/src/components/settings/LayerProperty_performance.test.tsx +0 -39
- package/src/components/settings/LayerSettingsButton.test.tsx +0 -133
- package/src/components/settings/LayerSettingsButton.tsx +0 -95
- package/src/components/settings/LayersButton.test.tsx +0 -102
- package/src/components/settings/LayersButton.tsx +0 -97
- package/src/components/settings/NumericInput.test.tsx +0 -25
- package/src/components/settings/NumericInput.tsx +0 -67
- package/src/components/settings/Settings.tsx +0 -71
- package/src/components/settings/SliderInput.test.tsx +0 -28
- package/src/components/settings/SliderInput.tsx +0 -71
- package/src/components/settings/ToggleButton.test.tsx +0 -25
- package/src/components/settings/ToggleButton.tsx +0 -53
- package/src/components/settings/__snapshots__/DrawModeSelector.test.tsx.snap +0 -124
- package/src/components/settings/__snapshots__/LayerProperty.test.tsx.snap +0 -124
- package/src/components/settings/__snapshots__/LayerSettingsButton.test.tsx.snap +0 -36
- package/src/components/settings/__snapshots__/LayersButton.test.tsx.snap +0 -83
- package/src/components/settings/__snapshots__/NumericInput.test.tsx.snap +0 -123
- package/src/components/settings/__snapshots__/SliderInput.test.tsx.snap +0 -244
- package/src/components/settings/__snapshots__/ToggleButton.test.tsx.snap +0 -182
- package/src/custom.d.ts +0 -9
- package/src/index.ts +0 -5
- package/src/inputSchema/ColorTables.json +0 -51
- package/src/inputSchema/FaultPolygons.json +0 -80
- package/src/inputSchema/Grid.json +0 -39
- package/src/inputSchema/PieChart.json +0 -72
- package/src/inputSchema/WellLog.json +0 -126
- package/src/inputSchema/WellLogTemplate.json +0 -136
- package/src/inputSchema/WellLogs.json +0 -5
- package/src/inputSchema/Wells.json +0 -106
- package/src/inputSchema/schemaValidationUtil.tsx +0 -55
- package/src/inputSchema/validator.tsx +0 -72
- package/src/inputSchema/wellCompletions.json +0 -108
- package/src/layers/BoxSelectionLayer/boxSelectionLayer.stories.tsx +0 -172
- package/src/layers/BoxSelectionLayer/boxSelectionLayer.tsx +0 -136
- package/src/layers/axes/axes-fragment.glsl.ts +0 -15
- package/src/layers/axes/axesLayer.stories.tsx +0 -87
- package/src/layers/axes/axesLayer.ts +0 -692
- package/src/layers/axes/boxLayer.ts +0 -71
- package/src/layers/axes/grid-vertex.glsl.ts +0 -14
- package/src/layers/axes2d/axes2DLayer.stories.tsx +0 -150
- package/src/layers/axes2d/axes2DLayer.ts +0 -841
- package/src/layers/axes2d/font-atlas.png +0 -0
- package/src/layers/axes2d/label-fragment.glsl.js +0 -37
- package/src/layers/axes2d/label-vertex.glsl.js +0 -20
- package/src/layers/axes2d/line-fragment.glsl.js +0 -14
- package/src/layers/axes2d/line-vertex.glsl.js +0 -13
- package/src/layers/colormap/colormap.fs.glsl.ts +0 -42
- package/src/layers/colormap/colormapLayer.ts +0 -247
- package/src/layers/drawing/drawingLayer.tsx +0 -256
- package/src/layers/fault_polygons/faultPolygonsLayer.ts +0 -54
- package/src/layers/grid3d/fragment.fs.glsl.ts +0 -109
- package/src/layers/grid3d/fragment_lines.glsl.ts +0 -21
- package/src/layers/grid3d/grid3dLayer.stories.tsx +0 -172
- package/src/layers/grid3d/grid3dLayer.ts +0 -248
- package/src/layers/grid3d/privateLayer.ts +0 -292
- package/src/layers/grid3d/vertex.glsl.ts +0 -43
- package/src/layers/grid3d/vertex_lines.glsl.ts +0 -15
- package/src/layers/grid3d/webworker.ts +0 -173
- package/src/layers/hillshading2d/hillshading2d.fs.glsl.ts +0 -62
- package/src/layers/hillshading2d/hillshading2dLayer.ts +0 -172
- package/src/layers/index.ts +0 -35
- package/src/layers/intersection/intersectionView.stories.tsx +0 -294
- package/src/layers/intersection/unfoldedGeoJsonLayer.ts +0 -92
- package/src/layers/map/fragment.fs.glsl.ts +0 -127
- package/src/layers/map/fragment_lines.glsl.ts +0 -21
- package/src/layers/map/mapLayer.stories.tsx +0 -1369
- package/src/layers/map/mapLayer.ts +0 -470
- package/src/layers/map/privateMapLayer.ts +0 -317
- package/src/layers/map/vertex.glsl.ts +0 -45
- package/src/layers/map/vertex_lines.glsl.ts +0 -15
- package/src/layers/map/webworker.ts +0 -479
- package/src/layers/northarrow/northArrow.stories.tsx +0 -108
- package/src/layers/northarrow/northArrow3DLayer.ts +0 -204
- package/src/layers/northarrow/northarrow-fragment.glsl.js +0 -14
- package/src/layers/northarrow/northarrow-vertex.glsl.js +0 -13
- package/src/layers/piechart/fragment.glsl.js +0 -42
- package/src/layers/piechart/pieChartLayer.ts +0 -246
- package/src/layers/piechart/vertex.glsl.js +0 -42
- package/src/layers/points/pointsLayer.stories.tsx +0 -141
- package/src/layers/points/pointsLayer.ts +0 -143
- package/src/layers/polylines/polylinesLayer.stories.tsx +0 -144
- package/src/layers/polylines/polylinesLayer.ts +0 -263
- package/src/layers/selectable_geojson/selectableGeoJsonLayer.ts +0 -25
- package/src/layers/shader_modules/decoder.fs.glsl.ts +0 -41
- package/src/layers/shader_modules/decoder.ts +0 -46
- package/src/layers/shader_modules/index.ts +0 -1
- package/src/layers/terrain/map3DLayer.stories.tsx +0 -340
- package/src/layers/terrain/map3DLayer.ts +0 -556
- package/src/layers/terrain/terrainMapLayer.ts +0 -334
- package/src/layers/terrain/terrainmap.fs.glsl.ts +0 -134
- package/src/layers/triangle/fragment.fs.glsl.ts +0 -126
- package/src/layers/triangle/fragment_lines.glsl.ts +0 -21
- package/src/layers/triangle/privateTriangleLayer.ts +0 -203
- package/src/layers/triangle/test_data/surfacePoints.ts +0 -4344
- package/src/layers/triangle/test_data/surfaceTriangles.ts +0 -7392
- package/src/layers/triangle/triangleLayer.stories.tsx +0 -191
- package/src/layers/triangle/triangleLayer.ts +0 -273
- package/src/layers/triangle/vertex.glsl.ts +0 -35
- package/src/layers/triangle/vertex_lines.glsl.ts +0 -15
- package/src/layers/triangle/webworker.ts +0 -165
- package/src/layers/utils/glsl.d.ts +0 -4
- package/src/layers/utils/layerTools.ts +0 -182
- package/src/layers/utils/propertyMapTools.ts +0 -43
- package/src/layers/wells/utils/spline.ts +0 -318
- package/src/layers/wells/wellsLayer.stories.tsx +0 -625
- package/src/layers/wells/wellsLayer.ts +0 -1377
- package/src/redux/actions.ts +0 -8
- package/src/redux/reducer.ts +0 -43
- package/src/redux/store.ts +0 -15
- package/src/redux/types.ts +0 -114
- package/src/storybook/SubsurfaceViewer.stories.jsx +0 -644
- package/src/storybook/components/InfoCard.stories.jsx +0 -39
- package/src/storybook/components/colorLegends/ContinuousLegend.stories.jsx +0 -32
- package/src/storybook/components/colorLegends/DiscreteLegend.stories.jsx +0 -33
- package/src/storybook/components/colorLegends/IndividualScaleForMap.stories.jsx +0 -99
- package/src/storybook/components/colorLegends/SingleScaleForMap.stories.jsx +0 -120
- package/src/storybook/components/settings/LayerSettingsButton.stories.jsx +0 -34
- package/src/storybook/components/settings/NumericInput.stories.jsx +0 -17
- package/src/storybook/components/settings/ToggleButton.stories.jsx +0 -16
- package/src/storybook/schemaValidation/sampleData.js +0 -177
- package/src/storybook/schemaValidation/schemaValidation.stories.jsx +0 -91
- package/src/test/TestWrapper.tsx +0 -13
- package/src/utils/configuration.ts +0 -61
- package/src/utils/fit-bounds.js +0 -85
- package/src/utils/measurement.ts +0 -61
- package/src/utils/northArrow.ts +0 -4
- package/src/utils/specExtractor.ts +0 -36
- package/src/viewports/index.js +0 -1
- package/src/viewports/intersectionViewport.ts +0 -137
- package/src/views/index.js +0 -1
- package/src/views/intersectionView.ts +0 -38
- package/tsconfig.json +0 -7
package/src/SubsurfaceViewer.tsx
DELETED
|
@@ -1,356 +0,0 @@
|
|
|
1
|
-
import { LayersList, Layer } from "@deck.gl/core/typed";
|
|
2
|
-
import Map, {
|
|
3
|
-
ViewsType,
|
|
4
|
-
TooltipCallback,
|
|
5
|
-
ViewStateType,
|
|
6
|
-
BoundsAccessor,
|
|
7
|
-
} from "./components/Map";
|
|
8
|
-
import { MapMouseEvent, jsonToObject } from "./components/Map";
|
|
9
|
-
import React from "react";
|
|
10
|
-
import PropTypes from "prop-types";
|
|
11
|
-
import { colorTablesArray } from "@emerson-eps/color-tables/";
|
|
12
|
-
import convert, { Unit } from "convert-units";
|
|
13
|
-
|
|
14
|
-
export interface SubsurfaceViewerProps {
|
|
15
|
-
id: string;
|
|
16
|
-
resources?: Record<string, unknown>;
|
|
17
|
-
layers?: Record<string, unknown>[] | LayersList;
|
|
18
|
-
bounds?: [number, number, number, number] | BoundsAccessor;
|
|
19
|
-
views?: ViewsType;
|
|
20
|
-
coords?: {
|
|
21
|
-
visible?: boolean | null;
|
|
22
|
-
multiPicking?: boolean | null;
|
|
23
|
-
pickDepth?: number | null;
|
|
24
|
-
};
|
|
25
|
-
scale?: {
|
|
26
|
-
visible?: boolean | null;
|
|
27
|
-
incrementValue?: number | null;
|
|
28
|
-
widthPerUnit?: number | null;
|
|
29
|
-
cssStyle?: Record<string, unknown> | null;
|
|
30
|
-
};
|
|
31
|
-
coordinateUnit?: Unit;
|
|
32
|
-
toolbar?: {
|
|
33
|
-
visible?: boolean | null;
|
|
34
|
-
};
|
|
35
|
-
legend?: {
|
|
36
|
-
visible?: boolean | null;
|
|
37
|
-
cssStyle?: Record<string, unknown> | null;
|
|
38
|
-
horizontal?: boolean | null;
|
|
39
|
-
};
|
|
40
|
-
colorTables?: colorTablesArray;
|
|
41
|
-
editedData?: Record<string, unknown>;
|
|
42
|
-
setProps?: (data: Record<string, unknown>) => void;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Validate JSON datafile against schema
|
|
46
|
-
*/
|
|
47
|
-
checkDatafileSchema?: boolean;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* For get mouse events
|
|
51
|
-
*/
|
|
52
|
-
onMouseEvent?: (event: MapMouseEvent) => void;
|
|
53
|
-
|
|
54
|
-
getCameraPosition?: (input: ViewStateType) => void;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* If changed will reset camera to default position.
|
|
58
|
-
*/
|
|
59
|
-
triggerHome?: number;
|
|
60
|
-
triggerResetMultipleWells?: number;
|
|
61
|
-
/**
|
|
62
|
-
* Range selection of the current well
|
|
63
|
-
*/
|
|
64
|
-
selection?: {
|
|
65
|
-
well: string | undefined;
|
|
66
|
-
selection: [number | undefined, number | undefined] | undefined;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Override default tooltip with a callback.
|
|
71
|
-
*/
|
|
72
|
-
getTooltip?: TooltipCallback;
|
|
73
|
-
cameraPosition?: ViewStateType | undefined;
|
|
74
|
-
|
|
75
|
-
children?: React.ReactNode;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
const SubsurfaceViewer: React.FC<SubsurfaceViewerProps> = ({
|
|
79
|
-
id,
|
|
80
|
-
resources,
|
|
81
|
-
layers,
|
|
82
|
-
bounds,
|
|
83
|
-
views,
|
|
84
|
-
coords,
|
|
85
|
-
scale,
|
|
86
|
-
coordinateUnit,
|
|
87
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
88
|
-
// @ts-ignore
|
|
89
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
90
|
-
legend,
|
|
91
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
92
|
-
// @ts-ignore
|
|
93
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
94
|
-
toolbar,
|
|
95
|
-
colorTables,
|
|
96
|
-
editedData,
|
|
97
|
-
setProps,
|
|
98
|
-
checkDatafileSchema,
|
|
99
|
-
onMouseEvent,
|
|
100
|
-
selection,
|
|
101
|
-
getTooltip,
|
|
102
|
-
cameraPosition,
|
|
103
|
-
getCameraPosition,
|
|
104
|
-
triggerHome,
|
|
105
|
-
triggerResetMultipleWells,
|
|
106
|
-
children,
|
|
107
|
-
}: SubsurfaceViewerProps) => {
|
|
108
|
-
// Contains layers data received from map layers by user interaction
|
|
109
|
-
const [layerEditedData, setLayerEditedData] = React.useState(editedData);
|
|
110
|
-
|
|
111
|
-
const [layerInstances, setLayerInstances] = React.useState<LayersList>([]);
|
|
112
|
-
|
|
113
|
-
React.useEffect(() => {
|
|
114
|
-
if (!layers) {
|
|
115
|
-
setLayerInstances([]);
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
if (layers?.[0] instanceof Layer) {
|
|
120
|
-
setLayerInstances(layers as LayersList);
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
const enumerations: Record<string, unknown>[] = [];
|
|
125
|
-
if (resources) enumerations.push({ resources: resources });
|
|
126
|
-
if (editedData) enumerations.push({ editedData: editedData });
|
|
127
|
-
else enumerations.push({ editedData: {} });
|
|
128
|
-
const layersList = jsonToObject(
|
|
129
|
-
layers as Record<string, unknown>[],
|
|
130
|
-
enumerations
|
|
131
|
-
) as LayersList;
|
|
132
|
-
setLayerInstances(layersList);
|
|
133
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
134
|
-
}, [layers]); // Note. Fixing this dependency list may cause infinite recursion.
|
|
135
|
-
React.useEffect(() => {
|
|
136
|
-
if (!editedData) return;
|
|
137
|
-
|
|
138
|
-
setLayerEditedData({
|
|
139
|
-
...layerEditedData,
|
|
140
|
-
...editedData,
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
144
|
-
}, [editedData]); // Note. Fixing this dependency list may cause infinite recursion.
|
|
145
|
-
|
|
146
|
-
// This callback is used as a mechanism to update the component from the layers or toolbar.
|
|
147
|
-
// The changes done in a layer, for example, are bundled into a patch
|
|
148
|
-
// and sent to the parent component via setProps. (See layers/utils/layerTools.ts)
|
|
149
|
-
const setEditedData = React.useCallback(
|
|
150
|
-
(data: Record<string, unknown>) => {
|
|
151
|
-
if (setProps == undefined) return;
|
|
152
|
-
setProps({
|
|
153
|
-
editedData: {
|
|
154
|
-
...layerEditedData,
|
|
155
|
-
...data,
|
|
156
|
-
},
|
|
157
|
-
});
|
|
158
|
-
},
|
|
159
|
-
[setProps, layerEditedData]
|
|
160
|
-
);
|
|
161
|
-
|
|
162
|
-
if (coordinateUnit && !convert().possibilities().includes(coordinateUnit)) {
|
|
163
|
-
console.error(
|
|
164
|
-
`Invalid coordinate unit: '${coordinateUnit}'. Valid units are: ${convert().possibilities()}`
|
|
165
|
-
);
|
|
166
|
-
coordinateUnit = undefined;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
return (
|
|
170
|
-
<Map
|
|
171
|
-
id={id}
|
|
172
|
-
layers={layerInstances}
|
|
173
|
-
bounds={bounds}
|
|
174
|
-
views={views}
|
|
175
|
-
coords={coords}
|
|
176
|
-
scale={scale}
|
|
177
|
-
coordinateUnit={coordinateUnit as Unit}
|
|
178
|
-
colorTables={colorTables}
|
|
179
|
-
setEditedData={setEditedData}
|
|
180
|
-
checkDatafileSchema={checkDatafileSchema}
|
|
181
|
-
onMouseEvent={onMouseEvent}
|
|
182
|
-
selection={selection}
|
|
183
|
-
getTooltip={getTooltip}
|
|
184
|
-
cameraPosition={cameraPosition}
|
|
185
|
-
getCameraPosition={getCameraPosition}
|
|
186
|
-
triggerHome={triggerHome}
|
|
187
|
-
triggerResetMultipleWells={triggerResetMultipleWells}
|
|
188
|
-
>
|
|
189
|
-
{children}
|
|
190
|
-
</Map>
|
|
191
|
-
);
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
SubsurfaceViewer.defaultProps = {
|
|
195
|
-
views: {
|
|
196
|
-
layout: [1, 1],
|
|
197
|
-
marginPixels: 0,
|
|
198
|
-
showLabel: false,
|
|
199
|
-
viewports: [{ id: "main-view", show3D: false, layerIds: [] }],
|
|
200
|
-
},
|
|
201
|
-
checkDatafileSchema: false,
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
SubsurfaceViewer.propTypes = {
|
|
205
|
-
/**
|
|
206
|
-
* The ID of this component, used to identify dash components
|
|
207
|
-
* in callbacks. The ID needs to be unique across all of the
|
|
208
|
-
* components in an app.
|
|
209
|
-
*/
|
|
210
|
-
id: PropTypes.string.isRequired,
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* Resource dictionary made available in the DeckGL specification as an enum.
|
|
214
|
-
* The values can be accessed like this: `"@@#resources.resourceId"`, where
|
|
215
|
-
* `resourceId` is the key in the `resources` dict. For more information,
|
|
216
|
-
* see the DeckGL documentation on enums in the json spec:
|
|
217
|
-
* https://deck.gl/docs/api-reference/json/conversion-reference#enumerations-and-using-the--prefix
|
|
218
|
-
*/
|
|
219
|
-
resources: PropTypes.objectOf(PropTypes.any),
|
|
220
|
-
|
|
221
|
-
/* List of JSON object containing layer specific data.
|
|
222
|
-
* Each JSON object will consist of layer type with key as "@@type" and
|
|
223
|
-
* layer specific data, if any.
|
|
224
|
-
*/
|
|
225
|
-
layers: PropTypes.arrayOf(PropTypes.objectOf(PropTypes.any).isRequired),
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* Coordinate boundary for the view defined as [left, bottom, right, top].
|
|
229
|
-
* It can be either an array or a callback returning [number, number, number, number].
|
|
230
|
-
*/
|
|
231
|
-
bounds: PropTypes.any,
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* Views configuration for map. If not specified, all the layers will be
|
|
235
|
-
* displayed in a single 2D viewport.
|
|
236
|
-
* Example:
|
|
237
|
-
* views = {
|
|
238
|
-
* "layout": [1, 1],
|
|
239
|
-
* "showLabel": false,
|
|
240
|
-
* "viewports": [
|
|
241
|
-
* {
|
|
242
|
-
* "id": "view_1",
|
|
243
|
-
* "name"?: "View 1"
|
|
244
|
-
* "show3D"?: false,
|
|
245
|
-
* "layerIds": ["layer-ids"],
|
|
246
|
-
* "isSync?": true,
|
|
247
|
-
* }
|
|
248
|
-
* ]
|
|
249
|
-
* }
|
|
250
|
-
*/
|
|
251
|
-
// TODO - define proper type for views prop
|
|
252
|
-
views: PropTypes.any,
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* Parameters for the InfoCard component
|
|
256
|
-
*/
|
|
257
|
-
coords: PropTypes.shape({
|
|
258
|
-
/**
|
|
259
|
-
* Toggle component visibility.
|
|
260
|
-
*/
|
|
261
|
-
visible: PropTypes.bool,
|
|
262
|
-
/**
|
|
263
|
-
* Enable or disable multi picking. Might have a performance penalty.
|
|
264
|
-
* See https://deck.gl/docs/api-reference/core/deck#pickmultipleobjects
|
|
265
|
-
*/
|
|
266
|
-
multiPicking: PropTypes.bool,
|
|
267
|
-
/**
|
|
268
|
-
* Number of objects to pick. The more objects picked, the more picking operations will be done.
|
|
269
|
-
* See https://deck.gl/docs/api-reference/core/deck#pickmultipleobjects
|
|
270
|
-
*/
|
|
271
|
-
pickDepth: PropTypes.number,
|
|
272
|
-
}),
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* Parameters for the Distance Scale component
|
|
276
|
-
*/
|
|
277
|
-
scale: PropTypes.shape({
|
|
278
|
-
/**
|
|
279
|
-
* Toggle component visibility.
|
|
280
|
-
*/
|
|
281
|
-
visible: PropTypes.bool,
|
|
282
|
-
/**
|
|
283
|
-
* Increment value for the scale.
|
|
284
|
-
*/
|
|
285
|
-
incrementValue: PropTypes.number,
|
|
286
|
-
/**
|
|
287
|
-
* Scale bar width in pixels per unit value.
|
|
288
|
-
*/
|
|
289
|
-
widthPerUnit: PropTypes.number,
|
|
290
|
-
/**
|
|
291
|
-
* Scale bar css style can be used for positioning.
|
|
292
|
-
*/
|
|
293
|
-
cssStyle: PropTypes.objectOf(PropTypes.any),
|
|
294
|
-
}),
|
|
295
|
-
|
|
296
|
-
/**
|
|
297
|
-
* Parameters for the Distance Scale component
|
|
298
|
-
* Unit for the scale ruler
|
|
299
|
-
*/
|
|
300
|
-
coordinateUnit: PropTypes.oneOf(convert().possibilities()),
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
* @obsolete Toolbar should be added as annotation. This prop has no function.
|
|
304
|
-
*/
|
|
305
|
-
toolbar: PropTypes.shape({
|
|
306
|
-
/**
|
|
307
|
-
* Toggle toolbar visibility
|
|
308
|
-
*/
|
|
309
|
-
visible: PropTypes.bool,
|
|
310
|
-
}),
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* @obsolete Legends should be added as annotations. This prop has no function.
|
|
314
|
-
*/
|
|
315
|
-
legend: PropTypes.shape({
|
|
316
|
-
/**
|
|
317
|
-
* Toggle component visibility.
|
|
318
|
-
*/
|
|
319
|
-
visible: PropTypes.bool,
|
|
320
|
-
/**
|
|
321
|
-
* Legend css style can be used for positioning.
|
|
322
|
-
*/
|
|
323
|
-
cssStyle: PropTypes.objectOf(PropTypes.any),
|
|
324
|
-
/**
|
|
325
|
-
* Orientation of color legend
|
|
326
|
-
*/
|
|
327
|
-
horizontal: PropTypes.bool,
|
|
328
|
-
}),
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
* Prop containing color table data
|
|
332
|
-
*/
|
|
333
|
-
colorTables: PropTypes.array,
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
* Prop containing edited data from layers
|
|
337
|
-
*/
|
|
338
|
-
editedData: PropTypes.objectOf(PropTypes.any),
|
|
339
|
-
|
|
340
|
-
/**
|
|
341
|
-
* For reacting to prop changes
|
|
342
|
-
*/
|
|
343
|
-
setProps: PropTypes.func,
|
|
344
|
-
|
|
345
|
-
/**
|
|
346
|
-
* Validate JSON datafile against schema
|
|
347
|
-
*/
|
|
348
|
-
checkDatafileSchema: PropTypes.bool,
|
|
349
|
-
|
|
350
|
-
/**
|
|
351
|
-
* For get mouse events
|
|
352
|
-
*/
|
|
353
|
-
onMouseEvent: PropTypes.func,
|
|
354
|
-
};
|
|
355
|
-
|
|
356
|
-
export default SubsurfaceViewer;
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`Test Map component snapshot test 1`] = `
|
|
4
|
-
.c0 {
|
|
5
|
-
display: inline-block;
|
|
6
|
-
-webkit-transform: rotate(-90deg);
|
|
7
|
-
-ms-transform: rotate(-90deg);
|
|
8
|
-
transform: rotate(-90deg);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
<div>
|
|
12
|
-
<div
|
|
13
|
-
id="DeckGL-Map-wrapper"
|
|
14
|
-
style="position: absolute; z-index: 0; left: 0px; top: 0px; width: 100%; height: 100%;"
|
|
15
|
-
>
|
|
16
|
-
<canvas
|
|
17
|
-
id="DeckGL-Map"
|
|
18
|
-
style="left: 0px; top: 0px; width: 100%; position: absolute; height: 100%;"
|
|
19
|
-
/>
|
|
20
|
-
</div>
|
|
21
|
-
<div>
|
|
22
|
-
<svg
|
|
23
|
-
aria-valuemax="100"
|
|
24
|
-
aria-valuemin="0"
|
|
25
|
-
aria-valuenow="0"
|
|
26
|
-
class="c0"
|
|
27
|
-
height="48"
|
|
28
|
-
preserveAspectRatio="xMidYMid meet"
|
|
29
|
-
role="progressbar"
|
|
30
|
-
viewBox="24 24 48 48"
|
|
31
|
-
width="48"
|
|
32
|
-
>
|
|
33
|
-
<circle
|
|
34
|
-
class=""
|
|
35
|
-
cx="48"
|
|
36
|
-
cy="48"
|
|
37
|
-
fill="none"
|
|
38
|
-
r="22"
|
|
39
|
-
stroke="var(--eds_infographic_primary__moss_green_13, rgba(222, 237, 238, 1))"
|
|
40
|
-
stroke-width="4"
|
|
41
|
-
style="stroke: 138.230; stroke-dashoffset: 138.230px;"
|
|
42
|
-
/>
|
|
43
|
-
<circle
|
|
44
|
-
class=""
|
|
45
|
-
cx="48"
|
|
46
|
-
cy="48"
|
|
47
|
-
fill="none"
|
|
48
|
-
r="22"
|
|
49
|
-
stroke="var(--eds_infographic_primary__moss_green_100, rgba(0, 112, 121, 1))"
|
|
50
|
-
stroke-dasharray="138.23007675795088"
|
|
51
|
-
stroke-linecap="round"
|
|
52
|
-
stroke-width="4"
|
|
53
|
-
style="stroke: 138.230; stroke-dashoffset: 138.230px;"
|
|
54
|
-
/>
|
|
55
|
-
</svg>
|
|
56
|
-
<br />
|
|
57
|
-
Loading assets...
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
`;
|
|
61
|
-
|
|
62
|
-
exports[`Test Map component snapshot test with edited data 1`] = `
|
|
63
|
-
.c0 {
|
|
64
|
-
display: inline-block;
|
|
65
|
-
-webkit-transform: rotate(-90deg);
|
|
66
|
-
-ms-transform: rotate(-90deg);
|
|
67
|
-
transform: rotate(-90deg);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
<div>
|
|
71
|
-
<div
|
|
72
|
-
id="DeckGL-Map-wrapper"
|
|
73
|
-
style="position: absolute; z-index: 0; left: 0px; top: 0px; width: 100%; height: 100%;"
|
|
74
|
-
>
|
|
75
|
-
<canvas
|
|
76
|
-
id="DeckGL-Map"
|
|
77
|
-
style="left: 0px; top: 0px; width: 100%; position: absolute; height: 100%;"
|
|
78
|
-
/>
|
|
79
|
-
</div>
|
|
80
|
-
<div>
|
|
81
|
-
<svg
|
|
82
|
-
aria-valuemax="100"
|
|
83
|
-
aria-valuemin="0"
|
|
84
|
-
aria-valuenow="0"
|
|
85
|
-
class="c0"
|
|
86
|
-
height="48"
|
|
87
|
-
preserveAspectRatio="xMidYMid meet"
|
|
88
|
-
role="progressbar"
|
|
89
|
-
viewBox="24 24 48 48"
|
|
90
|
-
width="48"
|
|
91
|
-
>
|
|
92
|
-
<circle
|
|
93
|
-
class=""
|
|
94
|
-
cx="48"
|
|
95
|
-
cy="48"
|
|
96
|
-
fill="none"
|
|
97
|
-
r="22"
|
|
98
|
-
stroke="var(--eds_infographic_primary__moss_green_13, rgba(222, 237, 238, 1))"
|
|
99
|
-
stroke-width="4"
|
|
100
|
-
style="stroke: 138.230; stroke-dashoffset: 138.230px;"
|
|
101
|
-
/>
|
|
102
|
-
<circle
|
|
103
|
-
class=""
|
|
104
|
-
cx="48"
|
|
105
|
-
cy="48"
|
|
106
|
-
fill="none"
|
|
107
|
-
r="22"
|
|
108
|
-
stroke="var(--eds_infographic_primary__moss_green_100, rgba(0, 112, 121, 1))"
|
|
109
|
-
stroke-dasharray="138.23007675795088"
|
|
110
|
-
stroke-linecap="round"
|
|
111
|
-
stroke-width="4"
|
|
112
|
-
style="stroke: 138.230; stroke-dashoffset: 138.230px;"
|
|
113
|
-
/>
|
|
114
|
-
</svg>
|
|
115
|
-
<br />
|
|
116
|
-
Loading assets...
|
|
117
|
-
</div>
|
|
118
|
-
</div>
|
|
119
|
-
`;
|
|
120
|
-
|
|
121
|
-
exports[`Test Map component snapshot test with invalid array length 1`] = `
|
|
122
|
-
.c0 {
|
|
123
|
-
display: inline-block;
|
|
124
|
-
-webkit-transform: rotate(-90deg);
|
|
125
|
-
-ms-transform: rotate(-90deg);
|
|
126
|
-
transform: rotate(-90deg);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
<div>
|
|
130
|
-
<div
|
|
131
|
-
id="DeckGL-Map-wrapper"
|
|
132
|
-
style="position: absolute; z-index: 0; left: 0px; top: 0px; width: 100%; height: 100%;"
|
|
133
|
-
>
|
|
134
|
-
<canvas
|
|
135
|
-
id="DeckGL-Map"
|
|
136
|
-
style="left: 0px; top: 0px; width: 100%; position: absolute; height: 100%;"
|
|
137
|
-
/>
|
|
138
|
-
</div>
|
|
139
|
-
<div>
|
|
140
|
-
<svg
|
|
141
|
-
aria-valuemax="100"
|
|
142
|
-
aria-valuemin="0"
|
|
143
|
-
aria-valuenow="0"
|
|
144
|
-
class="c0"
|
|
145
|
-
height="48"
|
|
146
|
-
preserveAspectRatio="xMidYMid meet"
|
|
147
|
-
role="progressbar"
|
|
148
|
-
viewBox="24 24 48 48"
|
|
149
|
-
width="48"
|
|
150
|
-
>
|
|
151
|
-
<circle
|
|
152
|
-
class=""
|
|
153
|
-
cx="48"
|
|
154
|
-
cy="48"
|
|
155
|
-
fill="none"
|
|
156
|
-
r="22"
|
|
157
|
-
stroke="var(--eds_infographic_primary__moss_green_13, rgba(222, 237, 238, 1))"
|
|
158
|
-
stroke-width="4"
|
|
159
|
-
style="stroke: 138.230; stroke-dashoffset: 138.230px;"
|
|
160
|
-
/>
|
|
161
|
-
<circle
|
|
162
|
-
class=""
|
|
163
|
-
cx="48"
|
|
164
|
-
cy="48"
|
|
165
|
-
fill="none"
|
|
166
|
-
r="22"
|
|
167
|
-
stroke="var(--eds_infographic_primary__moss_green_100, rgba(0, 112, 121, 1))"
|
|
168
|
-
stroke-dasharray="138.23007675795088"
|
|
169
|
-
stroke-linecap="round"
|
|
170
|
-
stroke-width="4"
|
|
171
|
-
style="stroke: 138.230; stroke-dashoffset: 138.230px;"
|
|
172
|
-
/>
|
|
173
|
-
</svg>
|
|
174
|
-
<br />
|
|
175
|
-
Loading assets...
|
|
176
|
-
</div>
|
|
177
|
-
</div>
|
|
178
|
-
`;
|
|
Binary file
|