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
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Grégoire Locqueville
purescript-gargantext
Commits
76d88cea
Commit
76d88cea
authored
Dec 07, 2020
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[tree] first-level endpoint implemented
parent
11dea9a2
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
357 additions
and
153 deletions
+357
-153
Forest.purs
src/Gargantext/Components/Forest.purs
+1
-1
Tree.purs
src/Gargantext/Components/Forest/Tree.purs
+331
-135
Node.purs
src/Gargantext/Components/Forest/Tree/Node.purs
+22
-17
Ends.purs
src/Gargantext/Ends.purs
+2
-0
Routes.purs
src/Gargantext/Routes.purs
+1
-0
No files found.
src/Gargantext/Components/Forest.purs
View file @
76d88cea
...
@@ -85,7 +85,7 @@ forestCpt = R.hooksComponentWithModule thisModule "forest" cpt where
...
@@ -85,7 +85,7 @@ forestCpt = R.hooksComponentWithModule thisModule "forest" cpt where
, reload
, reload
, root: treeId
, root: treeId
, session: s
, session: s
}
}
[]
plus :: Handed -> R.Setter Boolean -> R.State (Maybe Backend) -> R.Element
plus :: Handed -> R.Setter Boolean -> R.State (Maybe Backend) -> R.Element
plus handed showLogin backend = H.div { className: handedClass } [
plus handed showLogin backend = H.div { className: handedClass } [
...
...
src/Gargantext/Components/Forest/Tree.purs
View file @
76d88cea
This diff is collapsed.
Click to expand it.
src/Gargantext/Components/Forest/Tree/Node.purs
View file @
76d88cea
...
@@ -56,9 +56,17 @@ type NodeMainSpanProps = (
...
@@ -56,9 +56,17 @@ type NodeMainSpanProps = (
type IsLeaf = Boolean
type IsLeaf = Boolean
nodeMainSpan :: Record NodeMainSpanProps
nodeSpan :: R2.Component NodeMainSpanProps
-> R.Element
nodeSpan = R.createElement nodeSpanCpt
nodeMainSpan p = R.createElement nodeMainSpanCpt p []
nodeSpanCpt :: R.Component NodeMainSpanProps
nodeSpanCpt = R.hooksComponentWithModule thisModule "nodeSpan" cpt
where
cpt props children = do
pure $ H.div {} ([ nodeMainSpan props [] ] <> children)
nodeMainSpan :: R2.Component NodeMainSpanProps
nodeMainSpan = R.createElement nodeMainSpanCpt
nodeMainSpanCpt :: R.Component NodeMainSpanProps
nodeMainSpanCpt :: R.Component NodeMainSpanProps
nodeMainSpanCpt = R.hooksComponentWithModule thisModule "nodeMainSpan" cpt
nodeMainSpanCpt = R.hooksComponentWithModule thisModule "nodeMainSpan" cpt
...
@@ -155,15 +163,12 @@ nodeMainSpanCpt = R.hooksComponentWithModule thisModule "nodeMainSpan" cpt
...
@@ -155,15 +163,12 @@ nodeMainSpanCpt = R.hooksComponentWithModule thisModule "nodeMainSpan" cpt
, session
, session
}
}
chevronIcon isLeaf handed' nodeType (open /\ setOpen) =
chevronIcon true handed' nodeType (open /\ setOpen) = H.div {} []
if isLeaf
chevronIcon false handed' nodeType (open /\ setOpen) =
then H.div {} []
else
H.a { className: "chevron-icon"
H.a { className: "chevron-icon"
, on: { click: \_ -> setOpen $ not }
, on: { click: \_ -> setOpen $ not }
}
}
[ H.i {
[ H.i { className: if open
className: if open
then "fa fa-chevron-down"
then "fa fa-chevron-down"
else if handed' == GT.RightHanded
else if handed' == GT.RightHanded
then "fa fa-chevron-right"
then "fa fa-chevron-right"
...
...
src/Gargantext/Ends.purs
View file @
76d88cea
...
@@ -172,6 +172,8 @@ sessionPath (R.PostNgramsChartsAsync i) =
...
@@ -172,6 +172,8 @@ sessionPath (R.PostNgramsChartsAsync i) =
sessionPath (R.NodeAPI nt i p) = nodeTypePath nt
sessionPath (R.NodeAPI nt i p) = nodeTypePath nt
<> (maybe "" (\i' -> "/" <> show i') i)
<> (maybe "" (\i' -> "/" <> show i') i)
<> (if p == "" then "" else "/" <> p)
<> (if p == "" then "" else "/" <> p)
sessionPath (R.TreeFirstLevel nId p) = nodeTypePath Tree
<> (maybe "" (\nId' -> "/" <> show nId') nId) <> "/first-level" <> p
sessionPath (R.Search {listId, limit, offset, orderBy} Nothing) =
sessionPath (R.Search {listId, limit, offset, orderBy} Nothing) =
sessionPath $ R.NodeAPI Corpus Nothing
sessionPath $ R.NodeAPI Corpus Nothing
$ "search?list_id=" <> show listId
$ "search?list_id=" <> show listId
...
...
src/Gargantext/Routes.purs
View file @
76d88cea
...
@@ -50,6 +50,7 @@ data SessionRoute
...
@@ -50,6 +50,7 @@ data SessionRoute
| RecomputeNgrams (TabSubType CTabNgramType) Id ListId
| RecomputeNgrams (TabSubType CTabNgramType) Id ListId
| RecomputeListChart ChartType CTabNgramType Id ListId
| RecomputeListChart ChartType CTabNgramType Id ListId
| NodeAPI NodeType (Maybe Id) String
| NodeAPI NodeType (Maybe Id) String
| TreeFirstLevel (Maybe Id) String
| GraphAPI Id String
| GraphAPI Id String
| ListsRoute ListId
| ListsRoute ListId
| ListDocument (Maybe ListId) (Maybe Id)
| ListDocument (Maybe ListId) (Maybe Id)
...
...
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