Commit e391e3ab authored by Alexandre Delanoë's avatar Alexandre Delanoë

[ORG] Code/Files change.

parent 6c570965
......@@ -19,10 +19,10 @@ import Gargantext.Config (toUrl, NodeType(..), End(..))
import Gargantext.Config.REST (get)
---------------------------------------------------------
-- Facets
import Gargantext.Pages.Corpus.Doc.Facets.Documents as D
import Gargantext.Pages.Corpus.Doc.Facets.Sources as S
import Gargantext.Pages.Corpus.Doc.Facets.Authors as A
import Gargantext.Pages.Corpus.Doc.Facets.Terms as T
import Gargantext.Pages.Corpus.Facets.Documents as D
import Gargantext.Pages.Corpus.Facets.Sources as S
import Gargantext.Pages.Corpus.Facets.Authors as A
import Gargantext.Pages.Corpus.Facets.Terms as T
import Gargantext.Components.Tab as Tab
-------------------------------------------------------------------
type State = { info :: Maybe (NodePoly CorpusInfo)
......
module Gargantext.Pages.Corpus.Doc.Facets
( module Gargantext.Pages.Corpus.Doc.Facets.States
, module Gargantext.Pages.Corpus.Doc.Facets.Actions
, module Gargantext.Pages.Corpus.Doc.Facets.Specs
) where
import Gargantext.Pages.Corpus.Doc.Facets.States
import Gargantext.Pages.Corpus.Doc.Facets.Actions
import Gargantext.Pages.Corpus.Doc.Facets.Specs
module Gargantext.Pages.Corpus.Doc.Annotation where
module Gargantext.Pages.Corpus.Document where
import Prelude hiding (div)
import React (ReactElement)
......@@ -50,16 +50,44 @@ docview = simpleSpec performAction render
[
div [className "row"]
[
div [className "col-md-12 input-group mb-3"] [select [className "form-control custom-select",onChange (\e -> dispatch (ChangeString $ (unsafeCoerce e).target.value)) ] $ map optps aryPS ]
, div [className "col-md-12 form-control input-group mb-3"] [ select [className "form-control custom-select",onChange (\e -> dispatch (ChangeAnotherString $ (unsafeCoerce e).target.value)) ] $ map optps aryPS1 ]
div [ className "col-md-12 input-group mb-3"]
[ select [ className "form-control custom-select"
, onChange (\e -> dispatch (ChangeString $ (unsafeCoerce e).target.value))
] $ map optps aryPS
]
, div [ className "col-md-12 form-control input-group mb-3"]
[ select [ className "form-control custom-select"
, onChange (\e -> dispatch (ChangeAnotherString $ (unsafeCoerce e).target.value)) ]
$ map optps aryPS1
]
]
, div [className "row", style { marginTop : "35px"}]
[
nav [ ]
[ div [className "nav nav-tabs", _id "nav-tab",role "tablist"]
[ a [className "nav-item nav-link active",_id "nav-home-tab" , _data {toggle : "tab"},href "#nav-home" ,role "tab",aria {controls : "nav-home"} ,aria {selected:true}] [ text "STOPLIST"]
, a [className "nav-item nav-link" ,_id "nav-profile-tab", _data {toggle : "tab"},href "#nav-profile",role "tab",aria {controls : "nav-profile"},aria {selected:true}] [ text "MAINLIST"]
, a [className "nav-item nav-link" ,_id "nav-contact-tab", _data {toggle : "tab"},href "#nav-contact",role "tab",aria {controls : "nav-contact"},aria {selected:true}] [ text "MAPLIST"]
[ div [ className "nav nav-tabs", _id "nav-tab", role "tablist"]
[ a [ className "nav-item nav-link active"
, _id "nav-home-tab"
, _data {toggle : "tab"},href "#nav-home"
, role "tab"
, aria {controls : "nav-home"}
, aria {selected:true}
] [ text "STOPLIST"]
, a [ className "nav-item nav-link"
, _id "nav-profile-tab"
, _data {toggle : "tab"}
, href "#nav-profile"
, role "tab"
, aria {controls : "nav-profile"}
, aria {selected:true}
] [ text "MAINLIST"]
, a [ className "nav-item nav-link"
, _id "nav-contact-tab"
, _data {toggle : "tab"}
, href "#nav-contact"
, role "tab"
, aria {controls : "nav-contact"}
, aria {selected:true}
] [ text "MAPLIST"]
]
]
......@@ -73,10 +101,18 @@ docview = simpleSpec performAction render
[
h6 [] [text "Add a free term to STOPLIST"]
, div [className "form-group"]
[ input [className "form-control", _id "id_password", name "password", placeholder "Any text", _type "value",value state.inputValue,onInput \e -> dispatch (SetInput (unsafeEventValue e))]
[ input [ className "form-control"
, _id "id_password"
, name "password"
, placeholder "Any text"
, _type "value"
, value state.inputValue,onInput \e -> dispatch (SetInput (unsafeEventValue e))
]
, div [className "clearfix"] []
]
, button [className "btn btn-primary", _type "button"] [text "Create and Add"]
, button [ className "btn btn-primary"
, _type "button"
] [text "Create and Add"]
]
, div [ className "tab-pane fade show"
......
module Gargantext.Pages.Corpus.Facets
( module Gargantext.Pages.Corpus.Facets.States
, module Gargantext.Pages.Corpus.Facets.Actions
, module Gargantext.Pages.Corpus.Facets.Specs
) where
import Gargantext.Pages.Corpus.Facets.States
import Gargantext.Pages.Corpus.Facets.Actions
import Gargantext.Pages.Corpus.Facets.Specs
module Gargantext.Pages.Corpus.Doc.Facets.Actions where
module Gargantext.Pages.Corpus.Facets.Actions where
import Data.Lens (Prism', prism)
import Data.Either (Either(..))
import Gargantext.Pages.Corpus.Doc.Facets.Documents as DV
import Gargantext.Pages.Corpus.Doc.Facets.Sources as SV
import Gargantext.Pages.Corpus.Doc.Facets.Authors as AV
import Gargantext.Pages.Corpus.Doc.Facets.Terms as TV
import Gargantext.Pages.Corpus.Facets.Documents as DV
import Gargantext.Pages.Corpus.Facets.Sources as SV
import Gargantext.Pages.Corpus.Facets.Authors as AV
import Gargantext.Pages.Corpus.Facets.Terms as TV
import Gargantext.Components.Tab as Tab
data Action
......
module Gargantext.Pages.Corpus.Doc.Facets.Authors where
module Gargantext.Pages.Corpus.Facets.Authors where
import Data.Array (fold)
import Gargantext.Pages.Corpus.Doc.Facets.Documents as D
import Gargantext.Pages.Corpus.Facets.Documents as D
import Prelude hiding (div)
import React.DOM (h3, text)
import Thermite (PerformAction, Render, Spec, defaultPerformAction, simpleSpec)
......
module Gargantext.Pages.Corpus.Doc.Facets.Dashboard where
module Gargantext.Pages.Corpus.Facets.Dashboard where
import Prelude hiding (div)
......
module Gargantext.Pages.Corpus.Doc.Facets.Documents where
module Gargantext.Pages.Corpus.Facets.Documents where
import Affjax (defaultRequest, printResponseFormatError, request)
import Affjax.ResponseFormat as ResponseFormat
......@@ -23,7 +23,7 @@ import Gargantext.Config (NodeType(..), toUrl, End(..))
import Gargantext.Config.REST (get)
import Gargantext.Utils.DecodeMaybe ((.|))
import Gargantext.Components.Charts.Options.ECharts (chart)
import Gargantext.Pages.Corpus.Doc.Facets.Dashboard (globalPublis)
import Gargantext.Pages.Corpus.Facets.Dashboard (globalPublis)
------------------------------------------------------------------------
-- TODO: Pagination Details are not available from the BackEnd
-- TODO: PageSize Change manually sets the totalPages, need to get from backend and reload the data
......
module Gargantext.Pages.Corpus.Doc.Facets.Graph where
module Gargantext.Pages.Corpus.Facets.Graph where
import Affjax (defaultRequest, printResponseFormatError, request)
import Affjax.RequestHeader (RequestHeader(..))
......
module Gargantext.Pages.Corpus.Doc.Facets.Sources where
module Gargantext.Pages.Corpus.Facets.Sources where
import Data.Array (fold)
import Gargantext.Pages.Corpus.Doc.Facets.Documents as D
import Gargantext.Pages.Corpus.Facets.Documents as D
import Prelude hiding (div)
import React.DOM (h3, text)
import Thermite (Render, Spec, defaultPerformAction, simpleSpec)
......
module Gargantext.Pages.Corpus.Doc.Facets.Specs where
module Gargantext.Pages.Corpus.Facets.Specs where
import Prelude hiding (div)
import Data.List (fromFoldable)
import Data.Tuple (Tuple(..))
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.Facets.States (State(), _doclens, _sourcelens, _authorlens, _termslens, _tablens, initialState)
import Gargantext.Pages.Corpus.Facets.Actions (Action(), _docAction, _sourceAction, _authorAction, _termsAction, _tabAction)
import Gargantext.Pages.Corpus.Doc.Facets.Documents as DV
import Gargantext.Pages.Corpus.Doc.Facets.Sources as SV
import Gargantext.Pages.Corpus.Doc.Facets.Authors as AV
import Gargantext.Pages.Corpus.Doc.Facets.Terms as TV
import Gargantext.Pages.Corpus.Facets.Documents as DV
import Gargantext.Pages.Corpus.Facets.Sources as SV
import Gargantext.Pages.Corpus.Facets.Authors as AV
import Gargantext.Pages.Corpus.Facets.Terms as TV
import Gargantext.Components.Tab as Tab
import Thermite (Spec, focus, hide)
......
module Gargantext.Pages.Corpus.Doc.Facets.States where
module Gargantext.Pages.Corpus.Facets.States where
import Data.Lens (Lens', lens)
import Gargantext.Pages.Corpus.Doc.Facets.Documents as DV
import Gargantext.Pages.Corpus.Doc.Facets.Sources as SV
import Gargantext.Pages.Corpus.Doc.Facets.Authors as AV
import Gargantext.Pages.Corpus.Doc.Facets.Terms as TV
import Gargantext.Pages.Corpus.Facets.Documents as DV
import Gargantext.Pages.Corpus.Facets.Sources as SV
import Gargantext.Pages.Corpus.Facets.Authors as AV
import Gargantext.Pages.Corpus.Facets.Terms as TV
import Gargantext.Components.Tab as Tab
......
module Gargantext.Pages.Corpus.Doc.Facets.Terms where
module Gargantext.Pages.Corpus.Facets.Terms where
import Data.Array (fold)
import Gargantext.Pages.Corpus.Doc.Facets.Documents as D
import Gargantext.Pages.Corpus.Facets.Documents as D
import Prelude hiding (div)
import React.DOM (h3, text)
import Thermite (PerformAction, Render, Spec, defaultPerformAction, simpleSpec)
......
module Gargantext.Pages.Corpus.Doc.Facets.Terms.NgramsItem where
module Gargantext.Pages.Corpus.Facets.Terms.NgramsItem where
import Prelude
......
module Gargantext.Pages.Corpus.Doc.Facets.Terms.NgramsTable where
module Gargantext.Pages.Corpus.Facets.Terms.NgramsTable where
import Data.Array (filter, toUnfoldable)
......@@ -12,7 +12,7 @@ import Data.Tuple (Tuple(..), uncurry)
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.Facets.Terms.NgramsItem as NI
import Prelude (class Eq, class Ord, class Show, map, show, void, ($), (*), (+), (-), (/), (<), (<>), (==), (>), (>=), pure, unit)
import React (ReactElement)
import React.DOM hiding (style, map)
......
......@@ -4,13 +4,13 @@ import Prelude hiding (div)
-- import Gargantext.Components.Login as LN
import Gargantext.Pages.Layout.Actions (Action(..))
import Gargantext.Pages.Layout.Specs.AddCorpus as AC
-- import Gargantext.Pages.Corpus.Doc.Facets as TV
-- import Gargantext.Pages.Corpus.Doc.Annotation as D
-- import Gargantext.Pages.Corpus.Facets as TV
-- import Gargantext.Pages.Corpus.Document as D
import Gargantext.Pages.Corpus as Corpus
import Gargantext.Pages.Corpus.Doc.Facets.Documents as D
import Gargantext.Pages.Corpus.Doc.Facets.Graph as GE
-- import Gargantext.Pages.Corpus.Doc.Facets.Terms.NgramsTable as NG
import Gargantext.Pages.Corpus.Facets.Documents as D
import Gargantext.Pages.Corpus.Facets.Graph as GE
-- import Gargantext.Pages.Corpus.Facets.Terms.NgramsTable as NG
import Gargantext.Pages.Annuaire.User.Users as U
import Gargantext.Pages.Annuaire as Annuaire
......
......@@ -15,9 +15,9 @@ import Gargantext.Components.Tree as Tree
import Gargantext.Pages.Annuaire as Annuaire
import Gargantext.Pages.Annuaire.User.Users as U
import Gargantext.Pages.Corpus as Corpus
import Gargantext.Pages.Corpus.Doc.Annotation as D
import Gargantext.Pages.Corpus.Doc.Facets.Documents as DV
import Gargantext.Pages.Corpus.Doc.Facets.Graph as GE
import Gargantext.Pages.Corpus.Document as D
import Gargantext.Pages.Corpus.Facets.Documents as DV
import Gargantext.Pages.Corpus.Facets.Graph as GE
import Gargantext.Pages.Layout.Specs.AddCorpus as AC
import Gargantext.Pages.Layout.Specs.Search as S
import Gargantext.Pages.Layout.States (AppState)
......@@ -129,8 +129,8 @@ _annuaireAction = prism AnnuaireAction \action ->
AnnuaireAction a -> Right a
_ -> Left action
_docAnnotationViewAction :: Prism' Action D.Action
_docAnnotationViewAction = prism DocumentViewA \action ->
_documentViewAction :: Prism' Action D.Action
_documentViewAction = prism DocumentViewA \action ->
case action of
DocumentViewA caction -> Right caction
_-> Left action
......
......@@ -18,17 +18,17 @@ import Gargantext.Folder as F
import Gargantext.Pages.Annuaire as A
import Gargantext.Pages.Annuaire.User.Users as U
import Gargantext.Pages.Corpus as Corpus
import Gargantext.Pages.Corpus.Doc.Annotation as Annotation
import Gargantext.Pages.Corpus.Doc.Facets as TV
import Gargantext.Pages.Corpus.Doc.Facets.Dashboard as Dsh
import Gargantext.Pages.Corpus.Doc.Facets.Documents as DV
import Gargantext.Pages.Corpus.Doc.Facets.Graph as GE
import Gargantext.Pages.Corpus.Doc.Facets.Terms.NgramsTable as NG
import Gargantext.Pages.Corpus.Document as Annotation
import Gargantext.Pages.Corpus.Facets as TV
import Gargantext.Pages.Corpus.Facets.Dashboard as Dsh
import Gargantext.Pages.Corpus.Facets.Documents as DV
import Gargantext.Pages.Corpus.Facets.Graph as GE
import Gargantext.Pages.Corpus.Facets.Terms.NgramsTable as NG
import Gargantext.Pages.Home as L
import Gargantext.Pages.Layout.Actions (Action(..), _corpusAction, _addCorpusAction, _docAnnotationViewAction, _graphExplorerAction, _loginAction, _searchAction, _treeAction, _userPageAction, performAction, _annuaireAction)
import Gargantext.Pages.Layout.Actions (Action(..), _corpusAction, _addCorpusAction, _documentViewAction, _graphExplorerAction, _loginAction, _searchAction, _treeAction, _userPageAction, performAction, _annuaireAction)
import Gargantext.Pages.Layout.Specs.AddCorpus as AC
import Gargantext.Pages.Layout.Specs.Search as S
import Gargantext.Pages.Layout.States (AppState, _corpusState, _addCorpusState, _docAnnotationViewState, _graphExplorerState, _loginState, _searchState, _treeState, _userPageState, _annuaireState)
import Gargantext.Pages.Layout.States (AppState, _corpusState, _addCorpusState, _documentViewState, _graphExplorerState, _loginState, _searchState, _treeState, _userPageState, _annuaireState)
import Gargantext.Router (Routes(..))
layoutSpec :: Spec AppState {} Action
......@@ -60,7 +60,7 @@ pagesComponent s = case s.currentRoute of
selectSpec (Corpus i) = layout0 $ focus _corpusState _corpusAction Corpus.layout
selectSpec AddCorpus = layout0 $ focus _addCorpusState _addCorpusAction AC.layoutAddcorpus
selectSpec SearchView = layout0 $ focus _searchState _searchAction S.searchSpec
selectSpec (Document i) = layout0 $ focus _docAnnotationViewState _docAnnotationViewAction Annotation.docview
selectSpec (Document i) = layout0 $ focus _documentViewState _documentViewAction Annotation.docview
selectSpec PGraphExplorer = focus _graphExplorerState _graphExplorerAction GE.specOld
selectSpec Dashboard = layout0 $ noState Dsh.layoutDashboard
......
......@@ -8,10 +8,10 @@ import Gargantext.Components.Login as LN
import Gargantext.Components.Tree as Tree
import Gargantext.Pages.Corpus as Corpus
import Gargantext.Pages.Corpus.Doc.Annotation as D
import Gargantext.Pages.Corpus.Document as D
import Gargantext.Pages.Annuaire as Annuaire
import Gargantext.Pages.Corpus.Doc.Facets.Documents as DV
import Gargantext.Pages.Corpus.Doc.Facets.Graph as GE
import Gargantext.Pages.Corpus.Facets.Documents as DV
import Gargantext.Pages.Corpus.Facets.Graph as GE
import Gargantext.Pages.Annuaire.User.Users as U
import Gargantext.Pages.Layout.Specs.AddCorpus as AC
import Gargantext.Pages.Layout.Specs.Search as S
......@@ -25,7 +25,7 @@ type AppState =
, docViewState :: DV.State
, searchState :: S.State
, userPageState :: U.State
, docAnnotationState :: D.State
, documentState :: D.State
, annuaireState :: Annuaire.State
, ntreeState :: Tree.State
, search :: String
......@@ -44,7 +44,7 @@ initAppState =
, docViewState : DV.initialState
, searchState : S.initialState
, userPageState : U.initialState
, docAnnotationState : D.initialState
, documentState : D.initialState
, ntreeState : Tree.exampleTree
, annuaireState : Annuaire.initialState
, search : ""
......@@ -76,8 +76,8 @@ _userPageState = lens (\s -> s.userPageState) (\s ss -> s{userPageState = ss})
_annuaireState :: Lens' AppState Annuaire.State
_annuaireState = lens (\s -> s.annuaireState) (\s ss -> s{annuaireState = ss})
_docAnnotationViewState :: Lens' AppState D.State
_docAnnotationViewState = lens (\s -> s.docAnnotationState) (\s ss -> s{docAnnotationState = ss})
_documentViewState :: Lens' AppState D.State
_documentViewState = lens (\s -> s.documentState) (\s ss -> s{documentState = ss})
_treeState :: Lens' AppState Tree.State
_treeState = lens (\s -> s.ntreeState) (\s ss -> s {ntreeState = ss})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment