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
d8b176aa
Commit
d8b176aa
authored
Sep 07, 2020
by
Nicolas Pouillard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ngrams creation is now made through patches
parent
72000547
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
278 additions
and
154 deletions
+278
-154
Sidebar.purs
src/Gargantext/Components/GraphExplorer/Sidebar.purs
+1
-0
NgramsTable.purs
src/Gargantext/Components/NgramsTable.purs
+40
-43
Components.purs
src/Gargantext/Components/NgramsTable/Components.purs
+2
-2
Core.purs
src/Gargantext/Components/NgramsTable/Core.purs
+224
-106
Prelude.purs
src/Gargantext/Prelude.purs
+11
-3
No files found.
src/Gargantext/Components/GraphExplorer/Sidebar.purs
View file @
d8b176aa
...
@@ -206,6 +206,7 @@ deleteNodes { graphId, metaData, nodes, session, termList, treeReload } = do
...
@@ -206,6 +206,7 @@ deleteNodes { graphId, metaData, nodes, session, termList, treeReload } = do
Just (NTC.Versioned patch) -> do
Just (NTC.Versioned patch) -> do
liftEffect $ snd treeReload $ (+) 1
liftEffect $ snd treeReload $ (+) 1
-- Why is this called delete node?
deleteNode :: TermList
deleteNode :: TermList
-> Session
-> Session
-> GET.MetaData
-> GET.MetaData
...
...
src/Gargantext/Components/NgramsTable.purs
View file @
d8b176aa
This diff is collapsed.
Click to expand it.
src/Gargantext/Components/NgramsTable/Components.purs
View file @
d8b176aa
...
@@ -17,7 +17,7 @@ import Reactix as R
...
@@ -17,7 +17,7 @@ import Reactix as R
import Reactix.DOM.HTML as H
import Reactix.DOM.HTML as H
import Gargantext.Prelude
import Gargantext.Prelude
import Gargantext.Components.NgramsTable.Core (Action(..), Dispatch, NgramsElement, NgramsPatch(..), NgramsTable, NgramsTablePatch, NgramsTerm, Replace, _NgramsElement, _PatchMap, _children, _list, _ngrams, _occurrences, ngramsTermText, replace, singletonNgramsTablePatch)
import Gargantext.Components.NgramsTable.Core (Action(..), Dispatch, NgramsElement, NgramsPatch(..), NgramsTable, NgramsTablePatch, NgramsTerm, Replace, _NgramsElement, _
NgramsRepoElement, _
PatchMap, _children, _list, _ngrams, _occurrences, ngramsTermText, replace, singletonNgramsTablePatch)
import Gargantext.Components.Table as Tbl
import Gargantext.Components.Table as Tbl
import Gargantext.Types as T
import Gargantext.Types as T
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Reactix as R2
...
@@ -153,7 +153,7 @@ treeCpt = R2.hooksComponent thisModule "tree" cpt
...
@@ -153,7 +153,7 @@ treeCpt = R2.hooksComponent thisModule "tree" cpt
className = "glyphicon glyphicon-chevron-" <> if open then "down" else "right"
className = "glyphicon glyphicon-chevron-" <> if open then "down" else "right"
style = if leaf then {color: "#adb5bd"} else {color: ""}
style = if leaf then {color: "#adb5bd"} else {color: ""}
open = not leaf || false {- TODO -}
open = not leaf || false {- TODO -}
cs = ngramsTable ^.. ix ngramsDepth.ngrams <<< _NgramsElement <<< _children <<< folded
cs = ngramsTable ^.. ix ngramsDepth.ngrams <<< _Ngrams
Repo
Element <<< _children <<< folded
forest =
forest =
let depth = ngramsDepth.depth + 1 in
let depth = ngramsDepth.depth + 1 in
...
...
src/Gargantext/Components/NgramsTable/Core.purs
View file @
d8b176aa
This diff is collapsed.
Click to expand it.
src/Gargantext/Prelude.purs
View file @
d8b176aa
module Gargantext.Prelude (module Prelude, logs, id, class Read, read)
module Gargantext.Prelude (module Prelude, logs,
logExceptions,
id, class Read, read)
where
where
import Data.Maybe (Maybe)
import Data.Maybe (Maybe)
import Prelude (class Applicative, class Apply, class Bind, class BooleanAlgebra, class Bounded, class Category, class CommutativeRing, class Discard, class DivisionRing, class Eq, class EuclideanRing, class Field, class Functor, class HeytingAlgebra, class Monad, class Monoid, class Ord, class Ring, class Semigroup, class Semigroupoid, class Semiring, class Show, type (~>), Ordering(..), Unit, Void, absurd, add, ap, append, apply, between, bind, bottom, clamp, compare, comparing, compose, conj, const, degree, discard, disj, eq, flap, flip, gcd, identity, ifM, join, lcm, liftA1, liftM1, map, max, mempty, min, mod, mul, negate, not, notEq, one, otherwise, pure, recip, show, sub, top, unit, unless, unlessM, void, when, whenM, zero, (#), ($), ($>), (&&), (*), (*>), (+), (-), (/), (/=), (<), (<#>), (<$), (<$>), (<*), (<*>), (<<<), (<=), (<=<), (<>), (<@>), (=<<), (==), (>), (>=), (>=>), (>>=), (>>>), (||))
import Prelude (class Applicative, class Apply, class Bind, class BooleanAlgebra, class Bounded, class Category, class CommutativeRing, class Discard, class DivisionRing, class Eq, class EuclideanRing, class Field, class Functor, class HeytingAlgebra, class Monad, class Monoid, class Ord, class Ring, class Semigroup, class Semigroupoid, class Semiring, class Show, type (~>), Ordering(..), Unit, Void, absurd, add, ap, append, apply, between, bind, bottom, clamp, compare, comparing, compose, conj, const, degree, discard, disj, eq, flap, flip, gcd, identity, ifM, join, lcm, liftA1, liftM1, map, max, mempty, min, mod, mul, negate, not, notEq, one, otherwise, pure, recip, show, sub, top, unit, unless, unlessM, void, when, whenM, zero, (#), ($), ($>), (&&), (*), (*>), (+), (-), (/), (/=), (<), (<#>), (<$), (<$>), (<*), (<*>), (<<<), (<=), (<=<), (<>), (<@>), (=<<), (==), (>), (>=), (>=>), (>>=), (>>>), (||))
import Effect.Console (log)
import Effect.Console (log)
import Effect.Class (class MonadEffect, liftEffect)
import Effect.Class (class MonadEffect, liftEffect)
import Effect.Exception (catchException, throwException)
import Effect.Unsafe (unsafePerformEffect)
-- | JL: Astonishingly, not in the prelude
-- | JL: Astonishingly, not in the prelude
...
@@ -25,5 +27,11 @@ logs:: forall message effect.
...
@@ -25,5 +27,11 @@ logs:: forall message effect.
-> effect Unit
-> effect Unit
logs = liftEffect <<< log <<< show
logs = liftEffect <<< log <<< show
logExceptions :: forall message a b. Show message =>
message -> (a -> b) -> a -> b
logExceptions message f x =
unsafePerformEffect $ do
catchException (\e -> do logs message
logs e
throwException e) do
pure $ f x
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