@geode/opengeodeweb-front 10.6.2 → 10.6.3-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/.eslintrc.cjs +1 -1
- package/.oxlintrc.json +3 -22
- package/app/assets/geode_objects.js +26 -26
- package/app/components/Carousel.vue +62 -66
- package/app/components/CrsSelector.vue +48 -52
- package/app/components/DeleteDialog.vue +21 -37
- package/app/components/DragAndDrop.vue +35 -41
- package/app/components/ExtensionSelector.vue +50 -63
- package/app/components/FeedBack/ErrorBanner.vue +7 -10
- package/app/components/FeedBack/Snackers.vue +12 -14
- package/app/components/FetchingData.vue +1 -6
- package/app/components/FileSelector.vue +41 -47
- package/app/components/FileUploader.vue +62 -79
- package/app/components/GlassCard.vue +19 -19
- package/app/components/HybridRenderingView.vue +37 -38
- package/app/components/InfraConnected.vue +3 -3
- package/app/components/Inspector/InspectionButton.vue +27 -31
- package/app/components/Inspector/ResultPanel.vue +13 -24
- package/app/components/Launcher.vue +13 -13
- package/app/components/Loading.vue +63 -69
- package/app/components/MissingFilesSelector.vue +53 -73
- package/app/components/ObjectSelector.vue +81 -99
- package/app/components/PackagesVersions.vue +27 -30
- package/app/components/Recaptcha.vue +60 -71
- package/app/components/RemoteRenderingView.vue +102 -108
- package/app/components/Screenshot.vue +36 -42
- package/app/components/SearchBar.vue +5 -5
- package/app/components/Step.vue +37 -44
- package/app/components/Stepper.vue +29 -35
- package/app/components/VeaseViewToolbar.vue +69 -78
- package/app/components/ViewToolbar.vue +41 -45
- package/app/components/Viewer/BreadCrumb.vue +18 -30
- package/app/components/Viewer/ContextMenu.vue +176 -179
- package/app/components/Viewer/ContextMenuItem.vue +105 -117
- package/app/components/Viewer/EdgedCurve/PointsOptions.vue +6 -9
- package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +82 -93
- package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +84 -99
- package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +83 -98
- package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +62 -73
- package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +84 -108
- package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +82 -105
- package/app/components/Viewer/Generic/Model/EdgesOptions.vue +19 -23
- package/app/components/Viewer/Generic/Model/PointsOptions.vue +26 -30
- package/app/components/Viewer/Grid/2D/CellsOptions.vue +5 -5
- package/app/components/Viewer/Grid/2D/EdgesOptions.vue +6 -9
- package/app/components/Viewer/Grid/2D/PointsOptions.vue +6 -9
- package/app/components/Viewer/Grid/3D/CellsOptions.vue +5 -5
- package/app/components/Viewer/Grid/3D/EdgesOptions.vue +6 -9
- package/app/components/Viewer/Grid/3D/FacetsOptions.vue +5 -5
- package/app/components/Viewer/Grid/3D/PointsOptions.vue +6 -9
- package/app/components/Viewer/HybridSolid/EdgesOptions.vue +6 -9
- package/app/components/Viewer/HybridSolid/PointsOptions.vue +6 -9
- package/app/components/Viewer/HybridSolid/PolygonsOptions.vue +6 -9
- package/app/components/Viewer/HybridSolid/PolyhedraOptions.vue +6 -9
- package/app/components/Viewer/Options/AttributeColorBar.vue +8 -8
- package/app/components/Viewer/Options/AttributeSelector.vue +73 -78
- package/app/components/Viewer/Options/ColorMapList.vue +115 -140
- package/app/components/Viewer/Options/ColorMapPicker.vue +128 -142
- package/app/components/Viewer/Options/ColorPicker.vue +9 -9
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +77 -91
- package/app/components/Viewer/Options/TextureItem.vue +54 -58
- package/app/components/Viewer/Options/TexturesSelector.vue +22 -26
- package/app/components/Viewer/Options/VisibilitySwitch.vue +1 -1
- package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +61 -68
- package/app/components/Viewer/PolygonalSurface/EdgesOptions.vue +6 -9
- package/app/components/Viewer/PolygonalSurface/PointsOptions.vue +6 -9
- package/app/components/Viewer/PolygonalSurface/SpecificPolygonsOptions.vue +83 -103
- package/app/components/Viewer/Solid/EdgesOptions.vue +6 -9
- package/app/components/Viewer/Solid/PointsOptions.vue +6 -9
- package/app/components/Viewer/Solid/PolygonsOptions.vue +6 -9
- package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +82 -105
- package/app/components/Viewer/TetrahedralSolid/TetrahedraOptions.vue +5 -5
- package/app/components/Viewer/TetrahedralSolid/TrianglesOptions.vue +5 -5
- package/app/components/Viewer/Tree/ObjectTree.vue +80 -89
- package/app/components/Viewer/TreeComponent.vue +43 -49
- package/app/components/Viewer/TreeObject.vue +48 -50
- package/app/components/Viewer/TriangulatedSurface/EdgesOptions.vue +6 -9
- package/app/components/Viewer/TriangulatedSurface/PointsOptions.vue +5 -5
- package/app/components/Viewer/TriangulatedSurface/TrianglesOptions.vue +5 -5
- package/app/components/Wrapper.vue +8 -8
- package/app/components/ZScaling.vue +18 -27
- package/app/composables/project_manager.js +57 -67
- package/app/composables/run_function_when_microservices_connected.js +8 -8
- package/app/plugins/auto_store_register.js +11 -13
- package/app/stores/app.js +118 -138
- package/app/stores/data.js +52 -68
- package/app/stores/data_style.js +36 -36
- package/app/stores/feedback.js +17 -20
- package/app/stores/geode.js +54 -55
- package/app/stores/hybrid_viewer.js +164 -177
- package/app/stores/infra.js +45 -55
- package/app/stores/lambda.js +26 -26
- package/app/stores/menu.js +78 -85
- package/app/stores/treeview.js +57 -65
- package/app/stores/viewer.js +92 -104
- package/app/utils/colormap.js +3 -3
- package/app/utils/config.js +16 -22
- package/app/utils/default_styles.js +50 -62
- package/app/utils/extension.js +44 -44
- package/app/utils/file_import_workflow.js +50 -64
- package/app/utils/local/app_mode.js +2 -2
- package/app/utils/local/cleanup.js +66 -72
- package/app/utils/local/microservices.js +61 -71
- package/app/utils/local/path.js +16 -19
- package/app/utils/local/scripts.js +22 -22
- package/app/utils/recaptcha.js +6 -6
- package/app/utils/server.js +21 -24
- package/app/utils/status.js +2 -2
- package/app/utils/treeview.js +4 -4
- package/app/utils/validate_schema.js +7 -7
- package/commitlint.config.js +2 -2
- package/eslint.config.js +4 -4
- package/internal/database/database.js +38 -46
- package/internal/database/extended_database.js +9 -10
- package/internal/database/tables/data.js +2 -3
- package/internal/database/tables/model_components.js +1 -1
- package/internal/database/tables/model_components_relation.js +1 -1
- package/internal/stores/data_style/mesh/cells/cell.js +47 -63
- package/internal/stores/data_style/mesh/cells/color.js +11 -16
- package/internal/stores/data_style/mesh/cells/common.js +6 -6
- package/internal/stores/data_style/mesh/cells/index.js +37 -47
- package/internal/stores/data_style/mesh/cells/textures.js +11 -12
- package/internal/stores/data_style/mesh/cells/vertex.js +47 -58
- package/internal/stores/data_style/mesh/cells/visibility.js +11 -16
- package/internal/stores/data_style/mesh/edges/color.js +11 -16
- package/internal/stores/data_style/mesh/edges/common.js +6 -6
- package/internal/stores/data_style/mesh/edges/edge.js +47 -63
- package/internal/stores/data_style/mesh/edges/index.js +38 -52
- package/internal/stores/data_style/mesh/edges/vertex.js +47 -58
- package/internal/stores/data_style/mesh/edges/visibility.js +11 -16
- package/internal/stores/data_style/mesh/edges/width.js +11 -16
- package/internal/stores/data_style/mesh/index.js +34 -34
- package/internal/stores/data_style/mesh/points/color.js +11 -16
- package/internal/stores/data_style/mesh/points/common.js +6 -6
- package/internal/stores/data_style/mesh/points/index.js +35 -49
- package/internal/stores/data_style/mesh/points/size.js +11 -16
- package/internal/stores/data_style/mesh/points/vertex.js +47 -58
- package/internal/stores/data_style/mesh/points/visibility.js +11 -16
- package/internal/stores/data_style/mesh/polygons/color.js +11 -16
- package/internal/stores/data_style/mesh/polygons/common.js +6 -6
- package/internal/stores/data_style/mesh/polygons/index.js +36 -45
- package/internal/stores/data_style/mesh/polygons/polygon.js +45 -56
- package/internal/stores/data_style/mesh/polygons/textures.js +11 -16
- package/internal/stores/data_style/mesh/polygons/vertex.js +47 -58
- package/internal/stores/data_style/mesh/polygons/visibility.js +11 -16
- package/internal/stores/data_style/mesh/polyhedra/color.js +11 -16
- package/internal/stores/data_style/mesh/polyhedra/common.js +6 -6
- package/internal/stores/data_style/mesh/polyhedra/index.js +29 -42
- package/internal/stores/data_style/mesh/polyhedra/polyhedron.js +43 -47
- package/internal/stores/data_style/mesh/polyhedra/vertex.js +47 -58
- package/internal/stores/data_style/mesh/polyhedra/visibility.js +11 -17
- package/internal/stores/data_style/model/blocks/color.js +21 -24
- package/internal/stores/data_style/model/blocks/common.js +6 -6
- package/internal/stores/data_style/model/blocks/index.js +13 -17
- package/internal/stores/data_style/model/blocks/visibility.js +21 -24
- package/internal/stores/data_style/model/corners/color.js +21 -24
- package/internal/stores/data_style/model/corners/common.js +6 -6
- package/internal/stores/data_style/model/corners/index.js +14 -18
- package/internal/stores/data_style/model/corners/visibility.js +21 -25
- package/internal/stores/data_style/model/edges/common.js +4 -4
- package/internal/stores/data_style/model/edges/index.js +7 -7
- package/internal/stores/data_style/model/edges/visibility.js +11 -15
- package/internal/stores/data_style/model/index.js +84 -100
- package/internal/stores/data_style/model/lines/color.js +21 -24
- package/internal/stores/data_style/model/lines/common.js +6 -6
- package/internal/stores/data_style/model/lines/index.js +13 -17
- package/internal/stores/data_style/model/lines/visibility.js +21 -24
- package/internal/stores/data_style/model/points/common.js +4 -4
- package/internal/stores/data_style/model/points/index.js +9 -9
- package/internal/stores/data_style/model/points/size.js +11 -11
- package/internal/stores/data_style/model/points/visibility.js +11 -15
- package/internal/stores/data_style/model/surfaces/color.js +21 -24
- package/internal/stores/data_style/model/surfaces/common.js +6 -6
- package/internal/stores/data_style/model/surfaces/index.js +14 -22
- package/internal/stores/data_style/model/surfaces/visibility.js +18 -22
- package/internal/stores/data_style/state.js +11 -11
- package/internal/utils/api_fetch.js +24 -34
- package/internal/utils/upload_file.js +19 -24
- package/internal/utils/viewer_call.js +23 -36
- package/nuxt.config.js +7 -11
- package/package.json +3 -3
- package/scripts/generate_geode_objects.js +14 -16
- package/server/api/app/kill.post.js +4 -4
- package/server/api/app/project_folder_path.post.js +11 -11
- package/server/api/app/run_back.post.js +12 -12
- package/server/api/app/run_viewer.post.js +12 -12
- package/server/api/extensions/run.post.js +34 -41
- package/server/api/extensions/upload.put.js +48 -62
- package/tests/integration/setup.js +43 -53
- package/tests/integration/stores/data_style/mesh/cells.nuxt.test.js +90 -116
- package/tests/integration/stores/data_style/mesh/edges.nuxt.test.js +81 -107
- package/tests/integration/stores/data_style/mesh/index.nuxt.test.js +38 -41
- package/tests/integration/stores/data_style/mesh/points.nuxt.test.js +85 -101
- package/tests/integration/stores/data_style/mesh/polygons.nuxt.test.js +89 -113
- package/tests/integration/stores/data_style/mesh/polyhedra.nuxt.test.js +81 -105
- package/tests/integration/stores/data_style/model/blocks.nuxt.test.js +56 -73
- package/tests/integration/stores/data_style/model/corners.nuxt.test.js +59 -76
- package/tests/integration/stores/data_style/model/edges.nuxt.test.js +39 -42
- package/tests/integration/stores/data_style/model/index.nuxt.test.js +31 -34
- package/tests/integration/stores/data_style/model/lines.nuxt.test.js +60 -73
- package/tests/integration/stores/data_style/model/points.nuxt.test.js +52 -55
- package/tests/integration/stores/data_style/model/surfaces.nuxt.test.js +59 -80
- package/tests/integration/stores/viewer.nuxt.test.js +35 -38
- package/tests/setup_indexeddb.js +2 -2
- package/tests/unit/components/CrsSelector.nuxt.test.js +28 -28
- package/tests/unit/components/ExtensionSelector.nuxt.test.js +33 -35
- package/tests/unit/components/FeedBack/ErrorsBanner.nuxt.test.js +23 -23
- package/tests/unit/components/FeedBack/Snackers.nuxt.test.js +18 -18
- package/tests/unit/components/FileSelector.nuxt.test.js +57 -59
- package/tests/unit/components/FileUploader.nuxt.test.js +35 -39
- package/tests/unit/components/Inspector/InspectionButton.nuxt.test.js +28 -28
- package/tests/unit/components/Inspector/ResultPanel.nuxt.test.js +22 -27
- package/tests/unit/components/Launcher.nuxt.test.js +20 -22
- package/tests/unit/components/MissingFilesSelector.nuxt.test.js +37 -37
- package/tests/unit/components/ObjectSelector.nuxt.test.js +62 -62
- package/tests/unit/components/PackagesVersions.nuxt.test.js +16 -16
- package/tests/unit/components/Step.nuxt.test.js +18 -19
- package/tests/unit/components/Stepper.nuxt.test.js +18 -18
- package/tests/unit/composables/api_fetch.nuxt.test.js +34 -36
- package/tests/unit/composables/project_manager.nuxt.test.js +93 -112
- package/tests/unit/composables/run_function_when_microservices_connected.nuxt.test.js +36 -36
- package/tests/unit/composables/upload_file.nuxt.test.js +27 -29
- package/tests/unit/plugins/project_load.nuxt.test.js +31 -33
- package/tests/unit/stores/app.nuxt.test.js +90 -92
- package/tests/unit/stores/feedback.nuxt.test.js +47 -57
- package/tests/unit/stores/geode.nuxt.test.js +111 -115
- package/tests/unit/stores/infra.nuxt.test.js +148 -148
- package/tests/unit/stores/lambda.nuxt.test.js +72 -74
- package/tests/unit/stores/treeview.nuxt.test.js +19 -21
- package/tests/unit/stores/viewer.nuxt.test.js +109 -122
- package/tests/unit/utils/recaptcha.nuxt.test.js +25 -29
- package/tests/unit/utils/validate_schema.nuxt.test.js +17 -17
- package/tests/utils.js +11 -11
- package/tests/vitest.config.js +9 -9
- package/vuetify_config.js +2 -2
|
@@ -1,105 +1,90 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import FetchingData from "@ogw_front/components/FetchingData.vue";
|
|
3
|
+
import { geode_objects } from "@ogw_front/assets/geode_objects";
|
|
4
|
+
import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json";
|
|
5
|
+
import { useGeodeStore } from "@ogw_front/stores/geode";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
const schema = schemas.opengeodeweb_back.allowed_objects;
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
const emit = defineEmits(["update_values", "increment_step"]);
|
|
10
|
+
console.log("ObjectSelector");
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
const { filenames } = defineProps({
|
|
13
|
+
filenames: { type: Array, required: true },
|
|
14
|
+
});
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
const geodeStore = useGeodeStore();
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
const loading = ref(false);
|
|
19
|
+
const allowed_objects = ref({});
|
|
20
|
+
const toggle_loading = useToggle(loading);
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
)
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const best_score_objects = object_keys.filter(
|
|
40
|
-
(key) => object_map[key].is_loadable === highest_load_score,
|
|
41
|
-
)
|
|
42
|
-
if (best_score_objects.length === 1) {
|
|
43
|
-
return best_score_objects[0]
|
|
44
|
-
}
|
|
45
|
-
const highest_priority = Math.max(
|
|
46
|
-
...best_score_objects.map(
|
|
47
|
-
(key) => object_map[key].object_priority ?? -Infinity,
|
|
48
|
-
),
|
|
49
|
-
)
|
|
50
|
-
const best_priority_objects = best_score_objects.filter(
|
|
51
|
-
(key) => object_map[key].object_priority === highest_priority,
|
|
52
|
-
)
|
|
53
|
-
if (highest_priority !== -Infinity && best_priority_objects.length === 1) {
|
|
54
|
-
return best_priority_objects[0]
|
|
55
|
-
}
|
|
56
|
-
return undefined
|
|
22
|
+
function select_geode_object(object_map) {
|
|
23
|
+
const object_keys = Object.keys(object_map);
|
|
24
|
+
if (object_keys.length === 0) {
|
|
25
|
+
return undefined;
|
|
26
|
+
}
|
|
27
|
+
if (object_keys.length === 1 && object_map[object_keys[0]].is_loadable > 0) {
|
|
28
|
+
return object_keys[0];
|
|
29
|
+
}
|
|
30
|
+
const highest_load_score = Math.max(...object_keys.map((key) => object_map[key].is_loadable));
|
|
31
|
+
if (highest_load_score <= 0) {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
const best_score_objects = object_keys.filter(
|
|
35
|
+
(key) => object_map[key].is_loadable === highest_load_score,
|
|
36
|
+
);
|
|
37
|
+
if (best_score_objects.length === 1) {
|
|
38
|
+
return best_score_objects[0];
|
|
57
39
|
}
|
|
40
|
+
const highest_priority = Math.max(
|
|
41
|
+
...best_score_objects.map((key) => object_map[key].object_priority ?? -Infinity),
|
|
42
|
+
);
|
|
43
|
+
const best_priority_objects = best_score_objects.filter(
|
|
44
|
+
(key) => object_map[key].object_priority === highest_priority,
|
|
45
|
+
);
|
|
46
|
+
if (highest_priority !== -Infinity && best_priority_objects.length === 1) {
|
|
47
|
+
return best_priority_objects[0];
|
|
48
|
+
}
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
58
51
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
52
|
+
async function get_allowed_objects() {
|
|
53
|
+
toggle_loading();
|
|
54
|
+
allowed_objects.value = {};
|
|
62
55
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
(obj) => obj[key].is_loadable,
|
|
78
|
-
)
|
|
79
|
-
const priorities = allowed_objects_list
|
|
80
|
-
.map((obj) => obj[key].object_priority)
|
|
81
|
-
.filter((priority) => priority !== undefined && priority !== null)
|
|
82
|
-
final_object[key] = { is_loadable: Math.min(...load_scores) }
|
|
83
|
-
if (priorities.length > 0) {
|
|
84
|
-
final_object[key].object_priority = Math.max(...priorities)
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
allowed_objects.value = final_object
|
|
88
|
-
const selected_object = select_geode_object(final_object)
|
|
89
|
-
if (selected_object) {
|
|
90
|
-
set_geode_object(selected_object)
|
|
56
|
+
const promise_array = filenames.map((filename) => geodeStore.request(schema, { filename }));
|
|
57
|
+
const responses = await Promise.all(promise_array);
|
|
58
|
+
const allowed_objects_list = responses.map((response) => response.allowed_objects);
|
|
59
|
+
const all_keys = [...new Set(allowed_objects_list.flatMap((obj) => Object.keys(obj)))];
|
|
60
|
+
const common_keys = all_keys.filter((key) => allowed_objects_list.every((obj) => key in obj));
|
|
61
|
+
const final_object = {};
|
|
62
|
+
for (const key of common_keys) {
|
|
63
|
+
const load_scores = allowed_objects_list.map((obj) => obj[key].is_loadable);
|
|
64
|
+
const priorities = allowed_objects_list
|
|
65
|
+
.map((obj) => obj[key].object_priority)
|
|
66
|
+
.filter((priority) => priority !== undefined && priority !== null);
|
|
67
|
+
final_object[key] = { is_loadable: Math.min(...load_scores) };
|
|
68
|
+
if (priorities.length > 0) {
|
|
69
|
+
final_object[key].object_priority = Math.max(...priorities);
|
|
91
70
|
}
|
|
92
|
-
toggle_loading()
|
|
93
71
|
}
|
|
72
|
+
allowed_objects.value = final_object;
|
|
73
|
+
const selected_object = select_geode_object(final_object);
|
|
74
|
+
if (selected_object) {
|
|
75
|
+
set_geode_object(selected_object);
|
|
76
|
+
}
|
|
77
|
+
toggle_loading();
|
|
78
|
+
}
|
|
94
79
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
80
|
+
function set_geode_object(geode_object_type) {
|
|
81
|
+
console.log("set_geode_object", { geode_object_type });
|
|
82
|
+
if (geode_object_type) {
|
|
83
|
+
emit("update_values", { geode_object_type });
|
|
84
|
+
emit("increment_step");
|
|
101
85
|
}
|
|
102
|
-
|
|
86
|
+
}
|
|
87
|
+
await get_allowed_objects();
|
|
103
88
|
</script>
|
|
104
89
|
|
|
105
90
|
<template>
|
|
@@ -140,10 +125,7 @@
|
|
|
140
125
|
<v-card class="card" variant="tonal" rounded>
|
|
141
126
|
<v-card-text>
|
|
142
127
|
This file format isn't supported! Please check the
|
|
143
|
-
<a
|
|
144
|
-
href="https://docs.geode-solutions.com/guides/formats/"
|
|
145
|
-
target="_blank"
|
|
146
|
-
>
|
|
128
|
+
<a href="https://docs.geode-solutions.com/guides/formats/" target="_blank">
|
|
147
129
|
supported file formats documentation</a
|
|
148
130
|
>
|
|
149
131
|
for more information
|
|
@@ -153,12 +135,12 @@
|
|
|
153
135
|
</template>
|
|
154
136
|
|
|
155
137
|
<style scoped>
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
138
|
+
.disabled {
|
|
139
|
+
filter: opacity(0.7);
|
|
140
|
+
cursor: pointer;
|
|
141
|
+
}
|
|
160
142
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
143
|
+
.disabled div {
|
|
144
|
+
cursor: not-allowed;
|
|
145
|
+
}
|
|
164
146
|
</style>
|
|
@@ -1,46 +1,43 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { Status } from "@ogw_front/utils/status";
|
|
3
|
+
import { useGeodeStore } from "@ogw_front/stores/geode";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
const { schema } = defineProps({
|
|
6
|
+
schema: { type: Object, required: true },
|
|
7
|
+
});
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
const geodeStore = useGeodeStore();
|
|
10
|
+
const packages_versions = ref([]);
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
},
|
|
12
|
+
async function get_packages_versions() {
|
|
13
|
+
await geodeStore.request(
|
|
14
|
+
schema,
|
|
15
|
+
{},
|
|
16
|
+
{
|
|
17
|
+
response_function: (response) => {
|
|
18
|
+
packages_versions.value = response.versions;
|
|
20
19
|
},
|
|
21
|
-
)
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
watch(
|
|
25
|
-
() => geodeStore.status,
|
|
26
|
-
(value) => {
|
|
27
|
-
if (value === Status.CONNECTED) {
|
|
28
|
-
get_packages_versions()
|
|
29
|
-
}
|
|
30
20
|
},
|
|
31
|
-
)
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
watch(
|
|
25
|
+
() => geodeStore.status,
|
|
26
|
+
(value) => {
|
|
27
|
+
if (value === Status.CONNECTED) {
|
|
28
|
+
get_packages_versions();
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
);
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
await get_packages_versions();
|
|
34
34
|
</script>
|
|
35
35
|
|
|
36
36
|
<template>
|
|
37
37
|
<v-container>
|
|
38
38
|
This tool uses our Open-Source codes
|
|
39
39
|
<v-tooltip location="end">
|
|
40
|
-
<span
|
|
41
|
-
v-for="package_version in packages_versions"
|
|
42
|
-
:key="package_version.package"
|
|
43
|
-
>
|
|
40
|
+
<span v-for="package_version in packages_versions" :key="package_version.package">
|
|
44
41
|
{{ package_version.package }} v{{ package_version.version }}
|
|
45
42
|
<br />
|
|
46
43
|
</span>
|
|
@@ -1,68 +1,66 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { appMode } from "@ogw_front/utils/local/app_mode";
|
|
3
|
+
import { useInfraStore } from "@ogw_front/stores/infra";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const RESPONSE_STATUS_OK = 200;
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
return "E-mail must be valid."
|
|
40
|
-
},
|
|
41
|
-
]
|
|
42
|
-
|
|
43
|
-
onMounted(() => {
|
|
44
|
-
if (import.meta.client) {
|
|
45
|
-
if (
|
|
46
|
-
process.env.NODE_ENV !== "production" ||
|
|
47
|
-
infraStore.app_mode !== appMode.CLOUD
|
|
48
|
-
) {
|
|
49
|
-
infraStore.$patch({ is_captcha_validated: true })
|
|
50
|
-
}
|
|
7
|
+
const { button_label, button_color, color } = defineProps({
|
|
8
|
+
button_label: {
|
|
9
|
+
type: String,
|
|
10
|
+
required: false,
|
|
11
|
+
default: "Launch the app",
|
|
12
|
+
},
|
|
13
|
+
button_color: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: false,
|
|
16
|
+
default: "white",
|
|
17
|
+
},
|
|
18
|
+
color: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: false,
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
const infraStore = useInfraStore();
|
|
24
|
+
const name = ref("");
|
|
25
|
+
const email = ref("");
|
|
26
|
+
const launch = ref(false);
|
|
27
|
+
const valid = ref(false);
|
|
28
|
+
const emailRules = [
|
|
29
|
+
(value) => {
|
|
30
|
+
if (value) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
return "E-mail is required.";
|
|
34
|
+
},
|
|
35
|
+
(value) => {
|
|
36
|
+
if (/.+@.+\..+/.test(value)) {
|
|
37
|
+
return true;
|
|
51
38
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
})
|
|
62
|
-
infraStore.$patch({
|
|
63
|
-
is_captcha_validated: response.status === RESPONSE_STATUS_OK,
|
|
64
|
-
})
|
|
39
|
+
return "E-mail must be valid.";
|
|
40
|
+
},
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
onMounted(() => {
|
|
44
|
+
if (
|
|
45
|
+
import.meta.client &&
|
|
46
|
+
(process.env.NODE_ENV !== "production" || infraStore.app_mode !== appMode.CLOUD)
|
|
47
|
+
) {
|
|
48
|
+
infraStore.$patch({ is_captcha_validated: true });
|
|
65
49
|
}
|
|
50
|
+
});
|
|
51
|
+
async function submit_recaptcha() {
|
|
52
|
+
const response = await $fetch.raw(`/.netlify/functions/recaptcha`, {
|
|
53
|
+
method: "POST",
|
|
54
|
+
body: {
|
|
55
|
+
name: name.value,
|
|
56
|
+
email: email.value,
|
|
57
|
+
launch: launch.value,
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
infraStore.$patch({
|
|
61
|
+
is_captcha_validated: response.status === RESPONSE_STATUS_OK,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
66
64
|
</script>
|
|
67
65
|
|
|
68
66
|
<template>
|
|
@@ -77,12 +75,7 @@
|
|
|
77
75
|
</VRow>
|
|
78
76
|
<VRow>
|
|
79
77
|
<VCol>
|
|
80
|
-
<VTextField
|
|
81
|
-
v-model="email"
|
|
82
|
-
:rules="emailRules"
|
|
83
|
-
label="E-mail"
|
|
84
|
-
required
|
|
85
|
-
/>
|
|
78
|
+
<VTextField v-model="email" :rules="emailRules" label="E-mail" required />
|
|
86
79
|
</VCol>
|
|
87
80
|
</VRow>
|
|
88
81
|
<VRow>
|
|
@@ -96,11 +89,7 @@
|
|
|
96
89
|
</VRow>
|
|
97
90
|
<VRow align="center" justify="center">
|
|
98
91
|
<VCol cols="4" class="d-flex justify-center align-center">
|
|
99
|
-
<VBtn
|
|
100
|
-
:text="button_label"
|
|
101
|
-
:color="color || button_color"
|
|
102
|
-
@click="submit_recaptcha"
|
|
103
|
-
/>
|
|
92
|
+
<VBtn :text="button_label" :color="color || button_color" @click="submit_recaptcha" />
|
|
104
93
|
</VCol>
|
|
105
94
|
</VRow>
|
|
106
95
|
</template>
|
|
@@ -1,102 +1,102 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
2
|
+
import { useElementSize, useWindowSize } from "@vueuse/core";
|
|
3
|
+
import { Status } from "@ogw_front/utils/status";
|
|
4
|
+
import ViewToolbar from "@ogw_front/components/ViewToolbar";
|
|
5
|
+
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
6
|
+
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json";
|
|
7
|
+
import vtkRemoteView from "@kitware/vtk.js/Rendering/Misc/RemoteView";
|
|
8
|
+
|
|
9
|
+
const { viewId } = defineProps({
|
|
10
|
+
viewId: { type: String, default: "-1" },
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const viewerStore = useViewerStore();
|
|
14
|
+
const viewer = useTemplateRef("viewer");
|
|
15
|
+
const { width, height } = useElementSize(viewer);
|
|
16
|
+
|
|
17
|
+
const { width: windowWidth, height: windowHeight } = useWindowSize();
|
|
18
|
+
|
|
19
|
+
function get_x_y(event) {
|
|
20
|
+
if (viewerStore.picking_mode.value === true) {
|
|
21
|
+
const { offsetX, offsetY } = event;
|
|
22
|
+
viewerStore.set_picked_point(offsetX, offsetY);
|
|
23
|
+
viewerStore.request(viewer_schemas.opengeodeweb_viewer.viewer.get_point_position, {
|
|
24
|
+
x: offsetX,
|
|
25
|
+
y: offsetY,
|
|
26
|
+
});
|
|
28
27
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const connected = ref(false);
|
|
31
|
+
// oxlint-disable-next-line import/no-named-as-default-member
|
|
32
|
+
const view = vtkRemoteView.newInstance({
|
|
33
|
+
rpcWheelEvent: "viewport.mouse.zoom.wheel",
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
if (location.hostname.split(".")[0] === "localhost") {
|
|
37
|
+
view.setInteractiveRatio(1);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function resize() {
|
|
41
|
+
if (view) {
|
|
42
|
+
view.getCanvasView().setSize(0, 0);
|
|
43
|
+
view.resize();
|
|
38
44
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
watch([windowWidth, windowHeight], () => {
|
|
48
|
+
resize();
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
watch(
|
|
52
|
+
() => viewerStore.picking_mode,
|
|
53
|
+
(value) => {
|
|
54
|
+
const cursor = value ? "crosshair" : "pointer";
|
|
55
|
+
view.getCanvasView().setCursor(cursor);
|
|
56
|
+
},
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
watch([width, height], () => {
|
|
60
|
+
resize();
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
watch(
|
|
64
|
+
() => viewerStore.client,
|
|
65
|
+
() => {
|
|
66
|
+
connect();
|
|
67
|
+
},
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
watch(
|
|
71
|
+
() => props.viewId,
|
|
72
|
+
(id) => {
|
|
73
|
+
if (connected.value) {
|
|
74
|
+
view.setViewId(id);
|
|
75
|
+
view.render();
|
|
44
76
|
}
|
|
45
|
-
}
|
|
77
|
+
},
|
|
78
|
+
);
|
|
46
79
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
watch(
|
|
52
|
-
() => viewerStore.picking_mode,
|
|
53
|
-
(value) => {
|
|
54
|
-
const cursor = value ? "crosshair" : "pointer"
|
|
55
|
-
view.getCanvasView().setCursor(cursor)
|
|
56
|
-
},
|
|
57
|
-
)
|
|
58
|
-
|
|
59
|
-
watch([width, height], () => {
|
|
60
|
-
resize()
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
watch(
|
|
64
|
-
() => viewerStore.client,
|
|
65
|
-
() => {
|
|
66
|
-
connect()
|
|
67
|
-
},
|
|
68
|
-
)
|
|
69
|
-
|
|
70
|
-
watch(
|
|
71
|
-
() => props.viewId,
|
|
72
|
-
(id) => {
|
|
73
|
-
if (connected.value) {
|
|
74
|
-
view.setViewId(id)
|
|
75
|
-
view.render()
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
)
|
|
79
|
-
|
|
80
|
-
function connect() {
|
|
81
|
-
if (viewerStore.status !== Status.CONNECTED) {
|
|
82
|
-
return
|
|
83
|
-
}
|
|
84
|
-
const session = viewerStore.client.getConnection().getSession()
|
|
85
|
-
view.setSession(session)
|
|
86
|
-
view.setViewId(props.viewId)
|
|
87
|
-
connected.value = true
|
|
88
|
-
view.render()
|
|
80
|
+
function connect() {
|
|
81
|
+
if (viewerStore.status !== Status.CONNECTED) {
|
|
82
|
+
return;
|
|
89
83
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
84
|
+
const session = viewerStore.client.getConnection().getSession();
|
|
85
|
+
view.setSession(session);
|
|
86
|
+
view.setViewId(props.viewId);
|
|
87
|
+
connected.value = true;
|
|
88
|
+
view.render();
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
onMounted(async () => {
|
|
92
|
+
if (import.meta.client) {
|
|
93
|
+
window.addEventListener("resize", resize);
|
|
94
|
+
await nextTick();
|
|
95
|
+
view.setContainer(viewer.value.$el);
|
|
96
|
+
connect();
|
|
97
|
+
resize();
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
100
|
</script>
|
|
101
101
|
|
|
102
102
|
<template>
|
|
@@ -106,13 +106,7 @@
|
|
|
106
106
|
<slot name="ui"></slot>
|
|
107
107
|
<v-col
|
|
108
108
|
ref="viewer"
|
|
109
|
-
style="
|
|
110
|
-
overflow: hidden;
|
|
111
|
-
position: relative;
|
|
112
|
-
z-index: 0;
|
|
113
|
-
height: 100%;
|
|
114
|
-
width: 100%;
|
|
115
|
-
"
|
|
109
|
+
style="overflow: hidden; position: relative; z-index: 0; height: 100%; width: 100%"
|
|
116
110
|
class="pa-0"
|
|
117
111
|
@click="get_x_y"
|
|
118
112
|
@keydown.esc="viewerStore.toggle_picking_mode(false)"
|
|
@@ -122,12 +116,12 @@
|
|
|
122
116
|
</template>
|
|
123
117
|
|
|
124
118
|
<style scoped>
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
119
|
+
.list {
|
|
120
|
+
position: absolute;
|
|
121
|
+
z-index: 2;
|
|
122
|
+
left: 0;
|
|
123
|
+
top: 0;
|
|
124
|
+
background-color: transparent;
|
|
125
|
+
border-radius: 16px;
|
|
126
|
+
}
|
|
133
127
|
</style>
|