diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ee0e2e95..944ee6d1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - "Website": "2.3.12" + "Website": "2.3.13" } diff --git a/Website/CHANGELOG.md b/Website/CHANGELOG.md index 10c2a6da..65751078 100644 --- a/Website/CHANGELOG.md +++ b/Website/CHANGELOG.md @@ -1,3 +1,10 @@ +## [2.3.13] - 2026-11-13 + +### Other Changes + +* Show consistent relationship behavior labels and details ([3e66acf](https://github.com/context-and-oss/DataModelViewer/commit/3e66acf)) + + ## [2.3.12] - 2026-11-09 ### Bug Fixes diff --git a/Website/components/datamodelview/entity/CascadeConfiguration.tsx b/Website/components/datamodelview/entity/CascadeConfiguration.tsx index 58ce68fb..e09b966a 100644 --- a/Website/components/datamodelview/entity/CascadeConfiguration.tsx +++ b/Website/components/datamodelview/entity/CascadeConfiguration.tsx @@ -1,65 +1,44 @@ 'use client' +import { Tooltip } from "@mui/material"; import { CascadeConfigurationType, CascadeType } from "@/lib/Types"; -export function CascadeConfiguration({ config }: { config: CascadeConfigurationType | null }): JSX.Element { - if (!config) { - return None - } +const actions = ["Assign", "Reparent", "Delete", "Share", "Unshare", "Merge", "Archive", "RollupView"] as const; +const configurableActions = ["Assign", "Reparent", "Share", "Unshare"] as const; - if (isReferential(config)) { - return Referential +export function getRelationshipBehavior(config: CascadeConfigurationType): "Referential" | "Parental" | "Custom" { + // Merge depends on table support; Archive and RollupView are independent settings. + // They remain visible in the details without changing the behavior family. + if (configurableActions.every(action => config[action] === CascadeType.None) && + (config.Delete === CascadeType.RemoveLink || config.Delete === CascadeType.Restrict)) { + return "Referential"; } - - if (isReferentialRestrictDelete(config)) { - return Referential, Restrict Delete + if (configurableActions.every(action => config[action] === CascadeType.Cascade) && + config.Delete === CascadeType.Cascade) { + return "Parental"; } + return "Custom"; +} - if (isParential(config)) { - return Parential +export function CascadeConfiguration({ config }: { config: CascadeConfigurationType | null }): JSX.Element { + if (!config) { + return None } return ( -