Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
purescript-gargantext
Commits
09db4e19
Commit
09db4e19
authored
Jun 26, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] GraphTerm -> MapTerm
parent
83807ead
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
25 additions
and
25 deletions
+25
-25
Menu.purs
src/Gargantext/Components/Annotation/Menu.purs
+1
-1
Utils.purs
src/Gargantext/Components/Annotation/Utils.purs
+2
-2
Merge.purs
src/Gargantext/Components/Forest/Tree/Node/Action/Merge.purs
+2
-2
Sidebar.purs
src/Gargantext/Components/GraphExplorer/Sidebar.purs
+1
-1
NgramsTable.purs
src/Gargantext/Components/NgramsTable.purs
+1
-1
Components.purs
src/Gargantext/Components/NgramsTable/Components.purs
+4
-4
Core.purs
src/Gargantext/Components/NgramsTable/Core.purs
+1
-1
Metrics.purs
src/Gargantext/Components/Nodes/Corpus/Chart/Metrics.purs
+1
-1
Pie.purs
src/Gargantext/Components/Nodes/Corpus/Chart/Pie.purs
+2
-2
Ends.purs
src/Gargantext/Ends.purs
+2
-2
Types.purs
src/Gargantext/Types.purs
+8
-8
No files found.
src/Gargantext/Components/Annotation/Menu.purs
View file @
09db4e19
...
...
@@ -38,7 +38,7 @@ annotationMenuCpt :: R.Component Props
annotationMenuCpt = R.hooksComponent "Annotation.Menu" cpt
where
cpt props _ = pure $ R.fragment $ children props
children props = A.mapMaybe (addToList props) [
Graph
Term, CandidateTerm, StopTerm ]
children props = A.mapMaybe (addToList props) [
Map
Term, CandidateTerm, StopTerm ]
-- | Given the TermList to render the item for zand the Maybe TermList the item may belong to, possibly render the menuItem
addToList :: Record Props -> TermList -> Maybe R.Element
...
...
src/Gargantext/Components/Annotation/Utils.purs
View file @
09db4e19
...
...
@@ -3,11 +3,11 @@ module Gargantext.Components.Annotation.Utils where
import Gargantext.Types ( TermList(..) )
termClass :: TermList -> String
termClass
Graph
Term = "graph-term"
termClass
Map
Term = "graph-term"
termClass StopTerm = "stop-term"
termClass CandidateTerm = "candidate-term"
termBootstrapClass :: TermList -> String
termBootstrapClass
Graph
Term = "success"
termBootstrapClass
Map
Term = "success"
termBootstrapClass StopTerm = "danger"
termBootstrapClass CandidateTerm = "warning"
src/Gargantext/Components/Forest/Tree/Node/Action/Merge.purs
View file @
09db4e19
...
...
@@ -25,7 +25,7 @@ mergeNode p@{dispatch, subTreeParams, id, nodeType, session} = do
<- R.useState' Nothing
merge <- R.useState' false
options <- R.useState' (Set.singleton GT.
Graph
Term)
options <- R.useState' (Set.singleton GT.
Map
Term)
let button = case subTreeOutParams of
Nothing -> H.div {} []
...
...
@@ -41,7 +41,7 @@ mergeNode p@{dispatch, subTreeParams, id, nodeType, session} = do
, session
}
, H.div {} [ H.text "Merge which list?"
, checkboxes [GT.
Graph
Term, GT.CandidateTerm, GT.StopTerm] options
, checkboxes [GT.
Map
Term, GT.CandidateTerm, GT.StopTerm] options
]
, H.div {className: "checkbox"} [checkbox merge, H.text "Merge data?"]
] button
...
...
src/Gargantext/Components/GraphExplorer/Sidebar.purs
View file @
09db4e19
...
...
@@ -187,7 +187,7 @@ deleteNode termList session (GET.MetaData metaData) node = NTC.putNgramsPatches
np :: NTC.NgramsPatches
np = NTC.singletonPatchMap term $ NTC.NgramsPatch { patch_children: mempty, patch_list }
patch_list :: NTC.Replace TermList
patch_list = NTC.Replace { new: termList, old:
Graph
Term }
patch_list = NTC.Replace { new: termList, old:
Map
Term }
query :: Frontends -> GET.MetaData -> Session -> SigmaxT.NodesMap -> R.State SigmaxT.NodeIds -> R.Element
...
...
src/Gargantext/Components/NgramsTable.purs
View file @
09db4e19
...
...
@@ -256,7 +256,7 @@ tableContainerCpt { dispatch
selectButtons true =
H.div {} [
H.button { className: "btn btn-primary"
, on: { click: const $ setSelection
Graph
Term }
, on: { click: const $ setSelection
Map
Term }
} [ H.text "Map" ]
, H.button { className: "btn btn-primary"
, on: { click: const $ setSelection StopTerm }
...
...
src/Gargantext/Components/NgramsTable/Components.purs
View file @
09db4e19
...
...
@@ -183,7 +183,7 @@ renderNgramsItemCpt = R.hooksComponent "G.C.NT.renderNgramsItem" cpt
, ngramsTable } _ =
pure $ Tbl.makeRow [
selected
, checkbox T.
Graph
Term
, checkbox T.
Map
Term
, checkbox T.StopTerm
, if ngramsParent == Nothing
then renderNgramsTree { ngramsTable, ngrams, ngramsStyle, ngramsClick, ngramsEdit }
...
...
@@ -232,7 +232,7 @@ renderNgramsItemCpt = R.hooksComponent "G.C.NT.renderNgramsItem" cpt
termStyle :: T.TermList -> Number -> DOM.Props
termStyle T.
Graph
Term opacity = DOM.style { color: "green", opacity }
termStyle T.
Map
Term opacity = DOM.style { color: "green", opacity }
termStyle T.StopTerm opacity = DOM.style { color: "red", opacity
, textDecoration: "line-through" }
termStyle T.CandidateTerm opacity = DOM.style { color: "black", opacity }
...
...
@@ -250,6 +250,6 @@ tablePatchHasNgrams ngramsTablePatch ngrams =
nextTermList :: T.TermList -> T.TermList
nextTermList T.
Graph
Term = T.StopTerm
nextTermList T.
Map
Term = T.StopTerm
nextTermList T.StopTerm = T.CandidateTerm
nextTermList T.CandidateTerm = T.
Graph
Term
nextTermList T.CandidateTerm = T.
Map
Term
src/Gargantext/Components/NgramsTable/Core.purs
View file @
09db4e19
...
...
@@ -133,7 +133,7 @@ initialPageParams session nodeId listIds tabType =
, params
, tabType
, termSizeFilter: Nothing
, termListFilter: Just
Graph
Term
, termListFilter: Just
Map
Term
, searchQuery: ""
, scoreType: Occurrences
, session
...
...
src/Gargantext/Components/Nodes/Corpus/Chart/Metrics.purs
View file @
09db4e19
...
...
@@ -86,7 +86,7 @@ scatterOptions metrics' = Options
color =
case k of
StopTerm -> red
Graph
Term -> green
Map
Term -> green
CandidateTerm -> grey
toSerie color' (Metric {label,x,y}) =
dataSerie { name: label, itemStyle: itemStyle {color: color'}
...
...
src/Gargantext/Components/Nodes/Corpus/Chart/Pie.purs
View file @
09db4e19
...
...
@@ -58,7 +58,7 @@ type Loaded = HistoMetrics
chartOptionsBar :: HistoMetrics -> Options
chartOptionsBar (HistoMetrics { dates: dates', count: count'}) = Options
{ mainTitle : "Bar"
, subTitle : "Count of
Graph
Term"
, subTitle : "Count of
Map
Term"
, xAxis : xAxis' $ map (\t -> joinWith " " $ map (take 3) $ A.take 3 $ filter (\s -> length s > 3) $ split (Pattern " ") t) dates'
, yAxis : yAxis' { position: "left", show: true, min:0}
, series : [seriesBarD1 {name: "Number of publication / year"} $ map (\n -> dataSerie {name: "", itemStyle: itemStyle {color:blue}, value: n }) count']
...
...
@@ -69,7 +69,7 @@ chartOptionsBar (HistoMetrics { dates: dates', count: count'}) = Options
chartOptionsPie :: HistoMetrics -> Options
chartOptionsPie (HistoMetrics { dates: dates', count: count'}) = Options
{ mainTitle : "Pie"
, subTitle : "Distribution by
Graph
Term"
, subTitle : "Distribution by
Map
Term"
, xAxis : xAxis' []
, yAxis : yAxis' { position: "", show: false, min:0}
, series : [seriesPieD1 {name: "Data"} $ map (\(Tuple n v) -> dataSerie {name: n, value:v}) $ zip dates' count']
...
...
src/Gargantext/Ends.purs
View file @
09db4e19
...
...
@@ -120,7 +120,7 @@ sessionPath (R.NodeAPI Phylo pId p) = "phyloscape?nodeId=" <> (show $ fromMaybe
sessionPath (R.RecomputeNgrams nt nId lId) = "node/" <> (show nId) <> "/ngrams/recompute?list=" <> (show lId) <> "&ngramsType=" <> (show nt)
sessionPath (R.RecomputeListChart ChartBar nt nId lId) = "node/" <> (show nId) <> "/pie?list=" <> (show lId) <> "&ngramsType=" <> (show nt)
sessionPath (R.RecomputeListChart ChartPie nt nId lId) = "node/" <> (show nId) <> "/pie?list=" <> (show lId) <> "&ngramsType=" <> (show nt)
sessionPath (R.RecomputeListChart ChartTree nt nId lId) = "node/" <> (show nId) <> "/tree?list=" <> (show lId) <> "&ngramsType=" <> (show nt) <> "&listType=
Graph
Term"
sessionPath (R.RecomputeListChart ChartTree nt nId lId) = "node/" <> (show nId) <> "/tree?list=" <> (show lId) <> "&ngramsType=" <> (show nt) <> "&listType=
Map
Term"
sessionPath (R.RecomputeListChart Histo nt nId lId) = "node/" <> (show nId) <> "/chart?list=" <> (show lId) <> "&ngramsType=" <> (show nt)
sessionPath (R.RecomputeListChart Scatter nt nId lId) = "node/" <> (show nId) <> "/metrics?list=" <> (show lId) <> "&ngramsType=" <> (show nt)
sessionPath (R.RecomputeListChart _ nt nId lId) = "node/" <> (show nId) <> "/recompute-chart?list=" <> (show lId) <> "&ngramsType=" <> (show nt)
...
...
@@ -190,7 +190,7 @@ sessionPath (R.Chart {chartType, listId, limit, tabType} i) =
sessionPath $ R.NodeAPI Corpus i
$ show chartType
<> "?ngramsType=" <> showTabType' tabType
<> "&listType=
Graph
Term" -- <> show listId
<> "&listType=
Map
Term" -- <> show listId
<> "&listId=" <> show listId
where
limitPath = case limit of
...
...
src/Gargantext/Types.purs
View file @
09db4e19
...
...
@@ -56,14 +56,14 @@ termSizes = [ { desc: "All types", mval: Nothing }
, { desc: "Multi-word terms", mval: Just MultiTerm }
]
data TermList =
Graph
Term | StopTerm | CandidateTerm
data TermList =
Map
Term | StopTerm | CandidateTerm
-- TODO use generic JSON instance
derive instance eqTermList :: Eq TermList
derive instance ordTermList :: Ord TermList
instance encodeJsonTermList :: EncodeJson TermList where
encodeJson
GraphTerm = encodeJson "Graph
Term"
encodeJson
MapTerm = encodeJson "Map
Term"
encodeJson StopTerm = encodeJson "StopTerm"
encodeJson CandidateTerm = encodeJson "CandidateTerm"
...
...
@@ -71,7 +71,7 @@ instance decodeJsonTermList :: DecodeJson TermList where
decodeJson json = do
s <- decodeJson json
case s of
"
GraphTerm" -> pure Graph
Term
"
MapTerm" -> pure Map
Term
"StopTerm" -> pure StopTerm
"CandidateTerm" -> pure CandidateTerm
_ -> Left "Unexpected list name"
...
...
@@ -79,31 +79,31 @@ instance decodeJsonTermList :: DecodeJson TermList where
type ListTypeId = Int
listTypeId :: TermList -> ListTypeId
listTypeId
Graph
Term = 1
listTypeId
Map
Term = 1
listTypeId StopTerm = 2
listTypeId CandidateTerm = 3
instance showTermList :: Show TermList where
show
GraphTerm = "Graph
Term"
show
MapTerm = "Map
Term"
show StopTerm = "StopTerm"
show CandidateTerm = "CandidateTerm"
-- TODO: Can we replace the show instance above with this?
termListName :: TermList -> String
termListName
Graph
Term = "Map List"
termListName
Map
Term = "Map List"
termListName StopTerm = "Stop List"
termListName CandidateTerm = "Candidate List"
instance readTermList :: Read TermList where
read :: String -> Maybe TermList
read "
GraphTerm" = Just Graph
Term
read "
MapTerm" = Just Map
Term
read "StopTerm" = Just StopTerm
read "CandidateTerm" = Just CandidateTerm
read _ = Nothing
termLists :: Array { desc :: String, mval :: Maybe TermList }
termLists = [ { desc: "All terms", mval: Nothing }
, { desc: "Map terms", mval: Just
Graph
Term }
, { desc: "Map terms", mval: Just
Map
Term }
, { desc: "Stop terms", mval: Just StopTerm }
, { desc: "Candidate terms", mval: Just CandidateTerm }
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment