@geode/opengeodeweb-front 10.34.0-rc.9 → 10.34.0
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/{server → .build/server}/utils/app_config.js +10 -9
- package/{server → .build/server}/utils/cleanup.js +31 -17
- package/{server → .build/server}/utils/cloud.js +1 -4
- package/{server → .build/server}/utils/microservices.js +21 -9
- package/{server → .build/server}/utils/path.js +4 -4
- package/{server → .build/server}/utils/scripts.js +9 -9
- package/.build/server/utils/server_config.js +51 -0
- package/.build/server/utils/stream.js +6 -0
- package/{server → .build/server}/utils/ws_client.js +18 -3
- package/{shared → .build/shared}/scripts.js +10 -10
- package/.build/shared/utils/call_raw.js +31 -0
- package/{shared → .build/shared}/utils/call_schema.js +2 -2
- package/.build/shared/utils/fetch_raw.js +52 -0
- package/{shared → .build/shared}/utils/fetch_schema.js +2 -2
- package/{shared → .build/shared}/utils/file.js +3 -1
- package/{shared → .build/shared}/utils/response_handlers/load.js +10 -7
- package/{shared → .build/shared}/utils/validate_schema.js +1 -1
- package/app/components/ActionButton.vue +6 -6
- package/app/components/CameraManager/List.vue +5 -5
- package/app/components/CameraManager/Saver.vue +3 -5
- package/app/components/CameraManager.vue +6 -4
- package/app/components/CameraOrientation.vue +12 -12
- package/app/components/ClippingPlaneCard.vue +4 -2
- package/app/components/ClippingPlanes.vue +8 -8
- package/app/components/CrsSelector.vue +9 -10
- package/app/components/DeleteDialog.vue +4 -2
- package/app/components/DragAndDrop.vue +10 -12
- package/app/components/DragAndDropInternal/DragAndDropInline.vue +4 -2
- package/app/components/ExtensionSelector.vue +4 -4
- package/app/components/FeedBack/ErrorBanner.vue +3 -1
- package/app/components/FeedBack/Snackers.vue +4 -3
- package/app/components/FileSelector.vue +10 -8
- package/app/components/FileUploader.vue +11 -11
- package/app/components/GlassCard.vue +1 -1
- package/app/components/HybridRenderingView.vue +7 -5
- package/app/components/HybridViewerTooltip.vue +7 -7
- package/app/components/Launcher.vue +1 -1
- package/app/components/Loading/EcoMessages.vue +9 -3
- package/app/components/Loading.vue +2 -2
- package/app/components/MissingFilesSelector.vue +12 -10
- package/app/components/ObjectSelector.vue +10 -9
- package/app/components/PackagesVersions.vue +6 -5
- package/app/components/Recaptcha.vue +3 -3
- package/app/components/RemoteRenderingView.vue +6 -7
- package/app/components/Ruler.vue +3 -3
- package/app/components/Screenshot.vue +6 -6
- package/app/components/SearchBar.vue +4 -2
- package/app/components/ShrinkFilter.vue +7 -7
- package/app/components/Step.vue +6 -5
- package/app/components/Stepper.vue +4 -3
- package/app/components/ToolPanel.vue +6 -3
- package/app/components/ViewToolbar.vue +25 -28
- package/app/components/Viewer/ContextMenu/CenterButton.vue +7 -5
- package/app/components/Viewer/ContextMenu/CircularItems.vue +3 -3
- package/app/components/Viewer/ContextMenu/ContextMenu.vue +22 -19
- package/app/components/Viewer/ContextMenu/ContextMenuItem.vue +10 -8
- package/app/components/Viewer/ContextMenu/InfoCard.vue +11 -12
- package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +13 -17
- package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +11 -15
- package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +12 -16
- package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +8 -12
- package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +11 -15
- package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +11 -15
- package/app/components/Viewer/Generic/Model/BlocksOptions.vue +67 -38
- package/app/components/Viewer/Generic/Model/CornersOptions.vue +53 -23
- package/app/components/Viewer/Generic/Model/EdgesOptions.vue +1 -3
- package/app/components/Viewer/Generic/Model/LinesOptions.vue +67 -38
- package/app/components/Viewer/Generic/Model/ModelStyleCard.vue +31 -15
- package/app/components/Viewer/Generic/Model/ModelStyleOptions.vue +2 -3
- package/app/components/Viewer/Generic/Model/PointsOptions.vue +6 -6
- package/app/components/Viewer/Generic/Model/SurfacesOptions.vue +69 -38
- package/app/components/Viewer/ObjectTree/Base/CommonTreeView.vue +64 -46
- package/app/components/Viewer/ObjectTree/Base/Controls.vue +5 -5
- package/app/components/Viewer/ObjectTree/Base/ItemLabel.vue +13 -9
- package/app/components/Viewer/ObjectTree/Base/StickyHeader.vue +5 -5
- package/app/components/Viewer/ObjectTree/Base/TreeRow.vue +10 -10
- package/app/components/Viewer/ObjectTree/Box.vue +6 -4
- package/app/components/Viewer/ObjectTree/Layout.vue +23 -21
- package/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue +14 -14
- package/app/components/Viewer/ObjectTree/Views/{ModelCollections.vue → ModelTree.vue} +59 -24
- package/app/components/Viewer/Options/AttributeColorBar.vue +4 -2
- package/app/components/Viewer/Options/AttributeRangeSelector.vue +4 -2
- package/app/components/Viewer/Options/AttributeSelector.vue +7 -9
- package/app/components/Viewer/Options/ColorMapList.vue +15 -13
- package/app/components/Viewer/Options/ColorMapPicker.vue +4 -4
- package/app/components/Viewer/Options/ColorPicker.vue +223 -41
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +16 -16
- package/app/components/Viewer/Options/ColormapQuickPicker.vue +7 -5
- package/app/components/Viewer/Options/OptionsSection.vue +1 -1
- package/app/components/Viewer/Options/TextureItem.vue +8 -6
- package/app/components/Viewer/Options/TexturesSelector.vue +1 -1
- package/app/components/Viewer/OverlappingObjectsPicker.vue +8 -9
- package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +2 -6
- package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +12 -16
- package/app/components/Viewer/Surface/PolygonsOptions.vue +12 -16
- package/app/components/Viewer/Ui.vue +2 -2
- package/app/components/Wrapper.vue +1 -4
- package/app/components/ZScaling.vue +5 -3
- package/app/components/csv-preview/CsvPreviewer.vue +38 -37
- package/app/components/csv-preview/CsvSettings.vue +6 -4
- package/app/components/csv-preview/CsvTable.vue +1 -1
- package/app/composables/batch_style.ts +5 -6
- package/app/composables/clipping_planes_widget.ts +73 -181
- package/app/composables/clipping_planes_widget_entries.ts +189 -0
- package/app/composables/copy_to_clipboard.ts +7 -0
- package/app/composables/global_attribute_style.ts +163 -83
- package/app/composables/hover_highlight.ts +46 -14
- package/app/composables/model_collections.ts +26 -13
- package/app/composables/model_components.ts +26 -13
- package/app/composables/project_manager.ts +76 -19
- package/app/composables/responsive_middle_truncate.ts +13 -13
- package/app/composables/stepper_tree.ts +34 -11
- package/app/composables/tree_filter.ts +66 -44
- package/app/composables/tree_keyboard_nav.ts +25 -11
- package/app/composables/tree_scroll.ts +44 -14
- package/app/composables/use_adaptive_styles.ts +66 -23
- package/app/composables/use_overlapping_picker.ts +66 -16
- package/app/composables/use_quick_colormap.ts +16 -5
- package/app/composables/virtual_tree.ts +75 -43
- package/app/composables/vtk_implicit_plane_widget.d.ts +2 -0
- package/app/plugins/auto_store_register.ts +2 -7
- package/app/plugins/click_outside_ignore_snackbars.client.ts +39 -0
- package/app/stores/app.ts +57 -192
- package/app/stores/app_helpers/extension.ts +179 -0
- package/app/stores/back.ts +37 -21
- package/app/stores/camera_manager.ts +22 -20
- package/app/stores/cloud.ts +17 -13
- package/app/stores/data.ts +88 -47
- package/app/stores/data_helpers/collections.ts +36 -38
- package/app/stores/data_helpers/mesh.ts +45 -36
- package/app/stores/data_style.ts +50 -28
- package/app/stores/feedback.ts +6 -6
- package/app/stores/hybrid_viewer.ts +41 -52
- package/app/stores/infra.ts +39 -37
- package/app/stores/menu.ts +23 -14
- package/app/stores/treeview.ts +72 -42
- package/app/stores/viewer.ts +39 -27
- package/app/utils/attributes.ts +3 -3
- package/app/utils/clipping_planes.ts +111 -14
- package/app/utils/color_picker.ts +57 -0
- package/app/utils/colormap.ts +58 -35
- package/app/utils/default_styles/index.ts +2 -2
- package/app/utils/default_styles/meshes.ts +107 -13
- package/app/utils/default_styles/models.ts +83 -14
- package/app/utils/extension.ts +47 -20
- package/app/utils/import_workflow.ts +21 -13
- package/app/utils/name_cleaner.ts +1 -1
- package/app/utils/string.ts +1 -1
- package/app/utils/treeview.ts +2 -2
- package/internal/database/base_database.ts +7 -3
- package/internal/database/database.ts +36 -26
- package/internal/database/extended_database.ts +1 -1
- package/internal/stores/data_style/mesh/cells/cell.ts +70 -34
- package/internal/stores/data_style/mesh/cells/color.ts +12 -6
- package/internal/stores/data_style/mesh/cells/common.ts +18 -8
- package/internal/stores/data_style/mesh/cells/index.ts +122 -42
- package/internal/stores/data_style/mesh/cells/textures.ts +12 -6
- package/internal/stores/data_style/mesh/cells/vertex.ts +75 -34
- package/internal/stores/data_style/mesh/cells/visibility.ts +15 -4
- package/internal/stores/data_style/mesh/edges/color.ts +12 -6
- package/internal/stores/data_style/mesh/edges/common.ts +14 -6
- package/internal/stores/data_style/mesh/edges/edge.ts +71 -39
- package/internal/stores/data_style/mesh/edges/index.ts +117 -42
- package/internal/stores/data_style/mesh/edges/vertex.ts +76 -39
- package/internal/stores/data_style/mesh/edges/visibility.ts +15 -4
- package/internal/stores/data_style/mesh/edges/width.ts +12 -4
- package/internal/stores/data_style/mesh/index.ts +30 -11
- package/internal/stores/data_style/mesh/points/color.ts +12 -6
- package/internal/stores/data_style/mesh/points/common.ts +21 -8
- package/internal/stores/data_style/mesh/points/index.ts +101 -50
- package/internal/stores/data_style/mesh/points/size.ts +12 -4
- package/internal/stores/data_style/mesh/points/vertex.ts +75 -34
- package/internal/stores/data_style/mesh/points/visibility.ts +17 -7
- package/internal/stores/data_style/mesh/polygons/color.ts +12 -6
- package/internal/stores/data_style/mesh/polygons/common.ts +23 -6
- package/internal/stores/data_style/mesh/polygons/index.ts +130 -70
- package/internal/stores/data_style/mesh/polygons/polygon.ts +77 -43
- package/internal/stores/data_style/mesh/polygons/textures.ts +12 -6
- package/internal/stores/data_style/mesh/polygons/vertex.ts +79 -39
- package/internal/stores/data_style/mesh/polygons/visibility.ts +16 -6
- package/internal/stores/data_style/mesh/polyhedra/color.ts +12 -6
- package/internal/stores/data_style/mesh/polyhedra/common.ts +14 -6
- package/internal/stores/data_style/mesh/polyhedra/index.ts +115 -56
- package/internal/stores/data_style/mesh/polyhedra/polyhedron.ts +80 -39
- package/internal/stores/data_style/mesh/polyhedra/vertex.ts +79 -39
- package/internal/stores/data_style/mesh/polyhedra/visibility.ts +16 -6
- package/internal/stores/data_style/model/blocks/color.ts +43 -13
- package/internal/stores/data_style/model/blocks/common.ts +21 -6
- package/internal/stores/data_style/model/blocks/index.ts +89 -59
- package/internal/stores/data_style/model/blocks/polyhedron.ts +101 -44
- package/internal/stores/data_style/model/blocks/vertex.ts +107 -42
- package/internal/stores/data_style/model/blocks/visibility.ts +17 -4
- package/internal/stores/data_style/model/color.ts +171 -83
- package/internal/stores/data_style/model/common.ts +70 -21
- package/internal/stores/data_style/model/corners/color.ts +43 -11
- package/internal/stores/data_style/model/corners/common.ts +25 -6
- package/internal/stores/data_style/model/corners/index.ts +66 -41
- package/internal/stores/data_style/model/corners/vertex.ts +105 -74
- package/internal/stores/data_style/model/corners/visibility.ts +19 -4
- package/internal/stores/data_style/model/edges/common.ts +12 -4
- package/internal/stores/data_style/model/edges/index.ts +2 -1
- package/internal/stores/data_style/model/edges/visibility.ts +24 -7
- package/internal/stores/data_style/model/index.ts +24 -11
- package/internal/stores/data_style/model/lines/color.ts +41 -11
- package/internal/stores/data_style/model/lines/common.ts +17 -6
- package/internal/stores/data_style/model/lines/edge.ts +105 -42
- package/internal/stores/data_style/model/lines/index.ts +86 -59
- package/internal/stores/data_style/model/lines/vertex.ts +105 -42
- package/internal/stores/data_style/model/lines/visibility.ts +17 -4
- package/internal/stores/data_style/model/points/common.ts +8 -4
- package/internal/stores/data_style/model/points/index.ts +10 -3
- package/internal/stores/data_style/model/points/size.ts +12 -4
- package/internal/stores/data_style/model/points/visibility.ts +16 -6
- package/internal/stores/data_style/model/selection.ts +80 -58
- package/internal/stores/data_style/model/surfaces/color.ts +41 -11
- package/internal/stores/data_style/model/surfaces/common.ts +23 -6
- package/internal/stores/data_style/model/surfaces/index.ts +89 -59
- package/internal/stores/data_style/model/surfaces/polygon.ts +107 -67
- package/internal/stores/data_style/model/surfaces/vertex.ts +111 -67
- package/internal/stores/data_style/model/surfaces/visibility.ts +18 -5
- package/internal/stores/data_style/model/visibility.ts +82 -20
- package/internal/stores/data_style/state.ts +77 -65
- package/internal/stores/hybrid_viewer/brightness.ts +49 -31
- package/internal/stores/hybrid_viewer/camera.ts +191 -177
- package/internal/stores/hybrid_viewer/camera_animation.ts +11 -10
- package/internal/stores/hybrid_viewer/core.ts +64 -0
- package/internal/stores/hybrid_viewer/filters.ts +10 -16
- package/internal/stores/hybrid_viewer/highlight.ts +91 -130
- package/internal/stores/hybrid_viewer/ruler.ts +24 -15
- package/internal/stores/hybrid_viewer/scene.ts +96 -117
- package/internal/stores/hybrid_viewer/viewport.ts +74 -65
- package/internal/stores/hybrid_viewer/vtk_types.ts +13 -29
- package/internal/utils/api_fetch.ts +54 -23
- package/internal/utils/upload_file.ts +74 -53
- package/internal/utils/viewer_call.ts +22 -13
- package/internal/utils/ws_client.ts +24 -13
- package/nuxt.config.ts +58 -1
- package/package.json +20 -8
- package/server/api/cloud/extensions/run.post.ts +6 -10
- package/server/api/local/app/project_folder_path.post.ts +4 -4
- package/server/api/local/app/run_back.post.ts +5 -7
- package/server/api/local/app/run_viewer.post.ts +5 -7
- package/server/api/local/extensions/kill.post.ts +4 -3
- package/server/api/local/extensions/run.post.ts +7 -10
- package/server/api/local/extensions/upload.put.ts +44 -54
- package/server/api/microservice/app/get_is_app_ready.get.ts +4 -5
- package/server/api/microservice/app/set_app_base_url.post.ts +5 -6
- package/server/api/microservice/app/set_back_base_url.post.ts +5 -6
- package/server/api/microservice/app/set_is_app_ready.post.ts +5 -6
- package/server/api/microservice/app/set_viewer_base_url.post.ts +5 -6
- package/server/api/microservice/extensions/download.post.ts +5 -4
- package/server/api/serverless/run_cloud.post.ts +53 -11
- package/server/utils/app_config.ts +29 -22
- package/server/utils/cleanup.ts +60 -30
- package/server/utils/cloud.ts +9 -8
- package/server/utils/extension.ts +23 -9
- package/server/utils/microservices.ts +33 -24
- package/server/utils/path.ts +4 -4
- package/server/utils/scripts.ts +26 -23
- package/server/utils/server.ts +2 -2
- package/server/utils/server_config.ts +41 -27
- package/server/utils/stream.ts +6 -0
- package/server/utils/ws_client.ts +42 -8
- package/shared/scripts.ts +15 -10
- package/shared/utils/call_raw.ts +23 -16
- package/shared/utils/call_schema.ts +5 -8
- package/shared/utils/fetch_raw.ts +87 -47
- package/shared/utils/fetch_schema.ts +6 -9
- package/shared/utils/file.ts +8 -2
- package/shared/utils/response_handlers/load.ts +26 -11
- package/shared/utils/types.ts +9 -9
- package/shared/utils/validate_schema.ts +1 -1
- package/app/components/Viewer/ObjectTree/Views/ModelComponents.vue +0 -276
- package/server/types/vendor.d.ts +0 -64
- package/server/utils/server_config.js +0 -43
- package/shared/utils/call_raw.js +0 -30
- package/shared/utils/fetch_raw.js +0 -40
- /package/{opengeodeweb_front_schemas.js → .build/opengeodeweb_front_schemas.js} +0 -0
- /package/{server → .build/server}/utils/server.js +0 -0
- /package/{shared → .build/shared}/app_mode.js +0 -0
- /package/{shared → .build/shared}/utils/parse_boolean.js +0 -0
- /package/{shared → .build/shared}/utils/types.js +0 -0
|
@@ -1,37 +1,47 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
|
|
3
|
-
// oxlint-disable eslint/sort-imports
|
|
4
|
-
// This file exhaustively wires group- and per-component style properties (visibility/color/coloring/vertex+polyhedron attributes) to the style store; the formatter's line-wrapping of the resulting store calls pushes the file past max-lines even though no logic was added.
|
|
5
|
-
// oxlint-disable eslint/max-lines
|
|
2
|
+
import type { CollectionComponent } from "@ogw_front/stores/data_helpers/collections";
|
|
6
3
|
import OptionsSection from "@ogw_front/components/Viewer/Options/OptionsSection.vue";
|
|
4
|
+
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
7
5
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
8
6
|
import VisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
9
7
|
import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json";
|
|
10
8
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
11
9
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
12
|
-
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
13
10
|
|
|
14
11
|
interface Props {
|
|
15
12
|
modelId: string;
|
|
16
13
|
surfaceId?: string;
|
|
17
14
|
targetSurfaceIds: string[];
|
|
15
|
+
collections?: CollectionComponent[];
|
|
18
16
|
}
|
|
19
17
|
|
|
20
|
-
const {
|
|
18
|
+
const {
|
|
19
|
+
modelId,
|
|
20
|
+
surfaceId = undefined,
|
|
21
|
+
targetSurfaceIds,
|
|
22
|
+
collections = undefined,
|
|
23
|
+
} = defineProps<Props>();
|
|
21
24
|
|
|
22
25
|
const dataStyleStore = useDataStyleStore();
|
|
23
26
|
const hybridViewerStore = useHybridViewerStore();
|
|
24
27
|
|
|
28
|
+
const referenceSurfaceId = computed<string | undefined>(() =>
|
|
29
|
+
collections ? targetSurfaceIds[0] : undefined,
|
|
30
|
+
);
|
|
31
|
+
|
|
25
32
|
// Visibility
|
|
26
|
-
const surfacesVisibility = computed({
|
|
27
|
-
get: () =>
|
|
33
|
+
const surfacesVisibility = computed<boolean>({
|
|
34
|
+
get: () =>
|
|
35
|
+
collections
|
|
36
|
+
? targetSurfaceIds.every((id) => dataStyleStore.modelSurfaceVisibility(modelId, id))
|
|
37
|
+
: dataStyleStore.modelComponentTypeVisibility(modelId, "Surface"),
|
|
28
38
|
set: async (newValue) => {
|
|
29
39
|
await dataStyleStore.setModelSurfacesVisibility(modelId, targetSurfaceIds, newValue);
|
|
30
40
|
hybridViewerStore.remoteRender();
|
|
31
41
|
},
|
|
32
42
|
});
|
|
33
43
|
|
|
34
|
-
const surfaceVisibility = computed({
|
|
44
|
+
const surfaceVisibility = computed<boolean>({
|
|
35
45
|
get: () => dataStyleStore.modelSurfaceVisibility(modelId, surfaceId) as boolean | undefined,
|
|
36
46
|
set: async (newValue) => {
|
|
37
47
|
if (surfaceId === undefined) {
|
|
@@ -44,7 +54,8 @@ const surfaceVisibility = computed({
|
|
|
44
54
|
|
|
45
55
|
// Color
|
|
46
56
|
const surfacesColor = computed<RGBAColor | undefined>({
|
|
47
|
-
get: () =>
|
|
57
|
+
get: () =>
|
|
58
|
+
dataStyleStore.modelSurfaceColor(modelId, referenceSurfaceId.value) as RGBAColor | undefined,
|
|
48
59
|
set: async (color) => {
|
|
49
60
|
await dataStyleStore.setModelSurfacesColor(modelId, targetSurfaceIds, color);
|
|
50
61
|
hybridViewerStore.remoteRender();
|
|
@@ -64,12 +75,27 @@ const surfaceColor = computed<RGBAColor | undefined>({
|
|
|
64
75
|
|
|
65
76
|
const surfacesActiveColoring = computed<string | undefined>({
|
|
66
77
|
get: () =>
|
|
67
|
-
dataStyleStore.
|
|
78
|
+
dataStyleStore.modelSurfaceActiveColoring(modelId, referenceSurfaceId.value) as
|
|
79
|
+
| string
|
|
80
|
+
| undefined,
|
|
68
81
|
set: async (coloringType) => {
|
|
69
82
|
if (typeof coloringType !== "string") {
|
|
70
83
|
return;
|
|
71
84
|
}
|
|
72
|
-
|
|
85
|
+
if (collections && coloringType === "random") {
|
|
86
|
+
await Promise.all(
|
|
87
|
+
collections.map((collection) =>
|
|
88
|
+
dataStyleStore.setModelSurfacesActiveColoring(
|
|
89
|
+
modelId,
|
|
90
|
+
collection.children.map((child) => child.id),
|
|
91
|
+
coloringType,
|
|
92
|
+
collection.id,
|
|
93
|
+
),
|
|
94
|
+
),
|
|
95
|
+
);
|
|
96
|
+
} else {
|
|
97
|
+
await dataStyleStore.setModelSurfacesActiveColoring(modelId, targetSurfaceIds, coloringType);
|
|
98
|
+
}
|
|
73
99
|
hybridViewerStore.remoteRender();
|
|
74
100
|
},
|
|
75
101
|
});
|
|
@@ -86,8 +112,8 @@ const surfaceActiveColoring = computed<string | undefined>({
|
|
|
86
112
|
});
|
|
87
113
|
|
|
88
114
|
// Group Attributes
|
|
89
|
-
const surfacesVertexAttributeName = computed({
|
|
90
|
-
get: () => dataStyleStore.modelSurfacesVertexAttributeName(modelId),
|
|
115
|
+
const surfacesVertexAttributeName = computed<string | undefined>({
|
|
116
|
+
get: () => dataStyleStore.modelSurfacesVertexAttributeName(modelId, referenceSurfaceId.value),
|
|
91
117
|
set: async (newValue) => {
|
|
92
118
|
if (newValue === undefined) {
|
|
93
119
|
return;
|
|
@@ -97,16 +123,16 @@ const surfacesVertexAttributeName = computed({
|
|
|
97
123
|
},
|
|
98
124
|
});
|
|
99
125
|
|
|
100
|
-
const surfacesVertexAttributeItem = computed({
|
|
101
|
-
get: () => dataStyleStore.modelSurfacesVertexAttributeItem(modelId),
|
|
126
|
+
const surfacesVertexAttributeItem = computed<string | undefined>({
|
|
127
|
+
get: () => dataStyleStore.modelSurfacesVertexAttributeItem(modelId, referenceSurfaceId.value),
|
|
102
128
|
set: async (newValue) => {
|
|
103
129
|
await dataStyleStore.setModelSurfacesVertexAttributeItem(modelId, targetSurfaceIds, newValue);
|
|
104
130
|
hybridViewerStore.remoteRender();
|
|
105
131
|
},
|
|
106
132
|
});
|
|
107
133
|
|
|
108
|
-
const surfacesVertexAttributeRange = computed({
|
|
109
|
-
get: () => dataStyleStore.modelSurfacesVertexAttributeRange(modelId),
|
|
134
|
+
const surfacesVertexAttributeRange = computed<[number, number] | undefined>({
|
|
135
|
+
get: () => dataStyleStore.modelSurfacesVertexAttributeRange(modelId, referenceSurfaceId.value),
|
|
110
136
|
set: async (newValue) => {
|
|
111
137
|
const [minimum, maximum] = newValue;
|
|
112
138
|
if (minimum === undefined || maximum === undefined) {
|
|
@@ -122,8 +148,8 @@ const surfacesVertexAttributeRange = computed({
|
|
|
122
148
|
},
|
|
123
149
|
});
|
|
124
150
|
|
|
125
|
-
const surfacesVertexAttributeColorMap = computed({
|
|
126
|
-
get: () => dataStyleStore.modelSurfacesVertexAttributeColorMap(modelId),
|
|
151
|
+
const surfacesVertexAttributeColorMap = computed<Map<string, RGBAColor> | undefined>({
|
|
152
|
+
get: () => dataStyleStore.modelSurfacesVertexAttributeColorMap(modelId, referenceSurfaceId.value),
|
|
127
153
|
set: async (newValue) => {
|
|
128
154
|
await dataStyleStore.setModelSurfacesVertexAttributeColorMap(
|
|
129
155
|
modelId,
|
|
@@ -136,7 +162,9 @@ const surfacesVertexAttributeColorMap = computed({
|
|
|
136
162
|
|
|
137
163
|
const surfacesVertexAttributeNoDataColor = computed<RGBAColor | undefined>({
|
|
138
164
|
get: () =>
|
|
139
|
-
dataStyleStore.modelSurfacesVertexAttributeNoDataColor(modelId) as
|
|
165
|
+
dataStyleStore.modelSurfacesVertexAttributeNoDataColor(modelId, referenceSurfaceId.value) as
|
|
166
|
+
| RGBAColor
|
|
167
|
+
| undefined,
|
|
140
168
|
set: async (newValue) => {
|
|
141
169
|
await dataStyleStore.setModelSurfacesVertexAttributeNoDataColor(
|
|
142
170
|
modelId,
|
|
@@ -147,8 +175,8 @@ const surfacesVertexAttributeNoDataColor = computed<RGBAColor | undefined>({
|
|
|
147
175
|
},
|
|
148
176
|
});
|
|
149
177
|
|
|
150
|
-
const surfacesPolygonAttributeName = computed({
|
|
151
|
-
get: () => dataStyleStore.modelSurfacesPolygonAttributeName(modelId),
|
|
178
|
+
const surfacesPolygonAttributeName = computed<string | undefined>({
|
|
179
|
+
get: () => dataStyleStore.modelSurfacesPolygonAttributeName(modelId, referenceSurfaceId.value),
|
|
152
180
|
set: async (newValue) => {
|
|
153
181
|
if (newValue === undefined) {
|
|
154
182
|
return;
|
|
@@ -158,16 +186,16 @@ const surfacesPolygonAttributeName = computed({
|
|
|
158
186
|
},
|
|
159
187
|
});
|
|
160
188
|
|
|
161
|
-
const surfacesPolygonAttributeItem = computed({
|
|
162
|
-
get: () => dataStyleStore.modelSurfacesPolygonAttributeItem(modelId),
|
|
189
|
+
const surfacesPolygonAttributeItem = computed<string | undefined>({
|
|
190
|
+
get: () => dataStyleStore.modelSurfacesPolygonAttributeItem(modelId, referenceSurfaceId.value),
|
|
163
191
|
set: async (newValue) => {
|
|
164
192
|
await dataStyleStore.setModelSurfacesPolygonAttributeItem(modelId, targetSurfaceIds, newValue);
|
|
165
193
|
hybridViewerStore.remoteRender();
|
|
166
194
|
},
|
|
167
195
|
});
|
|
168
196
|
|
|
169
|
-
const surfacesPolygonAttributeRange = computed({
|
|
170
|
-
get: () => dataStyleStore.modelSurfacesPolygonAttributeRange(modelId),
|
|
197
|
+
const surfacesPolygonAttributeRange = computed<[number, number] | undefined>({
|
|
198
|
+
get: () => dataStyleStore.modelSurfacesPolygonAttributeRange(modelId, referenceSurfaceId.value),
|
|
171
199
|
set: async (newValue) => {
|
|
172
200
|
const [minimum, maximum] = newValue;
|
|
173
201
|
if (minimum === undefined || maximum === undefined) {
|
|
@@ -183,8 +211,9 @@ const surfacesPolygonAttributeRange = computed({
|
|
|
183
211
|
},
|
|
184
212
|
});
|
|
185
213
|
|
|
186
|
-
const surfacesPolygonAttributeColorMap = computed({
|
|
187
|
-
get: () =>
|
|
214
|
+
const surfacesPolygonAttributeColorMap = computed<Map<string, RGBAColor> | undefined>({
|
|
215
|
+
get: () =>
|
|
216
|
+
dataStyleStore.modelSurfacesPolygonAttributeColorMap(modelId, referenceSurfaceId.value),
|
|
188
217
|
set: async (newValue) => {
|
|
189
218
|
await dataStyleStore.setModelSurfacesPolygonAttributeColorMap(
|
|
190
219
|
modelId,
|
|
@@ -197,7 +226,9 @@ const surfacesPolygonAttributeColorMap = computed({
|
|
|
197
226
|
|
|
198
227
|
const surfacesPolygonAttributeNoDataColor = computed<RGBAColor | undefined>({
|
|
199
228
|
get: () =>
|
|
200
|
-
dataStyleStore.modelSurfacesPolygonAttributeNoDataColor(modelId) as
|
|
229
|
+
dataStyleStore.modelSurfacesPolygonAttributeNoDataColor(modelId, referenceSurfaceId.value) as
|
|
230
|
+
| RGBAColor
|
|
231
|
+
| undefined,
|
|
201
232
|
set: async (newValue) => {
|
|
202
233
|
await dataStyleStore.setModelSurfacesPolygonAttributeNoDataColor(
|
|
203
234
|
modelId,
|
|
@@ -209,7 +240,7 @@ const surfacesPolygonAttributeNoDataColor = computed<RGBAColor | undefined>({
|
|
|
209
240
|
});
|
|
210
241
|
|
|
211
242
|
// Individual Attributes
|
|
212
|
-
const vertexAttributeName = computed({
|
|
243
|
+
const vertexAttributeName = computed<string | undefined>({
|
|
213
244
|
get: () => dataStyleStore.modelSurfacesVertexAttributeName(modelId, surfaceId),
|
|
214
245
|
set: async (newValue) => {
|
|
215
246
|
if (surfaceId === undefined || newValue === undefined) {
|
|
@@ -220,7 +251,7 @@ const vertexAttributeName = computed({
|
|
|
220
251
|
},
|
|
221
252
|
});
|
|
222
253
|
|
|
223
|
-
const vertexAttributeItem = computed({
|
|
254
|
+
const vertexAttributeItem = computed<string | undefined>({
|
|
224
255
|
get: () => dataStyleStore.modelSurfacesVertexAttributeItem(modelId, surfaceId),
|
|
225
256
|
set: async (newValue) => {
|
|
226
257
|
if (surfaceId === undefined) {
|
|
@@ -231,7 +262,7 @@ const vertexAttributeItem = computed({
|
|
|
231
262
|
},
|
|
232
263
|
});
|
|
233
264
|
|
|
234
|
-
const vertexAttributeRange = computed({
|
|
265
|
+
const vertexAttributeRange = computed<[number, number] | undefined>({
|
|
235
266
|
get: () => dataStyleStore.modelSurfacesVertexAttributeRange(modelId, surfaceId),
|
|
236
267
|
set: async (newValue) => {
|
|
237
268
|
const [minimum, maximum] = newValue;
|
|
@@ -248,7 +279,7 @@ const vertexAttributeRange = computed({
|
|
|
248
279
|
},
|
|
249
280
|
});
|
|
250
281
|
|
|
251
|
-
const vertexAttributeColorMap = computed({
|
|
282
|
+
const vertexAttributeColorMap = computed<Map<string, RGBAColor> | undefined>({
|
|
252
283
|
get: () => dataStyleStore.modelSurfacesVertexAttributeColorMap(modelId, surfaceId),
|
|
253
284
|
set: async (newValue) => {
|
|
254
285
|
if (surfaceId === undefined) {
|
|
@@ -273,7 +304,7 @@ const vertexAttributeNoDataColor = computed<RGBAColor | undefined>({
|
|
|
273
304
|
},
|
|
274
305
|
});
|
|
275
306
|
|
|
276
|
-
const polygonAttributeName = computed({
|
|
307
|
+
const polygonAttributeName = computed<string | undefined>({
|
|
277
308
|
get: () => dataStyleStore.modelSurfacesPolygonAttributeName(modelId, surfaceId),
|
|
278
309
|
set: async (newValue) => {
|
|
279
310
|
if (surfaceId === undefined || newValue === undefined) {
|
|
@@ -284,7 +315,7 @@ const polygonAttributeName = computed({
|
|
|
284
315
|
},
|
|
285
316
|
});
|
|
286
317
|
|
|
287
|
-
const polygonAttributeItem = computed({
|
|
318
|
+
const polygonAttributeItem = computed<string | undefined>({
|
|
288
319
|
get: () => dataStyleStore.modelSurfacesPolygonAttributeItem(modelId, surfaceId),
|
|
289
320
|
set: async (newValue) => {
|
|
290
321
|
if (surfaceId === undefined) {
|
|
@@ -295,7 +326,7 @@ const polygonAttributeItem = computed({
|
|
|
295
326
|
},
|
|
296
327
|
});
|
|
297
328
|
|
|
298
|
-
const polygonAttributeRange = computed({
|
|
329
|
+
const polygonAttributeRange = computed<[number, number] | undefined>({
|
|
299
330
|
get: () => dataStyleStore.modelSurfacesPolygonAttributeRange(modelId, surfaceId),
|
|
300
331
|
set: async (newValue) => {
|
|
301
332
|
const [minimum, maximum] = newValue;
|
|
@@ -312,7 +343,7 @@ const polygonAttributeRange = computed({
|
|
|
312
343
|
},
|
|
313
344
|
});
|
|
314
345
|
|
|
315
|
-
const polygonAttributeColorMap = computed({
|
|
346
|
+
const polygonAttributeColorMap = computed<Map<string, RGBAColor> | undefined>({
|
|
316
347
|
get: () => dataStyleStore.modelSurfacesPolygonAttributeColorMap(modelId, surfaceId),
|
|
317
348
|
set: async (newValue) => {
|
|
318
349
|
if (surfaceId === undefined) {
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import { type DisplayItem, type EmitFn, useVirtualTree } from "@ogw_front/composables/virtual_tree";
|
|
2
3
|
import StickyHeader from "@ogw_front/components/Viewer/ObjectTree/Base/StickyHeader.vue";
|
|
3
4
|
import TreeRow from "@ogw_front/components/Viewer/ObjectTree/Base/TreeRow.vue";
|
|
4
5
|
import { useTreeKeyboardNav } from "@ogw_front/composables/tree_keyboard_nav";
|
|
5
6
|
import { useTreeScroll } from "@ogw_front/composables/tree_scroll";
|
|
6
|
-
import { useVirtualTree } from "@ogw_front/composables/virtual_tree";
|
|
7
|
-
// oxlint-disable-next-line eslint/no-duplicate-imports
|
|
8
|
-
import type { DisplayItem, EmitFn } from "@ogw_front/composables/virtual_tree";
|
|
9
7
|
|
|
10
8
|
// The useVirtualTree composable's own props type (VirtualTreeProps) isn't exported; this component intentionally stays generic over whatever item shape callers use (plain treeview groups, model component groups, ...), so it is extracted from the composable's signature instead of re-declared here.
|
|
11
9
|
type UnwrapMaybeRefOrGetter<Source> = Source extends () => infer Result
|
|
@@ -35,7 +33,7 @@ const {
|
|
|
35
33
|
|
|
36
34
|
const treeWrapper = ref<HTMLDivElement | undefined>(undefined);
|
|
37
35
|
|
|
38
|
-
|
|
36
|
+
interface Emits {
|
|
39
37
|
"update:opened": [value: unknown[]];
|
|
40
38
|
"update:selected": [value: unknown[]];
|
|
41
39
|
"update:active": [value: unknown[]];
|
|
@@ -44,7 +42,9 @@ const emit = defineEmits<{
|
|
|
44
42
|
"hover:enter": [payload: { item: DisplayItem }];
|
|
45
43
|
"hover:leave": [payload: { item: DisplayItem }];
|
|
46
44
|
contextmenu: [payload: { event: MouseEvent; item: DisplayItem["raw"] }];
|
|
47
|
-
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const emit = defineEmits<Emits>();
|
|
48
48
|
|
|
49
49
|
const {
|
|
50
50
|
actualItemProps,
|
|
@@ -76,57 +76,75 @@ const { virtualScrollRef, stickyHeader, handleScroll, scrollToIndex, getScrollIn
|
|
|
76
76
|
actualItemProps,
|
|
77
77
|
);
|
|
78
78
|
|
|
79
|
-
const focusedIndex = ref(-1);
|
|
80
|
-
const lastActiveIndex = ref(-1);
|
|
79
|
+
const focusedIndex = ref<number>(-1);
|
|
80
|
+
const lastActiveIndex = ref<number>(-1);
|
|
81
81
|
|
|
82
|
-
function
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
function applyRangeSelect(newActive: Set<unknown>, index: number): void {
|
|
83
|
+
const start = Math.min(lastActiveIndex.value, index);
|
|
84
|
+
const end = Math.max(lastActiveIndex.value, index);
|
|
85
|
+
for (let i = start; i <= end; i += 1) {
|
|
86
|
+
const rowItem = displayItems.value[i];
|
|
87
|
+
if (rowItem && rowItem.isLeaf) {
|
|
88
|
+
newActive.add(rowItem.raw[actualItemProps.value.value]);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function applyToggleActive(newActive: Set<unknown>, id: unknown, index: number | undefined): void {
|
|
94
|
+
if (newActive.has(id)) {
|
|
95
|
+
newActive.delete(id);
|
|
96
|
+
} else {
|
|
97
|
+
newActive.add(id);
|
|
98
|
+
}
|
|
87
99
|
if (index !== undefined) {
|
|
88
|
-
|
|
100
|
+
lastActiveIndex.value = index;
|
|
89
101
|
}
|
|
102
|
+
}
|
|
90
103
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
104
|
+
function handleMultiSelectClick(
|
|
105
|
+
item: DisplayItem,
|
|
106
|
+
index: number | undefined,
|
|
107
|
+
event: MouseEvent | KeyboardEvent,
|
|
108
|
+
): void {
|
|
109
|
+
const newActive = new Set(active);
|
|
110
|
+
const id = item.raw[actualItemProps.value.value];
|
|
111
|
+
if (event.shiftKey && lastActiveIndex.value !== -1 && index !== undefined) {
|
|
112
|
+
applyRangeSelect(newActive, index);
|
|
113
|
+
} else {
|
|
114
|
+
applyToggleActive(newActive, id, index);
|
|
115
|
+
}
|
|
116
|
+
emit("update:active", [...newActive]);
|
|
117
|
+
}
|
|
94
118
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
for (let i = start; i <= end; i += 1) {
|
|
99
|
-
const rowItem = displayItems.value[i];
|
|
100
|
-
if (rowItem && rowItem.isLeaf) {
|
|
101
|
-
newActive.add(rowItem.raw[actualItemProps.value.value]);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
} else {
|
|
105
|
-
if (newActive.has(id)) {
|
|
106
|
-
newActive.delete(id);
|
|
107
|
-
} else {
|
|
108
|
-
newActive.add(id);
|
|
109
|
-
}
|
|
110
|
-
if (index !== undefined) {
|
|
111
|
-
lastActiveIndex.value = index;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
emit("update:active", [...newActive]);
|
|
119
|
+
function handleNormalClick(item: DisplayItem, index: number | undefined): void {
|
|
120
|
+
if (!item.isLeaf) {
|
|
121
|
+
toggleOpen(item.raw);
|
|
115
122
|
return;
|
|
116
123
|
}
|
|
124
|
+
emit("update:active", [item.raw[actualItemProps.value.value]]);
|
|
125
|
+
if (index !== undefined) {
|
|
126
|
+
lastActiveIndex.value = index;
|
|
127
|
+
}
|
|
128
|
+
toggleSelect(item.raw);
|
|
129
|
+
emit("click:item", item.raw);
|
|
130
|
+
}
|
|
117
131
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
emit("update:active", newActive);
|
|
122
|
-
if (index !== undefined) {
|
|
123
|
-
lastActiveIndex.value = index;
|
|
124
|
-
}
|
|
132
|
+
function isMultiSelectEvent(event: MouseEvent | KeyboardEvent): void {
|
|
133
|
+
return event.ctrlKey || event.metaKey || event.shiftKey;
|
|
134
|
+
}
|
|
125
135
|
|
|
126
|
-
|
|
127
|
-
|
|
136
|
+
function handleItemClick(
|
|
137
|
+
item: DisplayItem,
|
|
138
|
+
index: number | undefined,
|
|
139
|
+
event?: MouseEvent | KeyboardEvent,
|
|
140
|
+
): void {
|
|
141
|
+
if (index !== undefined) {
|
|
142
|
+
focusedIndex.value = index;
|
|
143
|
+
}
|
|
144
|
+
if (Boolean(event) && isMultiSelectEvent(event)) {
|
|
145
|
+
handleMultiSelectClick(item, index, event);
|
|
128
146
|
} else {
|
|
129
|
-
|
|
147
|
+
handleNormalClick(item, index);
|
|
130
148
|
}
|
|
131
149
|
}
|
|
132
150
|
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
// Not auto-fixable (eslint's sort-imports core rule has no autofixer) and this file's import order doesn't match its syntax-kind-then-alphabetical requirement - left as-is rather than manually reordered across the codebase for a purely cosmetic rule.
|
|
3
|
-
// oxlint-disable eslint/sort-imports
|
|
4
2
|
import ActionButton from "@ogw_front/components/ActionButton.vue";
|
|
5
3
|
import SearchBar from "@ogw_front/components/SearchBar.vue";
|
|
6
4
|
|
|
@@ -20,14 +18,16 @@ const {
|
|
|
20
18
|
isCollapsed = false,
|
|
21
19
|
} = defineProps<Props>();
|
|
22
20
|
|
|
23
|
-
|
|
21
|
+
interface Emits {
|
|
24
22
|
"update:search": [value: string];
|
|
25
23
|
"toggle-sort": [];
|
|
26
24
|
"collapse-all": [];
|
|
27
25
|
"expand-all": [];
|
|
28
|
-
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const emit = defineEmits<Emits>();
|
|
29
29
|
|
|
30
|
-
const showSearch = ref(false);
|
|
30
|
+
const showSearch = ref<boolean>(false);
|
|
31
31
|
|
|
32
32
|
watch(
|
|
33
33
|
() => showSearch.value,
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
|
|
3
|
-
// oxlint-disable eslint/sort-imports
|
|
2
|
+
import type { DisplayItem } from "@ogw_front/composables/virtual_tree";
|
|
4
3
|
import { middleTruncate } from "@ogw_front/utils/string";
|
|
5
4
|
import { useClipboard } from "@vueuse/core";
|
|
6
5
|
import { useFeedbackStore } from "@ogw_front/stores/feedback";
|
|
7
6
|
import { useResponsiveMiddleTruncate } from "@ogw_front/composables/responsive_middle_truncate";
|
|
8
|
-
import type { DisplayItem } from "@ogw_front/composables/virtual_tree";
|
|
9
7
|
|
|
10
8
|
const feedbackStore = useFeedbackStore();
|
|
11
9
|
const { copy } = useClipboard();
|
|
@@ -17,11 +15,13 @@ interface Props {
|
|
|
17
15
|
|
|
18
16
|
const { item, isLeaf } = defineProps<Props>();
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
interface Emits {
|
|
21
19
|
contextmenu: [event: MouseEvent];
|
|
22
20
|
mouseenter: [];
|
|
23
21
|
mouseleave: [];
|
|
24
|
-
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const emit = defineEmits<Emits>();
|
|
25
25
|
|
|
26
26
|
const labelContainer = useTemplateRef("label-container");
|
|
27
27
|
const { width: containerWidth } = useElementSize(labelContainer);
|
|
@@ -31,10 +31,11 @@ interface LabeledItem {
|
|
|
31
31
|
id: string;
|
|
32
32
|
title?: string;
|
|
33
33
|
is_active?: boolean;
|
|
34
|
+
category?: string;
|
|
34
35
|
children?: unknown[];
|
|
35
36
|
}
|
|
36
37
|
|
|
37
|
-
const actualItem = computed(() => (item.raw || item) as unknown as LabeledItem);
|
|
38
|
+
const actualItem = computed<LabeledItem>(() => (item.raw || item) as unknown as LabeledItem);
|
|
38
39
|
|
|
39
40
|
const TOOLTIP_NAME_MAX_LENGTH = 40;
|
|
40
41
|
const TOOLTIP_NAME_START_CHARS = 10;
|
|
@@ -42,7 +43,7 @@ const TOOLTIP_NAME_END_CHARS = 8;
|
|
|
42
43
|
|
|
43
44
|
const displayTitle = useResponsiveMiddleTruncate(() => actualItem.value.title, containerWidth);
|
|
44
45
|
|
|
45
|
-
const tooltipTitle = computed(() =>
|
|
46
|
+
const tooltipTitle = computed<string>(() =>
|
|
46
47
|
middleTruncate(
|
|
47
48
|
actualItem.value.title,
|
|
48
49
|
TOOLTIP_NAME_MAX_LENGTH,
|
|
@@ -51,14 +52,17 @@ const tooltipTitle = computed(() =>
|
|
|
51
52
|
),
|
|
52
53
|
);
|
|
53
54
|
|
|
54
|
-
const tooltipDisabled = computed(() => {
|
|
55
|
+
const tooltipDisabled = computed<boolean>(() => {
|
|
56
|
+
if (actualItem.value.category !== undefined) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
55
59
|
if (isLeaf !== undefined) {
|
|
56
60
|
return !isLeaf;
|
|
57
61
|
}
|
|
58
62
|
return actualItem.value.children && actualItem.value.children.length > 0;
|
|
59
63
|
});
|
|
60
64
|
|
|
61
|
-
async function copyToClipboard(text: string, label: string) {
|
|
65
|
+
async function copyToClipboard(text: string, label: string): Promise<void> {
|
|
62
66
|
await copy(text);
|
|
63
67
|
feedbackStore.add_success(`${label} copied to clipboard`);
|
|
64
68
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
// Not auto-fixable (eslint's sort-imports core rule has no autofixer) and this file's import order doesn't match its syntax-kind-then-alphabetical requirement - left as-is rather than manually reordered across the codebase for a purely cosmetic rule.
|
|
3
|
-
// oxlint-disable eslint/sort-imports
|
|
4
|
-
import TreeRow from "@ogw_front/components/Viewer/ObjectTree/Base/TreeRow.vue";
|
|
5
2
|
import type {
|
|
6
3
|
DisplayItem,
|
|
7
4
|
ItemPropsConfig,
|
|
8
5
|
SelectionConfig,
|
|
9
6
|
TreeItem,
|
|
10
7
|
} from "@ogw_front/composables/virtual_tree";
|
|
8
|
+
import TreeRow from "@ogw_front/components/Viewer/ObjectTree/Base/TreeRow.vue";
|
|
11
9
|
|
|
12
10
|
interface Props {
|
|
13
11
|
item: DisplayItem;
|
|
@@ -19,10 +17,12 @@ interface Props {
|
|
|
19
17
|
|
|
20
18
|
const { item, itemProps, selection, isSelected, getIndeterminate } = defineProps<Props>();
|
|
21
19
|
|
|
22
|
-
|
|
20
|
+
interface Emits {
|
|
23
21
|
"toggle-open": [item: TreeItem];
|
|
24
22
|
"toggle-select": [item: TreeItem];
|
|
25
|
-
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const emit = defineEmits<Emits>();
|
|
26
26
|
</script>
|
|
27
27
|
|
|
28
28
|
<template>
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
// Not auto-fixable (eslint's sort-imports core rule has no autofixer) and this file's import order doesn't match its syntax-kind-then-alphabetical requirement - left as-is rather than manually reordered across the codebase for a purely cosmetic rule.
|
|
3
|
-
// oxlint-disable eslint/sort-imports
|
|
4
|
-
import { useDataStore } from "@ogw_front/stores/data";
|
|
5
2
|
import type {
|
|
6
3
|
DisplayItem,
|
|
7
4
|
ItemPropsConfig,
|
|
8
5
|
SelectionConfig,
|
|
9
6
|
TreeItem,
|
|
10
7
|
} from "@ogw_front/composables/virtual_tree";
|
|
8
|
+
import { useDataStore } from "@ogw_front/stores/data";
|
|
11
9
|
|
|
12
10
|
const dataStore = useDataStore();
|
|
13
11
|
|
|
@@ -21,25 +19,27 @@ interface Props {
|
|
|
21
19
|
|
|
22
20
|
const { item, itemProps, selection, isSelected, getIndeterminate } = defineProps<Props>();
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
interface Emits {
|
|
25
23
|
"toggle-open": [item: TreeItem];
|
|
26
24
|
"toggle-select": [item: TreeItem];
|
|
27
25
|
"hover-eye-enter": [item: unknown];
|
|
28
26
|
"hover-eye-leave": [item: unknown];
|
|
29
|
-
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const emit = defineEmits<Emits>();
|
|
30
30
|
|
|
31
31
|
const INDENT_STEP = 10;
|
|
32
32
|
|
|
33
|
-
function triggerHorizonStackModal(rawItem: unknown) {
|
|
33
|
+
function triggerHorizonStackModal(rawItem: unknown): void {
|
|
34
34
|
globalThis.dispatchEvent(new CustomEvent("open-horizon-stack-modal", { detail: rawItem }));
|
|
35
35
|
}
|
|
36
|
-
const isHorizonStack = computed(() => item.raw.geode_object_type === "HorizonStack3D");
|
|
37
|
-
const isViewable = computed(() => dataStore.isItemViewable(item.raw));
|
|
38
|
-
const showEyeButton = computed(
|
|
36
|
+
const isHorizonStack = computed<boolean>(() => item.raw.geode_object_type === "HorizonStack3D");
|
|
37
|
+
const isViewable = computed<boolean>(() => dataStore.isItemViewable(item.raw));
|
|
38
|
+
const showEyeButton = computed<boolean>(
|
|
39
39
|
() => !isHorizonStack.value && item.raw.title !== "HorizonStack3D" && isViewable.value,
|
|
40
40
|
);
|
|
41
41
|
|
|
42
|
-
function handleRowClick(event: MouseEvent) {
|
|
42
|
+
function handleRowClick(event: MouseEvent): void {
|
|
43
43
|
if (isHorizonStack.value) {
|
|
44
44
|
if (!item.isLeaf) {
|
|
45
45
|
return;
|
|
@@ -23,11 +23,13 @@ const {
|
|
|
23
23
|
borderLeft = true,
|
|
24
24
|
} = defineProps<Props>();
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
interface Emits {
|
|
27
27
|
close: [];
|
|
28
28
|
dragstart: [event: DragEvent];
|
|
29
29
|
"update:scrollTop": [value: number];
|
|
30
|
-
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const emit = defineEmits<Emits>();
|
|
31
33
|
|
|
32
34
|
const scrollContainer = useTemplateRef("scroll-container");
|
|
33
35
|
const treeviewBox = useTemplateRef("treeview-box");
|
|
@@ -37,14 +39,14 @@ const { adaptiveStyles } = useAdaptiveStyles(treeviewBox);
|
|
|
37
39
|
let isApplyingScroll = false;
|
|
38
40
|
let resizeObserver: ResizeObserver | undefined = undefined;
|
|
39
41
|
|
|
40
|
-
function handleScroll(event: Event) {
|
|
42
|
+
function handleScroll(event: Event): void {
|
|
41
43
|
if (isApplyingScroll) {
|
|
42
44
|
return;
|
|
43
45
|
}
|
|
44
46
|
emit("update:scrollTop", (event.target as HTMLElement).scrollTop);
|
|
45
47
|
}
|
|
46
48
|
|
|
47
|
-
function applyScrollTop(val: number) {
|
|
49
|
+
function applyScrollTop(val: number): void {
|
|
48
50
|
if (scrollContainer.value) {
|
|
49
51
|
isApplyingScroll = true;
|
|
50
52
|
scrollContainer.value.scrollTop = val;
|