@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.
Files changed (77) hide show
  1. package/dist/SyncLogViewer.js +3 -4
  2. package/dist/SyncLogViewer.js.map +1 -1
  3. package/dist/components/WellLogView.js +5 -5
  4. package/dist/components/WellLogView.js.map +1 -1
  5. package/dist/demo/example-data/welllog_template_2.json +167 -167
  6. package/dist/demo/example-data/wellpick_colors.json +1 -1
  7. package/dist/demo/example-data/wellpicks.json +179 -179
  8. package/package.json +32 -5
  9. package/dist/Intro.stories.mdx +0 -59
  10. package/dist/package.json +0 -21
  11. package/src/Intro.stories.mdx +0 -59
  12. package/src/MapAndWellLogViewer.stories.jsx +0 -147
  13. package/src/MapAndWellLogViewer.test.tsx +0 -26
  14. package/src/MapAndWellLogViewer.tsx +0 -473
  15. package/src/SyncLogViewer.stories.jsx +0 -361
  16. package/src/SyncLogViewer.test.tsx +0 -41
  17. package/src/SyncLogViewer.tsx +0 -1188
  18. package/src/WellLogViewer.png +0 -0
  19. package/src/WellLogViewer.stories.jsx +0 -169
  20. package/src/WellLogViewer.test.tsx +0 -53
  21. package/src/WellLogViewer.tsx +0 -439
  22. package/src/WellLogViewer_performance.test.tsx +0 -78
  23. package/src/__snapshots__/MapAndWellLogViewer.test.tsx.snap +0 -365
  24. package/src/__snapshots__/SyncLogViewer.test.tsx.snap +0 -510
  25. package/src/__snapshots__/WellLogViewer.test.tsx.snap +0 -552
  26. package/src/components/AxisSelector.test.tsx +0 -50
  27. package/src/components/AxisSelector.tsx +0 -49
  28. package/src/components/ColorTableTypes.ts +0 -9
  29. package/src/components/InfoPanel.test.tsx +0 -58
  30. package/src/components/InfoPanel.tsx +0 -144
  31. package/src/components/InfoTypes.ts +0 -17
  32. package/src/components/LocalMenus.tsx +0 -336
  33. package/src/components/PlotDialog.tsx +0 -419
  34. package/src/components/Scroller.stories.jsx +0 -80
  35. package/src/components/Scroller.test.tsx +0 -22
  36. package/src/components/Scroller.tsx +0 -173
  37. package/src/components/TrackDialog.tsx +0 -217
  38. package/src/components/WellLogSpacer.tsx +0 -483
  39. package/src/components/WellLogTemplateTypes.ts +0 -65
  40. package/src/components/WellLogTypes.ts +0 -53
  41. package/src/components/WellLogView.stories.jsx +0 -84
  42. package/src/components/WellLogView.test.tsx +0 -52
  43. package/src/components/WellLogView.tsx +0 -2063
  44. package/src/components/WellLogViewWithScroller.stories.jsx +0 -69
  45. package/src/components/WellLogViewWithScroller.test.tsx +0 -47
  46. package/src/components/WellLogViewWithScroller.tsx +0 -179
  47. package/src/components/ZoomSlider.stories.jsx +0 -52
  48. package/src/components/ZoomSlider.test.tsx +0 -28
  49. package/src/components/ZoomSlider.tsx +0 -86
  50. package/src/components/__snapshots__/AxisSelector.test.tsx.snap +0 -28
  51. package/src/components/__snapshots__/InfoPanel.test.tsx.snap +0 -103
  52. package/src/components/__snapshots__/Scroller.test.tsx.snap +0 -13
  53. package/src/components/__snapshots__/WellLogView.test.tsx.snap +0 -54
  54. package/src/components/__snapshots__/WellLogViewWithScroller.test.tsx.snap +0 -270
  55. package/src/components/__snapshots__/ZoomSlider.test.tsx.snap +0 -50
  56. package/src/components/styles.scss +0 -106
  57. package/src/custom.d.ts +0 -13
  58. package/src/demo/example-data/volve_logs.json +0 -689617
  59. package/src/demo/example-data/welllog_template_2.json +0 -196
  60. package/src/demo/example-data/wellpick_colors.json +0 -156
  61. package/src/demo/example-data/wellpicks.json +0 -186
  62. package/src/index.ts +0 -8
  63. package/src/utils/axes.ts +0 -26
  64. package/src/utils/color-table.ts +0 -153
  65. package/src/utils/deepcopy.ts +0 -3
  66. package/src/utils/edit-track.tsx +0 -40
  67. package/src/utils/fill-info.ts +0 -224
  68. package/src/utils/gradientfill-plot-legend.ts +0 -177
  69. package/src/utils/gradientfill-plot.ts +0 -203
  70. package/src/utils/graph/factory.ts +0 -15
  71. package/src/utils/legend/common.ts +0 -153
  72. package/src/utils/log-viewer.ts +0 -209
  73. package/src/utils/minmax.ts +0 -126
  74. package/src/utils/pattern.tsx +0 -50
  75. package/src/utils/stack/stack-legend.ts +0 -100
  76. package/src/utils/tracks.ts +0 -1559
  77. package/tsconfig.json +0 -8
