Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grégoire Locqueville
purescript-gargantext
Commits
25a54965
Commit
25a54965
authored
Jan 26, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-dashboard-cpt-fixes' into dev-node-corpus-add-text-cells
parents
855d2787
21252bab
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
193 additions
and
199 deletions
+193
-199
Forest.purs
src/Gargantext/Components/Forest.purs
+18
-18
Tree.purs
src/Gargantext/Components/Forest/Tree.purs
+24
-24
Node.purs
src/Gargantext/Components/Forest/Tree/Node.purs
+9
-9
Move.purs
src/Gargantext/Components/Forest/Tree/Node/Action/Move.purs
+3
-3
Frame.purs
...text/Components/Forest/Tree/Node/Action/Search/Frame.purs
+9
-9
SearchBar.purs
.../Components/Forest/Tree/Node/Action/Search/SearchBar.purs
+3
-3
SearchField.purs
...omponents/Forest/Tree/Node/Action/Search/SearchField.purs
+6
-6
Share.purs
src/Gargantext/Components/Forest/Tree/Node/Action/Share.purs
+3
-3
Upload.purs
...Gargantext/Components/Forest/Tree/Node/Action/Upload.purs
+3
-3
Box.purs
src/Gargantext/Components/Forest/Tree/Node/Box.purs
+6
-6
Tools.purs
src/Gargantext/Components/Forest/Tree/Node/Tools.purs
+6
-6
SubTree.purs
...Gargantext/Components/Forest/Tree/Node/Tools/SubTree.purs
+3
-3
Sidebar.purs
src/Gargantext/Components/GraphExplorer/Sidebar.purs
+3
-3
InputWithEnter.purs
src/Gargantext/Components/InputWithEnter.purs
+2
-3
NgramsTable.purs
src/Gargantext/Components/NgramsTable.purs
+10
-12
Core.purs
src/Gargantext/Components/NgramsTable/Core.purs
+3
-3
Tabs.purs
...gantext/Components/Nodes/Annuaire/User/Contacts/Tabs.purs
+3
-3
Corpus.purs
src/Gargantext/Components/Nodes/Corpus.purs
+24
-25
Common.purs
src/Gargantext/Components/Nodes/Corpus/Chart/Common.purs
+6
-6
Histo.purs
src/Gargantext/Components/Nodes/Corpus/Chart/Histo.purs
+3
-3
Dashboard.purs
src/Gargantext/Components/Nodes/Corpus/Dashboard.purs
+12
-12
Document.purs
src/Gargantext/Components/Nodes/Corpus/Document.purs
+3
-3
Lists.purs
src/Gargantext/Components/Nodes/Lists.purs
+18
-18
Table.purs
src/Gargantext/Components/Table.purs
+7
-9
TopBar.purs
src/Gargantext/Components/TopBar.purs
+6
-6
No files found.
src/Gargantext/Components/Forest.purs
View file @
25a54965
...
@@ -38,10 +38,10 @@ type Props = (
...
@@ -38,10 +38,10 @@ type Props = (
forest :: R2.Component Props
forest :: R2.Component Props
forest = R.createElement forestCpt
forest = R.createElement forestCpt
where
forestCpt :: R.Component Props
forestCpt = R.hooksComponentWithModule thisModule "forest" cpt
forestCpt :: R.Component Props
forestCpt = R.hooksComponentWithModule thisModule "forest" cpt
where
cpt { appReload
cpt { appReload
, asyncTasksRef
, asyncTasksRef
, backend
, backend
...
@@ -124,10 +124,10 @@ type ForestLayoutProps = (
...
@@ -124,10 +124,10 @@ type ForestLayoutProps = (
forestLayout :: R2.Component ForestLayoutProps
forestLayout :: R2.Component ForestLayoutProps
forestLayout props = R.createElement forestLayoutCpt props
forestLayout props = R.createElement forestLayoutCpt props
where
forestLayoutCpt :: R.Component ForestLayoutProps
forestLayoutCpt = R.hooksComponentWithModule thisModule "forestLayout" cpt
forestLayoutCpt :: R.Component ForestLayoutProps
forestLayoutCpt = R.hooksComponentWithModule thisModule "forestLayout" cpt
where
cpt props@{ handed } children = do
cpt props@{ handed } children = do
pure $ R.fragment [ topBar { handed } [], forestLayoutMain props children ]
pure $ R.fragment [ topBar { handed } [], forestLayoutMain props children ]
...
@@ -135,10 +135,10 @@ forestLayout props = R.createElement forestLayoutCpt props
...
@@ -135,10 +135,10 @@ forestLayout props = R.createElement forestLayoutCpt props
-- while the remaining ones are put into the main view
-- while the remaining ones are put into the main view
forestLayoutWithTopBar :: R2.Component ForestLayoutProps
forestLayoutWithTopBar :: R2.Component ForestLayoutProps
forestLayoutWithTopBar props = R.createElement forestLayoutWithTopBarCpt props
forestLayoutWithTopBar props = R.createElement forestLayoutWithTopBarCpt props
where
forestLayoutWithTopBarCpt :: R.Component ForestLayoutProps
forestLayoutWithTopBarCpt = R.hooksComponentWithModule thisModule "forestLayoutWithTopBar" cpt
forestLayoutWithTopBarCpt :: R.Component ForestLayoutProps
forestLayoutWithTopBarCpt = R.hooksComponentWithModule thisModule "forestLayoutWithTopBar" cpt
where
cpt props@{ handed } children = do
cpt props@{ handed } children = do
let { head: topBarChild, tail: mainChildren } =
let { head: topBarChild, tail: mainChildren } =
fromMaybe { head: H.div {} [], tail: [] } $ A.uncons children
fromMaybe { head: H.div {} [], tail: [] } $ A.uncons children
...
@@ -149,10 +149,10 @@ forestLayoutWithTopBar props = R.createElement forestLayoutWithTopBarCpt props
...
@@ -149,10 +149,10 @@ forestLayoutWithTopBar props = R.createElement forestLayoutWithTopBarCpt props
forestLayoutMain :: R2.Component ForestLayoutProps
forestLayoutMain :: R2.Component ForestLayoutProps
forestLayoutMain props = R.createElement forestLayoutMainCpt props
forestLayoutMain props = R.createElement forestLayoutMainCpt props
where
forestLayoutMainCpt :: R.Component ForestLayoutProps
forestLayoutMainCpt = R.hooksComponentWithModule thisModule "forestLayoutMain" cpt
forestLayoutMainCpt :: R.Component ForestLayoutProps
forestLayoutMainCpt = R.hooksComponentWithModule thisModule "forestLayoutMain" cpt
where
cpt props children = do
cpt props children = do
pure $ forestLayoutRaw props [
pure $ forestLayoutRaw props [
mainPage {} children
mainPage {} children
...
@@ -160,10 +160,10 @@ forestLayoutMain props = R.createElement forestLayoutMainCpt props
...
@@ -160,10 +160,10 @@ forestLayoutMain props = R.createElement forestLayoutMainCpt props
forestLayoutRaw :: R2.Component ForestLayoutProps
forestLayoutRaw :: R2.Component ForestLayoutProps
forestLayoutRaw props = R.createElement forestLayoutRawCpt props
forestLayoutRaw props = R.createElement forestLayoutRawCpt props
where
forestLayoutRawCpt :: R.Component ForestLayoutProps
forestLayoutRawCpt = R.hooksComponentWithModule thisModule "forestLayoutRaw" cpt
forestLayoutRawCpt :: R.Component ForestLayoutProps
forestLayoutRawCpt = R.hooksComponentWithModule thisModule "forestLayoutRaw" cpt
where
cpt { appReload
cpt { appReload
, asyncTasksRef
, asyncTasksRef
, backend
, backend
...
@@ -194,10 +194,10 @@ forestLayoutRaw props = R.createElement forestLayoutRawCpt props
...
@@ -194,10 +194,10 @@ forestLayoutRaw props = R.createElement forestLayoutRawCpt props
mainPage :: R2.Component ()
mainPage :: R2.Component ()
mainPage = R.createElement mainPageCpt
mainPage = R.createElement mainPageCpt
where
mainPageCpt :: R.Component ()
mainPageCpt = R.hooksComponentWithModule thisModule "mainPage" cpt
mainPageCpt :: R.Component ()
mainPageCpt = R.hooksComponentWithModule thisModule "mainPage" cpt
where
cpt {} children = do
cpt {} children = do
pure $ H.div {className: "col-md-10"} [
pure $ H.div {className: "col-md-10"} [
H.div {id: "page-wrapper"} [
H.div {id: "page-wrapper"} [
...
...
src/Gargantext/Components/Forest/Tree.purs
View file @
25a54965
...
@@ -63,11 +63,11 @@ type Props = (
...
@@ -63,11 +63,11 @@ type Props = (
)
)
treeView :: R2.Component Props
treeView :: R2.Component Props
treeView = R.createElement elCpt
treeView = R.createElement treeViewCpt
where
elCpt :: R.Component Props
elCpt = R.hooksComponentWithModule thisModule "treeView" cpt
treeViewCpt :: R.Component Props
treeViewCpt = R.hooksComponentWithModule thisModule "treeView" cpt
where
cpt { appReload
cpt { appReload
, asyncTasks
, asyncTasks
, currentRoute
, currentRoute
...
@@ -90,11 +90,11 @@ treeView = R.createElement elCpt
...
@@ -90,11 +90,11 @@ treeView = R.createElement elCpt
} []
} []
treeLoadView :: R2.Component Props
treeLoadView :: R2.Component Props
treeLoadView = R.createElement elCpt
treeLoadView = R.createElement treeLoadViewCpt
where
elCpt :: R.Component Props
elCpt = R.hooksComponentWithModule thisModule "treeLoadView" cpt
treeLoadViewCpt :: R.Component Props
treeLoadViewCpt = R.hooksComponentWithModule thisModule "treeLoadView" cpt
where
cpt { appReload
cpt { appReload
, asyncTasks
, asyncTasks
, currentRoute
, currentRoute
...
@@ -135,11 +135,11 @@ type TreeViewProps = (
...
@@ -135,11 +135,11 @@ type TreeViewProps = (
)
)
loadedTreeViewFirstLevel :: R2.Component TreeViewProps
loadedTreeViewFirstLevel :: R2.Component TreeViewProps
loadedTreeViewFirstLevel = R.createElement elCpt
loadedTreeViewFirstLevel = R.createElement loadedTreeViewFirstLevelCpt
where
elCpt :: R.Component TreeViewProps
elCpt = R.hooksComponentWithModule thisModule "loadedTreeViewFirstLevel" cpt
loadedTreeViewFirstLevelCpt :: R.Component TreeViewProps
loadedTreeViewFirstLevelCpt = R.hooksComponentWithModule thisModule "loadedTreeViewFirstLevel" cpt
where
cpt { appReload
cpt { appReload
, asyncTasks
, asyncTasks
, currentRoute
, currentRoute
...
@@ -180,11 +180,11 @@ type ToHtmlProps = (
...
@@ -180,11 +180,11 @@ type ToHtmlProps = (
)
)
toHtmlFirstLevel :: R2.Component ToHtmlProps
toHtmlFirstLevel :: R2.Component ToHtmlProps
toHtmlFirstLevel = R.createElement elCpt
toHtmlFirstLevel = R.createElement toHtmlFirstLevelCpt
where
elCpt :: R.Component ToHtmlProps
elCpt = R.hooksComponentWithModule thisModule "toHtmlFirstLevel" cpt
toHtmlFirstLevelCpt :: R.Component ToHtmlProps
toHtmlFirstLevelCpt = R.hooksComponentWithModule thisModule "toHtmlFirstLevel" cpt
where
cpt p@{ appReload
cpt p@{ appReload
, asyncTasks
, asyncTasks
, currentRoute
, currentRoute
...
@@ -268,11 +268,11 @@ type ChildNodeFirstLevelProps = (
...
@@ -268,11 +268,11 @@ type ChildNodeFirstLevelProps = (
)
)
childNodeFirstLevel :: R2.Component ChildNodeFirstLevelProps
childNodeFirstLevel :: R2.Component ChildNodeFirstLevelProps
childNodeFirstLevel = R.createElement elCpt
childNodeFirstLevel = R.createElement childNodeFirstLevelCpt
where
elCpt :: R.Component ChildNodeFirstLevelProps
elCpt = R.hooksComponentWithModule thisModule "childNodeFirstLevel" cpt
childNodeFirstLevelCpt :: R.Component ChildNodeFirstLevelProps
childNodeFirstLevelCpt = R.hooksComponentWithModule thisModule "childNodeFirstLevel" cpt
where
cpt props@{ appReload
cpt props@{ appReload
, asyncTasks
, asyncTasks
, currentRoute
, currentRoute
...
@@ -313,11 +313,11 @@ type ChildNodeFirstLevelPaintProps = (
...
@@ -313,11 +313,11 @@ type ChildNodeFirstLevelPaintProps = (
)
)
childNodeFirstLevelPaint :: R2.Component ChildNodeFirstLevelPaintProps
childNodeFirstLevelPaint :: R2.Component ChildNodeFirstLevelPaintProps
childNodeFirstLevelPaint = R.createElement elCpt
childNodeFirstLevelPaint = R.createElement childNodeFirstLevelPainCpt
where
elCpt :: R.Component ChildNodeFirstLevelPaintProps
elCpt = R.hooksComponentWithModule thisModule "childNodeFirstLevelPaint" cpt
childNodeFirstLevelPainCpt :: R.Component ChildNodeFirstLevelPaintProps
childNodeFirstLevelPainCpt = R.hooksComponentWithModule thisModule "childNodeFirstLevelPaint" cpt
where
-- TODO folderOpen is unused
-- TODO folderOpen is unused
cpt props@{ asyncTasks
cpt props@{ asyncTasks
...
...
src/Gargantext/Components/Forest/Tree/Node.purs
View file @
25a54965
...
@@ -60,19 +60,19 @@ type IsLeaf = Boolean
...
@@ -60,19 +60,19 @@ type IsLeaf = Boolean
nodeSpan :: R2.Component NodeMainSpanProps
nodeSpan :: R2.Component NodeMainSpanProps
nodeSpan = R.createElement nodeSpanCpt
nodeSpan = R.createElement nodeSpanCpt
where
nodeSpanCpt :: R.Component NodeMainSpanProps
nodeSpanCpt = R.hooksComponentWithModule thisModule "nodeSpan" cpt
nodeSpanCpt :: R.Component NodeMainSpanProps
nodeSpanCpt = R.hooksComponentWithModule thisModule "nodeSpan" cpt
where
cpt props children = do
cpt props children = do
pure $ H.div {} ([ nodeMainSpan props [] ] <> children)
pure $ H.div {} ([ nodeMainSpan props [] ] <> children)
nodeMainSpan :: R2.Component NodeMainSpanProps
nodeMainSpan :: R2.Component NodeMainSpanProps
nodeMainSpan = R.createElement nodeMainSpanCpt
nodeMainSpan = R.createElement nodeMainSpanCpt
where
nodeMainSpanCpt :: R.Component NodeMainSpanProps
nodeMainSpanCpt = R.hooksComponentWithModule thisModule "nodeMainSpan" cpt
nodeMainSpanCpt :: R.Component NodeMainSpanProps
nodeMainSpanCpt = R.hooksComponentWithModule thisModule "nodeMainSpan" cpt
where
cpt props@{ appReload
cpt props@{ appReload
, asyncTasks: (asyncTasks /\ dispatchAsyncTasks)
, asyncTasks: (asyncTasks /\ dispatchAsyncTasks)
, currentRoute
, currentRoute
...
@@ -249,10 +249,10 @@ type NodeActionsProps =
...
@@ -249,10 +249,10 @@ type NodeActionsProps =
nodeActions :: Record NodeActionsProps -> R.Element
nodeActions :: Record NodeActionsProps -> R.Element
nodeActions p = R.createElement nodeActionsCpt p []
nodeActions p = R.createElement nodeActionsCpt p []
where
nodeActionsCpt :: R.Component NodeActionsProps
nodeActionsCpt = R.hooksComponentWithModule thisModule "nodeActions" cpt
nodeActionsCpt :: R.Component NodeActionsProps
nodeActionsCpt = R.hooksComponentWithModule thisModule "nodeActions" cpt
where
cpt { id
cpt { id
, nodeType: GT.Graph
, nodeType: GT.Graph
, session
, session
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Move.purs
View file @
25a54965
...
@@ -24,10 +24,10 @@ moveNodeReq session fromId toId =
...
@@ -24,10 +24,10 @@ moveNodeReq session fromId toId =
moveNode :: Record SubTreeParamsIn -> R.Element
moveNode :: Record SubTreeParamsIn -> R.Element
moveNode p = R.createElement moveNodeCpt p []
moveNode p = R.createElement moveNodeCpt p []
where
moveNodeCpt :: R.Component SubTreeParamsIn
moveNodeCpt = R.hooksComponentWithModule thisModule "moveNode" cpt
moveNodeCpt :: R.Component SubTreeParamsIn
moveNodeCpt = R.hooksComponentWithModule thisModule "moveNode" cpt
where
cpt { dispatch, handed, id, nodeType, session, subTreeParams } _ = do
cpt { dispatch, handed, id, nodeType, session, subTreeParams } _ = do
action@(valAction /\ setAction) :: R.State Action <- R.useState' (MoveNode {params: Nothing})
action@(valAction /\ setAction) :: R.State Action <- R.useState' (MoveNode {params: Nothing})
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Search/Frame.purs
View file @
25a54965
...
@@ -41,10 +41,10 @@ type SearchIFramesProps = (
...
@@ -41,10 +41,10 @@ type SearchIFramesProps = (
searchIframes :: Record SearchIFramesProps -> R.Element
searchIframes :: Record SearchIFramesProps -> R.Element
searchIframes props = R.createElement searchIframesCpt props []
searchIframes props = R.createElement searchIframesCpt props []
where
searchIframesCpt :: R.Component SearchIFramesProps
searchIframesCpt = R.hooksComponentWithModule thisModule "searchIframes" cpt
searchIframesCpt :: R.Component SearchIFramesProps
searchIframesCpt = R.hooksComponentWithModule thisModule "searchIframes" cpt
where
cpt { iframeRef, search: search@(search' /\ _) } _ = do
cpt { iframeRef, search: search@(search' /\ _) } _ = do
pure $ if isIsTex_Advanced search'.datafield
pure $ if isIsTex_Advanced search'.datafield
then divIframe { frameSource: Istex, iframeRef, search }
then divIframe { frameSource: Istex, iframeRef, search }
...
@@ -62,10 +62,10 @@ type IFrameProps = (
...
@@ -62,10 +62,10 @@ type IFrameProps = (
divIframe :: Record IFrameProps -> R.Element
divIframe :: Record IFrameProps -> R.Element
divIframe props = R.createElement divIframeCpt props []
divIframe props = R.createElement divIframeCpt props []
where
divIframeCpt :: R.Component IFrameProps
divIframeCpt = R.hooksComponentWithModule thisModule "divIframe" cpt
divIframeCpt :: R.Component IFrameProps
divIframeCpt = R.hooksComponentWithModule thisModule "divIframe" cpt
where
cpt { frameSource, iframeRef, search: search@(search' /\ _) } _ = do
cpt { frameSource, iframeRef, search: search@(search' /\ _) } _ = do
pure $ H.div { className: "frame-search card" }
pure $ H.div { className: "frame-search card" }
[ iframeWith { frameSource, iframeRef, search } ]
[ iframeWith { frameSource, iframeRef, search } ]
...
@@ -77,10 +77,10 @@ frameUrl Searx = "https://searx.frame.gargantext.org" -- 192.168.1.4:8080"
...
@@ -77,10 +77,10 @@ frameUrl Searx = "https://searx.frame.gargantext.org" -- 192.168.1.4:8080"
iframeWith :: Record IFrameProps -> R.Element
iframeWith :: Record IFrameProps -> R.Element
iframeWith props = R.createElement iframeWithCpt props []
iframeWith props = R.createElement iframeWithCpt props []
where
iframeWithCpt :: R.Component IFrameProps
iframeWithCpt = R.hooksComponentWithModule thisModule "iframeWith" cpt
iframeWithCpt :: R.Component IFrameProps
iframeWithCpt = R.hooksComponentWithModule thisModule "iframeWith" cpt
where
cpt { frameSource, iframeRef, search: (search /\ setSearch) } _ =
cpt { frameSource, iframeRef, search: (search /\ setSearch) } _ =
pure $ H.iframe { src: src frameSource search.term
pure $ H.iframe { src: src frameSource search.term
, width: "100%"
, width: "100%"
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Search/SearchBar.purs
View file @
25a54965
...
@@ -26,10 +26,10 @@ type Props = ( langs :: Array Lang
...
@@ -26,10 +26,10 @@ type Props = ( langs :: Array Lang
searchBar :: Record Props -> R.Element
searchBar :: Record Props -> R.Element
searchBar props = R.createElement searchBarCpt props []
searchBar props = R.createElement searchBarCpt props []
where
searchBarCpt :: R.Component Props
searchBarCpt = R.hooksComponentWithModule thisModule "searchBar" cpt
searchBarCpt :: R.Component Props
searchBarCpt = R.hooksComponentWithModule thisModule "searchBar" cpt
where
cpt {langs, onSearch, search: search@(s /\ _), session} _ = do
cpt {langs, onSearch, search: search@(s /\ _), session} _ = do
--onSearchChange session s
--onSearchChange session s
pure $ H.div { className: "search-bar" }
pure $ H.div { className: "search-bar" }
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Search/SearchField.purs
View file @
25a54965
...
@@ -266,10 +266,10 @@ type DatabaseInputProps = (
...
@@ -266,10 +266,10 @@ type DatabaseInputProps = (
databaseInput :: R2.Component DatabaseInputProps
databaseInput :: R2.Component DatabaseInputProps
databaseInput = R.createElement databaseInputCpt
databaseInput = R.createElement databaseInputCpt
where
databaseInputCpt :: R.Component DatabaseInputProps
databaseInputCpt = R.hooksComponentWithModule thisModule "databaseInput" cpt
databaseInputCpt :: R.Component DatabaseInputProps
databaseInputCpt = R.hooksComponentWithModule thisModule "databaseInput" cpt
where
cpt { databases
cpt { databases
, search: (search /\ setSearch) } _ = do
, search: (search /\ setSearch) } _ = do
pure $
pure $
...
@@ -338,10 +338,10 @@ type SearchInputProps =
...
@@ -338,10 +338,10 @@ type SearchInputProps =
searchInput :: Record SearchInputProps -> R.Element
searchInput :: Record SearchInputProps -> R.Element
searchInput p = R.createElement searchInputCpt p []
searchInput p = R.createElement searchInputCpt p []
where
searchInputCpt :: R.Component SearchInputProps
searchInputCpt = R.hooksComponentWithModule thisModule "searchInput" cpt
searchInputCpt :: R.Component SearchInputProps
searchInputCpt = R.hooksComponentWithModule thisModule "searchInput" cpt
where
cpt {search: (search@{ term } /\ setSearch)} _ = do
cpt {search: (search@{ term } /\ setSearch)} _ = do
valueRef <- R.useRef term
valueRef <- R.useRef term
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Share.purs
View file @
25a54965
...
@@ -57,10 +57,10 @@ instance encodeJsonShareNodeParams :: Argonaut.EncodeJson ShareNodeParams where
...
@@ -57,10 +57,10 @@ instance encodeJsonShareNodeParams :: Argonaut.EncodeJson ShareNodeParams where
------------------------------------------------------------------------
------------------------------------------------------------------------
shareNode :: Record SubTreeParamsIn -> R.Element
shareNode :: Record SubTreeParamsIn -> R.Element
shareNode p = R.createElement shareNodeCpt p []
shareNode p = R.createElement shareNodeCpt p []
where
shareNodeCpt :: R.Component SubTreeParamsIn
shareNodeCpt = R.hooksComponentWithModule thisModule "shareNode" cpt
shareNodeCpt :: R.Component SubTreeParamsIn
shareNodeCpt = R.hooksComponentWithModule thisModule "shareNode" cpt
where
cpt p@{dispatch, subTreeParams, id, nodeType, session, handed} _ = do
cpt p@{dispatch, subTreeParams, id, nodeType, session, handed} _ = do
action@(valAction /\ setAction) :: R.State Action <- R.useState' (Action.SharePublic {params: Nothing})
action@(valAction /\ setAction) :: R.State Action <- R.useState' (Action.SharePublic {params: Nothing})
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Upload.purs
View file @
25a54965
...
@@ -71,10 +71,10 @@ type UploadFile =
...
@@ -71,10 +71,10 @@ type UploadFile =
uploadFileView :: Record Props -> R.Element
uploadFileView :: Record Props -> R.Element
uploadFileView props = R.createElement uploadFileViewCpt props []
uploadFileView props = R.createElement uploadFileViewCpt props []
where
uploadFileViewCpt :: R.Component Props
uploadFileViewCpt = R.hooksComponentWithModule thisModule "uploadFileView" cpt
uploadFileViewCpt :: R.Component Props
uploadFileViewCpt = R.hooksComponentWithModule thisModule "uploadFileView" cpt
where
cpt {dispatch, id, nodeType} _ = do
cpt {dispatch, id, nodeType} _ = do
mFile :: R.State (Maybe UploadFile) <- R.useState' Nothing
mFile :: R.State (Maybe UploadFile) <- R.useState' Nothing
fileType@(_ /\ setFileType) <- R.useState' CSV
fileType@(_ /\ setFileType) <- R.useState' CSV
...
...
src/Gargantext/Components/Forest/Tree/Node/Box.purs
View file @
25a54965
...
@@ -48,10 +48,10 @@ type CommonProps =
...
@@ -48,10 +48,10 @@ type CommonProps =
nodePopupView :: Record NodePopupProps -> R.Element
nodePopupView :: Record NodePopupProps -> R.Element
nodePopupView p = R.createElement nodePopupCpt p []
nodePopupView p = R.createElement nodePopupCpt p []
where
nodePopupCpt :: R.Component NodePopupProps
nodePopupCpt = R.hooksComponentWithModule thisModule "nodePopupView" cpt
nodePopupCpt :: R.Component NodePopupProps
nodePopupCpt = R.hooksComponentWithModule thisModule "nodePopupView" cpt
where
cpt p _ = do
cpt p _ = do
renameIsOpen <- R.useState' false
renameIsOpen <- R.useState' false
...
@@ -254,10 +254,10 @@ type PanelActionProps =
...
@@ -254,10 +254,10 @@ type PanelActionProps =
panelAction :: Record PanelActionProps -> R.Element
panelAction :: Record PanelActionProps -> R.Element
panelAction p = R.createElement panelActionCpt p []
panelAction p = R.createElement panelActionCpt p []
where
panelActionCpt :: R.Component PanelActionProps
panelActionCpt = R.hooksComponentWithModule thisModule "panelAction" cpt
panelActionCpt :: R.Component PanelActionProps
panelActionCpt = R.hooksComponentWithModule thisModule "panelAction" cpt
where
cpt {action: Documentation nodeType} _ = actionDoc nodeType
cpt {action: Documentation nodeType} _ = actionDoc nodeType
cpt {action: Download, id, nodeType, session} _ = actionDownload nodeType id session
cpt {action: Download, id, nodeType, session} _ = actionDownload nodeType id session
cpt {action: Upload, dispatch, id, nodeType, session} _ = actionUpload nodeType id session dispatch
cpt {action: Upload, dispatch, id, nodeType, session} _ = actionUpload nodeType id session dispatch
...
...
src/Gargantext/Components/Forest/Tree/Node/Tools.purs
View file @
25a54965
...
@@ -292,10 +292,10 @@ type NodeLinkProps = (
...
@@ -292,10 +292,10 @@ type NodeLinkProps = (
nodeLink :: R2.Component NodeLinkProps
nodeLink :: R2.Component NodeLinkProps
nodeLink = R.createElement nodeLinkCpt
nodeLink = R.createElement nodeLinkCpt
where
nodeLinkCpt :: R.Component NodeLinkProps
nodeLinkCpt = R.hooksComponentWithModule thisModule "nodeLink" cpt
nodeLinkCpt :: R.Component NodeLinkProps
nodeLinkCpt = R.hooksComponentWithModule thisModule "nodeLink" cpt
where
cpt { folderOpen: (_ /\ setFolderOpen)
cpt { folderOpen: (_ /\ setFolderOpen)
, frontends
, frontends
, handed
, handed
...
@@ -348,10 +348,10 @@ type NodeTextProps =
...
@@ -348,10 +348,10 @@ type NodeTextProps =
nodeText :: Record NodeTextProps -> R.Element
nodeText :: Record NodeTextProps -> R.Element
nodeText p = R.createElement nodeTextCpt p []
nodeText p = R.createElement nodeTextCpt p []
where
nodeTextCpt :: R.Component NodeTextProps
nodeTextCpt = R.hooksComponentWithModule thisModule "nodeText" cpt
nodeTextCpt :: R.Component NodeTextProps
nodeTextCpt = R.hooksComponentWithModule thisModule "nodeText" cpt
where
cpt { isSelected: true, name } _ = do
cpt { isSelected: true, name } _ = do
pure $ H.u {} [
pure $ H.u {} [
H.b {} [
H.b {} [
...
...
src/Gargantext/Components/Forest/Tree/Node/Tools/SubTree.purs
View file @
25a54965
...
@@ -36,10 +36,10 @@ type SubTreeParamsProps =
...
@@ -36,10 +36,10 @@ type SubTreeParamsProps =
subTreeView :: Record SubTreeParamsProps -> R.Element
subTreeView :: Record SubTreeParamsProps -> R.Element
subTreeView props = R.createElement subTreeViewCpt props []
subTreeView props = R.createElement subTreeViewCpt props []
where
subTreeViewCpt :: R.Component SubTreeParamsProps
subTreeViewCpt = R.hooksComponentWithModule thisModule "subTreeView" cpt
subTreeViewCpt :: R.Component SubTreeParamsProps
subTreeViewCpt = R.hooksComponentWithModule thisModule "subTreeView" cpt
where
cpt params@{ action
cpt params@{ action
, dispatch
, dispatch
, handed
, handed
...
...
src/Gargantext/Components/GraphExplorer/Sidebar.purs
View file @
25a54965
...
@@ -54,10 +54,10 @@ type Props =
...
@@ -54,10 +54,10 @@ type Props =
sidebar :: Record Props -> R.Element
sidebar :: Record Props -> R.Element
sidebar props = R.createElement sidebarCpt props []
sidebar props = R.createElement sidebarCpt props []
where
sidebarCpt :: R.Component Props
sidebarCpt = R.hooksComponentWithModule thisModule "sidebar" cpt
sidebarCpt :: R.Component Props
sidebarCpt = R.hooksComponentWithModule thisModule "sidebar" cpt
where
cpt {showSidePanel: (GET.Closed /\ _)} _children = do
cpt {showSidePanel: (GET.Closed /\ _)} _children = do
pure $ RH.div {} []
pure $ RH.div {} []
cpt {showSidePanel: (GET.InitialClosed /\ _)} _children = do
cpt {showSidePanel: (GET.InitialClosed /\ _)} _children = do
...
...
src/Gargantext/Components/InputWithEnter.purs
View file @
25a54965
...
@@ -25,10 +25,9 @@ type Props a = (
...
@@ -25,10 +25,9 @@ type Props a = (
inputWithEnter :: forall a. Record (Props a) -> R.Element
inputWithEnter :: forall a. Record (Props a) -> R.Element
inputWithEnter props = R.createElement inputWithEnterCpt props []
inputWithEnter props = R.createElement inputWithEnterCpt props []
inputWithEnterCpt :: forall a. R.Component (Props a)
inputWithEnterCpt = R.hooksComponentWithModule thisModule "inputWithEnter" cpt
where
where
inputWithEnterCpt :: forall a. R.Component (Props a)
inputWithEnterCpt = R.hooksComponentWithModule thisModule "inputWithEnter" cpt
cpt props@{ onEnter, onValueChanged
cpt props@{ onEnter, onValueChanged
, autoFocus, autoSave, className, defaultValue, placeholder } _ = do
, autoFocus, autoSave, className, defaultValue, placeholder } _ = do
pure $ H.input { on: { blur: \_ -> if autoSave then onEnter unit else pure unit
pure $ H.input { on: { blur: \_ -> if autoSave then onEnter unit else pure unit
...
...
src/Gargantext/Components/NgramsTable.purs
View file @
25a54965
...
@@ -274,10 +274,9 @@ type Props = (
...
@@ -274,10 +274,9 @@ type Props = (
loadedNgramsTable :: R2.Component Props
loadedNgramsTable :: R2.Component Props
loadedNgramsTable = R.createElement loadedNgramsTableCpt
loadedNgramsTable = R.createElement loadedNgramsTableCpt
loadedNgramsTableCpt :: R.Component Props
loadedNgramsTableCpt = R.hooksComponentWithModule thisModule "loadedNgramsTable" cpt
where
where
loadedNgramsTableCpt :: R.Component Props
loadedNgramsTableCpt = R.hooksComponentWithModule thisModule "loadedNgramsTable" cpt
cpt props@{ afterSync
cpt props@{ afterSync
, appReload
, appReload
, asyncTasksRef
, asyncTasksRef
...
@@ -524,10 +523,9 @@ type MainNgramsTableProps = (
...
@@ -524,10 +523,9 @@ type MainNgramsTableProps = (
mainNgramsTable :: R2.Component MainNgramsTableProps
mainNgramsTable :: R2.Component MainNgramsTableProps
mainNgramsTable = R.createElement mainNgramsTableCpt
mainNgramsTable = R.createElement mainNgramsTableCpt
mainNgramsTableCpt :: R.Component MainNgramsTableProps
mainNgramsTableCpt = R.hooksComponentWithModule thisModule "mainNgramsTable" cpt
where
where
mainNgramsTableCpt :: R.Component MainNgramsTableProps
mainNgramsTableCpt = R.hooksComponentWithModule thisModule "mainNgramsTable" cpt
cpt props@{ afterSync
cpt props@{ afterSync
, appReload
, appReload
, asyncTasksRef
, asyncTasksRef
...
@@ -631,10 +629,10 @@ type MainNgramsTablePaintProps = (
...
@@ -631,10 +629,10 @@ type MainNgramsTablePaintProps = (
mainNgramsTablePaint :: R2.Component MainNgramsTablePaintProps
mainNgramsTablePaint :: R2.Component MainNgramsTablePaintProps
mainNgramsTablePaint = R.createElement mainNgramsTablePaintCpt
mainNgramsTablePaint = R.createElement mainNgramsTablePaintCpt
where
mainNgramsTablePaintCpt :: R.Component MainNgramsTablePaintProps
mainNgramsTablePaintCpt = R.hooksComponentWithModule thisModule "mainNgramsTablePaint" cpt
mainNgramsTablePaintCpt :: R.Component MainNgramsTablePaintProps
mainNgramsTablePaintCpt = R.hooksComponentWithModule thisModule "mainNgramsTablePaint" cpt
where
cpt props@{ afterSync
cpt props@{ afterSync
, appReload
, appReload
, asyncTasksRef
, asyncTasksRef
...
@@ -670,10 +668,10 @@ type MainNgramsTablePaintNoCacheProps = (
...
@@ -670,10 +668,10 @@ type MainNgramsTablePaintNoCacheProps = (
mainNgramsTablePaintNoCache :: R2.Component MainNgramsTablePaintNoCacheProps
mainNgramsTablePaintNoCache :: R2.Component MainNgramsTablePaintNoCacheProps
mainNgramsTablePaintNoCache = R.createElement mainNgramsTablePaintNoCacheCpt
mainNgramsTablePaintNoCache = R.createElement mainNgramsTablePaintNoCacheCpt
where
mainNgramsTablePaintNoCacheCpt :: R.Component MainNgramsTablePaintNoCacheProps
mainNgramsTablePaintNoCacheCpt = R.hooksComponentWithModule thisModule "mainNgramsTablePaintNoCache" cpt
mainNgramsTablePaintNoCacheCpt :: R.Component MainNgramsTablePaintNoCacheProps
mainNgramsTablePaintNoCacheCpt = R.hooksComponentWithModule thisModule "mainNgramsTablePaintNoCache" cpt
where
cpt props@{ afterSync
cpt props@{ afterSync
, appReload
, appReload
, asyncTasksRef
, asyncTasksRef
...
...
src/Gargantext/Components/NgramsTable/Core.purs
View file @
25a54965
...
@@ -1129,10 +1129,10 @@ type SyncResetButtonsProps =
...
@@ -1129,10 +1129,10 @@ type SyncResetButtonsProps =
syncResetButtons :: Record SyncResetButtonsProps -> R.Element
syncResetButtons :: Record SyncResetButtonsProps -> R.Element
syncResetButtons p = R.createElement syncResetButtonsCpt p []
syncResetButtons p = R.createElement syncResetButtonsCpt p []
where
syncResetButtonsCpt :: R.Component SyncResetButtonsProps
syncResetButtonsCpt = R.hooksComponentWithModule thisModule "syncResetButtons" cpt
syncResetButtonsCpt :: R.Component SyncResetButtonsProps
syncResetButtonsCpt = R.hooksComponentWithModule thisModule "syncResetButtons" cpt
where
cpt { afterSync, ngramsLocalPatch, performAction } _ = do
cpt { afterSync, ngramsLocalPatch, performAction } _ = do
synchronizing@(s /\ setSynchronizing) <- R.useState' false
synchronizing@(s /\ setSynchronizing) <- R.useState' false
...
...
src/Gargantext/Components/Nodes/Annuaire/User/Contacts/Tabs.purs
View file @
25a54965
...
@@ -144,10 +144,10 @@ type NgramsViewTabsProps = (
...
@@ -144,10 +144,10 @@ type NgramsViewTabsProps = (
ngramsView :: R2.Component NgramsViewTabsProps
ngramsView :: R2.Component NgramsViewTabsProps
ngramsView = R.createElement ngramsViewCpt
ngramsView = R.createElement ngramsViewCpt
where
ngramsViewCpt :: R.Component NgramsViewTabsProps
ngramsViewCpt = R.hooksComponentWithModule thisModule "ngramsView" cpt
ngramsViewCpt :: R.Component NgramsViewTabsProps
ngramsViewCpt = R.hooksComponentWithModule thisModule "ngramsView" cpt
where
cpt { appReload
cpt { appReload
, asyncTasksRef
, asyncTasksRef
, cacheState
, cacheState
...
...
src/Gargantext/Components/Nodes/Corpus.purs
View file @
25a54965
...
@@ -47,10 +47,10 @@ type KeyProps =
...
@@ -47,10 +47,10 @@ type KeyProps =
corpusLayout :: Record Props -> R.Element
corpusLayout :: Record Props -> R.Element
corpusLayout props = R.createElement corpusLayoutCpt props []
corpusLayout props = R.createElement corpusLayoutCpt props []
where
corpusLayoutCpt :: R.Component Props
corpusLayoutCpt = R.hooksComponentWithModule thisModule "corpusLayout" cpt
corpusLayoutCpt :: R.Component Props
corpusLayoutCpt = R.hooksComponentWithModule thisModule "corpusLayout" cpt
where
cpt { nodeId, session } _ = do
cpt { nodeId, session } _ = do
let sid = sessionId session
let sid = sessionId session
...
@@ -59,10 +59,9 @@ corpusLayout props = R.createElement corpusLayoutCpt props []
...
@@ -59,10 +59,9 @@ corpusLayout props = R.createElement corpusLayoutCpt props []
corpusLayoutWithKey :: Record KeyProps -> R.Element
corpusLayoutWithKey :: Record KeyProps -> R.Element
corpusLayoutWithKey props = R.createElement corpusLayoutWithKeyCpt props []
corpusLayoutWithKey props = R.createElement corpusLayoutWithKeyCpt props []
corpusLayoutWithKeyCpt :: R.Component KeyProps
corpusLayoutWithKeyCpt = R.hooksComponentWithModule thisModule "corpusLayoutWithKey" cpt
where
where
corpusLayoutWithKeyCpt :: R.Component KeyProps
corpusLayoutWithKeyCpt = R.hooksComponentWithModule thisModule "corpusLayoutWithKey" cpt
cpt { nodeId, session } _ = do
cpt { nodeId, session } _ = do
reload <- GUR.new
reload <- GUR.new
...
@@ -77,10 +76,10 @@ type ViewProps =
...
@@ -77,10 +76,10 @@ type ViewProps =
corpusLayoutView :: Record ViewProps -> R.Element
corpusLayoutView :: Record ViewProps -> R.Element
corpusLayoutView props = R.createElement corpusLayoutViewCpt props []
corpusLayoutView props = R.createElement corpusLayoutViewCpt props []
where
corpusLayoutViewCpt :: R.Component ViewProps
corpusLayoutViewCpt = R.hooksComponentWithModule thisModule "corpusLayoutView" cpt
corpusLayoutViewCpt :: R.Component ViewProps
corpusLayoutViewCpt = R.hooksComponentWithModule thisModule "corpusLayoutView" cpt
where
cpt {corpus: (NodePoly {hyperdata: Hyperdata {fields}}), nodeId, reload, session} _ = do
cpt {corpus: (NodePoly {hyperdata: Hyperdata {fields}}), nodeId, reload, session} _ = do
let fieldsWithIndex = List.mapWithIndex (\idx -> \t -> Tuple idx t) fields
let fieldsWithIndex = List.mapWithIndex (\idx -> \t -> Tuple idx t) fields
fieldsS <- R.useState' fieldsWithIndex
fieldsS <- R.useState' fieldsWithIndex
...
@@ -140,11 +139,11 @@ type FieldsCodeEditorProps =
...
@@ -140,11 +139,11 @@ type FieldsCodeEditorProps =
)
)
fieldsCodeEditor :: R2.Component FieldsCodeEditorProps
fieldsCodeEditor :: R2.Component FieldsCodeEditorProps
fieldsCodeEditor = R.createElement el
fieldsCodeEditor = R.createElement fieldsCodeEditorCpt
where
el :: R.Component FieldsCodeEditorProps
el = R.hooksComponentWithModule thisModule "fieldsCodeEditorCpt" cpt
fieldsCodeEditorCpt :: R.Component FieldsCodeEditorProps
fieldsCodeEditorCpt = R.hooksComponentWithModule thisModule "fieldsCodeEditorCpt" cpt
where
cpt {nodeId, fields: fS@(fields /\ _), session} _ = do
cpt {nodeId, fields: fS@(fields /\ _), session} _ = do
masterKey <- GUR.new
masterKey <- GUR.new
...
@@ -210,10 +209,10 @@ type FieldCodeEditorProps =
...
@@ -210,10 +209,10 @@ type FieldCodeEditorProps =
fieldCodeEditorWrapper :: Record FieldCodeEditorProps -> R.Element
fieldCodeEditorWrapper :: Record FieldCodeEditorProps -> R.Element
fieldCodeEditorWrapper props = R.createElement fieldCodeEditorWrapperCpt props []
fieldCodeEditorWrapper props = R.createElement fieldCodeEditorWrapperCpt props []
where
fieldCodeEditorWrapperCpt :: R.Component FieldCodeEditorProps
fieldCodeEditorWrapperCpt = R.hooksComponentWithModule thisModule "fieldCodeEditorWrapperCpt" cpt
fieldCodeEditorWrapperCpt :: R.Component FieldCodeEditorProps
fieldCodeEditorWrapperCpt = R.hooksComponentWithModule thisModule "fieldCodeEditorWrapperCpt" cpt
where
cpt props@{canMoveDown, canMoveUp, field: Field {name, typ}, onMoveDown, onMoveUp, onRemove, onRename} _ = do
cpt props@{canMoveDown, canMoveUp, field: Field {name, typ}, onMoveDown, onMoveUp, onRemove, onRename} _ = do
pure $ H.div { className: "row card" } [
pure $ H.div { className: "row card" } [
H.div { className: "card-header" } [
H.div { className: "card-header" } [
...
@@ -259,10 +258,10 @@ type RenameableProps =
...
@@ -259,10 +258,10 @@ type RenameableProps =
renameable :: Record RenameableProps -> R.Element
renameable :: Record RenameableProps -> R.Element
renameable props = R.createElement renameableCpt props []
renameable props = R.createElement renameableCpt props []
where
renameableCpt :: R.Component RenameableProps
renameableCpt = R.hooksComponentWithModule thisModule "renameableCpt" cpt
renameableCpt :: R.Component RenameableProps
renameableCpt = R.hooksComponentWithModule thisModule "renameableCpt" cpt
where
cpt {onRename, text} _ = do
cpt {onRename, text} _ = do
isEditing <- R.useState' false
isEditing <- R.useState' false
state <- R.useState' text
state <- R.useState' text
...
@@ -289,10 +288,10 @@ type RenameableTextProps =
...
@@ -289,10 +288,10 @@ type RenameableTextProps =
renameableText :: Record RenameableTextProps -> R.Element
renameableText :: Record RenameableTextProps -> R.Element
renameableText props = R.createElement renameableTextCpt props []
renameableText props = R.createElement renameableTextCpt props []
where
renameableTextCpt :: R.Component RenameableTextProps
renameableTextCpt = R.hooksComponentWithModule thisModule "renameableTextCpt" cpt
renameableTextCpt :: R.Component RenameableTextProps
renameableTextCpt = R.hooksComponentWithModule thisModule "renameableTextCpt" cpt
where
cpt {isEditing: (false /\ setIsEditing), state: (text /\ _)} _ = do
cpt {isEditing: (false /\ setIsEditing), state: (text /\ _)} _ = do
pure $ H.div { className: "input-group" }
pure $ H.div { className: "input-group" }
[ H.input { className: "form-control"
[ H.input { className: "form-control"
...
@@ -328,10 +327,10 @@ renameableText props = R.createElement renameableTextCpt props []
...
@@ -328,10 +327,10 @@ renameableText props = R.createElement renameableTextCpt props []
fieldCodeEditor :: Record FieldCodeEditorProps -> R.Element
fieldCodeEditor :: Record FieldCodeEditorProps -> R.Element
fieldCodeEditor props = R.createElement fieldCodeEditorCpt props []
fieldCodeEditor props = R.createElement fieldCodeEditorCpt props []
where
fieldCodeEditorCpt :: R.Component FieldCodeEditorProps
fieldCodeEditorCpt = R.hooksComponentWithModule thisModule "fieldCodeEditorCpt" cpt
fieldCodeEditorCpt :: R.Component FieldCodeEditorProps
fieldCodeEditorCpt = R.hooksComponentWithModule thisModule "fieldCodeEditorCpt" cpt
where
cpt {field: Field {typ: typ@(Haskell {haskell})}, onChange} _ = do
cpt {field: Field {typ: typ@(Haskell {haskell})}, onChange} _ = do
pure $ CE.codeEditor {code: haskell, defaultCodeType: CE.Haskell, onChange: changeCode onChange typ}
pure $ CE.codeEditor {code: haskell, defaultCodeType: CE.Haskell, onChange: changeCode onChange typ}
...
...
src/Gargantext/Components/Nodes/Corpus/Chart/Common.purs
View file @
25a54965
...
@@ -29,10 +29,10 @@ cacheName = "metrics"
...
@@ -29,10 +29,10 @@ cacheName = "metrics"
metricsLoadView :: forall a. Record (MetricsLoadViewProps a) -> R.Element
metricsLoadView :: forall a. Record (MetricsLoadViewProps a) -> R.Element
metricsLoadView p = R.createElement metricsLoadViewCpt p []
metricsLoadView p = R.createElement metricsLoadViewCpt p []
where
metricsLoadViewCpt :: R.Component (MetricsLoadViewProps a)
metricsLoadViewCpt = R.hooksComponentWithModule thisModule "metricsLoadView" cpt
metricsLoadViewCpt :: R.Component (MetricsLoadViewProps a)
metricsLoadViewCpt = R.hooksComponentWithModule thisModule "metricsLoadView" cpt
where
cpt { getMetrics, loaded, path, reload, session } _ = do
cpt { getMetrics, loaded, path, reload, session } _ = do
useLoader (fst reload /\ path) (getMetrics session) $ \l ->
useLoader (fst reload /\ path) (getMetrics session) $ \l ->
loaded { path, reload, session } l
loaded { path, reload, session } l
...
@@ -48,10 +48,10 @@ type MetricsWithCacheLoadViewProps res ret = (
...
@@ -48,10 +48,10 @@ type MetricsWithCacheLoadViewProps res ret = (
metricsWithCacheLoadView :: forall res ret. DecodeJson res =>
metricsWithCacheLoadView :: forall res ret. DecodeJson res =>
Record (MetricsWithCacheLoadViewProps res ret) -> R.Element
Record (MetricsWithCacheLoadViewProps res ret) -> R.Element
metricsWithCacheLoadView p = R.createElement metricsWithCacheLoadViewCpt p []
metricsWithCacheLoadView p = R.createElement metricsWithCacheLoadViewCpt p []
where
metricsWithCacheLoadViewCpt :: R.Component (MetricsWithCacheLoadViewProps res ret)
metricsWithCacheLoadViewCpt = R.hooksComponentWithModule thisModule "metricsWithCacheLoadView" cpt
metricsWithCacheLoadViewCpt :: R.Component (MetricsWithCacheLoadViewProps res ret)
metricsWithCacheLoadViewCpt = R.hooksComponentWithModule thisModule "metricsWithCacheLoadView" cpt
where
cpt { getMetricsHash, handleResponse, loaded, mkRequest, path, reload, session } _ = do
cpt { getMetricsHash, handleResponse, loaded, mkRequest, path, reload, session } _ = do
useLoaderWithCacheAPI { cacheEndpoint: (getMetricsHash session)
useLoaderWithCacheAPI { cacheEndpoint: (getMetricsHash session)
, handleResponse
, handleResponse
...
...
src/Gargantext/Components/Nodes/Corpus/Chart/Histo.purs
View file @
25a54965
...
@@ -81,10 +81,10 @@ mkRequest session (_ /\ path@{ corpusId, limit, listId, tabType }) = GUC.makeGet
...
@@ -81,10 +81,10 @@ mkRequest session (_ /\ path@{ corpusId, limit, listId, tabType }) = GUC.makeGet
histo :: Record Props -> R.Element
histo :: Record Props -> R.Element
histo props = R.createElement histoCpt props []
histo props = R.createElement histoCpt props []
where
histoCpt :: R.Component Props
histoCpt = R.hooksComponentWithModule thisModule "histo" cpt
histoCpt :: R.Component Props
histoCpt = R.hooksComponentWithModule thisModule "histo" cpt
where
cpt { path, session } _ = do
cpt { path, session } _ = do
reload <- R.useState' 0
reload <- R.useState' 0
pure $ metricsWithCacheLoadView {
pure $ metricsWithCacheLoadView {
...
...
src/Gargantext/Components/Nodes/Corpus/Dashboard.purs
View file @
25a54965
...
@@ -33,10 +33,10 @@ type Props =
...
@@ -33,10 +33,10 @@ type Props =
dashboardLayout :: R2.Component Props
dashboardLayout :: R2.Component Props
dashboardLayout = R.createElement dashboardLayoutCpt
dashboardLayout = R.createElement dashboardLayoutCpt
where
dashboardLayoutCpt :: R.Component Props
dashboardLayoutCpt = R.hooksComponentWithModule thisModule "dashboardLayout" cpt
dashboardLayoutCpt :: R.Component Props
dashboardLayoutCpt = R.hooksComponentWithModule thisModule "dashboardLayout" cpt
where
cpt { nodeId, session } _ = do
cpt { nodeId, session } _ = do
let sid = sessionId session
let sid = sessionId session
...
@@ -49,10 +49,10 @@ type KeyProps = (
...
@@ -49,10 +49,10 @@ type KeyProps = (
dashboardLayoutWithKey :: R2.Component KeyProps
dashboardLayoutWithKey :: R2.Component KeyProps
dashboardLayoutWithKey = R.createElement dashboardLayoutWithKeyCpt
dashboardLayoutWithKey = R.createElement dashboardLayoutWithKeyCpt
where
dashboardLayoutWithKeyCpt :: R.Component KeyProps
dashboardLayoutWithKeyCpt = R.hooksComponentWithModule thisModule "dashboardLayoutWithKey" cpt
dashboardLayoutWithKeyCpt :: R.Component KeyProps
dashboardLayoutWithKeyCpt = R.hooksComponentWithModule thisModule "dashboardLayoutWithKey" cpt
where
cpt { nodeId, session } _ = do
cpt { nodeId, session } _ = do
reload <- GUR.new
reload <- GUR.new
...
@@ -90,10 +90,10 @@ type LoadedProps =
...
@@ -90,10 +90,10 @@ type LoadedProps =
dashboardLayoutLoaded :: R2.Component LoadedProps
dashboardLayoutLoaded :: R2.Component LoadedProps
dashboardLayoutLoaded = R.createElement dashboardLayoutLoadedCpt
dashboardLayoutLoaded = R.createElement dashboardLayoutLoadedCpt
where
dashboardLayoutLoadedCpt :: R.Component LoadedProps
dashboardLayoutLoadedCpt = R.hooksComponentWithModule thisModule "dashboardLayoutLoaded" cpt
dashboardLayoutLoadedCpt :: R.Component LoadedProps
dashboardLayoutLoadedCpt = R.hooksComponentWithModule thisModule "dashboardLayoutLoaded" cpt
where
cpt props@{ charts, corpusId, defaultListId, fields, nodeId, onChange, session } _ = do
cpt props@{ charts, corpusId, defaultListId, fields, nodeId, onChange, session } _ = do
pure $ H.div {}
pure $ H.div {}
[ H.div { className: "row" }
[ H.div { className: "row" }
...
@@ -201,10 +201,10 @@ type PredefinedChartProps =
...
@@ -201,10 +201,10 @@ type PredefinedChartProps =
renderChart :: R2.Component PredefinedChartProps
renderChart :: R2.Component PredefinedChartProps
renderChart = R.createElement renderChartCpt
renderChart = R.createElement renderChartCpt
where
renderChartCpt :: R.Component PredefinedChartProps
renderChartCpt = R.hooksComponentWithModule thisModule "renderChart" cpt
renderChartCpt :: R.Component PredefinedChartProps
renderChartCpt = R.hooksComponentWithModule thisModule "renderChart" cpt
where
cpt { chart, corpusId, defaultListId, onChange, onRemove, session } _ = do
cpt { chart, corpusId, defaultListId, onChange, onRemove, session } _ = do
pure $ H.div { className: "row chart card" }
pure $ H.div { className: "row chart card" }
[ H.div { className: "card-header" }
[ H.div { className: "card-header" }
...
...
src/Gargantext/Components/Nodes/Corpus/Document.purs
View file @
25a54965
...
@@ -54,10 +54,10 @@ type DocViewProps = (
...
@@ -54,10 +54,10 @@ type DocViewProps = (
docView :: R2.Component DocViewProps
docView :: R2.Component DocViewProps
docView = R.createElement docViewCpt
docView = R.createElement docViewCpt
where
docViewCpt :: R.Component DocViewProps
docViewCpt = R.hooksComponentWithModule thisModule "docView" cpt
docViewCpt :: R.Component DocViewProps
docViewCpt = R.hooksComponentWithModule thisModule "docView" cpt
where
cpt { path
cpt { path
, loaded: loaded@{ ngramsTable: Versioned { data: initTable }, document }
, loaded: loaded@{ ngramsTable: Versioned { data: initTable }, document }
, state: state@({ ngramsVersion: version, ngramsLocalPatch } /\ _)
, state: state@({ ngramsVersion: version, ngramsLocalPatch } /\ _)
...
...
src/Gargantext/Components/Nodes/Lists.purs
View file @
25a54965
...
@@ -35,10 +35,10 @@ type ListsWithForest = (
...
@@ -35,10 +35,10 @@ type ListsWithForest = (
listsWithForest :: R2.Component ListsWithForest
listsWithForest :: R2.Component ListsWithForest
listsWithForest = R.createElement listsWithForestCpt
listsWithForest = R.createElement listsWithForestCpt
where
listsWithForestCpt :: R.Component ListsWithForest
listsWithForestCpt = R.hooksComponentWithModule thisModule "listsWithForest" cpt
listsWithForestCpt :: R.Component ListsWithForest
listsWithForestCpt = R.hooksComponentWithModule thisModule "listsWithForest" cpt
where
cpt { forestProps
cpt { forestProps
, listsProps: listsProps@{ session } } _ = do
, listsProps: listsProps@{ session } } _ = do
controls <- initialControls
controls <- initialControls
...
@@ -58,10 +58,10 @@ type TopBarProps = (
...
@@ -58,10 +58,10 @@ type TopBarProps = (
topBar :: R2.Component TopBarProps
topBar :: R2.Component TopBarProps
topBar = R.createElement topBarCpt
topBar = R.createElement topBarCpt
where
topBarCpt :: R.Component TopBarProps
topBarCpt = R.hooksComponentWithModule thisModule "topBar" cpt
topBarCpt :: R.Component TopBarProps
topBarCpt = R.hooksComponentWithModule thisModule "topBar" cpt
where
cpt { controls } _ = do
cpt { controls } _ = do
-- empty for now because the button is moved to the side panel
-- empty for now because the button is moved to the side panel
pure $ H.div {} []
pure $ H.div {} []
...
@@ -93,10 +93,10 @@ type WithTreeProps = (
...
@@ -93,10 +93,10 @@ type WithTreeProps = (
listsLayout :: R2.Component Props
listsLayout :: R2.Component Props
listsLayout = R.createElement listsLayoutCpt
listsLayout = R.createElement listsLayoutCpt
where
listsLayoutCpt :: R.Component Props
listsLayoutCpt = R.hooksComponentWithModule thisModule "listsLayout" cpt
listsLayoutCpt :: R.Component Props
listsLayoutCpt = R.hooksComponentWithModule thisModule "listsLayout" cpt
where
cpt path@{ nodeId, session } _ = do
cpt path@{ nodeId, session } _ = do
let sid = sessionId session
let sid = sessionId session
...
@@ -109,10 +109,10 @@ type KeyProps = (
...
@@ -109,10 +109,10 @@ type KeyProps = (
listsLayoutWithKey :: Record KeyProps -> R.Element
listsLayoutWithKey :: Record KeyProps -> R.Element
listsLayoutWithKey props = R.createElement listsLayoutWithKeyCpt props []
listsLayoutWithKey props = R.createElement listsLayoutWithKeyCpt props []
where
listsLayoutWithKeyCpt :: R.Component KeyProps
listsLayoutWithKeyCpt = R.hooksComponentWithModule thisModule "listsLayoutWithKey" cpt
listsLayoutWithKeyCpt :: R.Component KeyProps
listsLayoutWithKeyCpt = R.hooksComponentWithModule thisModule "listsLayoutWithKey" cpt
where
cpt { appReload
cpt { appReload
, asyncTasksRef
, asyncTasksRef
, controls
, controls
...
@@ -164,10 +164,10 @@ type SidePanelProps = (
...
@@ -164,10 +164,10 @@ type SidePanelProps = (
sidePanel :: R2.Component SidePanelProps
sidePanel :: R2.Component SidePanelProps
sidePanel = R.createElement sidePanelCpt
sidePanel = R.createElement sidePanelCpt
where
sidePanelCpt :: R.Component SidePanelProps
sidePanelCpt = R.hooksComponentWithModule thisModule "sidePanel" cpt
sidePanelCpt :: R.Component SidePanelProps
sidePanelCpt = R.hooksComponentWithModule thisModule "sidePanel" cpt
where
cpt { controls: { triggers: { toggleSidePanel
cpt { controls: { triggers: { toggleSidePanel
, triggerSidePanel
, triggerSidePanel
} }
} }
...
@@ -208,10 +208,10 @@ type SidePanelDocView = (
...
@@ -208,10 +208,10 @@ type SidePanelDocView = (
sidePanelDocView :: R2.Component SidePanelDocView
sidePanelDocView :: R2.Component SidePanelDocView
sidePanelDocView = R.createElement sidePanelDocViewCpt
sidePanelDocView = R.createElement sidePanelDocViewCpt
where
sidePanelDocViewCpt :: R.Component SidePanelDocView
sidePanelDocViewCpt = R.hooksComponentWithModule thisModule "sidePanelDocView" cpt
sidePanelDocViewCpt :: R.Component SidePanelDocView
sidePanelDocViewCpt = R.hooksComponentWithModule thisModule "sidePanelDocView" cpt
where
cpt { session } _ = do
cpt { session } _ = do
-- pure $ H.h4 {} [ H.text txt ]
-- pure $ H.h4 {} [ H.text txt ]
pure $ H.div {} [ H.text "Hello ngrams" ]
pure $ H.div {} [ H.text "Hello ngrams" ]
src/Gargantext/Components/Table.purs
View file @
25a54965
...
@@ -58,10 +58,9 @@ initialParams = stateParams {page: 1, pageSize: PS10, orderBy: Nothing, searchTy
...
@@ -58,10 +58,9 @@ initialParams = stateParams {page: 1, pageSize: PS10, orderBy: Nothing, searchTy
tableHeaderLayout :: Record TableHeaderLayoutProps -> R.Element
tableHeaderLayout :: Record TableHeaderLayoutProps -> R.Element
tableHeaderLayout props = R.createElement tableHeaderLayoutCpt props []
tableHeaderLayout props = R.createElement tableHeaderLayoutCpt props []
tableHeaderLayoutCpt :: R.Component TableHeaderLayoutProps
tableHeaderLayoutCpt = R.hooksComponentWithModule thisModule "tableHeaderLayout" cpt
where
where
tableHeaderLayoutCpt :: R.Component TableHeaderLayoutProps
tableHeaderLayoutCpt = R.hooksComponentWithModule thisModule "tableHeaderLayout" cpt
cpt { afterCacheStateChange, cacheState, date, desc, query, title, user } _ =
cpt { afterCacheStateChange, cacheState, date, desc, query, title, user } _ =
pure $ R.fragment
pure $ R.fragment
[ R2.row
[ R2.row
...
@@ -115,10 +114,9 @@ tableHeaderLayout props = R.createElement tableHeaderLayoutCpt props []
...
@@ -115,10 +114,9 @@ tableHeaderLayout props = R.createElement tableHeaderLayoutCpt props []
table :: Record Props -> R.Element
table :: Record Props -> R.Element
table props = R.createElement tableCpt props []
table props = R.createElement tableCpt props []
tableCpt :: R.Component Props
tableCpt = R.hooksComponentWithModule thisModule "table" cpt
where
where
tableCpt :: R.Component Props
tableCpt = R.hooksComponentWithModule thisModule "table" cpt
cpt {container, syncResetButton, colNames, wrapColElts, totalRecords, rows, params} _ = do
cpt {container, syncResetButton, colNames, wrapColElts, totalRecords, rows, params} _ = do
let
let
state = paramsState $ fst params
state = paramsState $ fst params
...
@@ -194,10 +192,10 @@ type SizeDDProps =
...
@@ -194,10 +192,10 @@ type SizeDDProps =
sizeDD :: Record SizeDDProps -> R.Element
sizeDD :: Record SizeDDProps -> R.Element
sizeDD p = R.createElement sizeDDCpt p []
sizeDD p = R.createElement sizeDDCpt p []
where
sizeDDCpt :: R.Component SizeDDProps
sizeDDCpt = R.hooksComponentWithModule thisModule "sizeDD" cpt
sizeDDCpt :: R.Component SizeDDProps
sizeDDCpt = R.hooksComponentWithModule thisModule "sizeDD" cpt
where
cpt {params: params /\ setParams} _ = do
cpt {params: params /\ setParams} _ = do
pure $ H.span {} [
pure $ H.span {} [
R2.select { className, defaultValue: show pageSize, on: {change} } sizes
R2.select { className, defaultValue: show pageSize, on: {change} } sizes
...
...
src/Gargantext/Components/TopBar.purs
View file @
25a54965
...
@@ -151,10 +151,10 @@ type MenuButtonProps = (
...
@@ -151,10 +151,10 @@ type MenuButtonProps = (
menuButton :: R2.Component MenuButtonProps
menuButton :: R2.Component MenuButtonProps
menuButton = R.createElement menuButtonCpt
menuButton = R.createElement menuButtonCpt
where
menuButtonCpt :: R.Component MenuButtonProps
menuButtonCpt = R.hooksComponentWithModule thisModule "menuButton" cpt
menuButtonCpt :: R.Component MenuButtonProps
menuButtonCpt = R.hooksComponentWithModule thisModule "menuButton" cpt
where
cpt { element: LiNav { title, href, icon, text }, show: (_ /\ setShow) } _ = do
cpt { element: LiNav { title, href, icon, text }, show: (_ /\ setShow) } _ = do
pure $ H.a { className: "dropdown-toggle navbar-text"
pure $ H.a { className: "dropdown-toggle navbar-text"
-- , data: {toggle: "dropdown"}
-- , data: {toggle: "dropdown"}
...
@@ -173,10 +173,10 @@ type MenuElementsProps = (
...
@@ -173,10 +173,10 @@ type MenuElementsProps = (
menuElements :: R2.Component MenuElementsProps
menuElements :: R2.Component MenuElementsProps
menuElements = R.createElement menuElementsCpt
menuElements = R.createElement menuElementsCpt
where
menuElementsCpt :: R.Component MenuElementsProps
menuElementsCpt = R.hooksComponentWithModule thisModule "menuElements" cpt
menuElementsCpt :: R.Component MenuElementsProps
menuElementsCpt = R.hooksComponentWithModule thisModule "menuElements" cpt
where
cpt { show: false /\ _ } _ = do
cpt { show: false /\ _ } _ = do
pure $ H.div {} []
pure $ H.div {} []
cpt { elements, show: (true /\ setShow) } _ = do
cpt { elements, show: (true /\ setShow) } _ = do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment