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
df3a2470
Unverified
Commit
df3a2470
authored
Sep 17, 2018
by
Nicolas Pouillard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Less warnings
parent
791c88fc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
NgramsTable.purs
...Gargantext/Pages/Corpus/Doc/Facets/Terms/NgramsTable.purs
+8
-4
No files found.
src/Gargantext/Pages/Corpus/Doc/Facets/Terms/NgramsTable.purs
View file @
df3a2470
module Gargantext.Pages.Corpus.Doc.Facets.Terms.NgramsTable where
module Gargantext.Pages.Corpus.Doc.Facets.Terms.NgramsTable where
import Data.Array (filter,
fold,
toUnfoldable)
import Data.Array (filter, toUnfoldable)
import Data.Either (Either(..))
import Data.Either (Either(..))
import Data.Newtype (class Newtype, unwrap)
import Data.Newtype (class Newtype, unwrap)
import Data.Lens (Lens', Prism', lens, over, prism)
import Data.Lens (Lens', Prism', lens, over, prism)
...
@@ -10,6 +10,8 @@ import Data.Lens.Iso.Newtype (_Newtype)
...
@@ -10,6 +10,8 @@ import Data.Lens.Iso.Newtype (_Newtype)
import Data.List (List)
import Data.List (List)
import Data.Tuple (Tuple(..), uncurry)
import Data.Tuple (Tuple(..), uncurry)
import Data.Void (Void)
import Data.Void (Void)
import Data.Unit (Unit)
import Effect (Effect)
import Gargantext.Pages.Corpus.Doc.Facets.Terms.NgramsItem as NI
import Gargantext.Pages.Corpus.Doc.Facets.Terms.NgramsItem as NI
import Prelude (class Eq, class Ord, class Show, map, show, void, ($), (*), (+), (-), (/), (<), (<>), (==), (>), (>=))
import Prelude (class Eq, class Ord, class Show, map, show, void, ($), (*), (+), (-), (/), (<), (<>), (==), (>), (>=))
import React (ReactElement)
import React (ReactElement)
...
@@ -56,6 +58,8 @@ _ItemAction = prism (uncurry ItemAction) \ta ->
...
@@ -56,6 +58,8 @@ _ItemAction = prism (uncurry ItemAction) \ta ->
ItemAction i a -> Right (Tuple i a)
ItemAction i a -> Right (Tuple i a)
_ -> Left ta
_ -> Left ta
type Dispatch = Action -> Effect Unit
performAction :: PerformAction State {} Action
performAction :: PerformAction State {} Action
performAction (ChangePageSize ps) _ _ = void (cotransform (\state -> changePageSize ps state ))
performAction (ChangePageSize ps) _ _ = void (cotransform (\state -> changePageSize ps state ))
...
@@ -220,7 +224,7 @@ string2PageSize "50" = PS50
...
@@ -220,7 +224,7 @@ string2PageSize "50" = PS50
string2PageSize "100" = PS100
string2PageSize "100" = PS100
string2PageSize _ = PS10
string2PageSize _ = PS10
sizeDD :: PageSizes ->
_
-> ReactElement
sizeDD :: PageSizes ->
Dispatch
-> ReactElement
sizeDD ps d
sizeDD ps d
= p []
= p []
[ text "Show : "
[ text "Show : "
...
@@ -243,7 +247,7 @@ textDescription currPage pageSize totalRecords
...
@@ -243,7 +247,7 @@ textDescription currPage pageSize totalRecords
end = if end' > totalRecords then totalRecords else end'
end = if end' > totalRecords then totalRecords else end'
pagination ::
_
-> Int -> Int -> ReactElement
pagination ::
Dispatch
-> Int -> Int -> ReactElement
pagination d tp cp
pagination d tp cp
= span [] $
= span [] $
[ text "Pages: "
[ text "Pages: "
...
@@ -314,7 +318,7 @@ pagination d tp cp
...
@@ -314,7 +318,7 @@ pagination d tp cp
lnums = map (\i -> fnmid d i) $ filter (lessthan 1) [cp - 2, cp - 1]
lnums = map (\i -> fnmid d i) $ filter (lessthan 1) [cp - 2, cp - 1]
rnums = map (\i -> fnmid d i) $ filter (greaterthan tp) [cp + 1, cp + 2]
rnums = map (\i -> fnmid d i) $ filter (greaterthan tp) [cp + 1, cp + 2]
fnmid ::
_
-> Int -> ReactElement
fnmid ::
Dispatch
-> Int -> ReactElement
fnmid d i
fnmid d i
= span []
= span []
[ text " "
[ text " "
...
...
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