File tree Expand file tree Collapse file tree 3 files changed +18
-14
lines changed
Expand file tree Collapse file tree 3 files changed +18
-14
lines changed Original file line number Diff line number Diff line change 1+ import * as _ from "lodash" ;
12import { useStoreState } from "pullstate" ;
23import React , { useEffect , useState } from "react" ;
34import { Container , Row } from "react-bootstrap" ;
45import { StoreSettings } from "../config/Store" ;
6+ import { Diagrams , WorkspaceVocabularies } from "../config/Variables" ;
57import { DiagramManagerDetails } from "./manager/details/DiagramManagerDetails" ;
68import { DiagramManagerList } from "./manager/list/DiagramManagerList" ;
7- import * as _ from "lodash" ;
8- import { Diagrams } from "../config/Variables" ;
99
1010type Props = {
1111 projectLanguage : string ;
@@ -29,7 +29,9 @@ export const DiagramManager: React.FC<Props> = (props: Props) => {
2929 setAvailableVocabs (
3030 _ . compact (
3131 _ . uniq (
32- Object . keys ( Diagrams ) . flatMap ( ( diag ) => Diagrams [ diag ] . vocabularies )
32+ Object . keys ( Diagrams )
33+ . flatMap ( ( diag ) => Diagrams [ diag ] . vocabularies )
34+ . filter ( ( voc ) => voc in WorkspaceVocabularies )
3335 )
3436 )
3537 ) ,
Original file line number Diff line number Diff line change @@ -48,14 +48,16 @@ export const DiagramManagerListItem: React.FC<Props> = (props: Props) => {
4848 < span className = "name" > { Diagrams [ props . diagram ] . name } </ span >
4949
5050 < span className = "vocabularies" >
51- { Diagrams [ props . diagram ] . vocabularies ?. map ( ( v ) => (
52- < VocabularyBadge
53- key = { v }
54- text = { getVocabularyLabel ( v ) }
55- color = { WorkspaceVocabularies [ v ] . color }
56- cancellable = { false }
57- />
58- ) ) }
51+ { Diagrams [ props . diagram ] . vocabularies
52+ ?. filter ( ( voc ) => voc in WorkspaceVocabularies )
53+ . map ( ( v ) => (
54+ < VocabularyBadge
55+ key = { v }
56+ text = { getVocabularyLabel ( v ) }
57+ color = { WorkspaceVocabularies [ v ] . color }
58+ cancellable = { false }
59+ />
60+ ) ) }
5961 </ span >
6062 </ span >
6163 { ( props . selected || hovered ) && (
Original file line number Diff line number Diff line change 1- import Select , { MultiValue } from "react-select " ;
1+ import SearchIcon from "@mui/icons-material/Search " ;
22import _ from "lodash" ;
33import React from "react" ;
4- import { InputGroup , Form } from "react-bootstrap" ;
4+ import { Form , InputGroup } from "react-bootstrap" ;
5+ import Select , { MultiValue } from "react-select" ;
56import { Locale } from "../../../config/Locale" ;
67import { AppSettings , WorkspaceVocabularies } from "../../../config/Variables" ;
78import { getLabelOrBlank } from "../../../function/FunctionGetVars" ;
8- import SearchIcon from "@mui/icons-material/Search" ;
99
1010type VocabularyOptions = MultiValue < {
1111 label : string ;
You can’t perform that action at this time.
0 commit comments