Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
605164a
fix(types): define geode_id once as GeodeId and GeodeIdentified
JulienChampagnol Nov 5, 2026
5ec41b7
fix(types): define the data id of the data rows once as DataIdentified
JulienChampagnol Nov 6, 2026
3461e37
fix(types): define geode_object_type once as GeodeObjectType and Geod…
JulienChampagnol Nov 6, 2026
77faaff
fix(types): define viewer_type once as ViewerType and ViewerTyped
JulienChampagnol Nov 6, 2026
781be8f
fix(types): define AttributeStoredConfig once
JulienChampagnol Nov 6, 2026
deda62f
fix(types): define AttributeState once
JulienChampagnol Nov 6, 2026
239009b
fix(types): define ValidAttributeInput once
JulienChampagnol Nov 6, 2026
619cfe2
fix(types): define AttributeInput once
JulienChampagnol Nov 6, 2026
d22ee27
fix(types): make AttributeGroup extend ValidAttributeInput
JulienChampagnol Nov 6, 2026
00374bf
fix(types): define Texture once
JulienChampagnol Nov 6, 2026
ccd38e5
fix(types): define AttributeInfo once
JulienChampagnol Nov 6, 2026
f425a76
fix(types): define ModelComponentRelationRecord once
JulienChampagnol Nov 6, 2026
d601f81
fix(types): use the ModelComponentRecord of the model components in t…
JulienChampagnol Nov 6, 2026
0a16fc1
fix(types): define ScrollInfo once
JulienChampagnol Nov 6, 2026
cb64412
fix(types): define FetchErrorLike once
JulienChampagnol Nov 6, 2026
3bb5cc0
fix(types): use ProposedItem for the intermediate items of the picker
JulienChampagnol Nov 6, 2026
d6b0462
fix(types): compose the fetch options from FetchRequest
JulienChampagnol Nov 6, 2026
88a0799
fix(types): make EdgedCurveStyle extend PointSetStyle
JulienChampagnol Nov 6, 2026
7967d34
fix(types): make Grid2dStyle extend EdgedCurveStyle
JulienChampagnol Nov 6, 2026
9253c25
fix(types): make Grid3dStyle extend Grid2dStyle
JulienChampagnol Nov 6, 2026
13b2d17
fix(types): make SurfaceStyle extend EdgedCurveStyle
JulienChampagnol Nov 6, 2026
612628d
fix(types): make SolidStyle extend SurfaceStyle
JulienChampagnol Nov 6, 2026
a34f318
fix(types): make ModelWithBlocksStyle extend ModelWithoutBlocksStyle
JulienChampagnol Nov 6, 2026
4c471f2
fix(types): define ComponentColoring once
JulienChampagnol Nov 6, 2026
05fc7df
fix(types): make TreeviewChild extend TreeNode
JulienChampagnol Nov 6, 2026
80fc326
fix(types): define TreeviewGroup from TreeGroup
JulienChampagnol Nov 6, 2026
bb2dd2d
fix(types): define FormattedComponentGroup from ReadonlyTreeGroup
JulienChampagnol Nov 6, 2026
97e7cbe
fix(types): define CollectionComponentGroup from ReadonlyTreeGroup
JulienChampagnol Nov 6, 2026
4de35ea
fix(types): define BasemapTreeGroup from TreeGroup
JulienChampagnol Nov 6, 2026
707f39c
fix(types): type modelId and meshId as DataId
JulienChampagnol Nov 5, 2026
eb52983
fix(types): name the data id parameters of the stores dataId
JulienChampagnol Nov 6, 2026
8b53850
fix(types): name the data id parameters of the viewer scene dataId
JulienChampagnol Nov 6, 2026
b3bfe34
fix(types): name the data id of the mesh time step callback meshId
JulienChampagnol Nov 6, 2026
1ac2935
fix(types): name the data id parameters of the composables and utils …
JulienChampagnol Nov 6, 2026
4d19803
fix(types): name the data id prop of the coloring and attribute compo…
JulienChampagnol Nov 6, 2026
4b0450d
fix(types): name the data id of the mesh options components dataId
JulienChampagnol Nov 6, 2026
e6f42b6
fix(types): name the data id of the clipping, factor and threshold fi…
JulienChampagnol Nov 6, 2026
db9795a
fix(types): name the data id of the picker and time series items data_id
JulienChampagnol Nov 6, 2026
23173bf
fix(types): name the viewer and geode object types of the menu lookups
JulienChampagnol Nov 6, 2026
3dc94de
fix(style): share isAttributeValid between the attribute styles
JulienChampagnol Nov 6, 2026
a64c4c6
fix(style): share defaultAttributeStoredConfig between the attribute …
JulienChampagnol Nov 6, 2026
efb9dc0
fix(types): type the ids of the model components as ModelComponentId
JulienChampagnol Nov 6, 2026
f07f74f
fix(types): define once that a modelId is a DataId with ModelIdentified
JulienChampagnol Nov 6, 2026
d0ffa2a
fix(types): define once that a modelId is a ModelId
JulienChampagnol Nov 6, 2026
b4818e5
fix(types): define once that a meshId is a MeshId
JulienChampagnol Nov 6, 2026
0a4385c
fix(types): define once that a cornerId is a CornerId
JulienChampagnol Nov 6, 2026
74786e7
fix(types): define once that a lineId is a LineId
JulienChampagnol Nov 6, 2026
41cf9ed
fix(types): define once that a surfaceId is a SurfaceId
JulienChampagnol Nov 6, 2026
7a93b2c
fix(types): define once that a blockId is a BlockId
JulienChampagnol Nov 6, 2026
ebd5443
fix(types): name the data id of the mesh style callbacks meshId
JulienChampagnol Nov 6, 2026
24a6b11
fix(types): type the geode object types of the selectors as GeodeObje…
JulienChampagnol Nov 6, 2026
7bd56ce
fix(types): define Visibility once
JulienChampagnol Nov 6, 2026
76a744b
fix(types): define Width once
JulienChampagnol Nov 6, 2026
42bc3ca
fix(types): define Size once
JulienChampagnol Nov 6, 2026
143d4a2
fix(types): define Opacity once
JulienChampagnol Nov 6, 2026
0c94862
fix(types): define AttributeName once
JulienChampagnol Nov 6, 2026
355486a
fix(types): define AttributeItem once
JulienChampagnol Nov 6, 2026
ad06562
fix(types): define ValidAttributeRange once and free the AttributeRan…
JulienChampagnol Nov 6, 2026
35fe92d
fix(types): define AttributeRange once
JulienChampagnol Nov 6, 2026
ce21a71
fix(types): define AttributeColorMap once
JulienChampagnol Nov 6, 2026
314b97b
fix(types): define AttributeTimeStep once
JulienChampagnol Nov 6, 2026
bd1a1ec
fix(types): define the bounds of an AttributeRange once
JulienChampagnol Nov 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions app/components/ClippingPlanes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ const planes = ref<ClippingPlane[]>([createPlane(undefined, [1, 0, 0])]);
const allItems = dataStore.refRegisteredItems();
const targetIds = computed<string[]>(() => {
if (targetAllVisible.value) {
return allItems.value.map((item) => item.id);
return allItems.value.map((item) => item.data_id);
}
return selectedDatasetIds.value;
});
const availableDatasets = computed<{ title: string; value: string }[]>(() =>
allItems.value.map((item) => ({
title: item.name || item.id,
value: item.id,
title: item.name || item.data_id,
value: item.data_id,
})),
);
const widgetContainer = useTemplateRef("widgetContainer");
Expand All @@ -70,7 +70,9 @@ const {
});

