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
72aeb6ae
Commit
72aeb6ae
authored
Jul 10, 2018
by
Sudhir Kumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renamed some module names
parent
fd1f668f
Changes
29
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
110 additions
and
205 deletions
+110
-205
DecodeMaybe.js
src/Gargantext/Components/GraphExplorer/DecodeMaybe.js
+0
-5
DecodeMaybe.purs
src/Gargantext/Components/GraphExplorer/DecodeMaybe.purs
+0
-17
Types.purs
src/Gargantext/Components/GraphExplorer/Types.purs
+1
-1
Landing.purs
src/Gargantext/Components/Lang/Data/Landing.purs
+1
-3
Lang.purs
src/Gargantext/Components/Lang/Data/Lang.purs
+1
-2
EnUS.purs
src/Gargantext/Components/Lang/Landing/EnUS.purs
+5
-8
FrFR.purs
src/Gargantext/Components/Lang/Landing/FrFR.purs
+5
-8
Login.purs
src/Gargantext/Components/Login.purs
+2
-5
Modal.purs
src/Gargantext/Components/Modals/Modal.purs
+1
-1
RandomText.purs
src/Gargantext/Components/RandomText.purs
+9
-18
Tab.purs
src/Gargantext/Components/Tab.purs
+1
-1
Tree.purs
src/Gargantext/Components/Tree.purs
+1
-1
REST.purs
src/Gargantext/Config/REST.purs
+1
-1
Navigation.purs
src/Gargantext/Navigation.purs
+28
-72
Corpus.purs
src/Gargantext/Pages/Corpus.purs
+1
-1
Document.purs
src/Gargantext/Pages/Corpus/Doc/Document.purs
+8
-10
Facets.purs
src/Gargantext/Pages/Corpus/Doc/Facets.purs
+7
-10
NgramsItem.purs
...argantext/Pages/Corpus/Doc/Facets/5_Terms/NgramsItem.purs
+2
-2
6_Graph.purs
src/Gargantext/Pages/Corpus/Doc/Facets/6_Graph.purs
+6
-7
API.purs
src/Gargantext/Pages/Corpus/User/Users/API.purs
+4
-5
Types.purs
src/Gargantext/Pages/Corpus/User/Users/Types.purs
+3
-3
Lens.purs
src/Gargantext/Pages/Corpus/User/Users/Types/Lens.purs
+1
-1
States.purs
src/Gargantext/Pages/Corpus/User/Users/Types/States.purs
+1
-2
Types.purs
src/Gargantext/Pages/Corpus/User/Users/Types/Types.purs
+4
-3
Home.purs
src/Gargantext/Pages/Home.purs
+12
-13
Router.purs
src/Gargantext/Router.purs
+1
-1
Utils.purs
src/Gargantext/Utils.purs
+1
-1
DecodeMaybe.purs
src/Gargantext/Utils/DecodeMaybe.purs
+1
-1
Main.purs
src/Main.purs
+2
-2
No files found.
src/Gargantext/Components/GraphExplorer/DecodeMaybe.js
deleted
100644 → 0
View file @
fd1f668f
'use strict'
;
exports
.
isNull
=
function
(
v
)
{
return
v
===
null
;
};
src/Gargantext/Components/GraphExplorer/DecodeMaybe.purs
deleted
100644 → 0
View file @
fd1f668f
module GraphExplorer.DecodeMaybe where
import Prelude
import Data.Argonaut (class DecodeJson, JObject, getFieldOptional)
import Data.Either (Either)
import Data.Maybe (Maybe(..))
foreign import isNull :: forall a. a -> Boolean
getFieldOptional' :: forall a. DecodeJson a => JObject -> String -> Either String (Maybe a)
getFieldOptional' o s = (case _ of
Just v -> if isNull v then Nothing else v
Nothing -> Nothing
) <$> (getFieldOptional o s)
infix 7 getFieldOptional' as .?|
src/Gargantext/Components/GraphExplorer/Types.purs
View file @
72aeb6ae
module GraphExplorer.Types where
module G
argantext.Components.G
raphExplorer.Types where
import Prelude
...
...
src/Gargantext/Components/Lang/Data/Landing.purs
View file @
72aeb6ae
module Gargantext.Data.Landing
where
module Gargantext.Components.Data.Landing where
data LandingData = LandingData { name :: String
...
...
@@ -24,4 +23,3 @@ data Button = Button { title :: String
, text :: String
, href :: String
}
src/Gargantext/Components/Lang/Data/Lang.purs
View file @
72aeb6ae
module Gargantext.Data.Lang
where
module Gargantext.Components.Data.Lang where
data Lang = EN | FR
src/Gargantext/Components/Lang/Landing/EnUS.purs
View file @
72aeb6ae
module Gargantext.Lang.Landing.EnUS
where
module Gargantext.Components.Lang.Landing.EnUS where
import Gargantext.Data.Landing
import Gargantext.
Components.
Data.Landing
landingData :: LandingData
landingData = LandingData { name : "Gargantext"
...
...
@@ -44,5 +43,3 @@ blockTexts = [ BlockText { title : "Random sentences in Gargantua's Books chapte
}
}
]
src/Gargantext/Components/Lang/Landing/FrFR.purs
View file @
72aeb6ae
module Gargantext.Lang.Landing.FrFR
where
module Gargantext.Components.Lang.Landing.FrFR where
import Gargantext.Data.Landing
import Gargantext.
Components.
Data.Landing
landingData :: LandingData
landingData = LandingData { name : "Gargantext"
...
...
@@ -44,5 +43,3 @@ blockTexts = [ BlockText { title : "Phrases aléatoires issues de l'oeuvre de Fr
}
}
]
src/Gargantext/Components/Login.purs
View file @
72aeb6ae
module Login where
module
Gargantext.Components.
Login where
import Prelude hiding (div)
import Control.Monad.Aff (Aff, attempt)
import Control.Monad.Aff.Class (liftAff)
import Control.Monad.Aff.Console (log)
import Control.Monad.Cont.Trans (lift)
import Control.Monad.Eff (Eff)
import Control.Monad.Eff.Class (liftEff)
import Control.Monad.Eff.Console (CONSOLE)
...
...
@@ -19,19 +18,17 @@ import Data.HTTP.Method (Method(..))
import Data.Lens (over)
import Data.Maybe (Maybe(..))
import Data.MediaType.Common (applicationJSON)
import Modal (modalHide)
import
Gargantext.Components.Modals.
Modal (modalHide)
import Network.HTTP.Affjax (AJAX, affjax, defaultRequest)
import Network.HTTP.RequestHeader (RequestHeader(..))
import React.DOM (a, button, div, h2, h4, h5, i, input, label, p, span, text)
import React.DOM.Props (_data, _id, _type, aria, className, href, maxLength, name, onClick, onInput, placeholder, role, target, value)
import Routing.Hash.Aff (setHash)
import Thermite (PerformAction, Render, Spec, _render, modifyState, simpleSpec)
import Unsafe.Coerce (unsafeCoerce)
-- TODO: ask for login (modal) or account creation after 15 mn when user is not logged and has made one search at least
newtype State = State
{ username :: String
, password :: String
...
...
src/Gargantext/Components/Modals/Modal.purs
View file @
72aeb6ae
module Modal where
module
Gargantext.Components.Modals.
Modal where
import Control.Monad.Eff (Eff)
import Prelude (Unit)
...
...
src/Gargantext/Components/RandomText.purs
View file @
72aeb6ae
...
...
@@ -17,27 +17,18 @@ randomChars : randomizes chars in a word.
TODO: add some tests as examples.
-}
module Gargantext.RandomText where
module Gargantext.
Components.
RandomText where
import Prelude
import Control.Monad.Eff (Eff
(..)
)
import Control.Monad.Eff.Random (RANDOM
(..)
, randomInt)
import Control.Monad.Eff (Eff)
import Control.Monad.Eff.Random (RANDOM, randomInt)
import Data.Array (drop, dropEnd, filter, foldl, head, length, tail, take, takeEnd, (!!))
import Data.Maybe (Maybe(Nothing, Just), fromJust)
import Data.Array ( length, (!!), filter, foldl
, head, tail
, take, takeEnd
, drop, dropEnd
)
import Data.String ( toCharArray, fromCharArray
, split, Pattern(..)
)
import Data.Tuple.Nested ((/\))
import Data.String (Pattern(..), fromCharArray, split, toCharArray)
import Partial (crash)
import Partial.Unsafe (unsafePartial)
import Unsafe.Coerce (unsafeCoerce)
-------------------------------------------------------------------
randomSentences :: forall a. String -> Eff ( random :: RANDOM | a ) String
...
...
src/Gargantext/Components/Tab.purs
View file @
72aeb6ae
module Tab where
module
Gargantext.Components.
Tab where
import Data.Array (fold)
import Data.Lens (Lens', Prism', over, view)
...
...
src/Gargantext/Components/Tree.purs
View file @
72aeb6ae
module
N
Tree where
module
Gargantext.Components.
Tree where
import Prelude hiding (div)
...
...
src/Gargantext/Config/REST.purs
View file @
72aeb6ae
module Gargantext.REST where
module Gargantext.
Config.
REST where
import Data.Argonaut
import Data.HTTP.Method (Method(..))
...
...
src/Gargantext/Navigation.purs
View file @
72aeb6ae
This diff is collapsed.
Click to expand it.
src/Gargantext/Pages/Corpus.purs
View file @
72aeb6ae
...
...
@@ -21,7 +21,7 @@ import Data.Maybe (Maybe(..), fromMaybe)
import Data.MediaType.Common (applicationJSON)
import Data.Tuple (Tuple(..))
import Landing as L
import Modal (modalHide)
import
Gargantext.Components.Modals.
Modal (modalHide)
import Network.HTTP.Affjax (AJAX, affjax, defaultRequest)
import Network.HTTP.RequestHeader (RequestHeader(..))
import Prelude hiding (div)
...
...
src/Gargantext/Pages/Corpus/Doc/Document.purs
View file @
72aeb6ae
module DocView where
import Data.Argonaut
import Data.Generic (class Generic, gShow)
import Prelude
import Gargantext.Charts.ECharts
import Gargantext.Chart (p'')
import Gargantext.Dashboard (globalPublis)
import Control.Monad.Eff.Class (liftEff)
import Control.Monad.Aff (Aff, attempt)
import Control.Monad.Aff.Class (liftAff)
import Control.Monad.Cont.Trans (lift)
import Control.Monad.Eff (Eff)
import Control.Monad.Eff.Class (liftEff)
import Control.Monad.Eff.Console (CONSOLE, log)
import DOM (DOM)
import DOM.HTML (window) as DOM
...
...
@@ -19,16 +14,21 @@ import DOM.HTML.Types (htmlDocumentToParentNode) as DOM
import DOM.HTML.Window (document) as DOM
import DOM.Node.ParentNode (QuerySelector(..))
import DOM.Node.ParentNode (querySelector) as DOM
import Data.Argonaut
import Data.Array (filter, replicate)
import Data.Either (Either(..))
import Data.Generic (class Generic, gShow)
import Data.HTTP.Method (Method(..))
import Data.Maybe (fromJust)
import Data.MediaType.Common (applicationJSON)
import Data.Tuple (Tuple(..))
import Gargantext.Chart (p'')
import Gargantext.Charts.ECharts
import Gargantext.Dashboard (globalPublis)
import Gargantext.Config.REST (get)
import Network.HTTP.Affjax (AJAX, affjax, defaultRequest)
import Network.HTTP.RequestHeader (RequestHeader(..))
import Partial.Unsafe (unsafePartial)
import Prelude (class Eq, class Ord, class Show, Unit, bind, map, not, pure, show, void, ($), (*), (+), (-), (/), (<), (<$>), (<>), (==), (>), (>=), (>>=))
import React (ReactElement)
import React as R
import React.DOM (a, b, b', br', div, h3, i, input, li, option, select, span, table, tbody, td, text, thead, th, tr, ul, nav)
...
...
@@ -37,8 +37,6 @@ import ReactDOM as RDOM
import Thermite (PerformAction, Render, Spec, cotransform, createReactSpec, defaultPerformAction, modifyState, simpleSpec)
import Unsafe.Coerce (unsafeCoerce)
import Gargantext.REST (get)
--main :: forall e. Eff (dom:: DOM, console :: CONSOLE, ajax :: AJAX | e) Unit
--main = do
...
...
src/Gargantext/Pages/Corpus/Doc/Facets.purs
View file @
72aeb6ae
module Tabview where
import Prelude hiding (div)
import Authorview as AV
import Control.Monad.Eff.Console (CONSOLE)
import DOM (DOM)
import Data.Array (fold)
import Data.Either (Either(..))
import Data.Lens (Lens', Prism', lens,
over, prism, view
)
import Data.List (
List,
fromFoldable)
import Data.Lens (Lens', Prism', lens,
prism
)
import Data.List (fromFoldable)
import Data.Tuple (Tuple(..))
import DocView as DV
import Gargantext.Components.Tab as Tab
import Network.HTTP.Affjax (AJAX)
import Prelude hiding (div)
import React.DOM (a, div, li, text, ul)
import React.DOM.Props (_data, _id, aria, className, href, role)
import Sourceview as SV
import Tab (tabs)
import Tab as Tab
import Termsview as TV
import Thermite (
Render, Spec, _performAction, _render, defaultPerformAction, defaultRender, focus, focusState, simpleSpec, withState
)
import Thermite (
Spec, focus
)
data Action
= DocviewA DV.Action
...
...
@@ -117,7 +114,7 @@ _tabAction = prism TabViewA \ action ->
tab1 :: forall eff props. Spec ( dom :: DOM, console :: CONSOLE, ajax :: AJAX| eff) State props Action
tab1 = tabs _tablens _tabAction $ fromFoldable [ Tuple "Doc View" docPageSpec
tab1 =
Tab.
tabs _tablens _tabAction $ fromFoldable [ Tuple "Doc View" docPageSpec
, Tuple "Author View" authorPageSpec
, Tuple "Source View" sourcePageSpec
, Tuple "Terms View" termsPageSpec
...
...
src/Gargantext/Pages/Corpus/Doc/Facets/5_Terms/NgramsItem.purs
View file @
72aeb6ae
...
...
@@ -8,9 +8,9 @@ import Data.Newtype (class Newtype)
import Network.HTTP.Affjax (AJAX)
import React (ReactElement)
import React.DOM (input, span, td, text, tr)
import React.DOM.Props (_type, checked, className,
color,
onChange, style, title)
import React.DOM.Props (_type, checked, className, onChange, style, title)
import Thermite (PerformAction, Render, Spec, modifyState, simpleSpec)
import Utils (getter, setter)
import
Gargantext.
Utils (getter, setter)
newtype State = State
{ term :: Term
...
...
src/Gargantext/Pages/Corpus/Doc/Facets/6_Graph.purs
View file @
72aeb6ae
...
...
@@ -10,26 +10,25 @@ import Control.Monad.Eff.Console (CONSOLE, log)
import Control.Monad.Eff.Unsafe (unsafePerformEff)
import DOM (DOM)
import Data.Argonaut (decodeJson)
import Data.Array (length, mapWithIndex,
take,
(!!))
import Data.Array (length, mapWithIndex, (!!))
import Data.Either (Either(..))
import Data.HTTP.Method (Method(..))
import Data.Int (toNumber)
import Data.Maybe (Maybe(..), fromJust)
import Data.MediaType.Common (applicationJSON)
import Data.Newtype (class Newtype)
import Gargantext.Components.GraphExplorer.Types (Cluster(..), Edge(..), GraphData(..), Legend(..), Node(..), getLegendData)
import Gargantext.Utils (getter)
import GraphExplorer.Sigmajs (Color(Color), SigmaEasing, SigmaGraphData(SigmaGraphData), SigmaNode, SigmaSettings, canvas, edgeShape, edgeShapes, forceAtlas2, sStyle, sigma, sigmaEasing, sigmaEdge, sigmaEnableWebGL, sigmaNode, sigmaSettings)
import GraphExplorer.Types (Cluster(..), Edge(..), GraphData(..), Legend(..), Node(..), getLegendData)
import Math (cos, sin)
import Network.HTTP.Affjax (AJAX, affjax, defaultRequest)
import Network.HTTP.RequestHeader (RequestHeader(..))
import Partial.Unsafe (unsafePartial)
import Prelude (map)
import React (ReactElement, createElement)
import React (ReactElement)
import React.DOM (a, br', button, div, form', input, li, li', menu, option, p, select, span, text, ul, ul')
import React.DOM.Props (_
data, _id, _type, aria, checked, className, href, name, onChange, placeholder, role
, style, title, value)
import React.DOM.Props (_
id, _type, checked, className, href, name, onChange, placeholder
, style, title, value)
import Thermite (PerformAction, Render, Spec, modifyState, simpleSpec)
import Unsafe.Coerce (unsafeCoerce)
import Utils (getter)
data Action = NoOp
| LoadGraph String
...
...
src/Gargantext/Pages/Corpus/User/Users/API.purs
View file @
72aeb6ae
module Gargantext.Users.API
where
module Gargantext.Users.API where
import
Gargantext.Users.Types
import
Prelude
import Gargantext.Users.Types (Action(..), State, User, _user)
import Control.Monad.Aff (Aff)
import Control.Monad.Aff.Console (CONSOLE, log)
import Control.Monad.Trans.Class (lift)
...
...
@@ -10,9 +10,8 @@ import DOM (DOM)
import Data.Either (Either(..))
import Data.Lens (set)
import Data.Maybe (Maybe(..))
import Gargantext.REST (get)
import Gargantext.
Config.
REST (get)
import Network.HTTP.Affjax (AJAX)
import Prelude (bind, id, show, void, ($), (<<<), (<>))
import Thermite (PerformAction, modifyState)
getUser :: forall eff. Int -> Aff
...
...
src/Gargantext/Pages/Corpus/User/Users/Types.purs
View file @
72aeb6ae
...
...
@@ -8,19 +8,19 @@ module Gargantext.Users.Types
)
where
import Prelude (($))
import Gargantext.Users.Types.Lens
import Gargantext.Users.Types.Types
import Gargantext.Users.Types.States
import Brevets as B
import Control.Monad.Aff.Console (CONSOLE)
import DOM (DOM)
import Data.List (fromFoldable)
import Data.Tuple (Tuple(..))
import Network.HTTP.Affjax (AJAX)
import Prelude (($))
import Projects as PS
import Tab (tabs)
import
Gargantext.Components.
Tab (tabs)
import Thermite (Spec, focus)
brevetSpec :: forall eff props. Spec (dom :: DOM, console::CONSOLE, ajax :: AJAX | eff) State props Action
...
...
src/Gargantext/Pages/Corpus/User/Users/Types/Lens.purs
View file @
72aeb6ae
...
...
@@ -11,7 +11,7 @@ import Gargantext.Users.Types.Types (User)
import Network.HTTP.Affjax (AJAX)
import Projects as PS
import Publications as P
import Tab as Tab
import
Gargantext.Components.
Tab as Tab
import Thermite (Spec, focus)
_user :: Lens' State (Maybe User)
...
...
src/Gargantext/Pages/Corpus/User/Users/Types/States.purs
View file @
72aeb6ae
...
...
@@ -6,7 +6,7 @@ import Data.Maybe (Maybe(..))
import Gargantext.Users.Types.Types (User)
import Projects as PS
import Publications as P
import Tab as Tab
import
Gargantext.Components.
Tab as Tab
data Action
= NoOp
...
...
@@ -32,4 +32,3 @@ initialState =
, projects : PS.initialState
, user: Nothing
}
src/Gargantext/Pages/Corpus/User/Users/Types/Types.purs
View file @
72aeb6ae
module Gargantext.Users.Types.Types where
import Prelude
import Data.Argonaut (class DecodeJson, decodeJson, (.?))
import Data.Generic (class Generic)
import Data.Maybe (Maybe)
import Prelude (bind, pure, ($))
import DecodeMaybe
import Gargantext.Utils.DecodeMaybe ((.?|))
newtype User =
User {
...
...
src/Gargantext/Pages/Home.purs
View file @
72aeb6ae
module Landing where
import Gargantext.Data.Landing
import Gargantext.Data.Lang
import Prelude hiding (div)
import Control.Monad.Cont.Trans (lift)
import Control.Monad.Eff.Console (CONSOLE)
import DOM (DOM)
import Gargantext.Lang.Landing.EnUS as En
import Gargantext.Lang.Landing.FrFR as Fr
import Gargantext.Components.Lang.Landing.EnUS as En
import Gargantext.Components.Lang.Landing.FrFR as Fr
import Gargantext.Components.Data.Landing (BlockText(..), BlockTexts(..), Button(..), LandingData(..))
import Gargantext.Components.Data.Lang (Lang(..))
import Network.HTTP.Affjax (AJAX)
import React (ReactElement)
import React.DOM (a,
button, div, footer, h1, h3, hr, i, img, li, p, span, text, ul
)
import React.DOM.Props (Props, _
data, _id, aria, className, href, onClick, role, src, style, tabIndex
, target, title)
import React.DOM (a,
div, h3, i, img, p, span, text
)
import React.DOM.Props (Props, _
id, aria, className, href, src
, target, title)
import Routing.Hash.Aff (setHash)
import Thermite (PerformAction, Render, Spec, simpleSpec)
import Thermite as T
import Thermite (PerformAction, Render, Spec, modifyState, simpleSpec)
newtype State = State
{ userName :: String
...
...
@@ -43,21 +42,21 @@ performAction :: forall eff props. PerformAction ( console :: CONSOLE
| eff
) State props Action
performAction NoOp _ _ = void do
T.
modifyState \state -> state
modifyState \state -> state
performAction Documentation _ _ = void do
T.
modifyState \state -> state
modifyState \state -> state
performAction Enter _ _ = void do
lift $ setHash "/search"
T.
modifyState \state -> state
modifyState \state -> state
performAction Login _ _ = void do
lift $ setHash "/login"
T.
modifyState \state -> state
modifyState \state -> state
performAction SignUp _ _ = void do
T.
modifyState \state -> state
modifyState \state -> state
-- Layout |
...
...
src/Gargantext/Router.purs
View file @
72aeb6ae
module
Page
Router where
module
Gargantext.
Router where
import Prelude
...
...
src/Gargantext/Utils.purs
View file @
72aeb6ae
module Utils where
module
Gargantext.
Utils where
import Prelude
...
...
src/Gargantext/Utils/DecodeMaybe.purs
View file @
72aeb6ae
module DecodeMaybe where
module
Gargantext.Utils.
DecodeMaybe where
import Prelude
...
...
src/Main.purs
View file @
72aeb6ae
...
...
@@ -11,9 +11,9 @@ import DOM.HTML.Window (document) as DOM
import DOM.Node.ParentNode (QuerySelector(..))
import DOM.Node.ParentNode (querySelector) as DOM
import Data.Maybe (fromJust)
import Navigation (dispatchAction, initAppState, layoutSpec)
import Gargantext.Navigation (dispatchAction, initAppState, layoutSpec)
import Gargantext.Router (routeHandler, routing)
import Network.HTTP.Affjax (AJAX)
import PageRouter (routeHandler, routing)
import Partial.Unsafe (unsafePartial)
import React as R
import ReactDOM as RDOM
...
...
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