mirror of
https://github.com/chartdb/chartdb.git
synced 2025-11-13 02:17:04 +00:00
Add dependency to views based on view definition (#236)
* init dependency * add dependency api support * add 'dependency-edge' type * add dependencies to sidebar * ast in multi database types * double click on dependency to view it + fix vizualize adding dependency * set view to always be the dependent table on creating dependency * set dependency edge color * find the shortest path on dependencies * add handle id diff * fix for parsing + add dependencies to diagaram * hide or show dependencies from view menu * fix for MATERIALIZED VIEWS * rebase + fix * fix build --------- Co-authored-by: Guy Ben-Aharon <baguy3@gmail.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { emptyFn } from '@/lib/utils';
|
||||
import { createContext } from 'react';
|
||||
|
||||
export type SidebarSection = 'tables' | 'relationships';
|
||||
export type SidebarSection = 'tables' | 'relationships' | 'dependencies';
|
||||
|
||||
export interface LayoutContext {
|
||||
openedTableInSidebar: string | undefined;
|
||||
@@ -12,6 +12,10 @@ export interface LayoutContext {
|
||||
openRelationshipFromSidebar: (relationshipId: string) => void;
|
||||
closeAllRelationshipsInSidebar: () => void;
|
||||
|
||||
openedDependencyInSidebar: string | undefined;
|
||||
openDependencyFromSidebar: (dependencyId: string) => void;
|
||||
closeAllDependenciesInSidebar: () => void;
|
||||
|
||||
selectedSidebarSection: SidebarSection;
|
||||
selectSidebarSection: (section: SidebarSection) => void;
|
||||
|
||||
@@ -32,6 +36,10 @@ export const layoutContext = createContext<LayoutContext>({
|
||||
openRelationshipFromSidebar: emptyFn,
|
||||
closeAllRelationshipsInSidebar: emptyFn,
|
||||
|
||||
openedDependencyInSidebar: undefined,
|
||||
openDependencyFromSidebar: emptyFn,
|
||||
closeAllDependenciesInSidebar: emptyFn,
|
||||
|
||||
selectSidebarSection: emptyFn,
|
||||
openTableFromSidebar: emptyFn,
|
||||
closeAllTablesInSidebar: emptyFn,
|
||||
|
||||
Reference in New Issue
Block a user