function getUntargetedIds(): string[] {
return allItems.value.map((item) => item.id).filter((id) => !targetIds.value.includes(id));
return allItems.value
.map((item) => item.data_id)
.filter((dataId) => !targetIds.value.includes(dataId));
}

const {
Expand Down Expand Up @@ -144,7 +146,7 @@ async function resetClippingPlanes(): Promise<void> {
}

async function removeClippingPlanes(): Promise<void> {
const allIds = allItems.value.map((item) => item.id);
const allIds = allItems.value.map((item) => item.data_id);
await hybridViewerStore.setClippingPlanes(allIds, []);
await removeSlices(allIds);
}
Expand Down
3 changes: 2 additions & 1 deletion app/components/CrsSelector.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<script setup lang="ts">
import type { CRSList } from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
import type { GeodeObjectType } from "@ogw_front/types/identifiers";
import { useCrsStore } from "@ogw_front/stores/crs";

interface Props {
geodeObjectType: string;
geodeObjectType: GeodeObjectType;
// Narrow containers: one "AUTHORITY:CODE" column and a truncated name
compact?: boolean;
}
Expand Down
15 changes: 8 additions & 7 deletions app/components/ExtensionSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,25 @@
import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";

import FetchingData from "@ogw_front/components/FetchingData.vue";
import type { GeodeObjectType } from "@ogw_front/types/identifiers";
import { useBackStore } from "@ogw_front/stores/back";

const schema = schemas.opengeodeweb_back.geode_objects_and_output_extensions;
const emit = defineEmits<{
update_values: [values: { output_geode_object: string; output_extension: string }];
update_values: [values: { output_geode_object: GeodeObjectType; output_extension: string }];
increment_step: [];
decrement_step: [];
}>();

interface Props {
geodeObjectType: string;
geodeObjectType: GeodeObjectType;
filenames: string[];
}

const { geodeObjectType, filenames } = defineProps<Props>();
type OutputExtensions = Record<string, { is_saveable: boolean }>;

const geode_objects_and_output_extensions = ref<Record<string, OutputExtensions>>({});
const geode_objects_and_output_extensions = ref<Record<GeodeObjectType, OutputExtensions>>({});
const loading = ref<boolean>(false);

const toggle_loading = useToggle(loading);
Expand All @@ -28,16 +29,16 @@ async function get_output_file_extensions(): Promise<void> {
toggle_loading();
geode_objects_and_output_extensions.value = {};
const backStore = useBackStore();
const values: Record<string, Record<string, boolean>>[] = await Promise.all(
filenames.map(async (filename): Promise<Record<string, Record<string, boolean>>> => {
const values: Record<GeodeObjectType, Record<string, boolean>>[] = await Promise.all(
filenames.map(async (filename): Promise<Record<GeodeObjectType, Record<string, boolean>>> => {
const params = { geode_object_type: geodeObjectType, filename };
const response = await backStore.request({ schema, params });
return response.geode_objects_and_output_extensions;
}),
);
const all_keys = [...new Set(values.flatMap((value) => Object.keys(value)))];
const common_keys = all_keys.filter((i) => !values.some((j) => !Object.keys(j).includes(i)));
const final_object: Record<string, OutputExtensions> = {};
const final_object: Record<GeodeObjectType, OutputExtensions> = {};
for (const key of common_keys) {
final_object[key] = {};
for (const value of values) {
Expand All @@ -54,7 +55,7 @@ async function get_output_file_extensions(): Promise<void> {
toggle_loading();
}

function update_values(output_geode_object: string, output_extension: string): void {
function update_values(output_geode_object: GeodeObjectType, output_extension: string): void {
if (output_geode_object !== "" && output_extension !== "") {
emit("update_values", {
output_geode_object,
Expand Down
8 changes: 4 additions & 4 deletions app/components/FactorFilterPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,21 @@ const factor = ref<number>(factorRange.defaultValue);
const allItems = dataStore.refRegisteredItems();
const availableDatasets = computed<{ title: string; value: string }[]>(() =>
allItems.value.map((item) => ({
title: item.name || item.id,
value: item.id,
title: item.name || item.data_id,
value: item.data_id,
})),
);

let appliedFactor: number | undefined = undefined;

async function applyFactor(): Promise<void> {
appliedFactor = factor.value;
const allIds = allItems.value.map((item) => item.id);
const allIds = allItems.value.map((item) => item.data_id);
if (allIds.length === 0) {
return;
}
const targetIds = targetAllVisible.value ? allIds : selectedDatasetIds.value;
const untargetedIds = allIds.filter((id) => !targetIds.includes(id));
const untargetedIds = allIds.filter((dataId) => !targetIds.includes(dataId));

if (targetIds.length > 0) {
await setFactor(targetIds, Number(factor.value));
Expand Down
3 changes: 2 additions & 1 deletion app/components/MissingFilesSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { matchExpectedFiles, uploadPath } from "@ogw_front/utils/upload_path";
import DragAndDrop from "@ogw_front/components/DragAndDrop.vue";
import FetchingData from "@ogw_front/components/FetchingData.vue";
import FileUploader from "@ogw_front/components/FileUploader.vue";
import type { GeodeObjectType } from "@ogw_front/types/identifiers";
import { useBackStore } from "@ogw_front/stores/back";
import { useFeedbackStore } from "@ogw_front/stores/feedback";

Expand Down Expand Up @@ -35,7 +36,7 @@ const emit = defineEmits<Emits>();
interface Props {
multiple: boolean;
// Filename -> geode object type, each file is checked with its own type (unused for time series)
geodeObjectTypes?: Record<string, string>;
geodeObjectTypes?: Record<string, GeodeObjectType>;
filenames: string[];
files?: UploadFile[];
timeSeries?: boolean;
Expand Down
7 changes: 4 additions & 3 deletions app/components/ObjectSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
resolveAllowedObjectsPerFile,
} from "@ogw_shared/utils/response_handlers/load.js";
import FetchingData from "@ogw_front/components/FetchingData.vue";
import type { GeodeObjectType } from "@ogw_front/types/identifiers";
import { geode_objects } from "@ogw_front/assets/geode_objects";
import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
import { useBackStore } from "@ogw_front/stores/back";
Expand All @@ -26,7 +27,7 @@ interface PendingGroup {

const emit = defineEmits<{
// Filename -> geode object type, files that cannot be loaded are left out
update_values: [value: { geode_object_types: Record<string, string> }];
update_values: [value: { geode_object_types: Record<string, GeodeObjectType> }];
increment_step: [];
}>();

Expand Down Expand Up @@ -60,12 +61,12 @@ async function fetchAllowedObjectsList(): Promise<AllowedObjectMap[]> {
return responses.map((response) => response.allowed_objects);
}

function emitGeodeObjectTypes(geode_object_types: Record<string, string>): void {
function emitGeodeObjectTypes(geode_object_types: Record<string, GeodeObjectType>): void {
emit("update_values", { geode_object_types });
emit("increment_step");
}

function setGeodeObject(geode_object_type: string | undefined): void {
function setGeodeObject(geode_object_type: GeodeObjectType | undefined): void {
if (!geode_object_type) {
return;
}
Expand Down
11 changes: 6 additions & 5 deletions app/components/ThresholdCard.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<script setup lang="ts">
import {
type AttributeInfo,
type AttributeSource,
isValidThresholdAttribute,
} from "@ogw_front/utils/threshold";
attributeArrayName,
getAttributeRange,
} from "@ogw_front/utils/attributes";
import { type AttributeSource, isValidThresholdAttribute } from "@ogw_front/utils/threshold";
import type { Threshold, ThresholdAttribute } from "@ogw_internal/stores/hybrid_viewer/filters";
import { attributeArrayName, getAttributeRange } from "@ogw_front/utils/attributes";
import type { AttributeTimeStep } from "@ogw_front/types/attribute";
import ViewerOptionsAttributeRangeSelector from "@ogw_front/components/Viewer/Options/AttributeRangeSelector.vue";
import { fetchAttributeRange } from "@ogw_front/utils/attribute_range";
import { useBackStore } from "@ogw_front/stores/back";
Expand Down Expand Up @@ -50,7 +51,7 @@ const currentSource = computed<AttributeSource | undefined>(
const currentAttribute = computed<AttributeInfo | undefined>(() =>
attributes.value.find((attribute) => attribute.attribute_name === attributeName.value),
);
const currentTimeStep = computed<number | undefined>(() => {
const currentTimeStep = computed<AttributeTimeStep | undefined>(() => {
if (!currentSource.value || !currentAttribute.value?.time_steps?.length) {
return undefined;
}
Expand Down
21 changes: 11 additions & 10 deletions app/components/ThresholdFilter.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script setup lang="ts">
import type { Threshold, ThresholdAttribute } from "@ogw_internal/stores/hybrid_viewer/filters";
import type { AttributeSource } from "@ogw_front/utils/threshold";
import type { DataId } from "@ogw_front/types/identifiers";
import ThresholdCard from "@ogw_front/components/ThresholdCard.vue";
import ToolPanel from "@ogw_front/components/ToolPanel.vue";
import { fetchSources } from "@ogw_front/utils/threshold_sources";
Expand Down Expand Up @@ -32,8 +33,8 @@ const cards = useTemplateRef("cards");
const allItems = dataStore.refAllItems();
const availableDatasets = computed<{ title: string; value: string }[]>(() =>
allItems.value.map((item) => ({
title: item.name || item.id,
value: item.id,
title: item.name || item.data_id,
value: item.data_id,
})),
);

Expand Down Expand Up @@ -63,9 +64,9 @@ function removeThreshold(index: number): void {
}
}

async function clearThresholds(id: string): Promise<void> {
hybridViewerStore.removeThresholds(id);
await hybridViewerStore.setThreshold([id], []);
async function clearThresholds(dataId: DataId): Promise<void> {
hybridViewerStore.removeThresholds(dataId);
await hybridViewerStore.setThreshold([dataId], []);
}

async function resetRanges(): Promise<void> {
Expand All @@ -79,17 +80,17 @@ async function removeThresholds(): Promise<void> {
}
}

watch(selectedDatasetId, async (id, previousId) => {
watch(selectedDatasetId, async (dataId, previousId) => {
if (previousId) {
await clearThresholds(previousId);
}
if (id) {
sources.value = await fetchSources(dataStore, id);
if (dataId) {
sources.value = await fetchSources(dataStore, dataId);
} else {
sources.value = [];
}
if (id && hybridViewerStore.getThresholds(id).length === 0) {
hybridViewerStore.addThreshold(id);
if (dataId && hybridViewerStore.getThresholds(dataId).length === 0) {
hybridViewerStore.addThreshold(dataId);
}
});

Expand Down
17 changes: 10 additions & 7 deletions app/components/TimeSeriesTargetSelector.vue
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
<script setup lang="ts">
import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";

import type {
DataIdentified,
GeodeObjectType,
GeodeObjectTyped,
} from "@ogw_front/types/identifiers";
import FetchingData from "@ogw_front/components/FetchingData.vue";
import { useBackStore } from "@ogw_front/stores/back";
import { useDataStore } from "@ogw_front/stores/data";

const schema = schemas.opengeodeweb_back.time_series_allowed_objects;

interface Target {
id: string;
interface Target extends DataIdentified, GeodeObjectTyped {
name: string;
geode_object_type: string;
}

const emit = defineEmits<{
update_values: [values: { target_id: string; geode_object_type: string }];
update_values: [values: { target_id: string; geode_object_type: GeodeObjectType }];
increment_step: [];
decrement_step: [];
}>();
Expand All @@ -33,12 +36,12 @@ async function get_targets(): Promise<void> {
]);
targets.value = items
.filter((item) => allowed_objects.includes(item.geode_object_type))
.map(({ id, name, geode_object_type }) => ({ id, name, geode_object_type }));
.map(({ data_id, name, geode_object_type }) => ({ data_id, name, geode_object_type }));
loading.value = false;
}

function select(target: Target): void {
emit("update_values", { target_id: target.id, geode_object_type: target.geode_object_type });
emit("update_values", { target_id: target.data_id, geode_object_type: target.geode_object_type });
emit("increment_step");
}

Expand All @@ -59,7 +62,7 @@ await get_targets();
<v-list v-else bg-color="transparent">
<v-list-item
v-for="target in targets"
:key="target.id"
:key="target.data_id"
data-testid="timeSeriesTarget"
:title="target.name"
:subtitle="target.geode_object_type"
Expand Down
22 changes: 12 additions & 10 deletions app/components/Viewer/ContextMenu/InfoCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ watch(
return;
}

const modelId = asString(newMeta.modelId) ?? asString(newMeta.id);
const modelId = asString(newMeta.modelId) ?? asString(newMeta.data_id);
if (newMeta.pickedComponentId && modelId) {
const components = await dataStore.getAllMeshComponents(modelId);
const comp = components.find(
Expand Down Expand Up @@ -128,13 +128,15 @@ function formatId(id: string | undefined): string {
return `${id.slice(0, ID_SLICE_START)}...${id.slice(id.length - ID_SLICE_END_OFFSET)}`;
}

const formattedId = computed<string>(() => formatId(metaData.id));
const formattedId = computed<string>(() => formatId(metaData.data_id));

const crsStore = useCrsStore();
// A model component shares the model CRS: the CRS row is only shown for a data
const isData = computed<boolean>(() => metaData.id !== undefined && metaData.modelId === undefined);
const isData = computed<boolean>(
() => metaData.data_id !== undefined && metaData.modelId === undefined,
);
// The menu metadata is a snapshot taken when it opened: read the item live so a CRS edit shows at once
const liveItem = useLiveDataItem(() => (isData.value ? metaData.id : undefined));
const liveItem = useLiveDataItem(() => (isData.value ? metaData.data_id : undefined));
const liveCrs = computed(() => liveItem.value?.crs ?? metaData.crs);
</script>

Expand Down Expand Up @@ -164,17 +166,17 @@ const liveCrs = computed(() => liveItem.value?.crs ?? metaData.crs);
{{ metaData.geode_object_type }}
</v-col>
<v-col
v-if="metaData.id"
v-if="metaData.data_id"
class="id-badge-container mt-1 d-inline-flex align-center px-2 py-0.5"
@click.stop="copyId(metaData.id)"
@click.stop="copyId(metaData.data_id)"
>
<span class="id-text">
{{ isCopied(metaData.id) ? "COPIED!" : formattedId }}
{{ isCopied(metaData.data_id) ? "COPIED!" : formattedId }}
</span>
<v-icon
:icon="isCopied(metaData.id) ? 'mdi-check' : 'mdi-content-copy'"
:icon="isCopied(metaData.data_id) ? 'mdi-check' : 'mdi-content-copy'"
size="10"
:color="isCopied(metaData.id) ? 'success' : 'white'"
:color="isCopied(metaData.data_id) ? 'success' : 'white'"
class="ml-1"
/>
</v-col>
Expand All @@ -195,7 +197,7 @@ const liveCrs = computed(() => liveItem.value?.crs ?? metaData.crs);
size="x-small"
color="white"
class="ml-1"
@click.stop="crsStore.requestCrsEdit(metaData.id)"
@click.stop="crsStore.requestCrsEdit(metaData.data_id)"
/>
</v-col>

Expand Down
Loading
Loading