@macrostrat/column-views 3.11.0 → 3.12.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 +184 -0
- package/dist/age-axis.cjs +1 -2
- package/dist/age-axis.cjs.map +1 -1
- package/dist/age-axis.js +1 -2
- package/dist/age-axis.js.map +1 -1
- package/dist/age-model/data.cjs +57 -0
- package/dist/age-model/data.cjs.map +1 -0
- package/dist/age-model/data.d.ts +29 -0
- package/dist/age-model/data.js +57 -0
- package/dist/age-model/data.js.map +1 -0
- package/dist/age-model/details.cjs +260 -0
- package/dist/age-model/details.cjs.map +1 -0
- package/dist/age-model/details.d.ts +39 -0
- package/dist/age-model/details.js +257 -0
- package/dist/age-model/details.js.map +1 -0
- package/dist/age-model/details.module.sass.cjs +42 -0
- package/dist/age-model/details.module.sass.cjs.map +1 -0
- package/dist/age-model/details.module.sass.js +40 -0
- package/dist/age-model/details.module.sass.js.map +1 -0
- package/dist/age-model/index.d.ts +5 -0
- package/dist/age-model/legacy.cjs +28 -0
- package/dist/age-model/legacy.cjs.map +1 -0
- package/dist/age-model/legacy.d.ts +6 -0
- package/dist/age-model/legacy.js +26 -0
- package/dist/age-model/legacy.js.map +1 -0
- package/dist/age-model/surfaces.cjs +354 -0
- package/dist/age-model/surfaces.cjs.map +1 -0
- package/dist/age-model/surfaces.d.ts +68 -0
- package/dist/age-model/surfaces.js +351 -0
- package/dist/age-model/surfaces.js.map +1 -0
- package/dist/age-model/surfaces.module.sass.cjs +45 -0
- package/dist/age-model/surfaces.module.sass.cjs.map +1 -0
- package/dist/age-model/surfaces.module.sass.js +43 -0
- package/dist/age-model/surfaces.module.sass.js.map +1 -0
- package/dist/age-model/types.cjs +229 -0
- package/dist/age-model/types.cjs.map +1 -0
- package/dist/age-model/types.d.ts +112 -0
- package/dist/age-model/types.js +229 -0
- package/dist/age-model/types.js.map +1 -0
- package/dist/column-views.css +406 -74
- package/dist/column.cjs +20 -13
- package/dist/column.cjs.map +1 -1
- package/dist/column.d.ts +21 -6
- package/dist/column.js +21 -14
- package/dist/column.js.map +1 -1
- package/dist/column.module.sass.cjs +19 -15
- package/dist/column.module.sass.cjs.map +1 -1
- package/dist/column.module.sass.js +19 -15
- package/dist/column.module.sass.js.map +1 -1
- package/dist/data-provider/store.cjs +34 -1
- package/dist/data-provider/store.cjs.map +1 -1
- package/dist/data-provider/store.d.ts +5 -0
- package/dist/data-provider/store.js +35 -2
- package/dist/data-provider/store.js.map +1 -1
- package/dist/index.cjs +78 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +55 -4
- package/dist/index.js.map +1 -1
- package/dist/notes.cjs +11 -2
- package/dist/notes.cjs.map +1 -1
- package/dist/notes.d.ts +11 -1
- package/dist/notes.js +11 -2
- package/dist/notes.js.map +1 -1
- package/dist/prepare-units/composite-scale.cjs +18 -16
- package/dist/prepare-units/composite-scale.cjs.map +1 -1
- package/dist/prepare-units/composite-scale.js +18 -16
- package/dist/prepare-units/composite-scale.js.map +1 -1
- package/dist/prepare-units/density.cjs +83 -0
- package/dist/prepare-units/density.cjs.map +1 -0
- package/dist/prepare-units/density.d.ts +92 -0
- package/dist/prepare-units/density.js +83 -0
- package/dist/prepare-units/density.js.map +1 -0
- package/dist/prepare-units/index.cjs +15 -7
- package/dist/prepare-units/index.cjs.map +1 -1
- package/dist/prepare-units/index.d.ts +1 -0
- package/dist/prepare-units/index.js +15 -7
- package/dist/prepare-units/index.js.map +1 -1
- package/dist/prepare-units/types.cjs.map +1 -1
- package/dist/prepare-units/types.d.ts +34 -13
- package/dist/prepare-units/types.js.map +1 -1
- package/dist/section.cjs +108 -24
- package/dist/section.cjs.map +1 -1
- package/dist/section.d.ts +66 -6
- package/dist/section.js +109 -25
- package/dist/section.js.map +1 -1
- package/dist/timescale-zoom.cjs +191 -0
- package/dist/timescale-zoom.cjs.map +1 -0
- package/dist/timescale-zoom.d.ts +74 -0
- package/dist/timescale-zoom.js +191 -0
- package/dist/timescale-zoom.js.map +1 -0
- package/dist/unit-details/age-range.cjs +14 -43
- package/dist/unit-details/age-range.cjs.map +1 -1
- package/dist/unit-details/age-range.d.ts +1 -13
- package/dist/unit-details/age-range.js +6 -43
- package/dist/unit-details/age-range.js.map +1 -1
- package/dist/unit-details/utils.cjs +0 -5
- package/dist/unit-details/utils.cjs.map +1 -1
- package/dist/unit-details/utils.js +0 -5
- package/dist/unit-details/utils.js.map +1 -1
- package/dist/units/composite.cjs +4 -1
- package/dist/units/composite.cjs.map +1 -1
- package/dist/units/composite.d.ts +2 -0
- package/dist/units/composite.js +4 -1
- package/dist/units/composite.js.map +1 -1
- package/package.json +8 -8
- package/src/age-model/data.ts +98 -0
- package/src/age-model/details.module.sass +108 -0
- package/src/age-model/details.ts +333 -0
- package/src/age-model/index.ts +5 -0
- package/src/age-model/legacy.ts +30 -0
- package/src/age-model/surfaces.module.sass +168 -0
- package/src/age-model/surfaces.ts +568 -0
- package/src/age-model/types.ts +392 -0
- package/src/column.module.sass +59 -8
- package/src/column.ts +49 -23
- package/src/data-provider/store.ts +50 -1
- package/src/index.ts +5 -1
- package/src/notes.ts +20 -2
- package/src/prepare-units/composite-scale.ts +34 -31
- package/src/prepare-units/density.ts +197 -0
- package/src/prepare-units/index.ts +25 -6
- package/src/prepare-units/types.ts +34 -13
- package/src/section.ts +219 -33
- package/src/timescale-zoom.ts +341 -0
- package/src/unit-details/age-range.ts +12 -58
- package/src/units/composite.ts +11 -0
- package/dist/age-model-overlay.cjs +0 -50
- package/dist/age-model-overlay.cjs.map +0 -1
- package/dist/age-model-overlay.d.ts +0 -24
- package/dist/age-model-overlay.js +0 -48
- package/dist/age-model-overlay.js.map +0 -1
- package/dist/age-model-overlay.module.sass.cjs +0 -12
- package/dist/age-model-overlay.module.sass.cjs.map +0 -1
- package/dist/age-model-overlay.module.sass.js +0 -11
- package/dist/age-model-overlay.module.sass.js.map +0 -1
- package/src/age-model-overlay.module.sass +0 -11
- package/src/age-model-overlay.ts +0 -96
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const h$1 = require("@macrostrat/hyper");
|
|
4
|
+
const classNames = require("classnames");
|
|
5
|
+
const React = require("react");
|
|
6
|
+
const core = require("@blueprintjs/core");
|
|
7
|
+
const dataComponents = require("@macrostrat/data-components");
|
|
8
|
+
const dataProvider = require("@macrostrat/data-provider");
|
|
9
|
+
const panel = require("../unit-details/panel.cjs");
|
|
10
|
+
const surfaces = require("./surfaces.cjs");
|
|
11
|
+
const surfaces_module = require("./surfaces.module.sass.cjs");
|
|
12
|
+
const details_module = require("./details.module.sass.cjs");
|
|
13
|
+
const types = require("./types.cjs");
|
|
14
|
+
const store = require("../data-provider/store.cjs");
|
|
15
|
+
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
16
|
+
const h__default = /* @__PURE__ */ _interopDefault(h$1);
|
|
17
|
+
const classNames__default = /* @__PURE__ */ _interopDefault(classNames);
|
|
18
|
+
const h = h__default.default.styled({ ...surfaces_module.default, ...details_module.default });
|
|
19
|
+
function SurfaceDetailsPanel(props) {
|
|
20
|
+
const {
|
|
21
|
+
surface,
|
|
22
|
+
onClose,
|
|
23
|
+
onSelectUnit,
|
|
24
|
+
actions,
|
|
25
|
+
positionLabel = "Position",
|
|
26
|
+
className
|
|
27
|
+
} = props;
|
|
28
|
+
if (surface == null) {
|
|
29
|
+
return h(
|
|
30
|
+
"div.surface-details-panel.no-surface",
|
|
31
|
+
{ className },
|
|
32
|
+
h("p.placeholder", "No surface selected.")
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
let closeButton = null;
|
|
36
|
+
if (onClose != null) {
|
|
37
|
+
closeButton = h(core.Button, {
|
|
38
|
+
icon: "cross",
|
|
39
|
+
variant: "minimal",
|
|
40
|
+
size: "small",
|
|
41
|
+
onClick: onClose,
|
|
42
|
+
"aria-label": "Close"
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
let positionField = null;
|
|
46
|
+
if (surface.position != null) {
|
|
47
|
+
positionField = h(dataComponents.DataField, {
|
|
48
|
+
label: positionLabel,
|
|
49
|
+
value: surface.position.toLocaleString("en-US", {
|
|
50
|
+
maximumFractionDigits: 2
|
|
51
|
+
}),
|
|
52
|
+
unit: "m"
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
let sectionField = null;
|
|
56
|
+
if (surface.section_id != null) {
|
|
57
|
+
sectionField = h(
|
|
58
|
+
dataComponents.DataField,
|
|
59
|
+
{ label: "Section" },
|
|
60
|
+
h(dataComponents.Identifier, { id: surface.section_id })
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
let refsField = null;
|
|
64
|
+
if (surface.ref_id != null) {
|
|
65
|
+
refsField = h(panel.ReferencesField, { refs: [surface.ref_id] });
|
|
66
|
+
}
|
|
67
|
+
return h(
|
|
68
|
+
"div.surface-details-panel",
|
|
69
|
+
{ className: classNames__default.default(className, surfaces.surfaceClasses(surface)) },
|
|
70
|
+
[
|
|
71
|
+
h("div.surface-details-header", [
|
|
72
|
+
h("h3.surface-details-title", [
|
|
73
|
+
"Surface ",
|
|
74
|
+
h(SurfaceIdentifier, { id: surface.id })
|
|
75
|
+
]),
|
|
76
|
+
h("div.surface-details-tags", [
|
|
77
|
+
h(SurfaceStatusTag, {
|
|
78
|
+
status: surface.status,
|
|
79
|
+
inferred: surface.statusInferred
|
|
80
|
+
}),
|
|
81
|
+
h(SurfaceTypeTag, { type: surface.type })
|
|
82
|
+
]),
|
|
83
|
+
h("div.spacer"),
|
|
84
|
+
actions,
|
|
85
|
+
closeButton
|
|
86
|
+
]),
|
|
87
|
+
h("div.surface-details-content", [
|
|
88
|
+
h(dataComponents.DataField, { label: "Model age" }, h(dataComponents.AgeLabel, { age: surface.age })),
|
|
89
|
+
h(SurfaceCalibrationField, { surface }),
|
|
90
|
+
positionField,
|
|
91
|
+
h(SurfaceUnitsField, {
|
|
92
|
+
label: "Unit above",
|
|
93
|
+
unitIDs: surface.unitsAbove,
|
|
94
|
+
onSelectUnit
|
|
95
|
+
}),
|
|
96
|
+
h(SurfaceUnitsField, {
|
|
97
|
+
label: "Unit below",
|
|
98
|
+
unitIDs: surface.unitsBelow,
|
|
99
|
+
onSelectUnit
|
|
100
|
+
}),
|
|
101
|
+
sectionField,
|
|
102
|
+
refsField
|
|
103
|
+
])
|
|
104
|
+
]
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
function SurfaceIdentifier({ id }) {
|
|
108
|
+
if (typeof id === "number") {
|
|
109
|
+
return h(dataComponents.Identifier, { id });
|
|
110
|
+
}
|
|
111
|
+
return h("code.surface-id", String(id));
|
|
112
|
+
}
|
|
113
|
+
function SurfaceCalibrationField({ surface }) {
|
|
114
|
+
const { calibration, proportion } = surface;
|
|
115
|
+
const ids = React.useMemo(() => {
|
|
116
|
+
if (calibration == null) return [];
|
|
117
|
+
return [calibration.id];
|
|
118
|
+
}, [calibration?.id]);
|
|
119
|
+
const intervalMap = dataProvider.useMacrostratDefs("intervals", ids, null);
|
|
120
|
+
if (calibration == null) {
|
|
121
|
+
return h(dataComponents.DataField, {
|
|
122
|
+
label: "Calibration",
|
|
123
|
+
value: "None",
|
|
124
|
+
className: "no-calibration"
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
const def = intervalMap?.get(calibration.id);
|
|
128
|
+
const interval = {
|
|
129
|
+
id: calibration.id,
|
|
130
|
+
name: calibration.name,
|
|
131
|
+
b_age: calibration.b_age,
|
|
132
|
+
t_age: calibration.t_age,
|
|
133
|
+
color: def?.color,
|
|
134
|
+
rank: def?.rank
|
|
135
|
+
};
|
|
136
|
+
return h(dataComponents.DataField, { label: "Calibration" }, [
|
|
137
|
+
h(
|
|
138
|
+
"div.calibration-interval",
|
|
139
|
+
h(dataComponents.IntervalTag, {
|
|
140
|
+
interval,
|
|
141
|
+
proportion
|
|
142
|
+
})
|
|
143
|
+
)
|
|
144
|
+
]);
|
|
145
|
+
}
|
|
146
|
+
function SurfaceUnitsField({
|
|
147
|
+
label,
|
|
148
|
+
unitIDs,
|
|
149
|
+
onSelectUnit
|
|
150
|
+
}) {
|
|
151
|
+
const unitsMap = store.useColumnUnitsMap();
|
|
152
|
+
if (unitIDs.length === 0) {
|
|
153
|
+
return h(dataComponents.DataField, { label, value: "None", className: "no-units" });
|
|
154
|
+
}
|
|
155
|
+
return h(
|
|
156
|
+
dataComponents.DataField,
|
|
157
|
+
{ label, className: "surface-units-field" },
|
|
158
|
+
h(
|
|
159
|
+
"ul.surface-units-list",
|
|
160
|
+
unitIDs.map((unitID) => {
|
|
161
|
+
const unit = unitsMap?.get(unitID);
|
|
162
|
+
let onClick = void 0;
|
|
163
|
+
if (onSelectUnit != null) {
|
|
164
|
+
onClick = () => onSelectUnit(unitID);
|
|
165
|
+
}
|
|
166
|
+
return h(
|
|
167
|
+
"li",
|
|
168
|
+
{ key: unitID },
|
|
169
|
+
h(dataComponents.UnitIdentifier, {
|
|
170
|
+
unitID,
|
|
171
|
+
colID: unit?.col_id,
|
|
172
|
+
name: unit?.unit_name,
|
|
173
|
+
onClick
|
|
174
|
+
})
|
|
175
|
+
);
|
|
176
|
+
})
|
|
177
|
+
)
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
function SurfaceStatusTag({
|
|
181
|
+
status,
|
|
182
|
+
inferred = false,
|
|
183
|
+
className
|
|
184
|
+
}) {
|
|
185
|
+
let label = types.surfaceStatusLabels[status] ?? status;
|
|
186
|
+
let title = types.surfaceStatusDescriptions[status];
|
|
187
|
+
if (inferred) {
|
|
188
|
+
label = [label, h("span.inferred-marker", "*")];
|
|
189
|
+
title = INFERRED_STATUS_DESCRIPTION;
|
|
190
|
+
}
|
|
191
|
+
return h(
|
|
192
|
+
core.Tag,
|
|
193
|
+
{
|
|
194
|
+
variant: "minimal",
|
|
195
|
+
className: classNames__default.default(
|
|
196
|
+
"surface-tag",
|
|
197
|
+
className,
|
|
198
|
+
surfaces.surfaceClasses({ status }),
|
|
199
|
+
{ inferred }
|
|
200
|
+
),
|
|
201
|
+
title
|
|
202
|
+
},
|
|
203
|
+
label
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
const INFERRED_STATUS_DESCRIPTION = "Recorded as modeled, but this surface cannot have been interpolated — it sits on the base or top of its interval, or is the edge of a gap-bound package — so it constrains the age model rather than falling out of it";
|
|
207
|
+
function SurfaceTypeTag({
|
|
208
|
+
type,
|
|
209
|
+
className
|
|
210
|
+
}) {
|
|
211
|
+
if (type == null || type === "") return null;
|
|
212
|
+
return h(
|
|
213
|
+
core.Tag,
|
|
214
|
+
{
|
|
215
|
+
variant: "minimal",
|
|
216
|
+
className: classNames__default.default("surface-tag", "surface-type-tag", className)
|
|
217
|
+
},
|
|
218
|
+
type
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
function SurfaceStatusLegend(props) {
|
|
222
|
+
const {
|
|
223
|
+
statuses = types.surfaceStatuses,
|
|
224
|
+
showDescriptions = false,
|
|
225
|
+
className
|
|
226
|
+
} = props;
|
|
227
|
+
return h(
|
|
228
|
+
"ul.surface-status-legend",
|
|
229
|
+
{
|
|
230
|
+
className: classNames__default.default(className, {
|
|
231
|
+
"with-descriptions": showDescriptions
|
|
232
|
+
})
|
|
233
|
+
},
|
|
234
|
+
statuses.map((status) => {
|
|
235
|
+
let description = null;
|
|
236
|
+
if (showDescriptions) {
|
|
237
|
+
description = h(
|
|
238
|
+
"div.legend-description",
|
|
239
|
+
types.surfaceStatusDescriptions[status]
|
|
240
|
+
);
|
|
241
|
+
}
|
|
242
|
+
return h(
|
|
243
|
+
"li.legend-item",
|
|
244
|
+
{ key: status, className: surfaces.surfaceClasses({ status }) },
|
|
245
|
+
[
|
|
246
|
+
h("div.surface-label-marker"),
|
|
247
|
+
h("div.legend-text", [
|
|
248
|
+
h("div.legend-label", types.surfaceStatusLabels[status]),
|
|
249
|
+
description
|
|
250
|
+
])
|
|
251
|
+
]
|
|
252
|
+
);
|
|
253
|
+
})
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
exports.SurfaceDetailsPanel = SurfaceDetailsPanel;
|
|
257
|
+
exports.SurfaceStatusLegend = SurfaceStatusLegend;
|
|
258
|
+
exports.SurfaceStatusTag = SurfaceStatusTag;
|
|
259
|
+
exports.SurfaceTypeTag = SurfaceTypeTag;
|
|
260
|
+
//# sourceMappingURL=details.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"details.cjs","sources":["../../src/age-model/details.ts"],"sourcesContent":["/** The inspector for a selected surface, and the small tags and legend that\n * explain surface statuses and types. */\nimport hyper from \"@macrostrat/hyper\";\nimport classNames from \"classnames\";\nimport { type ReactNode, useMemo } from \"react\";\nimport { Button, Tag } from \"@blueprintjs/core\";\nimport {\n DataField,\n Identifier,\n type IntervalShort,\n IntervalTag,\n UnitIdentifier,\n Value,\n} from \"@macrostrat/data-components\";\nimport { useMacrostratDefs } from \"@macrostrat/data-provider\";\nimport type { UnitLong } from \"@macrostrat/api-types\";\nimport { useColumnUnitsMap } from \"../data-provider\";\nimport { AgeLabel } from \"../unit-details/age-range\";\nimport { formatRange } from \"../unit-details/utils\";\nimport { ReferencesField } from \"../unit-details/panel\";\nimport { surfaceClasses } from \"./surfaces\";\nimport surfaceStyles from \"./surfaces.module.sass\";\nimport styles from \"./details.module.sass\";\nimport {\n type BoundaryType,\n type ColumnSurface,\n type SurfaceStatus,\n formatProportion,\n surfaceStatuses,\n surfaceStatusDescriptions,\n surfaceStatusLabels,\n} from \"./types\";\n\nconst h = hyper.styled({ ...surfaceStyles, ...styles });\n\nexport interface SurfaceDetailsPanelProps {\n /** The surface to inspect; `null` renders the panel's empty state */\n surface: ColumnSurface | null;\n onClose?: () => void;\n /** Called when a unit above or below the surface is clicked */\n onSelectUnit?: (unitID: number) => void;\n /** Extra controls for the header */\n actions?: ReactNode;\n /** Label for the measured-position field (\"Height\" or \"Depth\") */\n positionLabel?: string;\n className?: string;\n}\n\n/** Details of one surface: its age, calibration, the units it separates, and\n * provenance. A companion to `UnitDetailsPanel`. */\nexport function SurfaceDetailsPanel(props: SurfaceDetailsPanelProps) {\n const {\n surface,\n onClose,\n onSelectUnit,\n actions,\n positionLabel = \"Position\",\n className,\n } = props;\n\n // A selection that hasn't been made yet is an ordinary state for a panel\n // bound to one, not a caller error\n if (surface == null) {\n return h(\n \"div.surface-details-panel.no-surface\",\n { className },\n h(\"p.placeholder\", \"No surface selected.\"),\n );\n }\n\n let closeButton: ReactNode = null;\n if (onClose != null) {\n closeButton = h(Button, {\n icon: \"cross\",\n variant: \"minimal\",\n size: \"small\",\n onClick: onClose,\n \"aria-label\": \"Close\",\n });\n }\n\n let positionField: ReactNode = null;\n if (surface.position != null) {\n positionField = h(DataField, {\n label: positionLabel,\n value: surface.position.toLocaleString(\"en-US\", {\n maximumFractionDigits: 2,\n }),\n unit: \"m\",\n });\n }\n\n let sectionField: ReactNode = null;\n if (surface.section_id != null) {\n sectionField = h(\n DataField,\n { label: \"Section\" },\n h(Identifier, { id: surface.section_id }),\n );\n }\n\n let refsField: ReactNode = null;\n if (surface.ref_id != null) {\n refsField = h(ReferencesField, { refs: [surface.ref_id] });\n }\n\n return h(\n \"div.surface-details-panel\",\n { className: classNames(className, surfaceClasses(surface)) },\n [\n h(\"div.surface-details-header\", [\n h(\"h3.surface-details-title\", [\n \"Surface \",\n h(SurfaceIdentifier, { id: surface.id }),\n ]),\n h(\"div.surface-details-tags\", [\n h(SurfaceStatusTag, {\n status: surface.status,\n inferred: surface.statusInferred,\n }),\n h(SurfaceTypeTag, { type: surface.type }),\n ]),\n h(\"div.spacer\"),\n actions,\n closeButton,\n ]),\n h(\"div.surface-details-content\", [\n h(DataField, { label: \"Model age\" }, h(AgeLabel, { age: surface.age })),\n h(SurfaceCalibrationField, { surface }),\n positionField,\n h(SurfaceUnitsField, {\n label: \"Unit above\",\n unitIDs: surface.unitsAbove,\n onSelectUnit,\n }),\n h(SurfaceUnitsField, {\n label: \"Unit below\",\n unitIDs: surface.unitsBelow,\n onSelectUnit,\n }),\n sectionField,\n refsField,\n ]),\n ],\n );\n}\n\nfunction SurfaceIdentifier({ id }: { id: ColumnSurface[\"id\"] }) {\n if (typeof id === \"number\") {\n return h(Identifier, { id });\n }\n return h(\"code.surface-id\", String(id));\n}\n\n/** The calibration interval as a colored tag, with the surface's position in\n * it: \"Calymmian (1600–1400 Ma), 85% above base\". */\nfunction SurfaceCalibrationField({ surface }: { surface: ColumnSurface }) {\n const { calibration, proportion } = surface;\n const ids = useMemo(() => {\n if (calibration == null) return [];\n return [calibration.id];\n }, [calibration?.id]);\n // Interval colors come from the definitions table; the age model itself\n // doesn't carry them\n const intervalMap = useMacrostratDefs(\"intervals\", ids, null);\n\n if (calibration == null) {\n return h(DataField, {\n label: \"Calibration\",\n value: \"None\",\n className: \"no-calibration\",\n });\n }\n\n const def = intervalMap?.get(calibration.id);\n const interval: IntervalShort = {\n id: calibration.id,\n name: calibration.name,\n b_age: calibration.b_age,\n t_age: calibration.t_age,\n color: def?.color,\n rank: def?.rank,\n };\n\n return h(DataField, { label: \"Calibration\" }, [\n h(\n \"div.calibration-interval\",\n h(IntervalTag, {\n interval,\n proportion,\n }),\n ),\n ]);\n}\n\nfunction SurfaceUnitsField({\n label,\n unitIDs,\n onSelectUnit,\n}: {\n label: string;\n unitIDs: number[];\n onSelectUnit?: (unitID: number) => void;\n}) {\n const unitsMap = useColumnUnitsMap();\n if (unitIDs.length === 0) {\n return h(DataField, { label, value: \"None\", className: \"no-units\" });\n }\n return h(\n DataField,\n { label, className: \"surface-units-field\" },\n h(\n \"ul.surface-units-list\",\n unitIDs.map((unitID) => {\n const unit = unitsMap?.get(unitID) as UnitLong | undefined;\n let onClick: (() => void) | undefined = undefined;\n if (onSelectUnit != null) {\n onClick = () => onSelectUnit(unitID);\n }\n return h(\n \"li\",\n { key: unitID },\n h(UnitIdentifier, {\n unitID,\n colID: unit?.col_id,\n name: unit?.unit_name,\n onClick,\n }),\n );\n }),\n ),\n );\n}\n\nexport function SurfaceStatusTag({\n status,\n inferred = false,\n className,\n}: {\n status: SurfaceStatus;\n /** The status was inferred rather than recorded (see\n * `inferTiePointStatuses`); the tag says so. */\n inferred?: boolean;\n className?: string;\n}) {\n let label: ReactNode = surfaceStatusLabels[status] ?? status;\n let title = surfaceStatusDescriptions[status];\n if (inferred) {\n label = [label, h(\"span.inferred-marker\", \"*\")];\n title = INFERRED_STATUS_DESCRIPTION;\n }\n\n return h(\n Tag,\n {\n variant: \"minimal\",\n className: classNames(\n \"surface-tag\",\n className,\n surfaceClasses({ status }),\n { inferred },\n ),\n title,\n },\n label,\n );\n}\n\nconst INFERRED_STATUS_DESCRIPTION =\n \"Recorded as modeled, but this surface cannot have been interpolated — it \" +\n \"sits on the base or top of its interval, or is the edge of a gap-bound \" +\n \"package — so it constrains the age model rather than falling out of it\";\n\nexport function SurfaceTypeTag({\n type,\n className,\n}: {\n type: BoundaryType | null | undefined;\n className?: string;\n}) {\n if (type == null || type === \"\") return null;\n return h(\n Tag,\n {\n variant: \"minimal\",\n className: classNames(\"surface-tag\", \"surface-type-tag\", className),\n },\n type,\n );\n}\n\nexport interface SurfaceStatusLegendProps {\n statuses?: SurfaceStatus[];\n showDescriptions?: boolean;\n className?: string;\n}\n\n/** A legend of surface line styles, one entry per boundary status. */\nexport function SurfaceStatusLegend(props: SurfaceStatusLegendProps) {\n const {\n statuses = surfaceStatuses,\n showDescriptions = false,\n className,\n } = props;\n return h(\n \"ul.surface-status-legend\",\n {\n className: classNames(className, {\n \"with-descriptions\": showDescriptions,\n }),\n },\n statuses.map((status) => {\n let description: ReactNode = null;\n if (showDescriptions) {\n description = h(\n \"div.legend-description\",\n surfaceStatusDescriptions[status],\n );\n }\n return h(\n \"li.legend-item\",\n { key: status, className: surfaceClasses({ status }) },\n [\n h(\"div.surface-label-marker\"),\n h(\"div.legend-text\", [\n h(\"div.legend-label\", surfaceStatusLabels[status]),\n description,\n ]),\n ],\n );\n }),\n );\n}\n"],"names":["hyper","surfaceStyles","styles","Button","DataField","Identifier","ReferencesField","classNames","surfaceClasses","AgeLabel","useMemo","useMacrostratDefs","IntervalTag","useColumnUnitsMap","UnitIdentifier","surfaceStatusLabels","surfaceStatusDescriptions","Tag","surfaceStatuses"],"mappings":";;;;;;;;;;;;;;;;;AAiCA,MAAM,IAAIA,WAAAA,QAAM,OAAO,EAAE,GAAGC,gBAAAA,SAAe,GAAGC,eAAAA,SAAQ;AAiB/C,SAAS,oBAAoB,OAAiC;AACnE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,gBAAgB;AAAA,IAChB;AAAA,EAAA,IACE;AAIJ,MAAI,WAAW,MAAM;AACnB,WAAO;AAAA,MACL;AAAA,MACA,EAAE,UAAA;AAAA,MACF,EAAE,iBAAiB,sBAAsB;AAAA,IAAA;AAAA,EAE7C;AAEA,MAAI,cAAyB;AAC7B,MAAI,WAAW,MAAM;AACnB,kBAAc,EAAEC,aAAQ;AAAA,MACtB,MAAM;AAAA,MACN,SAAS;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,MACT,cAAc;AAAA,IAAA,CACf;AAAA,EACH;AAEA,MAAI,gBAA2B;AAC/B,MAAI,QAAQ,YAAY,MAAM;AAC5B,oBAAgB,EAAEC,0BAAW;AAAA,MAC3B,OAAO;AAAA,MACP,OAAO,QAAQ,SAAS,eAAe,SAAS;AAAA,QAC9C,uBAAuB;AAAA,MAAA,CACxB;AAAA,MACD,MAAM;AAAA,IAAA,CACP;AAAA,EACH;AAEA,MAAI,eAA0B;AAC9B,MAAI,QAAQ,cAAc,MAAM;AAC9B,mBAAe;AAAA,MACbA,eAAAA;AAAAA,MACA,EAAE,OAAO,UAAA;AAAA,MACT,EAAEC,eAAAA,YAAY,EAAE,IAAI,QAAQ,YAAY;AAAA,IAAA;AAAA,EAE5C;AAEA,MAAI,YAAuB;AAC3B,MAAI,QAAQ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AAqB;AAAA,MAAA,CACtB;AAAA,IAAA;AAAA,IAEH,SAAS,IAAI,CAAC,WAAW;AACvB,UAAI,cAAyB;AAC7B,UAAI,kBAAkB;AACpB,sBAAc;AAAA,UACZ;AAAA,UACAS,MAAAA,0BAA0B,MAAM;AAAA,QAAA;AAAA,MAEpC;AACA,aAAO;AAAA,QACL;AAAA,QACA,EAAE,KAAK,QAAQ,WAAWR,SAAAA,eAAe,EAAE,OAAA,CAAQ,EAAA;AAAA,QACnD;AAAA,UACE,EAAE,0BAA0B;AAAA,UAC5B,EAAE,mBAAmB;AAAA,YACnB,EAAE,oBAAoBO,0BAAoB,MAAM,CAAC;AAAA,YACjD;AAAA,UAAA,CACD;AAAA,QAAA;AAAA,MACH;AAAA,IAEJ,CAAC;AAAA,EAAA;AAEL;;;;;"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { BoundaryType, ColumnSurface, SurfaceStatus } from './types';
|
|
3
|
+
export interface SurfaceDetailsPanelProps {
|
|
4
|
+
/** The surface to inspect; `null` renders the panel's empty state */
|
|
5
|
+
surface: ColumnSurface | null;
|
|
6
|
+
onClose?: () => void;
|
|
7
|
+
/** Called when a unit above or below the surface is clicked */
|
|
8
|
+
onSelectUnit?: (unitID: number) => void;
|
|
9
|
+
/** Extra controls for the header */
|
|
10
|
+
actions?: ReactNode;
|
|
11
|
+
/** Label for the measured-position field ("Height" or "Depth") */
|
|
12
|
+
positionLabel?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
/** Details of one surface: its age, calibration, the units it separates, and
|
|
16
|
+
* provenance. A companion to `UnitDetailsPanel`. */
|
|
17
|
+
export declare function SurfaceDetailsPanel(props: SurfaceDetailsPanelProps): import('react').ReactElement<{
|
|
18
|
+
className: string | undefined;
|
|
19
|
+
}, string | import('react').JSXElementConstructor<any>>;
|
|
20
|
+
export declare function SurfaceStatusTag({ status, inferred, className, }: {
|
|
21
|
+
status: SurfaceStatus;
|
|
22
|
+
/** The status was inferred rather than recorded (see
|
|
23
|
+
* `inferTiePointStatuses`); the tag says so. */
|
|
24
|
+
inferred?: boolean;
|
|
25
|
+
className?: string;
|
|
26
|
+
}): import('react').FunctionComponentElement<import('@blueprintjs/core').TagProps>;
|
|
27
|
+
export declare function SurfaceTypeTag({ type, className, }: {
|
|
28
|
+
type: BoundaryType | null | undefined;
|
|
29
|
+
className?: string;
|
|
30
|
+
}): import('react').FunctionComponentElement<import('@blueprintjs/core').TagProps> | null;
|
|
31
|
+
export interface SurfaceStatusLegendProps {
|
|
32
|
+
statuses?: SurfaceStatus[];
|
|
33
|
+
showDescriptions?: boolean;
|
|
34
|
+
className?: string;
|
|
35
|
+
}
|
|
36
|
+
/** A legend of surface line styles, one entry per boundary status. */
|
|
37
|
+
export declare function SurfaceStatusLegend(props: SurfaceStatusLegendProps): import('react').ReactElement<{
|
|
38
|
+
className: string;
|
|
39
|
+
}, string | import('react').JSXElementConstructor<any>>;
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import h$1 from "@macrostrat/hyper";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
import { Button, Tag } from "@blueprintjs/core";
|
|
5
|
+
import { DataField, Identifier, AgeLabel, IntervalTag, UnitIdentifier } from "@macrostrat/data-components";
|
|
6
|
+
import { useMacrostratDefs } from "@macrostrat/data-provider";
|
|
7
|
+
import { ReferencesField } from "../unit-details/panel.js";
|
|
8
|
+
import { surfaceClasses } from "./surfaces.js";
|
|
9
|
+
import h$3 from "./surfaces.module.sass.js";
|
|
10
|
+
import h$2 from "./details.module.sass.js";
|
|
11
|
+
import { surfaceStatuses, surfaceStatusDescriptions, surfaceStatusLabels } from "./types.js";
|
|
12
|
+
import { useColumnUnitsMap } from "../data-provider/store.js";
|
|
13
|
+
const h = h$1.styled({ ...h$3, ...h$2 });
|
|
14
|
+
function SurfaceDetailsPanel(props) {
|
|
15
|
+
const {
|
|
16
|
+
surface,
|
|
17
|
+
onClose,
|
|
18
|
+
onSelectUnit,
|
|
19
|
+
actions,
|
|
20
|
+
positionLabel = "Position",
|
|
21
|
+
className
|
|
22
|
+
} = props;
|
|
23
|
+
if (surface == null) {
|
|
24
|
+
return h(
|
|
25
|
+
"div.surface-details-panel.no-surface",
|
|
26
|
+
{ className },
|
|
27
|
+
h("p.placeholder", "No surface selected.")
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
let closeButton = null;
|
|
31
|
+
if (onClose != null) {
|
|
32
|
+
closeButton = h(Button, {
|
|
33
|
+
icon: "cross",
|
|
34
|
+
variant: "minimal",
|
|
35
|
+
size: "small",
|
|
36
|
+
onClick: onClose,
|
|
37
|
+
"aria-label": "Close"
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
let positionField = null;
|
|
41
|
+
if (surface.position != null) {
|
|
42
|
+
positionField = h(DataField, {
|
|
43
|
+
label: positionLabel,
|
|
44
|
+
value: surface.position.toLocaleString("en-US", {
|
|
45
|
+
maximumFractionDigits: 2
|
|
46
|
+
}),
|
|
47
|
+
unit: "m"
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
let sectionField = null;
|
|
51
|
+
if (surface.section_id != null) {
|
|
52
|
+
sectionField = h(
|
|
53
|
+
DataField,
|
|
54
|
+
{ label: "Section" },
|
|
55
|
+
h(Identifier, { id: surface.section_id })
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
let refsField = null;
|
|
59
|
+
if (surface.ref_id != null) {
|
|
60
|
+
refsField = h(ReferencesField, { refs: [surface.ref_id] });
|
|
61
|
+
}
|
|
62
|
+
return h(
|
|
63
|
+
"div.surface-details-panel",
|
|
64
|
+
{ className: classNames(className, surfaceClasses(surface)) },
|
|
65
|
+
[
|
|
66
|
+
h("div.surface-details-header", [
|
|
67
|
+
h("h3.surface-details-title", [
|
|
68
|
+
"Surface ",
|
|
69
|
+
h(SurfaceIdentifier, { id: surface.id })
|
|
70
|
+
]),
|
|
71
|
+
h("div.surface-details-tags", [
|
|
72
|
+
h(SurfaceStatusTag, {
|
|
73
|
+
status: surface.status,
|
|
74
|
+
inferred: surface.statusInferred
|
|
75
|
+
}),
|
|
76
|
+
h(SurfaceTypeTag, { type: surface.type })
|
|
77
|
+
]),
|
|
78
|
+
h("div.spacer"),
|
|
79
|
+
actions,
|
|
80
|
+
closeButton
|
|
81
|
+
]),
|
|
82
|
+
h("div.surface-details-content", [
|
|
83
|
+
h(DataField, { label: "Model age" }, h(AgeLabel, { age: surface.age })),
|
|
84
|
+
h(SurfaceCalibrationField, { surface }),
|
|
85
|
+
positionField,
|
|
86
|
+
h(SurfaceUnitsField, {
|
|
87
|
+
label: "Unit above",
|
|
88
|
+
unitIDs: surface.unitsAbove,
|
|
89
|
+
onSelectUnit
|
|
90
|
+
}),
|
|
91
|
+
h(SurfaceUnitsField, {
|
|
92
|
+
label: "Unit below",
|
|
93
|
+
unitIDs: surface.unitsBelow,
|
|
94
|
+
onSelectUnit
|
|
95
|
+
}),
|
|
96
|
+
sectionField,
|
|
97
|
+
refsField
|
|
98
|
+
])
|
|
99
|
+
]
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
function SurfaceIdentifier({ id }) {
|
|
103
|
+
if (typeof id === "number") {
|
|
104
|
+
return h(Identifier, { id });
|
|
105
|
+
}
|
|
106
|
+
return h("code.surface-id", String(id));
|
|
107
|
+
}
|
|
108
|
+
function SurfaceCalibrationField({ surface }) {
|
|
109
|
+
const { calibration, proportion } = surface;
|
|
110
|
+
const ids = useMemo(() => {
|
|
111
|
+
if (calibration == null) return [];
|
|
112
|
+
return [calibration.id];
|
|
113
|
+
}, [calibration?.id]);
|
|
114
|
+
const intervalMap = useMacrostratDefs("intervals", ids, null);
|
|
115
|
+
if (calibration == null) {
|
|
116
|
+
return h(DataField, {
|
|
117
|
+
label: "Calibration",
|
|
118
|
+
value: "None",
|
|
119
|
+
className: "no-calibration"
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
const def = intervalMap?.get(calibration.id);
|
|
123
|
+
const interval = {
|
|
124
|
+
id: calibration.id,
|
|
125
|
+
name: calibration.name,
|
|
126
|
+
b_age: calibration.b_age,
|
|
127
|
+
t_age: calibration.t_age,
|
|
128
|
+
color: def?.color,
|
|
129
|
+
rank: def?.rank
|
|
130
|
+
};
|
|
131
|
+
return h(DataField, { label: "Calibration" }, [
|
|
132
|
+
h(
|
|
133
|
+
"div.calibration-interval",
|
|
134
|
+
h(IntervalTag, {
|
|
135
|
+
interval,
|
|
136
|
+
proportion
|
|
137
|
+
})
|
|
138
|
+
)
|
|
139
|
+
]);
|
|
140
|
+
}
|
|
141
|
+
function SurfaceUnitsField({
|
|
142
|
+
label,
|
|
143
|
+
unitIDs,
|
|
144
|
+
onSelectUnit
|
|
145
|
+
}) {
|
|
146
|
+
const unitsMap = useColumnUnitsMap();
|
|
147
|
+
if (unitIDs.length === 0) {
|
|
148
|
+
return h(DataField, { label, value: "None", className: "no-units" });
|
|
149
|
+
}
|
|
150
|
+
return h(
|
|
151
|
+
DataField,
|
|
152
|
+
{ label, className: "surface-units-field" },
|
|
153
|
+
h(
|
|
154
|
+
"ul.surface-units-list",
|
|
155
|
+
unitIDs.map((unitID) => {
|
|
156
|
+
const unit = unitsMap?.get(unitID);
|
|
157
|
+
let onClick = void 0;
|
|
158
|
+
if (onSelectUnit != null) {
|
|
159
|
+
onClick = () => onSelectUnit(unitID);
|
|
160
|
+
}
|
|
161
|
+
return h(
|
|
162
|
+
"li",
|
|
163
|
+
{ key: unitID },
|
|
164
|
+
h(UnitIdentifier, {
|
|
165
|
+
unitID,
|
|
166
|
+
colID: unit?.col_id,
|
|
167
|
+
name: unit?.unit_name,
|
|
168
|
+
onClick
|
|
169
|
+
})
|
|
170
|
+
);
|
|
171
|
+
})
|
|
172
|
+
)
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
function SurfaceStatusTag({
|
|
176
|
+
status,
|
|
177
|
+
inferred = false,
|
|
178
|
+
className
|
|
179
|
+
}) {
|
|
180
|
+
let label = surfaceStatusLabels[status] ?? status;
|
|
181
|
+
let title = surfaceStatusDescriptions[status];
|
|
182
|
+
if (inferred) {
|
|
183
|
+
label = [label, h("span.inferred-marker", "*")];
|
|
184
|
+
title = INFERRED_STATUS_DESCRIPTION;
|
|
185
|
+
}
|
|
186
|
+
return h(
|
|
187
|
+
Tag,
|
|
188
|
+
{
|
|
189
|
+
variant: "minimal",
|
|
190
|
+
className: classNames(
|
|
191
|
+
"surface-tag",
|
|
192
|
+
className,
|
|
193
|
+
surfaceClasses({ status }),
|
|
194
|
+
{ inferred }
|
|
195
|
+
),
|
|
196
|
+
title
|
|
197
|
+
},
|
|
198
|
+
label
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
const INFERRED_STATUS_DESCRIPTION = "Recorded as modeled, but this surface cannot have been interpolated — it sits on the base or top of its interval, or is the edge of a gap-bound package — so it constrains the age model rather than falling out of it";
|
|
202
|
+
function SurfaceTypeTag({
|
|
203
|
+
type,
|
|
204
|
+
className
|
|
205
|
+
}) {
|
|
206
|
+
if (type == null || type === "") return null;
|
|
207
|
+
return h(
|
|
208
|
+
Tag,
|
|
209
|
+
{
|
|
210
|
+
variant: "minimal",
|
|
211
|
+
className: classNames("surface-tag", "surface-type-tag", className)
|
|
212
|
+
},
|
|
213
|
+
type
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
function SurfaceStatusLegend(props) {
|
|
217
|
+
const {
|
|
218
|
+
statuses = surfaceStatuses,
|
|
219
|
+
showDescriptions = false,
|
|
220
|
+
className
|
|
221
|
+
} = props;
|
|
222
|
+
return h(
|
|
223
|
+
"ul.surface-status-legend",
|
|
224
|
+
{
|
|
225
|
+
className: classNames(className, {
|
|
226
|
+
"with-descriptions": showDescriptions
|
|
227
|
+
})
|
|
228
|
+
},
|
|
229
|
+
statuses.map((status) => {
|
|
230
|
+
let description = null;
|
|
231
|
+
if (showDescriptions) {
|
|
232
|
+
description = h(
|
|
233
|
+
"div.legend-description",
|
|
234
|
+
surfaceStatusDescriptions[status]
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
return h(
|
|
238
|
+
"li.legend-item",
|
|
239
|
+
{ key: status, className: surfaceClasses({ status }) },
|
|
240
|
+
[
|
|
241
|
+
h("div.surface-label-marker"),
|
|
242
|
+
h("div.legend-text", [
|
|
243
|
+
h("div.legend-label", surfaceStatusLabels[status]),
|
|
244
|
+
description
|
|
245
|
+
])
|
|
246
|
+
]
|
|
247
|
+
);
|
|
248
|
+
})
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
export {
|
|
252
|
+
SurfaceDetailsPanel,
|
|
253
|
+
SurfaceStatusLegend,
|
|
254
|
+
SurfaceStatusTag,
|
|
255
|
+
SurfaceTypeTag
|
|
256
|
+
};
|
|
257
|
+
//# sourceMappingURL=details.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"details.js","sources":["../../src/age-model/details.ts"],"sourcesContent":["/** The inspector for a selected surface, and the small tags and legend that\n * explain surface statuses and types. */\nimport hyper from \"@macrostrat/hyper\";\nimport classNames from \"classnames\";\nimport { type ReactNode, useMemo } from \"react\";\nimport { Button, Tag } from \"@blueprintjs/core\";\nimport {\n DataField,\n Identifier,\n type IntervalShort,\n IntervalTag,\n UnitIdentifier,\n Value,\n} from \"@macrostrat/data-components\";\nimport { useMacrostratDefs } from \"@macrostrat/data-provider\";\nimport type { UnitLong } from \"@macrostrat/api-types\";\nimport { useColumnUnitsMap } from \"../data-provider\";\nimport { AgeLabel } from \"../unit-details/age-range\";\nimport { formatRange } from \"../unit-details/utils\";\nimport { ReferencesField } from \"../unit-details/panel\";\nimport { surfaceClasses } from \"./surfaces\";\nimport surfaceStyles from \"./surfaces.module.sass\";\nimport styles from \"./details.module.sass\";\nimport {\n type BoundaryType,\n type ColumnSurface,\n type SurfaceStatus,\n formatProportion,\n surfaceStatuses,\n surfaceStatusDescriptions,\n surfaceStatusLabels,\n} from \"./types\";\n\nconst h = hyper.styled({ ...surfaceStyles, ...styles });\n\nexport interface SurfaceDetailsPanelProps {\n /** The surface to inspect; `null` renders the panel's empty state */\n surface: ColumnSurface | null;\n onClose?: () => void;\n /** Called when a unit above or below the surface is clicked */\n onSelectUnit?: (unitID: number) => void;\n /** Extra controls for the header */\n actions?: ReactNode;\n /** Label for the measured-position field (\"Height\" or \"Depth\") */\n positionLabel?: string;\n className?: string;\n}\n\n/** Details of one surface: its age, calibration, the units it separates, and\n * provenance. A companion to `UnitDetailsPanel`. */\nexport function SurfaceDetailsPanel(props: SurfaceDetailsPanelProps) {\n const {\n surface,\n onClose,\n onSelectUnit,\n actions,\n positionLabel = \"Position\",\n className,\n } = props;\n\n // A selection that hasn't been made yet is an ordinary state for a panel\n // bound to one, not a caller error\n if (surface == null) {\n return h(\n \"div.surface-details-panel.no-surface\",\n { className },\n h(\"p.placeholder\", \"No surface selected.\"),\n );\n }\n\n let closeButton: ReactNode = null;\n if (onClose != null) {\n closeButton = h(Button, {\n icon: \"cross\",\n variant: \"minimal\",\n size: \"small\",\n onClick: onClose,\n \"aria-label\": \"Close\",\n });\n }\n\n let positionField: ReactNode = null;\n if (surface.position != null) {\n positionField = h(DataField, {\n label: positionLabel,\n value: surface.position.toLocaleString(\"en-US\", {\n maximumFractionDigits: 2,\n }),\n unit: \"m\",\n });\n }\n\n let sectionField: ReactNode = null;\n if (surface.section_id != null) {\n sectionField = h(\n DataField,\n { label: \"Section\" },\n h(Identifier, { id: surface.section_id }),\n );\n }\n\n let refsField: ReactNode = null;\n if (surface.ref_id != null) {\n refsField = h(ReferencesField, { refs: [surface.ref_id] });\n }\n\n return h(\n \"div.surface-details-panel\",\n { className: classNames(className, surfaceClasses(surface)) },\n [\n h(\"div.surface-details-header\", [\n h(\"h3.surface-details-title\", [\n \"Surface \",\n h(SurfaceIdentifier, { id: surface.id }),\n ]),\n h(\"div.surface-details-tags\", [\n h(SurfaceStatusTag, {\n status: surface.status,\n inferred: surface.statusInferred,\n }),\n h(SurfaceTypeTag, { type: surface.type }),\n ]),\n h(\"div.spacer\"),\n actions,\n closeButton,\n ]),\n h(\"div.surface-details-content\", [\n h(DataField, { label: \"Model age\" }, h(AgeLabel, { age: surface.age })),\n h(SurfaceCalibrationField, { surface }),\n positionField,\n h(SurfaceUnitsField, {\n label: \"Unit above\",\n unitIDs: surface.unitsAbove,\n onSelectUnit,\n }),\n h(SurfaceUnitsField, {\n label: \"Unit below\",\n unitIDs: surface.unitsBelow,\n onSelectUnit,\n }),\n sectionField,\n refsField,\n ]),\n ],\n );\n}\n\nfunction SurfaceIdentifier({ id }: { id: ColumnSurface[\"id\"] }) {\n if (typeof id === \"number\") {\n return h(Identifier, { id });\n }\n return h(\"code.surface-id\", String(id));\n}\n\n/** The calibration interval as a colored tag, with the surface's position in\n * it: \"Calymmian (1600–1400 Ma), 85% above base\". */\nfunction SurfaceCalibrationField({ surface }: { surface: ColumnSurface }) {\n const { calibration, proportion } = surface;\n const ids = useMemo(() => {\n if (calibration == null) return [];\n return [calibration.id];\n }, [calibration?.id]);\n // Interval colors come from the definitions table; the age model itself\n // doesn't carry them\n const intervalMap = useMacrostratDefs(\"intervals\", ids, null);\n\n if (calibration == null) {\n return h(DataField, {\n label: \"Calibration\",\n value: \"None\",\n className: \"no-calibration\",\n });\n }\n\n const def = intervalMap?.get(calibration.id);\n const interval: IntervalShort = {\n id: calibration.id,\n name: calibration.name,\n b_age: calibration.b_age,\n t_age: calibration.t_age,\n color: def?.color,\n rank: def?.rank,\n };\n\n return h(DataField, { label: \"Calibration\" }, [\n h(\n \"div.calibration-interval\",\n h(IntervalTag, {\n interval,\n proportion,\n }),\n ),\n ]);\n}\n\nfunction SurfaceUnitsField({\n label,\n unitIDs,\n onSelectUnit,\n}: {\n label: string;\n unitIDs: number[];\n onSelectUnit?: (unitID: number) => void;\n}) {\n const unitsMap = useColumnUnitsMap();\n if (unitIDs.length === 0) {\n return h(DataField, { label, value: \"None\", className: \"no-units\" });\n }\n return h(\n DataField,\n { label, className: \"surface-units-field\" },\n h(\n \"ul.surface-units-list\",\n unitIDs.map((unitID) => {\n const unit = unitsMap?.get(unitID) as UnitLong | undefined;\n let onClick: (() => void) | undefined = undefined;\n if (onSelectUnit != null) {\n onClick = () => onSelectUnit(unitID);\n }\n return h(\n \"li\",\n { key: unitID },\n h(UnitIdentifier, {\n unitID,\n colID: unit?.col_id,\n name: unit?.unit_name,\n onClick,\n }),\n );\n }),\n ),\n );\n}\n\nexport function SurfaceStatusTag({\n status,\n inferred = false,\n className,\n}: {\n status: SurfaceStatus;\n /** The status was inferred rather than recorded (see\n * `inferTiePointStatuses`); the tag says so. */\n inferred?: boolean;\n className?: string;\n}) {\n let label: ReactNode = surfaceStatusLabels[status] ?? status;\n let title = surfaceStatusDescriptions[status];\n if (inferred) {\n label = [label, h(\"span.inferred-marker\", \"*\")];\n title = INFERRED_STATUS_DESCRIPTION;\n }\n\n return h(\n Tag,\n {\n variant: \"minimal\",\n className: classNames(\n \"surface-tag\",\n className,\n surfaceClasses({ status }),\n { inferred },\n ),\n title,\n },\n label,\n );\n}\n\nconst INFERRED_STATUS_DESCRIPTION =\n \"Recorded as modeled, but this surface cannot have been interpolated — it \" +\n \"sits on the base or top of its interval, or is the edge of a gap-bound \" +\n \"package — so it constrains the age model rather than falling out of it\";\n\nexport function SurfaceTypeTag({\n type,\n className,\n}: {\n type: BoundaryType | null | undefined;\n className?: string;\n}) {\n if (type == null || type === \"\") return null;\n return h(\n Tag,\n {\n variant: \"minimal\",\n className: classNames(\"surface-tag\", \"surface-type-tag\", className),\n },\n type,\n );\n}\n\nexport interface SurfaceStatusLegendProps {\n statuses?: SurfaceStatus[];\n showDescriptions?: boolean;\n className?: string;\n}\n\n/** A legend of surface line styles, one entry per boundary status. */\nexport function SurfaceStatusLegend(props: SurfaceStatusLegendProps) {\n const {\n statuses = surfaceStatuses,\n showDescriptions = false,\n className,\n } = props;\n return h(\n \"ul.surface-status-legend\",\n {\n className: classNames(className, {\n \"with-descriptions\": showDescriptions,\n }),\n },\n statuses.map((status) => {\n let description: ReactNode = null;\n if (showDescriptions) {\n description = h(\n \"div.legend-description\",\n surfaceStatusDescriptions[status],\n );\n }\n return h(\n \"li.legend-item\",\n { key: status, className: surfaceClasses({ status }) },\n [\n h(\"div.surface-label-marker\"),\n h(\"div.legend-text\", [\n h(\"div.legend-label\", surfaceStatusLabels[status]),\n description,\n ]),\n ],\n );\n }),\n );\n}\n"],"names":["hyper","surfaceStyles","styles"],"mappings":";;;;;;;;;;;;AAiCA,MAAM,IAAIA,IAAM,OAAO,EAAE,GAAGC,KAAe,GAAGC,KAAQ;AAiB/C,SAAS,oBAAoB,OAAiC;AACnE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,gBAAgB;AAAA,IAChB;AAAA,EAAA,IACE;AAIJ,MAAI,WAAW,MAAM;AACnB,WAAO;AAAA,MACL;AAAA,MACA,EAAE,UAAA;AAAA,MACF,EAAE,iBAAiB,sBAAsB;AAAA,IAAA;AAAA,EAE7C;AAEA,MAAI,cAAyB;AAC7B,MAAI,WAAW,MAAM;AACnB,kBAAc,EAAE,QAAQ;AAAA,MACtB,MAAM;AAAA,MACN,SAAS;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,MACT,cAAc;AAAA,IAAA,CACf;AAAA,EACH;AAEA,MAAI,gBAA2B;AAC/B,MAAI,QAAQ,YAAY,MAAM;AAC5B,oBAAgB,EAAE,WAAW;AAAA,MAC3B,OAAO;AAAA,MACP,OAAO,QAAQ,SAAS,eAAe,SAAS;AAAA,QAC9C,uBAAuB;AAAA,MAAA,CACxB;AAAA,MACD,MAAM;AAAA,IAAA,CACP;AAAA,EACH;AAEA,MAAI,eAA0B;AAC9B,MAAI,QAAQ,cAAc,MAAM;AAC9B,mBAAe;AAAA,MACb;AAAA,MACA,EAAE,OAAO,UAAA;AAAA,MACT,EAAE,YAAY,EAAE,IAAI,QAAQ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;AAAA,UACA,0BAA0B,MAAM;AAAA,QAAA;AAAA,MAEpC;AACA,aAAO;AAAA,QACL;AAAA,QACA,EAAE,KAAK,QAAQ,WAAW,eAAe,EAAE,OAAA,CAAQ,EAAA;AAAA,QACnD;AAAA,UACE,EAAE,0BAA0B;AAAA,UAC5B,EAAE,mBAAmB;AAAA,YACnB,EAAE,oBAAoB,oBAAoB,MAAM,CAAC;AAAA,YACjD;AAAA,UAAA,CACD;AAAA,QAAA;AAAA,MACH;AAAA,IAEJ,CAAC;AAAA,EAAA;AAEL;"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const h$1 = require("@macrostrat/hyper");
|
|
4
|
+
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
5
|
+
const h__default = /* @__PURE__ */ _interopDefault(h$1);
|
|
6
|
+
const spacer = "_spacer_14xjd_16";
|
|
7
|
+
const placeholder = "_placeholder_14xjd_38";
|
|
8
|
+
const inferred = "_inferred_14xjd_55";
|
|
9
|
+
const styles = {
|
|
10
|
+
"surface-details-panel": "_surface-details-panel_14xjd_1",
|
|
11
|
+
"surface-details-header": "_surface-details-header_14xjd_7",
|
|
12
|
+
spacer,
|
|
13
|
+
"surface-details-title": "_surface-details-title_14xjd_20",
|
|
14
|
+
"surface-id": "_surface-id_14xjd_24",
|
|
15
|
+
"surface-details-tags": "_surface-details-tags_14xjd_29",
|
|
16
|
+
"surface-details-content": "_surface-details-content_14xjd_34",
|
|
17
|
+
"no-surface": "_no-surface_14xjd_38",
|
|
18
|
+
placeholder,
|
|
19
|
+
"surface-tag": "_surface-tag_14xjd_43",
|
|
20
|
+
"surface-type-tag": "_surface-type-tag_14xjd_52",
|
|
21
|
+
inferred,
|
|
22
|
+
"inferred-marker": "_inferred-marker_14xjd_59",
|
|
23
|
+
"calibration-interval": "_calibration-interval_14xjd_64",
|
|
24
|
+
"calibration-range": "_calibration-range_14xjd_71",
|
|
25
|
+
"calibration-proportion": "_calibration-proportion_14xjd_76",
|
|
26
|
+
"surface-units-list": "_surface-units-list_14xjd_80",
|
|
27
|
+
"no-units": "_no-units_14xjd_95",
|
|
28
|
+
"no-calibration": "_no-calibration_14xjd_95",
|
|
29
|
+
"surface-status-legend": "_surface-status-legend_14xjd_99",
|
|
30
|
+
"with-descriptions": "_with-descriptions_14xjd_108",
|
|
31
|
+
"legend-item": "_legend-item_14xjd_112",
|
|
32
|
+
"surface-label-marker": "_surface-label-marker_14xjd_118",
|
|
33
|
+
"legend-label": "_legend-label_14xjd_124",
|
|
34
|
+
"legend-description": "_legend-description_14xjd_128"
|
|
35
|
+
};
|
|
36
|
+
let h = h__default.default.styled(styles);
|
|
37
|
+
Object.assign(h, styles);
|
|
38
|
+
exports.default = h;
|
|
39
|
+
exports.inferred = inferred;
|
|
40
|
+
exports.placeholder = placeholder;
|
|
41
|
+
exports.spacer = spacer;
|
|
42
|
+
//# sourceMappingURL=details.module.sass.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"details.module.sass.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|