@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,276 +0,0 @@
|
|
|
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 { sortAndFormatItems, useTreeFilter } from "@ogw_front/composables/tree_filter";
|
|
5
|
-
import CommonTreeView from "@ogw_front/components/Viewer/ObjectTree/Base/CommonTreeView.vue";
|
|
6
|
-
import FetchingData from "@ogw_front/components/FetchingData.vue";
|
|
7
|
-
import ObjectTreeControls from "@ogw_front/components/Viewer/ObjectTree/Base/Controls.vue";
|
|
8
|
-
import ObjectTreeItemLabel from "@ogw_front/components/Viewer/ObjectTree/Base/ItemLabel.vue";
|
|
9
|
-
import type { DisplayItem } from "@ogw_front/composables/virtual_tree";
|
|
10
|
-
import { useHoverhighlight } from "@ogw_front/composables/hover_highlight";
|
|
11
|
-
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
12
|
-
import { useModelComponents } from "@ogw_front/composables/model_components";
|
|
13
|
-
import { useTreeviewStore } from "@ogw_front/stores/treeview";
|
|
14
|
-
|
|
15
|
-
interface Props {
|
|
16
|
-
id: string;
|
|
17
|
-
viewId?: string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const { id, viewId = undefined } = defineProps<Props>();
|
|
21
|
-
const actualViewId = viewId || id;
|
|
22
|
-
|
|
23
|
-
interface TreeViewItem {
|
|
24
|
-
raw?: TreeViewItem;
|
|
25
|
-
id: string;
|
|
26
|
-
category?: string;
|
|
27
|
-
children?: TreeViewItem[];
|
|
28
|
-
viewer_id?: string;
|
|
29
|
-
title?: string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const { onHoverEnter, onHoverLeave } = useHoverhighlight();
|
|
33
|
-
const hybridViewerStore = useHybridViewerStore();
|
|
34
|
-
const emit = defineEmits<{
|
|
35
|
-
"show-menu": [
|
|
36
|
-
payload: {
|
|
37
|
-
event: unknown;
|
|
38
|
-
itemId: string;
|
|
39
|
-
context_type: "model_component" | "model_component_type";
|
|
40
|
-
modelId: string;
|
|
41
|
-
modelComponentType?: string;
|
|
42
|
-
targetComponentIds?: string[];
|
|
43
|
-
},
|
|
44
|
-
];
|
|
45
|
-
}>();
|
|
46
|
-
|
|
47
|
-
const treeviewStore = useTreeviewStore();
|
|
48
|
-
const {
|
|
49
|
-
items: rawItems,
|
|
50
|
-
componentsCache,
|
|
51
|
-
localCategories,
|
|
52
|
-
selection: visibleComponents,
|
|
53
|
-
updateVisibility,
|
|
54
|
-
} = useModelComponents(id);
|
|
55
|
-
|
|
56
|
-
const currentView = computed(() =>
|
|
57
|
-
treeviewStore.opened_views.find((view) => view.id === actualViewId),
|
|
58
|
-
);
|
|
59
|
-
|
|
60
|
-
const opened = computed({
|
|
61
|
-
get: () => currentView.value?.opened || [],
|
|
62
|
-
set: (val) => treeviewStore.setOpened(actualViewId, val),
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
const {
|
|
66
|
-
search,
|
|
67
|
-
sortType,
|
|
68
|
-
filterOptions,
|
|
69
|
-
processedItems: filteredCategories,
|
|
70
|
-
availableFilterOptions,
|
|
71
|
-
toggleSort,
|
|
72
|
-
customFilter,
|
|
73
|
-
applySearchFilter,
|
|
74
|
-
} = useTreeFilter(localCategories);
|
|
75
|
-
|
|
76
|
-
function onUpdateSelection(newSelection: string[]) {
|
|
77
|
-
const finalSelection = applySearchFilter(newSelection, visibleComponents.value);
|
|
78
|
-
updateVisibility(finalSelection as string[]);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
const visibleSelection = computed(() => applySearchFilter(visibleComponents.value, []));
|
|
82
|
-
|
|
83
|
-
const itemsForTreeView = computed<TreeViewItem[]>(() => {
|
|
84
|
-
if (search.value && componentsCache.value) {
|
|
85
|
-
const query = search.value.toLowerCase();
|
|
86
|
-
const result: TreeViewItem[] = [];
|
|
87
|
-
for (const type of Object.keys(componentsCache.value)) {
|
|
88
|
-
const matches = (componentsCache.value[type] ?? []).filter(
|
|
89
|
-
(component: { title: string; id: string }) =>
|
|
90
|
-
component.title.toLowerCase().includes(query) ||
|
|
91
|
-
component.id.toLowerCase().includes(query),
|
|
92
|
-
);
|
|
93
|
-
if (matches.length > 0) {
|
|
94
|
-
result.push({
|
|
95
|
-
id: type,
|
|
96
|
-
title: `${type}s (${matches.length})`,
|
|
97
|
-
children: sortAndFormatItems(matches, sortType.value) as unknown as TreeViewItem[],
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
return result;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
const result: TreeViewItem[] = [];
|
|
105
|
-
for (const category of filteredCategories.value) {
|
|
106
|
-
const categoryId = category.id as string;
|
|
107
|
-
result.push({
|
|
108
|
-
...category,
|
|
109
|
-
id: categoryId,
|
|
110
|
-
children: sortAndFormatItems(
|
|
111
|
-
componentsCache.value?.[categoryId],
|
|
112
|
-
sortType.value,
|
|
113
|
-
) as unknown as TreeViewItem[],
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
return result;
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
function showContextMenu(event: unknown, item: TreeViewItem) {
|
|
120
|
-
const actualItem = item.raw || item;
|
|
121
|
-
const typeId = actualItem.category || actualItem.id;
|
|
122
|
-
const typeItem = itemsForTreeView.value.find((type) => type.id === typeId);
|
|
123
|
-
const targetComponentIds = typeItem
|
|
124
|
-
? (typeItem.children ?? []).map((child) => child.id)
|
|
125
|
-
: undefined;
|
|
126
|
-
emit("show-menu", {
|
|
127
|
-
event,
|
|
128
|
-
itemId: actualItem.category ? actualItem.id : id,
|
|
129
|
-
context_type: actualItem.category ? "model_component" : "model_component_type",
|
|
130
|
-
modelId: id,
|
|
131
|
-
modelComponentType: actualItem.category ? undefined : actualItem.id,
|
|
132
|
-
targetComponentIds,
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
function handleHoverEnter({
|
|
137
|
-
item,
|
|
138
|
-
immediate = false,
|
|
139
|
-
}: {
|
|
140
|
-
item: TreeViewItem;
|
|
141
|
-
immediate?: boolean;
|
|
142
|
-
}) {
|
|
143
|
-
const actualItem = item.raw || item;
|
|
144
|
-
|
|
145
|
-
if (!actualItem.category && (!actualItem.children || actualItem.children.length === 0)) {
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
onHoverEnter(
|
|
150
|
-
id,
|
|
151
|
-
() =>
|
|
152
|
-
actualItem.category
|
|
153
|
-
? [Number(actualItem.viewer_id)]
|
|
154
|
-
: (actualItem.children ?? []).map((child) => Number(child.viewer_id)),
|
|
155
|
-
"model",
|
|
156
|
-
immediate,
|
|
157
|
-
);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
function handleHoverLeave() {
|
|
161
|
-
onHoverLeave(id);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
// CommonTreeView's #title/#append slots hand back the generic tree item it renders internally (a TreeItem); this view's tree is always built from TreeViewItem nodes (see itemsForTreeView above), so it's safe to view the slot item through that lens here.
|
|
165
|
-
function asTreeViewItem(item: unknown): TreeViewItem {
|
|
166
|
-
return item as unknown as TreeViewItem;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
// The focusCameraOnObject composable's block_ids parameter is declared as string[], but this view (like the sibling ModelCollections view) has always focused the camera using the raw viewer_id values collected here; that pre-dates this typing pass, so the ids are passed through as-is rather than changed here.
|
|
170
|
-
function getFocusBlockIds(item: TreeViewItem): string[] {
|
|
171
|
-
const ids = item.category
|
|
172
|
-
? [item.viewer_id]
|
|
173
|
-
: (item.children ?? []).map((child) => child.viewer_id);
|
|
174
|
-
return ids as unknown as string[];
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
function expandAll() {
|
|
178
|
-
const allIds: string[] = [];
|
|
179
|
-
function traverse(itemsList: TreeViewItem[]) {
|
|
180
|
-
for (const item of itemsList) {
|
|
181
|
-
if (item.children && item.children.length > 0) {
|
|
182
|
-
allIds.push(item.id);
|
|
183
|
-
traverse(item.children);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
traverse(itemsForTreeView.value);
|
|
188
|
-
opened.value = allIds;
|
|
189
|
-
}
|
|
190
|
-
</script>
|
|
191
|
-
|
|
192
|
-
<template>
|
|
193
|
-
<div class="tree-view-container">
|
|
194
|
-
<ObjectTreeControls
|
|
195
|
-
v-model:search="search"
|
|
196
|
-
:sort-type="sortType"
|
|
197
|
-
:filter-options="filterOptions"
|
|
198
|
-
:available-filter-options="availableFilterOptions"
|
|
199
|
-
:is-collapsed="opened.length === 0"
|
|
200
|
-
@toggle-sort="toggleSort"
|
|
201
|
-
@collapse-all="opened = []"
|
|
202
|
-
@expand-all="expandAll"
|
|
203
|
-
/>
|
|
204
|
-
|
|
205
|
-
<FetchingData v-if="rawItems === undefined" :size="48" :width="4" text="" />
|
|
206
|
-
|
|
207
|
-
<CommonTreeView
|
|
208
|
-
:selected="visibleSelection"
|
|
209
|
-
v-model:opened="opened"
|
|
210
|
-
v-model:active="treeviewStore.activeItems"
|
|
211
|
-
:items="itemsForTreeView"
|
|
212
|
-
:options="{
|
|
213
|
-
selection: { selectable: true, strategy: 'classic' },
|
|
214
|
-
search,
|
|
215
|
-
customFilter,
|
|
216
|
-
}"
|
|
217
|
-
:scroll-top="currentView?.scrollTop || 0"
|
|
218
|
-
class="transparent-treeview virtual-tree-height"
|
|
219
|
-
@update:selected="(val) => onUpdateSelection(val as string[])"
|
|
220
|
-
@click:item="onUpdateSelection([$event.id as string, ...visibleComponents])"
|
|
221
|
-
@update:scroll-top="treeviewStore.setScrollTop(actualViewId, $event)"
|
|
222
|
-
@hover:enter="({ item }) => handleHoverEnter({ item: item as unknown as TreeViewItem })"
|
|
223
|
-
@hover:leave="handleHoverLeave"
|
|
224
|
-
@contextmenu="showContextMenu($event.event, $event.item as unknown as TreeViewItem)"
|
|
225
|
-
>
|
|
226
|
-
<template #title="{ item, isLeaf }">
|
|
227
|
-
<ObjectTreeItemLabel
|
|
228
|
-
:item="item as unknown as DisplayItem"
|
|
229
|
-
:is-leaf="isLeaf"
|
|
230
|
-
show-tooltip
|
|
231
|
-
class="text-body-1"
|
|
232
|
-
@contextmenu="showContextMenu($event, item as unknown as TreeViewItem)"
|
|
233
|
-
/>
|
|
234
|
-
</template>
|
|
235
|
-
|
|
236
|
-
<template #append="{ item: rawItem }">
|
|
237
|
-
<v-btn
|
|
238
|
-
v-if="
|
|
239
|
-
asTreeViewItem(rawItem).category ||
|
|
240
|
-
(asTreeViewItem(rawItem).children && asTreeViewItem(rawItem).children!.length > 0)
|
|
241
|
-
"
|
|
242
|
-
icon="mdi-target"
|
|
243
|
-
size="medium"
|
|
244
|
-
variant="text"
|
|
245
|
-
v-tooltip="'Focus camera on object'"
|
|
246
|
-
@click.stop="
|
|
247
|
-
hybridViewerStore.focusCameraOnObject(id, getFocusBlockIds(asTreeViewItem(rawItem)))
|
|
248
|
-
"
|
|
249
|
-
/>
|
|
250
|
-
</template>
|
|
251
|
-
</CommonTreeView>
|
|
252
|
-
</div>
|
|
253
|
-
</template>
|
|
254
|
-
|
|
255
|
-
<style scoped>
|
|
256
|
-
.tree-view-container {
|
|
257
|
-
height: 100%;
|
|
258
|
-
display: flex;
|
|
259
|
-
flex-direction: column;
|
|
260
|
-
overflow: hidden;
|
|
261
|
-
min-height: 0;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
.virtual-tree-height {
|
|
265
|
-
flex-grow: 1;
|
|
266
|
-
min-height: 0;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
.transparent-treeview {
|
|
270
|
-
background-color: transparent;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
:deep(.v-list-item__overlay) {
|
|
274
|
-
display: none !important;
|
|
275
|
-
}
|
|
276
|
-
</style>
|
package/server/types/vendor.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
// Minimal ambient typings for third-party packages used under server/ that ship no types of their own and have no @types/* package installed. Only the members this codebase actually uses are declared.
|
|
2
|
-
// This file declares ambient types for two separate untyped packages (`ws` and `busboy`); splitting it in two would just be file-count churn for a couple of small, always-imported-together vendor shims. Its short identifiers (`on`, `id`, ...) mirror the real, external APIs they type - renaming them here wouldn't change the names real callers already use.
|
|
3
|
-
// oxlint-disable eslint/max-classes-per-file, eslint/id-length
|
|
4
|
-
|
|
5
|
-
declare module "ws" {
|
|
6
|
-
type RawData = string | Buffer | ArrayBuffer | Buffer[];
|
|
7
|
-
|
|
8
|
-
class WebSocket {
|
|
9
|
-
static readonly CONNECTING: number;
|
|
10
|
-
static readonly OPEN: number;
|
|
11
|
-
static readonly CLOSING: number;
|
|
12
|
-
static readonly CLOSED: number;
|
|
13
|
-
|
|
14
|
-
constructor(address: string);
|
|
15
|
-
|
|
16
|
-
readyState: number;
|
|
17
|
-
|
|
18
|
-
on(event: "open", listener: () => void): this;
|
|
19
|
-
on(event: "message", listener: (data: RawData) => void): this;
|
|
20
|
-
on(event: "close", listener: (code?: number, reason?: Buffer) => void): this;
|
|
21
|
-
on(event: "error", listener: (error: Error) => void): this;
|
|
22
|
-
once(event: string, listener: (...args: unknown[]) => void): this;
|
|
23
|
-
|
|
24
|
-
send(data: string): void;
|
|
25
|
-
close(): void;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export { WebSocket };
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
declare module "busboy" {
|
|
32
|
-
import type { Readable, Writable } from "node:stream";
|
|
33
|
-
|
|
34
|
-
interface BusboyFileInfo {
|
|
35
|
-
filename: string;
|
|
36
|
-
encoding: string;
|
|
37
|
-
mimeType: string;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
interface BusboyConfig {
|
|
41
|
-
headers: Record<string, string | string[] | undefined>;
|
|
42
|
-
limits?: {
|
|
43
|
-
fileSize?: number;
|
|
44
|
-
files?: number;
|
|
45
|
-
[key: string]: number | undefined;
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
class Busboy extends Writable {
|
|
50
|
-
on(event: "field", listener: (name: string, value: string) => void): this;
|
|
51
|
-
on(
|
|
52
|
-
event: "file",
|
|
53
|
-
listener: (fieldname: string, fileStream: Readable, info: BusboyFileInfo) => void,
|
|
54
|
-
): this;
|
|
55
|
-
on(event: "filesLimit", listener: () => void): this;
|
|
56
|
-
on(event: "partsLimit", listener: () => void): this;
|
|
57
|
-
on(event: "finish", listener: () => void): this;
|
|
58
|
-
on(event: "close", listener: () => void): this;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function busboy(config: BusboyConfig): Busboy;
|
|
62
|
-
|
|
63
|
-
export = busboy;
|
|
64
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { createServerWsRpcClient } from "./ws_client.js";
|
|
2
|
-
//#region server/utils/server_config.ts
|
|
3
|
-
const storage = /* @__PURE__ */ new Map();
|
|
4
|
-
function getAppBaseUrl() {
|
|
5
|
-
return storage.get("APP_BASE_URL");
|
|
6
|
-
}
|
|
7
|
-
function setAppBaseUrl(baseUrl) {
|
|
8
|
-
return storage.set("APP_BASE_URL", baseUrl);
|
|
9
|
-
}
|
|
10
|
-
function getBackBaseUrl() {
|
|
11
|
-
return storage.get("BACK_BASE_URL");
|
|
12
|
-
}
|
|
13
|
-
function setBackBaseUrl(baseUrl) {
|
|
14
|
-
return storage.set("BACK_BASE_URL", baseUrl);
|
|
15
|
-
}
|
|
16
|
-
function getViewerBaseUrl() {
|
|
17
|
-
return storage.get("VIEWER_BASE_URL");
|
|
18
|
-
}
|
|
19
|
-
function setViewerBaseUrl(baseUrl) {
|
|
20
|
-
return storage.set("VIEWER_BASE_URL", baseUrl);
|
|
21
|
-
}
|
|
22
|
-
function getIsAppReady() {
|
|
23
|
-
return storage.get("IS_APP_READY") ?? false;
|
|
24
|
-
}
|
|
25
|
-
function setIsAppReady(isAppReady) {
|
|
26
|
-
return storage.set("IS_APP_READY", isAppReady);
|
|
27
|
-
}
|
|
28
|
-
async function setViewerWebSocketClient(baseUrl) {
|
|
29
|
-
const client = createServerWsRpcClient(baseUrl);
|
|
30
|
-
client.onConnectionClose(() => {
|
|
31
|
-
if (storage.get("VIEWER_CLIENT") === client) storage.delete("VIEWER_CLIENT");
|
|
32
|
-
});
|
|
33
|
-
await client.ready;
|
|
34
|
-
storage.set("VIEWER_CLIENT", client);
|
|
35
|
-
return client;
|
|
36
|
-
}
|
|
37
|
-
async function getViewerWebSocketClient() {
|
|
38
|
-
const viewerClient = storage.get("VIEWER_CLIENT") ?? void 0;
|
|
39
|
-
if (viewerClient?.isOpen()) return viewerClient;
|
|
40
|
-
return setViewerWebSocketClient(await getViewerBaseUrl());
|
|
41
|
-
}
|
|
42
|
-
//#endregion
|
|
43
|
-
export { getAppBaseUrl, getBackBaseUrl, getIsAppReady, getViewerBaseUrl, getViewerWebSocketClient, setAppBaseUrl, setBackBaseUrl, setIsAppReady, setViewerBaseUrl, setViewerWebSocketClient };
|
package/shared/utils/call_raw.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import pTimeout from "p-timeout";
|
|
2
|
-
//#region shared/utils/call_raw.ts
|
|
3
|
-
function callClient({ rpc, params = {}, client }) {
|
|
4
|
-
if (globalThis.window !== void 0) return client.getConnection().getSession().call(rpc, [params]);
|
|
5
|
-
return client.call(rpc, params);
|
|
6
|
-
}
|
|
7
|
-
function callRaw({ rpc, params = {}, client, timeout }, { request_error_function, response_function, response_error_function } = {}) {
|
|
8
|
-
async function performCall() {
|
|
9
|
-
try {
|
|
10
|
-
const response = await callClient({
|
|
11
|
-
rpc,
|
|
12
|
-
params,
|
|
13
|
-
client
|
|
14
|
-
});
|
|
15
|
-
if (response_function) await response_function(response);
|
|
16
|
-
return response;
|
|
17
|
-
} catch (error) {
|
|
18
|
-
if (request_error_function) request_error_function(error);
|
|
19
|
-
if (response_error_function) response_error_function(error);
|
|
20
|
-
throw error;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
if (timeout && timeout > 0) return pTimeout(performCall(), {
|
|
24
|
-
milliseconds: timeout,
|
|
25
|
-
message: `${rpc}: Timed out after ${timeout}ms`
|
|
26
|
-
});
|
|
27
|
-
return performCall();
|
|
28
|
-
}
|
|
29
|
-
//#endregion
|
|
30
|
-
export { callRaw };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { hasBody } from "./file.js";
|
|
2
|
-
import pTimeout from "p-timeout";
|
|
3
|
-
import { $fetch } from "ofetch";
|
|
4
|
-
import _ from "lodash";
|
|
5
|
-
//#region shared/utils/fetch_raw.ts
|
|
6
|
-
function fetchRaw({ route, method, params = {}, baseURL, headers = {}, max_retry, timeout, expectEvent = false }, { request_error_function, response_function, response_error_function } = {}) {
|
|
7
|
-
if (expectEvent) {
|
|
8
|
-
const value = "text/event-stream";
|
|
9
|
-
if (_.isEmpty(headers)) headers["Accept"] = value;
|
|
10
|
-
else headers["Accept"] = `${headers["Accept"]}, ${value}`;
|
|
11
|
-
}
|
|
12
|
-
const request_options = {
|
|
13
|
-
method,
|
|
14
|
-
headers
|
|
15
|
-
};
|
|
16
|
-
if (hasBody(params)) request_options.body = params;
|
|
17
|
-
if (max_retry) request_options.max_retry = max_retry;
|
|
18
|
-
function doFetch() {
|
|
19
|
-
return $fetch(route, {
|
|
20
|
-
baseURL,
|
|
21
|
-
...request_options,
|
|
22
|
-
onRequestError({ error }) {
|
|
23
|
-
if (request_error_function) request_error_function(error);
|
|
24
|
-
},
|
|
25
|
-
onResponse({ response }) {
|
|
26
|
-
if (response.ok && response_function) response_function(response._data);
|
|
27
|
-
},
|
|
28
|
-
onResponseError({ response }) {
|
|
29
|
-
if (response_error_function) response_error_function(response);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
if (timeout && timeout > 0) return pTimeout(doFetch(), {
|
|
34
|
-
milliseconds: timeout,
|
|
35
|
-
message: `${route}: Timed out after ${timeout}ms`
|
|
36
|
-
});
|
|
37
|
-
return doFetch();
|
|
38
|
-
}
|
|
39
|
-
//#endregion
|
|
40
|
-
export { fetchRaw };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|