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

Merge branch '289-dev-graph-view-refresh' of...

Merge branch '289-dev-graph-view-refresh' of ssh://gitlab.iscpif.fr:20022/gargantext/purescript-gargantext into dev-merge
parents f78ca603 70c9266c
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
} }
.graph-container #controls-container { .graph-container #controls-container {
position: absolute; position: absolute;
z-index: 999; z-index: 900;
backdrop-filter: blur(4px); backdrop-filter: blur(4px);
background: rgba(255, 255, 255, 0.75); background: rgba(255, 255, 255, 0.75);
left: 0; left: 0;
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
} }
#dafixedtop { #dafixedtop {
z-index: 999; z-index: 910;
} }
#logo-designed { #logo-designed {
...@@ -540,7 +540,7 @@ li .leaf:hover a.settings { ...@@ -540,7 +540,7 @@ li .leaf:hover a.settings {
position: fixed; position: fixed;
top: 3.7em; top: 3.7em;
width: 15%; width: 15%;
z-index: 999; z-index: 900;
} }
.left-handed .forest-layout { .left-handed .forest-layout {
......
{"version":3,"sourceRoot":"","sources":["../../src/sass/_menu.sass","../../src/sass/_context_menu.sass","../../src/sass/_graph.sass","../../src/sass/_login.sass","../../src/sass/_tree.sass","../../src/sass/_code_editor.sass","../../src/sass/_styles.sass","../../src/sass/_range_slider.sass","../../src/sass/_annotation.sass","../../src/sass/_folder_view.sass"],"names":[],"mappings":"AAAA;AAEA;AACA;AACA;AACA;AACA;AAEA;EACI;EACA;;;AAEJ;EACI;EACA;EACA;EACA;;;AAEJ;EACE;;;AAEF;AACI;EACA;;;AAEJ;AACI;EACA;;;AAGJ;AACA;EACI;;;AAEJ;EACI;EACA;EACA;EACA;;;AAEJ;EACE;EACA;;;AAEF;EACE;;;AC7CF;EACE;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;;;AClBF;EACE;EACA;EACA;;;AAEF;AAkCE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAxCA;EAZA;EACA;EAEA;EAWE;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAEF;EACE;EACA;;AAGA;EACE;EACA;;AACN;EACE;;AACF;EACE;;AAEF;EApCA;EACA;EAEA;EAmCE;EACA;;AACF;EACE;;AACF;EACE;;AAWF;EAEE;EACA;EACA;EACA;EAEA;EACA;EACA;;AAEA;EACE;;AAEJ;EACE;;AAEA;EACE;;AAEJ;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;ACrFJ;EAEE;;;AAQF;EACE;;AACA;EACE;EACA;;;AAEJ;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAGF;EACE;;AAEE;EACE;EACA;;AACA;EACE;;;AAIJ;EACE;EACA;EACA;EACA;;;AAKJ;EACE;EACA;EACA;;;AAGJ;EACE;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;;AACF;EACE;EACA;;AACA;EACE;EACA;EACA;EACA;;AACA;EACE;;AACF;EACE;EACA;EACA;EACA;;AACA;EACE;;AACN;EACE;EACA;EACA;EACA;;;AAGN;EACE;EACA;EACA;EACA;EACA;;AAGE;EACE;;;AAEN;EACE;EACA;EACA;EACA;EACA;;AAGE;EACE;;;AAEN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;;AAEJ;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;;;AAGF;EACE;;;AAEJ;EACI;EACA;;;AAGF;EACE;;;AAEJ;EACE;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;;;ACzKF;EACE;;;AAGA;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAGA;EACE;;AACF;EACE;;AAEJ;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;;AAGN;EACE;;;AAIA;EACE;;AACA;EACE;EACA;EACA;EACA;;AACF;EACE;EACA;EACA;EACA;EACA;;AACF;EACE;;AACF;EACE;EACA;EACA;EAEA;EACA;EACA;;AAEA;EACE;;AACF;EACE;;AAGN;EACE;;AACF;EACE;;AACA;EACE;EACA;;AAEE;EACE;EACA;;AACF;EACE;EACA;;AAIR;EACE;;AACF;EACE;;AACA;EACE;EACA;;AAEE;EACE;EACA;;AACF;EACE;EACA;;AACF;EACE;EACA;;AAEV;EACE;;AACF;EACE;;AAEE;EACE;;AACF;EACE;;AACN;EACE;;AAEE;EACE;;;AAGR;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEE;EACA;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;;AAEF;EACE;;;AAIF;EACE;;AAEA;EACE;;;AAGN;EACE;;AACF;EACE;;AACF;EACE;;;AAEJ;EACE;EACA;EACA;EACA;EACA;;;AAEA;EACE;;;AAEF;EACE;;;AC9JA;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EApCR;EACA;EACA;EACA;EACA;EACA;EACA;EAlBA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AA0CM;EACE;EACA;EACA;EACA;EACA;EA5CR;EACA;EACA;EACA;EACA;EACA;EACA;EAlBA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAkDE;EACE;EACA;EACA;EACA;EACA;EACA;;AACF;EACE;EACA;EACA;;AACA;EACE;EACA;;AACF;EACE;EACA;;AACF;EACE;EACA;;AAGE;EACE;;AAEF;EACE;;;ACtFZ;EACE;;;AAEA;EAEE;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;;AAGE;EACE;EACA;;AAEF;EACE;EACA;;;AAER;EAEE;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;;AAGE;EACE;EACA;;AAEF;EACE;EACA;;;AAEV;EACE;;AACA;EACE;;AACF;EACE;EACA;EACA;;;AAIA;EACE;;AACA;EACE;EACA;;AACF;EACE;;AACA;EACE;;AACJ;EACE;;;AAER;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;AAGI;EACE;;AACF;EACE;;;AAEN;EACE;EACA;EACA;;;AAIA;EACE;;AACF;EACE;;;AAEJ;EACE;;AACA;EACE;;;AAEJ;EACE;EACA;;;ACtGF;EACE;AACA;EACA;;AAEA;EACE;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EAEA;EAEA;;AAEA;EACE;EAEA;EACA;EACA;;;AAGN;EACE;;;ACxBJ;EACE;;AAEA;EANE;EACA;;AAQF;EAbE;EACA;;AAeF;EAhBE;EACA;;AAkBF;EAnBE;EACA;;AAqBF;EA1BE;EACA,kBANyB;;AAkC3B;EA7BE;EACA,kBAPqB;;AAsCvB;EAhCE;EACA,kBAJoB;;;AAuCtB;EApCE;EACA,kBANyB;;AA4C3B;EAvCE;EACA,kBAPqB;;AAgDvB;EA1CE;EACA,kBAJoB;;;ACRxB;EACE;EACA;EACA;EACA","file":"sass.css"} {"version":3,"sourceRoot":"","sources":["../../src/sass/_menu.sass","../../src/sass/_context_menu.sass","../../src/sass/_graph.sass","../../src/sass/_login.sass","../../src/sass/_tree.sass","../../src/sass/_code_editor.sass","../../src/sass/_styles.sass","../../src/sass/_range_slider.sass","../../src/sass/_annotation.sass","../../src/sass/_folder_view.sass"],"names":[],"mappings":"AAAA;AAEA;AACA;AACA;AACA;AACA;AAEA;EACI;EACA;;;AAEJ;EACI;EACA;EACA;EACA;;;AAEJ;EACE;;;AAEF;AACI;EACA;;;AAEJ;AACI;EACA;;;AAGJ;AACA;EACI;;;AAEJ;EACI;EACA;EACA;EACA;;;AAEJ;EACE;EACA;;;AAEF;EACE;;;AC7CF;EACE;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;;;AClBF;EACE;EACA;EACA;;;AAEF;AAkCE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAxCA;EAZA;EACA;EAEA;EAWE;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAEF;EACE;EACA;;AAGA;EACE;EACA;;AACN;EACE;;AACF;EACE;;AAEF;EApCA;EACA;EAEA;EAmCE;EACA;;AACF;EACE;;AACF;EACE;;AAWF;EAEE;EAEA;EACA;EACA;EAEA;EACA;EACA;;AAEA;EACE;;AAEJ;EACE;;AAEA;EACE;;AAEJ;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;ACtFJ;EAEE;;;AAQF;EACE;;AACA;EACE;EACA;;;AAEJ;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAGF;EACE;;AAEE;EACE;EACA;;AACA;EACE;;;AAIJ;EACE;EACA;EACA;EACA;;;AAKJ;EACE;EACA;EACA;;;AAGJ;EACE;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;;AACF;EACE;EACA;;AACA;EACE;EACA;EACA;EACA;;AACA;EACE;;AACF;EACE;EACA;EACA;EACA;;AACA;EACE;;AACN;EACE;EACA;EACA;EACA;;;AAGN;EACE;EACA;EACA;EACA;EACA;;AAGE;EACE;;;AAEN;EACE;EACA;EACA;EACA;EACA;;AAGE;EACE;;;AAEN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;;AAEJ;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;;;AAGF;EACE;;;AAEJ;EACI;EACA;;;AAGF;EACE;;;AAEJ;EACE;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;;;ACzKF;EACE;;;AAGA;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAGA;EACE;;AACF;EACE;;AAEJ;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;;AAGN;EACE;;;AAIA;EACE;;AACA;EACE;EACA;EACA;EACA;;AACF;EACE;EACA;EACA;EACA;EACA;;AACF;EACE;;AACF;EACE;EACA;EACA;EAEA;EACA;EACA;;AAEA;EACE;;AACF;EACE;;AAGN;EACE;;AACF;EACE;;AACA;EACE;EACA;;AAEE;EACE;EACA;;AACF;EACE;EACA;;AAIR;EACE;;AACF;EACE;;AACA;EACE;EACA;;AAEE;EACE;EACA;;AACF;EACE;EACA;;AACF;EACE;EACA;;AAEV;EACE;;AACF;EACE;;AAEE;EACE;;AACF;EACE;;AACN;EACE;;AAEE;EACE;;;AAGR;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEE;EACA;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;;AAEF;EACE;;;AAIF;EACE;;AAEA;EACE;;;AAGN;EACE;;AACF;EACE;;AACF;EACE;;;AAEJ;EACE;EACA;EACA;EACA;EACA;;;AAEA;EACE;;;AAEF;EACE;;;AC9JA;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EApCR;EACA;EACA;EACA;EACA;EACA;EACA;EAlBA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AA0CM;EACE;EACA;EACA;EACA;EACA;EA5CR;EACA;EACA;EACA;EACA;EACA;EACA;EAlBA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAkDE;EACE;EACA;EACA;EACA;EACA;EACA;;AACF;EACE;EACA;EACA;;AACA;EACE;EACA;;AACF;EACE;EACA;;AACF;EACE;EACA;;AAGE;EACE;;AAEF;EACE;;;ACtFZ;EACE;;;AAEA;EAEE;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;;AAGE;EACE;EACA;;AAEF;EACE;EACA;;;AAER;EAEE;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;;AAGE;EACE;EACA;;AAEF;EACE;EACA;;;AAEV;EACE;;AACA;EACE;;AACF;EACE;EACA;EACA;;;AAIA;EACE;;AACA;EACE;EACA;;AACF;EACE;;AACA;EACE;;AACJ;EACE;;;AAER;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;AAGI;EACE;;AACF;EACE;;;AAEN;EACE;EACA;EACA;;;AAIA;EACE;;AACF;EACE;;;AAEJ;EACE;;AACA;EACE;;;AAEJ;EACE;EACA;;;ACtGF;EACE;AACA;EACA;;AAEA;EACE;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EAEA;EAEA;;AAEA;EACE;EAEA;EACA;EACA;;;AAGN;EACE;;;ACxBJ;EACE;;AAEA;EANE;EACA;;AAQF;EAbE;EACA;;AAeF;EAhBE;EACA;;AAkBF;EAnBE;EACA;;AAqBF;EA1BE;EACA,kBANyB;;AAkC3B;EA7BE;EACA,kBAPqB;;AAsCvB;EAhCE;EACA,kBAJoB;;;AAuCtB;EApCE;EACA,kBANyB;;AA4C3B;EAvCE;EACA,kBAPqB;;AAgDvB;EA1CE;EACA,kBAJoB;;;ACRxB;EACE;EACA;EACA;EACA","file":"sass.css"}
\ No newline at end of file \ No newline at end of file
...@@ -97,13 +97,14 @@ type FolderProps = ...@@ -97,13 +97,14 @@ type FolderProps =
folder :: R2.Component FolderProps folder :: R2.Component FolderProps
folder = R.createElement folderCpt folder = R.createElement folderCpt
folderCpt :: R.Component FolderProps folderCpt :: R.Component FolderProps
folderCpt = here.component "folderCpt" cpt where folderCpt = here.component "folderCpt" cpt where
cpt {style, text, nodeId, sid, nodeType} _ = do cpt {style, text, nodeId, sid, nodeType} _ = do
pure $ H.a {className: "btn btn-primary", href: "/#/" <> getFolderPath nodeType sid nodeId} [ H.i { className: icon style nodeType } [] pure $ H.a { className: "btn btn-primary"
, H.br {} , href: "/#/" <> getFolderPath nodeType sid nodeId }
, H.text text] [ H.i { className: icon style nodeType } []
, H.br {}
, H.text text ]
icon :: FolderStyle -> GT.NodeType -> String icon :: FolderStyle -> GT.NodeType -> String
icon FolderUp _ = "fa fa-folder-open" icon FolderUp _ = "fa fa-folder-open"
......
...@@ -51,10 +51,10 @@ type Universal = ...@@ -51,10 +51,10 @@ type Universal =
-- Shared by every component here + nodeSpan -- Shared by every component here + nodeSpan
type Global = type Global =
( frontends :: Frontends ( frontends :: Frontends
, handed :: Handed , handed :: Handed
, route :: T.Box AppRoute , route :: T.Box AppRoute
, tasks :: T.Box GAT.Storage , tasks :: T.Box GAT.Storage
| Universal ) | Universal )
-- Shared by every component here -- Shared by every component here
...@@ -69,7 +69,6 @@ type LoaderProps = ( session :: Session, root :: ID | Common ) ...@@ -69,7 +69,6 @@ type LoaderProps = ( session :: Session, root :: ID | Common )
-- | Loads and renders the tree starting at the given root node id. -- | Loads and renders the tree starting at the given root node id.
treeLoader :: R2.Component LoaderProps treeLoader :: R2.Component LoaderProps
treeLoader = R.createElement treeLoaderCpt treeLoader = R.createElement treeLoaderCpt
treeLoaderCpt :: R.Component LoaderProps treeLoaderCpt :: R.Component LoaderProps
treeLoaderCpt = here.component "treeLoader" cpt where treeLoaderCpt = here.component "treeLoader" cpt where
-- treeLoaderCpt :: R.Memo LoaderProps -- treeLoaderCpt :: R.Memo LoaderProps
...@@ -96,7 +95,6 @@ type TreeProps = ( tree :: FTree | NodeProps ) ...@@ -96,7 +95,6 @@ type TreeProps = ( tree :: FTree | NodeProps )
tree :: R2.Leaf TreeProps tree :: R2.Leaf TreeProps
tree props = R.createElement treeCpt props [] tree props = R.createElement treeCpt props []
treeCpt :: R.Component TreeProps treeCpt :: R.Component TreeProps
treeCpt = here.component "tree" cpt where treeCpt = here.component "tree" cpt where
cpt p@{ reload, session, tree: NTree (LNode { id, name, nodeType }) children } _ = do cpt p@{ reload, session, tree: NTree (LNode { id, name, nodeType }) children } _ = do
...@@ -134,7 +132,6 @@ type ChildrenTreeProps = ...@@ -134,7 +132,6 @@ type ChildrenTreeProps =
renderChildren :: R2.Component ChildrenTreeProps renderChildren :: R2.Component ChildrenTreeProps
renderChildren = R.createElement renderChildrenCpt renderChildren = R.createElement renderChildrenCpt
renderChildrenCpt :: R.Component ChildrenTreeProps renderChildrenCpt :: R.Component ChildrenTreeProps
renderChildrenCpt = here.component "renderChildren" cpt where renderChildrenCpt = here.component "renderChildren" cpt where
cpt p@{ childProps: { folderOpen } } _ = do cpt p@{ childProps: { folderOpen } } _ = do
...@@ -147,7 +144,6 @@ renderChildrenCpt = here.component "renderChildren" cpt where ...@@ -147,7 +144,6 @@ renderChildrenCpt = here.component "renderChildren" cpt where
renderTreeChildren :: R2.Component ChildrenTreeProps renderTreeChildren :: R2.Component ChildrenTreeProps
renderTreeChildren = R.createElement renderTreeChildrenCpt renderTreeChildren = R.createElement renderTreeChildrenCpt
renderTreeChildrenCpt :: R.Component ChildrenTreeProps renderTreeChildrenCpt :: R.Component ChildrenTreeProps
renderTreeChildrenCpt = here.component "renderTreeChildren" cpt where renderTreeChildrenCpt = here.component "renderTreeChildren" cpt where
cpt p@{ childProps: { children' cpt p@{ childProps: { children'
...@@ -180,7 +176,6 @@ type ChildLoaderProps = ( id :: ID, render :: R2.Leaf TreeProps | NodeProps ) ...@@ -180,7 +176,6 @@ type ChildLoaderProps = ( id :: ID, render :: R2.Leaf TreeProps | NodeProps )
childLoader :: R2.Component ChildLoaderProps childLoader :: R2.Component ChildLoaderProps
childLoader = R.createElement childLoaderCpt childLoader = R.createElement childLoaderCpt
childLoaderCpt :: R.Component ChildLoaderProps childLoaderCpt :: R.Component ChildLoaderProps
childLoaderCpt = here.component "childLoader" cpt where childLoaderCpt = here.component "childLoader" cpt where
cpt p@{ render } _ = do cpt p@{ render } _ = do
......
...@@ -39,7 +39,6 @@ type SubTreeParamsProps = ...@@ -39,7 +39,6 @@ type SubTreeParamsProps =
subTreeView :: R2.Component SubTreeParamsProps subTreeView :: R2.Component SubTreeParamsProps
subTreeView = R.createElement subTreeViewCpt subTreeView = R.createElement subTreeViewCpt
subTreeViewCpt :: R.Component SubTreeParamsProps subTreeViewCpt :: R.Component SubTreeParamsProps
subTreeViewCpt = here.component "subTreeView" cpt subTreeViewCpt = here.component "subTreeView" cpt
where where
...@@ -86,7 +85,6 @@ type CorpusTreeProps = ...@@ -86,7 +85,6 @@ type CorpusTreeProps =
subTreeViewLoaded :: R2.Component CorpusTreeProps subTreeViewLoaded :: R2.Component CorpusTreeProps
subTreeViewLoaded = R.createElement subTreeViewLoadedCpt subTreeViewLoaded = R.createElement subTreeViewLoadedCpt
subTreeViewLoadedCpt :: R.Component CorpusTreeProps subTreeViewLoadedCpt :: R.Component CorpusTreeProps
subTreeViewLoadedCpt = here.component "subTreeViewLoaded" cpt subTreeViewLoadedCpt = here.component "subTreeViewLoaded" cpt
where where
...@@ -107,7 +105,6 @@ newtype CorpusTreeRenderProps = CorpusTreeRenderProps ...@@ -107,7 +105,6 @@ newtype CorpusTreeRenderProps = CorpusTreeRenderProps
subTreeTreeView :: CorpusTreeRenderProps -> Array R.Element -> R.Element subTreeTreeView :: CorpusTreeRenderProps -> Array R.Element -> R.Element
subTreeTreeView = R2.ntCreateElement subTreeTreeViewCpt subTreeTreeView = R2.ntCreateElement subTreeTreeViewCpt
subTreeTreeViewCpt :: R2.NTComponent CorpusTreeRenderProps subTreeTreeViewCpt :: R2.NTComponent CorpusTreeRenderProps
subTreeTreeViewCpt = here.ntComponent "subTreeTreeView" cpt where subTreeTreeViewCpt = here.ntComponent "subTreeTreeView" cpt where
cpt (CorpusTreeRenderProps p@{ action cpt (CorpusTreeRenderProps p@{ action
......
...@@ -9,7 +9,6 @@ import Data.Either (Either(..)) ...@@ -9,7 +9,6 @@ import Data.Either (Either(..))
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Data.Nullable (Nullable) import Data.Nullable (Nullable)
import DOM.Simple.Console (log, log2)
import DOM.Simple.Types (Element) import DOM.Simple.Types (Element)
import Reactix as R import Reactix as R
import Reactix.DOM.HTML as RH import Reactix.DOM.HTML as RH
...@@ -70,12 +69,12 @@ graphCpt = here.component "graph" cpt where ...@@ -70,12 +69,12 @@ graphCpt = here.component "graph" cpt where
R.useEffectOnce $ do R.useEffectOnce $ do
pure $ do pure $ do
log "[graphCpt (Cleanup)]" here.log "[graphCpt (Cleanup)]"
Sigmax.dependOnSigma (R.readRef sigmaRef) "[graphCpt (Cleanup)] no sigma" $ \sigma -> do Sigmax.dependOnSigma (R.readRef sigmaRef) "[graphCpt (Cleanup)] no sigma" $ \sigma -> do
Sigma.stopForceAtlas2 sigma Sigma.stopForceAtlas2 sigma
log2 "[graphCpt (Cleanup)] forceAtlas stopped for" sigma here.log2 "[graphCpt (Cleanup)] forceAtlas stopped for" sigma
Sigma.kill sigma Sigma.kill sigma
log "[graphCpt (Cleanup)] sigma killed" here.log "[graphCpt (Cleanup)] sigma killed"
-- NOTE: This div is not empty after sigma initializes. -- NOTE: This div is not empty after sigma initializes.
-- When we change state, we make it empty though. -- When we change state, we make it empty though.
...@@ -93,7 +92,7 @@ graphCpt = here.component "graph" cpt where ...@@ -93,7 +92,7 @@ graphCpt = here.component "graph" cpt where
Nothing -> do Nothing -> do
eSigma <- Sigma.sigma {settings: sigmaSettings} eSigma <- Sigma.sigma {settings: sigmaSettings}
case eSigma of case eSigma of
Left err -> log2 "[graphCpt] error creating sigma" err Left err -> here.log2 "[graphCpt] error creating sigma" err
Right sig -> do Right sig -> do
Sigmax.writeSigma rSigma $ Just sig Sigmax.writeSigma rSigma $ Just sig
...@@ -115,7 +114,7 @@ graphCpt = here.component "graph" cpt where ...@@ -115,7 +114,7 @@ graphCpt = here.component "graph" cpt where
Sigmax.setEdges sig false Sigmax.setEdges sig false
-- log2 "[graph] startForceAtlas" startForceAtlas -- here.log2 "[graph] startForceAtlas" startForceAtlas
if startForceAtlas then if startForceAtlas then
Sigma.startForceAtlas2 sig fa2 Sigma.startForceAtlas2 sig fa2
else else
......
...@@ -67,7 +67,6 @@ initialLocalControls = do ...@@ -67,7 +67,6 @@ initialLocalControls = do
controls :: R2.Component Controls controls :: R2.Component Controls
controls = R.createElement controlsCpt controls = R.createElement controlsCpt
controlsCpt :: R.Component Controls controlsCpt :: R.Component Controls
controlsCpt = here.component "controls" cpt controlsCpt = here.component "controls" cpt
where where
...@@ -246,14 +245,9 @@ useGraphControls { forceAtlasS ...@@ -246,14 +245,9 @@ useGraphControls { forceAtlasS
} }
forceAtlasState <- T.useBox forceAtlasS forceAtlasState <- T.useBox forceAtlasS
graphStage <- T.useBox Graph.Init graphStage <- T.useBox Graph.Init
-- multiSelectEnabled <- T.useBox false
nodeSize <- T.useBox $ Range.Closed { min: 0.0, max: 100.0 } nodeSize <- T.useBox $ Range.Closed { min: 0.0, max: 100.0 }
-- removedNodeIds <- T.useBox SigmaxT.emptyNodeIds
-- selectedNodeIds <- T.useBox SigmaxT.emptyNodeIds
-- showControls <- T.useBox false
showEdges <- T.useBox SigmaxT.EShow showEdges <- T.useBox SigmaxT.EShow
showLouvain <- T.useBox false showLouvain <- T.useBox false
-- sidePanelState <- T.useBox GT.InitialClosed
sigma <- Sigmax.initSigma sigma <- Sigmax.initSigma
sigmaRef <- R.useRef sigma sigmaRef <- R.useRef sigma
......
...@@ -2,7 +2,6 @@ module Gargantext.Components.GraphExplorer.ControlsToggleButton ...@@ -2,7 +2,6 @@ module Gargantext.Components.GraphExplorer.ControlsToggleButton
( Props, controlsToggleButton, controlsToggleButtonCpt ( Props, controlsToggleButton, controlsToggleButtonCpt
) where ) where
import Data.Tuple.Nested ((/\))
import Reactix as R import Reactix as R
import Reactix.DOM.HTML as H import Reactix.DOM.HTML as H
import Toestand as T import Toestand as T
...@@ -16,7 +15,7 @@ here = R2.here "Gargantext.Components.GraphExplorer.ControlsToggleButton" ...@@ -16,7 +15,7 @@ here = R2.here "Gargantext.Components.GraphExplorer.ControlsToggleButton"
type Props = ( state :: T.Box Boolean ) type Props = ( state :: T.Box Boolean )
controlsToggleButton :: Record Props -> R.Element controlsToggleButton :: R2.Leaf Props
controlsToggleButton props = R.createElement controlsToggleButtonCpt props [] controlsToggleButton props = R.createElement controlsToggleButtonCpt props []
controlsToggleButtonCpt :: R.Component Props controlsToggleButtonCpt :: R.Component Props
......
...@@ -34,7 +34,7 @@ sizeButtonCpt :: R.Component Props ...@@ -34,7 +34,7 @@ sizeButtonCpt :: R.Component Props
sizeButtonCpt = here.component "sizeButton" cpt where sizeButtonCpt = here.component "sizeButton" cpt where
cpt { state, caption, min, max, onChange } _ = do cpt { state, caption, min, max, onChange } _ = do
defaultValue <- T.useLive T.unequal state defaultValue <- T.useLive T.unequal state
pure $ H.span { class: "range-simple" } pure $ H.span { className: "range-simple" }
[ H.label {} [ R2.small {} [ H.text caption ] ] [ H.label {} [ R2.small {} [ H.text caption ] ]
, H.input { type: "range" , H.input { type: "range"
, className: "form-control" , className: "form-control"
......
...@@ -35,7 +35,6 @@ type Props = ( ...@@ -35,7 +35,6 @@ type Props = (
toggleButton :: R2.Component Props toggleButton :: R2.Component Props
toggleButton = R.createElement toggleButtonCpt toggleButton = R.createElement toggleButtonCpt
toggleButtonCpt :: R.Component Props toggleButtonCpt :: R.Component Props
toggleButtonCpt = here.component "toggleButton" cpt toggleButtonCpt = here.component "toggleButton" cpt
where where
...@@ -46,9 +45,9 @@ toggleButtonCpt = here.component "toggleButton" cpt ...@@ -46,9 +45,9 @@ toggleButtonCpt = here.component "toggleButton" cpt
, style } _ = do , style } _ = do
state' <- T.useLive T.unequal state state' <- T.useLive T.unequal state
pure $ H.button { className: "btn btn-outline-" <> style <> " " <> cls state' <> " mx-2" pure $ H.div { className: "btn btn-outline-" <> style <> " " <> cls state' <> " mx-2"
, on: { click: onClick } , on: { click: onClick }
} [ R2.small {} [ H.text (text onMessage offMessage state') ] ] } [ R2.small {} [ H.text (text onMessage offMessage state') ] ]
cls true = "active" cls true = "active"
cls false = "" cls false = ""
...@@ -61,7 +60,6 @@ type ControlsToggleButtonProps = ( ...@@ -61,7 +60,6 @@ type ControlsToggleButtonProps = (
controlsToggleButton :: R2.Component ControlsToggleButtonProps controlsToggleButton :: R2.Component ControlsToggleButtonProps
controlsToggleButton = R.createElement controlsToggleButtonCpt controlsToggleButton = R.createElement controlsToggleButtonCpt
controlsToggleButtonCpt :: R.Component ControlsToggleButtonProps controlsToggleButtonCpt :: R.Component ControlsToggleButtonProps
controlsToggleButtonCpt = here.component "controlsToggleButton" cpt controlsToggleButtonCpt = here.component "controlsToggleButton" cpt
where where
...@@ -80,7 +78,6 @@ type EdgesButtonProps = ( ...@@ -80,7 +78,6 @@ type EdgesButtonProps = (
edgesToggleButton :: R2.Component EdgesButtonProps edgesToggleButton :: R2.Component EdgesButtonProps
edgesToggleButton = R.createElement edgesToggleButtonCpt edgesToggleButton = R.createElement edgesToggleButtonCpt
edgesToggleButtonCpt :: R.Component EdgesButtonProps edgesToggleButtonCpt :: R.Component EdgesButtonProps
edgesToggleButtonCpt = here.component "edgesToggleButton" cpt edgesToggleButtonCpt = here.component "edgesToggleButton" cpt
where where
...@@ -105,7 +102,6 @@ type LouvainToggleButtonProps = ( ...@@ -105,7 +102,6 @@ type LouvainToggleButtonProps = (
louvainToggleButton :: R2.Component LouvainToggleButtonProps louvainToggleButton :: R2.Component LouvainToggleButtonProps
louvainToggleButton = R.createElement louvainToggleButtonCpt louvainToggleButton = R.createElement louvainToggleButtonCpt
louvainToggleButtonCpt :: R.Component LouvainToggleButtonProps louvainToggleButtonCpt :: R.Component LouvainToggleButtonProps
louvainToggleButtonCpt = here.component "louvainToggleButton" cpt louvainToggleButtonCpt = here.component "louvainToggleButton" cpt
where where
...@@ -124,7 +120,6 @@ type MultiSelectEnabledButtonProps = ( ...@@ -124,7 +120,6 @@ type MultiSelectEnabledButtonProps = (
multiSelectEnabledButton :: R2.Component MultiSelectEnabledButtonProps multiSelectEnabledButton :: R2.Component MultiSelectEnabledButtonProps
multiSelectEnabledButton = R.createElement multiSelectEnabledButtonCpt multiSelectEnabledButton = R.createElement multiSelectEnabledButtonCpt
multiSelectEnabledButtonCpt :: R.Component MultiSelectEnabledButtonProps multiSelectEnabledButtonCpt :: R.Component MultiSelectEnabledButtonProps
multiSelectEnabledButtonCpt = here.component "lmultiSelectEnabledButton" cpt multiSelectEnabledButtonCpt = here.component "lmultiSelectEnabledButton" cpt
where where
...@@ -143,7 +138,6 @@ type ForceAtlasProps = ( ...@@ -143,7 +138,6 @@ type ForceAtlasProps = (
pauseForceAtlasButton :: R2.Component ForceAtlasProps pauseForceAtlasButton :: R2.Component ForceAtlasProps
pauseForceAtlasButton = R.createElement pauseForceAtlasButtonCpt pauseForceAtlasButton = R.createElement pauseForceAtlasButtonCpt
pauseForceAtlasButtonCpt :: R.Component ForceAtlasProps pauseForceAtlasButtonCpt :: R.Component ForceAtlasProps
pauseForceAtlasButtonCpt = here.component "forceAtlasToggleButton" cpt pauseForceAtlasButtonCpt = here.component "forceAtlasToggleButton" cpt
where where
...@@ -171,7 +165,6 @@ type TreeToggleButtonProps = ( ...@@ -171,7 +165,6 @@ type TreeToggleButtonProps = (
treeToggleButton :: R2.Component TreeToggleButtonProps treeToggleButton :: R2.Component TreeToggleButtonProps
treeToggleButton = R.createElement treeToggleButtonCpt treeToggleButton = R.createElement treeToggleButtonCpt
treeToggleButtonCpt :: R.Component TreeToggleButtonProps treeToggleButtonCpt :: R.Component TreeToggleButtonProps
treeToggleButtonCpt = here.component "treeToggleButton" cpt treeToggleButtonCpt = here.component "treeToggleButton" cpt
where where
...@@ -190,16 +183,15 @@ type SidebarToggleButtonProps = ( ...@@ -190,16 +183,15 @@ type SidebarToggleButtonProps = (
sidebarToggleButton :: R2.Component SidebarToggleButtonProps sidebarToggleButton :: R2.Component SidebarToggleButtonProps
sidebarToggleButton = R.createElement sidebarToggleButtonCpt sidebarToggleButton = R.createElement sidebarToggleButtonCpt
sidebarToggleButtonCpt :: R.Component SidebarToggleButtonProps sidebarToggleButtonCpt :: R.Component SidebarToggleButtonProps
sidebarToggleButtonCpt = here.component "sidebarToggleButton" cpt sidebarToggleButtonCpt = here.component "sidebarToggleButton" cpt
where where
cpt { state } _ = do cpt { state } _ = do
state' <- T.useLive T.unequal state state' <- T.useLive T.unequal state
pure $ H.button { className: "btn btn-outline-light " <> cls state' pure $ H.div { className: "btn btn-outline-light " <> cls state'
, on: { click: onClick state } , on: { click: onClick state }
} [ R2.small {} [ H.text (text onMessage offMessage state') ] ] } [ R2.small {} [ H.text (text onMessage offMessage state') ] ]
cls GT.Opened = "active" cls GT.Opened = "active"
cls _ = "" cls _ = ""
......
module Gargantext.Components.GraphExplorer.TopBar where
import Data.Maybe (Maybe(..))
import Reactix as R
import Reactix.DOM.HTML as RH
import Toestand as T
import Gargantext.Prelude hiding (max,min)
import Gargantext.Components.App.Data (Boxes)
import Gargantext.Components.GraphExplorer.Search (nodeSearchControl)
import Gargantext.Components.GraphExplorer.Sidebar.Types as GEST
import Gargantext.Components.GraphExplorer.ToggleButton as Toggle
import Gargantext.Utils.Reactix as R2
here :: R2.Here
here = R2.here "Gargantext.Components.GraphExplorer.TopBar"
type TopBar =
(
boxes :: Boxes
)
topBar :: R2.Leaf TopBar
topBar p = R.createElement topBarCpt p []
topBarCpt :: R.Component TopBar
topBarCpt = here.component "topBar" cpt where
cpt { boxes: { showTree
, sidePanelGraph
, sidePanelState } } _ = do
{ mGraph, multiSelectEnabled, selectedNodeIds, showControls } <- GEST.focusedSidePanel sidePanelGraph
mGraph' <- T.useLive T.unequal mGraph
let search = case mGraph' of
Just graph -> nodeSearchControl { graph
, multiSelectEnabled
, selectedNodeIds } []
Nothing -> RH.div {} []
pure $ RH.form { className: "d-flex" }
[ Toggle.treeToggleButton { state: showTree } []
, Toggle.controlsToggleButton { state: showControls } []
, Toggle.sidebarToggleButton { state: sidePanelState } []
, search
]
where
rowToggle = RH.ul { className: "navbar-nav ml-auto mr-auto" }
col = RH.li { className: "nav-item" }
spaces = RH.a { className: "nav-link" }
...@@ -25,8 +25,8 @@ instance decodeNodePoly :: (DecodeJson a) ...@@ -25,8 +25,8 @@ instance decodeNodePoly :: (DecodeJson a)
obj <- decodeJson json obj <- decodeJson json
id <- obj .: "id" id <- obj .: "id"
typename <- obj .: "typename" typename <- obj .: "typename"
userId <- obj .: "user_id" userId <- obj .: "userId"
parentId <- obj .: "parent_id" parentId <- obj .: "parentId"
name <- obj .: "name" name <- obj .: "name"
date <- obj .: "date" date <- obj .: "date"
......
...@@ -191,7 +191,6 @@ type ContactCellsProps = ...@@ -191,7 +191,6 @@ type ContactCellsProps =
contactCells :: Record ContactCellsProps -> R.Element contactCells :: Record ContactCellsProps -> R.Element
contactCells p = R.createElement contactCellsCpt p [] contactCells p = R.createElement contactCellsCpt p []
contactCellsCpt :: R.Component ContactCellsProps contactCellsCpt :: R.Component ContactCellsProps
contactCellsCpt = here.component "contactCells" cpt where contactCellsCpt = here.component "contactCells" cpt where
cpt { annuaireId, frontends, session cpt { annuaireId, frontends, session
...@@ -269,8 +268,8 @@ instance decodeAnnuaireInfo :: DecodeJson AnnuaireInfo where ...@@ -269,8 +268,8 @@ instance decodeAnnuaireInfo :: DecodeJson AnnuaireInfo where
obj <- decodeJson json obj <- decodeJson json
id <- obj .: "id" id <- obj .: "id"
typename <- obj .: "typename" typename <- obj .: "typename"
userId <- obj .: "user_id" userId <- obj .: "userId"
parentId <- obj .: "parent_id" parentId <- obj .: "parentId"
name <- obj .: "name" name <- obj .: "name"
date <- obj .: "date" date <- obj .: "date"
hyperdata <- obj .: "hyperdata" hyperdata <- obj .: "hyperdata"
......
...@@ -34,9 +34,9 @@ instance decodeNodeContact :: DecodeJson NodeContact where ...@@ -34,9 +34,9 @@ instance decodeNodeContact :: DecodeJson NodeContact where
hyperdata <- obj .: "hyperdata" hyperdata <- obj .: "hyperdata"
id <- obj .: "id" id <- obj .: "id"
name <- obj .:! "name" name <- obj .:! "name"
parentId <- obj .?| "parent_id" parentId <- obj .?| "parentId"
typename <- obj .?| "typename" typename <- obj .?| "typename"
userId <- obj .:! "user_id" userId <- obj .:! "userId"
pure $ NodeContact { id pure $ NodeContact { id
, date , date
...@@ -70,9 +70,9 @@ instance decodeContact' :: DecodeJson Contact' where ...@@ -70,9 +70,9 @@ instance decodeContact' :: DecodeJson Contact' where
hyperdata <- obj .: "hyperdata" hyperdata <- obj .: "hyperdata"
id <- obj .: "id" id <- obj .: "id"
name <- obj .:! "name" name <- obj .:! "name"
parentId <- obj .?| "parent_id" parentId <- obj .?| "parentId"
typename <- obj .?| "typename" typename <- obj .?| "typename"
userId <- obj .:! "user_id" userId <- obj .:! "userId"
pure $ Contact' { id pure $ Contact' { id
, date , date
...@@ -106,9 +106,9 @@ instance decodeContact :: DecodeJson Contact where ...@@ -106,9 +106,9 @@ instance decodeContact :: DecodeJson Contact where
hyperdata <- obj .: "hyperdata" hyperdata <- obj .: "hyperdata"
id <- obj .: "id" id <- obj .: "id"
name <- obj .:! "name" name <- obj .:! "name"
parentId <- obj .?| "parent_id" parentId <- obj .?| "parentId"
typename <- obj .?| "typename" typename <- obj .?| "typename"
userId <- obj .:! "user_id" userId <- obj .:! "userId"
pure $ Contact { id pure $ Contact { id
, date , date
...@@ -139,9 +139,9 @@ instance decodeUser :: DecodeJson User where ...@@ -139,9 +139,9 @@ instance decodeUser :: DecodeJson User where
hyperdata <- obj .: "hyperdata" hyperdata <- obj .: "hyperdata"
id <- obj .: "id" id <- obj .: "id"
name <- obj .:! "name" name <- obj .:! "name"
parentId <- obj .?| "parent_id" parentId <- obj .?| "parentId"
typename <- obj .?| "typename" typename <- obj .?| "typename"
userId <- obj .:! "user_id" userId <- obj .:! "userId"
pure $ User { id pure $ User { id
, date , date
......
...@@ -17,6 +17,7 @@ import Gargantext.Components.Forest as Forest ...@@ -17,6 +17,7 @@ import Gargantext.Components.Forest as Forest
import Gargantext.Components.GraphExplorer as GraphExplorer import Gargantext.Components.GraphExplorer as GraphExplorer
import Gargantext.Components.GraphExplorer.Sidebar as GES import Gargantext.Components.GraphExplorer.Sidebar as GES
import Gargantext.Components.GraphExplorer.Sidebar.Types as GEST import Gargantext.Components.GraphExplorer.Sidebar.Types as GEST
import Gargantext.Components.GraphExplorer.TopBar as GETB
import Gargantext.Components.Lang (LandingLang(LL_EN)) import Gargantext.Components.Lang (LandingLang(LL_EN))
import Gargantext.Components.Login (login) import Gargantext.Components.Login (login)
import Gargantext.Components.MainPage as MainPage import Gargantext.Components.MainPage as MainPage
...@@ -64,18 +65,18 @@ routerCpt = here.component "router" cpt where ...@@ -64,18 +65,18 @@ routerCpt = here.component "router" cpt where
RightHanded -> "right-handed" RightHanded -> "right-handed"
pure $ R.fragment pure $ R.fragment
([ loginModal { boxes } [] ([ loginModal { boxes }
, topBar { boxes } [] ] <> , topBar { boxes } ] <>
[ H.div { className: handedClassName } $ reverseHanded handed' $ [ H.div { className: handedClassName } $ reverseHanded handed' $
[ forest { boxes } [] [ forest { boxes }
, mainPage { boxes } [] , mainPage { boxes }
, sidePanel { boxes } [] , sidePanel { boxes }
] ]
]) ])
loginModal :: R2.Component Props loginModal :: R2.Leaf Props
loginModal = R.createElement loginModalCpt loginModal p = R.createElement loginModalCpt p []
loginModalCpt :: R.Component Props loginModalCpt :: R.Component Props
loginModalCpt = here.component "loginModal" cpt loginModalCpt = here.component "loginModal" cpt
where where
...@@ -84,8 +85,8 @@ loginModalCpt = here.component "loginModal" cpt ...@@ -84,8 +85,8 @@ loginModalCpt = here.component "loginModal" cpt
pure $ if showLogin' then login' boxes else H.div {} [] pure $ if showLogin' then login' boxes else H.div {} []
topBar :: R2.Component Props topBar :: R2.Leaf Props
topBar = R.createElement topBarCpt topBar p = R.createElement topBarCpt p []
topBarCpt :: R.Component Props topBarCpt :: R.Component Props
topBarCpt = here.component "topBar" cpt where topBarCpt = here.component "topBar" cpt where
cpt props@{ boxes: boxes@{ handed cpt props@{ boxes: boxes@{ handed
...@@ -93,20 +94,20 @@ topBarCpt = here.component "topBar" cpt where ...@@ -93,20 +94,20 @@ topBarCpt = here.component "topBar" cpt where
route' <- T.useLive T.unequal boxes.route route' <- T.useLive T.unequal boxes.route
let children = case route' of let children = case route' of
GR.PGraphExplorer s g -> [ GraphExplorer.topBar { boxes } [] ] GR.PGraphExplorer s g -> [ GETB.topBar { boxes } ]
_ -> [] _ -> []
pure $ TopBar.topBar { handed } children pure $ TopBar.topBar { handed } children
mainPage :: R2.Component Props mainPage :: R2.Leaf Props
mainPage = R.createElement mainPageCpt mainPage p = R.createElement mainPageCpt p []
mainPageCpt :: R.Component Props mainPageCpt :: R.Component Props
mainPageCpt = here.component "mainPage" cpt where mainPageCpt = here.component "mainPage" cpt where
cpt { boxes } _ = do cpt { boxes } _ = do
pure $ MainPage.mainPage { boxes } [ renderRoute { boxes } [] ] pure $ MainPage.mainPage { boxes } [ renderRoute { boxes } ]
forest :: R2.Component Props forest :: R2.Leaf Props
forest = R.createElement forestCpt forest p = R.createElement forestCpt p []
forestCpt :: R.Component Props forestCpt :: R.Component Props
forestCpt = here.component "forest" cpt where forestCpt = here.component "forest" cpt where
cpt props@{ boxes: boxes@{ backend cpt props@{ boxes: boxes@{ backend
...@@ -133,8 +134,8 @@ forestCpt = here.component "forest" cpt where ...@@ -133,8 +134,8 @@ forestCpt = here.component "forest" cpt where
, showTree , showTree
, tasks } [] , tasks } []
sidePanel :: R2.Component Props sidePanel :: R2.Leaf Props
sidePanel = R.createElement sidePanelCpt sidePanel p = R.createElement sidePanelCpt p []
sidePanelCpt :: R.Component Props sidePanelCpt :: R.Component Props
sidePanelCpt = here.component "sidePanel" cpt where sidePanelCpt = here.component "sidePanel" cpt where
cpt props@{ boxes: boxes@{ graphVersion cpt props@{ boxes: boxes@{ graphVersion
...@@ -154,8 +155,8 @@ sidePanelCpt = here.component "sidePanel" cpt where ...@@ -154,8 +155,8 @@ sidePanelCpt = here.component "sidePanel" cpt where
Opened -> pure $ openedSidePanel (Record.merge { session: s } props) [] Opened -> pure $ openedSidePanel (Record.merge { session: s } props) []
_ -> pure $ H.div {} [] _ -> pure $ H.div {} []
renderRoute :: R2.Component Props renderRoute :: R2.Leaf Props
renderRoute = R.createElement renderRouteCpt renderRoute p = R.createElement renderRouteCpt p []
renderRouteCpt :: R.Component Props renderRouteCpt :: R.Component Props
renderRouteCpt = here.component "renderRoute" cpt where renderRouteCpt = here.component "renderRoute" cpt where
cpt props@{ boxes } _ = do cpt props@{ boxes } _ = do
...@@ -213,7 +214,6 @@ authedCpt = here.component "authed" cpt where ...@@ -213,7 +214,6 @@ authedCpt = here.component "authed" cpt where
openedSidePanel :: R2.Component (WithSession Props) openedSidePanel :: R2.Component (WithSession Props)
openedSidePanel = R.createElement openedSidePanelCpt openedSidePanel = R.createElement openedSidePanelCpt
openedSidePanelCpt :: R.Component (WithSession Props) openedSidePanelCpt :: R.Component (WithSession Props)
openedSidePanelCpt = here.component "openedSidePanel" cpt where openedSidePanelCpt = here.component "openedSidePanel" cpt where
cpt props@{ boxes: boxes@{ graphVersion cpt props@{ boxes: boxes@{ graphVersion
...@@ -263,7 +263,6 @@ openedSidePanelCpt = here.component "openedSidePanel" cpt where ...@@ -263,7 +263,6 @@ openedSidePanelCpt = here.component "openedSidePanel" cpt where
annuaire :: R2.Component SessionNodeProps annuaire :: R2.Component SessionNodeProps
annuaire = R.createElement annuaireCpt annuaire = R.createElement annuaireCpt
annuaireCpt :: R.Component SessionNodeProps annuaireCpt :: R.Component SessionNodeProps
annuaireCpt = here.component "annuaire" cpt where annuaireCpt = here.component "annuaire" cpt where
cpt props@{ boxes, nodeId } _ = do cpt props@{ boxes, nodeId } _ = do
...@@ -275,7 +274,6 @@ annuaireCpt = here.component "annuaire" cpt where ...@@ -275,7 +274,6 @@ annuaireCpt = here.component "annuaire" cpt where
corpus :: R2.Component SessionNodeProps corpus :: R2.Component SessionNodeProps
corpus = R.createElement corpusCpt corpus = R.createElement corpusCpt
corpusCpt :: R.Component SessionNodeProps corpusCpt :: R.Component SessionNodeProps
corpusCpt = here.component "corpus" cpt where corpusCpt = here.component "corpus" cpt where
cpt props@{ boxes, nodeId } _ = do cpt props@{ boxes, nodeId } _ = do
...@@ -291,7 +289,6 @@ type CorpusDocumentProps = ...@@ -291,7 +289,6 @@ type CorpusDocumentProps =
corpusDocument :: R2.Component CorpusDocumentProps corpusDocument :: R2.Component CorpusDocumentProps
corpusDocument = R.createElement corpusDocumentCpt corpusDocument = R.createElement corpusDocumentCpt
corpusDocumentCpt :: R.Component CorpusDocumentProps corpusDocumentCpt :: R.Component CorpusDocumentProps
corpusDocumentCpt = here.component "corpusDocument" cpt corpusDocumentCpt = here.component "corpusDocument" cpt
where where
...@@ -305,7 +302,6 @@ corpusDocumentCpt = here.component "corpusDocument" cpt ...@@ -305,7 +302,6 @@ corpusDocumentCpt = here.component "corpusDocument" cpt
dashboard :: R2.Component SessionNodeProps dashboard :: R2.Component SessionNodeProps
dashboard = R.createElement dashboardCpt dashboard = R.createElement dashboardCpt
dashboardCpt :: R.Component SessionNodeProps dashboardCpt :: R.Component SessionNodeProps
dashboardCpt = here.component "dashboard" cpt dashboardCpt = here.component "dashboard" cpt
where where
...@@ -318,7 +314,6 @@ type DocumentProps = ( listId :: ListId | SessionNodeProps ) ...@@ -318,7 +314,6 @@ type DocumentProps = ( listId :: ListId | SessionNodeProps )
document :: R2.Component DocumentProps document :: R2.Component DocumentProps
document = R.createElement documentCpt document = R.createElement documentCpt
documentCpt :: R.Component DocumentProps documentCpt :: R.Component DocumentProps
documentCpt = here.component "document" cpt where documentCpt = here.component "document" cpt where
cpt props@{ boxes, listId, nodeId } _ = do cpt props@{ boxes, listId, nodeId } _ = do
...@@ -331,35 +326,18 @@ documentCpt = here.component "document" cpt where ...@@ -331,35 +326,18 @@ documentCpt = here.component "document" cpt where
graphExplorer :: R2.Component SessionNodeProps graphExplorer :: R2.Component SessionNodeProps
graphExplorer = R.createElement graphExplorerCpt graphExplorer = R.createElement graphExplorerCpt
graphExplorerCpt :: R.Component SessionNodeProps graphExplorerCpt :: R.Component SessionNodeProps
graphExplorerCpt = here.component "graphExplorer" cpt where graphExplorerCpt = here.component "graphExplorer" cpt where
cpt props@{ boxes: boxes@{ backend cpt props@{ boxes
, handed
, route
, sessions
, showLogin
, sidePanelGraph
, sidePanelState
, tasks }
, nodeId } _ = do , nodeId } _ = do
let sessionProps = RE.pick props :: Record SessionProps let sessionProps = RE.pick props :: Record SessionProps
pure $ authed (Record.merge { content: \session -> pure $ authed (Record.merge { content: \session ->
-- simpleLayout { handed } GraphExplorer.explorerLayout { boxes
GraphExplorer.explorerLayout { backend
, boxes
, frontends: defaultFrontends
, graphId: nodeId , graphId: nodeId
, handed , session } [] } sessionProps) []
, route
, session
, sessions
, showLogin
, tasks } [] } sessionProps) []
home :: R2.Component Props home :: R2.Component Props
home = R.createElement homeCpt home = R.createElement homeCpt
homeCpt :: R.Component Props homeCpt :: R.Component Props
homeCpt = here.component "home" cpt where homeCpt = here.component "home" cpt where
cpt props@{ boxes: boxes@{ backend, sessions, showLogin } } _ = do cpt props@{ boxes: boxes@{ backend, sessions, showLogin } } _ = do
...@@ -367,7 +345,6 @@ homeCpt = here.component "home" cpt where ...@@ -367,7 +345,6 @@ homeCpt = here.component "home" cpt where
lists :: R2.Component SessionNodeProps lists :: R2.Component SessionNodeProps
lists = R.createElement listsCpt lists = R.createElement listsCpt
listsCpt :: R.Component SessionNodeProps listsCpt :: R.Component SessionNodeProps
listsCpt = here.component "lists" cpt where listsCpt = here.component "lists" cpt where
cpt props@{ boxes: { backend cpt props@{ boxes: { backend
...@@ -419,7 +396,6 @@ type RouteFrameProps = ( ...@@ -419,7 +396,6 @@ type RouteFrameProps = (
routeFrame :: R2.Component RouteFrameProps routeFrame :: R2.Component RouteFrameProps
routeFrame = R.createElement routeFrameCpt routeFrame = R.createElement routeFrameCpt
routeFrameCpt :: R.Component RouteFrameProps routeFrameCpt :: R.Component RouteFrameProps
routeFrameCpt = here.component "routeFrame" cpt where routeFrameCpt = here.component "routeFrame" cpt where
cpt props@{ boxes, nodeId, nodeType } _ = do cpt props@{ boxes, nodeId, nodeType } _ = do
...@@ -429,7 +405,6 @@ routeFrameCpt = here.component "routeFrame" cpt where ...@@ -429,7 +405,6 @@ routeFrameCpt = here.component "routeFrame" cpt where
team :: R2.Component SessionNodeProps team :: R2.Component SessionNodeProps
team = R.createElement teamCpt team = R.createElement teamCpt
teamCpt :: R.Component SessionNodeProps teamCpt :: R.Component SessionNodeProps
teamCpt = here.component "team" cpt where teamCpt = here.component "team" cpt where
cpt props@{ boxes, nodeId } _ = do cpt props@{ boxes, nodeId } _ = do
...@@ -439,7 +414,6 @@ teamCpt = here.component "team" cpt where ...@@ -439,7 +414,6 @@ teamCpt = here.component "team" cpt where
texts :: R2.Component SessionNodeProps texts :: R2.Component SessionNodeProps
texts = R.createElement textsCpt texts = R.createElement textsCpt
textsCpt :: R.Component SessionNodeProps textsCpt :: R.Component SessionNodeProps
textsCpt = here.component "texts" cpt textsCpt = here.component "texts" cpt
where where
...@@ -465,7 +439,6 @@ textsCpt = here.component "texts" cpt ...@@ -465,7 +439,6 @@ textsCpt = here.component "texts" cpt
user :: R2.Component SessionNodeProps user :: R2.Component SessionNodeProps
user = R.createElement userCpt user = R.createElement userCpt
userCpt :: R.Component SessionNodeProps userCpt :: R.Component SessionNodeProps
userCpt = here.component "user" cpt where userCpt = here.component "user" cpt where
cpt props@{ boxes: boxes@{ reloadForest cpt props@{ boxes: boxes@{ reloadForest
...@@ -489,7 +462,6 @@ type ContactProps = ( annuaireId :: NodeID | SessionNodeProps ) ...@@ -489,7 +462,6 @@ type ContactProps = ( annuaireId :: NodeID | SessionNodeProps )
contact :: R2.Component ContactProps contact :: R2.Component ContactProps
contact = R.createElement contactCpt contact = R.createElement contactCpt
contactCpt :: R.Component ContactProps contactCpt :: R.Component ContactProps
contactCpt = here.component "contact" cpt where contactCpt = here.component "contact" cpt where
cpt props@{ annuaireId cpt props@{ annuaireId
......
...@@ -84,7 +84,6 @@ logo = ...@@ -84,7 +84,6 @@ logo =
divDropdownLeft :: R2.Component () divDropdownLeft :: R2.Component ()
divDropdownLeft = R.createElement divDropdownLeftCpt divDropdownLeft = R.createElement divDropdownLeftCpt
divDropdownLeftCpt :: R.Component () divDropdownLeftCpt :: R.Component ()
divDropdownLeftCpt = here.component "divDropdownLeft" cpt divDropdownLeftCpt = here.component "divDropdownLeft" cpt
where where
...@@ -160,14 +159,13 @@ type MenuButtonProps = ( ...@@ -160,14 +159,13 @@ type MenuButtonProps = (
menuButton :: R2.Component MenuButtonProps menuButton :: R2.Component MenuButtonProps
menuButton = R.createElement menuButtonCpt menuButton = R.createElement menuButtonCpt
menuButtonCpt :: R.Component MenuButtonProps menuButtonCpt :: R.Component MenuButtonProps
menuButtonCpt = here.component "menuButton" cpt menuButtonCpt = here.component "menuButton" cpt
where where
cpt { element: LiNav { title, href, icon, text }, show } _ = do cpt { element: LiNav { title, href, icon, text }, show } _ = do
pure $ H.a { className: "dropdown-toggle navbar-text" pure $ H.a { className: "dropdown-toggle navbar-text"
-- , data: {toggle: "dropdown"} -- , data: {toggle: "dropdown"}
, href, title , title
, on: { click: \_ -> T.modify_ not show } , on: { click: \_ -> T.modify_ not show }
, role: "button" } [ , role: "button" } [
H.span { aria: {hidden : true}, className: icon } [] H.span { aria: {hidden : true}, className: icon } []
...@@ -182,7 +180,6 @@ type MenuElementsProps = ( ...@@ -182,7 +180,6 @@ type MenuElementsProps = (
menuElements :: R2.Component MenuElementsProps menuElements :: R2.Component MenuElementsProps
menuElements = R.createElement menuElementsCpt menuElements = R.createElement menuElementsCpt
menuElementsCpt :: R.Component MenuElementsProps menuElementsCpt :: R.Component MenuElementsProps
menuElementsCpt = here.component "menuElements" cpt menuElementsCpt = here.component "menuElements" cpt
where where
......
...@@ -83,27 +83,27 @@ instance showAppRoute :: Show AppRoute where ...@@ -83,27 +83,27 @@ instance showAppRoute :: Show AppRoute where
appPath :: AppRoute -> String appPath :: AppRoute -> String
appPath Home = "" appPath Home = ""
appPath Login = "login" appPath Login = "login"
appPath (Folder s i) = "folder/" <> show s <> "/" <> show i appPath (Folder s i) = "folder/" <> show s <> "/" <> show i
appPath (FolderPrivate s i) = "folderPrivate/" <> show s <> "/" <> show i appPath (FolderPrivate s i) = "folderPrivate/" <> show s <> "/" <> show i
appPath (FolderPublic s i) = "folderPublic/" <> show s <> "/" <> show i appPath (FolderPublic s i) = "folderPublic/" <> show s <> "/" <> show i
appPath (FolderShared s i) = "folderShared/" <> show s <> "/" <> show i appPath (FolderShared s i) = "folderShared/" <> show s <> "/" <> show i
appPath (Team s i) = "team/" <> show s <> "/" <> show i appPath (Team s i) = "team/" <> show s <> "/" <> show i
appPath (CorpusDocument s c l i) = "corpus/" <> show s <> "/" <> show c <> "/list/" <> show l <> "/document/" <> show i appPath (CorpusDocument s c l i) = "corpus/" <> show s <> "/" <> show c <> "/list/" <> show l <> "/document/" <> show i
appPath (Corpus s i) = "corpus/" <> show s <> "/" <> show i appPath (Corpus s i) = "corpus/" <> show s <> "/" <> show i
appPath (Document s l i) = "list/" <> show s <> "/" <> show l <> "/document/" <> show i appPath (Document s l i) = "list/" <> show s <> "/" <> show l <> "/document/" <> show i
appPath (Dashboard s i) = "dashboard/" <> show s <> "/" <> show i appPath (Dashboard s i) = "dashboard/" <> show s <> "/" <> show i
appPath (PGraphExplorer s i) = "graph/" <> show s <> "/" <> show i appPath (PGraphExplorer s i) = "graph/" <> show s <> "/" <> show i
appPath (Texts s i) = "texts/" <> show s <> "/" <> show i appPath (Texts s i) = "texts/" <> show s <> "/" <> show i
appPath (Lists s i) = "lists/" <> show s <> "/" <> show i appPath (Lists s i) = "lists/" <> show s <> "/" <> show i
appPath (Annuaire s i) = "annuaire/" <> show s <> "/" <> show i appPath (Annuaire s i) = "annuaire/" <> show s <> "/" <> show i
appPath (UserPage s i) = "user/" <> show s <> "/" <> show i appPath (UserPage s i) = "user/" <> show s <> "/" <> show i
appPath (ContactPage s a i) = "annuaire/" <> show s <> "/" <> show a <> "/contact/" <> show i appPath (ContactPage s a i) = "annuaire/" <> show s <> "/" <> show a <> "/contact/" <> show i
appPath (RouteFrameWrite s i) = "write/" <> show s <> "/" <> show i appPath (RouteFrameWrite s i) = "write/" <> show s <> "/" <> show i
appPath (RouteFrameCalc s i) = "calc/" <> show s <> "/" <> show i appPath (RouteFrameCalc s i) = "calc/" <> show s <> "/" <> show i
appPath (RouteFrameCode s i) = "code/" <> show s <> "/" <> show i appPath (RouteFrameCode s i) = "code/" <> show s <> "/" <> show i
appPath (RouteFile s i) = "file/" <> show s <> "/" <> show i appPath (RouteFile s i) = "file/" <> show s <> "/" <> show i
nodeTypeAppRoute :: NodeType -> SessionId -> Int -> Maybe AppRoute nodeTypeAppRoute :: NodeType -> SessionId -> Int -> Maybe AppRoute
nodeTypeAppRoute GT.Annuaire s i = Just $ Annuaire s i nodeTypeAppRoute GT.Annuaire s i = Just $ Annuaire s i
......
...@@ -9,9 +9,10 @@ import Data.Set as Set ...@@ -9,9 +9,10 @@ import Data.Set as Set
import Data.Sequence.Ordered as OSeq import Data.Sequence.Ordered as OSeq
import Data.String as S import Data.String as S
import Data.Unfoldable (class Unfoldable) import Data.Unfoldable (class Unfoldable)
import DOM.Simple.Window (window)
import Effect (Effect) import Effect (Effect)
import Prelude import Prelude
import Web.HTML (window) import Web.HTML as WHTML
import Web.HTML.Window (location) import Web.HTML.Window (location)
import Web.HTML.Location as WHL import Web.HTML.Location as WHL
...@@ -102,6 +103,6 @@ sortWith f = map (\(On _ y) -> y) <<< OSeq.toUnfoldable <<< foldr (\x -> OSeq.in ...@@ -102,6 +103,6 @@ sortWith f = map (\(On _ y) -> y) <<< OSeq.toUnfoldable <<< foldr (\x -> OSeq.in
href :: Effect String href :: Effect String
href = do href = do
w <- window w <- WHTML.window
loc <- location w loc <- location w
WHL.href loc WHL.href loc
function _debugger(a) {
debugger;
}
exports._debugger = _debugger;
module Gargantext.Utils.Debug where
import Data.Array as A
import Data.Foldable (foldr)
import Data.Maybe (Maybe(..))
import Data.Ord as Ord
import Effect (Effect)
import Effect.Uncurried (EffectFn1, runEffectFn1)
import Gargantext.Prelude
foreign import _debugger :: EffectFn1 Unit Unit
debugger :: Unit -> Effect Unit
debugger = runEffectFn1 _debugger
...@@ -56,7 +56,8 @@ ...@@ -56,7 +56,8 @@
#controls-container #controls-container
// position: fixed // position: fixed
position: absolute position: absolute
z-index: 999 // needs to appear above graph elements // needs to appear above graph elements
z-index: 900
backdrop-filter: blur(4px) backdrop-filter: blur(4px)
background: rgba(255,255,255,75%) background: rgba(255,255,255,75%)
// overflow: auto // overflow: auto
......
#dafixedtop #dafixedtop
// correction for the popover // correction for the popover
z-index: 999 z-index: 910
// height: 60px // height: 60px
//.logoSmall //.logoSmall
......
...@@ -173,7 +173,7 @@ li ...@@ -173,7 +173,7 @@ li
position: fixed position: fixed
top: 3.7em top: 3.7em
width: 15% width: 15%
z-index: 999 z-index: 900
.left-handed .left-handed
.forest-layout .forest-layout
left: 80% left: 80%
......
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