@macrostrat/map-interface 2.0.1 → 2.1.0
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 +10 -0
- package/dist/container.js +2 -2
- package/dist/container.js.map +1 -1
- package/dist/context-panel/index.js +2 -2
- package/dist/context-panel/index.js.map +1 -1
- package/dist/context-panel/main.module.sass.cjs +6 -1
- package/dist/context-panel/main.module.sass.cjs.map +1 -1
- package/dist/context-panel/main.module.sass.js +4 -1
- package/dist/context-panel/main.module.sass.js.map +1 -1
- package/dist/controls.js +2 -2
- package/dist/controls.js.map +1 -1
- package/dist/dev/main.module.sass.cjs +6 -1
- package/dist/dev/main.module.sass.cjs.map +1 -1
- package/dist/dev/main.module.sass.js +4 -1
- package/dist/dev/main.module.sass.js.map +1 -1
- package/dist/dev/map-page.js +2 -2
- package/dist/dev/map-page.js.map +1 -1
- package/dist/dev/vector-tile-features.cjs +3 -3
- package/dist/dev/vector-tile-features.cjs.map +1 -1
- package/dist/dev/vector-tile-features.js +3 -3
- package/dist/dev/vector-tile-features.js.map +1 -1
- package/dist/index.cjs +6 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -13
- package/dist/index.js.map +1 -1
- package/dist/location-details/fossil-collections/collections.js +2 -2
- package/dist/location-details/fossil-collections/collections.js.map +1 -1
- package/dist/location-details/fossil-collections/main.module.sass.cjs +6 -1
- package/dist/location-details/fossil-collections/main.module.sass.cjs.map +1 -1
- package/dist/location-details/fossil-collections/main.module.sass.js +4 -1
- package/dist/location-details/fossil-collections/main.module.sass.js.map +1 -1
- package/dist/location-details/index.d.ts +0 -1
- package/dist/location-details/info-blocks.cjs +0 -22
- package/dist/location-details/info-blocks.cjs.map +1 -1
- package/dist/location-details/info-blocks.js +2 -24
- package/dist/location-details/info-blocks.js.map +1 -1
- package/dist/location-details/info-blocks.module.sass.cjs +6 -1
- package/dist/location-details/info-blocks.module.sass.cjs.map +1 -1
- package/dist/location-details/info-blocks.module.sass.js +4 -1
- package/dist/location-details/info-blocks.module.sass.js.map +1 -1
- package/dist/location-details/macrostrat-linked.cjs +82 -129
- package/dist/location-details/macrostrat-linked.cjs.map +1 -1
- package/dist/location-details/macrostrat-linked.js +29 -75
- package/dist/location-details/macrostrat-linked.js.map +1 -1
- package/dist/location-details/main.module.sass.cjs +6 -1
- package/dist/location-details/main.module.sass.cjs.map +1 -1
- package/dist/location-details/main.module.sass.js +4 -1
- package/dist/location-details/main.module.sass.js.map +1 -1
- package/dist/location-details/physiography.cjs +2 -2
- package/dist/location-details/physiography.cjs.map +1 -1
- package/dist/location-details/physiography.js +1 -1
- package/dist/location-details/physiography.js.map +1 -1
- package/dist/location-details/reg-strat.cjs +2 -2
- package/dist/location-details/reg-strat.cjs.map +1 -1
- package/dist/location-details/reg-strat.js +1 -1
- package/dist/location-details/reg-strat.js.map +1 -1
- package/dist/location-panel/header.js +2 -2
- package/dist/location-panel/header.js.map +1 -1
- package/dist/location-panel/index.js +2 -2
- package/dist/location-panel/index.js.map +1 -1
- package/dist/location-panel/main.module.sass.cjs +6 -1
- package/dist/location-panel/main.module.sass.cjs.map +1 -1
- package/dist/location-panel/main.module.sass.js +4 -1
- package/dist/location-panel/main.module.sass.js.map +1 -1
- package/dist/main.module.sass.cjs +6 -1
- package/dist/main.module.sass.cjs.map +1 -1
- package/dist/main.module.sass.js +4 -1
- package/dist/main.module.sass.js.map +1 -1
- package/dist/map-interface.css +43 -215
- package/dist/map-view.js +2 -2
- package/dist/map-view.js.map +1 -1
- package/package.json +8 -8
- package/src/dev/vector-tile-features.ts +1 -1
- package/src/index.ts +0 -1
- package/src/location-details/index.ts +0 -1
- package/src/location-details/macrostrat-linked.ts +29 -81
- package/src/location-details/main.module.sass +0 -1
- package/src/location-details/physiography.ts +1 -1
- package/src/location-details/reg-strat.ts +1 -1
- package/dist/expansion-panel/headers.cjs +0 -22
- package/dist/expansion-panel/headers.cjs.map +0 -1
- package/dist/expansion-panel/headers.d.ts +0 -1
- package/dist/expansion-panel/headers.js +0 -20
- package/dist/expansion-panel/headers.js.map +0 -1
- package/dist/expansion-panel/index.cjs +0 -128
- package/dist/expansion-panel/index.cjs.map +0 -1
- package/dist/expansion-panel/index.d.ts +0 -18
- package/dist/expansion-panel/index.js +0 -125
- package/dist/expansion-panel/index.js.map +0 -1
- package/dist/expansion-panel/main.module.sass.cjs +0 -27
- package/dist/expansion-panel/main.module.sass.cjs.map +0 -1
- package/dist/expansion-panel/main.module.sass.js +0 -27
- package/dist/expansion-panel/main.module.sass.js.map +0 -1
- package/dist/location-details/fetch.d.ts +0 -4
- package/dist/location-details/utils/index.cjs +0 -15
- package/dist/location-details/utils/index.cjs.map +0 -1
- package/dist/location-details/utils/index.js +0 -15
- package/dist/location-details/utils/index.js.map +0 -1
- package/dist/location-details/xdd-panel/article.cjs +0 -64
- package/dist/location-details/xdd-panel/article.cjs.map +0 -1
- package/dist/location-details/xdd-panel/article.d.ts +0 -1
- package/dist/location-details/xdd-panel/article.js +0 -62
- package/dist/location-details/xdd-panel/article.js.map +0 -1
- package/dist/location-details/xdd-panel/index.cjs +0 -71
- package/dist/location-details/xdd-panel/index.cjs.map +0 -1
- package/dist/location-details/xdd-panel/index.d.ts +0 -18
- package/dist/location-details/xdd-panel/index.js +0 -69
- package/dist/location-details/xdd-panel/index.js.map +0 -1
- package/dist/location-details/xdd-panel/journal.cjs +0 -27
- package/dist/location-details/xdd-panel/journal.cjs.map +0 -1
- package/dist/location-details/xdd-panel/journal.d.ts +0 -20
- package/dist/location-details/xdd-panel/journal.js +0 -25
- package/dist/location-details/xdd-panel/journal.js.map +0 -1
- package/src/expansion-panel/headers.ts +0 -18
- package/src/expansion-panel/index.ts +0 -135
- package/src/expansion-panel/main.module.sass +0 -157
- package/src/location-details/fetch.ts +0 -57
- package/src/location-details/location-details.stories.ts +0 -88
- package/src/location-details/xdd-panel/article.ts +0 -67
- package/src/location-details/xdd-panel/index.ts +0 -70
- package/src/location-details/xdd-panel/journal.ts +0 -60
package/src/index.ts
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import hyper from "@macrostrat/hyper";
|
|
2
1
|
import {
|
|
3
2
|
ExpansionPanel,
|
|
4
3
|
ExpandableDetailsPanel,
|
|
5
|
-
|
|
6
|
-
} from "@macrostrat/
|
|
7
|
-
import styles from "./main.module.sass";
|
|
4
|
+
LithologyList,
|
|
5
|
+
} from "@macrostrat/data-components";
|
|
8
6
|
import { scaleLinear } from "@visx/scale";
|
|
9
7
|
import { AxisBottom } from "@visx/axis";
|
|
10
8
|
import chroma from "chroma-js";
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
const h = hyper.styled(styles);
|
|
9
|
+
import { AgeChip } from "./info-blocks";
|
|
10
|
+
import h from "./main.module.sass";
|
|
15
11
|
|
|
16
12
|
export function MacrostratLinkedData(props) {
|
|
17
13
|
const {
|
|
@@ -43,7 +39,6 @@ export function MacrostratLinkedData(props) {
|
|
|
43
39
|
h(FossilOccs, { source }),
|
|
44
40
|
h(LithsAndClasses, { source, lithologyURL }),
|
|
45
41
|
h(Environments, { source, environmentURL }),
|
|
46
|
-
h(Economy, { source }),
|
|
47
42
|
]),
|
|
48
43
|
],
|
|
49
44
|
);
|
|
@@ -203,7 +198,7 @@ function MacrostratAgeInfo(props) {
|
|
|
203
198
|
return h(
|
|
204
199
|
ExpandableDetailsPanel,
|
|
205
200
|
{ headerElement: h(MacrostratAgeInfoCore, props) },
|
|
206
|
-
h(
|
|
201
|
+
h(AgeRefinementPlot, props),
|
|
207
202
|
);
|
|
208
203
|
}
|
|
209
204
|
|
|
@@ -220,23 +215,20 @@ function MatchBasis(props) {
|
|
|
220
215
|
h("div.description", "Matched stratigraphic unit"),
|
|
221
216
|
]),
|
|
222
217
|
},
|
|
223
|
-
|
|
224
|
-
source.macrostrat.strat_names
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
"
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
]);
|
|
238
|
-
}),
|
|
239
|
-
]),
|
|
218
|
+
source.macrostrat.strat_names?.map((name, i) => {
|
|
219
|
+
let lastElement: boolean = i == source.macrostrat.strat_names.length - 1;
|
|
220
|
+
return h("span", { key: i }, [
|
|
221
|
+
h(
|
|
222
|
+
"a.externalLink",
|
|
223
|
+
{
|
|
224
|
+
href: stratNameURL + "/" + name.strat_name_id,
|
|
225
|
+
key: i,
|
|
226
|
+
},
|
|
227
|
+
[name.rank_name],
|
|
228
|
+
),
|
|
229
|
+
h.if(!lastElement)([", "]),
|
|
230
|
+
]);
|
|
231
|
+
}),
|
|
240
232
|
);
|
|
241
233
|
}
|
|
242
234
|
|
|
@@ -318,14 +310,13 @@ function LithsAndClasses(props) {
|
|
|
318
310
|
title: "Lithology",
|
|
319
311
|
value: h(LithTypes, { lith_types }),
|
|
320
312
|
},
|
|
321
|
-
h(
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
]),
|
|
313
|
+
h(LithologyList, {
|
|
314
|
+
label: "Matched lithologies",
|
|
315
|
+
lithologies,
|
|
316
|
+
onClickItem: (e, lith) => {
|
|
317
|
+
window.open(lithologyURL + "/" + lith.lith_id, "_self");
|
|
318
|
+
},
|
|
319
|
+
}),
|
|
329
320
|
);
|
|
330
321
|
}
|
|
331
322
|
|
|
@@ -357,52 +348,9 @@ function Environments(props) {
|
|
|
357
348
|
title: "Environment",
|
|
358
349
|
value: h(EnvironTypes, { environ_types }),
|
|
359
350
|
},
|
|
360
|
-
h(
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
onClickItem: (e, environ) => {
|
|
364
|
-
console.log("environ", environmentURL);
|
|
365
|
-
window.open(environmentURL + "/" + environ.environ_id, "_self");
|
|
366
|
-
},
|
|
367
|
-
}),
|
|
368
|
-
]),
|
|
369
|
-
);
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
function EconType(props) {
|
|
373
|
-
const { econ_types } = props;
|
|
374
|
-
|
|
375
|
-
return h.if(econ_types && econ_types.length > 0)("div", [
|
|
376
|
-
econ_types?.map((econClass, i) => {
|
|
377
|
-
return h(AttrChip, {
|
|
378
|
-
key: i,
|
|
379
|
-
name: econClass.name,
|
|
380
|
-
color: econClass.color,
|
|
381
|
-
});
|
|
351
|
+
h(LithologyList, {
|
|
352
|
+
label: "Matched environments",
|
|
353
|
+
lithologies,
|
|
382
354
|
}),
|
|
383
|
-
]);
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
function Economy(props) {
|
|
387
|
-
const { source } = props;
|
|
388
|
-
const { macrostrat } = source;
|
|
389
|
-
const { econs = null, econ_types = null } = macrostrat;
|
|
390
|
-
if (!econs) return h("div");
|
|
391
|
-
|
|
392
|
-
return h.if(econs && econs.length > 0)(
|
|
393
|
-
ExpandableDetailsPanel,
|
|
394
|
-
{
|
|
395
|
-
title: "Economy ",
|
|
396
|
-
value: h(EconType, { econ_types }),
|
|
397
|
-
},
|
|
398
|
-
h(ExpansionBody, { title: "Matched economic attributes" }, [
|
|
399
|
-
econs?.map((econ, i) => {
|
|
400
|
-
return h(AttrChip, {
|
|
401
|
-
key: i,
|
|
402
|
-
name: econ.econ,
|
|
403
|
-
color: econ.color,
|
|
404
|
-
});
|
|
405
|
-
}),
|
|
406
|
-
]),
|
|
407
355
|
);
|
|
408
356
|
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const h$1 = require("@macrostrat/hyper");
|
|
4
|
-
const main_module = require("./main.module.sass.cjs");
|
|
5
|
-
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
6
|
-
const h__default = /* @__PURE__ */ _interopDefault(h$1);
|
|
7
|
-
const h = h__default.default.styled(main_module.default);
|
|
8
|
-
function PanelSubhead(props) {
|
|
9
|
-
const { title, component = "h3", children, ...rest } = props;
|
|
10
|
-
return h("div.panel-subhead", rest, [
|
|
11
|
-
h(
|
|
12
|
-
component,
|
|
13
|
-
{
|
|
14
|
-
className: "title"
|
|
15
|
-
},
|
|
16
|
-
title
|
|
17
|
-
),
|
|
18
|
-
children
|
|
19
|
-
]);
|
|
20
|
-
}
|
|
21
|
-
exports.PanelSubhead = PanelSubhead;
|
|
22
|
-
//# sourceMappingURL=headers.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"headers.cjs","sources":["../../src/expansion-panel/headers.ts"],"sourcesContent":["import hyper from \"@macrostrat/hyper\";\nimport styles from \"./main.module.sass\";\n\nconst h = hyper.styled(styles);\n\nexport function PanelSubhead(props) {\n const { title, component = \"h3\", children, ...rest } = props;\n return h(\"div.panel-subhead\", rest, [\n h(\n component,\n {\n className: \"title\",\n },\n title,\n ),\n children,\n ]);\n}\n"],"names":["hyper","styles"],"mappings":";;;;;;AAGA,MAAM,IAAIA,WAAAA,QAAM,OAAOC,mBAAM;AAEtB,SAAS,aAAa,OAAO;AAClC,QAAM,EAAE,OAAO,YAAY,MAAM,UAAU,GAAG,SAAS;AACvD,SAAO,EAAE,qBAAqB,MAAM;AAAA,IAClC;AAAA,MACE;AAAA,MACA;AAAA,QACE,WAAW;AAAA,MAAA;AAAA,MAEb;AAAA,IAAA;AAAA,IAEF;AAAA,EAAA,CACD;AACH;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function PanelSubhead(props: any): import('react').DOMElement<any, Element>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import h$1 from "@macrostrat/hyper";
|
|
2
|
-
import styles from "./main.module.sass.js";
|
|
3
|
-
const h = h$1.styled(styles);
|
|
4
|
-
function PanelSubhead(props) {
|
|
5
|
-
const { title, component = "h3", children, ...rest } = props;
|
|
6
|
-
return h("div.panel-subhead", rest, [
|
|
7
|
-
h(
|
|
8
|
-
component,
|
|
9
|
-
{
|
|
10
|
-
className: "title"
|
|
11
|
-
},
|
|
12
|
-
title
|
|
13
|
-
),
|
|
14
|
-
children
|
|
15
|
-
]);
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
PanelSubhead
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=headers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"headers.js","sources":["../../src/expansion-panel/headers.ts"],"sourcesContent":["import hyper from \"@macrostrat/hyper\";\nimport styles from \"./main.module.sass\";\n\nconst h = hyper.styled(styles);\n\nexport function PanelSubhead(props) {\n const { title, component = \"h3\", children, ...rest } = props;\n return h(\"div.panel-subhead\", rest, [\n h(\n component,\n {\n className: \"title\",\n },\n title,\n ),\n children,\n ]);\n}\n"],"names":["hyper"],"mappings":";;AAGA,MAAM,IAAIA,IAAM,OAAO,MAAM;AAEtB,SAAS,aAAa,OAAO;AAClC,QAAM,EAAE,OAAO,YAAY,MAAM,UAAU,GAAG,SAAS;AACvD,SAAO,EAAE,qBAAqB,MAAM;AAAA,IAClC;AAAA,MACE;AAAA,MACA;AAAA,QACE,WAAW;AAAA,MAAA;AAAA,MAEb;AAAA,IAAA;AAAA,IAEF;AAAA,EAAA,CACD;AACH;"}
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const React = require("react");
|
|
4
|
-
const core = require("@blueprintjs/core");
|
|
5
|
-
const h$1 = require("@macrostrat/hyper");
|
|
6
|
-
const main_module = require("./main.module.sass.cjs");
|
|
7
|
-
const classNames = require("classnames");
|
|
8
|
-
const headers = require("./headers.cjs");
|
|
9
|
-
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
10
|
-
const h__default = /* @__PURE__ */ _interopDefault(h$1);
|
|
11
|
-
const classNames__default = /* @__PURE__ */ _interopDefault(classNames);
|
|
12
|
-
const h = h__default.default.styled(main_module.default);
|
|
13
|
-
function ExpansionPanelSummary(props) {
|
|
14
|
-
const { expanded, children, onChange, className, title, titleComponent } = props;
|
|
15
|
-
const icon = expanded ? "chevron-up" : "chevron-down";
|
|
16
|
-
return h(
|
|
17
|
-
headers.PanelSubhead,
|
|
18
|
-
{
|
|
19
|
-
className: classNames__default.default("expansion-panel-header", className),
|
|
20
|
-
onClick: onChange,
|
|
21
|
-
title,
|
|
22
|
-
component: titleComponent
|
|
23
|
-
},
|
|
24
|
-
[children, h(core.Icon, { icon, className: "expansion-panel-icon" })]
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
function ExpansionPanelBase(props) {
|
|
28
|
-
let {
|
|
29
|
-
title,
|
|
30
|
-
titleComponent = "h3",
|
|
31
|
-
children,
|
|
32
|
-
expanded,
|
|
33
|
-
helpText,
|
|
34
|
-
onChange = () => {
|
|
35
|
-
},
|
|
36
|
-
sideComponent = null,
|
|
37
|
-
className
|
|
38
|
-
} = props;
|
|
39
|
-
const [isOpen, setOpen] = React.useState(expanded || false);
|
|
40
|
-
const onChange_ = () => {
|
|
41
|
-
onChange();
|
|
42
|
-
setOpen(!isOpen);
|
|
43
|
-
};
|
|
44
|
-
return h(
|
|
45
|
-
"div.expansion-panel-base",
|
|
46
|
-
{
|
|
47
|
-
className: classNames__default.default(className, {
|
|
48
|
-
expanded: isOpen,
|
|
49
|
-
collapsed: !isOpen
|
|
50
|
-
})
|
|
51
|
-
},
|
|
52
|
-
[
|
|
53
|
-
h(
|
|
54
|
-
ExpansionPanelSummary,
|
|
55
|
-
{
|
|
56
|
-
onChange: onChange_,
|
|
57
|
-
expanded: isOpen,
|
|
58
|
-
title,
|
|
59
|
-
titleComponent
|
|
60
|
-
},
|
|
61
|
-
h("div.expansion-summary-title-help", [
|
|
62
|
-
h("span.expansion-panel-subtext", helpText),
|
|
63
|
-
" ",
|
|
64
|
-
sideComponent
|
|
65
|
-
])
|
|
66
|
-
),
|
|
67
|
-
h(core.Collapse, { isOpen }, h("div.expansion-children", null, children))
|
|
68
|
-
]
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
function InfoPanelSection(props) {
|
|
72
|
-
let { title, children, className, headerElement = null } = props;
|
|
73
|
-
return h("div.info-panel-section", { className }, [
|
|
74
|
-
h("div.panel-subhead", null, headerElement ?? h("h3", title)),
|
|
75
|
-
h("div.panel-content", null, children)
|
|
76
|
-
]);
|
|
77
|
-
}
|
|
78
|
-
function ExpansionPanel(props) {
|
|
79
|
-
return h(ExpansionPanelBase, {
|
|
80
|
-
...props,
|
|
81
|
-
className: "expansion-panel"
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
function SubExpansionPanel(props) {
|
|
85
|
-
return h(ExpansionPanelBase, {
|
|
86
|
-
...props,
|
|
87
|
-
className: "expansion-panel sub-expansion-panel",
|
|
88
|
-
titleComponent: "h4"
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
function ExpandableDetailsPanel(props) {
|
|
92
|
-
let { title, children, value, headerElement, className } = props;
|
|
93
|
-
const [isOpen, setIsOpen] = React.useState(false);
|
|
94
|
-
headerElement ??= h([h("div.title", title), value]);
|
|
95
|
-
return h("div.expandable-details", { className }, [
|
|
96
|
-
h("div.expandable-details-main", [
|
|
97
|
-
h("div.expandable-details-header", headerElement),
|
|
98
|
-
h("div.expandable-details-toggle", [
|
|
99
|
-
h(core.Button, {
|
|
100
|
-
small: true,
|
|
101
|
-
minimal: true,
|
|
102
|
-
active: isOpen,
|
|
103
|
-
onClick: () => setIsOpen(!isOpen),
|
|
104
|
-
icon: "more"
|
|
105
|
-
})
|
|
106
|
-
])
|
|
107
|
-
]),
|
|
108
|
-
h(
|
|
109
|
-
core.Collapse,
|
|
110
|
-
{ isOpen },
|
|
111
|
-
h("div.expandable-details-children", null, children)
|
|
112
|
-
)
|
|
113
|
-
]);
|
|
114
|
-
}
|
|
115
|
-
function ExpansionBody({ title, className, children }) {
|
|
116
|
-
return h("div.expansion-body", { className }, [
|
|
117
|
-
h("div.expansion-panel-detail-header", title),
|
|
118
|
-
h("div.expansion-panel-detail-body", null, children)
|
|
119
|
-
]);
|
|
120
|
-
}
|
|
121
|
-
exports.PanelSubhead = headers.PanelSubhead;
|
|
122
|
-
exports.ExpandableDetailsPanel = ExpandableDetailsPanel;
|
|
123
|
-
exports.ExpansionBody = ExpansionBody;
|
|
124
|
-
exports.ExpansionPanel = ExpansionPanel;
|
|
125
|
-
exports.ExpansionPanelSummary = ExpansionPanelSummary;
|
|
126
|
-
exports.InfoPanelSection = InfoPanelSection;
|
|
127
|
-
exports.SubExpansionPanel = SubExpansionPanel;
|
|
128
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/expansion-panel/index.ts"],"sourcesContent":["import { useState } from \"react\";\nimport { Collapse, Icon } from \"@blueprintjs/core\";\nimport hyper from \"@macrostrat/hyper\";\nimport styles from \"./main.module.sass\";\nimport classNames from \"classnames\";\nimport { Button } from \"@blueprintjs/core\";\nimport { PanelSubhead } from \"./headers\";\n\nconst h = hyper.styled(styles);\n\nfunction ExpansionPanelSummary(props) {\n const { expanded, children, onChange, className, title, titleComponent } =\n props;\n const icon = expanded ? \"chevron-up\" : \"chevron-down\";\n return h(\n PanelSubhead,\n {\n className: classNames(\"expansion-panel-header\", className),\n onClick: onChange,\n title,\n component: titleComponent,\n },\n [children, h(Icon, { icon, className: \"expansion-panel-icon\" })],\n );\n}\n\nfunction ExpansionPanelBase(props) {\n let {\n title,\n titleComponent = \"h3\",\n children,\n expanded,\n helpText,\n onChange = () => {},\n sideComponent = null,\n className,\n } = props;\n const [isOpen, setOpen] = useState(expanded || false);\n\n const onChange_ = () => {\n onChange();\n setOpen(!isOpen);\n };\n\n return h(\n \"div.expansion-panel-base\",\n {\n className: classNames(className, {\n expanded: isOpen,\n collapsed: !isOpen,\n }),\n },\n [\n h(\n ExpansionPanelSummary,\n {\n onChange: onChange_,\n expanded: isOpen,\n title,\n titleComponent,\n },\n h(\"div.expansion-summary-title-help\", [\n h(\"span.expansion-panel-subtext\", helpText),\n \" \",\n sideComponent,\n ]),\n ),\n h(Collapse, { isOpen }, h(\"div.expansion-children\", null, children)),\n ],\n );\n}\n\nexport function InfoPanelSection(props) {\n let { title, children, className, headerElement = null } = props;\n return h(\"div.info-panel-section\", { className }, [\n h(\"div.panel-subhead\", null, headerElement ?? h(\"h3\", title)),\n h(\"div.panel-content\", null, children),\n ]);\n}\n\nfunction ExpansionPanel(props) {\n return h(ExpansionPanelBase, {\n ...props,\n className: \"expansion-panel\",\n });\n}\n\nfunction SubExpansionPanel(props) {\n return h(ExpansionPanelBase, {\n ...props,\n className: \"expansion-panel sub-expansion-panel\",\n titleComponent: \"h4\",\n });\n}\n\nfunction ExpandableDetailsPanel(props) {\n let { title, children, value, headerElement, className } = props;\n const [isOpen, setIsOpen] = useState(false);\n headerElement ??= h([h(\"div.title\", title), value]);\n return h(\"div.expandable-details\", { className }, [\n h(\"div.expandable-details-main\", [\n h(\"div.expandable-details-header\", headerElement),\n h(\"div.expandable-details-toggle\", [\n h(Button, {\n small: true,\n minimal: true,\n active: isOpen,\n onClick: () => setIsOpen(!isOpen),\n icon: \"more\",\n }),\n ]),\n ]),\n h(\n Collapse,\n { isOpen },\n h(\"div.expandable-details-children\", null, children),\n ),\n ]);\n}\n\nfunction ExpansionBody({ title, className, children }) {\n return h(\"div.expansion-body\", { className }, [\n h(\"div.expansion-panel-detail-header\", title),\n h(\"div.expansion-panel-detail-body\", null, children),\n ]);\n}\n\nexport {\n ExpansionPanel,\n ExpansionPanelSummary,\n ExpandableDetailsPanel,\n SubExpansionPanel,\n ExpansionBody,\n PanelSubhead,\n};\n"],"names":["hyper","styles","PanelSubhead","classNames","Icon","useState","Collapse","Button"],"mappings":";;;;;;;;;;;AAQA,MAAM,IAAIA,WAAAA,QAAM,OAAOC,mBAAM;AAE7B,SAA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;;;"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { PanelSubhead } from './headers';
|
|
2
|
-
declare function ExpansionPanelSummary(props: any): import('react').FunctionComponentElement<any>;
|
|
3
|
-
export declare function InfoPanelSection(props: any): import('react').ReactElement<{
|
|
4
|
-
className: any;
|
|
5
|
-
}, string | import('react').JSXElementConstructor<any>>;
|
|
6
|
-
declare function ExpansionPanel(props: any): import('react').FunctionComponentElement<any>;
|
|
7
|
-
declare function SubExpansionPanel(props: any): import('react').FunctionComponentElement<any>;
|
|
8
|
-
declare function ExpandableDetailsPanel(props: any): import('react').ReactElement<{
|
|
9
|
-
className: any;
|
|
10
|
-
}, string | import('react').JSXElementConstructor<any>>;
|
|
11
|
-
declare function ExpansionBody({ title, className, children }: {
|
|
12
|
-
title: any;
|
|
13
|
-
className: any;
|
|
14
|
-
children: any;
|
|
15
|
-
}): import('react').ReactElement<{
|
|
16
|
-
className: any;
|
|
17
|
-
}, string | import('react').JSXElementConstructor<any>>;
|
|
18
|
-
export { ExpansionPanel, ExpansionPanelSummary, ExpandableDetailsPanel, SubExpansionPanel, ExpansionBody, PanelSubhead, };
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { useState } from "react";
|
|
2
|
-
import { Button, Collapse, Icon } from "@blueprintjs/core";
|
|
3
|
-
import h$1 from "@macrostrat/hyper";
|
|
4
|
-
import styles from "./main.module.sass.js";
|
|
5
|
-
import classNames from "classnames";
|
|
6
|
-
import { PanelSubhead } from "./headers.js";
|
|
7
|
-
const h = h$1.styled(styles);
|
|
8
|
-
function ExpansionPanelSummary(props) {
|
|
9
|
-
const { expanded, children, onChange, className, title, titleComponent } = props;
|
|
10
|
-
const icon = expanded ? "chevron-up" : "chevron-down";
|
|
11
|
-
return h(
|
|
12
|
-
PanelSubhead,
|
|
13
|
-
{
|
|
14
|
-
className: classNames("expansion-panel-header", className),
|
|
15
|
-
onClick: onChange,
|
|
16
|
-
title,
|
|
17
|
-
component: titleComponent
|
|
18
|
-
},
|
|
19
|
-
[children, h(Icon, { icon, className: "expansion-panel-icon" })]
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
function ExpansionPanelBase(props) {
|
|
23
|
-
let {
|
|
24
|
-
title,
|
|
25
|
-
titleComponent = "h3",
|
|
26
|
-
children,
|
|
27
|
-
expanded,
|
|
28
|
-
helpText,
|
|
29
|
-
onChange = () => {
|
|
30
|
-
},
|
|
31
|
-
sideComponent = null,
|
|
32
|
-
className
|
|
33
|
-
} = props;
|
|
34
|
-
const [isOpen, setOpen] = useState(expanded || false);
|
|
35
|
-
const onChange_ = () => {
|
|
36
|
-
onChange();
|
|
37
|
-
setOpen(!isOpen);
|
|
38
|
-
};
|
|
39
|
-
return h(
|
|
40
|
-
"div.expansion-panel-base",
|
|
41
|
-
{
|
|
42
|
-
className: classNames(className, {
|
|
43
|
-
expanded: isOpen,
|
|
44
|
-
collapsed: !isOpen
|
|
45
|
-
})
|
|
46
|
-
},
|
|
47
|
-
[
|
|
48
|
-
h(
|
|
49
|
-
ExpansionPanelSummary,
|
|
50
|
-
{
|
|
51
|
-
onChange: onChange_,
|
|
52
|
-
expanded: isOpen,
|
|
53
|
-
title,
|
|
54
|
-
titleComponent
|
|
55
|
-
},
|
|
56
|
-
h("div.expansion-summary-title-help", [
|
|
57
|
-
h("span.expansion-panel-subtext", helpText),
|
|
58
|
-
" ",
|
|
59
|
-
sideComponent
|
|
60
|
-
])
|
|
61
|
-
),
|
|
62
|
-
h(Collapse, { isOpen }, h("div.expansion-children", null, children))
|
|
63
|
-
]
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
function InfoPanelSection(props) {
|
|
67
|
-
let { title, children, className, headerElement = null } = props;
|
|
68
|
-
return h("div.info-panel-section", { className }, [
|
|
69
|
-
h("div.panel-subhead", null, headerElement ?? h("h3", title)),
|
|
70
|
-
h("div.panel-content", null, children)
|
|
71
|
-
]);
|
|
72
|
-
}
|
|
73
|
-
function ExpansionPanel(props) {
|
|
74
|
-
return h(ExpansionPanelBase, {
|
|
75
|
-
...props,
|
|
76
|
-
className: "expansion-panel"
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
function SubExpansionPanel(props) {
|
|
80
|
-
return h(ExpansionPanelBase, {
|
|
81
|
-
...props,
|
|
82
|
-
className: "expansion-panel sub-expansion-panel",
|
|
83
|
-
titleComponent: "h4"
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
function ExpandableDetailsPanel(props) {
|
|
87
|
-
let { title, children, value, headerElement, className } = props;
|
|
88
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
89
|
-
headerElement ??= h([h("div.title", title), value]);
|
|
90
|
-
return h("div.expandable-details", { className }, [
|
|
91
|
-
h("div.expandable-details-main", [
|
|
92
|
-
h("div.expandable-details-header", headerElement),
|
|
93
|
-
h("div.expandable-details-toggle", [
|
|
94
|
-
h(Button, {
|
|
95
|
-
small: true,
|
|
96
|
-
minimal: true,
|
|
97
|
-
active: isOpen,
|
|
98
|
-
onClick: () => setIsOpen(!isOpen),
|
|
99
|
-
icon: "more"
|
|
100
|
-
})
|
|
101
|
-
])
|
|
102
|
-
]),
|
|
103
|
-
h(
|
|
104
|
-
Collapse,
|
|
105
|
-
{ isOpen },
|
|
106
|
-
h("div.expandable-details-children", null, children)
|
|
107
|
-
)
|
|
108
|
-
]);
|
|
109
|
-
}
|
|
110
|
-
function ExpansionBody({ title, className, children }) {
|
|
111
|
-
return h("div.expansion-body", { className }, [
|
|
112
|
-
h("div.expansion-panel-detail-header", title),
|
|
113
|
-
h("div.expansion-panel-detail-body", null, children)
|
|
114
|
-
]);
|
|
115
|
-
}
|
|
116
|
-
export {
|
|
117
|
-
ExpandableDetailsPanel,
|
|
118
|
-
ExpansionBody,
|
|
119
|
-
ExpansionPanel,
|
|
120
|
-
ExpansionPanelSummary,
|
|
121
|
-
InfoPanelSection,
|
|
122
|
-
PanelSubhead,
|
|
123
|
-
SubExpansionPanel
|
|
124
|
-
};
|
|
125
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/expansion-panel/index.ts"],"sourcesContent":["import { useState } from \"react\";\nimport { Collapse, Icon } from \"@blueprintjs/core\";\nimport hyper from \"@macrostrat/hyper\";\nimport styles from \"./main.module.sass\";\nimport classNames from \"classnames\";\nimport { Button } from \"@blueprintjs/core\";\nimport { PanelSubhead } from \"./headers\";\n\nconst h = hyper.styled(styles);\n\nfunction ExpansionPanelSummary(props) {\n const { expanded, children, onChange, className, title, titleComponent } =\n props;\n const icon = expanded ? \"chevron-up\" : \"chevron-down\";\n return h(\n PanelSubhead,\n {\n className: classNames(\"expansion-panel-header\", className),\n onClick: onChange,\n title,\n component: titleComponent,\n },\n [children, h(Icon, { icon, className: \"expansion-panel-icon\" })],\n );\n}\n\nfunction ExpansionPanelBase(props) {\n let {\n title,\n titleComponent = \"h3\",\n children,\n expanded,\n helpText,\n onChange = () => {},\n sideComponent = null,\n className,\n } = props;\n const [isOpen, setOpen] = useState(expanded || false);\n\n const onChange_ = () => {\n onChange();\n setOpen(!isOpen);\n };\n\n return h(\n \"div.expansion-panel-base\",\n {\n className: classNames(className, {\n expanded: isOpen,\n collapsed: !isOpen,\n }),\n },\n [\n h(\n ExpansionPanelSummary,\n {\n onChange: onChange_,\n expanded: isOpen,\n title,\n titleComponent,\n },\n h(\"div.expansion-summary-title-help\", [\n h(\"span.expansion-panel-subtext\", helpText),\n \" \",\n sideComponent,\n ]),\n ),\n h(Collapse, { isOpen }, h(\"div.expansion-children\", null, children)),\n ],\n );\n}\n\nexport function InfoPanelSection(props) {\n let { title, children, className, headerElement = null } = props;\n return h(\"div.info-panel-section\", { className }, [\n h(\"div.panel-subhead\", null, headerElement ?? h(\"h3\", title)),\n h(\"div.panel-content\", null, children),\n ]);\n}\n\nfunction ExpansionPanel(props) {\n return h(ExpansionPanelBase, {\n ...props,\n className: \"expansion-panel\",\n });\n}\n\nfunction SubExpansionPanel(props) {\n return h(ExpansionPanelBase, {\n ...props,\n className: \"expansion-panel sub-expansion-panel\",\n titleComponent: \"h4\",\n });\n}\n\nfunction ExpandableDetailsPanel(props) {\n let { title, children, value, headerElement, className } = props;\n const [isOpen, setIsOpen] = useState(false);\n headerElement ??= h([h(\"div.title\", title), value]);\n return h(\"div.expandable-details\", { className }, [\n h(\"div.expandable-details-main\", [\n h(\"div.expandable-details-header\", headerElement),\n h(\"div.expandable-details-toggle\", [\n h(Button, {\n small: true,\n minimal: true,\n active: isOpen,\n onClick: () => setIsOpen(!isOpen),\n icon: \"more\",\n }),\n ]),\n ]),\n h(\n Collapse,\n { isOpen },\n h(\"div.expandable-details-children\", null, children),\n ),\n ]);\n}\n\nfunction ExpansionBody({ title, className, children }) {\n return h(\"div.expansion-body\", { className }, [\n h(\"div.expansion-panel-detail-header\", title),\n h(\"div.expansion-panel-detail-body\", null, children),\n ]);\n}\n\nexport {\n ExpansionPanel,\n ExpansionPanelSummary,\n ExpandableDetailsPanel,\n SubExpansionPanel,\n ExpansionBody,\n PanelSubhead,\n};\n"],"names":["hyper"],"mappings":";;;;;;AAQA,MAAM,IAAIA,IAAM,OAAO,MAAM;AAE7B,SAAS,sBAAsB,OAAO;AACpC,QAAM,EAAE,UAAU,UAAU,UAAU,WAAW,OAAO,mBACtD;AACF,QAAM,OAAO,WAAW,eAAe;AACvC,SAAO;AAAA,IACL;AAAA,IACA;AAAA,MACE,WAAW,WAAW,0BAA0B,SAAS;AAAA,MACzD,SAAS;AAAA,MACT;AAAA,MACA,WAAW;AAAA,IAAA;AAAA,IAEb,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,WAAW,wBAAwB,CAAC;AAAA,EAAA;AAEnE;AAEA,SAAS,mBAAmB,OAAO;AACjC,MAAI;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW,MAAM;AAAA,IAAC;AAAA,IAClB,gBAAgB;AAAA,IAChB;AA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AkB,EAAE,CAAC,EAAE,aAAa,KAAK,GAAG,KAAK,CAAC;AAClD,SAAO,EAAE,0BAA0B,EAAE,aAAa;AAAA,IAChD,EAAE,+BAA+B;AAAA,MAC/B,EAAE,iCAAiC,aAAa;AAAA,MAChD,EAAE,iCAAiC;AAAA,QACjC,EAAE,QAAQ;AAAA,UACR,OAAO;AAAA,UACP,SAAS;AAAA,UACT,QAAQ;AAAA,UACR,SAAS,MAAM,UAAU,CAAC,MAAM;AAAA,UAChC,MAAM;AAAA,QAAA,CACP;AAAA,MAAA,CACF;AAAA,IAAA,CACF;AAAA,IACD;AAAA,MACE;AAAA,MACA,EAAE,OAAA;AAAA,MACF,EAAE,mCAAmC,MAAM,QAAQ;AAAA,IAAA;AAAA,EACrD,CACD;AACH;AAEA,SAAS,cAAc,EAAE,OAAO,WAAW,YAAY;AACrD,SAAO,EAAE,sBAAsB,EAAE,aAAa;AAAA,IAC5C,EAAE,qCAAqC,KAAK;AAAA,IAC5C,EAAE,mCAAmC,MAAM,QAAQ;AAAA,EAAA,CACpD;AACH;"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const title = "_title_1phba_23";
|
|
4
|
-
const styles = {
|
|
5
|
-
"panel-subhead": "_panel-subhead_1phba_1",
|
|
6
|
-
title,
|
|
7
|
-
"expansion-panel-icon": "_expansion-panel-icon_1phba_26",
|
|
8
|
-
"info-panel-section": "_info-panel-section_1phba_30",
|
|
9
|
-
"expansion-panel": "_expansion-panel_1phba_26",
|
|
10
|
-
"sub-expansion-panel": "_sub-expansion-panel_1phba_40",
|
|
11
|
-
"expansion-panel-header": "_expansion-panel-header_1phba_44",
|
|
12
|
-
"expansion-summary-title-help": "_expansion-summary-title-help_1phba_66",
|
|
13
|
-
"expansion-children": "_expansion-children_1phba_83",
|
|
14
|
-
"expansion-panel-subtext": "_expansion-panel-subtext_1phba_100",
|
|
15
|
-
"expandable-details-main": "_expandable-details-main_1phba_116",
|
|
16
|
-
"expandable-details-header": "_expandable-details-header_1phba_124",
|
|
17
|
-
"expandable-details-children": "_expandable-details-children_1phba_131",
|
|
18
|
-
"expandable-details-toggle": "_expandable-details-toggle_1phba_135",
|
|
19
|
-
"expandable-details": "_expandable-details_1phba_116",
|
|
20
|
-
"macrostrat-unit": "_macrostrat-unit_1phba_139",
|
|
21
|
-
"expansion-body": "_expansion-body_1phba_149",
|
|
22
|
-
"expansion-panel-detail-header": "_expansion-panel-detail-header_1phba_160",
|
|
23
|
-
"expansion-panel-detail-body": "_expansion-panel-detail-body_1phba_171"
|
|
24
|
-
};
|
|
25
|
-
exports.default = styles;
|
|
26
|
-
exports.title = title;
|
|
27
|
-
//# sourceMappingURL=main.module.sass.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"main.module.sass.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
const title = "_title_1phba_23";
|
|
2
|
-
const styles = {
|
|
3
|
-
"panel-subhead": "_panel-subhead_1phba_1",
|
|
4
|
-
title,
|
|
5
|
-
"expansion-panel-icon": "_expansion-panel-icon_1phba_26",
|
|
6
|
-
"info-panel-section": "_info-panel-section_1phba_30",
|
|
7
|
-
"expansion-panel": "_expansion-panel_1phba_26",
|
|
8
|
-
"sub-expansion-panel": "_sub-expansion-panel_1phba_40",
|
|
9
|
-
"expansion-panel-header": "_expansion-panel-header_1phba_44",
|
|
10
|
-
"expansion-summary-title-help": "_expansion-summary-title-help_1phba_66",
|
|
11
|
-
"expansion-children": "_expansion-children_1phba_83",
|
|
12
|
-
"expansion-panel-subtext": "_expansion-panel-subtext_1phba_100",
|
|
13
|
-
"expandable-details-main": "_expandable-details-main_1phba_116",
|
|
14
|
-
"expandable-details-header": "_expandable-details-header_1phba_124",
|
|
15
|
-
"expandable-details-children": "_expandable-details-children_1phba_131",
|
|
16
|
-
"expandable-details-toggle": "_expandable-details-toggle_1phba_135",
|
|
17
|
-
"expandable-details": "_expandable-details_1phba_116",
|
|
18
|
-
"macrostrat-unit": "_macrostrat-unit_1phba_139",
|
|
19
|
-
"expansion-body": "_expansion-body_1phba_149",
|
|
20
|
-
"expansion-panel-detail-header": "_expansion-panel-detail-header_1phba_160",
|
|
21
|
-
"expansion-panel-detail-body": "_expansion-panel-detail-body_1phba_171"
|
|
22
|
-
};
|
|
23
|
-
export {
|
|
24
|
-
styles as default,
|
|
25
|
-
title
|
|
26
|
-
};
|
|
27
|
-
//# sourceMappingURL=main.module.sass.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"main.module.sass.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const hexToRgb = (hex, opacity) => {
|
|
4
|
-
if (!hex) {
|
|
5
|
-
return "rgba(0,0,0,0.3)";
|
|
6
|
-
}
|
|
7
|
-
hex = hex.replace("#", "");
|
|
8
|
-
let bigint = parseInt(hex, 16);
|
|
9
|
-
let r = bigint >> 16 & 255;
|
|
10
|
-
let g = bigint >> 8 & 255;
|
|
11
|
-
let b = bigint & 255;
|
|
12
|
-
return `rgba(${r},${g},${b},${opacity})`;
|
|
13
|
-
};
|
|
14
|
-
exports.hexToRgb = hexToRgb;
|
|
15
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/location-details/utils/index.ts"],"sourcesContent":["export const sum = (data, prop) => {\n if (!data || !data.length) {\n return [];\n }\n return data\n .map((d) => {\n return d[prop];\n })\n .reduce((a, b) => {\n return a + b;\n }, 0);\n};\n\nexport const hexToRgb = (hex, opacity) => {\n if (!hex) {\n return \"rgba(0,0,0,0.3)\";\n }\n hex = hex.replace(\"#\", \"\");\n let bigint = parseInt(hex, 16);\n let r = (bigint >> 16) & 255;\n let g = (bigint >> 8) & 255;\n let b = bigint & 255;\n return `rgba(${r},${g},${b},${opacity || 0.8})`;\n};\n\nexport type TimescaleDivision = {\n name: string;\n abbrev: string;\n t_age: number;\n b_age: number;\n color: string;\n};\n\nexport const timescale: TimescaleDivision[] = [\n { name: \"Quaternary\", abbrev: \"Q\", t_age: 0, b_age: 2.588, color: \"#F9F97F\" },\n {\n name: \"Neogene\",\n abbrev: \"Ng\",\n t_age: 2.588,\n b_age: 23.03,\n color: \"#FFE619\",\n },\n {\n name: \"Paleogene\",\n abbrev: \"Pg\",\n t_age: 23.03,\n b_age: 66,\n color: \"#FD9A52\",\n },\n { name: \"Cretaceous\", abbrev: \"K\", t_age: 66, b_age: 145, color: \"#7FC64E\" },\n { name: \"Jurassic\", abbrev: \"J\", t_age: 145, b_age: 201.3, color: \"#34B2C9\" },\n {\n name: \"Triassic\",\n abbrev: \"Tr\",\n t_age: 201.3,\n b_age: 252.17,\n color: \"#812B92\",\n },\n {\n name: \"Permian\",\n abbrev: \"P\",\n t_age: 252.17,\n b_age: 298.9,\n color: \"#F04028\",\n },\n {\n name: \"Carboniferous\",\n abbrev: \"C\",\n t_age: 298.9,\n b_age: 358.9,\n color: \"#67A599\",\n },\n {\n name: \"Devonian\",\n abbrev: \"D\",\n t_age: 358.9,\n b_age: 419.2,\n color: \"#CB8C37\",\n },\n {\n name: \"Silurian\",\n abbrev: \"S\",\n t_age: 419.2,\n b_age: 443.8,\n color: \"#B3E1B6\",\n },\n {\n name: \"Ordovician\",\n abbrev: \"O\",\n t_age: 443.8,\n b_age: 485.4,\n color: \"#009270\",\n },\n {\n name: \"Cambrian\",\n abbrev: \"Cm\",\n t_age: 485.4,\n b_age: 541,\n color: \"#7FA056\",\n },\n { name: \"Ediacaran\", abbrev: \"E\", t_age: 541, b_age: 635, color: \"#FFC3E1\" },\n {\n name: \"Cryogenian\",\n abbrev: \"Cr\",\n t_age: 635,\n b_age: 720,\n color: \"#FFAFD7\",\n },\n { name: \"Tonian\", abbrev: \"T\", t_age: 720, b_age: 1000, color: \"#FFA5D2\" },\n { name: \"Stenian\", abbrev: \"St\", t_age: 1000, b_age: 1200, color: \"#FFA5D2\" },\n {\n name: \"Ectasian\",\n abbrev: \"Ec\",\n t_age: 1200,\n b_age: 1400,\n color: \"#FF98CC\",\n },\n {\n name: \"Calymmian\",\n abbrev: \"Ca\",\n t_age: 1400,\n b_age: 1600,\n color: \"#FF8BC5\",\n },\n {\n name: \"Statherian\",\n abbrev: \"St\",\n t_age: 1600,\n b_age: 1800,\n color: \"#EE93C1\",\n },\n {\n name: \"Orosirian\",\n abbrev: \"Or\",\n t_age: 1800,\n b_age: 2050,\n color: \"#E874AF\",\n },\n { name: \"Rhyacian\", abbrev: \"R\", t_age: 2050, b_age: 2300, color: \"#EB84B8\" },\n {\n name: \"Siderian\",\n abbrev: \"Sd\",\n t_age: 2300,\n b_age: 2500,\n color: \"#E874AF\",\n },\n];\n\nexport * from \"./fossils\";\nexport * from \"./formatting\";\n"],"names":[],"mappings":";;AAaO,MAAM,WAAW,CAAC,KAAK,YAAY;AACxC,MAAI,CAAC,KAAK;AACR,WAAO;AAAA,EACT;AACA,QAAM,IAAI,QAAQ,KAAK,EAAE;AACzB,MAAI,SAAS,SAAS,KAAK,EAAE;AAC7B,MAAI,IAAK,UAAU,KAAM;AACzB,MAAI,IAAK,UAAU,IAAK;AACxB,MAAI,IAAI,SAAS;AACjB,SAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,OAAc;AAC9C;;"}
|