diff --git a/.env.sample b/.env.sample index 94f4a336b..e8c76bf36 100644 --- a/.env.sample +++ b/.env.sample @@ -8,7 +8,7 @@ UI_URL=http://localhost:3000 API_URL=http://localhost:9393 API_KEY= -UI_THEME=ontoportal +UI_THEME=bioportal BIOMIXER_URL= BIOMIXER_APIKEY= diff --git a/Gemfile b/Gemfile index ebdc80a74..9e0a86931 100644 --- a/Gemfile +++ b/Gemfile @@ -104,7 +104,7 @@ gem 'flag-icons-rails', '~> 3.4' gem 'iso-639', '~> 0.3.6' # Custom API client -gem 'ontologies_api_client', git: 'https://github.com/ontoportal-lirmm/ontologies_api_ruby_client.git', branch: 'development' +gem 'ontologies_api_client', git: 'https://github.com/ontoportal-lirmm/ontologies_api_ruby_client.git', branch: 'master' # Ruby 2.7.8 pinned gems (to remove when migrating to Ruby >= 3.0) gem 'ffi', '~> 1.16.3' diff --git a/Gemfile.lock b/Gemfile.lock index af6435fba..604a4594a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GIT remote: https://github.com/ontoportal-lirmm/ontologies_api_ruby_client.git - revision: abea6c217c0ee93bcfd80c47c2af52747365d491 - branch: development + revision: 24fb2549f7b69841e052491439bc8375ed5acfd9 + branch: master specs: ontologies_api_client (2.2.0) activesupport @@ -82,31 +82,30 @@ GEM i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - addressable (2.8.6) - public_suffix (>= 2.0.2, < 6.0) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) aes_key_wrap (1.1.0) - airbrussh (1.5.2) + airbrussh (1.5.3) sshkit (>= 1.6.1, != 1.7.0) ast (2.4.2) autoprefixer-rails (10.4.19.0) execjs (~> 2) base64 (0.2.0) bcrypt_pbkdf (1.1.1) - bcrypt_pbkdf (1.1.1-x86_64-darwin) bigdecimal (3.1.8) bindata (2.5.0) bindex (0.8.1) - bootsnap (1.18.3) + bootsnap (1.18.4) msgpack (~> 1.2) bootstrap (5.2.3) autoprefixer-rails (>= 9.1.0) popper_js (>= 2.11.6, < 3) sassc-rails (>= 2.0.0) brakeman (5.4.1) - bugsnag (6.27.0) + bugsnag (6.27.1) concurrent-ruby (~> 1.0) builder (3.3.0) - capistrano (3.18.1) + capistrano (3.19.1) airbrussh (>= 1.0.0) i18n rake (>= 10.0.0) @@ -136,28 +135,30 @@ GEM xpath (~> 3.2) chart-js-rails (0.1.7) railties (> 3.1) - childprocess (5.0.0) + childprocess (5.1.0) + logger (~> 1.5) coderay (1.1.3) - concurrent-ruby (1.3.3) + concurrent-ruby (1.3.4) crack (1.0.0) bigdecimal rexml crass (1.0.6) css_parser (1.17.1) addressable + csv (3.3.0) dalli (3.2.8) date (3.3.4) debug (1.9.2) irb (~> 1.10) reline (>= 0.3.8) - deepl-rb (2.5.3) + deepl-rb (3.0.2) diff-lcs (1.5.1) - docile (1.4.0) + docile (1.4.1) domain_name (0.6.20240107) ed25519 (1.3.0) erubi (1.13.0) erubis (2.7.0) - excon (0.110.0) + excon (0.112.0) execjs (2.9.1) faraday (2.0.1) faraday-net_http (~> 2.0) @@ -177,7 +178,7 @@ GEM activesupport (>= 6.1) graphql (2.0.31) base64 - graphql-client (0.22.0) + graphql-client (0.23.0) activesupport (>= 3.0) graphql (>= 1.13.0) haml (5.2.2) @@ -188,7 +189,7 @@ GEM activesupport (>= 5.1) haml (>= 4.0.6) railties (>= 5.1) - hashdiff (1.1.0) + hashdiff (1.1.1) hashie (5.0.0) highline (2.1.0) html2haml (2.3.0) @@ -199,9 +200,9 @@ GEM htmlbeautifier (1.4.3) htmlentities (4.3.4) http-accept (1.7.0) - http-cookie (1.0.6) + http-cookie (1.0.7) domain_name (~> 0.5) - i18n (1.14.5) + i18n (1.14.6) concurrent-ruby (~> 1.0) i18n-tasks (0.9.37) activesupport (>= 4.0.2) @@ -223,10 +224,11 @@ GEM activesupport (>= 3.0) nokogiri (>= 1.6) io-console (0.7.2) - irb (1.13.1) + irb (1.14.1) rdoc (>= 4.0.0) reline (>= 0.4.2) - iso-639 (0.3.6) + iso-639 (0.3.8) + csv jquery-rails (4.6.0) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) @@ -243,7 +245,7 @@ GEM bindata faraday (~> 2.0) faraday-follow_redirects - jwt (2.8.1) + jwt (2.9.3) base64 language_server-protocol (3.17.0.3) launchy (3.0.1) @@ -259,6 +261,7 @@ GEM listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) + logger (1.6.1) loofah (2.22.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) @@ -284,23 +287,23 @@ GEM marcel (1.0.4) matrix (0.4.2) method_source (1.1.0) - mime-types (3.5.2) + mime-types (3.6.0) + logger mime-types-data (~> 3.2015) - mime-types-data (3.2024.0604) + mime-types-data (3.2024.1001) mini_mime (1.1.5) - minitest (5.23.1) - msgpack (1.7.2) + minitest (5.25.1) + msgpack (1.7.3) multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.4.1) - mutex_m (0.2.0) mysql2 (0.5.6) net-ftp (0.2.1) net-protocol time net-http (0.3.2) uri - net-imap (0.4.12) + net-imap (0.4.16) date net-protocol net-pop (0.1.2) @@ -313,12 +316,10 @@ GEM net-ssh (>= 5.0.0, < 8.0.0) net-smtp (0.5.0) net-protocol - net-ssh (7.2.3) + net-ssh (7.3.0) netrc (0.11.0) - newrelic_rpm (9.10.2) + newrelic_rpm (9.14.0) nio4r (2.7.3) - nokogiri (1.15.6-x86_64-darwin) - racc (~> 1.4) nokogiri (1.15.6-x86_64-linux) racc (~> 1.4) oauth2 (2.0.9) @@ -328,8 +329,9 @@ GEM rack (>= 1.2, < 4) snaky_hash (~> 2.0) version_gem (~> 1.1) - oj (3.16.4) + oj (3.16.6) bigdecimal (>= 3.0) + ostruct (>= 0.2) omniauth (2.1.2) hashie (>= 3.4.6) rack (>= 2.2.3) @@ -337,8 +339,8 @@ GEM omniauth-github (2.0.1) omniauth (~> 2.0) omniauth-oauth2 (~> 1.8) - omniauth-google-oauth2 (1.1.2) - jwt (>= 2.0) + omniauth-google-oauth2 (1.2.0) + jwt (>= 2.9) oauth2 (~> 2.0) omniauth (~> 2.0) omniauth-oauth2 (~> 1.8) @@ -356,8 +358,9 @@ GEM omniauth-rails_csrf_protection (1.0.2) actionpack (>= 4.2) omniauth (~> 2.0) - parallel (1.25.1) - parser (3.3.3.0) + ostruct (0.6.0) + parallel (1.26.3) + parser (3.3.5.0) ast (~> 2.4.1) racc popper_js (2.11.8) @@ -366,10 +369,10 @@ GEM method_source (~> 1.0) psych (5.1.2) stringio - public_suffix (5.0.5) - puma (5.6.8) + public_suffix (5.1.1) + puma (5.6.9) nio4r (~> 2.0) - racc (1.8.0) + racc (1.8.1) rack (2.2.9) rack-protection (3.2.0) base64 (>= 0.1.0) @@ -418,22 +421,21 @@ GEM json redcarpet (3.6.0) regexp_parser (2.9.2) - reline (0.5.9) + reline (0.5.10) io-console (~> 0.5) rest-client (2.1.0) http-accept (>= 1.7.0, < 2.0) http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) netrc (~> 0.8) - rexml (3.3.0) - strscan - rouge (4.3.0) - rspec-core (3.13.0) + rexml (3.3.8) + rouge (4.4.0) + rspec-core (3.13.1) rspec-support (~> 3.13.0) - rspec-expectations (3.13.1) + rspec-expectations (3.13.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-mocks (3.13.1) + rspec-mocks (3.13.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-rails (7.0.1) @@ -445,23 +447,22 @@ GEM rspec-mocks (~> 3.13) rspec-support (~> 3.13) rspec-support (3.13.1) - rubocop (1.64.1) + rubocop (1.66.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + regexp_parser (>= 2.4, < 3.0) + rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.31.3) + rubocop-ast (1.32.3) parser (>= 3.3.1.0) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) ruby_dig (0.0.2) - ruby_parser (3.21.0) + ruby_parser (3.21.1) racc (~> 1.5) sexp_processor (~> 4.16) rubyzip (2.3.2) @@ -480,7 +481,7 @@ GEM rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) - sexp_processor (4.17.1) + sexp_processor (4.17.2) simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) @@ -488,7 +489,7 @@ GEM simplecov-cobertura (2.1.0) rexml simplecov (~> 0.19) - simplecov-html (0.12.3) + simplecov-html (0.13.1) simplecov_json_formatter (0.1.4) snaky_hash (2.0.1) hashie @@ -501,24 +502,23 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) - sshkit (1.22.2) + sshkit (1.23.1) base64 - mutex_m net-scp (>= 1.1.2) net-sftp (>= 2.1.2) net-ssh (>= 2.8.0) - stimulus-rails (1.3.3) + ostruct + stimulus-rails (1.3.4) railties (>= 6.0.0) stringio (3.1.1) - strscan (3.1.0) temple (0.10.3) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) - terser (1.2.3) + terser (1.2.4) execjs (>= 0.3.0, < 3) - thor (1.3.1) - tilt (2.3.0) - time (0.3.0) + thor (1.3.2) + tilt (2.4.0) + time (0.4.0) date timeout (0.4.1) turbo-rails (2.0.10) @@ -526,8 +526,8 @@ GEM railties (>= 6.0.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.5.0) - uri (0.13.0) + unicode-display_width (2.6.0) + uri (0.13.1) version_gem (1.1.4) view_component (2.83.0) activesupport (>= 5.2.0, < 8.0) @@ -538,24 +538,21 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webmock (3.23.1) + webmock (3.24.0) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - websocket (1.2.10) + websocket (1.2.11) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) will_paginate (3.3.1) xpath (3.2.0) nokogiri (~> 1.8) - yard (0.9.36) - zeitwerk (2.6.15) + yard (0.9.37) + zeitwerk (2.6.18) PLATFORMS - x86_64-darwin-23 - x86_64-linux - x86_64-linux x86_64-linux-musl DEPENDENCIES @@ -632,4 +629,4 @@ DEPENDENCIES will_paginate (~> 3.0) BUNDLED WITH - 2.3.23 + 2.4.22 diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js index ec2fe8eb4..6240ea468 100644 --- a/app/assets/config/manifest.js +++ b/app/assets/config/manifest.js @@ -1,5 +1,9 @@ //= link_tree ../images +//= link_tree ../builds +//= link application.js +//= link bp_annotator.js +//= link bp_annotatorplus.js +//= link vendor.js +//= link_tree ../images //= link_directory ../javascripts .js //= link_directory ../stylesheets .css - -//= link_directory ../javascripts .js \ No newline at end of file diff --git a/app/assets/stylesheets/account.scss b/app/assets/stylesheets/account.scss index ade850735..f371532d9 100644 --- a/app/assets/stylesheets/account.scss +++ b/app/assets/stylesheets/account.scss @@ -1,264 +1,53 @@ - -.account-page-center { - display: flex; - justify-content: center; - margin: 30px 0; -} - -.account-page-center svg path { - fill: var(--primary-color) -} - -.clipboard .copy svg path { - fill: none; -} - -.account-page-title { - font-size: 18px; - font-weight: 700; -} - -.account-page-sub-container { - display: flex; -} - -.account-page-first-row { - width: 566px; - margin-right: 20px; -} - -.account-page-second-row { - width: 566px; -} - -#account-page-title-line { - width: 93px; - margin-top: 3px; - border: 0.5px solid var(--primary-color); - border-radius: 5px; - margin-bottom: 0px !important; -} - -.account-page-card { - border: 1px solid #DFDFDF; - border-radius: 5px; - padding: 20px 20px; - margin-top: 20px; -} - -.account-page-card-title { - font-size: 16px; - font-weight: 600; -} - -.account-page-personal-informations-title-bar { +.signup { display: flex; align-items: center; - justify-content: space-between; -} - -.account-page-rounded-button { - display: flex; justify-content: center; - border: 0.5px solid var(--primary-color); - padding: 10px; - border-radius: 50px; - width: 40px; -} - -.account-page-info-column { - display: flex; -} - -.account-page-info-column .title { - margin-right: 9px; - font-size: 15px; - color: #666666; + padding-top: 40px; + padding-bottom: 40px; } -.account-page-info-column .info { - font-size: 15px; - font-weight: 600; -} - -.account-page-card-desc { - font-size: 13px; - color: #666666; - margin: 8px 0; -} +.form-signup { + width: 100%; + max-width: 400px; + padding: 15px; + margin: 0 auto; -.apikey { - font-size: 17px; - font-weight: 600; -} - -.account-page-card-container { - display: flex; - justify-content: space-between; - align-items: center; -} + a { + text-decoration: none; + } -.account-page-no-ontology { - display: flex; - align-items: center; - justify-content: center; - flex-direction: column; - padding: 37px; -} + a:hover { + text-decoration: underline; + } -.account-page-no-ontology p { - color: #bbbbbb; - font-size: 16px; - margin: 26px 0; + h4, p { + text-align: center; + } } -.account-page-upload-ontology-button { - width: 220px; - font-size: 16px; - font-weight: 500; - color: var(--primary-color); - background-color: white; - padding: 16px; - border: 1px solid var(--primary-color); - border-radius: 5px; - text-align: center; +.form-signup .enable-lists { + color: red; } -.account-page-select-ontology-set-button { +.edit-user-info { display: flex; - justify-content: space-between; align-items: center; - width: 200px; - border: 1px solid var(--primary-color); - padding: 16px; - border-radius: 5px; - font-size: 16px; - font-weight: 500; - color: var(--primary-color); -} - -.account-page-select-ontology-set-button p { - margin-bottom: 0 !important; -} - -.account-page-api-documentation-link { - display: flex; - margin-top: 10px; -} - -.account-page-api-documentation-link a { - font-size: 15px; - font-weight: 500; - color: var(--primary-color); - text-decoration: none; -} - -.account-page-api-documentation-link a svg { - margin-left: 10px; - margin-bottom: 5px; -} - -.account-page-subscribe-button { - border: 1px solid var(--primary-color); - text-decoration: none; - color: var(--primary-color); - border-radius: 5px; - padding: 12px 20px; - font-size: 14px; - font-weight: 500; -} - -.account-page-subscription { - margin-top: 10px; - display: flex; - justify-content: space-between; -} - -.account-page-subscription a { - font-size: 15px; - font-weight: 400; - color: var(--primary-color); -} - -.account-page-subscription > div { - display: flex; -} - -.account-page-subscription div .notes { - margin-right: 23px; - color: #666666 !important; - font-weight: 400; -} - -.account-page-subscription div .subscribe_to_notes { - color: var(--error-color) !important; - font-weight: 400 !important; - border: unset !important; - background-color: unset !important; - vertical-align: top; - padding: unset !important; - box-shadow: unset !important; -} - -.account-page-small-cards-container { - display: flex; - flex-wrap: wrap; -} - -.account-page-submitted-ontology { - background-color: #F6F6F6; - padding: 10px; - border-radius: 5px; - margin-right: 10px; - margin-top: 10px; -} - -.account-page-submitted-ontology a { - color: #777777 !important; - font-weight: 500; - font-size: 15px; -} - -.no-margin { - margin: 0 !important; -} - -.change-password { - margin-top: 14px; - display: flex; justify-content: center; -} - -.account-page-custom-ontologies{ - display: flex; - flex-wrap: wrap; -} -.account-page-custom-ontologies > div{ - margin-right: 10px; -} - -@media only screen and (max-width: 1200px) { - .account-page-first-row { - width: 47vw; - margin-right: 20px; - } - - .account-page-second-row { - width: 47vw; + form { + width: 100%; + max-width: 640px; + padding: 15px; + margin: 0 auto; } } -@media only screen and (max-width: 950px) { - .account-page-first-row { - width: 80vw; - margin-right: 20px; +.account-info { + a { + text-decoration: none; } - .account-page-second-row { - width: 80vw; - } - .account-page-sub-container { - display: block; + a:hover { + text-decoration: underline; } } \ No newline at end of file diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index ec7bb5d67..91a93dda3 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -8,27 +8,6 @@ margin-bottom: 30px; } -.analytics { - .card-header-1{ - color: white; font-size: 60px; font-weight: 600; word-wrap: break-word - } - - .card-header-2{ - color: white; font-size: 14px; font-weight: 400; word-wrap: break-word - } - - .card-header-3{ - color: white; opacity: 0.6; font-size: 14px; font-weight: 400; word-wrap: break-word - } -} - -.yasgui .autocompleteWrapper, .yasgui .tabContextButton{ - display: none !important; -} -.yasqe .yasqe_buttons .yasqe_share{ - display: none !important; -} - .alert-box span { font-weight: bold; text-transform: uppercase; @@ -37,7 +16,6 @@ .error { background: #ffecec image-url("error.png") no-repeat 10px 50%; border: 1px solid #f5aca6; - padding-left: 30px; } .success { @@ -70,8 +48,8 @@ table.dataTable tbody tr.selected { } .ontologies_list_container { + width: 90%; padding: 1em; - position: relative; } /* Datatables */ @@ -129,7 +107,10 @@ table.dataTable tbody tr.selected { display: none; } - +/* to fix facebox default sizing in chrome */ +#facebox .body { + width: 375px !important; +} .zebra td { padding: 8px 12px 8px 12px !important; @@ -153,13 +134,10 @@ table.dataTable tbody tr.selected { } .site-admin-page-section { + display: flex; margin-top: 15px; + .admin-action-item { margin-right: 8px; } } - -div.groupFormError { - color: red; - padding-top: 3px; -} \ No newline at end of file diff --git a/app/assets/stylesheets/agent_tooltip.scss b/app/assets/stylesheets/agent_tooltip.scss deleted file mode 100644 index 7460f746e..000000000 --- a/app/assets/stylesheets/agent_tooltip.scss +++ /dev/null @@ -1,43 +0,0 @@ -.agent-container{ - display: flex; - align-items: center; - margin: 10px; -} -.agent-circle{ - width: 70px; - height: 70px; - background-color: var(--light-color); - display: flex; - justify-content: center; - align-items: center; - border-radius: 35px; - margin-right: 12px; -} -.agent-name{ - font-size: 18px; - font-weight: 600; - margin-bottom: 3px; -} -.agent-dependency{ - font-size: 16px; - font-weight: 400; - color: #767676; - margin-bottom: 5px; - display: flex; - align-items: center; -} -.agent-type-icon path{ - fill: var(--primary-color) -} -.agent-dependency-icon{ - width: 20px; - height: 20px; - margin-right: 5px; -} -.agent-dependency-icon.ror{ - width: 30px; - height: 30px; -} -.agent-dependency-icon path{ - fill: #C0C0C0 -} \ No newline at end of file diff --git a/app/assets/stylesheets/agents.scss b/app/assets/stylesheets/agents.scss deleted file mode 100644 index bed9b6b14..000000000 --- a/app/assets/stylesheets/agents.scss +++ /dev/null @@ -1,53 +0,0 @@ -.agents-inputs input { - @extend .form-control !optional; - height: 100% !important; -} -.agent-chip{ - display: flex; - justify-content: center; - align-items: center; -} - -.agent-chip-circle svg{ - height: 15px; -} - -.agent-chip-circle{ - height: 30px; - width: 30px; - background-color: rgba(128, 128, 128, 0.08); - border-radius: 15px; - display: flex; - justify-content: center; - align-items: center; - margin-right:10px; -} - -.agent-chip-name{ - color: #8C8E8D; - font-size: 15px; -} -.agent-edit-icon{ - display: flex !important; - flex-direction: column; - justify-content: center; -} -.agent-input-with-icon{ - padding: 8px; - margin-bottom: 0px; - border-radius: 5px; - width: 100%; - color: #5f6573; - outline: none; - font-size: 15px; - font-weight: 500; - border: 1px solid #d7d7d7; - padding-left: 45px; -} -.agent-input-icon{ - height: 20px; - width: 20px; - position: absolute; - padding: 11px 17px; - box-sizing: unset; -} \ No newline at end of file diff --git a/app/assets/stylesheets/annotator.scss b/app/assets/stylesheets/annotator.scss index 8cb42cc98..d8f27811c 100644 --- a/app/assets/stylesheets/annotator.scss +++ b/app/assets/stylesheets/annotator.scss @@ -1,236 +1,74 @@ -.annotator-page-container{ - display:flex; - justify-content:center; -} -.annotator-page-container a{ - color: var(--primary-color) !important; -} -.annotator-page-subcontainer{ - width: 1248px; - padding: 20px 50px; -} -.annotator-page-title{ - font-size: 25px; - font-weight: 700; -} -.annotator-page-title .line{ - height: 2px; - width: 57px; - background-color: var(--primary-color); - border-radius: 10px; -} -.annotator-page-decription{ - color: #888888; - margin-top: 20px; -} -.annotator-page-inputs{ - margin-top: 20px; -} -.annotator-page-inputs .inputs{ - display: flex; -} -.annotator-page-text-area{ - box-shadow: 2px 30px 60px rgba(0, 0, 0, 0.1); - border-radius: 8px; - width: 630px; - margin-right: 30px; -} -.annotator-page-text-area textarea{ - font-size: 16px; - outline: none; - padding: 20px; - width: 630px; - border: none; - margin-right: 30px; -} -.annotator-page-text-area .insert-sample-text-button{ - display: flex; - justify-content: flex-end; - padding: 10px 20px 20px 20px; -} -.annotator-page-text-area .insert-sample-text-button .button{ - display: flex; - align-items: center; -} -.annotator-page-text-area .insert-sample-text-button .button:hover{ - cursor: pointer; -} -.annotator-page-text-area .insert-sample-text-button .button .text{ - font-size: 14px; - font-weight: 500; - color: var(--primary-color); - margin-right: 10px; -} -.annotator-page-text-area .insert-sample-text-button .button svg{ - width: 16px; - height: 16px; -} -.annotator-page-text-area .insert-sample-text-button .button svg path{ - fill: var(--primary-color); -} -.annotator-page-options{ - width: 100%; +select#semantic_types + .chosen-container { + display: block; } -.annotator-page-options .section-text{ - font-weight: 600; - -} -.annotator-page-options .title{ - margin-top: 10px; - color: #888888; - font-size: 14px; - font-weight: 500; - margin-bottom: 5px; +div#annotations_filter, div#annotations_info { + display: none; } -.annotator-page-options .chips{ - display: flex; -} -.annotator-page-options input{ - accent-color: var(--primary-color) revert; -} -.annotator-page-options .radios{ - display: flex; +.result_count { + font-weight: bold; } -.annotator-page-options .advanced-options-button{ - display: flex; - align-items: center; - margin-top: 15px; -} -.annotator-page-options .advanced-options-button:hover{ - cursor: pointer; -} -.annotator-page-options .advanced-options-button .text{ - margin-left: 10px; - color: var(--primary-color); - font-size: 14px; +#annotations th { + padding-right: 6px; } -.annotator-page-options .advanced-options-button svg path{ - fill: var(--primary-color); -} -.annotator-page-button{ - margin-top: 27px; - width: 630px; +#annotations span[class="popup_container"] { + padding-left: 1.7em; } -.annotator-page-options .chips{ - display: flex; - flex-wrap: wrap; -} -.annotator-page-options .select-ontologies{ - margin: 10px 0; -} -.annotator-page-options .preftitle{ - font-size: 14px; - color: #666666; - margin-bottom: 5px; -} -.annotator-page-container .advanced-options-button{ - color: var(--primary-color); - font-size: 14px; - margin-top: 5px !important; -} -.annotator-page-container .advanced-options-button:hover{ - cursor: pointer; -} -.annotator-page-container .advanced-options-button svg{ - margin-left: 5px; -} -.annotator-page-container .advanced-options-button svg path{ - fill: var(--primary-color); -} -.annotator-page-container .advanced-options-button.hide-button svg{ - transform: scaleY(-1); -} -.annotation-context{ +#annotator_parameters { color: gray; - font-weight: 400; -} -.annotator-page-container .highlighted-annotation{ - color: black; - font-weight: 600; -} -.annotator-page-results .cont{ - margin-top: 40px; - display: flex; - justify-content: space-between; - align-items: center; -} -.annotator-page-results .title{ - font-size: 18px; - font-weight: 600; -} -.annotator-page-results .details{ - color: #888888; -} -.annotator-page-container .more-advanced-options{ - margin-top: 20px; -} -.annotator-page-container .more-advanced-options .filters_line{ - display: flex; - margin-top: 20px; -} -.annotator-page-container .more-advanced-options .filters_line div{ - width: 100%; -} - -.annotator-page-container .more-advanced-options .filters_line > :not(:first-child) { - margin-left: 20px; -} -.annotator-page-container .more-advanced-options .chips{ - display: flex; - margin-top: 20px; -} -.annotation-parent{ - display: flex; - white-space: nowrap; -} -.annotation-parent div, .annotation-parent a{ - margin-right: 11px; -} -.annotation-parent .text{ - margin-right: 8px; + font-weight: bold; } -.annotation-parent a{ - text-decoration: underline !important; -} -.annotator-page-options .prefrences{ +#annotations_container { + display: none; margin-top: 10px; + margin-bottom: 25px; } -.annotation-parent .level{ - font-weight: 600; - color: var(--primary-color); -} -.annotation-parent .gray{ - color: #888888; -} -.annotator-table-container{ - margin-top: 20px; -} -.annotator-table-container .class{ - width: 250px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} -.annotation-parent + div{ - margin-top: 5px; -} -.annotator-bottom-actions{ - margin-top: 20px; - display: flex; -} -.annotator-bottom-actions div{ - display: inline-block; -} -.annotator-bottom-actions div + div{ - margin-left: 20px; +#annotations_container #result_counts { + float: right; + font-style: oblique; + color: gray; } -.annotator-bottom-actions .rdf-button svg, .annotator-doc svg{ - width: 21px; + +#annotator-help i { + margin-left: .25em; } + +/* AnnotatorPlus */ + +.annotatorplus { + + #annotator-help > i.fa.fa-question-circle { + margin-left: .25em; + vertical-align: middle; + } + + #download_links { + margin-top: 1.5em; + } + + #annotator_parameters { + font-weight: normal; + } + + .annotator_spinner { + display: none; + + img { + margin-left: 3px; + vertical-align: middle; + } + } + + .annotator_error { + color: red; + font-style: italic; + margin-left: 3px; + vertical-align: middle; + } +} \ No newline at end of file diff --git a/app/assets/stylesheets/application.css.scss.erb b/app/assets/stylesheets/application.css.scss.erb index e0aa57263..22e10b56f 100755 --- a/app/assets/stylesheets/application.css.scss.erb +++ b/app/assets/stylesheets/application.css.scss.erb @@ -11,12 +11,17 @@ *= require jquery-ui *= require alertify *= require chosen + *= require facebox + *= require fg.menu *= require jquery-ui-1.8.1.custom *= require jquery.autocomplete + *= require jquery.tooltip + *= require thickbox + *= require select2 *= require trumbowyg *= require flag-icon *= require theme-variables - *=// require summary + * */ /* BioPortal */ @@ -32,42 +37,15 @@ @import "notes"; @import "notice"; @import "ontologies"; -//@import "recommender"; -//@import "search"; -//@import "submissions"; -@import "ontolobridge"; -//@import "fair_assement"; -//@import "instances_table"; -@import "register"; -@import "lostpassword"; -@import "flatpickr/dist/themes/light"; -@import "tom-select/dist/scss/tom-select"; -@import "tippy.js/dist/tippy"; -@import 'tippy.js/themes/light-border'; -@import '@triply/yasgui/build/yasgui.min'; -//@import 'highlight.js/styles/default.min'; -@import 'highlight.js/styles/intellij-light'; -@import "feedback"; -@import "login"; -@import "components/index"; -//@import "account"; -//@import "agents"; -//@import "upload_ontology"; -//@import "edit-ontology"; -@import "nav_bar"; -@import "ontology_details_header"; +@import "recommender"; +@import "search"; +@import "submissions"; +@import "tree"; @import "ontology_viewer"; -//@import "browse"; -//@import "agent_tooltip"; -//@import "content_finder"; -//@import "tools"; - +@import "components/index"; /* Bootstrap and Font Awesome */ -@import "bootstrap/scss/bootstrap"; +@import "bootstrap"; @import "bootstrap_overrides"; -<%# if (ui_theme = $UI_THEME.to_s.parameterize).present? && File.exists?(Rails.root.join('app', 'assets', 'stylesheets', 'themes', ui_theme)) %> -// @import "themes/<%#= ui_theme %>/main"; -<%# end %> diff --git a/app/assets/stylesheets/bioportal.scss b/app/assets/stylesheets/bioportal.scss index fa91d59b6..2c10770ed 100644 --- a/app/assets/stylesheets/bioportal.scss +++ b/app/assets/stylesheets/bioportal.scss @@ -130,8 +130,13 @@ body{ } #bd { - background: #fff; + background: white; +} + +.ontologies.show #bd{ + background: #e9ecef; } + #bd > hr { border:0; height:1px; @@ -367,6 +372,159 @@ table.align-right th:nth-child(2) { border-top: 1px solid #C1DAD7; } +/* Tree view */ +/******************** +## TREE VIEW +*********************/ +div.tree_error { + background: none repeat scroll 0 0 lightYellow; + font-weight: 600; + padding: 5px 10px; +} + +.expansion_error { + color: red; + font-size: x-small; + font-style: oblique; + padding: 0 3px; +} + +#bd ul.simpleTree li{ + margin-left:-10px; +} + +#bd ul.simpleTree{ + margin-left:0px; + margin-bottom:0px; +} + +.simpleTree { + margin:0; + padding:0; + /* + overflow:auto; + width: 250px; + height:350px; + overflow:auto; + border: 1px solid #444444; + */ +} +.simpleTree li { + list-style: none; + margin:0; + padding:0 0 0 22px; + line-height: 14px; +} +.simpleTree li span { + display:inline; + clear: left; + white-space: nowrap; +} +.simpleTree ul { + margin:0; + padding:0; +} +.simpleTree .root ul { + margin:0; +} +.simpleTree .root { + margin-left:-16px; + /*background: url(/images/tree/root.gif) no-repeat 16px 0 #ffffff;*/ +} +.simpleTree .line { + margin:0 0 0 -16px; + padding:0; + line-height: 3px; + height:3px; + font-size:3px; + background: image-url('jquery.simple.tree/line_bg.gif') 0 0 no-repeat transparent; +} +.simpleTree .line-last { + margin:0 0 0 -16px; + padding:0; + line-height: 3px; + height:3px; + font-size:3px; + background: image-url('jquery.simple.tree/spacer.gif') 0 0 no-repeat transparent; +} +.simpleTree .line-over { + margin:0 0 0 -16px; + padding:0; + line-height: 3px; + height:3px; + font-size:3px; + background: image-url('jquery.simple.tree/line_bg_over.gif') 0 0 no-repeat transparent; +} +.simpleTree .line-over-last { + margin:0 0 0 -16px; + padding:0; + line-height: 3px; + height:3px; + font-size:3px; + background: image-url('jquery.simple.tree/line_bg_over_last.gif') 0 0 no-repeat transparent; +} +.simpleTree .folder-open { + margin-left:-16px; + background: image-url('jquery.simple.tree/collapsable.gif') 0 -2px no-repeat #fff; +} +.simpleTree .folder-open-last { + margin-left:-16px; + background: image-url('jquery.simple.tree/collapsable-last.gif') 0 -2px no-repeat #fff; +} +.simpleTree .folder-close { + margin-left:-16px; + background: image-url('jquery.simple.tree/expandable.gif') 0 -2px no-repeat #fff; +} +.simpleTree .folder-close-last { + margin-left:-16px; + background: image-url('jquery.simple.tree/expandable-last.gif') 0 -2px no-repeat #fff; +} +.simpleTree .doc { + margin-left:-16px; + background: image-url('jquery.simple.tree/leaf.gif') 0 -1px no-repeat #fff; +} +.simpleTree .doc-last { + margin-left:-16px; + background: image-url('jquery.simple.tree/leaf-last.gif') 0 -1px no-repeat #fff; +} +.simpleTree .ajax { + background: image-url('jquery.simple.tree/spinner.gif') no-repeat 0 0 #ffffff; + height: 16px; + display:none; +} +.simpleTree .ajax li { + display:none; + margin:0; + padding:0; +} +.simpleTree .trigger { + display:inline; + margin-left:-32px; + width: 28px; + height: 11px; + cursor:pointer; +} +.simpleTree .text { + cursor: default; + padding: 0 2px; +} +.simpleTree .active { + cursor: default; + background-color: #B9D5E4; + font-weight: bold; + padding-top: 0px; + padding-right: 2px; + padding-bottom: 0px; + padding-left: 2px; +} +.simpleTree a, .simpleTree a:hover { + text-decoration: none; + color: black; +} +.simpleTree a:hover { + cursor: pointer; +} + /* Notes*/ .notetype { @@ -834,6 +992,29 @@ div#topNavigationToggler { border: none; } +#ontology_picker_container div.chzn-container { + width: 432px !important; +} + +#ontology_picker_container div.chzn-container-active ul.chzn-choices li.search-field input { + font-style: normal !important; +} + +#ontology_picker_container div.chzn-container ul.chzn-choices { + max-height: 110px; + overflow: auto !important; +} + +#ontology_picker_container div.chzn-container li.search-field input { + font-style: oblique; +} + +#ontology_picker_container div.chzn-drop { + display: none; +} + + + .no_right_border { border-right: none !important; } diff --git a/app/assets/stylesheets/bootstrap_overrides.scss b/app/assets/stylesheets/bootstrap_overrides.scss index 4257c1e9e..5ee4161af 100644 --- a/app/assets/stylesheets/bootstrap_overrides.scss +++ b/app/assets/stylesheets/bootstrap_overrides.scss @@ -1,6 +1,11 @@ /* Style for Bootstrap sticky footer https://getbootstrap.com/docs/5.2/examples/sticky-footer-navbar/ -------------------------------------------------- */ +.nav-tabs { + --bs-nav-tabs-link-active-color: white; + --bs-nav-tabs-link-active-bg: #234979; +} + main > .container-fluid { padding: 80px 15px 0; } @@ -18,7 +23,7 @@ body{ flex-direction: column; height: 100vh; } -/* Footer +/* Footer -------------------------------------------------- */ footer.footer h6 { font-weight: bold; @@ -34,8 +39,8 @@ footer.footer .list-inline-item:not(:last-child) { @media only screen and (max-width: 992px) { body { - margin-bottom: 350px; - } + margin-bottom: 350px; + } .footer { height: 350px; } diff --git a/app/assets/stylesheets/browse.scss b/app/assets/stylesheets/browse.scss deleted file mode 100644 index 2dc96db26..000000000 --- a/app/assets/stylesheets/browse.scss +++ /dev/null @@ -1,656 +0,0 @@ - -.browse-container p { - margin: unset; -} - -.browse-container h2 { - margin: unset; - line-height: unset; -} - -.browse-container hr { - margin: unset; -} - -.browse-center { - display: flex; - justify-content: center; - margin: 20px 50px 50px; -} - -.browse-title { - font-size: 22px; - font-weight: 700; -} - -.browse-submit-new-ontology-and-you-are-admin-container { - display: flex; - justify-content: center; - margin-bottom: 20px; - padding: 20px; - & > div { - display: flex; - flex-direction: column; - align-items: center; - border-radius: 5px; - border: 1px solid #DFDFDF; - } - -} - -.browse-desc-text { - font-size: 16px; - color: #666666; - font-weight: 400; - margin: 5px 0 !important; - overflow: hidden; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: var(--read-more-line-clamp, 2); -} - - -.browse-you-are-admin { - display: flex; - flex-direction: column; - align-items: center; - padding: 20px; - div { - display: flex; - align-items: center; - } -} - -.browse-you-are-admin h3 { - font-size: 20px; - font-weight: 600; - -} - -.browse-you-are-admin div p { - margin-left: 20px; -} - -.browse-upload-ontology-button { - margin: 20px 0; - display: flex; - justify-content: space-between; - align-items: center; - font-size: 15px; - font-weight: 500; - color: var(--primary-color); - width: 226px; - padding: 15px 25px; - border: 1px solid var(--primary-color); - border-radius: 40px; -} - -.browse-show-more-button { - cursor: pointer; - font-size: 14px; - color: gray; - margin-bottom: 10px; -} - -.browse-ontology-container { - border: 1px solid #DFDFDF; - border-radius: 5px; - padding: 15px 20px; - margin-bottom: 20px; - position: relative; - box-shadow: rgba(100, 100, 111, 0.08) 0 7px 29px 0; -} - -.browse-ontology-description { - width: 540px; -} - -.browse-ontology-title { - color: var(--primary-color) !important; - font-weight: 600; - font-size: 18px; -} - -.browse-fair { - display: flex; - align-items: center; - justify-content: space-between; - width: 400px; -} - -.browse-sub-container { - display: flex; -} - -.browse-first-row { - width: 300px; - margin-right: 35px; - - .pill-button { - width: 100%; - justify-content: center; - } -} - -.browse-second-row { - width: 828px; - - .browse-ontologies { - margin-top: 90px; - } - -} - -#browse-title-line { - width: 55px; - margin-top: 3px; - border: 0.5px solid var(--primary-color); - border-radius: 5px; -} - -.browse-fair-title { - font-size: 16px; - color: #666666; - font-weight: 400; -} - -.browse-progress-bar { - width: 154px; - height: 10px; - border-radius: 20px; - background-color: #E7E7E7; - -} - -.browse-faire-progress { - width: 100%; - height: 10px; - background-color: var(--primary-color); - border-radius: 20px 0px 0px 20px; -} - -.browse-fair-score { - font-size: 14px; - font-weight: 500; - color: #666666; -} - -.browse-fair-details { - font-size: 14px; - font-weight: 400; - color: var(--primary-color) !important; -} - -.browse-uploaded { - font-size: 13px; - height: 37px; - max-width: 400px; - background-color: var(--light-color); - border-radius: 5px; - display: flex; - padding: 2px 15px; - justify-content: space-between; - align-items: center; - color: var(--primary-color); - margin-top: 15px; -} - -.browse-uploaded-date { - white-space: nowrap; -} - -.browse-ontology-cards { - display: grid; - grid-template-columns: 113px 113px; - grid-template-rows: min-content; - grid-column-gap: 15px; - grid-row-gap: 15px; - direction: rtl; -} - -.browse-onology-card { - border: 0.5px solid var(--primary-color); - border-radius: 5px; - height: 70px; - width: 100px; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - color: var(--primary-color) !important; -} - -.browse-card-number { - font: 17px; - font-weight: 700; -} - -.browse-card-text { - font-size: 15px; - font-weight: 500; -} - -#browse-sub-title-line { - width: 20px; - margin-top: 3px; - border: 0.5px solid var(--primary-color); - border-radius: 5px; - margin-bottom: 15px; -} - -.browse-filters-title { - font-weight: 600; - font-size: 16px; - text-decoration: underline; - text-underline-offset: 12px; - text-decoration-color: var(--primary-color); - text-decoration-thickness: 2px; - margin-bottom: 13px !important; -} - -.browse-search-bar { - display: flex; - -} - -.browse-search-bar input { - border-radius: 14px; - box-shadow: rgba(100, 100, 111, 0.08) 0 7px 29px 0; - border: none; - // border: 1px solid #dee2e6; - padding: 20px 20px; - margin-bottom: 20px; - font-size: 16px; - position: absolute; - width: 828px; - z-index: 1; - -} - -.browse-search-bar input:focus { - box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px; - outline: none; -} - -.browse-search-bar select { - border: none; - background-color: white; - padding: 20px 20px; - margin: 1px; - font-size: 16px; - background-image: url("data:image/svg+xml;utf8,"); - -webkit-appearance: none; - -moz-appearance: none; - background-repeat: no-repeat; - background-position-x: 90%; - background-position-y: 50%; - -} - -.browse-search-bar select:focus { - outline: none; - box-shadow: rgba(100, 100, 111, 0.1) 0px 7px 29px 0px; -} - -.browse-search-bar .browse-format-filter { - position: absolute; - margin-left: 500px; - z-index: 2; - width: 150px; -} - -.browse-search-bar .browse-sort-by-filter { - position: absolute; - margin-left: 632px; - z-index: 2; - width: 200px; - border-radius: 0 14px 14px 0; -} - -.browse-search-button { - margin-left: 85%; - display: flex; - align-items: center; - justify-content: center; - - border-radius: 14px; - padding: 20px; - background-color: var(--primary-color); - width: 160px; - height: 62px; - cursor: pointer; -} - -.browse-search-button p { - font-size: 16px; - color: white; - margin-left: 15px; -} - -.browse-filter { - border: 1px solid #DFDFDF; - border-radius: 5px; - padding: 14px 20px; - margin-bottom: 12px; - box-shadow: rgba(100, 100, 111, 0.08) 0 7px 29px 0; - .switch-filter{ - justify-content: space-between; - margin-bottom: 23px; - } -} - - -.align-alert{ - justify-content: center; - display: flex; -} - -.browse-filter-checks-container { - display: flex; - flex-wrap: wrap; - margin-top: 10px; - - div { - display: grid; - flex-grow: 1; - } - - .spinner-border-sm{ - width: 0.75rem; - height: 0.75rem; - } -} - -.browse-filter-title-bar { - display: flex; - align-items: center; - justify-content: space-between; - font-size: 14px; - font-weight: 400; - color: #666666; - cursor: pointer; -} - -.browse-ontology-title-bar { - display: flex; - align-items: center; -} - -.browse-ontology-deprecated { - background-color: #EB433521; - color: var(--error-color); - padding: 10px; - font-size: 14px; - border-radius: 8px; - margin-left: 15px; - margin-right: 15px; - font-weight: 500; -} - -.browse-ontology-view { - background-color: var(--light-color); - color: var(--primary-color); - padding: 10px; - font-size: 14px; - border-radius: 8px; - margin-left: 15px; - font-weight: 500; -} - -.browse-switch-filter { - display: flex; - align-items: center; - justify-content: space-between; - margin-bottom: 20px; -} - -.browse-switch-filter p { - font-size: 16px; - color: #666666; -} - - -.browse-ontology-title-bar { - display: flex; - align-items: center; -} - -.browse-ontology-deprecated { - background-color: #EB433521; - color: var(--error-color); - padding: 10px; - font-size: 14px; - border-radius: 8px; - margin-left: 15px; - font-weight: 500; -} - -.browse-ontology-view { - background-color: var(--light-color); - color: var(--primary-color); - padding: 10px; - font-size: 14px; - border-radius: 8px; - margin-left: 15px; - font-weight: 500; -} - - -.browse-empty-illustration { - margin-top: 100px; - display: flex; - justify-content: center; - align-items: center; - flex-direction: column; -} - -.browse-empty-illustration p { - font-size: 16px; - color: #B8B8B8; - font-weight: 500; - margin-top: 10px; -} - - -@media only screen and (max-width: 1250px) { - .browse-first-row { - width: 24vw; - margin-right: 20px; - } - - .browse-second-row { - width: 68vw; - } - .browse-search-bar input { - width: 94vw; - } - .browse-search-bar .browse-format-filter { - margin-left: 50% - } - .browse-search-bar .browse-sort-by-filter { - margin-left: 65% - } - -} - -@media only screen and (max-width: 1005px) { - .browse-sub-container { - display: block; - } - .browse-second-row { - width: 94vw; - } - .browse-first-row { - width: 94vw; - } - .browse-search-bar input { - position: static; - margin-bottom: 1vw; - } - .browse-search-bar .browse-format-filter { - margin-left: 0; - position: static; - border-radius: 14px; - width: 46.5vw; - box-shadow: rgba(100, 100, 111, 0.1) 0px 7px 29px 0px; - margin-right: 1vw; - } - .browse-search-bar .browse-sort-by-filter { - margin-left: 0; - position: static; - border-radius: 14px; - width: 46vw; - box-shadow: rgba(100, 100, 111, 0.1) 0px 7px 29px 0px; - } - - .browse-sub-container { - margin-top: 20px; - } - .browse-center { - margin-left: 20px; - } -} - -@media only screen and (max-width: 893px) { - .browse-ontology-container { - display: block; - } - .browse-ontology-description { - width: 100%; - } - .browse-ontology-cards { - direction: ltr; - margin-top: 20px; - } - .browse-ontology-deprecated { - margin-right: 0; - } - .browse-ontology-view { - margin-right: 0; - } - -} - - -// Browser loader skeleton - -.browse-sket { - display: flex; -} - -.browse-sket-column-one { - margin-right: 37px; -} - -.browse-sket-column-one .one { - width: 525px; - height: 50px; - background: linear-gradient(-90deg, #EEE, #F5F5F5, #EEE); - border-radius: 5px; - margin-bottom: 15px; - background-size: 400% 400%; - animation: skeleton 3s ease-in-out infinite; -} - -.browse-sket-column-one .two { - width: 525px; - height: 44px; - background: linear-gradient(-90deg, #EEE, #F5F5F5, #EEE); - border-radius: 5px; - margin-bottom: 15px; - background-size: 400% 400%; - animation: skeleton 3s ease-in-out infinite; -} - -.browse-sket-column-one .three { - width: 525px; - height: 18px; - background: linear-gradient(-90deg, #EEE, #F5F5F5, #EEE); - border-radius: 5px; - margin-bottom: 15px; - background-size: 400% 400%; - animation: skeleton 3s ease-in-out infinite; -} - -.browse-sket-column-one .four { - width: 160px; - height: 36px; - background: linear-gradient(-90deg, #EEE, #F5F5F5, #EEE); - border-radius: 5px; - background-size: 400% 400%; - animation: skeleton 3s ease-in-out infinite; -} - -.browse-sket-column-two { - margin-right: 15px; -} - -.browse-sket-column-two .one { - width: 113px; - height: 78px; - background: linear-gradient(-90deg, #EEE, #F5F5F5, #EEE); - border-radius: 5px; - margin-bottom: 15px; - background-size: 400% 400%; - animation: skeleton 3s ease-in-out infinite; -} - -.browse-sket-column-two .two { - width: 113px; - height: 78px; - background: linear-gradient(-90deg, #EEE, #F5F5F5, #EEE); - border-radius: 5px; - margin-bottom: 15px; - background-size: 400% 400%; - animation: skeleton 3s ease-in-out infinite; -} - -.browse-sket-column-three .one { - width: 113px; - height: 78px; - background: linear-gradient(-90deg, #EEE, #F5F5F5, #EEE); - border-radius: 5px; - margin-bottom: 15px; - background-size: 400% 400%; - animation: skeleton 3s ease-in-out infinite; -} - -.browse-sket-column-three .two { - width: 113px; - height: 78px; - background: linear-gradient(-90deg, #EEE, #F5F5F5, #EEE); - border-radius: 5px; - margin-bottom: 15px; - background-size: 400% 400%; - animation: skeleton 3s ease-in-out infinite; -} - -@keyframes skeleton { - 0% { - background-position: 0 0; - } - 100% { - background-position: 400% 0; - - } - - -} - - -#back_top_btn { - position: fixed; - bottom: 30px; - right: 30px; - transition: background-color .3s, - opacity .5s, visibility .5s; - opacity: 0; - visibility: hidden; - z-index: 1000; -} - - -#back_top_btn.show { - opacity: 1; - visibility: visible; -} \ No newline at end of file diff --git a/app/assets/stylesheets/components/card.scss b/app/assets/stylesheets/components/card.scss deleted file mode 100644 index 825f227cf..000000000 --- a/app/assets/stylesheets/components/card.scss +++ /dev/null @@ -1,5 +0,0 @@ -.summary-card { - border: 1px solid #dfdfdf; - border-radius: 5px; - margin-top: 20px; -} \ No newline at end of file diff --git a/app/assets/stylesheets/components/card_message.scss b/app/assets/stylesheets/components/card_message.scss deleted file mode 100644 index 9d3332a1c..000000000 --- a/app/assets/stylesheets/components/card_message.scss +++ /dev/null @@ -1,44 +0,0 @@ -.card-message-card{ - margin-top: 30px; - padding: 37px 41px; - box-shadow: rgba(0, 0, 0, 0.05) 0px 20px 50px; - border-radius: 14px; -} -.card-message-title{ - font-size: 19px; - text-align: center; - margin-bottom: 10px; - font-weight: 700; -} -.card-message-text{ - text-align: center; - width: 310px; - font-size: 14px; - font-weight: 500; - margin-bottom: 21px; -} -.card-message-button{ - padding: 16px; - border-radius: 9px; - display: flex; - justify-content: center; - align-items: center; - cursor: pointer; - text-decoration: none !important; -} -.card-message-button-success{ - color: var(--primary-color); - border: 1px solid var(--primary-color); -} -.card-message-button-failure{ - color: #EE404C !important; - border: 1px solid #EE404C; -} -.card-message-button-warning { - color: #ff6700 !important; - border: 1px solid #ff6700; -} -.card-message-has-title{ - color: #666666; - font-weight: 400; -} diff --git a/app/assets/stylesheets/components/chip_button.scss b/app/assets/stylesheets/components/chip_button.scss deleted file mode 100644 index 1b19a2981..000000000 --- a/app/assets/stylesheets/components/chip_button.scss +++ /dev/null @@ -1,36 +0,0 @@ -.chip_button_container { - background-color: #f6f6f6; - padding: 10px; - border-radius: 5px; - color: #777777 !important; - font-weight: 500; - font-size: 15px; - line-height: 44px; - display: inline; -} -.chip-button-component-container { - display: inline-block; -} -.chip-button-component-container svg path{ - fill: var(--primary-color); -} - -.chip_button_small { - font-size: 12px !important; - padding: 5px !important; - line-height: unset !important; -} - -.chip_button_container_clickable { - background-color: var(--light-color); - line-height: 44px; - padding: 10px; - border-radius: 5px; - color: var(--primary-color); - font-weight: 500; - font-size: 15px; - display: inline; -} -.chip_button_container_clickable a{ - color: var(--primary-color); -} diff --git a/app/assets/stylesheets/components/chips.scss b/app/assets/stylesheets/components/chips.scss deleted file mode 100644 index ac1a2a939..000000000 --- a/app/assets/stylesheets/components/chips.scss +++ /dev/null @@ -1,45 +0,0 @@ -.chips-container > div{ - margin-right: 10px; -} - -.chips-container svg path{ - fill: var(--primary-color); -} -.chips-check-icon{ - margin-left: 6px; - margin-right: 6px; - display: none; -} - - -.chips-container div label{ - cursor: pointer; -} -.chips-container div label input[type="checkbox"]{ - display: none; -} -.chips-container div label > span{ - position: relative; - display: flex; - align-items: center; - background:white; - border: 0.5px solid #BDBDBD; - color: #a7a7a7; - padding: 8px; - border-radius: 5px; - font-size: 13px; - user-select: none; - -} -.chips-container.disabled div label > span, .chips-container div label span:has(span.disabled){ - background-color: #f8f9fa !important; -} - -.chips-container div label input[type="checkbox"]:checked ~ span{ - border: 1px solid var(--primary-color); - color: var(--primary-color); -} - -.chips-container div label input[type="checkbox"]:checked ~ span .chips-check-icon{ - display:unset; -} \ No newline at end of file diff --git a/app/assets/stylesheets/components/circle_progress_bar.scss b/app/assets/stylesheets/components/circle_progress_bar.scss deleted file mode 100644 index 7c5095a64..000000000 --- a/app/assets/stylesheets/components/circle_progress_bar.scss +++ /dev/null @@ -1,26 +0,0 @@ -:root { - --circle-progress-bar-width: 50px; - --circle-progress-bar-height: 50px; -} - -.circular-progress { - width: var(--circle-progress-bar-width); - height: var(--circle-progress-bar-height); - border-radius: 50%; - display: flex; - justify-content: center; - align-items: center; - position: relative; -} -.inner-circle { - position: absolute; - width: 85%; - height: 85%; - border-radius: 50%; -} - -.percentage { - position: relative; - color: rgba(0, 0, 0, 0.8); - margin-bottom: 0; -} \ No newline at end of file diff --git a/app/assets/stylesheets/components/concept_details.scss b/app/assets/stylesheets/components/concept_details.scss deleted file mode 100644 index c61a0170a..000000000 --- a/app/assets/stylesheets/components/concept_details.scss +++ /dev/null @@ -1,13 +0,0 @@ -.concept_details_component .raw-table .dropdown-title-bar p { - color: var(--primary-color); - font-weight: 500; -} - - -.concept_details_component table th { - width: 220px; -} - -.concept_details_component td, .concept_details_component th{ - max-width: 200px; -} \ No newline at end of file diff --git a/app/assets/stylesheets/components/dropdown.scss b/app/assets/stylesheets/components/dropdown.scss deleted file mode 100644 index 9d325c5c7..000000000 --- a/app/assets/stylesheets/components/dropdown.scss +++ /dev/null @@ -1,21 +0,0 @@ -.dropdown-title-bar { - display: flex; - align-items: center; - font-weight: 550; - justify-content: space-between; - font-size: 16px; - color: #000000; - cursor: pointer; - padding: 0 14px 0 0; -} - -.dropdown-container { - border: 1px solid #dfdfdf; - border-radius: 5px; - margin-bottom: 20px; - margin-top: 20px; -} - -.dropdown-item-selected { - background-color: var(--light-color) !important; -} \ No newline at end of file diff --git a/app/assets/stylesheets/components/field_container.scss b/app/assets/stylesheets/components/field_container.scss deleted file mode 100644 index cd2b46ea7..000000000 --- a/app/assets/stylesheets/components/field_container.scss +++ /dev/null @@ -1,23 +0,0 @@ -.field-container { - margin-bottom: 0.5rem; -} - - -.field-description_text, -.field-description_text a { - color: #888888 !important; - font-size: 15px; - margin-bottom: 0; -} - -.field-description_text { - overflow: hidden; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: var(--read-more-line-clamp, 5); -} - -.field-normal_text { - font-size: 15px; - color: black; -} \ No newline at end of file diff --git a/app/assets/stylesheets/components/file_input_loader.scss b/app/assets/stylesheets/components/file_input_loader.scss deleted file mode 100644 index 029ab9f71..000000000 --- a/app/assets/stylesheets/components/file_input_loader.scss +++ /dev/null @@ -1,54 +0,0 @@ -.file_uploader { - color: #D7D7EF; - font-family: 'Lato', sans-serif; - border: 1px dashed #CFCFCF; - border-radius: 5px; -} - -.file-message { - display: flex; - margin-top: 10px; - font-size: 12px; - color: #888888; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.file_uploader>h2 { - margin: 50px 0; -} - -.file-drop-area { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - width: 100%; - padding: 25px; - transition: 0.2s; - position: relative; -} - -.choose-file-button { - flex-shrink: 0; - background-color: rgba(255, 255, 255, 0.04); - border: 1px solid rgba(255, 255, 255, 0.1); - border-radius: 3px; - padding: 8px 15px; - margin-right: 10px; - font-size: 12px; - text-transform: uppercase; -} - -.file-input { - height: 100%; - width: 100%; - cursor: pointer; - opacity: 0; - position: absolute; -} - -.file-drop-area svg path { - fill: #CECECE; -} \ No newline at end of file diff --git a/app/assets/stylesheets/components/header.scss b/app/assets/stylesheets/components/header.scss deleted file mode 100644 index ed8152788..000000000 --- a/app/assets/stylesheets/components/header.scss +++ /dev/null @@ -1,16 +0,0 @@ -.header-component { - display: flex; - align-items: center; - margin-bottom: 5px; - font-weight: 550; - justify-content: space-between; - font-size: 16px; - color: #000000; - cursor: pointer; - width: 100%; - padding: 14px 20px; - position: relative; - p { - margin-bottom: 0; - } -} \ No newline at end of file diff --git a/app/assets/stylesheets/components/image.scss b/app/assets/stylesheets/components/image.scss deleted file mode 100644 index 97414ab03..000000000 --- a/app/assets/stylesheets/components/image.scss +++ /dev/null @@ -1,22 +0,0 @@ -.image-container { - position: relative; - .image-content{ - width: 100%; - object-fit: scale-down; - margin-bottom: 30px; - } - .loop_icon { - position: absolute; - width: 50px; - background-color: white; - box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08); - border-radius: 50%; - display: flex; - align-items: center; - justify-content: center; - height: 50px; - padding: 10px; - bottom: 0; - right: 0; - } -} \ No newline at end of file diff --git a/app/assets/stylesheets/components/index.scss b/app/assets/stylesheets/components/index.scss index 62355eb78..4fc890935 100644 --- a/app/assets/stylesheets/components/index.scss +++ b/app/assets/stylesheets/components/index.scss @@ -1,37 +1,4 @@ -@import 'chips'; -@import 'card_message'; -@import "notification"; -@import 'chip_button'; -@import 'rounded_button'; -@import 'summary_section'; -@import 'dropdown'; -@import 'field_container'; -@import 'modal'; -@import 'search_input'; -@import 'nested_form'; -@import 'circle_progress_bar'; -@import 'input_field'; -@import 'file_input_loader'; -@import 'text_area_field'; @import 'regular_button'; @import 'tabs_container'; -@import 'pill_tabs_container'; -@import 'outline_tabs_container'; -@import 'pill_button'; -@import "switch"; -@import "table"; -@import "concept_details"; -@import "card"; -@import "header"; -@import "image"; -@import "alert"; -@import "progress_pages"; -@import "select"; -@import "radio"; -@import "progress_bar"; -@import "search_result"; -@import "range_slider"; -@import "ontologies_selector"; @import "loader"; -@import "vertical_tabs"; -@import "tree_view"; \ No newline at end of file +@import "alert"; diff --git a/app/assets/stylesheets/components/input_field.scss b/app/assets/stylesheets/components/input_field.scss deleted file mode 100644 index fff132fc5..000000000 --- a/app/assets/stylesheets/components/input_field.scss +++ /dev/null @@ -1,36 +0,0 @@ -.input-field-component { - width: 100%; - font-size: 13px; - padding: 10px; - border: 1px solid #BDBDBD; - border-radius: 5px; - outline: none; - resize: none; -} - -.input-field-component:focus { - border: 1px solid var(--primary-color); -} - -.text-input-label { - font-size: 14px; - color: #666666; - margin-bottom: 5px; - img { - width: 15px; - height: 15px; - vertical-align: text-bottom; - } -} - -.text-input-error-text { - font-size: 12px; - color: var(--error-color) -} - -.text-input-helper-text { - font-size: 12px; - color: #666666; - margin-top: 5px; -} - diff --git a/app/assets/stylesheets/components/modal.scss b/app/assets/stylesheets/components/modal.scss deleted file mode 100644 index 2997e12e7..000000000 --- a/app/assets/stylesheets/components/modal.scss +++ /dev/null @@ -1,20 +0,0 @@ -.modal-content{ - border-radius: 20px !important; -} - -.modal-title { - text-align: center; - flex: 1px; -} - -.close { - margin-left: 0px; - &:focus{ - outline: none; - } -} - -.shape { - border-radius: 50% !important; - width: 35px; -} \ No newline at end of file diff --git a/app/assets/stylesheets/components/nested_form.scss b/app/assets/stylesheets/components/nested_form.scss deleted file mode 100644 index 4bb85ba8d..000000000 --- a/app/assets/stylesheets/components/nested_form.scss +++ /dev/null @@ -1,55 +0,0 @@ -.nested-form-input-container .titles{ - display: flex; - font-size: 14px; - color: #666666; - margin-bottom: 5px; - width: 90%; - img { - width: 15px; - height: 15px; - vertical-align: text-bottom; - } -} - - -.nested-form-input-container input:focus{ - border: 1px solid var(--primary-color) !important; -} - -.nested-form-input-container .delete{ - display: flex; - border: 1px dashed #BDBDBD; - justify-content: center; - align-items: center; - height: 43px; - width: 43px; - border-radius: 5px; - cursor: pointer; -} - -.nested-form-input-container .add-another-object{ - border: 1px dashed #BDBDBD; - border-radius: 5px; - display: flex; - justify-content: center; - align-items: center; - padding: 10px; - cursor: pointer; - margin-top: 10px; -} -.nested-form-input-container .add-another-object svg path{ - fill: #DADADA; -} -.nested-form-input-container .add-another-object div{ - color: #DADADA; - margin-left: 10px; -} - - - - - - - - - diff --git a/app/assets/stylesheets/components/notification.scss b/app/assets/stylesheets/components/notification.scss deleted file mode 100644 index fafecc190..000000000 --- a/app/assets/stylesheets/components/notification.scss +++ /dev/null @@ -1,146 +0,0 @@ -.notification { - display: flex; - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 50; - padding: 1.5rem 1rem; - justify-content: center; - align-items: flex-end; - pointer-events: none; - transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform; - transition-duration: 1000ms; - transform: translateX(1rem); - opacity: 0; - @media (min-width: 640px) { - padding: 4rem 1.5rem 1.5rem; - justify-content: flex-end; - align-items: flex-start; - } -} - - -.notification-inner { - overflow: hidden; - padding: 1rem; - background-color: #ffffff; - width: 100%; - max-width: 24rem; - border-radius: 0.5rem; - pointer-events: auto; - box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); -} - -.notification-content { - display: flex; - align-items: flex-start; -} - -.notification-content svg { - width: 1.5rem; - height: 1.5rem; -} - -.notification-text { - padding-top: 0.125rem; - margin-left: 0.75rem; - flex: 1 1 0; - width: 0; -} - -.notification-text p:first-of-type { - color: #111827; - font-size: 0.875rem; - line-height: 1.25rem; - font-weight: 500; -} - -.notification-text p:last-of-type { - margin-top: 0.25rem; - color: #6B7280; - font-size: 0.875rem; - line-height: 1.25rem; -} - -.notification-close { - display: inline-flex; - background-color: #ffffff; - color: #9CA3AF; - border: none; - cursor: pointer; -} - -.notification-close svg { - height: 1rem; - outline: none; -} - -.type-success path { - fill: #14a38c; -} - -.type-error { - path:first-of-type { - fill: #f44336; - } - - path { - fill: white; - } -} - -.type-alert path { - fill: #edb464; -} - - -.slide-in-right { - animation-name: slide-in-right; - animation-duration: 0.5s; - animation-delay: 0.5s; - animation-timing-function: cubic-bezier(0.250, 0.460, 0.450, 0.940); - animation-fill-mode: forwards; -} - - -.slide-in-out-right { - animation-name: slide-in-right, slide-out-right; - animation-duration: 0.5s, 0.5s; - animation-delay: 0.5s, 5s; - animation-timing-function: cubic-bezier(0.250, 0.460, 0.450, 0.940), cubic-bezier(0.550, 0.085, 0.680, 0.530); - animation-fill-mode: forwards, forwards; -} - - -@keyframes slide-in-right { - 0% { - transform: translateX(1rem); - opacity: 0; - } - 50% { - opacity: 0.4; - } - 100% { - transform: translateX(0); - opacity: 1; - } -} - -@keyframes slide-out-right { - 0% { - transform: translateX(0); - opacity: 1; - } - 50% { - opacity: 0.4; - } - 100% { - transform: translateX(1rem); - opacity: 0; - } -} - - - diff --git a/app/assets/stylesheets/components/ontologies_selector.scss b/app/assets/stylesheets/components/ontologies_selector.scss deleted file mode 100644 index 3b431afa5..000000000 --- a/app/assets/stylesheets/components/ontologies_selector.scss +++ /dev/null @@ -1,137 +0,0 @@ -.ontologies-selector-container{ - width: 800px; - padding: 0 10px; - -} -.ontologies-selector-input{ - position: relative; - padding-bottom: 70px; -} -.ontologies-selector-input input{ - width: 100%; - font-size: 15px; - padding: 15px 20px; - border-radius: 8px; - border: 1px solid #DCDCDC; - outline: none; - position: absolute; -} -.ontologies-selector-input input:focus{ - border: 1px solid #a6a6a6; -} -.ontologies-selector-input svg{ - position: absolute; - top: 17px; - right: 20px; -} -.ontologies-selector-input svg path{ - fill: #a6a6a6; -} - -.ontologies-selector-options .nav-item{ - margin-right: 0px !important; -} -.ontologies-selector-options .tab-items{ - width: 100%; - justify-content: space-between; -} -.ontologies-selector-options .tab-link{ - padding: 0 10px; -} -.ontologies-selector-options .chips{ - margin-top: 10px; - display: flex; - flex-wrap: wrap; -} -.horizontal-line{ - margin: 10px 0; - width: 100%; - height: 1px; - background-color: #d7d7d7; - border-radius: 100%; -} - -.ontologies-selector-results .chips-container div label > span{ - font-size: 16px; - padding: 10px 15px; -} -.ontologies-selector-results label{ - width: 100% -} -.ontologies-selector-results .chips-container > div{ - margin-right: 0; -} -.ontologies-selector-results .ontologies svg{ - display: none !important; -} -.ontologies-selector-results .ontologies{ - max-height: 300px; - overflow-y: scroll; -} -.save-cancel-buttons{ - display: flex; - justify-content: center; - margin-top: 20px; -} -.ontologies-selector-results .button{ - width: 200px; -} -.ontologies-selector-results .button + .button{ - margin-left: 20px -} -.switch-filters { - display: flex; -} -.switch-filters > div{ - display: flex; - padding: 15px 20px; - border: 1px solid #d7d7d7; - border-radius: 8px; - margin-bottom: 20px; - color: #666666; -} -.switch-filters > div + div{ - margin-left: 20px; -} - -.switch-filters .text{ - margin-right: 20px -} - -.ontologies-selector-results .results-number{ - color: #A1A1A1; - margin: 10px 0; -} -.ontologies-selector-results .results-number span{ - color: var(--primary-color); -} -.ontologies-selector-button{ - display: flex; - justify-content: end; - align-items: center; -} -.ontologies-selector-button .clear-selection{ - margin-top: 5px; - font-size: 15px; - color: var(--primary-color); - margin-right: 20px; - cursor: pointer; -} -.ontologies-selector-button a{ - color: var(--primary-color) !important; - margin-top: 5px; - font-size: 15px; -} -.ontologies-selector-button a svg{ - display: none; -} -.ontologies-selector-button a span{ - display: none; -} - -.ontologies-selector-results .select-all{ - cursor: pointer; -} -.ontologies-selector-button a{ - margin-right: 0; -} \ No newline at end of file diff --git a/app/assets/stylesheets/components/outline_tabs_container.scss b/app/assets/stylesheets/components/outline_tabs_container.scss deleted file mode 100644 index 76c390d92..000000000 --- a/app/assets/stylesheets/components/outline_tabs_container.scss +++ /dev/null @@ -1,27 +0,0 @@ - -.outline-tabs{ - border: 1px solid rgba(0, 0, 0, 0.125); - border-radius: 0.25rem 0.25rem 0 0; - padding-top: 1rem; -} -.outline-tabs .tab-items .nav-item{ - margin-right: 0; - -} - -.outline-tabs .tab-items .nav-item.active a{ - color: var(--primary-color) !important; -} - -.outline-tabs .nav-item .tab-link{ - display: block; - padding: 0 1rem 0.2rem 1rem; -} - -.outline-tabs + .tab-content { - .tab-pane{ - border: 1px solid rgba(0, 0, 0, 0.125); - border-top: none ; - border-radius: 0 0 0.25rem 0.25rem; - } -} \ No newline at end of file diff --git a/app/assets/stylesheets/components/pill_button.scss b/app/assets/stylesheets/components/pill_button.scss deleted file mode 100644 index c47e4ea27..000000000 --- a/app/assets/stylesheets/components/pill_button.scss +++ /dev/null @@ -1,37 +0,0 @@ -.pill-button { - font-size: 15px; - display: flex; - align-items: center; - border: 1px solid var(--primary-color); - border-radius: 32px; - padding: 10px 20px; - cursor: pointer; - transition: background-color ease 0.3s; - white-space: nowrap; - background-color: transparent; - &:focus{ - outline: none; - } - a{ - color: var(--primary-color) !important; - } -} - -.pill-button:hover { - background-color: var(--primary-color); - color: white !important; - a { - color: white !important; - } - div { - color: white !important; - } -} - -.pill-button:hover svg path { - fill: white; -} - -.pill-button svg { - margin-right: 10px; -} \ No newline at end of file diff --git a/app/assets/stylesheets/components/pill_tabs_container.scss b/app/assets/stylesheets/components/pill_tabs_container.scss deleted file mode 100644 index e03697544..000000000 --- a/app/assets/stylesheets/components/pill_tabs_container.scss +++ /dev/null @@ -1,22 +0,0 @@ -.pill-tabs-container { - display: flex; - justify-content: space-between; -} - -.pill-tabs-container .tab-items{ - margin-bottom: 10px; -} - -.pill-tabs-container .nav-item { - display: block; - padding: 0.2rem 1rem; -} - -.pill-tabs-container .nav-item.active { - border-radius: 5px; - background-color: var(--primary-color); - color: white !important; - a { - color: white !important; - } -} \ No newline at end of file diff --git a/app/assets/stylesheets/components/primary_button.scss b/app/assets/stylesheets/components/primary_button.scss deleted file mode 100644 index 5e534fecd..000000000 --- a/app/assets/stylesheets/components/primary_button.scss +++ /dev/null @@ -1,101 +0,0 @@ -.button-container{ - width: 100%; -} -.primary-button { - width: 100%; - display: flex; - justify-content: center; - align-items: center; - font-size: 16px; - color: white; - height: 60px; - background-color: var(--primary-color); - border: none; - border-radius: 9px; - transition: background-color ease 0.3s; -} -.primary-button:hover { - background-color: var(--hover-color); - cursor: pointer; -} - - -.animation-container{ - width: 100%; - height: 60px; - font-size: 16px; - background-color: var(--hover-color); - border: none; - border-radius: 9px; - justify-content: center; - align-items: center; - display: none; - -} -.lds-ellipsis { - display: inline-block; - position: relative; - margin-top: 50px; - width: 80px; - height: 80px; - transform: scale(0.7); -} - -.lds-ellipsis div { - position: absolute; - width: 13px; - height: 13px; - border-radius: 50%; - background: white; - animation-timing-function: cubic-bezier(0, 1, 1, 0); -} - -.lds-ellipsis div:nth-child(1) { - left: 8px; - animation: lds-ellipsis1 0.6s infinite; -} - -.lds-ellipsis div:nth-child(2) { - left: 8px; - animation: lds-ellipsis2 0.6s infinite; -} - -.lds-ellipsis div:nth-child(3) { - left: 32px; - animation: lds-ellipsis2 0.6s infinite; -} - -.lds-ellipsis div:nth-child(4) { - left: 56px; - animation: lds-ellipsis3 0.6s infinite; -} - -@keyframes lds-ellipsis1 { - 0% { - transform: scale(0); - } - - 100% { - transform: scale(1); - } -} - -@keyframes lds-ellipsis3 { - 0% { - transform: scale(1); - } - - 100% { - transform: scale(0); - } -} - -@keyframes lds-ellipsis2 { - 0% { - transform: translate(0, 0); - } - - 100% { - transform: translate(24px, 0); - } -} diff --git a/app/assets/stylesheets/components/progress_bar.scss b/app/assets/stylesheets/components/progress_bar.scss deleted file mode 100644 index 7f60e1539..000000000 --- a/app/assets/stylesheets/components/progress_bar.scss +++ /dev/null @@ -1,22 +0,0 @@ -.progress-bar-component{ - width: 100%; - height: 30px; - background-color: #E7E7E7; - border-radius: 3px; - margin-right: 5px; - position: relative; -} -.progress-bar-component-text{ - position: absolute; - top: 4px; - left: 14px; - color: white; - z-index: 1; -} -.progress-bar-component-progress{ - position: absolute; - height: 30px; - background-color: var(--primary-color); - border-radius: 3px; - z-index: 0; -} \ No newline at end of file diff --git a/app/assets/stylesheets/components/progress_pages.scss b/app/assets/stylesheets/components/progress_pages.scss deleted file mode 100644 index 42b055fa4..000000000 --- a/app/assets/stylesheets/components/progress_pages.scss +++ /dev/null @@ -1,118 +0,0 @@ -.progress-pages-container { - display: flex; - align-items: center; - margin-top: 20px; - margin-bottom: 50px; - width: 100%; -} - -.progress-pages-container hr { - flex-grow: 1; - border: 1px solid #D9D9D9; - margin: 0; -} - -.progress-pages-container hr.active { - border: 1px solid var(--primary-color); -} - -.progress-pages-container .progress-item { - position: relative; - & > div { - position: absolute; - top: -13px; - left: -13px; - display: flex; - flex-direction: column; - align-items: center; - } -} - -.progress-pages-container .progress-item:first-of-type { - & > div { - align-items: start; - left: 0; - } -} - -.progress-pages-container .progress-item:last-of-type { - & > div { - align-items: flex-end; - left: -23px; - } -} - -.progress-pages-container .progress-item div .active:nth-child(2) { - color: var(--primary-color); - font-weight: 600; -} - -.progress-pages-container .progress-item div span:nth-child(2) { - position: absolute; - font-size: 12px; - top: 33px; - white-space: nowrap; - color: #A9A9A9; -} - -.progress-pages-container .progress-content .active:nth-child(2) { - color: var(--primary-color); - font-weight: 600; -} - -.progress-pages-container .progress-content div:nth-child(2) { - position: absolute; - right: -38px; - top: 33px; - -} - - - -.outlined-checked-circle { - border: 2px solid var(--primary-color) !important; - background-color: var(--primary-color) !important; - display: flex; - align-items: center; - justify-content: center; -} - -.outlined-active-circle { - border: 2px solid var(--primary-color) !important; -} - -.outlined-circle { - border: 1px solid #D9D9D9; - border-radius: 13px; - height: 26px; - width: 26px; - background-color: white; - -} - -.outlined-checked-circle img { - display: block !important; -} - -.outlined-active-circle img { - display: none; -} - -.outlined-circle img { - display: none; -} - - - -.progress-pages-actions { - display: flex; - justify-content: flex-end; - margin-top: 20px; -} - -.progress-pages-next-button { - margin-left: 25px; -} - - - diff --git a/app/assets/stylesheets/components/radio.scss b/app/assets/stylesheets/components/radio.scss deleted file mode 100644 index b59eaae28..000000000 --- a/app/assets/stylesheets/components/radio.scss +++ /dev/null @@ -1,58 +0,0 @@ -.radio{ - position: relative; - border: 1px solid #BDBDBD; - padding: 4px 15px; - border-radius: 5px; - margin-right: 10px; -} -.radio.selected{ - border-color: var(--primary-color); -} -.radio:hover{ - cursor: pointer; -} -.radio input[type="radio"]{ - display: none; -} -.radio span{ - height: 12px; - width: 12px; - border-radius: 50%; - border: 1px solid #BDBDBD; - display: block; - position: absolute; - left: 15px; - top: 8px; -} -.radio span:after{ - content: ""; - height: 7px; - width: 7px; - background: var(--primary-color); - display: block; - position: absolute; - left: 50%; - right: 50%; - transform: translate(-46%, 21%) scale(0); - border-radius: 50%; - transition: transform 0.1s ease-in-out; -} - -.radio input[type="radio"]:checked ~ span:after{ - transform: translate(-46%, 21%) scale(1); -} - -.radio input[type="radio"]:checked ~ span{ - border: 1px solid var(--primary-color); -} - -.radio .text{ - padding-left: 20px; - font-size: 13px; - font-weight: 400; - color: #BDBDBD; -} -.radio input[type="radio"]:checked ~ .text{ - color: var(--primary-color); - font-weight: 500; -} \ No newline at end of file diff --git a/app/assets/stylesheets/components/range_slider.scss b/app/assets/stylesheets/components/range_slider.scss deleted file mode 100644 index 4b54c3ba5..000000000 --- a/app/assets/stylesheets/components/range_slider.scss +++ /dev/null @@ -1,59 +0,0 @@ -.range-slider{ - position: relative; - width: 100%; - -} -.range-slider input{ - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - background-color: #dbdbdb; - width: 100%; - position: absolute; - cursor: pointer; - height: 7px; - top: 4px; - border-radius: 5px; -} -.range-slider input::-webkit-slider-thumb{ - -webkit-appearance: none; - width: 40px; - height: 40px; - cursor: pointer; - position: relative; - z-index: 3; -} - -.range-slider .selector{ - position: absolute; - z-index: 2; - left: 52%; -} -.range-slider .selector .select-button{ - height: 15px; - width: 15px; - border-radius: 50%; - position: absolute; - background-color: var(--primary-color); -} -.range-slider .select-range{ - width: 53%; - position: absolute; - z-index: 1; - background-color: gray; - border-radius: 3px 0 0 3px; - height: 7px; - top: 4px; - background-color: var(--primary-color); -} - -.range-slider-container .selection{ - background: var(--primary-color); - border-radius: 3px; - display: inline-block; - margin-bottom: 5px; - color: white; - padding: 1px 8px; -} - - diff --git a/app/assets/stylesheets/components/rounded_button.scss b/app/assets/stylesheets/components/rounded_button.scss deleted file mode 100644 index 41e2b7695..000000000 --- a/app/assets/stylesheets/components/rounded_button.scss +++ /dev/null @@ -1,17 +0,0 @@ -.rounded-button { - border: 1px solid var(--primary-color); - display: flex; - align-items: center; - justify-content: center; - right: 40px; - transition: background-color ease 0.3s; -} - -.rounded-button:hover { - background-color: var(--primary-color); - -} - -.rounded-button:hover svg path { - fill: white; -} \ No newline at end of file diff --git a/app/assets/stylesheets/components/search_input.scss b/app/assets/stylesheets/components/search_input.scss deleted file mode 100644 index 883899fbc..000000000 --- a/app/assets/stylesheets/components/search_input.scss +++ /dev/null @@ -1,107 +0,0 @@ -.search-container{ - display: none; - font-size: 16px; - background: white; - width: 100%; - border-radius: 0 0 14px 14px; - border: none; - box-shadow: 2px 30px 60px rgba(0, 0, 0, 0.1); - position: absolute; -} - -.search-container.search-container-scroll{ - max-height: 400px; - overflow-y: auto; -} - - -.search-content{ - display: flex; - flex-wrap: wrap; - color: #777777 !important; - justify-content: space-between; - padding: 20px 20px; - cursor: pointer; - border-top: 1px solid #f7f7f7 -} -.search-content:hover{ - background-color: rgba(0, 0, 0, 0.01); -} -.search-content div{ - display: flex; -} -.search-content div img{ - width: 12px; -} - -.search-content div p{ - font-weight: 300; - margin-bottom: 0; - word-break: break-word; -} -.search-content div small { - word-break: break-word; -} - -.search-dropdown-active{ - box-shadow: none !important; -} - -.search-element{ - margin-bottom: 0; - max-width: 280px; -} - -.searched-elements{ - margin-bottom: 0; -} - -.search-inputs{ - position: relative; -} - -.concepts-search-button{ - top: 15px !important; - right: 10px !important; -} - - -.home-search-button{ - position: absolute; - top: 38px; - right: 12px; -} - -.home-search-button svg{ - width: 15px; - height: 15px; - cursor: pointer; -} -.home-search-button svg path{ - fill: var(--primary-color); -} -.home-search-button.search-input-nav-icon{ - position: absolute; - top: 4px; - right: 6px; - z-index: 99; -} -.home-search-button.search-input-nav-icon svg{ - width: 11px; - height: 11px; - cursor: pointer; -} - -.home-search-button.search-input-nav-icon svg path{ - fill: white; -} -.search-component-loader{ - padding-top: 4px; - padding-right: 2px; - color: var(--primary-color); -} -.home-search-button.search-input-nav-icon .search-component-loader{ - margin-top: 0; - padding-right: 0; - color: white; -} diff --git a/app/assets/stylesheets/components/search_result.scss b/app/assets/stylesheets/components/search_result.scss deleted file mode 100644 index fc9928861..000000000 --- a/app/assets/stylesheets/components/search_result.scss +++ /dev/null @@ -1,118 +0,0 @@ -.search-result-component.sub-component{ - margin-bottom: 10px; -} - - -.search-result-component .title{ - color: var(--primary-color) !important; - font-size: 20px; - font-weight: 500; -} - -.search-result-component.sub-component .title{ - color: var(--primary-color) !important; - font-size: 18px; - font-weight: 500; -} - -.search-result-component .uri{ - color: #888888; - font-size: 14px; - margin: 3px 0; -} - -.search-result-component.sub-component .uri{ - color: #888888; - font-size: 12px; - margin: 3px 0; -} - -.search-result-component .actions{ - display: flex; - margin-top: 10px; -} - -.search-result-component.sub-component .actions{ - display: flex; - margin-top: 7px; -} - -.search-result-component .actions .button{ - display: flex; - justify-content: center; - align-items: center; - border-radius: 4px; - background-color: var(--light-color); - padding: 5px 13px; - margin-right: 10px; -} - -.search-result-component .actions .button:hover{ - cursor: pointer; -} -.search-result-component .actions .button svg{ - width: 16px; -} - -.search-result-component .actions .button svg path{ - fill: var(--primary-color); -} - -.search-result-component .actions .button .text{ - color: var(--primary-color); - margin-left: 8px; -} - -.search-result-component.sub-component .actions .button .text{ - font-size: 12px; -} - -.search-result-component.sub-component .actions .button svg{ - width: 12px; -} - -.search-result-component .actions .button.icon-right .text{ - margin:0 8px; -} - -.more-from-ontology{ - display: flex; - margin-top: 10px; -} - -.more-from-ontology .vertical-line{ - width: 1px; - background-color: var(--primary-color); - border-radius: 100px; - margin-right: 30px; -} - -.search-result-sub-components{ - margin: 20px 0; -} - -.search-result-sub-components .reuses-title{ - display: flex; - align-items: center; - margin-bottom: 5px; -} - -.search-result-sub-components .reuses-title div{ - margin-left: 10px; - font-size: 16px; - font-weight: 600; - color: #888888; -} - -.more-from-ontology.reuses{ - background-color: #F8F8F8; -} -.more-from-ontology.reuses .vertical-line{ - background-color: #888888; -} -.search-result-component .definition + .definition{ - margin-top: 10px; -} - - - diff --git a/app/assets/stylesheets/components/select.scss b/app/assets/stylesheets/components/select.scss deleted file mode 100644 index c53c1453b..000000000 --- a/app/assets/stylesheets/components/select.scss +++ /dev/null @@ -1,61 +0,0 @@ -.ts-wrapper{ - display: flex; -} - -.ts-control { - padding: 12px; - border-radius: 5px; -} - -.ts-dropdown-content .option { - padding: 12px; -} - -.ts-dropdown .active { - background-color: #f8f8f8; -} - -.ts-dropdown { - flex: 1 1 auto; - min-width: 9rem; - margin: 0; - color: #666666; -} - - -.ts-wrapper.single .ts-control:after { - border-color: #343a40 transparent transparent; - border-style: solid; - border-width: 5px 5px 0; - content: " "; - display: block; - height: 0; - margin-top: -3px; - position: absolute; - right: calc(0.5rem); - top: 50%; - width: 0; -} - -.ts-wrapper.multi .ts-control>div{ - border-radius: 5px; - font-size: 11px; - padding: 2px 0 4px 6px; - color: #888888; -} - -.ts-wrapper.plugin-remove_button:not(.rtl) .item .remove{ - border-left: none; - color: #888888 !important; - margin-left: 0; - margin-right: 1px; -} - -.ts-wrapper.plugin-remove_button .item .remove:hover { - background: unset; -} - -.has-items .ts-control > input { - width: unset !important; -} - diff --git a/app/assets/stylesheets/components/summary_section.scss b/app/assets/stylesheets/components/summary_section.scss deleted file mode 100644 index 057208665..000000000 --- a/app/assets/stylesheets/components/summary_section.scss +++ /dev/null @@ -1,12 +0,0 @@ -.card_title { - display: flex; - font-size: 18px; - margin-bottom: 20px; - - span:nth-child(1){ - text-decoration: underline; - text-underline-offset: 12px; - text-decoration-color: var(--primary-color); - text-decoration-thickness: 2px; - } -} diff --git a/app/assets/stylesheets/components/switch.scss b/app/assets/stylesheets/components/switch.scss deleted file mode 100644 index 003474383..000000000 --- a/app/assets/stylesheets/components/switch.scss +++ /dev/null @@ -1,63 +0,0 @@ - -.switch-filter{ - display:flex; - align-items: center; - -} -.switch-filter > p, .switch-filter > div{ - font-size: 16px; - color: #666666; - margin-bottom: 0; - margin-right: 10px; -} - - - -/* Toggle switch css */ -.switch { - position: relative; - display: inline-block; - width: 40px; - height: 20px; - margin-bottom: 0; -} -.switch input { - opacity: 0; - width: 0; - height: 0; -} -.slider { - position: absolute; - cursor: pointer; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: #ccc; - -webkit-transition: .4s; - transition: .4s; - border-radius: 34px; -} -.slider:before { - position: absolute; - content: ""; - height: 13px; - width: 13px; - left: 4px; - bottom: 4px; - background-color: white; - -webkit-transition: .4s; - transition: .4s; - border-radius: 50%; -} -input:checked + .slider { - background-color: var(--primary-color); -} -input:focus + .slider { - box-shadow: 0 0 1px var(--primary-color); -} -input:checked + .slider:before { - -webkit-transform: translateX(19px); - -ms-transform: translateX(19px); - transform: translateX(19px); -} \ No newline at end of file diff --git a/app/assets/stylesheets/components/table.scss b/app/assets/stylesheets/components/table.scss deleted file mode 100644 index 6c03be874..000000000 --- a/app/assets/stylesheets/components/table.scss +++ /dev/null @@ -1,55 +0,0 @@ -.table-content{ - border-collapse: collapse; - width: 100%; - border-spacing: 0; - box-sizing: border-box !important; -} -.table-auto-layout{ - table-layout: auto !important; -} - -.table-layout-fixed{ - table-layout: fixed; -} - -.table-content thead th{ - background-color: hsl(0, 0%, 100%); - border-bottom: 1px solid hsl(240, 4%, 85%); - font-weight: 700; - color: hsl(230, 13%, 9%); -} - -.table-content-borderless thead th { - border-bottom: none !important; -} - -.table-content td, .table-content th{ - padding: 0.75rem; - vertical-align: top; -} - - -.table-content-stripped tbody tr:nth-child(odd) { - background-color: #FAFAFA; -} - -.table-content tbody th:first-child { - color: #888888; - font-weight: 400; -} - -table.dataTable thead td, table.dataTable thead th{ - padding: 20px 10px; -} - - -.table-mini{ - font-size: 14px; -} - -.table-outline{ - border: 1px solid #C7C7C7 !important; - border-radius: 8px; - padding: 10px; -} - diff --git a/app/assets/stylesheets/components/text_area_field.scss b/app/assets/stylesheets/components/text_area_field.scss deleted file mode 100644 index 6f50aa4bc..000000000 --- a/app/assets/stylesheets/components/text_area_field.scss +++ /dev/null @@ -1,14 +0,0 @@ -.text-content { - overflow: hidden; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: var(--read-more-line-clamp, 5); -} - - -.see_more_text { - color: var(--primary-color); - font-size: 15px; - margin-top: 10px; - text-align: end; -} \ No newline at end of file diff --git a/app/assets/stylesheets/components/tree_view.scss b/app/assets/stylesheets/components/tree_view.scss deleted file mode 100644 index 1582b9c3a..000000000 --- a/app/assets/stylesheets/components/tree_view.scss +++ /dev/null @@ -1,170 +0,0 @@ -.tree-view-reuse-icon{ - display: inline; -} -.tree-view-reuse-icon svg{ - width: 13px; -} - -div.tree_error { - background: none repeat scroll 0 0 lightYellow; - font-weight: 600; - padding: 5px 10px; -} - -.expansion_error { - color: red; - font-size: x-small; - font-style: oblique; - padding: 0 3px; -} - -#bd ul.simpleTree li{ - margin-left: 0px; - padding: 5px 0 0 10px; -} - -#bd ul.simpleTree{ -margin-left:0px; -margin-bottom:0px; -} - -.simpleTree { -margin:0; -padding:0; - -a.tree-link { - display: inline-block; - padding: 5px; - word-break: break-all; - text-wrap: wrap; - color: var(--primary-color) !important; -} - -a.tree-link.active { - cursor: default; - background-color: var(--light-color); - font-weight: bold; - border-radius: 3px; - padding: 7px 5px; -} - -.tree-border-left{ - border-left: 2px dotted #eee; - margin-left: 2px; -} -} -.simpleTree li { -list-style: none; -margin:0; -padding:0 0 0 22px; -line-height: 14px; -} -.simpleTree li span { -display:inline; -clear: left; -white-space: nowrap; -} -.simpleTree ul { -margin:0; -padding:0; -} -.simpleTree .root ul { -margin:0; -} -.simpleTree .root { -margin-left:-16px; -/*background: url(/images/tree/root.gif) no-repeat 16px 0 #ffffff;*/ -} -.simpleTree .line { -margin:0 0 0 -16px; -padding:0; -line-height: 3px; -height:3px; -font-size:3px; -background: image-url('jquery.simple.tree/line_bg.gif') 0 0 no-repeat transparent; -} -.simpleTree .line-last { -margin:0 0 0 -16px; -padding:0; -line-height: 3px; -height:3px; -font-size:3px; -background: image-url('jquery.simple.tree/spacer.gif') 0 0 no-repeat transparent; -} -.simpleTree .line-over { -margin:0 0 0 -16px; -padding:0; -line-height: 3px; -height:3px; -font-size:3px; -background: image-url('jquery.simple.tree/line_bg_over.gif') 0 0 no-repeat transparent; -} -.simpleTree .line-over-last { -margin:0 0 0 -16px; -padding:0; -line-height: 3px; -height:3px; -font-size:3px; -background: image-url('jquery.simple.tree/line_bg_over_last.gif') 0 0 no-repeat transparent; -} -.simpleTree .folder-open { -margin-left:-16px; -background: image-url('jquery.simple.tree/collapsable.gif') 0 -2px no-repeat #fff; -} -.simpleTree .folder-open-last { -margin-left:-16px; -background: image-url('jquery.simple.tree/collapsable-last.gif') 0 -2px no-repeat #fff; -} -.simpleTree .folder-close { -margin-left:-16px; -background: image-url('jquery.simple.tree/expandable.gif') 0 -2px no-repeat #fff; -} -.simpleTree .folder-close-last { -margin-left:-16px; -background: image-url('jquery.simple.tree/expandable-last.gif') 0 -2px no-repeat #fff; -} -.simpleTree .doc { -margin-left:-16px; -background: image-url('jquery.simple.tree/leaf.gif') 0 -1px no-repeat #fff; -} -.simpleTree .doc-last { -margin-left:-16px; -background: image-url('jquery.simple.tree/leaf-last.gif') 0 -1px no-repeat #fff; -} -.simpleTree .ajax { -background: image-url('jquery.simple.tree/spinner.gif') no-repeat 0 0 #ffffff; -height: 16px; -display:none; -} -.simpleTree .ajax li { -display:none; -margin:0; -padding:0; -} -.simpleTree .trigger { -display:inline; -margin-left:-32px; -width: 28px; -height: 11px; -cursor:pointer; -} -.simpleTree .text { -cursor: default; -padding: 0 2px; -} -.simpleTree .active { -cursor: default; -background-color: #B9D5E4; -font-weight: bold; -padding-top: 0px; -padding-right: 2px; -padding-bottom: 0px; -padding-left: 2px; -} -.simpleTree a, .simpleTree a:hover { -text-decoration: none; -color: black; -} -.simpleTree a:hover { -cursor: pointer; -} \ No newline at end of file diff --git a/app/assets/stylesheets/components/vertical_tabs.scss b/app/assets/stylesheets/components/vertical_tabs.scss deleted file mode 100644 index aa47a1923..000000000 --- a/app/assets/stylesheets/components/vertical_tabs.scss +++ /dev/null @@ -1,83 +0,0 @@ -.center { - display: flex; - justify-content: center; - margin-top: 50px; -} - -.edit-ontology-container { - padding: 0 50px; - width: 1248px -} - -.edit-ontology-title { - font-size: 18px; - font-weight: bold; -} - -.edit-ontology-title hr { - width: 93px; - border: 1px solid var(--primary-color); - margin: 0; - opacity: 100%; -} - - -.tabs-left-column { - border-radius: 5px; - min-width: 250px; - .nav-pills.disabled a { - color: #888888 !important; - cursor: not-allowed; - } - - .nav-pills:not(.disabled){ - .vertical-tab-item.active { - color: var(--primary-color); - background-color: var(--light-color) !important; - border-left: 3px solid var(--primary-color); - font-weight: 700; - } - - - - .vertical-tab-item:hover { - background-color: #F6F6F6; - } - - } -} - -.vertical-tab-item { - font-size: 14px; - width: 100%; - padding: 10px 15px; - font-weight: 500; - margin: 3px 0; - cursor: pointer; - border-radius: 5px; - transition: background-color ease 0.3s; -} - -.tabs-right-column { - border-radius: 5px; - width: 100%; -} - - - -.tabs-left-column input { - border: 1px solid #BDBDBD; - outline: none; - font-size: 14px; - border-radius: 5px; - padding: 10px 15px; - width: 100%; - margin-top: 20px; -} - - - - - - - diff --git a/app/assets/stylesheets/content_finder.scss b/app/assets/stylesheets/content_finder.scss deleted file mode 100644 index 4259b5720..000000000 --- a/app/assets/stylesheets/content_finder.scss +++ /dev/null @@ -1,42 +0,0 @@ -.content-finder-container{ - display: flex; - justify-content: center; - margin-bottom: 6px; -} - -.content-finder-container .inputs > div{ - margin:10px 0; - text-align: center; -} - -.content-finder-result{ - text-align: left; - width: 95%; - margin-left: auto; - margin-right: auto; - background-color: #fff; -} - -.content-finder-html-result{ - max-width: 95%; - margin-left: auto; - margin-right: auto; -} -.hljs-custom-prefixes{ - color: grey; -} -.hljs-custom-symbol{ - color: red; -} - -.hljs-custom-concepts{ - color: #770088; -} - -.hljs-subject{ - color: green; -} - -.hljs-predicate{ - color: #770088; -} \ No newline at end of file diff --git a/app/assets/stylesheets/edit-ontology.scss b/app/assets/stylesheets/edit-ontology.scss deleted file mode 100644 index 5b47432c7..000000000 --- a/app/assets/stylesheets/edit-ontology.scss +++ /dev/null @@ -1,146 +0,0 @@ -.center { - display: flex; - justify-content: center; - margin-top: 50px; -} - -.edit-ontology-container { - padding: 0 50px; - width: 1248px -} -.edit-ontology-container a{ - color: var(--primary-color) !important; -} - -.edit-ontology-title { - font-size: 18px; - font-weight: bold; -} - -.edit-ontology-title hr { - width: 93px; - border: 1px solid var(--primary-color); - margin: 0; - opacity: 100%; -} - -.edit-ontology-sub-container { - - display: flex; -} - -.edit-ontology-left-column { - border-radius: 5px; - width: 400px; - margin-right: 58px; - -} - -.edit-ontology-left-column { - .nav-pills.disabled a { - color: #888888 !important; - cursor: not-allowed; - } - - .nav-pills:not(.disabled){ - .edit-ontology-tab-item.active { - color: var(--primary-color); - background-color: var(--light-color) !important; - border-left: 3px solid var(--primary-color); - font-weight: 700; - } - - - - .edit-ontology-tab-item:hover { - background-color: #F6F6F6; - } - - } -} - -.edit-ontology-tab-item { - font-size: 14px; - width: 100%; - padding: 10px 15px; - font-weight: 500; - margin: 3px 0; - cursor: pointer; - border-radius: 5px; - transition: background-color ease 0.3s; -} - -.edit-ontology-right-column { - border-radius: 5px; - width: 100%; -} - -.edit-ontology-desc { - font-size: 12px; - color: #777777; - margin: 10px 0; -} - -.edit-ontology-desc a { - text-decoration: none; - color: var(--primary-color); -} - -.edit-ontology-desc a svg { - transform: scale(1.2); -} - -.edit-ontology-left-column input { - border: 1px solid #BDBDBD; - outline: none; - font-size: 14px; - border-radius: 5px; - padding: 10px 15px; - width: 100%; - margin-top: 20px; -} - -.edit-ontology-field div { - font-size: 11px; - color: #666; - -} - -.edit-ontology-field input { - border: 1px solid #BDBDBD; - border-radius: 5px; - font-size: 14px; - padding: 10px 15px; - outline: none; - width: 100%; - margin-top: 5px; - margin-bottom: 20px; -} - -.edit-ontology-field input:focus { - border-color: var(--primary-color); -} - -#edit-ontology-actions-devider { - width: 100%; - border: 1px solid #E9E9E9; - border-radius: 210px; - margin: 20px 0; - opacity: 100%; - -} - -.edit-ontology-actions { - display: flex; - justify-content: flex-end; -} - -.reset-all-button { - margin-right: 25px; - width: 186px; -} - -.save-button { - width: 90px; -} - diff --git a/app/assets/stylesheets/fair_assement.scss b/app/assets/stylesheets/fair_assement.scss deleted file mode 100644 index 4d049d521..000000000 --- a/app/assets/stylesheets/fair_assement.scss +++ /dev/null @@ -1,127 +0,0 @@ -$obtained_color : rgba(102, 187, 106, 0.4); -$not_obtained_color : rgba(251, 192, 45, 0.4); -$non_applicable_color : rgba(176, 190, 197, 0.4); - -.bg-obtained_color{ - background-color: $obtained_color !important; -} -.bg-not-obtained_color{ - background-color: $not_obtained_color !important; -} -.bg-non-applicable_color{ - background-color: $non_applicable_color !important; -} - -@keyframes spinner-border { - to { transform: rotate(360deg); } -} - -// -// The following is for creating a spinner in the landscape page -// - -.spinner-border { - position: relative; - display: inline-block; - width: 2rem; - height: 2rem; - overflow: hidden; - text-indent: -999em; - vertical-align: text-bottom; - border: .25em solid; - border-color: currentColor transparent currentColor currentColor; - border-radius: 50%; - animation-name: spinner-border; - animation-duration: .75s; - animation-timing-function: linear; - animation-iteration-count: infinite; - color: var(--primary-color); -} - -.spinner-border-reverse { - border-color: transparent currentColor transparent transparent; - - &::after { - position: absolute; - top: -.25em; - right: -.25em; - bottom: -.25em; - left: -.25em; - display: inline-block; - content: ""; - border: .25em solid rgba(0, 0, 0, .1); - border-radius: 50%; - } -} - -.spinner-border-sm { - width: 1rem; - height: 1rem; - border-width: .2em; - - &.spinner-border-reverse::after { - border-width: .2em; - } -} - - -@keyframes spinner-grow { - 0% { - opacity: 0; - transform: scale(0); - } - 50% { - opacity: 1; - } - 100% { - opacity: 0; - transform: scale(1); - } -} - -.spinner-grow { - position: relative; - display: inline-block; - width: 2rem; - height: 2rem; - overflow: hidden; - text-indent: -999em; - vertical-align: text-bottom; - background-color: currentColor; - border-radius: 50%; - animation-name: spinner-grow; - animation-duration: .75s; - animation-timing-function: linear; - animation-iteration-count: infinite; -} - -.spinner-grow-sm { - width: 1rem; - height: 1rem; -} - - -.fair_score_details_pop { - overflow: hidden; - width: 1200px !important; - max-height: 80vh; - display: block !important; - - .test-result{ - display: flex; - justify-content: space-around; - align-items: center; - } -} - -.criterion-score-container{ - .criterion-score-progress-bar{ - flex-grow: 1; - height: 40px; - margin-top: 10px; - } -} - -.nav-link.active{ - color: white !important; -} diff --git a/app/assets/stylesheets/feedback.scss b/app/assets/stylesheets/feedback.scss deleted file mode 100644 index c3c3c0772..000000000 --- a/app/assets/stylesheets/feedback.scss +++ /dev/null @@ -1,78 +0,0 @@ -.feedback-email{ - font-size: 12px; - color: #666666; - width: 363px; - margin-bottom: 21px; -} -.feedback-email a{ - color: var(--primary-color); - font-weight: 600; - text-decoration: none; -} -.feedback-text{ - font-size: 12px; - color: #666666; - width: 363px; - margin-bottom: 0; -} -.feedback-text font{ - font-weight: 600; - color: black; -} -.feedback-title{ - font-size: 18px; - text-align: center; - font-weight: 700; -} -#feedback-title-line{ - width: 128px; - margin: auto; - margin-bottom: 17px; - margin-top: 3px; - border: 0.5px solid var(--primary-color); - border-radius: 5px; -} -.feedback-input-title{ - font-size: 12px; - color: #666666; - margin-bottom: 5px; - font-weight: 600; -} -.register-optional{ - font-weight: 300; - -} -.feedback-input{ - width: 363px; - outline: none; - padding: 14px; - font-size: 15px; - font-weight: 500; - border: 1px solid #BDBDBD; - border-radius: 9px; - margin-bottom: 14px; - resize: none; -} -.feedback-input:focus{ - border: 1px solid var(--primary-color); -} -.feedback-button{ - margin-top: 10px; - width: 363px; - font-size: 16px; - color: white; - padding: 17px; - background-color: var(--primary-color); - border: none; - border-radius: 9px; -} -.feedback-button:hover{ - background-color: var(--hover-color); - cursor: pointer; -} -.feedback-checks{ - max-width: 363px; - margin: 0 auto; - display: flex; - flex-wrap: wrap; -} \ No newline at end of file diff --git a/app/assets/stylesheets/footer.scss b/app/assets/stylesheets/footer.scss index 6cdd05791..11f1685f5 100644 --- a/app/assets/stylesheets/footer.scss +++ b/app/assets/stylesheets/footer.scss @@ -1,58 +1,3 @@ -.footer-container{ - display: flex; - justify-content: center; - background-color: var(--primary-color); -} -footer{ - width: 1248px; - background-color: var(--primary-color); - padding: 40px 50px; -} - -.footer-header{ - display: flex; - justify-content: space-between; - margin-bottom: 40px; -} -.footer-logo{ - color: white; - display: flex; - align-items: center; -} -.footer-logo p{ - margin-bottom: 0; - font-weight: 700; - font-size: 18px; - margin-left: 20px; -} -.footer-social-media-links a{ - margin-left: 20px; - svg path { - fill: white; - } -} -.footer-nav-links{ - display: flex; - flex-wrap: wrap; - justify-content: space-between; -} -.footer-nav-links div h2{ - font-size: 21px; - font-weight: 700; - color: white; - margin-bottom: 10px; -} -.footer-nav-links div div{ - display:flex; - flex-direction: column; -} -.footer-nav-links div a{ - font-size: 16px; - font-weight: 400; - color: white !important; - margin-bottom: 10px; - opacity: 60%; -} -.footer-nav-links div a:hover{ - opacity: 100%; -} +.legal-text { + font-size: 0.9rem; +} \ No newline at end of file diff --git a/app/assets/stylesheets/home.scss b/app/assets/stylesheets/home.scss index 9965d2bfd..f3df640ef 100644 --- a/app/assets/stylesheets/home.scss +++ b/app/assets/stylesheets/home.scss @@ -3,595 +3,14 @@ i.fa.fa-caret-square-o-down { margin-left: 2px; } - - -.home-header-container{ - height: 310px; -} - -.home-header-background{ - background-color: var(--primary-color);; - width: 100%; - height: 309px; - position: absolute; - z-index: 0; -} - -.home-bubbles{ - display: flex; - justify-content: center; -} -.home-bubble{ - display: flex; - align-items: center; - justify-content: center; - flex-direction: column; - background-color: rgba(255, 255, 255, 0.4); - position: absolute; - box-shadow: 2px 30px 60px rgba(0, 0, 0, 0.05); - transform: scale(0.1); - animation: scale-up 1s ease forwards; -} -.home-bubble-one{ - width: 232px; - height: 232px; - border-radius: 116px; - z-index: 1; - margin-left: 622px; -} -.home-bubble-two{ - width: 194px; - height: 194px; - border-radius: 97px; - z-index: 2; - margin-left: 387px; - margin-top: 161px; -} -.home-bubble-three{ - width: 130px; - height: 130px; - border-radius: 65px; - z-index: 3; - margin-left: 656px; - margin-top: 192px; -} -.home-bubble-four{ - width: 70px; - height: 70px; - border-radius: 35px; - z-index: 4; - margin-left: 815px; - margin-top: 189px; - transform: scale(1); - -} - -.home-bubble .h5{ - color: white; - font-size: 18px; - margin: 0; - font-weight: 600; -} -.home-bubble p{ - color: white; - font-size: 15px; - margin: 0; -} -.home-random-bubbles{ - position: absolute; - transform: scale(0.1); - animation: scale-up-random 1s ease forwards; -} -.home-header-title-container{ - display: flex; - justify-content: center; -} -.home-header-title{ - position: absolute; - z-index: 4; - width: 500px; - margin-right: 664px; - margin-top: 123px; - opacity: 0; - transform: translateY(-100%); - animation: slide-and-fade 1s ease forwards; -} -.home-header-title h4{ - font-size: 38px; - font-weight: 800; - color: white; -} - -.home-header-title > p{ - font-size: 20px; - font-weight: 400; - color: white; -} - -.home-header-title .search-inputs input{ - font-size: 16px; - outline: none; - padding: 20px; - width: 100%; - height: 100%; - margin-top: 20px; - border-radius: 14px; - border: none; - box-shadow: 2px 30px 60px rgba(0, 0, 0, 0.1); -} -.home-header-title .search-inputs input:focus{ - box-shadow: 2px 30px 60px rgba(0, 0, 0, 0.15); -} -.home-twitter-loader{ - display: flex; - justify-content: center; - align-items: center; - height: 100%; -} -.home-statistics-link a{ - color: var(--primary-color) !important; -} - -.home-body-container{ - display: flex; - flex-direction: column; - align-items: center; -} -.home-body-container svg path{ - fill: var(--primary-color); -} -.home-section{ - padding: 0 50px; - margin-top: 70px; - width: 1248px; -} -.home-section > h4{ - font-size: 20px; - margin-bottom: 5px; - font-weight: 700; -} -.home-section-title{ - display: flex; - flex-direction: column; - align-items: start; -} -.home-section-title .text{ - font-size: 20px; - font-weight: 600; - margin-bottom: 0; -} -.home-slice > a{ - display: flex; - align-items: center; -} -.home-slice-icon{ - display: flex; - flex-direction: column; - align-items: center; -} -.home-slice-icon svg{ - width: 40px; - height: 40px; -} -.home-slices-container{ - display: flex; - flex-wrap: wrap; - margin-top: 20px; -} -.home-section-description{ - color: #888888; -} -.home-slice{ - border: 1px solid var(--primary-color); - border-radius: 8px; - padding: 4px 15px; - margin-right: 20px; - margin-bottom: 20px; -} -.home-ontoportal-instances{ - margin-top: 50px; - background: #FBFBFB; - width: 100%; - display: flex; - justify-content: center; -} -.ontoportal-instances-container{ - padding: 0 50px; - width: 1248px; - padding-bottom: 20px; -} -.home-section-title.ontoportal{ - margin-top: 20px; -} -.home-section-line{ - width: 60px; - margin-top: 3px; - border: 0.5px solid var(--primary-color);; - border-radius: 5px; - margin-bottom: 20px; -} -.home-statistics{ - display: flex; -} -.home-statistics-container{ - border-radius: 8px; - box-shadow: 2px 0px 60px rgba(0, 0, 0, 0.10); - padding: 30px 40px 10px 40px; - -} -.home-statistics-container > div { - display: flex; - align-items: start; - justify-content: center; - flex-wrap: wrap; -} -.home-agroportal-figures{ - margin-bottom: 20px; -} -.home-slice-name{ - font-size: 16px; - font-weight: 400; - margin-left: 10px; -} -.home-slice-ontologies{ - font-size: 18px; - font-weight: 500; - margin-bottom: -18px; -} -.home-statistics-container > div > p { - font-size: 20px; - font-weight: 600; - margin-bottom: 0; -} -.home-statistics-item{ - display: flex; - align-items: center; - -} -.home-statistics> :not(:last-child){ - margin-right: 49px; -} -.home-statistics-item hr{ - height: 83px; - width: 0px; - border: 2px solid var(--primary-color);; - border-radius: 5px; - margin-right: 15px; - margin-top: 0; - margin-bottom: 0; -} -.home-statistics-item h4{ - font-size: 30px; - font-weight: 600; - line-height: 1.2; - margin: 0; -} -.home-statistics-item p{ - font-size: 18px; - font-weight: 400; - margin: 0; - color: #888; -} -.home-section > p { - font-size: 16px; - color: #888888; - margin-bottom: 9px; -} -.home-upload-benifits{ - display: flex; - flex-wrap: wrap; -} -.home-upload-benifits div{ - display: flex; - width: 455px; - align-items: flex-start; - margin-right: 57px; - margin-top: 15px -} - -.home-upload-benifits div p{ - margin-left: 17px; - font-size: 16px; - color: #888888; - margin-bottom: 0; -} -.home-upload-benifits div img{ - margin-top: 3px -} -.home-ontologies-actions{ - display: flex; - align-items: center; - margin-top: 30px; - -} -.home-upload-ontology-button{ - - width: fit-content; - margin-right: 20px; -} - -.home-upload-icon { - margin-right: 10px; -} - - -.home-recommendations-and-annotations{ - font-size: 20px; - outline: none; - padding: 20px; - width: 100%; - resize: none; - border-radius: 14px; - border: none; - -} -.home-services-buttons{ - background-color: white; - border-radius: 8px; - padding: 0; - display: flex; - justify-content: flex-end; - align-items: center; -} -.home-services-buttons.container{ - padding: 0 30px 30px 0; -} -.home-services-buttons .insert-sample-text-button{ - display: flex; - align-items: center; - margin-right: 20px; -} -.home-services-buttons .insert-sample-text-button:hover{ - cursor: pointer; -} -.home-services-buttons .insert-sample-text-button div{ - color: var(--primary-color); - margin-right: 5px; - font-weight: 500; -} -.home-services-buttons .insert-sample-text-button svg{ - width: 18px; - height: 18px; -} -.home-services-buttons .insert-sample-text-button svg path{ - fill: var(--primary-color); - -} -.home-card{ - border-radius: 8px; - box-shadow: 2px 30px 60px rgba(0, 0, 0, 0.1); -} -.home-get-annotations{ - cursor: pointer; - color: white; - background-color: var(--primary-color); - display: flex; - width: fit-content; - align-items: center; - padding: 15px 20px; - border-radius: 8px; - margin-left: 10px; - transition: background-color 0.3s ease; -} -.home-get-annotations:hover{ - background-color: var(--hover-color); -} -.home-get-annotations p{ - margin-right: 20px; - margin-bottom: 0; -} -.home-get-recommendations{ - cursor: pointer; - color: var(--primary-color); - display: flex; - width: fit-content; - height: fit-content; - align-items: center; - padding: 15px 20px; - border-radius: 8px; - border: 1px solid var(--primary-color); - transition: background-color 0.3s ease; -} -.home-get-recommendations:hover{ - color: white !important; - background-color: var(--primary-color); -} -.home-get-recommendations svg path{ - fill: var(--primary-color) -} -.home-get-recommendations:hover .home-play-icon path{ - fill: white; -} -.home-get-recommendations p{ - margin-right: 20px; - margin-bottom: 0; -} -.home-section-sub-sections-container{ - display: flex; - justify-content: space-between; -} -.home-sub-section-left{ - width: 550px; -} - -.home-sub-section-right{ - width: 550px; -} -.home-sub-section-left h4, .home-sub-section-right h4{ - font-size: 20px; - margin-bottom: 5px; - font-weight: 700; -} -.home-fair-scores{ - height: 360px; - padding-top: 35px; -} -.home-twitter-news{ - height: 360px; -} -.home-fair-scores a{ - text-decoration: none; - -} -.home-fair-details{ - margin-right: 25px !important; -} -.home-fair-scores div{ - display: flex; - justify-content: flex-end; - align-items: center; - margin-right: 20px; - margin-left: 27px; - margin-bottom: 14px; - color: var(--primary-color); -} -.home-fair-scores div p{ - margin-right: 10px; - margin-bottom: 0; -} -.home-logos{ - height: 138px; - display: flex; - align-items: center; - overflow: auto; - -} -.home-logos img{ - margin-left: 60px; -} -.home-upload-benifits svg{ - width: 33px; - margin-top: 3px; -} -.home-upload-benifits svg path{ - fill: var(--gray-color); -} - -.home-support-title{ - display: flex; - justify-content: center; - flex-direction: column; - -} -.home-support-items{ - display: flex; - flex-wrap: wrap; - img{ - object-fit: scale-down; - width: 100px; - height: 100px; +table#ontology-visits { + a { + text-decoration: none; } - -} -.home-logo-instances{ - padding: 23px; - margin: 7px 12px !important; - border-radius: 50%; - display: block; -} -.home-support-items > div, .home-support-items > a { - margin-right: 40px; -} -.home-support-items a{ - margin-bottom: 40px; - opacity: 85%; - transition: opacity 0.3s ease; -} -.home-support-items a:hover{ - opacity: 100%; -} -.home-result-type{ - font-weight: 300; - margin-bottom: 0; -} - -.home-upload-ontology-button path:hover { - fill: white; -} - -.home-searched-ontology{ - margin-bottom: 0; - word-wrap: break-word; - max-width: 400px; - margin-right: 20px; - -} -.align-items{ - display: flex; - align-items: center; -} -.margin-items{ - margin-right: 10px; -} - -.custom-logo-class{ - width: 96px; - height: 96px; - object-fit: scale-down; -} -.fair-scores-badge-section{ - height: 5px !important; -} -.fair-scores-badge-margin{ - margin-right: 10px; - margin-bottom: 20px; - background-color: var(--primary-color) !important; -} -.home-support-items svg path{ - fill: white; -} -@keyframes scale-up { - from { transform: scale(0.1); } - to { transform: scale(1); } -} - -@keyframes scale-up-random { - from { transform: scale(0.1); } - to { transform: scale(1.06); } -} - -@keyframes slide-and-fade { - from { opacity: 0; transform: translateY(-100%); } - to { opacity: 1; transform: translateY(0); } -} - -@media (max-width: 1300px) { - .home-section{ - width: 100%; + a:hover { + text-decoration: underline; } - .home-section-sub-sections-container{ - flex-direction: column; + thead tr { + white-space: nowrap; } - .home-random-bubbles{ - display: none; - } - .home-header-title{ - - margin:128px 50px; - width: 500px; - - opacity: 0; - transform: translateY(-100%); - animation: slide-and-fade 1s ease forwards; - } - .home-header-title-container{ - justify-content: start; - } - .home-sub-section-left { - width: 100%; - } - - .home-sub-section-right { - width: 100%; - margin-top: 50px; - } - .home-fair-scores div{ - padding: 0 10%; - } - .home-fair-scores{ - height: unset; - } } - - - diff --git a/app/assets/stylesheets/instances_table.scss b/app/assets/stylesheets/instances_table.scss deleted file mode 100644 index 146ad7a8a..000000000 --- a/app/assets/stylesheets/instances_table.scss +++ /dev/null @@ -1,6 +0,0 @@ -a.paginate_button.disabled{ - pointer-events: none; - cursor: default; - text-decoration: none !important; - color: gray !important; -} \ No newline at end of file diff --git a/app/assets/stylesheets/login.scss b/app/assets/stylesheets/login.scss index f77d8a6b7..ce6d1a41e 100644 --- a/app/assets/stylesheets/login.scss +++ b/app/assets/stylesheets/login.scss @@ -1,63 +1,41 @@ -.login-form{ - margin-top: 10px; - padding: 37px 41px; - box-shadow: rgba(0, 0, 0, 0.08) 0px 20px 50px; - border-radius: 14px; - max-width: 439px; -} -.login-form a{ - color: var(--primary-color) !important; -} -.login-input{ - box-sizing: border-box; - outline: none; - padding: 19px; - font-size: 16px; - border: 1px solid #BDBDBD; - border-radius: 9px; - width: 357px; +.signin { + display: flex; + align-items: center; + justify-content: center; + padding-top: 40px; + padding-bottom: 40px; } -.login-input:focus{ - border: 1px solid var(--primary-color); -} -.login-input::placeholder{ - font-weight: 300; - color: #C1C1C1; -} +.form-signin { + width: 100%; + max-width: 400px; + padding: 15px; + margin: 0 auto; -.login-input-title{ - font-size: 13px; - margin-bottom: 5px; - font-weight: 600; - color: #666666; -} -.email-input{ - margin-bottom: 20px; -} -.password-input{ - margin-bottom: 8px; -} -.login-forgot-password{ - font-weight: 500 ; - text-align: end; - text-decoration:none; - font-size: 13px; -} -.dont-have-account{ - font-size: 15px; - font-weight: 600; - text-align: center; -} -.login-button-container{ - margin-top: 10px; - margin-bottom: 20px; - width: 357px; + a { + text-decoration: none; + } + + a:hover { + text-decoration: underline; + } + + h4, p { + text-align: center; + } } -.disabled-login-sso{ - width: 40px; - margin: 7px 10px; + +.form-signin .enable-lists { + color: red; } -.login-active-sso path{ - fill: var(--primary-color) + +.password-reset { + display: flex; + justify-content: center; + padding-top: 40px; + padding-bottom: 40px; + + form { + max-width: 640px; + } } \ No newline at end of file diff --git a/app/assets/stylesheets/lostpassword.scss b/app/assets/stylesheets/lostpassword.scss deleted file mode 100644 index 2769eb7b0..000000000 --- a/app/assets/stylesheets/lostpassword.scss +++ /dev/null @@ -1,69 +0,0 @@ -.lost-password-form{ - margin-top: 30px; - padding: 37px 41px; - box-shadow: rgba(0, 0, 0, 0.05) 0px 20px 50px; - border-radius: 14px; -} -.lost-password-arrowback{ - all: none; -} -.lost-password-title{ - font-size: 18px; - text-align: center; - font-weight: 700; -} -#lost-password-title-line{ - width: 128px ; - margin: auto !important ; - margin-bottom: 14px !important ; - margin-top: 3px !important ; - border: 1px solid var(--primary-color) !important ; - border-radius: 5px ; -} -.lost-password-description{ - color: #666666; - font-size: 12.5px; - margin-bottom: 14px; - width: 357px; -} -.lost-password-input{ - box-sizing: border-box; - outline: none; - padding: 21px; - font-size: 16px; - border: 1px solid #BDBDBD; - border-radius: 9px; - width: 357px; - -} -.lost-password-input:focus{ - border: 1px solid var(--primary-color); -} -.lost-password-input::placeholder{ - font-weight: 300; - color: #C1C1C1; -} - -.lost-password-input-title{ - font-size: 13px; - margin-bottom: 5px; - font-weight: 600; - color: #666666; -} -.lost-password-button{ - margin-top: 20px; - width: 357px; - font-size: 16px; - color: white; - padding: 21px; - background-color: var(--primary-color); - border: none; - border-radius: 9px; - margin-bottom: 20px; - display: block; -} -.lost-password-button:hover{ - background-color: var(--hover-color); - cursor: pointer; -} - diff --git a/app/assets/stylesheets/mappings.scss b/app/assets/stylesheets/mappings.scss index bdee5caab..3a3dda681 100644 --- a/app/assets/stylesheets/mappings.scss +++ b/app/assets/stylesheets/mappings.scss @@ -1,266 +1,4 @@ -.mappigs-page-container{ - display: flex; - justify-content: center; - .file_uploader{ - width: 700px; - } -} -.mappings-page-subcontainer{ - width: 1248px; - padding: 20px 50px; -} - -.mappings-page-title{ - font-size: 25px; - font-weight: 700; -} -.mappings-page-title .line{ - height: 2px; - width: 57px; - background-color: var(--primary-color); - border-radius: 10px; -} -.mappings-page-decription{ - color: #888888; - margin: 20px 0; -} - -.mappings-bubble{ - cursor: pointer; -} -.mappings-bubble-view-frame{ - width: 600px; - height: 600px; - overflow: auto; -} - -.mappings-zoom-buttons{ - display: flex; - margin-top: 20px; - justify-content: center; -} -.mappings-zoom-buttons svg{ - width: 40px; - cursor: pointer; - path{ - fill: var(--primary-color) - } - &:hover path{ - fill: var(--hover-color) - } -} -.mappings-zoom-buttons div + div{ - margin-left: 40px; -} -.mappings-bubble-view-container{ - display: flex; - flex-direction: column; - align-items: center; -} -.mappings-table-view-container{ - display: flex; - flex-direction: column; - align-items: center; - margin: 20px 0; -} -.mappings-ontologies-select{ - width: 700px; -} - -.mappings-table-container{ - width: 678px; - margin: 20px 0; -} -.mappings-table-ontology-name{ - font-weight: 600; -} - -.bubble-tooltip { - position: absolute; - text-align: center; - padding: 6px; - font-size: 12px; - background: rgba(0, 0, 0, 0.7); - color: white; - border-radius: 4px; - pointer-events: none; - z-index: 9999; -} - -.upload-mappings{ - display: flex; - flex-direction: column; - align-items: center; - margin-top: 20px; -} - -.upload-mappings-example{ - width: 700px; - margin-bottom: 20px; -} -.upload-mappings-example.ontologies{ - width: 600px; -} - -.mappings-page-ontologies-selector{ - width: 100%; - padding: 0 30px 30px 30px; -} -.mappings-page-ontologies-selector .selector-button{ - margin-top: 20px; -} - -.upload-mappings-example .title-bar{ - display: flex; - justify-content: center; - width: 100%; - cursor: pointer; - padding: 15px; - color: var(--primary-color); - align-items: center; -} -.upload-mappings-example .title-bar svg{ - margin-right: 10px; -} - -.summary-mappigs-page-container{ - margin-left: 90px; -} -.mapping-bubbles-loader{ - height: 100%; - display: flex; - justify-content: center; - align-items: center; -} - -.summary-mappings-tab { - margin-top: 10px; -} - -#ontology_viewermappings_content { - .summary-mappings-tab { - display: flex; - } - - .summary-mappings-tab-table { - width: 400px; - } -} - -.mappings-table-pagination a, .mappings-table-pagination em{ - margin-left: 10px; -} - -.mappings-bubble-view-legend{ - width: 600px; - display: flex; - flex-direction: column; - align-items: center; - font-weight: 500; - padding: 20px; -} -.mappings-bubble-view-legend > .title { - display: flex; - flex-direction: column; - align-items: center; -} - -.mappings-bubble-view-legend > .title .text{ - font-size: 18px; - color: var(--primary-color); -} -.mappings-bubble-view-legend > .title .line{ - background-color: var(--primary-color); - border-radius: 100%; - width: 40px; - height: 2px; -} - -.content-container{ - width: 100%; - margin-top: -35px; -} -.bubble-view-legend-item{ - margin-top: 50px; -} -.bubble-view-legend-item .title{ - font-weight: 500; -} -.bubble-view-legend-item .title span{ - font-weight: 400; -} - -.mappings-bubble-size-legend, .mappings-bubble-color-legend{ - display: flex; - justify-content: space-between; - align-items: center; - margin: 20px 0; -} -.mappings-bubble-size-legend .bubble{ - border-radius: 100%; - border: 2px solid var(--primary-color); -} -.mappings-bubble-size-legend .bubble.bubble1{ - width: 10px; - height: 10px; -} -.mappings-bubble-size-legend .bubble.bubble2{ - width: 20px; - height: 20px; -} -.mappings-bubble-size-legend .bubble.bubble3{ - width: 30px; - height: 30px; -} -.mappings-bubble-size-legend .bubble.bubble4{ - width: 40px; - height: 40px; -} -.mappings-bubble-size-legend .bubble.bubble5{ - width: 50px; - height: 50px; -} -.mappings-bubble-size-legend .bubble.bubble6{ - width: 60px; - height: 60px; -} - -.mappings-bubble-color-legend .bubble{ - border-radius: 100%; - background-color: var(--primary-color); - width: 35px; - height: 35px; -} -.mappings-bubble-color-legend .bubble.bubble1{ - opacity: 30%; -} -.mappings-bubble-color-legend .bubble.bubble2{ - opacity: 50%; -} -.mappings-bubble-color-legend .bubble.bubble3{ - opacity: 70%; -} -.mappings-bubble-color-legend .bubble.bubble4{ - opacity: 80%; -} -.mappings-bubble-color-legend .bubble.bubble5{ - opacity: 90%; -} -.mappings-bubble-color-legend .bubble.bubble6{ - opacity: 100%; -} -.mappings-bubble-size-legend .bubble.yellow{ - width: 35px; - height: 35px; - background-color: var(--secondary-color); - border: none; -} -.mappings-legend-text{ - color: var(--primary-color); - font-size: 15px; - font-weight: 500; -} @media (min-width: 1000px) { #mappings_container{ @@ -328,7 +66,7 @@ div#map_from_concept_details_table, div#map_to_concept_details_table { overflow: auto; } -#map_to_picker { +#map_to_picker, .select2-container { width: 100% !important; } @@ -346,23 +84,3 @@ div#map_from_concept_details_table, div#map_to_concept_details_table { width: 100%; } -.summary-mappings-tab-table { - .dataTables_wrapper .dataTables_filter { - float: none; - text-align: unset; - } -} - -.summary-mappings-tab-table label { - display: block; - font-size: 0; -} - -.summary-mappings-tab-table label input[type="search"] { - font-size: 16px; - width: 100%; - border-radius: 8px; - padding: 10px; - outline: none; - margin-left: 0 !important; -} \ No newline at end of file diff --git a/app/assets/stylesheets/nav_bar.scss b/app/assets/stylesheets/nav_bar.scss deleted file mode 100644 index ddf561962..000000000 --- a/app/assets/stylesheets/nav_bar.scss +++ /dev/null @@ -1,201 +0,0 @@ -.nav-container{ - display: flex; - justify-content: center; - background-color: var(--primary-color); -} -.top-nav{ - display: flex !important; - background-color: var(--primary-color); - align-items: center; - justify-content: space-between; - height: 62px; - padding: 8px 42px; - width: 1248px; -} -.nav-responsiveness-container{ - display: flex; - justify-content: space-between; -} -.nav-logo{ - display: flex; - align-items: center; -} -.nav-logo p{ - margin-left: 10px; - color: white; - font-size: 16px; - font-weight: 700; - margin-bottom: 0; -} -.nav-items{ - display: flex; - justify-content: space-between; - align-items:center; - width: 1020px; -} -.nav-items > ul { - display: flex; - list-style: none; - margin-bottom: 0; - padding: 0; -} - -.nav-items > ul > li { - margin-left: 17px; -} - -.nav-items > ul > li > a { - color: white !important; - font-size: 15px; - opacity: 60%; - font-weight: 300; - transition: opacity 0.2s ease-in-out; -} -.nav-items > ul > li > a:hover{ - opacity: 100%; -} -.nav-items > ul > li > a.active{ - opacity: 100%; - font-weight: 500; -} - -.nav-search-container { - width: 50% ; - position: relative; -} -.nav-search-container div > input { - height: 33px; - width: 100%; - outline: none; - opacity: 60%; - border: 1px solid white; - background-color: var(--primary-color) !important; - color: white; - border-radius: 5px; - font-size: 14px; - padding: 0 10px; -} -.nav-search-container div > input:focus{ - opacity: 100%; - border-radius: 5px 5px 0 0; - border: 1px solid white; -} -.nav-search-container div > input::placeholder{ - color: white; - opacity: 60%; -} -.nav-search-container div > input::-ms-input-placeholder{ - color: white; - opacity: 60%; -} - -.nav-search-container .search-container{ - position: absolute; - z-index: 9999; - font-size: 12px !important; - -} - -.nav-language { - width: 47px !important; - .ts-control{ - background-color: transparent; - color: white; - border: none; - outline: none; - cursor: pointer; - } - - &.single.input-active .ts-control{ - background: transparent !important; - } -} - -.nav-language option{ - background-color: white; - color: black; -} -.nav-items .nav-a{ - padding: 3px 34px; - border: 1px solid white; - border-radius: 5px; - color: white !important; - transition: background-color 0.2s ease-in-out; -} -.nav-items .nav-a:hover{ - background-color: rgba(255, 255, 255, 0.1); -} - -.top-nav .menu-btn i{ - color: #fff; - font-size: 22px; - cursor: pointer; - display: none; -} -.top-nav input[type="checkbox"]{ - display: none; -} - -.top-nav-nav-link{ - color: white !important; - padding: 0 !important; -} - - -@media (max-width: 1300px){ - .top-nav .menu-btn i{ - display: block; - } - #nav-menu:checked ~ .menu-btn i:before{ - content: "\f00d"; - } - .nav-items{ - display: none; - } - .menu-btn{ - position: absolute; - right: 40px; - } - .right-nav-items{ - flex-direction: column; - align-items: baseline !important; - } - .nav-search-container .nav-input{ - margin-bottom: 0 !important; - - } - -} -.top-nav.show-responsive { - display: block !important; - background-color: var(--primary-color); - height: unset; -} - -.top-nav-ul.show-responsive { - display: block; - text-decoration-style: none !important; -} - -.nav-items.show-responsive { - flex-direction: column; - width: unset; - display: flex; - align-items: flex-start; -} - -.show-responsive { - margin: 15px 0 !important; -} - -.supportMenuDropdownLink.show-responsive { - margin-bottom: 15px; -} - -.right-nav-items{ - display: flex; - align-items: center; - justify-content: space-between; - width: 50%; - gap: 20px; -} diff --git a/app/assets/stylesheets/notes.scss b/app/assets/stylesheets/notes.scss index 0e957b2d2..9fed83d84 100644 --- a/app/assets/stylesheets/notes.scss +++ b/app/assets/stylesheets/notes.scss @@ -136,6 +136,11 @@ textarea.create_note_inputs { font-size: 12pt; } +.ontologies.show div#facebox div.discussion { + padding-top: 1em; + padding-left: 1.5em; +} + .reply_author { color: #234979; } @@ -331,6 +336,7 @@ textarea.reply_body { } .notes_list_container { + width: 90%; padding: 1em; } diff --git a/app/assets/stylesheets/ontolobridge.scss b/app/assets/stylesheets/ontolobridge.scss deleted file mode 100644 index ebcc8e942..000000000 --- a/app/assets/stylesheets/ontolobridge.scss +++ /dev/null @@ -1,35 +0,0 @@ -/* message boxes */ -.message-box { - color: #555; - border-radius: 3px; - font-family: Tahoma, Geneva, Arial, sans-serif; - font-size: 11px; - padding: 10px; - margin: 10px 0 0 0; -} - -.message-box span { - font-weight: bold; - text-transform: uppercase; -} - -.error-msg { - //background-color: #eee; - border: 1px solid #f5aca6; -} - -.success-msg { - //background-color: #eee; - border: 1px solid #a6ca8a; -} - -input.req, -textarea.req { - border-color: darksalmon !important; -} - -blockquote { - padding: 0 1em; - color: #6a737d; - border-left: .25em solid #dfe2e5; -} diff --git a/app/assets/stylesheets/ontologies.scss b/app/assets/stylesheets/ontologies.scss index 6930a427d..ef45305d3 100644 --- a/app/assets/stylesheets/ontologies.scss +++ b/app/assets/stylesheets/ontologies.scss @@ -2,6 +2,10 @@ $ont-metadata-bg-color: #e2ebf0; $widget-table-border-color: #EFEFEF; +.ontologies.show{ + background-color: #e9ecef; +} + .admin-background{ a.chip_button_container_clickable{ color: var(--admin-color) !important; diff --git a/app/assets/stylesheets/ontology_details_header.scss b/app/assets/stylesheets/ontology_details_header.scss deleted file mode 100644 index 812c2dab7..000000000 --- a/app/assets/stylesheets/ontology_details_header.scss +++ /dev/null @@ -1,112 +0,0 @@ -.ontology-details-header-container{ - padding: 0 50px; - margin: 20px 0; - width: 1248px; -} - -.ontology-details-path{ - display: flex; - align-items: center; - color: #888888; - margin-bottom: 20px; -} -.ontology-details-path svg{ - margin: 0 12px; -} -.ontology-details-path a{ - text-decoration: underline !important; - color: #888888 !important; -} -.ontology-details-header-sub-container{ - display: flex; - justify-content: space-between; - align-items: center; - position: relative; -} - -.ontology-details-name-bar{ - display: flex; - align-items: center; -} -.ontology-details-name-bar > div{ - font-size: 25px; - font-weight: 700; - margin-right: 10px; -} - -.ontology-details-name-bar > div > span{ - font-size: 17px; - font-weight: 500; -} - -.ontology-details-name-bar .ontology-details-licence{ - display: flex; - align-items: center; - background-color: #F6F6F6; - border-radius: 5px; - padding: 10px 20px; - cursor: pointer; - font-size: 12px; - color: #777777; - font-weight: 600; -} -.ontology-details-name-bar .ontology-details-licence svg{ - margin-left: 10px; - transform: scale(1.2); -} -.ontology-details-last-update{ - display: flex; - align-items: center; - font-size: 14px; - color: #888888; - margin-top: 12px; -} -.ontology-details-last-update img{ - margin-right: 10px; -} -.ontology-details-header-right-container{ - display: flex; -} -.ontology-details-watch-button { - color: var(--primary-color); - font-size: 15px; - display: flex; - align-items: center; - border: 1px solid var(--primary-color); - border-radius: 32px; - padding: 10px 20px; - cursor: pointer; - margin-left: 10px; - transition: background-color ease 0.3s; - white-space: nowrap; -} - - -.ontology-details-watch-button:hover,.ontology-details-edit-button:hover { - background-color: var(--primary-color); - color: white !important; - -} - -.ontology-details-watch-button:hover svg path,.ontology-details-edit-button:hover svg path { - fill: white; -} - -.ontology-details-watch-button svg { - margin-right: 10px; -} - -.ontology-details-edit-button { - display: flex; - justify-content: center; - align-items: center; - border: 1px solid var(--primary-color); - border-radius: 22.5px; - padding: 10px; - height: 45px; - width: 45px; - cursor: pointer; - transition: background-color ease 0.3s; -} - - diff --git a/app/assets/stylesheets/ontology_viewer.scss b/app/assets/stylesheets/ontology_viewer.scss index a146cb253..4485bac40 100644 --- a/app/assets/stylesheets/ontology_viewer.scss +++ b/app/assets/stylesheets/ontology_viewer.scss @@ -6,7 +6,7 @@ & > .tabs-container > div { //width: 1248px; - padding: 0 50px; + padding: 0 10px; } & > .tab-content { @@ -15,7 +15,7 @@ & > .tab-pane { //width: 1248px; - padding: 0 50px; + padding: 0 10px; width: 100%; } } diff --git a/app/assets/stylesheets/recommender.scss b/app/assets/stylesheets/recommender.scss index 07ba6952f..6ad1900eb 100644 --- a/app/assets/stylesheets/recommender.scss +++ b/app/assets/stylesheets/recommender.scss @@ -1,195 +1,43 @@ -.recommender-page-container{ - display:flex; - justify-content:center; -} -.recommender-page-subcontainer{ - width: 1248px; - padding: 20px 50px; -} - -.recommender-page-title .text{ - font-size: 25px; - font-weight: 700; -} - -.recommender-page-title .line{ - height: 2px; - width: 57px; - background-color: var(--primary-color); - border-radius: 10px; -} -.recommender-page-decription{ - color: #888888; - margin-top: 20px; -} -.recommender-page-inputs{ - margin-top: 20px; -} -.recommender-page-inputs .inputs{ - display: flex; -} -.recommender-page-text-area, .recommender-page-text-area-results { - box-shadow: 2px 30px 60px rgba(0, 0, 0, 0.1); - border-radius: 8px; - width: 630px; - margin-right: 30px; -} -.recommender-page-text-area-results{ - padding: 20px; - min-height:205px; -} - -.recommender-page-text-area textarea{ - font-size: 16px; - outline: none; - padding: 20px; - width: 630px; - border: none; - margin-right: 30px; -} -.recommender-page-options{ - width: 100%; -} -.recommender-page-text-area .insert-sample-text-button{ - display: flex; - justify-content: flex-end; - padding: 20px; -} -.recommender-page-text-area .insert-sample-text-button .button{ - display: flex; - align-items: center; -} -.recommender-page-text-area .insert-sample-text-button .button:hover{ - cursor: pointer; -} -.recommender-page-text-area .insert-sample-text-button .button .text{ - font-size: 14px; - font-weight: 500; - color: var(--primary-color); - margin-right: 10px; -} -.recommender-page-text-area .insert-sample-text-button .button svg{ - width: 16px; - height: 16px; -} -.recommender-page-text-area .insert-sample-text-button .button svg path{ - fill: var(--primary-color); -} -.recommender-page-options .section-text{ - font-weight: 600; - -} -.recommender-page-options .title{ - margin-top: 10px; - color: #888888; - font-size: 14px; - font-weight: 500; - margin-bottom: 5px; -} -.recommender-page-options .chips{ - display: flex; -} -.recommender-page-options input{ - accent-color: var(--primary-color) revert; -} -.recommender-page-options .radios{ - display: flex; +#inputTextHighlighted { + display:none; + background-color: #e2ebf0; } -.recommender-page-options .advanced-options-button{ - display: flex; - align-items: center; - margin-top: 15px; -} -.recommender-page-options .advanced-options-button:hover{ - cursor: pointer; -} -.recommender-page-options .advanced-options-button .text{ - margin-left: 10px; - color: var(--primary-color); - font-size: 14px; +.generalError, .invalidMaxOntError, .invalidWeightsError, .notTextError, .sumWeightsError, .rangeWeightsError, .maxOntologiesError, .inputSizeError { + display: none; + color: red; } -.recommender-page-options .advanced-options-button svg path{ - fill: var(--primary-color); -} -.recommender-page-button{ - margin-top: 27px; - width: 630px; +#resultsDisplay { + background-color: white !important; + margin-bottom: 35px; } -.recommender-advanced-options .title { - font-weight: 600; - margin-top: 30px; -} -.recommender-advanced-options .inputs-container{ - display: flex; - margin-top: 11px; - margin-bottom: 17px; -} -.recommender-advanced-options .input, .recommender-advanced-options .ninput{ - width: 100%; +.result-scores { + background-color: #8cabd6; + border: 1px solid #3e76b6; } -.recommender-advanced-options .ninput + .ninput{ - margin-left: 20px; +.final-score { + color: #ccc; + background-color: #234979; + border: 1px solid #234979; } -.recommender-advanced-options .ontologies{ - margin-right: 20px; -} -.recommender-advanced-options .hidebutton{ - color: var(--primary-color); - display: flex; - align-items: center; +.score-number { + margin-left: 3px; } -.recommender-advanced-options .hidebutton:hover{ - cursor: pointer; +#recommender-help i { + margin-left: .25em; } -.recommender-advanced-options .hidebutton .text{ - font-size: 14px; - font-weight: 500; - margin-left: 10px; - -} -.recommender-advanced-options .hidebutton svg path{ - fill: var(--primary-color); -} -.recommender-table-container{ - margin-top: 20px; -} -.recommender-page-results .title{ - margin-top: 63px; - font-size: 18px; - font-weight: 600; -} -.recommender-result-ontology{ - font-size: 16px; - display: block; - color: var(--primary-color); -} -.highlighted_recommendation{ - width: 135px; -} -.recommender-result-highlighted{ - display: flex; - justify-content: flex-end; -} -.recommender-page-text-area-results a{ - font-weight: 600; - text-decoration: underline !important; -} - -.recommender-bottom-actions{ - margin-top: 20px; - display: flex; -} -.recommender-bottom-actions div{ - display: inline-block; -} -.recommender-bottom-actions div + div{ - margin-left: 20px; +.recommender.index div#bd form, table#recommendations { + a { + text-decoration: none; + } + a:hover { + text-decoration: underline; + } } \ No newline at end of file diff --git a/app/assets/stylesheets/register.scss b/app/assets/stylesheets/register.scss deleted file mode 100644 index 9dda813db..000000000 --- a/app/assets/stylesheets/register.scss +++ /dev/null @@ -1,93 +0,0 @@ -.register-form{ - margin-top: 30px; - padding: 37px 41px; - box-shadow: rgba(0, 0, 0, 0.05) 0px 20px 50px; - border-radius: 14px; -} -.register-arrowback{ - all: none; -} -.register-title{ - font-size: 18px; - text-align: center; - font-weight: 700; -} -#register-title-line{ - width: 128px; - margin: auto; - margin-bottom: 20px; - margin-top: 3px; - border: 0.5px solid var(--primary-color); - border-radius: 5px; -} - -.register-double-input{ - display: flex; - margin-bottom: 14px; -} -.register-first-input{ - margin-right: 19px; -} - -.register-input-title{ - font-size: 12px; - color: #666666; - margin-bottom: 5px; - font-weight: 600; -} -.register-optional{ - font-weight: 300; -} -.register-input-long{ - width: 363px; - outline: none; - padding: 14px; - font-size: 15px; - font-weight: 500; - border: 1px solid #BDBDBD; - border-radius: 9px; - margin-bottom: 14px; -} -.register-input-long:focus{ - border: 1px solid var(--primary-color); -} - -.register-input-short{ - width: 172px; - outline: none; - padding: 14px; - font-size: 15px; - font-weight: 500; - border: 1px solid #BDBDBD; - border-radius: 9px; -} -.register-input-short:focus{ - border: 1px solid var(--primary-color); -} - - -.register-input-icon{ - position: absolute; - padding: 18px; - box-sizing: unset; -} -.register-input-with-icon{ - padding-left: 45px; -} -#register-check-text{ - margin-left: 10px; - color: #666666; - font-size: 12px; - font-weight: 400; - margin-bottom: 0; - margin-top: 14px; -} - -.register-button-container{ - margin-top: 20px; -} - -.user_register_checkbox{ - margin-top: 14px; - accent-color: #8E8E8E; -} diff --git a/app/assets/stylesheets/search.scss b/app/assets/stylesheets/search.scss index e66312f7e..803647cbb 100644 --- a/app/assets/stylesheets/search.scss +++ b/app/assets/stylesheets/search.scss @@ -1,83 +1,213 @@ -.search-page-container { - display: flex; - justify-content: center; +form.button-to { + float: left; } -.search-page-subcontainer { - width: 1248px; - padding: 20px 50px; + +#ontology_picker_head { + font-size: 10pt !important; +} + +.not_visible { + position: fixed !important; + top: -999999px !important; +} + +#search_results_container #search_results_info { + display: none !important; +} + +#search_results_filter { + display: none; +} + +#search_spinner { + display: inline-block; + padding: 8px 4px; +} + +#search_options #ontology_ontologyId { + display: none; +} + +.class_details_pop { + overflow: auto; + width: 750px !important; + display: block !important; } -.search-page-input-container{ - width: 100%; + +table#search_results td { + vertical-align: top; + padding: 12px 8px 12px 12px; } -.search-page-input{ - position: relative; - padding-bottom: 30px; - display: flex; - .search-container{ - top:65px; - } +div.search_result { + margin-bottom: 1.5em; } -.search-page-input input{ - border-radius: 8px; - box-shadow: rgba(100, 100, 111, 0.1) 0 7px 29px 0; - border: none; - outline: none; - font-size: 18px; - padding: 15px 25px; - width: 100%; + +div.class_link { + a { + font-size: 18px; + text-decoration: none; + } + a:hover { + text-decoration: underline; + } } -.search-page-input input:focus{ - box-shadow: rgba(100, 100, 111, 0.2) 0 7px 29px 0; + +span.class_def { + display: block; + margin: 3px 0 2px; + font-size: 12px; } -.search-page-advanced{ - display: flex; - margin-bottom: 15px; + +.additional_ont_results { + padding: 2em; + margin: 2em; + background-color: rgb(230,230,230); } -.search-page-advanced .left{ - width: 600px; - margin-right: 40px; + +.additional_cls_results { + padding: 2em; + margin: 2em; + background-color: rgb(230,230,230); } -.search-page-advanced .filter-container{ - margin-bottom: 15px; + +.subordinate_ont_results { + padding: 1em; + padding-left: 2em; + padding-top: 2em; + margin: 1em; + margin-left: 2em; + margin-top: 2em; + background-color: rgb(240,240,240); } -.search-page-advanced .filter-container .title{ - margin-bottom: 5px; - color: #888888; - font-size: 14px; + +.subordinate_ont_results_title { + color: rgb(100,100,100); + background: rgb(200,200,200); + padding: 0.5em; } -.search-page-button{ - width: 120px; - margin-left: 20px; + +div.search_result_additional { + padding-left: 30px; + margin: 1em 0 1.2em; +} + +div.search_result_additional .class_link a { + font-size: 15px !important; } -.search-page-button svg{ - width: 14px; +div.additional_results_link { + margin-top: 5px; } -.search-page-options{ - display: flex; - justify-content: space-between; +.search_result_links { + a { + color: green; + font-size: 14px; + text-decoration: none; + } + a:hover { + color: green; + text-decoration: underline; + } } -.search-page-advanced-button{ - display: flex; - align-items: center; + +.hide_link { + text-decoration: underline; + padding-left: 7px; } -.search-page-advanced-button :hover{ - cursor: pointer; + +.not_underlined { + text-decoration: none; } -.search-page-advanced-button .text{ - margin-left: 10px; - color: var(--primary-color); + +#search_results { + display: none; } -.search-page-advanced-button .icon svg path{ - fill: var(--primary-color); +#search_results_container { + margin-top: .5em; + clear: both; } -.search-page-number-of-results{ - color: #888888; + +div#search_categories_chzn { + width: 432px !important; +} + +div#search_categories_chzn .chzn-choices input { + font-style: oblique; +} + +div#search_categories_chzn.chzn-container-active input { + font-style: normal !important; +} + +div#search_categories_chzn .chzn-drop { + width: 432px !important; +} + +#search_messages { + font-style: oblique; + color: gray; + padding-bottom: 7px; +} + +#result_stats { + a { + color: gray; + text-decoration: none; + } + a:hover { + text-decoration: underline; + } +} + +#classSearchHelpBlock { + a { + float: right; + text-decoration: none; + } + a:hover { + text-decoration: underline; + } +} + +#ontology_counts { + display: none; +} + +.popup_counts { + float: right; + display: none; +} + +.ontology_counts_tooltip { + background-color: #EEEEEE; + border: 1px solid black; + color: black; + font-size: 12px; + padding: 10px 15px; + text-align: left; + z-index: 999; + box-shadow: 3px 3px 7px gray; +} + +.definition { + cursor: help; +} + +.concept_uri { + font-size: 12px; + color: gray; +} + +#search_categories_chosen .chosen-container .chosen-container-multi { + width: 432px; } -.search-page-result-element{ - margin-top: 40px; +/* Prevents placeholder text in search input from being truncated. +/* https://github.com/harvesthq/chosen/issues/2029#issuecomment-187442769 */ +#search_options #ontology_ontologyId_chosen .search-field:only-child, +#search_options #ontology_ontologyId_chosen .search-field:only-child input { + width: 100% !important; } diff --git a/app/assets/stylesheets/summary.scss.erb b/app/assets/stylesheets/summary.scss.erb deleted file mode 100644 index dc05fe2a5..000000000 --- a/app/assets/stylesheets/summary.scss.erb +++ /dev/null @@ -1,253 +0,0 @@ -.summary-page-center { - display: flex; - justify-content: center; - flex-wrap: wrap; - .flag-icon{ - width: 30px; - height: 30px; - } -} -.summary-page-center a{ - color: var(--primary-color) !important; -} - -.summary-page-center .card_title{ - margin-top: 40px; -} -.add-views-plus-icon path{ - fill: var(--primary-color) -} -.summary-link-truncate{ - max-width: 330px; - display: inline-flex; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; -} - -.summary-page-first-row { - width: 670px; - margin-right: 20px; -} - -.summary-page-second-row { - width: 450px; -} - -@media (max-width: 1288px) { - .summary-page-first-row { - width: 100%; - margin: 0; - padding: 0 20px; - } - .summary-page-second-row { - width: 100%; - margin: 0; - padding: 0 20px; - } -} - -.show > .btn-outline-primary.dropdown-toggle { - background-color: var(--primary-color) !important; - color: white !important; -} - - -.description_text, -.description_text a { - color: #888888 !important; - font-size: 15px; - overflow: hidden; - margin-bottom: 0; - flex: 1; - min-width: 500px; -} - - -.creation_info { - display: flex; - flex-wrap: wrap; - align-items: center; -} - - - -.date_creation_text { - font-size: 14px; - font-weight: 700; -} - -.creator_text { - color: #888888; - font-size: 14px; - margin-left: 5px; - font-weight: 550; - margin-top: 15px; - width: 300px; -} - -.creation_text { - font-size: 16px; -} - - -.icons_container { - margin-top: 10px; - justify-content: space-evenly; - display: flex; - padding: 0 20px; - svg path { - fill: var(--primary-color); - } -} - - - -.disabled-icon { - pointer-events: none; - svg path { - fill: rgba(0, 0, 0, 0.1) !important; - } -} - -.normal_text { - font-size: 15px; - color: black; - word-wrap: break-word; -} - - - -.metrics { - display: flex; - justify-content: space-between; -} - -.metrics-container { - border-radius: 8px; - height: 90px; - box-shadow: 2px 0px 60px rgba(0, 0, 0, 0.1); - padding: 71px 40px; - margin-top: 10px; -} - -.metrics-container > div { - display: flex; - align-items: center; - margin-bottom: 20px; -} - -.metrics-container > div > p { - font-size: 20px; - font-weight: 600; - margin-left: 18px; -} - -.metrics-item { - display: flex; - align-items: center; -} - -.metrics-item hr { - height: 73px; - width: 0px; - border: 2px solid var(--primary-color); - border-radius: 5px; - margin-right: 15px; -} - -.metrics-item h4 { - font-size: 30px; - font-weight: 600; - line-height: 1.2; - color: #000000; -} - -.metrics-item p, -.metrics-item a { - font-size: 18px; - font-weight: 400; -} - - -#ontology_versions .show_more_subs td { - text-align: right; -} - -#networkContainer{ - transition: transform 0.3s; - } - -.active-fullscreen { - width: 100%; - height: 100vh; - position: fixed; - left: 0; - top: 0; - background-color: #ffffff; - z-index: 9999; -} -#fullscreen-button { - background-color: var(--primary-color); - -webkit-mask-image: url(asset-path('icons/full-screen.svg')); - mask-image: url(asset-path('icons/full-screen.svg')); - float: right; - position: relative; - bottom: 79px; - width: 32px; - height: 31px; - background-repeat: no-repeat!important; - background-position: 2px 2px; - right: 58px; - cursor: pointer; - } - -div.vis-network div.vis-navigation { - div.vis-button.vis-up{ - background-color: var(--primary-color); - -webkit-mask-image: url(asset-path('icons/circle-up.svg')); - mask-image: url(asset-path('icons/circle-up.svg')); - background-image: none !important; - } - div.vis-button.vis-down{ - background-color: var(--primary-color); - -webkit-mask-image: url(asset-path('icons/circle-down.svg')); - mask-image: url(asset-path('icons/circle-down.svg')); - background-image: none !important; - } - - div.vis-button.vis-left{ - background-color: var(--primary-color); - -webkit-mask-image: url(asset-path('icons/circle-left.svg')); - mask-image: url(asset-path('icons/circle-left.svg')); - background-image: none !important; - } - - div.vis-button.vis-right{ - background-color: var(--primary-color); - -webkit-mask-image: url(asset-path('icons/circle-right.svg')); - mask-image: url(asset-path('icons/circle-right.svg')); - background-image: none !important; - } - - div.vis-button.vis-zoomIn{ - background-color: var(--primary-color); - -webkit-mask-image: url(asset-path('icons/zoom-in.svg')); - mask-image: url(asset-path('icons/zoom-in.svg')); - background-image: none !important; - } - - div.vis-button.vis-zoomOut{ - background-color: var(--primary-color); - -webkit-mask-image: url(asset-path('icons/zoom-out.svg')); - mask-image: url(asset-path('icons/zoom-out.svg')); - background-image: none !important; - } - - div.vis-button.vis-zoomExtends{ - background-color: var(--primary-color); - -webkit-mask-image: url(asset-path('icons/zoom-center.svg')); - mask-image: url(asset-path('icons/zoom-center.svg')); - background-image: none !important; - } -} diff --git a/app/assets/stylesheets/theme-variables.scss.erb b/app/assets/stylesheets/theme-variables.scss.erb index 0f87e4443..2b900be72 100644 --- a/app/assets/stylesheets/theme-variables.scss.erb +++ b/app/assets/stylesheets/theme-variables.scss.erb @@ -17,7 +17,7 @@ } <% when "bioportal" %> :root{ - --primary-color: #76A7CC; + --primary-color: #234979; --hover-color: #6B96B7; --secondary-color: #ffc107; --light-color: #F0F5F6; diff --git a/app/assets/stylesheets/themes/agroportal/main.scss b/app/assets/stylesheets/themes/agroportal/main.scss deleted file mode 100644 index 61f21efe3..000000000 --- a/app/assets/stylesheets/themes/agroportal/main.scss +++ /dev/null @@ -1,6 +0,0 @@ -$color-primary: var(--primary-color); -$color-secondary: #EFFFEF; -$color-links: var(--primary-color); -$color-warning: #ffc107; -@import "../lirmm/main"; -@import "search"; \ No newline at end of file diff --git a/app/assets/stylesheets/themes/agroportal/search.scss b/app/assets/stylesheets/themes/agroportal/search.scss deleted file mode 100644 index 12d7d1944..000000000 --- a/app/assets/stylesheets/themes/agroportal/search.scss +++ /dev/null @@ -1,3 +0,0 @@ -.search_result_links a { - color: $color-primary !important; -} diff --git a/app/assets/stylesheets/themes/bioportal/main.scss b/app/assets/stylesheets/themes/bioportal/main.scss deleted file mode 100644 index a56992679..000000000 --- a/app/assets/stylesheets/themes/bioportal/main.scss +++ /dev/null @@ -1,6 +0,0 @@ -$color-primary: #76A7CC; -$color-secondary: #E4F1FB; -$color-links: #76A7CC; -$color-warning: #ffc107; -@import "../lirmm/main"; -@import "search"; \ No newline at end of file diff --git a/app/assets/stylesheets/themes/bioportal/search.scss b/app/assets/stylesheets/themes/bioportal/search.scss deleted file mode 100644 index 69fc5a534..000000000 --- a/app/assets/stylesheets/themes/bioportal/search.scss +++ /dev/null @@ -1,3 +0,0 @@ -.search_result_links a { - color: #00AAFF !important; -} diff --git a/app/assets/stylesheets/themes/lirmm/annotator.scss b/app/assets/stylesheets/themes/lirmm/annotator.scss deleted file mode 100644 index dc7676878..000000000 --- a/app/assets/stylesheets/themes/lirmm/annotator.scss +++ /dev/null @@ -1,34 +0,0 @@ -.annotator, .ncbo_annotatorplus { - - #annotator-help { - display: none; - } - #annotator-help > i.fa.fa-question-circle { - margin-left: .25em; - vertical-align: middle; - } - - #download_links { - margin-top: 1.5em; - } - - #annotator_parameters { - font-weight: normal; - } - - .annotator_spinner { - display: none; - - img { - margin-left: 3px; - vertical-align: middle; - } - } - - .annotator_error { - color: red; - font-style: italic; - margin-left: 3px; - vertical-align: middle; - } -} diff --git a/app/assets/stylesheets/themes/lirmm/app.scss b/app/assets/stylesheets/themes/lirmm/app.scss deleted file mode 100755 index c6fcafeac..000000000 --- a/app/assets/stylesheets/themes/lirmm/app.scss +++ /dev/null @@ -1,258 +0,0 @@ - -body.ontologies.index { - - .grid-container { - /*max-width: 1400px;*/ - } - - [ng-cloak].splash { - display: block !important; - } - - .splash { - display: none; - width: 25%; - height: 4em; - padding: 2em; - text-align: center; - margin: 2em auto; - background-color: #ECECEC; - border-radius: 3px; - } - - [ng-cloak] { - display: none; - } - - .admin { - background-color: $color-secondary !important; - } - - .welcome_admin { - width: 33%; - padding: 7px 10px 5px; - border-radius: 3px; - text-align: center; - top: -5em; - position: relative; - float: right; - left: -33%; - } - - .search { - float: left; - width: 150px; - padding: 2px 4px 1px; - margin-top: -5px; - width: 200px; - } - - .smaller { - color: gray; - font-size: .8em; - padding-bottom: 2px; - } - - #facets { - margin-top: 1em; - } - - .new_ontology_button { - display: inline-block; - width: 100%; - padding-left: 0px !important; - padding-right: 0px !important; - margin-top: 1em; - } - - .facet { - margin: 1em 0; - border: thin lightGray solid; - padding: 5px; - border-radius: 3px; - } - - .facet_disabled { - color: #ddd; - } - - .checkbox_list { - max-height: 200px; - overflow: auto; - padding-left: 1px; - } - - .checkbox_list > span { - display: block; - } - - .checkbox_list > span > label { - text-overflow: ellipsis; - overflow-x: hidden; - width: 75%; - margin: 0px; - - /* SOLUTION 1 */ - /* - display: inline; - */ - - /* SOLUTION 2 */ - white-space: nowrap; - margin-bottom: -7px; - } - - #sorting { - } - - #sorting_float { - float: right; - margin-bottom: .5em; - } - - @keyframes highlight { - 0% { - background: yellow; - } - 100% { - background: none; - } - } - @-webkit-keyframes highlight { - 0% { - background: yellow; - } - 100% { - background: none; - } - } - - .trigger_highlight-add, .trigger_highlight-remove { - -webkit-animation: highlight 1s; - animation: highlight 1s; - } - - #ontologies { - } - - .clear { - clear: both; - } - - .ontology { - border: thin gray solid; - border-radius: 5px; - padding: .5em 1em .5em; - margin: 1em 0; - } - - .ontology_view_badge { - float: left; - height: 1em; - padding: 5px; - text-align: center; - margin-right: 5px; - border-radius: 3px; - color: white; - background-color: $color-primary; - font-size: 1em; - font-weight: bold; - } - - .ontology_view_badge a { - color: white; - text-decoration: none; - } - - .locked_ont { - font-size: .65em; - padding-left: .2em; - color: gray; - cursor: help; - /* Make the lock appear in the upper left corner */ - /* - background-color: $color-primary; - padding: 2.5px 4px; - font-size: 1em; - color: white; - position: relative; - left: -10px; - top: -8px; - border-radius: 5px 0px; - float: left; - */ - } - - .ont-info { - margin: 5px 5px 0 0; - display: inline-block; - padding: 5px 10px 3px; - border-radius: 3px; - background-color: #ECECEC; - font-size: 11px; - } - - .badge_grid { - padding-bottom: 10px; - float: right !important; - } - - .badge_title { - border-radius: 4px 4px 0 0; - font-size: 12px; - color: white; - background-color: $color-primary; - - } - - .badge_count { - border-radius: 0 0 4px 4px; - height: 22px; - font-size: 1.1em; - font-weight: bold; - color: $color-primary; - overflow-wrap: break-word; - } - - .badge:hover .badge_count { - background-color: rgba(220, 235, 255, 0.79); - } - - .badge-fair { - .ontology_badge { - border-color: $color-warning; - - .badge_title { - background-color: $color-warning; - } - - .badge_count { - color: $color-warning; - } - - &:hover .badge_count { - background-color: $color-warning; - color: white; - } - } - } - .ontology_badge { - border-radius: 5px; - text-align: center; - max-width: 120px; - height: 45px; - max-height: 45px; - border: solid $color-primary thin; - } - .ontology_badge:hover { - /*box-shadow: 0px 0px 10px 5px rgba(25, 25, 25, .5);*/ - cursor: pointer; - /*border: none;*/ - } - - .ontology_badge:hover .badge_count { - background-color: rgba(220, 235, 255, 0.79); - } -} - - diff --git a/app/assets/stylesheets/themes/lirmm/bootstrap_overrides.scss b/app/assets/stylesheets/themes/lirmm/bootstrap_overrides.scss deleted file mode 100644 index 8fc7d557c..000000000 --- a/app/assets/stylesheets/themes/lirmm/bootstrap_overrides.scss +++ /dev/null @@ -1,55 +0,0 @@ -body { - margin-bottom: 0px !important; -} - -a { - color: $color-links !important; -} -a i { - color: var(--primary-color); -} -.text-primary { - color: var(--primary-color) !important; -} - - -.btn-info, .btn-outline-primary:hover, .btn-primary , .nav-pills .nav-link.active{ - background-color: var(--primary-color) !important; - border-color: var(--primary-color) !important; - color: #fff !important; -} -.btn-outline-primary{ - border-color: var(--primary-color) !important; - color: var(--primary-color) !important; -} -.btn-danger { - color: #fff !important; -} - -.bg-success { - background-color: $color-secondary !important; -} - -.btn-link { - color: var(--primary-color) !important; -} -.card-header.bg-success { - font-weight: bold; -} - -#ontology_submission_form .card-link:before { - font-family: "Font Awesome 5 Free"; - content: "\f078"; - display: inline-block; - margin-right: 5px; - vertical-align: middle; - font-weight: 900; -} -#ontology_submission_form .card-link.collapsed:before { - content: "\f054"; -} -#ontology_submission_form .add-value-btn { - margin-bottom: 0.5em; - margin-top: 0.0em; - margin-left: 0.0em; -} diff --git a/app/assets/stylesheets/themes/lirmm/jqcloud.scss b/app/assets/stylesheets/themes/lirmm/jqcloud.scss deleted file mode 100644 index 2816b36ff..000000000 --- a/app/assets/stylesheets/themes/lirmm/jqcloud.scss +++ /dev/null @@ -1,49 +0,0 @@ -/* fonts */ - -div.jqcloud { - font-family: "Helvetica", "Arial", sans-serif; - font-size: 10px; - line-height: normal; -} - -div.jqcloud a { - font-size: inherit; - text-decoration: none; -} - -div.jqcloud span.w10 { font-size: 550%; } -div.jqcloud span.w9 { font-size: 500%; } -div.jqcloud span.w8 { font-size: 450%; } -div.jqcloud span.w7 { font-size: 400%; } -div.jqcloud span.w6 { font-size: 350%; } -div.jqcloud span.w5 { font-size: 300%; } -div.jqcloud span.w4 { font-size: 250%; } -div.jqcloud span.w3 { font-size: 200%; } -div.jqcloud span.w2 { font-size: 150%; } -div.jqcloud span.w1 { font-size: 100%; } - -/* colors */ - -div.jqcloud { color: #09f; } -div.jqcloud a { color: inherit; } -div.jqcloud a:hover { color: #0df; } -div.jqcloud a:hover { color: #0cf; } -div.jqcloud span.w10 { color: #0cf; } -div.jqcloud span.w9 { color: #0cf; } -div.jqcloud span.w8 { color: #0cf; } -div.jqcloud span.w7 { color: #39d; } -div.jqcloud span.w6 { color: #90c5f0; } -div.jqcloud span.w5 { color: #90a0dd; } -div.jqcloud span.w4 { color: #90c5f0; } -div.jqcloud span.w3 { color: #a0ddff; } -div.jqcloud span.w2 { color: #99ccee; } -div.jqcloud span.w1 { color: #aab5f0; } - -/* layout */ - -div.jqcloud { - overflow: hidden; - position: relative; -} - -div.jqcloud span { padding: 0; } \ No newline at end of file diff --git a/app/assets/stylesheets/themes/lirmm/landscape.scss b/app/assets/stylesheets/themes/lirmm/landscape.scss deleted file mode 100644 index 9e2d4325c..000000000 --- a/app/assets/stylesheets/themes/lirmm/landscape.scss +++ /dev/null @@ -1,43 +0,0 @@ -// Place all the styles related to the landscape controller here. -// They will automatically be included in application.css. -// You can use Sass (SCSS) here: http://sass-lang.com/ -.landscape_ontologies_selector{ - width: 100%; -} - -h1 { - font-size: 300%; - margin-bottom: 40px; -} - -#pieChartDiv h2 { - margin-bottom: -2em; -} - -hr { - width: 50%; - margin: 40px 0px; -} - -#chartTooltip { - position: absolute; - width: 200px; - height: auto; - padding: 10px; - background-color: white; - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - border-radius: 10px; - -webkit-box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.4); - -mox-box-shadow: 4px 4px 4px 10px rgba(0, 0, 0, 0.4); - box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.4); -} -#chartTooltip.hidden { - opacity: 0; -} -#chartTooltip p { - margin: 0; - font-family: sans-serif; - font-size: 16px; - line-height: 20px; -} \ No newline at end of file diff --git a/app/assets/stylesheets/themes/lirmm/main.scss b/app/assets/stylesheets/themes/lirmm/main.scss deleted file mode 100644 index 53ba749a4..000000000 --- a/app/assets/stylesheets/themes/lirmm/main.scss +++ /dev/null @@ -1,236 +0,0 @@ - -@import "annotator"; -@import "app"; -@import "bootstrap_overrides"; -@import "jqcloud"; -@import "landscape"; -@import "ontologies"; -@import "recommender"; -@import "search"; - - -/************************************ - * MISC - ************************************/ - -.tabs li.selected { - background: $color-primary; -} -.tabs li.selected a { - color: #fff !important; -} - -.tabs a.active { - background-color: $color-primary !important; - color:#fff !important; -} - -.minimal tbody tr:hover td { - color: $color-primary; -} -.zebra th { - color: $color-primary; -} -.zebra tbody th { - color: $color-primary; -} -.form th { - color: $color-primary; -} -.notetype { - color: $color-primary; -} -.header { - color: $color-primary; -} -.resources th { - color: $color-primary; -} -.resources tbody th { - color: $color-primary; -} -tr.mainresource td { - color: $color-primary; -} -.star_ratings { - color: $color-primary; -} -.pheader { - color: $color-primary; -} -.too_many_children_override { - color: $color-primary !important; -} -.too_many_children_override:hover { - color: $color-primary !important; -} -.sf-menu ul { - width: 25em !important; -} -.sf-menu li { - background: $color-secondary !important; -} -.sf-menu a, .sf-menu a:visited { /* visited pseudo selector so IE6 applies text colour*/ - color: $color-links !important; -} -.error { - text-indent: 25px; - background-position: 5px 50%; -} -textarea.error { - text-indent: 0px !important; - background: none !important; -} - -/************************************ - * NAV - ************************************/ - -.nav-tabs .nav-link { - color: #999 !important -} - -.nav-tabs .nav-link.active { -} - -.navbar-brand .site-name { - color: #fff; - font-size: 24px; - font-weight: bold; - margin-left: 5px !important; - display: inline; - line-height: 55px; -} - -.navbar-nav .nav-link { - color: rgba(255, 255, 255, 0.7) !important; - - &:hover { - color: rgba(255, 255, 255, 1.0) !important; - } -} - -.navbar-nav i { - color: #fff; -} - -.btn-bp-login { - color: $color-primary; - background-color: #fff; - border-color: #fff !important; - - &:hover { - color: $color-primary; - background-color: $color-secondary; - } -} - -.navbar-custom { - background-color: $color-primary; -} - -/************************************ - * TOOLTIPS - ************************************/ - -a.tooltip_link { - font-size: 20px; - float: right; - cursor: help; -} - -a.tooltip_link:hover { - background-color: $color-secondary !important; - border-radius: 999px; -} - -a.tooltip_link.extractable-metadatum { - float: none !important; -} -a.tooltip_link.extractable-metadatum i { - margin: 0px 5px 0px 0px; - color: #aaa; -} -a.tooltip_link.extractable-metadatum, -a.tooltip_link.extractable-metadatum * { - font-size: 16px; -} -.datepicker-btn { - cursor: pointer; -} - -/************************************ - * HOME PAGE -************************************/ -i.fa.fa-caret-square-o-down { - vertical-align: middle; - margin-left: 2px; -} - -div.logos { - text-align: center; - padding: 15px; -} - -div.logos img { - max-height: 75px; - margin: 5px; - opacity: 0.8; - - &:hover { - opacity: 1; - } -} - -div.logos.other-portals img { - border-radius: 10px; -} - -div.logos a { - text-decoration: none; -} - -@media only screen and (max-width: 992px) { - - div.logos img { - max-height: 50px !important; - } - -} - -@media only screen and (max-width: 768px) { - - div.logos img { - max-width: 50px !important; - } - -} - -/************************************ - * ABOUT PAGE -************************************/ - -.about { - h2 { - font-size: 150% !important; - padding-bottom: .17em; - border-bottom: 1px solid #AAAAAA; - font-weight: normal !important; - width: auto !important; - } - - p { - text-align: justify; - } -} - -/************************************ - * PROJECTS PAGE -************************************/ - -.projects { - #projects-help { - display: none; - } -} - diff --git a/app/assets/stylesheets/themes/lirmm/ontologies.scss b/app/assets/stylesheets/themes/lirmm/ontologies.scss deleted file mode 100644 index 5da36eb55..000000000 --- a/app/assets/stylesheets/themes/lirmm/ontologies.scss +++ /dev/null @@ -1,58 +0,0 @@ -@media screen and (min-width: 992px) { - .ont-metadata { - grid-template-columns: 70% 30% !important; - } - - .ont-additional-metadata-card { - margin-right: 16px; - } - - .ont-links-card, .ont-metadatalinks-card, .ont-included-in-data-catalog-card, .ont-logo-depiction-card { - margin-bottom: 32px; - } -} - -.ont-metadata-card { - - td:nth-child(1) { - background-color: #f0f0f0; - white-space: normal !important; - text-transform: capitalize; - } - -} - -.ont-additional-metadata-card { - grid-column: 1; - grid-row: 2; - - .logo { - height: 40px; - border-width: 0px; - } -} - -.ont-included-in-data-catalog-card a.btn { - margin-right: 0.5em; - margin-bottom: 0.5em; -} - -.ont-subs-card { - grid-row: 3; -} - -.ont-views-card { - grid-row: 4; -} - -#createNewMappingModal { - - .modal-header { - display: initial !important; - } - - .modal-body { - padding: 2rem !important; - } - -} diff --git a/app/assets/stylesheets/themes/lirmm/recommender.scss b/app/assets/stylesheets/themes/lirmm/recommender.scss deleted file mode 100644 index 60026cc7a..000000000 --- a/app/assets/stylesheets/themes/lirmm/recommender.scss +++ /dev/null @@ -1,3 +0,0 @@ -#recommender-help { - display: none; -} diff --git a/app/assets/stylesheets/themes/lirmm/search.scss b/app/assets/stylesheets/themes/lirmm/search.scss deleted file mode 100644 index 703daaf3f..000000000 --- a/app/assets/stylesheets/themes/lirmm/search.scss +++ /dev/null @@ -1,4 +0,0 @@ -.search_result_links a { - text-decoration: underline; - font-size: 14px !important; -} diff --git a/app/assets/stylesheets/themes/ontoportal/main.scss b/app/assets/stylesheets/themes/ontoportal/main.scss deleted file mode 100644 index b314af78e..000000000 --- a/app/assets/stylesheets/themes/ontoportal/main.scss +++ /dev/null @@ -1,6 +0,0 @@ -$color-primary: var(--primary-color); -$color-secondary: #E4F1FB; -$color-links: var(--primary-color); -$color-warning: #ffc107; -@import "../lirmm/main"; -@import "search"; \ No newline at end of file diff --git a/app/assets/stylesheets/themes/ontoportal/search.scss b/app/assets/stylesheets/themes/ontoportal/search.scss deleted file mode 100644 index 12d7d1944..000000000 --- a/app/assets/stylesheets/themes/ontoportal/search.scss +++ /dev/null @@ -1,3 +0,0 @@ -.search_result_links a { - color: $color-primary !important; -} diff --git a/app/assets/stylesheets/themes/stageportal/main.scss b/app/assets/stylesheets/themes/stageportal/main.scss deleted file mode 100644 index b314af78e..000000000 --- a/app/assets/stylesheets/themes/stageportal/main.scss +++ /dev/null @@ -1,6 +0,0 @@ -$color-primary: var(--primary-color); -$color-secondary: #E4F1FB; -$color-links: var(--primary-color); -$color-warning: #ffc107; -@import "../lirmm/main"; -@import "search"; \ No newline at end of file diff --git a/app/assets/stylesheets/themes/stageportal/search.scss b/app/assets/stylesheets/themes/stageportal/search.scss deleted file mode 100644 index 69fc5a534..000000000 --- a/app/assets/stylesheets/themes/stageportal/search.scss +++ /dev/null @@ -1,3 +0,0 @@ -.search_result_links a { - color: #00AAFF !important; -} diff --git a/app/assets/stylesheets/tools.scss b/app/assets/stylesheets/tools.scss deleted file mode 100644 index 3ed34770a..000000000 --- a/app/assets/stylesheets/tools.scss +++ /dev/null @@ -1,13 +0,0 @@ -.tools-container{ - svg path { - fill: var(--primary-color); - } - .summary-card{ - height: 100%; - background-color: white; - } - - .tool-description{ - color: var(--gray-color) !important; - } -} \ No newline at end of file diff --git a/app/assets/stylesheets/tree.scss b/app/assets/stylesheets/tree.scss new file mode 100644 index 000000000..364341e7c --- /dev/null +++ b/app/assets/stylesheets/tree.scss @@ -0,0 +1,323 @@ +/******************** +## TREE VIEW +*********************/ +div.tree_error { + background: none repeat scroll 0 0 lightYellow; + font-weight: 600; + padding: 5px 10px; +} +.expansion_error { + color: red; + font-size: x-small; + font-style: oblique; + padding: 0 3px; +} +.ncboTree { + margin:0; + padding:0; + font-family: sans-serif; +} +.ncboTree li { + list-style: none; + margin:0; + padding:0 0 0 22px; + line-height: 14px; +} +.ncboTree li span { + display:inline; + clear: left; + white-space: nowrap; +} +.ncboTree ul { + margin:0; + padding:0; +} +.ncboTree .root ul { + margin:0; +} +.ncboTree .root { + margin-left:-16px !important; +} +.ncboTree .line { + padding:0; + line-height: 3px; + height:3px; + font-size:3px; + background: 0 0 no-repeat transparent url(data:image/gif;base64,R0lGODlhUAAUAIABAICAgP///yH5BAEAAAEALAAAAABQABQAAAI0jI+py+0PG4i02ouz3mryD4bi+HjkiabqYq7uC2NtTNd2MN/6Tub8D5QFh8SKr4hEHpOQAgA7); +} +.ncboTree .line-last { + padding:0; + line-height: 3px; + height:3px; + font-size:3px; + background: 0 0 no-repeat transparent url(data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==); +} +.ncboTree .line-over { + padding:0; + line-height: 3px; + height:3px; + font-size:3px; + background: 0 0 no-repeat transparent url(data:image/gif;base64,R0lGODlhUAAUAMQfAICAgEVFRUZHRoKBgUlISKKionl6enJycmRkY2tra/Ly81JSUpGRkaqqq8rLyrOzstnZ2cLDwk1NTfv8+/f39+zt7Lq7u+fn5lhYV////15eXuDg4NLS0omKipqamf///yH5BAEAAB8ALAAAAABQABQAAAV44CeOH0CSQXCubOu+cAwHAvFJ3/Jhn/Yhn8Tn8DF8Bp/Oh/HxfAqfxufxsXwiH8eH84F8Np/Lp/JRfCifyScjM7FSsrh8Tq/b73Q3fs/v+/9zeoCDhIWGMIKHiouMeImNkJGSJI+TlpeFlZibnHeanaChL5+ipZshADs=); +} +.ncboTree .line-over-last { + padding:0; + line-height: 3px; + height:3px; + font-size:3px; + background: 0 0 no-repeat transparent url(data:image/gif;base64,R0lGODlhUAAUAMQeAEVFRWtra+fn5k1NTWRkY3l6enJycklISMrLyvLy8////5qamV5eXvf397q7u1hYV8LDwkZHRoKBgbOzspGRkVJSUtnZ2eDg4Ozt7Pv8+6qqq9LS0omKiqKiov///wAAACH5BAEAAB4ALAAAAABQABQAAAVooCeOZOkBgKmubOu+8AhEhzd4lfd4jEd4AY/BU/BIPBwPxbPwdDwaz8Tj8EA8CM/GY/FcPAIPxpPwNDwZjyK2QrHf8Lh8Tq/b7/i8fs/v+/+AgYKDhIWGh4iJiouMjY6PkJGSk5SViSEAOw==); +} +.ncboTree .folder-open { + background: 0 -2px no-repeat #fff url(data:image/gif;base64,R0lGODlhEQC6BOYAAICAgP//nHueu8aaGfn7+f/4k8TExP/////bdf/vif/kf///mQQCBMS+uaVzDcyZNM/PvNrYyuzs6OTe1s3Nzevz+7fG18mWMfr7/MuYM///paBuCJpoAsXFxZ5sBpxqBNDc58+iJqRyDPfwiZlnAf/XhMzLx6NxC7q6tNe4QLqHIsiVMJKvx523zad1D9q/bLB+GL/M2/r7+n2fvLOBG36gvb2KJfDkesKPKuKzQ7WCHf/rhMmgIbeEH6JwCsaaGv3VcOLBUKx6FNHR0fH097e3t////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAEYALAAAAAARALoEAAf/gEaCg4SFhoMAh4qLi4mMRkQgLTMClQIWiiwyBJydAooCnaKfh6GiFROkhqEMra0Rn4mOggIVFRK4E7CguhEQvyaqhQIQDcYNKA3ChDE1lpaYj7OP1IfT1diC19nV29zS39ze4Yrj5Ibm54Tp6trt4O+N8fLz1vX294Xs7fvq/ef/yAUMN/BbQXH59CVctxBRQ3cPD2aTiI1it4dGLFLTCK8hR0Yf6XnEGLIcyZMRUY5MyXKly4Ul8b1MGBOdSpg3aebMV1NhS5w/dQblufNeT4ZDjRatd9RhUqZL5zWFOJPoU6lR403NmPXd1q9d+YX1NxZgWYFnCaY1uBbhVa1t/yfGrTj34luvdTfm7Qi0qtK7YgGTFWyWMFrDahGzVezWL1TGciHTlWzXMVbKejHzFWoZrmaQe0F/Ftm3NGfTVjvjHW2StUzUf1UHlj2YdmHbh3En1r2Yd2PYj31HFj6ZeGXgl41nVr45NXLPzEVHJ326unPrsZ+vnt6a+2vswbXPFl+b/G3zudHvVt+b/W/wyd0Pl1+c/nH40O0v1988O/7t/EkXIHXXFeifgeH9N56C5TF4noPpQbiehO1R+B6C8Vk4n4b1cXgfhvl5uJ+I/SUIIoAkCpgigQe2aKKLGZ64oIwN0vigjRHiOKGOFfJ4IYwh+rihkB0S+SGQKBo5ov+SJcaI5IxP1hjljVPmWOWOV/aY5Y8vdumkl0FuOaSYRZJ5JJhJmrmkmk2GiSaUb0oZJ5VzWlknlndqmSeXX/bppp9p7jmmoGUSeiagcCIqp6J0Mmqno3hCqqekfP5paaCUDpppoZseemminy4aaqOjPlpqpKdOmmqlmK6qqaucwuppq7SCWquot5Kaq6m7otqrqr+yauuwuBKrq7G8IuurssAyK2yx0B4bbbLTLltts9c+K+221HJrrbfYgqttt+R+W264545r7rrosqtuu/C+K++rwdLrrL3Z4iuuvuny666/8QI8b6z1EnyvwfkivK/C/TL8r8MBQzzwrAdTnLBYxQtj3LDGD3McsccTr2moyJ2SLKvJBYMs8MoSs6xyyzC/LDPKFdN8sc0Z47yxzh3z/LHPIbeZMtAuEx2z0TMLXbPSNzOds9M7Q92z1D9THTRGWGetdTiBAAA7); +} +.ncboTree .folder-open-last { + background: 0 -2px no-repeat #fff url(data:image/gif;base64,R0lGODlhEQAWAOYAAP/bdf/vif/kf///mQQCBMS+uaVzDc/PvICAgNrYysyZNM3Nzevz++zs6OTe1smWMcXFxbfG15poAp5sBv//pZxqBPr7/MuYM6BuCLWCHX6gvdHR0cKPKuLBULB+GJlnAdq/bPfwiaRyDLe3t7eEH7q6tOKzQ7/M28mgIciVMNDc58+iJvr7+qx6FPDkeszLx7OBG5Kvx/3VcLqHIp23zb2KJcaaGqNxC6JwCv/rhH2fvNe4QP/XhPH096d1D8TExP/4k/n7+caaGXueu///nP///////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAEYALAAAAAARABYAAAdcgEaCg4SFhoMIh4qLi4mMj4c9KjQ6Q5ZDEYoxLEGdnkOKQ56joIeiowwOpYaiBK6uCaCJjoJDDAwNuQ6xobsJB8Avq4VDBwXHBSUFw4QnGpeXmZDT1NXW19jZ1oEAOw==); +} +.ncboTree .folder-close-last { + background: 0 -2px no-repeat #fff url(data:image/gif;base64,R0lGODlhEgAWAOYAAOvr6//bdf//nP/vif/kf//4k//UbwQCBO/v78S+ufv7+9u3UoCAgNrYysyZNMHBwevz++Tk5M/PvOTe1smWMcKPKpxqBLB+GLOBG72KJaBuCP//uuzs6LfG17e3t5lnAbWCHdu3caNxC55sBsuYM7qHIsCNKLq6tMiVMKx6FMbGxp23zceUL/r7+q58Fr/M26VzDbeEH6d1D32fvKt5E/H0936gvZKvx6h2EJpoAqampszLx8WSLdDc57a2tvn7+Xueu///////mf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAEMALAAAAAASABYAAAdfgEOCg4SFhoQMh4qLjEOJjZCHNT0rM0CXQB2LNy0/np9Ai0CfB6CipD8QE6GKowevrw2hiY+DQBAQHAccE7KivQ0HEhI7rIdAEgnKCScJxoYvNpiYmpHW19jZ2tvc2YEAOw==); +} +.ncboTree .folder-close { + background: 0 -2px no-repeat #fff url(data:image/gif;base64,R0lGODlhEgC+BOYAAICAgP//mXueu/n7+f///7a2tuvr6//Ub//4k///nP/vif/bdf/kfwQCBPv7++/v78S+udu3UtrYysyZNOTe1sHBwc/PvOTk5Ovz++zs6Nu3cbB+GLqHIrfG16BuCJlnAf//usmWMcKPKrWCHcuYM5xqBL2KJbOBG55sBqNxC7e3t8iVMJ23zcCNKKt5E6h2ELq6tL/M26ampreEH/H098bGxn6gvczLx8WSLceUL658Fn2fvPr7+qVzDad1D6x6FJKvx5poAtDc5////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAEMALAAAAAASAL4EAAf/gEOCg4SFhoQAh4qLjEOJjUM0Qiw7ApYCHYtAPAOdngKLAp4Nn6GjAxgUoIqiDa6uEqCJj4MCGBgZDRkUsaG8Eg0WFjerhwIWEMkQMBDFhjE2l5eZkLSQ14fW2NuC2tzY3t/V4t/h5Ivm59nq4OzX6e6D8PGO9Izz8fju+uz86v7nAJITKI5gOXvoECoyyI3hNoftFBqC+E7iRIuFKI7DKI9jR4/1QGpsNPIeyJAeSyYUeVLlwpYwWcpMGZPmTI4u193EmPPiTos9M9bEOZRnUaBHJQZFlFTh0o82oxL9qbQpwqfdrNrDinKqVKNUnWqlx7Xs2Hxn96Xtt/Zf24Bv/wfGLTj3YNirdRvmfbg34lekd7f2rRiY7OCNf6sWRrtYbWO2j91GhjtZbmW6l+0mFptZb2e+n/16HQ12M97QhE0LRo2YNGDVhlmTPDxbtknbK2Ez1u2YN2TfkoFTFm6ZOGbjml0rRu6ZOWjnoksr5ww99fTT1VtL3/76+urstcHfFp/be2zyL3GnR6+TvU/3QtW3N7+bfm/7v/EH1z+cf3H/xwGYHHfLCdicgc8hGF13BFKnoHUNYvegdgxWWGCE300YnobjcVgehud5uJ6I84FYn4n3oZifivux2J+L/8EYoIwDWuggjQfimKCOC15oo4Q8QvhjhkFS6OORNw4ZYv+RGzLZoZMfKnmilClSuaKVLWL5opYxcjmjlzUiCSSYOZK5o5k9JikmkWgKueaSbRqp5pxjvjmlnVXieaWeWfK5pZ9dAvqloGHSySahZSJ6pqJp1mkonIy6+eidk+ZZ6Z6X9pnpn5sG2umgnxbq6KiHhpqoqYui2mippEKqqqStUhqrpbNiWqumt3Kaq6e7gtqrqKwG6+qvpxKbqrGrDiusrMvS2qytz+Iara7T8lqtr9cCq+y2zHLrrLfQgiutuNSSa6252KKrbbfsfttuuO+OG2+5855bb7r3ruvuvvDyK6+/9AJsr8D4Eqxvvwj/m3DACw/ccMEPH6zwxAxT7LBixRBjLHHFHF/cccYfb+zxyCCTLHLJKJ+scrHZsqyuy/nCbLDMEdOssc0h42yyzinzvPKxLQP9stAxEz2z0TUjfbPSOTO9s9M9Q/1zskVTfbTVSWO9tNZNn+T112CHLTY3gQAAOw==); +} +.ncboTree .doc { + background: 0 -1px no-repeat #fff url(data:image/gif;base64,R0lGODlhEgC4BOYAAICAgNvt/3V4o+Hw/+n1/+vr67e3t7a2tv///8nk/4ep3NHp/3SAsvj7/+32//v7++/v78HBwf39/djr//P5/8Df/8Ph//7//+Tk5Gdtnvz9/213qIGVw2lwotvn98bGxoyu33J8rpOq0n2Jto+z5fT09X+OvMDA//n5+W96rOTx/4SbyvX6/2t0pf7+/nN+sIqo2fb6/9jl9s7T/2Vqml5hkPf399nh7ZK877rd/83m/3qDsJS/8lWn7ZCjy87n/5G46oeh0v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAEIALAAAAAASALgEAAf/gEKCg4SFhoQAh4qLjEKJjZCNj5GUhpOVmI6aiZyZjJeekaChkqSVo6aKqKmWrJCrroOwsZq0qra3uK26hbOxvq7ArMKpxKbGpMihyp7Mmc6Y0Ke8vdSI1rLYgtKU3KLatdjer+Djpdrmn+Xr6Ozi7tbpi/K57+339vnx8NT0h/679PXjxwtgNXz7EA5UWJCgLoPXGD50iAtiNokVKdqyuE0jLY7hEgpsiHGjx18ng6UctrJYy2Mvk8VcNrNZzWc3o+WcVvLjzm4/v/VEOVRlUZZHXSaFuVRmU5pPbUbFOVVnVZ4jJ14FulVo1oxdyYU999XkWHVn5wUVW9Zn2noi/+MubEuUrlG7SPEq1cuUr1O/UAFLFUyVsFXDWOWSRMyVsVfFWh2zhQxWMlnKZi2j1az27b+1l+didssZrujTi0fXVX2XdV7Xe2H3lf2XdmDbg3EX1n2Yd2LUkX03Fv4YeGXik41nRh46tXLSzDdH71z6s+eA00073x78+WrvrcG/Fh+b/GzztdHfVp+b/W73veH/5n5c/nD7xekvx59cP3T+zXXn33cDhlfgeAeWl+B5C6bX4HoPthfhexPGV+F8AmZY34X3cZifhvt52B+I/4kY4IYkEpiigSsi2KKCLzIYo4MzQlijhDdSmKOFO2KI4o8h9tihkB8CWSKRIxqpov+SLDLpopMwQimjlDRSaaOVOGKpo5Y8culjkF4OGWaRYJZ55JhJmrmkmk2y+aSbUcI5pZxV0nmlnVniuaWeXfL55Zl+ihkomYAWuqahbSL6pqJxMjqno3VCeqekeVK6p6V9YvrnoZwm2uminzYa6qOjRlrqpKdWmuqlq2ba6qaexgqqrKLSSqqtpuKKqq6q8sqqr64CC+usxNZa7K3H5prsrsv22uyvzwYb7bDGVoustcpiy6y2znILrbfSgkvtteRmW+6253ab7rfrhtvuuObGi6686tLLrr3u4gvvvPzW2++9/+Yb8L7+FgywwQIjTPDBDCfc8MIORwzxxIJqWvETqxcLm/G0G4vb8bsfgyPyyNQEAgA7); +} +.ncboTree .doc-last { + background: 0 -1px no-repeat #fff url(data:image/gif;base64,R0lGODlhEgAWAOYAANvt/3V4o+Hw/+n1/4CAgOvr67e3t7a2ttHp/8nk/4ep3HSAsu32//v7++/v7/j7/8HBweTk5Njr/8Df/8Ph//39/fP5//7//5S/8pCjy4GVw1Wn7brd/2lwooqo2dvn98bGxn2Jtv7+/n+OvISbynJ8rvT09fn5+c7T//f39+Tx/8DA/5G46mdtnm13qM7n/296rHN+sJK872Vqmtjl9s3m/2t0pfX6/3qDsIeh0oyu3/z9/15hkI+z5fb6/9nh7ZOq0v///////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAEIALAAAAAASABYAAAcpgEKCg4SFhoQEh4qLjEKJjZCNj5GUhpOVmI6aiZyZnp+goaKjpKWmg4EAOw==); +} +.ncboTree .doc a.active { + padding-left: 4px; + margin-left: -4px; +} +.ncboTree .ajax { + background: no-repeat 0 0 #ffffff url(data:image/gif;base64,R0lGODlhEAAQAMQAAP///+7u7t3d3bu7u6qqqpmZmYiIiHd3d2ZmZlVVVURERDMzMyIiIhEREQARAAAAAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFBwAQACwAAAAAEAAQAAAFdyAkQgGJJOWoQgIjBM8jkKsoPEzgyMGsCjPDw7ADpkQBxRDmSCRetpRA6Rj4kFBkgLC4IlUGhbNQIwXOYYWCXDufzYPDMaoKGBoKb886OjAKdgZAAgQkfCwzAgsDBAUCgl8jAQkHEAVkAoA1AgczlyIDczUDA2UhACH5BAUHABAALAAAAAAPABAAAAVjICSO0IGIATkqIiMKDaGKC8Q49jPMYsE0hQdrlABCGgvT45FKiRKQhWA0mPKGPAgBcTjsspBCAoH4gl+FmXNEUEBVAYHToJAVZK/XWoQQDAgBZioHaX8igigFKYYQVlkCjiMhACH5BAUHABAALAAAAAAQAA8AAAVgICSOUGGQqIiIChMESyo6CdQGdRqUENESI8FAdFgAFwqDISYwPB4CVSMnEhSej+FogNhtHyfRQFmIol5owmEta/fcKITB6y4choMBmk7yGgSAEAJ8JAVDgQFmKUCCZnwhACH5BAUHABAALAAAAAAQABAAAAViICSOYkGe4hFAiSImAwotB+si6Co2QxvjAYHIgBAqDoWCK2Bq6A40iA4yYMggNZKwGFgVCAQZotFwwJIF4QnxaC9IsZNgLtAJDKbraJCGzPVSIgEDXVNXA0JdgH6ChoCKKCEAIfkEBQcAEAAsAAAAABAADgAABUkgJI7QcZComIjPw6bs2kINLB5uW9Bo0gyQx8LkKgVHiccKVdyRlqjFSAApOKOtR810StVeU9RAmLqOxi0qRG3LptikAVQEh4UAACH5BAUHABAALAAAAAAQABAAAAVxICSO0DCQKBQQonGIh5AGB2sYkMHIqYAIN0EDRxoQZIaC6bAoMRSiwMAwCIwCggRkwRMJWKSAomBVCc5lUiGRUBjO6FSBwWggwijBooDCdiFfIlBRAlYBZQ0PWRANaSkED1oQYHgjDA8nM3kPfCmejiEAIfkEBQcAEAAsAAAAABAAEAAABWAgJI6QIJCoOIhFwabsSbiFAotGMEMKgZoB3cBUQIgURpFgmEI0EqjACYXwiYJBGAGBgGIDWsVicbiNEgSsGbKCIMCwA4IBCRgXt8bDACkvYQF6U1OADg8mDlaACQtwJCEAIfkEBQcAEAAsAAABABAADwAABV4gJEKCOAwiMa4Q2qIDwq4wiriBmItCCREHUsIwCgh2q8MiyEKODK7ZbHCoqqSjWGKI1d2kRp+RAWGyHg+DQUEmKliGx4HBKECIMwG61AgssAQPKA19EAxRKz4QCVIhACH5BAUHABAALAAAAAAQABAAAAVjICSOUBCQqHhCgiAOKyqcLVvEZOC2geGiK5NpQBAZCilgAYFMogo/J0lgqEpHgoO2+GIMUL6p4vFojhQNg8rxWLgYBQJCASkwEKLC17hYFJtRIwwBfRAJDk4ObwsidEkrWkkhACH5BAUHABAALAAAAQAQAA8AAAVcICSOUGAGAqmKpjis6vmuqSrUxQyPhDEEtpUOgmgYETCCcrB4OBWwQsGHEhQatVFhB/mNAojFVsQgBhgKpSHRTRxEhGwhoRg0CCXYAkKHHPZCZRAKUERZMAYGMCEAIfkEBQcAEAAsAAABABAADwAABV0gJI4kFJToGAilwKLCST6PUcrB8A70844CXenwILRkIoYyBRk4BQlHo3FIOQmvAEGBMpYSop/IgPBCFpCqIuEsIESHgkgoJxwQAjSzwb1DClwwgQhgAVVMIgVyKCEAIfkECQcAEAAsAAAAABAAEAAABWQgJI5kSQ6NYK7Dw6xr8hCw+ELC85hCIAq3Am0U6JUKjkHJNzIsFAqDqShQHRhY6bKqgvgGCZOSFDhAUiWCYQwJSxGHKqGAE/5EqIHBjOgyRQELCBB7EAQHfySDhGYQdDWGQyUhADs=); + height: 16px; + display:none; +} +.ncboTree .ajax li { + display:none; + margin:0; + padding:0; +} +.ncboTree .trigger { + display:inline; + margin-left:-28px; + width: 28px; + height: 11px; + cursor:pointer; +} +.ncboTree .text { + cursor: default; +} +.ncboTree .active { + cursor: default; + background-color: #B9D5E4; + font-weight: bold; + padding-top: 1px; + padding-right: 4px; + padding-bottom: 1px; + padding-left: 0px; + line-height: 16px; +} +.ncboTree a, .ncboTree a:hover { + text-decoration: none; + color: black; + font-size: 11pt; +} +.ncboTree a:hover { + cursor: pointer; +} + +/* + * jQuery UI CSS Framework 1.8.7 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + */ + +/* Layout helpers +----------------------------------*/ +.ncboAutocomplete .ui-front { z-index: 100; } +.ncboAutocomplete .ui-helper-hidden { display: none; } +.ncboAutocomplete .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } +.ncboAutocomplete .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ncboAutocomplete .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ncboAutocomplete .ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ncboAutocomplete .ui-helper-clearfix { height:1%; } +.ncboAutocomplete .ui-helper-clearfix { display:block; } +/* end clearfix */ +.ncboAutocomplete .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ncboAutocomplete .ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ncboAutocomplete .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ncboAutocomplete .ui-widget-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; } + +.jsonSuggest a { + font-size: .8em; +} + +.jsonSuggest a:hover { + cursor: pointer; + font-size: .8em; +} + +/* + * jQuery UI CSS Framework 1.8.7 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + * + * To view and modify this theme, visit http://jqueryui.com/themeroller/?ctl=themeroller + */ + + +/* Component containers +----------------------------------*/ +.ncboAutocomplete .ui-widget { font-family: Arial,sans-serif; font-size: 1em; } +.ncboAutocomplete .ui-widget .ui-widget { font-size: 1em; } +.ncboAutocomplete .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Arial,sans-serif; font-size: 1em; } +.ncboAutocomplete .ui-widget-content { border: 1px solid #B6B6B6; background: #ffffff; color: #4F4F4F; } +.ncboAutocomplete .ui-widget-content a { color: #4F4F4F; } +.ncboAutocomplete .ui-widget-header { border: 1px solid #B6B6B6; color: #4F4F4F; font-weight: bold; } +.ncboAutocomplete .ui-widget-header { + background: #ededed 0 0 repeat-x; /* Old browsers */ + background: -moz-linear-gradient(to bottom, #ededed 0%, #c4c4c4 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(100%,#c4c4c4)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(to bottom, #ededed 0%,#c4c4c4 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(to bottom, #ededed 0%,#c4c4c4 100%); /* Opera11.10+ */ + background: -ms-linear-gradient(to bottom, #ededed 0%,#c4c4c4 100%); /* IE10+ */ + background: linear-gradient(to bottom, #ededed 0%,#c4c4c4 100%); /* W3C */ +} +.ncboAutocomplete .ui-widget-header a { color: #4F4F4F; } + +/* Interaction states +----------------------------------*/ +.ncboAutocomplete .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #B6B6B6; font-weight: normal; color: #4F4F4F; } +.ncboAutocomplete .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { + background: #ededed 0 0 repeat-x; /* Old browsers */ + background: -moz-linear-gradient(to bottom, #ededed 0%, #c4c4c4 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(100%,#c4c4c4)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(to bottom, #ededed 0%,#c4c4c4 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(to bottom, #ededed 0%,#c4c4c4 100%); /* Opera11.10+ */ + background: -ms-linear-gradient(to bottom, #ededed 0%,#c4c4c4 100%); /* IE10+ */ + background: linear-gradient(to bottom, #ededed 0%,#c4c4c4 100%); /* W3C */ + -webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset; + -moz-box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset; + box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset; +} +.ncboAutocomplete .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #4F4F4F; text-decoration: none; } +.ncboAutocomplete .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #9D9D9D; font-weight: normal; color: #313131; } +.ncboAutocomplete .ui-state-hover a, .ui-state-hover a:hover { color: #313131; text-decoration: none; } +.ncboAutocomplete .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { + outline: none; + color: #1c4257; border: 1px solid #7096ab; + background: #ededed 0 -50px repeat-x; /* Old browsers */ + background: -moz-linear-gradient(to bottom, #b9e0f5 0%, #92bdd6 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b9e0f5), color-stop(100%,#92bdd6)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(to bottom, #b9e0f5 0%,#92bdd6 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(to bottom, #b9e0f5 0%,#92bdd6 100%); /* Opera11.10+ */ + background: -ms-linear-gradient(to bottom, #b9e0f5 0%,#92bdd6 100%); /* IE10+ */ + background: linear-gradient(to bottom, #b9e0f5 0%,#92bdd6 100%); /* W3C */ + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.ncboAutocomplete .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #313131; text-decoration: none; } +.ncboAutocomplete .ui-widget :active { outline: none; } + +/* Icons +----------------------------------*/ + +/* Misc visuals +----------------------------------*/ + +/* + * jQuery UI Autocomplete 1.8.7 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Autocomplete#theming + */ +.ncboAutocomplete .ui-autocomplete { + position: absolute; cursor: default; z-index: 3; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; + -moz-box-shadow: 0 1px 5px rgba(0,0,0,0.3); + -webkit-box-shadow: 0 1px 5px rgba(0,0,0,0.3); + box-shadow: 0 1px 5px rgba(0,0,0,0.3); +} + +/* workarounds */ +* html .ncboAutocomplete .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ + +/* + * jQuery UI Menu 1.8.7 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Menu#theming + */ +.ncboAutocomplete .ui-menu { + list-style:none; + padding: 2px; + margin: 0; + display:block; + float: left; +} +.ncboAutocomplete .ui-menu .ui-menu { + margin-top: -3px; +} +.ncboAutocomplete .ui-menu .ui-menu-item { + margin:0; + padding: 0; + zoom: 1; + float: left; + clear: left; + width: 100%; +} +.ncboAutocomplete .ui-menu .ui-menu-item a { + text-decoration:none; + display:block; + padding:.2em .4em; + line-height:1.5; + zoom:1; +} +.ncboAutocomplete .ui-menu .ui-menu-item a.ui-state-focus, +.ncboAutocomplete .ui-menu .ui-menu-item a.ui-state-hover, +.ncboAutocomplete .ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; + background: #5f83b9; + color: #FFFFFF; + text-shadow: 0px 1px 1px #234386; + border-color: #466086; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; +} \ No newline at end of file diff --git a/app/assets/stylesheets/upload_ontology.scss b/app/assets/stylesheets/upload_ontology.scss deleted file mode 100644 index aecdcd960..000000000 --- a/app/assets/stylesheets/upload_ontology.scss +++ /dev/null @@ -1,98 +0,0 @@ -.upload-ontology-container { - display: flex; - justify-content: center; - padding: 40px 0; - .show { - display: block; - } -} - -.upload-ontology-card { - width: 589px; - border-radius: 14px; - box-shadow: rgba(0, 0, 0, 0.05) 0px 20px 50px; - padding: 20px 40px; - -} - -.upload-ontology-center { - display: flex; - justify-content: center; - flex-direction: column; -} - -.upload-ontology-progress { - display: flex; - align-items: center; - margin-top: 20px; - margin-bottom: 50px; -} - - -.upload-ontology-chips-container{ - display: flex; - flex-wrap: wrap; -} - - -.hide { - display: none; -} - - - -.upload-ontology-desc { - font-size: 12px; - color: #777777; - margin-bottom: 23px; -} - -.upload-ontology-desc a { - text-decoration: none; - color: var(--primary-color); -} -.upload-ontology-desc a svg{ - transform: scale(1.2); -} - - -.upload-ontology-contact .add-another-contact div { - font-size: 11px; - color: #DADADA; - margin-left: 10px; - -} - -.upload-ontology-field-container .location-choice{ - display: flex; - align-items: center; - margin-bottom: 3px; -} - -.upload-ontology-field-container .location-choice .title{ - font-size: 13px; - color: black; - margin-left: 13px; - margin-bottom: 0; - cursor: pointer; -} - -.upload-ontology-field-container > div{ - font-size: 12px; - color: #666666; -} - - -.upload-ontology-input-field-container{ - margin-bottom: 10px; -} - -.upload-ontology-input-field-container .switch-filter p{ - font-size: 12px !important; -} -.edit-ontology-tab .switch-filter { - img{ - width: 15px; - height: 15px; - } -} \ No newline at end of file diff --git a/app/components/agent_search_input_component.rb b/app/components/agent_search_input_component.rb deleted file mode 100644 index f5bfdbae5..000000000 --- a/app/components/agent_search_input_component.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class AgentSearchInputComponent < ViewComponent::Base - - def initialize(id:, agent_type: nil, name_prefix: nil, parent_id: , show_affiliations: true, edit_on_modal: false, deletable: false) - @id = id - @agent_type = agent_type - @name_prefix = name_prefix - @parent_id = parent_id - @edit_on_modal = edit_on_modal - @show_affiliations = show_affiliations - @deletable = deletable - end -end diff --git a/app/components/agent_search_input_component/agent_search_input_component.html.haml b/app/components/agent_search_input_component/agent_search_input_component.html.haml deleted file mode 100644 index 9da8101b5..000000000 --- a/app/components/agent_search_input_component/agent_search_input_component.html.haml +++ /dev/null @@ -1,11 +0,0 @@ -= hidden_field_tag "#{@name_prefix}[#{@id}]" -= render SearchInputComponent.new(id: 'agent' + @id, name:'agent' + @id, ajax_url: "/ajax/agents?query=", display_all: true, - item_base_url:"/agents/#{@id}?parent_id=#{@parent_id}&edit_on_modal=#{@edit_on_modal}&name_prefix=#{@name_prefix}&deletable=#{@deletable}&agent_id=", id_key: 'id', - use_cache: false, - actions_links: {create_new_agent: {link: "/agents/new?name=&id=#{@id}&parent_id=#{@parent_id}&type=#{@agent_type}&show_affiliations=#{@show_affiliations}&deletable=#{@deletable}&edit_on_modal=#{@edit_on_modal}&name_prefix=#{@name_prefix}[#{@id}]", target:'_self'}}) do |s| - - s.template do - %a{href: "LINK", class: "search-content", 'data-turbo-frame': '_self'} - %p.search-element.home-searched-ontology - NAME ACRONYM IDENTIFIERS - %p.home-result-type - TYPE diff --git a/app/components/alerts_container_component.rb b/app/components/alerts_container_component.rb deleted file mode 100644 index 43681a9e0..000000000 --- a/app/components/alerts_container_component.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AlertsContainerComponent < ViewComponent::Base - include Turbo::FramesHelper - def initialize(id:) - @id = id - end - -end diff --git a/app/components/alerts_container_component/alerts_container_component.html.haml b/app/components/alerts_container_component/alerts_container_component.html.haml deleted file mode 100644 index 30f5b6966..000000000 --- a/app/components/alerts_container_component/alerts_container_component.html.haml +++ /dev/null @@ -1,2 +0,0 @@ -= turbo_frame_tag @id do - = content \ No newline at end of file diff --git a/app/components/card_message_component.rb b/app/components/card_message_component.rb deleted file mode 100644 index d0f15d062..000000000 --- a/app/components/card_message_component.rb +++ /dev/null @@ -1,28 +0,0 @@ -class CardMessageComponent < ViewComponent::Base - def initialize(title: nil ,message:, button_text: nil, button_link: "/" ,type:) - @title = title - @message = message - @button_text = button_text - @type = type - @button_link = button_link - end - - def no_title? - @title.nil? - end - - def no_button? - @button_text.nil? - end - - def icon - case @type - when "success" - "green-check.svg" - when "failure" - "red-warning.svg" - when "warning" - "orange-warning.svg" - end - end -end diff --git a/app/components/card_message_component/card_message_component.html.haml b/app/components/card_message_component/card_message_component.html.haml deleted file mode 100644 index 06043a539..000000000 --- a/app/components/card_message_component/card_message_component.html.haml +++ /dev/null @@ -1,24 +0,0 @@ -.d-flex.justify-content-center.m-4 - .card-message-card - .d-flex.justify-content-center.mb-4 - = inline_svg_tag icon - - if no_title? - %p.card-message-text - = @message - - else - %h2.card-message-title - = @title - %p.card-message-text.card-message-has-title - = @message - - unless no_button? - - case @type - - when "success" - %a.card-message-button.card-message-button-success{:href => @button_link} - = @button_text - - when "failure" - %a.card-message-button.card-message-button-failure{:href => @button_link} - = @button_text - - when "warning" - %a.card-message-button.card-message-button-warning{:href => @button_link} - = @button_text - diff --git a/app/components/chip_button_component.rb b/app/components/chip_button_component.rb deleted file mode 100644 index 316717fe7..000000000 --- a/app/components/chip_button_component.rb +++ /dev/null @@ -1,10 +0,0 @@ -class ChipButtonComponent < ViewComponent::Base - def initialize(url: nil, text: nil, type: "static", disabled: false, tooltip: nil ,**html_options) - @url = url - @text = text - @type = type - @disabled = disabled - @tooltip = tooltip - @html_options = html_options.merge({href: @url}) - end -end \ No newline at end of file diff --git a/app/components/chip_button_component/chip_button_component.html.haml b/app/components/chip_button_component/chip_button_component.html.haml deleted file mode 100644 index 26172a548..000000000 --- a/app/components/chip_button_component/chip_button_component.html.haml +++ /dev/null @@ -1,10 +0,0 @@ -.chip-button-component-container{'data-controller': 'tooltip', title: @tooltip} - - if @type == "static" - %span.chip_button_container{@html_options} - = @text || content - - elsif !content - %a.chip_button_container_clickable{@html_options} - = @text - - else - %span.chip_button_container_clickable{@html_options} - = content diff --git a/app/components/chips_component.rb b/app/components/chips_component.rb deleted file mode 100644 index 624681f81..000000000 --- a/app/components/chips_component.rb +++ /dev/null @@ -1,16 +0,0 @@ -class ChipsComponent < ViewComponent::Base - - renders_one :count - def initialize(id:nil, name:, label: nil, value: nil, checked: false, tooltip: nil) - @id = id || name - @name = name - @value = value || 'true' - @checked = checked - @label = label || @value - @tooltip = tooltip - end - - def checked? - @checked - end -end \ No newline at end of file diff --git a/app/components/chips_component/chips_component.html.haml b/app/components/chips_component/chips_component.html.haml deleted file mode 100644 index f08d5a33d..000000000 --- a/app/components/chips_component/chips_component.html.haml +++ /dev/null @@ -1,9 +0,0 @@ -.chips-container{class: @disabled ? 'disabled' : '', 'data-controller': 'tooltip', title: @tooltip} - %div - %label{:for => "chips-#{@id}-check"} - %input{:id => "chips-#{@id}-check", :name => @name, :type => "checkbox", :value => @value, checked: checked?, disabled: @disabled} - %span - = inline_svg_tag 'check.svg', class: 'chips-check-icon' - %div - = @label - = count diff --git a/app/components/circle_progress_bar_component.rb b/app/components/circle_progress_bar_component.rb deleted file mode 100644 index e3e746b60..000000000 --- a/app/components/circle_progress_bar_component.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class CircleProgressBarComponent < ViewComponent::Base - - def initialize(count: , max: ) - super - @count = count - @max = max - end - - def value - ((@count.to_f / @max) * 100).to_i - end -end diff --git a/app/components/circle_progress_bar_component/circle_progress_bar_component.html.haml b/app/components/circle_progress_bar_component/circle_progress_bar_component.html.haml deleted file mode 100644 index a319fba65..000000000 --- a/app/components/circle_progress_bar_component/circle_progress_bar_component.html.haml +++ /dev/null @@ -1,7 +0,0 @@ -.circular-progress{ data: { controller: 'circle-progress-bar', 'circle-progress-bar': { - 'circle-color-value': 'white', 'percentage-value': value, - 'progress-color-value': "var(--primary-color)", 'bg-color-value': 'white' -}}} - .inner-circle{'data-circle-progress-bar-target': 'innerCircle'} - %p.percentage{'data-circle-progress-bar-target': 'percentage'} - 0% diff --git a/app/components/circle_progress_bar_component/circle_progress_bar_component_controller.js b/app/components/circle_progress_bar_component/circle_progress_bar_component_controller.js deleted file mode 100644 index 932b1d82a..000000000 --- a/app/components/circle_progress_bar_component/circle_progress_bar_component_controller.js +++ /dev/null @@ -1,37 +0,0 @@ -import { Controller } from "@hotwired/stimulus" - -// Connects to data-controller="circle-progress-bar" -export default class extends Controller { - static targets = ['percentage', 'innerCircle'] - static values = { - percentage: Number, - progressColor: String, - bgColor: String, - circleColor: String - } - - connect() { - const progressBar = this.element; - const progressValue = this.percentageTarget; - const innerCircle = this.innerCircleTarget; - let startValue = 0, - endValue = this.percentageValue, - speed = 30, - progressColor = this.progressColorValue; - - const progress = setInterval(() => { - startValue++; - progressValue.textContent = `${startValue}%`; - progressValue.style.color = `${progressColor}`; - - innerCircle.style.backgroundColor = `${this.circleColorValue}`; - - progressBar.style.background = `conic-gradient(${progressColor} ${ - startValue * 3.6 - }deg,${this.bgColorValue} 0deg)`; - if (startValue === endValue) { - clearInterval(progress); - } - }, speed); - } -} diff --git a/app/components/clipboard_component.rb b/app/components/clipboard_component.rb deleted file mode 100644 index feab36c1a..000000000 --- a/app/components/clipboard_component.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class ClipboardComponent < ViewComponent::Base - - def initialize(icon: "icons/copy.svg", title: "Copy", message: nil, show_content: true) - @icon = icon - @title = title - @message = message - @show_content = show_content - end -end diff --git a/app/components/clipboard_component/clipboard_component.html.haml b/app/components/clipboard_component/clipboard_component.html.haml deleted file mode 100644 index 1567cb679..000000000 --- a/app/components/clipboard_component/clipboard_component.html.haml +++ /dev/null @@ -1,8 +0,0 @@ -%div.clipboard.d-flex.align-items-center{data:{controller: 'clipboard'}, style: 'cursor:pointer;'} - %div{data: {'clipboard-target': 'content'}, class: @show_content ? '' : 'd-none'} - = @message || content - %div - %div.copy{data: {controller:'tooltip', action: 'click->clipboard#copy', 'clipboard-target': 'copy'}, title: @title} - = inline_svg_tag(@icon, width: '20', height: '21px', fill: 'none') - %div.d-none.check{data: {controller:'tooltip', 'clipboard-target': 'check'}, title: 'Copied!'} - = inline_svg_tag('check.svg', width: '18px', height: '18px') diff --git a/app/components/clipboard_component/clipboard_component_controller.js b/app/components/clipboard_component/clipboard_component_controller.js deleted file mode 100644 index 358a9cafb..000000000 --- a/app/components/clipboard_component/clipboard_component_controller.js +++ /dev/null @@ -1,34 +0,0 @@ -import { Controller } from '@hotwired/stimulus' - -export default class extends Controller { - - static targets = ['content', 'copy', 'check'] - static values = { - hiddenCss: { type: String, default: 'd-none' }, - successDuration: { type: Number, default: 2000 } - } - - copy () { - const text = this.contentTarget.innerHTML || this.contentTarget.value - navigator.clipboard.writeText(text.trim()).then(() => { - this.#copied() - }) - } - - #copied () { - if (this.timeout) { - clearTimeout(this.timeout) - } - - this.#toggleCopy() - - this.timeout = setTimeout(() => { - this.#toggleCopy() - }, this.successDurationValue) - } - - #toggleCopy () { - this.copyTarget.classList.toggle(this.hiddenCssValue) - this.checkTarget.classList.toggle(this.hiddenCssValue) - } -} diff --git a/app/components/collapsable_block_component.rb b/app/components/collapsable_block_component.rb deleted file mode 100644 index 7941f2d96..000000000 --- a/app/components/collapsable_block_component.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class CollapsableBlockComponent < ViewComponent::Base - renders_one :header - - - def initialize(id: '', parent_id: '', collapsed: true, title: '') - super - @id = id - @collapsed = collapsed - @parent_id = parent_id - @title = title - end - - def collapsed? - @collapsed - end - - def collapsed_class - collapsed? ? 'collapsed' : 'show' - end -end diff --git a/app/components/collapsable_block_component/collapsable_block_component.html.haml b/app/components/collapsable_block_component/collapsable_block_component.html.haml deleted file mode 100644 index 1e58f8a27..000000000 --- a/app/components/collapsable_block_component/collapsable_block_component.html.haml +++ /dev/null @@ -1,7 +0,0 @@ -- if content && !content.to_s.strip.empty? - %div.card - %div.card-header - %a.card-link{'data-toggle'=>'collapse', :href=>"##{@id}"}= @title || header - %div.collapse{id: @id, 'data-parent'=> "##{@parent_id}", class: collapsed_class} - %div.card-body - = content \ No newline at end of file diff --git a/app/components/concept_details_component.rb b/app/components/concept_details_component.rb deleted file mode 100644 index ff275effb..000000000 --- a/app/components/concept_details_component.rb +++ /dev/null @@ -1,197 +0,0 @@ -# frozen_string_literal: true - -class ConceptDetailsComponent < ViewComponent::Base - include ApplicationHelper - include OntologiesHelper - include MultiLanguagesHelper - - renders_one :header, TableComponent - renders_many :sections, TableRowComponent - - attr_reader :concept_properties - - def initialize(id:, acronym:, concept_id: nil , properties: nil, top_keys: [], bottom_keys: [], exclude_keys: []) - @acronym = acronym - @properties = properties - @top_keys = top_keys - @bottom_keys = bottom_keys - @exclude_keys = exclude_keys - @id = id - @concept_id=concept_id - - @concept_properties = concept_properties2hash(@properties) if @properties - end - - def add_sections(keys, &block) - scheme_set = properties_set_by_keys(keys, prefix_properties(concept_properties)) - rows = row_hash_properties(scheme_set, concept_properties, &block) - - rows.each do |row| - section do |table_row| - table_row.create(*row) - end - end - - end - - def row_hash_properties(properties_set, ontology_acronym, &block) - out = [] - properties_set&.each do |key, data| - next if exclude_relation?(key) || !data[:values] - - values = data[:values] - url = data[:key] - - ajax_links = Array(values).map do |v| - if block_given? - block.call(v) - else - if v.is_a?(String) - get_link_for_cls_ajax(v, ontology_acronym, '_blank') - else - display_in_multiple_languages([v].to_h) - end - end - end - - out << [ - { th: content_tag(:span, remove_owl_notation(key), title: url, 'data-controller': 'tooltip') }, - { td: content_tag(:span, ajax_links.join.html_safe) } - ] - end - out - end - - def properties_set_by_keys(keys, concept_properties, exclude_keys = []) - concept_properties&.select do |k, v| - (keys.include?(k) || !keys.select { |key| v[:key].to_s.include?(key) }.empty?) && !exclude_keys.include?(k) && - exclude_keys.select { |key| v[:key].to_s.include?(key) }.empty? - end - end - - def filter_properties(top_keys, bottom_keys, exclude_keys, concept_properties) - all_keys = concept_properties&.keys || [] - top_set = properties_set_by_keys(top_keys, concept_properties, exclude_keys) - bottom_set = properties_set_by_keys(bottom_keys, concept_properties, exclude_keys) - leftover = properties_set_by_keys(all_keys, concept_properties, exclude_keys) - leftover = leftover.reject { |key, _| top_set.key?(key) || bottom_set.key?(key) } - [top_set, leftover, bottom_set] - end - - private - - def link_to_format_modal(format, icon) - link_to_modal(nil, "/ontologies/#{@acronym}/#{escape(@concept_id)}/serialize/#{format}",{ id: "resource_content_#{format}", data: {show_modal_title_value: @concept_id, show_modal_size_value: 'modal-xl'}}) do - inline_svg("icons/#{icon}.svg", width: '50px', height: '50px') - end - end - - def concept_properties2hash(properties) - # NOTE: example properties - # - # properties - #=> #], - # http://stagedata.bioontology.org/metadata/def/prefLabel= - # [#], - # http://www.w3.org/2000/01/rdf-schema#comment= - # [#], - # http://scai.fraunhofer.de/NDDUO#Synonym= - # [#], - # http://www.w3.org/2000/01/rdf-schema#subClassOf= - # ["http://www.w3.org/2002/07/owl#Thing"], - # http://www.w3.org/1999/02/22-rdf-syntax-ns#type= - # ["http://www.w3.org/2002/07/owl#Class"], - # links=nil, - # context=nil> - properties_data = {} - keys = properties.members # keys is an array of symbols - keys.each do |key| - next if properties[key].nil? # ignore :context and :links when nil. - - # Shorten the key into a simple label - k = key.to_s if key.kind_of?(Symbol) - k ||= key - label = key - if k.start_with?("http") - label = LinkedData::Client::HTTP.get("/ontologies/#{@ontology.acronym}/properties/#{CGI.escape(k)}/label").label rescue "" - if label.nil? || label.empty? - k = k.gsub(/.*#/, '') # greedy regex replace everything up to last '#' - k = k.gsub(/.*\//, '') # greedy regex replace everything up to last '/' - # That might take care of nearly everything to be shortened. - label = k - end - end - begin - # Try to simplify the property values, when they are a struct. - if properties[key].is_a?(OpenStruct) - values = language_hash(properties[key]) - else - values = properties[key].map { |v| v.string } - end - rescue - # Each value is probably a simple datatype already. - values = properties[key] - end - data = { :key => key, :values => values } - properties_data[label] = data - end - return properties_data - end - - def exclude_relation?(relation_to_check, ontology = nil) - excluded_relations = ["type", "rdf:type", "[R]", "SuperClass", "InstanceCount"] - - # Show or hide property based on the property and ontology settings - if ontology - # TODO_REV: Handle obsolete classes - # Hide owl:deprecated if a user has set class or property based obsolete checking - # if !ontology.obsoleteParent.nil? && relation_to_check.include?("owl:deprecated") || !ontology.obsoleteProperty.nil? && relation_to_check.include?("owl:deprecated") - # return true - # end - end - - excluded_relations.each do |relation| - return true if relation_to_check.is_a?(Array) && relation_to_check.include?(relation) - end - return false - end - - def remove_owl_notation(string) - # TODO_REV: No OWL notation, but should we modify the IRI? - return string - - unless string.nil? - strings = string.split(":") - if strings.size < 2 - # return string.titleize - return string - else - # return strings[1].titleize - return strings[1] - end - end - end - - def convert_dates(hash) - hash.transform_values do |property| - if property[:key].to_s.include?("modified") || property[:key].to_s.include?("created") - value = property[:values].first - parsed_date = l(Date.parse(value), format: :monthfull_day_year.to_sym) rescue value - property[:values] = [parsed_date] - end - property - end - end - -end diff --git a/app/components/concept_details_component/concept_details_component.html.haml b/app/components/concept_details_component/concept_details_component.html.haml deleted file mode 100644 index e8c341b8c..000000000 --- a/app/components/concept_details_component/concept_details_component.html.haml +++ /dev/null @@ -1,32 +0,0 @@ -%div.hide-if-loading.concept_details_component - %div.card - = header - %div.my-3 - %div.raw-table - = render DropdownContainerComponent.new(title: 'Raw data', id: "accordion-#{@id}") do - = render TableComponent.new(stripped: true) do |t| - - if @bottom_keys.present? - - top_set, leftover_set, bottom_set = filter_properties(@top_keys, @bottom_keys, @exclude_keys, prefix_properties(@concept_properties)) - - leftover_set = convert_dates(leftover_set) - - row_hash_properties(top_set, @acronym).each do |row| - - t.add_row(*row) - - - row_hash_properties(leftover_set, @acronym).each do |row| - - t.add_row(*row) - - - - sections.each do |section| - - t.row do - = section - - - - row_hash_properties(bottom_set, @acronym).each do |row| - - t.add_row(*row) - - - if @concept_id - - t.row do |r| - - r.td(colspan: 2) do - %div.d-flex.justify-content-center.p-2#content_resource_formats - - [["json","json-ld-file"], ["xml","rdf-xml-file"] , ["ntriples","ntriples-file"], ["turtle","turtle-file"]].each do |format, icon| - %div.mx-4{data: {controller: "tooltip"}, title: "Export in #{format.upcase}"} - = link_to_format_modal(format, icon) \ No newline at end of file diff --git a/app/components/date_time_field_component.rb b/app/components/date_time_field_component.rb deleted file mode 100644 index 6a3553d26..000000000 --- a/app/components/date_time_field_component.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class DateTimeFieldComponent < ViewComponent::Base - - def initialize(value: , format: :monthfull_day_year) - super - @value = value - @format = format - end - - def call - l(Date.parse(@value), format: @format.to_sym).html_safe if @value - end - -end diff --git a/app/components/display/button_loader_component.rb b/app/components/display/button_loader_component.rb deleted file mode 100644 index 202cd4cf9..000000000 --- a/app/components/display/button_loader_component.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class Display::ButtonLoaderComponent < ViewComponent::Base - - def initialize(id: nil, slim: false, color: 'normal') - @slim = slim - @color = color - @id = id - end - - - def call - slim_class = @slim ? "slim " : "" - danger_class = @color == "danger" ? "danger-button " : "" - warning_class = @color == "warning" ? "warning-button " : "" - - content_tag(:div, class: "animation-container #{danger_class} #{warning_class} #{slim_class}", id: @id) do - content_tag(:div, class: "lds-ellipsis") do - 4.times.map { content_tag(:div) }.join.html_safe - end - end - end -end diff --git a/app/components/display/header_component.rb b/app/components/display/header_component.rb deleted file mode 100644 index 76784068e..000000000 --- a/app/components/display/header_component.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class Display::HeaderComponent < ViewComponent::Base - - include ComponentsHelper - - renders_one :text - - def initialize(text: nil, tooltip: nil) - super - @text = text - @info = tooltip - end - - def call - content_tag(:div, class: 'header-component') do - out = content_tag(:p, text || @text) - if @info && !@info.empty? - out = out + info_tooltip(content_tag(:div, @info, style: 'max-width: 300px')) - end - out - end - end - -end diff --git a/app/components/display/image_component.rb b/app/components/display/image_component.rb deleted file mode 100644 index 922e3ef46..000000000 --- a/app/components/display/image_component.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -class Display::ImageComponent < ViewComponent::Base - include ModalHelper - - def initialize(src: , title: '', enable_zoom: true) - super - @src = src - @title = title - @enable_zoom = enable_zoom - end - - def call - content_tag(:div, class: 'image-container ') do - depiction_with_modal(@src) - end - end - - def depiction_with_modal(depiction_url) - img_tag = image_tag(depiction_url, class: 'image-content') - loop_icon_tag = content_tag(:span , inline_svg_tag('icons/loop.svg'), class: 'loop_icon') - modal_url = "/ajax/images/show?url=#{depiction_url}" - modal_options = { data: { show_modal_title_value: @title, show_modal_size_value: 'modal-xl' } } - - if @enable_zoom - link_to_modal(nil, modal_url, modal_options) do - loop_icon_tag + img_tag - end - else - img_tag - end - - end -end diff --git a/app/components/display/info_tooltip_component.rb b/app/components/display/info_tooltip_component.rb deleted file mode 100644 index a3c36f5da..000000000 --- a/app/components/display/info_tooltip_component.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class Display::InfoTooltipComponent < ViewComponent::Base - - def initialize(text: nil , icon: "info.svg", interactive: true) - super - @text = text - @icon = icon - @interactive = interactive - end - def call - content_tag(:div, data:{controller:'tooltip', 'tooltip-interactive-value': @interactive}, title: @text, style: 'display: inline-block;') do - if content - content - else - inline_svg_tag "icons/#{@icon}", width: '20', height: '20' - end - end - end - -end diff --git a/app/components/display/progress_bar_component.rb b/app/components/display/progress_bar_component.rb deleted file mode 100644 index b8d493145..000000000 --- a/app/components/display/progress_bar_component.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class Display::ProgressBarComponent < ViewComponent::Base - - def initialize(progress: '0') - @progress = progress - end - def call - content_tag(:div, class: 'progress-bar-component') { - content_tag(:div, @progress+'%', class: 'progress-bar-component-text') + - content_tag(:div, '', class: 'progress-bar-component-progress', style: 'width: '+@progress+'%;') - } - end - end \ No newline at end of file diff --git a/app/components/display/rdf_highlighter_component.rb b/app/components/display/rdf_highlighter_component.rb deleted file mode 100644 index 9e96dafaf..000000000 --- a/app/components/display/rdf_highlighter_component.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class Display::RdfHighlighterComponent < ViewComponent::Base - - def initialize(format: , text: ) - @format = format - @content = text - end -end diff --git a/app/components/display/rdf_highlighter_component/rdf_highlighter_component.html.haml b/app/components/display/rdf_highlighter_component/rdf_highlighter_component.html.haml deleted file mode 100644 index ee81966e9..000000000 --- a/app/components/display/rdf_highlighter_component/rdf_highlighter_component.html.haml +++ /dev/null @@ -1,6 +0,0 @@ -.clipboard-component-resource-content{style: 'position: absolute; right: 2%; top: 5px;'} - = render ClipboardComponent.new(message: @content, show_content: false) -.content-finder-result{data: {controller: 'rdf-highlighter', 'rdf-highlighter-format-value': @format }} - %pre.mb-0 - %code.d-block{style: 'text-wrap: pretty; word-break: break-all', data: {'rdf-highlighter-target': 'content'}} - #{@content} \ No newline at end of file diff --git a/app/components/display/rdf_highlighter_component/rdf_highlighter_component_controller.js b/app/components/display/rdf_highlighter_component/rdf_highlighter_component_controller.js deleted file mode 100644 index 86b8ecd3c..000000000 --- a/app/components/display/rdf_highlighter_component/rdf_highlighter_component_controller.js +++ /dev/null @@ -1,221 +0,0 @@ -import { Controller } from '@hotwired/stimulus' -import * as jsonld from 'jsonld' -import { useHighLighter } from '../../../javascript/mixins/useHighLight' - -// Connects to data-controller="rdf-highlighter" -export default class extends Controller { - - static targets = ['content', 'loader'] - static values = { - metadata: Object, - context: Object, - namespaces: Object, - format: { type: String, default: 'xml' } - } - - connect () { - this.formatedData = this.#formatData() - this.highlighter = useHighLighter(this.formatValue) - - switch (this.formatValue) { - case 'xml': - this.showXML() - break - case 'json': - this.showJSONLD() - break - case 'triples': - this.showNTriples() - break - case 'ntriples': - this.showNTriples() - break - case 'turtle': - this.showTURTLE() - break - } - } - - download () { - switch (this.formatValue) { - case 'xml': - this.downloadXML() - break - case 'json': - this.downloadJsonLd() - break - case 'triples': - this.downloadNQuads() - break - case 'csv': - this.downloadCSV() - } - } - - showNTriples () { - if (!this.hasMetadataValue) { - this.contentTarget.innerHTML = this.highlighter.highlight(this.contentTarget.textContent, 'ntriples') - } else { - this.#toggleLoader() - this.#toNTriples(this.formatedData).then((nquads) => { - this.contentTarget.innerHTML = this.highlighter.highlight(nquads, 'ntriples') - this.#toggleLoader() - }) - } - } - - showXML () { - if (!this.hasMetadataValue) { - this.contentTarget.innerHTML = this.highlighter.highlight(this.contentTarget.textContent, 'xml') - } else { - this.#toggleLoader() - const xml = this.#toXML(this.formatedData, this.contextValue) - this.contentTarget.innerHTML = this.highlighter.highlight(xml, 'xml') - this.#toggleLoader() - } - } - - showJSONLD () { - if (!this.hasMetadataValue) { - this.contentTarget.innerHTML = this.highlighter.highlight(JSON.stringify(JSON.parse(this.contentTarget.textContent), null, ' '), 'json') - } else { - this.#toggleLoader() - this.#toJSONLD().then((jsonld) => { - this.contentTarget.innerHTML = this.highlighter.highlight(JSON.stringify(jsonld, null, ' '), 'json') - this.#toggleLoader() - }) - } - } - - showTURTLE () { - this.contentTarget.innerHTML = this.highlighter.highlight(this.contentTarget.textContent, 'turtle') - } - - #toggleLoader () { - this.loaderTarget.classList.toggle('d-none') - } - - downloadNQuads () { - this.#toNTriples(this.formatedData).then((nquads) => { - this.#generateDownloadFile(nquads, 'nt') - }) - } - - downloadJsonLd () { - this.#toJSONLD().then((jsonld) => { - this.#generateDownloadFile(JSON.stringify(jsonld, null, ' '), 'json') - }) - } - - downloadXML () { - this.#generateDownloadFile(this.#toXML(this.formatedData, this.contextValue), 'rdf') - } - - downloadCSV () { - this.#generateDownloadFile(this.#toCSV(), 'csv') - } - - #formatData () { - const jsonldObject = {} - - const subJson = this.metadataValue - const ontJson = subJson - const fullContext = this.contextValue - - // Remove links, context and metrics from json - delete subJson['links'] - delete subJson['context'] - delete subJson['metrics'] - - // Add ontology properties to context and subJson - subJson['viewOf'] = ontJson['viewOf'] - subJson['group'] = ontJson['group'] - subJson['hasDomain'] = ontJson['hasDomain'] - - // Don't add null value and empty arrays - for (const [attr, value] of Object.entries(subJson)) { - if (value === null || value === undefined || (Array.isArray(value) && value.length === 0)) { - continue - } - - if (fullContext.hasOwnProperty(attr)) { - jsonldObject[fullContext[attr]] = value - } - } - - // Add id and type - if (subJson['URI'] !== null) { - jsonldObject['@id'] = subJson['URI'] - } else { - jsonldObject['@id'] = ontJson['id'] - } - jsonldObject['@type'] = 'http://www.w3.org/2002/07/owl#Ontology' - - return jsonldObject - } - - #toNTriples (data) { - return jsonld.toRDF(data, { format: 'application/n-quads' }) - } - - #toCSV () { - return Object.entries(this.formatedData).map(([key, value]) => `${key},${value}`).join('\r\n') - } - - #toJSONLD () { - return jsonld.compact(this.formatedData, this.contextValue) - } - - #toXML () { - const data = this.formatedData - const resolveNamespace = this.namespacesValue - let namespaces = {} - let xmlString = '' - - delete data['@id'] - delete data['@type'] - - for (let prop in data) { - const attr_uri = prop - - // Replace the full URI by namespace:attr - for (const ns in resolveNamespace) { - if (prop.startsWith(resolveNamespace[ns])) { - namespaces[ns] = resolveNamespace[ns] - prop = prop.replace(resolveNamespace[ns], ns + ':') - break - } - } - - // Check if the value is an URI using simple regex - let prop_values = Array.isArray(data[attr_uri]) ? data[attr_uri] : [data[attr_uri]] - - prop_values.forEach(prop_value => { - const isUri = prop_value.toString().match(/https?:\/\//) && prop_value.toString().indexOf(' ') === -1 - const value = isUri ? '' : `${prop_value} <${prop}/> ` - xmlString = xmlString.concat(` <${prop}${isUri ? ` rdf:resource="${prop_value}"/>` : '>'} ${value}\n`) - }) - } - - let prefix = Object.entries(namespaces).map(([k, v]) => `xmlns:${k}="${v}"`).join(' ') - return `\n\n ${xmlString}\n` - } - - /** - * Generate the file with metadata to be downloaded, given the file content - * @param content - * @param fileExtension - */ - #generateDownloadFile (content, fileExtension) { - var element = document.createElement('a') - // TODO: change MIME type? - element.setAttribute('href', 'data:application/rdf+json;charset=utf-8,' + encodeURIComponent(content)) - element.setAttribute('download', jQuery(document).data().bp.ontology.acronym + '_metadata.' + fileExtension) - element.style.display = 'none' - document.body.appendChild(element) - element.click() - document.body.removeChild(element) - } -} - - diff --git a/app/components/display/search_result_component.rb b/app/components/display/search_result_component.rb deleted file mode 100644 index 18d56a288..000000000 --- a/app/components/display/search_result_component.rb +++ /dev/null @@ -1,72 +0,0 @@ -class Display::SearchResultComponent < ViewComponent::Base - include UrlsHelper - include ModalHelper - include MultiLanguagesHelper - - renders_many :subresults, Display::SearchResultComponent - renders_many :reuses, Display::SearchResultComponent - def initialize(number: 0,title: nil, ontology_acronym: nil ,uri: nil, definition: nil, link: nil, is_sub_component: false) - @title = title - @uri = uri - @definition = definition - @link = link - @is_sub_component = is_sub_component - @ontology_acronym = ontology_acronym - @number = number.to_s - end - - def sub_component_class - @is_sub_component ? 'sub-component' : '' - end - - def sub_ontologies_id - string = @number+'_sub_ontologies' - end - - def reuses_id - string = @number+'_reuses' - end - - def details_button - link_to_modal(nil, "/ajax/class_details?modal=true&ontology=#{@ontology_acronym}&conceptid=#{@uri}&styled=false", data: { show_modal_title_value: @title, show_modal_size_value: 'modal-xl' }) do - content_tag(:div, class: 'button') do - concat inline_svg_tag('icons/details.svg') - concat content_tag(:div, class: 'text') { t('search.result_component.details') } - end - end - end - - def mappings_button - link_to_modal(nil, "/ajax/mappings/get_concept_table?ontologyid=#{@ontology_acronym}&conceptid=#{escape(@uri)}&type=modal", data: { show_modal_title_value: @title, show_modal_size_value: 'modal-xl' }) do - content_tag(:div, class: 'button') do - inline_svg_tag('icons/ontology.svg') + - content_tag(:div, class: 'text d-flex') do - render(TurboFrameComponent.new(id: 'mapping_count', src: "/ajax/mappings/get_concept_table?ontologyid=#{@ontology_acronym}&conceptid=#{escape(@uri)}", loading: "lazy")) do |t| - t.loader do - render LoaderComponent.new(small: true) - end - end + content_tag(:div, 'mappings', class: 'ml-1') - end - end - end - end - - def visualize_button - link_to_modal(nil, "/ajax/biomixer/?ontology=#{@ontology_acronym}&conceptid=#{@uri}", data: { show_modal_title_value: @title, show_modal_size_value: 'modal-xl' }) do - content_tag(:div, class: 'button') do - concat inline_svg_tag('icons/visualize.svg') - concat content_tag(:div, class: 'text') { t('search.result_component.visualize') } - end - end - end - - def reveal_ontologies_button(text,id,icon) - content_tag(:div, class: 'button icon-right', 'data-action': "click->reveal-component#toggle", 'data-id': id) do - inline_svg_tag(icon) + - content_tag(:div, class: 'text') do - text - end + - inline_svg_tag("icons/arrow-down.svg") - end - end -end diff --git a/app/components/display/search_result_component/search_result_component.html.haml b/app/components/display/search_result_component/search_result_component.html.haml deleted file mode 100644 index 9d4d48bc0..000000000 --- a/app/components/display/search_result_component/search_result_component.html.haml +++ /dev/null @@ -1,31 +0,0 @@ -.search-result-component{class: sub_component_class, 'data-controller': 'reveal-component'} - %a.title{href: @link} - = @title - - if @uri - .uri - = @uri - - if @definition - - = display_in_multiple_languages(@definition) - .actions - = details_button - = visualize_button - = mappings_button - - if subresults? - = reveal_ontologies_button("#{subresults.size} #{t('search.result_component.more_from_ontology')}", sub_ontologies_id, 'icons/three-dots.svg') - - if reuses? - = reveal_ontologies_button("#{t('search.result_component.reuses_in')} #{reuses.size} ontologies", reuses_id, 'icons/reuses.svg') - - if subresults? - .more-from-ontology.d-none{id: sub_ontologies_id} - .vertical-line - .search-result-sub-components - - subresults.each do |result| - .search-result-sub-component - = result - - if reuses? - .more-from-ontology.reuses.d-none{id: reuses_id} - .vertical-line - .search-result-sub-components - - reuses.each do |reuse| - .search-result-sub-component - = reuse \ No newline at end of file diff --git a/app/components/dropdown_button_component.rb b/app/components/dropdown_button_component.rb deleted file mode 100644 index 08c97795c..000000000 --- a/app/components/dropdown_button_component.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -class DropdownButtonComponent < ViewComponent::Base - - renders_one :header - renders_many :sections, DropdownSectionButtonComponent - - def initialize(css_class: '') - super - @component_classes = css_class - end -end diff --git a/app/components/dropdown_button_component/dropdown_button_component.html.haml b/app/components/dropdown_button_component/dropdown_button_component.html.haml deleted file mode 100644 index 952e03ceb..000000000 --- a/app/components/dropdown_button_component/dropdown_button_component.html.haml +++ /dev/null @@ -1,8 +0,0 @@ -.dropdown{class:@component_classes} - %div.d-flex.align-items-center{data: {toggle: "dropdown"}} - %div - = header - %i.fas.fa-chevron-down.ml-1 - %div.dropdown-menu - - sections.each do |s| - = s \ No newline at end of file diff --git a/app/components/dropdown_container_component.rb b/app/components/dropdown_container_component.rb deleted file mode 100644 index e06b3fa7a..000000000 --- a/app/components/dropdown_container_component.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class DropdownContainerComponent < ViewComponent::Base - renders_one :empty_state - def initialize(title:, id:, tooltip:nil, is_open: false) - super - @title = title - @id = id - @tooltip = tooltip - @is_open = is_open - end - def open_class - @is_open ? "show" : "" - end -end diff --git a/app/components/dropdown_container_component/dropdown_container_component.html.haml b/app/components/dropdown_container_component/dropdown_container_component.html.haml deleted file mode 100644 index 7b9d4965e..000000000 --- a/app/components/dropdown_container_component/dropdown_container_component.html.haml +++ /dev/null @@ -1,12 +0,0 @@ -.dropdown-container - .dropdown-title-bar{"data-toggle" => "collapse", "data-target" => "##{@id}"} - = render Display::HeaderComponent.new(text: @title, tooltip: @tooltip) - = image_tag("summary/arrow-down.svg", class: 'ml-2') - - .collapse{id: @id, class: open_class} - - if content && !content.empty? - = content - - else - = render Layout::ListComponent.new do |l| - - l.row do - = empty_state || 'no data' diff --git a/app/components/dropdown_section_button_component.rb b/app/components/dropdown_section_button_component.rb deleted file mode 100644 index 069e37e40..000000000 --- a/app/components/dropdown_section_button_component.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class DropdownSectionButtonComponent < ViewComponent::Base - - renders_one :header - renders_many :items - - def initialize(divide: true, selected_index: nil) - super - @divide = divide - @selected = selected_index - end - - def show_divider? - @divide - end -end diff --git a/app/components/dropdown_section_button_component/dropdown_section_button_component.html.haml b/app/components/dropdown_section_button_component/dropdown_section_button_component.html.haml deleted file mode 100644 index 0f829c820..000000000 --- a/app/components/dropdown_section_button_component/dropdown_section_button_component.html.haml +++ /dev/null @@ -1,7 +0,0 @@ -- if show_divider? - %div.dropdown-divider -- if header? - %h6.dropdown-header= header -- items.each_with_index do |text, index| - %span.dropdown-item{class: index.eql?(@selected) ? 'dropdown-item-selected' : ''} - = text \ No newline at end of file diff --git a/app/components/external_link_text_component.rb b/app/components/external_link_text_component.rb deleted file mode 100644 index 05bed2cfb..000000000 --- a/app/components/external_link_text_component.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true - -class ExternalLinkTextComponent < LinkTextComponent - - def initialize(text:) - super(text: text, icon: 'icons/external-link.svg') - end -end diff --git a/app/components/field_container_component.rb b/app/components/field_container_component.rb deleted file mode 100644 index d45e42e0e..000000000 --- a/app/components/field_container_component.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class FieldContainerComponent < ViewComponent::Base - - renders_one :label - def initialize(label: nil, value: nil) - super - @label = label - @value = value - end - - def show? - content && !content.strip.empty? || (!@value.nil? && !@value.strip.empty?) - end -end diff --git a/app/components/field_container_component/field_container_component.html.haml b/app/components/field_container_component/field_container_component.html.haml deleted file mode 100644 index 6a27f3c17..000000000 --- a/app/components/field_container_component/field_container_component.html.haml +++ /dev/null @@ -1,9 +0,0 @@ -- if show? - %div.field-container - %p.field-description_text - = label || @label - - if content - = content - - else - %span.field-normal_text - = @value diff --git a/app/components/icon_with_tooltip_component.rb b/app/components/icon_with_tooltip_component.rb deleted file mode 100644 index a5c0aa97a..000000000 --- a/app/components/icon_with_tooltip_component.rb +++ /dev/null @@ -1,28 +0,0 @@ -class IconWithTooltipComponent < ViewComponent::Base - def initialize(icon: "", link: "#", size: "small", target: '', title: '', style: '') - @icon = icon - @link = link - @size = size - @target = target - @title = title - @style = style - end - - private - - def size - case @size - when "small" - ["32px", "1", "16px"] - when "medium" - ["45px", "1", "23px"] - when "big" - ["100px", "2.5", "50px"] - end - end - - def icon_with_tooltip_style - "font-size: 50px; line-height: 0.5; #{@style}" - end -end - \ No newline at end of file diff --git a/app/components/icon_with_tooltip_component/icon_with_tooltip_component.html.haml b/app/components/icon_with_tooltip_component/icon_with_tooltip_component.html.haml deleted file mode 100644 index abd4eec46..000000000 --- a/app/components/icon_with_tooltip_component/icon_with_tooltip_component.html.haml +++ /dev/null @@ -1,3 +0,0 @@ -%a.icon-with-tooltip{href: @link, style: icon_with_tooltip_style, target: @target, title: @title, 'data-controller': 'tooltip'} - %span.icon - = inline_svg @icon diff --git a/app/components/infinite_scroll_component.rb b/app/components/infinite_scroll_component.rb deleted file mode 100644 index ecbfa3a88..000000000 --- a/app/components/infinite_scroll_component.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class InfiniteScrollComponent < ViewComponent::Base - include Turbo::FramesHelper - attr_reader :collection - - renders_one :error - renders_one :loader - - def initialize(id:, collection:, next_url:, current_page:, next_page:) - super - @id = id - @collection = collection - @next_url = next_url - @current_page = current_page - @next_page = next_page - - end - -end diff --git a/app/components/infinite_scroll_component/infinite_scroll_component.html.haml b/app/components/infinite_scroll_component/infinite_scroll_component.html.haml deleted file mode 100644 index 85620fcb8..000000000 --- a/app/components/infinite_scroll_component/infinite_scroll_component.html.haml +++ /dev/null @@ -1,13 +0,0 @@ -= turbo_frame_tag "#{@id}_view-page-#{@current_page}" do - - if @collection && !@collection.empty? - .hide-if-loading - = content - - if @next_page - = turbo_frame_tag "#{@id}_view-page-#{@next_page}", - loading: :lazy, src: @next_url do - - if loader? - = loader - - else - Loading ... - - elsif @current_page.eql?(1) && error? - = error diff --git a/app/components/input/date_component.rb b/app/components/input/date_component.rb deleted file mode 100644 index 6d26ad4c2..000000000 --- a/app/components/input/date_component.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class Input::DateComponent < Input::InputFieldComponent - def initialize(label: '', name:, value: Date.today, placeholder: '', error_message: '', helper_text: '', id: nil, max_date: nil) - data_flat_picker = { controller: "flatpickr", flatpickr_date_format: "Y-m-d", flatpickr_alt_input: "true", flatpickr_alt_format: "F j, Y"} - data_flat_picker[:flatpickr_max_date] = max_date if max_date - - super(label: label, name: name, value: value, placeholder: placeholder, error_message: error_message, helper_text: helper_text, data: data_flat_picker, id: id) - end - - def call - render Input::InputFieldComponent.new(label: @label, name: @name, value: @value, placeholder: @placeholder, error_message: @error_message, helper_text: @helper_text, data: @data, type: 'date', id: @id) - end -end diff --git a/app/components/input/email_component.rb b/app/components/input/email_component.rb deleted file mode 100644 index 8d68ba3bc..000000000 --- a/app/components/input/email_component.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class Input::EmailComponent < Input::InputFieldComponent - def initialize(label: '', name:, value: nil, placeholder: '', error_message: '', helper_text: '') - super(label: label, name: name, value: value, placeholder: placeholder, error_message: error_message, helper_text: helper_text) - end - - def call - render Input::InputFieldComponent.new(label: @label, name: @name, value: @value, placeholder: @placeholder, error_message: @error_message, helper_text: @helper_text, type: "email") - end -end diff --git a/app/components/input/file_input_component.rb b/app/components/input/file_input_component.rb deleted file mode 100644 index 41de28bce..000000000 --- a/app/components/input/file_input_component.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class Input::FileInputComponent < ViewComponent::Base - def initialize(name:, html_options: '') - @name = name - @html_options = html_options - end - -end diff --git a/app/components/input/file_input_component/file_input_component.html.haml b/app/components/input/file_input_component/file_input_component.html.haml deleted file mode 100644 index b347a461c..000000000 --- a/app/components/input/file_input_component/file_input_component.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -.file_uploader{data: {controller: "file-input"}} - .file-drop-area.w-100 - = inline_svg_tag "upload-file.svg" - %span.file-message{data:{'file-input': {target: 'message'}}}= t('components.file_input_message') - = file_field_tag @name, class: 'file-input', data:{'file-input-target': 'input', action: 'file-input#updateMessage'} \ No newline at end of file diff --git a/app/components/input/file_input_component/file_input_loader_component_controller.js b/app/components/input/file_input_component/file_input_loader_component_controller.js deleted file mode 100644 index 402c3c360..000000000 --- a/app/components/input/file_input_component/file_input_loader_component_controller.js +++ /dev/null @@ -1,14 +0,0 @@ -import {Controller} from "@hotwired/stimulus"; - -// Connects to data-controller="file-input" -export default class extends Controller { - - static targets = [ "input", "message" ] - - updateMessage(){ - const fileName = this.inputTarget.value.split('\\').pop() - this.messageTarget.innerHTML = fileName - } - - -} \ No newline at end of file diff --git a/app/components/input/input_field_component.rb b/app/components/input/input_field_component.rb deleted file mode 100644 index fa248f6d8..000000000 --- a/app/components/input/input_field_component.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Input::InputFieldComponent < ViewComponent::Base - def initialize(label: "" , name:, value: '', type: 'text', placeholder: "", error_message: "", helper_text: "", disabled: false, data: nil, id: '', min: '', max: '', step: '', tooltip: nil) - @label = label - @name = name - @placeholder = placeholder - @error_message = error_message - @helper_text = helper_text - @value = value - @type = type - @disabled = disabled - @id = id - @data = data - @min = min - @max = max - @step = step - @tooltip = tooltip - end - - - def error_style - "border-color: var(--error-color);" if error? - end - - def error? - !@error_message&.empty? - end - - def help? - !@helper_text.blank? - end - - def label? - !@label&.empty? - end -end - - diff --git a/app/components/input/input_field_component/input_field_component.html.haml b/app/components/input/input_field_component/input_field_component.html.haml deleted file mode 100644 index ba7947900..000000000 --- a/app/components/input/input_field_component/input_field_component.html.haml +++ /dev/null @@ -1,29 +0,0 @@ -%div - - if label? - .text-input-label - = @label - - - if content - %div{'data-controller': 'tooltip', title: @tooltip ? content_tag(:div, @tooltip, style: 'max-width: 400px;') : nil} - = content - - else - %input.input-field-component.text-input{class: @disabled ? '' : 'not-disabled', name: @name, type: @type, placeholder: @placeholder, style: error_style, id: @id, data: @data, value: @value, disabled: @disabled, min: @min, max: @max, step: @step, 'data-controller': 'tooltip', title: @tooltip ? content_tag(:div, @tooltip, style: 'max-width: 400px;') : nil} - - - - - if error? - .text-input-error-text - = @error_message - - if help? - .text-input-helper-text - = raw @helper_text - - - - - - - - - - diff --git a/app/components/input/language_selector_component.rb b/app/components/input/language_selector_component.rb deleted file mode 100644 index 781e0863b..000000000 --- a/app/components/input/language_selector_component.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -class Input::LanguageSelectorComponent < ViewComponent::Base - include InternationalisationHelper - def initialize(languages:, selected: nil, id: '', name: '' , enable_all: false, **html_options) - super - @languages = languages - @id = id - @name = name - @selected = selected - @data = html_options[:data] || {} - @enable_all = enable_all - @html_options = html_options - end - - def languages - values = [] - values = [["
#{render(LanguageFieldComponent.new(label: t('components.all_languages'), icon: 'icons/earth.svg', value: 'en'))}
", 'all']] if @enable_all - - @languages.each do |key, label| - option = "
#{render(LanguageFieldComponent.new(value: key.to_s.downcase, label: label, auto_label: true))}
" - values += [[option, key.to_s.downcase]] - end - values - end - - def call - render SelectInputComponent.new(id: @id, name: @name, values: languages, - selected: @selected, - data: @data, - required: true, - open_to_add_values: false, - placeholder: t('components.select_anguage'), **@html_options) - end -end diff --git a/app/components/input/number_component.rb b/app/components/input/number_component.rb deleted file mode 100644 index ae4c90073..000000000 --- a/app/components/input/number_component.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class Input::NumberComponent < Input::InputFieldComponent - def initialize(label: '', name:, value: nil, placeholder: '', error_message: '', helper_text: '', min: '', max: '', step: '', tooltip: nil) - super(label: label, name: name, value: value, placeholder: placeholder, error_message: error_message, helper_text: helper_text, tooltip: tooltip) - @min = min - @max = max - @step = step - end - - def call - render Input::InputFieldComponent.new(label: @label, name: @name, value: @value, placeholder: @placeholder, error_message: @error_message, helper_text: @helper_text, tooltip: @tooltip ,type: "number", min: @min, max: @max, step: @step) - end -end diff --git a/app/components/input/password_component.rb b/app/components/input/password_component.rb deleted file mode 100644 index 435692a5b..000000000 --- a/app/components/input/password_component.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class Input::PasswordComponent < Input::InputFieldComponent - def initialize(label: '', name:, value: nil, placeholder: '', error_message: '', helper_text: '') - super(label: label, name: name, value: value, placeholder: placeholder, error_message: error_message, helper_text: helper_text) - end - - def call - render Input::InputFieldComponent.new(label: @label, name: @name, value: @value, placeholder: @placeholder, error_message: @error_message, helper_text: @helper_text, type: "password") - end -end diff --git a/app/components/input/radio_chip_component.rb b/app/components/input/radio_chip_component.rb deleted file mode 100644 index b800c207f..000000000 --- a/app/components/input/radio_chip_component.rb +++ /dev/null @@ -1,10 +0,0 @@ -class Input::RadioChipComponent < ViewComponent::Base - def initialize(label: nil, name: nil, value: nil, checked: false, onchange: nil) - @label = label - @name = name - @value = value - @checked = checked - @onchange = onchange - end - -end \ No newline at end of file diff --git a/app/components/input/radio_chip_component/radio_chip_component.html.haml b/app/components/input/radio_chip_component/radio_chip_component.html.haml deleted file mode 100644 index 65ed9e79a..000000000 --- a/app/components/input/radio_chip_component/radio_chip_component.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -%label.radio{'data-controller': 'radio-chip', class: @name} - %input{type:"radio", value: @value, name: @name, 'data-action': 'change->radio-chip#check', checked: @checked, onchange: @onchange} - .text - = @label - %span \ No newline at end of file diff --git a/app/components/input/radio_chip_component/radio_chip_component_controller.js b/app/components/input/radio_chip_component/radio_chip_component_controller.js deleted file mode 100644 index a2c85ceed..000000000 --- a/app/components/input/radio_chip_component/radio_chip_component_controller.js +++ /dev/null @@ -1,22 +0,0 @@ -import {Controller} from "@hotwired/stimulus"; - - -export default class extends Controller { - connect(){ - if(this.element.children[0].checked){ - this.element.classList.add('selected') - } - } - check(){ - if(this.element.children[0].checked){ - this.element.classList.add('selected') - } - let other_radios = document.getElementsByClassName(this.element.children[0].name) - let element = this.element - Array.from(other_radios).forEach(function(otherRadio){ - if (otherRadio !== element) { - otherRadio.classList.remove('selected') - } - }); - } -} \ No newline at end of file diff --git a/app/components/input/range_slider_component.rb b/app/components/input/range_slider_component.rb deleted file mode 100644 index 4bea0845a..000000000 --- a/app/components/input/range_slider_component.rb +++ /dev/null @@ -1,13 +0,0 @@ - - -class Input::RangeSliderComponent < ViewComponent::Base - def initialize(name: nil, label: nil ,value: '50', min: '0', max: '100', step: '1') - @name = name - @label = label - @value = value - @min = min - @max = max - @step = step - end - -end \ No newline at end of file diff --git a/app/components/input/range_slider_component/range_slider_component.html.haml b/app/components/input/range_slider_component/range_slider_component.html.haml deleted file mode 100644 index b98c1062e..000000000 --- a/app/components/input/range_slider_component/range_slider_component.html.haml +++ /dev/null @@ -1,12 +0,0 @@ -.range-slider-container{'data-controller': 'range-slider'} - - if @label - .text-input-label - = @label - - .selection{'data-range-slider-target': 'selection'} - 50 - .range-slider - %input{type: "range", min: @min, max: @max, step: @step, value: @value, 'data-action': 'input->range-slider#handleInput', 'data-range-slider-target': 'input', name: @name} - .selector{'data-range-slider-target': 'selector'} - .select-button - .select-range{'data-range-slider-target': 'range'} \ No newline at end of file diff --git a/app/components/input/range_slider_component/range_slider_component_controller.js b/app/components/input/range_slider_component/range_slider_component_controller.js deleted file mode 100644 index 8fcc635b4..000000000 --- a/app/components/input/range_slider_component/range_slider_component_controller.js +++ /dev/null @@ -1,19 +0,0 @@ -import {Controller} from "@hotwired/stimulus"; - -export default class extends Controller { - static targets = ['selector', 'range', 'selection', 'input'] - connect(){ - this.#updateSelector() - } - - handleInput(){ - this.#updateSelector() - } - - #updateSelector(){ - let pourcentage = (this.inputTarget.value / this.inputTarget.max) * 100 - this.selectorTarget.style.left = (pourcentage*0.95)+"%" - this.rangeTarget.style.width = (pourcentage*0+pourcentage)+"%" - this.selectionTarget.innerHTML = this.inputTarget.value - } -} diff --git a/app/components/input/select_component.rb b/app/components/input/select_component.rb deleted file mode 100644 index c03cbdc3c..000000000 --- a/app/components/input/select_component.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class Input::SelectComponent < Input::InputFieldComponent - - def initialize(id: nil, label: '', name:, value: [], selected: '', placeholder: '', error_message: '', helper_text: '', multiple: false, open_to_add_values: false, required: false, data: {}, tooltip: nil) - super(label: label, name: name, value: value, placeholder: placeholder, error_message: error_message, - helper_text: helper_text, data: data, tooltip: tooltip) - @values = value - @selected = selected - @open_to_add_values = open_to_add_values - @multiple = multiple - @id = id - @required = required - end - - def call - render Input::InputFieldComponent.new(name: @name, error_message: @error_message, helper_text: @helper_text, label: @label, tooltip: @tooltip) do - render SelectInputComponent.new(id: @id, name: @name, values: @values, selected: @selected, - placeholder: @placeholder, required: @required, - multiple: @multiple, open_to_add_values: @open_to_add_values, - data: @data) - end - end -end diff --git a/app/components/input/text_area_component.rb b/app/components/input/text_area_component.rb deleted file mode 100644 index 04f453337..000000000 --- a/app/components/input/text_area_component.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -class Input::TextAreaComponent < Input::InputFieldComponent - def initialize(label: '', name:, value: nil, placeholder: '', error_message: '', helper_text: '', rows: "5", resize: nil) - super(label: label, name: name, value: value, placeholder: placeholder, error_message: error_message, helper_text: helper_text) - @rows = rows - @resize = resize - end - def resize - @resize ? "resize: vertical;" : "" - end -end diff --git a/app/components/input/text_area_component/text_area_component.html.haml b/app/components/input/text_area_component/text_area_component.html.haml deleted file mode 100644 index f00c4cffb..000000000 --- a/app/components/input/text_area_component/text_area_component.html.haml +++ /dev/null @@ -1,3 +0,0 @@ -= render Input::InputFieldComponent.new(label: @label, name: @name, value: @value, placeholder: @placeholder, error_message: @error_message, helper_text: @helper_text) do - %textarea.input-field-component{name: @name, rows: @rows, placeholder: @placeholder, style: "#{error_style} #{resize}"} - = @value \ No newline at end of file diff --git a/app/components/input/text_input_component.rb b/app/components/input/text_input_component.rb deleted file mode 100644 index 6e144d351..000000000 --- a/app/components/input/text_input_component.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class Input::TextInputComponent < Input::InputFieldComponent - def initialize(label: '', name:, value: nil, placeholder: '', error_message: '', helper_text: '', disabled: false, id: '', data: {}) - super(label: label, name: name, value: value, placeholder: placeholder, error_message: error_message, helper_text: helper_text, disabled: disabled, id: id, data: data) - end - - def call - render Input::InputFieldComponent.new(label: @label, name: @name, value: @value, placeholder: @placeholder, - error_message: @error_message, helper_text: @helper_text, - type: @type, disabled: @disabled, data: @data) - end -end diff --git a/app/components/input/url_component.rb b/app/components/input/url_component.rb deleted file mode 100644 index 01db0eb68..000000000 --- a/app/components/input/url_component.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class Input::UrlComponent < Input::InputFieldComponent - def initialize(label: '', name:, value: nil, placeholder: '', error_message: '', helper_text: '') - super(label: label, name: name, value: value, placeholder: placeholder, error_message: error_message, helper_text: helper_text) - end - - def call - render Input::InputFieldComponent.new(label: @label, name: @name, value: @value, placeholder: @placeholder, error_message: @error_message, helper_text: @helper_text, type: "url") - end -end diff --git a/app/components/internal_link_text_component.rb b/app/components/internal_link_text_component.rb deleted file mode 100644 index cd1d73b3e..000000000 --- a/app/components/internal_link_text_component.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class InternalLinkTextComponent < LinkTextComponent - def initialize(text:) - super(text: text, icon: 'icons/internal-link.svg') - end -end diff --git a/app/components/label_link_component.rb b/app/components/label_link_component.rb deleted file mode 100644 index 3d8ecee98..000000000 --- a/app/components/label_link_component.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class LabelLinkComponent < ViewComponent::Base - - def initialize(id:, text:, icon: 'popup-link') - @id = id - @text = text - @icon = icon - end - - def call - if @id.eql?(@text) - ExternalLinkTextComponent.new(text: @text).call - else - InternalLinkTextComponent.new(text: @text).call - end - end - - def self.inline(id, text) - { plain: LabelLinkComponent.new(id: id, text: text).call } - end -end diff --git a/app/components/language_field_component.rb b/app/components/language_field_component.rb deleted file mode 100644 index 7998432a9..000000000 --- a/app/components/language_field_component.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true -require 'iso-639' - -class LanguageFieldComponent < ViewComponent::Base - - include FlagIconsRails::Rails::ViewHelpers - - def initialize(value:, label: nil, auto_label: false, icon: nil) - super - @value = value - @lang_code = nil - @label = label - @icon = icon - - iso = ISO_639.find(value.to_s.split('/').last) - if iso - @lang_code = iso.alpha2 - @label ||= iso.english_name if auto_label - end - end - - def lang_code - case @lang_code - when 'en' - @lang_code = 'gb' - when 'ar' - @lang_code = 'sa' - when 'hi' - @lang_code = 'in' - when 'ur' - @lang_code = 'pk' - when 'zh' - @lang_code = 'cn' - when 'ja' - @lang_code = 'jp' - end - @lang_code - end - - def value - @value&.is_a?(String) ? @value.to_s.split('/').last : 'NO-LANG' - end -end diff --git a/app/components/language_field_component/language_field_component.html.haml b/app/components/language_field_component/language_field_component.html.haml deleted file mode 100644 index 66c514f38..000000000 --- a/app/components/language_field_component/language_field_component.html.haml +++ /dev/null @@ -1,8 +0,0 @@ -- if @lang_code - .d-flex.align-items-center - = @icon ? inline_svg_tag(@icon, width: "17px", height: "17px") : flag_icon(lang_code) - - if @label - %div.ml-1 - = @label -- else - = render ChipButtonComponent.new(text: value) \ No newline at end of file diff --git a/app/components/layout/card_component.rb b/app/components/layout/card_component.rb deleted file mode 100644 index ceebc820c..000000000 --- a/app/components/layout/card_component.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class Layout::CardComponent < ViewComponent::Base - renders_one :header, Display::HeaderComponent - - def call - content_tag(:div, class: 'summary-card') do - out = '' - out = header if header? - raw(out.to_s + content) - end - end -end diff --git a/app/components/layout/horizontal_list_component.rb b/app/components/layout/horizontal_list_component.rb deleted file mode 100644 index 9a66c7377..000000000 --- a/app/components/layout/horizontal_list_component.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class Layout::HorizontalListComponent < ViewComponent::Base - renders_many :elements - - def initialize(truncate: true) - @truncate = truncate ? 'text-truncate' : '' - end - - def call - return if elements.empty? - - content_tag(:div, class: 'd-flex flex-wrap align-items-center') do - out = '' - elements.each do |element| - out = out + content_tag(:div, element, class: "mr-1 mb-1 #{@truncate}") - end - raw out - end - end - -end diff --git a/app/components/layout/list_component.rb b/app/components/layout/list_component.rb deleted file mode 100644 index edf75b865..000000000 --- a/app/components/layout/list_component.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class Layout::ListComponent < ViewComponent::Base - - renders_many :rows - - def call - return if rows.map(&:to_s).reject(&:empty?).empty? - - content_tag(:div, style: 'padding: 0px 20px 20px 20px;') do - out = "" - rows.each do |row| - next if row.nil? || row.to_s.empty? - out = out + content_tag(:div, row.to_s, class: 'mb-1') - end - out.html_safe - end - end - -end diff --git a/app/components/layout/progress_pages_component.rb b/app/components/layout/progress_pages_component.rb deleted file mode 100644 index 1680e4e49..000000000 --- a/app/components/layout/progress_pages_component.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class Layout::ProgressPagesComponent < ViewComponent::Base - - renders_many :pages - def initialize(pages_title: []) - super - @pages_title = pages_title - end -end diff --git a/app/components/layout/progress_pages_component/progress_pages_component.html.haml b/app/components/layout/progress_pages_component/progress_pages_component.html.haml deleted file mode 100644 index 49707599f..000000000 --- a/app/components/layout/progress_pages_component/progress_pages_component.html.haml +++ /dev/null @@ -1,32 +0,0 @@ -%div.w-100{'data-controller': 'progress-pages'} - %div - .d-flex.justify-content-center.flex-column - .progress-pages-container - - @pages_title.each_with_index do |key, index| - .progress-item{'data-progress-pages-target': 'pageItem'} - %div - .outlined-circle{class: index.zero? ? 'outlined-active-circle' : ''} - = image_tag("icons/white-check.svg") - %span{class: index.zero? ? 'active' : ''} - = key.humanize - - if index < (@pages_title.size-1) - %hr.line - %div - - pages.each_with_index do |page, index| - %div.progress-content.position-relative{{'data-progress-pages-target': 'pageContent'}, class: index.zero? ? '' : 'hide'} - = page - - - .progress-pages-actions - .progress-pages-back-button.hide{'data-action': "click->progress-pages#navigateBack", 'data-progress-pages-target': 'backBtn'} - = render Buttons::RegularButtonComponent.new(id: 'progress-pages-back-button', value: t('components.back'), variant: "secondary", size: 'slim',state: 'regular') do |btn| - - btn.icon_left do - = inline_svg "icons/arrow-left.svg" - .progress-pages-next-button{'data-action': "click->progress-pages#navigateNext", 'data-progress-pages-target': 'nextBtn'} - = render Buttons::RegularButtonComponent.new(id: 'progress-pages-next-button', value: t('components.next'), size: 'slim', state: 'regular') do |btn| - - btn.icon_right do - = inline_svg "arrow-right.svg" - .progress-pages-next-button.hide{ 'data-progress-pages-target': 'finishBtn'} - = render Buttons::RegularButtonComponent.new(id: 'progress-pages-finish-button', value: t('components.finish'), size: 'slim', type: 'submit') do |btn| - - btn.icon_right do - = inline_svg "icons/white-check.svg" \ No newline at end of file diff --git a/app/components/layout/progress_pages_component/progress_pages_component_controller.js b/app/components/layout/progress_pages_component/progress_pages_component_controller.js deleted file mode 100644 index 146922311..000000000 --- a/app/components/layout/progress_pages_component/progress_pages_component_controller.js +++ /dev/null @@ -1,87 +0,0 @@ -import {Controller} from "@hotwired/stimulus"; - -export default class extends Controller { - static targets = ['pageItem','pageContent' ,'backBtn', 'nextBtn', 'finishBtn'] - connect() { - this.pagesItems = this.pageItemTargets - this.buttons = [this.backBtnTarget, this.nextBtnTarget, this.finishBtnTarget] - this.currentForm = 1 - } - - navigateBack(){ - this.navigateForm('back') - } - navigateNext(){ - this.navigateForm('next') - } - - navigateForm(direction) { - if (direction === "next" && this.currentForm < this.pagesItems.length) { - this.currentForm += 1 - this.showForm() - } else if (direction === "back" && this.currentForm > 1){ - this.currentForm -= 1 - this.showForm() - } - } - - showForm(){ - const targetForm = this.currentForm - for (let index = 1; index <= this.pagesItems.length; index++) { - - const targetFormDOM = this.pageContentTargets[index - 1]; - - const isCurrentForm = targetForm === index; - - targetFormDOM.classList.toggle("hide", !isCurrentForm); - - if (isCurrentForm) { - this.updateProgressBar(targetForm); - this.updateButtons(targetForm); - } - - } - - } - updateProgressBar(targetForm) { - const progressItemsDOM = document.querySelectorAll(".progress-item > div"); - const line = document.querySelectorAll(".line"); - - progressItemsDOM.forEach((item, index) => { - const isPassedSection = index + 1 < targetForm; - const isCurrentSection = index + 1 === targetForm; - - item.children[0].classList.toggle("outlined-checked-circle", isPassedSection); - item.children[0].classList.toggle("outlined-active-circle", isCurrentSection); - - - item.children[1].classList.toggle("active", isCurrentSection || isPassedSection); - - - line[index]?.classList.toggle("active", isPassedSection); - }); - } - - updateButtons(targetForm) { - - switch (targetForm) { - case 1: - this.showBtn([this.buttons[1]]); - break; - case this.pagesItems.length: - this.showBtn([this.buttons[0], this.buttons[2]]); - break; - default: - this.showBtn([this.buttons[0], this.buttons[1]]); - } - - } - - showBtn(btnIds = []) { - this.buttons.forEach((btn) => { - const targetBtnDOM = btn; - const shouldShowBtn = btnIds.includes(btn); - targetBtnDOM.classList.toggle("hide", !shouldShowBtn); - }); - } -} diff --git a/app/components/layout/reveal_component.rb b/app/components/layout/reveal_component.rb deleted file mode 100644 index 82456a9a3..000000000 --- a/app/components/layout/reveal_component.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class Layout::RevealComponent < ViewComponent::Base - renders_one :button - renders_many :containers - - def initialize(selected: nil, possible_values: [], hidden_class: 'd-none', toggle: false) - @hidden_class = hidden_class - @possible_values = toggle && possible_values.empty? ? [true] : possible_values - @selected = selected - @toggle = toggle - end - - def container_data - { - controller: 'reveal-component', - 'reveal-component-hidden-class': @hidden_class - } - end -end diff --git a/app/components/layout/reveal_component/reveal_component.html.haml b/app/components/layout/reveal_component/reveal_component.html.haml deleted file mode 100644 index 7f672e61d..000000000 --- a/app/components/layout/reveal_component/reveal_component.html.haml +++ /dev/null @@ -1,6 +0,0 @@ -%div{data: container_data} - %div{'data-action': @toggle ? "change->reveal-component#toggle click->reveal-component#toggle" : "change->reveal-component#select"} - = button - - containers.each_with_index do |c, i| - %div{'data-reveal-component-target': "item", 'data-value': @possible_values[i] , class: @possible_values[i].eql?(@selected) ? '' : @hidden_class} - = c \ No newline at end of file diff --git a/app/components/layout/reveal_component/reveal_component_controller.js b/app/components/layout/reveal_component/reveal_component_controller.js deleted file mode 100644 index 997f8a953..000000000 --- a/app/components/layout/reveal_component/reveal_component_controller.js +++ /dev/null @@ -1,63 +0,0 @@ -import { Controller } from '@hotwired/stimulus' - -export default class extends Controller { - static values = { - hiddenClass: { type: String, default: 'd-none' } - } - - static targets = ['hideButton', 'showButton', 'item'] - - /* - Toggle all the items - */ - toggle (event) { - this.#getItems(event).forEach((s) => { - s.classList.toggle(this.hiddenClassValue) - }) - } - - /* - Hide all the items except the selected one - */ - select (event) { - let selectedValue = event.target.value - let items = this.#getItems(event) - items.forEach((s) => { - s.classList.add(this.hiddenClassValue) - }) - - items.forEach((s) => { - if (selectedValue === s.dataset.value) { - s.classList.remove(this.hiddenClassValue) - } - }) - } - - show (event) { - this.#getItems(event).forEach((s) => s.classList.remove(this.hiddenClassValue)) - this.hideButtonTarget.classList.remove(this.hiddenClassValue) - this.showButtonTarget.classList.add(this.hiddenClassValue) - } - - hide (event) { - this.#getItems(event).forEach((s) => s.classList.add(this.hiddenClassValue)) - this.hideButtonTarget.classList.add(this.hiddenClassValue) - this.showButtonTarget.classList.remove(this.hiddenClassValue) - } - - #ItemById (event) { - let button = event.target.closest('[data-id]') - return document.getElementById(button.dataset.id) - } - - #getItems (event) { - let items - if (this.hasItemTarget) { - items = this.itemTargets - } else { - items = [this.#ItemById(event)] - } - return items - } - -} \ No newline at end of file diff --git a/app/components/layout/vertical_tabs_component.rb b/app/components/layout/vertical_tabs_component.rb deleted file mode 100644 index c4709df27..000000000 --- a/app/components/layout/vertical_tabs_component.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class Layout::VerticalTabsComponent < ViewComponent::Base - - renders_many :item_contents - - def initialize(titles: [], header: nil , selected: nil, url_parameter: nil) - @titles = titles - @selected = selected - @header = header - @url_parameter = url_parameter - end - -end diff --git a/app/components/layout/vertical_tabs_component/vertical_tabs_component.html.haml b/app/components/layout/vertical_tabs_component/vertical_tabs_component.html.haml deleted file mode 100644 index ebc37bb14..000000000 --- a/app/components/layout/vertical_tabs_component/vertical_tabs_component.html.haml +++ /dev/null @@ -1,20 +0,0 @@ -- if @header - %div.mb-2 - .edit-ontology-title.mx-2{style: 'font-size: 30px'} - %div=@header - %hr - -.d-flex{data: {controller:'tabs-container'}} - .tabs-left-column - %div.nav.nav-pills.flex-column - - @titles.each_with_index do |key| - %a.vertical-tab-item.d-block{href: "##{key.parameterize}-tab", "data-toggle" => "pill", class: @selected.eql?(key.parameterize) ? 'active show' : '', data: {'tab-id': key.parameterize, 'tab-title': key.titleize, 'url-parameter': @url_parameter, action: 'click->tabs-container#selectTab'}} - = key.humanize - - .tabs-right-column.w-100 - %div.tab-content - - item_contents.each_with_index do |tab, index| - .tab-pane.fade.mx-4{id: @titles[index].parameterize+'-tab', class: @selected.eql?(@titles[index].parameterize) ? 'active show' : ''} - = tab - - diff --git a/app/components/license_field_component.rb b/app/components/license_field_component.rb deleted file mode 100644 index 6baf0f86f..000000000 --- a/app/components/license_field_component.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class LicenseFieldComponent < ViewComponent::Base - - def initialize(value: ) - super - @value = value - end - -end diff --git a/app/components/license_field_component/license_field_component.html.haml b/app/components/license_field_component/license_field_component.html.haml deleted file mode 100644 index 41fdcdcff..000000000 --- a/app/components/license_field_component/license_field_component.html.haml +++ /dev/null @@ -1,8 +0,0 @@ -- if @value.to_s.start_with?("http://creativecommons.org/licenses") || @value.to_s.start_with?("https://creativecommons.org/licenses") - %a{:rel => "license", :alt => t('components.creative_commons_license'), :href => "#{@value}", :target => "_blank", :style => "border-width:0", :title => "#{@value}"} - %img{:rel => "license", :alt => t('components.creative_commons_license'), :title => "#{@value}", :style => "border-width:0", :src => "https://i.creativecommons.org/l/by/4.0/88x31.png"} -- elsif @value.to_s.start_with?("http://opensource.org/licenses") || @value.to_s.start_with?("https://opensource.org/licenses") - %a{:rel => "license", :alt => t('components.open_source_license'), :href => "#{@value}", :title => "#{@value}", :target => "_blank", :style => "border-width:0;", :src => "https://opensource.org/files/osi_logo_bold_100X133_90ppi.png"} - %img{:rel => "license", :alt => t('components.open_source_license'), :title => "#{@value}", :style => "height: 80px; border-width:0;", :src => "https://opensource.org/files/osi_logo_bold_100X133_90ppi.png"} -- else - %a{:rel => "license", :href => "#{@value}", :target => "_blank"}= @value \ No newline at end of file diff --git a/app/components/link_field_component.rb b/app/components/link_field_component.rb deleted file mode 100644 index 3e5af446e..000000000 --- a/app/components/link_field_component.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -class LinkFieldComponent < ViewComponent::Base - - include ApplicationHelper, Turbo::FramesHelper, ComponentsHelper - - def initialize(value:, acronym: nil, raw: false, check_resolvability: false, enable_copy: true, generate_link: false, generate_htaccess: false) - super - @value = value - @raw = raw - @check_resolvability = check_resolvability - @enable_copy = enable_copy - @acronym = acronym - @generate_link = generate_link - @generate_htaccess = generate_htaccess - end - - def internal_link? - @value.to_s.include?(URI.parse($REST_URL).hostname) || @value.to_s.include?(URI.parse($UI_URL).hostname) - end - - def link_tag - if !@raw && internal_link? - url = @value.to_s.split("/").last - text = @value.to_s.sub("data.", "") - target = "" - else - url = @value.to_s - text = url - target = "_blank" - end - - tag = link_to(text, url, target: target, class: 'summary-link-truncate', 'data-controller': 'tooltip', title: text) - link_to_with_actions(tag, acronym: @acronym, url: url, copy: @enable_copy, check_resolvability: @check_resolvability, generate_link: @generate_link, generate_htaccess: @generate_htaccess) - end - -end diff --git a/app/components/link_field_component/link_field_component.html.haml b/app/components/link_field_component/link_field_component.html.haml deleted file mode 100644 index 75b7914af..000000000 --- a/app/components/link_field_component/link_field_component.html.haml +++ /dev/null @@ -1,8 +0,0 @@ -- if internal_link? - = render ChipButtonComponent.new(type: "clickable") do - = link_tag -- elsif link?(@value.to_s) - = render ChipButtonComponent.new(type: "clickable") do - = link_tag -- else - = render ChipButtonComponent.new( text: @value.to_s, type: "static") \ No newline at end of file diff --git a/app/components/link_text_component.rb b/app/components/link_text_component.rb deleted file mode 100644 index 47ea0f6df..000000000 --- a/app/components/link_text_component.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class LinkTextComponent < ViewComponent::Base - include InternationalisationHelper - - def initialize(text:, icon: nil, target: nil) - @text = text - @icon = icon - @target = target - end - - def call - svg_icon = !@icon&.empty? ? inline_svg(@icon) : '' - extra_span = @text == t('mappings.upload_mappings') ? '' : "#{svg_icon}" - "#{@text}#{extra_span}".html_safe - end -end diff --git a/app/components/nested_agent_search_input_component.rb b/app/components/nested_agent_search_input_component.rb deleted file mode 100644 index 1f3ac942e..000000000 --- a/app/components/nested_agent_search_input_component.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class NestedAgentSearchInputComponent < ViewComponent::Base - - include Turbo::FramesHelper, AgentHelper - - def initialize(label: nil, agents:, agent_type:, name_prefix:, show_affiliations: true, edit_on_modal: false, parent_id: nil) - @agents = agents - @agent_type = agent_type - @name_prefix = name_prefix - @edit_on_modal = edit_on_modal - @parent_id = parent_id - @label = label - @show_affiliations = show_affiliations - end -end diff --git a/app/components/nested_agent_search_input_component/nested_agent_search_input_component.html.haml b/app/components/nested_agent_search_input_component/nested_agent_search_input_component.html.haml deleted file mode 100644 index 9290423d9..000000000 --- a/app/components/nested_agent_search_input_component/nested_agent_search_input_component.html.haml +++ /dev/null @@ -1,18 +0,0 @@ -= render NestedFormInputsComponent.new do |c| - - c.header do - = @label - - c.template do - = render TurboFrameComponent.new(id: agent_id_frame_id('NEW_RECORD', @parent_id)) do - = render AgentSearchInputComponent.new(id: 'NEW_RECORD', agent_type: @agent_type, - name_prefix: @name_prefix, show_affiliations: @show_affiliations, - parent_id: @parent_id, edit_on_modal: @edit_on_modal) - - - c.empty_state do - = hidden_field_tag agent_field_name('', @name_prefix+"[#{Array(@agents).size}]") - - Array(@agents).each_with_index do |agent, i| - - if agent.is_a?(String) - - c.row do - = agent - - elsif agent&.agentType - - c.row do - = render partial: 'agents/agent_show', locals: {agent_id: i, agent: agent, name_prefix: @name_prefix, edit_on_modal: @edit_on_modal, parent_id: @parent_id} diff --git a/app/components/nested_form_inputs_component.rb b/app/components/nested_form_inputs_component.rb deleted file mode 100644 index f53818580..000000000 --- a/app/components/nested_form_inputs_component.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class NestedFormInputsComponent < ViewComponent::Base - - renders_one :template - renders_one :header - renders_many :rows - renders_one :empty_state - - def initialize(object_name: '', default_empty_row: false) - super - @object_name = object_name - @default_row = default_empty_row - end -end diff --git a/app/components/nested_form_inputs_component/nested_form_inputs_component.html.haml b/app/components/nested_form_inputs_component/nested_form_inputs_component.html.haml deleted file mode 100644 index d0e5751e2..000000000 --- a/app/components/nested_form_inputs_component/nested_form_inputs_component.html.haml +++ /dev/null @@ -1,34 +0,0 @@ -%div.nested-form-input-container{data: {controller: "nested-form"}} - %template{'data-nested-form-target':"template"} - %div.d-flex.align-items-center.nested-form-wrapper.my-1{'data-new-record': 'true'} - %div{style: 'width: 90%'} - = template - %div.d-flex.justify-content-end{style: 'width: 10%'} - %div.delete{data: {action:"click->nested-form#remove"}} - = inline_svg 'icons/delete.svg' - - %div.titles - = header - %div.d-none - = empty_state - - rows.each_with_index do |row , index| - %div.d-flex.align-items-center.nested-form-wrapper.my-1{'data-new-record': 'true'} - %div{style: 'width: 90%'} - = row - %div.d-flex.justify-content-end{style: 'width: 10%'} - %div.delete{data: {action:"click->nested-form#remove"}} - = inline_svg 'icons/delete.svg' - - - if @default_row && rows.empty? - %div.d-flex.align-items-center.nested-form-wrapper.my-1{'data-new-record': 'true'} - %div{style: 'width: 90%'} - = template - %div.d-flex.justify-content-end{style: 'width: 10%'} - %div.delete{data: {action:"click->nested-form#remove"}} - = inline_svg 'icons/delete.svg' - - %div{'data-nested-form-target': "target"} - %div.add-another-object{data: {action:"click->nested-form#add"}} - = inline_svg 'icons/plus.svg', width: "14px", height: "14px" - %div - Add another #{@object_name} diff --git a/app/components/notification_component.rb b/app/components/notification_component.rb deleted file mode 100644 index 49f82354a..000000000 --- a/app/components/notification_component.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -class NotificationComponent < ViewComponent::Base - - def initialize(title:, comment: '', type: 'success', auto_remove: true) - super - @title = title - @comment = comment - @type = type - @auto_remove = auto_remove - end - - def auto_remove? - @auto_remove - end - - def notification_type_icon - svg_icon(@type) - end - - def notification_animation_class - auto_remove? ? 'slide-in-out-right' : 'slide-in-right' - end - - def notification_type_class - "type-#{@type}" - end - - def notification_class - notification_animation_class - end - - private - def svg_icon(name) - inline_svg_tag("icons/#{name}.svg", class: notification_type_class) - end - - -end diff --git a/app/components/notification_component/notification_component.html.haml b/app/components/notification_component/notification_component.html.haml deleted file mode 100644 index 92962db54..000000000 --- a/app/components/notification_component/notification_component.html.haml +++ /dev/null @@ -1,13 +0,0 @@ -.notification{class: notification_class} - .notification-inner - .notification-content - %span - = notification_type_icon - .notification-text - %p.text-sm.font-medium.text-gray-900 - = @title - %p - = @comment - .ml-4.flex-shrink-0.d-flex - %button.notification-close{"onClick": "this.parentElement.parentElement.parentElement.style.opacity = 0"} - = svg_icon('close') \ No newline at end of file diff --git a/app/components/ontology_browse_card_component.rb b/app/components/ontology_browse_card_component.rb deleted file mode 100644 index 84251d7f0..000000000 --- a/app/components/ontology_browse_card_component.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class OntologyBrowseCardComponent < ViewComponent::Base - include OntologiesHelper - - def initialize(ontology: nil) - super - @ontology = ontology - end - - def ontology - @ontology - end -end diff --git a/app/components/ontology_browse_card_component/ontology_browse_card_component.html.haml b/app/components/ontology_browse_card_component/ontology_browse_card_component.html.haml deleted file mode 100644 index aaf97e85f..000000000 --- a/app/components/ontology_browse_card_component/ontology_browse_card_component.html.haml +++ /dev/null @@ -1,85 +0,0 @@ --if ontology - .browse-ontology-container - .d-flex - .browse-ontology-description - .browse-ontology-title-bar - %a.browse-ontology-title{:href => "/ontologies/#{ontology[:acronym]}", data: {'turbo': 'false'}} - = ontology[:name]+" ("+ontology[:acronym]+")" - = private_ontology_icon(ontology[:private]) - - if session[:user]&.admin? - - ontology_status = status_string(ontology) - = render Display::InfoTooltipComponent.new(text: ontology_status, icon: submission_status_icons(ontology_status)) - .browse-desc-container{data:{controller:"text-truncate", 'text-truncate-more-text-value': t('components.show_more') , 'text-truncate-less-text-value': t('components.show_less')}} - %p.browse-desc-text{'data-text-truncate-target': 'content'} - = ontology[:description] - .browse-show-more-button{data:{'text-truncate-target': 'button', 'action':"click->text-truncate#toggle"}} - = t('components.show_more') - - - - unless ontology[:fairScore].nil? || ontology[:fairScore].zero? || ontology[:acronym] == 'AGROVOC' - .browse-fair - %p.browse-fair-title - = t('components.fair_score') - .browse-progress-bar - .browse-faire-progress{:style => "width: #{ontology[:normalizedFairScore].to_s+"%"}"} - %p.browse-fair-score - = ontology[:fairScore] - %a.browse-fair-details{:href => "/ontologies/#{ontology[:acronym]}#fair-details", 'data-turbo': 'false'}= t('components.details_details') - - .browse-ontology-cards - = render SquareBadgeComponent.new(label: t('components.classes'), count: ontology[:class_count_formatted], link: "/ontologies/#{ontology[:acronym]}?p=classes" ) - - = render SquareBadgeComponent.new(label: ontology[:format] == 'SKOS' ? t('components.concepts') : t('components.instances'), - count: ontology[:individual_count_formatted], - link: "/ontologies/#{ontology[:acronym]}?p=#{ontology[:format] == 'SKOS' ? "classes" : "instances"}") - - = render SquareBadgeComponent.new(label: t('components.projects'), count: ontology[:project_count], link: "/ontologies/#{ontology[:acronym]}#projects_section" ) - - = render SquareBadgeComponent.new(label: t('components.notes'), count: ontology[:note_count], link: "/ontologies/#{ontology[:acronym]}?p=notes" ) - - - .d-flex.align-items-baseline.mt-1 - - if ontology[:creationDate] - %span.mr-1 - = render ChipButtonComponent.new(type: "clickable") do - %span.mr-1= t('components.submitted') - %span.browse-uploaded-date{data:{controller: 'timeago', 'timeago-datetime-value': ontology[:creationDate], 'timeago-add-suffix-value': 'true'}} - - if ontology[:contact] - %span.mx-1= t('components.by') - %span.browse-uploaded-date.text-truncate - = ontology[:contact].titleize - - - if ontology[:released] - - date = render DateTimeFieldComponent.new(value: ontology[:released]) - %span{data:{controller:'tooltip'}, title: t('components.creation_date', date: date)} - = render ChipButtonComponent.new(type: "clickable") do - = DateTime.parse(date).year rescue date - - - if ontology[:format] - %span.mx-1 - = render ChipButtonComponent.new(type: "clickable") do - = ontology[:format] - - if ontology_retired?(ontology) - %span.mx-1 - = ontology_retired_badge(ontology) - - if ontology[:viewOfOnt] - %span.mx-1{data:{controller:'tooltip'}, title: t('components.view_of_the_ontology', ontology: ontology[:viewOfOnt].split('/').last )} - = render ChipButtonComponent.new(type: "clickable", text: t('components.view')) - - - if session[:user]&.admin? - %div.mx-1{title: content_tag(:div, debug(ontology), style: 'height: 300px; overflow: scroll'), data:{controller: 'tooltip', 'tooltip-interactive-value': 'true'}} - = render ChipButtonComponent.new(type: "clickable", text: t('components.debug') , class: 'admin-background') -- else - .browse-ontology-container - .browse-sket - .browse-sket-column-one - .one - .two - .three - .four - .browse-sket-column-two - .one - .two - .browse-sket-column-three - .one - .two \ No newline at end of file diff --git a/app/components/ontology_search_input_component.rb b/app/components/ontology_search_input_component.rb deleted file mode 100644 index 0e4f2f16b..000000000 --- a/app/components/ontology_search_input_component.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -class OntologySearchInputComponent < ViewComponent::Base - include InternationalisationHelper - - def initialize(name: 'search', placeholder: t('ontologies.ontology_search_prompt'), scroll_down: true, search_icon_type: nil) - @name = name - @placeholder = placeholder - @scroll_down = scroll_down - @search_icon_type = search_icon_type - end -end diff --git a/app/components/ontology_search_input_component/ontology_search_input_component.html.haml b/app/components/ontology_search_input_component/ontology_search_input_component.html.haml deleted file mode 100644 index ca9f7df33..000000000 --- a/app/components/ontology_search_input_component/ontology_search_input_component.html.haml +++ /dev/null @@ -1,11 +0,0 @@ -= render SearchInputComponent.new(placeholder: @placeholder, search_icon_type: @search_icon_type, - name: @name, scroll_down: @scroll_down, ajax_url: '/ajax/ontologies?acronym=', - item_base_url: '/ontologies/', id_key:'acronym', - actions_links: {search_ontology_content: "/search?query=o", browse_all_ontologies: "/ontologies?search=o"}) do |s| - - - s.template do - %a{href: "LINK", class: "search-content", 'data-turbo-frame': '_top'} - %p.search-element.home-searched-ontology - NAME(ACRONYM) - %p.home-result-type - TYPE \ No newline at end of file diff --git a/app/components/ontology_subscribe_button_component.rb b/app/components/ontology_subscribe_button_component.rb deleted file mode 100644 index 24edeb409..000000000 --- a/app/components/ontology_subscribe_button_component.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -class OntologySubscribeButtonComponent < ViewComponent::Base - include InternationalisationHelper - def initialize(id: '', ontology_id:, subscribed:, user_id:, count: 0, link: 'javascript:void(0);') - super - @id = id - @subscribed = subscribed - @sub_text = subscribed ? t('components.unwatch') : t('components.watch') - @link = link - @count = count - @controller_params = { - data: { - controller: "tooltip #{!user_id.nil? && 'subscribe-notes'}", - 'subscribe-notes-ontology-id-value': ontology_id, - 'subscribe-notes-is-subbed-value': subscribed.to_s, - 'subscribe-notes-user-id-value': user_id, - 'subscribe-notes-watch-value': t('components.watch'), - 'subscribe-notes-unwatch-value': t('components.unwatch'), - action: 'click->subscribe-notes#subscribeToNotes', - }, - title: title - } - end - - def title - if @subscribed - t('components.resource', sub_text: @sub_text) - elsif @count.zero? - t('components.notified_of_all_updates') - else - t('components.join_the_count', count: @count) - end - end - - def data_turbo - @link.include?('/login') ? 'false' : 'true' - end -end diff --git a/app/components/ontology_subscribe_button_component/ontology_subscribe_button_component.html.haml b/app/components/ontology_subscribe_button_component/ontology_subscribe_button_component.html.haml deleted file mode 100644 index bf0b2add6..000000000 --- a/app/components/ontology_subscribe_button_component/ontology_subscribe_button_component.html.haml +++ /dev/null @@ -1,14 +0,0 @@ -%div{@controller_params, style: 'margin-left: 10px;', id: @id} - = render PillButtonComponent.new do - %a.d-flex.align-items-center{href: @link, 'data-turbo': data_turbo} - = inline_svg_tag "eye.svg" - %div - %span{'data-subscribe-notes-target': 'text'} - #{@sub_text} - ( - %span{'data-subscribe-notes-target': 'count'} - #{@count} - ) - %span{style:"display: none;", class: 'px-1', 'data-subscribe-notes-target': 'loader'} - = render LoaderComponent.new(small: true) - %span.notes_sub_error{style:'color: red; display: none', 'data-subscribe-notes-target': 'error'} \ No newline at end of file diff --git a/app/components/ontology_subscribe_button_component/ontology_subscribe_button_component_controller.js b/app/components/ontology_subscribe_button_component/ontology_subscribe_button_component_controller.js deleted file mode 100644 index b425c5155..000000000 --- a/app/components/ontology_subscribe_button_component/ontology_subscribe_button_component_controller.js +++ /dev/null @@ -1,76 +0,0 @@ -import {Controller} from "@hotwired/stimulus"; -import useAjax from "../../javascript/mixins/useAjax"; - -// Connects to data-controller="subscribe-notes" -export default class extends Controller { - static values = { - ontologyId: String, - isSubbed: Boolean, - userId: String, - watch: String, - unwatch: String - } - static targets = ["error", "loader", "text" ,"count"] - - subscribeToNotes() { - let ontologyId = this.ontologyIdValue - let isSubbed = this.isSubbedValue - let userId = this.userIdValue - - this.#hideError() - this.#showSpinner() - - let url = "/subscriptions?user_id=" + userId + "&ontology_id=" + ontologyId + "&subbed=" + isSubbed; - useAjax({ - type: "POST", - url: url, - dataType: "json", - success: (data) => { - // Change subbed value on a element - this.#hideSpinner() - - if(!data.updated_sub){ - this.#showError() - return - } - - let linkElement = $(this.element); - this.isSubbedValue = !isSubbed - - // Change button text - let txt = this.textTarget.innerHTML - let count = parseInt(this.countTarget.innerHTML) - - let newButtonText = txt.match(this.unwatchValue) ? txt.replace(this.unwatchValue, this.watchValue) : txt.replace(this.watchValue, this.unwatchValue); - this.element.setAttribute('title', newButtonText + ' this ontology') - this.textTarget.innerHTML = newButtonText - this.countTarget.innerHTML = newButtonText.match(this.unwatchValue) ? (count + 1) : (count - 1) - }, - error: () => { - this.#hideSpinner() - this.#showError() - } - }) - } - - #showSpinner() { - $(this.loaderTarget).show() - } - - #hideSpinner() { - $(this.loaderTarget).hide() - } - - - #showError() { - const errorElem = $(this.errorTarget) - errorElem.html("Problem subscribing to emails, please try again") - errorElem.show() - } - - #hideError() { - $(this.errorTarget).hide() - } - - -} diff --git a/app/components/pill_button_component.rb b/app/components/pill_button_component.rb deleted file mode 100644 index 5371bee43..000000000 --- a/app/components/pill_button_component.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class PillButtonComponent < ViewComponent::Base - - def initialize(text: nil) - super - @text = text - end -end diff --git a/app/components/pill_button_component/pill_button_component.html.haml b/app/components/pill_button_component/pill_button_component.html.haml deleted file mode 100644 index ffcb9ff34..000000000 --- a/app/components/pill_button_component/pill_button_component.html.haml +++ /dev/null @@ -1,2 +0,0 @@ -%button.pill-button - = @text || content \ No newline at end of file diff --git a/app/components/popup_link_text_component.rb b/app/components/popup_link_text_component.rb deleted file mode 100644 index d6dbc41e4..000000000 --- a/app/components/popup_link_text_component.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class PopupLinkTextComponent < LinkTextComponent - - def initialize(text:) - super(text: text, icon: 'icons/popup-link.svg') - end - -end diff --git a/app/components/rounded_button_component.rb b/app/components/rounded_button_component.rb deleted file mode 100644 index b2a0ce49c..000000000 --- a/app/components/rounded_button_component.rb +++ /dev/null @@ -1,21 +0,0 @@ -class RoundedButtonComponent < ViewComponent::Base - def initialize(icon: "json.svg", link: "#", size: "small", target: '', title: '') - @icon = icon - @link = link - @size = size - @target = target - @title = title - end - - def size - case @size - when "small" - ["32px", "1", "16px"] - when "medium" - ["45px", "1", "23px"] - when "big" - ["100px", "2.5", "50px"] - end - end - -end \ No newline at end of file diff --git a/app/components/rounded_button_component/rounded_button_component.html.haml b/app/components/rounded_button_component/rounded_button_component.html.haml deleted file mode 100644 index f5f23aad5..000000000 --- a/app/components/rounded_button_component/rounded_button_component.html.haml +++ /dev/null @@ -1,2 +0,0 @@ -%a.rounded-button{:href => @link, style: "height:"+size[0]+"; width:"+size[0]+"; border-radius:"+size[2]+";", target:@target, title: @title, 'data-controller':'tooltip'} - = inline_svg_tag @icon, style: "transform: scale("+size[1]+");" diff --git a/app/components/search_input_component.rb b/app/components/search_input_component.rb deleted file mode 100644 index 9390797d3..000000000 --- a/app/components/search_input_component.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -class SearchInputComponent < ViewComponent::Base - - renders_one :template - - def initialize(id: '', - name: '', placeholder: '', actions_links: {}, - scroll_down: true, use_cache: true, - ajax_url:, - item_base_url:, - id_key:, - links_target: '_top', - search_icon_type: nil, - display_all: false) - @id = id - @name = name - @placeholder = placeholder - @actions_links = actions_links - @use_cache = use_cache - @scroll_down = scroll_down - @ajax_url = ajax_url - @item_base_url = item_base_url - @id_key = id_key - @links_target = links_target - @search_icon_type = search_icon_type - @display_all = display_all - end - def action_link_info(value) - if value.is_a?(Hash) - [value[:link] , value[:target]] - else - [value, '_top'] - end - end - def nav_icon_class - @search_icon_type.eql?('nav') ? 'search-input-nav-icon' : '' - end - def display_all_mode_class - @display_all ? 'search-container-scroll' : '' - end -end diff --git a/app/components/search_input_component/search_input_component.html.haml b/app/components/search_input_component/search_input_component.html.haml deleted file mode 100644 index 9d5e19384..000000000 --- a/app/components/search_input_component/search_input_component.html.haml +++ /dev/null @@ -1,35 +0,0 @@ -%div.search-inputs{id: @id, 'data-controller': 'search-input', - 'data-search-input-ajax-url-value': @ajax_url, - 'data-search-input-item-link-base-value': @item_base_url, - 'data-search-input-id-key-value': @id_key, - 'data-search-input-cache-value': @use_cache.to_s, - 'data-search-input-scroll-down-value': @scroll_down.to_s, - 'data-search-input-selected-item-value': 0, - 'data-search-input-display-all-value': @display_all - } - - - if @search_icon_type - %div{class: "home-search-button #{nav_icon_class}"} - %a{href: '/search', 'data-search-input-target': 'button'} - .search-component-arrow - = inline_svg_tag 'arrow-right.svg' - .search-component-loader.d-none{'data-search-input-target': 'loader'} - = render LoaderComponent.new(small: true) - - else - %a.d-none{'data-search-input-target': 'loader'} - %a.d-none{'data-search-input-target': 'button'} - - = render Input::InputFieldComponent.new(name: @name, placeholder: @placeholder, - data: {'action': 'input->search-input#search blur->search-input#blur keydown.down->search-input#arrow_down keydown.up->search-input#arrow_up keydown.enter->search-input#enter_key', - 'search-input-target': 'input'}) - %div{class: "search-container #{display_all_mode_class}", 'data-search-input-target': 'dropDown', 'data-action': 'mousedown->search-input#prevent'} - - @actions_links.each do |key, value| - - link, target = action_link_info(value) - %a.search-content#search-content{href: link, 'data-turbo-frame': target, 'data-search-input-target': 'actionLink'} - %p.mb-0 - %div - %img{src: asset_path("loop.svg")}/ - %p - =key.to_s.humanize - %template{'data-search-input-target': 'template'} - = template \ No newline at end of file diff --git a/app/components/search_input_component/search_input_component_controller.js b/app/components/search_input_component/search_input_component_controller.js deleted file mode 100644 index 957dc6f04..000000000 --- a/app/components/search_input_component/search_input_component_controller.js +++ /dev/null @@ -1,171 +0,0 @@ -import {Controller} from "@hotwired/stimulus" -import useAjax from "../../javascript/mixins/useAjax"; -import debounce from 'debounce' - -// Connects to data-controller="search-input" -export default class extends Controller { - static targets = ["input", "dropDown", "actionLink", "template", "button", "loader"] - static values = { - items: Array, - ajaxUrl: String, - itemLinkBase: String, - idKey: String, - cache: {type: Boolean, default: true}, - selectedItem: Number, - searchEndpoint: {type: String, default: '/search'}, - displayAll: Boolean - } - - connect() { - this.input = this.inputTarget - this.dropDown = this.dropDownTarget - this.actionLinks = this.actionLinkTargets - this.items = this.itemsValue - this.search = debounce(this.search.bind(this), 100); - } - - search() { - this.selectedItemValue = 0 - this.loaderTarget.classList.remove("d-none") - this.buttonTarget.classList.add("d-none") - this.searchInput() - } - - searchInput() { - this.#fetchItems() - } - - prevent(event){ - event.preventDefault(); - } - blur() { - this.dropDown.style.display = "none"; - this.input.classList.remove("home-dropdown-active"); - } - arrow_up(){ - if (this.selectedItemValue > 1){ - this.selectedItemValue-- - this.dropDownTarget.querySelectorAll('.search-content')[this.selectedItemValue-1].style.backgroundColor = "rgba(0, 0, 0, 0.03)"; - this.dropDownTarget.querySelectorAll('.search-content')[this.selectedItemValue].style.background = 'white' - } - } - arrow_down(){ - if(this.selectedItemValue 1){ - this.dropDownTarget.querySelectorAll('.search-content')[this.selectedItemValue-2].style.background = 'white' - } - } - enter_key(){ - if(this.inputTarget.value != ''){ - let results = this.dropDownTarget.querySelectorAll('.search-content') - if(this.selectedItemValue === 0 || this.dropDownTarget.style.display === 'none'){ - results[results.length - 2].click() - } else { - results[this.selectedItemValue-1].click() - } - } - } - #inputValue() { - return this.input.value.trim() - } - - #useCache() { - return this.cacheValue - } - - - #fetchItems() { - if (this.items.length !== 0 && this.#useCache()) { - this.#renderLines() - } else { - useAjax({ - type: "GET", - url: this.ajaxUrlValue + encodeURIComponent(this.#inputValue()), - dataType: "json", - success: (data) => { - this.items = data.map(x => { return {...x, link: (this.itemLinkBaseValue + x[this.idKeyValue])}} ) - this.#renderLines() - }, - error: () => { - console.log("error") - //TODO show errors - } - }) - } - } - - #renderLines() { - this.loaderTarget.classList.add("d-none") - this.buttonTarget.classList.remove("d-none") - const inputValue = this.#inputValue(); - let results_list = [] - if (inputValue.length > 0) { - this.buttonTarget.href = `${this.searchEndpointValue}?q=${inputValue}`; - this.actionLinks.forEach(action => { - const content = action.querySelector('p') - content.innerHTML = inputValue - const currentURL = new URL(action.href, document.location) - currentURL.searchParams.set(currentURL.searchParams.keys().next().value, inputValue) - action.href = currentURL.pathname + currentURL.search - }) - - this.dropDown.innerHTML = "" - let breaker = 0 - for (let i = 0; i < this.items.length; i++) { - if (!this.displayAllValue && breaker === 4) { - break; - } - // Get the current item from the ontologies array - const item = this.items[i]; - - let text = Object.values(item).reduce((acc, value) => acc + value, "") - - // Check if the item contains the substring - if (!this.cacheValue || text.toLowerCase().includes(inputValue.toLowerCase())) { - results_list.push(item); - breaker = breaker + 1 - } - } - - results_list.forEach((item) => { - let link = this.#renderLine(item); - this.dropDown.appendChild(link); - }); - - this.actionLinks.forEach(x => this.dropDown.appendChild(x)) - this.dropDown.style.display = "block"; - - this.input.classList.add("home-dropdown-active"); - - - } else { - this.dropDown.style.display = "none"; - this.input.classList.remove("home-dropdown-active"); - } - - } - - #renderLine(item) { - let template = this.templateTarget.content - let newElement = template.firstElementChild.outerHTML - Object.entries(item).forEach( ([key, value]) => { - key = key.toString().toUpperCase() - if (key === 'TYPE'){ - value = value.toString().split('/').slice(-1) - } - if (key === 'ACRONYM'){ - value = value ? `(${value.toString()})` : '' - } - if (key === 'IDENTIFIERS'){ - value = value ? `- ${value.toString()}` : '' - } - const regex = new RegExp('\\b' + key + '\\b', 'gi'); - newElement = newElement.replace(regex, value ? value.toString() : "") - }) - - return new DOMParser().parseFromString(newElement, "text/html").body.firstElementChild - } -} diff --git a/app/components/select_input_component.rb b/app/components/select_input_component.rb deleted file mode 100644 index 29dc41c7a..000000000 --- a/app/components/select_input_component.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -class SelectInputComponent < ViewComponent::Base - - def initialize(id:, name:, values:, selected: nil, multiple: false, open_to_add_values: false, required: false, data: {}, placeholder: '', **html_options) - super - @id = id || '' - @name = name - @values = values - @selected = selected - @multiple = multiple - @open_to_add_values = open_to_add_values - @placeholder = placeholder - @data = data - @required = required - @html_options = html_options - end - - def call - select_input_tag(@id, @name, @values, @selected, multiple: @multiple, open_to_add_values: @open_to_add_values, - placeholder: @placeholder, required: @required) - end - - private - - def select_input_tag(id, name, values, selected, options = {}) - multiple = options[:multiple] || false - open_to_add_values = options[:open_to_add_values] || false - required = options[:required] || false - placeholder = options[:placeholder] || '' - data = @data.merge({ - 'select-input-multiple-value': multiple, - 'select-input-open-add-value': open_to_add_values, - 'select-input-required-value': required, - }) - data[:controller] = "#{data[:controller]} select-input" - - select_html_options = { - id: "select_#{id}", - placeholder: placeholder, - autocomplete: 'off', - multiple: multiple, - data: data, - }.merge(@html_options) - - select_html_options[:style] = "#{select_html_options[:style]}; visibility: hidden" - - select_tag(name, options_for_select(values, selected), select_html_options) - - end -end diff --git a/app/components/select_input_component/select_input_component_controller.js b/app/components/select_input_component/select_input_component_controller.js deleted file mode 100644 index d05bb7036..000000000 --- a/app/components/select_input_component/select_input_component_controller.js +++ /dev/null @@ -1,87 +0,0 @@ -import { Controller } from '@hotwired/stimulus' -import { useTomSelect } from '../../javascript/mixins/useTomSelect' - -export default class SelectInput extends Controller { - static DISPLAY_VALUE = 'value' - static DISPLAY_TEXT = 'text' - - static values = { - multiple: { type: Boolean, default: false }, - openAdd: { type: Boolean, default: false }, - required: { type: Boolean, default: false }, - searchable: { type: Boolean, default: true }, - displayField: { type: String, default: SelectInput.DISPLAY_TEXT } - } - - connect () { - let myOptions = {} - myOptions = { - render: { - option: (data) => { - return `
${data.text}
` - }, - item: (data) => { - if (this.displayFieldValue === SelectInput.DISPLAY_TEXT) { - return `
${data.text}
` - } else { - return `
${data.value}
` - } - } - } - } - - myOptions['maxOptions'] = Infinity - - if(!this.searchableValue){ - myOptions['controlInput'] = null - } - - if (this.multipleValue) { - myOptions['onItemAdd'] = function () { - this.setTextboxValue('') - this.refreshOptions() - } - myOptions['plugins'] = ['remove_button'] - } - - if (this.openAddValue) { - myOptions['create'] = true - } - - this.select = useTomSelect(this.element, myOptions, this.#triggerChange.bind(this)) - this.element.style.visibilty = 'hidden'; - - [...this.element.attributes].forEach(attribute => { - if(attribute.name !== 'class' && attribute.name !== 'style' && attribute.name !== 'id' && attribute.name !== 'name'){ - this.select.control.setAttribute(attribute.name, attribute.value.replace('select-input', '')) - if(attribute.name === 'title'){ - this.select.control.setAttribute('data-controller', 'tooltip') - } - } - }) - } - - #triggerChange () { - if (this.#isRequired() && !this.#isMultiple() && this.#isEmpty()) { - this.#selectFirstItem() - } - - document.dispatchEvent(new Event('change', { target: this.element })) - } - - #isRequired () { - return this.requiredValue - } - - #isMultiple () { - return this.multipleValue - } - - #isEmpty () { - return this.select.getValue() === '' - } - - #selectFirstItem () { - this.select.setValue(Object.keys(this.select.options)[0], true) - } -} \ No newline at end of file diff --git a/app/components/square_badge_component.rb b/app/components/square_badge_component.rb deleted file mode 100644 index 9d85a8c34..000000000 --- a/app/components/square_badge_component.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class SquareBadgeComponent < ViewComponent::Base - - def initialize(label: , count: ,link: nil) - @label = label - @count = count - @link = link - end - def call - return if @count.to_i.zero? - - link_to(@link, class: 'browse-onology-card', 'data-turbo' => 'false') do - concat(content_tag(:p, @count, class: 'browse-card-number')) - concat(content_tag(:p, @label, class: 'browse-card-text')) - end - end - -end diff --git a/app/components/submission_metadata_component.rb b/app/components/submission_metadata_component.rb deleted file mode 100644 index c754859bd..000000000 --- a/app/components/submission_metadata_component.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class SubmissionMetadataComponent < ViewComponent::Base - include ApplicationHelper, MetadataHelper, SubmissionInputsHelper,OntologiesHelper, AgentHelper - - def initialize(submission: , submission_metadata:) - super - @submission = submission - - @json_metadata = submission_metadata - @metadata_list = content_metadata_attributes(submission_metadata) - end - - def display_attributes(metadata) - if Array(@submission.send(metadata)).empty? - out = 'N/A' - else - out = Array(@submission.send(metadata)).map do |value| - content_tag(:div, class: 'm-1 f32') do - display_attribute(metadata, value) - end - end.join - end - out.html_safe - end -end diff --git a/app/components/submission_metadata_component/submission_metadata_component.html.haml b/app/components/submission_metadata_component/submission_metadata_component.html.haml deleted file mode 100644 index 39d3c3910..000000000 --- a/app/components/submission_metadata_component/submission_metadata_component.html.haml +++ /dev/null @@ -1,9 +0,0 @@ -= render TableComponent.new(id: 'submission_metadata_table', borderless: true, layout_fixed: true) do |t| - - @metadata_list.each do |metadata, label| - - next if Array(@submission.send(metadata)).empty? - - t.row do |r| - - r.td do - = attr_label(metadata.to_s, attr_metadata: attr_metadata(metadata.to_s)) - - r.td do - .d-flex.flex-wrap.align-items-center - = display_attributes(metadata) diff --git a/app/components/submission_status_component.rb b/app/components/submission_status_component.rb deleted file mode 100644 index eb33b10be..000000000 --- a/app/components/submission_status_component.rb +++ /dev/null @@ -1,29 +0,0 @@ -class SubmissionStatusComponent < ViewComponent::Base - include OntologiesHelper - - def initialize(submission, latest) - @submission = submission - @latest = latest - end - - def submission_version - @submission.version.to_s if @submission.version.present? - end - - def submission_link - if @submission.version.present? - if @submission.ontology.summaryOnly || !@latest - submission_version - else - link_to submission_version, ontology_path(@submission.ontology.acronym) - end - end - end - - def submission_status - return unless @submission.submissionStatus.present? - statuses = submission_status2string(@submission) - end - -end - \ No newline at end of file diff --git a/app/components/submission_status_component/submission_status_component.html.haml b/app/components/submission_status_component/submission_status_component.html.haml deleted file mode 100644 index c45bec11d..000000000 --- a/app/components/submission_status_component/submission_status_component.html.haml +++ /dev/null @@ -1,8 +0,0 @@ -#submission-status{style: "display: -webkit-inline-box"} - - if @submission.version.present? - %p= submission_link - - else - %p unknown - .spacer - - submission_status = status_string(@submission) - = render Display::InfoTooltipComponent.new(text: submission_status, icon: submission_status_icons(submission_status)) \ No newline at end of file diff --git a/app/components/summary_section_component.rb b/app/components/summary_section_component.rb deleted file mode 100644 index 7f87dc123..000000000 --- a/app/components/summary_section_component.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class SummarySectionComponent < ViewComponent::Base - renders_many :action_links - - def initialize(title: , link: nil, link_title: nil, show_card: true, service_link: nil) - super - @title = title - @link = link - @link_title = link_title - @show_card = show_card - @service_link = service_link - end - - def show_card? - @show_card - end - - def show_icon? - !@service_link.nil? - end - -end diff --git a/app/components/summary_section_component/summary_section_component.html.haml b/app/components/summary_section_component/summary_section_component.html.haml deleted file mode 100644 index 1b597f407..000000000 --- a/app/components/summary_section_component/summary_section_component.html.haml +++ /dev/null @@ -1,20 +0,0 @@ -%h2.card_title - %span.mr-2 - = @title - - if @link - %span - = link_to(@link, target: "_blank") do - = render Display::InfoTooltipComponent.new(text: @link_title) - - if show_icon? - = render IconWithTooltipComponent.new(icon: "json.svg",link: @service_link, target: '_blank', title: t("components.go_to_api"), size:'small', style: 'line-height: 0; margin-top: 3px;margin-left: 6px;') - - if action_links? - %span - = render Layout::HorizontalListComponent.new do |l| - - action_links.each { |link| l.element { raw link }} - -- if show_card? - = render Layout::CardComponent.new do - = content -- else - %div - = content \ No newline at end of file diff --git a/app/components/switch_input_component.rb b/app/components/switch_input_component.rb deleted file mode 100644 index 450bfcfca..000000000 --- a/app/components/switch_input_component.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class SwitchInputComponent < ViewComponent::Base - - - def initialize(id:, name: , label: '', value: '', checked: false, boolean_switch: false, style: nil, help: nil) - super - @id = id - @name = name - @label = label - @value = value.nil? || value.empty? ? @name : value - @checked = checked - @boolean_switch = boolean_switch - @style = style - @help = help - end - - def boolean_switch_action - "this.parentElement.previousElementSibling.value = this.parentElement.previousElementSibling.value !== 'true'" if @boolean_switch - end - - def check_box_name - @name unless @boolean_switch - end - - def check_box_id - @boolean_switch ? @id +"_checkbox" :@id - end -end diff --git a/app/components/switch_input_component/switch_input_component.html.haml b/app/components/switch_input_component/switch_input_component.html.haml deleted file mode 100644 index 4cb85767c..000000000 --- a/app/components/switch_input_component/switch_input_component.html.haml +++ /dev/null @@ -1,12 +0,0 @@ -%div.switch-filter - - if content || !@label.empty? - = content_tag(:div, content || @label, style: @style) - - if @boolean_switch - = hidden_field_tag @name, @value - %label.switch{for: check_box_id} - = check_box_tag check_box_name, @value, @checked, class: '', id: check_box_id, onChange: "#{boolean_switch_action}" - %span.slider -- if @help - %div.upload-ontology-desc - = @help - \ No newline at end of file diff --git a/app/components/table_cell_component.rb b/app/components/table_cell_component.rb deleted file mode 100644 index 2e459cb32..000000000 --- a/app/components/table_cell_component.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class TableCellComponent < ViewComponent::Base - - def initialize(width: nil, colspan: nil,type: 'td') - super - @width = width - @type = type - @colspan = colspan - end - - def call - options = {} - options[:width] = @width if @width - options[:colspan] = @colspan if @colspan - content_tag(@type, content&.html_safe, options) - end -end diff --git a/app/components/table_component.rb b/app/components/table_component.rb deleted file mode 100644 index 16bf2c096..000000000 --- a/app/components/table_component.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -class TableComponent < ViewComponent::Base - - renders_one :header, TableRowComponent - renders_many :rows, TableRowComponent - - def initialize(id: '', stripped: true, borderless: false, custom_class: '', layout_fixed: false, - small_text: false, outline: false, sort_column: nil, - paging: false, searching: false, search_placeholder: nil, - no_init_sort: false) - super - @id = id - @stripped = stripped - @borderless = borderless - @layout_fixed = layout_fixed - @small_text = small_text - @outline = outline - @sort_column = sort_column - @searching = searching - @paging = paging - @no_init_sort = no_init_sort - @custom_class =custom_class - @search_placeholder = search_placeholder - end - - def stripped_class - @stripped ? 'table-content-stripped' : '' - end - - def borderless_class - @borderless ? 'table-content-borderless' : '' - end - - def layout_fixed_class - @layout_fixed ? 'table-layout-fixed' : 'table-auto-layout' - end - - def add_row(*array, &block) - self.row.create(*array, &block) - end - - def mini_class - @small_text ? 'table-mini' : '' - end - - def outline_class - @outline ? 'table-outline' : '' - end -end diff --git a/app/components/table_component/table_component.html.haml b/app/components/table_component/table_component.html.haml deleted file mode 100644 index 3bdb112da..000000000 --- a/app/components/table_component/table_component.html.haml +++ /dev/null @@ -1,11 +0,0 @@ -%div{'data-controller': 'table-component', - 'data-table-component-sortcolumn-value': @sort_column, 'data-table-component-paging-value': @paging, - 'data-table-component-searching-value': @searching, 'data-table-component-noinitsort-value': @no_init_sort, - 'data-table-component-search-placeholder-value': @search_placeholder} - %table.table-content{id: @id ,class: @custom_class + ' ' + stripped_class + ' ' + borderless_class + ' ' + layout_fixed_class + ' ' + mini_class + ' ' + outline_class} - %thead - = header - %tbody{id:"#{@id}_table_body"} - - rows.each do |row| - = row - = content diff --git a/app/components/table_component/table_component_controller.js b/app/components/table_component/table_component_controller.js deleted file mode 100644 index 2032bf449..000000000 --- a/app/components/table_component/table_component_controller.js +++ /dev/null @@ -1,32 +0,0 @@ -import {Controller} from "@hotwired/stimulus" -import DataTable from 'datatables.net-dt'; - - -// Connects to data-controller="table-component" -export default class extends Controller { - static values = { - sortcolumn: String, - paging: Boolean, - searching: Boolean, - noinitsort: Boolean, - searchPlaceholder: {type: String, default: 'Filter records'}, - } - connect(){ - const table_component = this.element.querySelector('table') - const default_sort_column = parseInt(this.sortcolumnValue, 10) - - if (this.sortcolumnValue || this.searchingValue || this.pagingValue){ - this.table = new DataTable('#'+table_component.id, { - paging: this.pagingValue, - info: false, - searching: this.searchingValue, - autoWidth: true, - order: this.noinitsortValue ? [] : [[default_sort_column, 'desc']], - language: { - search: '_INPUT_', - searchPlaceholder: this.searchPlaceholderValue - } - }); - } - } -} \ No newline at end of file diff --git a/app/components/table_row_component.rb b/app/components/table_row_component.rb deleted file mode 100644 index 68620a05c..000000000 --- a/app/components/table_row_component.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class TableRowComponent < ViewComponent::Base - - renders_many :cells, TableCellComponent - - def initialize(id: '', class_css: '') - super - @id = id - @class_css = class_css - end - - def create(*array, &block) - array.each do |key_value| - key, value = key_value.to_a.first - self.cell(type: key) { value&.to_s } - end - block.call(self) if block_given? - end - - def th(width: nil, colspan: nil, &block) - self.cell(type: 'th', width: width, colspan: colspan, &block) - end - - def td(width: nil, colspan: nil, &block) - self.cell(type: 'td', width: width, colspan: colspan, &block) - end -end diff --git a/app/components/table_row_component/table_row_component.html.haml b/app/components/table_row_component/table_row_component.html.haml deleted file mode 100644 index c25e45eee..000000000 --- a/app/components/table_row_component/table_row_component.html.haml +++ /dev/null @@ -1,4 +0,0 @@ -%tr{id: @id, class: @class_css} - - cells.each do |cell| - = cell - = content \ No newline at end of file diff --git a/app/components/text_area_field_component.rb b/app/components/text_area_field_component.rb deleted file mode 100644 index c4bccf66a..000000000 --- a/app/components/text_area_field_component.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class TextAreaFieldComponent < ViewComponent::Base - include InternationalisationHelper - - def initialize(value: , see_more_text: t('components.see_more') , see_less_text: t('components.see_less')) - super - @value = value - @see_more_text = see_more_text - @see_less_text = see_less_text - end - -end diff --git a/app/components/text_area_field_component/text_area_field_component.html.haml b/app/components/text_area_field_component/text_area_field_component.html.haml deleted file mode 100644 index 6a58213be..000000000 --- a/app/components/text_area_field_component/text_area_field_component.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -%div{data:{controller:"text-truncate", 'text-truncate-more-text-value': @see_more_text , 'text-truncate-less-text-value': @see_less_text}} - %span.text-content{'data-text-truncate-target': 'content'} - = @value - %span.see_more_text{data:{'text-truncate-target': 'button', 'action':"click->text-truncate#toggle"}} - = @see_more_text \ No newline at end of file diff --git a/app/components/tree_infinite_scroll_component.rb b/app/components/tree_infinite_scroll_component.rb deleted file mode 100644 index 4d751bf17..000000000 --- a/app/components/tree_infinite_scroll_component.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class TreeInfiniteScrollComponent < ViewComponent::Base - - attr_reader :collection - renders_one :error - - def initialize(id:, collection:, next_url:, current_page:, next_page:, auto_click: false) - super - @id = id - @collection = collection - @next_url = next_url - @current_page = current_page - @next_page = next_page - @auto_click = auto_click - end - - def auto_click? - @auto_click - end -end diff --git a/app/components/tree_infinite_scroll_component/tree_infinite_scroll_component.html.haml b/app/components/tree_infinite_scroll_component/tree_infinite_scroll_component.html.haml deleted file mode 100644 index 386fa14dd..000000000 --- a/app/components/tree_infinite_scroll_component/tree_infinite_scroll_component.html.haml +++ /dev/null @@ -1,13 +0,0 @@ -= render InfiniteScrollComponent.new(id: @id, - collection: @collection, - next_url: @next_url, - current_page: @current_page, next_page: @next_page) do |c| - - %div - = render TreeViewComponent.new(id: nil, auto_click: auto_click?) do - = content - - - c.error do - %div.text-wrap - = render Display::AlertComponent.new(type:'info') do - = error \ No newline at end of file diff --git a/app/components/tree_link_component.rb b/app/components/tree_link_component.rb deleted file mode 100644 index 73da902f2..000000000 --- a/app/components/tree_link_component.rb +++ /dev/null @@ -1,78 +0,0 @@ -# frozen_string_literal: true - -class TreeLinkComponent < ViewComponent::Base - include MultiLanguagesHelper, ModalHelper, ApplicationHelper - def initialize(child:, href:, children_href: , selected: false , data: {}, muted: false, target_frame: nil, open_in_modal: false, is_reused: nil) - @child = child - @active_style = selected ? 'active' : '' - #@icons = child.relation_icon(node) - @muted_style = muted ? 'text-muted' : '' - @href = href - @children_link = children_href - label = (@child.prefLabel || @child.label) rescue @child.id - if label.nil? - @pref_label_html = link_last_part(child.id) - else - pref_label_lang, @pref_label_html = select_language_label(label) - pref_label_lang = pref_label_lang.to_s.upcase - @tooltip = pref_label_lang.eql?("@NONE") ? "" : pref_label_lang - - if child.obsolete? - @pref_label_html = "#{@pref_label_html}".html_safe - end - end - @data ||= { controller: 'tooltip', 'tooltip-position-value': 'right', turbo: true, 'turbo-frame': target_frame, action: 'click->simple-tree#select'} - - @data.merge!(data) do |_, old, new| - "#{old} #{new}" - end - - @open_in_modal = open_in_modal - - @is_reused = is_reused - end - - - # This gives a very hacky short code to use to uniquely represent a class - # based on its parent in a tree. Used for unique ids in HTML for the tree view - def short_uuid - rand(36 ** 8).to_s(36) - end - - # TDOD check where used - def child_id - @child.id.to_s.split('/').last - end - - def open? - @child.expanded? ? 'open' : '' - end - - def border_left - !@child.hasChildren ? 'pl-3 tree-border-left' : '' - end - - def li_id - @child.id.eql?('bp_fake_root') ? 'bp_fake_root' : short_uuid - end - - def self.tree_close_icon - "".html_safe - end - - def open_children_link - return unless @child.hasChildren - if @child.expanded? - self.class.tree_close_icon - else - content_tag('turbo_frame', id: "#{child_id}_open_link") do - link_to @children_link, - data: { turbo: true, turbo_frame: "#{child_id + '_childs'}" } do - content_tag(:i, nil, class: "fas fa-chevron-right") - end - end - end - - end - -end diff --git a/app/components/tree_link_component/tree_link_component.html.haml b/app/components/tree_link_component/tree_link_component.html.haml deleted file mode 100644 index 7317e2834..000000000 --- a/app/components/tree_link_component/tree_link_component.html.haml +++ /dev/null @@ -1,15 +0,0 @@ -%li{id:li_id , class: open?} - = open_children_link - - if @open_in_modal - = link_to_modal(@pref_label_html, @href, data: { show_modal_size_value: 'modal-xl' } ) - - else - %a{id: @child.id, data: @data, title: @tooltip, - href: @href, class: "tree-link #{@muted_style} #{@active_style} #{border_left} #{open?}"} - = @pref_label_html - - if @is_reused - .tree-view-reuse-icon - = inline_svg_tag 'icons/reuses.svg' - - if @child.hasChildren && !@child.expanded? - = render TurboFrameComponent.new(id: "#{child_id}_childs") - - elsif @child.expanded? - = content \ No newline at end of file diff --git a/app/components/tree_view_component.rb b/app/components/tree_view_component.rb deleted file mode 100644 index 4570bf8d1..000000000 --- a/app/components/tree_view_component.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -class TreeViewComponent < ViewComponent::Base - include Turbo::FramesHelper - - - renders_many :children, TreeLinkComponent - - def initialize(id:, auto_click: false, sub_tree: false, **html_options) - @id = id - @auto_click = auto_click - @html_options = html_options - @sub_tree = sub_tree - end - - private - - def sub_tree? - @sub_tree - end - - def tree_container(&block) - if sub_tree? - content_tag(:ul, capture(&block), class: 'pl-2 tree-border-left') - else - content_tag(:div, class: 'tree_wrapper hide-if-loading') do - content_tag(:ul, capture(&block), class: 'simpleTree root', data: { controller: 'simple-tree', - 'simple-tree-auto-click-value': "#{auto_click?}", - action: 'clicked->history#updateURL' }) - end - end - end - - def auto_click? - @auto_click.to_s - end - - # TDOD check where used - def child_id(child) - child.id.to_s.split('/').last - end - -end - \ No newline at end of file diff --git a/app/components/tree_view_component/tree_view_component.html.haml b/app/components/tree_view_component/tree_view_component.html.haml deleted file mode 100644 index c8b47d1a4..000000000 --- a/app/components/tree_view_component/tree_view_component.html.haml +++ /dev/null @@ -1,9 +0,0 @@ -%turbo-frame{id: "#{@id}", **@html_options} - = tree_container do - - children.each do |child| - = child - = content - - - - diff --git a/app/components/turbo_modal_component.rb b/app/components/turbo_modal_component.rb deleted file mode 100644 index 3cb4af778..000000000 --- a/app/components/turbo_modal_component.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class TurboModalComponent < ViewComponent::Base - include Turbo::FramesHelper - - def initialize(id: '', title: '', size: 'modal-lg', show: false) - super - @id = id - @title = title - @size = size - @show = show - end - -end diff --git a/app/components/turbo_modal_component/turbo_modal_component.html.haml b/app/components/turbo_modal_component/turbo_modal_component.html.haml deleted file mode 100644 index e5ad17503..000000000 --- a/app/components/turbo_modal_component/turbo_modal_component.html.haml +++ /dev/null @@ -1,12 +0,0 @@ -%div.modal{id: @id, 'data-controller':"turbo-modal", 'data-turbo-modal-show-value': @show.to_s} - %div.modal-dialog{class: @size} - %div.modal-content - %div.modal-header - %h5.modal-title - = @title - %button.close{type:'button', data: { action: "turbo-modal#hide" }} - %span.shape.btn.btn-primary.p-1 × - %div.modal-body - = render TurboFrameComponent.new(id: 'application_modal_content', data: { 'turbo-modal-target': 'content'}) do - = content - diff --git a/app/components/turbo_modal_component/turbo_modal_component_controller.js b/app/components/turbo_modal_component/turbo_modal_component_controller.js deleted file mode 100644 index 2942770ed..000000000 --- a/app/components/turbo_modal_component/turbo_modal_component_controller.js +++ /dev/null @@ -1,31 +0,0 @@ -import ShowModalController from "../../javascript/controllers/show_modal_controller"; - -// Connects to data-controller="turbo-modal" -export default class extends ShowModalController { - - static targets = ["content"] - static values = { - show: Boolean - } - - connect() { - super.connect(); - if (this.showValue) { - this.show() - } - } - - show() { - this.modal.showModal(this.element) - } - - hide() { - this.modal.hideModal(this.element) - if (this.contentTarget) { - this.contentTarget.removeAttribute("src") - this.contentTarget.replaceChildren() - } - } - - -} \ No newline at end of file diff --git a/app/components/url_resolvability_component.rb b/app/components/url_resolvability_component.rb deleted file mode 100644 index adbd7bf5e..000000000 --- a/app/components/url_resolvability_component.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class UrlResolvabilityComponent < ViewComponent::Base - - include OntologiesHelper, CheckResolvabilityHelper - - def initialize(url: '', resolvable: false, supported_formats: [], status: nil) - @resolvable = resolvable - @supported_formats = supported_formats - @status = status - @url = url - end - - def call - text = check_resolvability_message(@resolvable, @supported_formats, @status, url: @url) - if @resolvable && @supported_formats.size > 1 - icon = status_icons(ok: true) - elsif @resolvable - icon = status_icons(warning: true) - else - icon = status_icons(error: true) - end - render Display::InfoTooltipComponent.new(text: text, icon: icon) - end -end diff --git a/app/components/widget_block_component.rb b/app/components/widget_block_component.rb deleted file mode 100644 index 473cc64fa..000000000 --- a/app/components/widget_block_component.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class WidgetBlockComponent < ViewComponent::Base - - renders_one :help_text - renders_one :widget - - def initialize(id: , title: , description:) - @id = id - @title = title - @description = description - end -end diff --git a/app/components/widget_block_component/widget_block_component.html.haml b/app/components/widget_block_component/widget_block_component.html.haml deleted file mode 100644 index ac4927adc..000000000 --- a/app/components/widget_block_component/widget_block_component.html.haml +++ /dev/null @@ -1,26 +0,0 @@ -%div.d-flex{data: {turbo: false}} - %div.w-50.mr-3 - %div - %div.card-body - %h5.card-title - = @title - %p.card-text - = @description - - %div.w-100.d-flex.justify-content-center - %div.card.py-3.px-2{style: "width: 600px"} - = render TabsContainerComponent.new(id: @id) do |t| - - t.item(title: 'Widget', selected: true) - - t.item(title: '') do - %span.mx-1 - See code - = inline_svg_tag('json.svg') - - - t.item_content do - %div.py-3.d-flex.justify-content-center - = widget - - t.item_content do - = help_text - -%hr.divider.w-100 - diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 158822551..f6996b3a2 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -48,17 +48,18 @@ def remove_owl_notation(string) string end - def draw_tree(root, id = nil, type = 'Menu', submission) + + def draw_tree(root, id = nil, type = "Menu") if id.nil? id = root.children.first.id end # TODO: handle tree view for obsolete classes, e.g. 'http://purl.obolibrary.org/obo/GO_0030400' - raw build_tree(root, '', id, submission) # returns a string, representing nested list items + raw build_tree(root, "", id) # returns a string, representing nested list items end - def build_tree(node, string, id, submission) - if node.children.nil? || node.children.empty? - return string + def build_tree(node, string, id) + if node.children.nil? || node.children.length < 1 + return string # unchanged end node.children.sort! { |a, b| (a.prefLabel || a.id).downcase <=> (b.prefLabel || b.id).downcase } for child in node.children @@ -68,41 +69,35 @@ def build_tree(node, string, id, submission) active_style = "" end - node.children.sort! { |a, b| (a.prefLabel || a.id).downcase <=> (b.prefLabel || b.id).downcase } - node.children.each do |child| - active_style = child.id.eql?(id) ? "class='active'" : '' - open = child.expanded? ? "class='open'" : '' - - # This fake root will be present at the root of "flat" ontologies, we need to keep the id intact - li_id = child.id.eql?('bp_fake_root') ? 'bp_fake_root' : short_uuid - - if child.id.eql?("bp_fake_root") - string << tree_link_to_concept(li_id: li_id, child: child, ontology_acronym: '', - active_style: active_style, node: node) - else - string << tree_link_to_concept(li_id: li_id, child: child, ontology_acronym: child.explore.ontology.acronym, - active_style: active_style, node: node) - if child.hasChildren && !child.expanded? - string << tree_link_to_children(li_id: li_id, child: child) - elsif child.expanded? - string << '
    ' - build_tree(child, string, id, submission) - string << '
' - end - string << '' + # This fake root will be present at the root of "flat" ontologies, we need to keep the id intact + li_id = child.id.eql?("bp_fake_root") ? "bp_fake_root" : short_uuid + + if child.id.eql?("bp_fake_root") + string << tree_link_to_concept(li_id: li_id, child: child, ontology_acronym: '', + active_style: active_style) + else + string << tree_link_to_concept(li_id: li_id, child: child, ontology_acronym: child.explore.ontology.acronym, + active_style: active_style) + + if child.hasChildren && !child.expanded? + string << tree_link_to_children(li_id: li_id, child: child) + elsif child.expanded? + string << "
    " + build_tree(child, string, id) + string << "
" end + string << "" end - - string end + + string end - def tree_link_to_concept(li_id:, child:, ontology_acronym:, active_style:, node:) + def tree_link_to_concept(li_id:, child:, ontology_acronym:, active_style:) page_name = ontology_viewer_page_name(ontology_acronym, child.prefLabel, 'Classes') open = child.expanded? ? "class='open'" : '' - icons = child.relation_icon(node) - href = ontology_acronym.blank? ? '#' : "/ontologies/#{child.explore.ontology.acronym}/concepts/?id=#{CGI.escape(child.id)}" - "
  • #{child.prefLabel({ use_html: true })} #{icons}" + href = ontology_acronym.blank? ? '#' : "/ontologies/#{child.explore.ontology.acronym}/concepts/?id=#{CGI.escape(child.id)}" + "
  • #{child.prefLabel({ use_html: true })}" end def tree_link_to_children(li_id:, child:) diff --git a/app/helpers/ontologies_helper.rb b/app/helpers/ontologies_helper.rb index 0acfdf72d..6346d2e73 100644 --- a/app/helpers/ontologies_helper.rb +++ b/app/helpers/ontologies_helper.rb @@ -183,9 +183,13 @@ def sections_to_show end def lazy_load_section(section_title, &block) - render layout: 'ontologies/lazy_load_content', - locals: { current_section: current_section, section_title: section_title }, - &block + if current_section.eql?(section_title) + block.call + else + render TurboFrameComponent.new(id: section_title, src: "/ontologies/#{@ontology.acronym}?p=#{section_title}", + loading: Rails.env.development? ? "lazy" : "eager", + target: '_top', data: { "turbo-frame-target": "frame" }) + end end def language_selector_hidden_tag(section) hidden_field_tag "language_selector_hidden_#{section}", '', @@ -204,15 +208,25 @@ def section_data(section_title) def visits_chart_dataset(visits_data) - [{ - label: 'Visits', - data: visits_data, - backgroundColor: 'rgba(151, 187, 205, 0.2)', - borderColor: 'rgba(151, 187, 205, 1)', - pointBorderColor: 'rgba(151, 187, 205, 1)', - pointBackgroundColor: 'rgba(151, 187, 205, 1)', - }].to_json + visits_chart_dataset_array({'Visits': visits_data}) + end + + def visits_chart_dataset_array(visits_data, fill: true) + visits_data = visits_data.map do |label , x| + { + label: label, + data: x, + borderWidth: 2, + borderRadius: 5, + borderSkipped: false, + cubicInterpolationMode: 'monotone', + tension: 0.4, + fill: fill + } + end + visits_data.to_json end + def change_requests_enabled?(ontology_acronym) return false unless Rails.configuration.change_request[:ontologies].present? diff --git a/app/javascript/application-esbuild.js b/app/javascript/application-esbuild.js deleted file mode 100644 index b8b490239..000000000 --- a/app/javascript/application-esbuild.js +++ /dev/null @@ -1,5 +0,0 @@ -// Entry point for the build script in your package.json -import '@hotwired/turbo-rails' -import './controllers' - -Turbo.session.drive = false \ No newline at end of file diff --git a/app/javascript/component_controllers/index.js b/app/javascript/component_controllers/index.js index eaf1728f0..27e9a6108 100644 --- a/app/javascript/component_controllers/index.js +++ b/app/javascript/component_controllers/index.js @@ -1,45 +1,11 @@ import { application } from '../controllers/application' -import TurboModalController from '../../components/turbo_modal_component/turbo_modal_component_controller' -import FileInputLoaderController - from '../../components/input/file_input_component/file_input_loader_component_controller' - -import RadioChipController from '../../components/input/radio_chip_component/radio_chip_component_controller' - -import Select_input_component_controller - from '../../components/select_input_component/select_input_component_controller' -import Ontology_subscribe_button_component_controller - from '../../components/ontology_subscribe_button_component/ontology_subscribe_button_component_controller' -import Search_input_component_controller - from '../../components/search_input_component/search_input_component_controller' -import CircleProgressBarComponentController - from '../../components/circle_progress_bar_component/circle_progress_bar_component_controller' import Tabs_container_component_controller from '../../components/tabs_container_component/tabs_container_component_controller' import alert_component_controller from '../../components/display/alert_component/alert_component_controller' -import Progress_pages_component_controller - from '../../components/layout/progress_pages_component/progress_pages_component_controller' -import Reveal_component_controller from '../../components/layout/reveal_component/reveal_component_controller' -import Table_component_controller from '../../components/table_component/table_component_controller' -import clipboard_component_controller from '../../components/clipboard_component/clipboard_component_controller' -import range_slider_component_controller from '../../components/input/range_slider_component/range_slider_component_controller' -import RDFHighlighter from '../../components/display/rdf_highlighter_component/rdf_highlighter_component_controller' -application.register("rdf-highlighter", RDFHighlighter) -application.register('turbo-modal', TurboModalController) -application.register('file-input', FileInputLoaderController) -application.register('radio-chip', RadioChipController) -application.register('select-input', Select_input_component_controller) -application.register('subscribe-notes', Ontology_subscribe_button_component_controller) -application.register('search-input', Search_input_component_controller) application.register('tabs-container', Tabs_container_component_controller) -application.register('circle-progress-bar', CircleProgressBarComponentController) application.register('alert-component', alert_component_controller) -application.register('progress-pages', Progress_pages_component_controller) -application.register('reveal-component', Reveal_component_controller) -application.register('table-component', Table_component_controller) -application.register('clipboard', clipboard_component_controller) -application.register('range-slider', range_slider_component_controller) diff --git a/app/javascript/controllers/annotator_controller.js b/app/javascript/controllers/annotator_controller.js deleted file mode 100644 index 349631469..000000000 --- a/app/javascript/controllers/annotator_controller.js +++ /dev/null @@ -1,32 +0,0 @@ -import {Controller} from "@hotwired/stimulus" -export default class extends Controller { - static targets = ['input', 'context'] - connect(){ - this.#display_annotations_contexts() - } - #display_annotations_contexts(){ - let annotation_contexts = this.contextTargets; - let textarea = this.inputTarget - for (var i = 0; i < annotation_contexts.length; i++) { - var context = annotation_contexts[i]; - let from = context.dataset.from - 1 - let to = context.dataset.to - let textBefore = textarea.value.substring(0, from); - if(textBefore.length>0){ - textBefore = '... ' + this.#last_two_words(textBefore) - } - let highlightedText = textarea.value.substring(from, to); - let textAfter = textarea.value.substring(to); - if(textAfter.length>1){ - textAfter = this.#first_three_words(textAfter) + ' ...' - } - context.innerHTML = textBefore + ' ' + highlightedText + ' ' + textAfter; - } - } - #last_two_words(text){ - return text.trim().replace(/[\r\n]+/g, ' ').split(' ').slice(-2).join(' '); - } - #first_three_words(text){ - return text.trim().replace(/[\r\n]+/g, ' ').split(' ').slice(0, 3).join(' ') - } -} \ No newline at end of file diff --git a/app/javascript/controllers/browse_filters_controller.js b/app/javascript/controllers/browse_filters_controller.js deleted file mode 100644 index 74272dc26..000000000 --- a/app/javascript/controllers/browse_filters_controller.js +++ /dev/null @@ -1,73 +0,0 @@ -import {Controller} from "@hotwired/stimulus" -import debounce from "debounce" -// Connects to data-controller="browse-filters" -export default class extends Controller { - - initialize() { - this.dispatchInputEvent = debounce(this.dispatchInputEvent.bind(this), 700); - } - - dispatchInputEvent(event) { - let value - if (event.target instanceof HTMLSelectElement) { - value = Array.from(event.target.selectedOptions).map(x => x.value) - } else { - value = [event.target.value] - } - - this.#dispatchEvent(event.target.name, value) - } - - dispatchFilterEvent(event) { - let checks; - let filter; - - switch (event.target.name) { - case "format": - checks = event.target.value === '' ? [] : [event.target.value] - filter = "format" - break; - case "Sort_by": - checks = [event.target.value] - filter = "sort_by" - break; - case "search": - return - case "views": - checks = event.target.checked ? ['true'] : [] - filter = "show_views" - break; - case "retired": - checks = event.target.checked ? ['true'] : [] - filter = "show_retired" - break; - case "private_only": - checks = event.target.checked ? ['true'] : [] - filter = "private_only" - break; - default: - checks = this.#getSelectedChecks().map(x => x.value) - filter = event.target.name - } - - this.#dispatchEvent(filter, checks) - } - - - #dispatchEvent(filter, checks){ - let data = { - [filter]: checks, - } - const customEvent = new CustomEvent('changed', { - detail: { - data: data - }, bubbles: true - }); - - this.element.dispatchEvent(customEvent); - } - #getSelectedChecks() { - return Array.from(this.element.querySelectorAll('input:checked')) - } - -} diff --git a/app/javascript/controllers/chosen_controller.js b/app/javascript/controllers/chosen_controller.js deleted file mode 100644 index 2115f93e4..000000000 --- a/app/javascript/controllers/chosen_controller.js +++ /dev/null @@ -1,68 +0,0 @@ -import {Controller} from "@hotwired/stimulus" -import {useChosen} from "../mixins/useChosen"; - -// Connects to data-controller="chosen" -export default class extends Controller { - // TODO to update to use TomSelect - static values = { - name: String, - enableColors: {type: Boolean, default: false} - } - - connect() { - useChosen(this.element, {width: '100%', allow_single_deselect: true}, this.#onChange.bind(this)) - } - - #onChange(event) { - const selected = Array.from(event.currentTarget.selectedOptions) - - if(this.enableColorsValue){ - this.#setColors(selected) - } - - const key = this.hasNameValue ? this.nameValue : event.currentTarget.name - const newData = { - [key]: selected.map(x => x.value) - } - this.element.dispatchEvent(new CustomEvent('changed', { - detail: { - data: newData - } - })) - } - - #setColors(selected){ - const snakeCase = string => { - return string.replace(/\W+/g, " ") - .split(/ |\B(?=[A-Z])/) - .map(word => word.toLowerCase()) - .join('_'); - } - const allChosenSelected = Array.from(document.querySelectorAll(`#${snakeCase(this.element.id +'_chosen')} .search-choice`)) - selected.forEach((s) => { - let color = s.dataset.color - if (color) { - const chosenSelected = allChosenSelected.filter(x => x.firstElementChild.textContent === s.text).pop() - const chosenText = chosenSelected.firstElementChild - const chosenClose = chosenSelected.lastElementChild - - chosenSelected.style.display = "flex" - chosenSelected.style.padding = "1px" - chosenSelected.style.paddingTop = "2px" - chosenSelected.style.paddingBottom = "2px" - - - chosenText.style.backgroundColor = color - chosenText.style.display = "inline-block" - chosenText.style.padding = "5px" - chosenText.style.borderRadius = "5px" - chosenText.style.color = "#fff" - chosenText.style.marginLeft = "2px" - chosenText.style.marginRight = "2px" - - chosenClose.style.position = "unset" - chosenClose.style.margin = "auto" - } - }) - } -} diff --git a/app/javascript/controllers/clipboard_controller.js b/app/javascript/controllers/clipboard_controller.js deleted file mode 100644 index 30320b5e3..000000000 --- a/app/javascript/controllers/clipboard_controller.js +++ /dev/null @@ -1,16 +0,0 @@ -import { Controller } from "@hotwired/stimulus" - -// Connects to data-controller="clipboard" -export default class extends Controller { - static targets = ['source', 'copiedIndicator'] - - copy() { - navigator.clipboard.writeText(this.sourceTarget.textContent); - - this.copiedIndicatorTarget.classList.remove('hidden'); - - setTimeout(() => { - this.copiedIndicatorTarget.classList.add('hidden'); - }, 2000); - } -} diff --git a/app/javascript/controllers/concepts_json_button_controller.js b/app/javascript/controllers/concepts_json_button_controller.js deleted file mode 100644 index 01de7199b..000000000 --- a/app/javascript/controllers/concepts_json_button_controller.js +++ /dev/null @@ -1,19 +0,0 @@ -import {Controller} from "@hotwired/stimulus" - -export default class extends Controller { - static targets = ['button'] - - update(){ - setTimeout(() => { - const tabsList = this.element.querySelectorAll('.nav-item'); - const jsonLink = Array.from(tabsList).find(tab => tab.classList.contains('active'))?.querySelector('a').getAttribute('data-json-link'); - const conceptsJsonLink = this.buttonTarget.querySelector('a'); - if (jsonLink) { - conceptsJsonLink.href = jsonLink; - conceptsJsonLink.style.display = 'flex' - } else { - conceptsJsonLink.style.display = 'none' - } - }, 1); - } -} \ No newline at end of file diff --git a/app/javascript/controllers/fair_score_home_controller.js b/app/javascript/controllers/fair_score_home_controller.js deleted file mode 100644 index 8b4883ad9..000000000 --- a/app/javascript/controllers/fair_score_home_controller.js +++ /dev/null @@ -1,21 +0,0 @@ -import { Controller } from "@hotwired/stimulus" -import {FairScorePrincipleBar, FairScoreCriteriaRadar, FairScoreChartContainer} from "../mixins/useFairScore"; -// Connects to data-controller="fair-score-home" -export default class extends Controller { - connect() { - let fairScoreBar = new FairScorePrincipleBar( 'ont-fair-scores-canvas') - let fairScoreRadar = new FairScoreCriteriaRadar( 'ont-fair-criteria-scores-canvas') - let fairContainer = new FairScoreChartContainer('fair-score-charts-container' , [ fairScoreRadar , fairScoreBar]) - let ontologies = jQuery("#ontology_ontologyId"); - - fairContainer.getFairScoreData("all") - ontologies.change( (e) => { - if(ontologies.val() !== null){ - fairContainer.getFairScoreData(ontologies.val().join(',')) - } else if(ontologies.val() === null){ - fairContainer.getFairScoreData("all") - } - e.preventDefault() - }) - } -} diff --git a/app/javascript/controllers/fair_score_landscape_controller.js b/app/javascript/controllers/fair_score_landscape_controller.js deleted file mode 100644 index 95e6c9b8f..000000000 --- a/app/javascript/controllers/fair_score_landscape_controller.js +++ /dev/null @@ -1,26 +0,0 @@ -import { Controller } from "@hotwired/stimulus" -import { FairScoreChartContainer, FairScoreCriteriaBar } from "../mixins/useFairScore"; -// Connects to data-controller="fair-score-landscape" -export default class extends Controller { - connect(){ - let fairCriteriaBars = new FairScoreCriteriaBar('ont-fair-scores-criteria-bars-canvas') - let fairContainer = new FairScoreChartContainer('fair-score-charts-container' , [fairCriteriaBars]) - fairContainer.getFairScoreData("all") - } - - update(event){ - let selected_ontologies = event.target.selectedOptions - let fairCriteriaBars = new FairScoreCriteriaBar('ont-fair-scores-criteria-bars-canvas') - let fairContainer = new FairScoreChartContainer('fair-score-charts-container' , [fairCriteriaBars]) - let ontologies = [] - for(let i=0; i { - useBioportalAutoComplete(this.element, BP_INTERNAL_SEARCH_SERVER + "/search/json_search/", { - extraParams: this.extra_params, - lineSeparator: "~!~", - matchSubset: 0, - mustMatch: true, - sortRestuls: false, - minChars: 3, - maxItemsToShow: 20, - cacheLength: -1, - width: result_width, - onItemSelect: this.onSelect.bind(this), - formatItem: this.formatItem.bind(this) - }) - }) - - let html = ""; - - const inputName = jQuery(this.element).attr('name'); - if (document.getElementById(inputName + "_bioportal_concept_id") == null) - html += ``; - - if (document.getElementById(inputName + "_bioportal_ontology_id") == null) - html += ``; - - if (document.getElementById(inputName + "_bioportal_full_id") == null) - html += ``; - - if (document.getElementById(inputName + "_bioportal_preferred_name") == null) - html += ``; - - jQuery(this.element).after(html); - } - - formatItem(row) { - - const input = this.element; - const specials = /[.*+?|()\[\]{}\\]/g; - const keywords = jQuery(input).val().replace(specials, "\\$&").split(' ').join('|'); - const regex = new RegExp('(' + keywords + ')', 'gi'); - let result = ""; - const ontology_id = this.ontologyIdValue; - let class_name_width = "350px"; - - const BP_include_definitions = this.includeDefinitionValue; - - // Set wider class name column - if (BP_include_definitions) { - class_name_width = "150px"; - } else if (ontology_id === "all") { - class_name_width = "320px"; - } - - // Results - const result_type = row[2]; - const result_class = row[0]; - - // row[7] is the ontology_id, only included when searching multiple ontologies - if (ontology_id !== "all") { - const result_def = row[7]; - - if (BP_include_definitions) { - result += "
    " + this.#truncateText(decodeURIComponent(result_def.replace(/\+/g, " ")), 75) + "
    " - } - - result += "
    " + result_class.replace(regex, "$1") + "
    "; - - result += "
    " + result_type + "
    "; - } else { - // Results - const result_ont = row[7]; - const result_def = row[9]; - - result += "
    " + result_class.replace(regex, "$1") + "
    " - - if (BP_include_definitions) { - result += "
    " + this.#truncateText(decodeURIComponent(result_def.replace(/\+/g, " ")), 75) + "
    " - } - - result += "
    " + "
    " + result_type + "
    " + this.#truncateText(result_ont, 35) + "
    "; - } - return result; - } - - - onSelect(li) { - const input = this.element; - switch (this.targetPropertyValue) { - case "uri": - jQuery(input).val(li.extra[3]) - break; - case "shortid": - jQuery(input).val(li.extra[0]) - break; - case "name": - jQuery(input).val(li.extra[4]) - break; - } - - const input_name = jQuery(input).attr('name') - jQuery(`input[name="${input_name}_bioportal_concept_id"]`).val(li.extra[0]); - jQuery(`input[name="${input_name}_bioportal_ontology_id"]`).val(li.extra[2]); - jQuery(`input[name="${input_name}_bioportal_full_id"]`).val(li.extra[3]); - jQuery(`input[name="${input_name}_bioportal_preferred_name"]`).val(li.extra[4]); - this.#emitOnSelect() - } - - #emitOnSelect() { - this.element.dispatchEvent(new Event('selected')) - } - - - #truncateText(text, max_length) { - if (typeof max_length === 'undefined' || max_length == "") { - max_length = 70; - } - - var more = '...'; - - var content_length = $.trim(text).length; - if (content_length <= max_length) - return text; // bail early if not overlong - - var actual_max_length = max_length - more.length; - var truncated_node = jQuery("
    "); - var full_node = jQuery("
    ").html(text).hide(); - - text = text.replace(/^ /, ''); // node had trailing whitespace. - - var text_short = text.slice(0, max_length); - - // Ensure HTML entities are encoded - // http://debuggable.com/posts/encode-html-entities-with-jquery:480f4dd6-13cc-4ce9-8071-4710cbdd56cb - text_short = $('
    ').text(text_short).html(); - - var other_text = text.slice(max_length, text.length); - - text_short += ""+more+""; - text_short += "" + other_text + ""; - return text_short; - } -} diff --git a/app/javascript/controllers/form_display_controller.js b/app/javascript/controllers/form_display_controller.js deleted file mode 100644 index 4649523fc..000000000 --- a/app/javascript/controllers/form_display_controller.js +++ /dev/null @@ -1,36 +0,0 @@ -import { Controller } from "@hotwired/stimulus" - -// Connects to data-controller="form-options-display" -export default class extends Controller { - - static targets = ['option1', 'option2'] - static values = { - hiddenClass: String - } - - connect() { - this.class = this.hasHiddenClassValue ? this.hiddenClassValue : "hidden" - } - - showOption1(){ - this.#hide(this.option2Targets) - this.#show(this.option1Targets) - } - - showOption2(){ - this.#hide(this.option1Targets) - this.#show(this.option2Targets) - } - - - #show(optionElems){ - optionElems.forEach(x => x.classList.remove(this.class)) - - } - - #hide(optionElems){ - optionElems.forEach(x => x.classList.add(this.class)) - } - - -} diff --git a/app/javascript/controllers/form_url_controller.js b/app/javascript/controllers/form_url_controller.js deleted file mode 100644 index 1e5813a4a..000000000 --- a/app/javascript/controllers/form_url_controller.js +++ /dev/null @@ -1,31 +0,0 @@ -import { Controller } from "@hotwired/stimulus" - - -export default class extends Controller { - - submit(event){ - event.preventDefault(); - let selectedOptions, hiddenInput, optionString, selectElem - let allSelects = this.element.querySelectorAll('select[name$="[]"]'); - for (const select of allSelects) { - const selectElem = select.name.substring(0, select.name.indexOf('[')); - const selectedOptions = select.selectedOptions; - if (selectedOptions.length > 0) { - const optionString = Array.from(selectedOptions, option => option.value).join(","); - const hiddenInput = this.#create_hidden_input_element(optionString, selectElem); - event.currentTarget.appendChild(hiddenInput); - select.remove(); - } - } - - event.currentTarget.submit(); - } - - #create_hidden_input_element(optionString, name){ - let hiddenInput = document.createElement('input'); - hiddenInput.type = 'hidden'; - hiddenInput.name = name; - hiddenInput.value = optionString; - return hiddenInput - } -} diff --git a/app/javascript/controllers/index.js b/app/javascript/controllers/index.js index 804ee3b3a..5598ea18d 100644 --- a/app/javascript/controllers/index.js +++ b/app/javascript/controllers/index.js @@ -4,11 +4,6 @@ import { application } from "./application" -import BrowseFiltersController from "./browse_filters_controller" -application.register("browse-filters", BrowseFiltersController) - -import ChosenController from "./chosen_controller" -application.register("chosen", ChosenController) import ClassSearchAutoCompleteController from "./class_search_auto_complete_controller" application.register("class-search-auto-complete", ClassSearchAutoCompleteController) @@ -16,93 +11,26 @@ application.register("class-search-auto-complete", ClassSearchAutoCompleteContro import ContainerSplitterController from "./container_splitter_controller" application.register("container-splitter", ContainerSplitterController) -import FairScoreHomeController from "./fair_score_home_controller" -application.register("fair-score-home", FairScoreHomeController) - -import FairScoreLandscapeController from "./fair_score_landscape_controller" -application.register("fair-score-landscape", FairScoreLandscapeController) - -import FairScoreSummaryController from "./fair_score_summary_controller" -application.register("fair-score-summary", FairScoreSummaryController) - -import FormAutoCompleteController from "./form_auto_complete_controller" -application.register("form-auto-complete", FormAutoCompleteController) - -import FormDisplayController from "./form_display_controller" -application.register("form-options-display", FormDisplayController) - import HistoryController from "./history_controller" application.register("history", HistoryController) -import LabelAjaxController from "./label_ajax_controller" -application.register("label-ajax", LabelAjaxController) - -import LabelsAjaxContainerController from "./labels_ajax_container_controller" -application.register("labels-ajax-container", LabelsAjaxContainerController) - import LanguageChangeController from "./language_change_controller" application.register("language-change", LanguageChangeController) import LoadChartController from "./load_chart_controller" application.register("load-chart", LoadChartController) -import OntologyRelationsNetworkController from "./ontology_relations_network_controller" -application.register("ontology-relations-network", OntologyRelationsNetworkController) - import OntologyViewerTabsController from "./ontology_viewer_tabs_controller" application.register("ontology-viewer-tabs", OntologyViewerTabsController) import OntoportalAutocompleteController from "./ontoportal_autocomplete_controller" application.register("ontoportal-autocomplete", OntoportalAutocompleteController) -import RecommenderController from "./recommender_controller" -application.register("recommender", RecommenderController) - -import ShowFilterCountController from "./show_filter_count_controller" -application.register("show-filter-count", ShowFilterCountController) - -import ShowModalController from "./show_modal_controller" -application.register("show-modal", ShowModalController) - import SimpleTreeController from "./simple_tree_controller" application.register("simple-tree", SimpleTreeController) -import SkosCollectionColorsController from "./skos_collection_colors_controller" -application.register("skos-collection-colors", SkosCollectionColorsController) - -import SparqlController from "./sparql_controller" -application.register("sparql", SparqlController) - -import TextTruncateController from "./text_truncate_controller" -application.register("text-truncate", TextTruncateController) - -import TooltipController from "./tooltip_controller" -application.register("tooltip", TooltipController) - -import TopnavResponsivenessController from "./topnav_responsiveness_controller" -application.register("topnav-responsiveness", TopnavResponsivenessController) - import TurboFrameController from "./turbo_frame_controller" application.register("turbo-frame", TurboFrameController) import TurboFrameErrorController from "./turbo_frame_error_controller" application.register("turbo-frame-error", TurboFrameErrorController) - -import SampleTextController from "./sample_text_controller" -application.register("sample-text", SampleTextController) - -import AnnotatorController from "./annotator_controller" -application.register('annotator', AnnotatorController) - -import FormUrlController from "./form_url_controller" -application.register('form-url', FormUrlController) - -import OntologiesSelector from "./ontologies_selector_controller" -application.register("ontologies-selector", OntologiesSelector) - - -import MappingsController from "./mappings_visualization_controller" -application.register('mappings', MappingsController) - -import ConceptsJsonButtonController from "./concepts_json_button_controller.js" -application.register('concepts-json', ConceptsJsonButtonController) \ No newline at end of file diff --git a/app/javascript/controllers/label_ajax_controller.js b/app/javascript/controllers/label_ajax_controller.js deleted file mode 100644 index d3cbcfff4..000000000 --- a/app/javascript/controllers/label_ajax_controller.js +++ /dev/null @@ -1,83 +0,0 @@ -import {Controller} from "@hotwired/stimulus" -import useAjax from "../mixins/useAjax"; - -// Connects to data-controller="label-ajax" -export default class extends Controller { - static values = { - clsId: String, - ontologyAcronym: String, - ajaxUrl: String, - clsIdUrl: String, - } - - connect() { - setTimeout(() => { - this.linkA = jQuery(this.element); - - if (this.linkA.hasClass('ajax-modified-cls')) { - return true - } - - this.cls_id = this.clsIdValue; - this.ont_acronym = this.ontologyAcronymValue; - - let ajax_uri = new URL(this.ajaxUrlValue, document.location.origin) - - ajax_uri.searchParams.set('ontology', this.ont_acronym) - ajax_uri.searchParams.set('id', this.cls_id) - - - this.request = useAjax({ - url: ajax_uri.pathname + ajax_uri.search, - timeout: ajax_process_timeout * 1000, - success: this.#ajaxSuccess.bind(this), - error: this.#ajaxError.bind(this) - }); - },1) - } - - abort() { - if (this.request) { - this.request.abort() - this.request = null - } - } - - disconnect() { - this.abort() - } - - #ajaxSuccess(data) { - data = data.trim(); - if (typeof data !== "undefined" && data.length > 0 && data.indexOf("http") !== 0) { - let cls_name = data - let cls_uri = this.clsIdUrlValue - this.linkA.html(cls_name); - this.linkA.attr('href', cls_uri); - this.linkA.addClass('ajax-modified-cls'); - //find and process any identical classes (low probability) - this.#fillIdenticalIds(cls_name, cls_uri) - } else { - // remove the unique_id separator and the ontology acronym from the href - this.linkA.attr('href', this.cls_id); // it may not be an ontology class, don't use the cls_uri - this.linkA.addClass('ajax-modified-cls'); - } - } - - #ajaxError() { - this.linkA.addClass('ajax-error') - } - - #fillIdenticalIds(cls_name, cls_uri) { - - let unique_id = this.linkA.attr('href'); - jQuery('a[href="' + unique_id + '"]').each(function () { - let link = jQuery(this); - if (!link.hasClass('ajax-modified-cls')) { - link.html(cls_name); - link.attr('href', cls_uri); - link.addClass('ajax-modified-cls') - } - }); - } -} diff --git a/app/javascript/controllers/labels_ajax_container_controller.js b/app/javascript/controllers/labels_ajax_container_controller.js deleted file mode 100644 index a8f606114..000000000 --- a/app/javascript/controllers/labels_ajax_container_controller.js +++ /dev/null @@ -1,10 +0,0 @@ -import {Controller} from "@hotwired/stimulus" - -// Connects to data-controller="labels-ajax-container" -export default class extends Controller { - static outlets = ['label-ajax'] - - abortAll() { - this.labelAjaxOutlets.forEach((link) => {link.abort()}) - } -} diff --git a/app/javascript/controllers/mappings_visualization_controller.js b/app/javascript/controllers/mappings_visualization_controller.js deleted file mode 100644 index 58d74cc60..000000000 --- a/app/javascript/controllers/mappings_visualization_controller.js +++ /dev/null @@ -1,259 +0,0 @@ -import { Controller } from '@hotwired/stimulus' -import { useMappingsDrawBubbles } from '../mixins/useMappingsBubbles' - -export default class extends Controller { - - static values = { - mappingsList: Object, - zoomRatio: { type: Number, default: 1 }, - acronym: String, - containerId: { type: String, default: 'mappings-bubbles-view' } - } - - static targets = ['frame', 'bubbles', 'submit', 'modal', 'selector', 'ontologies', 'loader'] - - connect () { - - this.drawBubbles = (mappingsList) => { - const zoomRatio = this.zoomRatioValue - const width = 600 * zoomRatio - const height = 600 * zoomRatio - const margin = 1 - const logScaleFactor = 10 - const normalization_ratio = this.#normalizationRatio(mappingsList) - - const data = Object.entries(mappingsList).map(([key, value]) => ({ - ontology_name: key.split('/').pop(), - ontology_mappings: value, - })) - this.bubblesTarget.innerHTML = '' - useMappingsDrawBubbles(data, width, height, margin, this.bubblesTarget, normalization_ratio, logScaleFactor) - - this.#centerScroll(this.frameTarget) - } - - this.drawBubbles(this.mappingsListValue) - - if (this.#selectionDisabled()) { - this.#clickOnSelectedAcronymBubble() - } - - } - - filterOntologies () { - const selectOptions = Array.from(this.ontologiesTarget.querySelector('select').selectedOptions) - const acronyms = selectOptions.map(option => option.value) - - const filteredList = Object.fromEntries( - Object.entries(this.mappingsListValue).filter(([key]) => acronyms.includes(key)) - ) - - this.drawBubbles(filteredList) - } - - submit (event) { - const itemElement = event.currentTarget.querySelector('.item') - if (!itemElement) return - - this.submitTarget.click() - - const selectAcronym = event.currentTarget.querySelector('select').value - - const bubblesContainer = document.getElementById(this.containerIdValue) - const selectedBubble = bubblesContainer.querySelector('[data-selected="true"]') - const currentBubble = bubblesContainer.querySelector(`[data-acronym="${selectAcronym}"]`) - - if (selectedBubble && selectedBubble.dataset.acronym === selectAcronym) return - - const clickEvent = new MouseEvent('click', { bubbles: true, cancelable: true, view: window }) - - if (currentBubble && (currentBubble.getAttribute('data-enabled') === 'false' || currentBubble.getAttribute('data-highlighted') === 'true')) { - selectedBubble.dispatchEvent(clickEvent) - } - - if (currentBubble) currentBubble.dispatchEvent(clickEvent) - } - - zoomIn () { - this.zoomRatioValue++ - this.drawBubbles(this.mappingsListValue) - } - - zoomOut () { - if (this.zoomRatioValue > 1) { - this.zoomRatioValue-- - this.drawBubbles(this.mappingsListValue) - } - } - - selectBubble (event) { - const selected_bubble = event.currentTarget - - if (selected_bubble.getAttribute('data-enabled') === 'false') { - // user clicks on a bubble that is disabled (has no mappings with the current bubble) do nothing - return - } - - this.#toggleAnimation() - - if (selected_bubble.getAttribute('data-highlighted') === 'true') { - // user clicks on a bubble that have mapping with the current highlighted bubble, should show a modal with the mappings - this.#showMappingsModal(selected_bubble) - this.#toggleAnimation() - } else if (selected_bubble.getAttribute('data-selected') === 'true') { - // user clicks on current bubble (should deselect it, but nothing happen if we're in ontology mappings section not the page) - this.#unSelectBubble(selected_bubble) - this.#toggleAnimation() - } else { - this.#selectBubble(selected_bubble) - } - } - - #selectBubble (selected_bubble) { - - const acronym = selected_bubble.getAttribute('data-acronym') - let url = '/mappings/count/' + acronym - selected_bubble.setAttribute('data-selected', 'true') - - if (this.#selectionEnabled()) { - const input = this.selectorTarget.querySelector('input') - input.value = acronym - input.dispatchEvent(new Event('input', { bubbles: true })) - - const selectValue = Array.from(this.selectorTarget.querySelectorAll('.option')) - .find(option => option.getAttribute('data-value') === acronym) - - if (selectValue) selectValue.click() - } - - this.#fetchMappingsDataAndSetBubblesColor(url) - } - - #unSelectBubble (selected_bubble) { - - if (this.#selectionDisabled()) return - - selected_bubble.setAttribute('data-selected', 'false') - - const selected_circle = selected_bubble.querySelector('circle') - selected_circle.style.fill = 'var(--primary-color)' - - const leafs = this.bubblesTarget.querySelectorAll('.leaf') - leafs.forEach(leaf => { - const circle = leaf.querySelector('circle') - circle.style.fill = 'var(--primary-color)' - circle.style.opacity = '1' - leaf.setAttribute('data-enabled', 'true') - leaf.setAttribute('data-highlighted', 'false') - }) - } - - #showMappingsModal (selected_bubble) { - const selected_leaf = this.bubblesTarget.querySelector('[data-selected="true"]') - const acronym = selected_leaf.getAttribute('data-acronym') - const target_acronym = selected_bubble.getAttribute('data-acronym') - this.modalTarget.querySelector('a').href = `/mappings/show_mappings?id=${acronym}&target=${target_acronym}` - this.modalTarget.querySelector('a').click() - } - - #fetchMappingsDataAndSetBubblesColor (url) { - fetch(url, { - method: 'GET', - headers: { - 'Accept': 'application/json' - }, - }) - .then(response => { - if (!response.ok) { - throw new Error('Network response was not ok') - } - return response.json() - }) - .then(data => { - const mappings_list = data.map(item => ({ - acronym: item.target_ontology.acronym, - count: item.count - })) - - this.#setBubblesColors(mappings_list) - - this.#toggleAnimation() - }) - .catch(error => { - console.error('Error fetching or processing data:', error) - // Handle errors here - }) - } - - #setBubblesColors (mappings_list) { - const bubblesContainer = this.bubblesTarget - const leafs = bubblesContainer.querySelectorAll('.leaf') - const max_mappings_count = mappings_list.reduce((max, item) => Math.max(max, item.count), -Infinity) - - leafs.forEach(leaf => { - const circle = leaf.querySelector('circle') - const acronym = leaf.getAttribute('data-acronym') - - const matchingMapping = mappings_list.find(item => item.acronym === acronym) - - if (matchingMapping) { - leaf.setAttribute('data-highlighted', 'true') - circle.style.fill = 'var(--primary-color)' - - const opacity = (matchingMapping.count / max_mappings_count + Math.log(matchingMapping.count + 1)) / 10 + 0.3 - circle.style.opacity = `${opacity}` - } else { - leaf.setAttribute('data-enabled', 'false') - circle.style.fill = 'var(--light-color)' - } - }) - - const selected_leaf = bubblesContainer.querySelector('[data-selected="true"]') - selected_leaf.setAttribute('data-enabled', 'true') - - const selected_circle = selected_leaf.querySelector('circle') - selected_circle.style.fill = 'var(--secondary-color)' - } - - - - #centerScroll (frame) { - frame.scrollTop = frame.scrollHeight / 2 - frame.clientHeight / 2 - frame.scrollLeft = frame.scrollWidth / 2 - frame.clientWidth / 2 - } - - #normalizationRatio (ontologies_hash) { // try to find the biggest multiple of 10 inferior to the max mappings value - const maxValue = Math.max(...Object.values(ontologies_hash)) - let normalization_ratio = 1 - while (maxValue / normalization_ratio > 10) { - normalization_ratio *= 10 - } - return normalization_ratio - } - - #toggleAnimation () { - this.loaderTarget.classList.toggle('d-none') - this.bubblesTarget.classList.toggle('d-none') - } - - #selectionEnabled () { - return !this.hasAcronymValue - } - - #selectionDisabled () { - return !this.#selectionEnabled() - } - - #clickOnSelectedAcronymBubble () { - setTimeout(() => { - const currentBubble = this.bubblesTarget.querySelector(`[data-acronym="${this.acronymValue}"]`) - let clickEvent = new MouseEvent('click', { - bubbles: true, - cancelable: true, - view: window - }) - currentBubble.dispatchEvent(clickEvent) - }, 100) - - } -} \ No newline at end of file diff --git a/app/javascript/controllers/ontologies_selector_controller.js b/app/javascript/controllers/ontologies_selector_controller.js deleted file mode 100644 index 32ebd13d5..000000000 --- a/app/javascript/controllers/ontologies_selector_controller.js +++ /dev/null @@ -1,72 +0,0 @@ -import {Controller} from "@hotwired/stimulus" - -export default class extends Controller { - static targets = ['submit', 'ontology', 'table', 'exit'] - static values = { - id: String, - selectAll: String, - unselectAll: String - } - input(){ - this.submitTarget.click() - } - change(event){ - this.submitTarget.click() - this.#updateTableNumbers(event) - } - selectall(event) { - const selectText = `\n${this.selectAllValue}\n`; - const unselectText = `\n${this.unselectAllValue}\n`; - const isChecked = event.target.innerHTML === unselectText; - const newInnerHTML = isChecked ? selectText : unselectText; - for (const target of this.ontologyTargets) { - target.querySelector('input').checked = !isChecked; - } - event.target.innerHTML = newInnerHTML; - } - apply() { - const select = document.getElementById(`select_${this.idValue}`); - const tsControl = document.getElementById(`select_${this.idValue}-ts-control`); - const values = this.#selectedOntologies(this.ontologyTargets); - for (const value of values) { - tsControl.value = value; - tsControl.dispatchEvent(new Event('input', { bubbles: true })); - select.parentNode.querySelector(`div[data-value="${value}"]`).click(); - } - this.exitTarget.click(); - } - clear() { - const selectedItems = document.getElementById(`select_${this.idValue}`).parentNode.querySelectorAll('a'); - selectedItems.forEach(item => { - item.click(); - }); - } - - #selectedOntologies(ontologies) { - return ontologies - .filter(ontology => ontology.querySelector('input').checked) - .map(ontology => ontology.querySelector('input').name); - } - - #updateTableNumbers() { - const navItems = Array.from(this.tableTarget.querySelectorAll('.nav-item')); - navItems.forEach(item => this.#updateNavItemCount(item)); - } - - #updateNavItemCount(navItem) { - const tabPane = this.tableTarget.querySelector(`.tab-pane${navItem.getAttribute('data-target')}`); - const inputs = tabPane.querySelectorAll('input'); - const count = Array.from(inputs).filter(input => input.checked).length; - const itemTitleElement = navItem.querySelector('a'); - let itemTitle = itemTitleElement.innerHTML.trim(); - const regex = /\(\d+\)/; - if (itemTitle.endsWith(")")) { - itemTitleElement.innerHTML = itemTitle.replace(regex, `(${count})`); - } else { - itemTitleElement.innerHTML = `${itemTitle} (${count})`; - } - if (count === 0) { - itemTitleElement.innerHTML = itemTitle.replace(regex, '').trim(); - } - } -} \ No newline at end of file diff --git a/app/javascript/controllers/ontology_relations_network_controller.js b/app/javascript/controllers/ontology_relations_network_controller.js deleted file mode 100644 index 75ea02909..000000000 --- a/app/javascript/controllers/ontology_relations_network_controller.js +++ /dev/null @@ -1,189 +0,0 @@ -import {Controller} from "@hotwired/stimulus" -import { Network, DataSet } from 'vis-network/standalone/esm/vis-network.min.js'; - -// Connects to data-controller="ontology-relations-network" -export default class extends Controller { - static values = { - data: Array - } - - static targets = ["container"] - - connect() { - this.build() - } - - - build(){ - this.#buildNetwork(this.dataValue); - } - /** - * Build the VIS network for ontologies relations: http://visjs.org/docs/network/ - * @param ontologyRelationsArray - */ - #buildNetwork(ontologyRelationsArray) { - const nodes = new DataSet([]) - // create an array with edges - const edges = new DataSet(); - - let propertyCount = 1; // To define nodes IDs - - // Hash with nodes id for each ontology URI - let nodeIds = {}; - - /* Get the relations that have been selected - if (jQuery("#selected_relations").val() !== null) { - selected_relations = jQuery("#selected_relations").val() - }*/ - - let selected_relations = []; - this.relationCheckTargets = Array.from(this.element.querySelectorAll('option')) - this.relationCheckTargets.forEach((elem) => { - if (elem.selected) { - selected_relations.push(elem.value); - } - }) - - ontologyRelationsArray.forEach((relation) => { - let targetNodeNumber - let sourceNodeNumber - - // If relations have been selected for filtering then we don't show others relations - if (!selected_relations.includes(relation["relation"])) { - return - } - - // Don't create a new node if node exist already, just add a new edge - if ( nodeIds[relation["source"]] != null) { - sourceNodeNumber = nodeIds[relation["source"]]; - } else { - sourceNodeNumber = propertyCount; - // If the node is the source it means it is from the Portal, so we colorate it in green - nodes.add([ - {id: sourceNodeNumber, label: relation["source"], color: "#5cb85c"} - ]); - nodeIds[relation["source"]] = propertyCount; - propertyCount++; - } - - // Create the target node if don't exist - if (nodeIds[relation["target"]] != null) { - targetNodeNumber = nodeIds[relation["target"]]; - } else { - targetNodeNumber = propertyCount; - // If target node is an ontology from the portal then node in green - if (relation["targetInPortal"]) { - nodes.add([ - {id: targetNodeNumber, label: relation["target"], color: "#5cb85c"} - ]); - } else { - nodes.add([ - {id: targetNodeNumber, label: relation["target"]} - ]); - } - nodeIds[relation["target"]] = propertyCount; - propertyCount++; - } - - edges.add([ - { - from: sourceNodeNumber, - to: targetNodeNumber, - label: relation["relation"], - font: {align: 'horizontal'} - } - ]); - }) - - - - // create a network - const container = this.containerTarget; - // provide the data in the vis format - - const data = { - nodes: nodes, - edges: edges - }; - - // Get height of div - const networkHeight = container.clientHeight.toString(); - - const options = { - autoResize: true, - groups: { - useDefaultGroups: true, - myGroupId: { - /*node options*/ - } - }, - edges: { - color: {inherit: 'both'}, - smooth: { - enabled: true, - type: "dynamic", - roundness: 0.5 - } - }, - nodes: { - shape: "box" - }, - physics: { - // http://visjs.org/docs/network/physics.html - enabled: true, - // To stabilize faster, increase the minVelocity value - minVelocity: 1, - stabilization: { - enabled: true, - onlyDynamicEdges: false, - fit: true - }, - barnesHut: { - gravitationalConstant: -1500, - centralGravity: 0, - springLength: 300, - springConstant: 0.01, - damping: 0.2, - avoidOverlap: 0.2 - }, - hierarchicalRepulsion: { // not used at the moment - centralGravity: 0.0, - springLength: 500, - springConstant: 0.2, - damping: 1, - nodeDistance: 170 - }, - solver: 'barnesHut' - }, - interaction: { - zoomView: false, - navigationButtons: true - } - }; - - // initialize your network! - const network = new Network(container, data, options); - network.fit(); - // Add a button click event listener - var fullscreenButton = document.getElementById('fullscreen-button'); - fullscreenButton.addEventListener('click', function () { - toggleFullScreen(container); - }); - - // Function to toggle full screen mode - function toggleFullScreen(element) { - var networkContainer = document.getElementById('networkContainer'); - - // check to existance of element - if (networkContainer) { - var parentElement = networkContainer.parentNode; - - // add style background: - parentElement.style.backgroundColor = 'white'; - } - networkContainer.parentNode.classList.toggle('active-fullscreen'); - networkContainer.style.height = "100%"; - networkContainer.style.width = "100%"; - } - } -} diff --git a/app/javascript/controllers/recommender_controller.js b/app/javascript/controllers/recommender_controller.js deleted file mode 100644 index e753a7ace..000000000 --- a/app/javascript/controllers/recommender_controller.js +++ /dev/null @@ -1,60 +0,0 @@ -import { Controller } from "@hotwired/stimulus" - -// Connects to data-controller="recommender" -export default class extends Controller { - static targets = ['button', 'input', 'result', 'maxset', 'empty', 'ontologieschoice'] - - connect(){ - if(document.querySelector('input[name="highlighted_recommendation"]:checked') !== null){ - this.handleHighlightedChange() - } - - let ontologies_choice = this.ontologieschoiceTarget.childNodes[1].childNodes[1] - if(!ontologies_choice.checked){ - this.togglesets() - } - } - edit(event){ - this.#toggle(this.buttonTarget) - this.#toggle(event.currentTarget) - this.#toggle(this.inputTarget) - this.#toggle(this.resultTarget) - } - togglesets(){ - this.#toggle(this.maxsetTarget) - this.#toggle(this.emptyTarget) - } - - handleHighlightedChange(){ - let recommandations_area = this.resultTarget - let jsonString = document.querySelector('input[name="highlighted_recommendation"]:checked').value; - let jsonStringModified = jsonString.replace(/:text/g, '"text"').replace(/:link/g, '"link"').replace(/=>/g, ':'); - let jsonArray = JSON.parse(jsonStringModified); - var words = recommandations_area.textContent.split(/\s+/); - for (var i = 0; i < words.length; i++) { - var word = words[i].replace(/[.,\/#!$%\^&\*;:{}=\-_`~()]/g, '').toLowerCase(); // Remove punctuation and convert to lowercase - var foundItem = jsonArray.find(item => item.text.toLowerCase() === word); - - if (foundItem) { - // Replace the word with tag - words[i] = '' + words[i] + ''; - } - } - recommandations_area.innerHTML = words.join(' '); - } - - handleInput(event){ - var selectedInputChoice = document.querySelector('input[name="input_type"]:checked').value; - if (selectedInputChoice === "2"){ - const textarea = event.currentTarget - const value = textarea.value; - const lastCharIsSpace = event.data === ' '; - const formattedValue = lastCharIsSpace ? value.trim() + ', ' : value; - textarea.value = formattedValue; - } - } - - #toggle(element){ - element.classList.toggle('d-none') - } -} diff --git a/app/javascript/controllers/sample_text_controller.js b/app/javascript/controllers/sample_text_controller.js deleted file mode 100644 index dd6f96711..000000000 --- a/app/javascript/controllers/sample_text_controller.js +++ /dev/null @@ -1,10 +0,0 @@ -import {Controller} from "@hotwired/stimulus" - -// Connects to data-controller="sample-text" -export default class extends Controller { - static targets = ['input'] - annotator_recommender(event){ - let button = event.target.closest("[data-sample-text]"); - this.inputTarget.value = button.dataset.sampleText - } -} \ No newline at end of file diff --git a/app/javascript/controllers/show_filter_count_controller.js b/app/javascript/controllers/show_filter_count_controller.js deleted file mode 100644 index 21b3d7250..000000000 --- a/app/javascript/controllers/show_filter_count_controller.js +++ /dev/null @@ -1,17 +0,0 @@ -import {Controller} from "@hotwired/stimulus" - -// Connects to data-controller="show-filter-count" - -export default class extends Controller { - static targets = ["countSpan"] - - updateCount() { - const checkInputs = this.element.querySelectorAll('input:checked') - this.element.querySelectorAll('turbo-frame').forEach(x => { - x.setAttribute('busy', 'true') - }) - const count = checkInputs.length - this.countSpanTarget.style.display = count === 0 ? "none" : "inline-block" - this.countSpanTarget.innerHTML = count === 0 ? "" : count - } -} diff --git a/app/javascript/controllers/show_modal_controller.js b/app/javascript/controllers/show_modal_controller.js deleted file mode 100644 index f539869d8..000000000 --- a/app/javascript/controllers/show_modal_controller.js +++ /dev/null @@ -1,66 +0,0 @@ -import {Controller} from "@hotwired/stimulus" -import {UseModal} from "../mixins/useModal"; - -// Connects to data-controller="show-modal" -export default class extends Controller { - static values = { - targetModal: {type: String, default: '#application_modal'}, - title: String, - size: String, - } - - - connect() { - this.modal = new UseModal() - this.boundHide = this.hide.bind(this) - this.modal.onClose(this.element, this.boundHide) - } - - disconnect() { - this.modal.onCloseRemoveEvent(this.element, this.boundHide) - } - - show() { - this.setTitle() - this.setSize() - let target = this.targetModalElement - if (target) { - this.modal.showModal(target) - } - } - - hide() { - let target = this.targetModalElement - if (target) { - this.modal.hideModal(target) - } - - } - - get targetModalElement() { - return document.querySelector(this.targetModalValue) - } - - get modalTitle() { - return document.querySelector(`${this.targetModalValue} .modal-title`) - } - - setTitle() { - let titleElem = this.modalTitle - if(titleElem){ - titleElem.innerHTML = this.titleValue - } - } - - setSize() { - const target = this.targetModalElement - const newSize = this.sizeValue - if (target && newSize){ - const modalContainer = target.firstElementChild - const classes = modalContainer.classList - const oldSize = classes.item(classes.length - 1) - modalContainer.classList.remove(oldSize) - modalContainer.classList.add(newSize) - } - } -} diff --git a/app/javascript/controllers/simple_tree_controller.js b/app/javascript/controllers/simple_tree_controller.js index 858bfde2c..d178b3bb3 100644 --- a/app/javascript/controllers/simple_tree_controller.js +++ b/app/javascript/controllers/simple_tree_controller.js @@ -1,63 +1,57 @@ -import { Controller } from '@hotwired/stimulus' -// Connects to data-controller="simple-tree" -export default class extends Controller { - - static values = { - autoClick: { type: Boolean, default: false } - } - - connect () { - setTimeout(() => { - let activeElem = this.element.querySelector('.tree-link.active'); - if (activeElem) { - activeElem.scrollIntoView({ block: 'center' }); - window.scrollTo({top: 0,}); - if (this.autoClickValue) { - activeElem.click(); - } - } - this.#onClickTooManyChildrenInit(); - }, 0); - } +import {Controller} from "@hotwired/stimulus" +import {useSimpleTree} from "../mixins/useSimpleTree"; - select (event) { - this.element.querySelector('a.active')?.classList.toggle('active') - event.currentTarget.classList.toggle('active') - this.#afterClick(event.currentTarget) - } +export default class extends Controller { + connect() { + this.simpleTreeCollection = useSimpleTree(this.element, + this.#afterClick.bind(this), + this.#afterAjaxError.bind(this), + this.#beforeAjax.bind(this) + ) - toggleChildren (event) { - event.preventDefault() - event.target.classList.toggle('fa-chevron-right') - event.target.classList.toggle('fa-chevron-down') - event.target.nextElementSibling.nextElementSibling.classList.toggle('hidden') + this.#onClickTooManyChildrenInit() } - #onClickTooManyChildrenInit () { - jQuery('.too_many_children_override').live('click', (event) => { - event.preventDefault() - let result = jQuery(event.target).closest('ul') - result.html('') + #onClickTooManyChildrenInit(){ + jQuery(".too_many_children_override").live('click', (event) => { + event.preventDefault(); + let result = jQuery(event.target).closest("ul"); + result.html(""); jQuery.ajax({ url: jQuery(event.target).attr('href'), context: result, success: function (data) { - this.html(data) - this.simpleTreeCollection.get(0).setTreeNodes(this) + this.html(data); + this.simpleTreeCollection.get(0).setTreeNodes(this); }, error: function () { - this.html('
    Problem getting children. Try again
    ') + this.html("
    Problem getting children. Try again
    "); } - }) - }) + }); + }); + } + + #afterClick(node) { + const page_name = $(node.context).attr("data-bp-ont-page-name") + const conf = jQuery(document).data().bp.ont_viewer + const concept_id = jQuery(node).children("a").attr("id") + History.pushState({ + p: "classes", + conceptid: concept_id + }, page_name + " | " + conf.org_site, + '?p=classes&conceptid=' + concept_id) + } + + #afterAjaxError(node) { + this.simpleTreeCollection[0].option.animate = false; + this.simpleTreeCollection.get(0).nodeToggle(node.parent()[0]); + if (node.parent().children(".expansion_error").length === 0) { + node.parent().append("Error, please try again"); + } + this.simpleTreeCollection[0].option.animate = true; } - #afterClick (node) { - this.element.dispatchEvent(new CustomEvent('clicked', { - detail: { - node: node, - data: { ...node.dataset } - }, bubbles: true - })) + #beforeAjax(node) { + node.parent().children(".expansion_error").remove(); } -} +} \ No newline at end of file diff --git a/app/javascript/controllers/skos_collection_colors_controller.js b/app/javascript/controllers/skos_collection_colors_controller.js deleted file mode 100644 index 58baddf4d..000000000 --- a/app/javascript/controllers/skos_collection_colors_controller.js +++ /dev/null @@ -1,91 +0,0 @@ -import { Controller } from '@hotwired/stimulus' - -// Connects to data-controller="skos-collection-colors" -export default class extends Controller { - - static values = { - collectionsColorSelectTarget: String - } - static targets = ['collection'] - - connect () { - this.allCollections = this.#collectionsChoices() - this.selected = [] - } - - updateCollectionTags (event) { - this.selected = Object.entries(event.detail.data)[0][1] - this.collectionTargets.forEach((collectionElem) => { - this.#updateColorsTags(collectionElem) - }) - } - - #updateColorsTags (collectionElem) { - let collections = this.#getElemCollections(collectionElem) - let activeCollections = this.#getMatchedCollections(collectionElem, collections, this.selected) - - this.#removeColors(collectionElem) - this.#addColorsTags(collectionElem, this.#getCollectionColors(activeCollections)) - } - - collectionTargetConnected (collectionElem) { - - if (this.selected.length > 0) { - this.#updateColorsTags(collectionElem) - } - } - - #removeColors (collectionElem) { - const childList = collectionElem.children - if (childList && childList.length > 0) { - collectionElem.removeChild(collectionElem.lastElementChild) - } - } - - #collectionsChoices () { - const options = document.getElementById(this.collectionsColorSelectTargetValue) - const out = {} - if (options) { - Array.from(options.options).forEach(s => { - if (s.value !== '') { - out[s.value] = s.dataset.color - } - }) - } - return out - } - - #getMatchedCollections (elem, collections, selected) { - collections = [...new Set(collections.concat(this.#getElemActiveCollections(elem)))] - return selected.filter(c => collections.includes(c)) - } - - #getCollectionColors (collectionsIds) { - return Object.entries(this.allCollections).filter(([key]) => collectionsIds.includes(key)).map(x => x[1]) - } - - #getElemCollections (elem) { - return JSON.parse(elem.dataset.collectionsValue) - } - - #getElemActiveCollections (elem) { - return JSON.parse(elem.dataset.activeCollectionsValue) - } - - #addColorsTags (elem, colors) { - const colorsContainer = document.createElement('span') - colors.forEach(c => this.#elemAddColorTag(colorsContainer, c)) - elem.appendChild(colorsContainer) - } - - #elemAddColorTag (elem, color) { - const span = document.createElement('span') - span.style.backgroundColor = color - span.style.height = '10px' - span.style.width = '10px' - span.style.borderRadius = '50%' - span.style.display = 'inline-block' - span.className += 'mx-1' - elem.appendChild(span) - } -} diff --git a/app/javascript/controllers/sparql_controller.js b/app/javascript/controllers/sparql_controller.js deleted file mode 100644 index 11a6879b2..000000000 --- a/app/javascript/controllers/sparql_controller.js +++ /dev/null @@ -1,31 +0,0 @@ -import { Controller } from '@hotwired/stimulus' -import { getYasgui } from '../mixins/useYasgui' - -// Connects to data-controller="sparql" -export default class extends Controller { - static values = { - proxy: String, - username: String, - apikey: String, - graph: String, - } - connect () { - localStorage.removeItem('yagui__config'); - this.yasgui = getYasgui(this.element, - { - corsProxy: this.proxyValue, - copyEndpointOnNewTab: true, - requestConfig: { - endpoint: this.#proxyUrl(), - acceptHeaderGraph: false, - acceptHeaderUpdate: false, - namedGraphs: [this.graphValue], - } - }) - - } - - #proxyUrl(){ - return `${this.proxyValue}?apikey=${this.apikeyValue}&username=${this.usernameValue}` - } -} diff --git a/app/javascript/controllers/text_truncate_controller.js b/app/javascript/controllers/text_truncate_controller.js deleted file mode 100644 index b3c235e83..000000000 --- a/app/javascript/controllers/text_truncate_controller.js +++ /dev/null @@ -1,21 +0,0 @@ -import ReadMore from "stimulus-read-more"; - -// Connects to data-controller="text-truncate" -export default class extends ReadMore { - static targets = ['button'] - - connect() { - super.connect() - if (!this.#isTextClamped()) { - this.#hideButton() - } - } - - #isTextClamped() { - return this.contentTarget.scrollHeight > this.contentTarget.clientHeight - } - - #hideButton() { - this.buttonTarget.style.display = 'none' - } -} diff --git a/app/javascript/controllers/tooltip_controller.js b/app/javascript/controllers/tooltip_controller.js deleted file mode 100644 index 60fd3d7e9..000000000 --- a/app/javascript/controllers/tooltip_controller.js +++ /dev/null @@ -1,19 +0,0 @@ -import {Controller} from "@hotwired/stimulus" -import useTooltip from "../mixins/useTooltip"; - -// Connects to data-controller="tooltip" -export default class extends Controller { - - static values = { - position: {type: String, default: 'top'}, - interactive: {type: Boolean, default: false} - } - - connect() { - if (this.element.title && this.element.title !== '') { - useTooltip(this.element, {interactive: this.interactiveValue, placement: this.positionValue}) - } - - } - -} diff --git a/app/javascript/controllers/topnav_responsiveness_controller.js b/app/javascript/controllers/topnav_responsiveness_controller.js deleted file mode 100644 index 218919ff8..000000000 --- a/app/javascript/controllers/topnav_responsiveness_controller.js +++ /dev/null @@ -1,22 +0,0 @@ -import { Controller } from "@hotwired/stimulus" - -// Connects to data-controller="topnav-responsiveness" -export default class extends Controller { - static targets = ['navMenu'] - - connect() { - let checkbox = this.navMenuTarget - let divs = document.querySelectorAll('.top-nav, .top-nav-ul, .nav-items, .nav-ul-li, .nav-input, .nav-a, .nav-language, .supportMenuDropdownLink'); - checkbox.addEventListener('change', function() { - if (this.checked) { - divs.forEach(function(div) { - div.classList.add('show-responsive'); - }); - } else { - divs.forEach(function(div) { - div.classList.remove('show-responsive'); - }); - } - }); - } -} diff --git a/app/javascript/mixins/cookie.js b/app/javascript/mixins/cookie.js deleted file mode 100644 index 5e2b5bf0d..000000000 --- a/app/javascript/mixins/cookie.js +++ /dev/null @@ -1,8 +0,0 @@ -export const getCookie = (name) => { - const cookieValue = document.cookie.match('(^|[^;]+)\\s*' + name + '\\s*=\\s*([^;]+)'); - return cookieValue ? cookieValue.pop() : ''; -} - -export const setCookie = (name, value, days) => { - document.cookie = `${name}=${value};max-age=${days * 24 * 60 * 60}`; -} \ No newline at end of file diff --git a/app/javascript/mixins/useChosen.js b/app/javascript/mixins/useChosen.js deleted file mode 100644 index 5f2c6c541..000000000 --- a/app/javascript/mixins/useChosen.js +++ /dev/null @@ -1,8 +0,0 @@ -export function useChosen(element, params, onChange = null) { - const chosen = $(element).chosen(params) - if(onChange){ - chosen.change(onChange) - } - - return chosen; -} \ No newline at end of file diff --git a/app/javascript/mixins/useFairScore.js b/app/javascript/mixins/useFairScore.js deleted file mode 100644 index 02b12f95b..000000000 --- a/app/javascript/mixins/useFairScore.js +++ /dev/null @@ -1,631 +0,0 @@ -function round(val , base = 1){ - return Math.floor( val * 100 * base) / 100 -} - -function getObtainedNotObtainedNA(scoresIn, portalMax , max , normalize = true){ - const delimiter = (val) => (normalize ? val : 1) - const notObtained = portalMax.map((x,i) => { - return round((x - scoresIn[i]) / delimiter(max[i]) ,(normalize ? 100 : 1)) - }) - const na = max.map((x,i) => { - return round((x - portalMax[i]) / delimiter(max[i]), (normalize ? 100 : 1)) - }) - - const scores = scoresIn.map((x, i ) => { - return round(x / delimiter(max[i]), (normalize ? 100 : 1)) - }) - return {scores , notObtained , na} -} - -function printScore(score, normalizedScore){ - return score +" "+'('+normalizedScore+"%)" -} - - -class FairScoreChartContainer{ - constructor(fairChartsContainerId , charts) { - this.fairChartsContainer = jQuery("#"+fairChartsContainerId) - this.fairAverageScoreSpan = jQuery("#fair-score-average") - this.fairMinScoreSpan = jQuery("#fair-score-min") - - this.fairMaxScoreSpan = jQuery("#fair-score-max") - - - this.fairMedianScoreSpan = jQuery("#fair-score-median") - - - this.requestLink = jQuery("#fairness-service-url") - this.requestHrefBase = (this.requestLink != null ?this.requestLink.attr("href") : "") - - this.fairSpinner = jQuery("
    ") - this.fairMsgErr = jQuery("
    We could not collect the data from the fairness service
    ") - this.fairMsgErr.hide() - this.fairChartsContainer.before(this.fairSpinner) - this.fairChartsContainer.before(this.fairMsgErr) - this.charts = charts - } - - - ajaxCall(ontologies){ - return new Promise( (resolve ,reject) => { - $.get( "/ajax/fair_score/json/?ontologies="+ontologies, (data) => { - if(data) { - resolve(data) - }else { - reject("error") - } - }).fail(function(err) { - reject("error") - }) - }) - } - getFairScoreData(ontologies) { - if(this.fairChartsContainer){ - this.hideMsgError() - this.showLoader(); - this.#updateLink(ontologies) - this.ajaxCall(ontologies).then(data => { - this.hideLoader() - this.charts.forEach( x => x.setFairScoreData(data)) - this.#fillScoreSpans(data) - }).catch(err => { - this.hideLoader() - this.showMsgError() - }) - } - - - } - - showMsgError(){ - this.fairChartsContainer.hide() - this.fairMsgErr.show() - } - - hideMsgError(){ - this.fairMsgErr.hide() - this.fairChartsContainer.show() - } - showLoader(){ - this.fairChartsContainer.hide() - this.fairSpinner.show() - } - hideLoader(){ - this.fairSpinner.hide() - this.fairChartsContainer.show() - } - - #updateLink(ontologies){ - if(this.requestLink){ - this.requestLink.attr("href" , this.requestHrefBase + "&ontologies=" + ontologies - + (ontologies==="all" || ontologies.includes(",") ? "&combined": "")) - - } - } - #fillScoreSpans(data){ - - if(this.fairAverageScoreSpan){ - this.fairAverageScoreSpan.html(printScore(data.score,data.normalizedScore)) - } - - if(data.resourceCount > 1){ - this.#showScoreLabel(this.fairMinScoreSpan, data.minScore, data.maxCredits) - this.#showScoreLabel(this.fairMaxScoreSpan, data.maxScore, data.maxCredits) - this.#showScoreLabel(this.fairMedianScoreSpan, data.medianScore, data.maxCredits) - - }else { - this.#hideScoreLabel((this.fairMinScoreSpan)) - this.#hideScoreLabel((this.fairMaxScoreSpan)) - this.#hideScoreLabel((this.fairMedianScoreSpan)) - } - - - } - - #showScoreLabel(elem, score , maxCredits){ - if(elem){ - elem.parent().parent().show() - elem.html(printScore(score,round(score/maxCredits , 100))) - } - - } - - #hideScoreLabel(elem){ - if(elem) - elem.parent().parent().hide() - } -} - -class FairScoreChart{ - constructor(fairCanvasId , dataField) { - this.dataField = dataField - this.fairScoreChartCanvas = jQuery("#"+fairCanvasId) - this.chart= null - } - - setFairScoreData(data){ - if(this.fairScoreChartCanvas){ - Object.entries(data[this.dataField]).forEach( ([key, value]) => this.fairScoreChartCanvas.data(key , value)) - this.fairScoreChartCanvas.data("resourceCount" , data["resourceCount"]) - if(this.chart === null) - this.chart = this.initChart() - else { - this.chart.data.datasets = this.getFairScoreDataSet() - this.chart.update() - } - } - - } - - getFairScoreDataSet(){ - return [] - } - - initChart(){ - return new Chart(this.fairScoreChartCanvas , {}) - } - -} - -class FairScorePrincipleBar extends FairScoreChart{ - - constructor(fairCanvasId) { - super(fairCanvasId , 'principles'); - } - initChart() { - const labels = this.fairScoreChartCanvas.data('labels') - const data = { - labels: labels, - datasets: this.getFairScoreDataSet() - }; - const config = { - type: 'horizontalBar', - data: data, - options: { - title: { - display: false, - text: 'FAIRness Scores' - }, - elements: { - bar: { - borderWidth: 2, - } - }, - indexAxis: 'y', - legend: { - display: true - }, - scales: { - xAxes: [{ - stacked: true, - ticks: { - beginAtZero: true - } - }], - yAxes: [{ - stacked: true, - ticks: { - beginAtZero: true - } - }] - }, - tooltips: { - callbacks: { - label: function (tooltipItem, data) { - let score =jQuery(this._chart.canvas).data("scores")[tooltipItem.index] - let maxScore =jQuery(this._chart.canvas).data("maxCredits")[tooltipItem.index] - let portalMaxScore =jQuery(this._chart.canvas).data("portalMaxCredits")[tooltipItem.index] - - let normalizedScore = data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index] - let na = maxScore - portalMaxScore - let notObtained = portalMaxScore - score - return printScore([score, notObtained, na][tooltipItem.datasetIndex], normalizedScore) - }, - - } - } - } - } - - return new Chart(this.fairScoreChartCanvas, config); - } - getFairScoreDataSet(){ - const maxCredits = this.fairScoreChartCanvas.data('maxCredits') - const portalMaxCredits = this.fairScoreChartCanvas.data('portalMaxCredits') - const {scores, notObtained , na } = getObtainedNotObtainedNA( this.fairScoreChartCanvas.data('scores') , portalMaxCredits , maxCredits ) - return [ - { - label: 'Obtained score', - data: scores, - fill: true, - backgroundColor: 'rgba(102, 187, 106, 0.2)', - borderColor: 'rgba(102, 187, 106, 1)', - pointBorderColor: 'rgba(102, 187, 106, 1)', - pointBackgroundColor: 'rgba(102, 187, 106, 1)' - }, - { - label: 'Not obtained score', - data: notObtained, - fill: true, - backgroundColor: 'rgba(251, 192, 45, 0.2)', - borderColor: 'rgba(251, 192, 45, 1)', - pointBorderColor: 'rgba(251, 192, 45, 1)', - pointBackgroundColor: 'rgba(251, 192, 45, 1)' - }, - { - label: 'Not yet supported', - data: na, - fill: true, - backgroundColor: 'rgba(176, 190, 197, 0.2)', - borderColor: 'rgba(176, 190, 197, 1)', - pointBorderColor: 'rgba(176, 190, 197, 1)', - pointBackgroundColor: 'rgba(176, 190, 197, 1)' - } - ] - } -} - -class FairScoreCriteriaRadar extends FairScoreChart{ - - constructor(fairCanvasId) { - super( fairCanvasId , 'criteria'); - } - - customTooltips(){ - return function (tooltipModel) { - // Tooltip Element - let tooltipEl = document.getElementById('chartjs-tooltip'); - let canvas = jQuery(this._chart.canvas) - let descriptions = canvas.data("descriptions") - // Create element on first render - if (!tooltipEl) { - tooltipEl = document.createElement('div'); - tooltipEl.id = 'chartjs-tooltip'; - tooltipEl.innerHTML = '
    '; - document.body.appendChild(tooltipEl); - } - - // Hide if no tooltip - if (tooltipModel.opacity === 0) { - tooltipEl.style.opacity = 0; - return; - } - - // Set caret Position - tooltipEl.classList.remove('above', 'below', 'no-transform'); - if (tooltipModel.yAlign) { - tooltipEl.classList.add(tooltipModel.yAlign); - } else { - tooltipEl.classList.add('no-transform'); - } - - function getBody(bodyItem) { - return bodyItem.lines; - } - // Set Text - if (tooltipModel.body) { - let titleLines = tooltipModel.title || []; - let bodyLines = tooltipModel.body.map(getBody); - - let innerHtml = ''; - - titleLines.forEach(function(title ,index) { - innerHtml += '' + title + ' : '+ descriptions[tooltipModel.dataPoints[0].index] + ''; - }); - innerHtml += ''; - - bodyLines.forEach(function(body, i) { - let colors = tooltipModel.labelColors[i]; - let style = 'background:' + colors.backgroundColor; - style += '; border-color:' + colors.borderColor; - style += '; border-width: 2px;'; - style += '; font-size: 12px;'; - innerHtml += '' + body + ''; - }); - innerHtml += ''; - - let tableRoot = tooltipEl.querySelector('table'); - tableRoot.innerHTML = innerHtml; - } - - // `this` will be the overall tooltip - let position = this._chart.canvas.getBoundingClientRect(); - - // Display, position, and set styles for font - tooltipEl.style.background = 'rgba(0, 0, 0, 0.7)'; - tooltipEl.style.borderRadius = '3px'; - tooltipEl.style.color = 'white'; - tooltipEl.style.opacity = 1; - tooltipEl.style.position = 'absolute'; - tooltipEl.style.left = position.left + window.pageXOffset + tooltipModel.caretX + 'px'; - tooltipEl.style.top = position.top + window.pageYOffset + tooltipModel.caretY + 'px'; - tooltipEl.style.fontFamily = tooltipModel._bodyFontFamily; - tooltipEl.style.fontSize = tooltipModel.bodyFontSize + 'px'; - tooltipEl.style.fontStyle = tooltipModel._bodyFontStyle; - tooltipEl.style.padding = tooltipModel.yPadding + 'px ' + tooltipModel.xPadding + 'px'; - tooltipEl.style.pointerEvents = 'none'; - } - } - - initChart() { - const labels = this.fairScoreChartCanvas.data('labels') - - const data = { - labels: labels, - datasets: this.getFairScoreDataSet() - }; - const config = { - type: 'radar', - data: data, - options: { - title: { - display: false, - text: 'FAIRness Wheel' - }, - legend: { - display: false - }, - elements: { - line: { - borderWidth: 3 - } - }, - tooltips: { - enabled: false, - custom: this.customTooltips(), - callbacks: { - label: function (tooltipItem, data) { - let scores =jQuery(this._chart.canvas).data("scores") - let normalizedScore = data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index] - let score = scores[tooltipItem.index] - return printScore(score, normalizedScore) - }, - - } - } - } - } - - return new Chart(this.fairScoreChartCanvas, config); - } - - getFairScoreDataSet() { - const scores = this.fairScoreChartCanvas.data('normalizedScores') - return [ - { - label: 'Fair score', - data: scores, - fill: true, - backgroundColor: 'rgba(151, 187, 205, 0.2)', - borderColor: 'rgba(151, 187, 205, 1)', - pointBorderColor: 'rgba(151, 187, 205, 1)', - pointBackgroundColor: 'rgba(151, 187, 205, 1)' - } - ] - } - - - -} -class FairScoreCriteriaBar extends FairScoreChart{ - constructor(fairCanvasId) { - super(fairCanvasId , 'criteria'); - this.questions = [] - } - customTooltips(){ - return function (tooltipModel) { - let tooltipContainer = document.getElementById('chartjs-tooltip-container') - // Tooltip Element - let tooltipEl = document.getElementById('chartjs-tooltip') - let canvas = jQuery(this._chart.canvas) - let questions = canvas.data("questions") - let descriptions = canvas.data("descriptions") - let resourceCount = canvas.data("resourceCount") - - // Create element on first render - if (!tooltipEl) { - tooltipEl = document.createElement('div'); - tooltipEl.id = 'chartjs-tooltip'; - tooltipEl.innerHTML = '
    '; - tooltipContainer.appendChild(tooltipEl); - } - - // Hide if no tooltip - if (tooltipModel.opacity === 0) { - tooltipEl.style.opacity = 1; - return; - } - - // Set caret Position - tooltipEl.classList.remove('above', 'below', 'no-transform'); - if (tooltipModel.yAlign) { - tooltipEl.classList.add(tooltipModel.yAlign); - } else { - tooltipEl.classList.add('no-transform'); - } - - function getBody(bodyItem) { - return bodyItem.lines; - } - - // Set Text - if (tooltipModel.body) { - let titleLines = tooltipModel.title || []; - let bodyLines = tooltipModel.body.map(getBody); - - let innerHtml = '
    '; - - titleLines.forEach(function(title ,index) { - innerHtml += '
    ' + title + ' : '+ descriptions[tooltipModel.dataPoints[0].index] + '
    '; - }); - - innerHtml += "
    " - bodyLines.forEach(function(body, i) { - let colors = tooltipModel.labelColors[i]; - let style = 'background:' + colors.backgroundColor; - style += '; border-color:' + colors.borderColor; - style += '; border-width: 2px'; - style += '; width: 100%'; - innerHtml += '' + body + ''; - }); - - innerHtml+='
      ' - - - for (const [key, value] of Object.entries(questions[tooltipModel.dataPoints[0].index])) { - let count = (value.state ? (value.state.success + value.state.average) : (value.score === value.maxCredits ? 1: 0) ) - innerHtml+=`
    • - ${printScore(count,round((count / resourceCount) * 100))} - responded successfully to: ${key}: - "${value.question}"
    • ` - } - innerHtml += '
    '; - - let tableRoot = tooltipEl.querySelector('div'); - tableRoot.innerHTML = innerHtml; - } - - // `this` will be the overall tooltip - let position = this._chart.canvas.getBoundingClientRect() - let topOffset = tooltipModel.caretY - (tooltipEl.clientHeight / 2) - - - if (topOffset <= 0) - topOffset = 0 - else if( (topOffset + tooltipEl.clientHeight) >= position.height) - topOffset = position.height - tooltipEl.clientHeight - - // Display, position, and set styles for font - tooltipEl.style.opacity = 1; - tooltipEl.style.position = 'absolute'; - tooltipEl.style.top = topOffset +'px'; - //tooltipEl.style.fontFamily = tooltipModel._bodyFontFamily; - tooltipEl.style.fontSize = tooltipModel.bodyFontSize + 'px'; - tooltipEl.style.fontStyle = tooltipModel._bodyFontStyle; - tooltipEl.style.padding = tooltipModel.yPadding + 'px ' + tooltipModel.xPadding + 'px'; - tooltipEl.style.pointerEvents = 'none'; - } - } - initChart() { - const labels = this.fairScoreChartCanvas.data('labels') - const data = { - labels: labels, - datasets: this.getFairScoreDataSet() - }; - const config = { - type: 'horizontalBar', - data: data, - options: { - title: { - display: false, - text: 'FAIRness Scores' - }, - elements: { - bar: { - borderWidth: 2, - } - }, - indexAxis: 'y', - legend: { - display: true - }, - scales: { - xAxes: [{ - stacked: true, - ticks: { - beginAtZero: true, - - } - }], - yAxes: [{ - stacked: true, - ticks: { - beginAtZero: true, - - } - }] - }, - tooltips: { - enabled: false, - mode: 'index', - position: 'nearest', - intersect: false, - custom: this.customTooltips(), - callbacks: { - label: function (tooltipItem, data) { - const canvas = jQuery(this._chart.canvas) - const max = canvas.data('maxCredits') - const scores = canvas.data('scores') - const portalMax = canvas.data("portalMaxCredits") - - const label = data.datasets[tooltipItem.datasetIndex].label - const score = data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index] - const normalizedScore =Object.values(getObtainedNotObtainedNA(scores ,portalMax , max , false))[tooltipItem.datasetIndex][tooltipItem.index] - - return label +': '+ printScore(score, normalizedScore) - - } - } - } - - } - } - - return new Chart(this.fairScoreChartCanvas, config); - } - getFairScoreDataSet(){ - const maxCredits = this.fairScoreChartCanvas.data('maxCredits') - const portalMaxCredits = this.fairScoreChartCanvas.data('portalMaxCredits') - const {scores , notObtained , na } = getObtainedNotObtainedNA(this.fairScoreChartCanvas.data('scores'), portalMaxCredits ,maxCredits , true) - return [ - { - label: 'Obtained score', - data: scores , - fill: true, - backgroundColor: 'rgba(102, 187, 106, 0.2)', - borderColor: 'rgba(102, 187, 106, 1)', - pointBorderColor: 'rgba(102, 187, 106, 1)', - pointBackgroundColor: 'rgba(102, 187, 106, 1)' - }, - { - label: 'Not obtained score', - data: notObtained, - fill: true, - backgroundColor: 'rgba(251, 192, 45, 0.2)', - borderColor: 'rgba(251, 192, 45, 1)', - pointBorderColor: 'rgba(251, 192, 45, 1)', - pointBackgroundColor: 'rgba(251, 192, 45, 1)', - }, - { - label: 'Not yet supported', - data: na, - fill: true, - backgroundColor: 'rgba(176, 190, 197, 0.2)', - borderColor: 'rgba(176, 190, 197, 1)', - pointBorderColor: 'rgba(176, 190, 197, 1)', - pointBackgroundColor: 'rgba(176, 190, 197, 1)' - } - ] - } - setFairScoreData(data) { - super.setFairScoreData(data); - if(this.chart){ - this.showFirstToolTip() - } - } - - showFirstToolTip(){ - let meta = this.chart.getDatasetMeta(0), - rect = this.chart.canvas.getBoundingClientRect(), - point = meta.data[0].getCenterPoint(), - evt = new MouseEvent('mousemove', { - clientX: rect.left + point.x, - clientY: rect.top + point.y - }), - node = this.chart.canvas; - node.dispatchEvent(evt); - } -} - -export {round, getObtainedNotObtainedNA, FairScoreChartContainer, FairScoreChart, FairScorePrincipleBar, FairScoreCriteriaRadar, FairScoreCriteriaBar} - diff --git a/app/javascript/mixins/useHighLight.js b/app/javascript/mixins/useHighLight.js deleted file mode 100644 index 7b34116f7..000000000 --- a/app/javascript/mixins/useHighLight.js +++ /dev/null @@ -1,88 +0,0 @@ -import hljs from 'highlight.js/lib/core' -import xml from 'highlight.js/lib/languages/xml' -import json from 'highlight.js/lib/languages/json' - -class HighLighter { - constructor (highlighter, format) { - switch (format) { - case 'xml': - highlighter.registerLanguage('xml', xml) - break - case 'json': - highlighter.registerLanguage('json', json) - break - case 'triples': - case 'ntriples': - highlighter.registerLanguage('ntriples', function (hljs) { - return { - case_insensitive: true, - contains: [ - { - className: 'subject', - begin: /^<[^>]+>/, - }, - { - className: 'predicate', - begin: /<[^>]+>/, - }, - { - className: 'object', - begin: /\s([^\s]+)\s\./, - }, - hljs.COMMENT('^#', '$') - ] - } - }) - break - case 'turtle': - highlighter.registerLanguage('turtle', function (hljs) { - let URL_PATTERN = /(?:<[^>]*>)|(?:https?:\/\/[^\s]+)/ - - return { - case_insensitive: true, - contains: [ - { - className: 'custom-prefixes', - begin: '@prefix', - relevance: 10 - }, - { - className: 'meta', - begin: /@base/, - end: /[\r\n]|$/, - relevance: 10 - }, - { - className: 'variable', - begin: /\?[\w\d]+/ - }, - { - className: 'custom-symbol', - begin: /@?[A-Za-z_][A-Za-z0-9_]*(?= *:)/, - relevance: 10 - }, - { - className: 'custom-concepts', - begin: /:\s*(\w+)/, - relevance: 10 - }, - { - className: 'string', - begin: URL_PATTERN - } - ] - } - }) - break - } - this.highlighter = highlighter - } - - highlight (text, format) { - return this.highlighter.highlight(text, { language: format }).value - } -} - -export function useHighLighter (format) { - return new HighLighter(hljs, format) -} \ No newline at end of file diff --git a/app/javascript/mixins/useMappingsBubbles.js b/app/javascript/mixins/useMappingsBubbles.js deleted file mode 100644 index 60c5a3683..000000000 --- a/app/javascript/mixins/useMappingsBubbles.js +++ /dev/null @@ -1,110 +0,0 @@ -import * as d3 from 'd3' - -class BubbleData { - constructor(ontology_name, ontology_mappings) { - this.ontology_name = ontology_name; - this.ontology_mappings = ontology_mappings; - } -} - -/** - * Draws bubbles using D3.js based on the provided data. - * @param {Array} data - The array of BubbleData objects containing ontology names and mappings. - * @param {number} width - The width of the SVG container. - * @param {number} height - The height of the SVG container. - * @param {number} margin - The margin for the SVG container. - * @param {HTMLElement} bubblesTarget - The target HTML element to append the SVG container to. - * @param {number} normalization_ratio - The normalization ratio for bubble size calculation. - * @param {number} logScaleFactor - The logarithmic scale factor for bubble size calculation. - */ - -export function useMappingsDrawBubbles(data, width, height, margin, bubblesTarget, normalization_ratio, logScaleFactor) { - // Define pack layout - const pack = d3.pack() - .size([width - margin, height - margin]) - .padding(3); - - // Create hierarchy and sum for bubble sizes - const root = d3.hierarchy({ children: data }) - .sum(d => calculateBubbleSize(d)); - - // Create SVG container - const svg = d3.select(`#${bubblesTarget.id}`) - .append('svg') - .attr('width', width) - .attr('height', height) - .append('g') - .attr('transform', `translate(${margin}, ${margin})`) - - // Create nodes and bind data - const node = svg.selectAll('.node') - .data(pack(root).descendants().slice(1)) // Exclude the root node - .enter().append('g') - .attr('class', d => d.children ? 'node mappings-bubble' : 'leaf mappings-bubble') - .attr('transform', d => `translate(${d.x},${d.y})`) - .attr('data-action', 'click->mappings#selectBubble') - .attr('data-acronym', d => d.data.ontology_name) - .attr('data-enabled', d => 'true'); - - // Create circles - const circle = node.append('circle') - .attr('r', d => d.r) - .style('fill', 'var(--primary-color)'); - - // Display ontology names and mappings - const textOntology = node.append('text') - .attr('dy', '.35em') - .style('text-anchor', 'middle') - .style('font-size', '16px') - .style('fill', 'white') - .style('font-weight', '600') - .text(d => displayOntologyName(d)); - - const textMappings = node.append('text') - .attr('dy', '1.5em') - .style('text-anchor', 'middle') - .style('font-size', '12px') - .style('fill', 'white') - .text(d => displayMappings(d)); - - // Show tooltips on hover - circle.on('mouseover', (event, d) => showTooltip(event, d)) - .on('mouseout', () => hideTooltip()); - - // Function to calculate bubble size - function calculateBubbleSize(d) { - return d.ontology_mappings / normalization_ratio + Math.log(d.ontology_mappings + 1) / logScaleFactor; - } - - // Function to display ontology name - function displayOntologyName(d) { - return (d.r > d.data.ontology_name.length * 5 && d.r > 20) ? d.data.ontology_name : ''; - } - - // Function to display mappings count - function displayMappings(d) { - return (d.r > d.data.ontology_name.length * 5 && d.r > 20) ? d.data.ontology_mappings : ''; - } - - // Function to show tooltip - function showTooltip(event, d) { - if (!(d.r > d.data.ontology_name.length * 5 && d.r > 20)) { - // Remove existing tooltip - d3.selectAll('.bubble-tooltip').remove(); - - // Calculate tooltip position based on mouse coordinates - const tooltip = d3.select('body') - .append('div') - .attr('class', 'bubble-tooltip') - .style('left', `${event.pageX + 10}px`) // Adjust position relative to mouse pointer - .style('top', `${event.pageY + 10}px`) // Adjust position relative to mouse pointer - .html(`${d.data.ontology_name}
    ${d.data.ontology_mappings}`); - } - } - - // Function to hide tooltip - function hideTooltip() { - // Remove tooltip on mouseout - d3.selectAll('.bubble-tooltip').remove(); - } -} diff --git a/app/javascript/mixins/useModal.js b/app/javascript/mixins/useModal.js deleted file mode 100644 index 2a5c34239..000000000 --- a/app/javascript/mixins/useModal.js +++ /dev/null @@ -1,18 +0,0 @@ -export class UseModal { - - showModal(element) { - $(element).modal('show') - } - - hideModal(element) { - $(element).modal('hide') - } - - onClose(element, callback) { - return $(element).on('hidden.bs.modal', callback) - } - onCloseRemoveEvent(element, callback){ - return element.removeEventListener('hidden.bs.modal', callback) - } -} - diff --git a/app/javascript/mixins/useTomSelect.js b/app/javascript/mixins/useTomSelect.js deleted file mode 100644 index 7b4923d02..000000000 --- a/app/javascript/mixins/useTomSelect.js +++ /dev/null @@ -1,9 +0,0 @@ -import TomSelect from "tom-select" - -export function useTomSelect(element, params, onChange = null) { - const tom = new TomSelect(element,params) - if(onChange){ - tom.on('change',onChange) - } - return tom; -} \ No newline at end of file diff --git a/app/javascript/mixins/useTooltip.js b/app/javascript/mixins/useTooltip.js deleted file mode 100644 index 805978000..000000000 --- a/app/javascript/mixins/useTooltip.js +++ /dev/null @@ -1,13 +0,0 @@ -import tippy from 'tippy.js'; - -export default function useTooltip(elem, params) { - const content = elem.title - elem.removeAttribute('title') - tippy(elem, { - theme: 'light-border', - animation: 'fade', - content: content, - allowHTML: true, - maxWidth: '400', ...params - }) -} \ No newline at end of file diff --git a/app/javascript/mixins/useYasgui.js b/app/javascript/mixins/useYasgui.js deleted file mode 100644 index e13188157..000000000 --- a/app/javascript/mixins/useYasgui.js +++ /dev/null @@ -1,6 +0,0 @@ -import Yasgui from "@triply/yasgui"; - -export const getYasgui = (elem, config) => { - return new Yasgui(elem, config) -} - diff --git a/app/views/concepts/_child_nodes.html.haml b/app/views/concepts/_child_nodes.html.haml index 5479ebcfd..7a2e76c50 100644 --- a/app/views/concepts/_child_nodes.html.haml +++ b/app/views/concepts/_child_nodes.html.haml @@ -1,6 +1,6 @@ - output ="" - for child in @children - - output << tree_link_to_concept(li_id: short_uuid, child: child, ontology_acronym: child.explore.ontology.acronym, active_style: '', node: @concept) + - output << tree_link_to_concept(li_id: short_uuid, child: child, ontology_acronym: child.explore.ontology.acronym, active_style: '') - if child.hasChildren - output << tree_link_to_children(li_id: short_uuid, child: child) - output << "
  • " diff --git a/app/views/concepts/_show.html.haml b/app/views/concepts/_show.html.haml index 2419a1633..f6b67d557 100644 --- a/app/views/concepts/_show.html.haml +++ b/app/views/concepts/_show.html.haml @@ -1,50 +1,39 @@ -= turbo_frame_tag 'concept_show' do - %div.hide-if-loading.fade.show - / When we have an ontology with a flat hierarchy, we initially disable the tabs because we don't have a class to display - - if @concept.id.eql?("bp_fake_root") - %div{:style => "padding: 100px 0; font-size: larger; font-weight: bold; text-align: center;"} - Use the "Jump To" to find a class and display details, visualization, notes, and mappings - - else - .cls-info-container - - %ul.nav.nav-tabs.tabs - %li#details_top.nav-item - %a.nav-link.active.py-1{:href => "#details" , data:{toggle: 'tab', target: '#details_content'}} Details - %li#visualization_top.nav-item - %a.nav-link.py-1{:href => "#visualization", data:{toggle: 'tab', target: '#visualization_content'}} Visualization - %li#notes_top.nav-item - %a.nav-link.py-1{:href => "#notes", data:{toggle: 'tab', target: '#notes_content'}} - Notes - %span#note_count_wrapper - ( - %span#note_count= @notes.length - ) - %li#mappings_top.nav-item - %a.nav-link.py-1{:href => "#mappings", data:{toggle: 'tab', target: '#mappings_content'}} - Class Mappings ( - %span#mapping_count= @mappings.size += render TurboFrameComponent.new(id: 'concept_show', data: { turbo: false }) do + - if @concept.id.eql?("bp_fake_root") + %div{:style => "padding: 100px 0; font-size: larger; font-weight: bold; text-align: center;"} + Use the "Jump To" to find a class and display details, visualization, notes, and mappings + - else + .cls-info-container + %ul.nav.nav-tabs.tabs + %li#details_top.nav-item + %button.nav-link.active.py-1{:href => "#details" , data:{'bs-toggle': 'tab', 'bs-target': '#details_content'}} Details + %li#visualization_top.nav-item + %button.nav-link.py-1{:href => "#visualization", data:{'bs-toggle': 'tab', 'bs-target': '#visualization_content'}} Visualization + %li#notes_top.nav-item + %button.nav-link.py-1{:href => "#notes", data:{'bs-toggle': 'tab', 'bs-target': '#notes_content'}} + Notes + %span#note_count_wrapper + ( + %span#note_count= @notes.length ) - - if @enable_ontolobridge - %li#request_term_top.nav-item - %a.nav-link.py-1{:href => "#request_term", data:{toggle: 'tab', target: '#request_term'}} - New Term Requests - - if $PURL_ENABLED - = link_to("#classPermalinkModal", class: "class-permalink nav-link", title: "Get a permanent link to this class", aria: {label: "Get a permanent link to this class"}, data: {toggle: "modal", current_purl: "#{@current_purl}"}) do - %i{class: "fas fa-link", aria: {hidden: "true"}} - #contents.tab-content - #details_content.tab-pane.active.show - = render :partial =>'/concepts/details' - #visualization_content.tab-pane - = render :partial =>'/concepts/biomixer' - #notes_content.tab-pane - = render :partial =>'/notes/list' - #mappings_content.tab-pane - = render :partial => '/mappings/concept_mappings' - - if @enable_ontolobridge - #request_term_content.tab-pane - = render :partial =>'/concepts/request_term' -%div.show-if-loading.align-self-center.my-auto - loading... + %li#mappings_top.nav-item + %button.nav-link.py-1{:href => "#mappings", data:{'bs-toggle': 'tab', 'bs-target': '#mappings_content'}} + Class Mappings ( + %span#mapping_count= @mappings.size + ) + - if $PURL_ENABLED + = link_to("#classPermalinkModal", class: "class-permalink nav-link", title: "Get a permanent link to this class", aria: {label: "Get a permanent link to this class"}, data: {toggle: "modal", current_purl: "#{@current_purl}"}) do + %i{class: "fas fa-link", aria: {hidden: "true"}} + #contents.tab-content + #details_content.tab-pane.active.show + = render :partial =>'/concepts/details' + #visualization_content.tab-pane + = render :partial =>'/concepts/biomixer' + #notes_content.tab-pane + = render :partial =>'/notes/list' + #mappings_content.tab-pane + = render :partial => '/mappings/concept_mappings' + :javascript jQuery(document).ready(function(){ diff --git a/app/views/layouts/_ontology_viewer.html.haml b/app/views/layouts/_ontology_viewer.html.haml index 6262ec3b8..527dc6a15 100644 --- a/app/views/layouts/_ontology_viewer.html.haml +++ b/app/views/layouts/_ontology_viewer.html.haml @@ -108,7 +108,7 @@ %div.row.pb-4 %div.col %div.card.py-3 - %div + %div{data: {controller: 'ontology-viewer-tabs', 'ontology-viewer-tabs-language-sections-value': ontology_data_sections }} - sections = sections_to_show %div.ontologies-tabs-container{data:{action: 'tab-selected->ontology-viewer-tabs#updateLanguageSelector'}} = render TabsContainerComponent.new(id: 'ontology_viewer', url_parameter: 'p') do |t| diff --git a/app/views/layouts/angular.html.erb b/app/views/layouts/angular.html.erb index 6b6f71f2e..8b4da096e 100644 --- a/app/views/layouts/angular.html.erb +++ b/app/views/layouts/angular.html.erb @@ -33,7 +33,6 @@ <%= stylesheet_link_tag "application" %> - <%=javascript_include_tag "application-esbuild", "data-turbo-track": "reload", type: "module" %> <%=javascript_include_tag "vendor"%> <%=javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/handlebars.js/2.0.0/handlebars.min.js"%> <%=javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.1/Chart.min.js"%> diff --git a/app/views/layouts/appliance.html.haml b/app/views/layouts/appliance.html.haml index 397a301bf..ee0de53a7 100644 --- a/app/views/layouts/appliance.html.haml +++ b/app/views/layouts/appliance.html.haml @@ -14,7 +14,6 @@ = stylesheet_link_tag "https://use.fontawesome.com/releases/v5.2.0/css/all.css", integrity: "sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ", crossorigin: "anonymous" = stylesheet_link_tag "application", media: "all" - = javascript_include_tag "application-esbuild", "data-turbo-track": "reload", type: "module" = javascript_include_tag "vendor" = javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/handlebars.js/2.0.0/handlebars.min.js" = javascript_include_tag "//ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js" diff --git a/app/views/ontologies/_lazy_load_content.html.haml b/app/views/ontologies/_lazy_load_content.html.haml deleted file mode 100644 index ae7b28ac1..000000000 --- a/app/views/ontologies/_lazy_load_content.html.haml +++ /dev/null @@ -1,4 +0,0 @@ -- if current_section.eql?(section_title) - = yield -- else - = render TurboFrameComponent.new(id: section_title, src: "/ontologies/#{@ontology.acronym}?p=#{section_title}", loading: :lazy) \ No newline at end of file diff --git a/app/views/ontologies/_mappings.html.haml b/app/views/ontologies/_mappings.html.haml index 699558aaa..71f656cf1 100644 --- a/app/views/ontologies/_mappings.html.haml +++ b/app/views/ontologies/_mappings.html.haml @@ -1,3 +1,3 @@ -= turbo_frame_tag 'mappings' do += turbo_frame_tag 'mappings', data: {turbo: false} do #mappings_content = render :partial => 'mappings/count' diff --git a/app/views/ontologies/_metadata.html.haml b/app/views/ontologies/_metadata.html.haml index 5efe86a87..98c106b5a 100644 --- a/app/views/ontologies/_metadata.html.haml +++ b/app/views/ontologies/_metadata.html.haml @@ -1,5 +1,5 @@ -= turbo_frame_tag 'summary' do - %div.ont-metadata += turbo_frame_tag 'summary', data: {turbo: false} do + %div.ont-metadata.py-3 -# Details pane %section.ont-metadata-card.ont-details-card %header.pb-2.fw-bold Details diff --git a/app/views/ontologies/_notes.html.haml b/app/views/ontologies/_notes.html.haml index 11ee81c20..4db993a52 100644 --- a/app/views/ontologies/_notes.html.haml +++ b/app/views/ontologies/_notes.html.haml @@ -1,4 +1,4 @@ -= turbo_frame_tag 'notes' do += turbo_frame_tag 'notes', data: {turbo: false} do %div#notes_content{style:"margin: 1em 0"} %h2{style:"margin-bottom: -0.5em; font-size: x-large; padding: .5em .5em 0; float: left;"} Notes = render :partial => 'notes/ontology_list' diff --git a/app/views/ontologies/_treeview.html.haml b/app/views/ontologies/_treeview.html.haml index 10ccde6cb..cc7b4cac7 100644 --- a/app/views/ontologies/_treeview.html.haml +++ b/app/views/ontologies/_treeview.html.haml @@ -1,9 +1,10 @@ = turbo_frame_tag 'concepts_tree_view' do - #tree_wrapper - %ul.simpleTree{data:{controller: 'simple-tree'}} - %li.root - %ul - = draw_tree(@root, @concept.id) # application_helper::draw_tree + - unless @ontology.flat? + #tree_wrapper.card.p-1 + %ul.simpleTree{data:{controller: 'simple-tree'}} + %li.root + %ul + = draw_tree(@root, @concept.id) :javascript jQuery(document).ready(function () { diff --git a/app/views/ontologies/_widgets.html.haml b/app/views/ontologies/_widgets.html.haml index ddd634b2a..c4c4f8159 100644 --- a/app/views/ontologies/_widgets.html.haml +++ b/app/views/ontologies/_widgets.html.haml @@ -1,4 +1,4 @@ -= turbo_frame_tag 'widgets' do += turbo_frame_tag 'widgets', data: {turbo: false} do - ont_uri = "/ontologies/#{@ontology.acronym}" - get_code_prefix = ont_uri + '?p=widgets#TB_inline&height=400&width=600' diff --git a/app/views/ontologies/properties.html.haml b/app/views/ontologies/properties.html.haml index dc3f796fa..ce3500759 100644 --- a/app/views/ontologies/properties.html.haml +++ b/app/views/ontologies/properties.html.haml @@ -1,5 +1,5 @@ -= turbo_frame_tag 'properties' do - %div.ont-properties{data:{controller: 'container-splitter'}} += render TurboFrameComponent.new(id: 'properties',data: {"turbo-frame-target": "frame"}) do + %div.ont-properties.py-3{data:{controller: 'container-splitter'}} %div#propTree{data:{'container-splitter-target': 'container'}} %div#prop_contents.pl-3{data:{'container-splitter-target': 'container'}} diff --git a/app/views/ontologies/visualize.html.haml b/app/views/ontologies/visualize.html.haml index 9b1b6ebf1..f55661777 100644 --- a/app/views/ontologies/visualize.html.haml +++ b/app/views/ontologies/visualize.html.haml @@ -1,35 +1,27 @@ -= turbo_frame_tag 'classes' do += render TurboFrameComponent.new(id: 'classes', data: {"turbo-frame-target": "frame"}) do - unless @error - @title = "#{@ontology.name} - #{@concept.prefLabel}" - - @new_term_request_ontologies - - @enable_ontolobridge = !$NEW_TERM_REQUEST_ONTOLOGIES.nil? && $NEW_TERM_REQUEST_ONTOLOGIES.include?(@ontology.acronym) %div.tooltip - %div#bd_content.bd_content.explore{data:{controller: 'container-splitter'}} + %div#bd_content.bd_content.explore.py-3{data:{controller: 'container-splitter'}} %div.sidebar.d-flex.flex-column.pr-2{data:{'container-splitter-target': 'container'}} - -# Search box for class tree - %div#qsearch.input-group.pb-2 - %div.input-group-prepend - %span.input-group-text Jump to: - = text_field_tag("search_box", nil, class: "form-control rounded-right", aria: {label: "Jump to:"}, - data: {controller: 'class-search', 'class-search-ontology-acronym-value': @ontology.acronym, - 'class-search-spinner-src-value': asset_path("jquery.simple.tree/spinner.gif")}) + %div#qsearch.input-group.pb-2.pe-1 + %span.input-group-text Jump to: + = text_field_tag("search_box", nil, class: "form-control rounded-end", aria: {label: "Jump to:"}, + data: {controller: 'class-search-auto-complete', 'class-search-auto-complete-ontology-acronym-value': @ontology.acronym, + 'class-search-auto-complete-spinner-src-value': asset_path("jquery.simple.tree/spinner.gif")}) = hidden_field_tag("jump_to_concept_id") - -# Class tree - %div#sd_content.card.p-1 - = turbo_frame_tag 'concepts_tree_view' , src: "/ajax/classes/treeview?ontology=#{@ontology.acronym}&conceptid=#{escape(@concept.id)}" do - = loading_spinner(true) + %div#sd_content.p-1 + = render TurboFrameComponent.new(id: 'concepts_tree_view' , src: "/ajax/classes/treeview?ontology=#{@ontology.acronym}&conceptid=#{escape(@concept.id)}") %div#concept_content.d-flex.flex-column.card.p-1.ml-2{data:{'container-splitter-target': 'container'}} = render partial: 'concepts/show' - - form_for(:search, :url => '', :html=>{:id=>'search_form'}) do |f| + - form_for(:search, :url => '', :html=>{:id=>'search_form'}) do %input{:name => "search[ontologies][]", :type => "hidden", :value => @ontology.acronym}/ = hidden_field :search, :search_type, :value=>"contains" = hidden_field :search, :keyword, :value=>"",:id=>"search_keyword" - else # found an error = "

    #{@error}

    " - :javascript - diff --git a/config/application.rb b/config/application.rb index 77aa0796f..8a1fe795a 100644 --- a/config/application.rb +++ b/config/application.rb @@ -26,7 +26,6 @@ class Application < Rails::Application config.exceptions_app = self.routes - config.autoload_paths += %W[#{config.root}/app/lib/kgcl] config.settings = config_for :settings diff --git a/config/bioportal_config_env.rb.sample b/config/bioportal_config_env.rb.sample index 277b97201..746efd10c 100644 --- a/config/bioportal_config_env.rb.sample +++ b/config/bioportal_config_env.rb.sample @@ -301,7 +301,7 @@ $FOOTER_LINKS = { -$UI_THEME = ENV['UI_THEME'] || 'ontoportal' +$UI_THEME = ENV['UI_THEME'] || 'bioportal' $HOSTNAME = ENV['API_URL'] if $HOSTNAME diff --git a/config/initializers/zeitwerk.rb b/config/initializers/zeitwerk.rb index 5e278416f..a105110d1 100644 --- a/config/initializers/zeitwerk.rb +++ b/config/initializers/zeitwerk.rb @@ -1,5 +1,4 @@ # frozen_string_literal: true - Rails.autoloaders.each do |autoloader| autoloader.inflector = Zeitwerk::Inflector.new autoloader.inflector.inflect(