@geode/opengeodeweb-front 10.34.0-rc.8 → 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
|
lineId?: string;
|
|
17
14
|
targetLineIds: string[];
|
|
15
|
+
collections?: CollectionComponent[];
|
|
18
16
|
}
|
|
19
17
|
|
|
20
|
-
const {
|
|
18
|
+
const {
|
|
19
|
+
modelId,
|
|
20
|
+
lineId = undefined,
|
|
21
|
+
targetLineIds,
|
|
22
|
+
collections = undefined,
|
|
23
|
+
} = defineProps<Props>();
|
|
21
24
|
|
|
22
25
|
const dataStyleStore = useDataStyleStore();
|
|
23
26
|
const hybridViewerStore = useHybridViewerStore();
|
|
24
27
|
|
|
28
|
+
const referenceLineId = computed<string | undefined>(() =>
|
|
29
|
+
collections ? targetLineIds[0] : undefined,
|
|
30
|
+
);
|
|
31
|
+
|
|
25
32
|
// Visibility
|
|
26
|
-
const linesVisibility = computed({
|
|
27
|
-
get: () =>
|
|
33
|
+
const linesVisibility = computed<boolean>({
|
|
34
|
+
get: () =>
|
|
35
|
+
collections
|
|
36
|
+
? targetLineIds.every((id) => dataStyleStore.modelLineVisibility(modelId, id))
|
|
37
|
+
: dataStyleStore.modelComponentTypeVisibility(modelId, "Line"),
|
|
28
38
|
set: async (newValue) => {
|
|
29
39
|
await dataStyleStore.setModelLinesVisibility(modelId, targetLineIds, newValue);
|
|
30
40
|
hybridViewerStore.remoteRender();
|
|
31
41
|
},
|
|
32
42
|
});
|
|
33
43
|
|
|
34
|
-
const lineVisibility = computed({
|
|
44
|
+
const lineVisibility = computed<boolean | undefined>({
|
|
35
45
|
get: () => dataStyleStore.modelLineVisibility(modelId, lineId) as boolean | undefined,
|
|
36
46
|
set: async (newValue) => {
|
|
37
47
|
if (lineId === undefined) {
|
|
@@ -44,7 +54,7 @@ const lineVisibility = computed({
|
|
|
44
54
|
|
|
45
55
|
// Color
|
|
46
56
|
const linesColor = computed<RGBAColor | undefined>({
|
|
47
|
-
get: () => dataStyleStore.
|
|
57
|
+
get: () => dataStyleStore.modelLineColor(modelId, referenceLineId.value) as RGBAColor | undefined,
|
|
48
58
|
set: async (color) => {
|
|
49
59
|
await dataStyleStore.setModelLinesColor(modelId, targetLineIds, color);
|
|
50
60
|
hybridViewerStore.remoteRender();
|
|
@@ -64,12 +74,25 @@ const lineColor = computed<RGBAColor | undefined>({
|
|
|
64
74
|
|
|
65
75
|
const linesActiveColoring = computed<string | undefined>({
|
|
66
76
|
get: () =>
|
|
67
|
-
dataStyleStore.
|
|
77
|
+
dataStyleStore.modelLineActiveColoring(modelId, referenceLineId.value) as string | undefined,
|
|
68
78
|
set: async (coloringType) => {
|
|
69
79
|
if (typeof coloringType !== "string") {
|
|
70
80
|
return;
|
|
71
81
|
}
|
|
72
|
-
|
|
82
|
+
if (collections && coloringType === "random") {
|
|
83
|
+
await Promise.all(
|
|
84
|
+
collections.map((collection) =>
|
|
85
|
+
dataStyleStore.setModelLinesActiveColoring(
|
|
86
|
+
modelId,
|
|
87
|
+
collection.children.map((child) => child.id),
|
|
88
|
+
coloringType,
|
|
89
|
+
collection.id,
|
|
90
|
+
),
|
|
91
|
+
),
|
|
92
|
+
);
|
|
93
|
+
} else {
|
|
94
|
+
await dataStyleStore.setModelLinesActiveColoring(modelId, targetLineIds, coloringType);
|
|
95
|
+
}
|
|
73
96
|
hybridViewerStore.remoteRender();
|
|
74
97
|
},
|
|
75
98
|
});
|
|
@@ -86,8 +109,8 @@ const lineActiveColoring = computed<string | undefined>({
|
|
|
86
109
|
});
|
|
87
110
|
|
|
88
111
|
// Group Attributes
|
|
89
|
-
const linesVertexAttributeName = computed({
|
|
90
|
-
get: () => dataStyleStore.modelLinesVertexAttributeName(modelId),
|
|
112
|
+
const linesVertexAttributeName = computed<string | undefined>({
|
|
113
|
+
get: () => dataStyleStore.modelLinesVertexAttributeName(modelId, referenceLineId.value),
|
|
91
114
|
set: async (newValue) => {
|
|
92
115
|
if (newValue === undefined) {
|
|
93
116
|
return;
|
|
@@ -97,16 +120,16 @@ const linesVertexAttributeName = computed({
|
|
|
97
120
|
},
|
|
98
121
|
});
|
|
99
122
|
|
|
100
|
-
const linesVertexAttributeItem = computed({
|
|
101
|
-
get: () => dataStyleStore.modelLinesVertexAttributeItem(modelId),
|
|
123
|
+
const linesVertexAttributeItem = computed<string | undefined>({
|
|
124
|
+
get: () => dataStyleStore.modelLinesVertexAttributeItem(modelId, referenceLineId.value),
|
|
102
125
|
set: async (newValue) => {
|
|
103
126
|
await dataStyleStore.setModelLinesVertexAttributeItem(modelId, targetLineIds, newValue);
|
|
104
127
|
hybridViewerStore.remoteRender();
|
|
105
128
|
},
|
|
106
129
|
});
|
|
107
130
|
|
|
108
|
-
const linesVertexAttributeRange = computed({
|
|
109
|
-
get: () => dataStyleStore.modelLinesVertexAttributeRange(modelId),
|
|
131
|
+
const linesVertexAttributeRange = computed<[number, number] | undefined>({
|
|
132
|
+
get: () => dataStyleStore.modelLinesVertexAttributeRange(modelId, referenceLineId.value),
|
|
110
133
|
set: async (newValue) => {
|
|
111
134
|
const [minimum, maximum] = newValue;
|
|
112
135
|
if (minimum === undefined || maximum === undefined) {
|
|
@@ -122,8 +145,8 @@ const linesVertexAttributeRange = computed({
|
|
|
122
145
|
},
|
|
123
146
|
});
|
|
124
147
|
|
|
125
|
-
const linesVertexAttributeColorMap = computed({
|
|
126
|
-
get: () => dataStyleStore.modelLinesVertexAttributeColorMap(modelId),
|
|
148
|
+
const linesVertexAttributeColorMap = computed<RGBAColorMap | undefined>({
|
|
149
|
+
get: () => dataStyleStore.modelLinesVertexAttributeColorMap(modelId, referenceLineId.value),
|
|
127
150
|
set: async (newValue) => {
|
|
128
151
|
await dataStyleStore.setModelLinesVertexAttributeColorMap(modelId, targetLineIds, newValue);
|
|
129
152
|
hybridViewerStore.remoteRender();
|
|
@@ -131,15 +154,18 @@ const linesVertexAttributeColorMap = computed({
|
|
|
131
154
|
});
|
|
132
155
|
|
|
133
156
|
const linesVertexAttributeNoDataColor = computed<RGBAColor | undefined>({
|
|
134
|
-
get: () =>
|
|
157
|
+
get: () =>
|
|
158
|
+
dataStyleStore.modelLinesVertexAttributeNoDataColor(modelId, referenceLineId.value) as
|
|
159
|
+
| RGBAColor
|
|
160
|
+
| undefined,
|
|
135
161
|
set: async (newValue) => {
|
|
136
162
|
await dataStyleStore.setModelLinesVertexAttributeNoDataColor(modelId, targetLineIds, newValue);
|
|
137
163
|
hybridViewerStore.remoteRender();
|
|
138
164
|
},
|
|
139
165
|
});
|
|
140
166
|
|
|
141
|
-
const linesEdgeAttributeName = computed({
|
|
142
|
-
get: () => dataStyleStore.modelLinesEdgeAttributeName(modelId),
|
|
167
|
+
const linesEdgeAttributeName = computed<string | undefined>({
|
|
168
|
+
get: () => dataStyleStore.modelLinesEdgeAttributeName(modelId, referenceLineId.value),
|
|
143
169
|
set: async (newValue) => {
|
|
144
170
|
if (newValue === undefined) {
|
|
145
171
|
return;
|
|
@@ -149,16 +175,16 @@ const linesEdgeAttributeName = computed({
|
|
|
149
175
|
},
|
|
150
176
|
});
|
|
151
177
|
|
|
152
|
-
const linesEdgeAttributeItem = computed({
|
|
153
|
-
get: () => dataStyleStore.modelLinesEdgeAttributeItem(modelId),
|
|
178
|
+
const linesEdgeAttributeItem = computed<string | undefined>({
|
|
179
|
+
get: () => dataStyleStore.modelLinesEdgeAttributeItem(modelId, referenceLineId.value),
|
|
154
180
|
set: async (newValue) => {
|
|
155
181
|
await dataStyleStore.setModelLinesEdgeAttributeItem(modelId, targetLineIds, newValue);
|
|
156
182
|
hybridViewerStore.remoteRender();
|
|
157
183
|
},
|
|
158
184
|
});
|
|
159
185
|
|
|
160
|
-
const linesEdgeAttributeRange = computed({
|
|
161
|
-
get: () => dataStyleStore.modelLinesEdgeAttributeRange(modelId),
|
|
186
|
+
const linesEdgeAttributeRange = computed<[number, number] | undefined>({
|
|
187
|
+
get: () => dataStyleStore.modelLinesEdgeAttributeRange(modelId, referenceLineId.value),
|
|
162
188
|
set: async (newValue) => {
|
|
163
189
|
const [minimum, maximum] = newValue;
|
|
164
190
|
if (minimum === undefined || maximum === undefined) {
|
|
@@ -169,8 +195,8 @@ const linesEdgeAttributeRange = computed({
|
|
|
169
195
|
},
|
|
170
196
|
});
|
|
171
197
|
|
|
172
|
-
const linesEdgeAttributeColorMap = computed({
|
|
173
|
-
get: () => dataStyleStore.modelLinesEdgeAttributeColorMap(modelId),
|
|
198
|
+
const linesEdgeAttributeColorMap = computed<Map<string, RGBAColor> | undefined>({
|
|
199
|
+
get: () => dataStyleStore.modelLinesEdgeAttributeColorMap(modelId, referenceLineId.value),
|
|
174
200
|
set: async (newValue) => {
|
|
175
201
|
await dataStyleStore.setModelLinesEdgeAttributeColorMap(modelId, targetLineIds, newValue);
|
|
176
202
|
hybridViewerStore.remoteRender();
|
|
@@ -178,7 +204,10 @@ const linesEdgeAttributeColorMap = computed({
|
|
|
178
204
|
});
|
|
179
205
|
|
|
180
206
|
const linesEdgeAttributeNoDataColor = computed<RGBAColor | undefined>({
|
|
181
|
-
get: () =>
|
|
207
|
+
get: () =>
|
|
208
|
+
dataStyleStore.modelLinesEdgeAttributeNoDataColor(modelId, referenceLineId.value) as
|
|
209
|
+
| RGBAColor
|
|
210
|
+
| undefined,
|
|
182
211
|
set: async (newValue) => {
|
|
183
212
|
await dataStyleStore.setModelLinesEdgeAttributeNoDataColor(modelId, targetLineIds, newValue);
|
|
184
213
|
hybridViewerStore.remoteRender();
|
|
@@ -186,7 +215,7 @@ const linesEdgeAttributeNoDataColor = computed<RGBAColor | undefined>({
|
|
|
186
215
|
});
|
|
187
216
|
|
|
188
217
|
// Individual Attributes
|
|
189
|
-
const vertexAttributeName = computed({
|
|
218
|
+
const vertexAttributeName = computed<string | undefined>({
|
|
190
219
|
get: () => dataStyleStore.modelLinesVertexAttributeName(modelId, lineId),
|
|
191
220
|
set: async (newValue) => {
|
|
192
221
|
if (lineId === undefined || newValue === undefined) {
|
|
@@ -197,7 +226,7 @@ const vertexAttributeName = computed({
|
|
|
197
226
|
},
|
|
198
227
|
});
|
|
199
228
|
|
|
200
|
-
const vertexAttributeItem = computed({
|
|
229
|
+
const vertexAttributeItem = computed<string | undefined>({
|
|
201
230
|
get: () => dataStyleStore.modelLinesVertexAttributeItem(modelId, lineId),
|
|
202
231
|
set: async (newValue) => {
|
|
203
232
|
if (lineId === undefined) {
|
|
@@ -208,7 +237,7 @@ const vertexAttributeItem = computed({
|
|
|
208
237
|
},
|
|
209
238
|
});
|
|
210
239
|
|
|
211
|
-
const vertexAttributeRange = computed({
|
|
240
|
+
const vertexAttributeRange = computed<[number, number] | undefined>({
|
|
212
241
|
get: () => dataStyleStore.modelLinesVertexAttributeRange(modelId, lineId),
|
|
213
242
|
set: async (newValue) => {
|
|
214
243
|
const [minimum, maximum] = newValue;
|
|
@@ -220,7 +249,7 @@ const vertexAttributeRange = computed({
|
|
|
220
249
|
},
|
|
221
250
|
});
|
|
222
251
|
|
|
223
|
-
const vertexAttributeColorMap = computed({
|
|
252
|
+
const vertexAttributeColorMap = computed<ColorMap | undefined>({
|
|
224
253
|
get: () => dataStyleStore.modelLinesVertexAttributeColorMap(modelId, lineId),
|
|
225
254
|
set: async (newValue) => {
|
|
226
255
|
if (lineId === undefined) {
|
|
@@ -243,7 +272,7 @@ const vertexAttributeNoDataColor = computed<RGBAColor | undefined>({
|
|
|
243
272
|
},
|
|
244
273
|
});
|
|
245
274
|
|
|
246
|
-
const edgeAttributeName = computed({
|
|
275
|
+
const edgeAttributeName = computed<string | undefined>({
|
|
247
276
|
get: () => dataStyleStore.modelLinesEdgeAttributeName(modelId, lineId),
|
|
248
277
|
set: async (newValue) => {
|
|
249
278
|
if (lineId === undefined || newValue === undefined) {
|
|
@@ -254,7 +283,7 @@ const edgeAttributeName = computed({
|
|
|
254
283
|
},
|
|
255
284
|
});
|
|
256
285
|
|
|
257
|
-
const edgeAttributeItem = computed({
|
|
286
|
+
const edgeAttributeItem = computed<string | undefined>({
|
|
258
287
|
get: () => dataStyleStore.modelLinesEdgeAttributeItem(modelId, lineId),
|
|
259
288
|
set: async (newValue) => {
|
|
260
289
|
if (lineId === undefined) {
|
|
@@ -265,7 +294,7 @@ const edgeAttributeItem = computed({
|
|
|
265
294
|
},
|
|
266
295
|
});
|
|
267
296
|
|
|
268
|
-
const edgeAttributeRange = computed({
|
|
297
|
+
const edgeAttributeRange = computed<[number, number] | undefined>({
|
|
269
298
|
get: () => dataStyleStore.modelLinesEdgeAttributeRange(modelId, lineId),
|
|
270
299
|
set: async (newValue) => {
|
|
271
300
|
const [minimum, maximum] = newValue;
|
|
@@ -277,7 +306,7 @@ const edgeAttributeRange = computed({
|
|
|
277
306
|
},
|
|
278
307
|
});
|
|
279
308
|
|
|
280
|
-
const edgeAttributeColorMap = computed({
|
|
309
|
+
const edgeAttributeColorMap = computed<Map<string, RGBAColor> | undefined>({
|
|
281
310
|
get: () => dataStyleStore.modelLinesEdgeAttributeColorMap(modelId, lineId),
|
|
282
311
|
set: async (newValue) => {
|
|
283
312
|
if (lineId === undefined) {
|
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import BlocksOptions from "./BlocksOptions.vue";
|
|
3
|
+
import type { CollectionComponent } from "@ogw_front/stores/data_helpers/collections";
|
|
4
|
+
import CornersOptions from "./CornersOptions.vue";
|
|
5
|
+
import LinesOptions from "./LinesOptions.vue";
|
|
6
|
+
import { MESH_COMPONENT_TYPES } from "@ogw_front/utils/default_styles";
|
|
4
7
|
import OptionsSection from "@ogw_front/components/Viewer/Options/OptionsSection.vue";
|
|
8
|
+
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
9
|
+
import SurfacesOptions from "./SurfacesOptions.vue";
|
|
5
10
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
6
11
|
import VisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
7
12
|
import { useDataStore } from "@ogw_front/stores/data";
|
|
8
13
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
9
14
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
10
15
|
import { useTreeviewStore } from "@ogw_front/stores/treeview";
|
|
11
|
-
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
12
|
-
|
|
13
|
-
import BlocksOptions from "./BlocksOptions.vue";
|
|
14
|
-
import CornersOptions from "./CornersOptions.vue";
|
|
15
|
-
import LinesOptions from "./LinesOptions.vue";
|
|
16
|
-
import SurfacesOptions from "./SurfacesOptions.vue";
|
|
17
16
|
|
|
18
17
|
const dataStyleStore = useDataStyleStore();
|
|
19
18
|
const hybridViewerStore = useHybridViewerStore();
|
|
20
19
|
const dataStore = useDataStore();
|
|
21
20
|
const treeviewStore = useTreeviewStore();
|
|
22
21
|
|
|
23
|
-
function getBatchComponentIds(currentId: string) {
|
|
22
|
+
function getBatchComponentIds(currentId: string): string[] {
|
|
24
23
|
const { activeItems } = treeviewStore;
|
|
25
24
|
if (activeItems.includes(currentId) && activeItems.length > 1) {
|
|
26
25
|
return activeItems;
|
|
@@ -29,15 +28,18 @@ function getBatchComponentIds(currentId: string) {
|
|
|
29
28
|
}
|
|
30
29
|
|
|
31
30
|
interface Props {
|
|
32
|
-
itemProps: Record<string,
|
|
31
|
+
itemProps: Record<string, unknown>;
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
const { itemProps } = defineProps<Props>();
|
|
36
35
|
|
|
37
|
-
const modelId = computed(() => itemProps.meta_data.modelId || itemProps.id);
|
|
38
|
-
const componentId = computed(() => itemProps.meta_data.pickedComponentId);
|
|
39
|
-
const selection = computed
|
|
36
|
+
const modelId = computed<string>(() => itemProps.meta_data.modelId || itemProps.id);
|
|
37
|
+
const componentId = computed<string | undefined>(() => itemProps.meta_data.pickedComponentId);
|
|
38
|
+
const selection = computed<string[]>(
|
|
39
|
+
() => dataStyleStore.visibleMeshComponents(modelId.value).value || [],
|
|
40
|
+
);
|
|
40
41
|
const componentType = ref<string | undefined>(undefined);
|
|
42
|
+
const collections = ref<CollectionComponent[] | undefined>(undefined);
|
|
41
43
|
|
|
42
44
|
watch(
|
|
43
45
|
() => [
|
|
@@ -48,8 +50,18 @@ watch(
|
|
|
48
50
|
],
|
|
49
51
|
async () => {
|
|
50
52
|
componentType.value = undefined;
|
|
53
|
+
collections.value = undefined;
|
|
51
54
|
if (itemProps.meta_data.viewer_type === "model_component_type") {
|
|
52
|
-
|
|
55
|
+
const { modelComponentType, targetComponentIds: ids } = itemProps.meta_data;
|
|
56
|
+
if (MESH_COMPONENT_TYPES.includes(modelComponentType)) {
|
|
57
|
+
componentType.value = modelComponentType;
|
|
58
|
+
} else {
|
|
59
|
+
const collectionsByType = await dataStore.fetchAllCollectionComponents(modelId.value);
|
|
60
|
+
collections.value = collectionsByType[modelComponentType].filter((collection) =>
|
|
61
|
+
collection.children.every((child) => ids.includes(child.id)),
|
|
62
|
+
);
|
|
63
|
+
componentType.value = collections.value[0].children[0].category;
|
|
64
|
+
}
|
|
53
65
|
} else if (componentId.value && modelId.value) {
|
|
54
66
|
const currentModelId = modelId.value;
|
|
55
67
|
const currentCompId = componentId.value;
|
|
@@ -87,7 +99,7 @@ watch(
|
|
|
87
99
|
{ immediate: true },
|
|
88
100
|
);
|
|
89
101
|
|
|
90
|
-
const modelVisibility = computed({
|
|
102
|
+
const modelVisibility = computed<boolean | undefined>({
|
|
91
103
|
get: () => dataStyleStore.modelVisibility(modelId.value),
|
|
92
104
|
set: async (newValue) => {
|
|
93
105
|
if (newValue === undefined) {
|
|
@@ -156,24 +168,28 @@ const modelComponentsActiveColoring = computed<string | undefined>({
|
|
|
156
168
|
:modelId="modelId"
|
|
157
169
|
:blockId="componentId"
|
|
158
170
|
:targetBlockIds="targetComponentIds"
|
|
171
|
+
:collections="collections"
|
|
159
172
|
/>
|
|
160
173
|
<SurfacesOptions
|
|
161
174
|
v-else-if="componentType === 'Surface'"
|
|
162
175
|
:modelId="modelId"
|
|
163
176
|
:surfaceId="componentId"
|
|
164
177
|
:targetSurfaceIds="targetComponentIds"
|
|
178
|
+
:collections="collections"
|
|
165
179
|
/>
|
|
166
180
|
<LinesOptions
|
|
167
181
|
v-else-if="componentType === 'Line'"
|
|
168
182
|
:modelId="modelId"
|
|
169
183
|
:lineId="componentId"
|
|
170
184
|
:targetLineIds="targetComponentIds"
|
|
185
|
+
:collections="collections"
|
|
171
186
|
/>
|
|
172
187
|
<CornersOptions
|
|
173
188
|
v-else-if="componentType === 'Corner'"
|
|
174
189
|
:modelId="modelId"
|
|
175
190
|
:cornerId="componentId"
|
|
176
191
|
:targetCornerIds="targetComponentIds"
|
|
192
|
+
:collections="collections"
|
|
177
193
|
/>
|
|
178
194
|
</v-sheet>
|
|
179
195
|
</template>
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import ModelColor from "@ogw_front/assets/viewer_svgs/model_component_color.svg";
|
|
3
|
-
import ModelStyleCard from "./ModelStyleCard.vue";
|
|
4
|
-
// oxlint-disable import/consistent-type-specifier-style -- combining the default import with the type import avoids a duplicate-imports violation on this same module; using disable-next-line here is fragile because a formatter can re-wrap the import onto multiple lines and shift the flagged line
|
|
5
2
|
import ViewerContextMenuItem, {
|
|
6
3
|
type ItemProps,
|
|
7
4
|
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
5
|
+
import ModelColor from "@ogw_front/assets/viewer_svgs/model_component_color.svg";
|
|
6
|
+
import ModelStyleCard from "./ModelStyleCard.vue";
|
|
8
7
|
|
|
9
8
|
interface Props {
|
|
10
9
|
itemProps: ItemProps & { index: number };
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import SurfacePoints from "@ogw_front/assets/viewer_svgs/surface_points.svg";
|
|
3
|
-
// oxlint-disable import/consistent-type-specifier-style -- combining the default import with the type import avoids a duplicate-imports violation on this same module; using disable-next-line here is fragile because a formatter can re-wrap the import onto multiple lines and shift the flagged line
|
|
4
2
|
import ViewerContextMenuItem, {
|
|
5
3
|
type ItemProps,
|
|
6
4
|
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
5
|
+
import SurfacePoints from "@ogw_front/assets/viewer_svgs/surface_points.svg";
|
|
7
6
|
import ViewerOptionsSizeSlider from "@ogw_front/components/Viewer/Options/Sliders/Size.vue";
|
|
8
7
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
9
|
-
|
|
10
8
|
import { useBatchStyle } from "@ogw_front/composables/batch_style";
|
|
11
9
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
12
10
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
@@ -21,9 +19,11 @@ interface Props {
|
|
|
21
19
|
|
|
22
20
|
const { itemProps } = defineProps<Props>();
|
|
23
21
|
|
|
24
|
-
const id = computed(
|
|
22
|
+
const id = computed<string>(
|
|
23
|
+
() => (itemProps.meta_data.modelId as string | undefined) || itemProps.id,
|
|
24
|
+
);
|
|
25
25
|
|
|
26
|
-
const visibility = computed({
|
|
26
|
+
const visibility = computed<boolean>({
|
|
27
27
|
get: () => dataStyleStore.modelPointsVisibility(id.value),
|
|
28
28
|
set: async (newValue) => {
|
|
29
29
|
await applyBatchStyle(id.value, (targetId: string) =>
|
|
@@ -32,7 +32,7 @@ const visibility = computed({
|
|
|
32
32
|
hybridViewerStore.remoteRender();
|
|
33
33
|
},
|
|
34
34
|
});
|
|
35
|
-
const size = computed({
|
|
35
|
+
const size = computed<number>({
|
|
36
36
|
get: () => dataStyleStore.modelPointsSize(id.value),
|
|
37
37
|
set: async (newValue) => {
|
|
38
38
|
await applyBatchStyle(id.value, (targetId: string) =>
|