@webviz/well-log-viewer 0.0.1-alpha.1 → 0.0.1-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.
Files changed (76) hide show
  1. package/dist/components/WellLogView.js +5 -5
  2. package/dist/components/WellLogView.js.map +1 -1
  3. package/dist/demo/example-data/welllog_template_2.json +167 -167
  4. package/dist/demo/example-data/wellpick_colors.json +1 -1
  5. package/dist/demo/example-data/wellpicks.json +179 -179
  6. package/package.json +32 -5
  7. package/dist/Intro.stories.mdx +0 -59
  8. package/dist/components/styles.scss +0 -106
  9. package/dist/package.json +0 -21
  10. package/src/Intro.stories.mdx +0 -59
  11. package/src/MapAndWellLogViewer.stories.jsx +0 -147
  12. package/src/MapAndWellLogViewer.test.tsx +0 -26
  13. package/src/MapAndWellLogViewer.tsx +0 -473
  14. package/src/SyncLogViewer.stories.jsx +0 -361
  15. package/src/SyncLogViewer.test.tsx +0 -41
  16. package/src/SyncLogViewer.tsx +0 -1188
  17. package/src/WellLogViewer.png +0 -0
  18. package/src/WellLogViewer.stories.jsx +0 -169
  19. package/src/WellLogViewer.test.tsx +0 -53
  20. package/src/WellLogViewer.tsx +0 -439
  21. package/src/WellLogViewer_performance.test.tsx +0 -78
  22. package/src/__snapshots__/MapAndWellLogViewer.test.tsx.snap +0 -365
  23. package/src/__snapshots__/SyncLogViewer.test.tsx.snap +0 -510
  24. package/src/__snapshots__/WellLogViewer.test.tsx.snap +0 -552
  25. package/src/components/AxisSelector.test.tsx +0 -50
  26. package/src/components/AxisSelector.tsx +0 -49
  27. package/src/components/ColorTableTypes.ts +0 -9
  28. package/src/components/InfoPanel.test.tsx +0 -58
  29. package/src/components/InfoPanel.tsx +0 -144
  30. package/src/components/InfoTypes.ts +0 -17
  31. package/src/components/LocalMenus.tsx +0 -336
  32. package/src/components/PlotDialog.tsx +0 -419
  33. package/src/components/Scroller.stories.jsx +0 -80
  34. package/src/components/Scroller.test.tsx +0 -22
  35. package/src/components/Scroller.tsx +0 -173
  36. package/src/components/TrackDialog.tsx +0 -217
  37. package/src/components/WellLogSpacer.tsx +0 -483
  38. package/src/components/WellLogTemplateTypes.ts +0 -65
  39. package/src/components/WellLogTypes.ts +0 -53
  40. package/src/components/WellLogView.stories.jsx +0 -84
  41. package/src/components/WellLogView.test.tsx +0 -52
  42. package/src/components/WellLogView.tsx +0 -2063
  43. package/src/components/WellLogViewWithScroller.stories.jsx +0 -69
  44. package/src/components/WellLogViewWithScroller.test.tsx +0 -47
  45. package/src/components/WellLogViewWithScroller.tsx +0 -179
  46. package/src/components/ZoomSlider.stories.jsx +0 -52
  47. package/src/components/ZoomSlider.test.tsx +0 -28
  48. package/src/components/ZoomSlider.tsx +0 -86
  49. package/src/components/__snapshots__/AxisSelector.test.tsx.snap +0 -28
  50. package/src/components/__snapshots__/InfoPanel.test.tsx.snap +0 -103
  51. package/src/components/__snapshots__/Scroller.test.tsx.snap +0 -13
  52. package/src/components/__snapshots__/WellLogView.test.tsx.snap +0 -54
  53. package/src/components/__snapshots__/WellLogViewWithScroller.test.tsx.snap +0 -270
  54. package/src/components/__snapshots__/ZoomSlider.test.tsx.snap +0 -50
  55. package/src/components/styles.scss +0 -106
  56. package/src/custom.d.ts +0 -13
  57. package/src/demo/example-data/volve_logs.json +0 -689617
  58. package/src/demo/example-data/welllog_template_2.json +0 -196
  59. package/src/demo/example-data/wellpick_colors.json +0 -156
  60. package/src/demo/example-data/wellpicks.json +0 -186
  61. package/src/index.ts +0 -8
  62. package/src/utils/axes.ts +0 -26
  63. package/src/utils/color-table.ts +0 -153
  64. package/src/utils/deepcopy.ts +0 -3
  65. package/src/utils/edit-track.tsx +0 -40
  66. package/src/utils/fill-info.ts +0 -224
  67. package/src/utils/gradientfill-plot-legend.ts +0 -177
  68. package/src/utils/gradientfill-plot.ts +0 -203
  69. package/src/utils/graph/factory.ts +0 -15
  70. package/src/utils/legend/common.ts +0 -153
  71. package/src/utils/log-viewer.ts +0 -209
  72. package/src/utils/minmax.ts +0 -126
  73. package/src/utils/pattern.tsx +0 -50
  74. package/src/utils/stack/stack-legend.ts +0 -100
  75. package/src/utils/tracks.ts +0 -1559
  76. package/tsconfig.json +0 -8
