@geode/opengeodeweb-front 12.1.0-rc.1 → 12.1.0-rc.3
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/.build/tests/browser/suites/model/edges.js +2 -2
- package/.build/tests/browser/suites/model/points.js +2 -2
- package/.build/tests/browser/suites/model/structural_model.js +2 -2
- package/.build/tests/browser/suites/model/surfaces.js +2 -2
- package/app/components/CrsSelector.vue +29 -10
- package/package.json +1 -1
- package/tests/browser/suites/model/edges.ts +2 -2
- package/tests/browser/suites/model/points.ts +2 -2
- package/tests/browser/suites/model/structural_model.ts +6 -6
- package/tests/browser/suites/model/surfaces.ts +5 -5
|
@@ -2,7 +2,7 @@ import { __exportAll } from "../../../../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { brepGeodeObjectType, defaultDataName } from "../../helpers/constants.js";
|
|
3
3
|
import { waitForActionSettled } from "../../helpers/wait_for_action_settled.js";
|
|
4
4
|
import { closeAllMenus, moveMouseOutOfTheWay } from "../../helpers/app_interaction.js";
|
|
5
|
-
import { expandMainObjectTree, openDataContextMenu
|
|
5
|
+
import { closeObjectsTree, expandMainObjectTree, openDataContextMenu } from "../../helpers/object_trees/main_object_tree.js";
|
|
6
6
|
import { getHybridViewerCanvas, getHybridViewerCanvasBoundingBox, viewerContextMenu } from "../../helpers/viewer_canvas.js";
|
|
7
7
|
import "../../helpers/viewer_interaction.js";
|
|
8
8
|
import { setModelComponentsEdgesColor, setModelComponentsEdgesVertexAttribute, setModelComponentsEdgesVisibility, setModelComponentsEdgesWidth } from "../../helpers/data/model/edges/components.js";
|
|
@@ -47,7 +47,7 @@ function registerTests({ test, loadTestDatas }) {
|
|
|
47
47
|
});
|
|
48
48
|
test("picked block edges vertex attribute", async ({ window }) => {
|
|
49
49
|
await closeAllMenus(window);
|
|
50
|
-
await
|
|
50
|
+
await closeObjectsTree(window);
|
|
51
51
|
const hybridViewerCanvas = getHybridViewerCanvas(window);
|
|
52
52
|
const box = await getHybridViewerCanvasBoundingBox(hybridViewerCanvas);
|
|
53
53
|
await viewerContextMenu(window, box.width / 2, box.height / 2);
|
|
@@ -2,7 +2,7 @@ import { __exportAll } from "../../../../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { brepGeodeObjectType, defaultDataName } from "../../helpers/constants.js";
|
|
3
3
|
import { waitForActionSettled } from "../../helpers/wait_for_action_settled.js";
|
|
4
4
|
import { closeAllMenus, moveMouseOutOfTheWay } from "../../helpers/app_interaction.js";
|
|
5
|
-
import { expandMainObjectTree, openDataContextMenu
|
|
5
|
+
import { closeObjectsTree, expandMainObjectTree, openDataContextMenu } from "../../helpers/object_trees/main_object_tree.js";
|
|
6
6
|
import { getHybridViewerCanvas, getHybridViewerCanvasBoundingBox, viewerContextMenu } from "../../helpers/viewer_canvas.js";
|
|
7
7
|
import "../../helpers/viewer_interaction.js";
|
|
8
8
|
import { setModelComponentsPointsColor, setModelComponentsPointsSize, setModelComponentsPointsVertexAttribute, setModelComponentsPointsVisibility } from "../../helpers/data/model/points/components.js";
|
|
@@ -47,7 +47,7 @@ function registerTests({ test, loadTestDatas }) {
|
|
|
47
47
|
});
|
|
48
48
|
test("picked block points vertex attribute", async ({ window }) => {
|
|
49
49
|
await closeAllMenus(window);
|
|
50
|
-
await
|
|
50
|
+
await closeObjectsTree(window);
|
|
51
51
|
const hybridViewerCanvas = getHybridViewerCanvas(window);
|
|
52
52
|
const box = await getHybridViewerCanvasBoundingBox(hybridViewerCanvas);
|
|
53
53
|
await viewerContextMenu(window, box.width / 2, box.height / 2);
|
|
@@ -2,7 +2,7 @@ import { __exportAll } from "../../../../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { brepGeodeObjectType, defaultDataName, polyhedronAttributeType, structuralModelGeodeObjectType, vertexAttributeType } from "../../helpers/constants.js";
|
|
3
3
|
import { moveMouseOutOfTheWay } from "../../helpers/app_interaction.js";
|
|
4
4
|
import { expandGeodeObjectTypeInTree, hideObjectInTree } from "../../helpers/object_trees/common.js";
|
|
5
|
-
import { expandMainObjectTree, getMainObjectTree
|
|
5
|
+
import { closeObjectsTree, expandMainObjectTree, getMainObjectTree } from "../../helpers/object_trees/main_object_tree.js";
|
|
6
6
|
import { resetCamera, rotateCamera } from "../../helpers/camera_interaction.js";
|
|
7
7
|
import { applyAttribute } from "../../helpers/data/helpers/attribute.js";
|
|
8
8
|
import { setModelPolyhedraPolyhedronAttribute, setModelPolyhedraVertexAttribute, setModelPolyhedraVertexAttributeNoDataColor } from "../../helpers/data/model/attribute.js";
|
|
@@ -36,7 +36,7 @@ function registerTests({ test, loadTestDatas }) {
|
|
|
36
36
|
await resetCamera(window);
|
|
37
37
|
await openModelComponentsTree(window, structuralModelGeodeObjectType, defaultDataName);
|
|
38
38
|
await resetCamera(window);
|
|
39
|
-
await
|
|
39
|
+
await closeObjectsTree(window);
|
|
40
40
|
await moveMouseOutOfTheWay(window);
|
|
41
41
|
});
|
|
42
42
|
test("show points of surface in model tree", async ({ window }) => {
|
|
@@ -3,7 +3,7 @@ import { brepGeodeObjectType, defaultDataName, polygonAttributeType, vertexAttri
|
|
|
3
3
|
import { waitForActionSettled } from "../../helpers/wait_for_action_settled.js";
|
|
4
4
|
import { closeAllMenus, moveMouseOutOfTheWay } from "../../helpers/app_interaction.js";
|
|
5
5
|
import { hideObjectInTree } from "../../helpers/object_trees/common.js";
|
|
6
|
-
import {
|
|
6
|
+
import { closeObjectsTree, expandMainObjectTree } from "../../helpers/object_trees/main_object_tree.js";
|
|
7
7
|
import { getHybridViewerCanvas, getHybridViewerCanvasBoundingBox, viewerContextMenu } from "../../helpers/viewer_canvas.js";
|
|
8
8
|
import "../../helpers/viewer_interaction.js";
|
|
9
9
|
import { rotateCamera } from "../../helpers/camera_interaction.js";
|
|
@@ -62,7 +62,7 @@ function registerTests({ test, loadTestDatas }) {
|
|
|
62
62
|
await moveMouseOutOfTheWay(window);
|
|
63
63
|
});
|
|
64
64
|
test("toggle object tree main", async ({ window }) => {
|
|
65
|
-
await
|
|
65
|
+
await closeObjectsTree(window);
|
|
66
66
|
});
|
|
67
67
|
test("surfaces vertex attribute one surface ", async ({ window }) => {
|
|
68
68
|
await openModelComponentContextMenu(window, "00000000-", 0);
|
|
@@ -16,8 +16,6 @@ const search = ref<string>("");
|
|
|
16
16
|
const data_table_loading = ref<boolean>(false);
|
|
17
17
|
// Thousands of rows that are never mutated: no deep reactivity
|
|
18
18
|
const crs_list = shallowRef<CRS[]>([]);
|
|
19
|
-
// Keys of the selected rows: the item-value of the table, "AUTHORITY:CODE"
|
|
20
|
-
const selected_crs = ref<string[]>([]);
|
|
21
19
|
const toggle_loading = useToggle(data_table_loading);
|
|
22
20
|
const crsStore = useCrsStore();
|
|
23
21
|
|
|
@@ -26,13 +24,29 @@ function crs_key(crs: CRS): string {
|
|
|
26
24
|
return `${crs.authority}:${crs.code}`;
|
|
27
25
|
}
|
|
28
26
|
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
// A click on the row selects it: no checkbox column. Enter does the same once the row is focused
|
|
28
|
+
function select_crs(crs: CRS): void {
|
|
29
|
+
selectedCrs.value = crs;
|
|
31
30
|
}
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
// Vuetify passes the click event first, then the clicked row
|
|
33
|
+
function on_row_click(_event: Event, { item }: { item: CRS }): void {
|
|
34
|
+
select_crs(item);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function row_props({ item }: { item: CRS }): Record<string, unknown> {
|
|
38
|
+
const selected = selectedCrs.value !== undefined && crs_key(item) === crs_key(selectedCrs.value);
|
|
39
|
+
return {
|
|
40
|
+
class: ["crs-row", { "bg-primary": selected }],
|
|
41
|
+
tabindex: 0,
|
|
42
|
+
"aria-selected": selected,
|
|
43
|
+
onKeydown: (event: KeyboardEvent) => {
|
|
44
|
+
if (event.key === "Enter") {
|
|
45
|
+
select_crs(item);
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
}
|
|
36
50
|
|
|
37
51
|
async function get_crs_table(): Promise<void> {
|
|
38
52
|
toggle_loading();
|
|
@@ -80,7 +94,6 @@ onMounted(async () => {
|
|
|
80
94
|
hide-details
|
|
81
95
|
></v-text-field>
|
|
82
96
|
<v-data-table
|
|
83
|
-
v-model="selected_crs"
|
|
84
97
|
:items-per-page="10"
|
|
85
98
|
:items-per-page-options="items_per_page_options"
|
|
86
99
|
:headers="headers"
|
|
@@ -89,11 +102,11 @@ onMounted(async () => {
|
|
|
89
102
|
class="elevation-1"
|
|
90
103
|
density="compact"
|
|
91
104
|
fixed-header
|
|
92
|
-
|
|
93
|
-
show-select
|
|
105
|
+
:row-props="row_props"
|
|
94
106
|
:search="search"
|
|
95
107
|
:loading="data_table_loading"
|
|
96
108
|
loading-text="Loading... Please wait"
|
|
109
|
+
@click:row="on_row_click"
|
|
97
110
|
>
|
|
98
111
|
<template v-if="compact" #[`item.name`]="{ value }">
|
|
99
112
|
<v-tooltip :text="value" location="top">
|
|
@@ -104,3 +117,9 @@ onMounted(async () => {
|
|
|
104
117
|
</template>
|
|
105
118
|
</v-data-table>
|
|
106
119
|
</template>
|
|
120
|
+
|
|
121
|
+
<style scoped>
|
|
122
|
+
:deep(.crs-row) {
|
|
123
|
+
cursor: pointer;
|
|
124
|
+
}
|
|
125
|
+
</style>
|
package/package.json
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
import { brepGeodeObjectType, defaultDataName } from "#browser_helpers/constants";
|
|
7
7
|
import { closeAllMenus, moveMouseOutOfTheWay } from "#browser_helpers/app_interaction";
|
|
8
8
|
import {
|
|
9
|
+
closeObjectsTree,
|
|
9
10
|
expandMainObjectTree,
|
|
10
11
|
openDataContextMenu,
|
|
11
|
-
toggleObjectsTree,
|
|
12
12
|
} from "#browser_helpers/object_trees/main_object_tree";
|
|
13
13
|
import {
|
|
14
14
|
expandMeshComponentType,
|
|
@@ -89,7 +89,7 @@ function registerTests({ test, loadTestDatas }: SuiteRuntime): void {
|
|
|
89
89
|
|
|
90
90
|
test("picked block edges vertex attribute", async ({ window }) => {
|
|
91
91
|
await closeAllMenus(window);
|
|
92
|
-
await
|
|
92
|
+
await closeObjectsTree(window);
|
|
93
93
|
const hybridViewerCanvas = getHybridViewerCanvas(window);
|
|
94
94
|
const box = await getHybridViewerCanvasBoundingBox(hybridViewerCanvas);
|
|
95
95
|
await viewerContextMenu(window, box.width / 2, box.height / 2);
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
import { brepGeodeObjectType, defaultDataName } from "#browser_helpers/constants";
|
|
7
7
|
import { closeAllMenus, moveMouseOutOfTheWay } from "#browser_helpers/app_interaction";
|
|
8
8
|
import {
|
|
9
|
+
closeObjectsTree,
|
|
9
10
|
expandMainObjectTree,
|
|
10
11
|
openDataContextMenu,
|
|
11
|
-
toggleObjectsTree,
|
|
12
12
|
} from "#browser_helpers/object_trees/main_object_tree";
|
|
13
13
|
import {
|
|
14
14
|
expandMeshComponentType,
|
|
@@ -89,7 +89,7 @@ function registerTests({ test, loadTestDatas }: SuiteRuntime): void {
|
|
|
89
89
|
|
|
90
90
|
test("picked block points vertex attribute", async ({ window }) => {
|
|
91
91
|
await closeAllMenus(window);
|
|
92
|
-
await
|
|
92
|
+
await closeObjectsTree(window);
|
|
93
93
|
const hybridViewerCanvas = getHybridViewerCanvas(window);
|
|
94
94
|
const box = await getHybridViewerCanvasBoundingBox(hybridViewerCanvas);
|
|
95
95
|
await viewerContextMenu(window, box.width / 2, box.height / 2);
|
|
@@ -11,14 +11,14 @@ import {
|
|
|
11
11
|
vertexAttributeType,
|
|
12
12
|
} from "#browser_helpers/constants";
|
|
13
13
|
import {
|
|
14
|
-
|
|
15
|
-
hideObjectInTree,
|
|
16
|
-
} from "#browser_helpers/object_trees/common";
|
|
17
|
-
import {
|
|
14
|
+
closeObjectsTree,
|
|
18
15
|
expandMainObjectTree,
|
|
19
16
|
getMainObjectTree,
|
|
20
|
-
toggleObjectsTree,
|
|
21
17
|
} from "#browser_helpers/object_trees/main_object_tree";
|
|
18
|
+
import {
|
|
19
|
+
expandGeodeObjectTypeInTree,
|
|
20
|
+
hideObjectInTree,
|
|
21
|
+
} from "#browser_helpers/object_trees/common";
|
|
22
22
|
import {
|
|
23
23
|
openModelComponentContextMenu,
|
|
24
24
|
openModelComponentsTree,
|
|
@@ -67,7 +67,7 @@ function registerTests({ test, loadTestDatas }: SuiteRuntime): void {
|
|
|
67
67
|
await resetCamera(window);
|
|
68
68
|
await openModelComponentsTree(window, structuralModelGeodeObjectType, defaultDataName);
|
|
69
69
|
await resetCamera(window);
|
|
70
|
-
await
|
|
70
|
+
await closeObjectsTree(window);
|
|
71
71
|
await moveMouseOutOfTheWay(window);
|
|
72
72
|
});
|
|
73
73
|
|
|
@@ -10,6 +10,10 @@ import {
|
|
|
10
10
|
vertexAttributeType,
|
|
11
11
|
} from "#browser_helpers/constants";
|
|
12
12
|
import { closeAllMenus, moveMouseOutOfTheWay } from "#browser_helpers/app_interaction";
|
|
13
|
+
import {
|
|
14
|
+
closeObjectsTree,
|
|
15
|
+
expandMainObjectTree,
|
|
16
|
+
} from "#browser_helpers/object_trees/main_object_tree";
|
|
13
17
|
import {
|
|
14
18
|
copyModelPolygonsColor,
|
|
15
19
|
pasteModelPolygonsColorInput,
|
|
@@ -20,10 +24,6 @@ import {
|
|
|
20
24
|
setModelPolygonsVertexAttribute,
|
|
21
25
|
setModelPolygonsVertexAttributeNoDataColor,
|
|
22
26
|
} from "#browser_helpers/data/index";
|
|
23
|
-
import {
|
|
24
|
-
expandMainObjectTree,
|
|
25
|
-
toggleObjectsTree,
|
|
26
|
-
} from "#browser_helpers/object_trees/main_object_tree";
|
|
27
27
|
import {
|
|
28
28
|
expandMeshComponentType,
|
|
29
29
|
getModelComponentsObjectTree,
|
|
@@ -104,7 +104,7 @@ function registerTests({ test, loadTestDatas }: SuiteRuntime): void {
|
|
|
104
104
|
});
|
|
105
105
|
|
|
106
106
|
test("toggle object tree main", async ({ window }) => {
|
|
107
|
-
await
|
|
107
|
+
await closeObjectsTree(window);
|
|
108
108
|
});
|
|
109
109
|
|
|
110
110
|
test("surfaces vertex attribute one surface ", async ({ window }) => {
|