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
3300611c
Verified
Commit
3300611c
authored
May 06, 2024
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into dev-spago-next
parents
753dabd2
f5af597e
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
140 additions
and
30 deletions
+140
-30
main.js
dist/js/main.js
+6
-0
popper.min.js
dist/js/popper.min.js
+5
-0
bootstrap-darkster.css
dist/styles/bootstrap-darkster.css
+7
-0
bootstrap-default.css
dist/styles/bootstrap-default.css
+7
-0
bootstrap-greyson.css
dist/styles/bootstrap-greyson.css
+7
-0
bootstrap-herbie.css
dist/styles/bootstrap-herbie.css
+7
-0
bootstrap-monotony.css
dist/styles/bootstrap-monotony.css
+7
-0
package.json
package.json
+1
-1
Layout.purs
src/Gargantext/Components/Corpus/Layout.purs
+26
-11
Node.purs
src/Gargantext/Components/GraphQL/Node.purs
+9
-4
LoadingSpinner.purs
src/Gargantext/Components/LoadingSpinner.purs
+1
-1
Tab.purs
src/Gargantext/Components/Tab.purs
+13
-2
Table.purs
src/Gargantext/Components/Table.purs
+14
-4
TreeSearch.purs
src/Gargantext/Components/TreeSearch.purs
+8
-7
Types.purs
src/Gargantext/Types.purs
+9
-0
_layout.scss
src/sass/base/_layout.scss
+8
-0
_nav.scss
src/sass/base/_nav.scss
+5
-0
No files found.
dist/js/main.js
0 → 100644
View file @
3300611c
// Main Gargantext scripts
$
(
function
()
{
$
(
'[data-toggle="tooltip"]'
).
tooltip
()
console
.
log
(
"Gargantext is ready."
);
})
\ No newline at end of file
dist/js/popper.min.js
0 → 100644
View file @
3300611c
This diff is collapsed.
Click to expand it.
dist/styles/bootstrap-darkster.css
View file @
3300611c
...
...
@@ -6696,9 +6696,16 @@ a:hover {
font-family
:
ForkAwesome
,
-apple-system
,
BlinkMacSystemFont
,
"Segoe UI"
,
Roboto
,
"Helvetica Neue"
,
Arial
,
"Noto Sans"
,
"Liberation Sans"
,
sans-serif
,
"Apple Color Emoji"
,
"Segoe UI Emoji"
,
"Segoe UI Symbol"
,
"Noto Color Emoji"
;
}
.node-layout__title
{
font-size
:
1.75em
;
}
.nav.nav-tabs
.nav-link
{
cursor
:
pointer
;
}
.nav.nav-tabs
.nav-link
.active
{
font-weight
:
500
;
}
.nav.nav-tabs
.nav-tabs
.nav-link.active
,
.nav.nav-tabs
.nav-tabs
.nav-item.show
.nav-link
,
.nav.nav-tabs
li
a
{
color
:
#DEE2E6
;
}
...
...
dist/styles/bootstrap-default.css
View file @
3300611c
...
...
@@ -6507,9 +6507,16 @@ a:hover {
font-family
:
ForkAwesome
,
-apple-system
,
BlinkMacSystemFont
,
"Segoe UI"
,
Roboto
,
"Helvetica Neue"
,
Arial
,
"Noto Sans"
,
"Liberation Sans"
,
sans-serif
,
"Apple Color Emoji"
,
"Segoe UI Emoji"
,
"Segoe UI Symbol"
,
"Noto Color Emoji"
;
}
.node-layout__title
{
font-size
:
1.75em
;
}
.nav.nav-tabs
.nav-link
{
cursor
:
pointer
;
}
.nav.nav-tabs
.nav-link
.active
{
font-weight
:
500
;
}
.nav.nav-tabs
.nav-tabs
.nav-link.active
,
.nav.nav-tabs
.nav-tabs
.nav-item.show
.nav-link
,
.nav.nav-tabs
li
a
{
color
:
#495057
;
}
...
...
dist/styles/bootstrap-greyson.css
View file @
3300611c
...
...
@@ -6350,9 +6350,16 @@ a:hover {
font-family
:
ForkAwesome
,
"Mulish"
;
}
.node-layout__title
{
font-size
:
1.75em
;
}
.nav.nav-tabs
.nav-link
{
cursor
:
pointer
;
}
.nav.nav-tabs
.nav-link
.active
{
font-weight
:
500
;
}
.nav.nav-tabs
.nav-tabs
.nav-link.active
,
.nav.nav-tabs
.nav-tabs
.nav-item.show
.nav-link
,
.nav.nav-tabs
li
a
{
color
:
#495057
;
}
...
...
dist/styles/bootstrap-herbie.css
View file @
3300611c
...
...
@@ -6571,9 +6571,16 @@ a:hover {
font-family
:
ForkAwesome
,
"Nunito"
;
}
.node-layout__title
{
font-size
:
1.75em
;
}
.nav.nav-tabs
.nav-link
{
cursor
:
pointer
;
}
.nav.nav-tabs
.nav-link
.active
{
font-weight
:
500
;
}
.nav.nav-tabs
.nav-tabs
.nav-link.active
,
.nav.nav-tabs
.nav-tabs
.nav-item.show
.nav-link
,
.nav.nav-tabs
li
a
{
color
:
#495057
;
}
...
...
dist/styles/bootstrap-monotony.css
View file @
3300611c
...
...
@@ -6644,9 +6644,16 @@ a:hover {
font-family
:
ForkAwesome
,
"Montserrat"
;
}
.node-layout__title
{
font-size
:
1.75em
;
}
.nav.nav-tabs
.nav-link
{
cursor
:
pointer
;
}
.nav.nav-tabs
.nav-link
.active
{
font-weight
:
500
;
}
.nav.nav-tabs
.nav-tabs
.nav-link.active
,
.nav.nav-tabs
.nav-tabs
.nav-item.show
.nav-link
,
.nav.nav-tabs
li
a
{
color
:
#495057
;
}
...
...
package.json
View file @
3300611c
{
"name"
:
"Gargantext"
,
"version"
:
"0.0.7.1"
,
"version"
:
"0.0.7.1
.2
"
,
"scripts"
:
{
"build"
:
"spago build"
,
"bundle"
:
"spago bundle --module Main --outfile dist/bundle.js"
,
...
...
src/Gargantext/Components/Corpus/Layout.purs
View file @
3300611c
...
...
@@ -16,12 +16,14 @@ import Gargantext.Hooks.Session (useSession)
import Gargantext.Routes as GR
import Gargantext.Sessions (sessionId)
import Gargantext.Types (ID, defaultCacheParams)
import Gargantext.Types as GT
import Gargantext.Utils (setter, (?))
import Gargantext.Utils.Reactix as R2
import Reactix as R
import Reactix.DOM.HTML as H
import Toestand as T
type Props =
( nodeId :: ID
, nodeData :: Node
...
...
@@ -34,7 +36,7 @@ layout :: R2.Leaf Props
layout = R2.leaf layoutCpt
layoutCpt :: R.Component Props
layoutCpt = here.component "layout" cpt where
cpt { nodeId, nodeData: { name } } _ = do
cpt { nodeId, nodeData: { name
, node_type
} } _ = do
-- | Hooks
-- |
boxes@{
...
...
@@ -69,24 +71,37 @@ layoutCpt = here.component "layout" cpt where
pure $
H.div
{ className: "corpus-layout" }
{ className: "
node-layout
corpus-layout" }
[
-- FV.backButtonSmart { nodeId, session } []
H.div
{ className: "corpus-layout__title" }
{ className: "
node-layout__title
corpus-layout__title" }
[
B.div'
{ className: "corpus-layout__title__text" }
name
H.div
{ className: "node-layout__title__content text-primary" }
[
B.icon
{ className: "node-layout__title__icon"
, name: GT.getIcon node_type true
}
,
H.span
{ className: "node-layout__title__text mx-1" }
[ H.text name ]
]
,
-- B.div'
-- { className: "corpus-layout__title__text" }
-- name
-- ,
H.hr
{ className: "corpus-layout__title__line"}
{ className: "
node-layout__title__line
corpus-layout__title__line"}
,
B.iconButton
{ name: expandTableEdition' ?
"caret-up" $
"caret-down"
, className: "
corpo
s-layout__title__expand"
, className: "
node-layout__title__expand corpu
s-layout__title__expand"
, callback: onExpandClick
}
]
...
...
@@ -94,14 +109,14 @@ layoutCpt = here.component "layout" cpt where
R2.when expandTableEdition' $
H.div
{ className: "corpus-layout__edition-block" }
{ className: "
node-layout__edition-block
corpus-layout__edition-block" }
[
editionBlock
{ nodeId }
]
,
H.div
{ className: "corpus-layout__code-section" }
{ className: "
node-layout__code-section
corpus-layout__code-section" }
[
tileMenu
{ boxes
...
...
@@ -129,7 +144,7 @@ layoutCpt = here.component "layout" cpt where
]
,
H.div
{ className: "corpus-layout__folders" }
{ className: "
node-layout__folders
corpus-layout__folders" }
[
FV.folderView
{ nodeId
...
...
src/Gargantext/Components/GraphQL/Node.purs
View file @
3300611c
module Gargantext.Components.GraphQL.Node where
import Gargantext.Prelude
import Gargantext.Types (NodeType)
import Gargantext.Utils.GraphQL as GGQL
import Gargantext.Types (NodeType)
import GraphQL.Client.Args (Args, (=>>))
...
...
@@ -12,13 +13,15 @@ type Corpus
= { id :: Int
, name :: String
, parent_id :: Int
, type_id :: Int }
, type_id :: Int
, node_type :: NodeType }
type Node
= { id :: Int
, name :: String
, parent_id :: Int
, type_id :: Int }
, type_id :: Int
, node_type :: NodeType }
type NodesCorpusQuery =
{ nodes_corpus :: Args
...
...
@@ -26,7 +29,8 @@ type NodesCorpusQuery =
{ id :: Unit
, name :: Unit
, parent_id :: Unit
, type_id :: Unit } }
, type_id :: Unit
, node_type :: Unit } }
type NodesQuery =
{ nodes :: Args
...
...
@@ -34,7 +38,8 @@ type NodesQuery =
{ id :: Unit
, name :: Unit
, parent_id :: Unit
, type_id :: Unit } }
, type_id :: Unit
, node_type :: Unit } }
nodesQuery :: NodesQuery
nodesQuery = { nodes: { node_id: Var :: _ "id" Int } =>>
...
...
src/Gargantext/Components/LoadingSpinner.purs
View file @
3300611c
...
...
@@ -23,6 +23,6 @@ loadingSpinnerCpt = here.component "LoadingSpinner" cpt where
-- cpt _ _ = H.i {className: "fa fa-circle-o-notch fa-spin fa-3x fa-fw"} [H.text ""]
cpt { additionalClass } _ = do
pure $ H.i { className: "fa fa-spinner fa-pulse fa-
3x fa-
fw " <> c } [H.text ""]
pure $ H.i { className: "fa fa-spinner fa-pulse fa-fw " <> c } [H.text ""]
where
c = fromMaybe "" additionalClass
src/Gargantext/Components/Tab.purs
View file @
3300611c
...
...
@@ -3,6 +3,8 @@ module Gargantext.Components.Tab where
import Data.FunctorWithIndex (mapWithIndex)
import Data.Tuple (Tuple)
import Data.Tuple.Nested ((/\))
import Gargantext.Components.Bootstrap as B
import Gargantext.Types as GT
import Reactix as R
import Reactix.DOM.HTML as H
import Toestand as T
...
...
@@ -49,10 +51,19 @@ tabsCpt = here.component "tabs" cpt where
(mapWithIndex (item activeTab') tabs')
]
button activeTab selected index (name /\ _) =
H.a { className, on: { click } } [ H.text name ] where
H.a { className, on: { click } }
[
B.icon
{ className: "mx-1"
, name: iconName
}
,
H.span {} [ H.text name ]
] where
eq = index == selected
className = "nav-item nav-link" <> (if eq then " active" else "")
className = "
tab-label_" <> name <> "
nav-item nav-link" <> (if eq then " active" else "")
click _ = T.write_ index activeTab
iconName = GT.getTabIcon name
item selected index (_ /\ cpt') = tab { selected, index } [ cpt' ]
-- TODO: document what these are (selection, item indices)
...
...
src/Gargantext/Components/Table.purs
View file @
3300611c
...
...
@@ -166,11 +166,21 @@ tableHeaderWithRenameBoxedLayoutCpt = here.component "tableHeaderWithRenameBoxed
,
-}
H.div
{ className: "table-header-rename__title" }
{ className: "table-header-rename__title
text-primary
" }
[
B.div'
{ className: "table-header-rename__title__text" }
name
H.div { className: "table-header-rename__title__text" }
[
B.icon
{ className: "mx-1"
, name: "book"
}
,
H.span {}
[
H.text name
]
]
,
H.hr
{ className: "table-header-rename__title__line" }
...
...
src/Gargantext/Components/TreeSearch.purs
View file @
3300611c
...
...
@@ -172,12 +172,10 @@ treeSearchRender = R2.leaf treeSearchRenderCpt
treeSearchRenderCpt :: R.Component RenderProps
treeSearchRenderCpt = here.component "treeSearchRenderCpt" cpt where
cpt { visible, session, searchData, goToRoute } _ = do
{ route } <- AppStore.use
route' <- T.useLive T.unequal route
pure $ H.div {className: "search-modal__results"} (results
route'
searchData)
pure $ H.div {className: "search-modal__results"} (results searchData)
where
results
route'
s = map searchResult s
results s = map searchResult s
where
searchResult sd = H.div
{ className: "result py-1"}
...
...
@@ -197,7 +195,7 @@ treeSearchRenderCpt = here.component "treeSearchRenderCpt" cpt where
[
H.text " Path: "
, breadcrumbView { format: "text"
, route:
route'
, route:
getRouteFromSearchResult sd session
, session
}
]
...
...
@@ -207,7 +205,7 @@ treeSearchRenderCpt = here.component "treeSearchRenderCpt" cpt where
{ className: "result__button"
, callback: \_ -> do
T.write_ false visible
goToRoute $
fromMaybe Home $ nodeTypeAppRoute sd.type (sessionId session) sd.id
goToRoute $
getRouteFromSearchResult sd session
, variant: ButtonVariant Light }
[
B.icon {name: getIcon sd.type true}
...
...
@@ -220,7 +218,7 @@ treeSearchRenderCpt = here.component "treeSearchRenderCpt" cpt where
[
H.text " — "
, breadcrumbView { format: "text"
, route:
route'
, route:
getRouteFromSearchResult sd session
, session: session
}
]
...
...
@@ -231,3 +229,6 @@ type LoadProps = ( session :: Session, query :: String )
loadSearch :: Record LoadProps -> AffRESTError (Array SearchData)
loadSearch { session: s, query: q} = get s $ appPath (TreeFlat (sessionId s) (sessionRoot s) q)
where sessionRoot (Session {treeId}) = treeId
getRouteFromSearchResult :: SearchData -> Session -> AppRoute
getRouteFromSearchResult sd session = fromMaybe Home $ nodeTypeAppRoute sd.type (sessionId session) sd.id
src/Gargantext/Types.purs
View file @
3300611c
...
...
@@ -701,6 +701,15 @@ modeFromString "Sources" = Just Sources
modeFromString "Terms" = Just Terms
modeFromString _ = Nothing
getTabIcon :: String -> String
getTabIcon "Authors" = "list"
getTabIcon "Institutes" = "list"
getTabIcon "Sources" = "list"
getTabIcon "Terms" = "list"
getTabIcon "Documents" = "newspaper-o"
getTabIcon "Trash" = "trash"
getTabIcon _ = ""
-- Async tasks
-- corresponds to /add/form/async or /add/query/async
...
...
src/sass/base/_layout.scss
View file @
3300611c
.with-icon-font
{
font-family
:
ForkAwesome
,
$font-family-base
;
}
.node-layout
{
&
__title
{
font-size
:
1
.75em
;
}
}
\ No newline at end of file
src/sass/base/_nav.scss
View file @
3300611c
...
...
@@ -2,6 +2,11 @@
.nav-link
{
cursor
:
pointer
;
.active
{
font-weight
:
500
;
}
}
.nav-tabs
.nav-link.active
,
.nav-tabs
.nav-item.show
.nav-link
,
li
a
{
...
...
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