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
f982c6c1
Commit
f982c6c1
authored
Jan 24, 2022
by
Karen Konou
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 310-dev-frontend-lang
parents
89f75591
d4128a3f
Changes
11
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
57 additions
and
27 deletions
+57
-27
sass.css
dist/styles/sass.css
+4
-0
sass.css.map
dist/styles/sass.css.map
+1
-1
package.json
package.json
+1
-1
NgramsTable.purs
src/Gargantext/Components/NgramsTable.purs
+18
-11
Document.purs
src/Gargantext/Components/Nodes/Corpus/Document.purs
+1
-1
Frame.purs
src/Gargantext/Components/Nodes/Frame.purs
+5
-2
Types.purs
src/Gargantext/Components/Table/Types.purs
+7
-7
Types.purs
src/Gargantext/Types.purs
+6
-0
Utils.purs
src/Gargantext/Utils.purs
+7
-3
JitsiMeet.purs
src/Gargantext/Utils/JitsiMeet.purs
+3
-1
_styles.sass
src/sass/_styles.sass
+4
-0
No files found.
dist/styles/sass.css
View file @
f982c6c1
...
...
@@ -1029,6 +1029,10 @@ select.form-control {
top
:
6px
;
}
.jitsi-iframe
{
height
:
40em
;
}
.range
{
width
:
400px
;
/* some space for the right knob */
...
...
dist/styles/sass.css.map
View file @
f982c6c1
This diff is collapsed.
Click to expand it.
package.json
View file @
f982c6c1
{
"name"
:
"Gargantext"
,
"version"
:
"0.0.
4.9.9.4
"
,
"version"
:
"0.0.
5
"
,
"scripts"
:
{
"generate-purs-packages-nix"
:
"./nix/generate-purs-packages.nix"
,
"generate-psc-packages-nix"
:
"./nix/generate-packages-json.bash"
,
...
...
src/Gargantext/Components/NgramsTable.purs
View file @
f982c6c1
...
...
@@ -19,7 +19,7 @@ import Data.Map as Map
import Data.Maybe (Maybe(..), fromMaybe, isNothing, maybe)
import Data.Monoid.Additive (Additive(..))
import Data.Ord.Down (Down(..))
import Data.Sequence
(Seq, length)
as Seq
import Data.Sequence as Seq
import Data.Set (Set)
import Data.Set as Set
import Data.Tuple (Tuple(..))
...
...
@@ -38,7 +38,7 @@ import Gargantext.Hooks.Loader (useLoaderBox)
import Gargantext.Routes (SessionRoute(..)) as R
import Gargantext.Sessions (Session, get)
import Gargantext.Types (CTabNgramType, OrderBy(..), SearchQuery, TabType, TermList(..), TermSize, termLists, termSizes)
import Gargantext.Utils (queryMatchesLabel, toggleSet, sortWith)
import Gargantext.Utils (query
ExactMatchesLabel, query
MatchesLabel, toggleSet, sortWith)
import Gargantext.Utils.CacheAPI as GUC
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Seq as Seq
...
...
@@ -97,6 +97,7 @@ type TableContainerProps =
, ngramsParent :: Maybe NgramsTerm
, ngramsSelection :: Set NgramsTerm
, ngramsTable :: NgramsTable
, queryExactMatches :: Boolean
, path :: T.Box PageParams
, tabNgramType :: CTabNgramType
, syncResetButton :: Array R.Element
...
...
@@ -111,6 +112,7 @@ tableContainerCpt { dispatch
, ngramsSelection
, ngramsTable: ngramsTableCache
, path
, queryExactMatches
, tabNgramType
, syncResetButton
} = here.component "tableContainer" cpt
...
...
@@ -125,7 +127,7 @@ tableContainerCpt { dispatch
[
R2.row [ H.div {className: "col-md-2", style: {marginTop: "6px"}}
[ H.div {} syncResetButton
, if
A.null props.tableBody
&& searchQuery /= "" then
, if
(not queryExactMatches || A.null props.tableBody)
&& searchQuery /= "" then
-- , if (not $ Set.member (normNgram tabNgramType searchQuery) ngramsSelection) && searchQuery /= "" then
H.li { className: "list-group-item" } [
H.button { className: "btn btn-primary"
...
...
@@ -336,6 +338,10 @@ loadedNgramsTableBodyCpt = here.component "loadedNgramsTableBody" cpt where
then Just (fromMaybe ng (nre ^. _NgramsRepoElement <<< _root))
else Nothing
rootsWithMatches = Set.fromFoldable (Seq.mapMaybe rootOfMatch nres)
exactMatches :: Boolean
exactMatches = not $ Seq.null $ Seq.filter fltr nres
where
fltr (Tuple ng _) = queryExactMatchesLabel searchQuery (ngramsTermText ng)
rowsFilter :: NgramsElement -> Maybe NgramsElement
rowsFilter ngramsElement =
if displayRow { ngramsElement
...
...
@@ -411,6 +417,7 @@ loadedNgramsTableBodyCpt = here.component "loadedNgramsTableBody" cpt where
, ngramsSelection
, ngramsTable
, path
, queryExactMatches: exactMatches
, syncResetButton: [ syncResetButton ]
, tabNgramType }
, params
...
...
src/Gargantext/Components/Nodes/Corpus/Document.purs
View file @
f982c6c1
...
...
@@ -155,7 +155,7 @@ documentLayoutWithKeyCpt = here.component "documentLayoutWithKey" cpt
------------------------------------------------------------------------
loadDocument :: Session -> Int -> AffRESTError NodeDocument
loadDocument session nodeId = get session $ NodeAPI
Node
(Just nodeId) ""
loadDocument session nodeId = get session $ NodeAPI
Context
(Just nodeId) ""
loadData :: DocPath -> AffRESTError LoadedData
loadData { listIds, nodeId, session, tabType } = do
...
...
src/Gargantext/Components/Nodes/Frame.purs
View file @
f982c6c1
...
...
@@ -137,10 +137,13 @@ nodeFrameVisioCpt = here.component "nodeFrameVisio" cpt
case toMaybe (R.readRef ref) of
Nothing -> pure unit
Just r -> do
api <- JM.jitsiMeetAPI (WURL.host url) { parentNode: r, roomName: frame_id }
api <- JM.jitsiMeetAPI (WURL.host url) { parentNode: r
, roomName: frame_id
, width: "100%"
, height: "100%" }
here.log2 "[nodeFrameVisio] api" api
pure $ H.div { ref
} [ H.text $ WURL.host url
]
pure $ H.div { ref
, className: "jitsi-iframe" } [
]
type LoadProps = ( nodeId :: Int
, session :: Session )
...
...
src/Gargantext/Components/Table/Types.purs
View file @
f982c6c1
src/Gargantext/Types.purs
View file @
f982c6c1
...
...
@@ -143,6 +143,7 @@ data NodeType = Annuaire
| Graph
| Individu
| Node
| Context
| NodeContact
| NodeList
| NodeUser
...
...
@@ -191,6 +192,7 @@ instance Show NodeType where
show Individu = "NodeIndividu"
show Node = "Node"
show Nodes = "Nodes"
show Context = "Context"
show Tree = "NodeTree"
show Team = "NodeTeam"
show NodeList = "NodeList"
...
...
@@ -217,6 +219,7 @@ instance Read NodeType where
read "Individu" = Just Individu
read "Node" = Just Node
read "Nodes" = Just Nodes
read "Context" = Just Context
read "NodeCorpus" = Just Corpus
read "NodeContact" = Just NodeContact
read "Tree" = Just Tree
...
...
@@ -252,6 +255,7 @@ translateFR = case _ of
Graph -> "Graphe"
Individu -> "Individu"
Node -> "Nœud"
Context -> "ConTexte"
NodeContact -> "Contact"
NodeList -> "Liste"
NodeUser -> "Utilisateur"
...
...
@@ -282,6 +286,7 @@ translateEN = case _ of
Graph -> "Graph"
Individu -> "Person"
Node -> "Node"
Context -> "Context"
NodeContact -> "Contact"
NodeList -> "List"
NodeUser -> "User"
...
...
@@ -397,6 +402,7 @@ nodeTypePath Phylo = "phylo"
nodeTypePath Individu = "individu"
nodeTypePath Node = "node"
nodeTypePath Nodes = "nodes"
nodeTypePath Context = "context"
nodeTypePath NodeUser = "user"
nodeTypePath NodeContact = "contact"
nodeTypePath Tree = "tree"
...
...
src/Gargantext/Utils.purs
View file @
f982c6c1
...
...
@@ -70,10 +70,14 @@ zeroPad pad num = zeros <> (show num)
zeros' 0 = ""
zeros' n = "0" <> (zeros' (n - 1))
queryNormalize :: String -> String
queryNormalize = S.toLower
queryMatchesLabel :: String -> String -> Boolean
queryMatchesLabel q l = S.contains (S.Pattern $ normalize q) (normalize l)
where
normalize = S.toLower
queryMatchesLabel q l = S.contains (S.Pattern $ queryNormalize q) (queryNormalize l)
queryExactMatchesLabel :: String -> String -> Boolean
queryExactMatchesLabel q l = queryNormalize q == queryNormalize l
mapLeft :: forall l m r. (l -> m) -> Either l r -> Either m r
...
...
src/Gargantext/Utils/JitsiMeet.purs
View file @
f982c6c1
...
...
@@ -9,7 +9,9 @@ foreign import data JitsiMeet :: Type
type Jitsi =
{ parentNode :: DOM.Element
, roomName :: String }
, roomName :: String
, width :: String
, height :: String }
foreign import _api :: JitsiMeet
foreign import _jitsiMeetAPI :: EffectFn2 String Jitsi JitsiMeet
...
...
src/sass/_styles.sass
View file @
f982c6c1
...
...
@@ -183,3 +183,7 @@ select.form-control
height
:
$spinner-size
left
:
$spinner-left-offset
top
:
$spinner-top-offset
.jitsi-iframe
height
:
40em
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