import type { ProjectGraphNode } from '@nrwl/devkit'; import { DepGraphSelector } from '../hooks/use-dep-graph-selector'; import { WorkspaceLayout } from '../interfaces'; import { GraphPerfReport } from './interfaces'; export const allProjectsSelector: DepGraphSelector = ( state ) => state.context.projects; export const workspaceLayoutSelector: DepGraphSelector = ( state ) => state.context.workspaceLayout; export const selectedProjectNamesSelector: DepGraphSelector = ( state ) => state.context.selectedProjects; export const projectIsSelectedSelector: DepGraphSelector = (state) => state.context.selectedProjects.length > 0; export const lastPerfReportSelector: DepGraphSelector = ( state ) => state.context.lastPerfReport; export const focusedProjectNameSelector: DepGraphSelector = (state) => state.context.focusedProject; export const searchDepthSelector: DepGraphSelector<{ searchDepth: number; searchDepthEnabled: boolean; }> = (state) => ({ searchDepth: state.context.searchDepth, searchDepthEnabled: state.context.searchDepthEnabled, }); export const includePathSelector: DepGraphSelector = (state) => state.context.includePath; export const textFilterSelector: DepGraphSelector = (state) => state.context.textFilter; export const hasAffectedProjectsSelector: DepGraphSelector = (state) => state.context.affectedProjects.length > 0;