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
b689fd11
Commit
b689fd11
authored
Jul 16, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 301-dev-visio-integration
parents
a60f6f9e
04f748e9
Changes
16
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
1055 additions
and
121 deletions
+1055
-121
bootstrap-default.css
dist/styles/bootstrap-default.css
+3
-0
sass.css
dist/styles/sass.css
+5
-0
sass.css.map
dist/styles/sass.css.map
+1
-1
Box.purs
src/Gargantext/Components/FolderView/Box.purs
+2
-2
Add.purs
src/Gargantext/Components/Forest/Tree/Node/Action/Add.purs
+13
-6
Move.purs
src/Gargantext/Components/Forest/Tree/Node/Action/Move.purs
+7
-1
Update.purs
...Gargantext/Components/Forest/Tree/Node/Action/Update.purs
+4
-4
Upload.purs
...Gargantext/Components/Forest/Tree/Node/Action/Upload.purs
+6
-4
Box.purs
src/Gargantext/Components/Forest/Tree/Node/Box.purs
+1
-1
Tools.purs
src/Gargantext/Components/Forest/Tree/Node/Tools.purs
+64
-53
Lang.purs
src/Gargantext/Components/Lang.purs
+4
-0
Types.purs
src/Gargantext/Types.purs
+118
-40
Utils.purs
src/Gargantext/Utils.purs
+15
-9
Glyphicon.purs
src/Gargantext/Utils/Glyphicon.purs
+804
-0
_tree.sass
src/sass/_tree.sass
+5
-0
default.sass
src/sass/bootstrap/default.sass
+3
-0
No files found.
dist/styles/bootstrap-default.css
View file @
b689fd11
...
...
@@ -9945,5 +9945,8 @@ h3 {
border-color
:
#dee2e6
;
}
}
.with-icon-font
{
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"
;
}
/*# sourceMappingURL=bootstrap-default.css.map */
dist/styles/sass.css
View file @
b689fd11
...
...
@@ -535,6 +535,11 @@ li .leaf:hover a.settings {
color
:
black
;
}
.forest-tree-node-action-move
{
max-height
:
50vh
;
overflow-y
:
scroll
;
}
.forest-layout
{
background-color
:
#fff
;
position
:
fixed
;
...
...
dist/styles/sass.css.map
View file @
b689fd11
{"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;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;EACE;EACA","file":"sass.css"}
\ No newline at end of file
{"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;EAEE;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;;;AAEA;EACE;;;AAEF;EACE;;;ACnKA;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;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;EACE;EACA","file":"sass.css"}
\ No newline at end of file
src/Gargantext/Components/FolderView/Box.purs
View file @
b689fd11
...
...
@@ -9,7 +9,7 @@ import Gargantext.Components.Forest.Tree.Node.Settings (SettingsBox(..), setting
import Gargantext.Components.Forest.Tree.Node.Tools (prettyNodeType)
import Gargantext.Types (ID, Name)
import Gargantext.Types as GT
import Gargantext.Utils (glyphicon)
import Gargantext.Utils
.Glyphicon
(glyphicon)
import Gargantext.Utils.Reactix as R2
import Reactix as R
import Reactix.DOM.HTML as H
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Add.purs
View file @
b689fd11
...
...
@@ -13,14 +13,16 @@ import Toestand as T
import Gargantext.Prelude
import Gargantext.Components.Forest.Tree.Node.Settings (SettingsBox(..), settingsBox)
import Gargantext.Components.Forest.Tree.Node.Action (Action(..))
import Gargantext.Components.Forest.Tree.Node.Tools (submitButton, formChoiceSafe, panel)
import Gargantext.Components.Forest.Tree.Node.Settings (SettingsBox(..), settingsBox)
import Gargantext.Components.Forest.Tree.Node.Tools (formChoiceSafe, panel, submitButton)
import Gargantext.Components.InputWithEnter (inputWithEnter)
import Gargantext.Components.Lang (Lang(..), translate)
import Gargantext.Routes as GR
import Gargantext.Sessions (Session, post)
import Gargantext.Types (NodeType(..), charCodeIcon)
import Gargantext.Types as GT
import Gargantext.
Types (NodeType(..)
)
import Gargantext.
Utils (nbsp
)
import Gargantext.Utils.Reactix as R2
here :: R2.Here
...
...
@@ -75,12 +77,18 @@ addNodeViewCpt = here.component "addNodeView" cpt where
nodeType' <- T.useLive T.unequal nodeType
let
print nt = charCodeIcon nt true
-- as we are printing within an HTML text node,
-- margins will directly rely on content text spacing
<> nbsp 4
<> translate EN nt -- @TODO "EN" assumption
SettingsBox {edit} = settingsBox nodeType'
setNodeType' nt = do
T.write_ (GT.prettyNodeType nt) nodeName
T.write_ nt nodeType
(maybeChoose /\ nt') = if length nodeTypes > 1
then ([ formChoiceSafe nodeTypes Error setNodeType' ] /\ nodeType')
then ([ formChoiceSafe nodeTypes Error setNodeType'
print
] /\ nodeType')
else ([H.div {} [H.text $ "Creating a node of type "
<> show defaultNt
<> " with name:"
...
...
@@ -113,4 +121,3 @@ showConfig FolderPrivate = H.div {} [H.text "This folder will be private only"]
showConfig FolderShared = H.div {} [H.text "This folder will be shared"]
showConfig FolderPublic = H.div {} [H.text "This folder will be public"]
showConfig nt = H.div {} [H.h4 {} [H.text $ "Config of " <> show nt ]]
src/Gargantext/Components/Forest/Tree/Node/Action/Move.purs
View file @
b689fd11
...
...
@@ -38,7 +38,12 @@ moveNodeCpt = here.component "moveNode" cpt
Nothing -> H.div {} []
_ -> H.div {} []
pure $ panel [ subTreeView { action
pure $
H.div
{ className: "forest-tree-node-action-move" }
[
panel [ subTreeView { action
, dispatch
, handed
, id
...
...
@@ -47,3 +52,4 @@ moveNodeCpt = here.component "moveNode" cpt
, subTreeParams
} []
] button
]
src/Gargantext/Components/Forest/Tree/Node/Action/Update.purs
View file @
b689fd11
...
...
@@ -52,7 +52,7 @@ updateDashboardCpt = here.component "updateDashboard" cpt where
methodBoard' <- T.useLive T.unequal methodBoard
pure $ panel [ -- H.text "Update with"
formChoiceSafe [All, Sources, Authors, Institutes, Ngrams] All (\val -> T.write_ val methodBoard)
formChoiceSafe [All, Sources, Authors, Institutes, Ngrams] All (\val -> T.write_ val methodBoard)
show
]
(submitButton (UpdateNode $ UpdateNodeParamsBoard { methodBoard: methodBoard' }) dispatch)
...
...
@@ -65,7 +65,7 @@ updateGraphCpt = here.component "updateGraph" cpt where
methodGraph' <- T.useLive T.unequal methodGraph
pure $ panel [ -- H.text "Update with"
formChoiceSafe [Order1, Order2] Order1 (\val -> T.write_ val methodGraph)
formChoiceSafe [Order1, Order2] Order1 (\val -> T.write_ val methodGraph)
show
]
(submitButton (UpdateNode $ UpdateNodeParamsGraph { methodGraph: methodGraph' }) dispatch)
...
...
@@ -78,7 +78,7 @@ updateNodeListCpt = here.component "updateNodeList" cpt where
methodList' <- T.useLive T.unequal methodList
pure $ panel [ -- H.text "Update with"
formChoiceSafe [Basic, Advanced, WithModel] Basic (\val -> T.write_ val methodList)
formChoiceSafe [Basic, Advanced, WithModel] Basic (\val -> T.write_ val methodList)
show
]
(submitButton (UpdateNode $ UpdateNodeParamsList { methodList: methodList' }) dispatch)
...
...
@@ -91,7 +91,7 @@ updateTextsCpt = here.component "updateTexts" cpt where
methodTexts' <- T.useLive T.unequal methodTexts
pure $ panel [ -- H.text "Update with"
formChoiceSafe [NewNgrams, NewTexts, Both] NewNgrams (\val -> T.write_ val methodTexts)
formChoiceSafe [NewNgrams, NewTexts, Both] NewNgrams (\val -> T.write_ val methodTexts)
show
]
(submitButton (UpdateNode $ UpdateNodeParamsTexts { methodTexts: methodTexts' }) dispatch)
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Upload.purs
View file @
b689fd11
...
...
@@ -120,12 +120,14 @@ uploadFileViewCpt = here.component "uploadFileView" cpt
, WOS
, PresseRIS
, Arbitrary
] CSV setFileType'
] CSV setFileType'
show
]
]
, R2.row
[ H.div {className:"col-6 flex-space-around"}
[ formChoiceSafe [EN, FR, No_extraction, Universal] EN setLang' ]
[ formChoiceSafe [EN, FR, No_extraction, Universal] EN setLang'
show
]
]
]
...
...
src/Gargantext/Components/Forest/Tree/Node/Box.purs
View file @
b689fd11
...
...
@@ -26,7 +26,7 @@ import Gargantext.Components.Forest.Tree.Node.Tools (textInputBox, fragmentPT, p
import Gargantext.Sessions (Session)
import Gargantext.Types (Name, ID, prettyNodeType)
import Gargantext.Types as GT
import Gargantext.Utils (glyphicon, glyphiconActive)
import Gargantext.Utils
.Glyphicon
(glyphicon, glyphiconActive)
import Gargantext.Utils.Reactix as R2
import Reactix as R
import Reactix.DOM.HTML as H
...
...
src/Gargantext/Components/Forest/Tree/Node/Tools.purs
View file @
b689fd11
...
...
@@ -2,7 +2,7 @@ module Gargantext.Components.Forest.Tree.Node.Tools where
import Gargantext.Prelude
( class Ord, class Read, class Show, Unit
, bind, const, discard, map, not, pure, read, show, when
, bind, const, discard, map, not, pure, read, show, when
, mempty
, ($), (<), (<<<), (<>), (<$>), (<*>) )
import Data.Maybe (fromMaybe, Maybe(..))
import Data.Nullable (null)
...
...
@@ -10,8 +10,6 @@ import Data.Set (Set)
import Data.Set as Set
import Data.String as S
import Data.String.CodeUnits as DSCU
import Data.Tuple.Nested ((/\))
import DOM.Simple.Console (log2)
import Effect (Effect)
import Effect.Aff (Aff, launchAff, launchAff_)
import Reactix as R
...
...
@@ -21,12 +19,12 @@ import Toestand as T
import Gargantext.Components.Forest.Tree.Node.Action (Action, icon, text)
import Gargantext.Components.InputWithEnter (inputWithEnter)
import Gargantext.Ends (Frontends, url)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Sessions (Session, sessionId)
import Gargantext.Types as GT
import Gargantext.Utils (
glyphicon,
toggleSet)
import Gargantext.Utils.
Reactix as R2
import Gargantext.Utils (toggleSet)
import Gargantext.Utils.
Glyphicon (glyphicon)
import Gargantext.Utils.ReactTooltip as ReactTooltip
import Gargantext.Utils.Reactix as R2
here :: R2.Here
here = R2.here "Gargantext.Components.Forest.Tree.Node.Tools"
...
...
@@ -111,58 +109,71 @@ formEdit defaultValue setter =
-- | Form Choice input
-- if the list of options is not big enough, a button is used instead
formChoiceSafe :: forall
a b c
. Read a
=> Show a
=> Array a
-> a
-> (a -> Effect c
)
-- -> ((b -> a) -> Effect c
)
formChoiceSafe :: forall
item m
. Read item
=> Show item
=> Array item
-> item
-> (item -> Effect m
)
-> (item -> String
)
-> R.Element
formChoiceSafe [] _ _ = H.div {} []
formChoiceSafe [n] _defaultNodeType setNodeType =
formButton n setNodeType
formChoiceSafe nodeTypes defaultNodeType setNodeType =
formChoice nodeTypes defaultNodeType setNodeType
formChoiceSafe [] _ _ _ = mempty
formChoiceSafe [n] _ cbk prnt = formButton n cbk prnt
formChoiceSafe arr def cbk prnt = formChoice arr def cbk prnt
-- | List Form
formChoice :: forall
a b c d
. Read b
=> Show d
=> Array d
-> b
-> (b -> Effect a
)
-- -> ((c -> b) -> Effect a
)
formChoice :: forall
item m
. Read item
=> Show item
=> Array item
-> item
-> (item -> Effect m
)
-> (item -> String
)
-> R.Element
formChoice nodeTypes defaultNodeType setNodeType =
formChoice items def cbk prnt =
H.div { className: "form-group"}
[ R2.select { className: "form-control"
, on: { change: \e -> setNodeType $ fromMaybe defaultNodeType $ read $ R.unsafeEventValue e }
}
(map (\opt -> H.option {} [ H.text $ show opt ]) nodeTypes)
[
R2.select
{ className: "form-control with-icon-font"
, on: { change }
} $
map option items
]
where
change e = cbk $ fromMaybe def $ read $ R.unsafeEventValue e
option opt =
H.option { value: show opt }
[ H.text $ prnt opt ]
-- | Button Form
-- FIXME: currently needs a click from the user (by default, we could avoid such click)
formButton :: forall a b c
. Show a
=> a
-> (a -> Effect c)
-- -> ((b -> a) -> Effect c)
formButton :: forall item m
. item
-> (item -> Effect m)
-> (item -> String)
-> R.Element
formButton nodeType setNodeType =
H.div {} [ H.text $ "Confirm the selection of: " <> show nodeType
, bouton
formButton item cbk prnt =
H.div {}
[
H.text $ "Confirm the selection of: " <> prnt item
,
cta
]
where
bouton = H.button { className : "cold-md-5 btn btn-primary center"
cta =
H.button
{ className : "cold-md-5 btn btn-primary center"
, type : "button"
, title: "Form Button"
, style : { width: "100%" }
, on: { click: \_ -> setNodeType nodeType }
} [H.text $ "Confirmation"]
, on: { click: \_ -> cbk item }
}
[ H.text "Confirmation" ]
------------------------------------------------------------------------
------------------------------------------------------------------------
...
...
src/Gargantext/Components/Lang.purs
View file @
b689fd11
...
...
@@ -35,3 +35,7 @@ instance EncodeJson Lang where
-- Language used for the landing page
data LandingLang = LL_EN | LL_FR
-- @TODO a possible method/class that a real i18n logic could later replace
class Show t <= Translate t where
translate :: Lang -> t -> String
src/Gargantext/Types.purs
View file @
b689fd11
module Gargantext.Types where
import Data.Array as A
import Data.Newtype (class Newtype)
import Data.String as S
import Data.Generic.Rep (class Generic)
import Data.Eq.Generic (genericEq)
import Data.Int (toNumber)
import Data.Maybe (Maybe(..), fromMaybe, maybe)
import Data.Newtype (class Newtype)
import Data.Ord.Generic (genericCompare)
import Data.Show.Generic (genericShow)
import Data.Int (toNumber)
import Data.Maybe (Maybe(..), maybe)
import Data.String as S
import Effect.Aff (Aff)
import Foreign as F
import Prim.Row (class Union)
...
...
@@ -19,6 +19,9 @@ import URI.Query (Query)
import Gargantext.Prelude
import Gargantext.Components.Lang (class Translate, Lang(..))
import Gargantext.Utils.Glyphicon (classNamePrefix, glyphiconToCharCode)
data Handed = LeftHanded | RightHanded
switchHanded :: forall a. a -> a -> Handed -> a
...
...
@@ -224,62 +227,137 @@ instance Read NodeType where
-- TODO NodePublic read ?
read _ = Nothing
------------------------------------------------------
instance translateNodeType :: Translate NodeType where
translate l n = case l of
FR -> _translateFR n
_ -> _translateEN n
_translateFR :: NodeType -> String
_translateFR = case _ of
Annuaire -> "Annuaire"
Corpus -> "Corpus"
Dashboard -> "Dashboard"
Error -> "Erreur"
Folder -> "Dossier"
FolderPrivate -> "Dossier privé"
FolderPublic -> "Dossier public"
FolderShared -> "Dossier partagé"
Graph -> "Graphe"
Individu -> "Individu"
Node -> "Nœud"
NodeContact -> "Contact"
NodeList -> "Liste"
NodeUser -> "Utilisateur"
Nodes -> "Nœuds"
Phylo -> "Phylo"
Team -> "Équipe"
Texts -> "Textes"
Tree -> "Arbre"
Url_Document -> "Document URL"
--
NodeFile -> "Fichier"
NodeFrameCalc -> "Feuilles de calcul"
NodeFrameNotebook -> "Carnet de notes"
NodeFrameWrite -> "Éditeur de texte"
NodeFrameVisio -> "Visio"
NodePublic n -> _translateFR n
_translateEN :: NodeType -> String
_translateEN = case _ of
Annuaire -> "Annuaire"
Corpus -> "Corpus"
Dashboard -> "Dashboard"
Error -> "Error"
Folder -> "Folder"
FolderPrivate -> "Private folder"
FolderPublic -> "Public folder"
FolderShared -> "Shared folder"
Graph -> "Graph"
Individu -> "Person"
Node -> "Node"
NodeContact -> "Contact"
NodeList -> "List"
NodeUser -> "User"
Nodes -> "Nodes"
Phylo -> "Phylo"
Team -> "Team"
Texts -> "Texts"
Tree -> "Tree"
Url_Document -> "URL document"
--
NodeFile -> "File"
NodeFrameCalc -> "Calc"
NodeFrameNotebook -> "Notebook"
NodeFrameWrite -> "Write"
NodeFrameVisio -> "Visio"
NodePublic n -> _translateEN n
fldr :: NodeType -> Boolean -> String
fldr NodeUser false = "fa fa-user-circle"
fldr NodeUser true = "fa fa-user"
------------------------------------------------------
fldr Folder false = "fa fa-folder"
fldr Folder true = "fa fa-folder-open-o"
_getIcon :: NodeType -> Boolean -> String
_getIcon NodeUser false = "user-circle"
_getIcon NodeUser true = "user"
------------------------------------------------------
_getIcon Folder false = "folder"
_getIcon Folder true = "folder-open-o"
------------------------------------------------------
fldr FolderPrivate true = "fa fa-
lock"
fldr FolderPrivate false = "fa fa-
lock-circle"
_getIcon FolderPrivate true = "
lock"
_getIcon FolderPrivate false = "
lock-circle"
fldr FolderShared true = "fa fa-
share-alt"
fldr FolderShared false = "fa fa-
share-circle"
fldr Team true = "fa fa-
users"
fldr Team false = "fa fa-
users-closed"
_getIcon FolderShared true = "
share-alt"
_getIcon FolderShared false = "
share-circle"
_getIcon Team true = "
users"
_getIcon Team false = "
users-closed"
fldr FolderPublic true = "fa fa-
globe-circle"
fldr FolderPublic false = "fa fa-
globe"
_getIcon FolderPublic true = "
globe-circle"
_getIcon FolderPublic false = "
globe"
------------------------------------------------------
fldr Corpus true = "fa fa-
book"
fldr Corpus false = "fa fa-
book-circle"
_getIcon Corpus true = "
book"
_getIcon Corpus false = "
book-circle"
fldr Phylo _ = "fa fa-
code-fork"
_getIcon Phylo _ = "
code-fork"
fldr Graph _ = "fa fa-
hubzilla"
fldr Texts _ = "fa fa-
newspaper-o"
fldr Dashboard _ = "fa fa-
signal"
fldr NodeList _ = "fa fa-
list"
fldr NodeFile _ = "fa fa-
file" -- TODO depending on mime type we can use fa-file-image etc
_getIcon Graph _ = "
hubzilla"
_getIcon Texts _ = "
newspaper-o"
_getIcon Dashboard _ = "
signal"
_getIcon NodeList _ = "
list"
_getIcon NodeFile _ = "
file" -- TODO depending on mime type we can use fa-file-image etc
fldr Annuaire true = "fa fa-
address-card-o"
fldr Annuaire false = "fa fa-
address-card"
_getIcon Annuaire true = "
address-card-o"
_getIcon Annuaire false = "
address-card"
fldr NodeContact true = "fa fa-
address-card-o"
fldr NodeContact false = "fa fa-
address-card"
_getIcon NodeContact true = "
address-card-o"
_getIcon NodeContact false = "
address-card"
fldr NodeFrameWrite true = "fa fa-
file-text-o"
fldr NodeFrameWrite false = "fa fa-
file-text"
_getIcon NodeFrameWrite true = "
file-text-o"
_getIcon NodeFrameWrite false = "
file-text"
fldr NodeFrameCalc true = "fa fa-
calculator"
fldr NodeFrameCalc false = "fa fa-
calculator"
_getIcon NodeFrameCalc true = "
calculator"
_getIcon NodeFrameCalc false = "
calculator"
fldr NodeFrameNotebook true = "fa fa-
file-code-o"
fldr NodeFrameNotebook false = "fa fa-
code"
_getIcon NodeFrameNotebook true = "
file-code-o"
_getIcon NodeFrameNotebook false = "
code"
fldr NodeFrameVisio true = "fa fa-
video-camera"
fldr NodeFrameVisio false = "fa fa-
video-camera"
_getIcon NodeFrameVisio true = "
video-camera"
_getIcon NodeFrameVisio false = "
video-camera"
fldr (NodePublic nt) b = fldr
nt b
_getIcon (NodePublic nt) b = _getIcon
nt b
fldr _ true = "fa fa-folder-open"
fldr _ false = "fa fa-folder-o"
_getIcon _ true = "folder-open"
_getIcon _ false = "folder-o"
------------------------------------------------------
fldr :: NodeType -> Boolean -> String
fldr nt flag = classNamePrefix <> _getIcon nt flag
charCodeIcon :: NodeType -> Boolean -> String
charCodeIcon nt flag = glyphiconToCharCode $ _getIcon nt flag
publicize :: NodeType -> NodeType
publicize (NodePublic nt) = NodePublic nt
...
...
src/Gargantext/Utils.purs
View file @
b689fd11
module Gargantext.Utils where
import Data.Char (fromCharCode)
import Data.Either (Either(..))
import Data.Foldable (class Foldable, foldr)
import Data.Lens (Lens', lens)
import Data.Maybe (fromJust)
import Data.Newtype (class Newtype, unwrap, wrap)
import Data.Sequence.Ordered as OSeq
import Data.Set (Set)
import Data.Set as Set
import Data.Sequence.Ordered as OSeq
import Data.String as S
import Data.String.CodeUnits (singleton)
import Data.Unfoldable (class Unfoldable)
import DOM.Simple.Window (window)
import Effect (Effect)
import Prelude
import Partial.Unsafe (unsafePartial)
import Web.HTML as WHTML
import Web.HTML.Window (location)
import Web.HTML.Location as WHL
import Web.HTML.Window (location)
-- | TODO (hard coded)
csrfMiddlewareToken :: String
...
...
@@ -58,12 +61,6 @@ invertOrdering EQ = EQ
_unit :: forall s. Lens' s Unit
_unit = lens (\_ -> unit) (\s _ -> s)
glyphicon :: String -> String
glyphicon t = "btn glyphitem fa fa-" <> t
glyphiconActive :: String -> Boolean -> String
glyphiconActive icon b = glyphicon icon <> if b then " active" else ""
-- | Format a number with specified amount of zero-padding
zeroPad :: Int -> Int -> String
zeroPad pad num = zeros <> (show num)
...
...
@@ -106,3 +103,12 @@ href = do
w <- WHTML.window
loc <- location w
WHL.href loc
nbsp :: Int -> String
nbsp = nbsp' ""
where
char = singleton $ unsafePartial $ fromJust $ fromCharCode 160
nbsp' acc n
| n <= 0 = acc
| otherwise = nbsp' (acc <> char) (n - 1)
src/Gargantext/Utils/Glyphicon.purs
0 → 100644
View file @
b689fd11
This diff is collapsed.
Click to expand it.
src/sass/_tree.sass
View file @
b689fd11
...
...
@@ -168,6 +168,11 @@ li
.ok-to-use
color
:
black
.forest-tree-node-action-move
// empirical value (see issue #308)
max-height
:
50vh
overflow-y
:
scroll
.forest-layout
background-color
:
#fff
position
:
fixed
...
...
src/sass/bootstrap/default.sass
View file @
b689fd11
...
...
@@ -9,3 +9,6 @@ $theme-colors: ("primary": $blue, "secondary": $black)
// Bootstrap and its default variables
@import
../../../node_modules/bootstrap/scss/bootstrap
.with-icon-font
font-family
:
ForkAwesome
,
$font-family-base
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