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
148
Issues
148
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
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
0371e632
Unverified
Commit
0371e632
authored
Sep 10, 2018
by
Nicolas Pouillard
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP hide
parent
246ab19a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
32 deletions
+34
-32
bower.json
bower.json
+2
-4
Corpus.purs
src/Gargantext/Pages/Corpus.purs
+13
-12
Specs.purs
src/Gargantext/Pages/Corpus/Doc/Facets/Specs.purs
+7
-6
Actions.purs
src/Gargantext/Pages/Layout/Actions.purs
+4
-2
Specs.purs
src/Gargantext/Pages/Layout/Specs.purs
+3
-3
States.purs
src/Gargantext/Pages/Layout/States.purs
+5
-5
No files found.
bower.json
View file @
0371e632
...
@@ -8,17 +8,15 @@
...
@@ -8,17 +8,15 @@
],
],
"dependencies"
:
{
"dependencies"
:
{
"purescript-console"
:
"^4.1.0"
,
"purescript-console"
:
"^4.1.0"
,
"purescript-thermite"
:
"https://github.com/np/purescript-thermite.git#
migrate_0_12
"
,
"purescript-thermite"
:
"https://github.com/np/purescript-thermite.git#
hide
"
,
"purescript-affjax"
:
"^7.0.0"
,
"purescript-affjax"
:
"^7.0.0"
,
"purescript-routing"
:
"^8.0.0"
,
"purescript-routing"
:
"^8.0.0"
,
"purescript-argonaut"
:
"^4.0.1"
,
"purescript-argonaut"
:
"^4.0.1"
,
"purescript-random"
:
"^4.0.0"
,
"purescript-random"
:
"^4.0.0"
,
"purescript-react"
:
"^6.1.0"
,
"purescript-css"
:
"^4.0.0"
"purescript-css"
:
"^4.0.0"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
"purescript-psci-support"
:
"^4.0.0"
"purescript-psci-support"
:
"^4.0.0"
},
"resolutions"
:
{
"purescript-react"
:
"exports"
}
}
}
}
src/Gargantext/Pages/Corpus.purs
View file @
0371e632
...
@@ -2,17 +2,17 @@ module Gargantext.Pages.Corpus where
...
@@ -2,17 +2,17 @@ module Gargantext.Pages.Corpus where
import Prelude hiding (div)
import Prelude hiding (div)
import Data.Array (fold)
import Gargantext.Components.Charts.Options.ECharts (chart)
import Gargantext.Components.Charts.Options.ECharts (chart)
import Gargantext.Pages.Corpus.Doc.Facets.Dashboard (globalPublis)
import Gargantext.Pages.Corpus.Doc.Facets.Dashboard (globalPublis)
import Gargantext.Pages.Corpus.Doc.Facets as Tab
import Gargantext.Pages.Corpus.Doc.Facets as Tab
import React (class ReactPropFields)
import React.DOM (div, h3, hr, i, p, text)
import React.DOM (div, h3, hr, i, p, text)
import React.DOM.Props (className, style)
import React.DOM.Props (className, style)
import Thermite (Render, Spec, defaultPerformAction, simpleSpec)
import Thermite (Render, Spec, defaultPerformAction, simpleSpec)
type State =
Tab.State
-- type State = {} --
Tab.State
type Action = Tab.Action
-- data Action = None --
type Action = Tab.Action
type Corpus = { title :: String
type Corpus = { title :: String
, desc :: String
, desc :: String
...
@@ -21,19 +21,20 @@ type Corpus = { title :: String
...
@@ -21,19 +21,20 @@ type Corpus = { title :: String
, authors :: String
, authors :: String
}
}
initialState :: State
--
initialState :: State
initialState =
Tab.initialState
-- initialState = {} --
Tab.initialState
spec' :: forall props. Spec Tab.State props Tab.Action
-- type PureSpec props = forall state action. Spec state props action
spec' = fold [ corpusSpec
, Tab.tab1
]
corpusSpec :: forall props. Spec Tab.State props Tab.Action
spec' :: forall action. Spec {} {} action
spec' = corpusSpec <> Tab.tab1
-- corpusSpec :: forall props. Spec Tab.State props Tab.Action
corpusSpec :: forall state props action. Spec (Record state) (Record props) action
corpusSpec = simpleSpec defaultPerformAction render
corpusSpec = simpleSpec defaultPerformAction render
where
where
render :: Render
Tab.State props Tab.A
ction
render :: Render
(Record state) (Record props) a
ction
render dispatch _
state
_ =
render dispatch _
_
_ =
[ div [className "row"]
[ div [className "row"]
[ div [className "col-md-3"] [ h3 [] [text corpus.title] ]
[ div [className "col-md-3"] [ h3 [] [text corpus.title] ]
, div [className "col-md-9"] [ hr [style {height : "2px",backgroundColor : "black"}] ]
, div [className "col-md-9"] [ hr [style {height : "2px",backgroundColor : "black"}] ]
...
...
src/Gargantext/Pages/Corpus/Doc/Facets/Specs.purs
View file @
0371e632
...
@@ -2,12 +2,11 @@ module Gargantext.Pages.Corpus.Doc.Facets.Specs where
...
@@ -2,12 +2,11 @@ module Gargantext.Pages.Corpus.Doc.Facets.Specs where
import Prelude hiding (div)
import Prelude hiding (div)
import Data.Lens (Lens', Prism', lens, prism)
import Data.List (fromFoldable)
import Data.List (fromFoldable)
import Data.Tuple (Tuple(..))
import Data.Tuple (Tuple(..))
import Gargantext.Pages.Corpus.Doc.Facets.States (State(
..), _doclens, _sourcelens, _authorlens, _termslens, _tablens
)
import Gargantext.Pages.Corpus.Doc.Facets.States (State(
), _doclens, _sourcelens, _authorlens, _termslens, _tablens, initialState
)
import Gargantext.Pages.Corpus.Doc.Facets.Actions (Action(
..
), _docAction, _sourceAction, _authorAction, _termsAction, _tabAction)
import Gargantext.Pages.Corpus.Doc.Facets.Actions (Action(), _docAction, _sourceAction, _authorAction, _termsAction, _tabAction)
import Gargantext.Pages.Corpus.Doc.Facets.Documents as DV
import Gargantext.Pages.Corpus.Doc.Facets.Documents as DV
import Gargantext.Pages.Corpus.Doc.Facets.Sources as SV
import Gargantext.Pages.Corpus.Doc.Facets.Sources as SV
...
@@ -15,12 +14,14 @@ import Gargantext.Pages.Corpus.Doc.Facets.Authors as AV
...
@@ -15,12 +14,14 @@ import Gargantext.Pages.Corpus.Doc.Facets.Authors as AV
import Gargantext.Pages.Corpus.Doc.Facets.Terms as TV
import Gargantext.Pages.Corpus.Doc.Facets.Terms as TV
import Gargantext.Components.Tab as Tab
import Gargantext.Components.Tab as Tab
import Thermite (Spec, focus)
import Thermite (Spec, focus
, hide
)
tab1 :: forall action. Spec {} {} action
tab1 = hide initialState tab1'
tab1
:: forall props. Spec State props
Action
tab1
' :: Spec State {}
Action
tab1 = Tab.tabs _tablens _tabAction $ fromFoldable [ Tuple "Doc View" docPageSpec
tab1
'
= Tab.tabs _tablens _tabAction $ fromFoldable [ Tuple "Doc View" docPageSpec
, Tuple "Author View" authorPageSpec
, Tuple "Author View" authorPageSpec
, Tuple "Source View" sourcePageSpec
, Tuple "Source View" sourcePageSpec
, Tuple "Terms View" termsPageSpec
, Tuple "Terms View" termsPageSpec
...
...
src/Gargantext/Pages/Layout/Actions.purs
View file @
0371e632
...
@@ -11,7 +11,7 @@ import Effect.Console (log)
...
@@ -11,7 +11,7 @@ import Effect.Console (log)
import Gargantext.Components.Login as LN
import Gargantext.Components.Login as LN
import Gargantext.Components.Modals.Modal (modalShow)
import Gargantext.Components.Modals.Modal (modalShow)
import Gargantext.Components.Tree as Tree
import Gargantext.Components.Tree as Tree
import Gargantext.Pages.Corpus as CA
--
import Gargantext.Pages.Corpus as CA
import Gargantext.Pages.Corpus.Doc.Annotation as D
import Gargantext.Pages.Corpus.Doc.Annotation as D
import Gargantext.Pages.Corpus.Doc.Facets as TV
import Gargantext.Pages.Corpus.Doc.Facets as TV
import Gargantext.Pages.Corpus.Doc.Facets.Dashboard as Dsh
import Gargantext.Pages.Corpus.Doc.Facets.Dashboard as Dsh
...
@@ -43,7 +43,7 @@ data Action
...
@@ -43,7 +43,7 @@ data Action
| DashboardA Dsh.Action
| DashboardA Dsh.Action
| Search String
| Search String
| Go
| Go
| CorpusAnalysisA CA.Action
--
| CorpusAnalysisA CA.Action
| ShowLogin
| ShowLogin
| ShowAddcorpus
| ShowAddcorpus
| NgramsA NG.Action
| NgramsA NG.Action
...
@@ -161,11 +161,13 @@ _tabviewAction = prism TabViewA \action ->
...
@@ -161,11 +161,13 @@ _tabviewAction = prism TabViewA \action ->
TabViewA caction -> Right caction
TabViewA caction -> Right caction
_-> Left action
_-> Left action
{-
_corpusAction :: Prism' Action CA.Action
_corpusAction :: Prism' Action CA.Action
_corpusAction = prism CorpusAnalysisA \action ->
_corpusAction = prism CorpusAnalysisA \action ->
case action of
case action of
CorpusAnalysisA caction -> Right caction
CorpusAnalysisA caction -> Right caction
_-> Left action
_-> Left action
-}
_graphExplorerAction :: Prism' Action GE.Action
_graphExplorerAction :: Prism' Action GE.Action
_graphExplorerAction = prism GraphExplorerA \action ->
_graphExplorerAction = prism GraphExplorerA \action ->
...
...
src/Gargantext/Pages/Layout/Specs.purs
View file @
0371e632
...
@@ -18,10 +18,10 @@ import Gargantext.Pages.Corpus.Doc.Facets.Graph as GE
...
@@ -18,10 +18,10 @@ import Gargantext.Pages.Corpus.Doc.Facets.Graph as GE
import Gargantext.Pages.Corpus.Doc.Facets.Terms.NgramsTable as NG
import Gargantext.Pages.Corpus.Doc.Facets.Terms.NgramsTable as NG
import Gargantext.Pages.Corpus.User.Users as U
import Gargantext.Pages.Corpus.User.Users as U
import Gargantext.Pages.Home as L
import Gargantext.Pages.Home as L
import Gargantext.Pages.Layout.Actions (Action(..), _LandingA, _NgramsA, _addCorpusAction,
_corpusAction,
_dashBoardAction, _docAnnotationViewAction, _docViewAction, _graphExplorerAction, _loginAction, _searchAction, _tabviewAction, _treeAction, _userPageAction, performAction)
import Gargantext.Pages.Layout.Actions (Action(..), _LandingA, _NgramsA, _addCorpusAction,
{-_corpusAction,-}
_dashBoardAction, _docAnnotationViewAction, _docViewAction, _graphExplorerAction, _loginAction, _searchAction, _tabviewAction, _treeAction, _userPageAction, performAction)
import Gargantext.Pages.Layout.Specs.AddCorpus as AC
import Gargantext.Pages.Layout.Specs.AddCorpus as AC
import Gargantext.Pages.Layout.Specs.Search as S
import Gargantext.Pages.Layout.Specs.Search as S
import Gargantext.Pages.Layout.States (AppState, _addCorpusState,
_corpusState,
_dashBoardSate, _docAnnotationViewState, _docViewState, _graphExplorerState, _landingState, _loginState, _ngramState, _searchState, _tabviewState, _treeState, _userPageState)
import Gargantext.Pages.Layout.States (AppState, _addCorpusState,
{-_corpusState,-}
_dashBoardSate, _docAnnotationViewState, _docViewState, _graphExplorerState, _landingState, _loginState, _ngramState, _searchState, _tabviewState, _treeState, _userPageState)
import Gargantext.Router (Routes(..))
import Gargantext.Router (Routes(..))
import React (ReactElement)
import React (ReactElement)
import React.DOM (a, button, div, footer, hr', img, input, li, p, span, text, ul)
import React.DOM (a, button, div, footer, hr', img, input, li, p, span, text, ul)
...
@@ -52,7 +52,7 @@ pagesComponent s =
...
@@ -52,7 +52,7 @@ pagesComponent s =
Nothing -> selectSpec Home
Nothing -> selectSpec Home
where
where
selectSpec :: Routes -> Spec AppState props Action
selectSpec :: Routes -> Spec AppState props Action
selectSpec CorpusAnalysis =
layout0 $ focus _corpusState _corpusAction
CA.spec'
selectSpec CorpusAnalysis =
unsafeCoerce {} -- TODO layout0 $ {-focus _corpusState _corpusAction-}
CA.spec'
selectSpec Login = focus _loginState _loginAction LN.renderSpec
selectSpec Login = focus _loginState _loginAction LN.renderSpec
selectSpec Home = layout0 $ focus _landingState _LandingA (L.layoutLanding EN)
selectSpec Home = layout0 $ focus _landingState _LandingA (L.layoutLanding EN)
selectSpec AddCorpus = layout0 $ focus _addCorpusState _addCorpusAction AC.layoutAddcorpus
selectSpec AddCorpus = layout0 $ focus _addCorpusState _addCorpusAction AC.layoutAddcorpus
...
...
src/Gargantext/Pages/Layout/States.purs
View file @
0371e632
...
@@ -8,7 +8,7 @@ import Data.Maybe (Maybe(Just))
...
@@ -8,7 +8,7 @@ import Data.Maybe (Maybe(Just))
import Gargantext.Components.Login as LN
import Gargantext.Components.Login as LN
import Gargantext.Components.Tree as Tree
import Gargantext.Components.Tree as Tree
import Gargantext.Pages.Layout.Specs.AddCorpus as AC
import Gargantext.Pages.Layout.Specs.AddCorpus as AC
import Gargantext.Pages.Corpus as CA
--
import Gargantext.Pages.Corpus as CA
import Gargantext.Pages.Corpus.Doc.Annotation as D
import Gargantext.Pages.Corpus.Doc.Annotation as D
import Gargantext.Pages.Corpus.Doc.Facets as TV
import Gargantext.Pages.Corpus.Doc.Facets as TV
import Gargantext.Pages.Corpus.Doc.Facets.Documents as DV
import Gargantext.Pages.Corpus.Doc.Facets.Documents as DV
...
@@ -33,7 +33,7 @@ type AppState =
...
@@ -33,7 +33,7 @@ type AppState =
, ntreeState :: Tree.State
, ntreeState :: Tree.State
, tabviewState :: TV.State
, tabviewState :: TV.State
, search :: String
, search :: String
, corpusState :: CA.State
--
, corpusState :: CA.State
, showLogin :: Boolean
, showLogin :: Boolean
, showCorpus :: Boolean
, showCorpus :: Boolean
, graphExplorerState :: GE.State
, graphExplorerState :: GE.State
...
@@ -55,7 +55,7 @@ initAppState =
...
@@ -55,7 +55,7 @@ initAppState =
, ntreeState : Tree.exampleTree
, ntreeState : Tree.exampleTree
, tabviewState : TV.initialState
, tabviewState : TV.initialState
, search : ""
, search : ""
, corpusState : CA.initialState
--
, corpusState : CA.initialState
, showLogin : false
, showLogin : false
, showCorpus : false
, showCorpus : false
, graphExplorerState : GE.initialState
, graphExplorerState : GE.initialState
...
@@ -92,8 +92,8 @@ _treeState = lens (\s -> s.ntreeState) (\s ss -> s {ntreeState = ss})
...
@@ -92,8 +92,8 @@ _treeState = lens (\s -> s.ntreeState) (\s ss -> s {ntreeState = ss})
_tabviewState :: Lens' AppState TV.State
_tabviewState :: Lens' AppState TV.State
_tabviewState = lens (\s -> s.tabviewState) (\s ss -> s {tabviewState = ss})
_tabviewState = lens (\s -> s.tabviewState) (\s ss -> s {tabviewState = ss})
_corpusState :: Lens' AppState CA.State
--
_corpusState :: Lens' AppState CA.State
_corpusState = lens (\s -> s.corpusState) (\s ss -> s {corpusState = ss})
--
_corpusState = lens (\s -> s.corpusState) (\s ss -> s {corpusState = ss})
_dashBoardSate :: Lens' AppState Dsh.State
_dashBoardSate :: Lens' AppState Dsh.State
_dashBoardSate = lens (\s -> s.dashboardState) (\s ss -> s {dashboardState = ss})
_dashBoardSate = lens (\s -> s.dashboardState) (\s ss -> s {dashboardState = ss})
...
...
Nicolas Pouillard
@np
mentioned in commit
fe22fe42
·
Sep 10, 2018
mentioned in commit
fe22fe42
mentioned in commit fe22fe42971df5a98248d97eb18e9e80cfa8f520
Toggle commit list
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