diff --git a/src/Gargantext/Pages/Corpus.purs b/src/Gargantext/Pages/Corpus.purs index e17ce4086c4e4c08bb1e01d2afe67d8ac8b13070..0168ce880562ef2fc3d82ef948fde0d54b02d096 100644 --- a/src/Gargantext/Pages/Corpus.purs +++ b/src/Gargantext/Pages/Corpus.purs @@ -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) diff --git a/src/Gargantext/Pages/Corpus/Doc/Facets.purs b/src/Gargantext/Pages/Corpus/Doc/Facets.purs deleted file mode 100644 index 6fe18e525867abbf698592142668a2d95c75d3b6..0000000000000000000000000000000000000000 --- a/src/Gargantext/Pages/Corpus/Doc/Facets.purs +++ /dev/null @@ -1,10 +0,0 @@ -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 - diff --git a/src/Gargantext/Pages/Corpus/Doc/Annotation.purs b/src/Gargantext/Pages/Corpus/Document.purs similarity index 65% rename from src/Gargantext/Pages/Corpus/Doc/Annotation.purs rename to src/Gargantext/Pages/Corpus/Document.purs index 633db4f75298cbe2b300a1cc87000994773973f0..78cc8671c7c88b5eb5c92a08ca1a1d1a2c99b74b 100644 --- a/src/Gargantext/Pages/Corpus/Doc/Annotation.purs +++ b/src/Gargantext/Pages/Corpus/Document.purs @@ -1,4 +1,4 @@ -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" diff --git a/src/Gargantext/Pages/Corpus/Facets.purs b/src/Gargantext/Pages/Corpus/Facets.purs new file mode 100644 index 0000000000000000000000000000000000000000..621f8c74f1e37cb2e67d732cad0936cc0df15af1 --- /dev/null +++ b/src/Gargantext/Pages/Corpus/Facets.purs @@ -0,0 +1,10 @@ +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 + diff --git a/src/Gargantext/Pages/Corpus/Doc/Facets/Actions.purs b/src/Gargantext/Pages/Corpus/Facets/Actions.purs similarity index 78% rename from src/Gargantext/Pages/Corpus/Doc/Facets/Actions.purs rename to src/Gargantext/Pages/Corpus/Facets/Actions.purs index c3ededf9a7e4fe0a11926ea7804647e5efeabaaa..757a0ab8188372d3d9738e62a1772f9b5ebe04ed 100644 --- a/src/Gargantext/Pages/Corpus/Doc/Facets/Actions.purs +++ b/src/Gargantext/Pages/Corpus/Facets/Actions.purs @@ -1,13 +1,13 @@ -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 diff --git a/src/Gargantext/Pages/Corpus/Doc/Facets/Authors.purs b/src/Gargantext/Pages/Corpus/Facets/Authors.purs similarity index 82% rename from src/Gargantext/Pages/Corpus/Doc/Facets/Authors.purs rename to src/Gargantext/Pages/Corpus/Facets/Authors.purs index 7a4a700d52e665d7ee04412876a80d7b928bb6f9..ee9d988950b5e14adbb5053ad3cb80704714ab8d 100644 --- a/src/Gargantext/Pages/Corpus/Doc/Facets/Authors.purs +++ b/src/Gargantext/Pages/Corpus/Facets/Authors.purs @@ -1,8 +1,8 @@ -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) diff --git a/src/Gargantext/Pages/Corpus/Doc/Facets/Dashboard.purs b/src/Gargantext/Pages/Corpus/Facets/Dashboard.purs similarity index 99% rename from src/Gargantext/Pages/Corpus/Doc/Facets/Dashboard.purs rename to src/Gargantext/Pages/Corpus/Facets/Dashboard.purs index 865bcab71a7e6f717eaa6a8931379876dc0ceae1..fdb29c0987323e856e935527d0fa3ec793f37cef 100644 --- a/src/Gargantext/Pages/Corpus/Doc/Facets/Dashboard.purs +++ b/src/Gargantext/Pages/Corpus/Facets/Dashboard.purs @@ -1,4 +1,4 @@ -module Gargantext.Pages.Corpus.Doc.Facets.Dashboard where +module Gargantext.Pages.Corpus.Facets.Dashboard where import Prelude hiding (div) diff --git a/src/Gargantext/Pages/Corpus/Doc/Facets/Documents.purs b/src/Gargantext/Pages/Corpus/Facets/Documents.purs similarity index 99% rename from src/Gargantext/Pages/Corpus/Doc/Facets/Documents.purs rename to src/Gargantext/Pages/Corpus/Facets/Documents.purs index 234f2ad4cacc0b19167a519eba8268d4b2be94ec..c2c3432be3c939d9841b5ea5dd835a3421412565 100644 --- a/src/Gargantext/Pages/Corpus/Doc/Facets/Documents.purs +++ b/src/Gargantext/Pages/Corpus/Facets/Documents.purs @@ -1,4 +1,4 @@ -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 diff --git a/src/Gargantext/Pages/Corpus/Doc/Facets/Graph.purs b/src/Gargantext/Pages/Corpus/Facets/Graph.purs similarity index 99% rename from src/Gargantext/Pages/Corpus/Doc/Facets/Graph.purs rename to src/Gargantext/Pages/Corpus/Facets/Graph.purs index 5a8898b381da07c1ea9a3fc6552c80633373c6af..fd8ce935f6caade42c5291f5d17a889241658753 100644 --- a/src/Gargantext/Pages/Corpus/Doc/Facets/Graph.purs +++ b/src/Gargantext/Pages/Corpus/Facets/Graph.purs @@ -1,4 +1,4 @@ -module Gargantext.Pages.Corpus.Doc.Facets.Graph where +module Gargantext.Pages.Corpus.Facets.Graph where import Affjax (defaultRequest, printResponseFormatError, request) import Affjax.RequestHeader (RequestHeader(..)) diff --git a/src/Gargantext/Pages/Corpus/Doc/Facets/Sources.purs b/src/Gargantext/Pages/Corpus/Facets/Sources.purs similarity index 82% rename from src/Gargantext/Pages/Corpus/Doc/Facets/Sources.purs rename to src/Gargantext/Pages/Corpus/Facets/Sources.purs index 845a95f0347a9cece71453cf2bb6b8eec59f4d8c..d85fdb1a7b36af2c7d463350a529b5253a2ab8d8 100644 --- a/src/Gargantext/Pages/Corpus/Doc/Facets/Sources.purs +++ b/src/Gargantext/Pages/Corpus/Facets/Sources.purs @@ -1,8 +1,8 @@ -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) diff --git a/src/Gargantext/Pages/Corpus/Doc/Facets/Specs.purs b/src/Gargantext/Pages/Corpus/Facets/Specs.purs similarity index 66% rename from src/Gargantext/Pages/Corpus/Doc/Facets/Specs.purs rename to src/Gargantext/Pages/Corpus/Facets/Specs.purs index f20cff5cdf5237383448c152ded249e1d4133143..bc360aaf797bf9addbc9d932335c0bd8abce04cb 100644 --- a/src/Gargantext/Pages/Corpus/Doc/Facets/Specs.purs +++ b/src/Gargantext/Pages/Corpus/Facets/Specs.purs @@ -1,17 +1,17 @@ -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) diff --git a/src/Gargantext/Pages/Corpus/Doc/Facets/States.purs b/src/Gargantext/Pages/Corpus/Facets/States.purs similarity index 76% rename from src/Gargantext/Pages/Corpus/Doc/Facets/States.purs rename to src/Gargantext/Pages/Corpus/Facets/States.purs index 86b688ae12cf48ae8290e39b02fa6b8ab2846be8..c3e5466576f64c811af6909e8c33c50ad3cc74f3 100644 --- a/src/Gargantext/Pages/Corpus/Doc/Facets/States.purs +++ b/src/Gargantext/Pages/Corpus/Facets/States.purs @@ -1,10 +1,10 @@ -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 diff --git a/src/Gargantext/Pages/Corpus/Doc/Facets/Terms.purs b/src/Gargantext/Pages/Corpus/Facets/Terms.purs similarity index 83% rename from src/Gargantext/Pages/Corpus/Doc/Facets/Terms.purs rename to src/Gargantext/Pages/Corpus/Facets/Terms.purs index db6126e3ffb6ebf27420a01bbb694ed0270f0d69..af148c7578779f86e60a334954d1e49b39dbe583 100644 --- a/src/Gargantext/Pages/Corpus/Doc/Facets/Terms.purs +++ b/src/Gargantext/Pages/Corpus/Facets/Terms.purs @@ -1,7 +1,7 @@ -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) diff --git a/src/Gargantext/Pages/Corpus/Doc/Facets/Terms/NgramsItem.purs b/src/Gargantext/Pages/Corpus/Facets/Terms/NgramsItem.purs similarity index 97% rename from src/Gargantext/Pages/Corpus/Doc/Facets/Terms/NgramsItem.purs rename to src/Gargantext/Pages/Corpus/Facets/Terms/NgramsItem.purs index 56216aedf64c763bfd1e636574de2d239c5738c8..9f6039b46de5ec0f62c1a72b59b73ab569611394 100644 --- a/src/Gargantext/Pages/Corpus/Doc/Facets/Terms/NgramsItem.purs +++ b/src/Gargantext/Pages/Corpus/Facets/Terms/NgramsItem.purs @@ -1,4 +1,4 @@ -module Gargantext.Pages.Corpus.Doc.Facets.Terms.NgramsItem where +module Gargantext.Pages.Corpus.Facets.Terms.NgramsItem where import Prelude diff --git a/src/Gargantext/Pages/Corpus/Doc/Facets/Terms/NgramsTable.purs b/src/Gargantext/Pages/Corpus/Facets/Terms/NgramsTable.purs similarity index 98% rename from src/Gargantext/Pages/Corpus/Doc/Facets/Terms/NgramsTable.purs rename to src/Gargantext/Pages/Corpus/Facets/Terms/NgramsTable.purs index e46991fc239fe8aa7d9a6dd84c0682c1722138db..818ad337ba460a6e1d3f7363a710d88e08038303 100644 --- a/src/Gargantext/Pages/Corpus/Doc/Facets/Terms/NgramsTable.purs +++ b/src/Gargantext/Pages/Corpus/Facets/Terms/NgramsTable.purs @@ -1,4 +1,4 @@ -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) diff --git a/src/Gargantext/Pages/Layout.purs b/src/Gargantext/Pages/Layout.purs index 42ad7acbfa5a9ffb114cd8e18a0be1ab43ad8b80..1eb0e81991158cd285c2a33fe41b48c9669a446a 100644 --- a/src/Gargantext/Pages/Layout.purs +++ b/src/Gargantext/Pages/Layout.purs @@ -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 diff --git a/src/Gargantext/Pages/Layout/Actions.purs b/src/Gargantext/Pages/Layout/Actions.purs index f48a15df97ae6e58c0ff33b6f5802247142d3da7..49c729ad1d1fd11b2d45807922acfb61f67f071b 100644 --- a/src/Gargantext/Pages/Layout/Actions.purs +++ b/src/Gargantext/Pages/Layout/Actions.purs @@ -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 diff --git a/src/Gargantext/Pages/Layout/Specs.purs b/src/Gargantext/Pages/Layout/Specs.purs index 1f56021ee58527d5e911a1a910262b2e32968df3..e5b06dcda9974e99393bafe8cd76aaa3a38ef8c3 100644 --- a/src/Gargantext/Pages/Layout/Specs.purs +++ b/src/Gargantext/Pages/Layout/Specs.purs @@ -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 diff --git a/src/Gargantext/Pages/Layout/States.purs b/src/Gargantext/Pages/Layout/States.purs index 57c6d448f327b4771d64e28e0f13b25deedbfb00..65a8748407566a079af0843ec18605daa2273579 100644 --- a/src/Gargantext/Pages/Layout/States.purs +++ b/src/Gargantext/Pages/Layout/States.purs @@ -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})