@@ -1,78 +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, { Profiler } from "react";
6
- import * as core from "@actions/core";
7
- import { Wrapper } from "../GroupTree/test/TestWrapper";
8
- import WellLogViewer from "./WellLogViewer";
9
- import logTimes, { obj } from "../../performanceUtility/onRenderFunction";
10
- import { axisTitles, axisMnemos } from "./utils/axes";
11
- import { colorTables } from "@emerson-eps/color-tables";
12
-
13
- const exampleTemplate = require("../../../demo/example-data/welllog_template_1.json");
14
- //const exampleWellLog = require("../../../demo/example-data/L898MUD.json")[0];
15
- const exampleWellLog = {
16
- header: {},
17
- curves: [],
18
- data: [],
19
- };
20
- const exampleColorTable = colorTables;
21
-
22
- window.ResizeObserver =
23
- window.ResizeObserver ||
24
- jest.fn().mockImplementation(() => ({
25
- disconnect: jest.fn(),
26
- observe: jest.fn(),
27
- unobserve: jest.fn(),
28
- }));
29
-
30
- describe("Well Log Viewer perfomance", () => {
31
- it("initial performance test", () => {
32
- render(
33
- Wrapper({
34
- children: (
35
- <Profiler id="Well Log Viewer" onRender={logTimes}>
36
- <WellLogViewer
37
- id=""
38
- welllog={exampleWellLog}
39
- options={{
40
- hideTrackTitle: true,
41
- hideTrackLegend: true,
42
- }}
43
- primaryAxis={"md"}
44
- axisTitles={axisTitles}
45
- axisMnemos={axisMnemos}
46
- template={exampleTemplate}
47
- colorTables={exampleColorTable}
48
- onContentRescale={function (): void {
49
- throw new Error("Function not implemented.");
50
- }}
51
- />
52
- </Profiler>
53
- ),
54
- })
55
- );
56
- });
57
-
58
- const no_of_renders = obj.perf_metrics.length;
59
- if (no_of_renders > 2) {
60
- core.setFailed(
61
- "Well Log viewer Component seems to have performance issues. Actual number of renders = " +
62
- no_of_renders +
63
- " .Expected number of renders <= 2 "
64
- );
65
- }
66
- for (let i = 0; i < no_of_renders; i++) {
67
- core.info(
68
- "Render number: " + (i + 1) + " | Metrics: " + obj.perf_metrics[i]
69
- );
70
- if (obj.perf_metrics[i][2] > 100) {
71
- core.setFailed(
72
- "Well Log Viewer seems to have performance issues. Actual render time:" +
73
- obj.perf_metrics[i][2] +
74
- " Expected render time - less than 100ms"
75
- );
76
- }
77
- }
78
- });
@@ -1,365 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Map and Well Log Viewer snapshot test 1`] = `
4
- <div
5
- style="height: 100%; width: 100%; display: flex;"
6
- >
7
- <div
8
- style="height: 100%; width: 70%; position: relative;"
9
- >
10
- <div />
11
- </div>
12
- <div
13
- style="height: 85%; width: 30%; display: flex; flex-direction: column;"
14
- >
15
- <div
16
- style="flex: 1 1; height: 90%; min-width: 25px; width: 100%;"
17
- >
18
- <div
19
- style="overflow: scroll; width: 100%; height: 100%;"
20
- >
21
- <div
22
- style="width: 0px;"
23
- >
24
- <div
25
- style="position: absolute;"
26
- >
27
- <div
28
- class="welllogview"
29
- style="width: 100%; height: 100%; display: flex; flex-direction: column;"
30
- >
31
- <div
32
- class="title"
33
- >
34
- <div
35
- style="font-size: 16px;"
36
- >
37
- Select a well by clicking on the map
38
- </div>
39
- </div>
40
- <div
41
- style="width: 100%; height: 100%; display: flex; flex-direction: column;"
42
- >
43
- <div
44
- class="log-controller"
45
- >
46
- <div
47
- class="overlay"
48
- style="width: 0px; left: 0px; overflow: hidden;"
49
- >
50
- <div
51
- class="depth"
52
- style="position: absolute; pointer-events: none; visibility: hidden;"
53
- />
54
- <div
55
- class="rubber-band"
56
- style="position: relative; pointer-events: none; height: 9px; width: 100%; visibility: hidden;"
57
- >
58
- <div
59
- style="height: 1px; width: 100%; top: 4.5px; position: relative;"
60
- />
61
- </div>
62
- <div
63
- class="pinned"
64
- style="position: absolute; pointer-events: none; height: 9px; width: 100%; left: 0px; visibility: hidden;"
65
- >
66
- <div
67
- style="height: 1px; width: 100%; top: 4.5px; position: absolute;"
68
- />
69
- </div>
70
- <div
71
- class="wellpick"
72
- style="position: absolute; pointer-events: none; height: 3px; width: 100%; left: 0px; background-color: rgba(255, 193, 0, 0.8); visibility: false;"
73
- >
74
- <div
75
- style="position: absolute; height: 1px; width: 100%; background-color: rgba(255, 193, 0, 0.8);"
76
- >
77
- <table
78
- style="position:relative; top:-1.5em;"
79
- width="100%"
80
- >
81
- <tbody>
82
- <tr>
83
- <td
84
- class="wp-title-0"
85
- >
86
- <span
87
- style="background-color:rgba(255,193,0,0.16)"
88
- >
89
- 1644
90
- </span>
91
- </td>
92
- <td
93
- class="wp-title-1"
94
- >
95
- <span
96
- style="background-color:rgba(255,193,0,0.16)"
97
- />
98
- </td>
99
- <td
100
- align="center"
101
- >
102
- <span
103
- style="background-color:rgba(255,193,0,0.16)"
104
- >
105
- Hor_1
106
- </span>
107
- </td>
108
- </tr>
109
- </tbody>
110
- </table>
111
- </div>
112
- </div>
113
- <div
114
- class="wellpick"
115
- style="position: absolute; pointer-events: none; height: 3px; width: 100%; left: 0px; background-color: rgba(255, 120, 61, 0.8); visibility: false;"
116
- >
117
- <div
118
- style="position: absolute; height: 1px; width: 100%; background-color: rgba(255, 120, 61, 0.8);"
119
- >
120
- <table
121
- style="position:relative; top:-1.5em;"
122
- width="100%"
123
- >
124
- <tbody>
125
- <tr>
126
- <td
127
- class="wp-title-0"
128
- >
129
- <span
130
- style="background-color:rgba(255,120,61,0.16)"
131
- >
132
- 2788
133
- </span>
134
- </td>
135
- <td
136
- class="wp-title-1"
137
- >
138
- <span
139
- style="background-color:rgba(255,120,61,0.16)"
140
- />
141
- </td>
142
- <td
143
- align="center"
144
- >
145
- <span
146
- style="background-color:rgba(255,120,61,0.16)"
147
- >
148
- Hor_2
149
- </span>
150
- </td>
151
- </tr>
152
- </tbody>
153
- </table>
154
- </div>
155
- </div>
156
- <div
157
- class="wellpick"
158
- style="position: absolute; pointer-events: none; height: 3px; width: 100%; left: 0px; background-color: rgba(255, 155, 76, 0.8); visibility: false;"
159
- >
160
- <div
161
- style="position: absolute; height: 1px; width: 100%; background-color: rgba(255, 155, 76, 0.8);"
162
- >
163
- <table
164
- style="position:relative; top:-1.5em;"
165
- width="100%"
166
- >
167
- <tbody>
168
- <tr>
169
- <td
170
- class="wp-title-0"
171
- >
172
- <span
173
- style="background-color:rgba(255,155,76,0.16)"
174
- >
175
- 3288
176
- </span>
177
- </td>
178
- <td
179
- class="wp-title-1"
180
- >
181
- <span
182
- style="background-color:rgba(255,155,76,0.16)"
183
- />
184
- </td>
185
- <td
186
- align="center"
187
- >
188
- <span
189
- style="background-color:rgba(255,155,76,0.16)"
190
- >
191
- Hor_3
192
- </span>
193
- </td>
194
- </tr>
195
- </tbody>
196
- </table>
197
- </div>
198
- </div>
199
- <div
200
- class="wellpick"
201
- style="position: absolute; pointer-events: none; height: 3px; width: 100%; left: 0px; background-color: rgba(255, 223, 161, 0.8); visibility: false;"
202
- >
203
- <div
204
- style="position: absolute; height: 1px; width: 100%; background-color: rgba(255, 223, 161, 0.8);"
205
- >
206
- <table
207
- style="position:relative; top:-1.5em;"
208
- width="100%"
209
- >
210
- <tbody>
211
- <tr>
212
- <td
213
- class="wp-title-0"
214
- >
215
- <span
216
- style="background-color:rgba(255,223,161,0.16)"
217
- >
218
- 3611
219
- </span>
220
- </td>
221
- <td
222
- class="wp-title-1"
223
- >
224
- <span
225
- style="background-color:rgba(255,223,161,0.16)"
226
- />
227
- </td>
228
- <td
229
- align="center"
230
- >
231
- <span
232
- style="background-color:rgba(255,223,161,0.16)"
233
- >
234
- Hor_4
235
- </span>
236
- </td>
237
- </tr>
238
- </tbody>
239
- </table>
240
- </div>
241
- </div>
242
- <div
243
- class="wellpick"
244
- style="position: absolute; pointer-events: none; height: 3px; width: 100%; left: 0px; background-color: rgba(255, 223, 161, 0.8); visibility: false;"
245
- >
246
- <div
247
- style="position: absolute; height: 1px; width: 100%; background-color: rgba(255, 223, 161, 0.8);"
248
- >
249
- <table
250
- style="position:relative; top:-1.5em;"
251
- width="100%"
252
- >
253
- <tbody>
254
- <tr>
255
- <td
256
- class="wp-title-0"
257
- >
258
- <span
259
- style="background-color:rgba(255,223,161,0.16)"
260
- >
261
- 3911
262
- </span>
263
- </td>
264
- <td
265
- class="wp-title-1"
266
- >
267
- <span
268
- style="background-color:rgba(255,223,161,0.16)"
269
- />
270
- </td>
271
- <td
272
- align="center"
273
- >
274
- <span
275
- style="background-color:rgba(255,223,161,0.16)"
276
- >
277
- Hor_5
278
- </span>
279
- </td>
280
- </tr>
281
- </tbody>
282
- </table>
283
- </div>
284
- </div>
285
- <div
286
- class="wellpick"
287
- style="position: absolute; pointer-events: none; height: 3px; width: 100%; left: 0px; background-color: rgba(255, 223, 161, 0.8); visibility: false;"
288
- >
289
- <div
290
- style="position: absolute; height: 1px; width: 100%; background-color: rgba(255, 223, 161, 0.8);"
291
- >
292
- <table
293
- style="position:relative; top:-1.5em;"
294
- width="100%"
295
- >
296
- <tbody>
297
- <tr>
298
- <td
299
- class="wp-title-0"
300
- >
301
- <span
302
- style="background-color:rgba(255,223,161,0.16)"
303
- >
304
- 4411
305
- </span>
306
- </td>
307
- <td
308
- class="wp-title-1"
309
- >
310
- <span
311
- style="background-color:rgba(255,223,161,0.16)"
312
- />
313
- </td>
314
- <td
315
- align="center"
316
- >
317
- <span
318
- style="background-color:rgba(255,223,161,0.16)"
319
- >
320
- Hor_6
321
- </span>
322
- </td>
323
- </tr>
324
- </tbody>
325
- </table>
326
- </div>
327
- </div>
328
- </div>
329
- </div>
330
- </div>
331
- </div>
332
- </div>
333
- </div>
334
- </div>
335
- </div>
336
- <div
337
- style="flex: 0 0 0px; display: flex; flex-direction: column; height: 100%; width: 100%;"
338
- >
339
- <div
340
- style="overflow-y: auto; overflow-x: hidden;"
341
- >
342
- <fieldset>
343
- <legend>
344
- Readout
345
- </legend>
346
- <table
347
- style="border-spacing: 0px; width: 100%;"
348
- >
349
- <tbody>
350
- <tr>
351
- <td
352
- colspan="4"
353
- >
354
-
355
- <hr />
356
- </td>
357
- </tr>
358
- </tbody>
359
- </table>
360
- </fieldset>
361
- </div>
362
- </div>
363
- </div>
364
- </div>
365
- `;