@geode/opengeodeweb-front 9.11.0-rc.1 → 9.11.0-rc.10
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/.github/workflows/deploy.yml +11 -0
- package/.github/workflows/merge_request.yml +9 -0
- package/.github/workflows/pr_update.yml +11 -0
- package/.github/workflows/prepare_deploy.yml +9 -0
- package/.github/workflows/test.yml +37 -0
- package/.github/workflows/test_pr.yml +12 -0
- package/.oxlintrc.json +11 -0
- package/.releaserc +1 -2
- package/commitlint.config.js +16 -0
- package/components/FeedBack/ErrorBanner.vue +1 -1
- package/components/FeedBack/Snackers.vue +1 -1
- package/components/HybridRenderingView.vue +38 -12
- package/components/Launcher.vue +1 -1
- package/components/ObjectSelector.vue +2 -2
- package/components/PackagesVersions.vue +1 -1
- package/components/Recaptcha.vue +1 -1
- package/components/RemoteRenderingView.vue +1 -1
- package/components/Viewer/BreadCrumb.vue +1 -1
- package/components/Viewer/Options/PolygonAttributeSelector.vue +1 -8
- package/components/Viewer/Options/PolyhedronAttributeSelector.vue +1 -7
- package/components/Viewer/Options/TextureItem.vue +1 -8
- package/components/Viewer/Options/VertexAttributeSelector.vue +1 -5
- package/components/Viewer/Tree/ObjectTree.vue +1 -1
- package/components/Viewer/TreeObject.vue +1 -1
- package/components/Wrapper.vue +1 -1
- package/composables/api_fetch.js +2 -2
- package/composables/run_function_when_microservices_connected.js +1 -1
- package/composables/upload_file.js +2 -2
- package/composables/viewer_call.js +38 -38
- package/geode-opengeodeweb-back-5.10.0-rc.8.tgz +0 -0
- package/geode-opengeodeweb-viewer-1.11.0-rc.4.tgz +0 -0
- package/internal_stores/mesh/edges.js +49 -52
- package/internal_stores/mesh/index.js +21 -13
- package/internal_stores/mesh/points.js +9 -7
- package/internal_stores/mesh/polygons.js +9 -7
- package/internal_stores/mesh/polyhedra.js +8 -6
- package/internal_stores/model/blocks.js +1 -1
- package/internal_stores/model/corners.js +1 -1
- package/internal_stores/model/edges.js +1 -8
- package/internal_stores/model/index.js +3 -1
- package/internal_stores/model/lines.js +2 -2
- package/internal_stores/model/points.js +2 -2
- package/internal_stores/model/surfaces.js +1 -1
- package/package.json +17 -9
- package/stores/data_base.js +10 -1
- package/stores/data_style.js +7 -6
- package/stores/feedback.js +1 -1
- package/stores/geode.js +5 -5
- package/stores/hybrid_viewer.js +7 -1
- package/stores/infra.js +10 -10
- package/stores/menu.js +3 -3
- package/stores/treeview.js +1 -1
- package/stores/viewer.js +5 -6
- package/tests/integration/data/fake_id/edged_curve.vtp +20 -0
- package/tests/integration/microservices/back/requirements.in +1 -0
- package/tests/integration/microservices/back/requirements.txt +75 -0
- package/tests/integration/microservices/viewer/requirements.in +1 -0
- package/tests/integration/microservices/viewer/requirements.txt +87 -0
- package/tests/integration/stores/DataStyle/mesh/Edges.nuxt.test.js +138 -0
- package/{test → tests/unit}/components/CrsSelector.nuxt.test.js +6 -3
- package/{test → tests/unit}/components/ExtensionSelector.nuxt.test.js +6 -3
- package/{test → tests/unit}/components/FeedBack/ErrorsBanner.nuxt.test.js +10 -3
- package/{test → tests/unit}/components/FeedBack/Snackers.nuxt.test.js +24 -21
- package/{test → tests/unit}/components/FileSelector.nuxt.test.js +5 -2
- package/{test → tests/unit}/components/FileUploader.nuxt.test.js +6 -3
- package/{test → tests/unit}/components/Inspector/InspectionButton.nuxt.test.js +6 -3
- package/{test → tests/unit}/components/Launcher.nuxt.test.js +9 -2
- package/{test → tests/unit}/components/MissingFilesSelector.nuxt.test.js +6 -3
- package/{test → tests/unit}/components/ObjectSelector.nuxt.test.js +6 -3
- package/{test → tests/unit}/components/PackagesVersions.nuxt.test.js +5 -3
- package/{test → tests/unit}/components/Wrapper.nuxt.test.js +1 -1
- package/{test → tests/unit}/composables/api_fetch.nuxt.test.js +3 -2
- package/{test/composables/run_function_when_microservices_connected.test.js → tests/unit/composables/run_function_when_microservices_connected.nuxt.test.js} +18 -5
- package/{test → tests/unit}/composables/upload_file.nuxt.test.js +7 -8
- package/{test → tests/unit}/stores/Feedback.nuxt.test.js +12 -8
- package/{test → tests/unit}/stores/Geode.nuxt.test.js +33 -10
- package/{test → tests/unit}/stores/Infra.nuxt.test.js +58 -25
- package/{test → tests/unit}/stores/Viewer.nuxt.test.js +101 -20
- package/{test → tests/unit}/utils/validate_schema.nuxt.test.js +3 -0
- package/tests/vitest.config.js +33 -0
- package/utils/default_styles.js +246 -0
- package/utils/local.js +180 -0
- package/.github/workflows/Branch-protection.yml +0 -11
- package/.github/workflows/CICD.yml +0 -37
- package/.github/workflows/prepare_pr.yml +0 -11
- package/vitest.config.js +0 -13
- /package/components/{ContextMenu.vue → Viewer/ContextMenu.vue} +0 -0
- /package/components/{ContextMenuItem.vue → Viewer/ContextMenuItem.vue} +0 -0
- /package/{test → tests/unit}/components/Inspector/ResultPanel.nuxt.test.js +0 -0
- /package/{test → tests/unit}/components/Step.nuxt.test.js +0 -0
- /package/{test → tests/unit}/components/Stepper.nuxt.test.js +0 -0
|
@@ -2,105 +2,102 @@ import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schem
|
|
|
2
2
|
const mesh_edges_schemas = viewer_schemas.opengeodeweb_viewer.mesh.edges
|
|
3
3
|
|
|
4
4
|
export function useMeshEdgesStyle() {
|
|
5
|
-
/** State **/
|
|
6
5
|
const dataStyleStore = useDataStyleStore()
|
|
7
6
|
|
|
8
|
-
/** Getters **/
|
|
9
7
|
function edgesVisibility(id) {
|
|
10
8
|
return dataStyleStore.styles[id].edges.visibility
|
|
11
9
|
}
|
|
12
|
-
function edgesActiveColoring(id) {
|
|
13
|
-
return dataStyleStore.styles[id].edges.coloring.active
|
|
14
|
-
}
|
|
15
|
-
function edgesColor(id) {
|
|
16
|
-
return dataStyleStore.styles[id].edges.coloring.color
|
|
17
|
-
}
|
|
18
|
-
function edgesSize(id) {
|
|
19
|
-
return dataStyleStore.styles[id].edges.size
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/** Actions **/
|
|
23
10
|
function setEdgesVisibility(id, visibility) {
|
|
24
|
-
|
|
11
|
+
const edges_style = dataStyleStore.styles[id].edges
|
|
12
|
+
return viewer_call(
|
|
25
13
|
{
|
|
26
14
|
schema: mesh_edges_schemas.visibility,
|
|
27
15
|
params: { id, visibility },
|
|
28
16
|
},
|
|
29
17
|
{
|
|
30
18
|
response_function: () => {
|
|
31
|
-
|
|
32
|
-
console.log(
|
|
33
|
-
"setEdgesVisibility",
|
|
34
|
-
dataStyleStore.styles[id].edges.visibility,
|
|
35
|
-
)
|
|
19
|
+
edges_style.visibility = visibility
|
|
20
|
+
console.log(`${setEdgesVisibility.name} ${edges_style.visibility}`)
|
|
36
21
|
},
|
|
37
22
|
},
|
|
38
23
|
)
|
|
39
24
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
if (
|
|
25
|
+
|
|
26
|
+
function edgesActiveColoring(id) {
|
|
27
|
+
return dataStyleStore.styles[id].edges.coloring.active
|
|
28
|
+
}
|
|
29
|
+
async function setEdgesActiveColoring(id, type) {
|
|
30
|
+
const coloring = dataStyleStore.styles[id].edges.coloring
|
|
31
|
+
if (type == "color") {
|
|
32
|
+
setEdgesColor(id, coloring.color)
|
|
33
|
+
// else if (type == "vertex") {
|
|
34
|
+
// const vertex = coloring.vertex
|
|
35
|
+
// if (vertex !== null) setEdgesVertexAttribute(id, vertex)
|
|
36
|
+
// } else if (type == "edges") {
|
|
37
|
+
// const edges = coloring.edges
|
|
38
|
+
// if (edges !== null) setEdgesEdgeAttribute(id, edges)
|
|
49
39
|
} else throw new Error("Unknown edges coloring type: " + type)
|
|
50
|
-
|
|
51
|
-
console.log(
|
|
52
|
-
"setEdgesActiveColoring",
|
|
53
|
-
dataStyleStore.styles[id].edges.coloring.active,
|
|
54
|
-
)
|
|
40
|
+
coloring.active = type
|
|
41
|
+
console.log(`${setEdgesActiveColoring.name} ${coloring.active}`)
|
|
55
42
|
}
|
|
56
43
|
|
|
44
|
+
function edgesColor(id) {
|
|
45
|
+
return dataStyleStore.styles[id].edges.coloring.color
|
|
46
|
+
}
|
|
57
47
|
function setEdgesColor(id, color) {
|
|
58
|
-
|
|
48
|
+
const coloring_style = dataStyleStore.styles[id].edges.coloring
|
|
49
|
+
return viewer_call(
|
|
59
50
|
{
|
|
60
51
|
schema: mesh_edges_schemas.color,
|
|
61
52
|
params: { id, color },
|
|
62
53
|
},
|
|
63
54
|
{
|
|
64
55
|
response_function: () => {
|
|
65
|
-
|
|
56
|
+
coloring_style.color = color
|
|
66
57
|
console.log(
|
|
67
|
-
|
|
68
|
-
dataStyleStore.styles[id].edges.coloring.color,
|
|
58
|
+
`${setEdgesColor.name} ${JSON.stringify(coloring_style.color)}`,
|
|
69
59
|
)
|
|
70
60
|
},
|
|
71
61
|
},
|
|
72
62
|
)
|
|
73
63
|
}
|
|
74
|
-
|
|
75
|
-
|
|
64
|
+
|
|
65
|
+
function edgesWidth(id) {
|
|
66
|
+
return dataStyleStore.styles[id].edges.size
|
|
67
|
+
}
|
|
68
|
+
function setEdgesWidth(id, width) {
|
|
69
|
+
const edges_style = dataStyleStore.styles[id].edges
|
|
70
|
+
return viewer_call(
|
|
76
71
|
{
|
|
77
|
-
schema: mesh_edges_schemas.
|
|
78
|
-
params: { id,
|
|
72
|
+
schema: mesh_edges_schemas.width,
|
|
73
|
+
params: { id, width },
|
|
79
74
|
},
|
|
80
75
|
{
|
|
81
76
|
response_function: () => {
|
|
82
|
-
|
|
83
|
-
console.log(
|
|
77
|
+
edges_style.width = width
|
|
78
|
+
console.log(`${setEdgesWidth.name} ${edges_style.width}`)
|
|
84
79
|
},
|
|
85
80
|
},
|
|
86
81
|
)
|
|
87
82
|
}
|
|
88
83
|
|
|
89
|
-
function applyEdgesStyle(id, style) {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
84
|
+
async function applyEdgesStyle(id, style) {
|
|
85
|
+
return Promise.all([
|
|
86
|
+
setEdgesVisibility(id, style.visibility),
|
|
87
|
+
setEdgesActiveColoring(id, style.coloring.active),
|
|
88
|
+
// setEdgesWidth(id, style.width);
|
|
89
|
+
])
|
|
93
90
|
}
|
|
94
91
|
|
|
95
92
|
return {
|
|
96
|
-
|
|
93
|
+
applyEdgesStyle,
|
|
97
94
|
edgesActiveColoring,
|
|
98
95
|
edgesColor,
|
|
99
|
-
|
|
100
|
-
|
|
96
|
+
edgesVisibility,
|
|
97
|
+
edgesWidth,
|
|
101
98
|
setEdgesActiveColoring,
|
|
102
99
|
setEdgesColor,
|
|
103
|
-
|
|
104
|
-
|
|
100
|
+
setEdgesVisibility,
|
|
101
|
+
setEdgesWidth,
|
|
105
102
|
}
|
|
106
103
|
}
|
|
@@ -10,33 +10,41 @@ export default function useMeshStyle() {
|
|
|
10
10
|
const edgesStyleStore = useMeshEdgesStyle()
|
|
11
11
|
const polygonsStyleStore = useMeshPolygonsStyle()
|
|
12
12
|
const polyhedraStyleStore = useMeshPolyhedraStyle()
|
|
13
|
+
const hybridViewerStore = useHybridViewerStore()
|
|
13
14
|
|
|
14
15
|
function setMeshVisibility(id, visibility) {
|
|
15
|
-
viewer_call(
|
|
16
|
+
return viewer_call(
|
|
16
17
|
{
|
|
17
18
|
schema: viewer_schemas.opengeodeweb_viewer.mesh.visibility,
|
|
18
19
|
params: { id, visibility },
|
|
19
20
|
},
|
|
20
21
|
{
|
|
21
22
|
response_function: () => {
|
|
23
|
+
hybridViewerStore.setVisibility(id, visibility)
|
|
22
24
|
dataStyleStore.styles[id].visibility = visibility
|
|
23
|
-
console.log("setMeshVisibility", dataStyleStore.styles[id].visibility)
|
|
24
25
|
},
|
|
25
26
|
},
|
|
26
27
|
)
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
function applyMeshDefaultStyle(id) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
async function applyMeshDefaultStyle(id) {
|
|
31
|
+
return new Promise(async (resolve) => {
|
|
32
|
+
const id_style = dataStyleStore.styles[id]
|
|
33
|
+
for (const [key, value] of Object.entries(id_style)) {
|
|
34
|
+
if (key == "visibility") {
|
|
35
|
+
await setMeshVisibility(id, value)
|
|
36
|
+
} else if (key == "points") {
|
|
37
|
+
await pointsStyleStore.applyPointsStyle(id, value)
|
|
38
|
+
} else if (key == "edges") {
|
|
39
|
+
await edgesStyleStore.applyEdgesStyle(id, value)
|
|
40
|
+
} else if (key == "polygons") {
|
|
41
|
+
await polygonsStyleStore.applyPolygonsStyle(id, value)
|
|
42
|
+
} else if (key == "polyhedra") {
|
|
43
|
+
await polyhedraStyleStore.applyPolyhedraStyle(id, value)
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
resolve()
|
|
47
|
+
})
|
|
40
48
|
}
|
|
41
49
|
|
|
42
50
|
return {
|
|
@@ -24,7 +24,7 @@ export function useMeshPointsStyle() {
|
|
|
24
24
|
|
|
25
25
|
/** Actions **/
|
|
26
26
|
function setPointsVisibility(id, visibility) {
|
|
27
|
-
viewer_call(
|
|
27
|
+
return viewer_call(
|
|
28
28
|
{
|
|
29
29
|
schema: mesh_points_schemas.visibility,
|
|
30
30
|
params: { id, visibility },
|
|
@@ -42,7 +42,7 @@ export function useMeshPointsStyle() {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
function setPointsColor(id, color) {
|
|
45
|
-
viewer_call(
|
|
45
|
+
return viewer_call(
|
|
46
46
|
{
|
|
47
47
|
schema: viewer_schemas.opengeodeweb_viewer.mesh.points.color,
|
|
48
48
|
params: { id, color },
|
|
@@ -59,7 +59,7 @@ export function useMeshPointsStyle() {
|
|
|
59
59
|
)
|
|
60
60
|
}
|
|
61
61
|
function setPointsVertexAttribute(id, vertex_attribute) {
|
|
62
|
-
viewer_call(
|
|
62
|
+
return viewer_call(
|
|
63
63
|
{
|
|
64
64
|
schema: viewer_schemas.opengeodeweb_viewer.mesh.points.vertex_attribute,
|
|
65
65
|
params: { id, ...vertex_attribute },
|
|
@@ -76,7 +76,7 @@ export function useMeshPointsStyle() {
|
|
|
76
76
|
)
|
|
77
77
|
}
|
|
78
78
|
function setPointsSize(id, size) {
|
|
79
|
-
viewer_call(
|
|
79
|
+
return viewer_call(
|
|
80
80
|
{
|
|
81
81
|
schema: viewer_schemas.opengeodeweb_viewer.mesh.points.size,
|
|
82
82
|
params: { id, size },
|
|
@@ -108,9 +108,11 @@ export function useMeshPointsStyle() {
|
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
function applyPointsStyle(id, style) {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
return Promise.all([
|
|
112
|
+
setPointsVisibility(id, style.visibility),
|
|
113
|
+
setPointsActiveColoring(id, style.coloring.active),
|
|
114
|
+
setPointsSize(id, style.size),
|
|
115
|
+
])
|
|
114
116
|
}
|
|
115
117
|
|
|
116
118
|
return {
|
|
@@ -27,7 +27,7 @@ export function useMeshPolygonsStyle() {
|
|
|
27
27
|
|
|
28
28
|
/** Actions **/
|
|
29
29
|
function setPolygonsVisibility(id, visibility) {
|
|
30
|
-
viewer_call(
|
|
30
|
+
return viewer_call(
|
|
31
31
|
{
|
|
32
32
|
schema: mesh_polygons_schemas.visibility,
|
|
33
33
|
params: { id, visibility },
|
|
@@ -67,7 +67,7 @@ export function useMeshPolygonsStyle() {
|
|
|
67
67
|
)
|
|
68
68
|
}
|
|
69
69
|
function setPolygonsColor(id, color) {
|
|
70
|
-
viewer_call(
|
|
70
|
+
return viewer_call(
|
|
71
71
|
{
|
|
72
72
|
schema: mesh_polygons_schemas.color,
|
|
73
73
|
params: { id, color },
|
|
@@ -84,7 +84,7 @@ export function useMeshPolygonsStyle() {
|
|
|
84
84
|
)
|
|
85
85
|
}
|
|
86
86
|
function setPolygonsTextures(id, textures) {
|
|
87
|
-
viewer_call(
|
|
87
|
+
return viewer_call(
|
|
88
88
|
{
|
|
89
89
|
schema: viewer_schemas.opengeodeweb_viewer.mesh.apply_textures,
|
|
90
90
|
params: { id, textures },
|
|
@@ -101,7 +101,7 @@ export function useMeshPolygonsStyle() {
|
|
|
101
101
|
)
|
|
102
102
|
}
|
|
103
103
|
function setPolygonsVertexAttribute(id, vertex_attribute) {
|
|
104
|
-
viewer_call(
|
|
104
|
+
return viewer_call(
|
|
105
105
|
{
|
|
106
106
|
schema: mesh_polygons_schemas.vertex_attribute,
|
|
107
107
|
params: { id, ...vertex_attribute },
|
|
@@ -118,7 +118,7 @@ export function useMeshPolygonsStyle() {
|
|
|
118
118
|
)
|
|
119
119
|
}
|
|
120
120
|
function setPolygonsPolygonAttribute(id, polygon_attribute) {
|
|
121
|
-
viewer_call(
|
|
121
|
+
return viewer_call(
|
|
122
122
|
{
|
|
123
123
|
schema: mesh_polygons_schemas.polygon_attribute,
|
|
124
124
|
params: { id, ...polygon_attribute },
|
|
@@ -137,8 +137,10 @@ export function useMeshPolygonsStyle() {
|
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
function applyPolygonsStyle(id, style) {
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
return Promise.all([
|
|
141
|
+
setPolygonsVisibility(id, style.visibility),
|
|
142
|
+
setPolygonsActiveColoring(id, style.coloring.active),
|
|
143
|
+
])
|
|
142
144
|
}
|
|
143
145
|
|
|
144
146
|
return {
|
|
@@ -27,7 +27,7 @@ export function useMeshPolyhedraStyle() {
|
|
|
27
27
|
|
|
28
28
|
/** Actions **/
|
|
29
29
|
function setPolyhedraVisibility(id, visibility) {
|
|
30
|
-
viewer_call(
|
|
30
|
+
return viewer_call(
|
|
31
31
|
{
|
|
32
32
|
schema: mesh_polyhedra_schemas.visibility,
|
|
33
33
|
params: { id, visibility },
|
|
@@ -60,7 +60,7 @@ export function useMeshPolyhedraStyle() {
|
|
|
60
60
|
)
|
|
61
61
|
}
|
|
62
62
|
function setPolyhedraColor(id, color) {
|
|
63
|
-
viewer_call(
|
|
63
|
+
return viewer_call(
|
|
64
64
|
{
|
|
65
65
|
schema: mesh_polyhedra_schemas.color,
|
|
66
66
|
params: { id, color },
|
|
@@ -78,7 +78,7 @@ export function useMeshPolyhedraStyle() {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
function setPolyhedraVertexAttribute(id, vertex_attribute) {
|
|
81
|
-
viewer_call(
|
|
81
|
+
return viewer_call(
|
|
82
82
|
{
|
|
83
83
|
schema: mesh_polyhedra_schemas.vertex_attribute,
|
|
84
84
|
params: { id, ...vertex_attribute },
|
|
@@ -96,7 +96,7 @@ export function useMeshPolyhedraStyle() {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
function setPolyhedraPolyhedronAttribute(id, polyhedron_attribute) {
|
|
99
|
-
viewer_call(
|
|
99
|
+
return viewer_call(
|
|
100
100
|
{
|
|
101
101
|
schema: mesh_polyhedra_schemas.polyhedron_attribute,
|
|
102
102
|
params: { id, ...polyhedron_attribute },
|
|
@@ -115,8 +115,10 @@ export function useMeshPolyhedraStyle() {
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
function applyPolyhedraStyle(id, style) {
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
return Promise.all([
|
|
119
|
+
setPolyhedraVisibility(id, style.visibility),
|
|
120
|
+
setPolyhedraActiveColoring(id, style.coloring.active),
|
|
121
|
+
])
|
|
120
122
|
}
|
|
121
123
|
|
|
122
124
|
return {
|
|
@@ -15,7 +15,7 @@ export function useBlocksStyle() {
|
|
|
15
15
|
/** Actions **/
|
|
16
16
|
function setBlockVisibility(id, block_ids, visibility) {
|
|
17
17
|
const block_flat_indexes = dataBaseStore.getFlatIndexes(id, block_ids)
|
|
18
|
-
viewer_call(
|
|
18
|
+
return viewer_call(
|
|
19
19
|
{
|
|
20
20
|
schema: blocks_schemas.visibility,
|
|
21
21
|
params: { id, block_ids: block_flat_indexes, visibility },
|
|
@@ -14,7 +14,7 @@ export function useCornersStyle() {
|
|
|
14
14
|
/** Actions **/
|
|
15
15
|
function setCornerVisibility(id, corner_ids, visibility) {
|
|
16
16
|
const corner_flat_indexes = dataBaseStore.getFlatIndexes(id, corner_ids)
|
|
17
|
-
viewer_call(
|
|
17
|
+
return viewer_call(
|
|
18
18
|
{
|
|
19
19
|
schema: corners_schemas.visibility,
|
|
20
20
|
params: { id, block_ids: corner_flat_indexes, visibility },
|
|
@@ -9,14 +9,7 @@ export function useModelEdgesStyle() {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
function setModelEdgesVisibility(id, visibility) {
|
|
12
|
-
|
|
13
|
-
dataStyleStore.styles[id] = {}
|
|
14
|
-
}
|
|
15
|
-
if (!dataStyleStore.styles[id].edges) {
|
|
16
|
-
dataStyleStore.styles[id].edges = {}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
viewer_call(
|
|
12
|
+
return viewer_call(
|
|
20
13
|
{
|
|
21
14
|
schema: model_edges_schemas.visibility,
|
|
22
15
|
params: { id, visibility },
|
|
@@ -16,6 +16,7 @@ export default function useModelStyle() {
|
|
|
16
16
|
const blocksStyleStore = useBlocksStyle()
|
|
17
17
|
const modelEdgesStore = useModelEdgesStyle()
|
|
18
18
|
const modelPointsStore = useModelPointsStyle()
|
|
19
|
+
const hybridViewerStore = useHybridViewerStore()
|
|
19
20
|
|
|
20
21
|
/** Getters **/
|
|
21
22
|
function modelVisibility(id) {
|
|
@@ -62,7 +63,7 @@ export default function useModelStyle() {
|
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
function setModelVisibility(id, visibility) {
|
|
65
|
-
viewer_call(
|
|
66
|
+
return viewer_call(
|
|
66
67
|
{
|
|
67
68
|
schema: viewer_schemas.opengeodeweb_viewer.model.visibility,
|
|
68
69
|
params: { id, visibility },
|
|
@@ -70,6 +71,7 @@ export default function useModelStyle() {
|
|
|
70
71
|
{
|
|
71
72
|
response_function: () => {
|
|
72
73
|
dataStyleStore.styles[id].visibility = visibility
|
|
74
|
+
hybridViewerStore.setVisibility(id, visibility)
|
|
73
75
|
console.log("setModelVisibility", visibility)
|
|
74
76
|
},
|
|
75
77
|
},
|
|
@@ -18,7 +18,7 @@ export function useLinesStyle() {
|
|
|
18
18
|
/** Actions **/
|
|
19
19
|
function setLineVisibility(id, line_ids, visibility) {
|
|
20
20
|
const line_flat_indexes = dataBaseStore.getFlatIndexes(id, line_ids)
|
|
21
|
-
viewer_call(
|
|
21
|
+
return viewer_call(
|
|
22
22
|
{
|
|
23
23
|
schema: lines_schemas.visibility,
|
|
24
24
|
params: { id, block_ids: line_flat_indexes, visibility },
|
|
@@ -38,7 +38,7 @@ export function useLinesStyle() {
|
|
|
38
38
|
|
|
39
39
|
function setLineColor(id, line_ids, color) {
|
|
40
40
|
const line_flat_indexes = dataBaseStore.getFlatIndexes(id, line_ids)
|
|
41
|
-
viewer_call(
|
|
41
|
+
return viewer_call(
|
|
42
42
|
{
|
|
43
43
|
schema: lines_schemas.color,
|
|
44
44
|
params: { id, block_ids: line_flat_indexes, color },
|
|
@@ -12,7 +12,7 @@ export function useModelPointsStyle() {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
function setModelPointsVisibility(id, visibility) {
|
|
15
|
-
viewer_call(
|
|
15
|
+
return viewer_call(
|
|
16
16
|
{
|
|
17
17
|
schema: model_points_schemas.visibility,
|
|
18
18
|
params: { id, visibility },
|
|
@@ -27,7 +27,7 @@ export function useModelPointsStyle() {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
function setModelPointsSize(id, size) {
|
|
30
|
-
viewer_call(
|
|
30
|
+
return viewer_call(
|
|
31
31
|
{
|
|
32
32
|
schema: model_points_schemas.size,
|
|
33
33
|
params: { id, size },
|
|
@@ -14,7 +14,7 @@ export function useSurfacesStyle() {
|
|
|
14
14
|
/** Actions **/
|
|
15
15
|
function setSurfaceVisibility(id, surface_ids, visibility) {
|
|
16
16
|
const surface_flat_indexes = dataBaseStore.getFlatIndexes(id, surface_ids)
|
|
17
|
-
viewer_call(
|
|
17
|
+
return viewer_call(
|
|
18
18
|
{
|
|
19
19
|
schema: surfaces_schemas.visibility,
|
|
20
20
|
params: { id, block_ids: surface_flat_indexes, visibility },
|
package/package.json
CHANGED
|
@@ -2,15 +2,19 @@
|
|
|
2
2
|
"name": "@geode/opengeodeweb-front",
|
|
3
3
|
"scripts": {
|
|
4
4
|
"lint": "eslint --fix --ext .js,.vue --ignore-path .gitignore .",
|
|
5
|
-
"test": "
|
|
6
|
-
"
|
|
7
|
-
"
|
|
5
|
+
"test": "npm run test:unit",
|
|
6
|
+
"tests": "vitest --config ./tests/vitest.config.js",
|
|
7
|
+
"test:unit": "npm run tests --project unit",
|
|
8
|
+
"test:integration": "npm run tests --project integration",
|
|
9
|
+
"geode_objects": "node scripts/generate_geode_objects.js && prettier ./assets/geode_objects.js --write",
|
|
10
|
+
"build": ""
|
|
8
11
|
},
|
|
9
12
|
"devDependencies": {
|
|
10
|
-
"@nuxt/test-utils": "3.
|
|
13
|
+
"@nuxt/test-utils": "3.19.2",
|
|
11
14
|
"@pinia/testing": "0.1.7",
|
|
12
15
|
"@vitejs/plugin-vue": "5.2.3",
|
|
13
16
|
"@vue/test-utils": "2.4.6",
|
|
17
|
+
"electron": "36.4.0",
|
|
14
18
|
"eslint": "9.26.0",
|
|
15
19
|
"eslint-plugin-import": "2.31.0",
|
|
16
20
|
"eslint-plugin-nuxt": "4.0.0",
|
|
@@ -20,13 +24,15 @@
|
|
|
20
24
|
"eslint-plugin-vuetify": "2.5.2",
|
|
21
25
|
"happy-dom": "17.4.6",
|
|
22
26
|
"jsdom": "26.1.0",
|
|
27
|
+
"msw": "2.11.1",
|
|
23
28
|
"nuxt": "3.13.2",
|
|
24
29
|
"playwright-core": "1.52.0",
|
|
25
30
|
"prettier": "3.3.3",
|
|
26
31
|
"resize-observer-polyfill": "1.5.1",
|
|
32
|
+
"unplugin-auto-import": "^20.0.0",
|
|
27
33
|
"vite": "6.3.5",
|
|
28
34
|
"vite-plugin-vuetify": "2.1.1",
|
|
29
|
-
"vitest": "3.
|
|
35
|
+
"vitest": "3.2.4",
|
|
30
36
|
"vitest-environment-nuxt": "1.0.1"
|
|
31
37
|
},
|
|
32
38
|
"overrides": {
|
|
@@ -34,11 +40,11 @@
|
|
|
34
40
|
},
|
|
35
41
|
"description": "OpenSource Vue/Vuetify framework for web applications",
|
|
36
42
|
"type": "module",
|
|
37
|
-
"version": "9.11.0-rc.
|
|
43
|
+
"version": "9.11.0-rc.10",
|
|
38
44
|
"main": "./nuxt.config.js",
|
|
39
45
|
"dependencies": {
|
|
40
|
-
"@geode/opengeodeweb-back": "
|
|
41
|
-
"@geode/opengeodeweb-viewer": "
|
|
46
|
+
"@geode/opengeodeweb-back": "latest",
|
|
47
|
+
"@geode/opengeodeweb-viewer": "latest",
|
|
42
48
|
"@kitware/vtk.js": "33.3.0",
|
|
43
49
|
"@mdi/font": "7.4.47",
|
|
44
50
|
"@pinia/nuxt": "0.5.4",
|
|
@@ -46,10 +52,12 @@
|
|
|
46
52
|
"@vueuse/components": "13.1.0",
|
|
47
53
|
"@vueuse/nuxt": "13.1.0",
|
|
48
54
|
"ajv": "8.17.1",
|
|
55
|
+
"get-port-please": "3.2.0",
|
|
49
56
|
"is-electron": "2.2.2",
|
|
50
57
|
"js-file-download": "0.4.12",
|
|
51
58
|
"nuxt": "3.13.2",
|
|
52
|
-
"
|
|
59
|
+
"pidtree": "0.6.0",
|
|
60
|
+
"pinia": "3.0.3",
|
|
53
61
|
"sass": "1.87.0",
|
|
54
62
|
"semver": "7.7.1",
|
|
55
63
|
"uuid": "11.1.0",
|
package/stores/data_base.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json"
|
|
2
|
+
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
|
|
2
3
|
|
|
3
4
|
export const useDataBaseStore = defineStore("dataBase", () => {
|
|
4
|
-
const treeview_store =
|
|
5
|
+
const treeview_store = useTreeviewStore()
|
|
5
6
|
const hybridViewerStore = useHybridViewerStore()
|
|
6
7
|
|
|
7
8
|
/** State **/
|
|
@@ -41,6 +42,12 @@ export const useDataBaseStore = defineStore("dataBase", () => {
|
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
/** Actions **/
|
|
45
|
+
async function registerObject(id, file_name, viewer_object) {
|
|
46
|
+
return viewer_call({
|
|
47
|
+
schema: viewer_schemas.opengeodeweb_viewer.generic.register,
|
|
48
|
+
params: { id, file_name, viewer_object },
|
|
49
|
+
})
|
|
50
|
+
}
|
|
44
51
|
async function addItem(
|
|
45
52
|
id,
|
|
46
53
|
value = {
|
|
@@ -74,6 +81,7 @@ export const useDataBaseStore = defineStore("dataBase", () => {
|
|
|
74
81
|
{
|
|
75
82
|
schema: back_schemas.opengeodeweb_back.models.mesh_components,
|
|
76
83
|
params: {
|
|
84
|
+
id,
|
|
77
85
|
filename: native_filename,
|
|
78
86
|
geode_object,
|
|
79
87
|
},
|
|
@@ -136,6 +144,7 @@ export const useDataBaseStore = defineStore("dataBase", () => {
|
|
|
136
144
|
itemMetaDatas,
|
|
137
145
|
meshComponentType,
|
|
138
146
|
formatedMeshComponents,
|
|
147
|
+
registerObject,
|
|
139
148
|
addItem,
|
|
140
149
|
fetchUuidToFlatIndexDict,
|
|
141
150
|
fetchMeshComponents,
|
package/stores/data_style.js
CHANGED
|
@@ -12,21 +12,22 @@ export const useDataStyleStore = defineStore("dataStyle", () => {
|
|
|
12
12
|
/** Actions **/
|
|
13
13
|
function addDataStyle(id, geode_object, object_type) {
|
|
14
14
|
dataStyleState.styles[id] = getDefaultStyle(geode_object)
|
|
15
|
-
|
|
16
15
|
if (object_type === "mesh") {
|
|
17
|
-
meshStyleStore.applyMeshDefaultStyle(id)
|
|
16
|
+
return Promise.all([meshStyleStore.applyMeshDefaultStyle(id)])
|
|
18
17
|
} else if (object_type === "model") {
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
return Promise.all([
|
|
19
|
+
modelStyleStore.setMeshComponentsDefaultStyle(id),
|
|
20
|
+
modelStyleStore.applyModelDefaultStyle(id),
|
|
21
|
+
])
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
function setVisibility(id, visibility) {
|
|
25
26
|
const object_type = dataBaseStore.itemMetaDatas(id).object_type
|
|
26
27
|
if (object_type === "mesh") {
|
|
27
|
-
meshStyleStore.setMeshVisibility(id, visibility)
|
|
28
|
+
return Promise.all([meshStyleStore.setMeshVisibility(id, visibility)])
|
|
28
29
|
} else if (object_type === "model") {
|
|
29
|
-
modelStyleStore.setModelVisibility(id, visibility)
|
|
30
|
+
return Promise.all([modelStyleStore.setModelVisibility(id, visibility)])
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
|
package/stores/feedback.js
CHANGED
package/stores/geode.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json"
|
|
2
2
|
import Status from "@ogw_f/utils/status.js"
|
|
3
3
|
|
|
4
|
-
export const
|
|
4
|
+
export const useGeodeStore = defineStore("geode", {
|
|
5
5
|
state: () => ({
|
|
6
6
|
default_local_port: "5000",
|
|
7
7
|
request_counter: 0,
|
|
@@ -9,13 +9,13 @@ export const use_geode_store = defineStore("geode", {
|
|
|
9
9
|
}),
|
|
10
10
|
getters: {
|
|
11
11
|
protocol() {
|
|
12
|
-
if (
|
|
12
|
+
if (useInfraStore().app_mode == appMode.appMode.CLOUD) {
|
|
13
13
|
return "https"
|
|
14
14
|
}
|
|
15
15
|
return "http"
|
|
16
16
|
},
|
|
17
17
|
port() {
|
|
18
|
-
if (
|
|
18
|
+
if (useInfraStore().app_mode == appMode.appMode.CLOUD) {
|
|
19
19
|
return "443"
|
|
20
20
|
}
|
|
21
21
|
const GEODE_PORT = useRuntimeConfig().public.GEODE_PORT
|
|
@@ -25,7 +25,7 @@ export const use_geode_store = defineStore("geode", {
|
|
|
25
25
|
return this.default_local_port
|
|
26
26
|
},
|
|
27
27
|
base_url() {
|
|
28
|
-
const infra_store =
|
|
28
|
+
const infra_store = useInfraStore()
|
|
29
29
|
let geode_url = `${this.protocol}://${infra_store.domain_name}:${this.port}`
|
|
30
30
|
if (infra_store.app_mode == appMode.appMode.CLOUD) {
|
|
31
31
|
if (infra_store.ID == "") {
|
|
@@ -49,7 +49,7 @@ export const use_geode_store = defineStore("geode", {
|
|
|
49
49
|
},
|
|
50
50
|
do_ping() {
|
|
51
51
|
const geode_store = this
|
|
52
|
-
const feedback_store =
|
|
52
|
+
const feedback_store = useFeedbackStore()
|
|
53
53
|
return useFetch(back_schemas.opengeodeweb_back.ping.$id, {
|
|
54
54
|
baseURL: this.base_url,
|
|
55
55
|
method: back_schemas.opengeodeweb_back.ping.methods[0],
|