@geode/opengeodeweb-front 10.4.1 → 10.4.2-rc.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/app/components/DeleteDialog.vue +1 -1
- package/app/components/DragAndDrop.vue +8 -5
- package/app/components/FileUploader.vue +3 -3
- package/app/components/GlassCard.vue +4 -4
- package/app/components/HybridRenderingView.vue +1 -5
- package/app/components/Inspector/InspectionButton.vue +6 -7
- package/app/components/Launcher.vue +1 -1
- package/app/components/ObjectSelector.vue +1 -1
- package/app/components/PackagesVersions.vue +1 -1
- package/app/components/RemoteRenderingView.vue +1 -1
- package/app/components/Screenshot.vue +2 -2
- package/app/components/SearchBar.vue +10 -16
- package/app/components/Step.vue +3 -1
- package/app/components/ViewToolbar.vue +0 -1
- package/app/components/Viewer/ContextMenu.vue +11 -11
- package/app/components/Viewer/ContextMenuItem.vue +1 -1
- package/app/components/Viewer/Options/AttributeColorBar.vue +1 -5
- package/app/components/Viewer/Options/ColorMapList.vue +2 -6
- package/app/components/Viewer/Options/ColorMapPicker.vue +3 -3
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +1 -1
- package/app/components/Viewer/Options/TextureItem.vue +2 -2
- package/app/components/Viewer/Options/TexturesSelector.vue +4 -4
- package/app/components/Viewer/Tree/ObjectTree.vue +4 -8
- package/app/components/ZScaling.vue +4 -4
- package/app/composables/project_manager.js +0 -2
- package/app/composables/run_function_when_microservices_connected.js +0 -2
- package/app/stores/data.js +18 -12
- package/app/stores/data_style.js +11 -11
- package/app/stores/geode.js +2 -2
- package/app/stores/hybrid_viewer.js +15 -24
- package/app/stores/infra.js +6 -2
- package/app/stores/lambda.js +1 -1
- package/app/stores/menu.js +1 -2
- package/app/stores/viewer.js +6 -6
- package/app/utils/colormap.js +3 -1
- package/app/utils/local.js +29 -34
- package/app/utils/status.js +1 -1
- package/app/utils/upload_file.js +2 -2
- package/app/utils/validate_schema.js +2 -2
- package/internal/database/database.js +17 -4
- package/internal/stores/data_style/mesh/cells/cell.js +1 -1
- package/internal/stores/data_style/mesh/cells/common.js +1 -1
- package/internal/stores/data_style/mesh/cells/vertex.js +1 -1
- package/internal/stores/data_style/mesh/edges/common.js +1 -1
- package/internal/stores/data_style/mesh/edges/edge.js +2 -2
- package/internal/stores/data_style/mesh/edges/vertex.js +1 -1
- package/internal/stores/data_style/mesh/index.js +2 -2
- package/internal/stores/data_style/mesh/points/common.js +1 -1
- package/internal/stores/data_style/mesh/points/vertex.js +1 -1
- package/internal/stores/data_style/mesh/polygons/common.js +1 -1
- package/internal/stores/data_style/mesh/polygons/polygon.js +1 -1
- package/internal/stores/data_style/mesh/polygons/vertex.js +1 -1
- package/internal/stores/data_style/mesh/polyhedra/common.js +1 -1
- package/internal/stores/data_style/mesh/polyhedra/polyhedron.js +1 -1
- package/internal/stores/data_style/mesh/polyhedra/vertex.js +1 -1
- package/internal/stores/data_style/model/blocks/color.js +1 -4
- package/internal/stores/data_style/model/blocks/common.js +1 -1
- package/internal/stores/data_style/model/blocks/index.js +5 -3
- package/internal/stores/data_style/model/blocks/visibility.js +1 -3
- package/internal/stores/data_style/model/corners/color.js +1 -4
- package/internal/stores/data_style/model/corners/common.js +1 -1
- package/internal/stores/data_style/model/corners/index.js +5 -3
- package/internal/stores/data_style/model/corners/visibility.js +1 -4
- package/internal/stores/data_style/model/edges/common.js +1 -1
- package/internal/stores/data_style/model/index.js +2 -2
- package/internal/stores/data_style/model/lines/color.js +1 -4
- package/internal/stores/data_style/model/lines/common.js +1 -1
- package/internal/stores/data_style/model/lines/index.js +5 -3
- package/internal/stores/data_style/model/lines/visibility.js +1 -4
- package/internal/stores/data_style/model/points/common.js +1 -1
- package/internal/stores/data_style/model/surfaces/color.js +1 -3
- package/internal/stores/data_style/model/surfaces/common.js +1 -1
- package/internal/stores/data_style/model/surfaces/index.js +5 -3
- package/internal/stores/data_style/model/surfaces/visibility.js +1 -2
- package/internal/utils/api_fetch.js +5 -7
- package/internal/utils/viewer_call.js +5 -7
- package/nuxt.config.js +8 -1
- package/package.json +3 -3
- package/scripts/generate_geode_objects.js +1 -1
- package/tests/integration/microservices/back/requirements.txt +1 -1
- package/tests/integration/microservices/viewer/requirements.txt +1 -1
- package/tests/integration/setup.js +5 -5
- package/tests/integration/stores/data_style/mesh/cells.nuxt.test.js +2 -2
- package/tests/integration/stores/data_style/mesh/edges.nuxt.test.js +2 -2
- package/tests/integration/stores/data_style/mesh/index.nuxt.test.js +2 -2
- package/tests/integration/stores/data_style/mesh/points.nuxt.test.js +2 -2
- package/tests/integration/stores/data_style/mesh/polygons.nuxt.test.js +2 -2
- package/tests/integration/stores/data_style/mesh/polyhedra.nuxt.test.js +2 -2
- package/tests/integration/stores/data_style/model/blocks.nuxt.test.js +2 -2
- package/tests/integration/stores/data_style/model/corners.nuxt.test.js +2 -2
- package/tests/integration/stores/data_style/model/edges.nuxt.test.js +2 -2
- package/tests/integration/stores/data_style/model/index.nuxt.test.js +2 -2
- package/tests/integration/stores/data_style/model/lines.nuxt.test.js +2 -2
- package/tests/integration/stores/data_style/model/points.nuxt.test.js +2 -2
- package/tests/integration/stores/data_style/model/surfaces.nuxt.test.js +25 -25
- package/tests/integration/stores/viewer.nuxt.test.js +3 -3
- package/tests/setup_indexeddb.js +1 -1
- package/tests/unit/components/CrsSelector.nuxt.test.js +4 -4
- package/tests/unit/components/ExtensionSelector.nuxt.test.js +4 -7
- package/tests/unit/components/FeedBack/ErrorsBanner.nuxt.test.js +1 -1
- package/tests/unit/components/FeedBack/Snackers.nuxt.test.js +1 -1
- package/tests/unit/components/FileSelector.nuxt.test.js +1 -1
- package/tests/unit/components/FileUploader.nuxt.test.js +1 -1
- package/tests/unit/components/Inspector/InspectionButton.nuxt.test.js +1 -1
- package/tests/unit/components/Inspector/ResultPanel.nuxt.test.js +1 -1
- package/tests/unit/components/Launcher.nuxt.test.js +1 -1
- package/tests/unit/components/MissingFilesSelector.nuxt.test.js +1 -1
- package/tests/unit/components/ObjectSelector.nuxt.test.js +1 -1
- package/tests/unit/components/PackagesVersions.nuxt.test.js +1 -1
- package/tests/unit/components/Step.nuxt.test.js +1 -1
- package/tests/unit/components/Stepper.nuxt.test.js +1 -1
- package/tests/unit/composables/api_fetch.nuxt.test.js +3 -3
- package/tests/unit/composables/{ProjectManager.nuxt.test.js → project_manager.nuxt.test.js} +12 -13
- package/tests/unit/composables/run_function_when_microservices_connected.nuxt.test.js +6 -6
- package/tests/unit/composables/upload_file.nuxt.test.js +2 -2
- package/tests/unit/plugins/project_load.nuxt.test.js +4 -4
- package/tests/unit/stores/{App.nuxt.test.js → app.nuxt.test.js} +1 -3
- package/tests/unit/stores/{Feedback.nuxt.test.js → feedback.nuxt.test.js} +8 -5
- package/tests/unit/stores/{Geode.nuxt.test.js → geode.nuxt.test.js} +3 -3
- package/tests/unit/stores/{Infra.nuxt.test.js → infra.nuxt.test.js} +2 -2
- package/tests/unit/stores/{Lambda.nuxt.test.js → lambda.nuxt.test.js} +2 -2
- package/tests/unit/stores/{Treeview.nuxt.test.js → treeview.nuxt.test.js} +2 -2
- package/tests/unit/stores/{Viewer.nuxt.test.js → viewer.nuxt.test.js} +1 -1
- package/tests/unit/utils/recaptcha.nuxt.test.js +11 -7
- package/tests/unit/utils/validate_schema.nuxt.test.js +1 -1
- package/tests/utils.js +1 -0
- package/tests/vitest.config.js +12 -4
- package/vuetify_config.js +1 -1
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import GlassCard from "@ogw_front/components/GlassCard"
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const { multiple, accept, loading, showExtensions } = defineProps({
|
|
5
5
|
multiple: { type: Boolean, default: false },
|
|
6
6
|
accept: { type: String, default: "" },
|
|
7
7
|
loading: { type: Boolean, default: false },
|
|
8
8
|
showExtensions: { type: Boolean, default: true },
|
|
9
|
-
idleText: { type: String, default: "Click or Drag & Drop files" },
|
|
10
|
-
dropText: { type: String, default: "Drop to upload" },
|
|
11
|
-
loadingText: { type: String, default: "Uploading..." },
|
|
12
9
|
})
|
|
13
10
|
|
|
14
11
|
const emit = defineEmits(["files-selected"])
|
|
@@ -83,7 +80,13 @@
|
|
|
83
80
|
class="text-h6 font-weight-bold justify-center pa-0 mb-1 text-white"
|
|
84
81
|
style="transition: color 0.3s ease"
|
|
85
82
|
>
|
|
86
|
-
{{
|
|
83
|
+
{{
|
|
84
|
+
loading
|
|
85
|
+
? "Uploading..."
|
|
86
|
+
: isDragging
|
|
87
|
+
? "Drop to upload"
|
|
88
|
+
: "Click or Drag & Drop files"
|
|
89
|
+
}}
|
|
87
90
|
</v-card-title>
|
|
88
91
|
|
|
89
92
|
<v-card-subtitle v-if="showExtensions" class="text-body-2 pa-0">
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
|
|
22
22
|
const toggle_loading = useToggle(loading)
|
|
23
23
|
|
|
24
|
-
function processSelectedFiles(
|
|
24
|
+
function processSelectedFiles(selected_files) {
|
|
25
25
|
if (multiple) {
|
|
26
|
-
internal_files.value = [...internal_files.value, ...
|
|
26
|
+
internal_files.value = [...internal_files.value, ...selected_files]
|
|
27
27
|
} else {
|
|
28
|
-
internal_files.value = [
|
|
28
|
+
internal_files.value = [selected_files[0]]
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed, useAttrs } from "vue"
|
|
3
|
-
defineProps({
|
|
3
|
+
const { variant, rounded, padding, theme } = defineProps({
|
|
4
4
|
variant: {
|
|
5
5
|
type: String,
|
|
6
6
|
default: "panel",
|
|
7
|
-
validator: (
|
|
7
|
+
validator: (valid) => ["panel", "ui"].includes(valid),
|
|
8
8
|
},
|
|
9
9
|
rounded: { type: String, default: "xl" },
|
|
10
10
|
padding: { type: String, default: "pa-6" },
|
|
11
|
-
theme: { type: String, default:
|
|
11
|
+
theme: { type: String, default: undefined },
|
|
12
12
|
})
|
|
13
13
|
|
|
14
14
|
const attrs = useAttrs()
|
|
15
|
-
const isInteractive = computed(() =>
|
|
15
|
+
const isInteractive = computed(() => Boolean(attrs.onClick))
|
|
16
16
|
</script>
|
|
17
17
|
|
|
18
18
|
<template>
|
|
@@ -43,10 +43,6 @@
|
|
|
43
43
|
timeout = setTimeout(later, wait)
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
function get_x_y(event) {
|
|
48
|
-
emit("click", event)
|
|
49
|
-
}
|
|
50
46
|
</script>
|
|
51
47
|
|
|
52
48
|
<template>
|
|
@@ -58,7 +54,7 @@
|
|
|
58
54
|
class="pa-0"
|
|
59
55
|
ref="viewer"
|
|
60
56
|
style="height: 100%; overflow: hidden; position: relative; z-index: 0"
|
|
61
|
-
@click="
|
|
57
|
+
@click="emit('click', $event)"
|
|
62
58
|
@keydown.esc="viewerStore.toggle_picking_mode(false)"
|
|
63
59
|
/>
|
|
64
60
|
</div>
|
|
@@ -15,9 +15,12 @@
|
|
|
15
15
|
const loading = ref(false)
|
|
16
16
|
const toggle_loading = useToggle(loading)
|
|
17
17
|
|
|
18
|
-
async function get_inspection_results(
|
|
18
|
+
async function get_inspection_results() {
|
|
19
19
|
toggle_loading()
|
|
20
|
-
const params = {
|
|
20
|
+
const params = {
|
|
21
|
+
geode_object_type: geode_object_type,
|
|
22
|
+
filename: filename,
|
|
23
|
+
}
|
|
21
24
|
const geodeStore = useGeodeStore()
|
|
22
25
|
|
|
23
26
|
await geodeStore.request(schema, params, {
|
|
@@ -34,11 +37,7 @@
|
|
|
34
37
|
|
|
35
38
|
<template>
|
|
36
39
|
<div class="pa-0">
|
|
37
|
-
<v-btn
|
|
38
|
-
:loading="loading"
|
|
39
|
-
color="primary"
|
|
40
|
-
@click="get_inspection_results(geode_object_type, filename)"
|
|
41
|
-
>
|
|
40
|
+
<v-btn :loading="loading" color="primary" @click="get_inspection_results()">
|
|
42
41
|
Inspect
|
|
43
42
|
<template #loader>
|
|
44
43
|
<v-progress-circular indeterminate size="20" color="white" width="3" />
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import Loading from "@ogw_front/components/Loading"
|
|
3
3
|
import Recaptcha from "@ogw_front/components/Recaptcha"
|
|
4
|
-
import Status from "@ogw_front/utils/status"
|
|
4
|
+
import { Status } from "@ogw_front/utils/status"
|
|
5
5
|
import { useInfraStore } from "@ogw_front/stores/infra"
|
|
6
6
|
|
|
7
7
|
const infraStore = useInfraStore()
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
.map((obj) => obj[key].object_priority)
|
|
81
81
|
.filter((priority) => priority !== undefined && priority !== null)
|
|
82
82
|
final_object[key] = { is_loadable: Math.min(...load_scores) }
|
|
83
|
-
if (priorities.length) {
|
|
83
|
+
if (priorities.length > 0) {
|
|
84
84
|
final_object[key].object_priority = Math.max(...priorities)
|
|
85
85
|
}
|
|
86
86
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { useElementSize, useWindowSize } from "@vueuse/core"
|
|
3
|
-
import Status from "@ogw_front/utils/status"
|
|
3
|
+
import { Status } from "@ogw_front/utils/status"
|
|
4
4
|
import ViewToolbar from "@ogw_front/components/ViewToolbar"
|
|
5
5
|
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
6
6
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import fileDownload from "js-file-download"
|
|
3
2
|
import GlassCard from "@ogw_front/components/GlassCard"
|
|
3
|
+
import fileDownload from "js-file-download"
|
|
4
4
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
|
|
5
5
|
|
|
6
6
|
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
include_background: include_background.value,
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
|
-
response_function:
|
|
32
|
+
response_function: (response) => {
|
|
33
33
|
fileDownload(
|
|
34
34
|
response.blob,
|
|
35
35
|
`${filename.value}.${output_extension.value}`,
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const { modelValue, label } = defineProps({
|
|
3
|
+
modelValue: { type: String, default: "" },
|
|
4
|
+
label: { type: String, default: "Search..." },
|
|
5
|
+
})
|
|
6
|
+
|
|
7
|
+
const emit = defineEmits(["update:modelValue"])
|
|
8
|
+
</script>
|
|
9
|
+
|
|
1
10
|
<template>
|
|
2
11
|
<v-text-field
|
|
3
12
|
:model-value="modelValue"
|
|
4
|
-
@update:model-value="
|
|
13
|
+
@update:model-value="emit('update:modelValue', $event)"
|
|
5
14
|
prepend-inner-icon="mdi-magnify"
|
|
6
15
|
:label="label"
|
|
7
16
|
variant="outlined"
|
|
@@ -17,18 +26,3 @@
|
|
|
17
26
|
</template>
|
|
18
27
|
</v-text-field>
|
|
19
28
|
</template>
|
|
20
|
-
|
|
21
|
-
<script setup>
|
|
22
|
-
defineProps({
|
|
23
|
-
modelValue: {
|
|
24
|
-
type: String,
|
|
25
|
-
default: "",
|
|
26
|
-
},
|
|
27
|
-
label: {
|
|
28
|
-
type: String,
|
|
29
|
-
default: "Search...",
|
|
30
|
-
},
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
defineEmits(["update:modelValue"])
|
|
34
|
-
</script>
|
package/app/components/Step.vue
CHANGED
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
step_index: { type: Number, required: true },
|
|
11
11
|
})
|
|
12
12
|
|
|
13
|
+
const emit = defineEmits(["reset_values"])
|
|
14
|
+
|
|
13
15
|
const stepper_tree = inject("stepper_tree")
|
|
14
16
|
const { current_step_index, steps } = toRefs(stepper_tree)
|
|
15
17
|
|
|
@@ -98,7 +100,7 @@
|
|
|
98
100
|
@increment_step="increment_step"
|
|
99
101
|
@decrement_step="decrement_step"
|
|
100
102
|
@update_values="update_values_event"
|
|
101
|
-
@reset_values="
|
|
103
|
+
@reset_values="emit('reset_values')"
|
|
102
104
|
/>
|
|
103
105
|
</v-card-text>
|
|
104
106
|
</v-stepper-vertical-item>
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
watch(
|
|
37
37
|
() => [x, y],
|
|
38
38
|
([newX, newY]) => {
|
|
39
|
-
const { x, y } = clampPosition(newX, newY)
|
|
40
|
-
menuX.value =
|
|
41
|
-
menuY.value =
|
|
42
|
-
menuStore.setMenuPosition(
|
|
39
|
+
const { x: clampedX, y: clampedY } = clampPosition(newX, newY)
|
|
40
|
+
menuX.value = clampedX
|
|
41
|
+
menuY.value = clampedY
|
|
42
|
+
menuStore.setMenuPosition(clampedX, clampedY)
|
|
43
43
|
},
|
|
44
44
|
{ immediate: true },
|
|
45
45
|
)
|
|
@@ -81,22 +81,22 @@
|
|
|
81
81
|
event.preventDefault()
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
function clampPosition(
|
|
84
|
+
function clampPosition(posX, posY) {
|
|
85
85
|
const margin = RADIUS + MARGIN_OFFSET
|
|
86
86
|
return {
|
|
87
|
-
x: Math.min(Math.max(
|
|
88
|
-
y: Math.min(Math.max(
|
|
87
|
+
x: Math.min(Math.max(posX, margin), containerWidth - margin),
|
|
88
|
+
y: Math.min(Math.max(posY, margin), containerHeight - margin),
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
function handleDrag(event) {
|
|
93
|
-
const { x, y } = clampPosition(
|
|
93
|
+
const { x: clampedX, y: clampedY } = clampPosition(
|
|
94
94
|
event.clientX - dragStartX.value,
|
|
95
95
|
event.clientY - dragStartY.value,
|
|
96
96
|
)
|
|
97
|
-
menuX.value =
|
|
98
|
-
menuY.value =
|
|
99
|
-
menuStore.setMenuPosition(
|
|
97
|
+
menuX.value = clampedX
|
|
98
|
+
menuY.value = clampedY
|
|
99
|
+
menuStore.setMenuPosition(clampedX, clampedY)
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
function stopDrag(event) {
|
|
@@ -6,10 +6,6 @@
|
|
|
6
6
|
const minimum = defineModel("minimum", { type: Number })
|
|
7
7
|
const maximum = defineModel("maximum", { type: Number })
|
|
8
8
|
const colorMap = defineModel("colorMap", { type: String })
|
|
9
|
-
|
|
10
|
-
function reset() {
|
|
11
|
-
emit("reset")
|
|
12
|
-
}
|
|
13
9
|
</script>
|
|
14
10
|
|
|
15
11
|
<template>
|
|
@@ -33,7 +29,7 @@
|
|
|
33
29
|
icon="mdi-arrow-left-right"
|
|
34
30
|
size="x-small"
|
|
35
31
|
variant="text"
|
|
36
|
-
@click="reset"
|
|
32
|
+
@click="emit('reset')"
|
|
37
33
|
v-tooltip="'Reset range'"
|
|
38
34
|
/>
|
|
39
35
|
</v-col>
|
|
@@ -55,12 +55,10 @@
|
|
|
55
55
|
if (!preset || !preset.RGBPoints) {
|
|
56
56
|
return
|
|
57
57
|
}
|
|
58
|
-
|
|
59
58
|
const ctx = canvas.getContext("2d")
|
|
60
59
|
const { height, width } = canvas
|
|
61
60
|
const lut = vtkColorTransferFunction()
|
|
62
61
|
const rgbPoints = preset.RGBPoints
|
|
63
|
-
|
|
64
62
|
for (let pointIdx = 0; pointIdx < rgbPoints.length; pointIdx += 4) {
|
|
65
63
|
lut.addRGBPoint(
|
|
66
64
|
rgbPoints[pointIdx],
|
|
@@ -69,7 +67,6 @@
|
|
|
69
67
|
rgbPoints[pointIdx + THREE],
|
|
70
68
|
)
|
|
71
69
|
}
|
|
72
|
-
|
|
73
70
|
const table = lut.getUint8Table(
|
|
74
71
|
rgbPoints[0],
|
|
75
72
|
rgbPoints.at(-LAST_POINT_OFFSET),
|
|
@@ -77,7 +74,6 @@
|
|
|
77
74
|
true,
|
|
78
75
|
)
|
|
79
76
|
const imageData = ctx.createImageData(width, height)
|
|
80
|
-
|
|
81
77
|
for (let xCoord = 0; xCoord < width; xCoord += 1) {
|
|
82
78
|
const alpha = table[xCoord * 4 + THREE],
|
|
83
79
|
blue = table[xCoord * 4 + 2],
|
|
@@ -180,7 +176,7 @@
|
|
|
180
176
|
<v-list-item
|
|
181
177
|
v-for="(child, cIdx) in item.Children"
|
|
182
178
|
:key="cIdx"
|
|
183
|
-
@click="
|
|
179
|
+
@click="emit('select', child)"
|
|
184
180
|
class="px-2 mb-1"
|
|
185
181
|
rounded="md"
|
|
186
182
|
>
|
|
@@ -202,7 +198,7 @@
|
|
|
202
198
|
|
|
203
199
|
<v-list-item
|
|
204
200
|
v-else
|
|
205
|
-
@click="
|
|
201
|
+
@click="emit('select', item)"
|
|
206
202
|
class="px-2 mb-1"
|
|
207
203
|
rounded="md"
|
|
208
204
|
>
|
|
@@ -120,9 +120,9 @@
|
|
|
120
120
|
watch([lutCanvas, selectedPresetName, () => min, () => max], drawLutCanvas)
|
|
121
121
|
watch(
|
|
122
122
|
() => modelValue,
|
|
123
|
-
(
|
|
124
|
-
if (
|
|
125
|
-
selectedPresetName.value =
|
|
123
|
+
(newValue) => {
|
|
124
|
+
if (newValue !== selectedPresetName.value) {
|
|
125
|
+
selectedPresetName.value = newValue
|
|
126
126
|
}
|
|
127
127
|
},
|
|
128
128
|
)
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
async function files_uploaded_event(value) {
|
|
40
|
-
if (value.length) {
|
|
40
|
+
if (value.length > 0) {
|
|
41
41
|
await geodeStore.request(
|
|
42
42
|
back_schemas.opengeodeweb_back.save_viewable_file,
|
|
43
43
|
{
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
|
-
response_function:
|
|
51
|
+
response_function: (response) => {
|
|
52
52
|
texture_id.value = response.id
|
|
53
53
|
},
|
|
54
54
|
},
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
const internal_textures = ref([])
|
|
11
11
|
|
|
12
12
|
onMounted(() => {
|
|
13
|
-
if (textures.value
|
|
14
|
-
internal_textures.value = textures.value
|
|
15
|
-
} else {
|
|
13
|
+
if (textures.value === null) {
|
|
16
14
|
internal_textures.value = [{ id: "", texture_name: "" }]
|
|
15
|
+
} else {
|
|
16
|
+
internal_textures.value = textures.value
|
|
17
17
|
}
|
|
18
18
|
})
|
|
19
19
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
const filtered = internal_textures.value.filter(
|
|
23
23
|
(texture) => texture.texture_name !== "" && texture.id !== "",
|
|
24
24
|
)
|
|
25
|
-
if (filtered.length
|
|
25
|
+
if (filtered.length > 0) {
|
|
26
26
|
textures.value = filtered
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -9,15 +9,11 @@
|
|
|
9
9
|
const treeviewStore = useTreeviewStore()
|
|
10
10
|
const emit = defineEmits(["show-menu"])
|
|
11
11
|
|
|
12
|
-
function handleTreeMenu({ event, itemId }) {
|
|
13
|
-
emit("show-menu", { event, itemId })
|
|
14
|
-
}
|
|
15
|
-
|
|
16
12
|
function onResizeStart(event) {
|
|
17
13
|
const startWidth = treeviewStore.panelWidth
|
|
18
14
|
const startX = event.clientX
|
|
19
|
-
function resize(
|
|
20
|
-
const deltaX =
|
|
15
|
+
function resize(move_event) {
|
|
16
|
+
const deltaX = move_event.clientX - startX
|
|
21
17
|
const newWidth = Math.max(
|
|
22
18
|
WIDTH_MIN,
|
|
23
19
|
Math.min(startWidth + deltaX, window.innerWidth),
|
|
@@ -60,11 +56,11 @@
|
|
|
60
56
|
<v-col>
|
|
61
57
|
<ViewerTreeObject
|
|
62
58
|
v-if="!treeviewStore.isAdditionnalTreeDisplayed"
|
|
63
|
-
@show-menu="
|
|
59
|
+
@show-menu="emit('show-menu', $event)"
|
|
64
60
|
/>
|
|
65
61
|
<ViewerTreeComponent
|
|
66
62
|
v-else
|
|
67
|
-
@show-menu="
|
|
63
|
+
@show-menu="emit('show-menu', $event)"
|
|
68
64
|
:id="treeviewStore.model_id"
|
|
69
65
|
/>
|
|
70
66
|
</v-col>
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
const { width } = defineProps({
|
|
6
6
|
width: { type: Number, default: 400 },
|
|
7
7
|
})
|
|
8
|
+
|
|
9
|
+
const emit = defineEmits(["close"])
|
|
8
10
|
</script>
|
|
9
11
|
<template>
|
|
10
12
|
<GlassCard
|
|
@@ -50,10 +52,8 @@
|
|
|
50
52
|
|
|
51
53
|
<template #actions>
|
|
52
54
|
<v-card-actions class="justify-center pb-4">
|
|
53
|
-
<v-btn variant="text" color="white" @click="
|
|
54
|
-
|
|
55
|
-
>
|
|
56
|
-
<v-btn variant="outlined" color="white" @click="$emit('close')"
|
|
55
|
+
<v-btn variant="text" color="white" @click="emit('close')">Close</v-btn>
|
|
56
|
+
<v-btn variant="outlined" color="white" @click="emit('close')"
|
|
57
57
|
>Apply</v-btn
|
|
58
58
|
>
|
|
59
59
|
</v-card-actions>
|
package/app/stores/data.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Third party imports
|
|
2
2
|
import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json"
|
|
3
|
-
import { database } from "
|
|
3
|
+
import { database } from "@ogw_internal/database/database.js"
|
|
4
4
|
import { liveQuery } from "dexie"
|
|
5
5
|
import { useObservable } from "@vueuse/rxjs"
|
|
6
6
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
|
|
@@ -42,13 +42,15 @@ export const useDataStore = defineStore("data", () => {
|
|
|
42
42
|
Block: "Blocks",
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
const componentsByType =
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
const componentsByType = {}
|
|
46
|
+
for (const component_item of items) {
|
|
47
|
+
if (componentTitles[component_item.type]) {
|
|
48
|
+
if (!componentsByType[component_item.type]) {
|
|
49
|
+
componentsByType[component_item.type] = []
|
|
50
|
+
}
|
|
51
|
+
componentsByType[component_item.type].push(component_item)
|
|
49
52
|
}
|
|
50
|
-
|
|
51
|
-
}, {})
|
|
53
|
+
}
|
|
52
54
|
|
|
53
55
|
return Object.keys(componentTitles)
|
|
54
56
|
.filter((type) => componentsByType[type])
|
|
@@ -124,21 +126,25 @@ export const useDataStore = defineStore("data", () => {
|
|
|
124
126
|
response_function: async (response) => {
|
|
125
127
|
const allComponents = [
|
|
126
128
|
...response.mesh_components.map(
|
|
127
|
-
({
|
|
129
|
+
({
|
|
130
|
+
boundaries: _boundaries,
|
|
131
|
+
internals: _internals,
|
|
132
|
+
...component
|
|
133
|
+
}) => component,
|
|
128
134
|
),
|
|
129
135
|
...response.collection_components.map(
|
|
130
|
-
({ items, ...component }) => component,
|
|
136
|
+
({ items: _items, ...component }) => component,
|
|
131
137
|
),
|
|
132
|
-
].map((component) => (
|
|
138
|
+
].map((component) => Object.assign(component, { id }))
|
|
133
139
|
await addModelComponents(allComponents)
|
|
134
140
|
},
|
|
135
141
|
},
|
|
136
142
|
)
|
|
137
143
|
}
|
|
138
144
|
|
|
139
|
-
async function getMeshComponentGeodeIds(id,
|
|
145
|
+
async function getMeshComponentGeodeIds(id, component_type) {
|
|
140
146
|
const components = await database.model_components
|
|
141
|
-
.where({ id, type:
|
|
147
|
+
.where({ id, type: component_type })
|
|
142
148
|
.toArray()
|
|
143
149
|
return components.map((component) => component.geode_id)
|
|
144
150
|
}
|
package/app/stores/data_style.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { database } from "@ogw_internal/database/database.js"
|
|
1
2
|
import { getDefaultStyle } from "@ogw_front/utils/default_styles"
|
|
2
|
-
import { database } from "../../internal/database/database.js"
|
|
3
3
|
import { useDataStore } from "@ogw_front/stores/data"
|
|
4
|
-
import { useDataStyleStateStore } from "
|
|
5
|
-
import useMeshStyle from "
|
|
6
|
-
import useModelStyle from "
|
|
4
|
+
import { useDataStyleStateStore } from "@ogw_internal/stores/data_style/state"
|
|
5
|
+
import { useMeshStyle } from "@ogw_internal/stores/data_style/mesh/index"
|
|
6
|
+
import { useModelStyle } from "@ogw_internal/stores/data_style/model/index"
|
|
7
7
|
|
|
8
8
|
export const useDataStyleStore = defineStore("dataStyle", () => {
|
|
9
9
|
const dataStyleState = useDataStyleStateStore()
|
|
@@ -61,19 +61,19 @@ export const useDataStyleStore = defineStore("dataStyle", () => {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
function applyAllStylesFromState() {
|
|
65
65
|
const ids = Object.keys(dataStyleState.styles || {})
|
|
66
|
-
const promises =
|
|
67
|
-
for (const id of ids) {
|
|
66
|
+
const promises = ids.map(async (id) => {
|
|
68
67
|
const meta = await dataStore.item(id)
|
|
69
68
|
const viewerType = meta?.viewer_type
|
|
70
69
|
const style = dataStyleState.styles[id]
|
|
71
70
|
if (style && viewerType === "mesh") {
|
|
72
|
-
|
|
73
|
-
} else if (style && viewerType === "model") {
|
|
74
|
-
promises.push(modelStyleStore.applyModelStyle(id))
|
|
71
|
+
return meshStyleStore.applyMeshStyle(id)
|
|
75
72
|
}
|
|
76
|
-
|
|
73
|
+
if (style && viewerType === "model") {
|
|
74
|
+
return modelStyleStore.applyModelStyle(id)
|
|
75
|
+
}
|
|
76
|
+
})
|
|
77
77
|
return Promise.all(promises)
|
|
78
78
|
}
|
|
79
79
|
|
package/app/stores/geode.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Status from "@ogw_front/utils/status"
|
|
2
|
-
import { api_fetch } from "
|
|
1
|
+
import { Status } from "@ogw_front/utils/status"
|
|
2
|
+
import { api_fetch } from "@ogw_internal/utils/api_fetch"
|
|
3
3
|
import { appMode } from "@ogw_front/utils/app_mode"
|
|
4
4
|
import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json"
|
|
5
5
|
import { useFeedbackStore } from "@ogw_front/stores/feedback"
|