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
6abd1b31
Commit
6abd1b31
authored
Sep 10, 2021
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
[FIX] merge
parents
9e2dbf70
ee543b41
Changes
51
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
51 changed files
with
717 additions
and
406 deletions
+717
-406
.envrc
.envrc
+1
-0
sass.css
dist/styles/sass.css
+7
-0
sass.css.map
dist/styles/sass.css.map
+1
-1
package.json
package.json
+4
-4
DocsTable.purs
src/Gargantext/Components/DocsTable.purs
+4
-5
FacetsTable.purs
src/Gargantext/Components/FacetsTable.purs
+1
-2
FolderView.purs
src/Gargantext/Components/FolderView.purs
+14
-12
Box.purs
src/Gargantext/Components/FolderView/Box.purs
+7
-12
Tree.purs
src/Gargantext/Components/Forest/Tree.purs
+22
-14
Node.purs
src/Gargantext/Components/Forest/Tree/Node.purs
+2
-1
Action.purs
src/Gargantext/Components/Forest/Tree/Node/Action.purs
+27
-91
Add.purs
src/Gargantext/Components/Forest/Tree/Node/Action/Add.purs
+1
-1
Contact.purs
...argantext/Components/Forest/Tree/Node/Action/Contact.purs
+1
-1
Delete.purs
...Gargantext/Components/Forest/Tree/Node/Action/Delete.purs
+1
-1
Download.purs
...rgantext/Components/Forest/Tree/Node/Action/Download.purs
+1
-1
Link.purs
src/Gargantext/Components/Forest/Tree/Node/Action/Link.purs
+1
-1
Merge.purs
src/Gargantext/Components/Forest/Tree/Node/Action/Merge.purs
+1
-1
Move.purs
src/Gargantext/Components/Forest/Tree/Node/Action/Move.purs
+6
-7
Rename.purs
...Gargantext/Components/Forest/Tree/Node/Action/Rename.purs
+1
-1
Search.purs
...Gargantext/Components/Forest/Tree/Node/Action/Search.purs
+12
-11
SearchBar.purs
.../Components/Forest/Tree/Node/Action/Search/SearchBar.purs
+8
-8
SearchField.purs
...omponents/Forest/Tree/Node/Action/Search/SearchField.purs
+137
-108
Types.purs
...text/Components/Forest/Tree/Node/Action/Search/Types.purs
+18
-16
Share.purs
src/Gargantext/Components/Forest/Tree/Node/Action/Share.purs
+2
-2
Types.purs
src/Gargantext/Components/Forest/Tree/Node/Action/Types.purs
+74
-0
Update.purs
...Gargantext/Components/Forest/Tree/Node/Action/Update.purs
+1
-1
Upload.purs
...Gargantext/Components/Forest/Tree/Node/Action/Upload.purs
+41
-28
Box.purs
src/Gargantext/Components/Forest/Tree/Node/Box.purs
+3
-3
Types.purs
src/Gargantext/Components/Forest/Tree/Node/Box/Types.purs
+1
-1
Tools.purs
src/Gargantext/Components/Forest/Tree/Node/Tools.purs
+2
-2
SubTree.purs
...Gargantext/Components/Forest/Tree/Node/Tools/SubTree.purs
+2
-1
Sync.purs
src/Gargantext/Components/Forest/Tree/Node/Tools/Sync.purs
+2
-5
API.purs
src/Gargantext/Components/GraphExplorer/API.purs
+1
-1
Button.purs
src/Gargantext/Components/GraphExplorer/Button.purs
+0
-1
ListSelection.purs
src/Gargantext/Components/ListSelection.purs
+183
-0
Types.purs
src/Gargantext/Components/ListSelection/Types.purs
+57
-0
NgramsTable.purs
src/Gargantext/Components/NgramsTable.purs
+10
-10
Components.purs
src/Gargantext/Components/NgramsTable/Components.purs
+12
-13
Core.purs
src/Gargantext/Components/NgramsTable/Core.purs
+1
-1
Node.purs
src/Gargantext/Components/Node.purs
+1
-0
Tabs.purs
...gantext/Components/Nodes/Annuaire/User/Contacts/Tabs.purs
+1
-3
Corpus.purs
src/Gargantext/Components/Nodes/Corpus.purs
+8
-8
Dashboard.purs
src/Gargantext/Components/Nodes/Corpus/Dashboard.purs
+1
-1
Document.purs
src/Gargantext/Components/Nodes/Corpus/Document.purs
+6
-10
Home.purs
src/Gargantext/Components/Nodes/Home.purs
+4
-1
Tabs.purs
src/Gargantext/Components/Nodes/Lists/Tabs.purs
+1
-2
Tile.purs
src/Gargantext/Components/Tile.purs
+6
-3
TileMenu.purs
src/Gargantext/Components/TileMenu.purs
+6
-3
REST.purs
src/Gargantext/Config/REST.purs
+2
-1
_tree.sass
src/sass/_tree.sass
+10
-0
yarn.lock
yarn.lock
+1
-6
No files found.
.envrc
0 → 100644
View file @
6abd1b31
use nix
dist/styles/sass.css
View file @
6abd1b31
...
...
@@ -702,6 +702,13 @@ li .leaf:hover a.settings {
margin-bottom
:
24px
;
}
.ids-selector
.tree
.children
{
padding-left
:
0.5em
;
}
.ids-selector
.tree
.children
.leaf
input
{
margin
:
0.1em
;
}
.code-editor
.editor
.code-area
{
flex-grow
:
1
;
max-height
:
200px
;
...
...
dist/styles/sass.css.map
View file @
6abd1b31
{"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/abstract/_members.scss","../../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":"AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;EACE;EACA;EACA;EACA;EAEA;;;AAEF;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;;;AAME;EACE;;;AC9DN;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;;;ACjFJ;EACE;;AACA;EACE;EACA;;;AAEJ;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAGF;EACE;;AAEE;EACE;EACA;;AACA;EACE;;;AAIJ;EACE;EACA;EACA;EACA;;;AAKJ;EACE;EACA;EACA;;;AAEJ;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;;;AC1GF;EACE;;;AAGA;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAGA;EACE;;AACF;EACE;;AAEJ;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;;AAKJ;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;;;AAMN;EACE;;AAEA;EACE;EACA;EACA;EACA;;AAEF;EACE;;AAEA;EACE;EACA;;AAEJ;EACE;EACA;;AAIA;EACE;EACA;;AAEF;EACE;;AAEF;EACE;;;AAIF;EACE;EACA;;AAEF;EACE;;AAEF;EACE;;;AAGR;EACE;;AAEA;EACE;EACA;;ACrJO;EDwJP;;;ACjKO;EDoKP;;;AAKJ;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;;;AAEN;EAWE;EAGA;EACA,eAvPkB;;AAyPlB;EACE;EACA;;ACxNO;EDqOP;EACA,MAFW;EAGX;;;AChPO;EDoPP;EACA,OAFW;EAGX;;;AAGA;EACE;;AAEA;EACE;;AAGJ;EACE;;AACF;EACE;;AACF;EACE;;AAGJ;EACE;EACA;;AAEA;EAGE;EACA,WAzSa;EA4Sb;EACA;EACA;;AAEA;EACE;;AAEF;EACE;EACA;EACA;EACA;;AACA;EACE;;AAEN;EACE;EACA;EACA;EACA;;AAEJ;EAEE;EACA;;;AAEJ;EAEE;EACA;;;AAEF;EAGE;EAKA;EACA;EACA;EACA;EAGA;EACA;EACA;EAKA;;AAHA;EACE;;;AAKJ;EAGE;;ACpUS;ED5BP;EACA;;;ACkBO;EDfP;EACA;;;ACuBO;EDuUP;;AAEA;EACE;;;ACnVK;EDsVP;;AAEA;EACE;;;AAON;EAIE;EAEA;EACA;EACA;EACA,QApYmC;EAqYnC;;ACjWS;EDqWP;;;AC9WO;EDiXP;;;AAEJ;EAGE;EAEA;EACA;EACA;EACA,QAvZgC;EAwZhC;;ACnXS;EDuXP;;;AChYO;EDmYP;;;AAKF;EAIE;EACA;;ACpYO;ED5BP;EACA;;;ACkBO;EDfP;EACA;;;AA6ZA;EACE,eA3a+B;;;AEsBjC;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;EACA;EACA;;AACA;EACE;EACA;;AACF;EACE;EACA;;AACF;EACE;EACA;;AAGE;EACE;;AAEF;EACE;;AAEV;EACE;;AAEA;EACE;;;AC9FN;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;;;AAGF;EACE;;;AAEF;EACE;;AAEA;EACE;;AAEF;EACE;;;AAGJ;EAKE;;AAEA;EACE;;AAIE;EACE;;AACF;EACE;;AAEJ;EAGE;;AAGJ;EACE,SAtBa;EAuBb;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAKE;EACE;;AADF;EACE;;AADF;EACE;;AADF;EACE;;AADF;EACE;;AADF;EACE;;AADF;EACE;;AADF;EACE;;AADF;EACE;;AADF;EACE;;;AAKN;EACE;;AFhIO;EEmIL;;;AF5IK;EE+IL;;;AAEJ;EACE,SAZa;;;ACpKjB;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;;;ACNxB;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/abstract/_members.scss","../../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":"AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;EACE;EACA;EACA;EACA;EAEA;;;AAEF;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;;;AAME;EACE;;;AC9DN;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;;;ACjFJ;EACE;;AACA;EACE;EACA;;;AAEJ;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAGF;EACE;;AAEE;EACE;EACA;;AACA;EACE;;;AAIJ;EACE;EACA;EACA;EACA;;;AAKJ;EACE;EACA;EACA;;;AAEJ;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;;;AC1GF;EACE;;;AAGA;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAGA;EACE;;AACF;EACE;;AAEJ;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;;AAKJ;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;;;AAMN;EACE;;AAEA;EACE;EACA;EACA;EACA;;AAEF;EACE;;AAEA;EACE;EACA;;AAEJ;EACE;EACA;;AAIA;EACE;EACA;;AAEF;EACE;;AAEF;EACE;;;AAIF;EACE;EACA;;AAEF;EACE;;AAEF;EACE;;;AAGR;EACE;;AAEA;EACE;EACA;;ACrJO;EDwJP;;;ACjKO;EDoKP;;;AAKJ;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;;;AAEN;EAWE;EAGA;EACA,eAvPkB;;AAyPlB;EACE;EACA;;ACxNO;EDqOP;EACA,MAFW;EAGX;;;AChPO;EDoPP;EACA,OAFW;EAGX;;;AAGA;EACE;;AAEA;EACE;;AAGJ;EACE;;AACF;EACE;;AACF;EACE;;AAGJ;EACE;EACA;;AAEA;EAGE;EACA,WAzSa;EA4Sb;EACA;EACA;;AAEA;EACE;;AAEF;EACE;EACA;EACA;EACA;;AACA;EACE;;AAEN;EACE;EACA;EACA;EACA;;AAEJ;EAEE;EACA;;;AAEJ;EAEE;EACA;;;AAEF;EAGE;EAKA;EACA;EACA;EACA;EAGA;EACA;EACA;EAKA;;AAHA;EACE;;;AAKJ;EAGE;;ACpUS;ED5BP;EACA;;;ACkBO;EDfP;EACA;;;ACuBO;EDuUP;;AAEA;EACE;;;ACnVK;EDsVP;;AAEA;EACE;;;AAON;EAIE;EAEA;EACA;EACA;EACA,QApYmC;EAqYnC;;ACjWS;EDqWP;;;AC9WO;EDiXP;;;AAEJ;EAGE;EAEA;EACA;EACA;EACA,QAvZgC;EAwZhC;;ACnXS;EDuXP;;;AChYO;EDmYP;;;AAKF;EAIE;EACA;;ACpYO;ED5BP;EACA;;;ACkBO;EDfP;EACA;;;AA6ZA;EACE,eA3a+B;;;AAibjC;EACE;;AAEE;EACE;;;AE/ZN;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;EACA;EACA;;AACA;EACE;EACA;;AACF;EACE;EACA;;AACF;EACE;EACA;;AAGE;EACE;;AAEF;EACE;;AAEV;EACE;;AAEA;EACE;;;AC9FN;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;;;AAGF;EACE;;;AAEF;EACE;;AAEA;EACE;;AAEF;EACE;;;AAGJ;EAKE;;AAEA;EACE;;AAIE;EACE;;AACF;EACE;;AAEJ;EAGE;;AAGJ;EACE,SAtBa;EAuBb;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAKE;EACE;;AADF;EACE;;AADF;EACE;;AADF;EACE;;AADF;EACE;;AADF;EACE;;AADF;EACE;;AADF;EACE;;AADF;EACE;;AADF;EACE;;;AAKN;EACE;;AFhIO;EEmIL;;;AF5IK;EE+IL;;;AAEJ;EACE,SAZa;;;ACpKjB;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;;;ACNxB;EACE;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;EACE;EACA","file":"sass.css"}
\ No newline at end of file
package.json
View file @
6abd1b31
...
...
@@ -30,7 +30,7 @@
"
@popperjs/core
"
:
"
^2.9.2
"
,
"
aes-js
"
:
"
^3.1.1
"
,
"
base-x
"
:
"
^3.0.2
"
,
"
bootstrap
"
:
"
^
4.6
.0
"
,
"
bootstrap
"
:
"
^
5.1
.0
"
,
"
bootstrap-dark
"
:
"
^1.0.3
"
,
"
create-react-class
"
:
"
^15.6.3
"
,
"
echarts
"
:
"
^5.1.2
"
,
...
...
src/Gargantext/Components/DocsTable.purs
View file @
6abd1b31
...
...
@@ -3,7 +3,6 @@ module Gargantext.Components.DocsTable where
import Gargantext.Prelude
import DOM.Simple.Console (log2)
import DOM.Simple.Event as DE
import Data.Array as A
import Data.Either (Either)
...
...
@@ -496,9 +495,9 @@ docChooserCpt = here.component "docChooser" cpt
]
where
onClick selected _ = do
-- log2 "[docChooser] onClick, listId" listId
-- log2 "[docChooser] onClick, corpusId" corpusId
-- log2 "[docChooser] onClick, nodeId" nodeId
--
here.
log2 "[docChooser] onClick, listId" listId
--
here.
log2 "[docChooser] onClick, corpusId" corpusId
--
here.
log2 "[docChooser] onClick, nodeId" nodeId
-- R2.callTrigger triggerAnnotatedDocIdChange { corpusId, listId, nodeId }
-- T2.reload tableReload
if selected then do
...
...
@@ -510,7 +509,7 @@ docChooserCpt = here.component "docChooser" cpt
, mCurrentDocId: Just nodeId
, nodeId: nodeId }) sidePanel
T.write_ Opened sidePanelState
log2 "[docChooser] sidePanel opened" sidePanelState
here.
log2 "[docChooser] sidePanel opened" sidePanelState
newtype SearchQuery = SearchQuery {
...
...
src/Gargantext/Components/FacetsTable.purs
View file @
6abd1b31
...
...
@@ -5,7 +5,6 @@ module Gargantext.Components.FacetsTable where
import Gargantext.Prelude
import DOM.Simple.Console (log2)
import Data.Either (Either(..))
import Data.Eq.Generic (genericEq)
import Data.Generic.Rep (class Generic)
...
...
@@ -223,7 +222,7 @@ loadPage { session, nodeId, listId, query, params: {limit, offset, orderBy } } =
case eSearchResult of
Left err -> pure $ Left err
Right (SearchResult {result}) -> do
liftEffect $ log2 "[loadPage] result" result
liftEffect $
here.
log2 "[loadPage] result" result
-- $ SearchQuery {query: concat query, expected: SearchDoc}
pure $ Right $ case result of
SearchResultDoc {docs} -> Docs {docs: doc2view <$> Seq.fromFoldable docs}
...
...
src/Gargantext/Components/FolderView.purs
View file @
6abd1b31
...
...
@@ -10,7 +10,6 @@ import Effect.Aff (Aff)
import Effect.Class (liftEffect)
import Gargantext.AsyncTasks as GAT
import Gargantext.Components.App.Data (Boxes)
import Gargantext.Components.Forest.Tree.Node.Action (Action(..))
import Gargantext.Components.Forest.Tree.Node.Action.Add (AddNodeValue(..), addNode)
import Gargantext.Components.Forest.Tree.Node.Action.Contact as Contact
import Gargantext.Components.Forest.Tree.Node.Action.Delete (deleteNode, unpublishNode)
...
...
@@ -19,10 +18,11 @@ import Gargantext.Components.Forest.Tree.Node.Action.Merge (mergeNodeReq)
import Gargantext.Components.Forest.Tree.Node.Action.Move (moveNodeReq)
import Gargantext.Components.Forest.Tree.Node.Action.Rename (RenameValue(..), rename)
import Gargantext.Components.Forest.Tree.Node.Action.Share as Share
import Gargantext.Components.Forest.Tree.Node.Action.Types (Action(..))
import Gargantext.Components.Forest.Tree.Node.Action.Update (updateRequest)
import Gargantext.Components.Forest.Tree.Node.Action.Upload (uploadArbitraryFile, uploadFile)
import Gargantext.Components.Forest.Tree.Node.Box (nodePopupView)
import Gargantext.Components.Forest.Tree.Node.Tools.FTree (FTree, LNode(..), NTree(..), fTreeID)
import Gargantext.Components.Forest.Tree.Node.Tools.FTree (FTree, LNode(..), NTree(..),
ID,
fTreeID)
import Gargantext.Components.Forest.Tree.Node.Tools.SubTree.Types (SubTreeOut(..))
import Gargantext.Config.REST (RESTError)
import Gargantext.Config.Utils (handleRESTError)
...
...
@@ -70,9 +70,9 @@ folderViewCpt = here.component "folderViewCpt" cpt where
, boxes
, folders
, nodeId
, session
, reload
, setPopoverRef } }
, session
, setPopoverRef } [] }
where
errorHandler err = here.log2 "[folderView] RESTError" err
...
...
@@ -86,8 +86,8 @@ type FolderViewProps =
, setPopoverRef :: R.Ref (Maybe (Boolean -> Effect Unit))
)
folderViewMain :: R
ecord FolderViewProps -> R.Element
folderViewMain
props = R.createElement folderViewMainCpt props []
folderViewMain :: R
2.Component FolderViewProps
folderViewMain
= R.createElement folderViewMainCpt
folderViewMainCpt :: R.Component FolderViewProps
folderViewMainCpt = here.component "folderViewMainCpt" cpt where
cpt { backFolder
...
...
@@ -277,8 +277,10 @@ performAction = performAction' where
performAction' (SharePublic { params }) p = sharePublic params p
performAction' (AddContact params) p = addContact params p
performAction' (AddNode name nodeType) p = addNode' name nodeType p
performAction' (UploadFile nodeType fileType mName contents) p = uploadFile' nodeType fileType mName contents p
performAction' (UploadArbitraryFile mName blob) p = uploadArbitraryFile' mName blob p
performAction' (UploadFile nodeType fileType mName contents selection) p =
uploadFile' nodeType fileType mName contents p selection
performAction' (UploadArbitraryFile mName blob selection) p =
uploadArbitraryFile' mName blob p selection
performAction' DownloadNode _ = liftEffect $ here.log "[performAction] DownloadNode"
performAction' (MoveNode {params}) p = moveNode params p
performAction' (MergeNode {params}) p = mergeNode params p
...
...
@@ -325,14 +327,14 @@ performAction = performAction' where
addContact params { nodeId: id, session } =
void $ Contact.contactReq session id params
uploadFile' nodeType fileType mName contents { boxes: { errors, tasks }, nodeId: id, session } = do
eTask <- uploadFile { contents, fileType, id, nodeType, mName, session }
uploadFile' nodeType fileType mName contents { boxes: { errors, tasks }, nodeId: id, session }
selection
= do
eTask <- uploadFile { contents, fileType, id, nodeType, mName, se
lection, se
ssion }
handleRESTError errors eTask $ \task -> liftEffect $ do
GAT.insert id task tasks
here.log2 "[performAction] UploadFile, uploaded, task:" task
uploadArbitraryFile' mName blob { boxes: { errors, tasks }, nodeId: id, session } = do
eTask <- uploadArbitraryFile session id { blob, mName }
uploadArbitraryFile' mName blob { boxes: { errors, tasks }, nodeId: id, session }
selection
= do
eTask <- uploadArbitraryFile session id { blob, mName }
selection
handleRESTError errors eTask $ \task -> liftEffect $ do
GAT.insert id task tasks
here.log2 "[performAction] UploadArbitraryFile, uploaded, task:" task
...
...
src/Gargantext/Components/FolderView/Box.purs
View file @
6abd1b31
...
...
@@ -3,9 +3,7 @@ module Gargantext.Components.FolderView.Box where
import Gargantext.Prelude
import DOM.Simple as DOM
import Data.Maybe (Maybe(..))
import Effect (Effect)
import Gargantext.Components.Forest.Tree.Node.Settings (SettingsBox(..), settingsBox)
import Gargantext.Components.Forest.Tree.Node.Tools (prettyNodeType)
import Gargantext.Types (ID, Name)
import Gargantext.Types as GT
...
...
@@ -13,7 +11,6 @@ import Gargantext.Utils.Glyphicon (glyphicon)
import Gargantext.Utils.Reactix as R2
import Reactix as R
import Reactix.DOM.HTML as H
import Toestand as T
here :: R2.Here
here = R2.here "Gargantext.Components.FolderView.Box"
...
...
@@ -25,12 +22,11 @@ type NodePopupProps =
, onPopoverClose :: DOM.Element -> Effect Unit
)
nodePopupView :: Record NodePopupProps -> R.Element
nodePopupView props = R.createElement nodePopupCpt props []
nodePopupCpt :: R.Component NodePopupProps
nodePopupCpt = here.component "nodePopupView" cpt where
cpt props@{ id, name, nodeType } _ = do
nodePopupView :: R2.Leaf NodePopupProps
nodePopupView props = R.createElement nodePopupViewCpt props []
nodePopupViewCpt :: R.Component NodePopupProps
nodePopupViewCpt = here.component "nodePopupView" cpt where
cpt props _ = do
pure $ H.div tooltipProps
[ H.div { className: "popup-container" }
...
...
@@ -43,7 +39,7 @@ nodePopupCpt = here.component "nodePopupView" cpt where
tooltipProps = { id: "node-popup-tooltip", title: "Node settings"
, data: { toggle: "tooltip", placement: "right" } }
panelHeading props@{
id, name,
nodeType } =
panelHeading props@{ nodeType } =
H.div { className: "card-header" }
[ R2.row
[ H.div { className: "col-4" }
...
...
@@ -53,5 +49,4 @@ nodePopupCpt = here.component "nodePopupView" cpt where
[ H.span { className: "text-primary center" } [ H.text props.name ] ]
, H.div { className: "col-1" }
[ H.a { type: "button", on: { click: closePopover props }, title: "Close"
, className: glyphicon "window-close" } [] ]]] where
SettingsBox { edit, doc, buttons } = settingsBox nodeType
, className: glyphicon "window-close" } [] ]]]
src/Gargantext/Components/Forest/Tree.purs
View file @
6abd1b31
...
...
@@ -12,7 +12,6 @@ import Effect.Class (liftEffect)
import Gargantext.AsyncTasks as GAT
import Gargantext.Components.App.Data (Boxes)
import Gargantext.Components.Forest.Tree.Node (nodeSpan)
import Gargantext.Components.Forest.Tree.Node.Action (Action(..))
import Gargantext.Components.Forest.Tree.Node.Action.Add (AddNodeValue(..), addNode)
import Gargantext.Components.Forest.Tree.Node.Action.Contact as Contact
import Gargantext.Components.Forest.Tree.Node.Action.Delete (deleteNode, unpublishNode)
...
...
@@ -21,6 +20,7 @@ import Gargantext.Components.Forest.Tree.Node.Action.Merge (mergeNodeReq)
import Gargantext.Components.Forest.Tree.Node.Action.Move (moveNodeReq)
import Gargantext.Components.Forest.Tree.Node.Action.Rename (RenameValue(..), rename)
import Gargantext.Components.Forest.Tree.Node.Action.Share as Share
import Gargantext.Components.Forest.Tree.Node.Action.Types (Action(..))
import Gargantext.Components.Forest.Tree.Node.Action.Update (updateRequest)
import Gargantext.Components.Forest.Tree.Node.Action.Upload (uploadFile, uploadArbitraryFile)
import Gargantext.Components.Forest.Tree.Node.Tools.FTree (FTree, LNode(..), NTree(..), fTreeID)
...
...
@@ -64,7 +64,8 @@ type NodeProps =
| Common )
type TreeProps =
( tree :: FTree
( root :: ID
, tree :: FTree
| NodeProps )
type ChildrenTreeProps =
...
...
@@ -93,6 +94,7 @@ type NSCommon =
type ChildLoaderProps =
( id :: ID
, render :: R2.Leaf TreeProps
, root :: ID
| NodeProps )
type PerformActionProps =
...
...
@@ -118,7 +120,7 @@ treeLoaderCpt = here.component "treeLoader" cpt where
loaded tree' = tree props where
props = Record.merge common extra where
common = RecordE.pick p :: Record Common
extra = {
tree: tree', reloadTree: p.reload, session
}
extra = {
reloadTree: p.reload, root, session, tree: tree'
}
errorHandler err = here.log2 "[treeLoader] RESTError" err
getNodeTree :: Session -> ID -> Aff (Either RESTError FTree)
...
...
@@ -135,6 +137,7 @@ treeCpt = here.component "tree" cpt where
, frontends
, handed
, reload
, root
, session
, tree: NTree (LNode { id, name, nodeType }) children } _ = do
setPopoverRef <- R.useRef Nothing
...
...
@@ -150,6 +153,7 @@ treeCpt = here.component "tree" cpt where
, name
, nodeType
, reload
, root
, session
, setPopoverRef }
[ renderChildren (Record.merge p { childProps: { children', folderOpen, render: tree } } ) [] ]
...
...
@@ -186,13 +190,14 @@ renderTreeChildren = R.createElement renderTreeChildrenCpt
renderTreeChildrenCpt :: R.Component ChildrenTreeProps
renderTreeChildrenCpt = here.component "renderTreeChildren" cpt where
cpt p@{ childProps: { children'
, render } } _ = do
, render }
, root } _ = do
pure $ R.fragment (map renderChild children')
where
nodeProps = RecordE.pick p :: Record NodeProps
renderChild (NTree (LNode {id: cId}) _) = childLoader props [] where
props = Record.merge nodeProps { id: cId, render }
props = Record.merge nodeProps { id: cId, render
, root
}
childLoader :: R2.Component ChildLoaderProps
childLoader = R.createElement childLoaderCpt
...
...
@@ -200,7 +205,8 @@ childLoaderCpt :: R.Component ChildLoaderProps
childLoaderCpt = here.component "childLoader" cpt where
cpt p@{ boxes: { reloadRoot }
, reloadTree
, render } _ = do
, render
, root } _ = do
reload <- T.useBox T2.newReload
let reloads = [ reload, reloadRoot, reloadTree ]
cache <- (A.cons p.id) <$> traverse (T.useLive T.unequal) reloads
...
...
@@ -213,7 +219,7 @@ childLoaderCpt = here.component "childLoader" cpt where
fetch _ = getNodeTreeFirstLevel p.session p.id
paint reload tree' = render (Record.merge base extra) where
base = nodeProps { reload = reload }
extra = { tree: tree' }
extra = {
root,
tree: tree' }
nodeProps = RecordE.pick p :: Record NodeProps
closePopover { setPopoverRef } =
...
...
@@ -265,14 +271,14 @@ addNode' name nodeType p@{ boxes: { errors, forestOpen }, session, tree: (NTree
liftEffect $ T.modify_ (openNodesInsert (mkNodeId session id)) forestOpen
refreshTree p
uploadFile' nodeType fileType mName contents p@{ boxes: { errors, tasks }, session, tree: (NTree (LNode { id }) _) } = do
eTask <- uploadFile { contents, fileType, id, mName, nodeType, session }
uploadFile' nodeType fileType mName contents p@{ boxes: { errors, tasks }, session, tree: (NTree (LNode { id }) _) }
selection
= do
eTask <- uploadFile { contents, fileType, id, mName, nodeType, se
lection, se
ssion }
handleRESTError errors eTask $ \task -> liftEffect $ do
GAT.insert id task tasks
here.log2 "[uploadFile'] UploadFile, uploaded, task:" task
uploadArbitraryFile' mName blob p@{ boxes: { errors, tasks }, session, tree: (NTree (LNode { id }) _) } = do
eTask <- uploadArbitraryFile session id { blob, mName }
uploadArbitraryFile' mName blob p@{ boxes: { errors, tasks }, session, tree: (NTree (LNode { id }) _) }
selection
= do
eTask <- uploadArbitraryFile session id { blob, mName }
selection
handleRESTError errors eTask $ \task -> liftEffect $ do
GAT.insert id task tasks
here.log2 "[uploadArbitraryFile'] UploadArbitraryFile, uploaded, task:" task
...
...
@@ -307,8 +313,10 @@ performAction (ShareTeam username) p = shareTeam userna
performAction (SharePublic { params }) p = sharePublic params p
performAction (AddContact params) p = addContact params p
performAction (AddNode name nodeType) p = addNode' name nodeType p
performAction (UploadFile nodeType fileType mName contents) p = uploadFile' nodeType fileType mName contents p
performAction (UploadArbitraryFile mName blob) p = uploadArbitraryFile' mName blob p
performAction (UploadFile nodeType fileType mName contents selection) p =
uploadFile' nodeType fileType mName contents p selection
performAction (UploadArbitraryFile mName blob selection) p =
uploadArbitraryFile' mName blob p selection
performAction DownloadNode _ = liftEffect $ here.log "[performAction] DownloadNode"
performAction (MoveNode {params}) p = moveNode params p
performAction (MergeNode {params}) p = mergeNode params p
...
...
src/Gargantext/Components/Forest/Tree/Node.purs
View file @
6abd1b31
...
...
@@ -10,7 +10,7 @@ import Effect.Aff (Aff, launchAff)
import Effect.Class (liftEffect)
import Gargantext.AsyncTasks as GAT
import Gargantext.Components.App.Data (Boxes)
import Gargantext.Components.Forest.Tree.Node.Action (Action(..))
import Gargantext.Components.Forest.Tree.Node.Action
.Types
(Action(..))
import Gargantext.Components.Forest.Tree.Node.Action.Upload (DroppedFile(..), fileTypeView)
import Gargantext.Components.Forest.Tree.Node.Action.Upload.Types (FileType(..), UploadFileBlob(..))
import Gargantext.Components.Forest.Tree.Node.Box (nodePopupView)
...
...
@@ -51,6 +51,7 @@ type NodeMainSpanProps =
, name :: Name
, nodeType :: GT.NodeType
, reload :: T2.ReloadS
, root :: ID
, session :: Session
, setPopoverRef :: R.Ref (Maybe (Boolean -> Effect Unit))
)
...
...
src/Gargantext/Components/Forest/Tree/Node/Action.purs
View file @
6abd1b31
module Gargantext.Components.Forest.Tree.Node.Action where
import Data.Generic.Rep (class Generic)
import Data.Maybe (Maybe(..))
import Effect.Aff (Aff)
import Gargantext.Prelude
import Gargantext.Components.Forest.Tree.Node.Tools.SubTree.Types (SubTreeOut, SubTreeParams(..))
import Data.Maybe (Maybe(..))
import Effect.Aff (Aff)
import Gargantext.Components.Forest.Tree.Node.Action.Types (Action(..))
import Gargantext.Components.Forest.Tree.Node.Settings (NodeAction(..), glyphiconNodeAction)
import Gargantext.Components.Forest.Tree.Node.Action.Upload.Types (FileType, UploadFileBlob)
import Gargantext.Components.Forest.Tree.Node.Action.Update.Types (UpdateNodeParams)
import Gargantext.Components.Forest.Tree.Node.Action.Contact.Types (AddContactParams)
import Gargantext.Components.Forest.Tree.Node.Tools.FTree (ID)
import Gargantext.Components.Forest.Tree.Node.Tools.SubTree.Types (SubTreeOut, SubTreeParams(..))
import Gargantext.Sessions (Session)
import Gargantext.Types as GT
type Props =
( dispatch :: Action -> Aff Unit
, id :: I
nt
, id :: I
D
, nodeType :: GT.NodeType
, session :: Session
)
data Action = AddNode String GT.NodeType
| DeleteNode GT.NodeType
| RenameNode String
| UpdateNode UpdateNodeParams
| DoSearch GT.AsyncTaskWithType
| UploadFile GT.NodeType FileType (Maybe String) String
| UploadArbitraryFile (Maybe String) UploadFileBlob
| DownloadNode
| RefreshTree
| ClosePopover
| ShareTeam String
| AddContact AddContactParams
| SharePublic {params :: Maybe SubTreeOut}
| MoveNode {params :: Maybe SubTreeOut}
| MergeNode {params :: Maybe SubTreeOut}
| LinkNode {nodeType :: Maybe GT.NodeType, params :: Maybe SubTreeOut}
| NoAction
subTreeOut :: Action -> Maybe SubTreeOut
subTreeOut (MoveNode {params}) = params
subTreeOut (MergeNode {params}) = params
...
...
@@ -57,47 +33,6 @@ setTreeOut (LinkNode {nodeType, params:_}) p = LinkNode {nodeType, params: p}
setTreeOut (SharePublic {params:_}) p = SharePublic {params: p}
setTreeOut a _ = a
derive instance Generic Action _
instance Eq Action where
eq (AddNode s1 nt1) (AddNode s2 nt2) = (eq s1 s2) && (eq nt1 nt2)
eq (DeleteNode nt1) (DeleteNode nt2) = eq nt1 nt2
eq (RenameNode s1) (RenameNode s2) = eq s1 s2
eq (UpdateNode un1) (UpdateNode un2) = eq un1 un2
eq (DoSearch at1) (DoSearch at2) = eq at1 at2
eq (UploadFile nt1 ft1 s1 _) (UploadFile nt2 ft2 s2 _) = (eq nt1 nt2) && (eq ft1 ft2) && (eq s1 s2)
eq (UploadArbitraryFile s1 _) (UploadArbitraryFile s2 _) = eq s1 s2
eq DownloadNode DownloadNode = true
eq RefreshTree RefreshTree = true
eq ClosePopover ClosePopover = true
eq (ShareTeam s1) (ShareTeam s2) = eq s1 s2
eq (AddContact ac1) (AddContact ac2) = eq ac1 ac2
eq (SharePublic p1) (SharePublic p2) = eq p1 p2
eq (MoveNode p1) (MoveNode p2) = eq p1 p2
eq (MergeNode p1) (MergeNode p2) = eq p1 p2
eq (LinkNode l1) (LinkNode l2) = eq l1 l2
eq NoAction NoAction = true
eq _ _ = false
instance Show Action where
show (AddNode _ _ ) = "AddNode"
show (DeleteNode _ ) = "DeleteNode"
show (RenameNode _ ) = "RenameNode"
show (UpdateNode _ ) = "UpdateNode"
show (ShareTeam _ ) = "ShareTeam"
show (AddContact _ ) = "AddContact"
show (SharePublic _ ) = "SharePublic"
show (DoSearch _ ) = "SearchQuery"
show (UploadFile _ _ _ _) = "UploadFile"
show (UploadArbitraryFile _ _) = "UploadArbitraryFile"
show RefreshTree = "RefreshTree"
show ClosePopover = "ClosePopover"
show DownloadNode = "Download"
show (MoveNode _ ) = "MoveNode"
show (MergeNode _ ) = "MergeNode"
show (LinkNode _ ) = "LinkNode"
show NoAction = "NoAction"
-----------------------------------------------------------------------
icon :: Action -> String
icon (AddNode _ _) = glyphiconNodeAction (Add [])
...
...
@@ -108,8 +43,8 @@ icon (ShareTeam _) = glyphiconNodeAction Share
icon (AddContact _) = glyphiconNodeAction Share
icon (SharePublic _ ) = glyphiconNodeAction (Publish { subTreeParams : SubTreeParams {showtypes:[], valitypes:[] }})
icon (DoSearch _) = glyphiconNodeAction SearchBox
icon (UploadFile _ _ _ _
)
= glyphiconNodeAction Upload
icon (UploadArbitraryFile _ _ ) = glyphiconNodeAction Upload
icon (UploadFile _ _ _ _
_)
= glyphiconNodeAction Upload
icon (UploadArbitraryFile _ _
_
) = glyphiconNodeAction Upload
icon RefreshTree = glyphiconNodeAction Refresh
icon ClosePopover = glyphiconNodeAction CloseNodePopover
icon DownloadNode = glyphiconNodeAction Download
...
...
@@ -130,8 +65,8 @@ text (ShareTeam _ ) = "Share with team !"
text (AddContact _ ) = "Add contact !"
text (SharePublic _ ) = "Publish !"
text (DoSearch _ ) = "Launch search !"
text (UploadFile _ _ _ _) = "Upload File !"
text (UploadArbitraryFile _ _) = "Upload arbitrary file !"
text (UploadFile _ _ _ _
_
) = "Upload File !"
text (UploadArbitraryFile
_
_ _) = "Upload arbitrary file !"
text RefreshTree = "Refresh Tree !"
text ClosePopover = "Close Popover !"
text DownloadNode = "Download !"
...
...
@@ -140,3 +75,4 @@ text (MergeNode _ ) = "Merge !"
text (LinkNode _ ) = "Link !"
text NoAction = "No Action"
-----------------------------------------------------------------------
src/Gargantext/Components/Forest/Tree/Node/Action/Add.purs
View file @
6abd1b31
...
...
@@ -11,7 +11,7 @@ import Data.String (Pattern(..), indexOf)
import Data.Tuple.Nested ((/\))
import Effect (Effect)
import Effect.Aff (Aff, launchAff_)
import Gargantext.Components.Forest.Tree.Node.Action (Action(..))
import Gargantext.Components.Forest.Tree.Node.Action
.Types
(Action(..))
import Gargantext.Components.Forest.Tree.Node.Settings (SettingsBox(..), settingsBox)
import Gargantext.Components.Forest.Tree.Node.Tools (formChoiceSafe, panel, submitButton)
import Gargantext.Components.InputWithEnter (inputWithEnter)
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Contact.purs
View file @
6abd1b31
...
...
@@ -10,7 +10,7 @@ import Reactix as R
import Reactix.DOM.HTML as H
import Toestand as T
import Gargantext.Components.Forest.Tree.Node.Action (Action(..))
import Gargantext.Components.Forest.Tree.Node.Action
.Types
(Action(..))
import Gargantext.Components.Forest.Tree.Node.Action.Contact.Types (AddContactParams(..))
import Gargantext.Config.REST (RESTError)
import Gargantext.Routes as GR
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Delete.purs
View file @
6abd1b31
...
...
@@ -9,7 +9,7 @@ import Effect.Aff (Aff)
import Reactix as R
import Reactix.DOM.HTML as H
import Gargantext.Components.Forest.Tree.Node.Action (Action(..))
import Gargantext.Components.Forest.Tree.Node.Action
.Types
(Action(..))
import Gargantext.Components.Forest.Tree.Node.Tools (submitButton, panel)
import Gargantext.Config.REST (RESTError)
import Gargantext.Routes (SessionRoute(..))
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Download.purs
View file @
6abd1b31
...
...
@@ -4,7 +4,7 @@ import Data.Maybe (Maybe(..))
import Reactix as R
import Reactix.DOM.HTML as H
import Gargantext.Components.Forest.Tree.Node.Action (Action(DownloadNode))
import Gargantext.Components.Forest.Tree.Node.Action
.Types
(Action(DownloadNode))
import Gargantext.Components.Forest.Tree.Node.Tools (fragmentPT, panel, submitButtonHref)
import Gargantext.Ends (url)
import Gargantext.Prelude (pure, ($))
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Link.purs
View file @
6abd1b31
...
...
@@ -7,7 +7,7 @@ import Data.Generic.Rep (class Generic)
import Data.Maybe (Maybe(..))
import Data.Show.Generic (genericShow)
import Effect.Aff (Aff)
import Gargantext.Components.Forest.Tree.Node.Action (Action(..))
import Gargantext.Components.Forest.Tree.Node.Action
.Types
(Action(..))
import Gargantext.Components.Forest.Tree.Node.Tools (submitButton, panel)
import Gargantext.Components.Forest.Tree.Node.Tools.SubTree (subTreeView, SubTreeParamsIn)
import Gargantext.Config.REST (RESTError)
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Merge.purs
View file @
6abd1b31
...
...
@@ -10,7 +10,7 @@ import Reactix as R
import Reactix.DOM.HTML as H
import Toestand as T
import Gargantext.Components.Forest.Tree.Node.Action (Action(..))
import Gargantext.Components.Forest.Tree.Node.Action
.Types
(Action(..))
import Gargantext.Components.Forest.Tree.Node.Tools (submitButton, panel, checkbox, checkboxesListGroup)
import Gargantext.Components.Forest.Tree.Node.Tools.SubTree (subTreeView, SubTreeParamsIn)
import Gargantext.Config.REST (RESTError)
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Move.purs
View file @
6abd1b31
module Gargantext.Components.Forest.Tree.Node.Action.Move where
import Gargantext.Prelude
import Data.Either (Either)
import Data.Maybe (Maybe(..))
import Effect.Aff (Aff)
import Gargantext.Components.Forest.Tree.Node.Action (Action(..))
import Gargantext.Components.Forest.Tree.Node.Action
.Types
(Action(..))
import Gargantext.Components.Forest.Tree.Node.Tools (submitButton, panel)
import Gargantext.Components.Forest.Tree.Node.Tools.SubTree (subTreeView, SubTreeParamsIn)
import Gargantext.Config.REST (RESTError)
import Gargantext.Prelude
import Gargantext.Routes (SessionRoute(..))
import Gargantext.Sessions (Session, put_)
import Gargantext.Types as GT
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Rename.purs
View file @
6abd1b31
...
...
@@ -10,7 +10,7 @@ import Simple.JSON as JSON
import Gargantext.Prelude
import Gargantext.Components.Forest.Tree.Node.Action (Action(..))
import Gargantext.Components.Forest.Tree.Node.Action
.Types
(Action(..))
import Gargantext.Config.REST (RESTError)
import Gargantext.Routes as GR
import Gargantext.Sessions (Session, put)
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Search.purs
View file @
6abd1b31
...
...
@@ -6,7 +6,7 @@ import Data.Maybe (Maybe)
import Effect (Effect)
import Effect.Aff (Aff, launchAff)
import Gargantext.Components.App.Data (Boxes)
import Gargantext.Components.Forest.Tree.Node.Action (Action(..))
import Gargantext.Components.Forest.Tree.Node.Action
.Types
(Action(..))
import Gargantext.Components.Forest.Tree.Node.Action.Add (NodePopup)
import Gargantext.Components.Forest.Tree.Node.Action.Search.SearchBar (searchBar)
import Gargantext.Components.Forest.Tree.Node.Action.Search.SearchField (defaultSearch)
...
...
@@ -38,7 +38,8 @@ actionSearchCpt = here.component "actionSearch" cpt
where
cpt { boxes: { errors }, dispatch, id, nodePopup, session } _ = do
search <- T.useBox $ defaultSearch { node_id = id }
pure $ R.fragment [ H.p { className: "action-search" }
pure $ R.fragment
[ H.p { className: "action-search" }
[ H.text $ "Search and create a private "
<> "corpus with the search query as corpus name." ]
, searchBar { errors
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Search/SearchBar.purs
View file @
6abd1b31
src/Gargantext/Components/Forest/Tree/Node/Action/Search/SearchField.purs
View file @
6abd1b31
This diff is collapsed.
Click to expand it.
src/Gargantext/Components/Forest/Tree/Node/Action/Search/Types.purs
View file @
6abd1b31
...
...
@@ -19,6 +19,7 @@ import URI.Query as Q
import Gargantext.Prelude
import Gargantext.Components.Lang (Lang)
import Gargantext.Components.ListSelection.Types as ListSelection
import Gargantext.Config.REST (RESTError)
import Gargantext.Ends (class ToUrl, backendUrl)
import Gargantext.Routes as GR
...
...
@@ -330,27 +331,13 @@ newtype SearchQuery = SearchQuery
, node_id :: Maybe Int
, offset :: Maybe Int
, order :: Maybe SearchOrder
, selection :: ListSelection.Selection
}
derive instance Generic SearchQuery _
derive instance Newtype SearchQuery _
defaultSearchQuery :: SearchQuery
defaultSearchQuery = SearchQuery
{ query: ""
, databases: Empty
, datafield: Nothing
, files_id : []
, lang : Nothing
, limit : Nothing
, node_id : Nothing
, offset : Nothing
, order : Nothing
}
instance ToUrl Session SearchQuery where
toUrl (Session {backend}) q = backendUrl backend q2
where q2 = "new" <> Q.print (GT.toQuery q)
instance GT.ToQuery SearchQuery where
toQuery (SearchQuery {offset, limit, order}) =
QP.print id id $ QP.QueryPairs
...
...
@@ -361,11 +348,26 @@ instance GT.ToQuery SearchQuery where
pair k = maybe [] $ \v ->
[ QP.keyFromString k /\ Just (QP.valueFromString $ show v) ]
instance JSON.WriteForeign SearchQuery where
writeImpl (SearchQuery { databases, lang, node_id, query }) =
writeImpl (SearchQuery { databases, lang, node_id, query
, selection
}) =
JSON.writeImpl { query: String.replace (String.Pattern "\"") (String.Replacement "\\\"") query
, databases: databases
, lang: maybe "EN" show lang
, node_id: fromMaybe 0 node_id
, flowListWith: selection
}
defaultSearchQuery :: SearchQuery
defaultSearchQuery = SearchQuery
{ query : ""
, databases : Empty
, datafield : Nothing
, files_id : []
, lang : Nothing
, limit : Nothing
, node_id : Nothing
, offset : Nothing
, order : Nothing
, selection : ListSelection.MyListsFirst
}
performSearch :: Session -> Int -> SearchQuery -> Aff (Either RESTError GT.AsyncTaskWithType)
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Share.purs
View file @
6abd1b31
...
...
@@ -13,8 +13,8 @@ import Toestand as T
import Gargantext.Prelude
import Gargantext.Components.Forest.Tree.Node.Action (Action)
import Gargantext.Components.Forest.Tree.Node.Action as Action
import Gargantext.Components.Forest.Tree.Node.Action
.Types
(Action)
import Gargantext.Components.Forest.Tree.Node.Action
.Types
as Action
import Gargantext.Components.Forest.Tree.Node.Tools as Tools
import Gargantext.Components.Forest.Tree.Node.Tools.SubTree (subTreeView, SubTreeParamsIn)
import Gargantext.Config.REST (RESTError)
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Types.purs
0 → 100644
View file @
6abd1b31
module Gargantext.Components.Forest.Tree.Node.Action.Types where
import Gargantext.Prelude
import Data.Generic.Rep (class Generic)
import Data.Maybe (Maybe)
import Gargantext.Components.Forest.Tree.Node.Action.Contact.Types (AddContactParams)
import Gargantext.Components.Forest.Tree.Node.Action.Update.Types (UpdateNodeParams)
import Gargantext.Components.Forest.Tree.Node.Action.Upload.Types (FileType, UploadFileBlob)
import Gargantext.Components.Forest.Tree.Node.Tools.SubTree.Types (SubTreeOut)
import Gargantext.Components.ListSelection.Types (Selection)
import Gargantext.Types as GT
data Action = AddNode String GT.NodeType
| DeleteNode GT.NodeType
| RenameNode String
| UpdateNode UpdateNodeParams
| DoSearch GT.AsyncTaskWithType
| UploadFile GT.NodeType FileType (Maybe String) String Selection
| UploadArbitraryFile (Maybe String) UploadFileBlob Selection
| DownloadNode
| RefreshTree
| ClosePopover
| ShareTeam String
| AddContact AddContactParams
| SharePublic {params :: Maybe SubTreeOut}
| MoveNode {params :: Maybe SubTreeOut}
| MergeNode {params :: Maybe SubTreeOut}
| LinkNode {nodeType :: Maybe GT.NodeType, params :: Maybe SubTreeOut}
| NoAction
derive instance Generic Action _
instance Eq Action where
eq (AddNode s1 nt1) (AddNode s2 nt2) = (eq s1 s2) && (eq nt1 nt2)
eq (DeleteNode nt1) (DeleteNode nt2) = eq nt1 nt2
eq (RenameNode s1) (RenameNode s2) = eq s1 s2
eq (UpdateNode un1) (UpdateNode un2) = eq un1 un2
eq (DoSearch at1) (DoSearch at2) = eq at1 at2
eq (UploadFile nt1 ft1 s1 _ _) (UploadFile nt2 ft2 s2 _ _) =
(eq nt1 nt2) && (eq ft1 ft2) && (eq s1 s2)
eq (UploadArbitraryFile s1 _ _) (UploadArbitraryFile s2 _ _) = eq s1 s2
eq DownloadNode DownloadNode = true
eq RefreshTree RefreshTree = true
eq ClosePopover ClosePopover = true
eq (ShareTeam s1) (ShareTeam s2) = eq s1 s2
eq (AddContact ac1) (AddContact ac2) = eq ac1 ac2
eq (SharePublic p1) (SharePublic p2) = eq p1 p2
eq (MoveNode p1) (MoveNode p2) = eq p1 p2
eq (MergeNode p1) (MergeNode p2) = eq p1 p2
eq (LinkNode l1) (LinkNode l2) = eq l1 l2
eq NoAction NoAction = true
eq _ _ = false
instance Show Action where
show (AddNode _ _ ) = "AddNode"
show (DeleteNode _ ) = "DeleteNode"
show (RenameNode _ ) = "RenameNode"
show (UpdateNode _ ) = "UpdateNode"
show (ShareTeam _ ) = "ShareTeam"
show (AddContact _ ) = "AddContact"
show (SharePublic _ ) = "SharePublic"
show (DoSearch _ ) = "SearchQuery"
show (UploadFile _ _ _ _ _) = "UploadFile"
show (UploadArbitraryFile _ _ _) = "UploadArbitraryFile"
show RefreshTree = "RefreshTree"
show ClosePopover = "ClosePopover"
show DownloadNode = "Download"
show (MoveNode _ ) = "MoveNode"
show (MergeNode _ ) = "MergeNode"
show (LinkNode _ ) = "LinkNode"
show NoAction = "NoAction"
src/Gargantext/Components/Forest/Tree/Node/Action/Update.purs
View file @
6abd1b31
...
...
@@ -9,7 +9,7 @@ import Toestand as T
import Gargantext.Prelude
import Gargantext.Components.Forest.Tree.Node.Action (Action(..))
import Gargantext.Components.Forest.Tree.Node.Action
.Types
(Action(..))
import Gargantext.Components.Forest.Tree.Node.Action.Update.Types
import Gargantext.Components.Forest.Tree.Node.Tools (formChoiceSafe, submitButton, panel)
import Gargantext.Config.REST (RESTError)
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Upload.purs
View file @
6abd1b31
...
...
@@ -14,13 +14,17 @@ import Data.Tuple.Nested ((/\))
import Effect (Effect)
import Effect.Aff (Aff, launchAff)
import Effect.Class (liftEffect)
import Gargantext.Components.Forest.Tree.Node.Action (Action(..), Props)
import Gargantext.Components.Forest.Tree.Node.Action (Props)
import Gargantext.Components.Forest.Tree.Node.Action.Types (Action(..))
import Gargantext.Components.Forest.Tree.Node.Action.Upload.Types (FileType(..), UploadFileBlob(..), readUFBAsText)
import Gargantext.Components.Forest.Tree.Node.Tools (fragmentPT, formChoiceSafe, panel)
import Gargantext.Components.Lang (Lang(..))
import Gargantext.Components.ListSelection as ListSelection
import Gargantext.Components.ListSelection.Types (Selection(..))
import Gargantext.Components.ListSelection.Types as ListSelection
import Gargantext.Config.REST (RESTError)
import Gargantext.Routes as GR
import Gargantext.Sessions (Session, postWwwUrlencoded)
import Gargantext.Sessions (Session
(..)
, postWwwUrlencoded)
import Gargantext.Types (NodeType(..), ID)
import Gargantext.Types as GT
import Gargantext.Utils.Reactix as R2
...
...
@@ -48,8 +52,10 @@ actionUpload :: R2.Component ActionUpload
actionUpload = R.createElement actionUploadCpt
actionUploadCpt :: R.Component ActionUpload
actionUploadCpt = here.component "actionUpload" cpt where
cpt { nodeType: Corpus, dispatch, id, session } _ = pure $ uploadFileView {dispatch, id, nodeType: GT.Corpus, session}
cpt { nodeType: NodeList, dispatch, id, session } _ = pure $ uploadTermListView {dispatch, id, nodeType: GT.NodeList, session}
cpt { nodeType: Corpus, dispatch, id, session } _ =
pure $ uploadFileView { dispatch, id, nodeType: GT.Corpus, session }
cpt { nodeType: NodeList, dispatch, id, session } _ =
pure $ uploadTermListView { dispatch, id, nodeType: GT.NodeList, session }
cpt props@{ nodeType: _ } _ = pure $ actionUploadOther props []
{-
...
...
@@ -72,8 +78,7 @@ data DroppedFile =
, lang :: Lang
}
derive instance Generic DroppedFile _
instance Eq DroppedFile where
eq = genericEq
instance Eq DroppedFile where eq = genericEq
type FileHash = String
...
...
@@ -88,11 +93,12 @@ uploadFileView props = R.createElement uploadFileViewCpt props []
uploadFileViewCpt :: R.Component Props
uploadFileViewCpt = here.component "uploadFileView" cpt
where
cpt {
dispatch, id, nodeType
} _ = do
cpt {
dispatch, id, nodeType, session
} _ = do
-- mFile :: R.State (Maybe UploadFile) <- R.useState' Nothing
mFile <- T.useBox (Nothing :: Maybe UploadFile)
fileType <- T.useBox CSV
lang <- T.useBox EN
selection <- T.useBox ListSelection.MyListsFirst
let setFileType' val = T.write_ val fileType
let setLang' val = T.write_ val lang
...
...
@@ -125,14 +131,18 @@ uploadFileViewCpt = here.component "uploadFileView" cpt
show
]
]
, R2.row
[ H.div { className: "col-6 flex-space-around" }
[ ListSelection.selection { selection, session } [] ]
]
]
let footer = H.div {} [ uploadButton { dispatch
, fileType
, lang
, id
, mFile
, nodeType
, selection
}
]
pure $ panel bodies footer
...
...
@@ -154,10 +164,10 @@ uploadFileViewCpt = here.component "uploadFileView" cpt
type UploadButtonProps =
( dispatch :: Action -> Aff Unit
, fileType :: T.Box FileType
, id :: GT.ID
, lang :: T.Box Lang
, mFile :: T.Box (Maybe UploadFile)
, nodeType :: GT.NodeType
, selection :: T.Box ListSelection.Selection
)
uploadButton :: Record UploadButtonProps -> R.Element
...
...
@@ -167,13 +177,14 @@ uploadButtonCpt = here.component "uploadButton" cpt
where
cpt { dispatch
, fileType
, id
, lang
, mFile
, nodeType
, selection
} _ = do
fileType' <- T.useLive T.unequal fileType
mFile' <- T.useLive T.unequal mFile
selection' <- T.useLive T.unequal selection
let disabled = case mFile' of
Nothing -> "1"
...
...
@@ -183,19 +194,19 @@ uploadButtonCpt = here.component "uploadButton" cpt
, "type" : "button"
, disabled
, style : { width: "100%" }
, on: {
click: onClick fileType' mFile'
}
, on: {
click: onClick fileType' mFile' selection'
}
} [ H.text "Upload" ]
where
onClick fileType' mFile' e = do
onClick fileType' mFile'
selection'
e = do
let { blob, name } = unsafePartial $ fromJust mFile'
here.log2 "[uploadButton] fileType" fileType'
void $ launchAff do
case fileType' of
Arbitrary ->
dispatch $ UploadArbitraryFile (Just name) blob
dispatch $ UploadArbitraryFile (Just name) blob
selection'
_ -> do
contents <- readUFBAsText blob
dispatch $ UploadFile nodeType fileType' (Just name) contents
dispatch $ UploadFile nodeType fileType' (Just name) contents
selection'
liftEffect $ do
T.write_ Nothing mFile
T.write_ CSV fileType
...
...
@@ -282,7 +293,7 @@ fileTypeViewCpt = here.component "fileTypeView" cpt
T.write_ Nothing droppedFile
launchAff $ do
contents <- readUFBAsText blob
dispatch $ UploadFile nodeType ft Nothing contents
dispatch $ UploadFile nodeType ft Nothing contents
(SelectedLists [])
}
} [H.text "Upload"]
Nothing ->
...
...
@@ -308,6 +319,7 @@ uploadFile :: { contents :: String
, id :: ID
, nodeType :: GT.NodeType
, mName :: Maybe String
, selection :: ListSelection.Selection
, session :: Session }
-> Aff (Either RESTError GT.AsyncTaskWithType)
{-
...
...
@@ -350,8 +362,9 @@ uploadFile { contents, fileType, id, nodeType, mName, session } = do
uploadArbitraryFile :: Session
-> ID
-> {blob :: UploadFileBlob, mName :: Maybe String}
-> ListSelection.Selection
-> Aff (Either RESTError GT.AsyncTaskWithType)
uploadArbitraryFile session id {mName, blob: UploadFileBlob blob} = do
uploadArbitraryFile session id {mName, blob: UploadFileBlob blob}
selection
= do
contents <- readAsDataURL blob
uploadArbitraryDataURL session id mName contents
...
...
@@ -468,6 +481,6 @@ uploadTermButtonCpt = here.component "uploadTermButton" cpt
let {name, blob} = unsafePartial $ fromJust mFile'
void $ launchAff do
contents <- readUFBAsText blob
_ <- dispatch $ UploadFile nodeType uploadType' (Just name) contents
_ <- dispatch $ UploadFile nodeType uploadType' (Just name) contents
(SelectedLists [])
liftEffect $ do
T.write_ Nothing mFile
src/Gargantext/Components/Forest/Tree/Node/Box.purs
View file @
6abd1b31
...
...
@@ -6,7 +6,6 @@ import Data.Array as A
import Data.Maybe (Maybe(..))
import Effect.Aff (Aff)
import Gargantext.Components.App.Data (Boxes)
import Gargantext.Components.Forest.Tree.Node.Action (Action)
import Gargantext.Components.Forest.Tree.Node.Action.Add (NodePopup(..), addNodeView)
import Gargantext.Components.Forest.Tree.Node.Action.Contact as Contact
import Gargantext.Components.Forest.Tree.Node.Action.Delete (actionDelete)
...
...
@@ -18,6 +17,7 @@ import Gargantext.Components.Forest.Tree.Node.Action.Move (moveNode)
import Gargantext.Components.Forest.Tree.Node.Action.Rename (renameAction)
import Gargantext.Components.Forest.Tree.Node.Action.Search (actionSearch)
import Gargantext.Components.Forest.Tree.Node.Action.Share as Share
import Gargantext.Components.Forest.Tree.Node.Action.Types (Action)
import Gargantext.Components.Forest.Tree.Node.Action.Update (update)
import Gargantext.Components.Forest.Tree.Node.Action.Upload (actionUpload)
import Gargantext.Components.Forest.Tree.Node.Box.Types (NodePopupProps, NodePopupS)
...
...
@@ -25,7 +25,7 @@ import Gargantext.Components.Forest.Tree.Node.Settings (NodeAction(..), Settings
import Gargantext.Components.Forest.Tree.Node.Status (Status(..), hasStatus)
import Gargantext.Components.Forest.Tree.Node.Tools (textInputBox, fragmentPT)
import Gargantext.Sessions (Session)
import Gargantext.Types (
FrontendError,
ID, Name, prettyNodeType)
import Gargantext.Types (ID, Name, prettyNodeType)
import Gargantext.Types as GT
import Gargantext.Utils.Glyphicon (glyphicon, glyphiconActive)
import Gargantext.Utils.Reactix as R2
...
...
@@ -40,7 +40,7 @@ type CommonProps =
( dispatch :: Action -> Aff Unit
, session :: Session )
nodePopupView :: R
ecord NodePopupProps -> R.Element
nodePopupView :: R
2.Leaf NodePopupProps
nodePopupView p = R.createElement nodePopupCpt p []
nodePopupCpt :: R.Component NodePopupProps
nodePopupCpt = here.component "nodePopupView" cpt where
...
...
src/Gargantext/Components/Forest/Tree/Node/Box/Types.purs
View file @
6abd1b31
...
...
@@ -5,7 +5,7 @@ import Data.Maybe (Maybe)
import Effect (Effect)
import Effect.Aff (Aff)
import Gargantext.Components.App.Data (Boxes)
import Gargantext.Components.Forest.Tree.Node.Action (Action)
import Gargantext.Components.Forest.Tree.Node.Action
.Types
(Action)
import Gargantext.Components.Forest.Tree.Node.Settings (NodeAction)
import Gargantext.Prelude (Unit)
import Gargantext.Sessions (Session)
...
...
src/Gargantext/Components/Forest/Tree/Node/Tools.purs
View file @
6abd1b31
...
...
@@ -9,7 +9,8 @@ import Data.String.CodeUnits as DSCU
import Effect (Effect)
import Effect.Aff (Aff, launchAff, launchAff_)
import Gargantext.Components.App.Data (Boxes)
import Gargantext.Components.Forest.Tree.Node.Action (Action, icon, text)
import Gargantext.Components.Forest.Tree.Node.Action (icon, text)
import Gargantext.Components.Forest.Tree.Node.Action.Types (Action)
import Gargantext.Components.InputWithEnter (inputWithEnter)
import Gargantext.Ends (Frontends, url)
import Gargantext.Prelude (class Ord, class Read, class Show, Unit, bind, const, discard, map, not, pure, read, show, when, mempty, ($), (<), (<<<), (<>), (<$>), (<*>))
...
...
@@ -201,7 +202,6 @@ type CheckboxProps =
checkbox :: R2.Leaf CheckboxProps
checkbox props = R.createElement checkboxCpt props []
checkboxCpt :: R.Component CheckboxProps
checkboxCpt = here.component "checkbox" cpt
where
...
...
src/Gargantext/Components/Forest/Tree/Node/Tools/SubTree.purs
View file @
6abd1b31
...
...
@@ -10,7 +10,8 @@ import Data.Maybe (Maybe(..))
import Data.Tuple.Nested ((/\))
import Effect.Aff (Aff)
import Gargantext.Components.App.Data (Boxes)
import Gargantext.Components.Forest.Tree.Node.Action (Props, Action, subTreeOut, setTreeOut)
import Gargantext.Components.Forest.Tree.Node.Action (Props, subTreeOut, setTreeOut)
import Gargantext.Components.Forest.Tree.Node.Action.Types (Action)
import Gargantext.Components.Forest.Tree.Node.Tools (nodeText)
import Gargantext.Components.Forest.Tree.Node.Tools.FTree (FTree, LNode(..), NTree(..))
import Gargantext.Components.Forest.Tree.Node.Tools.SubTree.Types (SubTreeParams(..), SubTreeOut(..))
...
...
src/Gargantext/Components/Forest/Tree/Node/Tools/Sync.purs
View file @
6abd1b31
module Gargantext.Components.Forest.Tree.Node.Tools.Sync where
import Gargantext.Prelude
( Unit, bind,
const,
discard, pure, unit, ($), (<>), (==) )
( Unit, bind, discard, pure, unit, ($), (<>), (==) )
import Effect.Aff (Aff, launchAff_)
import Data.Tuple.Nested ((/\))
import Data.Maybe (Maybe(..))
import Data.Tuple (fst)
import Effect.Class (liftEffect)
import Reactix.DOM.HTML as H
import Reactix as R
...
...
@@ -69,7 +67,7 @@ graphUpdateButtonCpt = here.component "graphUpdateButton" cpt
onClick true enabled = do
launchAff_ $ do
liftEffect $ T.write_ false enabled
g <- GraphAPI.updateGraphVersions { graphId: id, session }
_
g <- GraphAPI.updateGraphVersions { graphId: id, session }
liftEffect $ T.write_ true enabled
refresh unit
pure unit
...
...
@@ -105,7 +103,6 @@ type NodeListUpdateButtonProps =
nodeListUpdateButton :: Record NodeListUpdateButtonProps -> R.Element
nodeListUpdateButton p = R.createElement nodeListUpdateButtonCpt p []
nodeListUpdateButtonCpt :: R.Component NodeListUpdateButtonProps
nodeListUpdateButtonCpt = here.component "nodeListUpdateButton" cpt
where
...
...
src/Gargantext/Components/GraphExplorer/API.purs
View file @
6abd1b31
...
...
@@ -2,7 +2,7 @@ module Gargantext.Components.GraphExplorer.API where
import Gargantext.Prelude
import Data.Either (Either
(..)
)
import Data.Either (Either)
import Data.Maybe (Maybe)
import Effect.Aff (Aff)
import Gargantext.Components.GraphExplorer.Types as GET
...
...
src/Gargantext/Components/GraphExplorer/Button.purs
View file @
6abd1b31
...
...
@@ -21,7 +21,6 @@ import Gargantext.Components.Forest.Tree.Node.Action.Upload (uploadArbitraryData
import Gargantext.Components.GraphExplorer.API (cloneGraph)
import Gargantext.Components.GraphExplorer.Types as GET
import Gargantext.Components.GraphExplorer.Utils as GEU
import Gargantext.Config.REST (RESTError)
import Gargantext.Hooks.Sigmax as Sigmax
import Gargantext.Hooks.Sigmax.Sigma as Sigma
import Gargantext.Sessions (Session)
...
...
src/Gargantext/Components/ListSelection.purs
0 → 100644
View file @
6abd1b31
module Gargantext.Components.ListSelection where
import Gargantext.Prelude
import Data.Array as A
import Data.Either (Either)
import Data.Maybe (Maybe(..))
import Gargantext.Components.Forest.Tree.Node.Tools (formChoiceSafe)
import Gargantext.Components.ListSelection.Types (NodeSimple(..), Selection(..), selectedListIds)
import Gargantext.Config.REST (RESTError(..), AffRESTError)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Routes (SessionRoute(..))
import Gargantext.Sessions (Session(..), get)
import Gargantext.Types (ID, NodeType(..), fldr)
import Gargantext.Utils.Reactix as R2
import Reactix as R
import Reactix.DOM.HTML as H
import Toestand as T
here :: R2.Here
here = R2.here "Gargantext.Components.ListSelection"
type Props =
( selection :: T.Box Selection
, session :: Session
)
selection :: R2.Component Props
selection = R.createElement selectionCpt
selectionCpt :: R.Component Props
selectionCpt = here.component "selection" cpt where
cpt { selection, session } _ = do
pure $ H.div { className: "list-selection" }
[ formChoiceSafe [ MyListsFirst
, OtherListsFirst
, SelectedLists [] ] MyListsFirst setSelection show
, selectedIds { selection, session } []
]
where
setSelection val = T.write_ val selection
selectedIds :: R2.Component Props
selectedIds = R.createElement selectedIdsCpt
selectedIdsCpt :: R.Component Props
selectedIdsCpt = here.component "selectedIds" cpt where
cpt { selection, session } _ = do
selection' <- T.useLive T.unequal selection
pure $ case selection' of
SelectedLists ids -> H.div {} [ idsSelector { selection, session } [] ]
_ -> H.div {} []
type IdsSelectorProps =
( selection :: T.Box Selection
, session :: Session )
idsSelector :: R2.Component IdsSelectorProps
idsSelector = R.createElement idsSelectorCpt
idsSelectorCpt :: R.Component IdsSelectorProps
idsSelectorCpt = here.component "idsSelector" cpt where
cpt { selection, session } _ = do
pure $ H.div { className: "ids-selector" }
[ listTree { name: "", nodeType: NodeUser, root, selection, session } ] -- $ map checkbox [1, 2, 3, 4]
where
Session { treeId: root } = session
listIdsRoute :: ID -> SessionRoute
listIdsRoute = Children NodeList 0 1 Nothing <<< Just
treeFirstLevelRoute :: ID -> SessionRoute
treeFirstLevelRoute id = TreeFirstLevel (Just id) ""
loadTreeChildren :: { root :: ID, session :: Session } -> AffRESTError (Array NodeSimple)
loadTreeChildren { root, session } = do
eResult :: (Either RESTError { children :: Array NodeSimple }) <- get session $ treeFirstLevelRoute root
pure $ (\{ children } -> children) <$> eResult
type ListTreeProps =
( name :: String
, nodeType :: NodeType
, root :: ID
, selection :: T.Box Selection
, session :: Session )
listTree :: R2.Leaf ListTreeProps
listTree props = R.createElement listTreeCpt props []
listTreeCpt :: R.Component ListTreeProps
listTreeCpt = here.component "listTree" cpt where
cpt { name, nodeType, root, selection, session } _ = do
pure $ H.div { className: "tree" }
[ H.div { className: "root" }
[ H.i { className: fldr nodeType true } []
, H.text $ "[" <> show root <> "] " <> name ]
, listTreeChildren { render: listTree
, root
, selection
, session } []
]
type Render = Record ListTreeProps -> R.Element
type ListTreeChildrenProps =
( render :: Render
, root :: ID
, selection :: T.Box Selection
, session :: Session )
listTreeChildren :: R2.Component ListTreeChildrenProps
listTreeChildren = R.createElement listTreeChildrenCpt
listTreeChildrenCpt :: R.Component ListTreeChildrenProps
listTreeChildrenCpt = here.component "listTreeChildren" cpt where
cpt { render, root, selection, session } _ = do
useLoader { errorHandler
, loader: loadTreeChildren
, path: { root, session }
, render: \loaded ->
listTreeChildrenLoaded { loaded
, render
, root
, selection
, session } [] }
where
errorHandler err = case err of
ReadJSONError err' -> here.log2 "[listTreeChildren] ReadJSONError" $ show err'
_ -> here.log2 "[listTreeChildren] RESTError" err
type ListTreeChildrenLoadedProps =
( loaded :: Array NodeSimple
, render :: Render
, root :: ID
, selection :: T.Box Selection
, session :: Session )
listTreeChildrenLoaded :: R2.Component ListTreeChildrenLoadedProps
listTreeChildrenLoaded = R.createElement listTreeChildrenLoadedCpt
listTreeChildrenLoadedCpt :: R.Component ListTreeChildrenLoadedProps
listTreeChildrenLoadedCpt = here.component "listTreeChildrenLoaded" cpt where
cpt { loaded, render, root, selection, session } _ = do
pure $ H.div { className: "children" } (element <$> loaded)
where
element (NodeSimple { id, name, nodeType: nodeType@Folder }) =
render { root: id, name, nodeType, selection, session }
element (NodeSimple { id, name, nodeType: nodeType@FolderPrivate }) =
render { root: id, name, nodeType, selection, session }
element (NodeSimple { id, name, nodeType: nodeType@FolderPublic }) =
render { root: id, name, nodeType, selection, session }
element (NodeSimple { id, name, nodeType: nodeType@FolderShared }) =
render { root: id, name, nodeType, selection, session }
element (NodeSimple { id, name, nodeType: nodeType@Corpus }) =
render { root: id, name, nodeType, selection, session }
element (NodeSimple { id, name, nodeType: NodeList}) =
renderListElement { id, name, selection }
element _ = H.div {} []
type RenderListElementProps =
( id :: ID
, name :: String
, selection :: T.Box Selection )
renderListElement :: R2.Leaf RenderListElementProps
renderListElement props = R.createElement renderListElementCpt props []
renderListElementCpt :: R.Component RenderListElementProps
renderListElementCpt = here.component "renderListElement" cpt where
cpt { id, name, selection } _ = do
selection' <- T.useLive T.unequal selection
let ids = selectedListIds selection'
pure $ H.div { className: "leaf" }
[ H.input { defaultChecked: A.elem id ids
, on: { click: click ids }
, type: "checkbox" }
, H.i { className: fldr NodeList true } []
, H.text $ "[" <> show id <> "] " <> name
]
where
click ids _ = do
let f (SelectedLists lst) =
if A.elem id ids
then SelectedLists (A.delete id lst)
else SelectedLists (A.cons id lst)
f x = x
T.modify_ f selection
src/Gargantext/Components/ListSelection/Types.purs
0 → 100644
View file @
6abd1b31
module Gargantext.Components.ListSelection.Types where
import Gargantext.Prelude
import Data.Eq.Generic (genericEq)
import Data.Generic.Rep (class Generic)
import Data.Maybe (Maybe(..))
import Data.Newtype (class Newtype)
import Gargantext.Types (ID, ListId, NodeType)
import Simple.JSON as JSON
data Selection = MyListsFirst | OtherListsFirst | SelectedLists (Array ListId)
derive instance Generic Selection _
instance Show Selection where
show MyListsFirst = "My lists first"
show OtherListsFirst = "Other lists first"
show (SelectedLists _) = "Selected lists"
instance Eq Selection where eq = genericEq
instance Read Selection where
read "My lists first" = Just MyListsFirst
read "Other lists first" = Just OtherListsFirst
read "Selected lists" = Just $ SelectedLists []
read _ = Nothing
instance JSON.WriteForeign Selection where
writeImpl MyListsFirst = JSON.writeImpl { "type": "MyListsFirst" }
writeImpl OtherListsFirst = JSON.writeImpl { "type": "OtherListsFirst" }
writeImpl (SelectedLists ids) = JSON.writeImpl { "type": "SelectedLists", value: ids }
selectedListIds :: Selection -> Array ListId
selectedListIds (SelectedLists ids) = ids
selectedListIds _ = []
----------------------
-- TODO Make a separate endpoint on the backend for fetching the whole
-- tree with NodeSimple results?
-- A simplified data structure (we don't want the full-blown (NodePoly
-- a), we care only about Corpus and NodeList node types, with id,
-- name and that's all).
newtype NodeSimple =
NodeSimple { id :: ID
, name :: String
, nodeType :: NodeType }
derive instance Generic NodeSimple _
derive instance Newtype NodeSimple _
derive instance Eq NodeSimple
instance JSON.ReadForeign NodeSimple where
readImpl f = do
{ node } :: { node :: { id :: ID
, name :: String
, type :: NodeType } } <- JSON.read' f
pure $ NodeSimple { id: node.id
, name: node.name
, nodeType: node.type }
src/Gargantext/Components/NgramsTable.purs
View file @
6abd1b31
...
...
@@ -35,7 +35,7 @@ import Gargantext.Components.Nodes.Lists.Types as NT
import Gargantext.Components.Table as TT
import Gargantext.Components.Table.Types as TT
import Gargantext.Config.REST (RESTError)
import Gargantext.Hooks.Loader (useLoader
, useLoader
Box)
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)
...
...
@@ -379,14 +379,14 @@ loadedNgramsTableBodyCpt = here.component "loadedNgramsTableBody" cpt where
, performAction: performAction <<< CoreAction }
-- autoUpdate :: Array R.Element
autoUpdate path' = if withAutoUpdate then
[ R2.buff
$ autoUpdateElt
{ duration: 5000
, effect: performAction $ CoreAction $ Synchronize { afterSync: afterSync' }
}
]
else []
--
autoUpdate path' = if withAutoUpdate then
--
[ R2.buff
--
$ autoUpdateElt
--
{ duration: 5000
--
, effect: performAction $ CoreAction $ Synchronize { afterSync: afterSync' }
--
}
--
]
--
else []
ngramsParentRoot :: Maybe NgramsTerm
ngramsParentRoot =
...
...
@@ -595,7 +595,7 @@ mainNgramsTableCacheOnCpt = here.component "mainNgramsTableCacheOn" cpt where
handleResponse v = v
mainNgramsTableCacheOff :: R2.Component MainNgramsTableProps
mainNgramsTableCacheOff = R.createElement mainNgramsTableCacheO
n
Cpt
mainNgramsTableCacheOff = R.createElement mainNgramsTableCacheO
ff
Cpt
mainNgramsTableCacheOffCpt :: R.Component MainNgramsTableProps
mainNgramsTableCacheOffCpt = here.component "mainNgramsTableCacheOff" cpt where
cpt { afterSync
...
...
src/Gargantext/Components/NgramsTable/Components.purs
View file @
6abd1b31
...
...
@@ -11,11 +11,10 @@ import Data.Set (Set)
import Data.Set as Set
import Effect (Effect)
import FFI.Simple (delay)
import Gargantext.Components.Forest.Tree.Node.Action.Search.SearchField (searchQuery)
import Gargantext.Components.NgramsTable.Core (Action(..), Dispatch, NgramsElement, NgramsTable, NgramsTablePatch, NgramsTerm, _NgramsElement, _NgramsRepoElement, _PatchMap, _children, _list, _ngrams, _occurrences, ngramsTermText, replace, setTermListA)
import Gargantext.Components.Table as Tbl
import Gargantext.Prelude (Unit, bind, const, discard, map, not, otherwise, pure, show, unit, ($), (+), (/=), (<<<), (<>), (==), (>), (||))
import Gargantext.Types as T
import Gargantext.Types as
G
T
import Gargantext.Utils.Reactix as R2
import React.DOM (a, span, text)
import React.DOM.Props as DOM
...
...
@@ -241,8 +240,8 @@ renderNgramsItemCpt = here.component "renderNgramsItem" cpt
, on: { click: onClick } } []
]
, selected
, checkbox T.MapTerm
, checkbox T.StopTerm
, checkbox
G
T.MapTerm
, checkbox
G
T.StopTerm
, H.div {} ( if ngramsParent == Nothing
then [renderNgramsTree { ngramsTable, ngrams, ngramsStyle, ngramsClick, ngramsEdit }]
else [H.a { on: { click: const $ dispatch $ ToggleChild true ngrams } }
...
...
@@ -283,7 +282,7 @@ renderNgramsItemCpt = here.component "renderNgramsItem" cpt
}
checkbox termList' =
let chkd = termList == termList'
termList'' = if chkd then T.CandidateTerm else termList'
termList'' = if chkd then
G
T.CandidateTerm else termList'
in
H.input { checked: chkd
, className: "checkbox"
...
...
@@ -300,18 +299,18 @@ renderNgramsItemCpt = here.component "renderNgramsItem" cpt
cycleTermListItem n = setTermListA n (replace termList (nextTermList termList))
termStyle :: T.TermList -> Number -> DOM.Props
termStyle T.MapTerm opacity = DOM.style { color: "green", opacity }
termStyle T.StopTerm opacity = DOM.style { color: "red", opacity
termStyle ::
G
T.TermList -> Number -> DOM.Props
termStyle
G
T.MapTerm opacity = DOM.style { color: "green", opacity }
termStyle
G
T.StopTerm opacity = DOM.style { color: "red", opacity
, textDecoration: "line-through" }
termStyle T.CandidateTerm opacity = DOM.style { color: "#767676", opacity }
termStyle
G
T.CandidateTerm opacity = DOM.style { color: "#767676", opacity }
tablePatchHasNgrams :: NgramsTablePatch -> NgramsTerm -> Boolean
tablePatchHasNgrams ngramsTablePatch ngrams =
isJust $ ngramsTablePatch.ngramsPatches ^. _PatchMap <<< at ngrams
nextTermList ::
T.TermList ->
T.TermList
nextTermList
T.MapTerm =
T.StopTerm
nextTermList
T.StopTerm =
T.CandidateTerm
nextTermList
T.CandidateTerm =
T.MapTerm
nextTermList ::
GT.TermList -> G
T.TermList
nextTermList
GT.MapTerm = G
T.StopTerm
nextTermList
GT.StopTerm = G
T.CandidateTerm
nextTermList
GT.CandidateTerm = G
T.MapTerm
src/Gargantext/Components/NgramsTable/Core.purs
View file @
6abd1b31
...
...
@@ -121,7 +121,7 @@ import Data.TraversableWithIndex (traverseWithIndex)
import Data.Tuple (Tuple(..))
import Data.Tuple.Nested ((/\))
import Effect (Effect)
import Effect.Aff (Aff,
error,
launchAff_)
import Effect.Aff (Aff, launchAff_)
import Effect.Class (liftEffect)
import Effect.Exception.Unsafe (unsafeThrow)
import FFI.Simple.Functions (delay)
...
...
src/Gargantext/Components/Node.purs
View file @
6abd1b31
...
...
@@ -38,4 +38,5 @@ instance JSON.ReadForeign a => JSON.ReadForeign (NodePoly a) where
newtype HyperdataList = HyperdataList { preferences :: Maybe String }
derive instance Generic HyperdataList _
derive instance Newtype HyperdataList _
derive instance Eq HyperdataList
derive newtype instance JSON.ReadForeign HyperdataList
src/Gargantext/Components/Nodes/Annuaire/User/Contacts/Tabs.purs
View file @
6abd1b31
...
...
@@ -7,7 +7,6 @@ import Data.Generic.Rep (class Generic)
import Data.Maybe (Maybe(..))
import Data.Show.Generic (genericShow)
import Data.Tuple.Nested ((/\))
import Gargantext.AsyncTasks as GAT
import Gargantext.Components.App.Data (Boxes)
import Gargantext.Components.DocsTable as DT
import Gargantext.Components.DocsTable.Types (Year)
...
...
@@ -19,9 +18,8 @@ import Gargantext.Components.Nodes.Texts.Types as TTypes
import Gargantext.Components.Tab as Tab
import Gargantext.Ends (Frontends)
import Gargantext.Sessions (Session)
import Gargantext.Types (CTabNgramType(..),
FrontendError, PTabNgramType(..), SidePanelState
, TabSubType(..), TabType(..))
import Gargantext.Types (CTabNgramType(..),
PTabNgramType(..)
, TabSubType(..), TabType(..))
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Toestand as T2
import Reactix as R
import Toestand as T
...
...
src/Gargantext/Components/Nodes/Corpus.purs
View file @
6abd1b31
...
...
@@ -24,7 +24,7 @@ import Gargantext.Prelude (class Eq, class Show, Unit, bind, discard, pure, show
import Gargantext.Routes (SessionRoute(Children, NodeAPI))
import Gargantext.Routes as GR
import Gargantext.Sessions (Session, get, put, sessionId)
import Gargantext.Types (AffETableResult, NodeType(..))
import Gargantext.Types (AffETableResult, NodeType(..)
, ID
)
import Gargantext.Utils.Crypto as Crypto
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Toestand as T2
...
...
@@ -38,7 +38,7 @@ here = R2.here "Gargantext.Components.Nodes.Corpus"
type Props =
( boxes :: Boxes
, nodeId :: I
nt
, nodeId :: I
D
, session :: Session )
corpusLayout :: R2.Leaf Props
...
...
@@ -53,7 +53,7 @@ corpusLayoutCpt = here.component "corpusLayout" cpt where
type KeyProps =
( boxes :: Boxes
, key :: String
, nodeId :: I
nt
, nodeId :: I
D
, session :: Session
)
...
...
@@ -88,10 +88,10 @@ corpusLayoutMainCpt = here.component "corpusLayoutMain" cpt
H.hr {}
,
FV.folderView
{ nodeId
, session
, backFolder: true
{ backFolder: true
, boxes
, nodeId
, session
}
]
...
...
src/Gargantext/Components/Nodes/Corpus/Dashboard.purs
View file @
6abd1b31
...
...
@@ -15,7 +15,7 @@ import Gargantext.Components.Nodes.Types (FTFieldList(..), FTFieldsWithIndex(..)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Prelude (Unit, bind, discard, pure, read, show, unit, ($), (<$>), (<>), (==))
import Gargantext.Sessions (Session, sessionId)
import Gargantext.Types (
FrontendError,
NodeID)
import Gargantext.Types (NodeID)
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Toestand as T2
import Reactix as R
...
...
src/Gargantext/Components/Nodes/Corpus/Document.purs
View file @
6abd1b31
module Gargantext.Components.Nodes.Corpus.Document where
--import Data.Argonaut (encodeJson) -- DEBUG
--import Data.Argonaut.Core (stringifyWithIndent) -- DEBUG
import Data.Either (Either(..))
import Data.Maybe (Maybe(..), fromMaybe)
import Data.Tuple (fst)
import Data.Tuple.Nested ((/\))
import Effect.Aff (Aff)
import Reactix as R
import Reactix.DOM.HTML as H
...
...
@@ -34,10 +30,10 @@ here :: R2.Here
here = R2.here "Gargantext.Components.Nodes.Corpus.Document"
publicationDate :: Document -> String
publicationDate (Document
doc@
{publication_year: Nothing}) = ""
publicationDate (Document
doc@
{publication_year: Just py, publication_month: Nothing}) = U.zeroPad 2 py
publicationDate (Document
doc@
{publication_year: Just py, publication_month: Just pm, publication_day: Nothing}) = (U.zeroPad 2 py) <> "-" <> (U.zeroPad 2 pm)
publicationDate (Document
doc@
{publication_year: Just py, publication_month: Just pm, publication_day: Just pd}) = (U.zeroPad 2 py) <> "-" <> (U.zeroPad 2 pm) <> "-" <> (U.zeroPad 2 pd)
publicationDate (Document {publication_year: Nothing}) = ""
publicationDate (Document {publication_year: Just py, publication_month: Nothing}) = U.zeroPad 2 py
publicationDate (Document {publication_year: Just py, publication_month: Just pm, publication_day: Nothing}) = (U.zeroPad 2 py) <> "-" <> (U.zeroPad 2 pm)
publicationDate (Document {publication_year: Just py, publication_month: Just pm, publication_day: Just pd}) = (U.zeroPad 2 py) <> "-" <> (U.zeroPad 2 pm) <> "-" <> (U.zeroPad 2 pd)
docViewWrapper :: R2.Component Props
docViewWrapper = R.createElement docViewWrapperCpt
...
...
@@ -60,10 +56,10 @@ docViewCpt :: R.Component DocViewProps
docViewCpt = here.component "docView" cpt
where
cpt { path
, loaded:
loaded@
{ ngramsTable: Versioned { data: initTable }, document }
, loaded: { ngramsTable: Versioned { data: initTable }, document }
, state
} _children = do
state'@{ ngramsLocalPatch
, ngramsVersion: version
} <- T.useLive T.unequal state
state'@{ ngramsLocalPatch } <- T.useLive T.unequal state
let
afterSync = \_ -> pure unit
...
...
src/Gargantext/Components/Nodes/Home.purs
View file @
6abd1b31
...
...
@@ -183,7 +183,10 @@ tutorialCpt = here.component "tutorial" cpt where
sessionToFolder session@(Session {treeId, username, backend: (Backend {name})}) =
H.span { className: "folder" } [
H.div { className: "d-flex justify-content-center" } [ H.text (username <> "@" <> name) ]
, H.div {} [ FV.folderView { backFolder: false, boxes, nodeId: treeId, session } ] ]
, H.div {} [ FV.folderView { backFolder: false
, boxes
, nodeId: treeId
, session } ] ]
startTutos :: Array Tuto
startTutos =
...
...
src/Gargantext/Components/Nodes/Lists/Tabs.purs
View file @
6abd1b31
...
...
@@ -6,7 +6,6 @@ import Data.Array as A
import Data.Maybe (Maybe(..), fromMaybe)
import Data.Tuple.Nested ((/\))
import Effect.Class (liftEffect)
import Gargantext.AsyncTasks as GAT
import Gargantext.Components.App.Data (Boxes)
import Gargantext.Components.NgramsTable as NT
import Gargantext.Components.NgramsTable.Core as NTC
...
...
@@ -18,7 +17,7 @@ import Gargantext.Components.Nodes.Corpus.Types (CorpusData)
import Gargantext.Components.Tab as Tab
import Gargantext.Prelude (bind, pure, unit, ($), (<>))
import Gargantext.Sessions (Session)
import Gargantext.Types (CTabNgramType(..),
FrontendError,
Mode(..), TabSubType(..), TabType(..), modeTabType)
import Gargantext.Types (CTabNgramType(..), Mode(..), TabSubType(..), TabType(..), modeTabType)
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Toestand as T2
import Reactix as R
...
...
src/Gargantext/Components/Tile.purs
View file @
6abd1b31
...
...
@@ -9,9 +9,13 @@ import Data.Maybe (Maybe(..))
import Effect (Effect)
import Gargantext.Components.App.Data (Boxes)
import Gargantext.Routes (Tile)
import Gargantext.Utils.Reactix as R2
import Reactix as R
import Reactix.DOM.HTML as H
here :: R2.Here
here = R2.here "Gargantext.Components.Tile"
type Props =
( boxes :: Boxes
, tile :: Record Tile
...
...
@@ -19,11 +23,10 @@ type Props =
, closeCallback :: Unit -> Effect Unit
)
tileBlock :: R
ecord Props -> Array R.Element -> R.Element
tileBlock :: R
2.Component Props
tileBlock = R.createElement tileBlockCpt
tileBlockCpt :: R.Component Props
tileBlockCpt =
R.hooksC
omponent "tileBlock" cpt where
tileBlockCpt =
here.c
omponent "tileBlock" cpt where
cpt props@{ closeCallback } children = do
-- Render
...
...
src/Gargantext/Components/TileMenu.purs
View file @
6abd1b31
...
...
@@ -13,10 +13,14 @@ import Gargantext.Components.App.Data (Boxes)
import Gargantext.Hooks.LinkHandler (useLinkHandler)
import Gargantext.Routes (AppRoute, Tile)
import Gargantext.Utils.Popover as Popover
import Gargantext.Utils.Reactix as R2
import Reactix as R
import Reactix.DOM.HTML as H
import Toestand as T
here :: R2.Here
here = R2.here "Gargantext.Components.TileMenu"
type Props =
( boxes :: Boxes
, currentTile :: Maybe (Unit -> Effect AppRoute)
...
...
@@ -24,11 +28,10 @@ type Props =
, yTile :: Maybe (Unit -> Effect AppRoute)
)
tileMenu :: R
ecord Props -> Array (R.Element) -> R.Element
tileMenu :: R
2.Component Props
tileMenu = R.createElement tileMenuCpt
tileMenuCpt :: R.Component Props
tileMenuCpt =
R.hooksC
omponent "tileMenu" cpt where
tileMenuCpt =
here.c
omponent "tileMenu" cpt where
cpt props@{ boxes } children = do
-- Hooks
{ goToRoute } <- useLinkHandler
...
...
src/Gargantext/Config/REST.purs
View file @
6abd1b31
...
...
@@ -29,7 +29,6 @@ data RESTError =
SendResponseError Affjax.Error
| ReadJSONError Foreign.MultipleErrors
| CustomError String
derive instance Generic RESTError _
instance Show RESTError where
show (SendResponseError e) = "SendResponseError " <> showError e
...
...
@@ -45,6 +44,8 @@ instance Eq RESTError where
-- this is crude but we need it only because of useLoader
eq _ _ = false
type AffRESTError a = Aff (Either RESTError a)
readJSON :: forall a b. JSON.ReadForeign a =>
Either Affjax.Error
...
...
src/sass/_tree.sass
View file @
6abd1b31
...
...
@@ -429,3 +429,13 @@ li
&
:last-child
margin-bottom
:
$forest-layout-bottom-teaser-height
/////////////////////////////////////////
.ids-selector
.tree
.children
padding-left
:
0
.5em
.leaf
input
margin
:
0
.1em
yarn.lock
View file @
6abd1b31
...
...
@@ -1609,16 +1609,11 @@ bootstrap-dark@^1.0.3:
dependencies:
bootstrap ">=4.3"
bootstrap@>=4.3:
bootstrap@>=4.3
, bootstrap@^5.1.0
:
version "5.1.0"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.1.0.tgz#543ef8f44f4b9af67b0230f19508542fec38ef55"
integrity sha512-bs74WNI9BgBo3cEovmdMHikSKoXnDgA6VQjJ7TyTotU6L7d41ZyCEEelPwkYEzsG/Zjv3ie9IE3EMAje0W9Xew==
bootstrap@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.6.0.tgz#97b9f29ac98f98dfa43bf7468262d84392552fd7"
integrity sha512-Io55IuQY3kydzHtbGvQya3H+KorS/M9rSNyfCGCg9WZ4pyT/lCxIlpJgG1GXW/PswzC84Tr2fBYi+7+jFVQQBw==
boxen@1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b"
...
...
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