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
140
Issues
140
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
purescript-gargantext
Commits
cfa0c382
Commit
cfa0c382
authored
May 28, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FEAT][Search] IsTex basic and IsTex Advanced.
parent
ed4f4b47
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
11 deletions
+29
-11
Box.purs
src/Gargantext/Components/Forest/Tree/Node/Box.purs
+11
-9
SearchField.purs
src/Gargantext/Components/Search/SearchField.purs
+12
-1
Types.purs
src/Gargantext/Components/Search/Types.purs
+6
-1
No files found.
src/Gargantext/Components/Forest/Tree/Node/Box.purs
View file @
cfa0c382
...
@@ -23,7 +23,7 @@ import Gargantext.Components.Forest.Tree.Node.ProgressBar (asyncProgressBar, Bar
...
@@ -23,7 +23,7 @@ import Gargantext.Components.Forest.Tree.Node.ProgressBar (asyncProgressBar, Bar
import Gargantext.Components.GraphExplorer.API as GraphAPI
import Gargantext.Components.GraphExplorer.API as GraphAPI
import Gargantext.Components.Lang (allLangs, Lang(EN))
import Gargantext.Components.Lang (allLangs, Lang(EN))
import Gargantext.Components.Search.SearchBar (searchBar)
import Gargantext.Components.Search.SearchBar (searchBar)
import Gargantext.Components.Search.SearchField (Search, defaultSearch, isIsTex)
import Gargantext.Components.Search.SearchField (Search, defaultSearch, isIsTex
_Advanced
)
import Gargantext.Ends (Frontends, url)
import Gargantext.Ends (Frontends, url)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Routes (AppRoute)
import Gargantext.Routes (AppRoute)
...
@@ -299,9 +299,9 @@ mAppRouteId _ = Nothing
...
@@ -299,9 +299,9 @@ mAppRouteId _ = Nothing
-- | START Popup View
-- | START Popup View
type NodePopupProps =
type NodePopupProps =
( id :: ID
( id
:: ID
, name :: Name
, name
:: Name
, nodeType :: GT.NodeType
, nodeType
:: GT.NodeType
, onPopoverClose :: DOM.Element -> Effect Unit
, onPopoverClose :: DOM.Element -> Effect Unit
| CommonProps
| CommonProps
)
)
...
@@ -427,7 +427,7 @@ nodePopupCpt = R.hooksComponent "G.C.F.T.N.B.nodePopupView" cpt
...
@@ -427,7 +427,7 @@ nodePopupCpt = R.hooksComponent "G.C.F.T.N.B.nodePopupView" cpt
}
}
searchIsTexIframe {nodeType} search@(search' /\ _) iframeRef =
searchIsTexIframe {nodeType} search@(search' /\ _) iframeRef =
if isIsTex search'.datafield then
if isIsTex
_Advanced
search'.datafield then
H.div { className: "istex-search panel panel-default" }
H.div { className: "istex-search panel panel-default" }
[
[
H.h3 { className: GT.fldr nodeType true} []
H.h3 { className: GT.fldr nodeType true} []
...
@@ -480,7 +480,6 @@ type ButtonClickProps =
...
@@ -480,7 +480,6 @@ type ButtonClickProps =
, state :: R.State (Record ActionState)
, state :: R.State (Record ActionState)
)
)
buttonClick :: Record ButtonClickProps -> R.Element
buttonClick :: Record ButtonClickProps -> R.Element
buttonClick p = R.createElement buttonClickCpt p []
buttonClick p = R.createElement buttonClickCpt p []
...
@@ -505,9 +504,7 @@ buttonClickCpt = R.hooksComponent "G.C.F.T.N.B.buttonClick" cpt
...
@@ -505,9 +504,7 @@ buttonClickCpt = R.hooksComponent "G.C.F.T.N.B.buttonClick" cpt
then Nothing
then Nothing
else (Just todo)
else (Just todo)
-- END Popup View
-- END Popup View
type NodeProps =
type NodeProps =
( id :: ID
( id :: ID
, name :: Name
, name :: Name
...
@@ -586,7 +583,12 @@ panelActionCpt = R.hooksComponent "G.C.F.T.N.B.panelAction" cpt
...
@@ -586,7 +583,12 @@ panelActionCpt = R.hooksComponent "G.C.F.T.N.B.panelAction" cpt
actionDelete :: NodeType -> Dispatch -> R.Hooks R.Element
actionDelete :: NodeType -> Dispatch -> R.Hooks R.Element
actionDelete NodeUser _ = do
actionDelete NodeUser _ = do
pure $ R.fragment [
pure $ R.fragment [
H.div {style: {margin: "10px"}} [H.text "Yes, we are RGPD compliant! But you can not delete User Node yet (we are still on development). Thanks for your comprehensin."]
H.div {style: {margin: "10px"}}
[H.text $ "Yes, we are RGPD compliant!"
<> " But you can not delete User Node yet."
<> " We are still on development."
<> " Thanks for your comprehensin."
]
]
]
actionDelete _ dispatch = do
actionDelete _ dispatch = do
...
...
src/Gargantext/Components/Search/SearchField.purs
View file @
cfa0c382
module Gargantext.Components.Search.SearchField
module Gargantext.Components.Search.SearchField
( Search, Props, defaultSearch, searchField, searchFieldComponent, isIsTex) where
( Search, Props, defaultSearch, searchField, searchFieldComponent, isIsTex
, isIsTex_Advanced
) where
import Data.Maybe (Maybe(..), maybe, fromMaybe, isJust)
import Data.Maybe (Maybe(..), maybe, fromMaybe, isJust)
import Data.Newtype (over)
import Data.Newtype (over)
...
@@ -165,6 +165,17 @@ isIsTex ( Just
...
@@ -165,6 +165,17 @@ isIsTex ( Just
) = true
) = true
isIsTex _ = false
isIsTex _ = false
isIsTex_Advanced :: Maybe DataField -> Boolean
isIsTex_Advanced ( Just
( External
( Just ( IsTex_Advanced)
)
)
) = true
isIsTex_Advanced _ = false
isIMT :: Maybe DataField -> Boolean
isIMT :: Maybe DataField -> Boolean
isIMT ( Just
isIMT ( Just
( External
( External
...
...
src/Gargantext/Components/Search/Types.purs
View file @
cfa0c382
...
@@ -91,6 +91,7 @@ allDatabases = [ Empty
...
@@ -91,6 +91,7 @@ allDatabases = [ Empty
, PubMed
, PubMed
, HAL Nothing
, HAL Nothing
, IsTex
, IsTex
, IsTex_Advanced
, Isidore
, Isidore
--, Web
--, Web
--, News
--, News
...
@@ -102,6 +103,7 @@ data Database = All_Databases
...
@@ -102,6 +103,7 @@ data Database = All_Databases
| PubMed
| PubMed
| HAL (Maybe Org)
| HAL (Maybe Org)
| IsTex
| IsTex
| IsTex_Advanced
| Isidore
| Isidore
-- | News
-- | News
-- | SocialNetworks
-- | SocialNetworks
...
@@ -111,6 +113,7 @@ instance showDatabase :: Show Database where
...
@@ -111,6 +113,7 @@ instance showDatabase :: Show Database where
show PubMed = "PubMed"
show PubMed = "PubMed"
show (HAL _)= "HAL"
show (HAL _)= "HAL"
show IsTex = "IsTex"
show IsTex = "IsTex"
show IsTex_Advanced = "IsTex_Advanced"
show Isidore= "Isidore"
show Isidore= "Isidore"
show Empty = "Empty"
show Empty = "Empty"
-- show News = "News"
-- show News = "News"
...
@@ -121,6 +124,7 @@ instance docDatabase :: Doc Database where
...
@@ -121,6 +124,7 @@ instance docDatabase :: Doc Database where
doc PubMed = "All Medical publications"
doc PubMed = "All Medical publications"
doc (HAL _) = "All open science (archives ouvertes)"
doc (HAL _) = "All open science (archives ouvertes)"
doc IsTex = "All Elsevier enriched by CNRS/INIST"
doc IsTex = "All Elsevier enriched by CNRS/INIST"
doc IsTex_Advanced = "IsTex advanced search"
doc Isidore = "All (French) Social Sciences"
doc Isidore = "All (French) Social Sciences"
doc Empty = "Empty"
doc Empty = "Empty"
-- doc News = "Web filtered by News"
-- doc News = "Web filtered by News"
...
@@ -130,8 +134,9 @@ readDatabase :: String -> Maybe Database
...
@@ -130,8 +134,9 @@ readDatabase :: String -> Maybe Database
readDatabase "All Databases" = Just All_Databases
readDatabase "All Databases" = Just All_Databases
readDatabase "PubMed" = Just PubMed
readDatabase "PubMed" = Just PubMed
readDatabase "HAL" = Just $ HAL Nothing
readDatabase "HAL" = Just $ HAL Nothing
readDatabase "IsTex" = Just IsTex
readDatabase "Isidore"= Just Isidore
readDatabase "Isidore"= Just Isidore
readDatabase "IsTex" = Just IsTex
readDatabase "IsTex_Advanced" = Just IsTex_Advanced
-- readDatabase "Web" = Just Web
-- readDatabase "Web" = Just Web
-- readDatabase "News" = Just News
-- readDatabase "News" = Just News
-- readDatabase "Social Networks" = Just SocialNetworks
-- readDatabase "Social Networks" = Just SocialNetworks
...
...
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