@webviz/well-log-viewer 0.0.1-alpha.1 → 0.0.1-alpha.3
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/SyncLogViewer.js +3 -4
- package/dist/SyncLogViewer.js.map +1 -1
- package/dist/components/WellLogView.js +5 -5
- package/dist/components/WellLogView.js.map +1 -1
- package/dist/demo/example-data/welllog_template_2.json +167 -167
- package/dist/demo/example-data/wellpick_colors.json +1 -1
- package/dist/demo/example-data/wellpicks.json +179 -179
- package/package.json +32 -5
- package/dist/Intro.stories.mdx +0 -59
- package/dist/package.json +0 -21
- package/src/Intro.stories.mdx +0 -59
- package/src/MapAndWellLogViewer.stories.jsx +0 -147
- package/src/MapAndWellLogViewer.test.tsx +0 -26
- package/src/MapAndWellLogViewer.tsx +0 -473
- package/src/SyncLogViewer.stories.jsx +0 -361
- package/src/SyncLogViewer.test.tsx +0 -41
- package/src/SyncLogViewer.tsx +0 -1188
- package/src/WellLogViewer.png +0 -0
- package/src/WellLogViewer.stories.jsx +0 -169
- package/src/WellLogViewer.test.tsx +0 -53
- package/src/WellLogViewer.tsx +0 -439
- package/src/WellLogViewer_performance.test.tsx +0 -78
- package/src/__snapshots__/MapAndWellLogViewer.test.tsx.snap +0 -365
- package/src/__snapshots__/SyncLogViewer.test.tsx.snap +0 -510
- package/src/__snapshots__/WellLogViewer.test.tsx.snap +0 -552
- package/src/components/AxisSelector.test.tsx +0 -50
- package/src/components/AxisSelector.tsx +0 -49
- package/src/components/ColorTableTypes.ts +0 -9
- package/src/components/InfoPanel.test.tsx +0 -58
- package/src/components/InfoPanel.tsx +0 -144
- package/src/components/InfoTypes.ts +0 -17
- package/src/components/LocalMenus.tsx +0 -336
- package/src/components/PlotDialog.tsx +0 -419
- package/src/components/Scroller.stories.jsx +0 -80
- package/src/components/Scroller.test.tsx +0 -22
- package/src/components/Scroller.tsx +0 -173
- package/src/components/TrackDialog.tsx +0 -217
- package/src/components/WellLogSpacer.tsx +0 -483
- package/src/components/WellLogTemplateTypes.ts +0 -65
- package/src/components/WellLogTypes.ts +0 -53
- package/src/components/WellLogView.stories.jsx +0 -84
- package/src/components/WellLogView.test.tsx +0 -52
- package/src/components/WellLogView.tsx +0 -2063
- package/src/components/WellLogViewWithScroller.stories.jsx +0 -69
- package/src/components/WellLogViewWithScroller.test.tsx +0 -47
- package/src/components/WellLogViewWithScroller.tsx +0 -179
- package/src/components/ZoomSlider.stories.jsx +0 -52
- package/src/components/ZoomSlider.test.tsx +0 -28
- package/src/components/ZoomSlider.tsx +0 -86
- package/src/components/__snapshots__/AxisSelector.test.tsx.snap +0 -28
- package/src/components/__snapshots__/InfoPanel.test.tsx.snap +0 -103
- package/src/components/__snapshots__/Scroller.test.tsx.snap +0 -13
- package/src/components/__snapshots__/WellLogView.test.tsx.snap +0 -54
- package/src/components/__snapshots__/WellLogViewWithScroller.test.tsx.snap +0 -270
- package/src/components/__snapshots__/ZoomSlider.test.tsx.snap +0 -50
- package/src/components/styles.scss +0 -106
- package/src/custom.d.ts +0 -13
- package/src/demo/example-data/volve_logs.json +0 -689617
- package/src/demo/example-data/welllog_template_2.json +0 -196
- package/src/demo/example-data/wellpick_colors.json +0 -156
- package/src/demo/example-data/wellpicks.json +0 -186
- package/src/index.ts +0 -8
- package/src/utils/axes.ts +0 -26
- package/src/utils/color-table.ts +0 -153
- package/src/utils/deepcopy.ts +0 -3
- package/src/utils/edit-track.tsx +0 -40
- package/src/utils/fill-info.ts +0 -224
- package/src/utils/gradientfill-plot-legend.ts +0 -177
- package/src/utils/gradientfill-plot.ts +0 -203
- package/src/utils/graph/factory.ts +0 -15
- package/src/utils/legend/common.ts +0 -153
- package/src/utils/log-viewer.ts +0 -209
- package/src/utils/minmax.ts +0 -126
- package/src/utils/pattern.tsx +0 -50
- package/src/utils/stack/stack-legend.ts +0 -100
- package/src/utils/tracks.ts +0 -1559
- package/tsconfig.json +0 -8
|
@@ -1,361 +0,0 @@
|
|
|
1
|
-
/* eslint-disable react-hooks/exhaustive-deps */ // remove when ready to fix these.
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import SyncLogViewer from "./SyncLogViewer";
|
|
5
|
-
import { argTypesSyncLogViewerProp } from "./SyncLogViewer";
|
|
6
|
-
import { colorTables } from "@emerson-eps/color-tables";
|
|
7
|
-
|
|
8
|
-
const ComponentCode =
|
|
9
|
-
'<SyncLogViewer id="SyncLogViewer" \r\n' +
|
|
10
|
-
" syncTrackPos==true \r\n" +
|
|
11
|
-
" syncContentDomain=true \r\n" +
|
|
12
|
-
" syncContentSelection=true \r\n" +
|
|
13
|
-
" syncTemplate=true \r\n" +
|
|
14
|
-
" horizontal=false \r\n" +
|
|
15
|
-
" welllog={[ \r\n" +
|
|
16
|
-
' require("../../../../example-data/L898MUD.json")[0], \r\n' +
|
|
17
|
-
' require("../../../../example-data/L916MUD.json")[0], \r\n' +
|
|
18
|
-
" ]} \r\n" +
|
|
19
|
-
" template={[ \r\n" +
|
|
20
|
-
' require("../../../../example-data/synclog_template.json"), \r\n' +
|
|
21
|
-
' require("../../../../example-data/synclog_template.json"), \r\n' +
|
|
22
|
-
" } \r\n" +
|
|
23
|
-
" colorTables={colorTables} \r\n" +
|
|
24
|
-
"/>";
|
|
25
|
-
|
|
26
|
-
import { axisTitles, axisMnemos } from "./utils/axes";
|
|
27
|
-
|
|
28
|
-
export default {
|
|
29
|
-
component: SyncLogViewer,
|
|
30
|
-
title: "WellLogViewer/Demo/SyncLogViewer",
|
|
31
|
-
parameters: {
|
|
32
|
-
docs: {
|
|
33
|
-
description: {
|
|
34
|
-
component: "An example for linked WellLogView components",
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
componentSource: {
|
|
38
|
-
code: ComponentCode,
|
|
39
|
-
language: "javascript",
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
argTypes: {
|
|
43
|
-
...argTypesSyncLogViewerProp,
|
|
44
|
-
/*id: {
|
|
45
|
-
description:
|
|
46
|
-
"The ID of this component, used to identify dash components in callbacks. The ID needs to be unique across all of the components in an app.",
|
|
47
|
-
},
|
|
48
|
-
welllogs: {
|
|
49
|
-
description: "Array of JSON objects describing well log data.",
|
|
50
|
-
},
|
|
51
|
-
templates: {
|
|
52
|
-
description: "Array of track template data.",
|
|
53
|
-
},
|
|
54
|
-
colorTables: {
|
|
55
|
-
description: "Prop containing color table data.",
|
|
56
|
-
},
|
|
57
|
-
wellpickFlatting: {
|
|
58
|
-
description: "Horizon names for wellpick flatting",
|
|
59
|
-
},
|
|
60
|
-
spacers: {
|
|
61
|
-
description:
|
|
62
|
-
"Set to true or to array of spaser widths if WellLogSpacers should be used",
|
|
63
|
-
},
|
|
64
|
-
wellDistances: {
|
|
65
|
-
description: "Distanses between wells to show on the spacers",
|
|
66
|
-
},
|
|
67
|
-
*/
|
|
68
|
-
horizontal: {
|
|
69
|
-
description: "Orientation of the track plots on the screen.", // defaultValue: false
|
|
70
|
-
},
|
|
71
|
-
syncTrackPos: {
|
|
72
|
-
description: "Synchronize first visible track", // defaultValue: false
|
|
73
|
-
},
|
|
74
|
-
syncContentDomain: {
|
|
75
|
-
description: "Synchronize visible content domain (pan and zoom)", // defaultValue: false
|
|
76
|
-
},
|
|
77
|
-
syncContentSelection: {
|
|
78
|
-
description: "Synchronize content selection", // defaultValue: false
|
|
79
|
-
},
|
|
80
|
-
syncTemplate: {
|
|
81
|
-
description: "Synchronize templates in the views", // defaultValue: false
|
|
82
|
-
},
|
|
83
|
-
welllogOptions: {
|
|
84
|
-
description:
|
|
85
|
-
"Options for well log view:<br/>" +
|
|
86
|
-
"maxContentZoom: The maximum zoom value (default 256)<br/>" +
|
|
87
|
-
"maxVisibleTrackNum: The maximum number of visible tracks<br/>" +
|
|
88
|
-
"checkDatafileSchema: Validate JSON datafile against schema<br/>" +
|
|
89
|
-
"hideTrackTitle: Hide titles on the tracks<br/>" +
|
|
90
|
-
"hideLegend: Hide legends on the tracks.",
|
|
91
|
-
},
|
|
92
|
-
spacerOptions: {
|
|
93
|
-
description: "Options for well log spacer",
|
|
94
|
-
},
|
|
95
|
-
readoutOptions: {
|
|
96
|
-
description:
|
|
97
|
-
"Options for readout panel.<br/>" +
|
|
98
|
-
"allTracks: boolean — Show not only visible tracks,<br/>" +
|
|
99
|
-
"grouping: string — How group values.",
|
|
100
|
-
},
|
|
101
|
-
domain: {
|
|
102
|
-
description: "Initial visible interval of the log data.",
|
|
103
|
-
},
|
|
104
|
-
selection: {
|
|
105
|
-
description: "Initial selected interval of the log data.",
|
|
106
|
-
},
|
|
107
|
-
viewTitles: {
|
|
108
|
-
description:
|
|
109
|
-
"The view title. Set desired string or react element or true for default value from welllog file",
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
function fillInfo(controller) {
|
|
115
|
-
if (!controller) return "-";
|
|
116
|
-
const baseDomain = controller.getContentBaseDomain();
|
|
117
|
-
const domain = controller.getContentDomain();
|
|
118
|
-
const selection = controller.getContentSelection();
|
|
119
|
-
return (
|
|
120
|
-
"total: [" +
|
|
121
|
-
baseDomain[0].toFixed(0) +
|
|
122
|
-
", " +
|
|
123
|
-
baseDomain[1].toFixed(0) +
|
|
124
|
-
"], " +
|
|
125
|
-
"visible: [" +
|
|
126
|
-
domain[0].toFixed(0) +
|
|
127
|
-
", " +
|
|
128
|
-
domain[1].toFixed(0) +
|
|
129
|
-
"]" +
|
|
130
|
-
(selection[0] !== undefined
|
|
131
|
-
? ", selected: [" +
|
|
132
|
-
selection[0].toFixed(0) +
|
|
133
|
-
(selection[1] !== undefined
|
|
134
|
-
? ", " + selection[1].toFixed(0)
|
|
135
|
-
: "") +
|
|
136
|
-
"]"
|
|
137
|
-
: "")
|
|
138
|
-
);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
const Template = (args) => {
|
|
142
|
-
const infoRef = React.useRef();
|
|
143
|
-
const setInfo = function (info) {
|
|
144
|
-
if (infoRef.current) infoRef.current.innerHTML = info;
|
|
145
|
-
};
|
|
146
|
-
const [controller, setController] = React.useState(null); // the first WellLog
|
|
147
|
-
const onCreateController = React.useCallback(
|
|
148
|
-
(iView, controller) => {
|
|
149
|
-
if (iView === 0) setController(controller);
|
|
150
|
-
},
|
|
151
|
-
[controller]
|
|
152
|
-
);
|
|
153
|
-
const onContentRescale = React.useCallback(
|
|
154
|
-
(iView) => {
|
|
155
|
-
if (iView === 0) setInfo(fillInfo(controller));
|
|
156
|
-
},
|
|
157
|
-
[controller]
|
|
158
|
-
);
|
|
159
|
-
const onContentSelection = React.useCallback(
|
|
160
|
-
(/*_iView*/) => {
|
|
161
|
-
/*if(iView===0)*/ setInfo(fillInfo(controller));
|
|
162
|
-
},
|
|
163
|
-
[controller]
|
|
164
|
-
);
|
|
165
|
-
|
|
166
|
-
return (
|
|
167
|
-
<div
|
|
168
|
-
style={{ height: "92vh", display: "flex", flexDirection: "column" }}
|
|
169
|
-
>
|
|
170
|
-
<div style={{ width: "100%", height: "100%", flex: 1 }}>
|
|
171
|
-
<SyncLogViewer
|
|
172
|
-
id="SyncLogViewer"
|
|
173
|
-
{...args}
|
|
174
|
-
onCreateController={onCreateController}
|
|
175
|
-
onContentRescale={onContentRescale}
|
|
176
|
-
onContentSelection={onContentSelection}
|
|
177
|
-
/>
|
|
178
|
-
</div>
|
|
179
|
-
{/* Print info for the first WellLog */}
|
|
180
|
-
<div ref={infoRef} style={{ width: "100%", flex: 0 }}></div>
|
|
181
|
-
</div>
|
|
182
|
-
);
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
const patternImages = [
|
|
186
|
-
require("../../../../example-data/patterns/Anhydrite.gif"),
|
|
187
|
-
require("../../../../example-data/patterns/Bitumenious.gif"),
|
|
188
|
-
require("../../../../example-data/patterns/Browncoal.gif"),
|
|
189
|
-
require("../../../../example-data/patterns/Calcareous_dolostone.gif"),
|
|
190
|
-
require("../../../../example-data/patterns/Chalk.gif"),
|
|
191
|
-
require("../../../../example-data/patterns/Clay.gif"),
|
|
192
|
-
require("../../../../example-data/patterns/Coal.gif"),
|
|
193
|
-
require("../../../../example-data/patterns/Conglomerate.gif"),
|
|
194
|
-
require("../../../../example-data/patterns/Diamond_lines.gif"),
|
|
195
|
-
require("../../../../example-data/patterns/Dolomitic_limestone.gif"),
|
|
196
|
-
require("../../../../example-data/patterns/Dolostone.gif"),
|
|
197
|
-
require("../../../../example-data/patterns/Downward_lines.gif"),
|
|
198
|
-
require("../../../../example-data/patterns/Dykes_and_sills.gif"),
|
|
199
|
-
require("../../../../example-data/patterns/EmptyFile.gif"),
|
|
200
|
-
require("../../../../example-data/patterns/Fissile_mud.gif"),
|
|
201
|
-
require("../../../../example-data/patterns/Fissile_silt.gif"),
|
|
202
|
-
require("../../../../example-data/patterns/Grid_lines.gif"),
|
|
203
|
-
require("../../../../example-data/patterns/Gypsum.gif"),
|
|
204
|
-
require("../../../../example-data/patterns/Gypsum_anhydrite_unspecified.gif"),
|
|
205
|
-
require("../../../../example-data/patterns/Halite.gif"),
|
|
206
|
-
require("../../../../example-data/patterns/Horizontal_dashed.gif"),
|
|
207
|
-
require("../../../../example-data/patterns/Horizontal_lines.gif"),
|
|
208
|
-
require("../../../../example-data/patterns/Intrusive.gif"),
|
|
209
|
-
require("../../../../example-data/patterns/Limestone.gif"),
|
|
210
|
-
require("../../../../example-data/patterns/Mafic_plutonic.gif"),
|
|
211
|
-
require("../../../../example-data/patterns/Marl.gif"),
|
|
212
|
-
require("../../../../example-data/patterns/Metamorphic.gif"),
|
|
213
|
-
require("../../../../example-data/patterns/Mud.gif"),
|
|
214
|
-
require("../../../../example-data/patterns/Raster.gif"),
|
|
215
|
-
require("../../../../example-data/patterns/Salt_general.gif"),
|
|
216
|
-
require("../../../../example-data/patterns/Sand.gif"),
|
|
217
|
-
require("../../../../example-data/patterns/Sediment_breccia.gif"),
|
|
218
|
-
require("../../../../example-data/patterns/Shale.gif"),
|
|
219
|
-
require("../../../../example-data/patterns/Silicic_plutonic.gif"),
|
|
220
|
-
require("../../../../example-data/patterns/Silt.gif"),
|
|
221
|
-
require("../../../../example-data/patterns/Tuffitt.gif"),
|
|
222
|
-
require("../../../../example-data/patterns/Upward_lines.gif"),
|
|
223
|
-
require("../../../../example-data/patterns/Vertical_bitumenious.gif"),
|
|
224
|
-
require("../../../../example-data/patterns/Vertical_calcareous_dolostone.gif"),
|
|
225
|
-
require("../../../../example-data/patterns/Vertical_chalk.gif"),
|
|
226
|
-
require("../../../../example-data/patterns/Vertical_claystone.gif"),
|
|
227
|
-
require("../../../../example-data/patterns/Vertical_dashed.gif"),
|
|
228
|
-
require("../../../../example-data/patterns/Vertical_dolomitic_limestone.gif"),
|
|
229
|
-
require("../../../../example-data/patterns/Vertical_dolostone.gif"),
|
|
230
|
-
require("../../../../example-data/patterns/Vertical_fissile_mudstone.gif"),
|
|
231
|
-
require("../../../../example-data/patterns/Vertical_fissile_siltstone.gif"),
|
|
232
|
-
require("../../../../example-data/patterns/Vertical_limestone.gif"),
|
|
233
|
-
require("../../../../example-data/patterns/Vertical_lines.gif"),
|
|
234
|
-
require("../../../../example-data/patterns/Vertical_marl.gif"),
|
|
235
|
-
require("../../../../example-data/patterns/Vertical_shale.gif"),
|
|
236
|
-
require("../../../../example-data/patterns/Vertical_tuffitt.gif"),
|
|
237
|
-
require("../../../../example-data/patterns/Vulcanic.gif"),
|
|
238
|
-
];
|
|
239
|
-
const patternNamesEnglish = [
|
|
240
|
-
"Anhydrite",
|
|
241
|
-
"Bitumenious",
|
|
242
|
-
"Browncoal",
|
|
243
|
-
"Calcareous Dolostone",
|
|
244
|
-
"Chalk",
|
|
245
|
-
"Clay",
|
|
246
|
-
"Coal",
|
|
247
|
-
"Conglomerate",
|
|
248
|
-
"Diamond_lines",
|
|
249
|
-
"Dolomitic_limestone",
|
|
250
|
-
"Dolostone",
|
|
251
|
-
"Downward Lines",
|
|
252
|
-
"Dykes and Sills",
|
|
253
|
-
"EmptyFile",
|
|
254
|
-
"Fissile Mud",
|
|
255
|
-
"Fissile Silt",
|
|
256
|
-
"Grid Lines",
|
|
257
|
-
"Gypsum",
|
|
258
|
-
"Gypsum Anhydrite Unspecified",
|
|
259
|
-
"Halite",
|
|
260
|
-
"Horizontal Dashed",
|
|
261
|
-
"Horizontal Lines",
|
|
262
|
-
"Intrusive",
|
|
263
|
-
"Limestone",
|
|
264
|
-
"Mafic Plutonic",
|
|
265
|
-
"Marl",
|
|
266
|
-
"Metamorphic",
|
|
267
|
-
"Mud",
|
|
268
|
-
"Raster",
|
|
269
|
-
"Salt General",
|
|
270
|
-
"Sand",
|
|
271
|
-
"Sediment Breccia",
|
|
272
|
-
"Shale",
|
|
273
|
-
"Silicic Plutonic",
|
|
274
|
-
"Silt",
|
|
275
|
-
"Tuffitt",
|
|
276
|
-
"Upward lines",
|
|
277
|
-
"Vertical Bitumenious",
|
|
278
|
-
"Vertical Calcareous Dolostone",
|
|
279
|
-
"Vertical Chalk",
|
|
280
|
-
"Vertical Claystone",
|
|
281
|
-
"Vertical Dashed",
|
|
282
|
-
"Vertical Dolomitic Limestone",
|
|
283
|
-
"Vertical Dolostone",
|
|
284
|
-
"Vertical Fissile Mudstone",
|
|
285
|
-
"Vertical Fissile Siltstone",
|
|
286
|
-
"Vertical Limestone",
|
|
287
|
-
"Vertical Lines",
|
|
288
|
-
"Vertical Marl",
|
|
289
|
-
"Vertical Shale",
|
|
290
|
-
"Vertical Tuffitt",
|
|
291
|
-
"Vulcanic",
|
|
292
|
-
];
|
|
293
|
-
|
|
294
|
-
export const Default = Template.bind({});
|
|
295
|
-
Default.args = {
|
|
296
|
-
id: "Sync-Log-Viewer",
|
|
297
|
-
syncTrackPos: true,
|
|
298
|
-
syncContentDomain: true,
|
|
299
|
-
syncContentSelection: true,
|
|
300
|
-
syncTemplate: true,
|
|
301
|
-
horizontal: false,
|
|
302
|
-
|
|
303
|
-
welllogs: [
|
|
304
|
-
require("../../../../example-data/L898MUD.json")[0],
|
|
305
|
-
require("../../../../example-data/L916MUD.json")[0],
|
|
306
|
-
require("../../../../example-data/Lis1.json")[0],
|
|
307
|
-
],
|
|
308
|
-
templates: [
|
|
309
|
-
require("../../../../example-data/synclog_template.json"),
|
|
310
|
-
require("../../../../example-data/synclog_template.json"),
|
|
311
|
-
],
|
|
312
|
-
colorTables: colorTables,
|
|
313
|
-
wellpicks: [
|
|
314
|
-
{
|
|
315
|
-
wellpick: require("../../../../example-data/wellpicks.json")[0],
|
|
316
|
-
name: "HORIZON",
|
|
317
|
-
colorTables: require("../../../../example-data/wellpick_colors.json"),
|
|
318
|
-
color: "Stratigraphy",
|
|
319
|
-
},
|
|
320
|
-
{
|
|
321
|
-
wellpick: require("../../../../example-data/wellpicks.json")[1],
|
|
322
|
-
name: "HORIZON",
|
|
323
|
-
colorTables: require("../../../../example-data/wellpick_colors.json"),
|
|
324
|
-
color: "Stratigraphy",
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
wellpick: require("../../../../example-data/wellpicks.json")[0],
|
|
328
|
-
name: "HORIZON",
|
|
329
|
-
colorTables: require("../../../../example-data/wellpick_colors.json"),
|
|
330
|
-
color: "Stratigraphy",
|
|
331
|
-
},
|
|
332
|
-
],
|
|
333
|
-
patternsTable: {
|
|
334
|
-
patternSize: 24,
|
|
335
|
-
patternImages: patternImages,
|
|
336
|
-
names: patternNamesEnglish,
|
|
337
|
-
},
|
|
338
|
-
patterns: require("../../../../example-data/horizon_patterns.json"),
|
|
339
|
-
|
|
340
|
-
wellpickFlatting: ["Hor_2", "Hor_4"],
|
|
341
|
-
|
|
342
|
-
spacers: [312, 255],
|
|
343
|
-
wellDistances: {
|
|
344
|
-
units: "m",
|
|
345
|
-
distances: [2048.3, 512.7],
|
|
346
|
-
},
|
|
347
|
-
|
|
348
|
-
axisTitles: axisTitles,
|
|
349
|
-
axisMnemos: axisMnemos,
|
|
350
|
-
|
|
351
|
-
viewTitles: true, // show default welllog view titles (a wellname from the welllog)
|
|
352
|
-
|
|
353
|
-
welllogOptions: {
|
|
354
|
-
wellpickColorFill: true,
|
|
355
|
-
wellpickPatternFill: true,
|
|
356
|
-
},
|
|
357
|
-
spacerOptions: {
|
|
358
|
-
wellpickColorFill: true,
|
|
359
|
-
wellpickPatternFill: true,
|
|
360
|
-
},
|
|
361
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
|
-
import "@testing-library/jest-dom/extend-expect";
|
|
3
|
-
import { render } from "@testing-library/react";
|
|
4
|
-
import "jest-styled-components";
|
|
5
|
-
import React from "react";
|
|
6
|
-
import SyncLogViewer from "./SyncLogViewer";
|
|
7
|
-
import { axisTitles, axisMnemos } from "./utils/axes";
|
|
8
|
-
import { colorTables } from "@emerson-eps/color-tables";
|
|
9
|
-
|
|
10
|
-
const exampleWellLog = require("../../../../example-data/L898MUD.json")[0];
|
|
11
|
-
const exampleTemplate = require("../../../../example-data/welllog_template_1.json");
|
|
12
|
-
const exampleColorTables = colorTables;
|
|
13
|
-
|
|
14
|
-
window.ResizeObserver =
|
|
15
|
-
window.ResizeObserver ||
|
|
16
|
-
jest.fn().mockImplementation(() => ({
|
|
17
|
-
disconnect: jest.fn(),
|
|
18
|
-
observe: jest.fn(),
|
|
19
|
-
unobserve: jest.fn(),
|
|
20
|
-
}));
|
|
21
|
-
|
|
22
|
-
describe("Sync Log Viewer", () => {
|
|
23
|
-
it("snapshot test", () => {
|
|
24
|
-
const { container } = render(
|
|
25
|
-
<SyncLogViewer
|
|
26
|
-
id="Sync-Log-Viewer"
|
|
27
|
-
welllogOptions={{
|
|
28
|
-
hideTrackTitle: true,
|
|
29
|
-
hideTrackLegend: true,
|
|
30
|
-
}}
|
|
31
|
-
primaryAxis={"md"}
|
|
32
|
-
axisTitles={axisTitles}
|
|
33
|
-
axisMnemos={axisMnemos}
|
|
34
|
-
welllogs={[exampleWellLog]} // the same log for all wellog viewers
|
|
35
|
-
templates={[exampleTemplate]} // the same template for all wellog viewers
|
|
36
|
-
colorTables={[exampleColorTables]} // the same colortables for all wellog viewers
|
|
37
|
-
/>
|
|
38
|
-
);
|
|
39
|
-
expect(container.firstChild).toMatchSnapshot();
|
|
40
|
-
});
|
|
41
|
-
});
|