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
42ff8c72
Unverified
Commit
42ff8c72
authored
Sep 13, 2018
by
Nicolas Pouillard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use {} instead of forall props in specs
parent
246ab19a
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
93 additions
and
94 deletions
+93
-94
Login.purs
src/Gargantext/Components/Login.purs
+4
-4
Tree.purs
src/Gargantext/Components/Tree.purs
+3
-3
Corpus.purs
src/Gargantext/Pages/Corpus.purs
+3
-3
Annotation.purs
src/Gargantext/Pages/Corpus/Doc/Annotation.purs
+3
-3
Authors.purs
src/Gargantext/Pages/Corpus/Doc/Facets/Authors.purs
+3
-4
Dashboard.purs
src/Gargantext/Pages/Corpus/Doc/Facets/Dashboard.purs
+3
-3
Documents.purs
src/Gargantext/Pages/Corpus/Doc/Facets/Documents.purs
+4
-4
Graph.purs
src/Gargantext/Pages/Corpus/Doc/Facets/Graph.purs
+5
-5
Sources.purs
src/Gargantext/Pages/Corpus/Doc/Facets/Sources.purs
+3
-3
Specs.purs
src/Gargantext/Pages/Corpus/Doc/Facets/Specs.purs
+5
-5
Terms.purs
src/Gargantext/Pages/Corpus/Doc/Facets/Terms.purs
+3
-3
NgramsItem.purs
src/Gargantext/Pages/Corpus/Doc/Facets/Terms/NgramsItem.purs
+3
-3
NgramsTable.purs
...Gargantext/Pages/Corpus/Doc/Facets/Terms/NgramsTable.purs
+3
-3
Brevets.purs
src/Gargantext/Pages/Corpus/User/Brevets.purs
+3
-3
API.purs
src/Gargantext/Pages/Corpus/User/Users/API.purs
+1
-1
Specs.purs
src/Gargantext/Pages/Corpus/User/Users/Specs.purs
+1
-1
Documents.purs
src/Gargantext/Pages/Corpus/User/Users/Specs/Documents.purs
+3
-3
Renders.purs
src/Gargantext/Pages/Corpus/User/Users/Specs/Renders.purs
+1
-1
Types.purs
src/Gargantext/Pages/Corpus/User/Users/Types.purs
+4
-5
Lens.purs
src/Gargantext/Pages/Corpus/User/Users/Types/Lens.purs
+1
-1
Folder.purs
src/Gargantext/Pages/Folder.purs
+3
-3
Actions.purs
src/Gargantext/Pages/Home/Actions.purs
+1
-1
Specs.purs
src/Gargantext/Pages/Home/Specs.purs
+3
-3
Actions.purs
src/Gargantext/Pages/Layout/Actions.purs
+1
-1
Specs.purs
src/Gargantext/Pages/Layout/Specs.purs
+18
-17
Actions.purs
src/Gargantext/Pages/Layout/Specs/AddCorpus/Actions.purs
+1
-1
Specs.purs
src/Gargantext/Pages/Layout/Specs/AddCorpus/Specs.purs
+4
-4
Search.purs
src/Gargantext/Pages/Layout/Specs/Search.purs
+3
-3
No files found.
src/Gargantext/Components/Login.purs
View file @
42ff8c72
...
...
@@ -52,7 +52,7 @@ data Action
| SetPassword String
performAction ::
forall props. PerformAction State props
Action
performAction ::
PerformAction State {}
Action
performAction NoOp _ _ = void do
modifyState identity
...
...
@@ -107,13 +107,13 @@ modalSpec sm t = over _render \render d p s c ->
]
]
spec' ::
forall props. Spec State props
Action
spec' ::
Spec State {}
Action
spec' = modalSpec true "Login" renderSpec
renderSpec ::
forall props. Spec State props
Action
renderSpec ::
Spec State {}
Action
renderSpec = simpleSpec performAction render
where
render :: Render State
props
Action
render :: Render State
{}
Action
render dispatch _ (State state) _ =
[
div [className "row"]
...
...
src/Gargantext/Components/Tree.purs
View file @
42ff8c72
...
...
@@ -33,7 +33,7 @@ type State = FTree
initialState :: State
initialState = NLeaf (Tuple "" "")
performAction ::
forall props. PerformAction State props
Action
performAction ::
PerformAction State {}
Action
performAction (ToggleFolder i) _ _ = void $
cotransform (\td -> toggleNode i td)
...
...
@@ -89,10 +89,10 @@ nodeOptionsView activated = case activated of
false -> []
treeview ::
forall props. Spec State props
Action
treeview ::
Spec State {}
Action
treeview = simpleSpec performAction render
where
render :: Render State
props
Action
render :: Render State
{}
Action
render dispatch _ state _ =
[div [className "tree"] [toHtml dispatch state]]
...
...
src/Gargantext/Pages/Corpus.purs
View file @
42ff8c72
...
...
@@ -24,15 +24,15 @@ type Corpus = { title :: String
initialState :: State
initialState = Tab.initialState
spec' ::
forall props. Spec Tab.State props
Tab.Action
spec' ::
Spec Tab.State {}
Tab.Action
spec' = fold [ corpusSpec
, Tab.tab1
]
corpusSpec ::
forall props. Spec Tab.State props
Tab.Action
corpusSpec ::
Spec Tab.State {}
Tab.Action
corpusSpec = simpleSpec defaultPerformAction render
where
render :: Render Tab.State
props
Tab.Action
render :: Render Tab.State
{}
Tab.Action
render dispatch _ state _ =
[ div [className "row"]
[ div [className "col-md-3"] [ h3 [] [text corpus.title] ]
...
...
src/Gargantext/Pages/Corpus/Doc/Annotation.purs
View file @
42ff8c72
...
...
@@ -27,7 +27,7 @@ data Action
| SetInput String
performAction ::
forall props. PerformAction State props
Action
performAction ::
PerformAction State {}
Action
performAction NoOp _ _ = pure unit
performAction (ChangeString ps) _ _ = pure unit
...
...
@@ -39,10 +39,10 @@ performAction (SetInput ps) _ _ = void do
docview ::
forall props. Spec State props
Action
docview ::
Spec State {}
Action
docview = simpleSpec performAction render
where
render :: Render State
props
Action
render :: Render State
{}
Action
render dispatch _ state _ =
[
div [className "container1"]
...
...
src/Gargantext/Pages/Corpus/Doc/Facets/Authors.purs
View file @
42ff8c72
...
...
@@ -14,13 +14,12 @@ initialState = D.tdata
type Action = D.Action
authorSpec :: forall props. Spec State props Action
authorSpec :: Spec State {} Action
authorSpec = simpleSpec defaultPerformAction render
where
render :: Render State
props
Action
render :: Render State
{}
Action
render dispatch _ state _ =
[ h3 [] [text "AuthorView"]]
authorspec' ::
forall props. Spec State props
Action
authorspec' ::
Spec State {}
Action
authorspec' = fold [authorSpec, D.layoutDocview]
src/Gargantext/Pages/Corpus/Doc/Facets/Dashboard.purs
View file @
42ff8c72
...
...
@@ -19,10 +19,10 @@ data Action = None
initialState :: State
initialState = unit
performAction ::
forall props. PerformAction State props
Action
performAction ::
PerformAction State {}
Action
performAction _ _ _ = pure unit
render ::
forall props. Render State props
Action
render ::
Render State {}
Action
render dispatch _ state _ = [
h1 [] [text "IMT DashBoard"]
, div [className "row"] [ div [className "col-md-9 content"] [chart globalPublis]
...
...
@@ -104,5 +104,5 @@ distriBySchool = Options { mainTitle : "School production in 2017"
}
layoutDashboard ::
forall props. Spec State props
Action
layoutDashboard ::
Spec State {}
Action
layoutDashboard = simpleSpec performAction render
src/Gargantext/Pages/Corpus/Doc/Facets/Documents.purs
View file @
42ff8c72
...
...
@@ -133,17 +133,17 @@ instance decodeResponse :: DecodeJson Response where
-- | Filter
filterSpec ::
forall props. Spec State props
Action
filterSpec ::
Spec State {}
Action
filterSpec = simpleSpec defaultPerformAction render
where
render d p s c = [div [] [ text " Filter "
, input []
]]
layoutDocview ::
forall props. Spec State props
Action
layoutDocview ::
Spec State {}
Action
layoutDocview = simpleSpec performAction render
where
render :: Render State
props
Action
render :: Render State
{}
Action
render dispatch _ state@(TableData d) _ =
[ div [className "container1"]
[ div [className "row"]
...
...
@@ -177,7 +177,7 @@ layoutDocview = simpleSpec performAction render
]
performAction ::
forall props. PerformAction State props
Action
performAction ::
PerformAction State {}
Action
performAction (ChangePageSize ps) _ _ = void (cotransform (\state -> changePageSize ps state ))
performAction (ChangePage p) _ _ = void (cotransform (\(TableData td) -> TableData $ td { currentPage = p} ))
...
...
src/Gargantext/Pages/Corpus/Doc/Facets/Graph.purs
View file @
42ff8c72
...
...
@@ -54,10 +54,10 @@ initialState = State
, selectedNode : Nothing
}
graphSpec ::
forall props. Spec State props
Action
graphSpec ::
Spec State {}
Action
graphSpec = simpleSpec performAction render
performAction ::
forall props. PerformAction State props
Action
performAction ::
PerformAction State {}
Action
performAction (LoadGraph fp) _ _ = void do
_ <- liftEffect $ log fp
case fp of
...
...
@@ -97,7 +97,7 @@ convert (GraphData r) = SigmaGraphData { nodes, edges}
edges = map edgeFn r.edges
edgeFn (Edge e) = sigmaEdge {id : e.id_, source : e.source, target : e.target}
render ::
forall props. Render State props
Action
render ::
Render State {}
Action
render d p (State s) c =
[ select [ onChange $ \e -> d $ LoadGraph (unsafeCoerce e).target.value, value s.filePath]
[ option [value ""] [text ""]
...
...
@@ -296,10 +296,10 @@ dispLegend ary = div [] $ map dl ary
]
specOld ::
forall props. Spec State props
Action
specOld ::
Spec State {}
Action
specOld = simpleSpec performAction render'
where
render' :: Render State
props
Action
render' :: Render State
{}
Action
render' d _ (State st) _ =
[ div [className "row"] [
div [className "col-md-12", style {marginTop : "21px", marginBottom : "21px"}]
...
...
src/Gargantext/Pages/Corpus/Doc/Facets/Sources.purs
View file @
42ff8c72
...
...
@@ -16,12 +16,12 @@ initialState = D.tdata
type Action = D.Action
sourceSpec ::
forall props. Spec State props
Action
sourceSpec ::
Spec State {}
Action
sourceSpec = simpleSpec defaultPerformAction render
where
render :: Render State
props
Action
render :: Render State
{}
Action
render dispatch _ state _ =
[ h3 [] [text "Source view"]]
sourcespec' ::
forall props. Spec State props
Action
sourcespec' ::
Spec State {}
Action
sourcespec' = fold [sourceSpec, D.layoutDocview]
src/Gargantext/Pages/Corpus/Doc/Facets/Specs.purs
View file @
42ff8c72
...
...
@@ -19,21 +19,21 @@ import Thermite (Spec, focus)
tab1 ::
forall props. Spec State props
Action
tab1 ::
Spec State {}
Action
tab1 = Tab.tabs _tablens _tabAction $ fromFoldable [ Tuple "Doc View" docPageSpec
, Tuple "Author View" authorPageSpec
, Tuple "Source View" sourcePageSpec
, Tuple "Terms View" termsPageSpec
]
docPageSpec ::
forall props. Spec State props
Action
docPageSpec ::
Spec State {}
Action
docPageSpec = focus _doclens _docAction DV.layoutDocview
authorPageSpec ::
forall props. Spec State props
Action
authorPageSpec ::
Spec State {}
Action
authorPageSpec = focus _authorlens _authorAction AV.authorspec'
sourcePageSpec ::
forall props. Spec State props
Action
sourcePageSpec ::
Spec State {}
Action
sourcePageSpec = focus _sourcelens _sourceAction SV.sourcespec'
termsPageSpec ::
forall props. Spec State props
Action
termsPageSpec ::
Spec State {}
Action
termsPageSpec = focus _termslens _termsAction TV.termSpec'
src/Gargantext/Pages/Corpus/Doc/Facets/Terms.purs
View file @
42ff8c72
...
...
@@ -17,12 +17,12 @@ initialState = D.tdata
type Action = D.Action
termsSpec ::
forall props. Spec State props
Action
termsSpec ::
Spec State {}
Action
termsSpec = simpleSpec defaultPerformAction render
where
render :: Render State
props
Action
render :: Render State
{}
Action
render dispatch _ state _ =
[ h3 [] [text "Terms view"]]
termSpec' ::
forall props. Spec State props
Action
termSpec' ::
Spec State {}
Action
termSpec' = fold [termsSpec, D.layoutDocview]
src/Gargantext/Pages/Corpus/Doc/Facets/Terms/NgramsItem.purs
View file @
42ff8c72
...
...
@@ -33,17 +33,17 @@ data Action
= SetMap Boolean
| SetStop Boolean
performAction ::
forall props. PerformAction State props
Action
performAction ::
PerformAction State {}
Action
performAction (SetMap b) _ _ = void do
modifyState \(State s) -> State s {term = setter (_{_type = (if b then MapTerm else None)}) s.term}
performAction (SetStop b) _ _ = void do
modifyState \(State s) -> State s {term = setter (_{_type = (if b then StopTerm else None)}) s.term}
ngramsItemSpec ::
forall props. Spec State props
Action
ngramsItemSpec ::
Spec State {}
Action
ngramsItemSpec = simpleSpec performAction render
where
render :: Render State
props
Action
render :: Render State
{}
Action
render dispatch _ (State state) _ =
[
tr []
...
...
src/Gargantext/Pages/Corpus/Doc/Facets/Terms/NgramsTable.purs
View file @
42ff8c72
...
...
@@ -51,7 +51,7 @@ _ItemAction = prism (uncurry ItemAction) \ta ->
ItemAction i a -> Right (Tuple i a)
_ -> Left ta
performAction ::
forall props. PerformAction State props
Action
performAction ::
PerformAction State {}
Action
performAction (ChangePageSize ps) _ _ = void (cotransform (\state -> changePageSize ps state ))
...
...
@@ -70,7 +70,7 @@ performAction (SetInput s) _ _ = void do
performAction _ _ _ = void do
modifyState \(State state) -> State $ state
tableSpec ::
forall props .Spec State props Action -> Spec State props
Action
tableSpec ::
Spec State {} Action -> Spec State {}
Action
tableSpec = over _render \render dispatch p (State s) c ->
[div [className "container-fluid"]
[
...
...
@@ -147,7 +147,7 @@ tableSpec = over _render \render dispatch p (State s) c ->
]
]
ngramsTableSpec ::
forall props . Spec State props
Action
ngramsTableSpec ::
Spec State {}
Action
ngramsTableSpec = container $ fold
[ tableSpec $ withState \st ->
focus _itemsList _ItemAction $
...
...
src/Gargantext/Pages/Corpus/User/Brevets.purs
View file @
42ff8c72
...
...
@@ -11,13 +11,13 @@ initialState = ""
data Action = NoOp
performAction ::
forall props. PerformAction State props
Action
performAction ::
PerformAction State {}
Action
performAction NoOp _ _ = void do
modifyState identity
brevetsSpec ::
forall props. Spec State props
Action
brevetsSpec ::
Spec State {}
Action
brevetsSpec = simpleSpec performAction render
where
render :: Render State
props
Action
render :: Render State
{}
Action
render dispatch _ state _ =
[]
src/Gargantext/Pages/Corpus/User/Users/API.purs
View file @
42ff8c72
...
...
@@ -17,7 +17,7 @@ getUser :: Int -> Aff (Either String User)
getUser id = get $ "http://localhost:8008/node/" <> show id
performAction ::
forall props. PerformAction State props
Action
performAction ::
PerformAction State {}
Action
performAction NoOp _ _ = void do
modifyState identity
performAction (FetchUser userId) _ _ = void do
...
...
src/Gargantext/Pages/Corpus/User/Users/Specs.purs
View file @
42ff8c72
...
...
@@ -9,5 +9,5 @@ import Thermite (Spec, simpleSpec)
import Gargantext.Pages.Corpus.User.Users.Types (Action, State)
import Gargantext.Pages.Corpus.User.Users.API (performAction)
layoutUser ::
forall props. Spec State props
Action
layoutUser ::
Spec State {}
Action
layoutUser = simpleSpec performAction render
src/Gargantext/Pages/Corpus/User/Users/Specs/Documents.purs
View file @
42ff8c72
...
...
@@ -13,14 +13,14 @@ initialState = ""
data Action = NoOp
performAction ::
forall props. PerformAction State props
Action
performAction ::
PerformAction State {}
Action
performAction NoOp _ _ = void do
modifyState identity
publicationSpec ::
forall props. Spec State props
Action
publicationSpec ::
Spec State {}
Action
publicationSpec = simpleSpec performAction render
where
render :: Render State
props
Action
render :: Render State
{}
Action
render dispatch _ state _ =
[ table [ className "table"]
[ thead [ className "thead-dark"]
...
...
src/Gargantext/Pages/Corpus/User/Users/Specs/Renders.purs
View file @
42ff8c72
...
...
@@ -12,7 +12,7 @@ import React.DOM.Props (_id, className, src)
import Thermite (Render)
render ::
forall props. Render State props
Action
render ::
Render State {}
Action
render dispatch _ state _ =
[
div [className "col-md-12"]
...
...
src/Gargantext/Pages/Corpus/User/Users/Types.purs
View file @
42ff8c72
...
...
@@ -20,16 +20,15 @@ import Gargantext.Pages.Folder as PS
import Gargantext.Components.Tab (tabs)
import Thermite (Spec, focus)
brevetSpec ::
forall props. Spec State props
Action
brevetSpec ::
Spec State {}
Action
brevetSpec = focus _brevetslens _brevetsAction B.brevetsSpec
projectSpec ::
forall props. Spec State props
Action
projectSpec ::
Spec State {}
Action
projectSpec = focus _projectslens _projectsAction PS.projets
facets :: forall props. Spec State props Action
facets :: Spec State {} Action
facets = tabs _tablens _tabAction $ fromFoldable
[ Tuple "Publications (12)" publicationSpec
, Tuple "Brevets (2)" brevetSpec
, Tuple "Projets IMT (5)" projectSpec
]
]
src/Gargantext/Pages/Corpus/User/Users/Types/Lens.purs
View file @
42ff8c72
...
...
@@ -32,7 +32,7 @@ _pubAction = prism PublicationA \ action ->
PublicationA laction -> Right laction
_-> Left action
publicationSpec ::
forall props. Spec State props
Action
publicationSpec ::
Spec State {}
Action
publicationSpec = focus _publens _pubAction P.publicationSpec
_brevetslens :: Lens' State B.State
...
...
src/Gargantext/Pages/Folder.purs
View file @
42ff8c72
...
...
@@ -12,13 +12,13 @@ initialState = ""
data Action = NoOp
performAction ::
forall props. PerformAction State props
Action
performAction ::
PerformAction State {}
Action
performAction NoOp _ _ = void do
modifyState identity
projets ::
forall props. Spec State props
Action
projets ::
Spec State {}
Action
projets = simpleSpec performAction render
where
render :: Render State
props
Action
render :: Render State
{}
Action
render dispatch _ state _ =
[]
src/Gargantext/Pages/Home/Actions.purs
View file @
42ff8c72
...
...
@@ -15,7 +15,7 @@ data Action
| SignUp
performAction ::
forall props. PerformAction State props
Action
performAction ::
PerformAction State {}
Action
performAction NoOp _ _ = void do
modifyState \state -> state
...
...
src/Gargantext/Pages/Home/Specs.purs
View file @
42ff8c72
...
...
@@ -17,16 +17,16 @@ import Thermite (Render, Spec, simpleSpec)
-- Layout |
layoutLanding ::
forall props. Lang -> Spec State props
Action
layoutLanding ::
Lang -> Spec State {}
Action
layoutLanding FR = layoutLanding' Fr.landingData
layoutLanding EN = layoutLanding' En.landingData
------------------------------------------------------------------------
layoutLanding' ::
forall props. LandingData -> Spec State props
Action
layoutLanding' ::
LandingData -> Spec State {}
Action
layoutLanding' hd = simpleSpec performAction render
where
render :: Render State
props
Action
render :: Render State
{}
Action
render dispatch _ state _ =
[ div [ className "container1" ] [ jumboTitle hd false ]
, div [ className "container1" ] [] -- put research here
...
...
src/Gargantext/Pages/Layout/Actions.purs
View file @
42ff8c72
...
...
@@ -49,7 +49,7 @@ data Action
| NgramsA NG.Action
performAction ::
forall props. PerformAction AppState props
Action
performAction ::
PerformAction AppState {}
Action
performAction (SetRoute route) _ _ = void do
modifyState $ _ {currentRoute = pure route}
performAction (Search s) _ _ = void do
...
...
src/Gargantext/Pages/Layout/Specs.purs
View file @
42ff8c72
...
...
@@ -29,7 +29,7 @@ import React.DOM.Props (_data, _id, _type, aria, className, href, onChange, onCl
import Thermite (Render, Spec, _render, defaultPerformAction, defaultRender, focus, simpleSpec, withState)
import Unsafe.Coerce (unsafeCoerce)
layoutSpec ::
forall props. Spec AppState props
Action
layoutSpec ::
Spec AppState {}
Action
layoutSpec =
fold
[ routingSpec
...
...
@@ -40,18 +40,19 @@ layoutSpec =
]
]
where
container :: Spec AppState props Action -> Spec AppState props Action
-- NP: what is it for ?
container :: Spec AppState {} Action -> Spec AppState {} Action
container = over _render \render d p s c ->
(render d p s c)
pagesComponent ::
forall props. AppState -> Spec AppState props
Action
pagesComponent ::
AppState -> Spec AppState {}
Action
pagesComponent s =
case s.currentRoute of
Just route -> selectSpec route
Nothing -> selectSpec Home
where
selectSpec :: Routes -> Spec AppState
props
Action
selectSpec :: Routes -> Spec AppState
{}
Action
selectSpec CorpusAnalysis = layout0 $ focus _corpusState _corpusAction CA.spec'
selectSpec Login = focus _loginState _loginAction LN.renderSpec
selectSpec Home = layout0 $ focus _landingState _LandingA (L.layoutLanding EN)
...
...
@@ -68,11 +69,11 @@ pagesComponent s =
-- selectSpec _ = simpleSpec defaultPerformAction defaultRender
routingSpec ::
forall props. Spec AppState props
Action
routingSpec ::
Spec AppState {}
Action
routingSpec = simpleSpec performAction defaultRender
layout0 ::
forall props. Spec AppState props
Action
-> Spec AppState props
Action
layout0 ::
Spec AppState {}
Action
-> Spec AppState {}
Action
layout0 layout =
fold
[ layoutSidebar divSearchBar
...
...
@@ -81,7 +82,7 @@ layout0 layout =
]
where
outerLayout1 = simpleSpec defaultPerformAction defaultRender
outerLayout :: Spec AppState
props
Action
outerLayout :: Spec AppState
{}
Action
outerLayout =
cont $ fold
[ withState \st ->
...
...
@@ -97,8 +98,8 @@ layout0 layout =
bs = innerLayout $ layout
innerLayout :: Spec AppState
props
Action
-> Spec AppState
props
Action
innerLayout :: Spec AppState
{}
Action
-> Spec AppState
{}
Action
innerLayout = over _render \render d p s c ->
[ div [_id "page-wrapper"]
[
...
...
@@ -106,8 +107,8 @@ layout0 layout =
]
]
layoutSidebar ::
forall props. Spec AppState props
Action
-> Spec AppState props
Action
layoutSidebar ::
Spec AppState {}
Action
-> Spec AppState {}
Action
layoutSidebar = over _render \render d p s c ->
[ div [ _id "dafixedtop"
, className "navbar navbar-inverse navbar-fixed-top"
...
...
@@ -241,10 +242,10 @@ liNav (LiNav { title : title'
]
-- TODO put the search form in the center of the navBar
divSearchBar ::
forall props. Spec AppState props
Action
divSearchBar ::
Spec AppState {}
Action
divSearchBar = simpleSpec performAction render
where
render :: Render AppState
props
Action
render :: Render AppState
{}
Action
render dispatch _ state _ = [div [ className "" ] [ searchbar']]
where
searchbar' = ul [ className "nav navbar-nav col-md-6 col-md-offset-3"
...
...
@@ -262,7 +263,7 @@ divSearchBar = simpleSpec performAction render
]
]
--divDropdownRight :: Render AppState
props
Action
--divDropdownRight :: Render AppState
{}
Action
divDropdownRight :: (Action -> Effect Unit) -> ReactElement
divDropdownRight d =
ul [className "nav navbar-nav pull-right"]
...
...
@@ -285,10 +286,10 @@ divDropdownRight d =
]
]
layoutFooter ::
forall props. Spec AppState props
Action
layoutFooter ::
Spec AppState {}
Action
layoutFooter = simpleSpec performAction render
where
render :: Render AppState
props
Action
render :: Render AppState
{}
Action
render dispatch _ state _ = [div [ className "container1" ] [ hr', footerLegalInfo']]
where
footerLegalInfo' = footer [] [ p [] [ text "Gargantext "
...
...
src/Gargantext/Pages/Layout/Specs/AddCorpus/Actions.purs
View file @
42ff8c72
...
...
@@ -27,7 +27,7 @@ data Action
| LoadDatabaseDetails
| GO
performAction ::
forall props. PerformAction State props
Action
performAction ::
PerformAction State {}
Action
performAction NoOp _ _ = void do
modifyState identity
...
...
src/Gargantext/Pages/Layout/Specs/AddCorpus/Specs.purs
View file @
42ff8c72
...
...
@@ -21,7 +21,7 @@ import React.DOM.Props (_data, _id, _type, aria, className, onClick, role)
import Thermite (PerformAction, Render, Spec, _render, cotransform, modifyState, simpleSpec)
modalSpec ::
forall props. Boolean -> String -> Spec State props Action -> Spec State props
Action
modalSpec ::
Boolean -> String -> Spec State {} Action -> Spec State {}
Action
modalSpec sm t = over _render \render d p s c ->
[ div [ _id "addCorpus", className $ "modal myModal" <> if sm then "" else " fade"
, role "dialog"
...
...
@@ -43,7 +43,7 @@ modalSpec sm t = over _render \render d p s c ->
]
spec' ::
forall props. Spec State props
Action
spec' ::
Spec State {}
Action
spec' = modalSpec true "Search Results" layoutAddcorpus
...
...
@@ -93,10 +93,10 @@ layoutModal state =
]
layoutAddcorpus ::
forall props. Spec State props
Action
layoutAddcorpus ::
Spec State {}
Action
layoutAddcorpus = simpleSpec performAction render
where
render :: Render State
props
Action
render :: Render State
{}
Action
render dispatch _ state _ =
[ div [className "container1"] []
, div [className "container1"]
...
...
src/Gargantext/Pages/Layout/Specs/Search.purs
View file @
42ff8c72
...
...
@@ -28,7 +28,7 @@ data Action
| SetQuery String
performAction ::
forall props. PerformAction State props
Action
performAction ::
PerformAction State {}
Action
performAction NoOp _ _ = void do
modifyState identity
...
...
@@ -45,10 +45,10 @@ performAction GO _ _ = void do
unsafeEventValue :: forall event. event -> String
unsafeEventValue e = (unsafeCoerce e).target.value
searchSpec ::
forall props. Spec State props
Action
searchSpec ::
Spec State {}
Action
searchSpec = simpleSpec performAction render
where
render :: Render State
props
Action
render :: Render State
{}
Action
render dispatch _ state _ =
[ div [className "container1"] []
, div [className "container1"]
...
...
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