@macrostrat/map-interface 1.4.2 → 1.5.1
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/CHANGELOG.md +4 -4
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/map-interface.0108e742.js +24 -0
- package/dist/cjs/map-interface.0108e742.js.map +1 -0
- package/dist/cjs/map-interface.02835ba5.js +46 -0
- package/dist/cjs/map-interface.02835ba5.js.map +1 -0
- package/dist/cjs/map-interface.0f2392a0.css +64 -0
- package/dist/cjs/map-interface.0f2392a0.css.map +1 -0
- package/dist/cjs/map-interface.134ad930.js +129 -0
- package/dist/cjs/map-interface.134ad930.js.map +1 -0
- package/dist/cjs/map-interface.141c7329.js +58 -0
- package/dist/cjs/map-interface.141c7329.js.map +1 -0
- package/dist/cjs/map-interface.1be58b40.css +69 -0
- package/dist/cjs/map-interface.1be58b40.css.map +1 -0
- package/dist/cjs/map-interface.2a32a290.js +98 -0
- package/dist/cjs/map-interface.2a32a290.js.map +1 -0
- package/dist/cjs/map-interface.3f968b46.js +381 -0
- package/dist/cjs/map-interface.3f968b46.js.map +1 -0
- package/dist/cjs/map-interface.4264e7e1.js +73 -0
- package/dist/cjs/map-interface.4264e7e1.js.map +1 -0
- package/dist/cjs/map-interface.5737346f.js +113 -0
- package/dist/cjs/map-interface.5737346f.js.map +1 -0
- package/dist/cjs/map-interface.58c87b08.js +29 -0
- package/dist/cjs/map-interface.58c87b08.js.map +1 -0
- package/dist/cjs/map-interface.71259cf9.css +45 -0
- package/dist/cjs/map-interface.71259cf9.css.map +1 -0
- package/dist/cjs/map-interface.937c0b90.js +60 -0
- package/dist/cjs/map-interface.937c0b90.js.map +1 -0
- package/dist/cjs/map-interface.9893b047.js +38 -0
- package/dist/cjs/map-interface.9893b047.js.map +1 -0
- package/dist/cjs/map-interface.aeb112a6.js +115 -0
- package/dist/cjs/map-interface.aeb112a6.js.map +1 -0
- package/dist/cjs/map-interface.cc9ad5c6.js +194 -0
- package/dist/cjs/map-interface.cc9ad5c6.js.map +1 -0
- package/dist/cjs/map-interface.d8e62b02.js +17 -0
- package/dist/cjs/map-interface.d8e62b02.js.map +1 -0
- package/dist/cjs/map-interface.ee59fc6e.js +32 -0
- package/dist/cjs/map-interface.ee59fc6e.js.map +1 -0
- package/dist/cjs/map-interface.ff2231f5.js +37 -0
- package/dist/cjs/map-interface.ff2231f5.js.map +1 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +3 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/map-interface.0258302d.js +7 -0
- package/dist/esm/map-interface.0258302d.js.map +1 -0
- package/dist/esm/map-interface.17a0e9a0.js +51 -0
- package/dist/esm/map-interface.17a0e9a0.js.map +1 -0
- package/dist/esm/map-interface.2b94a8ad.js +130 -0
- package/dist/esm/map-interface.2b94a8ad.js.map +1 -0
- package/dist/esm/map-interface.36bab86c.js +31 -0
- package/dist/esm/map-interface.36bab86c.js.map +1 -0
- package/dist/esm/map-interface.409f6268.js +34 -0
- package/dist/esm/map-interface.409f6268.js.map +1 -0
- package/dist/esm/map-interface.5d011c2d.js +110 -0
- package/dist/esm/map-interface.5d011c2d.js.map +1 -0
- package/dist/esm/map-interface.6c44beb8.js +49 -0
- package/dist/esm/map-interface.6c44beb8.js.map +1 -0
- package/dist/esm/map-interface.6d7e89e5.js +104 -0
- package/dist/esm/map-interface.6d7e89e5.js.map +1 -0
- package/dist/esm/map-interface.70fdf48a.js +64 -0
- package/dist/esm/map-interface.70fdf48a.js.map +1 -0
- package/dist/esm/map-interface.a0ea0c86.js +18 -0
- package/dist/esm/map-interface.a0ea0c86.js.map +1 -0
- package/dist/esm/map-interface.b965dc94.js +40 -0
- package/dist/esm/map-interface.b965dc94.js.map +1 -0
- package/dist/esm/map-interface.ba171178.js +376 -0
- package/dist/esm/map-interface.ba171178.js.map +1 -0
- package/dist/esm/map-interface.c257cac1.js +188 -0
- package/dist/esm/map-interface.c257cac1.js.map +1 -0
- package/dist/esm/map-interface.ce6edbfa.js +37 -0
- package/dist/esm/map-interface.ce6edbfa.js.map +1 -0
- package/dist/esm/map-interface.d86c2fc5.js +32 -0
- package/dist/esm/map-interface.d86c2fc5.js.map +1 -0
- package/dist/esm/map-interface.f5dccd21.js +92 -0
- package/dist/esm/map-interface.f5dccd21.js.map +1 -0
- package/dist/node/index.js +1 -1
- package/dist/node/index.js.map +1 -1
- package/dist/node/map-interface.01fee32b.js +2 -0
- package/dist/node/map-interface.01fee32b.js.map +1 -0
- package/dist/node/map-interface.0755d245.css +2 -0
- package/dist/node/map-interface.0755d245.css.map +1 -0
- package/dist/node/map-interface.2c94d421.js +2 -0
- package/dist/node/map-interface.2c94d421.js.map +1 -0
- package/dist/node/map-interface.42e8f2ba.js +2 -0
- package/dist/node/map-interface.42e8f2ba.js.map +1 -0
- package/dist/node/map-interface.43014209.js +2 -0
- package/dist/node/map-interface.43014209.js.map +1 -0
- package/dist/node/map-interface.4e422f5e.js +2 -0
- package/dist/node/map-interface.4e422f5e.js.map +1 -0
- package/dist/node/map-interface.55c953be.js +2 -0
- package/dist/node/map-interface.55c953be.js.map +1 -0
- package/dist/node/map-interface.791d22a7.css +2 -0
- package/dist/node/map-interface.791d22a7.css.map +1 -0
- package/dist/node/map-interface.792ebe85.js +2 -0
- package/dist/node/map-interface.792ebe85.js.map +1 -0
- package/dist/node/map-interface.7963263e.js +2 -0
- package/dist/node/map-interface.7963263e.js.map +1 -0
- package/dist/node/map-interface.9072849e.js +2 -0
- package/dist/node/map-interface.9072849e.js.map +1 -0
- package/dist/node/map-interface.bf061b97.js +2 -0
- package/dist/node/map-interface.bf061b97.js.map +1 -0
- package/dist/node/map-interface.c3275c05.js +2 -0
- package/dist/node/map-interface.c3275c05.js.map +1 -0
- package/dist/node/map-interface.ca6e8916.js +2 -0
- package/dist/node/map-interface.ca6e8916.js.map +1 -0
- package/dist/node/map-interface.d430c066.css +2 -0
- package/dist/node/map-interface.d430c066.css.map +1 -0
- package/dist/node/map-interface.dd613f56.js +2 -0
- package/dist/node/map-interface.dd613f56.js.map +1 -0
- package/dist/node/map-interface.ecfe462b.js +2 -0
- package/dist/node/map-interface.ecfe462b.js.map +1 -0
- package/dist/node/map-interface.efc5dd17.js +2 -0
- package/dist/node/map-interface.efc5dd17.js.map +1 -0
- package/dist/node/map-interface.f42969c3.js +2 -0
- package/dist/node/map-interface.f42969c3.js.map +1 -0
- package/package.json +6 -1
- package/src/index.ts +1 -1
- package/src/map-panel/components/info-drawer/index.ts +1 -3
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
var $dd32e7ae54443412$exports = require("./map-interface.2a32a290.js");
|
|
2
|
+
require("./map-interface.1be58b40.css");
|
|
3
|
+
var $f2e0b9e87d965c31$exports = require("./map-interface.9893b047.js");
|
|
4
|
+
var $7j411$macrostrathyper = require("@macrostrat/hyper");
|
|
5
|
+
var $7j411$macrostratmapinterface = require("@macrostrat/map-interface");
|
|
6
|
+
var $7j411$visxscale = require("@visx/scale");
|
|
7
|
+
var $7j411$visxaxis = require("@visx/axis");
|
|
8
|
+
var $7j411$chromajs = require("chroma-js");
|
|
9
|
+
var $7j411$macrostratdatacomponents = require("@macrostrat/data-components");
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
function $parcel$interopDefault(a) {
|
|
13
|
+
return a && a.__esModule ? a.default : a;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function $parcel$export(e, n, v, s) {
|
|
17
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
$parcel$export(module.exports, "MacrostratLinkedData", () => $8569970142f4fcfc$export$fa9d8c2f420ac2bd);
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
const $8569970142f4fcfc$var$h = (0, ($parcel$interopDefault($7j411$macrostrathyper))).styled((0, ($parcel$interopDefault($f2e0b9e87d965c31$exports))));
|
|
30
|
+
function $8569970142f4fcfc$export$fa9d8c2f420ac2bd(props) {
|
|
31
|
+
const { mapInfo: mapInfo, bedrockMatchExpanded: bedrockMatchExpanded, source: source } = props;
|
|
32
|
+
if (!mapInfo.mapData[0]) return $8569970142f4fcfc$var$h("div");
|
|
33
|
+
return $8569970142f4fcfc$var$h((0, $7j411$macrostratmapinterface.ExpansionPanel), {
|
|
34
|
+
className: "regional-panel",
|
|
35
|
+
title: "Macrostrat-linked data",
|
|
36
|
+
helpText: "via Macrostrat",
|
|
37
|
+
expanded: bedrockMatchExpanded
|
|
38
|
+
}, [
|
|
39
|
+
$8569970142f4fcfc$var$h("div", {
|
|
40
|
+
classes: $8569970142f4fcfc$var$expansionPanelDetailClasses
|
|
41
|
+
}, [
|
|
42
|
+
$8569970142f4fcfc$var$h($8569970142f4fcfc$var$MatchBasis, {
|
|
43
|
+
source: source
|
|
44
|
+
}),
|
|
45
|
+
$8569970142f4fcfc$var$h($8569970142f4fcfc$var$AgeInformation, {
|
|
46
|
+
mapInfo: mapInfo,
|
|
47
|
+
source: source
|
|
48
|
+
}),
|
|
49
|
+
$8569970142f4fcfc$var$h($8569970142f4fcfc$var$Thickness, {
|
|
50
|
+
source: source
|
|
51
|
+
}),
|
|
52
|
+
$8569970142f4fcfc$var$h($8569970142f4fcfc$var$MinorFossilCollections, {
|
|
53
|
+
source: source
|
|
54
|
+
}),
|
|
55
|
+
$8569970142f4fcfc$var$h($8569970142f4fcfc$var$FossilOccs, {
|
|
56
|
+
source: source
|
|
57
|
+
}),
|
|
58
|
+
$8569970142f4fcfc$var$h($8569970142f4fcfc$var$LithsAndClasses, {
|
|
59
|
+
source: source
|
|
60
|
+
}),
|
|
61
|
+
$8569970142f4fcfc$var$h($8569970142f4fcfc$var$Environments, {
|
|
62
|
+
source: source
|
|
63
|
+
}),
|
|
64
|
+
$8569970142f4fcfc$var$h($8569970142f4fcfc$var$Economy, {
|
|
65
|
+
source: source
|
|
66
|
+
})
|
|
67
|
+
])
|
|
68
|
+
]);
|
|
69
|
+
}
|
|
70
|
+
const $8569970142f4fcfc$var$expansionPanelDetailClasses = {
|
|
71
|
+
root: "expansion-panel-detail"
|
|
72
|
+
};
|
|
73
|
+
function $8569970142f4fcfc$var$AgeInformation(props) {
|
|
74
|
+
const { source: source, mapInfo: mapInfo } = props;
|
|
75
|
+
const { macrostrat: macrostrat } = source;
|
|
76
|
+
if (!macrostrat?.b_age) return $8569970142f4fcfc$var$h($8569970142f4fcfc$var$MapAgeRenderer, {
|
|
77
|
+
mapInfo: mapInfo
|
|
78
|
+
});
|
|
79
|
+
return $8569970142f4fcfc$var$h($8569970142f4fcfc$var$MacrostratAgeInfo, {
|
|
80
|
+
macrostrat: macrostrat,
|
|
81
|
+
mapInfo: mapInfo
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
function $8569970142f4fcfc$var$MapAgeRenderer(props) {
|
|
85
|
+
const { mapInfo: mapInfo, ...rest } = props;
|
|
86
|
+
return $8569970142f4fcfc$var$h($8569970142f4fcfc$var$DescribedAgeInfo, {
|
|
87
|
+
ageElement: $8569970142f4fcfc$var$h((0, $dd32e7ae54443412$exports.AgeChip), {
|
|
88
|
+
b_int: mapInfo.mapData[0].b_int,
|
|
89
|
+
t_int: mapInfo.mapData[0].t_int
|
|
90
|
+
})
|
|
91
|
+
}, "Based on geologic map description.");
|
|
92
|
+
}
|
|
93
|
+
function $8569970142f4fcfc$var$DescribedAgeInfo(props) {
|
|
94
|
+
const { ageElement: ageElement, children: children, className: className } = props;
|
|
95
|
+
return $8569970142f4fcfc$var$h("div.described-age.macrostrast-detail", [
|
|
96
|
+
$8569970142f4fcfc$var$h("div.expansion-summary-title", "Age"),
|
|
97
|
+
$8569970142f4fcfc$var$h("div.age-chips", null, ageElement),
|
|
98
|
+
$8569970142f4fcfc$var$h("div.description", children)
|
|
99
|
+
]);
|
|
100
|
+
}
|
|
101
|
+
function $8569970142f4fcfc$var$AgeRefinementBar({ scale: scale, data: data, color: color, label: label = null }) {
|
|
102
|
+
const { b_int: b_int, t_int: t_int } = data;
|
|
103
|
+
const b_age = data.b_age ?? b_int.b_age;
|
|
104
|
+
const t_age = data.t_age ?? t_int.t_age;
|
|
105
|
+
const backgroundColor = color ?? b_int.color;
|
|
106
|
+
const accentColor = (0, ($parcel$interopDefault($7j411$chromajs)))(backgroundColor).darken(0.5).hex();
|
|
107
|
+
const labelColor = (0, ($parcel$interopDefault($7j411$chromajs)))(backgroundColor).darken(2).hex();
|
|
108
|
+
const left = scale(b_age);
|
|
109
|
+
const width = scale(t_age) - scale(b_age);
|
|
110
|
+
let labelTranslate = 5;
|
|
111
|
+
let textAlign = "start";
|
|
112
|
+
// Adjust label placement
|
|
113
|
+
if (width < 100) {
|
|
114
|
+
if (left < 100) labelTranslate = width + 5;
|
|
115
|
+
else {
|
|
116
|
+
labelTranslate = -305;
|
|
117
|
+
textAlign = "end";
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return $8569970142f4fcfc$var$h("div.age-refinement-bar", {
|
|
121
|
+
style: {
|
|
122
|
+
marginLeft: `${left}px`,
|
|
123
|
+
width: `${width}px`,
|
|
124
|
+
height: "18px",
|
|
125
|
+
backgroundColor: backgroundColor,
|
|
126
|
+
border: `2px solid ${accentColor}`,
|
|
127
|
+
position: "relative"
|
|
128
|
+
}
|
|
129
|
+
}, $8569970142f4fcfc$var$h("div.age-refinement-bar-label", {
|
|
130
|
+
style: {
|
|
131
|
+
transform: `translateX(${labelTranslate}px)`,
|
|
132
|
+
color: labelColor,
|
|
133
|
+
fontSize: "10px",
|
|
134
|
+
width: 300,
|
|
135
|
+
textAlign: textAlign
|
|
136
|
+
}
|
|
137
|
+
}, label));
|
|
138
|
+
}
|
|
139
|
+
function $8569970142f4fcfc$var$AgeRefinementPlot({ macrostrat: macrostrat, mapInfo: mapInfo }) {
|
|
140
|
+
// Plot the amount by which the age was refined
|
|
141
|
+
const mapData = mapInfo.mapData[0];
|
|
142
|
+
const b_age = Math.max(mapData.b_int.b_age, macrostrat.b_age);
|
|
143
|
+
const t_age = Math.min(mapData.t_int.t_age, macrostrat.t_age);
|
|
144
|
+
const scale = (0, $7j411$visxscale.scaleLinear)({
|
|
145
|
+
domain: [
|
|
146
|
+
1.02 * b_age,
|
|
147
|
+
t_age * 0.98
|
|
148
|
+
],
|
|
149
|
+
range: [
|
|
150
|
+
20,
|
|
151
|
+
360
|
|
152
|
+
]
|
|
153
|
+
});
|
|
154
|
+
// use visx to plot the age refinement
|
|
155
|
+
return $8569970142f4fcfc$var$h("div.age-refinement-plot", [
|
|
156
|
+
$8569970142f4fcfc$var$h($8569970142f4fcfc$var$AgeRefinementBar, {
|
|
157
|
+
scale: scale,
|
|
158
|
+
data: macrostrat,
|
|
159
|
+
label: "Macrostrat age model"
|
|
160
|
+
}),
|
|
161
|
+
$8569970142f4fcfc$var$h($8569970142f4fcfc$var$AgeRefinementBar, {
|
|
162
|
+
scale: scale,
|
|
163
|
+
data: mapData,
|
|
164
|
+
label: "Map legend"
|
|
165
|
+
}),
|
|
166
|
+
// Age axis
|
|
167
|
+
$8569970142f4fcfc$var$h("svg", {
|
|
168
|
+
width: "100%",
|
|
169
|
+
height: "40px"
|
|
170
|
+
}, [
|
|
171
|
+
$8569970142f4fcfc$var$h((0, $7j411$visxaxis.AxisBottom), {
|
|
172
|
+
scale: scale,
|
|
173
|
+
numTicks: 5,
|
|
174
|
+
top: 1,
|
|
175
|
+
left: 0,
|
|
176
|
+
label: "Age (Ma)"
|
|
177
|
+
})
|
|
178
|
+
])
|
|
179
|
+
]);
|
|
180
|
+
}
|
|
181
|
+
function $8569970142f4fcfc$var$MacrostratAgeInfoCore({ macrostrat: macrostrat }) {
|
|
182
|
+
const { b_age: b_age, t_age: t_age, b_int: b_int, t_int: t_int } = macrostrat;
|
|
183
|
+
if (!b_age) return null;
|
|
184
|
+
let age = b_int.int_name;
|
|
185
|
+
if (b_int.int_id !== t_int.int_id) age += ` - ${t_int.int_name}`;
|
|
186
|
+
return $8569970142f4fcfc$var$h($8569970142f4fcfc$var$DescribedAgeInfo, {
|
|
187
|
+
ageElement: $8569970142f4fcfc$var$h((0, $dd32e7ae54443412$exports.AgeChip), {
|
|
188
|
+
b_int: {
|
|
189
|
+
...b_int,
|
|
190
|
+
int_name: age,
|
|
191
|
+
b_age: b_age,
|
|
192
|
+
t_age: t_age
|
|
193
|
+
},
|
|
194
|
+
t_int: {
|
|
195
|
+
...b_int,
|
|
196
|
+
int_name: age,
|
|
197
|
+
b_age: b_age,
|
|
198
|
+
t_age: t_age
|
|
199
|
+
}
|
|
200
|
+
})
|
|
201
|
+
}, "Refined using the Macrostrat age model.");
|
|
202
|
+
}
|
|
203
|
+
function $8569970142f4fcfc$var$MacrostratAgeInfo(props) {
|
|
204
|
+
return $8569970142f4fcfc$var$h((0, $7j411$macrostratmapinterface.ExpandableDetailsPanel), {
|
|
205
|
+
headerElement: $8569970142f4fcfc$var$h($8569970142f4fcfc$var$MacrostratAgeInfoCore, props)
|
|
206
|
+
}, $8569970142f4fcfc$var$h((0, $7j411$macrostratmapinterface.ExpansionBody), {
|
|
207
|
+
title: "Age refinement"
|
|
208
|
+
}, $8569970142f4fcfc$var$h($8569970142f4fcfc$var$AgeRefinementPlot, props)));
|
|
209
|
+
}
|
|
210
|
+
function $8569970142f4fcfc$var$MatchBasis(props) {
|
|
211
|
+
const { source: source } = props;
|
|
212
|
+
if (!source.macrostrat?.strat_names) return null;
|
|
213
|
+
return $8569970142f4fcfc$var$h((0, $7j411$macrostratmapinterface.ExpandableDetailsPanel), {
|
|
214
|
+
className: "macrostrat-unit",
|
|
215
|
+
headerElement: $8569970142f4fcfc$var$h([
|
|
216
|
+
$8569970142f4fcfc$var$h("h3", source.macrostrat.strat_names[0].rank_name),
|
|
217
|
+
$8569970142f4fcfc$var$h("div.description", "Matched stratigraphic unit")
|
|
218
|
+
])
|
|
219
|
+
}, $8569970142f4fcfc$var$h((0, $7j411$macrostratmapinterface.ExpansionBody), {
|
|
220
|
+
title: "All matched names"
|
|
221
|
+
}, [
|
|
222
|
+
source.macrostrat.strat_names.map((name, i)=>{
|
|
223
|
+
let lastElement = i == source.macrostrat.strat_names.length - 1;
|
|
224
|
+
return $8569970142f4fcfc$var$h("span", {
|
|
225
|
+
key: i
|
|
226
|
+
}, [
|
|
227
|
+
$8569970142f4fcfc$var$h("a.externalLink", {
|
|
228
|
+
href: "/lex/strat-names/" + name.strat_name_id,
|
|
229
|
+
key: i
|
|
230
|
+
}, [
|
|
231
|
+
name.rank_name
|
|
232
|
+
]),
|
|
233
|
+
$8569970142f4fcfc$var$h.if(!lastElement)([
|
|
234
|
+
", "
|
|
235
|
+
])
|
|
236
|
+
]);
|
|
237
|
+
})
|
|
238
|
+
]));
|
|
239
|
+
}
|
|
240
|
+
function $8569970142f4fcfc$var$Thickness(props) {
|
|
241
|
+
const { source: source } = props;
|
|
242
|
+
if (!source.macrostrat.max_thick) return $8569970142f4fcfc$var$h("div");
|
|
243
|
+
return $8569970142f4fcfc$var$h.if(source.macrostrat && source.macrostrat.max_thick)("div.macrostrat-detail", [
|
|
244
|
+
$8569970142f4fcfc$var$h("div.expansion-summary-title", "Thickness"),
|
|
245
|
+
$8569970142f4fcfc$var$h("div", [
|
|
246
|
+
source.macrostrat.min_min_thick,
|
|
247
|
+
" - ",
|
|
248
|
+
source.macrostrat.max_thick,
|
|
249
|
+
"m"
|
|
250
|
+
])
|
|
251
|
+
]);
|
|
252
|
+
}
|
|
253
|
+
function $8569970142f4fcfc$var$MinorFossilCollections(props) {
|
|
254
|
+
const { source: source } = props;
|
|
255
|
+
const { macrostrat: macrostrat } = source;
|
|
256
|
+
if (!macrostrat.pbdb_collections) return $8569970142f4fcfc$var$h("div");
|
|
257
|
+
return $8569970142f4fcfc$var$h.if(macrostrat && macrostrat.pbdb_collections)("div.macrostrat-detail", [
|
|
258
|
+
$8569970142f4fcfc$var$h("div.expansion-summary-title", "Fossil collections"),
|
|
259
|
+
$8569970142f4fcfc$var$h("div", [
|
|
260
|
+
macrostrat.pbdb_collections
|
|
261
|
+
])
|
|
262
|
+
]);
|
|
263
|
+
}
|
|
264
|
+
function $8569970142f4fcfc$var$FossilOccs(props) {
|
|
265
|
+
const { source: source } = props;
|
|
266
|
+
const { macrostrat: macrostrat } = source;
|
|
267
|
+
if (!macrostrat?.pbdb_occs) return null;
|
|
268
|
+
return $8569970142f4fcfc$var$h("div.macrostrat-detail", [
|
|
269
|
+
$8569970142f4fcfc$var$h("div.expansion-summary-title", "Fossil occurrences"),
|
|
270
|
+
$8569970142f4fcfc$var$h("div", [
|
|
271
|
+
macrostrat.pbdb_occs
|
|
272
|
+
])
|
|
273
|
+
]);
|
|
274
|
+
}
|
|
275
|
+
function $8569970142f4fcfc$var$LithTypes(props) {
|
|
276
|
+
const { lith_types: lith_types } = props;
|
|
277
|
+
return $8569970142f4fcfc$var$h.if(lith_types && lith_types.length > 0)("div.lithologies.lithology-types", [
|
|
278
|
+
$8569970142f4fcfc$var$h((0, $7j411$macrostratdatacomponents.LithologyList), {
|
|
279
|
+
lithologies: lith_types
|
|
280
|
+
})
|
|
281
|
+
]);
|
|
282
|
+
}
|
|
283
|
+
function $8569970142f4fcfc$var$LithsAndClasses(props) {
|
|
284
|
+
const { source: source } = props;
|
|
285
|
+
const { macrostrat: macrostrat } = source;
|
|
286
|
+
const { liths: liths = null, lith_types: lith_types = null } = macrostrat;
|
|
287
|
+
if (!liths || liths.length == 0) return null;
|
|
288
|
+
const lithologies = liths.map((lith)=>{
|
|
289
|
+
return {
|
|
290
|
+
...lith,
|
|
291
|
+
name: lith.lith,
|
|
292
|
+
color: lith.color || "#000000"
|
|
293
|
+
};
|
|
294
|
+
});
|
|
295
|
+
return $8569970142f4fcfc$var$h((0, $7j411$macrostratmapinterface.ExpandableDetailsPanel), {
|
|
296
|
+
title: "Lithology",
|
|
297
|
+
value: $8569970142f4fcfc$var$h($8569970142f4fcfc$var$LithTypes, {
|
|
298
|
+
lith_types: lith_types
|
|
299
|
+
})
|
|
300
|
+
}, $8569970142f4fcfc$var$h((0, $7j411$macrostratmapinterface.ExpansionBody), {
|
|
301
|
+
title: "Matched lithologies"
|
|
302
|
+
}, [
|
|
303
|
+
$8569970142f4fcfc$var$h((0, $7j411$macrostratdatacomponents.LithologyList), {
|
|
304
|
+
lithologies: lithologies,
|
|
305
|
+
onClickItem: (e, lith)=>{
|
|
306
|
+
window.open("/lex/lithology/" + lith.lith_id, "_self");
|
|
307
|
+
}
|
|
308
|
+
})
|
|
309
|
+
]));
|
|
310
|
+
}
|
|
311
|
+
function $8569970142f4fcfc$var$EnvironTypes(props) {
|
|
312
|
+
const { environ_types: environ_types } = props;
|
|
313
|
+
return $8569970142f4fcfc$var$h.if(environ_types && environ_types.length > 0)((0, $7j411$macrostratdatacomponents.LithologyList), {
|
|
314
|
+
lithologies: environ_types?.filter((e)=>e.name != "")
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
function $8569970142f4fcfc$var$Environments(props) {
|
|
318
|
+
const { source: source } = props;
|
|
319
|
+
const { macrostrat: macrostrat } = source;
|
|
320
|
+
const { environs: environs = null, environ_types: environ_types = null } = macrostrat;
|
|
321
|
+
if (!environs || environs.length == 0) return null;
|
|
322
|
+
const lithologies = environs.map((environ)=>{
|
|
323
|
+
return {
|
|
324
|
+
...environ,
|
|
325
|
+
name: environ.environ,
|
|
326
|
+
color: environ.color || "#000000"
|
|
327
|
+
};
|
|
328
|
+
});
|
|
329
|
+
return $8569970142f4fcfc$var$h((0, $7j411$macrostratmapinterface.ExpandableDetailsPanel), {
|
|
330
|
+
title: "Environment",
|
|
331
|
+
value: $8569970142f4fcfc$var$h($8569970142f4fcfc$var$EnvironTypes, {
|
|
332
|
+
environ_types: environ_types
|
|
333
|
+
})
|
|
334
|
+
}, $8569970142f4fcfc$var$h((0, $7j411$macrostratmapinterface.ExpansionBody), {
|
|
335
|
+
title: "Matched environments"
|
|
336
|
+
}, [
|
|
337
|
+
$8569970142f4fcfc$var$h((0, $7j411$macrostratdatacomponents.LithologyList), {
|
|
338
|
+
lithologies: lithologies,
|
|
339
|
+
onClickItem: (e, environ)=>{
|
|
340
|
+
window.open("/lex/environments/" + environ.environ_id, "_self");
|
|
341
|
+
}
|
|
342
|
+
})
|
|
343
|
+
]));
|
|
344
|
+
}
|
|
345
|
+
function $8569970142f4fcfc$var$EconType(props) {
|
|
346
|
+
const { econ_types: econ_types } = props;
|
|
347
|
+
return $8569970142f4fcfc$var$h.if(econ_types && econ_types.length > 0)("div", [
|
|
348
|
+
econ_types.map((econClass, i)=>{
|
|
349
|
+
return $8569970142f4fcfc$var$h((0, $dd32e7ae54443412$exports.AttrChip), {
|
|
350
|
+
key: i,
|
|
351
|
+
name: econClass.name,
|
|
352
|
+
color: econClass.color
|
|
353
|
+
});
|
|
354
|
+
})
|
|
355
|
+
]);
|
|
356
|
+
}
|
|
357
|
+
function $8569970142f4fcfc$var$Economy(props) {
|
|
358
|
+
const { source: source } = props;
|
|
359
|
+
const { macrostrat: macrostrat } = source;
|
|
360
|
+
const { econs: econs = null, econ_types: econ_types = null } = macrostrat;
|
|
361
|
+
if (!econs) return $8569970142f4fcfc$var$h("div");
|
|
362
|
+
return $8569970142f4fcfc$var$h.if(econs && econs.length > 0)((0, $7j411$macrostratmapinterface.ExpandableDetailsPanel), {
|
|
363
|
+
title: "Economy ",
|
|
364
|
+
value: $8569970142f4fcfc$var$h($8569970142f4fcfc$var$EconType, {
|
|
365
|
+
econ_types: econ_types
|
|
366
|
+
})
|
|
367
|
+
}, $8569970142f4fcfc$var$h((0, $7j411$macrostratmapinterface.ExpansionBody), {
|
|
368
|
+
title: "Matched economic attributes"
|
|
369
|
+
}, [
|
|
370
|
+
econs.map((econ, i)=>{
|
|
371
|
+
return $8569970142f4fcfc$var$h((0, $dd32e7ae54443412$exports.AttrChip), {
|
|
372
|
+
key: i,
|
|
373
|
+
name: econ.econ,
|
|
374
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O;QACtD,WAAW,GAAG,CAAC,CAAC,WAAW;YACzB,OAAO,wBAAE,CAAA,GAAA,kCAAO,GAAG;gBACjB,KAAK;gBACL,MAAM,UAAU,IAAI;gBACpB,OAAO,UAAU,KAAK;YACxB;QACF;KACD;AACH;AAEA,SAAS,8BAAQ,KAAK;IACpB,MAAM,UAAE,MAAM,EAAE,GAAG;IACnB,MAAM,cAAE,UAAU,EAAE,GAAG;IACvB,MAAM,SAAE,QAAQ,kBAAM,aAAa,MAAM,GAAG;IAC5C,IAAI,CAAC,OAAO,OAAO,wBAAE;IAErB,OAAO,wBAAE,EAAE,CAAC,SAAS,MAAM,MAAM,GAAG,GAClC,CAAA,GAAA,oDAAqB,GACrB;QACE,OAAO;QACP,OAAO,wBAAE,gCAAU;wBAAE;QAAW;IAClC,GACA,wBAAE,CAAA,GAAA,2CAAY,GAAG;QAAE,OAAO;IAA8B,GAAG;QACzD,MAAM,GAAG,CAAC,CAAC,MAAM;YACf,OAAO,wBAAE,CAAA,GAAA,kCAAO,GAAG;gBACjB,KAAK;gBACL,MAAM,KAAK,IAAI;gBACf,OAAO,KAAK,KAAK;YACnB;QACF;KACD;AAEL","sources":["packages/map-interface/src/map-panel/components/info-drawer/macrostrat-linked.ts"],"sourcesContent":["import hyper from \"@macrostrat/hyper\";\nimport { AgeChip, AttrChip } from \"../info-blocks\";\nimport {\n ExpansionPanel,\n ExpandableDetailsPanel,\n ExpansionBody,\n} from \"@macrostrat/map-interface\";\nimport styles from \"./main.module.styl\";\nimport { scaleLinear } from \"@visx/scale\";\nimport { AxisBottom } from \"@visx/axis\";\nimport chroma from \"chroma-js\";\nimport { LithologyList } from \"@macrostrat/data-components\";\n\nconst h = hyper.styled(styles);\n\nfunction MacrostratLinkedData(props) {\n const { mapInfo, bedrockMatchExpanded, source } = props;\n\n if (!mapInfo.mapData[0]) return h(\"div\");\n\n return h(\n ExpansionPanel,\n {\n className: \"regional-panel\",\n title: \"Macrostrat-linked data\",\n helpText: \"via Macrostrat\",\n expanded: bedrockMatchExpanded,\n },\n [\n h(\"div\", { classes: expansionPanelDetailClasses }, [\n h(MatchBasis, { source }),\n h(AgeInformation, { mapInfo, source }),\n h(Thickness, { source }),\n h(MinorFossilCollections, { source }),\n h(FossilOccs, { source }),\n h(LithsAndClasses, { source }),\n h(Environments, { source }),\n h(Economy, { source }),\n ]),\n ],\n );\n}\n\nconst expansionPanelDetailClasses = {\n root: \"expansion-panel-detail\",\n};\n\nfunction AgeInformation(props) {\n const { source, mapInfo } = props;\n const { macrostrat } = source;\n\n if (!macrostrat?.b_age) return h(MapAgeRenderer, { mapInfo });\n\n return h(MacrostratAgeInfo, { macrostrat, mapInfo });\n}\n\nfunction MapAgeRenderer(props) {\n const { mapInfo, ...rest } = props;\n return h(\n DescribedAgeInfo,\n {\n ageElement: h(AgeChip, {\n b_int: mapInfo.mapData[0].b_int,\n t_int: mapInfo.mapData[0].t_int,\n }),\n },\n \"Based on geologic map description.\",\n );\n}\n\nfunction DescribedAgeInfo(props) {\n const { ageElement, children, className } = props;\n\n return h(\"div.described-age.macrostrast-detail\", [\n h(\"div.expansion-summary-title\", \"Age\"),\n h(\"div.age-chips\", null, ageElement),\n h(\"div.description\", children),\n ]);\n}\n\nfunction AgeRefinementBar({ scale, data, color, label = null }) {\n const { b_int, t_int } = data;\n const b_age = data.b_age ?? b_int.b_age;\n const t_age = data.t_age ?? t_int.t_age;\n const backgroundColor = color ?? b_int.color;\n const accentColor = chroma(backgroundColor).darken(0.5).hex();\n const labelColor = chroma(backgroundColor).darken(2).hex();\n\n const left = scale(b_age);\n const width = scale(t_age) - scale(b_age);\n\n let labelTranslate = 5;\n let textAlign = \"start\";\n\n // Adjust label placement\n\n if (width < 100) {\n if (left < 100) {\n labelTranslate = width + 5;\n } else {\n labelTranslate = -305;\n textAlign = \"end\";\n }\n }\n\n return h(\n \"div.age-refinement-bar\",\n {\n style: {\n marginLeft: `${left}px`,\n width: `${width}px`,\n height: \"18px\",\n backgroundColor,\n border: `2px solid ${accentColor}`,\n position: \"relative\",\n },\n },\n h(\n \"div.age-refinement-bar-label\",\n {\n style: {\n transform: `translateX(${labelTranslate}px)`,\n color: labelColor,\n fontSize: \"10px\",\n width: 300,\n textAlign,\n },\n },\n label,\n ),\n );\n}\n\nfunction AgeRefinementPlot({ macrostrat, mapInfo }) {\n // Plot the amount by which the age was refined\n\n const mapData = mapInfo.mapData[0];\n const b_age = Math.max(mapData.b_int.b_age, macrostrat.b_age);\n const t_age = Math.min(mapData.t_int.t_age, macrostrat.t_age);\n\n const scale = scaleLinear({\n domain: [1.02 * b_age, t_age * 0.98],\n range: [20, 360],\n });\n\n // use visx to plot the age refinement\n return h(\"div.age-refinement-plot\", [\n h(AgeRefinementBar, {\n scale,\n data: macrostrat,\n label: \"Macrostrat age model\",\n }),\n h(AgeRefinementBar, {\n scale,\n data: mapData,\n label: \"Map legend\",\n }),\n // Age axis\n h(\"svg\", { width: \"100%\", height: \"40px\" }, [\n h(AxisBottom, {\n scale,\n numTicks: 5,\n top: 1,\n left: 0,\n label: \"Age (Ma)\",\n }),\n ]),\n ]);\n}\n\nfunction MacrostratAgeInfoCore({ macrostrat }) {\n const { b_age, t_age, b_int, t_int } = macrostrat;\n\n if (!b_age) return null;\n\n let age = b_int.int_name;\n if (b_int.int_id !== t_int.int_id) {\n age += ` - ${t_int.int_name}`;\n }\n return h(\n DescribedAgeInfo,\n {\n ageElement: h(AgeChip, {\n b_int: { ...b_int, int_name: age, b_age, t_age },\n t_int: { ...b_int, int_name: age, b_age, t_age },\n }),\n },\n \"Refined using the Macrostrat age model.\",\n );\n}\n\nfunction MacrostratAgeInfo(props) {\n return h(\n ExpandableDetailsPanel,\n { headerElement: h(MacrostratAgeInfoCore, props) },\n h(ExpansionBody, { title: \"Age refinement\" }, h(AgeRefinementPlot, props)),\n );\n}\n\nfunction MatchBasis(props) {\n const { source } = props;\n if (!source.macrostrat?.strat_names) return null;\n\n return h(\n ExpandableDetailsPanel,\n {\n className: \"macrostrat-unit\",\n headerElement: h([\n h(\"h3\", source.macrostrat.strat_names[0].rank_name),\n h(\"div.description\", \"Matched stratigraphic unit\"),\n ]),\n },\n h(ExpansionBody, { title: \"All matched names\" }, [\n source.macrostrat.strat_names.map((name, i) => {\n let lastElement: boolean =\n i == source.macrostrat.strat_names.length - 1;\n return h(\"span\", { key: i }, [\n h(\n \"a.externalLink\",\n {\n href: \"/lex/strat-names/\" + name.strat_name_id,\n key: i,\n },\n [name.rank_name],\n ),\n h.if(!lastElement)([\", \"]),\n ]);\n }),\n ]),\n );\n}\n\nfunction Thickness(props) {\n const { source } = props;\n if (!source.macrostrat.max_thick) return h(\"div\");\n\n return h.if(source.macrostrat && source.macrostrat.max_thick)(\n \"div.macrostrat-detail\",\n [\n h(\"div.expansion-summary-title\", \"Thickness\"),\n h(\"div\", [\n source.macrostrat.min_min_thick,\n \" - \",\n source.macrostrat.max_thick,\n \"m\",\n ]),\n ],\n );\n}\n\nfunction MinorFossilCollections(props) {\n const { source } = props;\n const { macrostrat } = source;\n if (!macrostrat.pbdb_collections) return h(\"div\");\n\n return h.if(macrostrat && macrostrat.pbdb_collections)(\n \"div.macrostrat-detail\",\n [\n h(\"div.expansion-summary-title\", \"Fossil collections\"),\n h(\"div\", [macrostrat.pbdb_collections]),\n ],\n );\n}\n\nfunction FossilOccs(props) {\n const { source } = props;\n const { macrostrat } = source;\n\n if (!macrostrat?.pbdb_occs) return null;\n\n return h(\"div.macrostrat-detail\", [\n h(\"div.expansion-summary-title\", \"Fossil occurrences\"),\n h(\"div\", [macrostrat.pbdb_occs]),\n ]);\n}\n\nfunction LithTypes(props) {\n const { lith_types } = props;\n\n return h.if(lith_types && lith_types.length > 0)(\n \"div.lithologies.lithology-types\",\n [\n h(LithologyList, {\n lithologies: lith_types,\n }),\n ],\n );\n}\n\nfunction LithsAndClasses(props) {\n const { source } = props;\n const { macrostrat } = source;\n const { liths = null, lith_types = null } = macrostrat;\n\n if (!liths || liths.length == 0) return null;\n\n const lithologies = liths.map((lith) => {\n return {\n ...lith,\n name: lith.lith,\n color: lith.color || \"#000000\",\n };\n });\n\n return h(\n ExpandableDetailsPanel,\n {\n title: \"Lithology\",\n value: h(LithTypes, { lith_types }),\n },\n h(ExpansionBody, { title: \"Matched lithologies\" }, [\n h(LithologyList, {\n lithologies,\n onClickItem: (e, lith) => {\n window.open(\"/lex/lithology/\" + lith.lith_id, \"_self\");\n },\n }),\n ]),\n );\n}\n\nfunction EnvironTypes(props) {\n const { environ_types } = props;\n return h.if(environ_types && environ_types.length > 0)(LithologyList, {\n lithologies: environ_types?.filter((e) => e.name != \"\"),\n });\n}\n\nfunction Environments(props) {\n const { source } = props;\n const { macrostrat } = source;\n const { environs = null, environ_types = null } = macrostrat;\n\n if (!environs || environs.length == 0) return null;\n\n const lithologies = environs.map((environ) => {\n return {\n ...environ,\n name: environ.environ,\n color: environ.color || \"#000000\",\n };\n });\n\n return h(\n ExpandableDetailsPanel,\n {\n title: \"Environment\",\n value: h(EnvironTypes, { environ_types }),\n },\n h(ExpansionBody, { title: \"Matched environments\" }, [\n h(LithologyList, {\n lithologies,\n onClickItem: (e, environ) => {\n window.open(\"/lex/environments/\" + environ.environ_id, \"_self\");\n },\n }),\n ]),\n );\n}\n\nfunction EconType(props) {\n const { econ_types } = props;\n\n return h.if(econ_types && econ_types.length > 0)(\"div\", [\n econ_types.map((econClass, i) => {\n return h(AttrChip, {\n key: i,\n name: econClass.name,\n color: econClass.color,\n });\n }),\n ]);\n}\n\nfunction Economy(props) {\n const { source } = props;\n const { macrostrat } = source;\n const { econs = null, econ_types = null } = macrostrat;\n if (!econs) return h(\"div\");\n\n return h.if(econs && econs.length > 0)(\n ExpandableDetailsPanel,\n {\n title: \"Economy \",\n value: h(EconType, { econ_types }),\n },\n h(ExpansionBody, { title: \"Matched economic attributes\" }, [\n econs.map((econ, i) => {\n return h(AttrChip, {\n key: i,\n name: econ.econ,\n color: econ.color,\n });\n }),\n ]),\n );\n}\n\nexport { MacrostratLinkedData };\n"],"names":[],"version":3,"file":"map-interface.3f968b46.js.map"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
var $2Gjg0$react = require("react");
|
|
2
|
+
var $2Gjg0$blueprintjscore = require("@blueprintjs/core");
|
|
3
|
+
var $2Gjg0$macrostratuicomponents = require("@macrostrat/ui-components");
|
|
4
|
+
var $2Gjg0$macrostrathyper = require("@macrostrat/hyper");
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
function $parcel$interopDefault(a) {
|
|
8
|
+
return a && a.__esModule ? a.default : a;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function $parcel$export(e, n, v, s) {
|
|
12
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
$parcel$export(module.exports, "default", () => $a77d4cb2e8e0bae6$export$2e2bcd8739ae039);
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
function $a77d4cb2e8e0bae6$var$Article(props) {
|
|
21
|
+
const [expanded, setExpanded] = (0, $2Gjg0$react.useState)(false);
|
|
22
|
+
const { data: data } = props;
|
|
23
|
+
const toggleExpand = ()=>{
|
|
24
|
+
setExpanded(!expanded);
|
|
25
|
+
};
|
|
26
|
+
// Attempt to pull out only the year and not the whole date
|
|
27
|
+
let year;
|
|
28
|
+
try {
|
|
29
|
+
year = data.coverDate ? data.coverDate.match(/\d{4}/)[0] : "";
|
|
30
|
+
} catch (e) {
|
|
31
|
+
year = "";
|
|
32
|
+
}
|
|
33
|
+
const authors = data?.authors?.split("; ") ?? [];
|
|
34
|
+
const authorList = authors.length > 0 ? (0, ($parcel$interopDefault($2Gjg0$macrostrathyper)))((0, $2Gjg0$macrostratuicomponents.AuthorList), {
|
|
35
|
+
names: authors
|
|
36
|
+
}) : "Unknown";
|
|
37
|
+
const iconName = expanded ? "chevron-up" : "chevron-down";
|
|
38
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($2Gjg0$react))).createElement("div", {
|
|
39
|
+
className: "article"
|
|
40
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($2Gjg0$react))).createElement("div", {
|
|
41
|
+
className: "article-title"
|
|
42
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($2Gjg0$react))).createElement("p", {
|
|
43
|
+
className: "article-author"
|
|
44
|
+
}, authorList, ", ", year.length ? " " + year + ". " : ""), /*#__PURE__*/ (0, ($parcel$interopDefault($2Gjg0$react))).createElement("a", {
|
|
45
|
+
href: data.URL,
|
|
46
|
+
target: "_blank",
|
|
47
|
+
className: "title-link"
|
|
48
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($2Gjg0$react))).createElement("strong", null, data.title, ".")), /*#__PURE__*/ (0, ($parcel$interopDefault($2Gjg0$react))).createElement("span", null, /*#__PURE__*/ (0, ($parcel$interopDefault($2Gjg0$react))).createElement((0, $2Gjg0$blueprintjscore.Button), {
|
|
49
|
+
onClick: toggleExpand,
|
|
50
|
+
minimal: true,
|
|
51
|
+
rightIcon: iconName,
|
|
52
|
+
className: "flat-btn"
|
|
53
|
+
}))), /*#__PURE__*/ (0, ($parcel$interopDefault($2Gjg0$react))).createElement((0, $2Gjg0$blueprintjscore.Collapse), {
|
|
54
|
+
isOpen: expanded
|
|
55
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($2Gjg0$react))).createElement("span", {
|
|
56
|
+
className: expanded ? "" : "hidden"
|
|
57
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($2Gjg0$react))).createElement("div", {
|
|
58
|
+
className: "quotes"
|
|
59
|
+
}, data.highlight.map((snippet, si)=>{
|
|
60
|
+
let text = snippet;
|
|
61
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($2Gjg0$react))).createElement("p", {
|
|
62
|
+
className: "gdd-snippet",
|
|
63
|
+
key: si,
|
|
64
|
+
dangerouslySetInnerHTML: {
|
|
65
|
+
__html: `...${snippet}...`
|
|
66
|
+
}
|
|
67
|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,KAAK,SAAS,CAAC,GAAG,CAAC,CAAC,SAAS;QAC5B,IAAI,OAAO;QAEX,qBACE,0DAAC;YACC,WAAU;YACV,KAAK;YACL,yBAAyB;gBAAE,QAAQ,CAAC,GAAG,EAAE,QAAQ,GAAG,CAAC;YAAC;;IAG5D;AAMZ;IAEA,2CAAe","sources":["packages/map-interface/src/map-panel/components/info-drawer/xdd-panel/Article.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport { Collapse, Button } from \"@blueprintjs/core\";\nimport { AuthorList } from \"@macrostrat/ui-components\";\nimport h from \"@macrostrat/hyper\";\n\nfunction Article(props) {\n const [expanded, setExpanded] = useState(false);\n const { data } = props;\n\n const toggleExpand = () => {\n setExpanded(!expanded);\n };\n\n // Attempt to pull out only the year and not the whole date\n let year;\n try {\n year = data.coverDate ? data.coverDate.match(/\\d{4}/)[0] : \"\";\n } catch (e) {\n year = \"\";\n }\n\n const authors = data?.authors?.split(\"; \") ?? [];\n\n const authorList =\n authors.length > 0 ? h(AuthorList, { names: authors }) : \"Unknown\";\n\n const iconName = expanded ? \"chevron-up\" : \"chevron-down\";\n\n return (\n <div className=\"article\">\n <div className=\"article-title\">\n <p className=\"article-author\">\n {authorList}, {year.length ? \" \" + year + \". \" : \"\"}\n </p>\n <a href={data.URL} target=\"_blank\" className=\"title-link\">\n <strong>{data.title}.</strong>\n </a>\n\n <span>\n <Button\n onClick={toggleExpand}\n minimal={true}\n rightIcon={iconName}\n className=\"flat-btn\"\n ></Button>\n </span>\n </div>\n <Collapse isOpen={expanded}>\n <span className={expanded ? \"\" : \"hidden\"}>\n <div className=\"quotes\">\n {data.highlight.map((snippet, si) => {\n let text = snippet;\n\n return (\n <p\n className=\"gdd-snippet\"\n key={si}\n dangerouslySetInnerHTML={{ __html: `...${snippet}...` }}\n ></p>\n );\n })}\n </div>\n </span>\n </Collapse>\n </div>\n );\n}\n\nexport default Article;\n"],"names":[],"version":3,"file":"map-interface.4264e7e1.js.map"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
var $3ffaa4c6fbcbe662$exports = require("./map-interface.cc9ad5c6.js");
|
|
2
|
+
var $LZ8LT$macrostrathyper = require("@macrostrat/hyper");
|
|
3
|
+
var $LZ8LT$macrostratmapinterface = require("@macrostrat/map-interface");
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
function $parcel$interopDefault(a) {
|
|
7
|
+
return a && a.__esModule ? a.default : a;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function $parcel$export(e, n, v, s) {
|
|
11
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
$parcel$export(module.exports, "RegionalStratigraphy", () => $b951c9e8f692a209$export$2b7bf9249a3d9866);
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
function $b951c9e8f692a209$export$2b7bf9249a3d9866(props) {
|
|
19
|
+
const { mapInfo: mapInfo, columnInfo: columnInfo } = props;
|
|
20
|
+
if (mapInfo?.mapData == null || !columnInfo) return null;
|
|
21
|
+
return (0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))((0, $LZ8LT$macrostratmapinterface.ExpansionPanel), {
|
|
22
|
+
classes: {
|
|
23
|
+
root: "regional-panel"
|
|
24
|
+
},
|
|
25
|
+
title: "Regional stratigraphy",
|
|
26
|
+
expanded: true
|
|
27
|
+
}, [
|
|
28
|
+
(0, ($parcel$interopDefault($LZ8LT$macrostrathyper))).if(columnInfo != null)($b951c9e8f692a209$var$ColumnData, {
|
|
29
|
+
columnInfo: columnInfo
|
|
30
|
+
})
|
|
31
|
+
]);
|
|
32
|
+
}
|
|
33
|
+
function $b951c9e8f692a209$var$ColumnData({ columnInfo: columnInfo }) {
|
|
34
|
+
return (0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))("div.column-data", [
|
|
35
|
+
(0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))("a", {
|
|
36
|
+
href: "/columns/" + columnInfo.col_id
|
|
37
|
+
}, "View column page"),
|
|
38
|
+
(0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))($b951c9e8f692a209$var$MapAttribute, {
|
|
39
|
+
label: "Name: ",
|
|
40
|
+
content: [
|
|
41
|
+
columnInfo.col_name
|
|
42
|
+
]
|
|
43
|
+
}),
|
|
44
|
+
(0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))($b951c9e8f692a209$var$MapAttribute, {
|
|
45
|
+
label: "Column ID: ",
|
|
46
|
+
content: [
|
|
47
|
+
columnInfo.col_id
|
|
48
|
+
]
|
|
49
|
+
}),
|
|
50
|
+
(0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))($b951c9e8f692a209$var$MapAttribute, {
|
|
51
|
+
label: "Group: ",
|
|
52
|
+
content: [
|
|
53
|
+
columnInfo.col_group
|
|
54
|
+
]
|
|
55
|
+
}),
|
|
56
|
+
(0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))($b951c9e8f692a209$var$MapAttribute, {
|
|
57
|
+
label: "Group ID: ",
|
|
58
|
+
content: [
|
|
59
|
+
columnInfo.col_group_id
|
|
60
|
+
]
|
|
61
|
+
}),
|
|
62
|
+
(0, ($parcel$interopDefault($LZ8LT$macrostrathyper))).if(columnInfo.min_min_thick || columnInfo.max_thick)($b951c9e8f692a209$var$MapAttribute, {
|
|
63
|
+
label: "Thickness: ",
|
|
64
|
+
content: [
|
|
65
|
+
(0, $3ffaa4c6fbcbe662$exports.addCommas)(parseInt(columnInfo.min_min_thick)),
|
|
66
|
+
" - ",
|
|
67
|
+
(0, $3ffaa4c6fbcbe662$exports.addCommas)(parseInt(columnInfo.max_thick)),
|
|
68
|
+
(0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))("span.age-ma", [
|
|
69
|
+
"m"
|
|
70
|
+
])
|
|
71
|
+
]
|
|
72
|
+
}),
|
|
73
|
+
(0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))($b951c9e8f692a209$var$MapAttribute, {
|
|
74
|
+
label: "Age: ",
|
|
75
|
+
content: [
|
|
76
|
+
columnInfo.b_age,
|
|
77
|
+
" - ",
|
|
78
|
+
columnInfo.t_age,
|
|
79
|
+
" ",
|
|
80
|
+
(0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))("span.age-ma", [
|
|
81
|
+
"Ma"
|
|
82
|
+
])
|
|
83
|
+
]
|
|
84
|
+
}),
|
|
85
|
+
(0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))($b951c9e8f692a209$var$MapAttribute, {
|
|
86
|
+
label: "Area: ",
|
|
87
|
+
content: [
|
|
88
|
+
(0, $3ffaa4c6fbcbe662$exports.addCommas)(columnInfo.col_area),
|
|
89
|
+
" ",
|
|
90
|
+
(0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))("span.age-ma", [
|
|
91
|
+
"km2"
|
|
92
|
+
])
|
|
93
|
+
]
|
|
94
|
+
}),
|
|
95
|
+
(0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))($b951c9e8f692a209$var$MapAttribute, {
|
|
96
|
+
label: "Fossil collections: ",
|
|
97
|
+
content: [
|
|
98
|
+
(0, $3ffaa4c6fbcbe662$exports.addCommas)(columnInfo.pbdb_collections)
|
|
99
|
+
]
|
|
100
|
+
})
|
|
101
|
+
]);
|
|
102
|
+
}
|
|
103
|
+
function $b951c9e8f692a209$var$MapAttribute(props) {
|
|
104
|
+
return (0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))("div.map-source-attr", [
|
|
105
|
+
(0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))("span.attr", [
|
|
106
|
+
props.label
|
|
107
|
+
]),
|
|
108
|
+
...props.content
|
|
109
|
+
]);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
//# sourceMappingURL=map-interface.5737346f.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;AAIO,SAAS,0CAAqB,KAAK;IACxC,MAAM,WAAE,OAAO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,EAAE,eAAe;oBAAC;iBAAK;aACxB;QACH;QACA,CAAA,GAAA,gDAAA,EAAE,oCAAc;YACd,OAAO;YACP,SAAS;gBAAC,CAAA,GAAA,mCAAQ,EAAE,WAAW,QAAQ;gBAAG;gBAAK,CAAA,GAAA,gDAAA,EAAE,eAAe;oBAAC;iBAAM;aAAE;QAC3E;QACA,CAAA,GAAA,gDAAA,EAAE,oCAAc;YACd,OAAO;YACP,SAAS;gBAAC,CAAA,GAAA,mCAAQ,EAAE,WAAW,gBAAgB;aAAE;QACnD;KACD;AACH;AAEA,SAAS,mCAAa,KAAK;IACzB,OAAO,CAAA,GAAA,gDAAA,EAAE,uBAAuB;QAC9B,CAAA,GAAA,gDAAA,EAAE,aAAa;YAAC,MAAM,KAAK;SAAC;WACzB,MAAM,OAAO;KACjB;AACH","sources":["packages/map-interface/src/map-panel/components/info-drawer/reg-strat.ts"],"sourcesContent":["import h from \"@macrostrat/hyper\";\nimport { ExpansionPanel } from \"@macrostrat/map-interface\";\nimport { addCommas } from \"../../utils\";\n\nexport function RegionalStratigraphy(props) {\n const { mapInfo, columnInfo } = props;\n if (mapInfo?.mapData == null || !columnInfo) return null;\n\n return h(\n ExpansionPanel,\n {\n classes: { root: \"regional-panel\" },\n title: \"Regional stratigraphy\",\n expanded: true,\n },\n [h.if(columnInfo != null)(ColumnData, { columnInfo })],\n );\n}\n\nfunction ColumnData({ columnInfo }) {\n return h(\"div.column-data\", [\n h(\"a\", { href: \"/columns/\" + columnInfo.col_id }, \"View column page\"),\n h(MapAttribute, {\n label: \"Name: \",\n content: [columnInfo.col_name],\n }),\n h(MapAttribute, {\n label: \"Column ID: \",\n content: [columnInfo.col_id],\n }),\n h(MapAttribute, {\n label: \"Group: \",\n content: [columnInfo.col_group],\n }),\n h(MapAttribute, {\n label: \"Group ID: \",\n content: [columnInfo.col_group_id],\n }),\n h.if(columnInfo.min_min_thick || columnInfo.max_thick)(MapAttribute, {\n label: \"Thickness: \",\n content: [\n addCommas(parseInt(columnInfo.min_min_thick)),\n \" - \",\n addCommas(parseInt(columnInfo.max_thick)),\n h(\"span.age-ma\", [\"m\"]),\n ],\n }),\n h(MapAttribute, {\n label: \"Age: \",\n content: [\n columnInfo.b_age,\n \" - \",\n columnInfo.t_age,\n \" \",\n h(\"span.age-ma\", [\"Ma\"]),\n ],\n }),\n h(MapAttribute, {\n label: \"Area: \",\n content: [addCommas(columnInfo.col_area), \" \", h(\"span.age-ma\", [\"km2\"])],\n }),\n h(MapAttribute, {\n label: \"Fossil collections: \",\n content: [addCommas(columnInfo.pbdb_collections)],\n }),\n ]);\n}\n\nfunction MapAttribute(props) {\n return h(\"div.map-source-attr\", [\n h(\"span.attr\", [props.label]),\n ...props.content,\n ]);\n}\n"],"names":[],"version":3,"file":"map-interface.5737346f.js.map"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
function $parcel$export(e, n, v, s) {
|
|
3
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
$parcel$export(module.exports, "data", () => $f48985f27fe20a8e$export$4051a07651545597, (v) => $f48985f27fe20a8e$export$4051a07651545597 = v);
|
|
7
|
+
$parcel$export(module.exports, "enter", () => $f48985f27fe20a8e$export$e668df1bcd81e4d2, (v) => $f48985f27fe20a8e$export$e668df1bcd81e4d2 = v);
|
|
8
|
+
$parcel$export(module.exports, "from", () => $f48985f27fe20a8e$export$6788812c4e6611e6, (v) => $f48985f27fe20a8e$export$6788812c4e6611e6 = v);
|
|
9
|
+
$parcel$export(module.exports, "leave", () => $f48985f27fe20a8e$export$33993f1ec7a2167a, (v) => $f48985f27fe20a8e$export$33993f1ec7a2167a = v);
|
|
10
|
+
$parcel$export(module.exports, "loading-area", () => $f48985f27fe20a8e$export$76b366df357432c0, (v) => $f48985f27fe20a8e$export$76b366df357432c0 = v);
|
|
11
|
+
$parcel$export(module.exports, "spinner", () => $f48985f27fe20a8e$export$641374ffb95bc399, (v) => $f48985f27fe20a8e$export$641374ffb95bc399 = v);
|
|
12
|
+
$parcel$export(module.exports, "transition-item", () => $f48985f27fe20a8e$export$488f71172d52d6aa, (v) => $f48985f27fe20a8e$export$488f71172d52d6aa = v);
|
|
13
|
+
var $f48985f27fe20a8e$export$4051a07651545597;
|
|
14
|
+
var $f48985f27fe20a8e$export$e668df1bcd81e4d2;
|
|
15
|
+
var $f48985f27fe20a8e$export$6788812c4e6611e6;
|
|
16
|
+
var $f48985f27fe20a8e$export$33993f1ec7a2167a;
|
|
17
|
+
var $f48985f27fe20a8e$export$76b366df357432c0;
|
|
18
|
+
var $f48985f27fe20a8e$export$641374ffb95bc399;
|
|
19
|
+
var $f48985f27fe20a8e$export$488f71172d52d6aa;
|
|
20
|
+
$f48985f27fe20a8e$export$4051a07651545597 = `AUB_rq_data`;
|
|
21
|
+
$f48985f27fe20a8e$export$e668df1bcd81e4d2 = `AUB_rq_enter`;
|
|
22
|
+
$f48985f27fe20a8e$export$6788812c4e6611e6 = `AUB_rq_from`;
|
|
23
|
+
$f48985f27fe20a8e$export$33993f1ec7a2167a = `AUB_rq_leave`;
|
|
24
|
+
$f48985f27fe20a8e$export$76b366df357432c0 = `AUB_rq_loading-area`;
|
|
25
|
+
$f48985f27fe20a8e$export$641374ffb95bc399 = `AUB_rq_spinner`;
|
|
26
|
+
$f48985f27fe20a8e$export$488f71172d52d6aa = `AUB_rq_transition-item`;
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=map-interface.58c87b08.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AANA,4CAAyB,CAAC,WAAW,CAAC;AACtC,4CAA0B,CAAC,YAAY,CAAC;AACxC,4CAAyB,CAAC,WAAW,CAAC;AACtC,4CAA0B,CAAC,YAAY,CAAC;AACxC,4CAAiC,CAAC,mBAAmB,CAAC;AACtD,4CAA4B,CAAC,cAAc,CAAC;AAC5C,4CAAoC,CAAC,sBAAsB,CAAC","sources":["packages/map-interface/src/map-panel/components/transitions/main.module.styl"],"sourcesContent":["transitionable()\n &:global(.enter)\n opacity: 0\n &:global(.enter-active)\n opacity: 1\n transition: opacity 0.5s ease-in-out, height 0.5s ease-in-out, max-height 0.5s ease-in-out\n &:global(.exit)\n opacity: 1\n &:global(.exit-active)\n opacity: 0\n transition: opacity 0.5s ease-in-out, height 0.5s ease-in-out, max-height 0.5s ease-in-out\n transition: height 0.5s ease-in-out, max-height 0.5s ease-in-out\n\n.transition-item\n transitionable()\n\n.loading-area\n .spinner, .data\n transition: height 0.5s ease-in, opacity 0.2s ease-in\n\n .spinner\n position absolute\n top 0\n left 0\n width: 100%\n height 100%\n min-height: 90px\n background-color: var(--panel-background-color)\n padding: 15px\n\n &.enter\n .spinner\n height: 0\n opacity: 0\n\n .data\n opacity: 1\n\n &.from\n .spinner\n height: 90px\n opacity: 1\n\n .data\n opacity: 0\n\n &.leave\n .spinner\n height: 90px\n opacity: 1\n\n .data\n opacity: 0\n\n//.transition-item.infodrawer-info\n"],"names":[],"version":3,"file":"map-interface.58c87b08.js.map"}
|