@webviz/subsurface-viewer 0.0.2-alpha.7 → 0.0.2-alpha.9
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/SubsurfaceViewer.d.ts +8 -5
- package/dist/SubsurfaceViewer.js +1 -2
- package/dist/SubsurfaceViewer.js.map +1 -1
- package/dist/components/ColorLegend.d.ts +4 -4
- package/dist/components/ColorLegends.d.ts +2 -2
- package/dist/components/DistanceScale.d.ts +1 -1
- package/dist/components/DistanceScale.js.map +1 -1
- package/dist/components/InfoCard.d.ts +1 -1
- package/dist/components/Map.d.ts +22 -7
- package/dist/components/Map.js +2 -2
- package/dist/components/Map.js.map +1 -1
- package/dist/components/StatusIndicator.d.ts +1 -1
- package/dist/components/settings/DrawModeSelector.js.map +1 -1
- package/dist/components/settings/LayerProperty.js.map +1 -1
- package/dist/components/settings/LayerSettingsButton.js.map +1 -1
- package/dist/components/settings/LayersButton.js.map +1 -1
- package/dist/components/settings/NumericInput.d.ts +2 -1
- package/dist/components/settings/NumericInput.js.map +1 -1
- package/dist/components/settings/SliderInput.d.ts +2 -1
- package/dist/components/settings/SliderInput.js.map +1 -1
- package/dist/components/settings/ToggleButton.d.ts +2 -1
- package/dist/components/settings/ToggleButton.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js.map +1 -1
- package/dist/layers/BoxSelectionLayer/boxSelectionLayer.d.ts +5 -4
- package/dist/layers/BoxSelectionLayer/boxSelectionLayer.js.map +1 -1
- package/dist/layers/axes/axesLayer.d.ts +3 -2
- package/dist/layers/axes/axesLayer.js.map +1 -1
- package/dist/layers/axes/boxLayer.d.ts +4 -3
- package/dist/layers/axes/boxLayer.js +1 -1
- package/dist/layers/axes/boxLayer.js.map +1 -1
- package/dist/layers/axes2d/axes2DLayer.d.ts +4 -3
- package/dist/layers/axes2d/axes2DLayer.js.map +1 -1
- package/dist/layers/colormap/colormapLayer.d.ts +7 -6
- package/dist/layers/colormap/colormapLayer.js.map +1 -1
- package/dist/layers/drawing/drawingLayer.d.ts +4 -3
- package/dist/layers/drawing/drawingLayer.js +1 -1
- package/dist/layers/drawing/drawingLayer.js.map +1 -1
- package/dist/layers/fault_polygons/faultPolygonsLayer.d.ts +3 -2
- package/dist/layers/fault_polygons/faultPolygonsLayer.js.map +1 -1
- package/dist/layers/grid3d/grid3dLayer.d.ts +5 -3
- package/dist/layers/grid3d/grid3dLayer.js.map +1 -1
- package/dist/layers/grid3d/privateLayer.d.ts +5 -4
- package/dist/layers/grid3d/privateLayer.js +1 -1
- package/dist/layers/grid3d/privateLayer.js.map +1 -1
- package/dist/layers/grid3d/webworker.d.ts +1 -1
- package/dist/layers/hillshading2d/hillshading2dLayer.d.ts +5 -4
- package/dist/layers/hillshading2d/hillshading2dLayer.js.map +1 -1
- package/dist/layers/index.d.ts +16 -16
- package/dist/layers/intersection/unfoldedGeoJsonLayer.d.ts +2 -2
- package/dist/layers/map/mapLayer.d.ts +5 -3
- package/dist/layers/map/mapLayer.js.map +1 -1
- package/dist/layers/map/privateMapLayer.d.ts +5 -4
- package/dist/layers/map/privateMapLayer.js +1 -1
- package/dist/layers/map/privateMapLayer.js.map +1 -1
- package/dist/layers/map/webworker.d.ts +1 -1
- package/dist/layers/northarrow/northArrow3DLayer.d.ts +4 -3
- package/dist/layers/northarrow/northArrow3DLayer.js +1 -1
- package/dist/layers/northarrow/northArrow3DLayer.js.map +1 -1
- package/dist/layers/piechart/pieChartLayer.d.ts +4 -3
- package/dist/layers/piechart/pieChartLayer.js +2 -2
- package/dist/layers/piechart/pieChartLayer.js.map +1 -1
- package/dist/layers/points/pointsLayer.d.ts +3 -2
- package/dist/layers/points/pointsLayer.js +1 -1
- package/dist/layers/points/pointsLayer.js.map +1 -1
- package/dist/layers/polylines/polylinesLayer.d.ts +3 -2
- package/dist/layers/polylines/polylinesLayer.js +1 -1
- package/dist/layers/polylines/polylinesLayer.js.map +1 -1
- package/dist/layers/selectable_geojson/selectableGeoJsonLayer.d.ts +2 -2
- package/dist/layers/shader_modules/decoder.d.ts +1 -1
- package/dist/layers/terrain/map3DLayer.d.ts +6 -4
- package/dist/layers/terrain/map3DLayer.js.map +1 -1
- package/dist/layers/terrain/terrainMapLayer.d.ts +4 -3
- package/dist/layers/terrain/terrainMapLayer.js +2 -2
- package/dist/layers/terrain/terrainMapLayer.js.map +1 -1
- package/dist/layers/triangle/privateTriangleLayer.d.ts +5 -4
- package/dist/layers/triangle/privateTriangleLayer.js +1 -1
- package/dist/layers/triangle/privateTriangleLayer.js.map +1 -1
- package/dist/layers/triangle/triangleLayer.d.ts +6 -4
- package/dist/layers/triangle/triangleLayer.js.map +1 -1
- package/dist/layers/triangle/webworker.d.ts +1 -1
- package/dist/layers/utils/layerTools.d.ts +4 -4
- package/dist/layers/utils/propertyMapTools.d.ts +1 -1
- package/dist/layers/wells/utils/spline.d.ts +2 -2
- package/dist/layers/wells/utils/spline.js.map +1 -1
- package/dist/layers/wells/wellsLayer.d.ts +7 -6
- package/dist/layers/wells/wellsLayer.js +3 -3
- package/dist/layers/wells/wellsLayer.js.map +1 -1
- package/dist/redux/reducer.d.ts +2 -2
- package/dist/redux/reducer.js +0 -1
- package/dist/redux/reducer.js.map +1 -1
- package/dist/redux/store.d.ts +1 -1
- package/dist/redux/store.js.map +1 -1
- package/dist/utils/measurement.d.ts +1 -1
- package/dist/utils/specExtractor.d.ts +1 -1
- package/dist/views/intersectionView.d.ts +2 -1
- package/dist/views/intersectionView.js.map +1 -1
- package/package.json +50 -48
- package/dist/inputSchema/ColorTables.json +0 -51
- package/dist/inputSchema/FaultPolygons.json +0 -80
- package/dist/inputSchema/Grid.json +0 -39
- package/dist/inputSchema/PieChart.json +0 -72
- package/dist/inputSchema/WellLog.json +0 -126
- package/dist/inputSchema/WellLogTemplate.json +0 -131
- package/dist/inputSchema/WellLogs.json +0 -5
- package/dist/inputSchema/Wells.json +0 -106
- package/dist/inputSchema/schemaValidationUtil.d.ts +0 -5
- package/dist/inputSchema/schemaValidationUtil.js +0 -48
- package/dist/inputSchema/schemaValidationUtil.js.map +0 -1
- package/dist/inputSchema/validator.d.ts +0 -1
- package/dist/inputSchema/validator.js +0 -64
- package/dist/inputSchema/validator.js.map +0 -1
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$comment": "See https://jsonwelllogformat.org",
|
|
3
|
-
"$id": "inputSchema/Grid.json",
|
|
4
|
-
"type": "array",
|
|
5
|
-
"items": { "$ref": "#/definitions/data_row" },
|
|
6
|
-
"definitions": {
|
|
7
|
-
"data_row": {
|
|
8
|
-
"type": "object",
|
|
9
|
-
"required": ["cs", "vs"],
|
|
10
|
-
"properties": {
|
|
11
|
-
"i": {
|
|
12
|
-
"type": "number",
|
|
13
|
-
"description": "Cell i-index, increases toward east."
|
|
14
|
-
},
|
|
15
|
-
"j": {
|
|
16
|
-
"type": "number",
|
|
17
|
-
"description": "Cell j-index, increases towards north."
|
|
18
|
-
},
|
|
19
|
-
"z": { "type": "number", "description": "Cell depth." },
|
|
20
|
-
"cs": {
|
|
21
|
-
"type": "array",
|
|
22
|
-
"description": "Cell corners",
|
|
23
|
-
"items": { "$ref": "#/definitions/cell_corner" },
|
|
24
|
-
"minItems": 3
|
|
25
|
-
},
|
|
26
|
-
"vs": {
|
|
27
|
-
"type": "array",
|
|
28
|
-
"description": "Time dependent cell values.",
|
|
29
|
-
"items": { "type": "number" }
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"cell_corner": {
|
|
34
|
-
"type": "array",
|
|
35
|
-
"items": { "type": "number" },
|
|
36
|
-
"minItems": 3
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$comment": "PieChart data schema",
|
|
3
|
-
"$id": "inputSchema/PieChart.json",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"properties": {
|
|
6
|
-
"pies": {
|
|
7
|
-
"type": "array",
|
|
8
|
-
"items": { "$ref": "#/definitions/pie" }
|
|
9
|
-
},
|
|
10
|
-
"properties": {
|
|
11
|
-
"type": "array",
|
|
12
|
-
"items": { "$ref": "#/definitions/property" }
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"required": ["pies", "properties"],
|
|
16
|
-
"definitions": {
|
|
17
|
-
"pie": {
|
|
18
|
-
"type": "object",
|
|
19
|
-
"properties": {
|
|
20
|
-
"x": {
|
|
21
|
-
"type": "number",
|
|
22
|
-
"description": "Pie chart y-coordinate"
|
|
23
|
-
},
|
|
24
|
-
"y": {
|
|
25
|
-
"type": "number",
|
|
26
|
-
"description": "Pie chart x-coordinate"
|
|
27
|
-
},
|
|
28
|
-
"R": {
|
|
29
|
-
"type": "number",
|
|
30
|
-
"description": "Pie chart radius."
|
|
31
|
-
},
|
|
32
|
-
"fractions": {
|
|
33
|
-
"type": "array",
|
|
34
|
-
"description": "Number and proportion of slices on pie chart.",
|
|
35
|
-
"items": { "$ref": "#/definitions/fraction" }
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
"required": ["x", "y", "R", "fractions"]
|
|
39
|
-
},
|
|
40
|
-
"property": {
|
|
41
|
-
"type": "object",
|
|
42
|
-
"properties": {
|
|
43
|
-
"color": {
|
|
44
|
-
"type": "array",
|
|
45
|
-
"minItems": 3,
|
|
46
|
-
"maxItems": 3,
|
|
47
|
-
"items": { "type": "number" },
|
|
48
|
-
"description": "Pie slice color as RGB array."
|
|
49
|
-
},
|
|
50
|
-
"label": {
|
|
51
|
-
"type": "string",
|
|
52
|
-
"description": "Pie slice name."
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"required": ["color", "label"]
|
|
56
|
-
},
|
|
57
|
-
"fraction": {
|
|
58
|
-
"type": "object",
|
|
59
|
-
"properties": {
|
|
60
|
-
"value": {
|
|
61
|
-
"type": "number",
|
|
62
|
-
"description": "Proportion on pie slice."
|
|
63
|
-
},
|
|
64
|
-
"idx": {
|
|
65
|
-
"type": "number",
|
|
66
|
-
"description": "Pie slice color and label indexed from properties array."
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
"required": ["value", "idx"]
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$comment": "See https://jsonwelllogformat.org",
|
|
3
|
-
"$id": "inputSchema/WellLog.json",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"properties": {
|
|
6
|
-
"header": { "$ref": "#/definitions/header" },
|
|
7
|
-
"curves": {
|
|
8
|
-
"type": "array",
|
|
9
|
-
"items": { "$ref": "#/definitions/curve" }
|
|
10
|
-
},
|
|
11
|
-
"data": {
|
|
12
|
-
"type": "array",
|
|
13
|
-
"items": { "$ref": "#/definitions/data_row" }
|
|
14
|
-
},
|
|
15
|
-
"metadata_discrete": {
|
|
16
|
-
"type": "object"
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"required": ["curves", "data", "header"],
|
|
20
|
-
"definitions": {
|
|
21
|
-
"header": {
|
|
22
|
-
"type": "object",
|
|
23
|
-
"properties": {
|
|
24
|
-
"name": { "type": "string", "description": "Log name" },
|
|
25
|
-
"description": {
|
|
26
|
-
"type": "string",
|
|
27
|
-
"description": "Log description"
|
|
28
|
-
},
|
|
29
|
-
"externalIds": {
|
|
30
|
-
"type": "object",
|
|
31
|
-
"description": "Record<string,string>; IDs within external storage, key being the storage name, and value being the ID."
|
|
32
|
-
},
|
|
33
|
-
"well": { "type": "string", "description": "Well name" },
|
|
34
|
-
"wellbore": {
|
|
35
|
-
"type": "string",
|
|
36
|
-
"description": "wellbore name"
|
|
37
|
-
},
|
|
38
|
-
"field": { "type": "string", "description": "Field name" },
|
|
39
|
-
"country": {
|
|
40
|
-
"type": "string",
|
|
41
|
-
"description": "Country of operation"
|
|
42
|
-
},
|
|
43
|
-
"date": {
|
|
44
|
-
"type": "string",
|
|
45
|
-
"description": "datetime; Logging date"
|
|
46
|
-
},
|
|
47
|
-
"operator": {
|
|
48
|
-
"type": "string",
|
|
49
|
-
"description": "Operator company name"
|
|
50
|
-
},
|
|
51
|
-
"serviceCompany": {
|
|
52
|
-
"type": "string",
|
|
53
|
-
"description": "Service company name"
|
|
54
|
-
},
|
|
55
|
-
"source": {
|
|
56
|
-
"type": "string",
|
|
57
|
-
"description": "Source system or process of this log"
|
|
58
|
-
},
|
|
59
|
-
"runNumber": { "type": "string", "description": "Run number" },
|
|
60
|
-
"elevation": {
|
|
61
|
-
"type": "number",
|
|
62
|
-
"description": "float; Vertical distance between measured depth 0.0 and mean sea level in SI unit (meters)"
|
|
63
|
-
},
|
|
64
|
-
"startIndex": {
|
|
65
|
-
"type": "number",
|
|
66
|
-
"description": "Value of the first index. Unit according to index curve"
|
|
67
|
-
},
|
|
68
|
-
"endIndex": {
|
|
69
|
-
"type": "number",
|
|
70
|
-
"description": "Value of the last index. Unit according to index curve"
|
|
71
|
-
},
|
|
72
|
-
"step": {
|
|
73
|
-
"type": ["number", "null"],
|
|
74
|
-
"description": "Distance between indices if regularly sampled. Unit according to index curve. If log is time based, milliseconds assumed. null if irregular step"
|
|
75
|
-
},
|
|
76
|
-
"dataUri": {
|
|
77
|
-
"type": "string",
|
|
78
|
-
"description": "Point to data source in case this is kept separate. Can be absolute or relative according to the URI specification"
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
"curve": {
|
|
83
|
-
"type": "object",
|
|
84
|
-
"properties": {
|
|
85
|
-
"name": {
|
|
86
|
-
"type": "string",
|
|
87
|
-
"description": "Curve name or mnemonic. Mandatory. Non-null"
|
|
88
|
-
},
|
|
89
|
-
"description": {
|
|
90
|
-
"type": ["string", "null"],
|
|
91
|
-
"description": "Curve description. Optional"
|
|
92
|
-
},
|
|
93
|
-
"quantity": {
|
|
94
|
-
"type": ["string", "null"],
|
|
95
|
-
"description": "Curve quantity such as length, pressure, force etc. Optional"
|
|
96
|
-
},
|
|
97
|
-
"unit": {
|
|
98
|
-
"type": ["string", "null"],
|
|
99
|
-
"description": "Unit of measurement such as m, ft, bar, etc. Optional"
|
|
100
|
-
},
|
|
101
|
-
"valueType": {
|
|
102
|
-
"type": ["string", "null"],
|
|
103
|
-
"description": "Curve value type: float, integer, string, datetime or boolean. Non-null. Optional. float assumed if not present"
|
|
104
|
-
},
|
|
105
|
-
"dimensions": {
|
|
106
|
-
"type": "number",
|
|
107
|
-
"description": "Number of dimensions. [1,>. Non-null. Optional. 1 assumed if not present"
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
"required": ["name"]
|
|
111
|
-
},
|
|
112
|
-
"data_row": {
|
|
113
|
-
"type": "array",
|
|
114
|
-
"items": {
|
|
115
|
-
"anyOf": [
|
|
116
|
-
{ "type": "number" },
|
|
117
|
-
{ "type": "string" },
|
|
118
|
-
{ "type": "null" }
|
|
119
|
-
]
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
"metadata_discrete": {
|
|
123
|
-
"type": "object"
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "object",
|
|
3
|
-
"properties": {
|
|
4
|
-
"name": { "type": "string" },
|
|
5
|
-
"scale": {
|
|
6
|
-
"type": "object",
|
|
7
|
-
"properties": {
|
|
8
|
-
"primary": { "type": "string" },
|
|
9
|
-
"allowSecondary": { "type": "boolean" }
|
|
10
|
-
},
|
|
11
|
-
"required": ["primary"]
|
|
12
|
-
},
|
|
13
|
-
"tracks": {
|
|
14
|
-
"type": "array",
|
|
15
|
-
"items": { "$ref": "#/definitions/track" }
|
|
16
|
-
},
|
|
17
|
-
"styles": {
|
|
18
|
-
"type": "array",
|
|
19
|
-
"items": { "$ref": "#/definitions/style" }
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
"required": ["tracks"],
|
|
23
|
-
"definitions": {
|
|
24
|
-
"domain": {
|
|
25
|
-
"type": "array",
|
|
26
|
-
"minItems": 2,
|
|
27
|
-
"maxItems": 2,
|
|
28
|
-
"items": { "type": "number" }
|
|
29
|
-
},
|
|
30
|
-
"css_color": {
|
|
31
|
-
"type": "string",
|
|
32
|
-
"description": "Any valid CSS color value (named colors, three-digit hex color, six-digit hex color, RGB colors)",
|
|
33
|
-
"examples": [
|
|
34
|
-
"green",
|
|
35
|
-
"#ff8000",
|
|
36
|
-
"rgb(128,33,23)",
|
|
37
|
-
"rgba(128,33,23,0.6)"
|
|
38
|
-
]
|
|
39
|
-
},
|
|
40
|
-
"plot_type": {
|
|
41
|
-
"enum": [
|
|
42
|
-
"line",
|
|
43
|
-
"linestep",
|
|
44
|
-
"dot",
|
|
45
|
-
"area",
|
|
46
|
-
"differential",
|
|
47
|
-
"gradientfill",
|
|
48
|
-
"stacked"
|
|
49
|
-
],
|
|
50
|
-
"default": "line"
|
|
51
|
-
},
|
|
52
|
-
"scale_type": {
|
|
53
|
-
"enum": ["log", "linear"],
|
|
54
|
-
"default": "linear"
|
|
55
|
-
},
|
|
56
|
-
"plot_prop": {
|
|
57
|
-
"type": "object",
|
|
58
|
-
"properties": {
|
|
59
|
-
"scale": { "$ref": "#/definitions/scale_type" },
|
|
60
|
-
"type": { "$ref": "#/definitions/plot_type" },
|
|
61
|
-
"color": { "$ref": "#/definitions/css_color" },
|
|
62
|
-
"inverseColor": { "$ref": "#/definitions/css_color" },
|
|
63
|
-
"fill": { "$ref": "#/definitions/css_color" },
|
|
64
|
-
"fillOpacity": {
|
|
65
|
-
"type": "number",
|
|
66
|
-
"minimum": 0.0,
|
|
67
|
-
"maximum": 1.0,
|
|
68
|
-
"default": 0.25,
|
|
69
|
-
"description": "for 'area' and 'gradientfill' plots"
|
|
70
|
-
},
|
|
71
|
-
"colorTable": {
|
|
72
|
-
"type": "string",
|
|
73
|
-
"description": "table id (name) for 'gradientfill' plot"
|
|
74
|
-
},
|
|
75
|
-
"inverseColorTable": {
|
|
76
|
-
"type": "string",
|
|
77
|
-
"description": "table id (name) for 'gradientfill' plot"
|
|
78
|
-
},
|
|
79
|
-
"colorScale": {
|
|
80
|
-
"$ref": "#/definitions/scale_type",
|
|
81
|
-
"description": "table id (name) for 'gradientfill' plot"
|
|
82
|
-
},
|
|
83
|
-
"inverseColorScale": {
|
|
84
|
-
"$ref": "#/definitions/scale_type",
|
|
85
|
-
"description": "table id (name) for 'gradientfill' plot"
|
|
86
|
-
},
|
|
87
|
-
"color2": {
|
|
88
|
-
"$ref": "#/definitions/css_color",
|
|
89
|
-
"description": "for 'differetial' plot"
|
|
90
|
-
},
|
|
91
|
-
"fill2": {
|
|
92
|
-
"$ref": "#/definitions/css_color",
|
|
93
|
-
"description": "for 'differetial' plot"
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
"plot": {
|
|
98
|
-
"allOf": [{ "$ref": "#/definitions/plot_prop" }],
|
|
99
|
-
"type": "object",
|
|
100
|
-
"properties": {
|
|
101
|
-
"name": { "type": "string" },
|
|
102
|
-
"style": { "type": "string" },
|
|
103
|
-
"scale": { "$ref": "#/definitions/scale_type" },
|
|
104
|
-
"name2": { "type": "string" }
|
|
105
|
-
},
|
|
106
|
-
"required": ["name"]
|
|
107
|
-
},
|
|
108
|
-
"style": {
|
|
109
|
-
"allOf": [{ "$ref": "#/definitions/plot_prop" }],
|
|
110
|
-
"type": "object",
|
|
111
|
-
"properties": {
|
|
112
|
-
"name": { "type": "string" }
|
|
113
|
-
},
|
|
114
|
-
"required": ["name"]
|
|
115
|
-
},
|
|
116
|
-
"track": {
|
|
117
|
-
"type": "object",
|
|
118
|
-
"properties": {
|
|
119
|
-
"title": { "type": "string" },
|
|
120
|
-
"required": { "type": "boolean" },
|
|
121
|
-
"scale": { "$ref": "#/definitions/scale_type" },
|
|
122
|
-
"domain": { "$ref": "#/definitions/domain" },
|
|
123
|
-
"plots": {
|
|
124
|
-
"type": "array",
|
|
125
|
-
"items": { "$ref": "#/definitions/plot" }
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
"required": ["plots"]
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$comment": "Inspired from https://github.com/geojson/schema",
|
|
3
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
-
"$id": "inputSchema/Wells.json",
|
|
5
|
-
"title": "GeoJSON FeatureCollection",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": ["type", "features"],
|
|
8
|
-
"properties": {
|
|
9
|
-
"type": {
|
|
10
|
-
"type": "string",
|
|
11
|
-
"enum": ["FeatureCollection"]
|
|
12
|
-
},
|
|
13
|
-
"features": {
|
|
14
|
-
"type": "array",
|
|
15
|
-
"items": {
|
|
16
|
-
"title": "GeoJSON Feature",
|
|
17
|
-
"type": "object",
|
|
18
|
-
"required": ["type", "properties", "geometry"],
|
|
19
|
-
"properties": {
|
|
20
|
-
"type": {
|
|
21
|
-
"type": "string",
|
|
22
|
-
"enum": ["Feature"]
|
|
23
|
-
},
|
|
24
|
-
"id": {
|
|
25
|
-
"oneOf": [
|
|
26
|
-
{
|
|
27
|
-
"type": "number"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"type": "string"
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
|
-
"properties": {
|
|
35
|
-
"oneOf": [
|
|
36
|
-
{
|
|
37
|
-
"type": "null"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"type": "object"
|
|
41
|
-
}
|
|
42
|
-
]
|
|
43
|
-
},
|
|
44
|
-
"geometry": {
|
|
45
|
-
"title": "GeoJSON GeometryCollection",
|
|
46
|
-
"type": "object",
|
|
47
|
-
"required": ["type", "geometries"],
|
|
48
|
-
"properties": {
|
|
49
|
-
"type": {
|
|
50
|
-
"type": "string",
|
|
51
|
-
"enum": ["GeometryCollection"]
|
|
52
|
-
},
|
|
53
|
-
"geometries": {
|
|
54
|
-
"type": "array",
|
|
55
|
-
"items": {
|
|
56
|
-
"oneOf": [
|
|
57
|
-
{
|
|
58
|
-
"title": "GeoJSON Point",
|
|
59
|
-
"type": "object",
|
|
60
|
-
"required": ["type", "coordinates"],
|
|
61
|
-
"properties": {
|
|
62
|
-
"type": {
|
|
63
|
-
"type": "string",
|
|
64
|
-
"enum": ["Point"]
|
|
65
|
-
},
|
|
66
|
-
"coordinates": {
|
|
67
|
-
"type": "array",
|
|
68
|
-
"minItems": 2,
|
|
69
|
-
"items": {
|
|
70
|
-
"type": "number"
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"title": "GeoJSON LineString",
|
|
77
|
-
"type": "object",
|
|
78
|
-
"required": ["type", "coordinates"],
|
|
79
|
-
"properties": {
|
|
80
|
-
"type": {
|
|
81
|
-
"type": "string",
|
|
82
|
-
"enum": ["LineString"]
|
|
83
|
-
},
|
|
84
|
-
"coordinates": {
|
|
85
|
-
"type": "array",
|
|
86
|
-
"minItems": 2,
|
|
87
|
-
"items": {
|
|
88
|
-
"type": "array",
|
|
89
|
-
"minItems": 2,
|
|
90
|
-
"items": {
|
|
91
|
-
"type": "number"
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
]
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Layer } from "@deck.gl/core/typed";
|
|
2
|
-
import { colorTablesArray } from "@emerson-eps/color-tables/";
|
|
3
|
-
export declare function validateColorTables(colorTables: colorTablesArray): void;
|
|
4
|
-
export declare function validateLayers(layers: Layer[]): void;
|
|
5
|
-
export declare function validateLayer(layer: Layer): void;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { validateSchema } from "./validator";
|
|
2
|
-
export function validateColorTables(colorTables) {
|
|
3
|
-
validateSchema(colorTables, "ColorTables");
|
|
4
|
-
}
|
|
5
|
-
export function validateLayers(layers) {
|
|
6
|
-
layers.forEach((layer) => {
|
|
7
|
-
if (layer.isLoaded) {
|
|
8
|
-
validateLayer(layer);
|
|
9
|
-
try {
|
|
10
|
-
layer.validateProps();
|
|
11
|
-
}
|
|
12
|
-
catch (e) {
|
|
13
|
-
throw `${layer.id}- ${String(e)}`;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
export function validateLayer(layer) {
|
|
19
|
-
switch (layer.id) {
|
|
20
|
-
case "wells-layer":
|
|
21
|
-
validateWellsLayer(layer);
|
|
22
|
-
break;
|
|
23
|
-
case "pie-layer":
|
|
24
|
-
validateSchema(layer.props.data, "PieChart");
|
|
25
|
-
break;
|
|
26
|
-
case "grid-layer":
|
|
27
|
-
validateSchema(layer.props.data, "Grid");
|
|
28
|
-
break;
|
|
29
|
-
case "fault-polygons-layer":
|
|
30
|
-
validateSchema(layer.props.data, "FaultPolygons");
|
|
31
|
-
break;
|
|
32
|
-
default:
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
function validateWellsLayer(wellsLayer) {
|
|
37
|
-
const wells_data = wellsLayer.props.data;
|
|
38
|
-
validateSchema(wells_data, "Wells");
|
|
39
|
-
const logs_data = getLogData(wellsLayer);
|
|
40
|
-
validateSchema(logs_data, "WellLogs");
|
|
41
|
-
}
|
|
42
|
-
function getLogData(wellsLayer) {
|
|
43
|
-
var _a;
|
|
44
|
-
const sub_layers = (_a = wellsLayer.internalState) === null || _a === void 0 ? void 0 : _a.subLayers;
|
|
45
|
-
const log_layer = sub_layers === null || sub_layers === void 0 ? void 0 : sub_layers.find((layer) => layer.id === "wells-layer-log_curve");
|
|
46
|
-
return log_layer === null || log_layer === void 0 ? void 0 : log_layer.props.data;
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=schemaValidationUtil.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schemaValidationUtil.js","sourceRoot":"","sources":["../../src/inputSchema/schemaValidationUtil.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAI7C,MAAM,UAAU,mBAAmB,CAAC,WAA6B;IAC7D,cAAc,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,MAAe;IAC1C,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QACrB,IAAI,KAAK,CAAC,QAAQ,EAAE;YAChB,aAAa,CAAC,KAAK,CAAC,CAAC;YACrB,IAAI;gBACA,KAAK,CAAC,aAAa,EAAE,CAAC;aACzB;YAAC,OAAO,CAAC,EAAE;gBACR,MAAM,GAAG,KAAK,CAAC,EAAE,KAAK,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;aACrC;SACJ;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAAY;IACtC,QAAQ,KAAK,CAAC,EAAE,EAAE;QACd,KAAK,aAAa;YACd,kBAAkB,CAAC,KAAK,CAAC,CAAC;YAC1B,MAAM;QACV,KAAK,WAAW;YACZ,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;YAC7C,MAAM;QACV,KAAK,YAAY;YACb,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YACzC,MAAM;QACV,KAAK,sBAAsB;YACvB,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;YAClD,MAAM;QACV;YACI,OAAO;KACd;AACL,CAAC;AAED,SAAS,kBAAkB,CAAC,UAAiB;IACzC,MAAM,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC;IACzC,cAAc,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAEpC,MAAM,SAAS,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;IACzC,cAAc,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;AAC1C,CAAC;AAED,SAAS,UAAU,CAAC,UAAiB;;IACjC,MAAM,UAAU,GAAG,MAAA,UAAU,CAAC,aAAa,0CAAE,SAAS,CAAC;IACvD,MAAM,SAAS,GAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAC9B,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,uBAAuB,CAClD,CAAC;IACF,OAAO,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,KAAK,CAAC,IAAI,CAAC;AACjC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function validateSchema(data: unknown, schema_type: string): void;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import Ajv from "ajv";
|
|
2
|
-
// schema definations
|
|
3
|
-
import wellsSchema from "./Wells.json";
|
|
4
|
-
import wellLogSchema from "./WellLog.json";
|
|
5
|
-
import wellLogsSchema from "./WellLogs.json";
|
|
6
|
-
import wellLogTemplateSchema from "./WellLogTemplate.json";
|
|
7
|
-
import pieChartSchema from "./PieChart.json";
|
|
8
|
-
import gridSchema from "./Grid.json";
|
|
9
|
-
import faultPolygonsSchema from "./FaultPolygons.json";
|
|
10
|
-
import colorTablesSchema from "./ColorTables.json";
|
|
11
|
-
// Validator function accepts parameter data and schema type to be validated against.
|
|
12
|
-
// Throws error message of failure.
|
|
13
|
-
export function validateSchema(data, schema_type) {
|
|
14
|
-
let validator = null;
|
|
15
|
-
try {
|
|
16
|
-
validator = createSchemaValidator(schema_type);
|
|
17
|
-
}
|
|
18
|
-
catch (e) {
|
|
19
|
-
throw "Wrong JSON schema for " + schema_type + ". " + String(e);
|
|
20
|
-
}
|
|
21
|
-
if (!validator)
|
|
22
|
-
throw "Wrong schema type.";
|
|
23
|
-
validator(data);
|
|
24
|
-
if (validator.errors) {
|
|
25
|
-
throw formatSchemaError(schema_type, validator.errors);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
function createSchemaValidator(schema_type) {
|
|
29
|
-
const ajv = new Ajv({
|
|
30
|
-
schemas: [wellLogSchema], // add list of dependent schemas
|
|
31
|
-
});
|
|
32
|
-
switch (schema_type) {
|
|
33
|
-
case "Wells":
|
|
34
|
-
return ajv.compile(wellsSchema);
|
|
35
|
-
case "WellLog":
|
|
36
|
-
return ajv.compile(wellLogSchema);
|
|
37
|
-
case "WellLogs":
|
|
38
|
-
return ajv.compile(wellLogsSchema);
|
|
39
|
-
case "WellLogTemplate":
|
|
40
|
-
return ajv.compile(wellLogTemplateSchema);
|
|
41
|
-
case "PieChart":
|
|
42
|
-
return ajv.compile(pieChartSchema);
|
|
43
|
-
case "Grid":
|
|
44
|
-
return ajv.compile(gridSchema);
|
|
45
|
-
case "FaultPolygons":
|
|
46
|
-
return ajv.compile(faultPolygonsSchema);
|
|
47
|
-
case "ColorTables":
|
|
48
|
-
return ajv.compile(colorTablesSchema);
|
|
49
|
-
default:
|
|
50
|
-
return null;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
function formatSchemaError(schema_type, errors) {
|
|
54
|
-
let error_text = "";
|
|
55
|
-
if (errors[0]) {
|
|
56
|
-
error_text =
|
|
57
|
-
(errors[0].dataPath ? errors[0].dataPath + ": " : "") +
|
|
58
|
-
errors[0].message;
|
|
59
|
-
}
|
|
60
|
-
else
|
|
61
|
-
error_text = "JSON schema validation failed";
|
|
62
|
-
return `${schema_type}: ${error_text}.`;
|
|
63
|
-
}
|
|
64
|
-
//# sourceMappingURL=validator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validator.js","sourceRoot":"","sources":["../../src/inputSchema/validator.tsx"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AAGtB,qBAAqB;AACrB,OAAO,WAAW,MAAM,cAAc,CAAC;AACvC,OAAO,aAAa,MAAM,gBAAgB,CAAC;AAC3C,OAAO,cAAc,MAAM,iBAAiB,CAAC;AAC7C,OAAO,qBAAqB,MAAM,wBAAwB,CAAC;AAC3D,OAAO,cAAc,MAAM,iBAAiB,CAAC;AAC7C,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,mBAAmB,MAAM,sBAAsB,CAAC;AACvD,OAAO,iBAAiB,MAAM,oBAAoB,CAAC;AAEnD,qFAAqF;AACrF,mCAAmC;AACnC,MAAM,UAAU,cAAc,CAAC,IAAa,EAAE,WAAmB;IAC7D,IAAI,SAAS,GAAqC,IAAI,CAAC;IAEvD,IAAI;QACA,SAAS,GAAG,qBAAqB,CAAC,WAAW,CAAC,CAAC;KAClD;IAAC,OAAO,CAAC,EAAE;QACR,MAAM,wBAAwB,GAAG,WAAW,GAAG,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;KACnE;IAED,IAAI,CAAC,SAAS;QAAE,MAAM,oBAAoB,CAAC;IAE3C,SAAS,CAAC,IAAI,CAAC,CAAC;IAChB,IAAI,SAAS,CAAC,MAAM,EAAE;QAClB,MAAM,iBAAiB,CAAC,WAAW,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;KAC1D;AACL,CAAC;AAED,SAAS,qBAAqB,CAC1B,WAAmB;IAEnB,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC;QAChB,OAAO,EAAE,CAAC,aAAa,CAAC,EAAE,gCAAgC;KAC7D,CAAC,CAAC;IAEH,QAAQ,WAAW,EAAE;QACjB,KAAK,OAAO;YACR,OAAO,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QACpC,KAAK,SAAS;YACV,OAAO,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QACtC,KAAK,UAAU;YACX,OAAO,GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;QACvC,KAAK,iBAAiB;YAClB,OAAO,GAAG,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;QAC9C,KAAK,UAAU;YACX,OAAO,GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;QACvC,KAAK,MAAM;YACP,OAAO,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QACnC,KAAK,eAAe;YAChB,OAAO,GAAG,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;QAC5C,KAAK,aAAa;YACd,OAAO,GAAG,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;QAC1C;YACI,OAAO,IAAI,CAAC;KACnB;AACL,CAAC;AAED,SAAS,iBAAiB,CAAC,WAAmB,EAAE,MAAqB;IACjE,IAAI,UAAU,GAAG,EAAE,CAAC;IAEpB,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE;QACX,UAAU;YACN,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;gBACrD,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;KACzB;;QAAM,UAAU,GAAG,+BAA+B,CAAC;IAEpD,OAAO,GAAG,WAAW,KAAK,UAAU,GAAG,CAAC;AAC5C,CAAC"}
|