@@ -1,186 +1,186 @@
1
1
  [
2
- {
3
- "header": {
4
- "name": "Set 1",
5
- "well": "15/9-19 A"
6
- },
7
- "curves": [
8
- {
9
- "name": "MD",
10
- "quantity": "m",
11
- "unit": "m",
12
- "valueType": "float",
13
- "dimensions": 1
14
- },
15
- {
16
- "name": "HORIZON",
17
- "valueType": "string",
18
- "dimensions": 1
19
- }
20
- ],
21
- "data": [
22
- [ 1644, "Hor_1" ],
23
- [ 2788, "Hor_2" ],
24
- [ 3288, "Hor_3" ],
25
- [ 3611, "Hor_4" ],
26
- [ 3911, "Hor_5" ],
27
- [ 4411, "Hor_6" ]
28
- ],
29
- "metadata_discrete": {
30
- "HORIZON": {
31
- "attributes": [
32
- "color",
33
- "code"
2
+ {
3
+ "header": {
4
+ "name": "Set 1",
5
+ "well": "15/9-19 A"
6
+ },
7
+ "curves": [
8
+ {
9
+ "name": "MD",
10
+ "quantity": "m",
11
+ "unit": "m",
12
+ "valueType": "float",
13
+ "dimensions": 1
14
+ },
15
+ {
16
+ "name": "HORIZON",
17
+ "valueType": "string",
18
+ "dimensions": 1
19
+ }
20
+ ],
21
+ "data": [
22
+ [1644, "Hor_1"],
23
+ [2788, "Hor_2"],
24
+ [3288, "Hor_3"],
25
+ [3611, "Hor_4"],
26
+ [3911, "Hor_5"],
27
+ [4411, "Hor_6"]
34
28
  ],
35
- "objects": {
36
- "Hor_1": [
37
- [
38
- 255,
39
- 13,
40
- 186,
41
- 255
42
- ],
43
- 0
44
- ],
45
- "Hor_2": [
46
- [
47
- 255,
48
- 64,
49
- 53,
50
- 255
51
- ],
52
- 1
53
- ],
54
- "Hor_3": [
55
- [
56
- 247,
57
- 255,
58
- 164,
59
- 255
60
- ],
61
- 2
62
- ],
63
- "Hor_4": [
64
- [
65
- 147,
66
- 255,
67
- 64,
68
- 255
69
- ],
70
- 3
71
- ],
72
- "Hor_5": [
73
- [
74
- 255,
75
- 147,
76
- 64,
77
- 255
78
- ],
79
- 3
80
- ],
81
- "Hor_6": [
82
- [
83
- 155,
84
- 164,
85
- 247,
86
- 255
87
- ],
88
- 3
89
- ]
29
+ "metadata_discrete": {
30
+ "HORIZON": {
31
+ "attributes": [
32
+ "color",
33
+ "code"
34
+ ],
35
+ "objects": {
36
+ "Hor_1": [
37
+ [
38
+ 255,
39
+ 13,
40
+ 186,
41
+ 255
42
+ ],
43
+ 0
44
+ ],
45
+ "Hor_2": [
46
+ [
47
+ 255,
48
+ 64,
49
+ 53,
50
+ 255
51
+ ],
52
+ 1
53
+ ],
54
+ "Hor_3": [
55
+ [
56
+ 247,
57
+ 255,
58
+ 164,
59
+ 255
60
+ ],
61
+ 2
62
+ ],
63
+ "Hor_4": [
64
+ [
65
+ 147,
66
+ 255,
67
+ 64,
68
+ 255
69
+ ],
70
+ 3
71
+ ],
72
+ "Hor_5": [
73
+ [
74
+ 255,
75
+ 147,
76
+ 64,
77
+ 255
78
+ ],
79
+ 3
80
+ ],
81
+ "Hor_6": [
82
+ [
83
+ 155,
84
+ 164,
85
+ 247,
86
+ 255
87
+ ],
88
+ 3
89
+ ]
90
+ }
91
+ }
90
92
  }
91
- }
92
- }
93
- },
94
- {
95
- "header": {
96
- "name": "Set 1",
97
- "well": "L916MUD"
98
93
  },
99
- "curves": [
100
- {
101
- "name": "MD",
102
- "quantity": "m",
103
- "unit": "m",
104
- "valueType": "float",
105
- "dimensions": 1
106
- },
107
- {
108
- "name": "HORIZON",
109
- "valueType": "string",
110
- "dimensions": 1
111
- }
112
- ],
113
- "data": [
114
- [ 1444, "Hor_1" ],
115
- [ 2888, "Hor_2" ],
116
- [ 3288, "Hor_3" ],
117
- [ 3811, "Hor_4" ],
118
- [ 4011, "Hor_5" ],
119
- [ 4131, "Hor_6" ]
120
- ],
121
- "metadata_discrete": {
122
- "HORIZON": {
123
- "attributes": [
124
- "color",
125
- "code"
94
+ {
95
+ "header": {
96
+ "name": "Set 1",
97
+ "well": "L916MUD"
98
+ },
99
+ "curves": [
100
+ {
101
+ "name": "MD",
102
+ "quantity": "m",
103
+ "unit": "m",
104
+ "valueType": "float",
105
+ "dimensions": 1
106
+ },
107
+ {
108
+ "name": "HORIZON",
109
+ "valueType": "string",
110
+ "dimensions": 1
111
+ }
112
+ ],
113
+ "data": [
114
+ [1444, "Hor_1"],
115
+ [2888, "Hor_2"],
116
+ [3288, "Hor_3"],
117
+ [3811, "Hor_4"],
118
+ [4011, "Hor_5"],
119
+ [4131, "Hor_6"]
126
120
  ],
127
- "objects": {
128
- "Hor_1": [
129
- [
130
- 255,
131
- 13,
132
- 186,
133
- 255
134
- ],
135
- 0
136
- ],
137
- "Hor_2": [
138
- [
139
- 255,
140
- 64,
141
- 53,
142
- 255
143
- ],
144
- 1
145
- ],
146
- "Hor_3": [
147
- [
148
- 247,
149
- 255,
150
- 164,
151
- 255
152
- ],
153
- 2
154
- ],
155
- "Hor_4": [
156
- [
157
- 147,
158
- 255,
159
- 64,
160
- 255
161
- ],
162
- 3
163
- ],
164
- "Hor_5": [
165
- [
166
- 255,
167
- 147,
168
- 64,
169
- 255
170
- ],
171
- 3
172
- ],
173
- "Hor_6": [
174
- [
175
- 155,
176
- 164,
177
- 247,
178
- 255
179
- ],
180
- 3
181
- ]
121
+ "metadata_discrete": {
122
+ "HORIZON": {
123
+ "attributes": [
124
+ "color",
125
+ "code"
126
+ ],
127
+ "objects": {
128
+ "Hor_1": [
129
+ [
130
+ 255,
131
+ 13,
132
+ 186,
133
+ 255
134
+ ],
135
+ 0
136
+ ],
137
+ "Hor_2": [
138
+ [
139
+ 255,
140
+ 64,
141
+ 53,
142
+ 255
143
+ ],
144
+ 1
145
+ ],
146
+ "Hor_3": [
147
+ [
148
+ 247,
149
+ 255,
150
+ 164,
151
+ 255
152
+ ],
153
+ 2
154
+ ],
155
+ "Hor_4": [
156
+ [
157
+ 147,
158
+ 255,
159
+ 64,
160
+ 255
161
+ ],
162
+ 3
163
+ ],
164
+ "Hor_5": [
165
+ [
166
+ 255,
167
+ 147,
168
+ 64,
169
+ 255
170
+ ],
171
+ 3
172
+ ],
173
+ "Hor_6": [
174
+ [
175
+ 155,
176
+ 164,
177
+ 247,
178
+ 255
179
+ ],
180
+ 3
181
+ ]
182
+ }
183
+ }
182
184
  }
183
- }
184
185
  }
185
- }
186
- ]
186
+ ]
package/package.json CHANGED
@@ -1,21 +1,48 @@
1
1
  {
2
2
  "name": "@webviz/well-log-viewer",
3
- "version": "0.0.1-alpha.1",
3
+ "version": "0.0.1-alpha.2",
4
4
  "description": "",
5
- "main": "src/index.ts",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
6
10
  "scripts": {
7
11
  "transpile": "tsc --project ./tsconfig.json",
8
- "copy-files": "copyfiles package.json dist && copyfiles README.md dist && copyfiles --exclude **/*.{tsx,jsx,js,ts,snap} --up 1 \"src/**/*\" dist/",
9
- "build": "npm run transpile && npm run copy-files"
12
+ "copy-files": "copyfiles --up 1 \"src/**/*.png\" dist/",
13
+ "build": "git clean -xdff dist && npm run transpile && npm run copy-files"
10
14
  },
11
15
  "author": "Equinor <opensource@equinor.com>",
12
16
  "license": "MPL-2.0",
13
17
  "dependencies": {
14
18
  "@emerson-eps/color-tables": "^0.4.57",
15
19
  "@equinor/videx-wellog": "^0.8.0",
16
- "@mui/material": "^5.13.4",
17
20
  "@webviz/subsurface-viewer": "*",
18
21
  "convert-units": "^2.3.4",
19
22
  "d3": "^7.8.2"
23
+ },
24
+ "devDependencies": {
25
+ "@mui/material": "^5.13.7"
26
+ },
27
+ "peerDependencies": {
28
+ "@mui/material": "^5",
29
+ "react": "^17 || ^18",
30
+ "react-dom": "^17 || ^18"
31
+ },
32
+ "nx": {
33
+ "targets": {
34
+ "build": {
35
+ "dependsOn": [
36
+ {
37
+ "dependencies": true,
38
+ "target": "build",
39
+ "params": "ignore"
40
+ }
41
+ ]
42
+ }
43
+ }
44
+ },
45
+ "volta": {
46
+ "node": "16.18.1"
20
47
  }
21
48
  }
@@ -1,59 +0,0 @@
1
- import { Meta, Canvas, Story } from '@storybook/addon-docs';
2
-
3
- import imageWellLogViewer from "./WellLogViewer.png"
4
-
5
- <Meta title="WellLogViewer/Overview" />
6
-
7
- # WellLogView examples
8
-
9
- ## Introduction
10
- These stories contain examples of usage of components for visualization of well log data files.
11
- There are two main examples:
12
- [WellLogViewer](?path=/story/welllogviewer-overview--page#welllogviewer-component) wich contains essential parts of typical well log viewer
13
- and [SyncLogViewer](?path=/story/welllogviewer-overview--page#synclogviewer-component) wich contains synchronized views for three different log files.
14
-
15
- ## WellLogView component
16
- [WellLogView](?path=/docs/welllogviewer-components-welllogview--default) is a basic react component to wrap [ViDEx well log](https://github.com/equinor/videx-wellog) library for drawing well log data.
17
-
18
- The component can zoom and pan visible area of tracks by mouse and support selecting of depth interval.
19
-
20
- As input data it accept data files in following formats:
21
- #### Well Log Data Format
22
- The JSON Well Log Format is used in WellLogView component for input Well Log data files.
23
-
24
- It is a modern well log format created in order to overcome the deficiencies of existing formats.
25
- It is based on the JavaScript Object Notation open standard (RFC 8259).
26
- Full description of the format could be found on the site https://jsonwelllogformat.org .
27
-
28
- The file format could be described with a following
29
- [JSON schema](https://github.com/equinor/webviz-subsurface-components/blob/master/react/src/lib/inputSchema/WellLog.json)
30
-
31
- #### Template Format
32
- The JSON file describing content of well log view: what tracks should be displayed and what curves it should contains.
33
-
34
- The file format could be described with a following
35
- [JSON schema](https://github.com/equinor/webviz-subsurface-components/blob/master/react/src/lib/inputSchema/WellLogTemplate.json)
36
-
37
- #### Color Table Format
38
- The JSON file used as a supplement to template file and describe color tables for visualizing different type of log curves.
39
-
40
- See also [@emerson-eps/color-tables](https://github.com/emerson-eps/color-tables) component.
41
-
42
-
43
- ## WellLogViewer component
44
- [A demo component](?path=/story/welllogviewer-demo-welllogviewer--default) to deal with WellLogView component.
45
- It contains WellLogView component surrounded by auxiliary components:
46
- readout panel, axis selector and zoom slider.
47
-
48
- The number and properties of tracks and curves could be interactively edited by corresponding content menus and dialog boxes.
49
-
50
- <img src={imageWellLogViewer} />
51
-
52
- _WellLogViewer component architecture._
53
-
54
- ## SyncLogViewer component
55
- [An example](?path=/story/welllogviewer-demo-synclogviewer--default) for three linked WellLogView components.
56
- It demonstrate how different well log views can be synchronized in such complex programs as well correlation applications.
57
-
58
- The component architecture is similar to WellLogViewer's one but contains three views for well logs an three readout panels.
59
-
@@ -1,106 +0,0 @@
1
- // These are important to properly display the component
2
- @import '@equinor/videx-wellog/dist/styles/log-styles.scss';
3
- //@import '@equinor/videx-wellog/dist/styles/loader-styles.scss';
4
- @import '@equinor/videx-wellog/dist/styles/scale-styles.scss';
5
-
6
-
7
- //$scale_slave_scale_bg: #ff0000;
8
-
9
- .welllogview {
10
- // for videx-wellog log-controller
11
- height: inherit;
12
-
13
- .track {
14
- .track-title {
15
- background-color: #ccc;
16
- font-weight: normal;
17
- color: black;
18
- font-family: inherit;
19
- }
20
- }
21
-
22
- .selected {
23
- background-color: rgba(255, 155, 79, 0.1);
24
- }
25
-
26
- .slave-scale {
27
- background-color: rgba(255, 255, 255, 0.0235); // to make track selection background visible
28
- }
29
-
30
- .track-container {
31
- pointer-events: all; // to allow mouse events handling
32
- }
33
-
34
- .overlay {
35
- .depth {
36
- //not work?? position : absolute;
37
- right: 5px;
38
- bottom: 5px;
39
- display: inline-block;
40
-
41
- padding: 2px;
42
- border-radius: 4px;
43
- text-align: right;
44
- background-color: rgba(0, 0, 0, 0.5);
45
- color: white;
46
- }
47
-
48
- .rubber-band {
49
- background-color: rgba(255, 0, 0, 0.1);
50
-
51
- div {
52
- background-color: rgba(255, 0, 0, 0.7);
53
- }
54
- }
55
-
56
- .pinned {
57
- background-color: rgba(0, 0, 0, 0.1);
58
-
59
- div {
60
- background-color: rgba(0, 255, 0, 0.7);
61
- }
62
- }
63
- }
64
-
65
- .title {
66
- color: rgb(0, 0, 0);
67
- background-color: rgb(241, 241, 241);
68
- font-size: 14px;
69
- text-align: center;
70
- }
71
-
72
- .error {
73
- color: rgb(255, 64, 64);
74
- background-color: rgb(255, 255, 192)
75
- }
76
-
77
- .wellpick {
78
- font-size: 9px;
79
- .vertical-text {
80
- writing-mode: vertical-lr;
81
- transform: rotate(180deg);
82
- }
83
- }
84
-
85
- .wellpick-fill {
86
- opacity: 0.3;
87
- }
88
-
89
- .wellpick-pattern {
90
- opacity: 0.57
91
- }
92
- }
93
-
94
-
95
- //
96
- .welllogspacer {
97
- .wellpick {
98
- opacity: 0.9
99
- }
100
- .wellpick-fill {
101
- opacity: 0.3
102
- }
103
- .wellpick-pattern {
104
- opacity: 0.57
105
- }
106
- }
package/dist/package.json DELETED
@@ -1,21 +0,0 @@
1
- {
2
- "name": "@webviz/well-log-viewer",
3
- "version": "0.0.0",
4
- "description": "",
5
- "main": "src/index.ts",
6
- "scripts": {
7
- "transpile": "tsc --project ./tsconfig.json",
8
- "copy-files": "copyfiles package.json dist && copyfiles README.md dist && copyfiles --exclude **/*.{tsx,jsx,js,ts,snap} --up 1 \"src/**/*\" dist/",
9
- "build": "npm run transpile && npm run copy-files"
10
- },
11
- "author": "Equinor <opensource@equinor.com>",
12
- "license": "MPL-2.0",
13
- "dependencies": {
14
- "@emerson-eps/color-tables": "^0.4.57",
15
- "@equinor/videx-wellog": "^0.8.0",
16
- "@mui/material": "^5.13.4",
17
- "@webviz/subsurface-viewer": "*",
18
- "convert-units": "^2.3.4",
19
- "d3": "^7.8.2"
20
- }
21
- }
@@ -1,59 +0,0 @@
1
- import { Meta, Canvas, Story } from '@storybook/addon-docs';
2
-
3
- import imageWellLogViewer from "./WellLogViewer.png"
4
-
5
- <Meta title="WellLogViewer/Overview" />
6
-
7
- # WellLogView examples
8
-
9
- ## Introduction
10
- These stories contain examples of usage of components for visualization of well log data files.
11
- There are two main examples:
12
- [WellLogViewer](?path=/story/welllogviewer-overview--page#welllogviewer-component) wich contains essential parts of typical well log viewer
13
- and [SyncLogViewer](?path=/story/welllogviewer-overview--page#synclogviewer-component) wich contains synchronized views for three different log files.
14
-
15
- ## WellLogView component
16
- [WellLogView](?path=/docs/welllogviewer-components-welllogview--default) is a basic react component to wrap [ViDEx well log](https://github.com/equinor/videx-wellog) library for drawing well log data.
17
-
18
- The component can zoom and pan visible area of tracks by mouse and support selecting of depth interval.
19
-
20
- As input data it accept data files in following formats:
21
- #### Well Log Data Format
22
- The JSON Well Log Format is used in WellLogView component for input Well Log data files.
23
-
24
- It is a modern well log format created in order to overcome the deficiencies of existing formats.
25
- It is based on the JavaScript Object Notation open standard (RFC 8259).
26
- Full description of the format could be found on the site https://jsonwelllogformat.org .
27
-
28
- The file format could be described with a following
29
- [JSON schema](https://github.com/equinor/webviz-subsurface-components/blob/master/react/src/lib/inputSchema/WellLog.json)
30
-
31
- #### Template Format
32
- The JSON file describing content of well log view: what tracks should be displayed and what curves it should contains.
33
-
34
- The file format could be described with a following
35
- [JSON schema](https://github.com/equinor/webviz-subsurface-components/blob/master/react/src/lib/inputSchema/WellLogTemplate.json)
36
-
37
- #### Color Table Format
38
- The JSON file used as a supplement to template file and describe color tables for visualizing different type of log curves.
39
-
40
- See also [@emerson-eps/color-tables](https://github.com/emerson-eps/color-tables) component.
41
-
42
-
43
- ## WellLogViewer component
44
- [A demo component](?path=/story/welllogviewer-demo-welllogviewer--default) to deal with WellLogView component.
45
- It contains WellLogView component surrounded by auxiliary components:
46
- readout panel, axis selector and zoom slider.
47
-
48
- The number and properties of tracks and curves could be interactively edited by corresponding content menus and dialog boxes.
49
-
50
- <img src={imageWellLogViewer} />
51
-
52
- _WellLogViewer component architecture._
53
-
54
- ## SyncLogViewer component
55
- [An example](?path=/story/welllogviewer-demo-synclogviewer--default) for three linked WellLogView components.
56
- It demonstrate how different well log views can be synchronized in such complex programs as well correlation applications.
57
-
58
- The component architecture is similar to WellLogViewer's one but contains three views for well logs an three readout panels.
59
-