Verified Commit ade52a93 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

Merge branch 'dev' into 698-dev-ws-host-fix

parents 49d35d5e f3a3eb98
# Fixing the nixos image saves CI time so it doesn't have to pull new # Fixing the nixos image saves CI time so it doesn't have to pull new
#image every time (nixos/nix updates quite often). #image every time (nixos/nix updates quite often).
# image: nixos/nix:latest # image: nixos/nix:latest
image: nixos/nix:2.22.0 image: nixos/nix:2.24.8
#before_script: #before_script:
#- nix-env -iA nixpkgs.nix nixpkgs.cacert #- nix-env -iA nixpkgs.nix nixpkgs.cacert
...@@ -32,6 +32,7 @@ compile: ...@@ -32,6 +32,7 @@ compile:
- .spago/ - .spago/
script: script:
- nix --extra-experimental-features "nix-command flakes" run .#ci
- nix --extra-experimental-features "nix-command flakes" run .#compile - nix --extra-experimental-features "nix-command flakes" run .#compile
test: test:
...@@ -46,6 +47,7 @@ test: ...@@ -46,6 +47,7 @@ test:
- .spago/ - .spago/
script: script:
- nix --extra-experimental-features "nix-command flakes" run .#compile
- nix --extra-experimental-features "nix-command flakes" run .#test-ps - nix --extra-experimental-features "nix-command flakes" run .#test-ps
- nix-collect-garbage --delete-older-than 14d - nix-collect-garbage --delete-older-than 14d
...@@ -8,5 +8,11 @@ ...@@ -8,5 +8,11 @@
# nix-shell --show-trace --option build-fallback true --run 'bun install' # nix-shell --show-trace --option build-fallback true --run 'bun install'
# nix-shell --show-trace --option build-fallback true --run fix-bun # nix-shell --show-trace --option build-fallback true --run fix-bun
# nix-shell --show-trace --option build-fallback true --run build # nix-shell --show-trace --option build-fallback true --run build
#nix run .#install nix run .#install
nix run .#build nix run .#build
nix run .#build-css
# nix-shell --run "npm run css-default-theme"
# nix-shell --run "npm run css-dark-theme"
# nix-shell --run "npm run css-herbie-theme"
# nix-shell --run "npm run css-monotony-theme"
# nix-shell --run "npm run css-greyson-theme"
with (import <nixpkgs> {});
let
nodejs-with-packages = with nodePackages; [
bower
yarn
]; in
stdenv.mkDerivation rec {
name = "env";
env = buildEnv {
name = name;
paths = buildInputs;
};
buildInputs = [
nodejs-with-packages
yarn
yarn2nix
];
builder = builtins.toFile "builder.sh" ''
source $stdenv/setup
touch $out
'';
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -21,11 +21,11 @@ ...@@ -21,11 +21,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1726560853,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github" "type": "github"
}, },
"original": { "original": {
...@@ -36,15 +36,16 @@ ...@@ -36,15 +36,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1701282334, "lastModified": 1717179513,
"narHash": "sha256-MxCVrXY6v4QmfTwIysjjaX0XUhqBbxTWWB4HXtDYsdk=", "narHash": "sha256-vboIEwIQojofItm2xGCdZCzW96U85l9nDW3ifMuAIdM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "057f9aecfb71c4437d2b27d3323df7f93c010b7e", "rev": "63dacb46bf939521bdc93981b4cbb7ecb58427a0",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "24.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
...@@ -58,11 +59,11 @@ ...@@ -58,11 +59,11 @@
"slimlock": "slimlock" "slimlock": "slimlock"
}, },
"locked": { "locked": {
"lastModified": 1720786645, "lastModified": 1727269424,
"narHash": "sha256-eiuWqQ9xTA2E76XDg13TQBecnLV1g+ahdauC0FYSD7U=", "narHash": "sha256-uoVjAkKbuJSA7++kyBjxLozICDdukZ+Mjj5Z/K5qMak=",
"owner": "thomashoneyman", "owner": "thomashoneyman",
"repo": "purescript-overlay", "repo": "purescript-overlay",
"rev": "c46925ec09fdf54b5bb4ba38b40e19918d3be7be", "rev": "5a28abe663758634b1e5ca7053e08af62fd3be80",
"type": "github" "type": "github"
}, },
"original": { "original": {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
inputs.flake-utils.url = "github:numtide/flake-utils"; inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nixpkgs.url = "github:NixOS/nixpkgs"; inputs.nixpkgs.url = "github:NixOS/nixpkgs?ref=24.05";
inputs.purescript-overlay = { inputs.purescript-overlay = {
url = "github:thomashoneyman/purescript-overlay"; url = "github:thomashoneyman/purescript-overlay";
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
spago-bin.spago-0_93_37 spago-bin.spago-0_93_37
#purescript #purescript
#spago-unstable #spago-unstable
esbuild
nodejs nodejs
nodePackages.npm nodePackages.npm
]; ];
...@@ -59,13 +60,37 @@ ...@@ -59,13 +60,37 @@
in in
{ {
packages = rec { packages = rec {
ci = pkgs.writeShellApplication {
name = "install";
runtimeInputs = dependencies;
text = ''
set -e
echo "Installing JS Dependencies (CI)"
# https://docs.npmjs.com/cli/v9/commands/npm-ci
npm ci
'';
};
install = pkgs.writeShellApplication {
name = "install";
runtimeInputs = dependencies;
text = ''
set -e
echo "Installing JS Dependencies"
npm install
# https://docs.npmjs.com/cli/v9/commands/npm-ci
#npm ci
#npm/bin/npm install --dev
'';
};
compile = pkgs.writeShellApplication { compile = pkgs.writeShellApplication {
name = "compile"; name = "compile";
runtimeInputs = dependencies; runtimeInputs = dependencies;
text = '' text = ''
set -e set -e
echo "Installing JS Dependencies" #echo "Installing JS Dependencies"
#npm install #npm install
# https://docs.npmjs.com/cli/v9/commands/npm-ci # https://docs.npmjs.com/cli/v9/commands/npm-ci
#npm ci #npm ci
......
This diff is collapsed.
{ {
"name": "Gargantext", "name": "Gargantext",
"version": "0.0.7.2.8", "version": "0.0.7.3.1",
"scripts": { "scripts": {
"build": "spago build", "build": "spago build",
"bundle": "spago bundle --module Main --outfile dist/bundle.min.js --minify --source-maps", "bundle": "spago bundle --module Main --outfile dist/bundle.min.js --minify --source-maps",
"css": "$npm_execpath css-themes", "css": "$npm_execpath run css-themes",
"css-themes": "$npm_execpath css-default-theme && $npm_execpath css-dark-theme && $npm_execpath css-darkster-theme && $npm_execpath css-greyson-theme && $npm_execpath css-herbie-theme && $npm_execpath css-monotony-theme", "css-themes": "$npm_execpath run css-default-theme && $npm_execpath run css-dark-theme && $npm_execpath run css-darkster-theme && $npm_execpath run css-greyson-theme && $npm_execpath run css-herbie-theme && $npm_execpath run css-monotony-theme",
"css-default-theme": "sass src/sass/themes/default.scss:dist/styles/bootstrap-default.css", "css-default-theme": "sass src/sass/themes/default.scss:dist/styles/bootstrap-default.css",
"css-dark-theme": "cp node_modules/bootstrap-dark/src/bootstrap-dark.css dist/styles/bootstrap-dark.css", "css-dark-theme": "cp node_modules/bootstrap-dark/src/bootstrap-dark.css dist/styles/bootstrap-dark.css",
"css-darkster-theme": "sass src/sass/themes/darkster.scss:dist/styles/bootstrap-darkster.css", "css-darkster-theme": "sass src/sass/themes/darkster.scss:dist/styles/bootstrap-darkster.css",
......
...@@ -82,6 +82,7 @@ workspace: ...@@ -82,6 +82,7 @@ workspace:
- unordered-collections: ">=3.1.0 <4.0.0" - unordered-collections: ">=3.1.0 <4.0.0"
- unsafe-coerce: ">=6.0.0 <7.0.0" - unsafe-coerce: ">=6.0.0 <7.0.0"
- uri: ">=9.0.0 <10.0.0" - uri: ">=9.0.0 <10.0.0"
- url-validator
- uuid: ">=9.0.0 <10.0.0" - uuid: ">=9.0.0 <10.0.0"
- validation: ">=6.0.0 <7.0.0" - validation: ">=6.0.0 <7.0.0"
- var - var
...@@ -228,6 +229,7 @@ workspace: ...@@ -228,6 +229,7 @@ workspace:
- unsafe-coerce - unsafe-coerce
- unsafe-reference - unsafe-reference
- uri - uri
- url-validator
- uuid - uuid
- validation - validation
- var - var
...@@ -768,6 +770,9 @@ workspace: ...@@ -768,6 +770,9 @@ workspace:
tuples-native: tuples-native:
git: https://github.com/garganscript/purescript-tuples-native.git git: https://github.com/garganscript/purescript-tuples-native.git
ref: v2.3.0-spago-next ref: v2.3.0-spago-next
url-validator:
git: https://github.com/bbarker/purescript-url-validator
ref: master
var: var:
git: https://github.com/garganscript/purescript-var git: https://github.com/garganscript/purescript-var
ref: v3.0.1-spago-next ref: v3.0.1-spago-next
...@@ -2295,6 +2300,15 @@ packages: ...@@ -2295,6 +2300,15 @@ packages:
- these - these
- transformers - transformers
- unfoldable - unfoldable
url-validator:
type: git
url: https://github.com/bbarker/purescript-url-validator
rev: 3514fc80cc277c44dc5b5bd30898f4a866bf6795
dependencies:
- either
- maybe
- prelude
- strings
uuid: uuid:
type: registry type: registry
version: 9.0.0 version: 9.0.0
......
...@@ -37,6 +37,11 @@ workspace: ...@@ -37,6 +37,11 @@ workspace:
git: https://github.com/garganscript/purescript-websocket-simple git: https://github.com/garganscript/purescript-websocket-simple
ref: v3.0.2-spago-next ref: v3.0.2-spago-next
# other external packages
url-validator:
git: https://github.com/bbarker/purescript-url-validator
ref: master
# for tests # for tests
spec-discovery: spec-discovery:
git: https://github.com/purescript-spec/purescript-spec-discovery.git git: https://github.com/purescript-spec/purescript-spec-discovery.git
...@@ -125,6 +130,7 @@ package: ...@@ -125,6 +130,7 @@ package:
- unordered-collections: ">=3.1.0 <4.0.0" - unordered-collections: ">=3.1.0 <4.0.0"
- unsafe-coerce: ">=6.0.0 <7.0.0" - unsafe-coerce: ">=6.0.0 <7.0.0"
- uri: ">=9.0.0 <10.0.0" - uri: ">=9.0.0 <10.0.0"
- url-validator
- uuid: ">=9.0.0 <10.0.0" - uuid: ">=9.0.0 <10.0.0"
- validation: ">=6.0.0 <7.0.0" - validation: ">=6.0.0 <7.0.0"
- var - var
......
...@@ -22,6 +22,7 @@ import Gargantext.Components.NgramsTable.AutoSync (useAutoSync) ...@@ -22,6 +22,7 @@ import Gargantext.Components.NgramsTable.AutoSync (useAutoSync)
import Gargantext.Components.Node (NodePoly(..)) import Gargantext.Components.Node (NodePoly(..))
import Gargantext.Core.NgramsTable.Functions (addNewNgramA, applyNgramsPatches, coreDispatch, findNgramRoot, setTermListA, computeCache) import Gargantext.Core.NgramsTable.Functions (addNewNgramA, applyNgramsPatches, coreDispatch, findNgramRoot, setTermListA, computeCache)
import Gargantext.Core.NgramsTable.Types (CoreAction(..), NgramsTerm, Versioned(..), replace) import Gargantext.Core.NgramsTable.Types (CoreAction(..), NgramsTerm, Versioned(..), replace)
import Gargantext.Hooks.LinkHandler (useLinkHandler)
import Gargantext.Hooks.Loader (useLoader) import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Sessions (Session) import Gargantext.Sessions (Session)
import Gargantext.Utils as U import Gargantext.Utils as U
...@@ -29,6 +30,7 @@ import Gargantext.Utils.Reactix as R2 ...@@ -29,6 +30,7 @@ import Gargantext.Utils.Reactix as R2
import Reactix as R import Reactix as R
import Reactix.DOM.HTML as H import Reactix.DOM.HTML as H
import Record as Record import Record as Record
import Text.URL.Validate as TUV
import Toestand as T import Toestand as T
------------------------------------------------------------------------- -------------------------------------------------------------------------
...@@ -91,6 +93,8 @@ layoutWithContextNgramsCpt = here.component "layoutWithContextNgrams" cpt where ...@@ -91,6 +93,8 @@ layoutWithContextNgramsCpt = here.component "layoutWithContextNgrams" cpt where
-- | States -- | States
-- | -- |
{ goToURLInNewTab } <- useLinkHandler
contextNgramsS <- T.useBox contextNgrams contextNgramsS <- T.useBox contextNgrams
contextNgrams' <- T.useLive T.unequal contextNgramsS contextNgrams' <- T.useLive T.unequal contextNgramsS
...@@ -282,83 +286,131 @@ layoutWithContextNgramsCpt = here.component "layoutWithContextNgrams" cpt where ...@@ -282,83 +286,131 @@ layoutWithContextNgramsCpt = here.component "layoutWithContextNgrams" cpt where
[ [
annotate doc.title annotate doc.title
] ]
-- ,
-- btnSeeMore "title"
] ]
,
H.hr {}
, ,
R2.fromMaybe doc.authors \authors -> R2.fromMaybe doc.authors \authors ->
H.div H.div
{ className: "document-layout__authors justify-content-space-between" } { className: "document-layout__hdata justify-content-space-between" }
[ [
B.div' B.div'
{ className: "document-layout__authors__label" } { className: "document-layout__hdata__label" }
"Authors" "Authors"
, ,
H.div B.div'
{ className: "document-layout__authors__content w-100" -- <> collapsibleClasses { className: "document-layout__hdata__content w-100"
, id: getIdName "authors" } , id: getIdName "authors" }
[ authors
-- @NOTE #386: annotate for "Authors" ngrams list
annotate (Just authors)
]
-- ,
-- btnSeeMore "authors"
] ]
, ,
R2.fromMaybe doc.source \source -> R2.fromMaybe doc.source \source ->
H.div H.div
{ className: "document-layout__source justify-content-space-between" } { className: "document-layout__hdata justify-content-space-between" }
[ [
B.div' B.div'
{ className: "document-layout__source__label" } { className: "document-layout__hdata__label" }
"Source" "Source"
, ,
B.div' B.div'
{ className: "document-layout__source__content w-100" -- <> collapsibleClasses { className: "document-layout__hdata__content w-100"
, id: getIdName "sources" } , id: getIdName "sources" }
source source
-- ,
-- btnSeeMore "sources"
] ]
, ,
H.div H.div
{ className: "document-layout__date" } { className: "document-layout__hdata" }
[ [
B.div' B.div'
{ className: "document-layout__date__label" } { className: "document-layout__hdata__label" }
"Date" "Date"
, ,
B.div' B.div'
{ className: "document-layout__date__content" } { className: "document-layout__hdata__content" }
(publicationDate $ Document doc) (publicationDate $ Document doc)
] ]
,
, R2.fromMaybe doc.institutes \institutes -> R2.fromMaybe doc.institutes \institutes ->
H.div H.div
{ className: "document-layout__institutes justify-content-space-between" } { className: "document-layout__hdata justify-content-space-between" }
[ [
B.div' B.div'
{ className: "document-layout__institutes__label" } { className: "document-layout__hdata__label" }
"Institutes" "Institutes"
, ,
H.div B.div'
{ className: "document-layout__institutes__content w-100" -- <> collapsibleClasses { className: "document-layout__hdata__content w-100"
, id: getIdName "institutes" } , id: getIdName "institutes" }
[ institutes
annotate (Just institutes)
]
-- , -- ,
-- btnSeeMore "institutes" -- btnSeeMore "institutes"
] ]
,
R2.fromMaybe doc.doi \doi ->
, case path.mCorpusId of H.div
Nothing -> H.div {} [] { className: "document-layout__hdata justify-content-space-between" }
Just corpusId -> ratingSimpleLoader { docId: path.nodeId [
, corpusId H.div
, session: path.session } [] { className: "document-layout__hdata__label" }
[
R2.acronym { title: "Digital object identifier" } [ H.text "DOI" ]
]
,
H.div
{ className: "document-layout__hdata__content w-100"
, id: getIdName "doi" }
[
if (TUV.validateURL doi) then
H.a {classname: "", on: { click: goToURLInNewTab $ doi }}
[
H.text doi
, H.i { className: "fa fa-external-link mx-1 small" } []
]
else
H.text doi
]
]
,
R2.fromMaybe doc.bdd \bdd ->
H.div
{ className: "document-layout__hdata justify-content-space-between" }
[
B.div'
{ className: "document-layout__hdata__label" }
"Data source"
,
B.div'
{ className: "document-layout__hdata__content w-100"
, id: getIdName "bdd" }
bdd
]
,
H.div
{ className: "document-layout__hdata" }
[
B.div'
{ className: "document-layout__hdata__label" }
"Tag"
,
case path.mCorpusId of
Nothing -> H.div {} []
Just corpusId -> ratingSimpleLoader { docId: path.nodeId
, corpusId
, session: path.session } []
]
-- , case path.mCorpusId of
-- Nothing -> H.div {} []
-- Just corpusId -> ratingSimpleLoader { docId: path.nodeId
-- , corpusId
-- , session: path.session } []
,
H.hr {}
, ,
R2.when hasAbstract $ R2.when hasAbstract $
...@@ -390,19 +442,5 @@ publicationDate (Document {publication_year: Just py, publication_month: Nothing ...@@ -390,19 +442,5 @@ publicationDate (Document {publication_year: Just py, publication_month: Nothing
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: 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) 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)
-- btnSeeMore :: String -> R.Element
-- btnSeeMore idStr =
-- H.a { role: "button"
-- , className: "collapsed btn-seemore text-primary"
-- , data: { toggle: "collapse" }
-- , aria: { expanded: false, controls: getIdName idStr }
-- , href: "#" <> getIdName idStr
-- }
-- [ H.text "" ]
getIdName :: String -> String getIdName :: String -> String
getIdName str = "annotated-field-expand__" <> str getIdName str = "annotated-field-expand__" <> str
-- collapsibleClasses :: String
-- collapsibleClasses = " annotated-field-expand collapse"
...@@ -88,7 +88,7 @@ actionDownloadNodeList = R.createElement actionDownloadNodeListCpt ...@@ -88,7 +88,7 @@ actionDownloadNodeList = R.createElement actionDownloadNodeListCpt
actionDownloadNodeListCpt :: R.Component ActionDownload actionDownloadNodeListCpt :: R.Component ActionDownload
actionDownloadNodeListCpt = here.component "actionDownloadNodeList" cpt where actionDownloadNodeListCpt = here.component "actionDownloadNodeList" cpt where
cpt { id, session } _ = do cpt { id, session } _ = do
downloadFormat <- T.useBox NL_JSON_ZIP downloadFormat <- T.useBox NL_JSON
downloadFormat' <- T.useLive T.unequal downloadFormat downloadFormat' <- T.useLive T.unequal downloadFormat
pure $ pure $
......
...@@ -78,6 +78,7 @@ inputWithAutocompleteCpt = here.component "inputWithAutocomplete" cpt ...@@ -78,6 +78,7 @@ inputWithAutocompleteCpt = here.component "inputWithAutocomplete" cpt
, on: { focus: onFocus completions state' , on: { focus: onFocus completions state'
, input: onInput completions , input: onInput completions
, change: onInput completions , change: onInput completions
, keyDown: onInputKeyDown inputRef
, keyUp: onInputKeyUp inputRef , keyUp: onInputKeyUp inputRef
, blur: onBlur completions containerRef , blur: onBlur completions containerRef
} }
...@@ -140,7 +141,16 @@ inputWithAutocompleteCpt = here.component "inputWithAutocomplete" cpt ...@@ -140,7 +141,16 @@ inputWithAutocompleteCpt = here.component "inputWithAutocomplete" cpt
R2.blur input R2.blur input
pure false pure false
else else
pure $ false pure false
onInputKeyDown :: R.Ref (Nullable DOM.Element) -> DE.KeyboardEvent -> Effect Boolean
onInputKeyDown _ e = do
if DE.key e == "Enter" then do
R2.preventDefault e
R2.stopPropagation e
pure false
else
pure false
--------------------------------------------------------- ---------------------------------------------------------
......
...@@ -664,7 +664,7 @@ ngramsTableOrderWith orderBy = ...@@ -664,7 +664,7 @@ ngramsTableOrderWith orderBy =
-- This is used to *decorate* the Select header with the checkbox. -- This is used to *decorate* the Select header with the checkbox.
wrapColElts scProps _ (TT.ColumnName "Select") = const [NTSC.selectionCheckbox scProps] wrapColElts scProps _ (TT.ColumnName "Select") = const [NTSC.selectionCheckbox scProps]
wrapColElts _ scoreType (TT.ColumnName "Score") = (_ <> [H.text (" (" <> show scoreType <> ")")]) wrapColElts _ scoreType (TT.ColumnName "Score") = (_ <> [H.text (" (occurrences)")])
wrapColElts _ _ _ = identity wrapColElts _ _ _ = identity
type MkDispatchProps = type MkDispatchProps =
......
...@@ -119,5 +119,5 @@ nodeCpt = R2.hereComponent here "node" hCpt where ...@@ -119,5 +119,5 @@ nodeCpt = R2.hereComponent here "node" hCpt where
] ]
_ -> H.p _ -> H.p
{ className: "text-center pt-10" } { className: "text-center pt-10" }
[ H.text "Phylo not generated yet, please update the node settings to see your phylonometry." ] [ H.text "Phylo not generated yet, please update the node settings to see your phylomemy." ]
} }
...@@ -2062,7 +2062,9 @@ function setGroup(g, xScale, yScale, wScale) { ...@@ -2062,7 +2062,9 @@ function setGroup(g, xScale, yScale, wScale) {
fdt = lines[i].fdt, fdt = lines[i].fdt,
roles = lines[i].role, roles = lines[i].role,
terms = mergeLists(words,fdt,roles), terms = mergeLists(words,fdt,roles),
toSpan = (acc, w) => acc + "<tspan fdt=" + w[1] toSpan = (acc, w, index) => {
let separator = index < terms.length - 1 ? "<tspan class='separator'> | </tspan>" : "";
return acc + "<tspan fdt=" + w[1]
+ " class='term fdt-" + w[1] + " " + "g-" + g.gId + findRole(w[2]) + "'" + " class='term fdt-" + w[1] + " " + "g-" + g.gId + findRole(w[2]) + "'"
+ " gy=" + yScale(g.to) + " gy=" + yScale(g.to)
+ " gx=" + xScale(g.x) + " gx=" + xScale(g.x)
...@@ -2071,7 +2073,9 @@ function setGroup(g, xScale, yScale, wScale) { ...@@ -2071,7 +2073,9 @@ function setGroup(g, xScale, yScale, wScale) {
+ " gid=" + g.gId + " gid=" + g.gId
+ " bid=" + g.bId + " bid=" + g.bId
+ " from=" + (g.to).getFullYear() + " from=" + (g.to).getFullYear()
+ ">" + w[0] + "</tspan>"; + ">" + w[0] + "</tspan>"
+ separator;
};
panel panel
.append("text") .append("text")
......
...@@ -761,8 +761,8 @@ tableCpt = here.component "table" cpt ...@@ -761,8 +761,8 @@ tableCpt = here.component "table" cpt
cs = cs =
wrapColElts c $ wrapColElts c $
case state.orderBy of case state.orderBy of
Just (ASC d) | c == d -> [lnk (Just (DESC c)) "ASC " , lnk Nothing (columnName c)] Just (ASC d) | c == d -> [lnk (Just (DESC c)) ("ASC " <> (columnName c))]
Just (DESC d) | c == d -> [lnk (Just (ASC c)) "DESC ", lnk Nothing (columnName c)] Just (DESC d) | c == d -> [lnk (Just (ASC c)) ("DESC " <> (columnName c))]
_ -> [lnk (Just (ASC c)) (columnName c)] _ -> [lnk (Just (ASC c)) (columnName c)]
pure $ container pure $ container
{ pageSizeControl: sizeDD { params } { pageSizeControl: sizeDD { params }
......
...@@ -229,6 +229,9 @@ named = flip $ defineProperty "name" ...@@ -229,6 +229,9 @@ named = flip $ defineProperty "name"
overState :: forall t. (t -> t) -> R.State t -> Effect Unit overState :: forall t. (t -> t) -> R.State t -> Effect Unit
overState f (_state /\ setState) = setState f overState f (_state /\ setState) = setState f
acronym :: ElemFactory
acronym = createDOM "acronym"
small :: ElemFactory small :: ElemFactory
small = createDOM "small" small = createDOM "small"
......
...@@ -15,7 +15,7 @@ $document-container-width: 780px ...@@ -15,7 +15,7 @@ $document-container-width: 780px
justify-content: space-between justify-content: space-between
padding: $card-spacer-y $card-spacer-x padding: $card-spacer-y $card-spacer-x
border-bottom: 1px solid $border-color border-bottom: 1px solid $border-color
margin-bottom: $card-spacer-y // margin-bottom: $card-spacer-y
&__main-controls &__main-controls
display: flex display: flex
...@@ -57,41 +57,25 @@ $document-container-width: 780px ...@@ -57,41 +57,25 @@ $document-container-width: 780px
font-weight: bold font-weight: bold
line-height: 1.4 line-height: 1.4
word-wrap: break-word word-wrap: break-word
margin-bottom: space-x(3) // margin-bottom: space-x(3)
font-family: $headings-font-family font-family: $headings-font-family
&__authors &__hdata
display: flex
margin-bottom: space-x(0.5)
&__label
font-weight: bold
flex-basis: $label-column-size
flex-shrink: 0
font-size: 15px
&__content
line-height: 1.2
color: $gray-800
&__source,
&__institutes,
&__date
display: flex display: flex
margin-bottom: space-x(0.5) margin-bottom: space-x(0.5)
line-height: 1.3em
font-size: 15px
&__label &__label
font-weight: bold font-weight: bold
flex-basis: $label-column-size flex-basis: $label-column-size
flex-shrink: 0 flex-shrink: 0
font-size: 15px
&__content &__content
font-size: 15px
color: $gray-600 color: $gray-600
&__abstract &__abstract
margin-top: space-x(4) margin-top: space-x(3)
margin-bottom: space-x(3) margin-bottom: space-x(3)
&__content &__content
......
...@@ -209,7 +209,10 @@ $decreasing-color: #11638F; ...@@ -209,7 +209,10 @@ $decreasing-color: #11638F;
.term:hover { .term:hover {
font-weight: bold; font-weight: bold;
} }
.separator {
fill: $graph-heading-color;
}
// .term-unfocus { // .term-unfocus {
// fill: #A9A9A9; // fill: #A9A9A9;
// } // }
......
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