@geode/opengeodeweb-front 10.34.0-rc.6 → 10.34.0-rc.7
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/app/components/CameraManager.vue +4 -9
- package/app/components/CameraOrientation.vue +14 -45
- package/app/components/ClippingPlanes.vue +6 -16
- package/app/components/DeleteDialog.vue +7 -27
- package/app/components/DragAndDrop.vue +4 -14
- package/app/components/DragAndDropInternal/DragAndDropInline.vue +2 -4
- package/app/components/ExtensionSelector.vue +15 -30
- package/app/components/FileSelector.vue +4 -11
- package/app/components/FileUploader.vue +11 -36
- package/app/components/HybridRenderingView.vue +7 -18
- package/app/components/HybridViewerTooltip.vue +5 -12
- package/app/components/Launcher.vue +3 -8
- package/app/components/MissingFilesSelector.vue +20 -45
- package/app/components/ObjectSelector.vue +10 -27
- package/app/components/RemoteRenderingView.vue +2 -2
- package/app/components/Ruler.vue +4 -11
- package/app/components/Screenshot.vue +6 -12
- package/app/components/ShrinkFilter.vue +3 -8
- package/app/components/Stepper.vue +3 -9
- package/app/components/ToolPanel.vue +1 -1
- package/app/components/ViewToolbar.vue +13 -28
- package/app/components/Viewer/ContextMenu/ContextMenu.vue +4 -6
- package/app/components/Viewer/ContextMenu/ContextMenuItem.vue +12 -35
- package/app/components/Viewer/ContextMenu/InfoCard.vue +6 -23
- package/app/components/Viewer/EdgedCurve/PointsOptions.vue +3 -6
- package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +17 -55
- package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +16 -52
- package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +16 -51
- package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +13 -40
- package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +19 -61
- package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +20 -71
- package/app/components/Viewer/Generic/Model/BlocksOptions.vue +44 -159
- package/app/components/Viewer/Generic/Model/CornersOptions.vue +26 -102
- package/app/components/Viewer/Generic/Model/EdgesOptions.vue +3 -5
- package/app/components/Viewer/Generic/Model/LinesOptions.vue +40 -168
- package/app/components/Viewer/Generic/Model/ModelStyleCard.vue +16 -40
- package/app/components/Viewer/Generic/Model/ModelStyleOptions.vue +2 -2
- package/app/components/Viewer/Generic/Model/PointsOptions.vue +5 -10
- package/app/components/Viewer/Generic/Model/SurfacesOptions.vue +49 -166
- package/app/components/Viewer/Grid/2D/CellsOptions.vue +2 -2
- package/app/components/Viewer/Grid/2D/EdgesOptions.vue +3 -6
- package/app/components/Viewer/Grid/2D/PointsOptions.vue +3 -6
- package/app/components/Viewer/Grid/3D/CellsOptions.vue +2 -2
- package/app/components/Viewer/Grid/3D/EdgesOptions.vue +3 -6
- package/app/components/Viewer/Grid/3D/FacetsOptions.vue +2 -2
- package/app/components/Viewer/Grid/3D/PointsOptions.vue +3 -6
- package/app/components/Viewer/ObjectTree/Base/CommonTreeView.vue +10 -17
- package/app/components/Viewer/ObjectTree/Base/Controls.vue +6 -18
- package/app/components/Viewer/ObjectTree/Base/StickyHeader.vue +3 -7
- package/app/components/Viewer/ObjectTree/Layout.vue +16 -39
- package/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue +14 -41
- package/app/components/Viewer/ObjectTree/Views/ModelCollections.vue +15 -45
- package/app/components/Viewer/ObjectTree/Views/ModelComponents.vue +16 -45
- package/app/components/Viewer/Options/AttributeColorBar.vue +2 -2
- package/app/components/Viewer/Options/AttributeSelector.vue +12 -27
- package/app/components/Viewer/Options/ColorMapList.vue +10 -40
- package/app/components/Viewer/Options/ColorMapPicker.vue +5 -15
- package/app/components/Viewer/Options/ColorPicker.vue +1 -1
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +36 -105
- package/app/components/Viewer/Options/ColormapQuickPicker.vue +3 -5
- package/app/components/Viewer/Options/Sliders/Size.vue +1 -1
- package/app/components/Viewer/Options/Sliders/Slider.vue +1 -1
- package/app/components/Viewer/Options/Sliders/Width.vue +1 -1
- package/app/components/Viewer/Options/TextureItem.vue +4 -19
- package/app/components/Viewer/Options/TexturesSelector.vue +4 -16
- package/app/components/Viewer/Options/VisibilitySwitch.vue +1 -1
- package/app/components/Viewer/OverlappingObjectsPicker.vue +7 -24
- package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +12 -35
- package/app/components/Viewer/Solid/EdgesOptions.vue +3 -6
- package/app/components/Viewer/Solid/PointsOptions.vue +3 -6
- package/app/components/Viewer/Solid/PolygonsOptions.vue +2 -2
- package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +19 -66
- package/app/components/Viewer/Surface/EdgesOptions.vue +3 -6
- package/app/components/Viewer/Surface/PointsOptions.vue +2 -2
- package/app/components/Viewer/Surface/PolygonsOptions.vue +19 -61
- package/app/components/Viewer/Surface/Triangulated/TrianglesOptions.vue +3 -6
- package/app/components/Viewer/TetrahedralSolid/TetrahedraOptions.vue +2 -2
- package/app/components/Viewer/TetrahedralSolid/TrianglesOptions.vue +2 -2
- package/app/components/Viewer/Ui.vue +5 -9
- package/app/components/Wrapper.vue +3 -3
- package/app/components/ZScaling.vue +2 -3
- package/app/components/csv-preview/CsvPreviewer.vue +13 -35
- package/app/stores/menu.ts +22 -22
- package/app/utils/import_workflow.ts +1 -2
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import List from "@ogw_front/components/CameraManager/List";
|
|
3
|
-
import Saver from "@ogw_front/components/CameraManager/Saver";
|
|
4
|
-
import ToolPanel from "@ogw_front/components/ToolPanel";
|
|
2
|
+
import List from "@ogw_front/components/CameraManager/List.vue";
|
|
3
|
+
import Saver from "@ogw_front/components/CameraManager/Saver.vue";
|
|
4
|
+
import ToolPanel from "@ogw_front/components/ToolPanel.vue";
|
|
5
5
|
|
|
6
6
|
const DEFAULT_PANEL_WIDTH = 260;
|
|
7
7
|
|
|
@@ -40,12 +40,7 @@ const show = computed({
|
|
|
40
40
|
</script>
|
|
41
41
|
|
|
42
42
|
<template>
|
|
43
|
-
<ToolPanel
|
|
44
|
-
v-model="show"
|
|
45
|
-
title="Camera Positions"
|
|
46
|
-
:width="width"
|
|
47
|
-
:escapeFunction="handleClose"
|
|
48
|
-
>
|
|
43
|
+
<ToolPanel v-model="show" title="Camera Positions" :width="width" :escapeFunction="handleClose">
|
|
49
44
|
<v-card-text class="pa-0">
|
|
50
45
|
<Saver />
|
|
51
46
|
<v-divider />
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
// Not auto-fixable (eslint's sort-imports core rule has no autofixer) and this file's import order doesn't match its syntax-kind-then-alphabetical requirement - left as-is rather than manually reordered across the codebase for a purely cosmetic rule.
|
|
3
3
|
// oxlint-disable eslint/sort-imports
|
|
4
|
-
import ToolPanel from "@ogw_front/components/ToolPanel";
|
|
4
|
+
import ToolPanel from "@ogw_front/components/ToolPanel.vue";
|
|
5
5
|
import { applyCameraOptions } from "@ogw_internal/stores/hybrid_viewer/camera";
|
|
6
6
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
7
7
|
import type { CameraOptions } from "@ogw_internal/stores/hybrid_viewer/vtk_types.js";
|
|
@@ -166,9 +166,7 @@ watch(hoveredFace, (newFace, oldFace) => {
|
|
|
166
166
|
return;
|
|
167
167
|
}
|
|
168
168
|
function updateFace(face: string | undefined, active: boolean) {
|
|
169
|
-
const config = orientations.find(
|
|
170
|
-
(orientation) => orientation.face === face,
|
|
171
|
-
);
|
|
169
|
+
const config = orientations.find((orientation) => orientation.face === face);
|
|
172
170
|
if (config) {
|
|
173
171
|
cubeActor[`set${config.vtkKey}FaceProperty`]({
|
|
174
172
|
faceColor: active ? "rgba(255, 255, 255, 0.95)" : "rgba(60, 60, 60, 1)",
|
|
@@ -195,17 +193,10 @@ watch(hoveredFace, (newFace, oldFace) => {
|
|
|
195
193
|
class="pa-0 overflow-hidden position-relative"
|
|
196
194
|
style="
|
|
197
195
|
height: 220px;
|
|
198
|
-
background: radial-gradient(
|
|
199
|
-
circle at center,
|
|
200
|
-
rgba(255, 255, 255, 0.05),
|
|
201
|
-
transparent 70%
|
|
202
|
-
);
|
|
196
|
+
background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05), transparent 70%);
|
|
203
197
|
"
|
|
204
198
|
>
|
|
205
|
-
<svg
|
|
206
|
-
class="position-absolute fill-height w-100"
|
|
207
|
-
style="pointer-events: none"
|
|
208
|
-
>
|
|
199
|
+
<svg class="position-absolute fill-height w-100" style="pointer-events: none">
|
|
209
200
|
<line
|
|
210
201
|
v-for="orientation in orientations"
|
|
211
202
|
:key="orientation.value"
|
|
@@ -213,9 +204,7 @@ watch(hoveredFace, (newFace, oldFace) => {
|
|
|
213
204
|
y1="50%"
|
|
214
205
|
:x2="orientation.position.left"
|
|
215
206
|
:y2="orientation.position.top"
|
|
216
|
-
:stroke="
|
|
217
|
-
hoveredFace === orientation.face ? 'white' : 'rgba(255,255,255,0.1)'
|
|
218
|
-
"
|
|
207
|
+
:stroke="hoveredFace === orientation.face ? 'white' : 'rgba(255,255,255,0.1)'"
|
|
219
208
|
:stroke-width="hoveredFace === orientation.face ? 2 : 1"
|
|
220
209
|
class="transition-all"
|
|
221
210
|
style="filter: drop-shadow(0 0 3px white)"
|
|
@@ -226,10 +215,7 @@ watch(hoveredFace, (newFace, oldFace) => {
|
|
|
226
215
|
class="position-absolute d-flex align-center justify-center"
|
|
227
216
|
style="top: 50%; left: 50%; transform: translate(-50%, -50%)"
|
|
228
217
|
>
|
|
229
|
-
<div
|
|
230
|
-
ref="cubeContainer"
|
|
231
|
-
style="width: 70px; height: 70px; pointer-events: none"
|
|
232
|
-
/>
|
|
218
|
+
<div ref="cubeContainer" style="width: 70px; height: 70px; pointer-events: none" />
|
|
233
219
|
</div>
|
|
234
220
|
|
|
235
221
|
<v-btn
|
|
@@ -245,34 +231,21 @@ watch(hoveredFace, (newFace, oldFace) => {
|
|
|
245
231
|
@mouseleave="hoveredFace = undefined"
|
|
246
232
|
@click.stop="emit('select', orientation.value)"
|
|
247
233
|
>
|
|
248
|
-
<v-tooltip activator="parent" location="top"
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
class="text-caption font-weight-black"
|
|
253
|
-
style="font-size: 0.7rem !important"
|
|
254
|
-
>{{ orientation.label }}</span
|
|
255
|
-
>
|
|
234
|
+
<v-tooltip activator="parent" location="top">{{ orientation.value }} View</v-tooltip>
|
|
235
|
+
<span class="text-caption font-weight-black" style="font-size: 0.7rem !important">{{
|
|
236
|
+
orientation.label
|
|
237
|
+
}}</span>
|
|
256
238
|
</v-btn>
|
|
257
239
|
</div>
|
|
258
240
|
</ToolPanel>
|
|
259
241
|
|
|
260
|
-
<v-list
|
|
261
|
-
v-else
|
|
262
|
-
density="compact"
|
|
263
|
-
class="pa-4 orientation-menu rounded-lg"
|
|
264
|
-
elevation="8"
|
|
265
|
-
>
|
|
242
|
+
<v-list v-else density="compact" class="pa-4 orientation-menu rounded-lg" elevation="8">
|
|
266
243
|
<div class="d-flex flex-column align-center" style="gap: 16px">
|
|
267
244
|
<div
|
|
268
245
|
class="d-flex align-center justify-center"
|
|
269
246
|
style="width: 60px; height: 60px; border-radius: 8px; overflow: hidden"
|
|
270
247
|
>
|
|
271
|
-
<div
|
|
272
|
-
ref="cubeContainer"
|
|
273
|
-
class="w-100 h-100"
|
|
274
|
-
style="pointer-events: none"
|
|
275
|
-
/>
|
|
248
|
+
<div ref="cubeContainer" class="w-100 h-100" style="pointer-events: none" />
|
|
276
249
|
</div>
|
|
277
250
|
<v-divider class="w-100" />
|
|
278
251
|
<div class="d-flex flex-wrap justify-center" style="max-width: 140px">
|
|
@@ -288,12 +261,8 @@ watch(hoveredFace, (newFace, oldFace) => {
|
|
|
288
261
|
@mouseleave="hoveredFace = undefined"
|
|
289
262
|
@click.stop="emit('select', orientation.value)"
|
|
290
263
|
>
|
|
291
|
-
<v-tooltip activator="parent" location="top">{{
|
|
292
|
-
|
|
293
|
-
}}</v-tooltip>
|
|
294
|
-
<span class="text-caption font-weight-black">{{
|
|
295
|
-
orientation.label
|
|
296
|
-
}}</span>
|
|
264
|
+
<v-tooltip activator="parent" location="top">{{ orientation.label }}</v-tooltip>
|
|
265
|
+
<span class="text-caption font-weight-black">{{ orientation.label }}</span>
|
|
297
266
|
</v-btn>
|
|
298
267
|
</div>
|
|
299
268
|
</div>
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} from "@ogw_front/utils/clipping_planes";
|
|
6
|
-
import ClippingPlaneCard from "@ogw_front/components/ClippingPlaneCard";
|
|
7
|
-
import ToolPanel from "@ogw_front/components/ToolPanel";
|
|
2
|
+
import { DEBOUNCE_DELAY, DEFAULT_NORMALS } from "@ogw_front/utils/clipping_planes";
|
|
3
|
+
import ClippingPlaneCard from "@ogw_front/components/ClippingPlaneCard.vue";
|
|
4
|
+
import ToolPanel from "@ogw_front/components/ToolPanel.vue";
|
|
8
5
|
import { useClippingPlanesWidget } from "@ogw_front/composables/clipping_planes_widget";
|
|
9
6
|
import { useDataStore } from "@ogw_front/stores/data";
|
|
10
7
|
import { useDebounceFn } from "@vueuse/core";
|
|
@@ -78,9 +75,7 @@ debouncedApply = useDebounceFn(() => applyClippingPlanes(), DEBOUNCE_DELAY);
|
|
|
78
75
|
function addPlane() {
|
|
79
76
|
// Index is always in-bounds (modulo the fixed-size list); the fallbacks only
|
|
80
77
|
// Satisfy noUncheckedIndexedAccess and are never hit at runtime.
|
|
81
|
-
const normal = DEFAULT_NORMALS[
|
|
82
|
-
planes.value.length % DEFAULT_NORMALS.length
|
|
83
|
-
] ??
|
|
78
|
+
const normal = DEFAULT_NORMALS[planes.value.length % DEFAULT_NORMALS.length] ??
|
|
84
79
|
DEFAULT_NORMALS[0] ?? [1, 0, 0];
|
|
85
80
|
planes.value.push({ origin: getSceneCenter(), normal });
|
|
86
81
|
}
|
|
@@ -152,10 +147,7 @@ watch(allItems, () => {
|
|
|
152
147
|
});
|
|
153
148
|
|
|
154
149
|
watch(
|
|
155
|
-
() =>
|
|
156
|
-
Object.values(hybridViewerStore.hybridDb).filter(
|
|
157
|
-
(entry) => entry && entry.actor,
|
|
158
|
-
).length,
|
|
150
|
+
() => Object.values(hybridViewerStore.hybridDb).filter((entry) => entry && entry.actor).length,
|
|
159
151
|
(actorCount) => {
|
|
160
152
|
if (show.value && actorCount > 0) {
|
|
161
153
|
updateWidgetPlacement({ isReset: true });
|
|
@@ -212,9 +204,7 @@ onBeforeUnmount(cleanupLocalWidget);
|
|
|
212
204
|
<v-divider class="my-2" />
|
|
213
205
|
|
|
214
206
|
<v-row align="center" justify="space-between" no-gutters class="mb-2">
|
|
215
|
-
<v-col class="text-caption font-weight-bold"
|
|
216
|
-
>Planes ({{ planes.length }})</v-col
|
|
217
|
-
>
|
|
207
|
+
<v-col class="text-caption font-weight-bold">Planes ({{ planes.length }})</v-col>
|
|
218
208
|
<v-col cols="auto">
|
|
219
209
|
<v-btn
|
|
220
210
|
data-testid="addPlaneButton"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import GlassCard from "./GlassCard";
|
|
2
|
+
import GlassCard from "./GlassCard.vue";
|
|
3
3
|
|
|
4
4
|
interface DeleteItem {
|
|
5
5
|
name: string;
|
|
@@ -11,11 +11,7 @@ interface Props {
|
|
|
11
11
|
selectedCount?: number;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
const {
|
|
15
|
-
show = false,
|
|
16
|
-
item = undefined,
|
|
17
|
-
selectedCount = 0,
|
|
18
|
-
} = defineProps<Props>();
|
|
14
|
+
const { show = false, item = undefined, selectedCount = 0 } = defineProps<Props>();
|
|
19
15
|
|
|
20
16
|
const emit = defineEmits<{
|
|
21
17
|
"update:show": [value: boolean];
|
|
@@ -24,20 +20,10 @@ const emit = defineEmits<{
|
|
|
24
20
|
</script>
|
|
25
21
|
|
|
26
22
|
<template>
|
|
27
|
-
<v-dialog
|
|
28
|
-
:model-value="show"
|
|
29
|
-
@update:model-value="emit('update:show', $event)"
|
|
30
|
-
max-width="400"
|
|
31
|
-
>
|
|
23
|
+
<v-dialog :model-value="show" @update:model-value="emit('update:show', $event)" max-width="400">
|
|
32
24
|
<GlassCard v-if="item" variant="panel" padding="pa-8">
|
|
33
|
-
<v-card-title
|
|
34
|
-
|
|
35
|
-
>
|
|
36
|
-
<v-icon
|
|
37
|
-
icon="mdi-trash-can-outline"
|
|
38
|
-
class="mr-3 text-h4"
|
|
39
|
-
color="error"
|
|
40
|
-
></v-icon>
|
|
25
|
+
<v-card-title class="pb-2 text-h5 font-weight-bold d-flex align-center text-white">
|
|
26
|
+
<v-icon icon="mdi-trash-can-outline" class="mr-3 text-h4" color="error"></v-icon>
|
|
41
27
|
Delete Item
|
|
42
28
|
</v-card-title>
|
|
43
29
|
|
|
@@ -80,14 +66,8 @@ const emit = defineEmits<{
|
|
|
80
66
|
</GlassCard>
|
|
81
67
|
|
|
82
68
|
<GlassCard v-else variant="panel" padding="pa-8">
|
|
83
|
-
<v-card-title
|
|
84
|
-
|
|
85
|
-
>
|
|
86
|
-
<v-icon
|
|
87
|
-
icon="mdi-alert-circle-outline"
|
|
88
|
-
class="mr-3 text-h4"
|
|
89
|
-
color="error"
|
|
90
|
-
></v-icon>
|
|
69
|
+
<v-card-title class="pb-2 text-h5 font-weight-bold d-flex align-center text-white">
|
|
70
|
+
<v-icon icon="mdi-alert-circle-outline" class="mr-3 text-h4" color="error"></v-icon>
|
|
91
71
|
Delete Items
|
|
92
72
|
</v-card-title>
|
|
93
73
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// Not auto-fixable (eslint's sort-imports core rule has no autofixer) and this file's import order doesn't match its syntax-kind-then-alphabetical requirement - left as-is rather than manually reordered across the codebase for a purely cosmetic rule.
|
|
3
3
|
// oxlint-disable eslint/sort-imports
|
|
4
4
|
import { onMounted, onUnmounted, ref } from "vue";
|
|
5
|
-
import DragAndDropInline from "./DragAndDropInternal/DragAndDropInline";
|
|
6
|
-
import DragAndDropOverlay from "./DragAndDropInternal/DragAndDropOverlay";
|
|
5
|
+
import DragAndDropInline from "./DragAndDropInternal/DragAndDropInline.vue";
|
|
6
|
+
import DragAndDropOverlay from "./DragAndDropInternal/DragAndDropOverlay.vue";
|
|
7
7
|
|
|
8
8
|
interface DragAndDropTexts {
|
|
9
9
|
idle: string;
|
|
@@ -48,10 +48,7 @@ const fileInput = ref<HTMLInputElement | undefined>(undefined);
|
|
|
48
48
|
|
|
49
49
|
const WILDCARD_SUFFIX_LENGTH = 2;
|
|
50
50
|
|
|
51
|
-
function isFileAccepted(
|
|
52
|
-
file: File,
|
|
53
|
-
acceptValue: string | string[] | undefined,
|
|
54
|
-
) {
|
|
51
|
+
function isFileAccepted(file: File, acceptValue: string | string[] | undefined) {
|
|
55
52
|
const fileName = (file.name || "").toLowerCase();
|
|
56
53
|
const fileType = (file.type || "").toLowerCase();
|
|
57
54
|
const isVext = fileName.endsWith(".vext");
|
|
@@ -204,14 +201,7 @@ defineExpose({ triggerFileDialog });
|
|
|
204
201
|
:show-extensions
|
|
205
202
|
/>
|
|
206
203
|
|
|
207
|
-
<input
|
|
208
|
-
ref="fileInput"
|
|
209
|
-
type="file"
|
|
210
|
-
class="d-none"
|
|
211
|
-
:multiple
|
|
212
|
-
:accept
|
|
213
|
-
@change="handleFileSelect"
|
|
214
|
-
/>
|
|
204
|
+
<input ref="fileInput" type="file" class="d-none" :multiple :accept @change="handleFileSelect" />
|
|
215
205
|
</template>
|
|
216
206
|
|
|
217
207
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import GlassCard from "@ogw_front/components/GlassCard";
|
|
2
|
+
import GlassCard from "@ogw_front/components/GlassCard.vue";
|
|
3
3
|
|
|
4
4
|
interface DragAndDropTexts {
|
|
5
5
|
idle: string;
|
|
@@ -57,9 +57,7 @@ const emit = defineEmits<{
|
|
|
57
57
|
</v-sheet>
|
|
58
58
|
|
|
59
59
|
<v-card-text class="pa-0">
|
|
60
|
-
<v-sheet
|
|
61
|
-
class="text-h6 font-weight-bold text-white d-block mb-1 bg-transparent"
|
|
62
|
-
>
|
|
60
|
+
<v-sheet class="text-h6 font-weight-bold text-white d-block mb-1 bg-transparent">
|
|
63
61
|
{{ loading ? texts.loading : isDragging ? texts.drop : texts.idle }}
|
|
64
62
|
</v-sheet>
|
|
65
63
|
<v-sheet
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json";
|
|
3
3
|
|
|
4
|
-
import FetchingData from "@ogw_front/components/FetchingData";
|
|
4
|
+
import FetchingData from "@ogw_front/components/FetchingData.vue";
|
|
5
5
|
import { useBackStore } from "@ogw_front/stores/back";
|
|
6
6
|
|
|
7
7
|
const schema = schemas.opengeodeweb_back.geode_objects_and_output_extensions;
|
|
8
8
|
const emit = defineEmits<{
|
|
9
|
-
update_values: [
|
|
10
|
-
values: { output_geode_object: string; output_extension: string },
|
|
11
|
-
];
|
|
9
|
+
update_values: [values: { output_geode_object: string; output_extension: string }];
|
|
12
10
|
increment_step: [];
|
|
13
11
|
decrement_step: [];
|
|
14
12
|
}>();
|
|
@@ -21,9 +19,7 @@ interface Props {
|
|
|
21
19
|
const { geodeObjectType, filenames } = defineProps<Props>();
|
|
22
20
|
type OutputExtensions = Record<string, { is_saveable: boolean }>;
|
|
23
21
|
|
|
24
|
-
const geode_objects_and_output_extensions = ref<
|
|
25
|
-
Record<string, OutputExtensions>
|
|
26
|
-
>({});
|
|
22
|
+
const geode_objects_and_output_extensions = ref<Record<string, OutputExtensions>>({});
|
|
27
23
|
const loading = ref(false);
|
|
28
24
|
|
|
29
25
|
const toggle_loading = useToggle(loading);
|
|
@@ -33,25 +29,18 @@ async function get_output_file_extensions() {
|
|
|
33
29
|
geode_objects_and_output_extensions.value = {};
|
|
34
30
|
const backStore = useBackStore();
|
|
35
31
|
const values: Record<string, OutputExtensions>[] = await Promise.all(
|
|
36
|
-
filenames.map(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
>;
|
|
46
|
-
}
|
|
47
|
-
).geode_objects_and_output_extensions;
|
|
48
|
-
},
|
|
49
|
-
),
|
|
32
|
+
filenames.map(async (filename): Promise<Record<string, OutputExtensions>> => {
|
|
33
|
+
const params = { geode_object_type: geodeObjectType, filename };
|
|
34
|
+
const response = await backStore.request({ schema, params });
|
|
35
|
+
return (
|
|
36
|
+
response as {
|
|
37
|
+
geode_objects_and_output_extensions: Record<string, OutputExtensions>;
|
|
38
|
+
}
|
|
39
|
+
).geode_objects_and_output_extensions;
|
|
40
|
+
}),
|
|
50
41
|
);
|
|
51
42
|
const all_keys = [...new Set(values.flatMap((value) => Object.keys(value)))];
|
|
52
|
-
const common_keys = all_keys.filter(
|
|
53
|
-
(i) => !values.some((j) => !Object.keys(j).includes(i)),
|
|
54
|
-
);
|
|
43
|
+
const common_keys = all_keys.filter((i) => !values.some((j) => !Object.keys(j).includes(i)));
|
|
55
44
|
const final_object: Record<string, OutputExtensions> = {};
|
|
56
45
|
for (const key of common_keys) {
|
|
57
46
|
final_object[key] = {};
|
|
@@ -89,9 +78,7 @@ await get_output_file_extensions();
|
|
|
89
78
|
<FetchingData v-if="loading" />
|
|
90
79
|
<v-row v-else class="justify-left">
|
|
91
80
|
<v-col
|
|
92
|
-
v-for="(
|
|
93
|
-
output_extensions, output_geode_object
|
|
94
|
-
) in geode_objects_and_output_extensions"
|
|
81
|
+
v-for="(output_extensions, output_geode_object) in geode_objects_and_output_extensions"
|
|
95
82
|
:key="output_geode_object"
|
|
96
83
|
class="justify-left"
|
|
97
84
|
>
|
|
@@ -118,9 +105,7 @@ await get_output_file_extensions();
|
|
|
118
105
|
class="card ma-2"
|
|
119
106
|
:color="extension.is_saveable ? 'primary' : 'grey'"
|
|
120
107
|
hover
|
|
121
|
-
@click="
|
|
122
|
-
update_values(output_geode_object, output_extension)
|
|
123
|
-
"
|
|
108
|
+
@click="update_values(output_geode_object, output_extension)"
|
|
124
109
|
:disabled="!extension.is_saveable"
|
|
125
110
|
>
|
|
126
111
|
<v-card-title align="center">
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json";
|
|
3
3
|
|
|
4
|
-
import FetchingData from "@ogw_front/components/FetchingData";
|
|
5
|
-
import FileUploader from "@ogw_front/components/FileUploader";
|
|
4
|
+
import FetchingData from "@ogw_front/components/FetchingData.vue";
|
|
5
|
+
import FileUploader from "@ogw_front/components/FileUploader.vue";
|
|
6
6
|
import { useBackStore } from "@ogw_front/stores/back";
|
|
7
7
|
|
|
8
8
|
const schema = schemas.opengeodeweb_back.allowed_files;
|
|
@@ -20,12 +20,7 @@ interface Props {
|
|
|
20
20
|
showOverlay?: boolean;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
const {
|
|
24
|
-
multiple,
|
|
25
|
-
files = [],
|
|
26
|
-
autoUpload = true,
|
|
27
|
-
showOverlay = true,
|
|
28
|
-
} = defineProps<Props>();
|
|
23
|
+
const { multiple, files = [], autoUpload = true, showOverlay = true } = defineProps<Props>();
|
|
29
24
|
|
|
30
25
|
const internal_files = ref(files);
|
|
31
26
|
const internal_auto_upload = ref(autoUpload);
|
|
@@ -61,9 +56,7 @@ async function get_allowed_files() {
|
|
|
61
56
|
const response = (await backStore.request({ schema })) as {
|
|
62
57
|
extensions: string[];
|
|
63
58
|
};
|
|
64
|
-
accept.value = response.extensions
|
|
65
|
-
.map((extension) => `.${extension}`)
|
|
66
|
-
.join(",");
|
|
59
|
+
accept.value = response.extensions.map((extension) => `.${extension}`).join(",");
|
|
67
60
|
toggle_loading();
|
|
68
61
|
}
|
|
69
62
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { useBackStore } from "@ogw_front/stores/back";
|
|
3
3
|
|
|
4
|
-
import CsvPreviewer from "@ogw_front/components/csv-preview/CsvPreviewer";
|
|
5
|
-
import DragAndDrop from "@ogw_front/components/DragAndDrop";
|
|
4
|
+
import CsvPreviewer from "@ogw_front/components/csv-preview/CsvPreviewer.vue";
|
|
5
|
+
import DragAndDrop from "@ogw_front/components/DragAndDrop.vue";
|
|
6
6
|
|
|
7
7
|
// Files carry extra app-specific bookkeeping fields once picked up here.
|
|
8
8
|
type UploadFile = File & { isConfigured?: boolean; displayName?: string };
|
|
@@ -58,10 +58,7 @@ async function onCsvConfirm(result: unknown) {
|
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
60
|
const json_content = JSON.stringify(result, undefined, 2);
|
|
61
|
-
const base_name = currentFile.name.slice(
|
|
62
|
-
0,
|
|
63
|
-
currentFile.name.lastIndexOf("."),
|
|
64
|
-
);
|
|
61
|
+
const base_name = currentFile.name.slice(0, currentFile.name.lastIndexOf("."));
|
|
65
62
|
const json_filename = `${base_name}.json`;
|
|
66
63
|
|
|
67
64
|
const blob = new Blob([json_content], { type: "application/json" });
|
|
@@ -96,9 +93,7 @@ function removeFile(index: number) {
|
|
|
96
93
|
|
|
97
94
|
async function upload_files() {
|
|
98
95
|
toggle_loading();
|
|
99
|
-
const promise_array = internal_files.value.map((file) =>
|
|
100
|
-
backStore.upload(file),
|
|
101
|
-
);
|
|
96
|
+
const promise_array = internal_files.value.map((file) => backStore.upload(file));
|
|
102
97
|
await Promise.all(promise_array);
|
|
103
98
|
files_uploaded.value = true;
|
|
104
99
|
toggle_loading();
|
|
@@ -111,21 +106,14 @@ watch(
|
|
|
111
106
|
if (newFiles.length === 0) {
|
|
112
107
|
return;
|
|
113
108
|
}
|
|
114
|
-
const unconfiguredCsv = newFiles.find(
|
|
115
|
-
(file) => isCsv(file) && !file.isConfigured,
|
|
116
|
-
);
|
|
109
|
+
const unconfiguredCsv = newFiles.find((file) => isCsv(file) && !file.isConfigured);
|
|
117
110
|
|
|
118
111
|
if (unconfiguredCsv) {
|
|
119
|
-
openCsvPreviewer(
|
|
120
|
-
unconfiguredCsv,
|
|
121
|
-
internal_files.value.indexOf(unconfiguredCsv),
|
|
122
|
-
);
|
|
112
|
+
openCsvPreviewer(unconfiguredCsv, internal_files.value.indexOf(unconfiguredCsv));
|
|
123
113
|
return;
|
|
124
114
|
}
|
|
125
115
|
|
|
126
|
-
const allConfigured = newFiles.every(
|
|
127
|
-
(file) => !isCsv(file) || file.isConfigured,
|
|
128
|
-
);
|
|
116
|
+
const allConfigured = newFiles.every((file) => !isCsv(file) || file.isConfigured);
|
|
129
117
|
|
|
130
118
|
if (autoUpload && allConfigured) {
|
|
131
119
|
await upload_files();
|
|
@@ -183,15 +171,8 @@ watch(
|
|
|
183
171
|
<v-card-text v-if="internal_files.length" class="mt-6 pa-0">
|
|
184
172
|
<v-sheet class="d-flex align-center mb-4" color="transparent">
|
|
185
173
|
<v-icon icon="mdi-file-check" class="mr-3" color="primary" size="24" />
|
|
186
|
-
<span class="text-subtitle-1 font-weight-bold text-white">
|
|
187
|
-
|
|
188
|
-
</span>
|
|
189
|
-
<v-chip
|
|
190
|
-
size="small"
|
|
191
|
-
class="ml-3 bg-white-opacity-10"
|
|
192
|
-
color="white"
|
|
193
|
-
variant="flat"
|
|
194
|
-
>
|
|
174
|
+
<span class="text-subtitle-1 font-weight-bold text-white"> Selected files </span>
|
|
175
|
+
<v-chip size="small" class="ml-3 bg-white-opacity-10" color="white" variant="flat">
|
|
195
176
|
{{ internal_files.length }}
|
|
196
177
|
</v-chip>
|
|
197
178
|
<v-spacer />
|
|
@@ -219,11 +200,7 @@ watch(
|
|
|
219
200
|
style="background: rgba(255, 255, 255, 0.05) !important"
|
|
220
201
|
@click:close="removeFile(index)"
|
|
221
202
|
>
|
|
222
|
-
<v-icon
|
|
223
|
-
start
|
|
224
|
-
size="18"
|
|
225
|
-
:color="isCsv(file) && file.isConfigured ? 'success' : 'primary'"
|
|
226
|
-
>
|
|
203
|
+
<v-icon start size="18" :color="isCsv(file) && file.isConfigured ? 'success' : 'primary'">
|
|
227
204
|
{{
|
|
228
205
|
isCsv(file)
|
|
229
206
|
? file.isConfigured
|
|
@@ -253,9 +230,7 @@ watch(
|
|
|
253
230
|
</v-tooltip>
|
|
254
231
|
|
|
255
232
|
<template #close>
|
|
256
|
-
<v-icon size="16" class="ml-2 opacity-60 hover-opacity-100"
|
|
257
|
-
>mdi-close-circle</v-icon
|
|
258
|
-
>
|
|
233
|
+
<v-icon size="16" class="ml-2 opacity-60 hover-opacity-100">mdi-close-circle</v-icon>
|
|
259
234
|
</template>
|
|
260
235
|
</v-chip>
|
|
261
236
|
</template>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import ColormapQuickPicker from "@ogw_front/components/Viewer/Options/ColormapQuickPicker";
|
|
3
|
-
import HybridViewerTooltip from "@ogw_front/components/HybridViewerTooltip";
|
|
4
|
-
import ViewToolbar from "@ogw_front/components/ViewToolbar";
|
|
2
|
+
import ColormapQuickPicker from "@ogw_front/components/Viewer/Options/ColormapQuickPicker.vue";
|
|
3
|
+
import HybridViewerTooltip from "@ogw_front/components/HybridViewerTooltip.vue";
|
|
4
|
+
import ViewToolbar from "@ogw_front/components/ViewToolbar.vue";
|
|
5
5
|
|
|
6
6
|
import { useDataStore } from "@ogw_front/stores/data";
|
|
7
7
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
@@ -21,14 +21,10 @@ const viewerStore = useViewerStore();
|
|
|
21
21
|
const menuStore = useMenuStore();
|
|
22
22
|
const dataStore = useDataStore();
|
|
23
23
|
|
|
24
|
-
const { width: elementWidth, height: elementHeight } =
|
|
25
|
-
useElementSize(container);
|
|
24
|
+
const { width: elementWidth, height: elementHeight } = useElementSize(container);
|
|
26
25
|
const { width: windowWidth, height: windowHeight } = useWindowSize();
|
|
27
26
|
|
|
28
|
-
function debounce<Callback extends (...args: unknown[]) => void>(
|
|
29
|
-
func: Callback,
|
|
30
|
-
wait: number,
|
|
31
|
-
) {
|
|
27
|
+
function debounce<Callback extends (...args: unknown[]) => void>(func: Callback, wait: number) {
|
|
32
28
|
let timeout: ReturnType<typeof setTimeout> | undefined = undefined;
|
|
33
29
|
return function executedFunction(...args: Parameters<Callback>) {
|
|
34
30
|
function later() {
|
|
@@ -97,11 +93,7 @@ async function handleClick(event: PointerEvent) {
|
|
|
97
93
|
|
|
98
94
|
<template>
|
|
99
95
|
<ClientOnly>
|
|
100
|
-
<div
|
|
101
|
-
data-testid="hybridViewer"
|
|
102
|
-
class="fill-height"
|
|
103
|
-
style="position: relative; height: 100%"
|
|
104
|
-
>
|
|
96
|
+
<div data-testid="hybridViewer" class="fill-height" style="position: relative; height: 100%">
|
|
105
97
|
<ColormapQuickPicker
|
|
106
98
|
v-model:show="quickColormap.show"
|
|
107
99
|
:x="quickColormap.x"
|
|
@@ -110,10 +102,7 @@ async function handleClick(event: PointerEvent) {
|
|
|
110
102
|
/>
|
|
111
103
|
<ViewToolbar />
|
|
112
104
|
<slot name="ui"></slot>
|
|
113
|
-
<HybridViewerTooltip
|
|
114
|
-
:container-width="elementWidth"
|
|
115
|
-
:container-height="elementHeight"
|
|
116
|
-
/>
|
|
105
|
+
<HybridViewerTooltip :container-width="elementWidth" :container-height="elementHeight" />
|
|
117
106
|
<v-col
|
|
118
107
|
class="pa-0"
|
|
119
108
|
ref="viewer"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import GlassCard from "@ogw_front/components/GlassCard";
|
|
2
|
+
import GlassCard from "@ogw_front/components/GlassCard.vue";
|
|
3
3
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
4
4
|
|
|
5
5
|
const TOOLTIP_SCREEN_MARGIN = 10;
|
|
@@ -14,8 +14,7 @@ const { containerWidth, containerHeight } = defineProps<Props>();
|
|
|
14
14
|
const hybridViewerStore = useHybridViewerStore();
|
|
15
15
|
|
|
16
16
|
const tooltipRef = useTemplateRef("tooltip");
|
|
17
|
-
const { width: tooltipWidth, height: tooltipHeight } =
|
|
18
|
-
useElementSize(tooltipRef);
|
|
17
|
+
const { width: tooltipWidth, height: tooltipHeight } = useElementSize(tooltipRef);
|
|
19
18
|
|
|
20
19
|
const tooltipStyle = computed(() => {
|
|
21
20
|
if (!hybridViewerStore.hoverData) {
|
|
@@ -93,9 +92,7 @@ function capitalize(val: string) {
|
|
|
93
92
|
|
|
94
93
|
const fieldTypeLabel = computed(() => {
|
|
95
94
|
const fieldType = hybridViewerStore.hoverData?.fieldType;
|
|
96
|
-
return typeof fieldType === "string"
|
|
97
|
-
? capitalize(fieldType.toLowerCase())
|
|
98
|
-
: "";
|
|
95
|
+
return typeof fieldType === "string" ? capitalize(fieldType.toLowerCase()) : "";
|
|
99
96
|
});
|
|
100
97
|
|
|
101
98
|
const coordinates = computed<number[] | undefined>(() => {
|
|
@@ -150,10 +147,7 @@ function formatAttributeValue(val: unknown) {
|
|
|
150
147
|
<v-col>
|
|
151
148
|
<span class="tooltip-label">Id:</span>
|
|
152
149
|
<span class="tooltip-value-dim font-mono">
|
|
153
|
-
{{
|
|
154
|
-
hybridViewerStore.hoverData.component?.id ||
|
|
155
|
-
hybridViewerStore.hoverData.modelId
|
|
156
|
-
}}
|
|
150
|
+
{{ hybridViewerStore.hoverData.component?.id || hybridViewerStore.hoverData.modelId }}
|
|
157
151
|
</span>
|
|
158
152
|
</v-col>
|
|
159
153
|
<v-col v-if="originalIndex !== undefined">
|
|
@@ -175,8 +169,7 @@ function formatAttributeValue(val: unknown) {
|
|
|
175
169
|
<v-col v-if="coordinates" class="d-flex justify-space-between ga-3">
|
|
176
170
|
<span class="tooltip-label">Position:</span>
|
|
177
171
|
<span class="tooltip-value font-mono">
|
|
178
|
-
[ {{ Number(coordinates[0]).toFixed(3) }},
|
|
179
|
-
{{ Number(coordinates[1]).toFixed(3) }},
|
|
172
|
+
[ {{ Number(coordinates[0]).toFixed(3) }}, {{ Number(coordinates[1]).toFixed(3) }},
|
|
180
173
|
{{ Number(coordinates[2]).toFixed(3) }} ]
|
|
181
174
|
</span>
|
|
182
175
|
</v-col>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import Loading from "@ogw_front/components/Loading";
|
|
3
|
-
import Recaptcha from "@ogw_front/components/Recaptcha";
|
|
2
|
+
import Loading from "@ogw_front/components/Loading.vue";
|
|
3
|
+
import Recaptcha from "@ogw_front/components/Recaptcha.vue";
|
|
4
4
|
import { Status } from "@ogw_front/utils/status";
|
|
5
5
|
import { appMode } from "@ogw_shared/app_mode";
|
|
6
6
|
import { useInfraStore } from "@ogw_front/stores/infra";
|
|
@@ -12,12 +12,7 @@ interface Props {
|
|
|
12
12
|
logo?: string;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
const {
|
|
16
|
-
appName,
|
|
17
|
-
email = undefined,
|
|
18
|
-
isUserAuthenticated = false,
|
|
19
|
-
logo = "",
|
|
20
|
-
} = defineProps<Props>();
|
|
15
|
+
const { appName, email = undefined, isUserAuthenticated = false, logo = "" } = defineProps<Props>();
|
|
21
16
|
|
|
22
17
|
const infraStore = useInfraStore();
|
|
23
18
|
if (infraStore.app_mode !== appMode.CLOUD) {
|