Commit d78a74d3 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

Merge branch 'dev' into 228-doc-annotation-multiterms

parents 13d223f4 801e3852
......@@ -30,3 +30,5 @@ bundle.js
# docker
/.bash_history
/.lesshst
/dist/js/**/*.map
/dist/styles/**/*.map
......@@ -4,9 +4,9 @@
<meta charset="utf-8"/>
<title>CNRS GarganText</title>
<link rel="stylesheet" href="icons/forkawesome.css">
<link href="styles/login.min.css" rel="stylesheet">
<link href="styles/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="styles/highlightjs-solarized-light.css"/>
<!-- <link href="styles/bootstrap.min.css" rel="stylesheet"> -->
<link id="bootstrap-css" href="styles/bootstrap-default.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="styles/highlightjs-solarized-light.css" />
<link href="styles/sass.css" rel="stylesheet" type="text/css" />
<style> * {margin: 0; padding: 0; list-style: none;} </style>
</head>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
body {
background-color: #303030;
color: #fff;
}
a {
color: #007bff;
}
.bg-dark {
background-color: #212121 !important;
}
.text-dark {
color: #fff !important;
}
.text-muted {
color: #9e9e9e !important;
}
.dropdown-menu {
background-color: #343a40;
color: #fff;
}
.dropdown-item {
color: inherit;
}
.dropdown-item:hover, .dropdown-item.active {
color: inherit;
background-color: #4b545c;
}
.breadcrumb {
background-color: #343a40;
}
.breadcrumb-item.active {
color: #fff;
}
.nav-tabs {
border-bottom-color: #454d55;
}
.nav-tabs .nav-link {
color: #fff;
background-color: #343a40;
}
.nav-tabs .nav-link:hover, .nav-tabs .nav-link.active {
color: inherit;
background-color: #43494E;
border-color: #454d55;
}
.card {
background-color: #424242;
}
.card.bg-light {
color: #383d41;
}
.modal-content {
background-color: #424242;
}
.close {
color: #fff;
}
.close:hover {
color: #fff;
}
.jumbotron {
background-color: #212121;
}
.form-control,
.form-control:active,
.form-control:focus {
border-color: #454d55;
background-color: #343a40;
color: #fff;
/*Change text in autofill textbox */
}
.form-control:-webkit-autofill,
.form-control:active:-webkit-autofill,
.form-control:focus:-webkit-autofill {
-webkit-box-shadow: 0 0 0 50px #343a40 inset;
/* Change the color to your own background color */
-webkit-text-fill-color: #fff;
}
.form-control::-webkit-input-placeholder,
.form-control:active::-webkit-input-placeholder,
.form-control:focus::-webkit-input-placeholder {
color: #888;
}
.form-control:-ms-input-placeholder,
.form-control:active:-ms-input-placeholder,
.form-control:focus:-ms-input-placeholder {
color: #888;
}
.form-control::-ms-input-placeholder,
.form-control:active::-ms-input-placeholder,
.form-control:focus::-ms-input-placeholder {
color: #888;
}
.form-control::placeholder,
.form-control:active::placeholder,
.form-control:focus::placeholder {
color: #888;
}
.custom-select {
border-color: #454d55;
background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23fff' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right 0.75rem center/8px 10px;
background-color: #343a40;
color: #fff;
}
.custom-control-label::before {
background-color: #343a40;
}
.input-group-text {
border-color: #454d55;
background-color: #4b545c;
color: #fff;
}
.list-group-item {
background-color: #343a40;
}
.list-group-item-action {
color: inherit;
}
.list-group-item-action:not(.active):hover {
color: inherit;
background-color: #43494E;
}
.list-group-item-action.disabled {
background-color: #343a40;
}
.page-link {
background-color: #343a40;
border-color: #454d55;
}
.page-link:hover {
border-color: #454d55;
background-color: #43494E;
}
.page-item.disabled .page-link {
background-color: #343a40;
border-color: #454d55;
}
.progress {
background-color: #343a40;
}
/*# sourceMappingURL=bootstrap-dark.css.map */
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*!
* Bootstrap Reboot v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
font-family: sans-serif;
line-height: 1.15;
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
display: block;
}
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #212529;
text-align: left;
background-color: #fff;
}
[tabindex="-1"]:focus:not(:focus-visible) {
outline: 0 !important;
}
hr {
box-sizing: content-box;
height: 0;
overflow: visible;
}
h1, h2, h3, h4, h5, h6 {
margin-top: 0;
margin-bottom: 0.5rem;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
abbr[title],
abbr[data-original-title] {
text-decoration: underline;
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
cursor: help;
border-bottom: 0;
-webkit-text-decoration-skip-ink: none;
text-decoration-skip-ink: none;
}
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
ol,
ul,
dl {
margin-top: 0;
margin-bottom: 1rem;
}
ol ol,
ul ul,
ol ul,
ul ol {
margin-bottom: 0;
}
dt {
font-weight: 700;
}
dd {
margin-bottom: .5rem;
margin-left: 0;
}
blockquote {
margin: 0 0 1rem;
}
b,
strong {
font-weight: bolder;
}
small {
font-size: 80%;
}
sub,
sup {
position: relative;
font-size: 75%;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -.25em;
}
sup {
top: -.5em;
}
a {
color: #007bff;
text-decoration: none;
background-color: transparent;
}
a:hover {
color: #0056b3;
text-decoration: underline;
}
a:not([href]) {
color: inherit;
text-decoration: none;
}
a:not([href]):hover {
color: inherit;
text-decoration: none;
}
pre,
code,
kbd,
samp {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 1em;
}
pre {
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
}
figure {
margin: 0 0 1rem;
}
img {
vertical-align: middle;
border-style: none;
}
svg {
overflow: hidden;
vertical-align: middle;
}
table {
border-collapse: collapse;
}
caption {
padding-top: 0.75rem;
padding-bottom: 0.75rem;
color: #6c757d;
text-align: left;
caption-side: bottom;
}
th {
text-align: inherit;
}
label {
display: inline-block;
margin-bottom: 0.5rem;
}
button {
border-radius: 0;
}
button:focus {
outline: 1px dotted;
outline: 5px auto -webkit-focus-ring-color;
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
button,
input {
overflow: visible;
}
button,
select {
text-transform: none;
}
select {
word-wrap: normal;
}
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
button:not(:disabled),
[type="button"]:not(:disabled),
[type="reset"]:not(:disabled),
[type="submit"]:not(:disabled) {
cursor: pointer;
}
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
padding: 0;
border-style: none;
}
input[type="radio"],
input[type="checkbox"] {
box-sizing: border-box;
padding: 0;
}
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
-webkit-appearance: listbox;
}
textarea {
overflow: auto;
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
display: block;
width: 100%;
max-width: 100%;
padding: 0;
margin-bottom: .5rem;
font-size: 1.5rem;
line-height: inherit;
color: inherit;
white-space: normal;
}
progress {
vertical-align: baseline;
}
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
[type="search"] {
outline-offset: -2px;
-webkit-appearance: none;
}
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
}
output {
display: inline-block;
}
summary {
display: list-item;
cursor: pointer;
}
template {
display: none;
}
[hidden] {
display: none !important;
}
/*# sourceMappingURL=bootstrap-reboot.css.map */
\ No newline at end of file
/*!
* Bootstrap Reboot v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]){color:inherit;text-decoration:none}a:not([href]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{"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"],"names":[],"mappings":"AAAA;AAEA;EACI;EACA;EACA;EACA;;;AAEJ;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;;;ACjBA;EACE;EACA;;AAEA;EACE;EACA;EACA;;AACA;EACE;EACA;;AAEN;EACE;EACA;EACA;EACA;EACA;;AACA;EACE;;AAEJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEF;EAtCA;EACA;EAEA;EAqCE;EACA;;AACF;EACE;;AACF;EACE;;AAEF;EACE;;AAEF;EAlDA;EACA;EAEA;EAiDE;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAEF;EACE;EACA;;AAGA;EACE;EACA;;AACN;EACE;;AACF;EACE;;AAEF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;ACrFJ;EACE;;;AAEF;EACE;EACA;EACA;;;AAEF;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;;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;;;AAEJ;EACI;EACA;;;AAGF;EACE;;;AAEJ;EACE;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;;;AC1KF;EACE;;;AAGA;EACE;EACA;;AACA;EACE;;AACF;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;;AAER;EACE;;AAEE;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;EACA;;;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;;;AC/HR;EACE;;AAEA;EACE;;AACA;EACE;;AACJ;EACE;EACA;;;AAGF;EACE;EACA;EACA;;AACF;EACE;EACA;;AACA;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;EArDR;EACA;EACA;EACA;EACA;EACA;EACA;EAlBA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AA2DM;EACE;EACA;EACA;EACA;EACA;EA7DR;EACA;EACA;EACA;EACA;EACA;EACA;EAlBA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAmEE;EACE;EACA;EACA;EACA;EACA;EACA;;AACF;EACE;EACA;EACA;;AACA;EACE;EACA;;AACF;EACE;EACA;;AACF;EACE;EACA;;AAGE;EACE;;AAEF;EACE;;;ACtGV;EACE;;AACF;EACE;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;;AAGE;EACE;EACA;;AAEF;EACE;EACA;;;AAEV;EACE;;AACA;EACE;EACA;EACA;;;AAKE;EACE;EACA;;AACF;EACE;;AACA;EACE;EACA;;AACJ;EACE;;AACA;EACE;;AACJ;EACE;;;AAER;EACE;;;AChDF;EACE;AACA;EACA;;AAEA;EACE;;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;;;AC1BR;EACE;;AAEA;EACE;EANA;;AASF;EACE;EAbA;;AAgBF;EACE;EAjBA;;AAoBF;EACE;EArBA;;AAwBF;EACE;EACA,kBA/ByB;;AAiC3B;EACE;EACA,kBAlCqB;;AAoCvB;EACE;EACA,kBArCoB;;;AAwCtB;EACE;EACA,kBA5CyB;;AA8C3B;EACE;EACA,kBA/CqB;;AAiDvB;EACE;EACA,kBAlDoB","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"],"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;EACA;EACA;EACA;EAEA;EACA;EACA;;AAEA;EACE;;AAEJ;EACE;;AAEA;EACE;;AAEJ;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;ACrFJ;EACE;;;AAOF;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;;;ACvKF;EACE;;;AAGA;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAEF;EACE;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;;AAER;EACE;;AAEE;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;;;AC3IA;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;;;ACrFV;EACE;;AACF;EACE;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;;;AAGF;EACE;;;AAEJ;EACE;EACA;;;AChFF;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,kBALyB;;AAiC3B;EA7BE;EACA,kBAPqB;;AAsCvB;EAhCE;EACA,kBAJoB;;;AAuCtB;EApCE;EACA,kBALyB;;AA2C3B;EAvCE;EACA,kBAPqB;;AAgDvB;EA1CE;EACA,kBAJoB","file":"sass.css"}
\ No newline at end of file
......@@ -3,16 +3,16 @@
<head>
<meta charset="utf-8"/>
<title>CNRS GarganText</title>
<link rel="stylesheet" href="dist/icons/forkawesome.css">
<link href="dist/styles/login.min.css" rel="stylesheet">
<link href="dist/styles/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="dist/styles/highlightjs-solarized-light.css"/>
<link href="dist/styles/sass.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="icons/forkawesome.css">
<!-- <link href="styles/bootstrap.min.css" rel="stylesheet"> -->
<link id="bootstrap-css" href="styles/bootstrap-default.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="styles/highlightjs-solarized-light.css" />
<link href="styles/sass.css" rel="stylesheet" type="text/css" />
<style> * {margin: 0; padding: 0; list-style: none;} </style>
</head>
<body>
<div id="app" class ="container-fluid"></div>
<div id="portal"></div>
<script src="app.js"></script>
<script src="bundle.js"></script>
</body>
</html>
......@@ -6,7 +6,7 @@ import
owner = "justinwoo";
repo = "easy-purescript-nix";
rev = "7ebddd8613cf6736dbecef9fce4c32f2a104ef82";
sha256 = "0lmkppidmhnayv0919990ifdd61f9d23dzjzr8amz7hjgc74yxs0";
sha256 = "1g1hlybld298kimd1varvwiflpb0k7sdqlmcqha3kswjvy5z4k6k";
}
) {
inherit pkgs;
......
import (
builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/20.03.tar.gz";
sha256 = "07n91k3d9i9pym8npsszha9mnvg4d1r0l0ldnhk4g8sx15vv1br5";
sha256 = "0182ys095dfx02vl2a20j1hz92dx3mfgz2a6fhn31bqlp1wa8hlq";
}
)
{
"name": "Gargantext",
"version": "0.0.2.2.1",
"version": "0.0.2.7.1",
"scripts": {
"rebase-set": "spago package-set-upgrade && spago psc-package-insdhall",
"rebuild-set": "spago psc-package-insdhall",
"install-ps": "psc-package install",
"compile": "pulp build",
"build": "pulp browserify -t dist/bundle.js",
"css": "sass src/sass/sass.sass:dist/styles/sass.css",
"css": "sass src/sass/sass.sass:dist/styles/sass.css && sass src/sass/bootstrap/default.sass:dist/styles/bootstrap-default.css && cp node_modules/bootstrap-dark/src/bootstrap-dark.css dist/styles/bootstrap-dark.css && sass src/sass/bootstrap/greyson.scss:dist/styles/bootstrap-greyson.css && sass src/sass/bootstrap/monotony.scss:dist/styles/bootstrap-monotony.css && sass src/sass/bootstrap/darkster.scss:dist/styles/bootstrap-darkster.css && sass src/sass/bootstrap/herbie.scss:dist/styles/bootstrap-herbie.css",
"docs": "pulp docs -- --format html",
"repl": "pulp repl",
"clean": "rm -Rf output node_modules",
......@@ -24,6 +24,8 @@
"dependencies": {
"aes-js": "^3.1.1",
"base-x": "^3.0.2",
"bootstrap": "4.4.1",
"bootstrap-dark": "^1.0.3",
"create-react-class": "^15.6.3",
"echarts": "^4.1.0",
"echarts-for-react": "^2.0.14",
......
......@@ -16,6 +16,7 @@ import Gargantext.Prelude
import Gargantext.Types as GT
import Gargantext.Utils as GU
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Reload as GUR
localStorageKey :: String
......@@ -48,16 +49,15 @@ removeTaskFromList ts (GT.AsyncTaskWithType { task: GT.AsyncTask { id: id' } })
A.filter (\(GT.AsyncTaskWithType { task: GT.AsyncTask { id: id'' } }) -> id' /= id'') ts
type ReductorProps = (
appReload :: GT.ReloadS
, treeReload :: GT.ReloadS
appReload :: GUR.ReloadS
, treeReload :: GUR.ReloadS
, storage :: Storage
)
type Reductor = R2.Reductor (Record ReductorProps) Action
type ReductorAction = Action -> Effect Unit
type OnFinish = Effect Unit
useTasks :: GT.ReloadS -> GT.ReloadS -> R.Hooks Reductor
useTasks :: GUR.ReloadS -> GUR.ReloadS -> R.Hooks Reductor
useTasks appReload treeReload = R2.useReductor act initializer unit
where
act :: R2.Actor (Record ReductorProps) Action
......@@ -73,12 +73,19 @@ data Action =
action :: Record ReductorProps -> Action -> Effect (Record ReductorProps)
action p@{ treeReload, storage } (Insert nodeId t) = do
_ <- snd treeReload $ (_ + 1)
_ <- GUR.bump treeReload
let newStorage = Map.alter (maybe (Just [t]) (\ts -> Just $ A.cons t ts)) nodeId storage
pure $ p { storage = newStorage }
action p (Finish nodeId t) = do
action p (Remove nodeId t)
action p@{ appReload, storage } (Remove nodeId t) = do
_ <- snd appReload $ (_ + 1)
action p@{ appReload, treeReload, storage } (Remove nodeId t@(GT.AsyncTaskWithType { typ })) = do
_ <- if GT.asyncTaskTriggersAppReload typ then
GUR.bump appReload
else
pure unit
_ <- if GT.asyncTaskTriggersTreeReload typ then
GUR.bump treeReload
else
pure unit
let newStorage = Map.alter (maybe Nothing $ (\ts -> Just $ removeTaskFromList ts t)) nodeId storage
pure $ p { storage = newStorage }
......@@ -26,12 +26,12 @@ import Reactix.SyntheticEvent as E
import Gargantext.Prelude
import Gargantext.Types (CTabNgramType(..), TermList)
import Gargantext.Components.Annotation.Menu ( annotationMenu, AnnotationMenu, MenuType(..) )
import Gargantext.Components.Annotation.Utils ( termBootstrapClass, termClass )
import Gargantext.Components.NgramsTable.Core (NgramsTable, NgramsTerm, findNgramTermList, highlightNgrams, normNgram)
import Gargantext.Components.Annotation.Menu ( annotationMenu, MenuType(..) )
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Selection as Sel
import Gargantext.Types (CTabNgramType(..), TermList)
thisModule :: String
thisModule = "Gargantext.Components.Annotation.AnnotatedField"
......@@ -53,27 +53,61 @@ annotatedField = R.createElement annotatedFieldComponent
annotatedFieldComponent :: R.Component Props
annotatedFieldComponent = R.hooksComponentWithModule thisModule "annotatedField" cpt
where
cpt {ngrams,setTermList,text: fieldText} _ = do
cpt {ngrams, setTermList, text: fieldText} _ = do
(_ /\ setRedrawMenu) <- R.useState' false
menuRef <- R.useRef Nothing
menuRef <- R.useRef (Nothing :: Maybe AnnotationMenu)
let wrapperProps = { className: "annotated-field-wrapper" }
redrawMenu = setRedrawMenu not
wrap (text /\ list) = { list
, onSelect: onAnnotationSelect { menuRef, ngrams, setRedrawMenu, setTermList }
, text }
hideMenu = do
R.setRef menuRef Nothing
redrawMenu
pure $ HTML.div wrapperProps
[ maybe (HTML.div {} []) annotationMenu $ R.readRef menuRef
, HTML.div { className: "annotated-field-runs" }
((\p -> annotateRun p []) <$> wrap <$> compile ngrams fieldText)
]
showMenu { event, getList, menuType, ngram } = do
compile :: NgramsTable -> Maybe String -> Array (Tuple String (List (Tuple NgramsTerm TermList)))
compile ngrams = maybe [] (highlightNgrams CTabTerms ngrams)
-- Runs
onAnnotationSelect { menuRef, ngrams, setRedrawMenu, setTermList } Nothing event = do
s <- Sel.getSelection
case s of
Just sel -> do
case Sel.selectionToString sel of
"" -> hideMenu { menuRef, setRedrawMenu }
sel' -> do
showMenu { event
, getList: findNgramTermList ngrams
, menuRef
, menuType: NewNgram
, ngram: normNgram CTabTerms sel'
, setRedrawMenu
, setTermList }
Nothing -> hideMenu { menuRef, setRedrawMenu }
onAnnotationSelect { menuRef, ngrams, setRedrawMenu, setTermList } (Just (Tuple ngram list)) event =
showMenu { event
, getList: const (Just list)
, menuRef
, menuType: SetTermListItem
, ngram
, setRedrawMenu
, setTermList }
showMenu { event, getList, menuRef, menuType, ngram, setRedrawMenu, setTermList } = do
let x = E.clientX event
y = E.clientY event
-- n = normNgram CTabTerms text
list = getList ngram
redrawMenu = setRedrawMenu not
setList t = do
setTermList ngram list t
hideMenu
hideMenu { menuRef, setRedrawMenu }
E.preventDefault event
--range <- Sel.getRange sel 0
--log2 "[showMenu] selection range" $ Sel.rangeToTuple range
......@@ -82,37 +116,16 @@ annotatedFieldComponent = R.hooksComponentWithModule thisModule "annotatedField"
, y
, list
, menuType
, onClose: hideMenu
, onClose: hideMenu { menuRef, setRedrawMenu }
, setList
}
R.setRef menuRef menu
redrawMenu
onSelect :: Maybe (Tuple NgramsTerm TermList) -> MouseEvent -> Effect Unit
onSelect (Just (Tuple ngram list)) event =
showMenu { event, getList: const (Just list), menuType: SetTermListItem, ngram }
onSelect Nothing event = do
s <- Sel.getSelection
case s of
Just sel -> do
case Sel.selectionToString sel of
"" -> hideMenu
sel' -> do
showMenu { event, getList: findNgramTermList ngrams, menuType: NewNgram, ngram: normNgram CTabTerms sel' }
Nothing -> hideMenu
wrap (text /\ list) = {text, list, onSelect}
pure $ HTML.div wrapperProps
[ maybe (HTML.div {} []) annotationMenu $ R.readRef menuRef
, HTML.div { className: "annotated-field-runs" }
((\p -> annotateRun p []) <$> wrap <$> compile ngrams fieldText)
]
compile :: NgramsTable -> Maybe String -> Array (Tuple String (List (Tuple NgramsTerm TermList)))
compile ngrams = maybe [] (highlightNgrams CTabTerms ngrams)
-- Runs
hideMenu { menuRef, setRedrawMenu } = do
let redrawMenu = setRedrawMenu not
R.setRef menuRef Nothing
redrawMenu
type Run =
( list :: List (Tuple NgramsTerm TermList)
......@@ -136,3 +149,11 @@ annotatedRunComponent = R.staticComponent "AnnotatedRun" cpt
bgClasses = joinWith " " $ A.fromFoldable $ termClass <<< snd <$> lst
-- className = "annotation-run bg-" <> termBootstrapClass list
className = "annotation-run " <> bgClasses
-- cb = onSelect text list
-- elt =
-- case list of
-- Nothing -> HTML.span { on: { mouseUp: cb } }
-- Just l -> HTML.span { -- className: "annotation-run bg-" <> termBootstrapClass l
-- className: "annotation-run " <> termClass l
-- , on: { click: cb }
-- }
......@@ -8,6 +8,7 @@ termClass MapTerm = "graph-term"
termClass StopTerm = "stop-term"
termBootstrapClass :: TermList -> String
termBootstrapClass CandidateTerm = "warning"
-- termBootstrapClass CandidateTerm = "warning"
termBootstrapClass MapTerm = "success"
termBootstrapClass StopTerm = "danger"
termBootstrapClass CandidateTerm = "primary"
......@@ -13,7 +13,8 @@ import Gargantext.Components.GraphExplorer (explorerLayout)
import Gargantext.Components.Lang (LandingLang(..))
import Gargantext.Components.Login (login)
import Gargantext.Components.Nodes.Annuaire (annuaireLayout)
import Gargantext.Components.Nodes.Annuaire.User.Contacts (annuaireUserLayout, userLayout)
import Gargantext.Components.Nodes.Annuaire.User (userLayout)
import Gargantext.Components.Nodes.Annuaire.User.Contact (contactLayout)
import Gargantext.Components.Nodes.Corpus (corpusLayout)
import Gargantext.Components.Nodes.Corpus.Dashboard (dashboardLayout)
import Gargantext.Components.Nodes.Corpus.Document (documentMainLayout)
......@@ -30,6 +31,7 @@ import Gargantext.Routes (AppRoute(..))
import Gargantext.Sessions (useSessions)
import Gargantext.Sessions as Sessions
import Gargantext.Types as GT
import Gargantext.Utils.Reload as GUR
thisModule :: String
thisModule = "Gargantext.Components.App"
......@@ -48,12 +50,12 @@ appCpt = R.hooksComponentWithModule thisModule "app" cpt where
route <- useHashRouter router Home
asyncTasksRef <- R.useRef Nothing
treeReloadRef <- R.useRef Nothing
treeReloadRef <- GUR.newI
showLogin <- R.useState' false
backend <- R.useState' Nothing
appReload <- R.useState' 0
appReload <- GUR.new
showCorpus <- R.useState' false
......@@ -64,9 +66,9 @@ appCpt = R.hooksComponentWithModule thisModule "app" cpt where
let forested = forestLayout { appReload
, asyncTasksRef
, backend
, currentRoute: fst route
, frontends
, handed
, route: fst route
, sessions: fst sessions
, showLogin: snd showLogin
, treeReloadRef
......@@ -74,9 +76,9 @@ appCpt = R.hooksComponentWithModule thisModule "app" cpt where
let forestedTB = forestLayoutWithTopBar { appReload
, asyncTasksRef
, backend
, currentRoute: fst route
, frontends
, handed
, route: fst route
, sessions: fst sessions
, showLogin: snd showLogin
, treeReloadRef
......@@ -89,7 +91,6 @@ appCpt = R.hooksComponentWithModule thisModule "app" cpt where
, visible: showLogin
}
]
let mCurrentRoute = fst route
let withSession sid f = maybe' defaultView (ff f) (Sessions.lookup sid (fst sessions))
let sessionUpdate s = snd sessions $ Sessions.Update s
......@@ -101,17 +102,6 @@ appCpt = R.hooksComponentWithModule thisModule "app" cpt where
Annuaire sid nodeId -> withSession sid $ \session -> forested [
annuaireLayout { frontends, nodeId, session }
]
ContactPage sid aId nodeId -> withSession sid $ \session -> forested [
annuaireUserLayout {
annuaireId: aId
, appReload
, asyncTasksRef
, frontends
, nodeId
, session
, treeReloadRef
}
]
Corpus sid nodeId -> withSession sid $ \session -> forested [
corpusLayout { nodeId, session }
]
......@@ -119,7 +109,7 @@ appCpt = R.hooksComponentWithModule thisModule "app" cpt where
documentMainLayout { listId, mCorpusId: Just corpusId, nodeId, session } []
]
Dashboard sid nodeId -> withSession sid $ \session -> forested [
dashboardLayout { nodeId, session }
dashboardLayout { nodeId, session } []
]
Document sid listId nodeId ->
withSession sid $
......@@ -139,9 +129,9 @@ appCpt = R.hooksComponentWithModule thisModule "app" cpt where
appReload
, asyncTasksRef
, backend
, currentRoute: fst route
, frontends
, handed
, route: fst route
, sessions: fst sessions
, showLogin: snd showLogin
, treeReloadRef
......@@ -162,10 +152,10 @@ appCpt = R.hooksComponentWithModule thisModule "app" cpt where
simpleLayout { handed } [
explorerLayout { asyncTasksRef
, backend
, currentRoute: fst route
, frontends
, graphId
, handed: fst handed
, mCurrentRoute
, session
, sessions: (fst sessions)
, showLogin
......@@ -190,9 +180,9 @@ appCpt = R.hooksComponentWithModule thisModule "app" cpt where
appReload
, asyncTasksRef
, backend
, currentRoute: fst route
, frontends
, handed
, route: fst route
, sessions: fst sessions
, showLogin: snd showLogin
, treeReloadRef
......@@ -204,6 +194,8 @@ appCpt = R.hooksComponentWithModule thisModule "app" cpt where
, sessionUpdate
}
} []
----------------------------------------------------------------------------------------
-- | TODO refact UserPage and ContactPage
UserPage sid nodeId -> withSession sid $ \session -> forested [
userLayout {
appReload
......@@ -214,3 +206,17 @@ appCpt = R.hooksComponentWithModule thisModule "app" cpt where
, treeReloadRef
}
]
ContactPage sid aId nodeId -> withSession sid $ \session -> forested [
contactLayout {
annuaireId: aId
, appReload
, asyncTasksRef
, frontends
, nodeId
, session
, treeReloadRef
}
]
......@@ -29,7 +29,7 @@ import Reactix.DOM.HTML as H
import Gargantext.Prelude
import Gargantext.Components.Category.Types
import Gargantext.Components.DocsTable.Types (DocumentsView(..), LocalCategories)
import Gargantext.Components.DocsTable.Types (DocumentsView(..), LocalCategories, LocalUserScore)
import Gargantext.Ends (Frontends, url)
import Gargantext.Hooks.Loader (useLoaderWithCacheAPI, HashedResponse(..))
import Gargantext.Utils.Reactix as R2
......@@ -43,17 +43,72 @@ thisModule :: String
thisModule = "Gargantext.Components.Category"
------------------------------------------------------------------------
type RatingProps =
( score :: Star
, nodeId :: NodeID
, row :: DocumentsView
, session :: Session
, setLocalCategories :: R.Setter LocalUserScore
)
rating :: R2.Component RatingProps
rating = R.createElement ratingCpt
ratingCpt :: R.Component RatingProps
ratingCpt = R.hooksComponentWithModule thisModule "rating" cpt
where
cpt { score, nodeId, row: DocumentsView r, session, setLocalCategories } _ = do
pure $ H.div {className:"flex"} divs
where
divs = map (\s -> H.div { className : icon score s
, on: {click: onClick score s}
} []) stars
icon Star_0 Star_0 = "fa fa-times-circle"
icon _ Star_0 = "fa fa-times"
icon c s = if star2score c < star2score s
then "fa fa-star-o"
else "fa fa-star"
onClick score c = \_-> do
let c' = if score == c
then clickAgain c
else c
setLocalCategories $ Map.insert r._id c'
void $ launchAff
$ putRating session nodeId
$ RatingQuery {nodeIds: [r._id], rating: c'}
newtype RatingQuery =
RatingQuery { nodeIds :: Array Int
, rating :: Star
}
type CarousselProps = (
category :: Category
instance encodeJsonRatingQuery :: EncodeJson RatingQuery where
encodeJson (RatingQuery post) =
"ntc_nodesId" := post.nodeIds
~> "ntc_category" := encodeJson post.rating
~> jsonEmptyObject
putRating :: Session -> Int -> RatingQuery -> Aff (Array Int)
putRating session nodeId = put session $ ratingRoute nodeId
where
ratingRoute :: Int -> SessionRoute
ratingRoute nodeId = NodeAPI Node (Just nodeId) "category"
------------------------------------------------------------------------
type CarousselProps =
( category :: Category
, nodeId :: NodeID
, row :: DocumentsView
, session :: Session
, setLocalCategories :: R.Setter LocalCategories
)
-- caroussel :: Category -> R.Element
caroussel :: R2.Component CarousselProps
caroussel = R.createElement carousselCpt
......@@ -79,30 +134,32 @@ carousselCpt = R.hooksComponentWithModule thisModule "caroussel" cpt
onClick c = \_-> do
setLocalCategories $ Map.insert r._id c
void $ launchAff $ putCategories session nodeId $ CategoryQuery {nodeIds: [r._id], category: c}
void $ launchAff
$ putCategories session nodeId
$ CategoryQuery {nodeIds: [r._id], category: c}
icon :: Category -> Boolean -> String
icon cat b = btn b $ "glyphicon glyphicon-" <> (color $ size b $ icon' cat b)
icon cat b = btn b $ "fa fa-" <> (color $ size b $ icon' cat b)
where
icon' :: Category -> Boolean -> String
icon' Trash false = "remove"
icon' Trash true = "remove-sign"
icon' Trash false = "times"
icon' Trash true = "times-circle"
icon' UnRead true = "question-sign"
icon' UnRead false = "question-sign"
icon' UnRead false = "question"
icon' UnRead true = "question-circle"
icon' Checked true = "ok-sign"
icon' Checked false = "ok"
icon' Checked false = "check"
icon' Checked true = "check-circle"
icon' Topic false = "star-o"
icon' Topic true = "star"
icon' Topic false = "star-empty"
icon' Favorite false = "heart-o"
icon' Favorite true = "heart"
icon' Favorite false = "heart-empty"
size :: Boolean -> String -> String
size true s = s <> " btn-lg"
size false s = s <> " btn-xs"
size false s = s <> " btn-sm"
color :: String -> String
color x = x <> " text-primary"
......@@ -111,7 +168,7 @@ icon cat b = btn b $ "glyphicon glyphicon-" <> (color $ size b $ icon' cat b)
btn true s = s
btn false s = "btn " <> s
-------------------------------------------------------------------------
newtype CategoryQuery = CategoryQuery {
nodeIds :: Array Int
, category :: Category
......
......@@ -8,7 +8,46 @@ import Data.Generic.Rep.Show (genericShow)
import Gargantext.Prelude
------------------------------------------------------------------------
data Star = Star_0 | Star_1 | Star_2 | Star_3 | Star_4
stars :: Array Star
stars = [Star_0, Star_1, Star_2, Star_3, Star_4]
derive instance genericStar :: Generic Star _
instance showStar :: Show Star where
show = genericShow
instance eqStar :: Eq Star where
eq = genericEq
instance decodeJsonStar :: DecodeJson Star where
decodeJson json = do
obj <- decodeJson json
pure $ decodeStar obj
instance encodeJsonStar :: EncodeJson Star where
encodeJson x = encodeJson (star2score x)
decodeStar :: Int -> Star
decodeStar 0 = Star_0
decodeStar 1 = Star_1
decodeStar 2 = Star_2
decodeStar 3 = Star_3
decodeStar 4 = Star_4
decodeStar _ = Star_4
star2score :: Star -> Int
star2score Star_0 = 0
star2score Star_1 = 1
star2score Star_2 = 2
star2score Star_3 = 3
star2score Star_4 = 4
clickAgain :: Star -> Star
clickAgain Star_0 = Star_1
clickAgain s = decodeStar (star2score s - 1)
------------------------------------------------------------------------
data Category = Trash | UnRead | Checked | Topic | Favorite
categories :: Array Category
......
......@@ -24,6 +24,7 @@ import Gargantext.Prelude
import Gargantext.Utils.HighlightJS as HLJS
import Gargantext.Utils.Reactix as R2
thisModule :: String
thisModule = "Gargantext.Components.CodeEditor"
type Code = String
......@@ -117,15 +118,14 @@ codeEditorCpt = R.hooksComponentWithModule thisModule "codeEditor" cpt
setCodeOverlay controls code'
renderHtml code' controls
pure $ H.div { className: "code-editor" } [
toolbar {controls, onChange}
, H.div { className: "row error" } [
errorComponent {error: controls.error}
]
, H.div { className: "row editor" } [
H.div { className: "code-area " <> (codeHidden $ fst controls.viewType) } [
H.div { className: "code-container" } [
H.textarea { defaultValue: code
pure $ H.div { className: "code-editor" }
[ toolbar {controls, onChange}
, H.div { className: "row error" }
[ errorComponent {error: controls.error} ]
, H.div { className: "row editor" }
[ H.div { className: "code-area " <> (codeHidden $ fst controls.viewType) }
[ H.div { className: "code-container" }
[ H.textarea { defaultValue: code
, on: { change: onEditChange controls onChange }
, placeholder: "Type some code..."
, ref: controls.codeElRef } [ ]
......@@ -147,11 +147,11 @@ codeEditorCpt = R.hooksComponentWithModule thisModule "codeEditor" cpt
codeHidden :: ViewType -> String
codeHidden Code = ""
codeHidden Both = ""
codeHidden _ = " hidden"
codeHidden _ = " d-none"
dividerHidden :: ViewType -> String
dividerHidden Both = ""
dividerHidden _ = " hidden"
dividerHidden _ = " d-none"
langClass :: CodeType -> String
langClass Haskell = " language-haskell"
......@@ -162,7 +162,7 @@ codeEditorCpt = R.hooksComponentWithModule thisModule "codeEditor" cpt
previewHidden :: ViewType -> String
previewHidden Preview = ""
previewHidden Both = ""
previewHidden _ = " hidden"
previewHidden _ = " d-none"
onEditChange :: forall e. Record Controls -> (CodeType -> Code -> Effect Unit) -> e -> Effect Unit
onEditChange controls@{codeElRef, codeOverlayElRef, codeType: (codeType /\ _), codeS} onChange e = do
......@@ -208,12 +208,15 @@ toolbarCpt = R.hooksComponentWithModule thisModule "toolbar" cpt
where
cpt props@{controls: {codeType, error, viewType}} _ = do
pure $
H.div { className: "row toolbar" } [
codeTypeSelector {
H.div { className: "row toolbar" }
[ H.div { className: "col-2" }
[ codeTypeSelector {
codeType
, onChange: onChangeCodeType props
}
, viewTypeSelector {state: viewType}
]
, H.div { className: "col-1" }
[ viewTypeSelector {state: viewType} ]
]
-- Handle rerendering of preview when viewType changed
......@@ -289,18 +292,19 @@ viewTypeSelectorCpt :: R.Component ViewTypeSelectorProps
viewTypeSelectorCpt = R.hooksComponentWithModule thisModule "viewTypeSelector" cpt
where
cpt {state} _ =
pure $ H.div { className: "btn-group" } [
pure $ H.div { className: "btn-group"
, role: "group" } [
viewTypeButton Code state
, viewTypeButton Both state
, viewTypeButton Preview state
]
viewTypeButton viewType (state /\ setState) =
H.label {
className: "btn btn-default" <> active
H.button { className: "btn btn-primary" <> active
, on: { click: onClick }
, type: "button"
} [
H.i { className: "glyphicon " <> (icon viewType) } []
H.i { className: "fa " <> (icon viewType) } []
]
where
active = if viewType == state then " active" else ""
......@@ -308,9 +312,9 @@ viewTypeSelectorCpt = R.hooksComponentWithModule thisModule "viewTypeSelector" c
onClick _ = do
setState $ const viewType
icon Preview = "glyphicon-eye-open"
icon Both = "glyphicon-transfer"
icon Code = "glyphicon-pencil"
icon Preview = "fa-eye"
icon Both = "fa-columns"
icon Code = "fa-pencil"
type Controls =
(
......
......@@ -48,7 +48,7 @@ contextMenuCpt = R.hooksComponentWithModule thisModule "contextMenu" cpt
R.useLayoutEffect2 root rect (contextMenuEffect onClose root)
let cs = [
HTML.div { className: "popover-content" }
[ HTML.div { className: "panel panel-default" }
[ HTML.div { className: "card" }
[ HTML.ul { className: "list-group" }
children
]
......
......@@ -24,9 +24,10 @@ import Reactix as R
import Reactix.DOM.HTML as H
------------------------------------------------------------------------
import Gargantext.Prelude
import Gargantext.Components.Category (caroussel)
import Gargantext.Components.Category.Types (Category(..), decodeCategory)
import Gargantext.Components.Category (caroussel, rating)
import Gargantext.Components.Category.Types (Category(..), decodeCategory, Star(..), decodeStar)
import Gargantext.Components.DocsTable.Types
import Gargantext.Components.Table.Types as T
import Gargantext.Components.Nodes.Lists.Types as NT
import Gargantext.Components.Nodes.Texts.Types (SidePanelTriggers)
import Gargantext.Components.Table as T
......@@ -35,11 +36,12 @@ import Gargantext.Hooks.Loader (useLoader, useLoaderWithCacheAPI, HashedResponse
import Gargantext.Routes as Routes
import Gargantext.Routes (SessionRoute(NodeAPI))
import Gargantext.Sessions (Session, sessionId, get, delete)
import Gargantext.Types (ListId, NodeID, NodeType(..), OrderBy(..), ReloadS, TableResult, TabSubType, TabType, showTabType')
import Gargantext.Types (ListId, NodeID, NodeType(..), OrderBy(..), TableResult, TabSubType, TabType, showTabType')
import Gargantext.Utils (sortWith)
import Gargantext.Utils.CacheAPI as GUC
import Gargantext.Utils.QueryString (joinQueryStrings, mQueryParamS, queryParam, queryParamS)
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Reload as GUR
thisModule :: String
thisModule = "Gargantext.Components.DocsTable"
......@@ -153,17 +155,17 @@ searchBar (query /\ setQuery) = R.createElement el {} []
cpt {} _children = do
queryText <- R.useState' query
pure $ H.div {className: "row"}
[ H.div {className: "col col-md-3"} []
, H.div {className: "col col-md-1"} [if query /= "" then clearButton else H.div {} []]
, H.div {className: "col col-md-3 form-group"}
pure $ H.div {className: "col-md-12 row"}
[ H.div {className: "col-md-3"} []
, H.div {className: "col-md-1"} [if query /= "" then clearButton else H.div {} []]
, H.div {className: "col-md-3 form-group"}
[ H.input { type: "text"
, className: "form-control"
, on: {change: onSearchChange queryText, keyUp: onSearchKeyup queryText}
, placeholder: query
, defaultValue: query}
]
, H.div {className: "col col-md-1"} [searchButton queryText]
, H.div {className: "col-md-1"} [searchButton queryText]
]
onSearchChange :: forall e. R.State Query -> e -> Effect Unit
......@@ -179,14 +181,14 @@ searchBar (query /\ setQuery) = R.createElement el {} []
searchButton (queryText /\ _) =
H.button { type: "submit"
, className: "btn btn-default"
, className: "btn btn-primary"
, on: {click: \e -> setQuery $ const queryText}}
[ H.span {className: "glyphicon glyphicon-search"} [] ]
[ H.span {className: "fa fa-search"} [] ]
clearButton =
H.button { className: "btn btn-danger"
, on: {click: \e -> setQuery $ const ""}}
[ H.span {className: "glyphicon glyphicon-remove"} [] ]
[ H.span {className: "fa fa-times"} [] ]
mock :: Boolean
mock = false
......@@ -273,7 +275,7 @@ pageLayoutCpt = R.hooksComponentWithModule thisModule "pageLayout" cpt where
, renderer: paint
}
(NT.CacheOff /\ _) -> do
localCategories <- R.useState' (mempty :: LocalCategories)
localCategories <- R.useState' (mempty :: LocalUserScore)
paramsS <- R.useState' params
let loader p = do
let route = tableRouteWithPage (p { params = fst paramsS, query = query })
......@@ -317,7 +319,7 @@ pagePaintCpt :: R.Component PagePaintProps
pagePaintCpt = R.hooksComponentWithModule thisModule "pagePaintCpt" cpt
where
cpt { documents, layout, params } _ = do
localCategories <- R.useState' (mempty :: LocalCategories)
localCategories <- R.useState' (mempty :: LocalUserScore)
pure $ pagePaintRaw { documents: A.fromFoldable filteredRows
, layout
, localCategories
......@@ -338,7 +340,7 @@ pagePaintCpt = R.hooksComponentWithModule thisModule "pagePaintCpt" cpt
type PagePaintRawProps = (
documents :: Array DocumentsView
, layout :: Record PageLayoutProps
, localCategories :: R.State LocalCategories
, localCategories :: R.State LocalUserScore
, params :: R.State T.Params
)
......@@ -361,7 +363,8 @@ pagePaintRawCpt = R.hooksComponentWithModule thisModule "pagePaintRawCpt" cpt wh
reload <- R.useState' 0
pure $ T.table
{ colNames
{ syncResetButton : [ H.div {} [] ]
, colNames
, container: T.defaultContainer { title: "Documents" }
, params
, rows: rows reload localCategories
......@@ -370,9 +373,9 @@ pagePaintRawCpt = R.hooksComponentWithModule thisModule "pagePaintRawCpt" cpt wh
}
where
sid = sessionId session
gi Favorite = "glyphicon glyphicon-star"
gi _ = "glyphicon glyphicon-star-empty"
trashClassName Trash _ = "trash"
gi Star_1 = "fa fa-star"
gi _ = "fa fa-star-empty"
trashClassName Star_0 _ = "trash"
trashClassName _ true = "active"
trashClassName _ false = ""
corpusDocument
......@@ -386,14 +389,18 @@ pagePaintRawCpt = R.hooksComponentWithModule thisModule "pagePaintRawCpt" cpt wh
row dv@(DocumentsView r) =
{ row:
T.makeRow [ -- H.div {} [ H.a { className, style, on: {click: click Favorite} } [] ]
H.div { className: "column-tag flex" } [ docChooser { listId, mCorpusId, nodeId: r._id, selected, sidePanelTriggers, tableReload: reload } []
H.div { className: "" }
[ docChooser { listId, mCorpusId, nodeId: r._id, selected, sidePanelTriggers, tableReload: reload } []
]
, H.div { className: "column-tag flex" } [ caroussel { category: cat, nodeId, row: dv, session, setLocalCategories } [] ]
--, H.div { className: "column-tag flex" } [ caroussel { category: cat, nodeId, row: dv, session, setLocalCategories } [] ]
, H.div { className: "column-tag flex" }
[ rating { score: cat, nodeId, row: dv, session, setLocalCategories } [] ]
--, H.input { type: "checkbox", defaultValue: checked, on: {click: click Trash} }
-- TODO show date: Year-Month-Day only
, H.div { className: tClassName } [ R2.showText r.date ]
, H.div { className: tClassName } [
H.a { href: url frontends $ corpusDocument r._id, target: "_blank"} [ H.text r.title ]
, H.div { className: tClassName }
[ H.a { href: url frontends $ corpusDocument r._id, target: "_blank"}
[ H.text r.title ]
]
, H.div { className: tClassName } [ H.text $ if r.source == "" then "Source" else r.source ]
, H.div {} [ H.text $ maybe "-" show r.ngramCount ]
......@@ -401,7 +408,7 @@ pagePaintRawCpt = R.hooksComponentWithModule thisModule "pagePaintRawCpt" cpt wh
, delete: true }
where
cat = getCategory lc r
checked = Trash == cat
-- checked = Star_1 == cat
tClassName = trashClassName cat selected
className = gi cat
selected = R.readRef currentDocIdRef == Just r._id
......@@ -412,7 +419,7 @@ type DocChooser = (
, nodeId :: NodeID
, selected :: Boolean
, sidePanelTriggers :: Record SidePanelTriggers
, tableReload :: ReloadS
, tableReload :: GUR.ReloadS
)
docChooser :: R2.Component DocChooser
......@@ -429,11 +436,11 @@ docChooserCpt = R.hooksComponentWithModule thisModule "docChooser" cpt
, nodeId
, selected
, sidePanelTriggers: { triggerAnnotatedDocIdChange }
, tableReload: (_ /\ setReload) } _ = do
, tableReload } _ = do
let eyeClass = if selected then "fa-eye" else "fa-eye-slash"
pure $ H.div { className: "doc-chooser" } [
pure $ H.div { className: "btn" } [
H.span { className: "fa " <> eyeClass
, on: { click: onClick } } []
]
......@@ -443,7 +450,7 @@ docChooserCpt = R.hooksComponentWithModule thisModule "docChooser" cpt
-- log2 "[docChooser] onClick, corpusId" corpusId
-- log2 "[docChooser] onClick, nodeId" nodeId
R2.callTrigger triggerAnnotatedDocIdChange { corpusId, listId, nodeId }
setReload $ (_ + 1)
GUR.bump tableReload
newtype SearchQuery = SearchQuery {
......
......@@ -8,7 +8,7 @@ import Data.Tuple (Tuple(..))
import Gargantext.Prelude
import Gargantext.Components.Category.Types (Category(..), decodeCategory)
import Gargantext.Components.Category.Types (Category(..), decodeCategory, Star(..), decodeStar)
data Action
= MarkCategory Int Category
......@@ -16,7 +16,7 @@ data Action
newtype DocumentsView
= DocumentsView
{ _id :: Int
, category :: Category
, category :: Star
, date :: Int
, ngramCount :: Maybe Int
, score :: Maybe Int
......@@ -63,7 +63,7 @@ instance encodeDocumentsView :: EncodeJson DocumentsView where
newtype Response = Response
{ cid :: Int
, hyperdata :: Hyperdata
, category :: Category
, category :: Star
, ngramCount :: Maybe Int
, score :: Maybe Int
, title :: String
......@@ -94,10 +94,11 @@ instance decodeResponse :: DecodeJson Response where
ngramCount <- obj .: "ngramCount"
score <- obj .: "score"
title <- obj .: "title"
pure $ Response { category: decodeCategory category, cid, hyperdata, ngramCount, score, title }
--pure $ Response { category: decodeCategory category, cid, hyperdata, ngramCount, score, title }
pure $ Response { category: decodeStar category, cid, hyperdata, ngramCount, score, title }
type LocalCategories = Map Int Category
type LocalUserScore = Map Int Star
type Query = String
---------------------------------------------------------
......@@ -107,7 +108,7 @@ sampleData' = DocumentsView { _id : 1
, date : 2010
, title : "title"
, source : "source"
, category : UnRead
, category : Star_1
, ngramCount : Just 1
, score: Just 1 }
......@@ -118,7 +119,7 @@ sampleData = map (\(Tuple t s) -> DocumentsView { _id : 1
, date : 2017
, title: t
, source: s
, category : UnRead
, category : Star_1
, ngramCount : Just 10
, score: Just 1 }) sampleDocuments
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -36,19 +36,20 @@ import Gargantext.Types (Name, ID)
import Gargantext.Types as GT
import Gargantext.Utils.Popover as Popover
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Reload as GUR
thisModule :: String
thisModule = "Gargantext.Components.Forest.Tree.Node"
-- Main Node
type NodeMainSpanProps = (
appReload :: GT.ReloadS
appReload :: GUR.ReloadS
, asyncTasks :: GAT.Reductor
, currentRoute :: Routes.AppRoute
, folderOpen :: R.State Boolean
, frontends :: Frontends
, id :: ID
, isLeaf :: IsLeaf
, mCurrentRoute :: Maybe Routes.AppRoute
, name :: Name
, nodeType :: GT.NodeType
, setPopoverRef :: R.Ref (Maybe (Boolean -> Effect Unit))
......@@ -74,13 +75,13 @@ nodeMainSpanCpt = R.hooksComponentWithModule thisModule "nodeMainSpan" cpt
where
cpt props@{ appReload
, asyncTasks: (asyncTasks /\ dispatchAsyncTasks)
, currentRoute
, dispatch
, folderOpen
, frontends
, handed
, id
, isLeaf
, mCurrentRoute
, name
, nodeType
, session
......@@ -100,7 +101,7 @@ nodeMainSpanCpt = R.hooksComponentWithModule thisModule "nodeMainSpan" cpt
GT.LeftHanded -> reverse
GT.RightHanded -> identity
let isSelected = mCurrentRoute == Routes.nodeTypeAppRoute nodeType (sessionId session) id
let isSelected = Just currentRoute == Routes.nodeTypeAppRoute nodeType (sessionId session) id
pure $ H.span (dropProps droppedFile isDragOver)
$ ordering
......@@ -114,7 +115,7 @@ nodeMainSpanCpt = R.hooksComponentWithModule thisModule "nodeMainSpan" cpt
, name: name' props
, nodeType
, session
}
} []
, fileTypeView { dispatch, droppedFile, id, isDragOver, nodeType }
, H.div {} (map (\t -> asyncProgressBar { asyncTask: t
......@@ -142,8 +143,8 @@ nodeMainSpanCpt = R.hooksComponentWithModule thisModule "nodeMainSpan" cpt
, nodeActions { id
, nodeType
, refreshTree: const $ dispatch RefreshTree
, session
, triggerRefresh: const $ dispatch RefreshTree
}
......@@ -151,7 +152,7 @@ nodeMainSpanCpt = R.hooksComponentWithModule thisModule "nodeMainSpan" cpt
where
onTaskFinish id t _ = do
dispatchAsyncTasks $ GAT.Finish id t
snd appReload $ (_ + 1)
GUR.bump appReload
SettingsBox {show: showBox} = settingsBox nodeType
onPopoverClose popoverRef _ = Popover.setOpen popoverRef false
......@@ -228,7 +229,7 @@ nodeMainSpanCpt = R.hooksComponentWithModule thisModule "nodeMainSpan" cpt
fldr nt open = if open
then "fa fa-globe" -- <> color nt
else "fa fa-folder-globe" -- <> color nt
--else "glyphicon glyphicon-folder-close" <> color nt
--else "fa fa-folder-close" <> color nt
where
color GT.NodeUser = ""
color FolderPublic = ""
......@@ -242,8 +243,8 @@ fldr nt open = if open
type NodeActionsProps =
( id :: ID
, nodeType :: GT.NodeType
, refreshTree :: Unit -> Aff Unit
, session :: Session
, triggerRefresh :: Unit -> Aff Unit
)
nodeActions :: Record NodeActionsProps -> R.Element
......@@ -254,21 +255,21 @@ nodeActionsCpt = R.hooksComponentWithModule thisModule "nodeActions" cpt
where
cpt { id
, nodeType: GT.Graph
, refreshTree
, session
, triggerRefresh
} _ = do
useLoader id (graphVersions session) $ \gv ->
nodeActionsGraph { id
, graphVersions: gv
, session
, triggerRefresh: triggerRefresh refreshTree
, triggerRefresh
}
cpt { id
, nodeType: GT.NodeList
, refreshTree
, session
, triggerRefresh
} _ = do
useLoader { nodeId: id, session } loadCorpusWithChild $
\{ corpusId } ->
......@@ -276,13 +277,12 @@ nodeActionsCpt = R.hooksComponentWithModule thisModule "nodeActions" cpt
, nodeId: corpusId
, nodeType: GT.TabNgramType GT.CTabTerms
, session
, triggerRefresh: triggerRefresh refreshTree
, triggerRefresh
}
cpt _ _ = do
pure $ H.div {} []
graphVersions session graphId = GraphAPI.graphVersions { graphId, session }
triggerRefresh refreshTree = refreshTree
-- END nodeActions
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment