Release govoplan-views v0.1.22: unify interface contracts and documentation

This commit is contained in:
2026-09-08 01:32:54 +02:00
parent 9a53898388
commit 655aea6662
13 changed files with 235 additions and 13 deletions
+5 -1
View File
@@ -3,6 +3,7 @@ import {
apiPath,
type ApiSettings,
type EffectiveViewProjection,
type NavigationPreferences,
type ViewPresentation
} from "@govoplan/core-webui";
@@ -17,6 +18,7 @@ export type ViewRevision = {
surface_contract_version: string;
visible_surface_ids: string[];
presentation: {
navigation?: NavigationPreferences | null;
navigation_mode?: "grouped" | "flat";
product_area_order?: string[];
product_area_labels?: Record<string, string>;
@@ -260,10 +262,11 @@ export function createViewRevision(
);
}
function presentationFromApi(
export function presentationFromApi(
value: ViewRevision["presentation"] | undefined
): ViewPresentation {
return {
navigation: value?.navigation ?? null,
navigationMode: value?.navigation_mode,
productAreaOrder: value?.product_area_order ?? [],
productAreaLabels: value?.product_area_labels ?? {},
@@ -276,6 +279,7 @@ export function presentationToApi(
value: ViewPresentation
): ViewRevision["presentation"] {
return {
navigation: value.navigation ?? null,
navigation_mode: value.navigationMode ?? "grouped",
product_area_order: value.productAreaOrder ?? [],
product_area_labels: value.productAreaLabels ?? {},