@geode/opengeodeweb-front 10.6.2 → 10.7.0-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
- package/.prettierrc +0 -4
|
@@ -1,85 +1,74 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
|
|
2
|
+
import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import FetchingData from "@ogw_front/components/FetchingData";
|
|
5
|
+
import { useGeodeStore } from "@ogw_front/stores/geode";
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"update_values",
|
|
10
|
-
"increment_step",
|
|
11
|
-
"decrement_step",
|
|
12
|
-
])
|
|
7
|
+
const schema = schemas.opengeodeweb_back.geode_objects_and_output_extensions;
|
|
8
|
+
const emit = defineEmits(["update_values", "increment_step", "decrement_step"]);
|
|
13
9
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
const { geode_object_type, filenames } = defineProps({
|
|
11
|
+
geode_object_type: { type: String, required: true },
|
|
12
|
+
filenames: { type: Array, required: true },
|
|
13
|
+
});
|
|
14
|
+
const geode_objects_and_output_extensions = ref({});
|
|
15
|
+
const loading = ref(false);
|
|
20
16
|
|
|
21
|
-
|
|
17
|
+
const toggle_loading = useToggle(loading);
|
|
22
18
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
for (const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
is_saveable: value[key][extension].is_saveable,
|
|
47
|
-
}
|
|
48
|
-
}
|
|
19
|
+
async function get_output_file_extensions() {
|
|
20
|
+
toggle_loading();
|
|
21
|
+
geode_objects_and_output_extensions.value = {};
|
|
22
|
+
const geodeStore = useGeodeStore();
|
|
23
|
+
const values = await Promise.all(
|
|
24
|
+
filenames.map(async (filename) => {
|
|
25
|
+
const response = await geodeStore.request(schema, {
|
|
26
|
+
geode_object_type,
|
|
27
|
+
filename,
|
|
28
|
+
});
|
|
29
|
+
return response.geode_objects_and_output_extensions;
|
|
30
|
+
}),
|
|
31
|
+
);
|
|
32
|
+
const all_keys = [...new Set(values.flatMap((value) => Object.keys(value)))];
|
|
33
|
+
const common_keys = all_keys.filter((i) => !values.some((j) => !Object.keys(j).includes(i)));
|
|
34
|
+
const final_object = {};
|
|
35
|
+
for (const key of common_keys) {
|
|
36
|
+
final_object[key] = {};
|
|
37
|
+
for (const value of values) {
|
|
38
|
+
for (const extension of Object.keys(value[key])) {
|
|
39
|
+
final_object[key][extension] = {
|
|
40
|
+
is_saveable: value[key][extension].is_saveable,
|
|
41
|
+
};
|
|
49
42
|
}
|
|
50
43
|
}
|
|
51
|
-
geode_objects_and_output_extensions.value = final_object
|
|
52
|
-
toggle_loading()
|
|
53
44
|
}
|
|
45
|
+
geode_objects_and_output_extensions.value = final_object;
|
|
46
|
+
toggle_loading();
|
|
47
|
+
}
|
|
54
48
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
49
|
+
function update_values(output_geode_object, output_extension) {
|
|
50
|
+
if (output_geode_object !== "" && output_extension !== "") {
|
|
51
|
+
emit("update_values", {
|
|
52
|
+
output_geode_object,
|
|
53
|
+
output_extension,
|
|
54
|
+
});
|
|
55
|
+
emit("increment_step");
|
|
63
56
|
}
|
|
57
|
+
}
|
|
64
58
|
|
|
65
|
-
|
|
59
|
+
await get_output_file_extensions();
|
|
66
60
|
</script>
|
|
67
61
|
|
|
68
62
|
<template>
|
|
69
63
|
<FetchingData v-if="loading" />
|
|
70
64
|
<v-row v-else class="justify-left">
|
|
71
65
|
<v-col
|
|
72
|
-
v-for="(
|
|
73
|
-
output_extensions, output_geode_object
|
|
74
|
-
) in geode_objects_and_output_extensions"
|
|
66
|
+
v-for="(output_extensions, output_geode_object) in geode_objects_and_output_extensions"
|
|
75
67
|
:key="output_geode_object"
|
|
76
68
|
class="justify-left"
|
|
77
69
|
>
|
|
78
70
|
<v-card class="card ma-2 pa-2" width="100%">
|
|
79
|
-
<v-card-title
|
|
80
|
-
v-tooltip:bottom="`Export as a ${output_geode_object}`"
|
|
81
|
-
v-bind="props"
|
|
82
|
-
>
|
|
71
|
+
<v-card-title v-tooltip:bottom="`Export as a ${output_geode_object}`" v-bind="props">
|
|
83
72
|
{{ output_geode_object }}
|
|
84
73
|
</v-card-title>
|
|
85
74
|
<v-card-text>
|
|
@@ -101,9 +90,7 @@
|
|
|
101
90
|
class="card ma-2"
|
|
102
91
|
:color="extension.is_saveable ? 'primary' : 'grey'"
|
|
103
92
|
hover
|
|
104
|
-
@click="
|
|
105
|
-
update_values(output_geode_object, output_extension)
|
|
106
|
-
"
|
|
93
|
+
@click="update_values(output_geode_object, output_extension)"
|
|
107
94
|
:disabled="!extension.is_saveable"
|
|
108
95
|
>
|
|
109
96
|
<v-card-title align="center">
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { useFeedbackStore } from "@ogw_front/stores/feedback";
|
|
3
|
+
const feedbackStore = useFeedbackStore();
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
function reload() {
|
|
6
|
+
globalThis.location.reload();
|
|
7
|
+
}
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
<template>
|
|
@@ -20,16 +20,13 @@
|
|
|
20
20
|
v-bind="props"
|
|
21
21
|
color="white"
|
|
22
22
|
class="justify-right"
|
|
23
|
-
v-tooltip:bottom="
|
|
24
|
-
'We turn off our server automatically after 5 minutes of inactivity'
|
|
25
|
-
"
|
|
23
|
+
v-tooltip:bottom="'We turn off our server automatically after 5 minutes of inactivity'"
|
|
26
24
|
>
|
|
27
25
|
mdi-information-outline
|
|
28
26
|
</v-icon>
|
|
29
27
|
</v-col>
|
|
30
28
|
<v-col cols="auto" class="text-white font-weight-bold">
|
|
31
|
-
Server timed out due to inactivity, please reload this page or click
|
|
32
|
-
here:
|
|
29
|
+
Server timed out due to inactivity, please reload this page or click here:
|
|
33
30
|
</v-col>
|
|
34
31
|
<v-col class="align-items" cols="auto">
|
|
35
32
|
<v-btn color="grey" density="compact" @click="reload()"> Reload </v-btn>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
|
|
2
|
+
import { useFeedbackStore } from "@ogw_front/stores/feedback";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const MARGIN_BETWEEN_SNACKERS = 60;
|
|
5
|
+
const FIRST_SNACKER_MARGIN = 8;
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
const feedbackStore = useFeedbackStore();
|
|
8
|
+
const show = ref(true);
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
function calc_margin(index) {
|
|
11
|
+
return `${index * MARGIN_BETWEEN_SNACKERS + FIRST_SNACKER_MARGIN}px`;
|
|
12
|
+
}
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
15
|
<template>
|
|
@@ -40,9 +40,7 @@
|
|
|
40
40
|
</template>
|
|
41
41
|
</v-tooltip>
|
|
42
42
|
<v-tooltip v-else-if="feedback.type === 'success'" location="left">
|
|
43
|
-
<v-icon color="white" class="justify-right">
|
|
44
|
-
mdi-check-circle-outline
|
|
45
|
-
</v-icon>
|
|
43
|
+
<v-icon color="white" class="justify-right"> mdi-check-circle-outline </v-icon>
|
|
46
44
|
</v-tooltip>
|
|
47
45
|
</v-col>
|
|
48
46
|
<v-col cols="9" class="text-no-wrap overflow-hidden">
|
|
@@ -75,7 +73,7 @@
|
|
|
75
73
|
</template>
|
|
76
74
|
|
|
77
75
|
<style scoped>
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
76
|
+
.v-snackbar :deep(.v-snackbar__content) {
|
|
77
|
+
width: 100%;
|
|
78
|
+
}
|
|
81
79
|
</style>
|
|
@@ -2,12 +2,7 @@
|
|
|
2
2
|
<Transition name="slide-fade" class="pa-0">
|
|
3
3
|
<v-row align="center" class="pa-0">
|
|
4
4
|
<v-col cols="auto" class="pa-0">
|
|
5
|
-
<v-progress-circular
|
|
6
|
-
:size="22"
|
|
7
|
-
:width="3"
|
|
8
|
-
color="primary"
|
|
9
|
-
indeterminate
|
|
10
|
-
/>
|
|
5
|
+
<v-progress-circular :size="22" :width="3" color="primary" indeterminate />
|
|
11
6
|
</v-col>
|
|
12
7
|
<v-col cols="auto">
|
|
13
8
|
<p>Fetching data...</p>
|
|
@@ -1,63 +1,57 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
|
|
2
|
+
import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import FetchingData from "@ogw_front/components/FetchingData";
|
|
5
|
+
import FileUploader from "@ogw_front/components/FileUploader";
|
|
6
|
+
import { useGeodeStore } from "@ogw_front/stores/geode";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
const schema = schemas.opengeodeweb_back.allowed_files;
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
"update_values",
|
|
12
|
-
"increment_step",
|
|
13
|
-
"decrement_step",
|
|
14
|
-
])
|
|
10
|
+
const emit = defineEmits(["update_values", "increment_step", "decrement_step"]);
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
const { multiple, files, auto_upload } = defineProps({
|
|
13
|
+
multiple: { type: Boolean, required: true },
|
|
14
|
+
files: { type: Array, default: () => [] },
|
|
15
|
+
auto_upload: { type: Boolean, default: true },
|
|
16
|
+
});
|
|
21
17
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
const internal_files = ref(files);
|
|
19
|
+
const internal_auto_upload = ref(auto_upload);
|
|
20
|
+
const accept = ref("");
|
|
21
|
+
const loading = ref(false);
|
|
26
22
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
watch(
|
|
24
|
+
() => files,
|
|
25
|
+
(val) => {
|
|
26
|
+
internal_files.value = val;
|
|
27
|
+
},
|
|
28
|
+
);
|
|
33
29
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
watch(
|
|
31
|
+
() => auto_upload,
|
|
32
|
+
(val) => {
|
|
33
|
+
internal_auto_upload.value = val;
|
|
34
|
+
},
|
|
35
|
+
);
|
|
40
36
|
|
|
41
|
-
|
|
37
|
+
const toggle_loading = useToggle(loading);
|
|
42
38
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
39
|
+
function files_uploaded_event(value) {
|
|
40
|
+
if (value.length > 0) {
|
|
41
|
+
emit("update_values", { files: value, auto_upload: false });
|
|
42
|
+
emit("increment_step");
|
|
48
43
|
}
|
|
44
|
+
}
|
|
49
45
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
toggle_loading()
|
|
58
|
-
}
|
|
46
|
+
async function get_allowed_files() {
|
|
47
|
+
toggle_loading();
|
|
48
|
+
const geodeStore = useGeodeStore();
|
|
49
|
+
const response = await geodeStore.request(schema, {});
|
|
50
|
+
accept.value = response.extensions.map((extension) => `.${extension}`).join(",");
|
|
51
|
+
toggle_loading();
|
|
52
|
+
}
|
|
59
53
|
|
|
60
|
-
|
|
54
|
+
await get_allowed_files();
|
|
61
55
|
</script>
|
|
62
56
|
|
|
63
57
|
<template>
|
|
@@ -1,74 +1,72 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import DragAndDrop from "@ogw_front/components/DragAndDrop";
|
|
3
|
+
import { useGeodeStore } from "@ogw_front/stores/geode";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const emit = defineEmits(["files_uploaded", "decrement_step", "reset_values"]);
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
const { multiple, accept, files, auto_upload, mini } = defineProps({
|
|
8
|
+
multiple: { type: Boolean, required: true },
|
|
9
|
+
accept: { type: String, required: true },
|
|
10
|
+
files: { type: Array, required: false, default: [] },
|
|
11
|
+
auto_upload: { type: Boolean, required: false, default: false },
|
|
12
|
+
mini: { type: Boolean, required: false, default: false },
|
|
13
|
+
});
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
const geodeStore = useGeodeStore();
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
const internal_files = ref(files);
|
|
18
|
+
const loading = ref(false);
|
|
19
|
+
const files_uploaded = ref(false);
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
const toggle_loading = useToggle(loading);
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
23
|
+
function processSelectedFiles(selected_files) {
|
|
24
|
+
if (multiple) {
|
|
25
|
+
internal_files.value = [...internal_files.value, ...selected_files];
|
|
26
|
+
} else {
|
|
27
|
+
internal_files.value = [selected_files[0]];
|
|
29
28
|
}
|
|
29
|
+
}
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
31
|
+
function removeFile(index) {
|
|
32
|
+
internal_files.value.splice(index, 1);
|
|
33
|
+
if (internal_files.value.length === 0) {
|
|
34
|
+
files_uploaded.value = false;
|
|
35
|
+
emit("files_uploaded", []);
|
|
37
36
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
async function upload_files() {
|
|
40
|
+
toggle_loading();
|
|
41
|
+
const promise_array = internal_files.value.map((file) => geodeStore.upload(file));
|
|
42
|
+
await Promise.all(promise_array);
|
|
43
|
+
files_uploaded.value = true;
|
|
44
|
+
emit("files_uploaded", internal_files.value);
|
|
45
|
+
|
|
46
|
+
toggle_loading();
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (files.length > 0) {
|
|
50
|
+
internal_files.value = files;
|
|
51
|
+
if (auto_upload) {
|
|
52
|
+
upload_files();
|
|
49
53
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
watch(
|
|
57
|
+
() => files,
|
|
58
|
+
(newVal) => {
|
|
59
|
+
internal_files.value = newVal;
|
|
60
|
+
},
|
|
61
|
+
{ deep: true },
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
watch(internal_files, (value) => {
|
|
65
|
+
files_uploaded.value = false;
|
|
66
|
+
if (auto_upload && value.length > 0) {
|
|
67
|
+
upload_files();
|
|
56
68
|
}
|
|
57
|
-
|
|
58
|
-
watch(
|
|
59
|
-
() => files,
|
|
60
|
-
(newVal) => {
|
|
61
|
-
internal_files.value = newVal
|
|
62
|
-
},
|
|
63
|
-
{ deep: true },
|
|
64
|
-
)
|
|
65
|
-
|
|
66
|
-
watch(internal_files, (value) => {
|
|
67
|
-
files_uploaded.value = false
|
|
68
|
-
if (auto_upload && value.length > 0) {
|
|
69
|
-
upload_files()
|
|
70
|
-
}
|
|
71
|
-
})
|
|
69
|
+
});
|
|
72
70
|
</script>
|
|
73
71
|
|
|
74
72
|
<template>
|
|
@@ -83,15 +81,8 @@
|
|
|
83
81
|
<v-card-text v-if="internal_files.length" class="mt-6">
|
|
84
82
|
<v-sheet class="d-flex align-center mb-4" color="transparent">
|
|
85
83
|
<v-icon icon="mdi-file-check" class="mr-3" color="primary" size="24" />
|
|
86
|
-
<span class="text-subtitle-1 font-weight-bold text-white">
|
|
87
|
-
|
|
88
|
-
</span>
|
|
89
|
-
<v-chip
|
|
90
|
-
size="small"
|
|
91
|
-
class="ml-3 bg-white-opacity-10"
|
|
92
|
-
color="white"
|
|
93
|
-
variant="flat"
|
|
94
|
-
>
|
|
84
|
+
<span class="text-subtitle-1 font-weight-bold text-white"> Selected Files </span>
|
|
85
|
+
<v-chip size="small" class="ml-3 bg-white-opacity-10" color="white" variant="flat">
|
|
95
86
|
{{ internal_files.length }}
|
|
96
87
|
</v-chip>
|
|
97
88
|
</v-sheet>
|
|
@@ -111,18 +102,13 @@
|
|
|
111
102
|
<v-icon start size="18" color="primary">mdi-file-outline</v-icon>
|
|
112
103
|
<span class="text-white">{{ file.name }}</span>
|
|
113
104
|
<template #close>
|
|
114
|
-
<v-icon size="16" class="ml-2 opacity-60 hover-opacity-100"
|
|
115
|
-
>mdi-close-circle</v-icon
|
|
116
|
-
>
|
|
105
|
+
<v-icon size="16" class="ml-2 opacity-60 hover-opacity-100">mdi-close-circle</v-icon>
|
|
117
106
|
</template>
|
|
118
107
|
</v-chip>
|
|
119
108
|
</v-sheet>
|
|
120
109
|
</v-card-text>
|
|
121
110
|
|
|
122
|
-
<v-card-actions
|
|
123
|
-
v-if="!auto_upload && internal_files.length"
|
|
124
|
-
class="mt-6 pa-0"
|
|
125
|
-
>
|
|
111
|
+
<v-card-actions v-if="!auto_upload && internal_files.length" class="mt-6 pa-0">
|
|
126
112
|
<v-btn
|
|
127
113
|
color="primary"
|
|
128
114
|
variant="flat"
|
|
@@ -134,10 +120,7 @@
|
|
|
134
120
|
@click="upload_files"
|
|
135
121
|
>
|
|
136
122
|
<v-icon start size="22">mdi-cloud-upload</v-icon>
|
|
137
|
-
Upload {{ internal_files.length }} file<span
|
|
138
|
-
v-if="internal_files.length > 1"
|
|
139
|
-
>s</span
|
|
140
|
-
>
|
|
123
|
+
Upload {{ internal_files.length }} file<span v-if="internal_files.length > 1">s</span>
|
|
141
124
|
</v-btn>
|
|
142
125
|
</v-card-actions>
|
|
143
126
|
</template>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
import { computed, useAttrs } from "vue";
|
|
3
|
+
const { variant, rounded, padding, theme } = defineProps({
|
|
4
|
+
variant: {
|
|
5
|
+
type: String,
|
|
6
|
+
default: "panel",
|
|
7
|
+
validator: (valid) => ["panel", "ui"].includes(valid),
|
|
8
|
+
},
|
|
9
|
+
rounded: { type: String, default: "xl" },
|
|
10
|
+
padding: { type: String, default: "pa-6" },
|
|
11
|
+
theme: { type: String, default: undefined },
|
|
12
|
+
});
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
const attrs = useAttrs();
|
|
15
|
+
const isInteractive = computed(() => Boolean(attrs.onClick));
|
|
16
16
|
</script>
|
|
17
17
|
|
|
18
18
|
<template>
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
</template>
|
|
40
40
|
|
|
41
41
|
<style scoped>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
.border-thin {
|
|
43
|
+
border-style: solid !important;
|
|
44
|
+
}
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
.cursor-default {
|
|
47
|
+
cursor: default !important;
|
|
48
|
+
}
|
|
49
49
|
</style>
|